1use serde::{Deserialize, Serialize};
5mod bulk_batch_id;
6pub use bulk_batch_id::{BulkBatchIdError, bulk_batch_id};
7
8pub const LODESTONE_API_SCHEMA_ID: &str = "lodestone-api";
9pub const LODESTONE_API_SPEC_SHA256: &str = "8184d5939f62a5252ee272c1304a034ed490a452fe55bae356840d6f40b8e3d7";
10pub const LODESTONE_API_FORMAT_VERSION: u16 = 4;
11pub const LODESTONE_API_ALPN: &str = "lodestone";
12pub const BULK_BATCH_ID_FORMAT_VERSION: u16 = 2;
13pub const BULK_BATCH_ID_DOMAIN: &[u8] = b"lodestone/bulk-batch\0";
14pub const LODESTONE_API_MAX_OPERATION_WAIT_ATTEMPTS: u32 = 100;
15pub const LODESTONE_API_MAX_OPERATION_WAIT_INTERVAL_MILLIS: u64 = 60000;
16
17#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
18#[serde(transparent)]
19pub struct I64 {
20 pub value: String,
21}
22#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
23#[serde(transparent)]
24pub struct U64 {
25 pub value: String,
26}
27#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
28#[serde(transparent)]
29pub struct Identity {
30 pub value: String,
31}
32#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
33#[serde(transparent)]
34pub struct Digest {
35 pub value: String,
36}
37#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
38pub struct ExactDecimal {
39 pub coefficient: String,
40 pub scale: u32,
41}
42#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
43#[serde(transparent)]
44pub struct ApproximateNumber {
45 pub canonical_value: String,
46}
47#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
48#[serde(deny_unknown_fields)]
49pub struct RawJson {
50 pub bytes_base64: String,
51}
52#[derive(Clone, Copy, Debug, Eq, PartialEq)]
53pub enum ScalarError {
54 InvalidI64,
55 InvalidU64,
56 InvalidIdentity,
57 InvalidDigest,
58 InvalidDecimal,
59 InvalidApproximateNumber,
60}
61impl std::fmt::Display for ScalarError {
62 fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
63 write!(formatter, "invalid Lodestone API scalar: {self:?}")
64 }
65}
66impl I64 {
67 pub fn validate(&self) -> Result<(), ScalarError> {
68 self.value
69 .parse::<i64>()
70 .ok()
71 .filter(|parsed| parsed.to_string() == self.value)
72 .map(|_| ())
73 .ok_or(ScalarError::InvalidI64)
74 }
75}
76impl U64 {
77 pub fn validate(&self) -> Result<(), ScalarError> {
78 self.value
79 .parse::<u64>()
80 .ok()
81 .filter(|parsed| parsed.to_string() == self.value)
82 .map(|_| ())
83 .ok_or(ScalarError::InvalidU64)
84 }
85}
86impl Identity {
87 pub fn validate(&self) -> Result<(), ScalarError> {
88 (self.value.len() == 32
89 && self
90 .value
91 .bytes()
92 .all(|byte| byte.is_ascii_digit() || (b'a'..=b'f').contains(&byte)))
93 .then_some(())
94 .ok_or(ScalarError::InvalidIdentity)
95 }
96}
97impl Digest {
98 pub fn validate(&self) -> Result<(), ScalarError> {
99 (self.value.len() == 64
100 && self
101 .value
102 .bytes()
103 .all(|byte| byte.is_ascii_digit() || (b'a'..=b'f').contains(&byte)))
104 .then_some(())
105 .ok_or(ScalarError::InvalidDigest)
106 }
107}
108impl ExactDecimal {
109 pub fn validate(&self) -> Result<(), ScalarError> {
110 let unsigned = self.coefficient.strip_prefix('-').unwrap_or(&self.coefficient);
111 let canonical = self.coefficient == "0"
112 || (!unsigned.is_empty()
113 && !unsigned.starts_with('0')
114 && unsigned.bytes().all(|byte| byte.is_ascii_digit()));
115 (canonical
116 && self.coefficient != "-0"
117 && self.scale <= 1024
118 && (self.scale == 0 || !self.coefficient.ends_with('0')))
119 .then_some(())
120 .ok_or(ScalarError::InvalidDecimal)
121 }
122}
123impl ApproximateNumber {
124 pub fn validate(&self) -> Result<(), ScalarError> {
125 self.canonical_value
126 .parse::<f64>()
127 .ok()
128 .filter(|parsed| {
129 parsed.is_finite() && self.canonical_value != "-0" && parsed.to_string() == self.canonical_value
130 })
131 .map(|_| ())
132 .ok_or(ScalarError::InvalidApproximateNumber)
133 }
134}
135macro_rules! deserialize_validated_string_scalar {
136 ($type:ty) => {
137 impl<'de> Deserialize<'de> for $type {
138 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
139 where
140 D: serde::Deserializer<'de>,
141 {
142 let value = String::deserialize(deserializer)?;
143 let scalar = Self { value };
144 scalar.validate().map_err(serde::de::Error::custom)?;
145 Ok(scalar)
146 }
147 }
148 };
149}
150deserialize_validated_string_scalar!(I64);
151deserialize_validated_string_scalar!(U64);
152deserialize_validated_string_scalar!(Identity);
153deserialize_validated_string_scalar!(Digest);
154impl<'de> Deserialize<'de> for ExactDecimal {
155 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
156 where
157 D: serde::Deserializer<'de>,
158 {
159 #[derive(Deserialize)]
160 #[serde(deny_unknown_fields)]
161 struct Wire {
162 coefficient: String,
163 scale: u32,
164 }
165 let wire = Wire::deserialize(deserializer)?;
166 let scalar = Self {
167 coefficient: wire.coefficient,
168 scale: wire.scale,
169 };
170 scalar.validate().map_err(serde::de::Error::custom)?;
171 Ok(scalar)
172 }
173}
174impl<'de> Deserialize<'de> for ApproximateNumber {
175 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
176 where
177 D: serde::Deserializer<'de>,
178 {
179 let canonical_value = String::deserialize(deserializer)?;
180 let scalar = Self { canonical_value };
181 scalar.validate().map_err(serde::de::Error::custom)?;
182 Ok(scalar)
183 }
184}
185#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
186#[serde(tag = "kind", content = "value", rename_all = "snake_case")]
187pub enum JsonValue {
188 Null,
189 Bool(bool),
190 String(String),
191 I64(I64),
192 U64(U64),
193 ExactDecimal(ExactDecimal),
194 Approximate(ApproximateNumber),
195 Array(Vec<JsonValue>),
196 Object(Vec<JsonField>),
197}
198#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
199#[serde(deny_unknown_fields)]
200pub struct JsonField {
201 pub name: String,
202 pub value: JsonValue,
203}
204#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
205#[serde(rename_all = "snake_case")]
206pub enum Action {
207 IdentityDiscovery,
208 DataRead,
209 DataWrite,
210 Append,
211 ResolveAppend,
212 IndexAdmin,
213 CatalogRead,
214 TaskRead,
215 SubscriptionRead,
216 DiagnosticsRead,
217 DiagnosticsCreate,
218 SecurityRead,
219 SecurityAdmin,
220 AuditRead,
221 QuotaRead,
222 QuotaAdmin,
223 BindingRead,
224 LifecycleAdmin,
225 AdmissionRead,
226 AdmissionAdmin,
227 UsageRead,
228 OperationRead,
229 OperationCancel,
230 CollectionExport,
231 CollectionRestore,
232 IndexExport,
233 IndexImport,
234}
235
236#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
237#[serde(rename_all = "snake_case")]
238pub enum ErrorCode {
239 Aborted,
240 DeadlineExceeded,
241 InvalidRequest,
242 UnsupportedVersion,
243 Unauthenticated,
244 PermissionDenied,
245 NotFound,
246 Conflict,
247 StaleCursor,
248 RestartBudgetExhausted,
249 LimitExceeded,
250 CapabilityUnavailable,
251 NotSubmitted,
252 SubmittedIndeterminate,
253 ExpiredUnknown,
254 SecretNotEscrowed,
255 RetentionGap,
256 ArtifactRangeInvalid,
257 ChecksumMismatch,
258 TemporarilyUnavailable,
259 Internal,
260}
261
262#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
263#[serde(rename_all = "snake_case")]
264pub enum Command {
265 Discover,
266 ListIndexes,
267 GetIndex,
268 ValidateIndexChange,
269 ApplyIndexChange,
270 ApplyAdministrationMutation,
271 ListAliases,
272 GetAlias,
273 ListDataStreams,
274 GetDataStream,
275 ListComponentTemplates,
276 GetComponentTemplate,
277 ListIndexTemplates,
278 GetIndexTemplate,
279 ListIngestPipelines,
280 GetIngestPipeline,
281 SimulateIngestPipeline,
282 ReprocessByQuery,
283 ListLifecyclePolicies,
284 GetLifecyclePolicy,
285 PrepareCreateIndex,
286 PrepareDeleteIndex,
287 SubmitCatalogAction,
288 ResolveCatalogAction,
289 PrepareReplayableSourceIndex,
290 SubmitReplayableSourceIndex,
291 GetReplayableSource,
292 ControlReplayableSource,
293 CloneIndex,
294 ConfigureHistory,
295 GetHistory,
296 ResolveHistory,
297 PlaceHistoryHold,
298 ReleaseHistoryHold,
299 PrepareDocumentMutation,
300 SubmitDocumentMutation,
301 PrepareDocumentBulk,
302 SubmitDocumentBulk,
303 ResolveDocumentBulk,
304 PrepareAppendBulk,
305 SubmitAppendBulk,
306 ResolveAppendBulk,
307 ObserveAppendCommitted,
308 ResolveDocumentMutation,
309 GetDocument,
310 Search,
311 TraverseRelationships,
312 QueryProfiles,
313 EvaluateTemporalEvidence,
314 CreateContinuousTemporalEvaluation,
315 GetContinuousTemporalEvaluation,
316 PauseContinuousTemporalEvaluation,
317 ResumeContinuousTemporalEvaluation,
318 ReplaceContinuousTemporalEvaluation,
319 RetireContinuousTemporalEvaluation,
320 ReadContinuousTemporalEvidence,
321 ValidateSearch,
322 OpenPit,
323 RenewPit,
324 ClosePit,
325 ListOperations,
326 GetOperation,
327 WaitOperation,
328 CancelOperation,
329 ListAuditEvents,
330 ExportAuditEvents,
331 ReserveServiceCredential,
332 ReserveServiceCredentialRotation,
333 ActivateServiceCredential,
334 ResolveServiceCredentialReservation,
335 PrepareRevokeServiceCredential,
336 RevokeServiceCredential,
337 ResolveSecurityAction,
338 GetSecurityRole,
339 PrepareRoleAppendAccessChange,
340 SubmitRoleAppendAccessChange,
341 ListServiceCredentials,
342 GetRuntimeStatus,
343 GetResultCacheStatus,
344 GetFieldPromotionStatus,
345 GetOverloadStatus,
346 ConfigureExternalKey,
347 RotateExternalKeyBinding,
348 ConfigureAggregateThenDelete,
349 GetLifecycleStatus,
350 GetQuota,
351 UpdateQuota,
352 GetBinding,
353 GetAdmissionStatus,
354 SetAdmission,
355 GetQuiesceStatus,
356 GetDecommissionReadiness,
357 GetUpgradeReadiness,
358 GetMaintenanceStatus,
359 WarmVectorIndex,
360 EvaluateVectorRecall,
361 CalibrateVectorStrategy,
362 GetVectorDiagnostic,
363 CreateDiagnostic,
364 GetDiagnostic,
365 PrepareCollectionExport,
366 StartCollectionExport,
367 ResolveCollectionExport,
368 VerifyCollectionExport,
369 PrepareCollectionRestore,
370 StartCollectionRestore,
371 ResolveCollectionRestore,
372 PrepareIndexExport,
373 StartIndexExport,
374 ResolveIndexExport,
375 VerifyIndexExport,
376 PrepareIndexImport,
377 StartIndexImport,
378 ResolveIndexImport,
379 ReadArtifactChunk,
380 ExportUsage,
381 ExecuteStateRead,
382 PrepareStateWrite,
383 SubmitStateWrite,
384 ResolveStateWrite,
385}
386
387pub const LODESTONE_API_ERROR_CODES: &[ErrorCode] = &[
388 ErrorCode::Aborted,
389 ErrorCode::DeadlineExceeded,
390 ErrorCode::InvalidRequest,
391 ErrorCode::UnsupportedVersion,
392 ErrorCode::Unauthenticated,
393 ErrorCode::PermissionDenied,
394 ErrorCode::NotFound,
395 ErrorCode::Conflict,
396 ErrorCode::StaleCursor,
397 ErrorCode::RestartBudgetExhausted,
398 ErrorCode::LimitExceeded,
399 ErrorCode::CapabilityUnavailable,
400 ErrorCode::NotSubmitted,
401 ErrorCode::SubmittedIndeterminate,
402 ErrorCode::ExpiredUnknown,
403 ErrorCode::SecretNotEscrowed,
404 ErrorCode::RetentionGap,
405 ErrorCode::ArtifactRangeInvalid,
406 ErrorCode::ChecksumMismatch,
407 ErrorCode::TemporarilyUnavailable,
408 ErrorCode::Internal,
409];
410
411#[derive(Clone, Copy, Debug, Eq, PartialEq)]
412pub struct ActionAuthorizationContract {
413 pub action: Action,
414 pub any_of_permission_ids: &'static [&'static str],
415}
416pub const LODESTONE_API_ACTION_AUTHORIZATION: &[ActionAuthorizationContract] = &[
417 ActionAuthorizationContract {
418 action: Action::IdentityDiscovery,
419 any_of_permission_ids: &["security_read"],
420 },
421 ActionAuthorizationContract {
422 action: Action::DataRead,
423 any_of_permission_ids: &["data_read"],
424 },
425 ActionAuthorizationContract {
426 action: Action::DataWrite,
427 any_of_permission_ids: &["data_write"],
428 },
429 ActionAuthorizationContract {
430 action: Action::Append,
431 any_of_permission_ids: &["append"],
432 },
433 ActionAuthorizationContract {
434 action: Action::ResolveAppend,
435 any_of_permission_ids: &["resolve_append"],
436 },
437 ActionAuthorizationContract {
438 action: Action::IndexAdmin,
439 any_of_permission_ids: &["index_admin"],
440 },
441 ActionAuthorizationContract {
442 action: Action::CatalogRead,
443 any_of_permission_ids: &["catalog_read"],
444 },
445 ActionAuthorizationContract {
446 action: Action::TaskRead,
447 any_of_permission_ids: &["task_read"],
448 },
449 ActionAuthorizationContract {
450 action: Action::SubscriptionRead,
451 any_of_permission_ids: &["subscription_read"],
452 },
453 ActionAuthorizationContract {
454 action: Action::DiagnosticsRead,
455 any_of_permission_ids: &["diagnostics_read"],
456 },
457 ActionAuthorizationContract {
458 action: Action::DiagnosticsCreate,
459 any_of_permission_ids: &["diagnostics_create"],
460 },
461 ActionAuthorizationContract {
462 action: Action::SecurityRead,
463 any_of_permission_ids: &["security_read"],
464 },
465 ActionAuthorizationContract {
466 action: Action::SecurityAdmin,
467 any_of_permission_ids: &["security_admin"],
468 },
469 ActionAuthorizationContract {
470 action: Action::AuditRead,
471 any_of_permission_ids: &["audit_read"],
472 },
473 ActionAuthorizationContract {
474 action: Action::QuotaRead,
475 any_of_permission_ids: &["quota_read"],
476 },
477 ActionAuthorizationContract {
478 action: Action::QuotaAdmin,
479 any_of_permission_ids: &["quota_admin"],
480 },
481 ActionAuthorizationContract {
482 action: Action::BindingRead,
483 any_of_permission_ids: &["binding_read"],
484 },
485 ActionAuthorizationContract {
486 action: Action::LifecycleAdmin,
487 any_of_permission_ids: &["lifecycle_admin"],
488 },
489 ActionAuthorizationContract {
490 action: Action::AdmissionRead,
491 any_of_permission_ids: &["admission_read"],
492 },
493 ActionAuthorizationContract {
494 action: Action::AdmissionAdmin,
495 any_of_permission_ids: &["admission_admin"],
496 },
497 ActionAuthorizationContract {
498 action: Action::UsageRead,
499 any_of_permission_ids: &["usage_read"],
500 },
501 ActionAuthorizationContract {
502 action: Action::OperationRead,
503 any_of_permission_ids: &[
504 "catalog_read",
505 "task_read",
506 "security_read",
507 "diagnostics_read",
508 "collection_export",
509 "collection_restore",
510 "index_export",
511 "index_import",
512 ],
513 },
514 ActionAuthorizationContract {
515 action: Action::OperationCancel,
516 any_of_permission_ids: &[
517 "index_admin",
518 "task_admin",
519 "security_admin",
520 "diagnostics_create",
521 "collection_export",
522 "index_export",
523 ],
524 },
525 ActionAuthorizationContract {
526 action: Action::CollectionExport,
527 any_of_permission_ids: &["collection_export"],
528 },
529 ActionAuthorizationContract {
530 action: Action::CollectionRestore,
531 any_of_permission_ids: &["collection_restore"],
532 },
533 ActionAuthorizationContract {
534 action: Action::IndexExport,
535 any_of_permission_ids: &["index_export"],
536 },
537 ActionAuthorizationContract {
538 action: Action::IndexImport,
539 any_of_permission_ids: &["index_import"],
540 },
541];
542pub fn action_authorization(action: Action) -> Option<&'static ActionAuthorizationContract> {
543 LODESTONE_API_ACTION_AUTHORIZATION
544 .iter()
545 .find(|contract| contract.action == action)
546}
547
548#[derive(Clone, Copy, Debug, Eq, PartialEq)]
549pub struct RuntimeCapabilityAuthorizationContract {
550 pub capability_id: &'static str,
551 pub required_permission_ids: &'static [&'static str],
552}
553pub const LODESTONE_API_RUNTIME_CAPABILITY_AUTHORIZATION: &[RuntimeCapabilityAuthorizationContract] = &[
554 RuntimeCapabilityAuthorizationContract {
555 capability_id: "search_and_append_log",
556 required_permission_ids: &["data_read", "data_write"],
557 },
558 RuntimeCapabilityAuthorizationContract {
559 capability_id: "native_metric_records_and_time_series",
560 required_permission_ids: &["data_read", "append"],
561 },
562 RuntimeCapabilityAuthorizationContract {
563 capability_id: "historical_temporal_evidence",
564 required_permission_ids: &["data_read"],
565 },
566 RuntimeCapabilityAuthorizationContract {
567 capability_id: "continuous_temporal_evidence",
568 required_permission_ids: &["data_read", "lifecycle_admin"],
569 },
570 RuntimeCapabilityAuthorizationContract {
571 capability_id: "bounded_relationship_traversal",
572 required_permission_ids: &["data_read", "data_write", "append"],
573 },
574 RuntimeCapabilityAuthorizationContract {
575 capability_id: "native_continuous_profiles",
576 required_permission_ids: &["data_read", "append"],
577 },
578 RuntimeCapabilityAuthorizationContract {
579 capability_id: "committed_vector_and_hybrid",
580 required_permission_ids: &["data_read"],
581 },
582 RuntimeCapabilityAuthorizationContract {
583 capability_id: "realtime_or_pit_vector",
584 required_permission_ids: &["data_read"],
585 },
586 RuntimeCapabilityAuthorizationContract {
587 capability_id: "state_standard_express_ephemeral",
588 required_permission_ids: &["data_read", "data_write"],
589 },
590 RuntimeCapabilityAuthorizationContract {
591 capability_id: "state_relaxed",
592 required_permission_ids: &[],
593 },
594 RuntimeCapabilityAuthorizationContract {
595 capability_id: "bounded_resp",
596 required_permission_ids: &["data_read", "data_write"],
597 },
598 RuntimeCapabilityAuthorizationContract {
599 capability_id: "lodestone_rust_client",
600 required_permission_ids: &[],
601 },
602 RuntimeCapabilityAuthorizationContract {
603 capability_id: "replayable_source_indexes",
604 required_permission_ids: &["index_admin"],
605 },
606 RuntimeCapabilityAuthorizationContract {
607 capability_id: "zero_copy_clones",
608 required_permission_ids: &["index_admin"],
609 },
610 RuntimeCapabilityAuthorizationContract {
611 capability_id: "retained_history",
612 required_permission_ids: &["data_read"],
613 },
614 RuntimeCapabilityAuthorizationContract {
615 capability_id: "generation_result_cache",
616 required_permission_ids: &["data_read"],
617 },
618 RuntimeCapabilityAuthorizationContract {
619 capability_id: "adaptive_field_promotion",
620 required_permission_ids: &["index_admin"],
621 },
622 RuntimeCapabilityAuthorizationContract {
623 capability_id: "durable_overload_buffering",
624 required_permission_ids: &["data_read", "data_write"],
625 },
626 RuntimeCapabilityAuthorizationContract {
627 capability_id: "current_table_reader",
628 required_permission_ids: &["data_read"],
629 },
630 RuntimeCapabilityAuthorizationContract {
631 capability_id: "crypto_shred_and_rollup_lifecycle",
632 required_permission_ids: &["lifecycle_admin"],
633 },
634];
635pub fn runtime_capability_authorization(
636 capability_id: &str,
637) -> Option<&'static RuntimeCapabilityAuthorizationContract> {
638 LODESTONE_API_RUNTIME_CAPABILITY_AUTHORIZATION
639 .iter()
640 .find(|contract| contract.capability_id == capability_id)
641}
642
643#[derive(Clone, Copy, Debug, Eq, PartialEq)]
644pub struct ClusterControlActionContract {
645 pub credential_kind: &'static str,
646 pub action: &'static str,
647}
648pub const LODESTONE_API_CLUSTER_CONTROL_FORMAT_VERSION: u16 = 2;
649pub const LODESTONE_API_CLUSTER_CONTROL_TRANSPORT: &str = "isolated_tls_u32_be_length_then_canonical_json";
650pub const LODESTONE_API_CLUSTER_CONTROL_ACTIONS: &[ClusterControlActionContract] = &[
651 ClusterControlActionContract {
652 credential_kind: "collection_provisioner",
653 action: "initialize_collection_authority",
654 },
655 ClusterControlActionContract {
656 credential_kind: "collection_provisioner",
657 action: "activate_collection_authority",
658 },
659 ClusterControlActionContract {
660 credential_kind: "collection_provisioner",
661 action: "resolve_collection_authority",
662 },
663 ClusterControlActionContract {
664 credential_kind: "collection_provisioner",
665 action: "inspect_collection_retirement",
666 },
667 ClusterControlActionContract {
668 credential_kind: "collection_provisioner",
669 action: "retire_collection_authority",
670 },
671 ClusterControlActionContract {
672 credential_kind: "collection_provisioner",
673 action: "reserve_cluster_control_credential_rotation",
674 },
675 ClusterControlActionContract {
676 credential_kind: "collection_provisioner",
677 action: "activate_cluster_control_credential_rotation",
678 },
679 ClusterControlActionContract {
680 credential_kind: "collection_provisioner",
681 action: "revoke_cluster_control_credential",
682 },
683 ClusterControlActionContract {
684 credential_kind: "collection_provisioner",
685 action: "resolve_cluster_control_credential",
686 },
687 ClusterControlActionContract {
688 credential_kind: "capacity_observer",
689 action: "observe_cluster_capacity",
690 },
691 ClusterControlActionContract {
692 credential_kind: "capacity_observer",
693 action: "observe_resource_diagnostics",
694 },
695 ClusterControlActionContract {
696 credential_kind: "recovery_operator",
697 action: "list_cluster_backups",
698 },
699 ClusterControlActionContract {
700 credential_kind: "recovery_operator",
701 action: "get_cluster_backup",
702 },
703 ClusterControlActionContract {
704 credential_kind: "recovery_operator",
705 action: "create_cluster_backup",
706 },
707 ClusterControlActionContract {
708 credential_kind: "recovery_operator",
709 action: "resolve_cluster_backup",
710 },
711 ClusterControlActionContract {
712 credential_kind: "recovery_operator",
713 action: "delete_cluster_backup",
714 },
715 ClusterControlActionContract {
716 credential_kind: "recovery_operator",
717 action: "resolve_cluster_backup_deletion",
718 },
719 ClusterControlActionContract {
720 credential_kind: "recovery_operator",
721 action: "get_cluster_restore_readiness",
722 },
723 ClusterControlActionContract {
724 credential_kind: "recovery_operator",
725 action: "prepare_offline_recovery",
726 },
727 ClusterControlActionContract {
728 credential_kind: "recovery_operator",
729 action: "reserve_cluster_control_credential_rotation",
730 },
731 ClusterControlActionContract {
732 credential_kind: "recovery_operator",
733 action: "activate_cluster_control_credential_rotation",
734 },
735 ClusterControlActionContract {
736 credential_kind: "recovery_operator",
737 action: "revoke_cluster_control_credential",
738 },
739 ClusterControlActionContract {
740 credential_kind: "recovery_operator",
741 action: "resolve_cluster_control_credential",
742 },
743];
744pub const LODESTONE_API_CLUSTER_CONTROL_TYPES: &[&str] = &[
745 "cluster_control_session",
746 "cluster_control_request",
747 "cluster_control_response",
748 "collection_authority_operation",
749 "collection_retirement_blockers",
750 "core_capacity_observation",
751 "core_resource_diagnostic_page",
752 "cluster_control_credential_rotation",
753 "cluster_backup_operation",
754 "cluster_restore_readiness",
755];
756
757pub const LODESTONE_API_CURSOR_FORMAT_VERSION: u16 = 1;
758#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
759#[serde(deny_unknown_fields)]
760pub struct Cursor {
761 pub value: String,
762}
763
764pub const LODESTONE_API_LOCATOR_FORMAT_VERSION: u16 = 1;
765#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
766#[serde(deny_unknown_fields)]
767pub struct Locator {
768 pub authority: String,
769 pub value: String,
770}
771
772pub const LODESTONE_API_RESOURCE_FORMAT_VERSION: u16 = 1;
773#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
774#[serde(deny_unknown_fields)]
775pub struct Resource {
776 pub kind: String,
777 pub name: String,
778 pub incarnation: Identity,
779}
780
781pub const LODESTONE_API_FIELD_PROMOTION_CONFIGURATION_FORMAT_VERSION: u16 = 1;
782#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
783#[serde(deny_unknown_fields)]
784pub struct FieldPromotionConfiguration {
785 pub format_version: u32,
786 pub enabled: bool,
787 pub minimum_query_count: u32,
788 pub maximum_promoted_fields: u32,
789 pub maximum_cardinality: U64,
790 pub maximum_extra_bytes: U64,
791 pub allow_sensitive: bool,
792}
793
794pub const LODESTONE_API_OVERLOAD_CONFIGURATION_FORMAT_VERSION: u16 = 2;
795#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
796#[serde(deny_unknown_fields)]
797pub struct OverloadConfiguration {
798 pub format_version: u32,
799 pub mode: String,
800 pub maximum_backlog_bytes: U64,
801 pub maximum_backlog_age_millis: U64,
802 pub maximum_collection_share_bytes: U64,
803 pub maximum_recovery_ops_per_pass: u32,
804 pub maximum_pending_overlay_documents: U64,
805}
806
807pub const LODESTONE_API_INDEX_POLICIES_FORMAT_VERSION: u16 = 1;
808#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
809#[serde(deny_unknown_fields)]
810pub struct IndexPolicies {
811 pub durability: String,
812 pub storage: String,
813 pub cache: String,
814 #[serde(default, skip_serializing_if = "Option::is_none")]
815 pub default_visibility: Option<String>,
816 pub field_promotion: FieldPromotionConfiguration,
817 pub overload: OverloadConfiguration,
818}
819
820pub const LODESTONE_API_MAINTENANCE_BUDGETS_FORMAT_VERSION: u16 = 1;
821#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
822#[serde(deny_unknown_fields)]
823pub struct MaintenanceBudgets {
824 pub memtable_max_bytes: U64,
825 pub refresh_max_millis: U64,
826 pub seal_max_bytes: U64,
827 pub seal_max_millis: U64,
828 pub merge_max_bytes: U64,
829 pub delete_resolution_max_bytes: U64,
830 pub wal_retention_max_bytes: U64,
831 pub gc_max_keys: u32,
832 pub fsck_max_objects: u32,
833 pub deleted_tombstone_retention_millis: U64,
834}
835
836pub const LODESTONE_API_RESOURCE_DURABILITY_CLASS_FORMAT_VERSION: u16 = 1;
837#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
838#[serde(rename_all = "snake_case")]
839pub enum ResourceDurabilityClass {
840 RegionalObject,
841 ZonalLowLatency,
842 Relaxed,
843 Ephemeral,
844}
845
846pub const LODESTONE_API_RESOURCE_STORAGE_CLASS_FORMAT_VERSION: u16 = 1;
847#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
848#[serde(rename_all = "snake_case")]
849pub enum ResourceStorageClass {
850 Standard,
851 Cold,
852}
853
854pub const LODESTONE_API_VECTOR_QUALITY_OBJECTIVE_FORMAT_VERSION: u16 = 1;
855#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
856#[serde(rename_all = "snake_case")]
857pub enum VectorQualityObjective {
858 Balanced,
859 HighRecall,
860 MemoryEfficient,
861}
862
863pub const LODESTONE_API_VECTOR_INDEXING_OBJECTIVE_FORMAT_VERSION: u16 = 1;
864#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
865#[serde(rename_all = "snake_case")]
866pub enum VectorIndexingObjective {
867 FastBuild,
868 Balanced,
869 Compact,
870}
871
872pub const LODESTONE_API_VECTOR_RESIDENCY_INTENT_FORMAT_VERSION: u16 = 1;
873#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
874#[serde(rename_all = "snake_case")]
875pub enum VectorResidencyIntent {
876 Automatic,
877 PreferResident,
878 RequireResident,
879}
880
881pub const LODESTONE_API_VECTOR_CALIBRATION_BINDING_FORMAT_VERSION: u16 = 1;
882#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
883#[serde(deny_unknown_fields)]
884pub struct VectorCalibrationBinding {
885 pub profile: VectorStrategyProfile,
886 pub evidence_digest: Digest,
887}
888
889pub const LODESTONE_API_VECTOR_RESOURCE_POLICY_FORMAT_VERSION: u16 = 2;
890#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
891#[serde(deny_unknown_fields)]
892pub struct VectorResourcePolicy {
893 pub quality: VectorQualityObjective,
894 pub indexing: VectorIndexingObjective,
895 #[serde(default, skip_serializing_if = "Option::is_none")]
896 pub residency: Option<VectorResidencyIntent>,
897 #[serde(default, skip_serializing_if = "Option::is_none")]
898 pub calibration: Option<VectorCalibrationBinding>,
899}
900
901pub const LODESTONE_API_WORKLOAD_CLASS_FORMAT_VERSION: u16 = 1;
902#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
903#[serde(rename_all = "snake_case")]
904pub enum WorkloadClass {
905 InteractiveSearch,
906 BatchAnalytics,
907 StreamingIngest,
908 BulkBackfill,
909 InternalMaintenance,
910}
911
912pub const LODESTONE_API_INDEX_RESOURCE_SPEC_FORMAT_VERSION: u16 = 3;
913#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
914#[serde(deny_unknown_fields)]
915pub struct IndexResourceSpec {
916 pub format_version: u32,
917 pub revision: U64,
918 pub initial_shards: u32,
919 pub target_shard_bytes: U64,
920 pub durability: ResourceDurabilityClass,
921 pub storage_class: ResourceStorageClass,
922 pub ram_admission_weight: u32,
923 pub ram_hard_max_bytes: U64,
924 pub nvme_admission_weight: u32,
925 pub nvme_hard_max_bytes: U64,
926 pub refresh_objective_millis: u32,
927 pub memtable_hard_max_bytes: U64,
928 pub seal_parallelism: u32,
929 pub merge_parallelism: u32,
930 pub vector: VectorResourcePolicy,
931 #[serde(default, skip_serializing_if = "Option::is_none")]
932 pub lifecycle_binding: Option<Identity>,
933 pub encryption_required: bool,
934 #[serde(default, skip_serializing_if = "Option::is_none")]
935 pub resolver_capability: Option<Identity>,
936}
937
938pub const LODESTONE_API_INDEX_SUMMARY_FORMAT_VERSION: u16 = 1;
939#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
940#[serde(deny_unknown_fields)]
941pub struct IndexSummary {
942 pub name: String,
943 pub incarnation: Identity,
944 pub revision: U64,
945 pub mode: String,
946 pub retained_event_identity: bool,
947 pub state: String,
948 pub schema_generation: U64,
949 pub routing_revision: U64,
950 pub shard_count: u32,
951 pub policies: IndexPolicies,
952 pub management_mode: String,
953}
954
955pub const LODESTONE_API_MAPPING_MODE_FORMAT_VERSION: u16 = 1;
956#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
957#[serde(rename_all = "snake_case")]
958pub enum MappingMode {
959 Mutable,
960 AppendLog,
961 State,
962}
963
964pub const LODESTONE_API_DYNAMIC_MAPPING_POLICY_FORMAT_VERSION: u16 = 1;
965#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
966#[serde(rename_all = "snake_case")]
967pub enum DynamicMappingPolicy {
968 True,
969 False,
970 Strict,
971}
972
973pub const LODESTONE_API_MAPPING_ANALYZER_FORMAT_VERSION: u16 = 1;
974#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
975#[serde(rename_all = "snake_case")]
976pub enum MappingAnalyzer {
977 Keyword,
978 Simple,
979 Standard,
980 Whitespace,
981}
982
983pub const LODESTONE_API_KEYWORD_NORMALIZER_FORMAT_VERSION: u16 = 1;
984#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
985#[serde(rename_all = "snake_case")]
986pub enum KeywordNormalizer {
987 Keyword,
988 Lowercase,
989}
990
991pub const LODESTONE_API_VECTOR_METRIC_FORMAT_VERSION: u16 = 1;
992#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
993#[serde(rename_all = "snake_case")]
994pub enum VectorMetric {
995 Cosine,
996 DotProduct,
997 SquaredL2,
998}
999
1000pub const LODESTONE_API_MAPPING_SCALAR_FORMAT_VERSION: u16 = 1;
1001#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1002#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1003pub enum MappingScalar {
1004 Boolean { value: bool },
1005 I64 { value: I64 },
1006 U64 { value: U64 },
1007 F64Bits { value: U64 },
1008 Keyword { value: String },
1009}
1010
1011pub const LODESTONE_API_SPARSE_VECTOR_WEIGHT_TYPE_FORMAT_VERSION: u16 = 1;
1012#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1013#[serde(rename_all = "snake_case")]
1014pub enum SparseVectorWeightType {
1015 F32,
1016 F16,
1017}
1018
1019pub const LODESTONE_API_MAPPING_FIELD_TYPE_FORMAT_VERSION: u16 = 3;
1020#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1021#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1022pub enum MappingFieldType {
1023 Text,
1024 Keyword,
1025 U64,
1026 Date,
1027 I64,
1028 F64,
1029 Bool,
1030 Nested,
1031 Vector {
1032 format_version: u32,
1033 field_id: u32,
1034 dimensions: u32,
1035 metric: VectorMetric,
1036 element_type: DenseVectorElementType,
1037 #[serde(default, skip_serializing_if = "Option::is_none")]
1038 quantization_scale: Option<ApproximateNumber>,
1039 },
1040 SparseVector {
1041 format_version: u32,
1042 field_id: u32,
1043 maximum_dimension: u32,
1044 weight_type: SparseVectorWeightType,
1045 },
1046 VectorSet {
1047 format_version: u32,
1048 field_id: u32,
1049 dimensions: u32,
1050 metric: VectorMetric,
1051 element_type: DenseVectorElementType,
1052 #[serde(default, skip_serializing_if = "Option::is_none")]
1053 quantization_scale: Option<ApproximateNumber>,
1054 maximum_vectors: u32,
1055 },
1056}
1057
1058pub const LODESTONE_API_MAPPING_FIELD_FORMAT_VERSION: u16 = 1;
1059#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1060#[serde(deny_unknown_fields)]
1061pub struct MappingField {
1062 pub path: String,
1063 pub field_type: MappingFieldType,
1064 pub stored: bool,
1065 #[serde(default, skip_serializing_if = "Option::is_none")]
1066 pub null_value: Option<MappingScalar>,
1067}
1068
1069pub const LODESTONE_API_MULTI_FIELD_PROJECTION_FORMAT_VERSION: u16 = 1;
1070#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1071#[serde(deny_unknown_fields)]
1072pub struct MultiFieldProjection {
1073 pub parent: String,
1074 pub child: String,
1075}
1076
1077pub const LODESTONE_API_ANALYZER_IDENTITY_FORMAT_VERSION: u16 = 1;
1078#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1079#[serde(deny_unknown_fields)]
1080pub struct AnalyzerIdentity {
1081 pub field: String,
1082 pub index_analyzer: MappingAnalyzer,
1083 pub search_analyzer: MappingAnalyzer,
1084}
1085
1086pub const LODESTONE_API_KEYWORD_LIMIT_FORMAT_VERSION: u16 = 1;
1087#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1088#[serde(deny_unknown_fields)]
1089pub struct KeywordLimit {
1090 pub field: String,
1091 pub max_bytes: u32,
1092 pub normalizer: KeywordNormalizer,
1093}
1094
1095pub const LODESTONE_API_PROFILE_PRIVACY_ACTION_FORMAT_VERSION: u16 = 1;
1096#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1097#[serde(rename_all = "snake_case")]
1098pub enum ProfilePrivacyAction {
1099 Allow,
1100 Drop,
1101 Redact,
1102 Reject,
1103}
1104
1105pub const LODESTONE_API_PROFILE_PRIVACY_FIELD_FORMAT_VERSION: u16 = 1;
1106#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1107#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1108pub enum ProfilePrivacyField {
1109 ResourceAttribute { key: String },
1110 ScopeAttribute { key: String },
1111 SampleLabel { key: String },
1112 FunctionName,
1113 FunctionSystemName,
1114 FunctionFilename,
1115 MappingFilename,
1116}
1117
1118pub const LODESTONE_API_PROFILE_PRIVACY_RULE_FORMAT_VERSION: u16 = 1;
1119#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1120#[serde(deny_unknown_fields)]
1121pub struct ProfilePrivacyRule {
1122 pub field: ProfilePrivacyField,
1123 pub action: ProfilePrivacyAction,
1124}
1125
1126pub const LODESTONE_API_PROFILE_PRIVACY_POLICY_FORMAT_VERSION: u16 = 1;
1127#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1128#[serde(deny_unknown_fields)]
1129pub struct ProfilePrivacyPolicy {
1130 pub format_version: u32,
1131 pub rules: Vec<ProfilePrivacyRule>,
1132}
1133
1134pub const LODESTONE_API_MAPPING_RECORD_MODEL_FORMAT_VERSION: u16 = 3;
1135#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1136#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1137pub enum MappingRecordModel {
1138 Document,
1139 MetricV1 {
1140 format_version: u32,
1141 grouping_attributes: Vec<String>,
1142 },
1143 RelationshipV1 {
1144 format_version: u32,
1145 },
1146 ProfileV1 {
1147 format_version: u32,
1148 privacy: ProfilePrivacyPolicy,
1149 },
1150}
1151
1152pub const LODESTONE_API_MAPPING_FORMAT_VERSION: u16 = 4;
1153#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1154#[serde(deny_unknown_fields)]
1155pub struct Mapping {
1156 pub format_version: u32,
1157 pub generation: U64,
1158 pub mode: MappingMode,
1159 pub record_model: MappingRecordModel,
1160 pub dynamic_policy: DynamicMappingPolicy,
1161 pub fields: Vec<MappingField>,
1162 pub multi_field_projections: Vec<MultiFieldProjection>,
1163 pub analyzer_identities: Vec<AnalyzerIdentity>,
1164 pub keyword_limits: Vec<KeywordLimit>,
1165 pub nested_paths: Vec<String>,
1166}
1167
1168pub const LODESTONE_API_INDEX_DETAIL_FORMAT_VERSION: u16 = 1;
1169#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1170#[serde(deny_unknown_fields)]
1171pub struct IndexDetail {
1172 pub summary: IndexSummary,
1173 pub current_mapping: Mapping,
1174 pub budgets: MaintenanceBudgets,
1175 pub resource_spec: IndexResourceSpec,
1176 pub aliases: Vec<String>,
1177 pub data_streams: Vec<String>,
1178}
1179
1180pub const LODESTONE_API_SOURCE_PROVIDER_FORMAT_VERSION: u16 = 1;
1181#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1182#[serde(rename_all = "snake_case")]
1183pub enum SourceProvider {
1184 Kafka,
1185 ObjectLog,
1186 HttpReplay,
1187 GrpcReplay,
1188}
1189
1190pub const LODESTONE_API_SOURCE_DECODER_FORMAT_VERSION: u16 = 1;
1191#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1192#[serde(rename_all = "snake_case")]
1193pub enum SourceDecoder {
1194 LodestoneDocumentJson,
1195 DebeziumPostgresJson,
1196}
1197
1198pub const LODESTONE_API_SOURCE_REPLAY_GUARANTEES_FORMAT_VERSION: u16 = 1;
1199#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1200#[serde(deny_unknown_fields)]
1201pub struct SourceReplayGuarantees {
1202 pub durable_replay: bool,
1203 pub stable_partition_identity: bool,
1204 pub stable_operation_identity: bool,
1205 pub ordered_positions: bool,
1206 pub bounded_reads: bool,
1207 pub explicit_retention: bool,
1208 pub explicit_rewind: bool,
1209 pub minimum_replay_window_millis: U64,
1210}
1211
1212pub const LODESTONE_API_SOURCE_PARTITION_CONFIGURATION_FORMAT_VERSION: u16 = 1;
1213#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1214#[serde(deny_unknown_fields)]
1215pub struct SourcePartitionConfiguration {
1216 pub partition_id: u32,
1217 pub partition_incarnation: U64,
1218 pub initial_next_ordinal: U64,
1219 pub initial_resume_token_base64: String,
1220}
1221
1222pub const LODESTONE_API_REPLAYABLE_SOURCE_CONFIGURATION_FORMAT_VERSION: u16 = 1;
1223#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1224#[serde(deny_unknown_fields)]
1225pub struct ReplayableSourceConfiguration {
1226 pub source_incarnation: U64,
1227 pub source_identity_digest: Digest,
1228 pub provider: SourceProvider,
1229 pub decoder: SourceDecoder,
1230 pub partitions: Vec<SourcePartitionConfiguration>,
1231 pub guarantees: SourceReplayGuarantees,
1232}
1233
1234pub const LODESTONE_API_SOURCE_PARTITION_STATUS_FORMAT_VERSION: u16 = 1;
1235#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1236#[serde(deny_unknown_fields)]
1237pub struct SourcePartitionStatus {
1238 pub partition_id: u32,
1239 pub partition_incarnation: U64,
1240 pub indexed_next_ordinal: U64,
1241 #[serde(default, skip_serializing_if = "Option::is_none")]
1242 pub provider_high_watermark_next_ordinal: Option<U64>,
1243 #[serde(default, skip_serializing_if = "Option::is_none")]
1244 pub retention_floor_next_ordinal: Option<U64>,
1245 #[serde(default, skip_serializing_if = "Option::is_none")]
1246 pub lag_records: Option<U64>,
1247}
1248
1249pub const LODESTONE_API_REPLAYABLE_SOURCE_STATUS_FORMAT_VERSION: u16 = 1;
1250#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1251#[serde(deny_unknown_fields)]
1252pub struct ReplayableSourceStatus {
1253 pub index: Resource,
1254 pub provider: SourceProvider,
1255 pub decoder: SourceDecoder,
1256 pub source_incarnation: U64,
1257 pub source_identity_digest: Digest,
1258 pub lifecycle: String,
1259 pub lifecycle_generation: U64,
1260 #[serde(default, skip_serializing_if = "Option::is_none")]
1261 pub pause_reason: Option<String>,
1262 #[serde(default, skip_serializing_if = "Option::is_none")]
1263 pub rebuild_reason: Option<String>,
1264 pub retry_state: String,
1265 pub retention_risk: String,
1266 #[serde(default, skip_serializing_if = "Option::is_none")]
1267 pub last_batch_identity: Option<Identity>,
1268 pub partitions: Vec<SourcePartitionStatus>,
1269}
1270
1271pub const LODESTONE_API_SOURCE_CONTROL_TRANSITION_FORMAT_VERSION: u16 = 1;
1272#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1273#[serde(rename_all = "snake_case")]
1274pub enum SourceControlTransition {
1275 Pause,
1276 Resume,
1277 RequireRebuild,
1278}
1279
1280pub const LODESTONE_API_HISTORY_LEDGER_PRECONDITION_FORMAT_VERSION: u16 = 1;
1281#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1282#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1283pub enum HistoryLedgerPrecondition {
1284 Absent,
1285 Exact { revision: U64 },
1286}
1287
1288pub const LODESTONE_API_HISTORY_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1289#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1290#[serde(deny_unknown_fields)]
1291pub struct HistoryRetentionPolicy {
1292 pub keep_for_millis: U64,
1293 pub capture_interval_millis: U64,
1294 pub maximum_cuts: u32,
1295 pub privacy_overlay_identity_limit: u32,
1296}
1297
1298pub const LODESTONE_API_HISTORY_SELECTOR_FORMAT_VERSION: u16 = 1;
1299#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1300#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1301pub enum HistorySelector {
1302 ExactCut { cut_id: Identity },
1303 AtOrBeforeCommitTime { unix_millis: U64 },
1304}
1305
1306pub const LODESTONE_API_HISTORY_HOLD_FORMAT_VERSION: u16 = 1;
1307#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1308#[serde(deny_unknown_fields)]
1309pub struct HistoryHold {
1310 pub hold_id: Identity,
1311 pub cut_ids: Vec<Identity>,
1312}
1313
1314pub const LODESTONE_API_HISTORY_STATUS_FORMAT_VERSION: u16 = 1;
1315#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1316#[serde(deny_unknown_fields)]
1317pub struct HistoryStatus {
1318 pub index: Resource,
1319 pub revision: U64,
1320 pub policy: HistoryRetentionPolicy,
1321 pub page_count: u32,
1322 pub cut_count: u32,
1323 pub holds: Vec<HistoryHold>,
1324}
1325
1326pub const LODESTONE_API_HISTORY_RESOLUTION_FORMAT_VERSION: u16 = 1;
1327#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1328#[serde(deny_unknown_fields)]
1329pub struct HistoryResolution {
1330 pub index: Resource,
1331 pub selector: HistorySelector,
1332 pub cut_id: Identity,
1333 pub committed_at_unix_millis: U64,
1334 pub uncertainty_millis: U64,
1335 pub shard_count: u32,
1336 pub security_policy_revision: U64,
1337}
1338
1339pub const LODESTONE_API_INDEX_REFERENCE_FORMAT_VERSION: u16 = 1;
1340#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1341#[serde(deny_unknown_fields)]
1342pub struct IndexReference {
1343 pub name: String,
1344 pub incarnation: Identity,
1345}
1346
1347pub const LODESTONE_API_ALIAS_TARGET_FORMAT_VERSION: u16 = 1;
1348#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1349#[serde(deny_unknown_fields)]
1350pub struct AliasTarget {
1351 pub index: IndexReference,
1352 pub write_index: bool,
1353}
1354
1355pub const LODESTONE_API_ALIAS_SUMMARY_FORMAT_VERSION: u16 = 1;
1356#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1357#[serde(deny_unknown_fields)]
1358pub struct AliasSummary {
1359 pub name: String,
1360 pub revision: U64,
1361 pub visible_target_count: u32,
1362}
1363
1364pub const LODESTONE_API_ALIAS_DETAIL_FORMAT_VERSION: u16 = 1;
1365#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1366#[serde(deny_unknown_fields)]
1367pub struct AliasDetail {
1368 pub summary: AliasSummary,
1369 pub visible_targets: Vec<AliasTarget>,
1370 #[serde(default, skip_serializing_if = "Option::is_none")]
1371 pub filter: Option<RawJson>,
1372 #[serde(default, skip_serializing_if = "Option::is_none")]
1373 pub index_routing: Option<String>,
1374 #[serde(default, skip_serializing_if = "Option::is_none")]
1375 pub search_routing: Option<String>,
1376}
1377
1378pub const LODESTONE_API_DATA_STREAM_SUMMARY_FORMAT_VERSION: u16 = 1;
1379#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1380#[serde(deny_unknown_fields)]
1381pub struct DataStreamSummary {
1382 pub name: String,
1383 pub incarnation: Identity,
1384 pub revision: U64,
1385 pub generation: U64,
1386 pub state: String,
1387 pub visible_backing_count: u32,
1388}
1389
1390pub const LODESTONE_API_COMPONENT_TEMPLATE_BINDING_FORMAT_VERSION: u16 = 1;
1391#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1392#[serde(deny_unknown_fields)]
1393pub struct ComponentTemplateBinding {
1394 pub name: String,
1395 pub incarnation: Identity,
1396 pub revision: U64,
1397}
1398
1399pub const LODESTONE_API_INDEX_TEMPLATE_BINDING_FORMAT_VERSION: u16 = 1;
1400#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1401#[serde(deny_unknown_fields)]
1402pub struct IndexTemplateBinding {
1403 pub name: String,
1404 pub incarnation: Identity,
1405 pub revision: U64,
1406}
1407
1408pub const LODESTONE_API_LIFECYCLE_POLICY_BINDING_FORMAT_VERSION: u16 = 1;
1409#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1410#[serde(deny_unknown_fields)]
1411pub struct LifecyclePolicyBinding {
1412 pub name: String,
1413 pub incarnation: Identity,
1414 pub revision: U64,
1415}
1416
1417pub const LODESTONE_API_DATA_STREAM_DETAIL_FORMAT_VERSION: u16 = 1;
1418#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1419#[serde(deny_unknown_fields)]
1420pub struct DataStreamDetail {
1421 pub summary: DataStreamSummary,
1422 pub visible_backing_indices: Vec<IndexReference>,
1423 #[serde(default, skip_serializing_if = "Option::is_none")]
1424 pub write_index: Option<IndexReference>,
1425 pub timestamp_field: String,
1426 pub index_template: IndexTemplateBinding,
1427 #[serde(default, skip_serializing_if = "Option::is_none")]
1428 pub lifecycle_policy: Option<LifecyclePolicyBinding>,
1429}
1430
1431pub const LODESTONE_API_COMPONENT_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1432#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1433#[serde(deny_unknown_fields)]
1434pub struct ComponentTemplateSummary {
1435 pub name: String,
1436 pub incarnation: Identity,
1437 pub revision: U64,
1438}
1439
1440pub const LODESTONE_API_COMPONENT_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1441#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1442#[serde(deny_unknown_fields)]
1443pub struct ComponentTemplateDetail {
1444 pub summary: ComponentTemplateSummary,
1445 pub mapping: Mapping,
1446 pub settings: RawJson,
1447 #[serde(default, skip_serializing_if = "Option::is_none")]
1448 pub resource_spec: Option<IndexResourceSpec>,
1449}
1450
1451pub const LODESTONE_API_INDEX_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1452#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1453#[serde(deny_unknown_fields)]
1454pub struct IndexTemplateSummary {
1455 pub name: String,
1456 pub incarnation: Identity,
1457 pub revision: U64,
1458 pub priority: i32,
1459 pub data_stream: bool,
1460}
1461
1462pub const LODESTONE_API_INDEX_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1463#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1464#[serde(deny_unknown_fields)]
1465pub struct IndexTemplateDetail {
1466 pub summary: IndexTemplateSummary,
1467 pub index_patterns: Vec<String>,
1468 pub components: Vec<ComponentTemplateBinding>,
1469 pub mapping: Mapping,
1470 pub settings: RawJson,
1471 #[serde(default, skip_serializing_if = "Option::is_none")]
1472 pub resource_spec: Option<IndexResourceSpec>,
1473}
1474
1475pub const LODESTONE_API_INGEST_PIPELINE_SUMMARY_FORMAT_VERSION: u16 = 1;
1476#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1477#[serde(deny_unknown_fields)]
1478pub struct IngestPipelineSummary {
1479 pub name: String,
1480 pub incarnation: Identity,
1481 pub revision: U64,
1482 pub digest: Digest,
1483}
1484
1485pub const LODESTONE_API_INGEST_PIPELINE_DETAIL_FORMAT_VERSION: u16 = 1;
1486#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1487#[serde(deny_unknown_fields)]
1488pub struct IngestPipelineDetail {
1489 pub summary: IngestPipelineSummary,
1490 pub definition: RawJson,
1491}
1492
1493pub const LODESTONE_API_INGEST_PIPELINE_SELECTION_FORMAT_VERSION: u16 = 1;
1494#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1495#[serde(deny_unknown_fields)]
1496pub struct IngestPipelineSelection {
1497 pub name: String,
1498 pub expected: ExpectedBinding,
1499}
1500
1501pub const LODESTONE_API_LIFECYCLE_POLICY_SUMMARY_FORMAT_VERSION: u16 = 1;
1502#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1503#[serde(deny_unknown_fields)]
1504pub struct LifecyclePolicySummary {
1505 pub name: String,
1506 pub incarnation: Identity,
1507 pub revision: U64,
1508}
1509
1510pub const LODESTONE_API_ROLLOVER_THRESHOLDS_FORMAT_VERSION: u16 = 1;
1511#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1512#[serde(deny_unknown_fields)]
1513pub struct RolloverThresholds {
1514 #[serde(default, skip_serializing_if = "Option::is_none")]
1515 pub max_primary_docs: Option<U64>,
1516 #[serde(default, skip_serializing_if = "Option::is_none")]
1517 pub max_primary_bytes: Option<U64>,
1518 #[serde(default, skip_serializing_if = "Option::is_none")]
1519 pub max_age_millis: Option<U64>,
1520}
1521
1522pub const LODESTONE_API_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1523#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1524#[serde(deny_unknown_fields)]
1525pub struct RetentionPolicy {
1526 #[serde(default, skip_serializing_if = "Option::is_none")]
1527 pub document_max_age_millis: Option<U64>,
1528 #[serde(default, skip_serializing_if = "Option::is_none")]
1529 pub backing_index_max_age_millis: Option<U64>,
1530}
1531
1532pub const LODESTONE_API_LIFECYCLE_POLICY_DETAIL_FORMAT_VERSION: u16 = 1;
1533#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1534#[serde(deny_unknown_fields)]
1535pub struct LifecyclePolicyDetail {
1536 pub summary: LifecyclePolicySummary,
1537 pub rollover: RolloverThresholds,
1538 pub retention: RetentionPolicy,
1539 pub merge_hint: bool,
1540 pub freeze_hint: bool,
1541 pub delete_expired: bool,
1542}
1543
1544pub const LODESTONE_API_TEXT_QUERY_OPERATOR_FORMAT_VERSION: u16 = 1;
1545#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1546#[serde(rename_all = "snake_case")]
1547pub enum TextQueryOperator {
1548 Or,
1549 And,
1550}
1551
1552pub const LODESTONE_API_TEXT_QUERY_ANALYZER_FORMAT_VERSION: u16 = 1;
1553#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1554#[serde(rename_all = "snake_case")]
1555pub enum TextQueryAnalyzer {
1556 Mapping,
1557 Standard,
1558 Simple,
1559 Whitespace,
1560 Keyword,
1561}
1562
1563pub const LODESTONE_API_ZERO_TERMS_QUERY_FORMAT_VERSION: u16 = 1;
1564#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1565#[serde(rename_all = "snake_case")]
1566pub enum ZeroTermsQuery {
1567 None,
1568 All,
1569}
1570
1571pub const LODESTONE_API_TEXT_QUERY_OPTIONS_FORMAT_VERSION: u16 = 1;
1572#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1573#[serde(deny_unknown_fields)]
1574pub struct TextQueryOptions {
1575 pub operator: TextQueryOperator,
1576 #[serde(default, skip_serializing_if = "Option::is_none")]
1577 pub minimum_should_match: Option<u32>,
1578 pub analyzer: TextQueryAnalyzer,
1579 pub zero_terms_query: ZeroTermsQuery,
1580}
1581
1582pub const LODESTONE_API_MULTI_MATCH_MODE_FORMAT_VERSION: u16 = 1;
1583#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1584#[serde(rename_all = "snake_case")]
1585pub enum MultiMatchMode {
1586 BestFields,
1587 MostFields,
1588 Phrase,
1589 PhrasePrefix,
1590 CrossFields,
1591}
1592
1593pub const LODESTONE_API_MULTI_MATCH_FIELD_FORMAT_VERSION: u16 = 1;
1594#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1595#[serde(deny_unknown_fields)]
1596pub struct MultiMatchField {
1597 pub field: String,
1598 pub boost: ApproximateNumber,
1599}
1600
1601pub const LODESTONE_API_MULTI_MATCH_OPTIONS_FORMAT_VERSION: u16 = 1;
1602#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1603#[serde(deny_unknown_fields)]
1604pub struct MultiMatchOptions {
1605 pub mode: MultiMatchMode,
1606 pub operator: TextQueryOperator,
1607 #[serde(default, skip_serializing_if = "Option::is_none")]
1608 pub minimum_should_match: Option<u32>,
1609 pub analyzer: TextQueryAnalyzer,
1610 pub zero_terms_query: ZeroTermsQuery,
1611 pub slop: u32,
1612}
1613
1614pub const LODESTONE_API_SORT_ORDER_FORMAT_VERSION: u16 = 1;
1615#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1616#[serde(rename_all = "snake_case")]
1617pub enum SortOrder {
1618 Asc,
1619 Desc,
1620}
1621
1622pub const LODESTONE_API_SORT_MODE_FORMAT_VERSION: u16 = 1;
1623#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1624#[serde(rename_all = "snake_case")]
1625pub enum SortMode {
1626 Auto,
1627 Min,
1628 Max,
1629}
1630
1631pub const LODESTONE_API_MISSING_ORDER_FORMAT_VERSION: u16 = 1;
1632#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1633#[serde(rename_all = "snake_case")]
1634pub enum MissingOrder {
1635 First,
1636 Last,
1637}
1638
1639pub const LODESTONE_API_NESTED_SCORE_MODE_FORMAT_VERSION: u16 = 1;
1640#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1641#[serde(rename_all = "snake_case")]
1642pub enum NestedScoreMode {
1643 Avg,
1644 Max,
1645 Min,
1646 None,
1647 Sum,
1648}
1649
1650pub const LODESTONE_API_NESTED_INNER_HITS_FORMAT_VERSION: u16 = 1;
1651#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1652#[serde(deny_unknown_fields)]
1653pub struct NestedInnerHits {
1654 #[serde(default, skip_serializing_if = "Option::is_none")]
1655 pub name: Option<String>,
1656 pub from: u32,
1657 pub size: u32,
1658 pub sort: Vec<SortSpec>,
1659}
1660
1661pub const LODESTONE_API_SORT_SPEC_FORMAT_VERSION: u16 = 1;
1662#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1663#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1664pub enum SortSpec {
1665 Score {
1666 order: SortOrder,
1667 },
1668 Field {
1669 field: String,
1670 order: SortOrder,
1671 #[serde(default, skip_serializing_if = "Option::is_none")]
1672 missing: Option<MissingOrder>,
1673 mode: SortMode,
1674 },
1675 NestedField {
1676 path: String,
1677 field: String,
1678 #[serde(default, skip_serializing_if = "Option::is_none")]
1679 filter: Option<Box<Query>>,
1680 order: SortOrder,
1681 #[serde(default, skip_serializing_if = "Option::is_none")]
1682 missing: Option<MissingOrder>,
1683 mode: SortMode,
1684 },
1685}
1686
1687pub const LODESTONE_API_QUERY_FORMAT_VERSION: u16 = 1;
1688#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1689#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1690pub enum Query {
1691 MatchAll,
1692 Term {
1693 field: String,
1694 value: JsonValue,
1695 },
1696 Terms {
1697 field: String,
1698 values: Vec<JsonValue>,
1699 },
1700 Range {
1701 field: String,
1702 #[serde(default, skip_serializing_if = "Option::is_none")]
1703 lower: Option<JsonValue>,
1704 #[serde(default, skip_serializing_if = "Option::is_none")]
1705 upper: Option<JsonValue>,
1706 include_lower: bool,
1707 include_upper: bool,
1708 },
1709 Text {
1710 field: String,
1711 text: String,
1712 #[serde(default, skip_serializing_if = "Option::is_none")]
1713 options: Option<TextQueryOptions>,
1714 },
1715 MultiMatch {
1716 fields: Vec<MultiMatchField>,
1717 text: String,
1718 #[serde(default, skip_serializing_if = "Option::is_none")]
1719 options: Option<MultiMatchOptions>,
1720 },
1721 Exists {
1722 field: String,
1723 },
1724 Prefix {
1725 field: String,
1726 prefix: String,
1727 #[serde(default, skip_serializing_if = "Option::is_none")]
1728 analyzer: Option<TextQueryAnalyzer>,
1729 analyze_wildcard: bool,
1730 },
1731 Fuzzy {
1732 field: String,
1733 value: String,
1734 distance: u32,
1735 #[serde(default, skip_serializing_if = "Option::is_none")]
1736 analyzer: Option<TextQueryAnalyzer>,
1737 },
1738 Boost {
1739 query: Box<Query>,
1740 boost: ApproximateNumber,
1741 },
1742 Bool {
1743 must: Vec<Query>,
1744 filter: Vec<Query>,
1745 should: Vec<Query>,
1746 must_not: Vec<Query>,
1747 minimum_should_match: u32,
1748 },
1749 Nested {
1750 path: String,
1751 query: Box<Query>,
1752 score_mode: NestedScoreMode,
1753 ignore_unmapped: bool,
1754 #[serde(default, skip_serializing_if = "Option::is_none")]
1755 inner_hits: Option<NestedInnerHits>,
1756 },
1757}
1758
1759pub const LODESTONE_API_DENSE_RETRIEVAL_MODE_FORMAT_VERSION: u16 = 1;
1760#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1761#[serde(rename_all = "snake_case")]
1762pub enum DenseRetrievalMode {
1763 Auto,
1764 Ann,
1765 Exact,
1766}
1767
1768pub const LODESTONE_API_VECTOR_ACHIEVED_MODE_FORMAT_VERSION: u16 = 1;
1769#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1770#[serde(rename_all = "snake_case")]
1771pub enum VectorAchievedMode {
1772 Exact,
1773 Ann,
1774 Mixed,
1775}
1776
1777pub const LODESTONE_API_VECTOR_BRANCH_DIAGNOSTICS_FORMAT_VERSION: u16 = 2;
1778#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1779#[serde(deny_unknown_fields)]
1780pub struct VectorBranchDiagnostics {
1781 pub name: String,
1782 pub requested_mode: DenseRetrievalMode,
1783 pub achieved_mode: VectorAchievedMode,
1784 pub result_count: U64,
1785 pub exact_segments: U64,
1786 pub ann_segments: U64,
1787 pub exact_fallback_segments: U64,
1788 pub distance_evaluations: U64,
1789 pub peak_scratch_bytes: U64,
1790 pub fresh_vectors_scanned: U64,
1791 pub realtime_overlay_queries: U64,
1792 pub realtime_overlay_candidates: U64,
1793 pub bundle_roots: U64,
1794 pub object_read_requests: U64,
1795 pub object_bytes_read: U64,
1796 pub cache_hits: U64,
1797 pub cache_misses: U64,
1798 pub snapshot_digests: Vec<Digest>,
1799}
1800
1801pub const LODESTONE_API_DENSE_VECTOR_ELEMENT_TYPE_FORMAT_VERSION: u16 = 1;
1802#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1803#[serde(rename_all = "snake_case")]
1804pub enum DenseVectorElementType {
1805 F32,
1806 F16,
1807 I8,
1808}
1809
1810pub const LODESTONE_API_DENSE_VECTOR_BYTE_ORDER_FORMAT_VERSION: u16 = 1;
1811#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1812#[serde(rename_all = "snake_case")]
1813pub enum DenseVectorByteOrder {
1814 LittleEndian,
1815}
1816
1817pub const LODESTONE_API_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
1818#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1819#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1820pub enum VectorValue {
1821 Numeric {
1822 values: Vec<ApproximateNumber>,
1823 },
1824 Binary {
1825 element_type: DenseVectorElementType,
1826 byte_order: DenseVectorByteOrder,
1827 data_base64: String,
1828 #[serde(default, skip_serializing_if = "Option::is_none")]
1829 quantization_scale: Option<ApproximateNumber>,
1830 },
1831}
1832
1833pub const LODESTONE_API_SPARSE_VECTOR_ENTRY_FORMAT_VERSION: u16 = 1;
1834#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1835#[serde(deny_unknown_fields)]
1836pub struct SparseVectorEntry {
1837 pub dimension: u32,
1838 pub weight: ApproximateNumber,
1839}
1840
1841pub const LODESTONE_API_SPARSE_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
1842#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1843#[serde(deny_unknown_fields)]
1844pub struct SparseVectorValue {
1845 pub entries: Vec<SparseVectorEntry>,
1846}
1847
1848pub const LODESTONE_API_VECTOR_SET_VALUE_FORMAT_VERSION: u16 = 1;
1849#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1850#[serde(deny_unknown_fields)]
1851pub struct VectorSetValue {
1852 pub vectors: Vec<VectorValue>,
1853}
1854
1855pub const LODESTONE_API_VECTOR_EVALUATION_SNAPSHOT_FORMAT_VERSION: u16 = 1;
1856#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1857#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1858pub enum VectorEvaluationSnapshot {
1859 CommittedCut { digest: Digest },
1860 Pit { pit: Cursor },
1861}
1862
1863pub const LODESTONE_API_VECTOR_EVALUATION_QUERY_SET_FORMAT_VERSION: u16 = 1;
1864#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1865#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1866pub enum VectorEvaluationQuerySet {
1867 Sample { seed: U64, sample_count: u32 },
1868 Supplied { digest: Digest, queries: Vec<VectorValue> },
1869}
1870
1871pub const LODESTONE_API_VECTOR_EVALUATION_BUDGET_FORMAT_VERSION: u16 = 1;
1872#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1873#[serde(deny_unknown_fields)]
1874pub struct VectorEvaluationBudget {
1875 pub maximum_distance_evaluations: U64,
1876 pub maximum_elapsed_work_units: U64,
1877 pub maximum_peak_memory_bytes: U64,
1878 pub maximum_object_reads: U64,
1879 pub maximum_object_bytes: U64,
1880 pub maximum_build_scratch_bytes: U64,
1881 pub maximum_profile_comparisons: u32,
1882}
1883
1884pub const LODESTONE_API_VECTOR_CANDIDATE_POLICY_FORMAT_VERSION: u16 = 1;
1885#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1886#[serde(rename_all = "snake_case")]
1887pub enum VectorCandidatePolicy {
1888 Balanced,
1889 HighRecall,
1890 MemoryEfficient,
1891}
1892
1893pub const LODESTONE_API_VECTOR_CALIBRATION_OBJECTIVE_FORMAT_VERSION: u16 = 1;
1894#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1895#[serde(rename_all = "snake_case")]
1896pub enum VectorCalibrationObjective {
1897 Balanced,
1898 HighRecall,
1899 MemoryEfficient,
1900}
1901
1902pub const LODESTONE_API_VECTOR_STRATEGY_PROFILE_FORMAT_VERSION: u16 = 1;
1903#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1904#[serde(rename_all = "snake_case")]
1905pub enum VectorStrategyProfile {
1906 BalancedV1,
1907 HighRecallV1,
1908 MemoryEfficientV1,
1909}
1910
1911pub const LODESTONE_API_VECTOR_EVALUATION_WORK_FORMAT_VERSION: u16 = 1;
1912#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1913#[serde(deny_unknown_fields)]
1914pub struct VectorEvaluationWork {
1915 pub distance_evaluations: U64,
1916 pub elapsed_work_units: U64,
1917 pub peak_memory_bytes: U64,
1918 pub object_reads: U64,
1919 pub object_bytes: U64,
1920}
1921
1922pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_CODE_FORMAT_VERSION: u16 = 1;
1923#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1924#[serde(rename_all = "snake_case")]
1925pub enum VectorEvaluationErrorCode {
1926 AnnRefused,
1927 ExhaustiveRefused,
1928 TimedOut,
1929 Cancelled,
1930 Internal,
1931}
1932
1933pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_FORMAT_VERSION: u16 = 1;
1934#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1935#[serde(deny_unknown_fields)]
1936pub struct VectorEvaluationError {
1937 pub sample_ordinal: u32,
1938 pub code: VectorEvaluationErrorCode,
1939}
1940
1941pub const LODESTONE_API_VECTOR_RECALL_RESULT_FORMAT_VERSION: u16 = 1;
1942#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1943#[serde(deny_unknown_fields)]
1944pub struct VectorRecallResult {
1945 pub format_version: u32,
1946 pub index: Resource,
1947 pub field: String,
1948 pub mapping_generation: U64,
1949 pub snapshot_digest: Digest,
1950 pub query_set_digest: Digest,
1951 pub metric: VectorMetric,
1952 pub k: u32,
1953 pub candidate_policy: VectorCandidatePolicy,
1954 pub strategy_identity: String,
1955 pub completed_samples: u32,
1956 pub ann_result_count: U64,
1957 pub exhaustive_result_count: U64,
1958 pub mean_recall_basis_points: u32,
1959 pub minimum_recall_basis_points: u32,
1960 pub p05_recall_basis_points: u32,
1961 pub p50_recall_basis_points: u32,
1962 pub p90_recall_basis_points: u32,
1963 pub p99_recall_basis_points: u32,
1964 pub ann_work: VectorEvaluationWork,
1965 pub exhaustive_work: VectorEvaluationWork,
1966 pub errors: Vec<VectorEvaluationError>,
1967}
1968
1969pub const LODESTONE_API_VECTOR_CALIBRATION_CANDIDATE_FORMAT_VERSION: u16 = 1;
1970#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1971#[serde(deny_unknown_fields)]
1972pub struct VectorCalibrationCandidate {
1973 pub profile: VectorStrategyProfile,
1974 pub recall: VectorRecallResult,
1975 pub build_scratch_bytes: U64,
1976 pub resident_bytes: U64,
1977 pub evidence_digest: Digest,
1978}
1979
1980pub const LODESTONE_API_VECTOR_CALIBRATION_RESULT_FORMAT_VERSION: u16 = 1;
1981#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1982#[serde(deny_unknown_fields)]
1983pub struct VectorCalibrationResult {
1984 pub format_version: u32,
1985 pub objective: VectorCalibrationObjective,
1986 pub candidates: Vec<VectorCalibrationCandidate>,
1987 pub recommended_profile: VectorStrategyProfile,
1988 pub recommended_evidence_digest: Digest,
1989 pub requires_explicit_resource_revision_and_rebuild: bool,
1990}
1991
1992pub const LODESTONE_API_VECTOR_DIAGNOSTIC_RESULT_FORMAT_VERSION: u16 = 1;
1993#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1994#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1995pub enum VectorDiagnosticResult {
1996 Recall { result: Box<VectorRecallResult> },
1997 Calibration { result: Box<VectorCalibrationResult> },
1998}
1999
2000pub const LODESTONE_API_VECTOR_WARM_COMPONENT_FORMAT_VERSION: u16 = 1;
2001#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2002#[serde(rename_all = "snake_case")]
2003pub enum VectorWarmComponent {
2004 Directory,
2005 Approximate,
2006 Exact,
2007}
2008
2009pub const LODESTONE_API_VECTOR_WARM_STATE_FORMAT_VERSION: u16 = 1;
2010#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2011#[serde(rename_all = "snake_case")]
2012pub enum VectorWarmState {
2013 Warmed,
2014 Partial,
2015 Stale,
2016}
2017
2018pub const LODESTONE_API_VECTOR_WARM_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
2019#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2020#[serde(deny_unknown_fields)]
2021pub struct VectorWarmAchievement {
2022 pub component: VectorWarmComponent,
2023 pub cache_identity: Digest,
2024 pub resident_bytes: U64,
2025}
2026
2027pub const LODESTONE_API_VECTOR_WARM_RESULT_FORMAT_VERSION: u16 = 1;
2028#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2029#[serde(deny_unknown_fields)]
2030pub struct VectorWarmResult {
2031 pub format_version: u32,
2032 pub operation_identity: Digest,
2033 pub index: Resource,
2034 pub root_digest: Digest,
2035 pub state: VectorWarmState,
2036 pub progress: ExactDecimal,
2037 pub achieved: Vec<VectorWarmAchievement>,
2038 pub object_requests: U64,
2039 pub object_bytes: U64,
2040 pub cache_hits: U64,
2041 pub cache_misses: U64,
2042 pub started_at: U64,
2043 pub completed_at: U64,
2044 pub expires_at: U64,
2045 #[serde(default, skip_serializing_if = "Option::is_none")]
2046 pub residency_intent: Option<VectorResidencyIntent>,
2047}
2048
2049pub const LODESTONE_API_DENSE_RETRIEVAL_THRESHOLD_FORMAT_VERSION: u16 = 1;
2050#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2051#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2052pub enum DenseRetrievalThreshold {
2053 MinimumScore { value: ApproximateNumber },
2054 MaximumDistance { value: ApproximateNumber },
2055}
2056
2057pub const LODESTONE_API_RETRIEVAL_BRANCH_FORMAT_VERSION: u16 = 3;
2058#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2059#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2060pub enum RetrievalBranch {
2061 Lexical {
2062 name: String,
2063 query: Box<Query>,
2064 #[serde(default, skip_serializing_if = "Option::is_none")]
2065 filter: Option<Box<Query>>,
2066 window: u32,
2067 weight: ApproximateNumber,
2068 },
2069 Dense {
2070 name: String,
2071 field: String,
2072 query_vector: VectorValue,
2073 #[serde(default, skip_serializing_if = "Option::is_none")]
2074 filter: Option<Box<Query>>,
2075 window: u32,
2076 #[serde(default, skip_serializing_if = "Option::is_none")]
2077 candidates: Option<u32>,
2078 weight: ApproximateNumber,
2079 mode: DenseRetrievalMode,
2080 #[serde(default, skip_serializing_if = "Option::is_none")]
2081 threshold: Option<DenseRetrievalThreshold>,
2082 },
2083 Sparse {
2084 name: String,
2085 field: String,
2086 query_vector: SparseVectorValue,
2087 #[serde(default, skip_serializing_if = "Option::is_none")]
2088 filter: Option<Box<Query>>,
2089 window: u32,
2090 weight: ApproximateNumber,
2091 },
2092 LateInteraction {
2093 name: String,
2094 field: String,
2095 query_vectors: VectorSetValue,
2096 #[serde(default, skip_serializing_if = "Option::is_none")]
2097 filter: Option<Box<Query>>,
2098 window: u32,
2099 candidates: u32,
2100 weight: ApproximateNumber,
2101 },
2102}
2103
2104pub const LODESTONE_API_WEIGHTED_RRF_FUSION_FORMAT_VERSION: u16 = 1;
2105#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2106#[serde(deny_unknown_fields)]
2107pub struct WeightedRrfFusion {
2108 pub rank_constant: u32,
2109}
2110
2111pub const LODESTONE_API_RETRIEVAL_PLAN_FORMAT_VERSION: u16 = 1;
2112#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2113#[serde(deny_unknown_fields)]
2114pub struct RetrievalPlan {
2115 pub format_version: u32,
2116 #[serde(default, skip_serializing_if = "Option::is_none")]
2117 pub global_filter: Option<Box<Query>>,
2118 pub branches: Vec<RetrievalBranch>,
2119 pub fusion: WeightedRrfFusion,
2120 pub result_window: u32,
2121}
2122
2123pub const LODESTONE_API_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
2124#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2125#[serde(deny_unknown_fields)]
2126pub struct HistogramBounds {
2127 #[serde(default, skip_serializing_if = "Option::is_none")]
2128 pub min: Option<ApproximateNumber>,
2129 #[serde(default, skip_serializing_if = "Option::is_none")]
2130 pub max: Option<ApproximateNumber>,
2131}
2132
2133pub const LODESTONE_API_DATE_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
2134#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2135#[serde(deny_unknown_fields)]
2136pub struct DateHistogramBounds {
2137 #[serde(default, skip_serializing_if = "Option::is_none")]
2138 pub min: Option<I64>,
2139 #[serde(default, skip_serializing_if = "Option::is_none")]
2140 pub max: Option<I64>,
2141}
2142
2143pub const LODESTONE_API_APPROXIMATION_ALGORITHM_FORMAT_VERSION: u16 = 1;
2144#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2145#[serde(rename_all = "snake_case")]
2146pub enum ApproximationAlgorithm {
2147 HyperloglogV1,
2148 FloatPrefixHistogramV1,
2149}
2150
2151pub const LODESTONE_API_APPROXIMATION_FORMAT_VERSION: u16 = 1;
2152#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2153#[serde(deny_unknown_fields)]
2154pub struct Approximation {
2155 pub algorithm: ApproximationAlgorithm,
2156 pub algorithm_version: u32,
2157 pub precision: u32,
2158 pub state_bytes: U64,
2159 #[serde(default, skip_serializing_if = "Option::is_none")]
2160 pub relative_standard_error: Option<ApproximateNumber>,
2161 #[serde(default, skip_serializing_if = "Option::is_none")]
2162 pub maximum_rank_error: Option<ApproximateNumber>,
2163}
2164
2165pub const LODESTONE_API_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
2166#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2167#[serde(deny_unknown_fields)]
2168pub struct PercentileValue {
2169 pub percent: ApproximateNumber,
2170 #[serde(default, skip_serializing_if = "Option::is_none")]
2171 pub value: Option<ApproximateNumber>,
2172}
2173
2174pub const LODESTONE_API_APPROXIMATE_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
2175#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2176#[serde(deny_unknown_fields)]
2177pub struct ApproximatePercentileValue {
2178 pub percent: ApproximateNumber,
2179 pub value: ApproximateNumber,
2180 pub lower_bound: ApproximateNumber,
2181 pub upper_bound: ApproximateNumber,
2182 pub maximum_rank_error: ApproximateNumber,
2183}
2184
2185pub const LODESTONE_API_TIME_SERIES_OPERATOR_FORMAT_VERSION: u16 = 1;
2186#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2187#[serde(rename_all = "snake_case")]
2188pub enum TimeSeriesOperator {
2189 Raw,
2190 Sum,
2191 Count,
2192 Min,
2193 Max,
2194 Average,
2195 Delta,
2196 Increase,
2197 Rate,
2198 HistogramMerge,
2199 Quantiles,
2200}
2201
2202pub const LODESTONE_API_TIME_SERIES_MISSING_DATA_FORMAT_VERSION: u16 = 1;
2203#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2204#[serde(rename_all = "snake_case")]
2205pub enum TimeSeriesMissingData {
2206 Omit,
2207 ExplicitEmpty,
2208}
2209
2210pub const LODESTONE_API_TIME_SERIES_QUANTILE_MODE_FORMAT_VERSION: u16 = 1;
2211#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2212#[serde(rename_all = "snake_case")]
2213pub enum TimeSeriesQuantileMode {
2214 Exact,
2215 Approximate,
2216}
2217
2218pub const LODESTONE_API_TIME_SERIES_BUCKET_STATE_FORMAT_VERSION: u16 = 1;
2219#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2220#[serde(rename_all = "snake_case")]
2221pub enum TimeSeriesBucketState {
2222 Observed,
2223 ExplicitEmpty,
2224}
2225
2226pub const LODESTONE_API_TIME_SERIES_QUANTILE_VALUE_FORMAT_VERSION: u16 = 1;
2227#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2228#[serde(deny_unknown_fields)]
2229pub struct TimeSeriesQuantileValue {
2230 pub quantile: ApproximateNumber,
2231 #[serde(default, skip_serializing_if = "Option::is_none")]
2232 pub value: Option<MetricNumber>,
2233 #[serde(default, skip_serializing_if = "Option::is_none")]
2234 pub lower_bound: Option<MetricNumber>,
2235 #[serde(default, skip_serializing_if = "Option::is_none")]
2236 pub upper_bound: Option<MetricNumber>,
2237 #[serde(default, skip_serializing_if = "Option::is_none")]
2238 pub maximum_rank_error: Option<ApproximateNumber>,
2239}
2240
2241pub const LODESTONE_API_TIME_SERIES_VALUE_FORMAT_VERSION: u16 = 1;
2242#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2243#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2244pub enum TimeSeriesValue {
2245 Raw {
2246 values: Vec<MetricNumber>,
2247 },
2248 Number {
2249 value: MetricNumber,
2250 algorithm: String,
2251 },
2252 Count {
2253 value: U64,
2254 },
2255 ExplicitHistogram {
2256 count: U64,
2257 #[serde(default, skip_serializing_if = "Option::is_none")]
2258 sum: Option<MetricNumber>,
2259 bounds_f64_bits: Vec<U64>,
2260 bucket_counts: Vec<U64>,
2261 },
2262 ExponentialHistogram {
2263 count: U64,
2264 #[serde(default, skip_serializing_if = "Option::is_none")]
2265 sum: Option<MetricNumber>,
2266 scale: i32,
2267 zero_count: U64,
2268 positive: MetricExponentialBuckets,
2269 negative: MetricExponentialBuckets,
2270 },
2271 Quantiles {
2272 values: Vec<TimeSeriesQuantileValue>,
2273 exact: bool,
2274 algorithm: String,
2275 algorithm_version: u32,
2276 state_bytes: U64,
2277 },
2278}
2279
2280pub const LODESTONE_API_TIME_SERIES_BUCKET_FORMAT_VERSION: u16 = 1;
2281#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2282#[serde(deny_unknown_fields)]
2283pub struct TimeSeriesBucket {
2284 pub start_unix_nanos: U64,
2285 pub end_unix_nanos: U64,
2286 pub group: Vec<MetricAttribute>,
2287 pub state: TimeSeriesBucketState,
2288 pub reset: bool,
2289 #[serde(default, skip_serializing_if = "Option::is_none")]
2290 pub value: Option<TimeSeriesValue>,
2291 pub exemplars: Vec<MetricExemplar>,
2292}
2293
2294pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_DIRECTION_FORMAT_VERSION: u16 = 1;
2295#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2296#[serde(rename_all = "snake_case")]
2297pub enum RelationshipTraversalDirection {
2298 Inbound,
2299 Outbound,
2300 Both,
2301}
2302
2303pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_FILTER_FORMAT_VERSION: u16 = 1;
2304#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2305#[serde(deny_unknown_fields)]
2306pub struct RelationshipTraversalFilter {
2307 pub relationship_types: Vec<String>,
2308 pub assertion_classes: Vec<String>,
2309 pub provenance: Vec<String>,
2310 #[serde(default, skip_serializing_if = "Option::is_none")]
2311 pub valid_from_unix_nanos: Option<U64>,
2312 #[serde(default, skip_serializing_if = "Option::is_none")]
2313 pub valid_through_unix_nanos: Option<U64>,
2314}
2315
2316pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_BUDGET_FORMAT_VERSION: u16 = 1;
2317#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2318#[serde(deny_unknown_fields)]
2319pub struct RelationshipTraversalBudget {
2320 pub maximum_depth: u32,
2321 pub maximum_fan_out: u32,
2322 pub maximum_visited_entities: u32,
2323 pub maximum_visited_relationships: u32,
2324 pub maximum_returned_relationships: u32,
2325 pub maximum_memory_bytes: U64,
2326}
2327
2328pub const LODESTONE_API_TRAVERSED_RELATIONSHIP_FORMAT_VERSION: u16 = 1;
2329#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2330#[serde(deny_unknown_fields)]
2331pub struct TraversedRelationship {
2332 pub depth: u32,
2333 pub from: EntityRef,
2334 pub to: EntityRef,
2335 pub relationship: RelationshipRecord,
2336}
2337
2338pub const LODESTONE_API_PROFILE_QUERY_OPERATION_FORMAT_VERSION: u16 = 1;
2339#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2340#[serde(rename_all = "snake_case")]
2341pub enum ProfileQueryOperation {
2342 Flamegraph,
2343 TopStacks,
2344 TopFunctions,
2345 SampleTable,
2346}
2347
2348pub const LODESTONE_API_PROFILE_GROUP_BY_FORMAT_VERSION: u16 = 1;
2349#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2350#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2351pub enum ProfileGroupBy {
2352 ResourceAttribute { key: String },
2353 SampleLabel { key: String },
2354 BuildId,
2355 ModuleId,
2356}
2357
2358pub const LODESTONE_API_PROFILE_QUERY_FILTER_FORMAT_VERSION: u16 = 1;
2359#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2360#[serde(deny_unknown_fields)]
2361pub struct ProfileQueryFilter {
2362 pub profile_ids: Vec<String>,
2363 pub build_ids: Vec<String>,
2364 pub module_ids: Vec<String>,
2365 pub function_ids: Vec<String>,
2366 pub trace_ids: Vec<String>,
2367 pub span_ids: Vec<String>,
2368}
2369
2370pub const LODESTONE_API_PROFILE_QUERY_BUDGET_FORMAT_VERSION: u16 = 1;
2371#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2372#[serde(deny_unknown_fields)]
2373pub struct ProfileQueryBudget {
2374 pub maximum_batches: u32,
2375 pub maximum_samples: u32,
2376 pub maximum_results: u32,
2377 pub maximum_memory_bytes: U64,
2378}
2379
2380pub const LODESTONE_API_PROFILE_QUERY_ROW_FORMAT_VERSION: u16 = 1;
2381#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2382#[serde(deny_unknown_fields)]
2383pub struct ProfileQueryRow {
2384 pub key: String,
2385 pub stack: Vec<String>,
2386 pub value: MetricNumber,
2387 pub sample_count: U64,
2388}
2389
2390pub const LODESTONE_API_TEMPORAL_INPUT_FORMAT_VERSION: u16 = 1;
2391#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2392#[serde(deny_unknown_fields)]
2393pub struct TemporalInput {
2394 pub index: Resource,
2395 pub schema_generation: U64,
2396}
2397
2398pub const LODESTONE_API_TEMPORAL_PATTERN_FORMAT_VERSION: u16 = 1;
2399#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2400#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2401pub enum TemporalPattern {
2402 Event {
2403 node_id: String,
2404 query: Box<Query>,
2405 },
2406 Sequence {
2407 node_id: String,
2408 branches: Vec<TemporalPattern>,
2409 within_nanos: U64,
2410 },
2411 AllOf {
2412 node_id: String,
2413 branches: Vec<TemporalPattern>,
2414 within_nanos: U64,
2415 },
2416 AnyOf {
2417 node_id: String,
2418 branches: Vec<TemporalPattern>,
2419 },
2420 Count {
2421 node_id: String,
2422 pattern: Box<TemporalPattern>,
2423 minimum: u32,
2424 within_nanos: U64,
2425 },
2426 Repetition {
2427 node_id: String,
2428 pattern: Box<TemporalPattern>,
2429 count: u32,
2430 within_nanos: U64,
2431 },
2432 NotFollowedBy {
2433 node_id: String,
2434 anchor: Box<TemporalPattern>,
2435 forbidden: Box<TemporalPattern>,
2436 within_nanos: U64,
2437 },
2438}
2439
2440pub const LODESTONE_API_HISTORICAL_TEMPORAL_DEFINITION_FORMAT_VERSION: u16 = 1;
2441#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2442#[serde(deny_unknown_fields)]
2443pub struct HistoricalTemporalDefinition {
2444 pub format_version: u32,
2445 pub pattern_generation: U64,
2446 pub inputs: Vec<TemporalInput>,
2447 pub event_time_field: String,
2448 pub correlation_fields: Vec<String>,
2449 pub pattern: TemporalPattern,
2450 pub watermark_unix_nanos: U64,
2451 pub maximum_events: u32,
2452 pub maximum_states: u32,
2453 pub maximum_captured_events: u32,
2454 pub maximum_results: u32,
2455 pub maximum_state_bytes: U64,
2456}
2457
2458pub const LODESTONE_API_TEMPORAL_EVIDENCE_STATUS_FORMAT_VERSION: u16 = 2;
2459#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2460#[serde(rename_all = "snake_case")]
2461pub enum TemporalEvidenceStatus {
2462 Provisional,
2463 Final,
2464 Correction,
2465 Retraction,
2466}
2467
2468pub const LODESTONE_API_TEMPORAL_SOURCE_EVENT_FORMAT_VERSION: u16 = 1;
2469#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2470#[serde(deny_unknown_fields)]
2471pub struct TemporalSourceEvent {
2472 pub index: Resource,
2473 pub shard_id: u32,
2474 pub recovery_era: Identity,
2475 pub sequence: U64,
2476 pub document_id: String,
2477}
2478
2479pub const LODESTONE_API_TEMPORAL_EVIDENCE_FORMAT_VERSION: u16 = 2;
2480#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2481#[serde(deny_unknown_fields)]
2482pub struct TemporalEvidence {
2483 pub evidence_id: Digest,
2484 pub pattern_generation: U64,
2485 pub pattern_digest: Digest,
2486 pub correlation_key: Vec<JsonValue>,
2487 pub matched_node_id: String,
2488 pub interval_start_unix_nanos: U64,
2489 pub interval_end_unix_nanos: U64,
2490 pub watermark_unix_nanos: U64,
2491 pub source_events: Vec<TemporalSourceEvent>,
2492 pub input_cut_digest: Digest,
2493 pub status: TemporalEvidenceStatus,
2494 #[serde(default, skip_serializing_if = "Option::is_none")]
2495 pub predecessor_evidence_id: Option<Digest>,
2496}
2497
2498pub const LODESTONE_API_CONTINUOUS_TEMPORAL_START_FORMAT_VERSION: u16 = 1;
2499#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2500#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2501pub enum ContinuousTemporalStart {
2502 FromCurrentHeads,
2503 HistoricalThenFollow { pit: Cursor },
2504}
2505
2506pub const LODESTONE_API_CONTINUOUS_TEMPORAL_WATERMARK_POLICY_FORMAT_VERSION: u16 = 1;
2507#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2508#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2509pub enum ContinuousTemporalWatermarkPolicy {
2510 MaximumObservedMinusOutOfOrder {
2511 allowed_out_of_orderness_nanos: U64,
2512 },
2513 MappingBoundEvent {
2514 allowed_out_of_orderness_nanos: U64,
2515 predicate: Box<Query>,
2516 timestamp_field: String,
2517 },
2518}
2519
2520pub const LODESTONE_API_CONTINUOUS_TEMPORAL_LATE_DATA_POLICY_FORMAT_VERSION: u16 = 1;
2521#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2522#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2523pub enum ContinuousTemporalLateDataPolicy {
2524 RecomputeWithinHorizon { correction_horizon_nanos: U64 },
2525 PauseWithGap,
2526}
2527
2528pub const LODESTONE_API_CONTINUOUS_TEMPORAL_OUTPUT_FORMAT_VERSION: u16 = 1;
2529#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2530#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2531pub enum ContinuousTemporalOutput {
2532 InternalResults {
2533 maximum_retained_records: U64,
2534 maximum_retained_bytes: U64,
2535 maximum_retained_event_age_nanos: U64,
2536 },
2537 MaterializedIndex {
2538 index: Resource,
2539 schema_generation: U64,
2540 },
2541}
2542
2543pub const LODESTONE_API_CONTINUOUS_TEMPORAL_DEFINITION_FORMAT_VERSION: u16 = 1;
2544#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2545#[serde(deny_unknown_fields)]
2546pub struct ContinuousTemporalDefinition {
2547 pub format_version: u32,
2548 pub evaluation_id: Identity,
2549 pub pattern_generation: U64,
2550 pub inputs: Vec<TemporalInput>,
2551 pub event_time_field: String,
2552 pub correlation_fields: Vec<String>,
2553 pub pattern: TemporalPattern,
2554 pub start: ContinuousTemporalStart,
2555 pub watermark_policy: ContinuousTemporalWatermarkPolicy,
2556 pub late_data_policy: ContinuousTemporalLateDataPolicy,
2557 pub maximum_events_per_step: u32,
2558 pub maximum_states: u32,
2559 pub maximum_captured_events: u32,
2560 pub maximum_results: u32,
2561 pub maximum_state_bytes: U64,
2562 pub maximum_lag_bytes: U64,
2563 pub maximum_lag_events: U64,
2564 pub maximum_lag_event_age_nanos: U64,
2565 pub output: ContinuousTemporalOutput,
2566}
2567
2568pub const LODESTONE_API_CONTINUOUS_TEMPORAL_FRONTIER_FORMAT_VERSION: u16 = 1;
2569#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2570#[serde(deny_unknown_fields)]
2571pub struct ContinuousTemporalFrontier {
2572 pub index: Resource,
2573 pub shard_id: u32,
2574 pub recovery_era: Identity,
2575 pub routing_revision: U64,
2576 pub registered_wal_frontier: U64,
2577 #[serde(default, skip_serializing_if = "Option::is_none")]
2578 pub watermark_unix_nanos: Option<U64>,
2579}
2580
2581pub const LODESTONE_API_CONTINUOUS_TEMPORAL_AVAILABLE_FRONTIER_FORMAT_VERSION: u16 = 1;
2582#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2583#[serde(deny_unknown_fields)]
2584pub struct ContinuousTemporalAvailableFrontier {
2585 pub index: Resource,
2586 pub shard_id: u32,
2587 pub sequence: U64,
2588}
2589
2590pub const LODESTONE_API_CONTINUOUS_TEMPORAL_GAP_REASON_FORMAT_VERSION: u16 = 1;
2591#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2592#[serde(rename_all = "snake_case")]
2593pub enum ContinuousTemporalGapReason {
2594 RetentionGap,
2595 LateDataGap,
2596 SchemaGap,
2597 RouteGap,
2598 OutputGap,
2599}
2600
2601pub const LODESTONE_API_CONTINUOUS_TEMPORAL_GAP_FORMAT_VERSION: u16 = 1;
2602#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2603#[serde(deny_unknown_fields)]
2604pub struct ContinuousTemporalGap {
2605 pub reason: ContinuousTemporalGapReason,
2606 pub last_complete_frontiers: Vec<ContinuousTemporalFrontier>,
2607 pub earliest_available_frontiers: Vec<ContinuousTemporalAvailableFrontier>,
2608}
2609
2610pub const LODESTONE_API_CONTINUOUS_TEMPORAL_EVALUATION_FORMAT_VERSION: u16 = 1;
2611#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2612#[serde(deny_unknown_fields)]
2613pub struct ContinuousTemporalEvaluation {
2614 pub format_version: u32,
2615 pub evaluation_id: Identity,
2616 pub generation: U64,
2617 pub revision: U64,
2618 pub definition_digest: Digest,
2619 pub definition: ContinuousTemporalDefinition,
2620 pub lifecycle: String,
2621 pub frontiers: Vec<ContinuousTemporalFrontier>,
2622 #[serde(default, skip_serializing_if = "Option::is_none")]
2623 pub global_watermark_unix_nanos: Option<U64>,
2624 pub state_bytes: U64,
2625 pub active_states: U64,
2626 pub active_timers: U64,
2627 pub retained_results: U64,
2628 pub pending_emissions: U64,
2629 #[serde(default, skip_serializing_if = "Option::is_none")]
2630 pub last_materialized_frontier_digest: Option<Digest>,
2631 pub retry_count: u32,
2632 #[serde(default, skip_serializing_if = "Option::is_none")]
2633 pub gap: Option<ContinuousTemporalGap>,
2634}
2635
2636pub const LODESTONE_API_COMPOSITE_ORDER_FORMAT_VERSION: u16 = 1;
2637#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2638#[serde(rename_all = "snake_case")]
2639pub enum CompositeOrder {
2640 Asc,
2641 Desc,
2642}
2643
2644pub const LODESTONE_API_COMPOSITE_SOURCE_FORMAT_VERSION: u16 = 1;
2645#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2646#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2647pub enum CompositeSource {
2648 Terms {
2649 name: String,
2650 field: String,
2651 order: CompositeOrder,
2652 },
2653 DateHistogram {
2654 name: String,
2655 field: String,
2656 #[serde(default, skip_serializing_if = "Option::is_none")]
2657 fixed_interval_millis: Option<U64>,
2658 #[serde(default, skip_serializing_if = "Option::is_none")]
2659 calendar_interval: Option<String>,
2660 #[serde(default, skip_serializing_if = "Option::is_none")]
2661 time_zone: Option<String>,
2662 offset_millis: I64,
2663 order: CompositeOrder,
2664 },
2665}
2666
2667pub const LODESTONE_API_AGGREGATION_FORMAT_VERSION: u16 = 3;
2668#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2669#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2670pub enum Aggregation {
2671 Terms {
2672 name: String,
2673 field: String,
2674 size: u32,
2675 sub_aggregations: Vec<Aggregation>,
2676 },
2677 Histogram {
2678 name: String,
2679 field: String,
2680 interval: ApproximateNumber,
2681 min_doc_count: U64,
2682 #[serde(default, skip_serializing_if = "Option::is_none")]
2683 extended_bounds: Option<HistogramBounds>,
2684 #[serde(default, skip_serializing_if = "Option::is_none")]
2685 hard_bounds: Option<HistogramBounds>,
2686 offset: ApproximateNumber,
2687 #[serde(default, skip_serializing_if = "Option::is_none")]
2688 missing: Option<ApproximateNumber>,
2689 sub_aggregations: Vec<Aggregation>,
2690 },
2691 Cardinality {
2692 name: String,
2693 field: String,
2694 },
2695 Percentiles {
2696 name: String,
2697 field: String,
2698 percents: Vec<ApproximateNumber>,
2699 },
2700 ApproximateCardinality {
2701 name: String,
2702 field: String,
2703 precision: u32,
2704 },
2705 ApproximatePercentiles {
2706 name: String,
2707 field: String,
2708 percents: Vec<ApproximateNumber>,
2709 precision: u32,
2710 },
2711 Sum {
2712 name: String,
2713 field: String,
2714 },
2715 Avg {
2716 name: String,
2717 field: String,
2718 },
2719 Min {
2720 name: String,
2721 field: String,
2722 },
2723 Max {
2724 name: String,
2725 field: String,
2726 },
2727 Stats {
2728 name: String,
2729 field: String,
2730 },
2731 DateHistogram {
2732 name: String,
2733 field: String,
2734 #[serde(default, skip_serializing_if = "Option::is_none")]
2735 fixed_interval_millis: Option<U64>,
2736 #[serde(default, skip_serializing_if = "Option::is_none")]
2737 calendar_interval: Option<String>,
2738 #[serde(default, skip_serializing_if = "Option::is_none")]
2739 time_zone: Option<String>,
2740 min_doc_count: U64,
2741 #[serde(default, skip_serializing_if = "Option::is_none")]
2742 extended_bounds: Option<DateHistogramBounds>,
2743 #[serde(default, skip_serializing_if = "Option::is_none")]
2744 hard_bounds: Option<DateHistogramBounds>,
2745 offset_millis: I64,
2746 #[serde(default, skip_serializing_if = "Option::is_none")]
2747 missing: Option<I64>,
2748 sub_aggregations: Vec<Aggregation>,
2749 },
2750 Composite {
2751 name: String,
2752 size: u32,
2753 sources: Vec<CompositeSource>,
2754 #[serde(default, skip_serializing_if = "Option::is_none")]
2755 after: Option<Cursor>,
2756 sub_aggregations: Vec<Aggregation>,
2757 },
2758 Filter {
2759 name: String,
2760 query: Box<Query>,
2761 sub_aggregations: Vec<Aggregation>,
2762 },
2763 Nested {
2764 name: String,
2765 path: String,
2766 sub_aggregations: Vec<Aggregation>,
2767 },
2768 ReverseNested {
2769 name: String,
2770 #[serde(default, skip_serializing_if = "Option::is_none")]
2771 path: Option<String>,
2772 sub_aggregations: Vec<Aggregation>,
2773 },
2774 TimeSeriesV1 {
2775 name: String,
2776 metric_name: String,
2777 unit: String,
2778 point_kind: MetricPointKind,
2779 #[serde(default, skip_serializing_if = "Option::is_none")]
2780 temporality: Option<MetricTemporality>,
2781 #[serde(default, skip_serializing_if = "Option::is_none")]
2782 monotonic: Option<bool>,
2783 range_start_unix_nanos: U64,
2784 range_end_unix_nanos: U64,
2785 bucket_width_nanos: U64,
2786 alignment_origin_unix_nanos: U64,
2787 group_by: Vec<String>,
2788 operator: TimeSeriesOperator,
2789 missing_data: TimeSeriesMissingData,
2790 quantiles: Vec<ApproximateNumber>,
2791 quantile_mode: TimeSeriesQuantileMode,
2792 maximum_exemplars: u32,
2793 maximum_points: u32,
2794 maximum_series: u32,
2795 maximum_buckets: u32,
2796 maximum_results: u32,
2797 maximum_state_bytes: U64,
2798 },
2799}
2800
2801pub const LODESTONE_API_NESTED_SEARCH_HIT_FORMAT_VERSION: u16 = 1;
2802#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2803#[serde(deny_unknown_fields)]
2804pub struct NestedSearchHit {
2805 pub path: String,
2806 pub ordinal: u32,
2807 #[serde(default, skip_serializing_if = "Option::is_none")]
2808 pub score: Option<ApproximateNumber>,
2809 pub source: RawJson,
2810 pub sort: Vec<JsonValue>,
2811}
2812
2813pub const LODESTONE_API_NAMED_NESTED_INNER_HITS_RESULT_FORMAT_VERSION: u16 = 1;
2814#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2815#[serde(deny_unknown_fields)]
2816pub struct NamedNestedInnerHitsResult {
2817 pub name: String,
2818 pub total: U64,
2819 pub hits: Vec<NestedSearchHit>,
2820}
2821
2822pub const LODESTONE_API_FRAGMENT_BOUNDARY_FORMAT_VERSION: u16 = 1;
2823#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2824#[serde(rename_all = "snake_case")]
2825pub enum FragmentBoundary {
2826 Word,
2827 Sentence,
2828 Paragraph,
2829 WholeField,
2830}
2831
2832pub const LODESTONE_API_FRAGMENT_OFFSET_ENCODING_FORMAT_VERSION: u16 = 1;
2833#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2834#[serde(rename_all = "snake_case")]
2835pub enum FragmentOffsetEncoding {
2836 Utf8Bytes,
2837 Utf16CodeUnits,
2838 UnicodeCodepoints,
2839}
2840
2841pub const LODESTONE_API_FRAGMENT_RANKER_FORMAT_VERSION: u16 = 1;
2842#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2843#[serde(rename_all = "snake_case")]
2844pub enum FragmentRanker {
2845 LexicalMatchCountV1,
2846}
2847
2848pub const LODESTONE_API_FRAGMENT_REQUEST_FORMAT_VERSION: u16 = 1;
2849#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2850#[serde(deny_unknown_fields)]
2851pub struct FragmentRequest {
2852 pub fields: Vec<String>,
2853 pub max_fragment_bytes: u32,
2854 pub max_fragments: u32,
2855 pub boundary: FragmentBoundary,
2856 pub offset_encoding: FragmentOffsetEncoding,
2857 pub ranker: FragmentRanker,
2858}
2859
2860pub const LODESTONE_API_SEARCH_FRAGMENT_FORMAT_VERSION: u16 = 1;
2861#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2862#[serde(deny_unknown_fields)]
2863pub struct SearchFragment {
2864 pub field: String,
2865 pub text: String,
2866 pub start: u32,
2867 pub end: u32,
2868 pub offset_encoding: FragmentOffsetEncoding,
2869 pub rank: u32,
2870 pub match_count: u32,
2871 pub truncated: bool,
2872 pub partial: bool,
2873}
2874
2875pub const LODESTONE_API_NUMERIC_FEATURE_TRANSFORM_FORMAT_VERSION: u16 = 1;
2876#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2877#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2878pub enum NumericFeatureTransform {
2879 Identity,
2880 Log1p,
2881 Clamp {
2882 minimum: ApproximateNumber,
2883 maximum: ApproximateNumber,
2884 },
2885}
2886
2887pub const LODESTONE_API_NUMERIC_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
2888#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2889#[serde(deny_unknown_fields)]
2890pub struct NumericResultFeature {
2891 pub name: String,
2892 pub field: String,
2893 pub transform: NumericFeatureTransform,
2894}
2895
2896pub const LODESTONE_API_RESULT_FEATURE_REQUEST_FORMAT_VERSION: u16 = 1;
2897#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2898#[serde(deny_unknown_fields)]
2899pub struct ResultFeatureRequest {
2900 pub top_n: u32,
2901 pub include_branch_components: bool,
2902 pub numeric: Vec<NumericResultFeature>,
2903}
2904
2905pub const LODESTONE_API_RESULT_DIVERSIFICATION_FORMAT_VERSION: u16 = 1;
2906#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2907#[serde(deny_unknown_fields)]
2908pub struct ResultDiversification {
2909 pub fields: Vec<String>,
2910 pub max_per_group: u32,
2911}
2912
2913pub const LODESTONE_API_BRANCH_SCORE_KIND_FORMAT_VERSION: u16 = 2;
2914#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2915#[serde(rename_all = "snake_case")]
2916pub enum BranchScoreKind {
2917 LexicalScore,
2918 DenseSimilarity,
2919 SparseDotProduct,
2920 LateInteractionMaxsim,
2921}
2922
2923pub const LODESTONE_API_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
2924#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2925#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2926pub enum ResultFeature {
2927 Branch {
2928 branch: String,
2929 score_kind: BranchScoreKind,
2930 rank: u32,
2931 score: ApproximateNumber,
2932 },
2933 Numeric {
2934 name: String,
2935 field: String,
2936 value: ApproximateNumber,
2937 },
2938}
2939
2940pub const LODESTONE_API_SEARCH_HIT_FORMAT_VERSION: u16 = 2;
2941#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2942#[serde(deny_unknown_fields)]
2943pub struct SearchHit {
2944 pub index: Resource,
2945 pub document_id: String,
2946 #[serde(default, skip_serializing_if = "Option::is_none")]
2947 pub score: Option<ApproximateNumber>,
2948 #[serde(default, skip_serializing_if = "Option::is_none")]
2949 pub source: Option<RawJson>,
2950 pub sort: Vec<JsonValue>,
2951 pub fragments: Vec<SearchFragment>,
2952 pub features: Vec<ResultFeature>,
2953 pub group_values: Vec<JsonValue>,
2954 pub inner_hits: Vec<NamedNestedInnerHitsResult>,
2955}
2956
2957pub const LODESTONE_API_AGGREGATION_BUCKET_FORMAT_VERSION: u16 = 1;
2958#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2959#[serde(deny_unknown_fields)]
2960pub struct AggregationBucket {
2961 pub key: JsonValue,
2962 pub document_count: U64,
2963 pub sub_aggregations: Vec<AggregationResult>,
2964}
2965
2966pub const LODESTONE_API_AGGREGATION_RESULT_FORMAT_VERSION: u16 = 3;
2967#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2968#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2969pub enum AggregationResult {
2970 Terms {
2971 name: String,
2972 buckets: Vec<AggregationBucket>,
2973 partial: bool,
2974 },
2975 Histogram {
2976 name: String,
2977 buckets: Vec<AggregationBucket>,
2978 partial: bool,
2979 },
2980 DateHistogram {
2981 name: String,
2982 buckets: Vec<AggregationBucket>,
2983 partial: bool,
2984 },
2985 Composite {
2986 name: String,
2987 buckets: Vec<AggregationBucket>,
2988 #[serde(default, skip_serializing_if = "Option::is_none")]
2989 after: Option<Cursor>,
2990 partial: bool,
2991 },
2992 Filter {
2993 name: String,
2994 buckets: Vec<AggregationBucket>,
2995 partial: bool,
2996 },
2997 SingleBucket {
2998 name: String,
2999 document_count: U64,
3000 sub_aggregations: Vec<AggregationResult>,
3001 partial: bool,
3002 },
3003 Cardinality {
3004 name: String,
3005 #[serde(default, skip_serializing_if = "Option::is_none")]
3006 value: Option<ApproximateNumber>,
3007 partial: bool,
3008 },
3009 Percentiles {
3010 name: String,
3011 values: Vec<PercentileValue>,
3012 partial: bool,
3013 },
3014 ApproximateCardinality {
3015 name: String,
3016 value: ApproximateNumber,
3017 approximation: Approximation,
3018 partial: bool,
3019 },
3020 ApproximatePercentiles {
3021 name: String,
3022 values: Vec<ApproximatePercentileValue>,
3023 approximation: Approximation,
3024 partial: bool,
3025 },
3026 Sum {
3027 name: String,
3028 #[serde(default, skip_serializing_if = "Option::is_none")]
3029 value: Option<ApproximateNumber>,
3030 partial: bool,
3031 },
3032 Avg {
3033 name: String,
3034 #[serde(default, skip_serializing_if = "Option::is_none")]
3035 value: Option<ApproximateNumber>,
3036 partial: bool,
3037 },
3038 Min {
3039 name: String,
3040 #[serde(default, skip_serializing_if = "Option::is_none")]
3041 value: Option<ApproximateNumber>,
3042 partial: bool,
3043 },
3044 Max {
3045 name: String,
3046 #[serde(default, skip_serializing_if = "Option::is_none")]
3047 value: Option<ApproximateNumber>,
3048 partial: bool,
3049 },
3050 Stats {
3051 name: String,
3052 count: U64,
3053 #[serde(default, skip_serializing_if = "Option::is_none")]
3054 min: Option<ApproximateNumber>,
3055 #[serde(default, skip_serializing_if = "Option::is_none")]
3056 max: Option<ApproximateNumber>,
3057 #[serde(default, skip_serializing_if = "Option::is_none")]
3058 avg: Option<ApproximateNumber>,
3059 sum: ApproximateNumber,
3060 partial: bool,
3061 },
3062 TimeSeriesV1 {
3063 name: String,
3064 buckets: Vec<TimeSeriesBucket>,
3065 partial: bool,
3066 },
3067}
3068
3069pub const LODESTONE_API_SHARD_COUNTS_FORMAT_VERSION: u16 = 1;
3070#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3071#[serde(deny_unknown_fields)]
3072pub struct ShardCounts {
3073 pub total: u32,
3074 pub successful: u32,
3075 pub skipped: u32,
3076 pub failed: u32,
3077}
3078
3079pub const LODESTONE_API_TOTAL_HITS_RELATION_FORMAT_VERSION: u16 = 1;
3080#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3081#[serde(rename_all = "snake_case")]
3082pub enum TotalHitsRelation {
3083 Exact,
3084 LowerBound,
3085 Incomplete,
3086}
3087
3088pub const LODESTONE_API_SEARCH_TOTAL_FORMAT_VERSION: u16 = 1;
3089#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3090#[serde(deny_unknown_fields)]
3091pub struct SearchTotal {
3092 pub value: U64,
3093 pub relation: TotalHitsRelation,
3094 pub partial: bool,
3095}
3096
3097pub const LODESTONE_API_SEARCH_EXECUTION_FRESHNESS_FORMAT_VERSION: u16 = 1;
3098#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3099#[serde(rename_all = "snake_case")]
3100pub enum SearchExecutionFreshness {
3101 Realtime,
3102 Committed,
3103}
3104
3105pub const LODESTONE_API_SEARCH_FRESHNESS_FORMAT_VERSION: u16 = 1;
3106#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3107#[serde(rename_all = "snake_case")]
3108pub enum SearchFreshness {
3109 Auto,
3110 Realtime,
3111 Committed,
3112}
3113
3114pub const LODESTONE_API_SEARCH_DEGRADATION_REASON_FORMAT_VERSION: u16 = 1;
3115#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3116#[serde(rename_all = "snake_case")]
3117pub enum SearchDegradationReason {
3118 WriterUnavailable,
3119}
3120
3121pub const LODESTONE_API_SEARCH_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
3122#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3123#[serde(deny_unknown_fields)]
3124pub struct SearchAchievement {
3125 pub freshness: SearchExecutionFreshness,
3126 pub degradation_reasons: Vec<SearchDegradationReason>,
3127}
3128
3129pub const LODESTONE_API_SEARCH_FAILURE_STAGE_FORMAT_VERSION: u16 = 1;
3130#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3131#[serde(rename_all = "snake_case")]
3132pub enum SearchFailureStage {
3133 Preflight,
3134 Dispatch,
3135}
3136
3137pub const LODESTONE_API_SEARCH_FAILURE_REASON_FORMAT_VERSION: u16 = 1;
3138#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3139#[serde(rename_all = "snake_case")]
3140pub enum SearchFailureReason {
3141 Cancelled,
3142 Overloaded,
3143 ResourceLimit,
3144 DeadlineExceeded,
3145 Unavailable,
3146 InvalidResponse,
3147}
3148
3149pub const LODESTONE_API_COLLECTION_SHARD_FORMAT_VERSION: u16 = 1;
3150#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3151#[serde(deny_unknown_fields)]
3152pub struct CollectionShard {
3153 pub collection_id: Identity,
3154 pub index_id: Identity,
3155 pub shard_id: u32,
3156}
3157
3158pub const LODESTONE_API_SEARCH_PARTIAL_FAILURE_FORMAT_VERSION: u16 = 1;
3159#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3160#[serde(deny_unknown_fields)]
3161pub struct SearchPartialFailure {
3162 pub shard: CollectionShard,
3163 pub stage: SearchFailureStage,
3164 pub reason: SearchFailureReason,
3165 pub recovery: RecoveryAction,
3166}
3167
3168pub const LODESTONE_API_ARTIFACT_FORMAT_VERSION: u16 = 1;
3169#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3170#[serde(deny_unknown_fields)]
3171pub struct Artifact {
3172 pub locator: Locator,
3173 pub bytes: U64,
3174 pub sha256: Digest,
3175 pub expires_at: U64,
3176}
3177
3178pub const LODESTONE_API_PORTABILITY_STORAGE_CAPABILITY_FORMAT_VERSION: u16 = 1;
3179#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3180#[serde(deny_unknown_fields)]
3181pub struct PortabilityStorageCapability {
3182 pub backend_authority: String,
3183 pub object_prefix: String,
3184 pub maximum_bytes: U64,
3185 #[serde(default, skip_serializing_if = "Option::is_none")]
3186 pub key_capability_digest: Option<Digest>,
3187}
3188
3189pub const LODESTONE_API_COLLECTION_EXPORT_ARTIFACT_FORMAT_VERSION: u16 = 1;
3190#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3191#[serde(deny_unknown_fields)]
3192pub struct CollectionExportArtifact {
3193 pub artifact: Artifact,
3194 pub backend_authority: String,
3195 pub object_key: String,
3196 pub source_collection_id: Identity,
3197 pub source_catalog_revision: U64,
3198}
3199
3200pub const LODESTONE_API_INDEX_TRANSFER_PAGE_FORMAT_VERSION: u16 = 1;
3201#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3202#[serde(deny_unknown_fields)]
3203pub struct IndexTransferPage {
3204 pub ordinal: u32,
3205 pub object_key: String,
3206 pub bytes: U64,
3207 pub content_digest: Digest,
3208 pub record_count: u32,
3209}
3210
3211pub const LODESTONE_API_INDEX_TRANSFER_ARTIFACT_FORMAT_VERSION: u16 = 1;
3212#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3213#[serde(deny_unknown_fields)]
3214pub struct IndexTransferArtifact {
3215 pub manifest: Artifact,
3216 pub manifest_object_key: String,
3217 pub transfer_identity: Digest,
3218 pub source_cluster_storage_id: Identity,
3219 pub source_collection_id: Identity,
3220 pub source_index: Resource,
3221 pub source_catalog_revision: U64,
3222 pub source_cut_digest: Digest,
3223 pub pages: Vec<IndexTransferPage>,
3224 pub record_count: u32,
3225}
3226
3227pub const LODESTONE_API_SEARCH_VALIDATION_BOUND_FORMAT_VERSION: u16 = 1;
3228#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3229#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3230pub enum SearchValidationBound {
3231 Exact { value: U64 },
3232 UpperBound { value: U64 },
3233 Unknown { reason: String },
3234}
3235
3236pub const LODESTONE_API_SEARCH_VALIDATION_ESTIMATES_FORMAT_VERSION: u16 = 1;
3237#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3238#[serde(deny_unknown_fields)]
3239pub struct SearchValidationEstimates {
3240 pub shard_fanout: SearchValidationBound,
3241 pub candidate_documents: SearchValidationBound,
3242 pub segments: SearchValidationBound,
3243 pub buckets: SearchValidationBound,
3244 pub memory_bytes: SearchValidationBound,
3245 pub object_reads: SearchValidationBound,
3246 pub object_bytes: SearchValidationBound,
3247 pub response_bytes: SearchValidationBound,
3248 pub planning_work: SearchValidationBound,
3249}
3250
3251pub const LODESTONE_API_SEARCH_VALIDATION_LIMIT_FORMAT_VERSION: u16 = 1;
3252#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3253#[serde(deny_unknown_fields)]
3254pub struct SearchValidationLimit {
3255 pub id: String,
3256 pub applied: U64,
3257 pub unit: String,
3258}
3259
3260pub const LODESTONE_API_OPERATION_KIND_FORMAT_VERSION: u16 = 2;
3261#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3262#[serde(rename_all = "snake_case")]
3263pub enum OperationKind {
3264 Catalog,
3265 MaintenanceTask,
3266 Security,
3267 Diagnostic,
3268 CollectionExport,
3269 CollectionRestore,
3270 IndexExport,
3271 IndexImport,
3272 VectorEvaluation,
3273 VectorWarm,
3274 Lifecycle,
3275 Quota,
3276 Admission,
3277}
3278
3279pub const LODESTONE_API_OPERATION_AUTHORITY_FORMAT_VERSION: u16 = 1;
3280#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3281#[serde(rename_all = "snake_case")]
3282pub enum OperationAuthority {
3283 Catalog,
3284 Tasks,
3285 Security,
3286 Diagnostics,
3287 Portability,
3288 Lifecycle,
3289 Quota,
3290 Admission,
3291}
3292
3293pub const LODESTONE_API_OPERATION_TARGET_FORMAT_VERSION: u16 = 1;
3294#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3295#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3296pub enum OperationTarget {
3297 Collection { collection_id: Identity },
3298 Resource { resource: Resource },
3299 Artifact { locator: Locator },
3300 None,
3301}
3302
3303pub const LODESTONE_API_OPERATION_STATE_FORMAT_VERSION: u16 = 1;
3304#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3305#[serde(rename_all = "snake_case")]
3306pub enum OperationState {
3307 Pending,
3308 Succeeded,
3309 Failed,
3310 Cancelled,
3311}
3312
3313pub const LODESTONE_API_OPERATION_PENDING_STATE_FORMAT_VERSION: u16 = 1;
3314#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3315#[serde(rename_all = "snake_case")]
3316pub enum OperationPendingState {
3317 Queued,
3318 Running,
3319 CancelRequested,
3320}
3321
3322pub const LODESTONE_API_OPERATION_PROGRESS_UNIT_FORMAT_VERSION: u16 = 1;
3323#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3324#[serde(rename_all = "snake_case")]
3325pub enum OperationProgressUnit {
3326 BasisPoints,
3327 Items,
3328 Bytes,
3329 WorkUnits,
3330}
3331
3332pub const LODESTONE_API_OPERATION_PROGRESS_FORMAT_VERSION: u16 = 1;
3333#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3334#[serde(deny_unknown_fields)]
3335pub struct OperationProgress {
3336 pub completed: U64,
3337 pub total: U64,
3338 pub unit: OperationProgressUnit,
3339}
3340
3341pub const LODESTONE_API_OPERATION_RESULT_FORMAT_VERSION: u16 = 1;
3342#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3343#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3344pub enum OperationResult {
3345 None,
3346 Artifacts { items: Vec<Artifact> },
3347}
3348
3349pub const LODESTONE_API_OPERATION_FAILURE_FORMAT_VERSION: u16 = 1;
3350#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3351#[serde(deny_unknown_fields)]
3352pub struct OperationFailure {
3353 pub error: ErrorBody,
3354}
3355
3356pub const LODESTONE_API_OPERATION_CANCELLATION_FORMAT_VERSION: u16 = 1;
3357#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3358#[serde(rename_all = "snake_case")]
3359pub enum OperationCancellation {
3360 NotCancellable,
3361 Cancellable,
3362 CancelRequested,
3363 Cancelled,
3364}
3365
3366pub const LODESTONE_API_OPERATION_RETENTION_STATE_FORMAT_VERSION: u16 = 1;
3367#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3368#[serde(rename_all = "snake_case")]
3369pub enum OperationRetentionState {
3370 Active,
3371 Retired,
3372}
3373
3374pub const LODESTONE_API_OPERATION_RETENTION_FORMAT_VERSION: u16 = 1;
3375#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3376#[serde(deny_unknown_fields)]
3377pub struct OperationRetention {
3378 pub state: OperationRetentionState,
3379 #[serde(default, skip_serializing_if = "Option::is_none")]
3380 pub retire_after: Option<U64>,
3381}
3382
3383pub const LODESTONE_API_OPERATION_FORMAT_VERSION: u16 = 2;
3384#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3385#[serde(deny_unknown_fields)]
3386pub struct Operation {
3387 pub locator: Locator,
3388 pub kind: OperationKind,
3389 pub authority: OperationAuthority,
3390 pub target: OperationTarget,
3391 pub authority_revision: U64,
3392 pub current_state: OperationState,
3393 #[serde(default, skip_serializing_if = "Option::is_none")]
3394 pub pending_state: Option<OperationPendingState>,
3395 #[serde(default, skip_serializing_if = "Option::is_none")]
3396 pub progress: Option<OperationProgress>,
3397 #[serde(default, skip_serializing_if = "Option::is_none")]
3398 pub result: Option<OperationResult>,
3399 #[serde(default, skip_serializing_if = "Option::is_none")]
3400 pub failure: Option<OperationFailure>,
3401 pub cancellation: OperationCancellation,
3402 pub retention: OperationRetention,
3403 pub submitted_at: U64,
3404 #[serde(default, skip_serializing_if = "Option::is_none")]
3405 pub terminal_at: Option<U64>,
3406}
3407
3408pub const LODESTONE_API_WRITE_DURABILITY_BOUNDARY_FORMAT_VERSION: u16 = 1;
3409#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3410#[serde(rename_all = "snake_case")]
3411pub enum WriteDurabilityBoundary {
3412 Registered,
3413 IncarnationMemory,
3414}
3415
3416pub const LODESTONE_API_WRITE_VISIBILITY_MODE_FORMAT_VERSION: u16 = 1;
3417#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3418#[serde(rename_all = "snake_case")]
3419pub enum WriteVisibilityMode {
3420 Applied,
3421 WaitFor,
3422}
3423
3424pub const LODESTONE_API_WRITE_RESPONSE_STAGE_FORMAT_VERSION: u16 = 1;
3425#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3426#[serde(rename_all = "snake_case")]
3427pub enum WriteResponseStage {
3428 Validated,
3429 Admitted,
3430 Sequenced,
3431 ObjectPut,
3432 Registered,
3433 AppliedToActiveMemtable,
3434 MicroCommitted,
3435 Sealed,
3436}
3437
3438pub const LODESTONE_API_WRITE_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
3439#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3440#[serde(deny_unknown_fields)]
3441pub struct WriteAchievement {
3442 pub durability_class: ResourceDurabilityClass,
3443 pub durability_boundary: WriteDurabilityBoundary,
3444 pub visibility_mode: WriteVisibilityMode,
3445 pub response_stage: WriteResponseStage,
3446}
3447
3448pub const LODESTONE_API_MUTATION_RESOLVER_FORMAT_VERSION: u16 = 1;
3449#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3450#[serde(rename_all = "snake_case")]
3451pub enum MutationResolver {
3452 CloneIndex,
3453 GetHistory,
3454 ResolveAppendBulk,
3455 ResolveCatalogAction,
3456 ResolveDocumentBulk,
3457 ResolveDocumentMutation,
3458 ResolveSecurityAction,
3459 ResolveServiceCredentialReservation,
3460 ResolveStateWrite,
3461}
3462
3463pub const LODESTONE_API_MUTATION_OUTCOME_FORMAT_VERSION: u16 = 1;
3464#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3465#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
3466pub enum MutationOutcome {
3467 Terminal,
3468 Pending {
3469 #[serde(default, skip_serializing_if = "Option::is_none")]
3470 resolver: Option<MutationResolver>,
3471 },
3472 Indeterminate {
3473 #[serde(default, skip_serializing_if = "Option::is_none")]
3474 resolver: Option<MutationResolver>,
3475 },
3476 ResolutionRequired {
3477 resolver: MutationResolver,
3478 },
3479}
3480
3481pub const LODESTONE_API_SUBMISSION_STATE_FORMAT_VERSION: u16 = 1;
3482#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3483#[serde(rename_all = "snake_case")]
3484pub enum SubmissionState {
3485 NotSubmitted,
3486 Submitted,
3487 Resolved,
3488 KnownRetired,
3489 Indeterminate,
3490}
3491
3492pub const LODESTONE_API_EXPECTED_BINDING_FORMAT_VERSION: u16 = 1;
3493#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3494#[serde(deny_unknown_fields)]
3495pub struct ExpectedBinding {
3496 pub incarnation: Identity,
3497 pub revision: U64,
3498}
3499
3500pub const LODESTONE_API_ADMINISTRATION_ALIAS_ACTION_FORMAT_VERSION: u16 = 1;
3501#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3502#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3503pub enum AdministrationAliasAction {
3504 Put {
3505 name: String,
3506 #[serde(default, skip_serializing_if = "Option::is_none")]
3507 expected_revision: Option<U64>,
3508 targets: Vec<AliasTarget>,
3509 #[serde(default, skip_serializing_if = "Option::is_none")]
3510 filter: Option<RawJson>,
3511 #[serde(default, skip_serializing_if = "Option::is_none")]
3512 index_routing: Option<String>,
3513 #[serde(default, skip_serializing_if = "Option::is_none")]
3514 search_routing: Option<String>,
3515 },
3516 Delete {
3517 name: String,
3518 expected_revision: U64,
3519 },
3520}
3521
3522pub const LODESTONE_API_ADMINISTRATION_MUTATION_FORMAT_VERSION: u16 = 1;
3523#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3524#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3525pub enum AdministrationMutation {
3526 ApplyAliasActions {
3527 actions: Vec<AdministrationAliasAction>,
3528 },
3529 PutComponentTemplate {
3530 name: String,
3531 #[serde(default, skip_serializing_if = "Option::is_none")]
3532 expected: Option<ExpectedBinding>,
3533 mapping: Mapping,
3534 settings: RawJson,
3535 #[serde(default, skip_serializing_if = "Option::is_none")]
3536 resource_spec: Option<IndexResourceSpec>,
3537 },
3538 DeleteComponentTemplate {
3539 name: String,
3540 expected: ExpectedBinding,
3541 },
3542 PutIndexTemplate {
3543 name: String,
3544 #[serde(default, skip_serializing_if = "Option::is_none")]
3545 expected: Option<ExpectedBinding>,
3546 priority: i32,
3547 data_stream: bool,
3548 index_patterns: Vec<String>,
3549 components: Vec<ExpectedBinding>,
3550 mapping: Mapping,
3551 settings: RawJson,
3552 #[serde(default, skip_serializing_if = "Option::is_none")]
3553 resource_spec: Option<IndexResourceSpec>,
3554 },
3555 DeleteIndexTemplate {
3556 name: String,
3557 expected: ExpectedBinding,
3558 },
3559 PutIngestPipeline {
3560 name: String,
3561 #[serde(default, skip_serializing_if = "Option::is_none")]
3562 expected: Option<ExpectedBinding>,
3563 definition: RawJson,
3564 },
3565 DeleteIngestPipeline {
3566 name: String,
3567 expected: ExpectedBinding,
3568 },
3569 PutLifecyclePolicy {
3570 name: String,
3571 #[serde(default, skip_serializing_if = "Option::is_none")]
3572 expected: Option<ExpectedBinding>,
3573 rollover: RolloverThresholds,
3574 retention: RetentionPolicy,
3575 merge_hint: bool,
3576 freeze_hint: bool,
3577 delete_expired: bool,
3578 },
3579 DeleteLifecyclePolicy {
3580 name: String,
3581 expected: ExpectedBinding,
3582 },
3583 CreateDataStream {
3584 name: String,
3585 timestamp_field: String,
3586 index_template: ExpectedBinding,
3587 #[serde(default, skip_serializing_if = "Option::is_none")]
3588 lifecycle_policy: Option<ExpectedBinding>,
3589 },
3590 DeleteDataStream {
3591 name: String,
3592 expected_revision: U64,
3593 },
3594 RolloverDataStream {
3595 name: String,
3596 expected_revision: U64,
3597 },
3598}
3599
3600pub const LODESTONE_API_ADMINISTRATION_OUTCOME_FORMAT_VERSION: u16 = 1;
3601#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3602#[serde(deny_unknown_fields)]
3603pub struct AdministrationOutcome {
3604 pub action_id: Digest,
3605 pub authority_revision: U64,
3606 pub state: String,
3607 #[serde(default, skip_serializing_if = "Option::is_none")]
3608 pub resource: Option<Resource>,
3609}
3610
3611pub const LODESTONE_API_INDEX_CHANGE_APPLY_RECEIPT_FORMAT_VERSION: u16 = 1;
3612#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3613#[serde(deny_unknown_fields)]
3614pub struct IndexChangeApplyReceipt {
3615 pub action_id: Digest,
3616 pub semantic_digest: Digest,
3617 pub index: Resource,
3618 pub revision: U64,
3619 pub schema_generation: U64,
3620 pub state: String,
3621}
3622
3623pub const LODESTONE_API_BULK_DOCUMENT_ITEM_FORMAT_VERSION: u16 = 2;
3624#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3625#[serde(deny_unknown_fields)]
3626pub struct BulkDocumentItem {
3627 pub item_action_id: Digest,
3628 pub document_id: String,
3629 pub operation: String,
3630 #[serde(default, skip_serializing_if = "Option::is_none")]
3631 pub source: Option<RawJson>,
3632 #[serde(default, skip_serializing_if = "Option::is_none")]
3633 pub record: Option<NativeRecord>,
3634 #[serde(default, skip_serializing_if = "Option::is_none")]
3635 pub routing: Option<String>,
3636 #[serde(default, skip_serializing_if = "Option::is_none")]
3637 pub condition: Option<DocumentMutationCondition>,
3638 #[serde(default, skip_serializing_if = "Option::is_none")]
3639 pub pipeline: Option<IngestPipelineSelection>,
3640 pub semantic_digest: Digest,
3641}
3642
3643pub const LODESTONE_API_BULK_DOCUMENT_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
3644#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3645#[serde(deny_unknown_fields)]
3646pub struct BulkDocumentItemOutcome {
3647 pub item_action_id: Digest,
3648 #[serde(default, skip_serializing_if = "Option::is_none")]
3649 pub locator: Option<Locator>,
3650 pub state: SubmissionState,
3651 #[serde(default, skip_serializing_if = "Option::is_none")]
3652 pub sequence: Option<U64>,
3653 #[serde(default, skip_serializing_if = "Option::is_none")]
3654 pub mapping_generation: Option<U64>,
3655 pub mapping_adopted: bool,
3656 pub no_document_effect: bool,
3657 #[serde(default, skip_serializing_if = "Option::is_none")]
3658 pub error: Option<ErrorBody>,
3659}
3660
3661pub const LODESTONE_API_BULK_DOCUMENT_OUTCOME_FORMAT_VERSION: u16 = 1;
3662#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3663#[serde(deny_unknown_fields)]
3664pub struct BulkDocumentOutcome {
3665 pub batch_id: Digest,
3666 pub index: Resource,
3667 pub items: Vec<BulkDocumentItemOutcome>,
3668 pub complete: bool,
3669 #[serde(default, skip_serializing_if = "Option::is_none")]
3670 pub achievement: Option<WriteAchievement>,
3671}
3672
3673pub const LODESTONE_API_METRIC_ATTRIBUTE_VALUE_FORMAT_VERSION: u16 = 1;
3674#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3675#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3676pub enum MetricAttributeValue {
3677 String { value: String },
3678 Boolean { value: bool },
3679 I64 { value: I64 },
3680 U64 { value: U64 },
3681 F64Bits { value: U64 },
3682}
3683
3684pub const LODESTONE_API_METRIC_ATTRIBUTE_FORMAT_VERSION: u16 = 1;
3685#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3686#[serde(deny_unknown_fields)]
3687pub struct MetricAttribute {
3688 pub key: String,
3689 pub value: MetricAttributeValue,
3690}
3691
3692pub const LODESTONE_API_METRIC_NUMBER_FORMAT_VERSION: u16 = 1;
3693#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3694#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3695pub enum MetricNumber {
3696 I64 { value: I64 },
3697 F64Bits { value: U64 },
3698}
3699
3700pub const LODESTONE_API_METRIC_TEMPORALITY_FORMAT_VERSION: u16 = 1;
3701#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3702#[serde(rename_all = "snake_case")]
3703pub enum MetricTemporality {
3704 Cumulative,
3705 Delta,
3706}
3707
3708pub const LODESTONE_API_METRIC_POINT_KIND_FORMAT_VERSION: u16 = 1;
3709#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3710#[serde(rename_all = "snake_case")]
3711pub enum MetricPointKind {
3712 Gauge,
3713 Sum,
3714 ExplicitHistogram,
3715 ExponentialHistogram,
3716}
3717
3718pub const LODESTONE_API_METRIC_EXPONENTIAL_BUCKETS_FORMAT_VERSION: u16 = 1;
3719#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3720#[serde(deny_unknown_fields)]
3721pub struct MetricExponentialBuckets {
3722 pub offset: i32,
3723 pub counts: Vec<U64>,
3724}
3725
3726pub const LODESTONE_API_METRIC_DATA_FORMAT_VERSION: u16 = 1;
3727#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3728#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3729pub enum MetricData {
3730 Gauge {
3731 value: MetricNumber,
3732 },
3733 Sum {
3734 value: MetricNumber,
3735 temporality: MetricTemporality,
3736 monotonic: bool,
3737 },
3738 ExplicitHistogram {
3739 temporality: MetricTemporality,
3740 count: U64,
3741 #[serde(default, skip_serializing_if = "Option::is_none")]
3742 sum: Option<MetricNumber>,
3743 bounds_f64_bits: Vec<U64>,
3744 bucket_counts: Vec<U64>,
3745 },
3746 ExponentialHistogram {
3747 temporality: MetricTemporality,
3748 count: U64,
3749 #[serde(default, skip_serializing_if = "Option::is_none")]
3750 sum: Option<MetricNumber>,
3751 scale: i32,
3752 zero_count: U64,
3753 positive: MetricExponentialBuckets,
3754 negative: MetricExponentialBuckets,
3755 },
3756}
3757
3758pub const LODESTONE_API_METRIC_INSTRUMENTATION_SCOPE_FORMAT_VERSION: u16 = 1;
3759#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3760#[serde(deny_unknown_fields)]
3761pub struct MetricInstrumentationScope {
3762 pub name: String,
3763 #[serde(default, skip_serializing_if = "Option::is_none")]
3764 pub version: Option<String>,
3765 #[serde(default, skip_serializing_if = "Option::is_none")]
3766 pub schema_url: Option<String>,
3767 pub attributes: Vec<MetricAttribute>,
3768}
3769
3770pub const LODESTONE_API_METRIC_EXEMPLAR_FORMAT_VERSION: u16 = 1;
3771#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3772#[serde(deny_unknown_fields)]
3773pub struct MetricExemplar {
3774 pub timestamp_unix_nanos: U64,
3775 pub value: MetricNumber,
3776 #[serde(default, skip_serializing_if = "Option::is_none")]
3777 pub trace_id: Option<String>,
3778 #[serde(default, skip_serializing_if = "Option::is_none")]
3779 pub span_id: Option<String>,
3780 pub filtered_attributes: Vec<MetricAttribute>,
3781}
3782
3783pub const LODESTONE_API_METRIC_POINT_FORMAT_VERSION: u16 = 1;
3784#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3785#[serde(deny_unknown_fields)]
3786pub struct MetricPoint {
3787 pub format_version: u32,
3788 pub resource_attributes: Vec<MetricAttribute>,
3789 pub instrumentation_scope: MetricInstrumentationScope,
3790 pub metric_name: String,
3791 #[serde(default, skip_serializing_if = "Option::is_none")]
3792 pub description: Option<String>,
3793 pub unit: String,
3794 pub series_attributes: Vec<MetricAttribute>,
3795 pub timestamp_unix_nanos: U64,
3796 #[serde(default, skip_serializing_if = "Option::is_none")]
3797 pub start_timestamp_unix_nanos: Option<U64>,
3798 pub data: MetricData,
3799 pub exemplars: Vec<MetricExemplar>,
3800}
3801
3802pub const LODESTONE_API_ENTITY_REF_FORMAT_VERSION: u16 = 1;
3803#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3804#[serde(deny_unknown_fields)]
3805pub struct EntityRef {
3806 pub entity_kind: String,
3807 pub entity_id: String,
3808}
3809
3810pub const LODESTONE_API_RELATIONSHIP_EVIDENCE_REF_FORMAT_VERSION: u16 = 1;
3811#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3812#[serde(deny_unknown_fields)]
3813pub struct RelationshipEvidenceRef {
3814 pub index: Resource,
3815 pub record_id: String,
3816}
3817
3818pub const LODESTONE_API_RELATIONSHIP_DIRECTIONALITY_FORMAT_VERSION: u16 = 1;
3819#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3820#[serde(rename_all = "snake_case")]
3821pub enum RelationshipDirectionality {
3822 Directed,
3823 Undirected,
3824}
3825
3826pub const LODESTONE_API_RELATIONSHIP_RECORD_FORMAT_VERSION: u16 = 1;
3827#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3828#[serde(deny_unknown_fields)]
3829pub struct RelationshipRecord {
3830 pub format_version: u32,
3831 pub relationship_id: String,
3832 pub source: EntityRef,
3833 pub target: EntityRef,
3834 pub relationship_type: String,
3835 pub directionality: RelationshipDirectionality,
3836 #[serde(default, skip_serializing_if = "Option::is_none")]
3837 pub valid_from_unix_nanos: Option<U64>,
3838 #[serde(default, skip_serializing_if = "Option::is_none")]
3839 pub valid_through_unix_nanos: Option<U64>,
3840 pub provenance: Vec<String>,
3841 pub evidence: Vec<RelationshipEvidenceRef>,
3842 pub assertion_class: String,
3843}
3844
3845pub const LODESTONE_API_PROFILE_LABEL_FORMAT_VERSION: u16 = 1;
3846#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3847#[serde(deny_unknown_fields)]
3848pub struct ProfileLabel {
3849 pub key: String,
3850 pub value: String,
3851}
3852
3853pub const LODESTONE_API_PROFILE_SAMPLE_TYPE_FORMAT_VERSION: u16 = 1;
3854#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3855#[serde(deny_unknown_fields)]
3856pub struct ProfileSampleType {
3857 pub sample_type: String,
3858 pub unit: String,
3859}
3860
3861pub const LODESTONE_API_PROFILE_MAPPING_FORMAT_VERSION: u16 = 1;
3862#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3863#[serde(deny_unknown_fields)]
3864pub struct ProfileMapping {
3865 pub mapping_id: String,
3866 pub build_id: String,
3867 pub module_id: String,
3868 #[serde(default, skip_serializing_if = "Option::is_none")]
3869 pub filename: Option<String>,
3870}
3871
3872pub const LODESTONE_API_PROFILE_FUNCTION_FORMAT_VERSION: u16 = 1;
3873#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3874#[serde(deny_unknown_fields)]
3875pub struct ProfileFunction {
3876 pub function_id: String,
3877 #[serde(default, skip_serializing_if = "Option::is_none")]
3878 pub name: Option<String>,
3879 #[serde(default, skip_serializing_if = "Option::is_none")]
3880 pub system_name: Option<String>,
3881 #[serde(default, skip_serializing_if = "Option::is_none")]
3882 pub filename: Option<String>,
3883 #[serde(default, skip_serializing_if = "Option::is_none")]
3884 pub start_line: Option<U64>,
3885 #[serde(default, skip_serializing_if = "Option::is_none")]
3886 pub symbol_observation_id: Option<String>,
3887}
3888
3889pub const LODESTONE_API_PROFILE_LINE_FORMAT_VERSION: u16 = 1;
3890#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3891#[serde(deny_unknown_fields)]
3892pub struct ProfileLine {
3893 pub function_id: String,
3894 pub line: U64,
3895}
3896
3897pub const LODESTONE_API_PROFILE_LOCATION_FORMAT_VERSION: u16 = 1;
3898#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3899#[serde(deny_unknown_fields)]
3900pub struct ProfileLocation {
3901 pub location_id: String,
3902 #[serde(default, skip_serializing_if = "Option::is_none")]
3903 pub mapping_id: Option<String>,
3904 pub address: U64,
3905 pub lines: Vec<ProfileLine>,
3906}
3907
3908pub const LODESTONE_API_PROFILE_STACK_FORMAT_VERSION: u16 = 1;
3909#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3910#[serde(deny_unknown_fields)]
3911pub struct ProfileStack {
3912 pub stack_id: String,
3913 #[serde(default, skip_serializing_if = "Option::is_none")]
3914 pub parent_stack_id: Option<String>,
3915 pub location_id: String,
3916}
3917
3918pub const LODESTONE_API_PROFILE_SAMPLE_FORMAT_VERSION: u16 = 1;
3919#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3920#[serde(deny_unknown_fields)]
3921pub struct ProfileSample {
3922 pub sample_id: String,
3923 pub stack_id: String,
3924 pub values: Vec<MetricNumber>,
3925 pub labels: Vec<ProfileLabel>,
3926 #[serde(default, skip_serializing_if = "Option::is_none")]
3927 pub trace_id: Option<String>,
3928 #[serde(default, skip_serializing_if = "Option::is_none")]
3929 pub span_id: Option<String>,
3930}
3931
3932pub const LODESTONE_API_PROFILE_INSTRUMENTATION_SCOPE_FORMAT_VERSION: u16 = 1;
3933#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3934#[serde(deny_unknown_fields)]
3935pub struct ProfileInstrumentationScope {
3936 pub name: String,
3937 #[serde(default, skip_serializing_if = "Option::is_none")]
3938 pub version: Option<String>,
3939 pub attributes: Vec<ProfileLabel>,
3940}
3941
3942pub const LODESTONE_API_PROFILE_BATCH_FORMAT_VERSION: u16 = 1;
3943#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3944#[serde(deny_unknown_fields)]
3945pub struct ProfileBatch {
3946 pub format_version: u32,
3947 pub profile_id: String,
3948 pub batch_id: String,
3949 pub start_unix_nanos: U64,
3950 pub end_unix_nanos: U64,
3951 pub duration_nanos: U64,
3952 pub period_nanos: U64,
3953 pub sample_types: Vec<ProfileSampleType>,
3954 pub resource_attributes: Vec<ProfileLabel>,
3955 pub instrumentation_scope: ProfileInstrumentationScope,
3956 pub mappings: Vec<ProfileMapping>,
3957 pub functions: Vec<ProfileFunction>,
3958 pub locations: Vec<ProfileLocation>,
3959 pub stacks: Vec<ProfileStack>,
3960 pub samples: Vec<ProfileSample>,
3961}
3962
3963pub const LODESTONE_API_NATIVE_RECORD_FORMAT_VERSION: u16 = 3;
3964#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3965#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3966pub enum NativeRecord {
3967 Document { source: RawJson },
3968 MetricPoint { point: Box<MetricPoint> },
3969 Relationship { relationship: Box<RelationshipRecord> },
3970 ProfileBatch { batch: Box<ProfileBatch> },
3971}
3972
3973pub const LODESTONE_API_RETAINED_APPEND_ITEM_FORMAT_VERSION: u16 = 4;
3974#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3975#[serde(deny_unknown_fields)]
3976pub struct RetainedAppendItem {
3977 pub item_action_id: Digest,
3978 pub document_id: String,
3979 pub record: NativeRecord,
3980}
3981
3982pub const LODESTONE_API_RETAINED_APPEND_STATE_FORMAT_VERSION: u16 = 1;
3983#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3984#[serde(rename_all = "snake_case")]
3985pub enum RetainedAppendState {
3986 Prepared,
3987 Committed,
3988 Replayed,
3989 Conflict,
3990 NotSubmittedRetryable,
3991 NotSubmittedTerminal,
3992 SubmittedIndeterminate,
3993 Retired,
3994}
3995
3996pub const LODESTONE_API_RETAINED_APPEND_RETRY_SAFETY_FORMAT_VERSION: u16 = 1;
3997#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3998#[serde(rename_all = "snake_case")]
3999pub enum RetainedAppendRetrySafety {
4000 Safe,
4001 ResolveOnly,
4002 Terminal,
4003}
4004
4005pub const LODESTONE_API_RETAINED_APPEND_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
4006#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4007#[serde(deny_unknown_fields)]
4008pub struct RetainedAppendItemOutcome {
4009 pub item_action_id: Digest,
4010 #[serde(default, skip_serializing_if = "Option::is_none")]
4011 pub locator: Option<Locator>,
4012 #[serde(default, skip_serializing_if = "Option::is_none")]
4013 pub semantic_digest: Option<Digest>,
4014 pub state: RetainedAppendState,
4015 pub retry_safety: RetainedAppendRetrySafety,
4016 #[serde(default, skip_serializing_if = "Option::is_none")]
4017 pub sequence: Option<U64>,
4018 #[serde(default, skip_serializing_if = "Option::is_none")]
4019 pub primary_term: Option<U64>,
4020 #[serde(default, skip_serializing_if = "Option::is_none")]
4021 pub error: Option<ErrorBody>,
4022}
4023
4024pub const LODESTONE_API_RETAINED_APPEND_BULK_OUTCOME_FORMAT_VERSION: u16 = 1;
4025#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4026#[serde(deny_unknown_fields)]
4027pub struct RetainedAppendBulkOutcome {
4028 pub batch_id: Digest,
4029 pub index: Resource,
4030 pub items: Vec<RetainedAppendItemOutcome>,
4031 pub complete: bool,
4032 #[serde(default, skip_serializing_if = "Option::is_none")]
4033 pub achievement: Option<WriteAchievement>,
4034}
4035
4036pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_STATE_FORMAT_VERSION: u16 = 1;
4037#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4038#[serde(rename_all = "snake_case")]
4039pub enum RetainedAppendObservationState {
4040 Visible,
4041 Pending,
4042 SubmittedIndeterminate,
4043 Conflict,
4044 Retired,
4045}
4046
4047pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_OUTCOME_FORMAT_VERSION: u16 = 1;
4048#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4049#[serde(deny_unknown_fields)]
4050pub struct RetainedAppendObservationOutcome {
4051 pub index: Resource,
4052 pub locator: Locator,
4053 pub state: RetainedAppendObservationState,
4054 #[serde(default, skip_serializing_if = "Option::is_none")]
4055 pub sequence: Option<U64>,
4056 #[serde(default, skip_serializing_if = "Option::is_none")]
4057 pub primary_term: Option<U64>,
4058}
4059
4060pub const LODESTONE_API_BINARY_VALUE_FORMAT_VERSION: u16 = 1;
4061#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4062#[serde(deny_unknown_fields)]
4063pub struct BinaryValue {
4064 pub bytes_base64: String,
4065}
4066
4067pub const LODESTONE_API_STATE_HASH_FIELD_FORMAT_VERSION: u16 = 1;
4068#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4069#[serde(deny_unknown_fields)]
4070pub struct StateHashField {
4071 pub field: BinaryValue,
4072 pub value: BinaryValue,
4073}
4074
4075pub const LODESTONE_API_STATE_SET_ENTRY_FORMAT_VERSION: u16 = 1;
4076#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4077#[serde(deny_unknown_fields)]
4078pub struct StateSetEntry {
4079 pub key: BinaryValue,
4080 pub value: BinaryValue,
4081}
4082
4083pub const LODESTONE_API_STATE_SET_CONDITION_FORMAT_VERSION: u16 = 1;
4084#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4085#[serde(rename_all = "snake_case")]
4086pub enum StateSetCondition {
4087 Always,
4088 IfAbsent,
4089 IfPresent,
4090}
4091
4092pub const LODESTONE_API_STATE_OPERATION_FORMAT_VERSION: u16 = 1;
4093#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4094#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4095pub enum StateOperation {
4096 Get {
4097 key: BinaryValue,
4098 },
4099 Set {
4100 key: BinaryValue,
4101 value: BinaryValue,
4102 condition: StateSetCondition,
4103 #[serde(default, skip_serializing_if = "Option::is_none")]
4104 expires_at_millis: Option<U64>,
4105 },
4106 Delete {
4107 keys: Vec<BinaryValue>,
4108 },
4109 Exists {
4110 keys: Vec<BinaryValue>,
4111 },
4112 ExpireAt {
4113 key: BinaryValue,
4114 absolute_millis: U64,
4115 },
4116 TtlStatus {
4117 key: BinaryValue,
4118 },
4119 Persist {
4120 key: BinaryValue,
4121 },
4122 MultiGet {
4123 keys: Vec<BinaryValue>,
4124 },
4125 MultiSet {
4126 entries: Vec<StateSetEntry>,
4127 },
4128 Increment {
4129 key: BinaryValue,
4130 delta: I64,
4131 },
4132 HashGet {
4133 key: BinaryValue,
4134 field: BinaryValue,
4135 },
4136 HashSet {
4137 key: BinaryValue,
4138 fields: Vec<StateHashField>,
4139 },
4140 HashGetAll {
4141 key: BinaryValue,
4142 },
4143}
4144
4145pub const LODESTONE_API_STATE_OPTIONAL_VALUE_FORMAT_VERSION: u16 = 1;
4146#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4147#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4148pub enum StateOptionalValue {
4149 Missing,
4150 Value { value: BinaryValue },
4151}
4152
4153pub const LODESTONE_API_STATE_COMMAND_RESULT_FORMAT_VERSION: u16 = 1;
4154#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4155#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4156pub enum StateCommandResult {
4157 Get {
4158 value: StateOptionalValue,
4159 },
4160 Set {
4161 applied: bool,
4162 },
4163 Delete {
4164 removed: u32,
4165 },
4166 Exists {
4167 count: u32,
4168 },
4169 Expire {
4170 changed: bool,
4171 },
4172 TtlStatus {
4173 state: String,
4174 #[serde(default, skip_serializing_if = "Option::is_none")]
4175 remaining_millis: Option<U64>,
4176 },
4177 Persist {
4178 changed: bool,
4179 },
4180 MultiGet {
4181 values: Vec<StateOptionalValue>,
4182 },
4183 MultiSet {
4184 written: u32,
4185 },
4186 Increment {
4187 value: I64,
4188 },
4189 HashGet {
4190 value: StateOptionalValue,
4191 },
4192 HashSet {
4193 fields_added: u32,
4194 },
4195 HashGetAll {
4196 fields: Vec<StateHashField>,
4197 },
4198}
4199
4200pub const LODESTONE_API_STATE_WRITE_RESOLUTION_FORMAT_VERSION: u16 = 1;
4201#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4202#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4203pub enum StateWriteResolution {
4204 NotSubmitted,
4205 Resolved {
4206 result: StateCommandResult,
4207 sequence: U64,
4208 },
4209 KnownRetired {
4210 retired_through: U64,
4211 },
4212 StateReset {
4213 submitted_reset_epoch: U64,
4214 current_reset_epoch: U64,
4215 },
4216 Indeterminate {
4217 #[serde(default, skip_serializing_if = "Option::is_none")]
4218 observed_high_water: Option<U64>,
4219 #[serde(default, skip_serializing_if = "Option::is_none")]
4220 current_high_water: Option<U64>,
4221 #[serde(default, skip_serializing_if = "Option::is_none")]
4222 retired_through: Option<U64>,
4223 },
4224}
4225
4226pub const LODESTONE_API_SERVICE_CREDENTIAL_RESERVATION_FORMAT_VERSION: u16 = 1;
4227#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4228#[serde(deny_unknown_fields)]
4229pub struct ServiceCredentialReservation {
4230 pub locator: Locator,
4231 pub reservation_action_id: Digest,
4232 pub activation_action_id: Digest,
4233 pub principal_id: Identity,
4234 pub api_key_id: Identity,
4235 pub generation: U64,
4236 pub reservation_expires_at: U64,
4237 pub credential_expires_at: U64,
4238 pub verifier_algorithm: String,
4239 pub verifier_algorithm_version: u32,
4240 pub required_secret_bytes: u32,
4241}
4242
4243pub const LODESTONE_API_SUBSCRIPTION_METADATA_FIELD_FORMAT_VERSION: u16 = 1;
4244#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4245#[serde(rename_all = "snake_case")]
4246pub enum SubscriptionMetadataField {
4247 Id,
4248 RoutingHash,
4249 Operation,
4250 Shard,
4251 Sequence,
4252}
4253
4254pub const LODESTONE_API_SUBSCRIPTION_FIELD_FORMAT_VERSION: u16 = 1;
4255#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4256#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4257pub enum SubscriptionField {
4258 Source { path: String },
4259 Metadata { field: SubscriptionMetadataField },
4260}
4261
4262pub const LODESTONE_API_SUBSCRIPTION_FILTER_FORMAT_VERSION: u16 = 1;
4263#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4264#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4265pub enum SubscriptionFilter {
4266 All,
4267 Bool {
4268 must: Vec<SubscriptionFilter>,
4269 should: Vec<SubscriptionFilter>,
4270 must_not: Vec<SubscriptionFilter>,
4271 minimum_should_match: u32,
4272 },
4273 Term {
4274 field: SubscriptionField,
4275 value: JsonValue,
4276 },
4277 Terms {
4278 field: SubscriptionField,
4279 values: Vec<JsonValue>,
4280 },
4281 Range {
4282 field: SubscriptionField,
4283 #[serde(default, skip_serializing_if = "Option::is_none")]
4284 gt: Option<JsonValue>,
4285 #[serde(default, skip_serializing_if = "Option::is_none")]
4286 gte: Option<JsonValue>,
4287 #[serde(default, skip_serializing_if = "Option::is_none")]
4288 lt: Option<JsonValue>,
4289 #[serde(default, skip_serializing_if = "Option::is_none")]
4290 lte: Option<JsonValue>,
4291 },
4292 Exists {
4293 field: SubscriptionField,
4294 },
4295 Prefix {
4296 field: SubscriptionField,
4297 value: String,
4298 },
4299}
4300
4301pub const LODESTONE_API_SUBSCRIPTION_CURSOR_ENTRY_FORMAT_VERSION: u16 = 1;
4302#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4303#[serde(deny_unknown_fields)]
4304pub struct SubscriptionCursorEntry {
4305 pub index: Resource,
4306 pub routing_revision: U64,
4307 pub recovery_era: Identity,
4308 pub shard_id: U64,
4309 pub sequence: U64,
4310}
4311
4312pub const LODESTONE_API_SUBSCRIPTION_ROUTE_FORMAT_VERSION: u16 = 1;
4313#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4314#[serde(deny_unknown_fields)]
4315pub struct SubscriptionRoute {
4316 pub index: Resource,
4317 pub routing_revision: U64,
4318 pub shard_ids: Vec<U64>,
4319}
4320
4321pub const LODESTONE_API_SUBSCRIPTION_START_POSITION_FORMAT_VERSION: u16 = 1;
4322#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4323#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4324pub enum SubscriptionStartPosition {
4325 FromNow,
4326 Resume {
4327 routes: Vec<SubscriptionRoute>,
4328 cut: Vec<SubscriptionCursorEntry>,
4329 },
4330}
4331
4332pub const LODESTONE_API_SUBSCRIPTION_START_FORMAT_VERSION: u16 = 1;
4333#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4334#[serde(deny_unknown_fields)]
4335pub struct SubscriptionStart {
4336 pub format_version: u32,
4337 pub request_id: String,
4338 pub index: Resource,
4339 #[serde(default, skip_serializing_if = "Option::is_none")]
4340 pub filter: Option<SubscriptionFilter>,
4341 pub include_deletes: bool,
4342 pub source_projection: Vec<String>,
4343 pub reconnect_attempt: u32,
4344 pub start: SubscriptionStartPosition,
4345 pub heartbeat_millis: U64,
4346 pub schema_digest: Digest,
4347}
4348
4349pub const LODESTONE_API_SUBSCRIPTION_ACCEPTED_FORMAT_VERSION: u16 = 1;
4350#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4351#[serde(deny_unknown_fields)]
4352pub struct SubscriptionAccepted {
4353 pub format_version: u32,
4354 pub routes: Vec<SubscriptionRoute>,
4355 pub accepted_cut: Vec<SubscriptionCursorEntry>,
4356 pub schema_digest: Digest,
4357}
4358
4359pub const LODESTONE_API_SUBSCRIPTION_WRITER_FENCE_FORMAT_VERSION: u16 = 1;
4360#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4361#[serde(deny_unknown_fields)]
4362pub struct SubscriptionWriterFence {
4363 pub recovery_era: Identity,
4364 pub epoch: u32,
4365}
4366
4367pub const LODESTONE_API_SUBSCRIPTION_EVENT_FORMAT_VERSION: u16 = 1;
4368#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4369#[serde(deny_unknown_fields)]
4370pub struct SubscriptionEvent {
4371 pub format_version: u32,
4372 pub event_id: Digest,
4373 pub index: Resource,
4374 pub shard_id: U64,
4375 pub recovery_era: Identity,
4376 pub writer_fence: SubscriptionWriterFence,
4377 pub routing_revision: U64,
4378 pub sequence: U64,
4379 pub operation: String,
4380 pub document_id: String,
4381 pub routing_hash: u32,
4382 #[serde(default, skip_serializing_if = "Option::is_none")]
4383 pub source: Option<RawJson>,
4384}
4385
4386pub const LODESTONE_API_SUBSCRIPTION_HEARTBEAT_FORMAT_VERSION: u16 = 1;
4387#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4388#[serde(deny_unknown_fields)]
4389pub struct SubscriptionHeartbeat {
4390 pub format_version: u32,
4391 pub confirmed_cut: Vec<SubscriptionCursorEntry>,
4392 pub route_revision: U64,
4393 pub authorization_revision: U64,
4394 pub authorization_valid_until_millis: U64,
4395}
4396
4397pub const LODESTONE_API_SUBSCRIPTION_GAP_FORMAT_VERSION: u16 = 1;
4398#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4399#[serde(deny_unknown_fields)]
4400pub struct SubscriptionGap {
4401 pub format_version: u32,
4402 pub affected: Vec<SubscriptionCursorEntry>,
4403 pub last_confirmed: Vec<SubscriptionCursorEntry>,
4404 pub earliest_available: Vec<SubscriptionCursorEntry>,
4405 pub reason: String,
4406 pub terminal: bool,
4407}
4408
4409pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_REASON_FORMAT_VERSION: u16 = 1;
4410#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4411#[serde(rename_all = "snake_case")]
4412pub enum SubscriptionTerminalReason {
4413 Completed,
4414 Cancelled,
4415 DeadlineExceeded,
4416 StaleCursor,
4417 RetentionGap,
4418 Unavailable,
4419 Internal,
4420}
4421
4422pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_FORMAT_VERSION: u16 = 2;
4423#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4424#[serde(deny_unknown_fields)]
4425pub struct SubscriptionTerminal {
4426 pub format_version: u32,
4427 pub reason: SubscriptionTerminalReason,
4428 pub recovery: RecoveryAction,
4429}
4430
4431pub const LODESTONE_API_SUBSCRIPTION_FRAME_FORMAT_VERSION: u16 = 1;
4432#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4433#[serde(tag = "frame", rename_all = "snake_case", deny_unknown_fields)]
4434pub enum SubscriptionFrame {
4435 Accepted { body: SubscriptionAccepted },
4436 Event { body: SubscriptionEvent },
4437 Heartbeat { body: SubscriptionHeartbeat },
4438 Gap { body: SubscriptionGap },
4439 Terminal { body: SubscriptionTerminal },
4440}
4441
4442pub const LODESTONE_API_STREAM_BINDING_FORMAT_VERSION: u16 = 1;
4443#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4444#[serde(deny_unknown_fields)]
4445pub struct StreamBinding {
4446 pub name: String,
4447 pub transport: String,
4448 pub service: String,
4449 pub method: String,
4450 pub endpoint: String,
4451 pub auth_metadata: String,
4452 pub auth_scheme: String,
4453 pub semantic_format_version: u32,
4454 pub schema_digest: Digest,
4455}
4456
4457pub const LODESTONE_API_CAPABILITY_GRANT_FORMAT_VERSION: u16 = 1;
4458#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4459#[serde(deny_unknown_fields)]
4460pub struct CapabilityGrant {
4461 pub command: String,
4462 pub action: String,
4463 pub state: String,
4464 pub reason: String,
4465 pub mutation_class: String,
4466 pub cancellable: bool,
4467 pub workload_classes: Vec<WorkloadClass>,
4468 pub possible_submission_states: Vec<String>,
4469 pub capability_family: String,
4470 pub effect_class: String,
4471 pub risk_flags: Vec<String>,
4472 pub admissible_errors: Vec<String>,
4473 pub referenced_limits: Vec<String>,
4474 pub retry_safety: String,
4475 pub identity_requirement: String,
4476 #[serde(default, skip_serializing_if = "Option::is_none")]
4477 pub resolver_command: Option<String>,
4478 pub cancellation: String,
4479 pub side_effects: Vec<String>,
4480 pub recovery: String,
4481 pub index_patterns: Vec<String>,
4482 pub exact_index_incarnations: Vec<Identity>,
4483}
4484
4485pub const LODESTONE_API_PROTOCOL_LIMIT_FORMAT_VERSION: u16 = 1;
4486#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4487#[serde(deny_unknown_fields)]
4488pub struct ProtocolLimit {
4489 pub id: String,
4490 pub default: U64,
4491 pub maximum: U64,
4492 pub unit: String,
4493}
4494
4495pub const LODESTONE_API_DOCUMENT_MUTATION_CONDITION_FORMAT_VERSION: u16 = 1;
4496#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4497#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4498pub enum DocumentMutationCondition {
4499 Any,
4500 MustNotExist,
4501 IfSeqNo { seq_no: U64 },
4502 IfSeqNoAndPrimaryTerm { seq_no: U64, primary_term: U64 },
4503}
4504
4505pub const LODESTONE_API_AUDIT_ADAPTER_FORMAT_VERSION: u16 = 1;
4506#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4507#[serde(rename_all = "snake_case")]
4508pub enum AuditAdapter {
4509 Native,
4510 Elasticsearch,
4511 Otlp,
4512 Jaeger,
4513 Grpc,
4514 WebSocket,
4515 Resp,
4516 InternalRpc,
4517 ControlPlane,
4518}
4519
4520pub const LODESTONE_API_AUDIT_DECISION_FORMAT_VERSION: u16 = 1;
4521#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4522#[serde(rename_all = "snake_case")]
4523pub enum AuditDecision {
4524 Allowed,
4525 DeniedAuthentication,
4526 DeniedAuthorization,
4527 DeniedQuota,
4528 DeniedStalePolicy,
4529}
4530
4531pub const LODESTONE_API_AUDIT_OUTCOME_FORMAT_VERSION: u16 = 1;
4532#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4533#[serde(rename_all = "snake_case")]
4534pub enum AuditOutcome {
4535 AdmissionAccepted,
4536 AuthenticationRefused,
4537 AuthorizationRefused,
4538 QuotaRefused,
4539 PolicyUnavailable,
4540 DecodeFailed,
4541 OperationSucceeded,
4542 OperationFailed,
4543 OperationIndeterminate,
4544 FailedRedacted,
4545}
4546
4547pub const LODESTONE_API_AUDIT_DETAIL_FORMAT_VERSION: u16 = 1;
4548#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4549#[serde(rename_all = "snake_case")]
4550pub enum AuditDetail {
4551 PolicyMutation,
4552 CredentialRotation,
4553 CredentialRevocation,
4554 QuotaAdmission,
4555 RequestAdmission,
4556 ExplicitCrashGap,
4557 BackupLifecycle,
4558 RetentionLifecycle,
4559 FieldPromotion,
4560}
4561
4562pub const LODESTONE_API_AUDIT_GAP_REASON_FORMAT_VERSION: u16 = 1;
4563#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4564#[serde(rename_all = "snake_case")]
4565pub enum AuditGapReason {
4566 ExplicitCrashGap,
4567 Retention,
4568}
4569
4570pub const LODESTONE_API_AUDIT_EVENT_FORMAT_VERSION: u16 = 2;
4571#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4572#[serde(deny_unknown_fields)]
4573pub struct AuditEvent {
4574 pub event_id: Digest,
4575 pub recovery_era: Identity,
4576 pub sequence: U64,
4577 pub server_time: U64,
4578 #[serde(default, skip_serializing_if = "Option::is_none")]
4579 pub principal_id: Option<Identity>,
4580 #[serde(default, skip_serializing_if = "Option::is_none")]
4581 pub api_key_id: Option<Identity>,
4582 pub policy_revision: U64,
4583 pub adapter: AuditAdapter,
4584 pub action: String,
4585 pub resource_digest: Digest,
4586 pub request_digest: Digest,
4587 #[serde(default, skip_serializing_if = "Option::is_none")]
4588 pub correlation_id: Option<Identity>,
4589 #[serde(default, skip_serializing_if = "Option::is_none")]
4590 pub diagnostic_id: Option<Identity>,
4591 pub decision: AuditDecision,
4592 pub outcome: AuditOutcome,
4593 pub detail: AuditDetail,
4594}
4595
4596pub const LODESTONE_API_AUDIT_GAP_FORMAT_VERSION: u16 = 2;
4597#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4598#[serde(deny_unknown_fields)]
4599pub struct AuditGap {
4600 pub recovery_era: Identity,
4601 pub first_sequence: U64,
4602 pub last_sequence: U64,
4603 pub reason: AuditGapReason,
4604}
4605
4606pub const LODESTONE_API_AUDIT_STREAM_STATE_FORMAT_VERSION: u16 = 1;
4607#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4608#[serde(deny_unknown_fields)]
4609pub struct AuditStreamState {
4610 pub recovery_era: Identity,
4611 pub earliest_available_sequence: U64,
4612 pub snapshot_through: U64,
4613}
4614
4615pub const LODESTONE_API_SERVICE_CREDENTIAL_GRANT_FORMAT_VERSION: u16 = 1;
4616#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4617#[serde(deny_unknown_fields)]
4618pub struct ServiceCredentialGrant {
4619 pub role_name: String,
4620 pub role_version: U64,
4621}
4622
4623pub const LODESTONE_API_SERVICE_CREDENTIAL_SUMMARY_FORMAT_VERSION: u16 = 1;
4624#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4625#[serde(deny_unknown_fields)]
4626pub struct ServiceCredentialSummary {
4627 pub principal_id: Identity,
4628 pub api_key_id: Identity,
4629 pub generation: U64,
4630 pub state: String,
4631 #[serde(default, skip_serializing_if = "Option::is_none")]
4632 pub expires_at: Option<U64>,
4633 pub grants: Vec<ServiceCredentialGrant>,
4634}
4635
4636pub const LODESTONE_API_SECURITY_ROLE_FORMAT_VERSION: u16 = 1;
4637#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4638#[serde(deny_unknown_fields)]
4639pub struct SecurityRole {
4640 pub role_name: String,
4641 pub version: U64,
4642 pub permissions: Vec<String>,
4643 pub delegable_permissions: Vec<String>,
4644 pub allowed_workload_classes: Vec<WorkloadClass>,
4645 pub index_patterns: Vec<String>,
4646 pub append_index_incarnations: Vec<Identity>,
4647}
4648
4649pub const LODESTONE_API_ROLE_APPEND_SCOPE_CHANGE_FORMAT_VERSION: u16 = 1;
4650#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4651#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4652pub enum RoleAppendScopeChange {
4653 Add { index: Resource },
4654 Remove { index_incarnation: Identity },
4655}
4656
4657pub const LODESTONE_API_ROLE_APPEND_ACCESS_PREPARATION_FORMAT_VERSION: u16 = 1;
4658#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4659#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4660pub enum RoleAppendAccessPreparation {
4661 Prepared {
4662 locator: Locator,
4663 semantic_digest: Digest,
4664 expires_at: U64,
4665 predecessor_role_version: U64,
4666 successor_role_version: U64,
4667 },
4668 AlreadySatisfied {
4669 role: SecurityRole,
4670 },
4671}
4672
4673pub const LODESTONE_API_SECURITY_ACTION_OUTCOME_FORMAT_VERSION: u16 = 1;
4674#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4675#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4676pub enum SecurityActionOutcome {
4677 Reserved {
4678 principal_id: Identity,
4679 api_key_id: Identity,
4680 generation: U64,
4681 },
4682 Activated {
4683 principal_id: Identity,
4684 api_key_id: Identity,
4685 generation: U64,
4686 },
4687 Revoked {
4688 principal_id: Identity,
4689 api_key_id: Identity,
4690 generation: U64,
4691 },
4692 Retired {
4693 principal_id: Identity,
4694 api_key_id: Identity,
4695 generation: U64,
4696 },
4697}
4698
4699pub const LODESTONE_API_MAINTENANCE_WORK_STATE_FORMAT_VERSION: u16 = 1;
4700#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4701#[serde(rename_all = "snake_case")]
4702pub enum MaintenanceWorkState {
4703 ParkedOperatorRequired,
4704 RetryWait,
4705 RetryReady,
4706 Leased,
4707 Deferred,
4708 Runnable,
4709}
4710
4711pub const LODESTONE_API_MAINTENANCE_ATTEMPT_STATE_FORMAT_VERSION: u16 = 1;
4712#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4713#[serde(rename_all = "snake_case")]
4714pub enum MaintenanceAttemptState {
4715 Running,
4716 DeadlineExceededDraining,
4717 DeadlineExceededReclaimPending,
4718 CancellationDraining,
4719 ClaimRecoveryPending,
4720}
4721
4722pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_FORMAT_VERSION: u16 = 1;
4723#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4724#[serde(rename_all = "snake_case")]
4725pub enum MaintenanceFailureClass {
4726 Corruption,
4727 AttemptBudget,
4728 StructuralLimit,
4729 Execution,
4730 Other,
4731}
4732
4733pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_COUNT_FORMAT_VERSION: u16 = 1;
4734#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4735#[serde(deny_unknown_fields)]
4736pub struct MaintenanceFailureClassCount {
4737 pub class: MaintenanceFailureClass,
4738 pub count: U64,
4739}
4740
4741pub const LODESTONE_API_MAINTENANCE_ATTEMPT_OBSERVATION_FORMAT_VERSION: u16 = 1;
4742#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4743#[serde(deny_unknown_fields)]
4744pub struct MaintenanceAttemptObservation {
4745 pub state: MaintenanceAttemptState,
4746 pub lease_epoch: U64,
4747 pub lease_expires_at: U64,
4748 pub observed_at_millis: U64,
4749}
4750
4751pub const LODESTONE_API_MAINTENANCE_TASK_SCOPE_FORMAT_VERSION: u16 = 1;
4752#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4753#[serde(deny_unknown_fields)]
4754pub struct MaintenanceTaskScope {
4755 pub kind: String,
4756 #[serde(default, skip_serializing_if = "Option::is_none")]
4757 pub index: Option<Resource>,
4758 #[serde(default, skip_serializing_if = "Option::is_none")]
4759 pub shard_id: Option<u32>,
4760}
4761
4762pub const LODESTONE_API_MAINTENANCE_TASK_STATUS_FORMAT_VERSION: u16 = 1;
4763#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4764#[serde(deny_unknown_fields)]
4765pub struct MaintenanceTaskStatus {
4766 pub task_id: Identity,
4767 pub kind: String,
4768 pub scope: MaintenanceTaskScope,
4769 pub checkpoint_generation: U64,
4770 pub attempt_count: u32,
4771 pub admitted_at: U64,
4772 pub last_transition_at: U64,
4773 pub last_progress_at: U64,
4774 pub work_state: MaintenanceWorkState,
4775 pub state_since: U64,
4776 #[serde(default, skip_serializing_if = "Option::is_none")]
4777 pub defer_reason: Option<String>,
4778 pub cancellation_requested: bool,
4779 #[serde(default, skip_serializing_if = "Option::is_none")]
4780 pub retry_not_before: Option<U64>,
4781 #[serde(default, skip_serializing_if = "Option::is_none")]
4782 pub failure_at: Option<U64>,
4783 #[serde(default, skip_serializing_if = "Option::is_none")]
4784 pub lease_acquired_at: Option<U64>,
4785 #[serde(default, skip_serializing_if = "Option::is_none")]
4786 pub lease_expires_at: Option<U64>,
4787 #[serde(default, skip_serializing_if = "Option::is_none")]
4788 pub failure_class: Option<MaintenanceFailureClass>,
4789 #[serde(default, skip_serializing_if = "Option::is_none")]
4790 pub failure_code: Option<String>,
4791 pub operator_action_required: bool,
4792 #[serde(default, skip_serializing_if = "Option::is_none")]
4793 pub local_attempt: Option<MaintenanceAttemptObservation>,
4794}
4795
4796pub const LODESTONE_API_MAINTENANCE_STATUS_AGGREGATE_FORMAT_VERSION: u16 = 1;
4797#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4798#[serde(deny_unknown_fields)]
4799pub struct MaintenanceStatusAggregate {
4800 pub format_version: u32,
4801 pub recovery_era: Identity,
4802 pub source_revision: U64,
4803 pub root_revision: U64,
4804 pub logical_observation_time: U64,
4805 #[serde(default, skip_serializing_if = "Option::is_none")]
4806 pub local_observation_millis: Option<U64>,
4807 pub total_incomplete: U64,
4808 pub parked_operator_required: U64,
4809 pub retry_wait: U64,
4810 pub retry_ready: U64,
4811 pub leased: U64,
4812 pub deferred: U64,
4813 pub runnable: U64,
4814 pub eligible_backlog: U64,
4815 pub cancellation_requested: U64,
4816 #[serde(default, skip_serializing_if = "Option::is_none")]
4817 pub oldest_backlog_age: Option<U64>,
4818 #[serde(default, skip_serializing_if = "Option::is_none")]
4819 pub oldest_runnable_age: Option<U64>,
4820 #[serde(default, skip_serializing_if = "Option::is_none")]
4821 pub oldest_retry_wait_age: Option<U64>,
4822 #[serde(default, skip_serializing_if = "Option::is_none")]
4823 pub oldest_parked_age: Option<U64>,
4824 #[serde(default, skip_serializing_if = "Option::is_none")]
4825 pub oldest_no_progress_age: Option<U64>,
4826 pub current_action_capacity: u32,
4827 pub maximum_action_capacity: u32,
4828 pub active_passes: U64,
4829 pub local_in_flight: U64,
4830 pub deadline_draining: U64,
4831 pub cancellation_draining: U64,
4832 pub claim_recovery_pending: U64,
4833 pub projection_refresh_pending: bool,
4834 #[serde(default, skip_serializing_if = "Option::is_none")]
4835 pub durable_last_progress_at: Option<U64>,
4836 pub tasks_claimed_total: U64,
4837 pub tasks_progressed_total: U64,
4838 pub tasks_completed_total: U64,
4839 pub task_retries_total: U64,
4840 pub task_failures_total: U64,
4841 pub deadline_failures_total: U64,
4842 pub cancellations_total: U64,
4843 pub overlay_capacity_exhaustions_total: U64,
4844 pub failure_classes: Vec<MaintenanceFailureClassCount>,
4845}
4846
4847pub const LODESTONE_API_RUNTIME_STATUS_DETAIL_FORMAT_VERSION: u16 = 1;
4848#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4849#[serde(deny_unknown_fields)]
4850pub struct RuntimeStatusDetail {
4851 pub metastore_revision: U64,
4852 pub root_revision: U64,
4853 pub logical_time: U64,
4854 pub degraded_dependencies: Vec<String>,
4855}
4856
4857pub const LODESTONE_API_RESULT_CACHE_STATUS_FORMAT_VERSION: u16 = 2;
4858#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4859#[serde(deny_unknown_fields)]
4860pub struct ResultCacheStatus {
4861 pub format_version: u32,
4862 pub hits: U64,
4863 pub misses: U64,
4864 pub admissions: U64,
4865 pub bypasses: U64,
4866 pub evictions: U64,
4867 pub collection_bytes: U64,
4868 pub collection_entries: u32,
4869}
4870
4871pub const LODESTONE_API_FIELD_PROMOTION_STATUS_FORMAT_VERSION: u16 = 1;
4872#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4873#[serde(deny_unknown_fields)]
4874pub struct FieldPromotionStatus {
4875 pub format_version: u32,
4876 pub index: Resource,
4877 pub mapping_generation: U64,
4878 pub policy_generation: U64,
4879 #[serde(default, skip_serializing_if = "Option::is_none")]
4880 pub last_decision_generation: Option<U64>,
4881 pub heat_records: u32,
4882 pub promoted_fields: u32,
4883 pub extra_bytes: U64,
4884 pub enabled: bool,
4885}
4886
4887pub const LODESTONE_API_OVERLOAD_SHARD_STATUS_FORMAT_VERSION: u16 = 2;
4888#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4889#[serde(deny_unknown_fields)]
4890pub struct OverloadShardStatus {
4891 pub format_version: u32,
4892 pub shard_id: u32,
4893 pub writer_epoch: U64,
4894 pub configured_mode: String,
4895 pub effective_disposition: String,
4896 pub registered_through: U64,
4897 pub indexed_through: U64,
4898 pub lag_operations: U64,
4899 pub backlog_bytes: U64,
4900 pub oldest_age_millis: U64,
4901 pub collection_share_bytes: U64,
4902 pub recovery_ops_this_pass: u32,
4903 pub pending_overlay_documents: U64,
4904 #[serde(default, skip_serializing_if = "Option::is_none")]
4905 pub shed_reason: Option<String>,
4906}
4907
4908pub const LODESTONE_API_EXTERNAL_KEY_BINDING_FORMAT_VERSION: u16 = 1;
4909#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4910#[serde(deny_unknown_fields)]
4911pub struct ExternalKeyBinding {
4912 pub content_key_id: Identity,
4913 pub content_key_generation: U64,
4914 pub binding_id: Identity,
4915 pub binding_generation: U64,
4916 pub access_generation: U64,
4917 pub opaque_binding_base64: String,
4918 pub object_context_digest: Digest,
4919}
4920
4921pub const LODESTONE_API_ROLLUP_MEASURE_FORMAT_VERSION: u16 = 1;
4922#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4923#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4924pub enum RollupMeasure {
4925 Count,
4926 Sum { field_path_digest: Digest },
4927 Min { field_path_digest: Digest },
4928 Max { field_path_digest: Digest },
4929}
4930
4931pub const LODESTONE_API_AGGREGATE_THEN_DELETE_POLICY_FORMAT_VERSION: u16 = 1;
4932#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4933#[serde(deny_unknown_fields)]
4934pub struct AggregateThenDeletePolicy {
4935 pub policy_id: Identity,
4936 pub policy_generation: U64,
4937 pub detail_retirement_acknowledged: bool,
4938 #[serde(default, skip_serializing_if = "Option::is_none")]
4939 pub expected_policy_generation: Option<U64>,
4940 pub timestamp_field_digest: Digest,
4941 pub bucket_width_millis: U64,
4942 pub bucket_alignment_millis: U64,
4943 pub dimensions: Vec<Digest>,
4944 pub measures: Vec<RollupMeasure>,
4945}
4946
4947pub const LODESTONE_API_LIFECYCLE_BINDING_STATUS_FORMAT_VERSION: u16 = 1;
4948#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4949#[serde(deny_unknown_fields)]
4950pub struct LifecycleBindingStatus {
4951 pub content_key_id: Identity,
4952 pub content_key_generation: U64,
4953 pub binding_id: Identity,
4954 pub binding_generation: U64,
4955 pub access_generation: U64,
4956}
4957
4958pub const LODESTONE_API_LIFECYCLE_ROLLUP_STATUS_FORMAT_VERSION: u16 = 1;
4959#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4960#[serde(deny_unknown_fields)]
4961pub struct LifecycleRollupStatus {
4962 pub policy_id: Identity,
4963 pub policy_generation: U64,
4964 pub ledger_revision: U64,
4965 pub coverages: u32,
4966 pub raw_retired_coverages: u32,
4967 pub detail_retirement_acknowledged: bool,
4968 pub query_contract_version: u32,
4969 pub timestamp_field_digest: Digest,
4970 pub bucket_width_millis: U64,
4971 pub bucket_alignment_millis: U64,
4972 pub dimensions: Vec<Digest>,
4973 pub measures: Vec<RollupMeasure>,
4974}
4975
4976pub const LODESTONE_API_LIFECYCLE_STATUS_FORMAT_VERSION: u16 = 2;
4977#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4978#[serde(deny_unknown_fields)]
4979pub struct LifecycleStatus {
4980 pub format_version: u32,
4981 pub index: Resource,
4982 pub authority_revision: U64,
4983 pub active_bindings: Vec<LifecycleBindingStatus>,
4984 #[serde(default, skip_serializing_if = "Option::is_none")]
4985 pub rollup: Option<LifecycleRollupStatus>,
4986}
4987
4988pub const LODESTONE_API_QUOTA_LIMIT_FORMAT_VERSION: u16 = 1;
4989#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4990#[serde(deny_unknown_fields)]
4991pub struct QuotaLimit {
4992 pub dimension: String,
4993 pub maximum: U64,
4994 pub window_millis: U64,
4995}
4996
4997pub const LODESTONE_API_QUOTA_CONSUMPTION_FORMAT_VERSION: u16 = 1;
4998#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4999#[serde(deny_unknown_fields)]
5000pub struct QuotaConsumption {
5001 pub dimension: String,
5002 pub consumed: U64,
5003 pub window_millis: U64,
5004}
5005
5006pub const LODESTONE_API_QUOTA_UPDATE_FORMAT_VERSION: u16 = 1;
5007#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5008#[serde(deny_unknown_fields)]
5009pub struct QuotaUpdate {
5010 pub revision: U64,
5011 pub state: String,
5012}
5013
5014pub const LODESTONE_API_STORAGE_OVERALL_POSTURE_FORMAT_VERSION: u16 = 1;
5015#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5016#[serde(rename_all = "snake_case")]
5017pub enum StorageOverallPosture {
5018 FilesystemDevelopment,
5019 ProviderObjectStorage,
5020 S3CompatibleDevelopment,
5021 Mixed,
5022}
5023
5024pub const LODESTONE_API_STORAGE_PROFILE_ROLE_FORMAT_VERSION: u16 = 1;
5025#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5026#[serde(rename_all = "snake_case")]
5027pub enum StorageProfileRole {
5028 Control,
5029 DefaultWal,
5030 DefaultData,
5031}
5032
5033pub const LODESTONE_API_STORAGE_PROVIDER_POSTURE_FORMAT_VERSION: u16 = 1;
5034#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5035#[serde(rename_all = "snake_case")]
5036pub enum StorageProviderPosture {
5037 Aws,
5038 GoogleCloudStorage,
5039 AzureBlob,
5040 S3CompatibleDevelopment,
5041 FilesystemDevelopment,
5042}
5043
5044pub const LODESTONE_API_STORAGE_BACKEND_SERVICE_CLASS_FORMAT_VERSION: u16 = 1;
5045#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5046#[serde(rename_all = "snake_case")]
5047pub enum StorageBackendServiceClass {
5048 RegionalObject,
5049 ZonalLowLatency,
5050}
5051
5052pub const LODESTONE_API_STORAGE_PROFILE_ROLE_BINDING_FORMAT_VERSION: u16 = 1;
5053#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5054#[serde(deny_unknown_fields)]
5055pub struct StorageProfileRoleBinding {
5056 pub role: StorageProfileRole,
5057 pub authority_group: u32,
5058 pub provider: StorageProviderPosture,
5059 pub service_class: StorageBackendServiceClass,
5060}
5061
5062pub const LODESTONE_API_STORAGE_PROFILE_ATTESTATION_FORMAT_VERSION: u16 = 1;
5063#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5064#[serde(deny_unknown_fields)]
5065pub struct StorageProfileAttestation {
5066 pub format_version: u32,
5067 pub configuration_generation: U64,
5068 pub overall_posture: StorageOverallPosture,
5069 pub roles: Vec<StorageProfileRoleBinding>,
5070 pub default_durability: ResourceDurabilityClass,
5071 pub default_storage: ResourceStorageClass,
5072 pub default_policy_digest: Digest,
5073 pub storage_profile_digest: Digest,
5074 pub attestation_digest: Digest,
5075}
5076
5077pub const LODESTONE_API_STORAGE_PROFILE_EXPECTATION_FORMAT_VERSION: u16 = 1;
5078#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5079#[serde(deny_unknown_fields)]
5080pub struct StorageProfileExpectation {
5081 pub format_version: u32,
5082 #[serde(default, skip_serializing_if = "Option::is_none")]
5083 pub required_posture: Option<StorageOverallPosture>,
5084 #[serde(default, skip_serializing_if = "Option::is_none")]
5085 pub expected_storage_profile_digest: Option<Digest>,
5086}
5087
5088pub const LODESTONE_API_CORE_BINDING_FORMAT_VERSION: u16 = 3;
5089#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5090#[serde(deny_unknown_fields)]
5091pub struct CoreBinding {
5092 pub cluster_id: Identity,
5093 pub collection_id: Identity,
5094 pub configuration_generation: U64,
5095 pub native_endpoints: Vec<String>,
5096 pub selected_stream_endpoint: String,
5097 pub schema_id: String,
5098 pub schema_digest: Digest,
5099 pub storage_profile: StorageProfileAttestation,
5100}
5101
5102pub const LODESTONE_API_READINESS_OBSERVATION_FORMAT_VERSION: u16 = 1;
5103#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5104#[serde(deny_unknown_fields)]
5105pub struct ReadinessObservation {
5106 pub subject: String,
5107 pub state: String,
5108 #[serde(default, skip_serializing_if = "Option::is_none")]
5109 pub reason: Option<String>,
5110 pub revision: U64,
5111 pub observed_cut: U64,
5112}
5113
5114pub const LODESTONE_API_USAGE_DIMENSION_FORMAT_VERSION: u16 = 1;
5115#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5116#[serde(deny_unknown_fields)]
5117pub struct UsageDimension {
5118 pub name: String,
5119 pub value: String,
5120}
5121
5122pub const LODESTONE_API_PHYSICAL_USAGE_VALUE_FORMAT_VERSION: u16 = 2;
5123#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5124#[serde(deny_unknown_fields)]
5125pub struct PhysicalUsageValue {
5126 pub meter: String,
5127 pub unit: String,
5128 pub value: ExactDecimal,
5129}
5130
5131pub const LODESTONE_API_CORE_USAGE_UNITS_FORMAT_VERSION: u16 = 2;
5132#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5133#[serde(deny_unknown_fields)]
5134pub struct CoreUsageUnits {
5135 pub sequence: U64,
5136 pub record_identity: Digest,
5137 pub index_id: Identity,
5138 pub workload_class: WorkloadClass,
5139 pub window_start: U64,
5140 pub window_end: U64,
5141 pub meter_set_version: u32,
5142 pub dimensions: Vec<UsageDimension>,
5143 pub values: Vec<PhysicalUsageValue>,
5144 pub authority_revision: U64,
5145 pub source_digest: Digest,
5146}
5147
5148pub const LODESTONE_API_CORE_USAGE_CORRECTION_FORMAT_VERSION: u16 = 2;
5149#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5150#[serde(deny_unknown_fields)]
5151pub struct CoreUsageCorrection {
5152 pub sequence: U64,
5153 pub correction_sequence: U64,
5154 pub correction_identity: Digest,
5155 pub target_record_identity: Digest,
5156 pub index_id: Identity,
5157 pub workload_class: WorkloadClass,
5158 pub window_start: U64,
5159 pub window_end: U64,
5160 pub meter_set_version: u32,
5161 pub dimensions: Vec<UsageDimension>,
5162 pub values: Vec<PhysicalUsageValue>,
5163 pub reason_digest: Digest,
5164 pub authority_revision: U64,
5165 pub source_digest: Digest,
5166}
5167
5168pub const LODESTONE_API_RESPONSE_META_FORMAT_VERSION: u16 = 1;
5169#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5170#[serde(deny_unknown_fields)]
5171pub struct ResponseMeta {
5172 pub format_version: u32,
5173 pub request_id: String,
5174 pub correlation_id: Identity,
5175 pub diagnostic_id: Identity,
5176}
5177
5178pub const LODESTONE_API_ERROR_DISPOSITION_FORMAT_VERSION: u16 = 1;
5179#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5180#[serde(rename_all = "snake_case")]
5181pub enum ErrorDisposition {
5182 NotSubmitted,
5183 Submitted,
5184 Resolved,
5185 KnownRetired,
5186 Indeterminate,
5187}
5188
5189pub const LODESTONE_API_RECOVERY_ACTION_FORMAT_VERSION: u16 = 1;
5190#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5191#[serde(rename_all = "snake_case")]
5192pub enum RecoveryAction {
5193 Retry,
5194 RetryAfter,
5195 RefreshCredential,
5196 RestartPage,
5197 ReduceRequest,
5198 Resolve,
5199 RefreshPrecondition,
5200 CorrectRange,
5201 Stop,
5202}
5203
5204pub const LODESTONE_API_LIMIT_CLASS_FORMAT_VERSION: u16 = 1;
5205#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5206#[serde(rename_all = "snake_case")]
5207pub enum LimitClass {
5208 RequestBound,
5209 CollectionQuota,
5210 EngineSafety,
5211}
5212
5213pub const LODESTONE_API_ERROR_DETAIL_FORMAT_VERSION: u16 = 3;
5214#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5215#[serde(tag = "code", rename_all = "snake_case", deny_unknown_fields)]
5216pub enum ErrorDetail {
5217 Aborted {
5218 reason: String,
5219 },
5220 DeadlineExceeded,
5221 InvalidRequest {
5222 #[serde(default, skip_serializing_if = "Option::is_none")]
5223 field: Option<String>,
5224 reason: String,
5225 },
5226 UnsupportedVersion {
5227 observed: u32,
5228 maximum_supported: u32,
5229 },
5230 Unauthenticated,
5231 PermissionDenied {
5232 #[serde(default, skip_serializing_if = "Option::is_none")]
5233 action: Option<String>,
5234 #[serde(default, skip_serializing_if = "Option::is_none")]
5235 workload_class: Option<WorkloadClass>,
5236 },
5237 NotFound {
5238 #[serde(default, skip_serializing_if = "Option::is_none")]
5239 resource: Option<String>,
5240 },
5241 Conflict {
5242 #[serde(default, skip_serializing_if = "Option::is_none")]
5243 expected_revision: Option<U64>,
5244 #[serde(default, skip_serializing_if = "Option::is_none")]
5245 observed_revision: Option<U64>,
5246 },
5247 StaleCursor {
5248 restart_count: u32,
5249 },
5250 RestartBudgetExhausted {
5251 maximum_restarts: u32,
5252 },
5253 LimitExceeded {
5254 class: LimitClass,
5255 limit_id: String,
5256 maximum: U64,
5257 },
5258 CapabilityUnavailable {
5259 #[serde(default, skip_serializing_if = "Option::is_none")]
5260 capability: Option<String>,
5261 },
5262 NotSubmitted {
5263 #[serde(default, skip_serializing_if = "Option::is_none")]
5264 retry_after_millis: Option<U64>,
5265 },
5266 SubmittedIndeterminate {
5267 #[serde(default, skip_serializing_if = "Option::is_none")]
5268 locator: Option<Locator>,
5269 },
5270 ExpiredUnknown {
5271 #[serde(default, skip_serializing_if = "Option::is_none")]
5272 locator: Option<Locator>,
5273 },
5274 SecretNotEscrowed,
5275 RetentionGap {
5276 retired_through: U64,
5277 },
5278 ArtifactRangeInvalid {
5279 maximum_bytes: U64,
5280 },
5281 ChecksumMismatch {
5282 expected: Digest,
5283 observed: Digest,
5284 },
5285 TemporarilyUnavailable {
5286 #[serde(default, skip_serializing_if = "Option::is_none")]
5287 retry_after_millis: Option<U64>,
5288 },
5289 Internal,
5290}
5291
5292pub const LODESTONE_API_CONNECTION_PROFILE_FORMAT_VERSION: u16 = 4;
5293#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5294#[serde(deny_unknown_fields)]
5295pub struct ConnectionProfile {
5296 pub format_version: u32,
5297 pub profile_generation: U64,
5298 pub native_endpoints: Vec<String>,
5299 pub selected_stream_endpoint: String,
5300 pub tls_server_name: String,
5301 pub tls_trust_sha256: Digest,
5302 pub expected_cluster_id: Identity,
5303 pub expected_collection_id: Identity,
5304 pub expected_principal_id: Identity,
5305 pub schema_id: String,
5306 pub schema_digest: Digest,
5307 pub credential_id: Identity,
5308 pub credential_generation: U64,
5309 #[serde(default, skip_serializing_if = "Option::is_none")]
5310 pub credential_expires_at: Option<U64>,
5311 pub secret_reference: String,
5312 #[serde(default, skip_serializing_if = "Option::is_none")]
5313 pub storage_profile_expectation: Option<StorageProfileExpectation>,
5314}
5315
5316#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5317pub enum TypeKind {
5318 Enum,
5319 Struct,
5320 TaggedUnion,
5321}
5322#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5323pub struct TypeContract {
5324 pub name: &'static str,
5325 pub format_version: u16,
5326 pub kind: TypeKind,
5327 pub wire: bool,
5328}
5329pub const LODESTONE_API_TYPE_CONTRACTS: &[TypeContract] = &[
5330 TypeContract {
5331 name: "cursor",
5332 format_version: 1,
5333 kind: TypeKind::Struct,
5334 wire: true,
5335 },
5336 TypeContract {
5337 name: "locator",
5338 format_version: 1,
5339 kind: TypeKind::Struct,
5340 wire: true,
5341 },
5342 TypeContract {
5343 name: "resource",
5344 format_version: 1,
5345 kind: TypeKind::Struct,
5346 wire: true,
5347 },
5348 TypeContract {
5349 name: "field_promotion_configuration",
5350 format_version: 1,
5351 kind: TypeKind::Struct,
5352 wire: true,
5353 },
5354 TypeContract {
5355 name: "overload_configuration",
5356 format_version: 2,
5357 kind: TypeKind::Struct,
5358 wire: true,
5359 },
5360 TypeContract {
5361 name: "index_policies",
5362 format_version: 1,
5363 kind: TypeKind::Struct,
5364 wire: true,
5365 },
5366 TypeContract {
5367 name: "maintenance_budgets",
5368 format_version: 1,
5369 kind: TypeKind::Struct,
5370 wire: true,
5371 },
5372 TypeContract {
5373 name: "resource_durability_class",
5374 format_version: 1,
5375 kind: TypeKind::Enum,
5376 wire: true,
5377 },
5378 TypeContract {
5379 name: "resource_storage_class",
5380 format_version: 1,
5381 kind: TypeKind::Enum,
5382 wire: true,
5383 },
5384 TypeContract {
5385 name: "vector_quality_objective",
5386 format_version: 1,
5387 kind: TypeKind::Enum,
5388 wire: true,
5389 },
5390 TypeContract {
5391 name: "vector_indexing_objective",
5392 format_version: 1,
5393 kind: TypeKind::Enum,
5394 wire: true,
5395 },
5396 TypeContract {
5397 name: "vector_residency_intent",
5398 format_version: 1,
5399 kind: TypeKind::Enum,
5400 wire: true,
5401 },
5402 TypeContract {
5403 name: "vector_calibration_binding",
5404 format_version: 1,
5405 kind: TypeKind::Struct,
5406 wire: true,
5407 },
5408 TypeContract {
5409 name: "vector_resource_policy",
5410 format_version: 2,
5411 kind: TypeKind::Struct,
5412 wire: true,
5413 },
5414 TypeContract {
5415 name: "workload_class",
5416 format_version: 1,
5417 kind: TypeKind::Enum,
5418 wire: true,
5419 },
5420 TypeContract {
5421 name: "index_resource_spec",
5422 format_version: 3,
5423 kind: TypeKind::Struct,
5424 wire: true,
5425 },
5426 TypeContract {
5427 name: "index_summary",
5428 format_version: 1,
5429 kind: TypeKind::Struct,
5430 wire: true,
5431 },
5432 TypeContract {
5433 name: "mapping_mode",
5434 format_version: 1,
5435 kind: TypeKind::Enum,
5436 wire: true,
5437 },
5438 TypeContract {
5439 name: "dynamic_mapping_policy",
5440 format_version: 1,
5441 kind: TypeKind::Enum,
5442 wire: true,
5443 },
5444 TypeContract {
5445 name: "mapping_analyzer",
5446 format_version: 1,
5447 kind: TypeKind::Enum,
5448 wire: true,
5449 },
5450 TypeContract {
5451 name: "keyword_normalizer",
5452 format_version: 1,
5453 kind: TypeKind::Enum,
5454 wire: true,
5455 },
5456 TypeContract {
5457 name: "vector_metric",
5458 format_version: 1,
5459 kind: TypeKind::Enum,
5460 wire: true,
5461 },
5462 TypeContract {
5463 name: "mapping_scalar",
5464 format_version: 1,
5465 kind: TypeKind::TaggedUnion,
5466 wire: true,
5467 },
5468 TypeContract {
5469 name: "sparse_vector_weight_type",
5470 format_version: 1,
5471 kind: TypeKind::Enum,
5472 wire: true,
5473 },
5474 TypeContract {
5475 name: "mapping_field_type",
5476 format_version: 3,
5477 kind: TypeKind::TaggedUnion,
5478 wire: true,
5479 },
5480 TypeContract {
5481 name: "mapping_field",
5482 format_version: 1,
5483 kind: TypeKind::Struct,
5484 wire: true,
5485 },
5486 TypeContract {
5487 name: "multi_field_projection",
5488 format_version: 1,
5489 kind: TypeKind::Struct,
5490 wire: true,
5491 },
5492 TypeContract {
5493 name: "analyzer_identity",
5494 format_version: 1,
5495 kind: TypeKind::Struct,
5496 wire: true,
5497 },
5498 TypeContract {
5499 name: "keyword_limit",
5500 format_version: 1,
5501 kind: TypeKind::Struct,
5502 wire: true,
5503 },
5504 TypeContract {
5505 name: "profile_privacy_action",
5506 format_version: 1,
5507 kind: TypeKind::Enum,
5508 wire: true,
5509 },
5510 TypeContract {
5511 name: "profile_privacy_field",
5512 format_version: 1,
5513 kind: TypeKind::TaggedUnion,
5514 wire: true,
5515 },
5516 TypeContract {
5517 name: "profile_privacy_rule",
5518 format_version: 1,
5519 kind: TypeKind::Struct,
5520 wire: true,
5521 },
5522 TypeContract {
5523 name: "profile_privacy_policy",
5524 format_version: 1,
5525 kind: TypeKind::Struct,
5526 wire: true,
5527 },
5528 TypeContract {
5529 name: "mapping_record_model",
5530 format_version: 3,
5531 kind: TypeKind::TaggedUnion,
5532 wire: true,
5533 },
5534 TypeContract {
5535 name: "mapping",
5536 format_version: 4,
5537 kind: TypeKind::Struct,
5538 wire: true,
5539 },
5540 TypeContract {
5541 name: "index_detail",
5542 format_version: 1,
5543 kind: TypeKind::Struct,
5544 wire: true,
5545 },
5546 TypeContract {
5547 name: "source_provider",
5548 format_version: 1,
5549 kind: TypeKind::Enum,
5550 wire: true,
5551 },
5552 TypeContract {
5553 name: "source_decoder",
5554 format_version: 1,
5555 kind: TypeKind::Enum,
5556 wire: true,
5557 },
5558 TypeContract {
5559 name: "source_replay_guarantees",
5560 format_version: 1,
5561 kind: TypeKind::Struct,
5562 wire: true,
5563 },
5564 TypeContract {
5565 name: "source_partition_configuration",
5566 format_version: 1,
5567 kind: TypeKind::Struct,
5568 wire: true,
5569 },
5570 TypeContract {
5571 name: "replayable_source_configuration",
5572 format_version: 1,
5573 kind: TypeKind::Struct,
5574 wire: true,
5575 },
5576 TypeContract {
5577 name: "source_partition_status",
5578 format_version: 1,
5579 kind: TypeKind::Struct,
5580 wire: true,
5581 },
5582 TypeContract {
5583 name: "replayable_source_status",
5584 format_version: 1,
5585 kind: TypeKind::Struct,
5586 wire: true,
5587 },
5588 TypeContract {
5589 name: "source_control_transition",
5590 format_version: 1,
5591 kind: TypeKind::Enum,
5592 wire: true,
5593 },
5594 TypeContract {
5595 name: "history_ledger_precondition",
5596 format_version: 1,
5597 kind: TypeKind::TaggedUnion,
5598 wire: true,
5599 },
5600 TypeContract {
5601 name: "history_retention_policy",
5602 format_version: 1,
5603 kind: TypeKind::Struct,
5604 wire: true,
5605 },
5606 TypeContract {
5607 name: "history_selector",
5608 format_version: 1,
5609 kind: TypeKind::TaggedUnion,
5610 wire: true,
5611 },
5612 TypeContract {
5613 name: "history_hold",
5614 format_version: 1,
5615 kind: TypeKind::Struct,
5616 wire: true,
5617 },
5618 TypeContract {
5619 name: "history_status",
5620 format_version: 1,
5621 kind: TypeKind::Struct,
5622 wire: true,
5623 },
5624 TypeContract {
5625 name: "history_resolution",
5626 format_version: 1,
5627 kind: TypeKind::Struct,
5628 wire: true,
5629 },
5630 TypeContract {
5631 name: "index_reference",
5632 format_version: 1,
5633 kind: TypeKind::Struct,
5634 wire: true,
5635 },
5636 TypeContract {
5637 name: "alias_target",
5638 format_version: 1,
5639 kind: TypeKind::Struct,
5640 wire: true,
5641 },
5642 TypeContract {
5643 name: "alias_summary",
5644 format_version: 1,
5645 kind: TypeKind::Struct,
5646 wire: true,
5647 },
5648 TypeContract {
5649 name: "alias_detail",
5650 format_version: 1,
5651 kind: TypeKind::Struct,
5652 wire: true,
5653 },
5654 TypeContract {
5655 name: "data_stream_summary",
5656 format_version: 1,
5657 kind: TypeKind::Struct,
5658 wire: true,
5659 },
5660 TypeContract {
5661 name: "component_template_binding",
5662 format_version: 1,
5663 kind: TypeKind::Struct,
5664 wire: true,
5665 },
5666 TypeContract {
5667 name: "index_template_binding",
5668 format_version: 1,
5669 kind: TypeKind::Struct,
5670 wire: true,
5671 },
5672 TypeContract {
5673 name: "lifecycle_policy_binding",
5674 format_version: 1,
5675 kind: TypeKind::Struct,
5676 wire: true,
5677 },
5678 TypeContract {
5679 name: "data_stream_detail",
5680 format_version: 1,
5681 kind: TypeKind::Struct,
5682 wire: true,
5683 },
5684 TypeContract {
5685 name: "component_template_summary",
5686 format_version: 1,
5687 kind: TypeKind::Struct,
5688 wire: true,
5689 },
5690 TypeContract {
5691 name: "component_template_detail",
5692 format_version: 1,
5693 kind: TypeKind::Struct,
5694 wire: true,
5695 },
5696 TypeContract {
5697 name: "index_template_summary",
5698 format_version: 1,
5699 kind: TypeKind::Struct,
5700 wire: true,
5701 },
5702 TypeContract {
5703 name: "index_template_detail",
5704 format_version: 1,
5705 kind: TypeKind::Struct,
5706 wire: true,
5707 },
5708 TypeContract {
5709 name: "ingest_pipeline_summary",
5710 format_version: 1,
5711 kind: TypeKind::Struct,
5712 wire: true,
5713 },
5714 TypeContract {
5715 name: "ingest_pipeline_detail",
5716 format_version: 1,
5717 kind: TypeKind::Struct,
5718 wire: true,
5719 },
5720 TypeContract {
5721 name: "ingest_pipeline_selection",
5722 format_version: 1,
5723 kind: TypeKind::Struct,
5724 wire: true,
5725 },
5726 TypeContract {
5727 name: "lifecycle_policy_summary",
5728 format_version: 1,
5729 kind: TypeKind::Struct,
5730 wire: true,
5731 },
5732 TypeContract {
5733 name: "rollover_thresholds",
5734 format_version: 1,
5735 kind: TypeKind::Struct,
5736 wire: true,
5737 },
5738 TypeContract {
5739 name: "retention_policy",
5740 format_version: 1,
5741 kind: TypeKind::Struct,
5742 wire: true,
5743 },
5744 TypeContract {
5745 name: "lifecycle_policy_detail",
5746 format_version: 1,
5747 kind: TypeKind::Struct,
5748 wire: true,
5749 },
5750 TypeContract {
5751 name: "text_query_operator",
5752 format_version: 1,
5753 kind: TypeKind::Enum,
5754 wire: true,
5755 },
5756 TypeContract {
5757 name: "text_query_analyzer",
5758 format_version: 1,
5759 kind: TypeKind::Enum,
5760 wire: true,
5761 },
5762 TypeContract {
5763 name: "zero_terms_query",
5764 format_version: 1,
5765 kind: TypeKind::Enum,
5766 wire: true,
5767 },
5768 TypeContract {
5769 name: "text_query_options",
5770 format_version: 1,
5771 kind: TypeKind::Struct,
5772 wire: true,
5773 },
5774 TypeContract {
5775 name: "multi_match_mode",
5776 format_version: 1,
5777 kind: TypeKind::Enum,
5778 wire: true,
5779 },
5780 TypeContract {
5781 name: "multi_match_field",
5782 format_version: 1,
5783 kind: TypeKind::Struct,
5784 wire: true,
5785 },
5786 TypeContract {
5787 name: "multi_match_options",
5788 format_version: 1,
5789 kind: TypeKind::Struct,
5790 wire: true,
5791 },
5792 TypeContract {
5793 name: "sort_order",
5794 format_version: 1,
5795 kind: TypeKind::Enum,
5796 wire: true,
5797 },
5798 TypeContract {
5799 name: "sort_mode",
5800 format_version: 1,
5801 kind: TypeKind::Enum,
5802 wire: true,
5803 },
5804 TypeContract {
5805 name: "missing_order",
5806 format_version: 1,
5807 kind: TypeKind::Enum,
5808 wire: true,
5809 },
5810 TypeContract {
5811 name: "nested_score_mode",
5812 format_version: 1,
5813 kind: TypeKind::Enum,
5814 wire: true,
5815 },
5816 TypeContract {
5817 name: "nested_inner_hits",
5818 format_version: 1,
5819 kind: TypeKind::Struct,
5820 wire: true,
5821 },
5822 TypeContract {
5823 name: "sort_spec",
5824 format_version: 1,
5825 kind: TypeKind::TaggedUnion,
5826 wire: true,
5827 },
5828 TypeContract {
5829 name: "query",
5830 format_version: 1,
5831 kind: TypeKind::TaggedUnion,
5832 wire: true,
5833 },
5834 TypeContract {
5835 name: "dense_retrieval_mode",
5836 format_version: 1,
5837 kind: TypeKind::Enum,
5838 wire: true,
5839 },
5840 TypeContract {
5841 name: "vector_achieved_mode",
5842 format_version: 1,
5843 kind: TypeKind::Enum,
5844 wire: true,
5845 },
5846 TypeContract {
5847 name: "vector_branch_diagnostics",
5848 format_version: 2,
5849 kind: TypeKind::Struct,
5850 wire: true,
5851 },
5852 TypeContract {
5853 name: "dense_vector_element_type",
5854 format_version: 1,
5855 kind: TypeKind::Enum,
5856 wire: true,
5857 },
5858 TypeContract {
5859 name: "dense_vector_byte_order",
5860 format_version: 1,
5861 kind: TypeKind::Enum,
5862 wire: true,
5863 },
5864 TypeContract {
5865 name: "vector_value",
5866 format_version: 1,
5867 kind: TypeKind::TaggedUnion,
5868 wire: true,
5869 },
5870 TypeContract {
5871 name: "sparse_vector_entry",
5872 format_version: 1,
5873 kind: TypeKind::Struct,
5874 wire: true,
5875 },
5876 TypeContract {
5877 name: "sparse_vector_value",
5878 format_version: 1,
5879 kind: TypeKind::Struct,
5880 wire: true,
5881 },
5882 TypeContract {
5883 name: "vector_set_value",
5884 format_version: 1,
5885 kind: TypeKind::Struct,
5886 wire: true,
5887 },
5888 TypeContract {
5889 name: "vector_evaluation_snapshot",
5890 format_version: 1,
5891 kind: TypeKind::TaggedUnion,
5892 wire: true,
5893 },
5894 TypeContract {
5895 name: "vector_evaluation_query_set",
5896 format_version: 1,
5897 kind: TypeKind::TaggedUnion,
5898 wire: true,
5899 },
5900 TypeContract {
5901 name: "vector_evaluation_budget",
5902 format_version: 1,
5903 kind: TypeKind::Struct,
5904 wire: true,
5905 },
5906 TypeContract {
5907 name: "vector_candidate_policy",
5908 format_version: 1,
5909 kind: TypeKind::Enum,
5910 wire: true,
5911 },
5912 TypeContract {
5913 name: "vector_calibration_objective",
5914 format_version: 1,
5915 kind: TypeKind::Enum,
5916 wire: true,
5917 },
5918 TypeContract {
5919 name: "vector_strategy_profile",
5920 format_version: 1,
5921 kind: TypeKind::Enum,
5922 wire: true,
5923 },
5924 TypeContract {
5925 name: "vector_evaluation_work",
5926 format_version: 1,
5927 kind: TypeKind::Struct,
5928 wire: true,
5929 },
5930 TypeContract {
5931 name: "vector_evaluation_error_code",
5932 format_version: 1,
5933 kind: TypeKind::Enum,
5934 wire: true,
5935 },
5936 TypeContract {
5937 name: "vector_evaluation_error",
5938 format_version: 1,
5939 kind: TypeKind::Struct,
5940 wire: true,
5941 },
5942 TypeContract {
5943 name: "vector_recall_result",
5944 format_version: 1,
5945 kind: TypeKind::Struct,
5946 wire: true,
5947 },
5948 TypeContract {
5949 name: "vector_calibration_candidate",
5950 format_version: 1,
5951 kind: TypeKind::Struct,
5952 wire: true,
5953 },
5954 TypeContract {
5955 name: "vector_calibration_result",
5956 format_version: 1,
5957 kind: TypeKind::Struct,
5958 wire: true,
5959 },
5960 TypeContract {
5961 name: "vector_diagnostic_result",
5962 format_version: 1,
5963 kind: TypeKind::TaggedUnion,
5964 wire: true,
5965 },
5966 TypeContract {
5967 name: "vector_warm_component",
5968 format_version: 1,
5969 kind: TypeKind::Enum,
5970 wire: true,
5971 },
5972 TypeContract {
5973 name: "vector_warm_state",
5974 format_version: 1,
5975 kind: TypeKind::Enum,
5976 wire: true,
5977 },
5978 TypeContract {
5979 name: "vector_warm_achievement",
5980 format_version: 1,
5981 kind: TypeKind::Struct,
5982 wire: true,
5983 },
5984 TypeContract {
5985 name: "vector_warm_result",
5986 format_version: 1,
5987 kind: TypeKind::Struct,
5988 wire: true,
5989 },
5990 TypeContract {
5991 name: "dense_retrieval_threshold",
5992 format_version: 1,
5993 kind: TypeKind::TaggedUnion,
5994 wire: true,
5995 },
5996 TypeContract {
5997 name: "retrieval_branch",
5998 format_version: 3,
5999 kind: TypeKind::TaggedUnion,
6000 wire: true,
6001 },
6002 TypeContract {
6003 name: "weighted_rrf_fusion",
6004 format_version: 1,
6005 kind: TypeKind::Struct,
6006 wire: true,
6007 },
6008 TypeContract {
6009 name: "retrieval_plan",
6010 format_version: 1,
6011 kind: TypeKind::Struct,
6012 wire: true,
6013 },
6014 TypeContract {
6015 name: "histogram_bounds",
6016 format_version: 1,
6017 kind: TypeKind::Struct,
6018 wire: true,
6019 },
6020 TypeContract {
6021 name: "date_histogram_bounds",
6022 format_version: 1,
6023 kind: TypeKind::Struct,
6024 wire: true,
6025 },
6026 TypeContract {
6027 name: "approximation_algorithm",
6028 format_version: 1,
6029 kind: TypeKind::Enum,
6030 wire: true,
6031 },
6032 TypeContract {
6033 name: "approximation",
6034 format_version: 1,
6035 kind: TypeKind::Struct,
6036 wire: true,
6037 },
6038 TypeContract {
6039 name: "percentile_value",
6040 format_version: 1,
6041 kind: TypeKind::Struct,
6042 wire: true,
6043 },
6044 TypeContract {
6045 name: "approximate_percentile_value",
6046 format_version: 1,
6047 kind: TypeKind::Struct,
6048 wire: true,
6049 },
6050 TypeContract {
6051 name: "time_series_operator",
6052 format_version: 1,
6053 kind: TypeKind::Enum,
6054 wire: true,
6055 },
6056 TypeContract {
6057 name: "time_series_missing_data",
6058 format_version: 1,
6059 kind: TypeKind::Enum,
6060 wire: true,
6061 },
6062 TypeContract {
6063 name: "time_series_quantile_mode",
6064 format_version: 1,
6065 kind: TypeKind::Enum,
6066 wire: true,
6067 },
6068 TypeContract {
6069 name: "time_series_bucket_state",
6070 format_version: 1,
6071 kind: TypeKind::Enum,
6072 wire: true,
6073 },
6074 TypeContract {
6075 name: "time_series_quantile_value",
6076 format_version: 1,
6077 kind: TypeKind::Struct,
6078 wire: true,
6079 },
6080 TypeContract {
6081 name: "time_series_value",
6082 format_version: 1,
6083 kind: TypeKind::TaggedUnion,
6084 wire: true,
6085 },
6086 TypeContract {
6087 name: "time_series_bucket",
6088 format_version: 1,
6089 kind: TypeKind::Struct,
6090 wire: true,
6091 },
6092 TypeContract {
6093 name: "relationship_traversal_direction",
6094 format_version: 1,
6095 kind: TypeKind::Enum,
6096 wire: true,
6097 },
6098 TypeContract {
6099 name: "relationship_traversal_filter",
6100 format_version: 1,
6101 kind: TypeKind::Struct,
6102 wire: true,
6103 },
6104 TypeContract {
6105 name: "relationship_traversal_budget",
6106 format_version: 1,
6107 kind: TypeKind::Struct,
6108 wire: true,
6109 },
6110 TypeContract {
6111 name: "traversed_relationship",
6112 format_version: 1,
6113 kind: TypeKind::Struct,
6114 wire: true,
6115 },
6116 TypeContract {
6117 name: "profile_query_operation",
6118 format_version: 1,
6119 kind: TypeKind::Enum,
6120 wire: true,
6121 },
6122 TypeContract {
6123 name: "profile_group_by",
6124 format_version: 1,
6125 kind: TypeKind::TaggedUnion,
6126 wire: true,
6127 },
6128 TypeContract {
6129 name: "profile_query_filter",
6130 format_version: 1,
6131 kind: TypeKind::Struct,
6132 wire: true,
6133 },
6134 TypeContract {
6135 name: "profile_query_budget",
6136 format_version: 1,
6137 kind: TypeKind::Struct,
6138 wire: true,
6139 },
6140 TypeContract {
6141 name: "profile_query_row",
6142 format_version: 1,
6143 kind: TypeKind::Struct,
6144 wire: true,
6145 },
6146 TypeContract {
6147 name: "temporal_input",
6148 format_version: 1,
6149 kind: TypeKind::Struct,
6150 wire: true,
6151 },
6152 TypeContract {
6153 name: "temporal_pattern",
6154 format_version: 1,
6155 kind: TypeKind::TaggedUnion,
6156 wire: true,
6157 },
6158 TypeContract {
6159 name: "historical_temporal_definition",
6160 format_version: 1,
6161 kind: TypeKind::Struct,
6162 wire: true,
6163 },
6164 TypeContract {
6165 name: "temporal_evidence_status",
6166 format_version: 2,
6167 kind: TypeKind::Enum,
6168 wire: true,
6169 },
6170 TypeContract {
6171 name: "temporal_source_event",
6172 format_version: 1,
6173 kind: TypeKind::Struct,
6174 wire: true,
6175 },
6176 TypeContract {
6177 name: "temporal_evidence",
6178 format_version: 2,
6179 kind: TypeKind::Struct,
6180 wire: true,
6181 },
6182 TypeContract {
6183 name: "continuous_temporal_start",
6184 format_version: 1,
6185 kind: TypeKind::TaggedUnion,
6186 wire: true,
6187 },
6188 TypeContract {
6189 name: "continuous_temporal_watermark_policy",
6190 format_version: 1,
6191 kind: TypeKind::TaggedUnion,
6192 wire: true,
6193 },
6194 TypeContract {
6195 name: "continuous_temporal_late_data_policy",
6196 format_version: 1,
6197 kind: TypeKind::TaggedUnion,
6198 wire: true,
6199 },
6200 TypeContract {
6201 name: "continuous_temporal_output",
6202 format_version: 1,
6203 kind: TypeKind::TaggedUnion,
6204 wire: true,
6205 },
6206 TypeContract {
6207 name: "continuous_temporal_definition",
6208 format_version: 1,
6209 kind: TypeKind::Struct,
6210 wire: true,
6211 },
6212 TypeContract {
6213 name: "continuous_temporal_frontier",
6214 format_version: 1,
6215 kind: TypeKind::Struct,
6216 wire: true,
6217 },
6218 TypeContract {
6219 name: "continuous_temporal_available_frontier",
6220 format_version: 1,
6221 kind: TypeKind::Struct,
6222 wire: true,
6223 },
6224 TypeContract {
6225 name: "continuous_temporal_gap_reason",
6226 format_version: 1,
6227 kind: TypeKind::Enum,
6228 wire: true,
6229 },
6230 TypeContract {
6231 name: "continuous_temporal_gap",
6232 format_version: 1,
6233 kind: TypeKind::Struct,
6234 wire: true,
6235 },
6236 TypeContract {
6237 name: "continuous_temporal_evaluation",
6238 format_version: 1,
6239 kind: TypeKind::Struct,
6240 wire: true,
6241 },
6242 TypeContract {
6243 name: "composite_order",
6244 format_version: 1,
6245 kind: TypeKind::Enum,
6246 wire: true,
6247 },
6248 TypeContract {
6249 name: "composite_source",
6250 format_version: 1,
6251 kind: TypeKind::TaggedUnion,
6252 wire: true,
6253 },
6254 TypeContract {
6255 name: "aggregation",
6256 format_version: 3,
6257 kind: TypeKind::TaggedUnion,
6258 wire: true,
6259 },
6260 TypeContract {
6261 name: "nested_search_hit",
6262 format_version: 1,
6263 kind: TypeKind::Struct,
6264 wire: true,
6265 },
6266 TypeContract {
6267 name: "named_nested_inner_hits_result",
6268 format_version: 1,
6269 kind: TypeKind::Struct,
6270 wire: true,
6271 },
6272 TypeContract {
6273 name: "fragment_boundary",
6274 format_version: 1,
6275 kind: TypeKind::Enum,
6276 wire: true,
6277 },
6278 TypeContract {
6279 name: "fragment_offset_encoding",
6280 format_version: 1,
6281 kind: TypeKind::Enum,
6282 wire: true,
6283 },
6284 TypeContract {
6285 name: "fragment_ranker",
6286 format_version: 1,
6287 kind: TypeKind::Enum,
6288 wire: true,
6289 },
6290 TypeContract {
6291 name: "fragment_request",
6292 format_version: 1,
6293 kind: TypeKind::Struct,
6294 wire: true,
6295 },
6296 TypeContract {
6297 name: "search_fragment",
6298 format_version: 1,
6299 kind: TypeKind::Struct,
6300 wire: true,
6301 },
6302 TypeContract {
6303 name: "numeric_feature_transform",
6304 format_version: 1,
6305 kind: TypeKind::TaggedUnion,
6306 wire: true,
6307 },
6308 TypeContract {
6309 name: "numeric_result_feature",
6310 format_version: 1,
6311 kind: TypeKind::Struct,
6312 wire: true,
6313 },
6314 TypeContract {
6315 name: "result_feature_request",
6316 format_version: 1,
6317 kind: TypeKind::Struct,
6318 wire: true,
6319 },
6320 TypeContract {
6321 name: "result_diversification",
6322 format_version: 1,
6323 kind: TypeKind::Struct,
6324 wire: true,
6325 },
6326 TypeContract {
6327 name: "branch_score_kind",
6328 format_version: 2,
6329 kind: TypeKind::Enum,
6330 wire: true,
6331 },
6332 TypeContract {
6333 name: "result_feature",
6334 format_version: 1,
6335 kind: TypeKind::TaggedUnion,
6336 wire: true,
6337 },
6338 TypeContract {
6339 name: "search_hit",
6340 format_version: 2,
6341 kind: TypeKind::Struct,
6342 wire: true,
6343 },
6344 TypeContract {
6345 name: "aggregation_bucket",
6346 format_version: 1,
6347 kind: TypeKind::Struct,
6348 wire: true,
6349 },
6350 TypeContract {
6351 name: "aggregation_result",
6352 format_version: 3,
6353 kind: TypeKind::TaggedUnion,
6354 wire: true,
6355 },
6356 TypeContract {
6357 name: "shard_counts",
6358 format_version: 1,
6359 kind: TypeKind::Struct,
6360 wire: true,
6361 },
6362 TypeContract {
6363 name: "total_hits_relation",
6364 format_version: 1,
6365 kind: TypeKind::Enum,
6366 wire: true,
6367 },
6368 TypeContract {
6369 name: "search_total",
6370 format_version: 1,
6371 kind: TypeKind::Struct,
6372 wire: true,
6373 },
6374 TypeContract {
6375 name: "search_execution_freshness",
6376 format_version: 1,
6377 kind: TypeKind::Enum,
6378 wire: true,
6379 },
6380 TypeContract {
6381 name: "search_freshness",
6382 format_version: 1,
6383 kind: TypeKind::Enum,
6384 wire: true,
6385 },
6386 TypeContract {
6387 name: "search_degradation_reason",
6388 format_version: 1,
6389 kind: TypeKind::Enum,
6390 wire: true,
6391 },
6392 TypeContract {
6393 name: "search_achievement",
6394 format_version: 1,
6395 kind: TypeKind::Struct,
6396 wire: true,
6397 },
6398 TypeContract {
6399 name: "search_failure_stage",
6400 format_version: 1,
6401 kind: TypeKind::Enum,
6402 wire: true,
6403 },
6404 TypeContract {
6405 name: "search_failure_reason",
6406 format_version: 1,
6407 kind: TypeKind::Enum,
6408 wire: true,
6409 },
6410 TypeContract {
6411 name: "collection_shard",
6412 format_version: 1,
6413 kind: TypeKind::Struct,
6414 wire: true,
6415 },
6416 TypeContract {
6417 name: "search_partial_failure",
6418 format_version: 1,
6419 kind: TypeKind::Struct,
6420 wire: true,
6421 },
6422 TypeContract {
6423 name: "artifact",
6424 format_version: 1,
6425 kind: TypeKind::Struct,
6426 wire: true,
6427 },
6428 TypeContract {
6429 name: "portability_storage_capability",
6430 format_version: 1,
6431 kind: TypeKind::Struct,
6432 wire: true,
6433 },
6434 TypeContract {
6435 name: "collection_export_artifact",
6436 format_version: 1,
6437 kind: TypeKind::Struct,
6438 wire: true,
6439 },
6440 TypeContract {
6441 name: "index_transfer_page",
6442 format_version: 1,
6443 kind: TypeKind::Struct,
6444 wire: true,
6445 },
6446 TypeContract {
6447 name: "index_transfer_artifact",
6448 format_version: 1,
6449 kind: TypeKind::Struct,
6450 wire: true,
6451 },
6452 TypeContract {
6453 name: "search_validation_bound",
6454 format_version: 1,
6455 kind: TypeKind::TaggedUnion,
6456 wire: true,
6457 },
6458 TypeContract {
6459 name: "search_validation_estimates",
6460 format_version: 1,
6461 kind: TypeKind::Struct,
6462 wire: true,
6463 },
6464 TypeContract {
6465 name: "search_validation_limit",
6466 format_version: 1,
6467 kind: TypeKind::Struct,
6468 wire: true,
6469 },
6470 TypeContract {
6471 name: "operation_kind",
6472 format_version: 2,
6473 kind: TypeKind::Enum,
6474 wire: true,
6475 },
6476 TypeContract {
6477 name: "operation_authority",
6478 format_version: 1,
6479 kind: TypeKind::Enum,
6480 wire: true,
6481 },
6482 TypeContract {
6483 name: "operation_target",
6484 format_version: 1,
6485 kind: TypeKind::TaggedUnion,
6486 wire: true,
6487 },
6488 TypeContract {
6489 name: "operation_state",
6490 format_version: 1,
6491 kind: TypeKind::Enum,
6492 wire: true,
6493 },
6494 TypeContract {
6495 name: "operation_pending_state",
6496 format_version: 1,
6497 kind: TypeKind::Enum,
6498 wire: true,
6499 },
6500 TypeContract {
6501 name: "operation_progress_unit",
6502 format_version: 1,
6503 kind: TypeKind::Enum,
6504 wire: true,
6505 },
6506 TypeContract {
6507 name: "operation_progress",
6508 format_version: 1,
6509 kind: TypeKind::Struct,
6510 wire: true,
6511 },
6512 TypeContract {
6513 name: "operation_result",
6514 format_version: 1,
6515 kind: TypeKind::TaggedUnion,
6516 wire: true,
6517 },
6518 TypeContract {
6519 name: "operation_failure",
6520 format_version: 1,
6521 kind: TypeKind::Struct,
6522 wire: true,
6523 },
6524 TypeContract {
6525 name: "operation_cancellation",
6526 format_version: 1,
6527 kind: TypeKind::Enum,
6528 wire: true,
6529 },
6530 TypeContract {
6531 name: "operation_retention_state",
6532 format_version: 1,
6533 kind: TypeKind::Enum,
6534 wire: true,
6535 },
6536 TypeContract {
6537 name: "operation_retention",
6538 format_version: 1,
6539 kind: TypeKind::Struct,
6540 wire: true,
6541 },
6542 TypeContract {
6543 name: "operation",
6544 format_version: 2,
6545 kind: TypeKind::Struct,
6546 wire: true,
6547 },
6548 TypeContract {
6549 name: "write_durability_boundary",
6550 format_version: 1,
6551 kind: TypeKind::Enum,
6552 wire: true,
6553 },
6554 TypeContract {
6555 name: "write_visibility_mode",
6556 format_version: 1,
6557 kind: TypeKind::Enum,
6558 wire: true,
6559 },
6560 TypeContract {
6561 name: "write_response_stage",
6562 format_version: 1,
6563 kind: TypeKind::Enum,
6564 wire: true,
6565 },
6566 TypeContract {
6567 name: "write_achievement",
6568 format_version: 1,
6569 kind: TypeKind::Struct,
6570 wire: true,
6571 },
6572 TypeContract {
6573 name: "mutation_resolver",
6574 format_version: 1,
6575 kind: TypeKind::Enum,
6576 wire: true,
6577 },
6578 TypeContract {
6579 name: "mutation_outcome",
6580 format_version: 1,
6581 kind: TypeKind::TaggedUnion,
6582 wire: true,
6583 },
6584 TypeContract {
6585 name: "submission_state",
6586 format_version: 1,
6587 kind: TypeKind::Enum,
6588 wire: true,
6589 },
6590 TypeContract {
6591 name: "expected_binding",
6592 format_version: 1,
6593 kind: TypeKind::Struct,
6594 wire: true,
6595 },
6596 TypeContract {
6597 name: "administration_alias_action",
6598 format_version: 1,
6599 kind: TypeKind::TaggedUnion,
6600 wire: true,
6601 },
6602 TypeContract {
6603 name: "administration_mutation",
6604 format_version: 1,
6605 kind: TypeKind::TaggedUnion,
6606 wire: true,
6607 },
6608 TypeContract {
6609 name: "administration_outcome",
6610 format_version: 1,
6611 kind: TypeKind::Struct,
6612 wire: true,
6613 },
6614 TypeContract {
6615 name: "index_change_apply_receipt",
6616 format_version: 1,
6617 kind: TypeKind::Struct,
6618 wire: true,
6619 },
6620 TypeContract {
6621 name: "bulk_document_item",
6622 format_version: 2,
6623 kind: TypeKind::Struct,
6624 wire: true,
6625 },
6626 TypeContract {
6627 name: "bulk_document_item_outcome",
6628 format_version: 1,
6629 kind: TypeKind::Struct,
6630 wire: true,
6631 },
6632 TypeContract {
6633 name: "bulk_document_outcome",
6634 format_version: 1,
6635 kind: TypeKind::Struct,
6636 wire: true,
6637 },
6638 TypeContract {
6639 name: "metric_attribute_value",
6640 format_version: 1,
6641 kind: TypeKind::TaggedUnion,
6642 wire: true,
6643 },
6644 TypeContract {
6645 name: "metric_attribute",
6646 format_version: 1,
6647 kind: TypeKind::Struct,
6648 wire: true,
6649 },
6650 TypeContract {
6651 name: "metric_number",
6652 format_version: 1,
6653 kind: TypeKind::TaggedUnion,
6654 wire: true,
6655 },
6656 TypeContract {
6657 name: "metric_temporality",
6658 format_version: 1,
6659 kind: TypeKind::Enum,
6660 wire: true,
6661 },
6662 TypeContract {
6663 name: "metric_point_kind",
6664 format_version: 1,
6665 kind: TypeKind::Enum,
6666 wire: true,
6667 },
6668 TypeContract {
6669 name: "metric_exponential_buckets",
6670 format_version: 1,
6671 kind: TypeKind::Struct,
6672 wire: true,
6673 },
6674 TypeContract {
6675 name: "metric_data",
6676 format_version: 1,
6677 kind: TypeKind::TaggedUnion,
6678 wire: true,
6679 },
6680 TypeContract {
6681 name: "metric_instrumentation_scope",
6682 format_version: 1,
6683 kind: TypeKind::Struct,
6684 wire: true,
6685 },
6686 TypeContract {
6687 name: "metric_exemplar",
6688 format_version: 1,
6689 kind: TypeKind::Struct,
6690 wire: true,
6691 },
6692 TypeContract {
6693 name: "metric_point",
6694 format_version: 1,
6695 kind: TypeKind::Struct,
6696 wire: true,
6697 },
6698 TypeContract {
6699 name: "entity_ref",
6700 format_version: 1,
6701 kind: TypeKind::Struct,
6702 wire: true,
6703 },
6704 TypeContract {
6705 name: "relationship_evidence_ref",
6706 format_version: 1,
6707 kind: TypeKind::Struct,
6708 wire: true,
6709 },
6710 TypeContract {
6711 name: "relationship_directionality",
6712 format_version: 1,
6713 kind: TypeKind::Enum,
6714 wire: true,
6715 },
6716 TypeContract {
6717 name: "relationship_record",
6718 format_version: 1,
6719 kind: TypeKind::Struct,
6720 wire: true,
6721 },
6722 TypeContract {
6723 name: "profile_label",
6724 format_version: 1,
6725 kind: TypeKind::Struct,
6726 wire: true,
6727 },
6728 TypeContract {
6729 name: "profile_sample_type",
6730 format_version: 1,
6731 kind: TypeKind::Struct,
6732 wire: true,
6733 },
6734 TypeContract {
6735 name: "profile_mapping",
6736 format_version: 1,
6737 kind: TypeKind::Struct,
6738 wire: true,
6739 },
6740 TypeContract {
6741 name: "profile_function",
6742 format_version: 1,
6743 kind: TypeKind::Struct,
6744 wire: true,
6745 },
6746 TypeContract {
6747 name: "profile_line",
6748 format_version: 1,
6749 kind: TypeKind::Struct,
6750 wire: true,
6751 },
6752 TypeContract {
6753 name: "profile_location",
6754 format_version: 1,
6755 kind: TypeKind::Struct,
6756 wire: true,
6757 },
6758 TypeContract {
6759 name: "profile_stack",
6760 format_version: 1,
6761 kind: TypeKind::Struct,
6762 wire: true,
6763 },
6764 TypeContract {
6765 name: "profile_sample",
6766 format_version: 1,
6767 kind: TypeKind::Struct,
6768 wire: true,
6769 },
6770 TypeContract {
6771 name: "profile_instrumentation_scope",
6772 format_version: 1,
6773 kind: TypeKind::Struct,
6774 wire: true,
6775 },
6776 TypeContract {
6777 name: "profile_batch",
6778 format_version: 1,
6779 kind: TypeKind::Struct,
6780 wire: true,
6781 },
6782 TypeContract {
6783 name: "native_record",
6784 format_version: 3,
6785 kind: TypeKind::TaggedUnion,
6786 wire: true,
6787 },
6788 TypeContract {
6789 name: "retained_append_item",
6790 format_version: 4,
6791 kind: TypeKind::Struct,
6792 wire: true,
6793 },
6794 TypeContract {
6795 name: "retained_append_state",
6796 format_version: 1,
6797 kind: TypeKind::Enum,
6798 wire: true,
6799 },
6800 TypeContract {
6801 name: "retained_append_retry_safety",
6802 format_version: 1,
6803 kind: TypeKind::Enum,
6804 wire: true,
6805 },
6806 TypeContract {
6807 name: "retained_append_item_outcome",
6808 format_version: 1,
6809 kind: TypeKind::Struct,
6810 wire: true,
6811 },
6812 TypeContract {
6813 name: "retained_append_bulk_outcome",
6814 format_version: 1,
6815 kind: TypeKind::Struct,
6816 wire: true,
6817 },
6818 TypeContract {
6819 name: "retained_append_observation_state",
6820 format_version: 1,
6821 kind: TypeKind::Enum,
6822 wire: true,
6823 },
6824 TypeContract {
6825 name: "retained_append_observation_outcome",
6826 format_version: 1,
6827 kind: TypeKind::Struct,
6828 wire: true,
6829 },
6830 TypeContract {
6831 name: "binary_value",
6832 format_version: 1,
6833 kind: TypeKind::Struct,
6834 wire: true,
6835 },
6836 TypeContract {
6837 name: "state_hash_field",
6838 format_version: 1,
6839 kind: TypeKind::Struct,
6840 wire: true,
6841 },
6842 TypeContract {
6843 name: "state_set_entry",
6844 format_version: 1,
6845 kind: TypeKind::Struct,
6846 wire: true,
6847 },
6848 TypeContract {
6849 name: "state_set_condition",
6850 format_version: 1,
6851 kind: TypeKind::Enum,
6852 wire: true,
6853 },
6854 TypeContract {
6855 name: "state_operation",
6856 format_version: 1,
6857 kind: TypeKind::TaggedUnion,
6858 wire: true,
6859 },
6860 TypeContract {
6861 name: "state_optional_value",
6862 format_version: 1,
6863 kind: TypeKind::TaggedUnion,
6864 wire: true,
6865 },
6866 TypeContract {
6867 name: "state_command_result",
6868 format_version: 1,
6869 kind: TypeKind::TaggedUnion,
6870 wire: true,
6871 },
6872 TypeContract {
6873 name: "state_write_resolution",
6874 format_version: 1,
6875 kind: TypeKind::TaggedUnion,
6876 wire: true,
6877 },
6878 TypeContract {
6879 name: "service_credential_reservation",
6880 format_version: 1,
6881 kind: TypeKind::Struct,
6882 wire: true,
6883 },
6884 TypeContract {
6885 name: "subscription_metadata_field",
6886 format_version: 1,
6887 kind: TypeKind::Enum,
6888 wire: true,
6889 },
6890 TypeContract {
6891 name: "subscription_field",
6892 format_version: 1,
6893 kind: TypeKind::TaggedUnion,
6894 wire: true,
6895 },
6896 TypeContract {
6897 name: "subscription_filter",
6898 format_version: 1,
6899 kind: TypeKind::TaggedUnion,
6900 wire: true,
6901 },
6902 TypeContract {
6903 name: "subscription_cursor_entry",
6904 format_version: 1,
6905 kind: TypeKind::Struct,
6906 wire: true,
6907 },
6908 TypeContract {
6909 name: "subscription_route",
6910 format_version: 1,
6911 kind: TypeKind::Struct,
6912 wire: true,
6913 },
6914 TypeContract {
6915 name: "subscription_start_position",
6916 format_version: 1,
6917 kind: TypeKind::TaggedUnion,
6918 wire: true,
6919 },
6920 TypeContract {
6921 name: "subscription_start",
6922 format_version: 1,
6923 kind: TypeKind::Struct,
6924 wire: true,
6925 },
6926 TypeContract {
6927 name: "subscription_accepted",
6928 format_version: 1,
6929 kind: TypeKind::Struct,
6930 wire: true,
6931 },
6932 TypeContract {
6933 name: "subscription_writer_fence",
6934 format_version: 1,
6935 kind: TypeKind::Struct,
6936 wire: true,
6937 },
6938 TypeContract {
6939 name: "subscription_event",
6940 format_version: 1,
6941 kind: TypeKind::Struct,
6942 wire: true,
6943 },
6944 TypeContract {
6945 name: "subscription_heartbeat",
6946 format_version: 1,
6947 kind: TypeKind::Struct,
6948 wire: true,
6949 },
6950 TypeContract {
6951 name: "subscription_gap",
6952 format_version: 1,
6953 kind: TypeKind::Struct,
6954 wire: true,
6955 },
6956 TypeContract {
6957 name: "subscription_terminal_reason",
6958 format_version: 1,
6959 kind: TypeKind::Enum,
6960 wire: true,
6961 },
6962 TypeContract {
6963 name: "subscription_terminal",
6964 format_version: 2,
6965 kind: TypeKind::Struct,
6966 wire: true,
6967 },
6968 TypeContract {
6969 name: "subscription_frame",
6970 format_version: 1,
6971 kind: TypeKind::TaggedUnion,
6972 wire: true,
6973 },
6974 TypeContract {
6975 name: "stream_binding",
6976 format_version: 1,
6977 kind: TypeKind::Struct,
6978 wire: true,
6979 },
6980 TypeContract {
6981 name: "capability_grant",
6982 format_version: 1,
6983 kind: TypeKind::Struct,
6984 wire: true,
6985 },
6986 TypeContract {
6987 name: "protocol_limit",
6988 format_version: 1,
6989 kind: TypeKind::Struct,
6990 wire: true,
6991 },
6992 TypeContract {
6993 name: "document_mutation_condition",
6994 format_version: 1,
6995 kind: TypeKind::TaggedUnion,
6996 wire: true,
6997 },
6998 TypeContract {
6999 name: "audit_adapter",
7000 format_version: 1,
7001 kind: TypeKind::Enum,
7002 wire: true,
7003 },
7004 TypeContract {
7005 name: "audit_decision",
7006 format_version: 1,
7007 kind: TypeKind::Enum,
7008 wire: true,
7009 },
7010 TypeContract {
7011 name: "audit_outcome",
7012 format_version: 1,
7013 kind: TypeKind::Enum,
7014 wire: true,
7015 },
7016 TypeContract {
7017 name: "audit_detail",
7018 format_version: 1,
7019 kind: TypeKind::Enum,
7020 wire: true,
7021 },
7022 TypeContract {
7023 name: "audit_gap_reason",
7024 format_version: 1,
7025 kind: TypeKind::Enum,
7026 wire: true,
7027 },
7028 TypeContract {
7029 name: "audit_event",
7030 format_version: 2,
7031 kind: TypeKind::Struct,
7032 wire: true,
7033 },
7034 TypeContract {
7035 name: "audit_gap",
7036 format_version: 2,
7037 kind: TypeKind::Struct,
7038 wire: true,
7039 },
7040 TypeContract {
7041 name: "audit_stream_state",
7042 format_version: 1,
7043 kind: TypeKind::Struct,
7044 wire: true,
7045 },
7046 TypeContract {
7047 name: "service_credential_grant",
7048 format_version: 1,
7049 kind: TypeKind::Struct,
7050 wire: true,
7051 },
7052 TypeContract {
7053 name: "service_credential_summary",
7054 format_version: 1,
7055 kind: TypeKind::Struct,
7056 wire: true,
7057 },
7058 TypeContract {
7059 name: "security_role",
7060 format_version: 1,
7061 kind: TypeKind::Struct,
7062 wire: true,
7063 },
7064 TypeContract {
7065 name: "role_append_scope_change",
7066 format_version: 1,
7067 kind: TypeKind::TaggedUnion,
7068 wire: true,
7069 },
7070 TypeContract {
7071 name: "role_append_access_preparation",
7072 format_version: 1,
7073 kind: TypeKind::TaggedUnion,
7074 wire: true,
7075 },
7076 TypeContract {
7077 name: "security_action_outcome",
7078 format_version: 1,
7079 kind: TypeKind::TaggedUnion,
7080 wire: true,
7081 },
7082 TypeContract {
7083 name: "maintenance_work_state",
7084 format_version: 1,
7085 kind: TypeKind::Enum,
7086 wire: true,
7087 },
7088 TypeContract {
7089 name: "maintenance_attempt_state",
7090 format_version: 1,
7091 kind: TypeKind::Enum,
7092 wire: true,
7093 },
7094 TypeContract {
7095 name: "maintenance_failure_class",
7096 format_version: 1,
7097 kind: TypeKind::Enum,
7098 wire: true,
7099 },
7100 TypeContract {
7101 name: "maintenance_failure_class_count",
7102 format_version: 1,
7103 kind: TypeKind::Struct,
7104 wire: true,
7105 },
7106 TypeContract {
7107 name: "maintenance_attempt_observation",
7108 format_version: 1,
7109 kind: TypeKind::Struct,
7110 wire: true,
7111 },
7112 TypeContract {
7113 name: "maintenance_task_scope",
7114 format_version: 1,
7115 kind: TypeKind::Struct,
7116 wire: true,
7117 },
7118 TypeContract {
7119 name: "maintenance_task_status",
7120 format_version: 1,
7121 kind: TypeKind::Struct,
7122 wire: true,
7123 },
7124 TypeContract {
7125 name: "maintenance_status_aggregate",
7126 format_version: 1,
7127 kind: TypeKind::Struct,
7128 wire: true,
7129 },
7130 TypeContract {
7131 name: "runtime_status_detail",
7132 format_version: 1,
7133 kind: TypeKind::Struct,
7134 wire: true,
7135 },
7136 TypeContract {
7137 name: "result_cache_status",
7138 format_version: 2,
7139 kind: TypeKind::Struct,
7140 wire: true,
7141 },
7142 TypeContract {
7143 name: "field_promotion_status",
7144 format_version: 1,
7145 kind: TypeKind::Struct,
7146 wire: true,
7147 },
7148 TypeContract {
7149 name: "overload_shard_status",
7150 format_version: 2,
7151 kind: TypeKind::Struct,
7152 wire: true,
7153 },
7154 TypeContract {
7155 name: "external_key_binding",
7156 format_version: 1,
7157 kind: TypeKind::Struct,
7158 wire: true,
7159 },
7160 TypeContract {
7161 name: "rollup_measure",
7162 format_version: 1,
7163 kind: TypeKind::TaggedUnion,
7164 wire: true,
7165 },
7166 TypeContract {
7167 name: "aggregate_then_delete_policy",
7168 format_version: 1,
7169 kind: TypeKind::Struct,
7170 wire: true,
7171 },
7172 TypeContract {
7173 name: "lifecycle_binding_status",
7174 format_version: 1,
7175 kind: TypeKind::Struct,
7176 wire: true,
7177 },
7178 TypeContract {
7179 name: "lifecycle_rollup_status",
7180 format_version: 1,
7181 kind: TypeKind::Struct,
7182 wire: true,
7183 },
7184 TypeContract {
7185 name: "lifecycle_status",
7186 format_version: 2,
7187 kind: TypeKind::Struct,
7188 wire: true,
7189 },
7190 TypeContract {
7191 name: "quota_limit",
7192 format_version: 1,
7193 kind: TypeKind::Struct,
7194 wire: true,
7195 },
7196 TypeContract {
7197 name: "quota_consumption",
7198 format_version: 1,
7199 kind: TypeKind::Struct,
7200 wire: true,
7201 },
7202 TypeContract {
7203 name: "quota_update",
7204 format_version: 1,
7205 kind: TypeKind::Struct,
7206 wire: true,
7207 },
7208 TypeContract {
7209 name: "storage_overall_posture",
7210 format_version: 1,
7211 kind: TypeKind::Enum,
7212 wire: true,
7213 },
7214 TypeContract {
7215 name: "storage_profile_role",
7216 format_version: 1,
7217 kind: TypeKind::Enum,
7218 wire: true,
7219 },
7220 TypeContract {
7221 name: "storage_provider_posture",
7222 format_version: 1,
7223 kind: TypeKind::Enum,
7224 wire: true,
7225 },
7226 TypeContract {
7227 name: "storage_backend_service_class",
7228 format_version: 1,
7229 kind: TypeKind::Enum,
7230 wire: true,
7231 },
7232 TypeContract {
7233 name: "storage_profile_role_binding",
7234 format_version: 1,
7235 kind: TypeKind::Struct,
7236 wire: true,
7237 },
7238 TypeContract {
7239 name: "storage_profile_attestation",
7240 format_version: 1,
7241 kind: TypeKind::Struct,
7242 wire: true,
7243 },
7244 TypeContract {
7245 name: "storage_profile_expectation",
7246 format_version: 1,
7247 kind: TypeKind::Struct,
7248 wire: true,
7249 },
7250 TypeContract {
7251 name: "core_binding",
7252 format_version: 3,
7253 kind: TypeKind::Struct,
7254 wire: true,
7255 },
7256 TypeContract {
7257 name: "readiness_observation",
7258 format_version: 1,
7259 kind: TypeKind::Struct,
7260 wire: true,
7261 },
7262 TypeContract {
7263 name: "usage_dimension",
7264 format_version: 1,
7265 kind: TypeKind::Struct,
7266 wire: true,
7267 },
7268 TypeContract {
7269 name: "physical_usage_value",
7270 format_version: 2,
7271 kind: TypeKind::Struct,
7272 wire: true,
7273 },
7274 TypeContract {
7275 name: "core_usage_units",
7276 format_version: 2,
7277 kind: TypeKind::Struct,
7278 wire: true,
7279 },
7280 TypeContract {
7281 name: "core_usage_correction",
7282 format_version: 2,
7283 kind: TypeKind::Struct,
7284 wire: true,
7285 },
7286 TypeContract {
7287 name: "response_meta",
7288 format_version: 1,
7289 kind: TypeKind::Struct,
7290 wire: true,
7291 },
7292 TypeContract {
7293 name: "error_disposition",
7294 format_version: 1,
7295 kind: TypeKind::Enum,
7296 wire: true,
7297 },
7298 TypeContract {
7299 name: "recovery_action",
7300 format_version: 1,
7301 kind: TypeKind::Enum,
7302 wire: true,
7303 },
7304 TypeContract {
7305 name: "limit_class",
7306 format_version: 1,
7307 kind: TypeKind::Enum,
7308 wire: true,
7309 },
7310 TypeContract {
7311 name: "error_detail",
7312 format_version: 3,
7313 kind: TypeKind::TaggedUnion,
7314 wire: true,
7315 },
7316 TypeContract {
7317 name: "connection_profile",
7318 format_version: 4,
7319 kind: TypeKind::Struct,
7320 wire: false,
7321 },
7322];
7323#[derive(Clone, Copy, Debug, Eq, PartialEq)]
7324pub struct StreamContract {
7325 pub name: &'static str,
7326 pub action: Action,
7327 pub transport: &'static str,
7328 pub service: &'static str,
7329 pub method: &'static str,
7330 pub auth_metadata: &'static str,
7331 pub auth_scheme: &'static str,
7332 pub semantic_format_version: u16,
7333 pub start_type: &'static str,
7334 pub frame_type: &'static str,
7335}
7336pub const LODESTONE_API_STREAM_CONTRACTS: &[StreamContract] = &[StreamContract {
7337 name: "subscription",
7338 action: Action::SubscriptionRead,
7339 transport: "grpc_tls",
7340 service: "lodestone.api.FilterSubscription",
7341 method: "/lodestone.api.FilterSubscription/Subscribe",
7342 auth_metadata: "authorization",
7343 auth_scheme: "ApiKey",
7344 semantic_format_version: 1,
7345 start_type: "subscription_start",
7346 frame_type: "subscription_frame",
7347}];
7348#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7349#[serde(deny_unknown_fields)]
7350pub struct ErrorBody {
7351 pub code: ErrorCode,
7352 pub message: String,
7353 pub disposition: ErrorDisposition,
7354 pub recovery: RecoveryAction,
7355 pub details: ErrorDetail,
7356}
7357#[derive(Clone, Copy, Debug, Eq, PartialEq)]
7358pub enum ErrorShapeError {
7359 DetailCodeMismatch,
7360 OutcomeMismatch,
7361 RetryAfterOutOfRange,
7362}
7363impl ErrorBody {
7364 pub fn try_new(
7365 code: ErrorCode,
7366 message: String,
7367 disposition: ErrorDisposition,
7368 recovery: RecoveryAction,
7369 details: ErrorDetail,
7370 ) -> Result<Self, ErrorShapeError> {
7371 let body = Self {
7372 code,
7373 message,
7374 disposition,
7375 recovery,
7376 details,
7377 };
7378 validate_error_body(&body)?;
7379 Ok(body)
7380 }
7381 pub fn retry_safe(&self) -> bool {
7382 self.disposition == ErrorDisposition::NotSubmitted
7383 && matches!(
7384 self.recovery,
7385 RecoveryAction::Retry
7386 | RecoveryAction::RetryAfter
7387 | RecoveryAction::RefreshCredential
7388 | RecoveryAction::RestartPage
7389 | RecoveryAction::ReduceRequest
7390 | RecoveryAction::RefreshPrecondition
7391 | RecoveryAction::CorrectRange
7392 )
7393 }
7394 pub fn submitted(&self) -> bool {
7395 self.disposition != ErrorDisposition::NotSubmitted
7396 }
7397}
7398pub fn validate_error_body(body: &ErrorBody) -> Result<(), ErrorShapeError> {
7399 let detail_matches = matches!(
7400 (&body.code, &body.details),
7401 (ErrorCode::Aborted, ErrorDetail::Aborted { .. })
7402 | (ErrorCode::DeadlineExceeded, ErrorDetail::DeadlineExceeded)
7403 | (ErrorCode::InvalidRequest, ErrorDetail::InvalidRequest { .. })
7404 | (ErrorCode::UnsupportedVersion, ErrorDetail::UnsupportedVersion { .. })
7405 | (ErrorCode::Unauthenticated, ErrorDetail::Unauthenticated)
7406 | (ErrorCode::PermissionDenied, ErrorDetail::PermissionDenied { .. })
7407 | (ErrorCode::NotFound, ErrorDetail::NotFound { .. })
7408 | (ErrorCode::Conflict, ErrorDetail::Conflict { .. })
7409 | (ErrorCode::StaleCursor, ErrorDetail::StaleCursor { .. })
7410 | (
7411 ErrorCode::RestartBudgetExhausted,
7412 ErrorDetail::RestartBudgetExhausted { .. }
7413 )
7414 | (ErrorCode::LimitExceeded, ErrorDetail::LimitExceeded { .. })
7415 | (
7416 ErrorCode::CapabilityUnavailable,
7417 ErrorDetail::CapabilityUnavailable { .. }
7418 )
7419 | (ErrorCode::NotSubmitted, ErrorDetail::NotSubmitted { .. })
7420 | (
7421 ErrorCode::SubmittedIndeterminate,
7422 ErrorDetail::SubmittedIndeterminate { .. }
7423 )
7424 | (ErrorCode::ExpiredUnknown, ErrorDetail::ExpiredUnknown { .. })
7425 | (ErrorCode::SecretNotEscrowed, ErrorDetail::SecretNotEscrowed)
7426 | (ErrorCode::RetentionGap, ErrorDetail::RetentionGap { .. })
7427 | (
7428 ErrorCode::ArtifactRangeInvalid,
7429 ErrorDetail::ArtifactRangeInvalid { .. }
7430 )
7431 | (ErrorCode::ChecksumMismatch, ErrorDetail::ChecksumMismatch { .. })
7432 | (
7433 ErrorCode::TemporarilyUnavailable,
7434 ErrorDetail::TemporarilyUnavailable { .. }
7435 )
7436 | (ErrorCode::Internal, ErrorDetail::Internal)
7437 );
7438 if !detail_matches {
7439 return Err(ErrorShapeError::DetailCodeMismatch);
7440 }
7441 if !LODESTONE_API_ERROR_OUTCOMES.iter().any(|contract| {
7442 contract.code == body.code && contract.disposition == body.disposition && contract.recovery == body.recovery
7443 }) {
7444 return Err(ErrorShapeError::OutcomeMismatch);
7445 }
7446 let retry_after = match &body.details {
7447 ErrorDetail::NotSubmitted { retry_after_millis }
7448 | ErrorDetail::TemporarilyUnavailable { retry_after_millis } => retry_after_millis.as_ref(),
7449 _ => None,
7450 };
7451 if retry_after
7452 .and_then(|value| value.value.parse::<u64>().ok())
7453 .is_some_and(|value| value > 60000)
7454 {
7455 return Err(ErrorShapeError::RetryAfterOutOfRange);
7456 }
7457 Ok(())
7458}
7459#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
7460#[serde(deny_unknown_fields)]
7461pub struct RequestMeta {
7462 pub format_version: u16,
7463 pub request_id: String,
7464 pub correlation_id: Identity,
7465 pub absolute_deadline_unix_millis: U64,
7466 pub workload_class: WorkloadClass,
7467}
7468
7469#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7470#[serde(deny_unknown_fields)]
7471pub struct DiscoverRequest {}
7472
7473#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7474#[serde(deny_unknown_fields)]
7475pub struct DiscoverResult {
7476 pub principal_id: Identity,
7477 pub collection_id: Identity,
7478 pub policy_revision: U64,
7479 pub artifact_version: String,
7480 pub schema_id: String,
7481 pub schema_digest: Digest,
7482 pub streams: Vec<StreamBinding>,
7483 pub capabilities: Vec<CapabilityGrant>,
7484 pub limits: Vec<ProtocolLimit>,
7485}
7486
7487#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7488#[serde(deny_unknown_fields)]
7489pub struct ListIndexesRequest {
7490 pub page_size: u32,
7491 #[serde(default, skip_serializing_if = "Option::is_none")]
7492 pub cursor: Option<Cursor>,
7493 #[serde(default, skip_serializing_if = "Option::is_none")]
7494 pub name_prefix: Option<String>,
7495 #[serde(default, skip_serializing_if = "Option::is_none")]
7496 pub mode: Option<String>,
7497 #[serde(default, skip_serializing_if = "Option::is_none")]
7498 pub state: Option<String>,
7499 pub restart_count: u32,
7500}
7501
7502#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7503#[serde(deny_unknown_fields)]
7504pub struct ListIndexesResult {
7505 pub items: Vec<IndexSummary>,
7506 #[serde(default, skip_serializing_if = "Option::is_none")]
7507 pub next_cursor: Option<Cursor>,
7508 pub restart_count: u32,
7509}
7510
7511#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7512#[serde(deny_unknown_fields)]
7513pub struct GetIndexRequest {
7514 pub name: String,
7515 #[serde(default, skip_serializing_if = "Option::is_none")]
7516 pub expected_incarnation: Option<Identity>,
7517}
7518
7519#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7520#[serde(deny_unknown_fields)]
7521pub struct GetIndexResult {
7522 pub resource: IndexDetail,
7523}
7524
7525#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7526#[serde(deny_unknown_fields)]
7527pub struct ValidateIndexChangeRequest {
7528 pub action_kind: String,
7529 pub name: String,
7530 #[serde(default, skip_serializing_if = "Option::is_none")]
7531 pub expected_incarnation: Option<Identity>,
7532 #[serde(default, skip_serializing_if = "Option::is_none")]
7533 pub expected_revision: Option<U64>,
7534 #[serde(default, skip_serializing_if = "Option::is_none")]
7535 pub mode: Option<String>,
7536 #[serde(default, skip_serializing_if = "Option::is_none")]
7537 pub mapping: Option<Mapping>,
7538 #[serde(default, skip_serializing_if = "Option::is_none")]
7539 pub policies: Option<IndexPolicies>,
7540}
7541
7542#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7543#[serde(deny_unknown_fields)]
7544pub struct ValidateIndexChangeResult {
7545 pub change_kind: String,
7546 pub fields_added: Vec<String>,
7547 pub policy_axes_changed: Vec<String>,
7548 pub required_capabilities: Vec<String>,
7549 pub catalog_revision: U64,
7550 pub policy_revision: U64,
7551}
7552
7553#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7554#[serde(deny_unknown_fields)]
7555pub struct ApplyIndexChangeRequest {
7556 pub action_id: Digest,
7557 pub index: Resource,
7558 pub expected_revision: U64,
7559 #[serde(default, skip_serializing_if = "Option::is_none")]
7560 pub mapping: Option<Mapping>,
7561 #[serde(default, skip_serializing_if = "Option::is_none")]
7562 pub policies: Option<IndexPolicies>,
7563}
7564
7565#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7566#[serde(deny_unknown_fields)]
7567pub struct ApplyIndexChangeResult {
7568 pub receipt: IndexChangeApplyReceipt,
7569}
7570
7571#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7572#[serde(deny_unknown_fields)]
7573pub struct ApplyAdministrationMutationRequest {
7574 pub action_id: Digest,
7575 pub expected_revision: U64,
7576 pub mutation: AdministrationMutation,
7577}
7578
7579#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7580#[serde(deny_unknown_fields)]
7581pub struct ApplyAdministrationMutationResult {
7582 pub outcome: AdministrationOutcome,
7583}
7584
7585#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7586#[serde(deny_unknown_fields)]
7587pub struct ListAliasesRequest {
7588 pub page_size: u32,
7589 #[serde(default, skip_serializing_if = "Option::is_none")]
7590 pub cursor: Option<Cursor>,
7591 #[serde(default, skip_serializing_if = "Option::is_none")]
7592 pub name_prefix: Option<String>,
7593 pub restart_count: u32,
7594}
7595
7596#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7597#[serde(deny_unknown_fields)]
7598pub struct ListAliasesResult {
7599 pub items: Vec<AliasSummary>,
7600 #[serde(default, skip_serializing_if = "Option::is_none")]
7601 pub next_cursor: Option<Cursor>,
7602 pub restart_count: u32,
7603}
7604
7605#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7606#[serde(deny_unknown_fields)]
7607pub struct GetAliasRequest {
7608 pub name: String,
7609}
7610
7611#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7612#[serde(deny_unknown_fields)]
7613pub struct GetAliasResult {
7614 pub resource: AliasDetail,
7615}
7616
7617#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7618#[serde(deny_unknown_fields)]
7619pub struct ListDataStreamsRequest {
7620 pub page_size: u32,
7621 #[serde(default, skip_serializing_if = "Option::is_none")]
7622 pub cursor: Option<Cursor>,
7623 #[serde(default, skip_serializing_if = "Option::is_none")]
7624 pub name_prefix: Option<String>,
7625 pub restart_count: u32,
7626}
7627
7628#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7629#[serde(deny_unknown_fields)]
7630pub struct ListDataStreamsResult {
7631 pub items: Vec<DataStreamSummary>,
7632 #[serde(default, skip_serializing_if = "Option::is_none")]
7633 pub next_cursor: Option<Cursor>,
7634 pub restart_count: u32,
7635}
7636
7637#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7638#[serde(deny_unknown_fields)]
7639pub struct GetDataStreamRequest {
7640 pub name: String,
7641}
7642
7643#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7644#[serde(deny_unknown_fields)]
7645pub struct GetDataStreamResult {
7646 pub resource: DataStreamDetail,
7647}
7648
7649#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7650#[serde(deny_unknown_fields)]
7651pub struct ListComponentTemplatesRequest {
7652 pub page_size: u32,
7653 #[serde(default, skip_serializing_if = "Option::is_none")]
7654 pub cursor: Option<Cursor>,
7655 #[serde(default, skip_serializing_if = "Option::is_none")]
7656 pub name_prefix: Option<String>,
7657 pub restart_count: u32,
7658}
7659
7660#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7661#[serde(deny_unknown_fields)]
7662pub struct ListComponentTemplatesResult {
7663 pub items: Vec<ComponentTemplateSummary>,
7664 #[serde(default, skip_serializing_if = "Option::is_none")]
7665 pub next_cursor: Option<Cursor>,
7666 pub restart_count: u32,
7667}
7668
7669#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7670#[serde(deny_unknown_fields)]
7671pub struct GetComponentTemplateRequest {
7672 pub name: String,
7673 #[serde(default, skip_serializing_if = "Option::is_none")]
7674 pub expected_incarnation: Option<Identity>,
7675}
7676
7677#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7678#[serde(deny_unknown_fields)]
7679pub struct GetComponentTemplateResult {
7680 pub resource: ComponentTemplateDetail,
7681}
7682
7683#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7684#[serde(deny_unknown_fields)]
7685pub struct ListIndexTemplatesRequest {
7686 pub page_size: u32,
7687 #[serde(default, skip_serializing_if = "Option::is_none")]
7688 pub cursor: Option<Cursor>,
7689 #[serde(default, skip_serializing_if = "Option::is_none")]
7690 pub name_prefix: Option<String>,
7691 pub restart_count: u32,
7692}
7693
7694#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7695#[serde(deny_unknown_fields)]
7696pub struct ListIndexTemplatesResult {
7697 pub items: Vec<IndexTemplateSummary>,
7698 #[serde(default, skip_serializing_if = "Option::is_none")]
7699 pub next_cursor: Option<Cursor>,
7700 pub restart_count: u32,
7701}
7702
7703#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7704#[serde(deny_unknown_fields)]
7705pub struct GetIndexTemplateRequest {
7706 pub name: String,
7707 #[serde(default, skip_serializing_if = "Option::is_none")]
7708 pub expected_incarnation: Option<Identity>,
7709}
7710
7711#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7712#[serde(deny_unknown_fields)]
7713pub struct GetIndexTemplateResult {
7714 pub resource: IndexTemplateDetail,
7715}
7716
7717#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7718#[serde(deny_unknown_fields)]
7719pub struct ListIngestPipelinesRequest {
7720 pub page_size: u32,
7721 #[serde(default, skip_serializing_if = "Option::is_none")]
7722 pub cursor: Option<Cursor>,
7723 #[serde(default, skip_serializing_if = "Option::is_none")]
7724 pub name_prefix: Option<String>,
7725 pub restart_count: u32,
7726}
7727
7728#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7729#[serde(deny_unknown_fields)]
7730pub struct ListIngestPipelinesResult {
7731 pub items: Vec<IngestPipelineSummary>,
7732 #[serde(default, skip_serializing_if = "Option::is_none")]
7733 pub next_cursor: Option<Cursor>,
7734 pub restart_count: u32,
7735}
7736
7737#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7738#[serde(deny_unknown_fields)]
7739pub struct GetIngestPipelineRequest {
7740 pub name: String,
7741 #[serde(default, skip_serializing_if = "Option::is_none")]
7742 pub expected_incarnation: Option<Identity>,
7743}
7744
7745#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7746#[serde(deny_unknown_fields)]
7747pub struct GetIngestPipelineResult {
7748 pub resource: IngestPipelineDetail,
7749}
7750
7751#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7752#[serde(deny_unknown_fields)]
7753pub struct SimulateIngestPipelineRequest {
7754 #[serde(default, skip_serializing_if = "Option::is_none")]
7755 pub name: Option<String>,
7756 #[serde(default, skip_serializing_if = "Option::is_none")]
7757 pub expected: Option<ExpectedBinding>,
7758 #[serde(default, skip_serializing_if = "Option::is_none")]
7759 pub definition: Option<RawJson>,
7760 pub source: RawJson,
7761}
7762
7763#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7764#[serde(deny_unknown_fields)]
7765pub struct SimulateIngestPipelineResult {
7766 #[serde(default, skip_serializing_if = "Option::is_none")]
7767 pub source: Option<RawJson>,
7768 pub dropped: bool,
7769 pub changed: bool,
7770}
7771
7772#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7773#[serde(deny_unknown_fields)]
7774pub struct ReprocessByQueryRequest {
7775 pub action_id: Digest,
7776 pub index: Resource,
7777 pub query: Query,
7778 #[serde(default, skip_serializing_if = "Option::is_none")]
7779 pub pipeline: Option<IngestPipelineSelection>,
7780 pub batch_size: u32,
7781 pub max_docs: U64,
7782 pub proceed_on_conflict: bool,
7783 pub slices: u32,
7784 pub requests_per_second: u32,
7785 pub wait_for_completion: bool,
7786}
7787
7788#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7789#[serde(deny_unknown_fields)]
7790pub struct ReprocessByQueryResult {
7791 pub task_id: Identity,
7792 pub scanned: U64,
7793 pub updated: U64,
7794 pub noops: U64,
7795 pub version_conflicts: U64,
7796 pub batches: U64,
7797 pub completed: bool,
7798}
7799
7800#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7801#[serde(deny_unknown_fields)]
7802pub struct ListLifecyclePoliciesRequest {
7803 pub page_size: u32,
7804 #[serde(default, skip_serializing_if = "Option::is_none")]
7805 pub cursor: Option<Cursor>,
7806 #[serde(default, skip_serializing_if = "Option::is_none")]
7807 pub name_prefix: Option<String>,
7808 pub restart_count: u32,
7809}
7810
7811#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7812#[serde(deny_unknown_fields)]
7813pub struct ListLifecyclePoliciesResult {
7814 pub items: Vec<LifecyclePolicySummary>,
7815 #[serde(default, skip_serializing_if = "Option::is_none")]
7816 pub next_cursor: Option<Cursor>,
7817 pub restart_count: u32,
7818}
7819
7820#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7821#[serde(deny_unknown_fields)]
7822pub struct GetLifecyclePolicyRequest {
7823 pub name: String,
7824}
7825
7826#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7827#[serde(deny_unknown_fields)]
7828pub struct GetLifecyclePolicyResult {
7829 pub resource: LifecyclePolicyDetail,
7830}
7831
7832#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7833#[serde(deny_unknown_fields)]
7834pub struct PrepareCreateIndexRequest {
7835 pub name: String,
7836 pub mapping: Mapping,
7837 #[serde(default, skip_serializing_if = "Option::is_none")]
7838 pub resource_spec: Option<IndexResourceSpec>,
7839 #[serde(default, skip_serializing_if = "Option::is_none")]
7840 pub retained_event_identity: Option<bool>,
7841}
7842
7843#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7844#[serde(deny_unknown_fields)]
7845pub struct PrepareCreateIndexResult {
7846 pub locator: Locator,
7847 pub expires_at: U64,
7848 pub semantic_digest: Digest,
7849 pub resource_spec: IndexResourceSpec,
7850}
7851
7852#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7853#[serde(deny_unknown_fields)]
7854pub struct PrepareDeleteIndexRequest {
7855 pub name: String,
7856 pub expected_incarnation: Identity,
7857}
7858
7859#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7860#[serde(deny_unknown_fields)]
7861pub struct PrepareDeleteIndexResult {
7862 #[serde(default, skip_serializing_if = "Option::is_none")]
7863 pub locator: Option<Locator>,
7864 #[serde(default, skip_serializing_if = "Option::is_none")]
7865 pub expires_at: Option<U64>,
7866 #[serde(default, skip_serializing_if = "Option::is_none")]
7867 pub semantic_digest: Option<Digest>,
7868 pub impact_digest: Digest,
7869 pub blockers: Vec<String>,
7870 pub scheduled_effects: Vec<String>,
7871 #[serde(default, skip_serializing_if = "Option::is_none")]
7872 pub estimated_documents: Option<U64>,
7873 #[serde(default, skip_serializing_if = "Option::is_none")]
7874 pub estimated_logical_bytes: Option<U64>,
7875}
7876
7877#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7878#[serde(deny_unknown_fields)]
7879pub struct SubmitCatalogActionRequest {
7880 pub locator: Locator,
7881 pub semantic_digest: Digest,
7882 pub action_kind: String,
7883 pub name: String,
7884 #[serde(default, skip_serializing_if = "Option::is_none")]
7885 pub mapping: Option<Mapping>,
7886 #[serde(default, skip_serializing_if = "Option::is_none")]
7887 pub resource_spec: Option<IndexResourceSpec>,
7888 #[serde(default, skip_serializing_if = "Option::is_none")]
7889 pub expected_incarnation: Option<Identity>,
7890}
7891
7892#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7893#[serde(deny_unknown_fields)]
7894pub struct SubmitCatalogActionResult {
7895 pub locator: Locator,
7896 pub state: String,
7897 pub mutation_outcome: MutationOutcome,
7898}
7899
7900#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7901#[serde(deny_unknown_fields)]
7902pub struct ResolveCatalogActionRequest {
7903 pub locator: Locator,
7904}
7905
7906#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7907#[serde(deny_unknown_fields)]
7908pub struct ResolveCatalogActionResult {
7909 pub locator: Locator,
7910 pub state: String,
7911 #[serde(default, skip_serializing_if = "Option::is_none")]
7912 pub resource: Option<Resource>,
7913}
7914
7915#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7916#[serde(deny_unknown_fields)]
7917pub struct PrepareReplayableSourceIndexRequest {
7918 pub name: String,
7919 pub mapping: Mapping,
7920 #[serde(default, skip_serializing_if = "Option::is_none")]
7921 pub resource_spec: Option<IndexResourceSpec>,
7922 pub source: ReplayableSourceConfiguration,
7923}
7924
7925#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7926#[serde(deny_unknown_fields)]
7927pub struct PrepareReplayableSourceIndexResult {
7928 pub locator: Locator,
7929 pub expires_at: U64,
7930 pub semantic_digest: Digest,
7931 pub resource_spec: IndexResourceSpec,
7932}
7933
7934#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7935#[serde(deny_unknown_fields)]
7936pub struct SubmitReplayableSourceIndexRequest {
7937 pub locator: Locator,
7938 pub semantic_digest: Digest,
7939 pub name: String,
7940 pub mapping: Mapping,
7941 pub resource_spec: IndexResourceSpec,
7942 pub source: ReplayableSourceConfiguration,
7943}
7944
7945#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7946#[serde(deny_unknown_fields)]
7947pub struct SubmitReplayableSourceIndexResult {
7948 pub locator: Locator,
7949 pub state: String,
7950 pub mutation_outcome: MutationOutcome,
7951}
7952
7953#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7954#[serde(deny_unknown_fields)]
7955pub struct GetReplayableSourceRequest {
7956 pub index: Resource,
7957}
7958
7959#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7960#[serde(deny_unknown_fields)]
7961pub struct GetReplayableSourceResult {
7962 pub status: ReplayableSourceStatus,
7963}
7964
7965#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7966#[serde(deny_unknown_fields)]
7967pub struct ControlReplayableSourceRequest {
7968 pub index: Resource,
7969 pub expected_generation: U64,
7970 pub transition: SourceControlTransition,
7971}
7972
7973#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7974#[serde(deny_unknown_fields)]
7975pub struct ControlReplayableSourceResult {
7976 pub status: ReplayableSourceStatus,
7977 pub mutation_outcome: MutationOutcome,
7978}
7979
7980#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7981#[serde(deny_unknown_fields)]
7982pub struct CloneIndexRequest {
7983 pub source: Resource,
7984 pub destination_name: String,
7985 pub operation_id: Identity,
7986 pub source_cut_id: Identity,
7987}
7988
7989#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7990#[serde(deny_unknown_fields)]
7991pub struct CloneIndexResult {
7992 pub destination: Resource,
7993 pub source_cut_id: Identity,
7994 pub mutation_outcome: MutationOutcome,
7995}
7996
7997#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7998#[serde(deny_unknown_fields)]
7999pub struct ConfigureHistoryRequest {
8000 pub index: Resource,
8001 pub precondition: HistoryLedgerPrecondition,
8002 pub policy: HistoryRetentionPolicy,
8003}
8004
8005#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8006#[serde(deny_unknown_fields)]
8007pub struct ConfigureHistoryResult {
8008 pub status: HistoryStatus,
8009 pub mutation_outcome: MutationOutcome,
8010}
8011
8012#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8013#[serde(deny_unknown_fields)]
8014pub struct GetHistoryRequest {
8015 pub index: Resource,
8016}
8017
8018#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8019#[serde(deny_unknown_fields)]
8020pub struct GetHistoryResult {
8021 pub status: HistoryStatus,
8022}
8023
8024#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8025#[serde(deny_unknown_fields)]
8026pub struct ResolveHistoryRequest {
8027 pub index: Resource,
8028 pub selector: HistorySelector,
8029}
8030
8031#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8032#[serde(deny_unknown_fields)]
8033pub struct ResolveHistoryResult {
8034 pub resolution: HistoryResolution,
8035}
8036
8037#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8038#[serde(deny_unknown_fields)]
8039pub struct PlaceHistoryHoldRequest {
8040 pub index: Resource,
8041 pub expected_ledger_revision: U64,
8042 pub hold: HistoryHold,
8043}
8044
8045#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8046#[serde(deny_unknown_fields)]
8047pub struct PlaceHistoryHoldResult {
8048 pub status: HistoryStatus,
8049 pub mutation_outcome: MutationOutcome,
8050}
8051
8052#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8053#[serde(deny_unknown_fields)]
8054pub struct ReleaseHistoryHoldRequest {
8055 pub index: Resource,
8056 pub expected_ledger_revision: U64,
8057 pub hold_id: Identity,
8058}
8059
8060#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8061#[serde(deny_unknown_fields)]
8062pub struct ReleaseHistoryHoldResult {
8063 pub status: HistoryStatus,
8064 pub mutation_outcome: MutationOutcome,
8065}
8066
8067#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8068#[serde(deny_unknown_fields)]
8069pub struct PrepareDocumentMutationRequest {
8070 pub index: Resource,
8071 pub document_id: String,
8072 pub operation: String,
8073 #[serde(default, skip_serializing_if = "Option::is_none")]
8074 pub source: Option<RawJson>,
8075 #[serde(default, skip_serializing_if = "Option::is_none")]
8076 pub record: Option<NativeRecord>,
8077 #[serde(default, skip_serializing_if = "Option::is_none")]
8078 pub routing: Option<String>,
8079 #[serde(default, skip_serializing_if = "Option::is_none")]
8080 pub condition: Option<DocumentMutationCondition>,
8081 #[serde(default, skip_serializing_if = "Option::is_none")]
8082 pub pipeline: Option<IngestPipelineSelection>,
8083}
8084
8085#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8086#[serde(deny_unknown_fields)]
8087pub struct PrepareDocumentMutationResult {
8088 pub locator: Locator,
8089 pub semantic_digest: Digest,
8090 pub retention_max_entries: U64,
8091 pub retention_sequence_window: U64,
8092}
8093
8094#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8095#[serde(deny_unknown_fields)]
8096pub struct SubmitDocumentMutationRequest {
8097 pub locator: Locator,
8098 pub semantic_digest: Digest,
8099 pub index: Resource,
8100 pub document_id: String,
8101 pub operation: String,
8102 #[serde(default, skip_serializing_if = "Option::is_none")]
8103 pub source: Option<RawJson>,
8104 #[serde(default, skip_serializing_if = "Option::is_none")]
8105 pub record: Option<NativeRecord>,
8106 #[serde(default, skip_serializing_if = "Option::is_none")]
8107 pub routing: Option<String>,
8108 #[serde(default, skip_serializing_if = "Option::is_none")]
8109 pub condition: Option<DocumentMutationCondition>,
8110 #[serde(default, skip_serializing_if = "Option::is_none")]
8111 pub pipeline: Option<IngestPipelineSelection>,
8112}
8113
8114#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8115#[serde(deny_unknown_fields)]
8116pub struct SubmitDocumentMutationResult {
8117 pub locator: Locator,
8118 pub state: String,
8119 pub mutation_outcome: MutationOutcome,
8120 #[serde(default, skip_serializing_if = "Option::is_none")]
8121 pub achievement: Option<WriteAchievement>,
8122 #[serde(default, skip_serializing_if = "Option::is_none")]
8123 pub sequence: Option<U64>,
8124 #[serde(default, skip_serializing_if = "Option::is_none")]
8125 pub mapping_generation: Option<U64>,
8126 pub mapping_adopted: bool,
8127}
8128
8129#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8130#[serde(deny_unknown_fields)]
8131pub struct PrepareDocumentBulkRequest {
8132 pub batch_id: Digest,
8133 pub index: Resource,
8134 pub items: Vec<BulkDocumentItem>,
8135}
8136
8137#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8138#[serde(deny_unknown_fields)]
8139pub struct PrepareDocumentBulkResult {
8140 pub outcome: BulkDocumentOutcome,
8141}
8142
8143#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8144#[serde(deny_unknown_fields)]
8145pub struct SubmitDocumentBulkRequest {
8146 pub batch_id: Digest,
8147 pub index: Resource,
8148 pub items: Vec<BulkDocumentItem>,
8149 pub preparations: Vec<BulkDocumentItemOutcome>,
8150}
8151
8152#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8153#[serde(deny_unknown_fields)]
8154pub struct SubmitDocumentBulkResult {
8155 pub outcome: BulkDocumentOutcome,
8156}
8157
8158#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8159#[serde(deny_unknown_fields)]
8160pub struct ResolveDocumentBulkRequest {
8161 pub batch_id: Digest,
8162 pub index: Resource,
8163 pub items: Vec<BulkDocumentItemOutcome>,
8164}
8165
8166#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8167#[serde(deny_unknown_fields)]
8168pub struct ResolveDocumentBulkResult {
8169 pub outcome: BulkDocumentOutcome,
8170}
8171
8172#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8173#[serde(deny_unknown_fields)]
8174pub struct PrepareAppendBulkRequest {
8175 pub batch_id: Digest,
8176 pub index: Resource,
8177 pub items: Vec<RetainedAppendItem>,
8178}
8179
8180#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8181#[serde(deny_unknown_fields)]
8182pub struct PrepareAppendBulkResult {
8183 pub outcome: RetainedAppendBulkOutcome,
8184}
8185
8186#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8187#[serde(deny_unknown_fields)]
8188pub struct SubmitAppendBulkRequest {
8189 pub batch_id: Digest,
8190 pub index: Resource,
8191 pub items: Vec<RetainedAppendItem>,
8192 pub preparations: Vec<RetainedAppendItemOutcome>,
8193}
8194
8195#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8196#[serde(deny_unknown_fields)]
8197pub struct SubmitAppendBulkResult {
8198 pub outcome: RetainedAppendBulkOutcome,
8199}
8200
8201#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8202#[serde(deny_unknown_fields)]
8203pub struct ResolveAppendBulkRequest {
8204 pub batch_id: Digest,
8205 pub index: Resource,
8206 pub items: Vec<RetainedAppendItemOutcome>,
8207}
8208
8209#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8210#[serde(deny_unknown_fields)]
8211pub struct ResolveAppendBulkResult {
8212 pub outcome: RetainedAppendBulkOutcome,
8213}
8214
8215#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8216#[serde(deny_unknown_fields)]
8217pub struct ObserveAppendCommittedRequest {
8218 pub index: Resource,
8219 pub locator: Locator,
8220}
8221
8222#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8223#[serde(deny_unknown_fields)]
8224pub struct ObserveAppendCommittedResult {
8225 pub outcome: RetainedAppendObservationOutcome,
8226}
8227
8228#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8229#[serde(deny_unknown_fields)]
8230pub struct ResolveDocumentMutationRequest {
8231 pub locator: Locator,
8232}
8233
8234#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8235#[serde(deny_unknown_fields)]
8236pub struct ResolveDocumentMutationResult {
8237 pub locator: Locator,
8238 pub state: String,
8239 #[serde(default, skip_serializing_if = "Option::is_none")]
8240 pub sequence: Option<U64>,
8241 #[serde(default, skip_serializing_if = "Option::is_none")]
8242 pub mapping_generation: Option<U64>,
8243 pub mapping_adopted: bool,
8244 #[serde(default, skip_serializing_if = "Option::is_none")]
8245 pub source: Option<RawJson>,
8246}
8247
8248#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8249#[serde(deny_unknown_fields)]
8250pub struct GetDocumentRequest {
8251 pub index: Resource,
8252 pub document_id: String,
8253 #[serde(default, skip_serializing_if = "Option::is_none")]
8254 pub routing: Option<String>,
8255}
8256
8257#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8258#[serde(deny_unknown_fields)]
8259pub struct GetDocumentResult {
8260 pub found: bool,
8261 #[serde(default, skip_serializing_if = "Option::is_none")]
8262 pub source: Option<RawJson>,
8263 #[serde(default, skip_serializing_if = "Option::is_none")]
8264 pub sequence: Option<U64>,
8265 #[serde(default, skip_serializing_if = "Option::is_none")]
8266 pub primary_term: Option<U64>,
8267}
8268
8269#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8270#[serde(deny_unknown_fields)]
8271pub struct SearchRequest {
8272 #[serde(default, skip_serializing_if = "Option::is_none")]
8273 pub indexes: Option<Vec<Resource>>,
8274 #[serde(default, skip_serializing_if = "Option::is_none")]
8275 pub query: Option<Query>,
8276 #[serde(default, skip_serializing_if = "Option::is_none")]
8277 pub retrieval: Option<RetrievalPlan>,
8278 #[serde(default, skip_serializing_if = "Option::is_none")]
8279 pub aggregations: Option<Vec<Aggregation>>,
8280 pub sort: Vec<SortSpec>,
8281 #[serde(default, skip_serializing_if = "Option::is_none")]
8282 pub routing: Option<Vec<String>>,
8283 pub freshness: SearchFreshness,
8284 pub page_size: u32,
8285 #[serde(default, skip_serializing_if = "Option::is_none")]
8286 pub cursor: Option<Cursor>,
8287 #[serde(default, skip_serializing_if = "Option::is_none")]
8288 pub pit: Option<Cursor>,
8289 pub allow_partial: bool,
8290 #[serde(default, skip_serializing_if = "Option::is_none")]
8291 pub total_hits_threshold: Option<U64>,
8292 pub diagnostics: bool,
8293 #[serde(default, skip_serializing_if = "Option::is_none")]
8294 pub fragments: Option<FragmentRequest>,
8295 #[serde(default, skip_serializing_if = "Option::is_none")]
8296 pub features: Option<ResultFeatureRequest>,
8297 #[serde(default, skip_serializing_if = "Option::is_none")]
8298 pub diversification: Option<ResultDiversification>,
8299}
8300
8301#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8302#[serde(deny_unknown_fields)]
8303pub struct SearchResult {
8304 pub hits: Vec<SearchHit>,
8305 pub aggregations: Vec<AggregationResult>,
8306 #[serde(default, skip_serializing_if = "Option::is_none")]
8307 pub next_cursor: Option<Cursor>,
8308 pub timed_out: bool,
8309 pub partial: bool,
8310 pub achieved: SearchAchievement,
8311 pub shards: ShardCounts,
8312 pub total: SearchTotal,
8313 pub failures: Vec<SearchPartialFailure>,
8314 pub vector_diagnostics: Vec<VectorBranchDiagnostics>,
8315}
8316
8317#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8318#[serde(deny_unknown_fields)]
8319pub struct TraverseRelationshipsRequest {
8320 pub pit: Cursor,
8321 pub indexes: Vec<Resource>,
8322 pub seeds: Vec<EntityRef>,
8323 pub direction: RelationshipTraversalDirection,
8324 pub filter: RelationshipTraversalFilter,
8325 pub budget: RelationshipTraversalBudget,
8326 pub allow_partial: bool,
8327}
8328
8329#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8330#[serde(deny_unknown_fields)]
8331pub struct TraverseRelationshipsResult {
8332 pub relationships: Vec<TraversedRelationship>,
8333 pub visited_entities: Vec<EntityRef>,
8334 pub input_cut_digest: Digest,
8335 pub partial: bool,
8336 pub incomplete_frontier: Vec<EntityRef>,
8337 pub failures: Vec<SearchPartialFailure>,
8338}
8339
8340#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8341#[serde(deny_unknown_fields)]
8342pub struct QueryProfilesRequest {
8343 pub pit: Cursor,
8344 pub indexes: Vec<Resource>,
8345 pub operation: ProfileQueryOperation,
8346 pub start_unix_nanos: U64,
8347 pub end_unix_nanos: U64,
8348 pub sample_type: String,
8349 pub unit: String,
8350 pub filter: ProfileQueryFilter,
8351 #[serde(default, skip_serializing_if = "Option::is_none")]
8352 pub group_by: Option<ProfileGroupBy>,
8353 pub budget: ProfileQueryBudget,
8354 pub allow_partial: bool,
8355}
8356
8357#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8358#[serde(deny_unknown_fields)]
8359pub struct QueryProfilesResult {
8360 pub rows: Vec<ProfileQueryRow>,
8361 pub evaluated_batches: u32,
8362 pub evaluated_samples: u32,
8363 pub input_cut_digest: Digest,
8364 pub partial: bool,
8365 pub approximate: bool,
8366 pub failures: Vec<SearchPartialFailure>,
8367}
8368
8369#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8370#[serde(deny_unknown_fields)]
8371pub struct EvaluateTemporalEvidenceRequest {
8372 pub pit: Cursor,
8373 pub definition: HistoricalTemporalDefinition,
8374}
8375
8376#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8377#[serde(deny_unknown_fields)]
8378pub struct EvaluateTemporalEvidenceResult {
8379 pub evidence: Vec<TemporalEvidence>,
8380 pub input_cut_digest: Digest,
8381 pub pattern_digest: Digest,
8382 pub evaluated_events: u32,
8383}
8384
8385#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8386#[serde(deny_unknown_fields)]
8387pub struct CreateContinuousTemporalEvaluationRequest {
8388 pub action_id: Digest,
8389 pub definition: ContinuousTemporalDefinition,
8390}
8391
8392#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8393#[serde(deny_unknown_fields)]
8394pub struct CreateContinuousTemporalEvaluationResult {
8395 pub evaluation: ContinuousTemporalEvaluation,
8396 pub mutation_outcome: MutationOutcome,
8397}
8398
8399#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8400#[serde(deny_unknown_fields)]
8401pub struct GetContinuousTemporalEvaluationRequest {
8402 pub evaluation_id: Identity,
8403}
8404
8405#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8406#[serde(deny_unknown_fields)]
8407pub struct GetContinuousTemporalEvaluationResult {
8408 pub evaluation: ContinuousTemporalEvaluation,
8409}
8410
8411#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8412#[serde(deny_unknown_fields)]
8413pub struct PauseContinuousTemporalEvaluationRequest {
8414 pub action_id: Digest,
8415 pub evaluation_id: Identity,
8416 pub expected_revision: U64,
8417}
8418
8419#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8420#[serde(deny_unknown_fields)]
8421pub struct PauseContinuousTemporalEvaluationResult {
8422 pub evaluation: ContinuousTemporalEvaluation,
8423 pub mutation_outcome: MutationOutcome,
8424}
8425
8426#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8427#[serde(deny_unknown_fields)]
8428pub struct ResumeContinuousTemporalEvaluationRequest {
8429 pub action_id: Digest,
8430 pub evaluation_id: Identity,
8431 pub expected_revision: U64,
8432}
8433
8434#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8435#[serde(deny_unknown_fields)]
8436pub struct ResumeContinuousTemporalEvaluationResult {
8437 pub evaluation: ContinuousTemporalEvaluation,
8438 pub mutation_outcome: MutationOutcome,
8439}
8440
8441#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8442#[serde(deny_unknown_fields)]
8443pub struct ReplaceContinuousTemporalEvaluationRequest {
8444 pub action_id: Digest,
8445 pub expected_revision: U64,
8446 pub definition: ContinuousTemporalDefinition,
8447}
8448
8449#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8450#[serde(deny_unknown_fields)]
8451pub struct ReplaceContinuousTemporalEvaluationResult {
8452 pub evaluation: ContinuousTemporalEvaluation,
8453 pub mutation_outcome: MutationOutcome,
8454}
8455
8456#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8457#[serde(deny_unknown_fields)]
8458pub struct RetireContinuousTemporalEvaluationRequest {
8459 pub action_id: Digest,
8460 pub evaluation_id: Identity,
8461 pub expected_revision: U64,
8462}
8463
8464#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8465#[serde(deny_unknown_fields)]
8466pub struct RetireContinuousTemporalEvaluationResult {
8467 #[serde(default, skip_serializing_if = "Option::is_none")]
8468 pub evaluation: Option<ContinuousTemporalEvaluation>,
8469 pub mutation_outcome: MutationOutcome,
8470}
8471
8472#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8473#[serde(deny_unknown_fields)]
8474pub struct ReadContinuousTemporalEvidenceRequest {
8475 pub evaluation_id: Identity,
8476 pub expected_revision: U64,
8477 pub minimum_event_time_unix_nanos: U64,
8478 pub page_size: u32,
8479 #[serde(default, skip_serializing_if = "Option::is_none")]
8480 pub cursor: Option<Cursor>,
8481}
8482
8483#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8484#[serde(deny_unknown_fields)]
8485pub struct ReadContinuousTemporalEvidenceResult {
8486 pub evidence: Vec<TemporalEvidence>,
8487 #[serde(default, skip_serializing_if = "Option::is_none")]
8488 pub next_cursor: Option<Cursor>,
8489 pub retained_floor_unix_nanos: U64,
8490 pub evaluation_revision: U64,
8491}
8492
8493#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8494#[serde(deny_unknown_fields)]
8495pub struct ValidateSearchRequest {
8496 pub indexes: Vec<Resource>,
8497 #[serde(default, skip_serializing_if = "Option::is_none")]
8498 pub query: Option<Query>,
8499 #[serde(default, skip_serializing_if = "Option::is_none")]
8500 pub retrieval: Option<RetrievalPlan>,
8501 #[serde(default, skip_serializing_if = "Option::is_none")]
8502 pub aggregations: Option<Vec<Aggregation>>,
8503 pub sort: Vec<SortSpec>,
8504 #[serde(default, skip_serializing_if = "Option::is_none")]
8505 pub routing: Option<Vec<String>>,
8506 pub freshness: SearchFreshness,
8507 pub page_size: u32,
8508 pub allow_partial: bool,
8509 #[serde(default, skip_serializing_if = "Option::is_none")]
8510 pub total_hits_threshold: Option<U64>,
8511 #[serde(default, skip_serializing_if = "Option::is_none")]
8512 pub fragments: Option<FragmentRequest>,
8513 #[serde(default, skip_serializing_if = "Option::is_none")]
8514 pub features: Option<ResultFeatureRequest>,
8515 #[serde(default, skip_serializing_if = "Option::is_none")]
8516 pub diversification: Option<ResultDiversification>,
8517}
8518
8519#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8520#[serde(deny_unknown_fields)]
8521pub struct ValidateSearchResult {
8522 pub catalog_revision: U64,
8523 pub resolved_indexes: Vec<Resource>,
8524 pub authorized: bool,
8525 pub capabilities: Vec<String>,
8526 pub shape_digest: Digest,
8527 pub warnings: Vec<String>,
8528 pub refusals: Vec<String>,
8529 pub limits: Vec<SearchValidationLimit>,
8530 pub estimates: SearchValidationEstimates,
8531}
8532
8533#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8534#[serde(deny_unknown_fields)]
8535pub struct OpenPitRequest {
8536 pub indexes: Vec<Resource>,
8537 pub keep_alive_millis: U64,
8538}
8539
8540#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8541#[serde(deny_unknown_fields)]
8542pub struct OpenPitResult {
8543 pub pit: Cursor,
8544 pub expires_at: U64,
8545 pub shard_count: u32,
8546}
8547
8548#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8549#[serde(deny_unknown_fields)]
8550pub struct RenewPitRequest {
8551 pub pit: Cursor,
8552 pub keep_alive_millis: U64,
8553}
8554
8555#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8556#[serde(deny_unknown_fields)]
8557pub struct RenewPitResult {
8558 pub pit: Cursor,
8559 pub expires_at: U64,
8560 pub shard_count: u32,
8561}
8562
8563#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8564#[serde(deny_unknown_fields)]
8565pub struct ClosePitRequest {
8566 pub pit: Cursor,
8567}
8568
8569#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8570#[serde(deny_unknown_fields)]
8571pub struct ClosePitResult {
8572 pub removed: bool,
8573}
8574
8575#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8576#[serde(deny_unknown_fields)]
8577pub struct ListOperationsRequest {
8578 pub page_size: u32,
8579 #[serde(default, skip_serializing_if = "Option::is_none")]
8580 pub cursor: Option<Cursor>,
8581}
8582
8583#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8584#[serde(deny_unknown_fields)]
8585pub struct ListOperationsResult {
8586 pub items: Vec<Operation>,
8587 #[serde(default, skip_serializing_if = "Option::is_none")]
8588 pub next_cursor: Option<Cursor>,
8589}
8590
8591#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8592#[serde(deny_unknown_fields)]
8593pub struct GetOperationRequest {
8594 pub locator: Locator,
8595}
8596
8597#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8598#[serde(deny_unknown_fields)]
8599pub struct GetOperationResult {
8600 pub operation: Operation,
8601}
8602
8603#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8604#[serde(deny_unknown_fields)]
8605pub struct WaitOperationRequest {
8606 pub locator: Locator,
8607 pub after_authority_revision: U64,
8608 pub maximum_attempts: u32,
8609 pub interval_millis: U64,
8610}
8611
8612#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8613#[serde(deny_unknown_fields)]
8614pub struct WaitOperationResult {
8615 pub operation: Operation,
8616 pub attempts: u32,
8617}
8618
8619#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8620#[serde(deny_unknown_fields)]
8621pub struct CancelOperationRequest {
8622 pub locator: Locator,
8623 pub expected_authority_revision: U64,
8624 pub cancel_action: Identity,
8625}
8626
8627#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8628#[serde(deny_unknown_fields)]
8629pub struct CancelOperationResult {
8630 pub locator: Locator,
8631 pub cancel_generation: U64,
8632 pub mutation_outcome: MutationOutcome,
8633}
8634
8635#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8636#[serde(deny_unknown_fields)]
8637pub struct ListAuditEventsRequest {
8638 pub start_time: U64,
8639 pub end_time: U64,
8640 pub actions: Vec<String>,
8641 pub page_size: u32,
8642 #[serde(default, skip_serializing_if = "Option::is_none")]
8643 pub cursor: Option<Cursor>,
8644}
8645
8646#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8647#[serde(deny_unknown_fields)]
8648pub struct ListAuditEventsResult {
8649 pub stream: AuditStreamState,
8650 pub events: Vec<AuditEvent>,
8651 #[serde(default, skip_serializing_if = "Option::is_none")]
8652 pub next_cursor: Option<Cursor>,
8653 pub gaps: Vec<AuditGap>,
8654 pub object_reads: u32,
8655}
8656
8657#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8658#[serde(deny_unknown_fields)]
8659pub struct ExportAuditEventsRequest {
8660 pub start_time: U64,
8661 pub end_time: U64,
8662 pub actions: Vec<String>,
8663 pub page_size: u32,
8664 #[serde(default, skip_serializing_if = "Option::is_none")]
8665 pub cursor: Option<Cursor>,
8666}
8667
8668#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8669#[serde(deny_unknown_fields)]
8670pub struct ExportAuditEventsResult {
8671 pub stream: AuditStreamState,
8672 pub events: Vec<AuditEvent>,
8673 #[serde(default, skip_serializing_if = "Option::is_none")]
8674 pub next_cursor: Option<Cursor>,
8675 pub gaps: Vec<AuditGap>,
8676 pub object_reads: u32,
8677}
8678
8679#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8680#[serde(deny_unknown_fields)]
8681pub struct ReserveServiceCredentialRequest {
8682 pub reservation_action_id: Digest,
8683 pub activation_action_id: Digest,
8684 pub role_grants: Vec<ServiceCredentialGrant>,
8685 pub credential_expires_at: U64,
8686 pub reservation_expires_at: U64,
8687}
8688
8689#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8690#[serde(deny_unknown_fields)]
8691pub struct ReserveServiceCredentialResult {
8692 pub reservation: ServiceCredentialReservation,
8693}
8694
8695#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8696#[serde(deny_unknown_fields)]
8697pub struct ReserveServiceCredentialRotationRequest {
8698 pub reservation_action_id: Digest,
8699 pub activation_action_id: Digest,
8700 pub current_api_key_id: Identity,
8701 pub expected_generation: U64,
8702 pub credential_expires_at: U64,
8703 pub overlap_until: U64,
8704 pub reservation_expires_at: U64,
8705}
8706
8707#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8708#[serde(deny_unknown_fields)]
8709pub struct ReserveServiceCredentialRotationResult {
8710 pub reservation: ServiceCredentialReservation,
8711}
8712
8713#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8714#[serde(deny_unknown_fields)]
8715pub struct ActivateServiceCredentialRequest {
8716 pub reservation: ServiceCredentialReservation,
8717 pub verifier: Digest,
8718}
8719
8720#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8721#[serde(deny_unknown_fields)]
8722pub struct ActivateServiceCredentialResult {
8723 pub locator: Locator,
8724 pub outcome: SecurityActionOutcome,
8725 pub secret_escrowed: bool,
8726}
8727
8728#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8729#[serde(deny_unknown_fields)]
8730pub struct ResolveServiceCredentialReservationRequest {
8731 pub reservation_action_id: Digest,
8732}
8733
8734#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8735#[serde(deny_unknown_fields)]
8736pub struct ResolveServiceCredentialReservationResult {
8737 pub state: String,
8738 #[serde(default, skip_serializing_if = "Option::is_none")]
8739 pub reservation: Option<ServiceCredentialReservation>,
8740 #[serde(default, skip_serializing_if = "Option::is_none")]
8741 pub outcome: Option<SecurityActionOutcome>,
8742}
8743
8744#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8745#[serde(deny_unknown_fields)]
8746pub struct PrepareRevokeServiceCredentialRequest {
8747 pub api_key_id: Identity,
8748 pub expected_generation: U64,
8749}
8750
8751#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8752#[serde(deny_unknown_fields)]
8753pub struct PrepareRevokeServiceCredentialResult {
8754 pub locator: Locator,
8755 pub semantic_digest: Digest,
8756 pub expires_at: U64,
8757}
8758
8759#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8760#[serde(deny_unknown_fields)]
8761pub struct RevokeServiceCredentialRequest {
8762 pub locator: Locator,
8763 pub api_key_id: Identity,
8764 pub expected_generation: U64,
8765}
8766
8767#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8768#[serde(deny_unknown_fields)]
8769pub struct RevokeServiceCredentialResult {
8770 pub locator: Locator,
8771 pub principal_id: Identity,
8772 pub api_key_id: Identity,
8773 pub state: String,
8774}
8775
8776#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8777#[serde(deny_unknown_fields)]
8778pub struct ResolveSecurityActionRequest {
8779 pub locator: Locator,
8780}
8781
8782#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8783#[serde(deny_unknown_fields)]
8784pub struct ResolveSecurityActionResult {
8785 pub locator: Locator,
8786 pub state: String,
8787 #[serde(default, skip_serializing_if = "Option::is_none")]
8788 pub result: Option<SecurityActionOutcome>,
8789 pub secret_escrowed: bool,
8790}
8791
8792#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8793#[serde(deny_unknown_fields)]
8794pub struct GetSecurityRoleRequest {
8795 pub role_name: String,
8796}
8797
8798#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8799#[serde(deny_unknown_fields)]
8800pub struct GetSecurityRoleResult {
8801 pub role: SecurityRole,
8802}
8803
8804#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8805#[serde(deny_unknown_fields)]
8806pub struct PrepareRoleAppendAccessChangeRequest {
8807 pub role_name: String,
8808 pub expected_role_version: U64,
8809 pub changes: Vec<RoleAppendScopeChange>,
8810}
8811
8812#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8813#[serde(deny_unknown_fields)]
8814pub struct PrepareRoleAppendAccessChangeResult {
8815 pub preparation: RoleAppendAccessPreparation,
8816}
8817
8818#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8819#[serde(deny_unknown_fields)]
8820pub struct SubmitRoleAppendAccessChangeRequest {
8821 pub locator: Locator,
8822 pub semantic_digest: Digest,
8823 pub role_name: String,
8824 pub expected_role_version: U64,
8825 pub changes: Vec<RoleAppendScopeChange>,
8826}
8827
8828#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8829#[serde(deny_unknown_fields)]
8830pub struct SubmitRoleAppendAccessChangeResult {
8831 pub locator: Locator,
8832 pub state: String,
8833 pub target_policy_revision: U64,
8834 pub role: SecurityRole,
8835}
8836
8837#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8838#[serde(deny_unknown_fields)]
8839pub struct ListServiceCredentialsRequest {
8840 pub page_size: u32,
8841 #[serde(default, skip_serializing_if = "Option::is_none")]
8842 pub cursor: Option<Cursor>,
8843}
8844
8845#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8846#[serde(deny_unknown_fields)]
8847pub struct ListServiceCredentialsResult {
8848 pub items: Vec<ServiceCredentialSummary>,
8849 #[serde(default, skip_serializing_if = "Option::is_none")]
8850 pub next_cursor: Option<Cursor>,
8851}
8852
8853#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8854#[serde(deny_unknown_fields)]
8855pub struct GetRuntimeStatusRequest {}
8856
8857#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8858#[serde(deny_unknown_fields)]
8859pub struct GetRuntimeStatusResult {
8860 pub ready: bool,
8861 pub recovery_era: Identity,
8862 pub catalog_revision: U64,
8863 pub policy_revision: U64,
8864 pub redacted: RuntimeStatusDetail,
8865}
8866
8867#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8868#[serde(deny_unknown_fields)]
8869pub struct GetResultCacheStatusRequest {}
8870
8871#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8872#[serde(deny_unknown_fields)]
8873pub struct GetResultCacheStatusResult {
8874 pub status: ResultCacheStatus,
8875}
8876
8877#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8878#[serde(deny_unknown_fields)]
8879pub struct GetFieldPromotionStatusRequest {
8880 pub index: Resource,
8881}
8882
8883#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8884#[serde(deny_unknown_fields)]
8885pub struct GetFieldPromotionStatusResult {
8886 pub status: FieldPromotionStatus,
8887}
8888
8889#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8890#[serde(deny_unknown_fields)]
8891pub struct GetOverloadStatusRequest {
8892 pub index: Resource,
8893}
8894
8895#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8896#[serde(deny_unknown_fields)]
8897pub struct GetOverloadStatusResult {
8898 pub runtime_observed: bool,
8899 pub shards: Vec<OverloadShardStatus>,
8900}
8901
8902#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8903#[serde(deny_unknown_fields)]
8904pub struct ConfigureExternalKeyRequest {
8905 pub index: Resource,
8906 pub expected_authority_revision: U64,
8907 pub binding: ExternalKeyBinding,
8908}
8909
8910#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8911#[serde(deny_unknown_fields)]
8912pub struct ConfigureExternalKeyResult {
8913 pub status: LifecycleStatus,
8914 pub mutation_outcome: MutationOutcome,
8915}
8916
8917#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8918#[serde(deny_unknown_fields)]
8919pub struct RotateExternalKeyBindingRequest {
8920 pub index: Resource,
8921 pub expected_authority_revision: U64,
8922 pub predecessor_binding_id: Identity,
8923 pub binding: ExternalKeyBinding,
8924}
8925
8926#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8927#[serde(deny_unknown_fields)]
8928pub struct RotateExternalKeyBindingResult {
8929 pub status: LifecycleStatus,
8930 pub mutation_outcome: MutationOutcome,
8931}
8932
8933#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8934#[serde(deny_unknown_fields)]
8935pub struct ConfigureAggregateThenDeleteRequest {
8936 pub index: Resource,
8937 pub expected_authority_revision: U64,
8938 pub policy: AggregateThenDeletePolicy,
8939}
8940
8941#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8942#[serde(deny_unknown_fields)]
8943pub struct ConfigureAggregateThenDeleteResult {
8944 pub status: LifecycleStatus,
8945 pub mutation_outcome: MutationOutcome,
8946}
8947
8948#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8949#[serde(deny_unknown_fields)]
8950pub struct GetLifecycleStatusRequest {
8951 pub index: Resource,
8952}
8953
8954#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8955#[serde(deny_unknown_fields)]
8956pub struct GetLifecycleStatusResult {
8957 pub status: LifecycleStatus,
8958}
8959
8960#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8961#[serde(deny_unknown_fields)]
8962pub struct GetQuotaRequest {}
8963
8964#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8965#[serde(deny_unknown_fields)]
8966pub struct GetQuotaResult {
8967 pub revision: U64,
8968 pub limits: Vec<QuotaLimit>,
8969 pub usage: Vec<QuotaConsumption>,
8970}
8971
8972#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8973#[serde(deny_unknown_fields)]
8974pub struct UpdateQuotaRequest {
8975 pub expected_revision: U64,
8976 pub limits: Vec<QuotaLimit>,
8977}
8978
8979#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8980#[serde(deny_unknown_fields)]
8981pub struct UpdateQuotaResult {
8982 pub update: QuotaUpdate,
8983}
8984
8985#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8986#[serde(deny_unknown_fields)]
8987pub struct GetBindingRequest {}
8988
8989#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8990#[serde(deny_unknown_fields)]
8991pub struct GetBindingResult {
8992 pub binding: CoreBinding,
8993 pub derived: bool,
8994 pub revision: U64,
8995}
8996
8997#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8998#[serde(deny_unknown_fields)]
8999pub struct GetAdmissionStatusRequest {}
9000
9001#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9002#[serde(deny_unknown_fields)]
9003pub struct GetAdmissionStatusResult {
9004 pub state: String,
9005 pub revision: U64,
9006 pub converged: bool,
9007}
9008
9009#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9010#[serde(deny_unknown_fields)]
9011pub struct SetAdmissionRequest {
9012 pub expected_revision: U64,
9013 pub state: String,
9014}
9015
9016#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9017#[serde(deny_unknown_fields)]
9018pub struct SetAdmissionResult {
9019 pub state: String,
9020 pub revision: U64,
9021 pub converged: bool,
9022}
9023
9024#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9025#[serde(deny_unknown_fields)]
9026pub struct GetQuiesceStatusRequest {}
9027
9028#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9029#[serde(deny_unknown_fields)]
9030pub struct GetQuiesceStatusResult {
9031 pub ready: bool,
9032 pub blockers: Vec<String>,
9033 pub observations: Vec<ReadinessObservation>,
9034 pub recovery_era: Identity,
9035 pub observed_at: U64,
9036 pub expires_at: U64,
9037}
9038
9039#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9040#[serde(deny_unknown_fields)]
9041pub struct GetDecommissionReadinessRequest {}
9042
9043#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9044#[serde(deny_unknown_fields)]
9045pub struct GetDecommissionReadinessResult {
9046 pub ready: bool,
9047 pub blockers: Vec<String>,
9048 pub observations: Vec<ReadinessObservation>,
9049 pub recovery_era: Identity,
9050 pub observed_at: U64,
9051 pub expires_at: U64,
9052}
9053
9054#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9055#[serde(deny_unknown_fields)]
9056pub struct GetUpgradeReadinessRequest {}
9057
9058#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9059#[serde(deny_unknown_fields)]
9060pub struct GetUpgradeReadinessResult {
9061 pub ready: bool,
9062 pub blockers: Vec<String>,
9063 pub observations: Vec<ReadinessObservation>,
9064 pub recovery_era: Identity,
9065 pub observed_at: U64,
9066 pub expires_at: U64,
9067}
9068
9069#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9070#[serde(deny_unknown_fields)]
9071pub struct GetMaintenanceStatusRequest {
9072 pub page_size: u32,
9073 #[serde(default, skip_serializing_if = "Option::is_none")]
9074 pub cursor: Option<Cursor>,
9075 #[serde(default, skip_serializing_if = "Option::is_none")]
9076 pub index: Option<Resource>,
9077}
9078
9079#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9080#[serde(deny_unknown_fields)]
9081pub struct GetMaintenanceStatusResult {
9082 pub aggregate: MaintenanceStatusAggregate,
9083 pub items: Vec<MaintenanceTaskStatus>,
9084 #[serde(default, skip_serializing_if = "Option::is_none")]
9085 pub next_cursor: Option<Cursor>,
9086}
9087
9088#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9089#[serde(deny_unknown_fields)]
9090pub struct WarmVectorIndexRequest {
9091 pub index: Resource,
9092 #[serde(default, skip_serializing_if = "Option::is_none")]
9093 pub expected_root_digest: Option<Digest>,
9094 pub components: Vec<VectorWarmComponent>,
9095 pub maximum_requests: u32,
9096 pub maximum_bytes: U64,
9097 pub maximum_achievements: u32,
9098 pub expires_at: U64,
9099}
9100
9101#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9102#[serde(deny_unknown_fields)]
9103pub struct WarmVectorIndexResult {
9104 pub result: VectorWarmResult,
9105}
9106
9107#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9108#[serde(deny_unknown_fields)]
9109pub struct EvaluateVectorRecallRequest {
9110 pub action_id: Digest,
9111 pub index: Resource,
9112 pub field: String,
9113 pub mapping_generation: U64,
9114 pub snapshot: VectorEvaluationSnapshot,
9115 pub query_set: VectorEvaluationQuerySet,
9116 #[serde(default, skip_serializing_if = "Option::is_none")]
9117 pub filter: Option<Query>,
9118 pub metric: VectorMetric,
9119 pub k: u32,
9120 pub candidate_policy: VectorCandidatePolicy,
9121 pub budget: VectorEvaluationBudget,
9122 pub maximum_bytes: U64,
9123}
9124
9125#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9126#[serde(deny_unknown_fields)]
9127pub struct EvaluateVectorRecallResult {
9128 pub operation: Operation,
9129}
9130
9131#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9132#[serde(deny_unknown_fields)]
9133pub struct CalibrateVectorStrategyRequest {
9134 pub action_id: Digest,
9135 pub index: Resource,
9136 pub field: String,
9137 pub mapping_generation: U64,
9138 pub snapshot: VectorEvaluationSnapshot,
9139 pub query_set: VectorEvaluationQuerySet,
9140 #[serde(default, skip_serializing_if = "Option::is_none")]
9141 pub filter: Option<Query>,
9142 pub metric: VectorMetric,
9143 pub k: u32,
9144 pub objective: VectorCalibrationObjective,
9145 pub minimum_recall_basis_points: u32,
9146 pub budget: VectorEvaluationBudget,
9147 pub maximum_bytes: U64,
9148}
9149
9150#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9151#[serde(deny_unknown_fields)]
9152pub struct CalibrateVectorStrategyResult {
9153 pub operation: Operation,
9154}
9155
9156#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9157#[serde(deny_unknown_fields)]
9158pub struct GetVectorDiagnosticRequest {
9159 pub locator: Locator,
9160}
9161
9162#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9163#[serde(deny_unknown_fields)]
9164pub struct GetVectorDiagnosticResult {
9165 pub operation: Operation,
9166 pub artifacts: Vec<Artifact>,
9167 #[serde(default, skip_serializing_if = "Option::is_none")]
9168 pub result: Option<VectorDiagnosticResult>,
9169}
9170
9171#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9172#[serde(deny_unknown_fields)]
9173pub struct CreateDiagnosticRequest {
9174 pub scope: String,
9175 pub maximum_bytes: U64,
9176}
9177
9178#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9179#[serde(deny_unknown_fields)]
9180pub struct CreateDiagnosticResult {
9181 pub operation: Operation,
9182}
9183
9184#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9185#[serde(deny_unknown_fields)]
9186pub struct GetDiagnosticRequest {
9187 pub locator: Locator,
9188}
9189
9190#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9191#[serde(deny_unknown_fields)]
9192pub struct GetDiagnosticResult {
9193 pub operation: Operation,
9194 pub artifacts: Vec<Artifact>,
9195}
9196
9197#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9198#[serde(deny_unknown_fields)]
9199pub struct PrepareCollectionExportRequest {
9200 pub action_id: Digest,
9201 pub storage: PortabilityStorageCapability,
9202}
9203
9204#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9205#[serde(deny_unknown_fields)]
9206pub struct PrepareCollectionExportResult {
9207 pub semantic_digest: Digest,
9208 pub maximum_bytes: U64,
9209}
9210
9211#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9212#[serde(deny_unknown_fields)]
9213pub struct StartCollectionExportRequest {
9214 pub action_id: Digest,
9215 pub semantic_digest: Digest,
9216 pub storage: PortabilityStorageCapability,
9217}
9218
9219#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9220#[serde(deny_unknown_fields)]
9221pub struct StartCollectionExportResult {
9222 pub operation: Operation,
9223}
9224
9225#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9226#[serde(deny_unknown_fields)]
9227pub struct ResolveCollectionExportRequest {
9228 pub action_id: Digest,
9229 pub semantic_digest: Digest,
9230 pub storage: PortabilityStorageCapability,
9231}
9232
9233#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9234#[serde(deny_unknown_fields)]
9235pub struct ResolveCollectionExportResult {
9236 #[serde(default, skip_serializing_if = "Option::is_none")]
9237 pub operation: Option<Operation>,
9238 #[serde(default, skip_serializing_if = "Option::is_none")]
9239 pub artifact: Option<CollectionExportArtifact>,
9240 pub expired_unknown: bool,
9241}
9242
9243#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9244#[serde(deny_unknown_fields)]
9245pub struct VerifyCollectionExportRequest {
9246 pub artifact: CollectionExportArtifact,
9247 pub storage: PortabilityStorageCapability,
9248}
9249
9250#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9251#[serde(deny_unknown_fields)]
9252pub struct VerifyCollectionExportResult {
9253 pub verified: bool,
9254 pub source_collection_id: Identity,
9255 pub source_catalog_revision: U64,
9256 pub index_count: u32,
9257 pub document_count: U64,
9258}
9259
9260#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9261#[serde(deny_unknown_fields)]
9262pub struct PrepareCollectionRestoreRequest {
9263 pub action_id: Digest,
9264 pub artifact: CollectionExportArtifact,
9265 pub storage: PortabilityStorageCapability,
9266}
9267
9268#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9269#[serde(deny_unknown_fields)]
9270pub struct PrepareCollectionRestoreResult {
9271 pub semantic_digest: Digest,
9272 pub source_collection_id: Identity,
9273 pub maximum_bytes: U64,
9274}
9275
9276#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9277#[serde(deny_unknown_fields)]
9278pub struct StartCollectionRestoreRequest {
9279 pub action_id: Digest,
9280 pub semantic_digest: Digest,
9281 pub artifact: CollectionExportArtifact,
9282 pub storage: PortabilityStorageCapability,
9283}
9284
9285#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9286#[serde(deny_unknown_fields)]
9287pub struct StartCollectionRestoreResult {
9288 pub operation: Operation,
9289}
9290
9291#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9292#[serde(deny_unknown_fields)]
9293pub struct ResolveCollectionRestoreRequest {
9294 pub action_id: Digest,
9295 pub semantic_digest: Digest,
9296 pub artifact: CollectionExportArtifact,
9297 pub storage: PortabilityStorageCapability,
9298}
9299
9300#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9301#[serde(deny_unknown_fields)]
9302pub struct ResolveCollectionRestoreResult {
9303 #[serde(default, skip_serializing_if = "Option::is_none")]
9304 pub operation: Option<Operation>,
9305 pub expired_unknown: bool,
9306}
9307
9308#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9309#[serde(deny_unknown_fields)]
9310pub struct PrepareIndexExportRequest {
9311 pub action_id: Digest,
9312 pub index: Resource,
9313 pub storage: PortabilityStorageCapability,
9314 pub maximum_records: u32,
9315 pub maximum_pages: u32,
9316 pub maximum_page_bytes: U64,
9317}
9318
9319#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9320#[serde(deny_unknown_fields)]
9321pub struct PrepareIndexExportResult {
9322 pub semantic_digest: Digest,
9323 pub maximum_bytes: U64,
9324}
9325
9326#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9327#[serde(deny_unknown_fields)]
9328pub struct StartIndexExportRequest {
9329 pub action_id: Digest,
9330 pub semantic_digest: Digest,
9331 pub index: Resource,
9332 pub storage: PortabilityStorageCapability,
9333 pub maximum_records: u32,
9334 pub maximum_pages: u32,
9335 pub maximum_page_bytes: U64,
9336}
9337
9338#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9339#[serde(deny_unknown_fields)]
9340pub struct StartIndexExportResult {
9341 pub operation: Operation,
9342}
9343
9344#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9345#[serde(deny_unknown_fields)]
9346pub struct ResolveIndexExportRequest {
9347 pub action_id: Digest,
9348 pub semantic_digest: Digest,
9349 pub index: Resource,
9350 pub storage: PortabilityStorageCapability,
9351 pub maximum_records: u32,
9352 pub maximum_pages: u32,
9353 pub maximum_page_bytes: U64,
9354}
9355
9356#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9357#[serde(deny_unknown_fields)]
9358pub struct ResolveIndexExportResult {
9359 #[serde(default, skip_serializing_if = "Option::is_none")]
9360 pub operation: Option<Operation>,
9361 #[serde(default, skip_serializing_if = "Option::is_none")]
9362 pub artifact: Option<IndexTransferArtifact>,
9363 pub expired_unknown: bool,
9364}
9365
9366#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9367#[serde(deny_unknown_fields)]
9368pub struct VerifyIndexExportRequest {
9369 pub artifact: IndexTransferArtifact,
9370 pub storage: PortabilityStorageCapability,
9371}
9372
9373#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9374#[serde(deny_unknown_fields)]
9375pub struct VerifyIndexExportResult {
9376 pub verified: bool,
9377 pub source_cluster_storage_id: Identity,
9378 pub source_collection_id: Identity,
9379 pub source_index: Resource,
9380 pub source_catalog_revision: U64,
9381 pub source_cut_digest: Digest,
9382 pub page_count: u32,
9383 pub record_count: u32,
9384}
9385
9386#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9387#[serde(deny_unknown_fields)]
9388pub struct PrepareIndexImportRequest {
9389 pub action_id: Digest,
9390 pub artifact: IndexTransferArtifact,
9391 pub storage: PortabilityStorageCapability,
9392 pub destination_name: String,
9393 pub expected_name_absent: bool,
9394 pub destination_policies: IndexPolicies,
9395 pub destination_resource_spec: IndexResourceSpec,
9396}
9397
9398#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9399#[serde(deny_unknown_fields)]
9400pub struct PrepareIndexImportResult {
9401 pub semantic_digest: Digest,
9402 pub source_cluster_storage_id: Identity,
9403 pub source_collection_id: Identity,
9404 pub source_index: Resource,
9405 pub maximum_bytes: U64,
9406}
9407
9408#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9409#[serde(deny_unknown_fields)]
9410pub struct StartIndexImportRequest {
9411 pub action_id: Digest,
9412 pub semantic_digest: Digest,
9413 pub artifact: IndexTransferArtifact,
9414 pub storage: PortabilityStorageCapability,
9415 pub destination_name: String,
9416 pub expected_name_absent: bool,
9417 pub destination_policies: IndexPolicies,
9418 pub destination_resource_spec: IndexResourceSpec,
9419}
9420
9421#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9422#[serde(deny_unknown_fields)]
9423pub struct StartIndexImportResult {
9424 pub operation: Operation,
9425}
9426
9427#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9428#[serde(deny_unknown_fields)]
9429pub struct ResolveIndexImportRequest {
9430 pub action_id: Digest,
9431 pub semantic_digest: Digest,
9432 pub artifact: IndexTransferArtifact,
9433 pub storage: PortabilityStorageCapability,
9434 pub destination_name: String,
9435 pub expected_name_absent: bool,
9436 pub destination_policies: IndexPolicies,
9437 pub destination_resource_spec: IndexResourceSpec,
9438}
9439
9440#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9441#[serde(deny_unknown_fields)]
9442pub struct ResolveIndexImportResult {
9443 #[serde(default, skip_serializing_if = "Option::is_none")]
9444 pub operation: Option<Operation>,
9445 #[serde(default, skip_serializing_if = "Option::is_none")]
9446 pub destination: Option<Resource>,
9447 pub expired_unknown: bool,
9448}
9449
9450#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9451#[serde(deny_unknown_fields)]
9452pub struct ReadArtifactChunkRequest {
9453 pub artifact: Artifact,
9454 pub offset: U64,
9455 pub length: u32,
9456}
9457
9458#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9459#[serde(deny_unknown_fields)]
9460pub struct ReadArtifactChunkResult {
9461 pub offset: U64,
9462 pub bytes_base64: String,
9463 pub chunk_sha256: String,
9464 pub artifact_sha256: String,
9465 pub complete: bool,
9466}
9467
9468#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9469#[serde(deny_unknown_fields)]
9470pub struct ExportUsageRequest {
9471 pub window_start: U64,
9472 pub window_end: U64,
9473 pub page_size: u32,
9474 #[serde(default, skip_serializing_if = "Option::is_none")]
9475 pub cursor: Option<Cursor>,
9476}
9477
9478#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9479#[serde(deny_unknown_fields)]
9480pub struct ExportUsageResult {
9481 pub units: Vec<CoreUsageUnits>,
9482 pub corrections: Vec<CoreUsageCorrection>,
9483 #[serde(default, skip_serializing_if = "Option::is_none")]
9484 pub next_cursor: Option<Cursor>,
9485 pub cumulative_through: U64,
9486}
9487
9488#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9489#[serde(deny_unknown_fields)]
9490pub struct ExecuteStateReadRequest {
9491 pub index: Resource,
9492 pub operation: StateOperation,
9493}
9494
9495#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9496#[serde(deny_unknown_fields)]
9497pub struct ExecuteStateReadResult {
9498 pub result: StateCommandResult,
9499}
9500
9501#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9502#[serde(deny_unknown_fields)]
9503pub struct PrepareStateWriteRequest {
9504 pub index: Resource,
9505 pub action_id: Digest,
9506 pub operation: StateOperation,
9507}
9508
9509#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9510#[serde(deny_unknown_fields)]
9511pub struct PrepareStateWriteResult {
9512 pub locator: Locator,
9513 pub semantic_digest: Digest,
9514 pub retention_max_entries: U64,
9515 pub retention_sequence_window: U64,
9516}
9517
9518#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9519#[serde(deny_unknown_fields)]
9520pub struct SubmitStateWriteRequest {
9521 pub index: Resource,
9522 pub action_id: Digest,
9523 pub operation: StateOperation,
9524 pub locator: Locator,
9525 pub semantic_digest: Digest,
9526}
9527
9528#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9529#[serde(deny_unknown_fields)]
9530pub struct SubmitStateWriteResult {
9531 #[serde(default, skip_serializing_if = "Option::is_none")]
9532 pub result: Option<StateCommandResult>,
9533 #[serde(default, skip_serializing_if = "Option::is_none")]
9534 pub resolution: Option<StateWriteResolution>,
9535 pub mutation_outcome: MutationOutcome,
9536 #[serde(default, skip_serializing_if = "Option::is_none")]
9537 pub achievement: Option<WriteAchievement>,
9538}
9539
9540#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9541#[serde(deny_unknown_fields)]
9542pub struct ResolveStateWriteRequest {
9543 pub index: Resource,
9544 pub action_id: Digest,
9545 pub operation: StateOperation,
9546 pub locator: Locator,
9547 pub semantic_digest: Digest,
9548}
9549
9550#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9551#[serde(deny_unknown_fields)]
9552pub struct ResolveStateWriteResult {
9553 pub resolution: StateWriteResolution,
9554}
9555
9556#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9557#[serde(tag = "command", content = "body", rename_all = "snake_case")]
9558pub enum RequestBody {
9559 Discover(DiscoverRequest),
9560 ListIndexes(ListIndexesRequest),
9561 GetIndex(GetIndexRequest),
9562 ValidateIndexChange(ValidateIndexChangeRequest),
9563 ApplyIndexChange(ApplyIndexChangeRequest),
9564 ApplyAdministrationMutation(ApplyAdministrationMutationRequest),
9565 ListAliases(ListAliasesRequest),
9566 GetAlias(GetAliasRequest),
9567 ListDataStreams(ListDataStreamsRequest),
9568 GetDataStream(GetDataStreamRequest),
9569 ListComponentTemplates(ListComponentTemplatesRequest),
9570 GetComponentTemplate(GetComponentTemplateRequest),
9571 ListIndexTemplates(ListIndexTemplatesRequest),
9572 GetIndexTemplate(GetIndexTemplateRequest),
9573 ListIngestPipelines(ListIngestPipelinesRequest),
9574 GetIngestPipeline(GetIngestPipelineRequest),
9575 SimulateIngestPipeline(SimulateIngestPipelineRequest),
9576 ReprocessByQuery(ReprocessByQueryRequest),
9577 ListLifecyclePolicies(ListLifecyclePoliciesRequest),
9578 GetLifecyclePolicy(GetLifecyclePolicyRequest),
9579 PrepareCreateIndex(PrepareCreateIndexRequest),
9580 PrepareDeleteIndex(PrepareDeleteIndexRequest),
9581 SubmitCatalogAction(SubmitCatalogActionRequest),
9582 ResolveCatalogAction(ResolveCatalogActionRequest),
9583 PrepareReplayableSourceIndex(PrepareReplayableSourceIndexRequest),
9584 SubmitReplayableSourceIndex(SubmitReplayableSourceIndexRequest),
9585 GetReplayableSource(GetReplayableSourceRequest),
9586 ControlReplayableSource(ControlReplayableSourceRequest),
9587 CloneIndex(CloneIndexRequest),
9588 ConfigureHistory(ConfigureHistoryRequest),
9589 GetHistory(GetHistoryRequest),
9590 ResolveHistory(ResolveHistoryRequest),
9591 PlaceHistoryHold(PlaceHistoryHoldRequest),
9592 ReleaseHistoryHold(ReleaseHistoryHoldRequest),
9593 PrepareDocumentMutation(PrepareDocumentMutationRequest),
9594 SubmitDocumentMutation(SubmitDocumentMutationRequest),
9595 PrepareDocumentBulk(PrepareDocumentBulkRequest),
9596 SubmitDocumentBulk(SubmitDocumentBulkRequest),
9597 ResolveDocumentBulk(ResolveDocumentBulkRequest),
9598 PrepareAppendBulk(PrepareAppendBulkRequest),
9599 SubmitAppendBulk(SubmitAppendBulkRequest),
9600 ResolveAppendBulk(ResolveAppendBulkRequest),
9601 ObserveAppendCommitted(ObserveAppendCommittedRequest),
9602 ResolveDocumentMutation(ResolveDocumentMutationRequest),
9603 GetDocument(GetDocumentRequest),
9604 Search(SearchRequest),
9605 TraverseRelationships(TraverseRelationshipsRequest),
9606 QueryProfiles(QueryProfilesRequest),
9607 EvaluateTemporalEvidence(EvaluateTemporalEvidenceRequest),
9608 CreateContinuousTemporalEvaluation(CreateContinuousTemporalEvaluationRequest),
9609 GetContinuousTemporalEvaluation(GetContinuousTemporalEvaluationRequest),
9610 PauseContinuousTemporalEvaluation(PauseContinuousTemporalEvaluationRequest),
9611 ResumeContinuousTemporalEvaluation(ResumeContinuousTemporalEvaluationRequest),
9612 ReplaceContinuousTemporalEvaluation(ReplaceContinuousTemporalEvaluationRequest),
9613 RetireContinuousTemporalEvaluation(RetireContinuousTemporalEvaluationRequest),
9614 ReadContinuousTemporalEvidence(ReadContinuousTemporalEvidenceRequest),
9615 ValidateSearch(ValidateSearchRequest),
9616 OpenPit(OpenPitRequest),
9617 RenewPit(RenewPitRequest),
9618 ClosePit(ClosePitRequest),
9619 ListOperations(ListOperationsRequest),
9620 GetOperation(GetOperationRequest),
9621 WaitOperation(WaitOperationRequest),
9622 CancelOperation(CancelOperationRequest),
9623 ListAuditEvents(ListAuditEventsRequest),
9624 ExportAuditEvents(ExportAuditEventsRequest),
9625 ReserveServiceCredential(ReserveServiceCredentialRequest),
9626 ReserveServiceCredentialRotation(ReserveServiceCredentialRotationRequest),
9627 ActivateServiceCredential(ActivateServiceCredentialRequest),
9628 ResolveServiceCredentialReservation(ResolveServiceCredentialReservationRequest),
9629 PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialRequest),
9630 RevokeServiceCredential(RevokeServiceCredentialRequest),
9631 ResolveSecurityAction(ResolveSecurityActionRequest),
9632 GetSecurityRole(GetSecurityRoleRequest),
9633 PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeRequest),
9634 SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeRequest),
9635 ListServiceCredentials(ListServiceCredentialsRequest),
9636 GetRuntimeStatus(GetRuntimeStatusRequest),
9637 GetResultCacheStatus(GetResultCacheStatusRequest),
9638 GetFieldPromotionStatus(GetFieldPromotionStatusRequest),
9639 GetOverloadStatus(GetOverloadStatusRequest),
9640 ConfigureExternalKey(ConfigureExternalKeyRequest),
9641 RotateExternalKeyBinding(RotateExternalKeyBindingRequest),
9642 ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteRequest),
9643 GetLifecycleStatus(GetLifecycleStatusRequest),
9644 GetQuota(GetQuotaRequest),
9645 UpdateQuota(UpdateQuotaRequest),
9646 GetBinding(GetBindingRequest),
9647 GetAdmissionStatus(GetAdmissionStatusRequest),
9648 SetAdmission(SetAdmissionRequest),
9649 GetQuiesceStatus(GetQuiesceStatusRequest),
9650 GetDecommissionReadiness(GetDecommissionReadinessRequest),
9651 GetUpgradeReadiness(GetUpgradeReadinessRequest),
9652 GetMaintenanceStatus(GetMaintenanceStatusRequest),
9653 WarmVectorIndex(WarmVectorIndexRequest),
9654 EvaluateVectorRecall(EvaluateVectorRecallRequest),
9655 CalibrateVectorStrategy(CalibrateVectorStrategyRequest),
9656 GetVectorDiagnostic(GetVectorDiagnosticRequest),
9657 CreateDiagnostic(CreateDiagnosticRequest),
9658 GetDiagnostic(GetDiagnosticRequest),
9659 PrepareCollectionExport(PrepareCollectionExportRequest),
9660 StartCollectionExport(StartCollectionExportRequest),
9661 ResolveCollectionExport(ResolveCollectionExportRequest),
9662 VerifyCollectionExport(VerifyCollectionExportRequest),
9663 PrepareCollectionRestore(PrepareCollectionRestoreRequest),
9664 StartCollectionRestore(StartCollectionRestoreRequest),
9665 ResolveCollectionRestore(ResolveCollectionRestoreRequest),
9666 PrepareIndexExport(PrepareIndexExportRequest),
9667 StartIndexExport(StartIndexExportRequest),
9668 ResolveIndexExport(ResolveIndexExportRequest),
9669 VerifyIndexExport(VerifyIndexExportRequest),
9670 PrepareIndexImport(PrepareIndexImportRequest),
9671 StartIndexImport(StartIndexImportRequest),
9672 ResolveIndexImport(ResolveIndexImportRequest),
9673 ReadArtifactChunk(ReadArtifactChunkRequest),
9674 ExportUsage(ExportUsageRequest),
9675 ExecuteStateRead(ExecuteStateReadRequest),
9676 PrepareStateWrite(PrepareStateWriteRequest),
9677 SubmitStateWrite(SubmitStateWriteRequest),
9678 ResolveStateWrite(ResolveStateWriteRequest),
9679}
9680
9681#[allow(clippy::large_enum_variant)]
9684#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9685#[serde(tag = "command", content = "body", rename_all = "snake_case")]
9686pub enum ResultBody {
9687 Discover(DiscoverResult),
9688 ListIndexes(ListIndexesResult),
9689 GetIndex(GetIndexResult),
9690 ValidateIndexChange(ValidateIndexChangeResult),
9691 ApplyIndexChange(ApplyIndexChangeResult),
9692 ApplyAdministrationMutation(ApplyAdministrationMutationResult),
9693 ListAliases(ListAliasesResult),
9694 GetAlias(GetAliasResult),
9695 ListDataStreams(ListDataStreamsResult),
9696 GetDataStream(GetDataStreamResult),
9697 ListComponentTemplates(ListComponentTemplatesResult),
9698 GetComponentTemplate(GetComponentTemplateResult),
9699 ListIndexTemplates(ListIndexTemplatesResult),
9700 GetIndexTemplate(GetIndexTemplateResult),
9701 ListIngestPipelines(ListIngestPipelinesResult),
9702 GetIngestPipeline(GetIngestPipelineResult),
9703 SimulateIngestPipeline(SimulateIngestPipelineResult),
9704 ReprocessByQuery(ReprocessByQueryResult),
9705 ListLifecyclePolicies(ListLifecyclePoliciesResult),
9706 GetLifecyclePolicy(GetLifecyclePolicyResult),
9707 PrepareCreateIndex(PrepareCreateIndexResult),
9708 PrepareDeleteIndex(PrepareDeleteIndexResult),
9709 SubmitCatalogAction(SubmitCatalogActionResult),
9710 ResolveCatalogAction(ResolveCatalogActionResult),
9711 PrepareReplayableSourceIndex(PrepareReplayableSourceIndexResult),
9712 SubmitReplayableSourceIndex(SubmitReplayableSourceIndexResult),
9713 GetReplayableSource(GetReplayableSourceResult),
9714 ControlReplayableSource(ControlReplayableSourceResult),
9715 CloneIndex(CloneIndexResult),
9716 ConfigureHistory(ConfigureHistoryResult),
9717 GetHistory(GetHistoryResult),
9718 ResolveHistory(ResolveHistoryResult),
9719 PlaceHistoryHold(PlaceHistoryHoldResult),
9720 ReleaseHistoryHold(ReleaseHistoryHoldResult),
9721 PrepareDocumentMutation(PrepareDocumentMutationResult),
9722 SubmitDocumentMutation(SubmitDocumentMutationResult),
9723 PrepareDocumentBulk(PrepareDocumentBulkResult),
9724 SubmitDocumentBulk(SubmitDocumentBulkResult),
9725 ResolveDocumentBulk(ResolveDocumentBulkResult),
9726 PrepareAppendBulk(PrepareAppendBulkResult),
9727 SubmitAppendBulk(SubmitAppendBulkResult),
9728 ResolveAppendBulk(ResolveAppendBulkResult),
9729 ObserveAppendCommitted(ObserveAppendCommittedResult),
9730 ResolveDocumentMutation(ResolveDocumentMutationResult),
9731 GetDocument(GetDocumentResult),
9732 Search(SearchResult),
9733 TraverseRelationships(TraverseRelationshipsResult),
9734 QueryProfiles(QueryProfilesResult),
9735 EvaluateTemporalEvidence(EvaluateTemporalEvidenceResult),
9736 CreateContinuousTemporalEvaluation(CreateContinuousTemporalEvaluationResult),
9737 GetContinuousTemporalEvaluation(GetContinuousTemporalEvaluationResult),
9738 PauseContinuousTemporalEvaluation(PauseContinuousTemporalEvaluationResult),
9739 ResumeContinuousTemporalEvaluation(ResumeContinuousTemporalEvaluationResult),
9740 ReplaceContinuousTemporalEvaluation(ReplaceContinuousTemporalEvaluationResult),
9741 RetireContinuousTemporalEvaluation(RetireContinuousTemporalEvaluationResult),
9742 ReadContinuousTemporalEvidence(ReadContinuousTemporalEvidenceResult),
9743 ValidateSearch(ValidateSearchResult),
9744 OpenPit(OpenPitResult),
9745 RenewPit(RenewPitResult),
9746 ClosePit(ClosePitResult),
9747 ListOperations(ListOperationsResult),
9748 GetOperation(GetOperationResult),
9749 WaitOperation(WaitOperationResult),
9750 CancelOperation(CancelOperationResult),
9751 ListAuditEvents(ListAuditEventsResult),
9752 ExportAuditEvents(ExportAuditEventsResult),
9753 ReserveServiceCredential(ReserveServiceCredentialResult),
9754 ReserveServiceCredentialRotation(ReserveServiceCredentialRotationResult),
9755 ActivateServiceCredential(ActivateServiceCredentialResult),
9756 ResolveServiceCredentialReservation(ResolveServiceCredentialReservationResult),
9757 PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialResult),
9758 RevokeServiceCredential(RevokeServiceCredentialResult),
9759 ResolveSecurityAction(ResolveSecurityActionResult),
9760 GetSecurityRole(GetSecurityRoleResult),
9761 PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeResult),
9762 SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeResult),
9763 ListServiceCredentials(ListServiceCredentialsResult),
9764 GetRuntimeStatus(GetRuntimeStatusResult),
9765 GetResultCacheStatus(GetResultCacheStatusResult),
9766 GetFieldPromotionStatus(GetFieldPromotionStatusResult),
9767 GetOverloadStatus(GetOverloadStatusResult),
9768 ConfigureExternalKey(ConfigureExternalKeyResult),
9769 RotateExternalKeyBinding(RotateExternalKeyBindingResult),
9770 ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteResult),
9771 GetLifecycleStatus(GetLifecycleStatusResult),
9772 GetQuota(GetQuotaResult),
9773 UpdateQuota(UpdateQuotaResult),
9774 GetBinding(GetBindingResult),
9775 GetAdmissionStatus(GetAdmissionStatusResult),
9776 SetAdmission(SetAdmissionResult),
9777 GetQuiesceStatus(GetQuiesceStatusResult),
9778 GetDecommissionReadiness(GetDecommissionReadinessResult),
9779 GetUpgradeReadiness(GetUpgradeReadinessResult),
9780 GetMaintenanceStatus(GetMaintenanceStatusResult),
9781 WarmVectorIndex(WarmVectorIndexResult),
9782 EvaluateVectorRecall(EvaluateVectorRecallResult),
9783 CalibrateVectorStrategy(CalibrateVectorStrategyResult),
9784 GetVectorDiagnostic(GetVectorDiagnosticResult),
9785 CreateDiagnostic(CreateDiagnosticResult),
9786 GetDiagnostic(GetDiagnosticResult),
9787 PrepareCollectionExport(PrepareCollectionExportResult),
9788 StartCollectionExport(StartCollectionExportResult),
9789 ResolveCollectionExport(ResolveCollectionExportResult),
9790 VerifyCollectionExport(VerifyCollectionExportResult),
9791 PrepareCollectionRestore(PrepareCollectionRestoreResult),
9792 StartCollectionRestore(StartCollectionRestoreResult),
9793 ResolveCollectionRestore(ResolveCollectionRestoreResult),
9794 PrepareIndexExport(PrepareIndexExportResult),
9795 StartIndexExport(StartIndexExportResult),
9796 ResolveIndexExport(ResolveIndexExportResult),
9797 VerifyIndexExport(VerifyIndexExportResult),
9798 PrepareIndexImport(PrepareIndexImportResult),
9799 StartIndexImport(StartIndexImportResult),
9800 ResolveIndexImport(ResolveIndexImportResult),
9801 ReadArtifactChunk(ReadArtifactChunkResult),
9802 ExportUsage(ExportUsageResult),
9803 ExecuteStateRead(ExecuteStateReadResult),
9804 PrepareStateWrite(PrepareStateWriteResult),
9805 SubmitStateWrite(SubmitStateWriteResult),
9806 ResolveStateWrite(ResolveStateWriteResult),
9807}
9808
9809pub const fn command_for_request(value: &RequestBody) -> Command {
9810 match value {
9811 RequestBody::Discover(_) => Command::Discover,
9812 RequestBody::ListIndexes(_) => Command::ListIndexes,
9813 RequestBody::GetIndex(_) => Command::GetIndex,
9814 RequestBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
9815 RequestBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
9816 RequestBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
9817 RequestBody::ListAliases(_) => Command::ListAliases,
9818 RequestBody::GetAlias(_) => Command::GetAlias,
9819 RequestBody::ListDataStreams(_) => Command::ListDataStreams,
9820 RequestBody::GetDataStream(_) => Command::GetDataStream,
9821 RequestBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
9822 RequestBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
9823 RequestBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
9824 RequestBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
9825 RequestBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
9826 RequestBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
9827 RequestBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
9828 RequestBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
9829 RequestBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
9830 RequestBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
9831 RequestBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
9832 RequestBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
9833 RequestBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
9834 RequestBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
9835 RequestBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
9836 RequestBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
9837 RequestBody::GetReplayableSource(_) => Command::GetReplayableSource,
9838 RequestBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
9839 RequestBody::CloneIndex(_) => Command::CloneIndex,
9840 RequestBody::ConfigureHistory(_) => Command::ConfigureHistory,
9841 RequestBody::GetHistory(_) => Command::GetHistory,
9842 RequestBody::ResolveHistory(_) => Command::ResolveHistory,
9843 RequestBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
9844 RequestBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
9845 RequestBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
9846 RequestBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
9847 RequestBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
9848 RequestBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
9849 RequestBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
9850 RequestBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
9851 RequestBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
9852 RequestBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
9853 RequestBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
9854 RequestBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
9855 RequestBody::GetDocument(_) => Command::GetDocument,
9856 RequestBody::Search(_) => Command::Search,
9857 RequestBody::TraverseRelationships(_) => Command::TraverseRelationships,
9858 RequestBody::QueryProfiles(_) => Command::QueryProfiles,
9859 RequestBody::EvaluateTemporalEvidence(_) => Command::EvaluateTemporalEvidence,
9860 RequestBody::CreateContinuousTemporalEvaluation(_) => Command::CreateContinuousTemporalEvaluation,
9861 RequestBody::GetContinuousTemporalEvaluation(_) => Command::GetContinuousTemporalEvaluation,
9862 RequestBody::PauseContinuousTemporalEvaluation(_) => Command::PauseContinuousTemporalEvaluation,
9863 RequestBody::ResumeContinuousTemporalEvaluation(_) => Command::ResumeContinuousTemporalEvaluation,
9864 RequestBody::ReplaceContinuousTemporalEvaluation(_) => Command::ReplaceContinuousTemporalEvaluation,
9865 RequestBody::RetireContinuousTemporalEvaluation(_) => Command::RetireContinuousTemporalEvaluation,
9866 RequestBody::ReadContinuousTemporalEvidence(_) => Command::ReadContinuousTemporalEvidence,
9867 RequestBody::ValidateSearch(_) => Command::ValidateSearch,
9868 RequestBody::OpenPit(_) => Command::OpenPit,
9869 RequestBody::RenewPit(_) => Command::RenewPit,
9870 RequestBody::ClosePit(_) => Command::ClosePit,
9871 RequestBody::ListOperations(_) => Command::ListOperations,
9872 RequestBody::GetOperation(_) => Command::GetOperation,
9873 RequestBody::WaitOperation(_) => Command::WaitOperation,
9874 RequestBody::CancelOperation(_) => Command::CancelOperation,
9875 RequestBody::ListAuditEvents(_) => Command::ListAuditEvents,
9876 RequestBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
9877 RequestBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
9878 RequestBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
9879 RequestBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
9880 RequestBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
9881 RequestBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
9882 RequestBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
9883 RequestBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
9884 RequestBody::GetSecurityRole(_) => Command::GetSecurityRole,
9885 RequestBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
9886 RequestBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
9887 RequestBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
9888 RequestBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
9889 RequestBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
9890 RequestBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
9891 RequestBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
9892 RequestBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
9893 RequestBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
9894 RequestBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
9895 RequestBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
9896 RequestBody::GetQuota(_) => Command::GetQuota,
9897 RequestBody::UpdateQuota(_) => Command::UpdateQuota,
9898 RequestBody::GetBinding(_) => Command::GetBinding,
9899 RequestBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
9900 RequestBody::SetAdmission(_) => Command::SetAdmission,
9901 RequestBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
9902 RequestBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
9903 RequestBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
9904 RequestBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
9905 RequestBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
9906 RequestBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
9907 RequestBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
9908 RequestBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
9909 RequestBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
9910 RequestBody::GetDiagnostic(_) => Command::GetDiagnostic,
9911 RequestBody::PrepareCollectionExport(_) => Command::PrepareCollectionExport,
9912 RequestBody::StartCollectionExport(_) => Command::StartCollectionExport,
9913 RequestBody::ResolveCollectionExport(_) => Command::ResolveCollectionExport,
9914 RequestBody::VerifyCollectionExport(_) => Command::VerifyCollectionExport,
9915 RequestBody::PrepareCollectionRestore(_) => Command::PrepareCollectionRestore,
9916 RequestBody::StartCollectionRestore(_) => Command::StartCollectionRestore,
9917 RequestBody::ResolveCollectionRestore(_) => Command::ResolveCollectionRestore,
9918 RequestBody::PrepareIndexExport(_) => Command::PrepareIndexExport,
9919 RequestBody::StartIndexExport(_) => Command::StartIndexExport,
9920 RequestBody::ResolveIndexExport(_) => Command::ResolveIndexExport,
9921 RequestBody::VerifyIndexExport(_) => Command::VerifyIndexExport,
9922 RequestBody::PrepareIndexImport(_) => Command::PrepareIndexImport,
9923 RequestBody::StartIndexImport(_) => Command::StartIndexImport,
9924 RequestBody::ResolveIndexImport(_) => Command::ResolveIndexImport,
9925 RequestBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
9926 RequestBody::ExportUsage(_) => Command::ExportUsage,
9927 RequestBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
9928 RequestBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
9929 RequestBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
9930 RequestBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
9931 }
9932}
9933
9934pub const fn command_for_result(value: &ResultBody) -> Command {
9935 match value {
9936 ResultBody::Discover(_) => Command::Discover,
9937 ResultBody::ListIndexes(_) => Command::ListIndexes,
9938 ResultBody::GetIndex(_) => Command::GetIndex,
9939 ResultBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
9940 ResultBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
9941 ResultBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
9942 ResultBody::ListAliases(_) => Command::ListAliases,
9943 ResultBody::GetAlias(_) => Command::GetAlias,
9944 ResultBody::ListDataStreams(_) => Command::ListDataStreams,
9945 ResultBody::GetDataStream(_) => Command::GetDataStream,
9946 ResultBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
9947 ResultBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
9948 ResultBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
9949 ResultBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
9950 ResultBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
9951 ResultBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
9952 ResultBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
9953 ResultBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
9954 ResultBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
9955 ResultBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
9956 ResultBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
9957 ResultBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
9958 ResultBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
9959 ResultBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
9960 ResultBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
9961 ResultBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
9962 ResultBody::GetReplayableSource(_) => Command::GetReplayableSource,
9963 ResultBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
9964 ResultBody::CloneIndex(_) => Command::CloneIndex,
9965 ResultBody::ConfigureHistory(_) => Command::ConfigureHistory,
9966 ResultBody::GetHistory(_) => Command::GetHistory,
9967 ResultBody::ResolveHistory(_) => Command::ResolveHistory,
9968 ResultBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
9969 ResultBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
9970 ResultBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
9971 ResultBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
9972 ResultBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
9973 ResultBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
9974 ResultBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
9975 ResultBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
9976 ResultBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
9977 ResultBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
9978 ResultBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
9979 ResultBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
9980 ResultBody::GetDocument(_) => Command::GetDocument,
9981 ResultBody::Search(_) => Command::Search,
9982 ResultBody::TraverseRelationships(_) => Command::TraverseRelationships,
9983 ResultBody::QueryProfiles(_) => Command::QueryProfiles,
9984 ResultBody::EvaluateTemporalEvidence(_) => Command::EvaluateTemporalEvidence,
9985 ResultBody::CreateContinuousTemporalEvaluation(_) => Command::CreateContinuousTemporalEvaluation,
9986 ResultBody::GetContinuousTemporalEvaluation(_) => Command::GetContinuousTemporalEvaluation,
9987 ResultBody::PauseContinuousTemporalEvaluation(_) => Command::PauseContinuousTemporalEvaluation,
9988 ResultBody::ResumeContinuousTemporalEvaluation(_) => Command::ResumeContinuousTemporalEvaluation,
9989 ResultBody::ReplaceContinuousTemporalEvaluation(_) => Command::ReplaceContinuousTemporalEvaluation,
9990 ResultBody::RetireContinuousTemporalEvaluation(_) => Command::RetireContinuousTemporalEvaluation,
9991 ResultBody::ReadContinuousTemporalEvidence(_) => Command::ReadContinuousTemporalEvidence,
9992 ResultBody::ValidateSearch(_) => Command::ValidateSearch,
9993 ResultBody::OpenPit(_) => Command::OpenPit,
9994 ResultBody::RenewPit(_) => Command::RenewPit,
9995 ResultBody::ClosePit(_) => Command::ClosePit,
9996 ResultBody::ListOperations(_) => Command::ListOperations,
9997 ResultBody::GetOperation(_) => Command::GetOperation,
9998 ResultBody::WaitOperation(_) => Command::WaitOperation,
9999 ResultBody::CancelOperation(_) => Command::CancelOperation,
10000 ResultBody::ListAuditEvents(_) => Command::ListAuditEvents,
10001 ResultBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
10002 ResultBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
10003 ResultBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
10004 ResultBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
10005 ResultBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
10006 ResultBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
10007 ResultBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
10008 ResultBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
10009 ResultBody::GetSecurityRole(_) => Command::GetSecurityRole,
10010 ResultBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
10011 ResultBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
10012 ResultBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
10013 ResultBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
10014 ResultBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
10015 ResultBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
10016 ResultBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
10017 ResultBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
10018 ResultBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
10019 ResultBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
10020 ResultBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
10021 ResultBody::GetQuota(_) => Command::GetQuota,
10022 ResultBody::UpdateQuota(_) => Command::UpdateQuota,
10023 ResultBody::GetBinding(_) => Command::GetBinding,
10024 ResultBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
10025 ResultBody::SetAdmission(_) => Command::SetAdmission,
10026 ResultBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
10027 ResultBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
10028 ResultBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
10029 ResultBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
10030 ResultBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
10031 ResultBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
10032 ResultBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
10033 ResultBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
10034 ResultBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
10035 ResultBody::GetDiagnostic(_) => Command::GetDiagnostic,
10036 ResultBody::PrepareCollectionExport(_) => Command::PrepareCollectionExport,
10037 ResultBody::StartCollectionExport(_) => Command::StartCollectionExport,
10038 ResultBody::ResolveCollectionExport(_) => Command::ResolveCollectionExport,
10039 ResultBody::VerifyCollectionExport(_) => Command::VerifyCollectionExport,
10040 ResultBody::PrepareCollectionRestore(_) => Command::PrepareCollectionRestore,
10041 ResultBody::StartCollectionRestore(_) => Command::StartCollectionRestore,
10042 ResultBody::ResolveCollectionRestore(_) => Command::ResolveCollectionRestore,
10043 ResultBody::PrepareIndexExport(_) => Command::PrepareIndexExport,
10044 ResultBody::StartIndexExport(_) => Command::StartIndexExport,
10045 ResultBody::ResolveIndexExport(_) => Command::ResolveIndexExport,
10046 ResultBody::VerifyIndexExport(_) => Command::VerifyIndexExport,
10047 ResultBody::PrepareIndexImport(_) => Command::PrepareIndexImport,
10048 ResultBody::StartIndexImport(_) => Command::StartIndexImport,
10049 ResultBody::ResolveIndexImport(_) => Command::ResolveIndexImport,
10050 ResultBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
10051 ResultBody::ExportUsage(_) => Command::ExportUsage,
10052 ResultBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
10053 ResultBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
10054 ResultBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
10055 ResultBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
10056 }
10057}
10058
10059#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10060#[serde(deny_unknown_fields)]
10061pub struct RequestEnvelope {
10062 pub meta: RequestMeta,
10063 pub request: RequestBody,
10064}
10065#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10066#[serde(tag = "outcome", rename_all = "snake_case")]
10067pub enum ResponseEnvelope {
10068 Success {
10069 meta: ResponseMeta,
10070 result: Box<ResultBody>,
10071 },
10072 Error {
10073 meta: ResponseMeta,
10074 error: ErrorBody,
10075 },
10076}
10077
10078#[derive(Clone, Copy, Debug, Eq, PartialEq)]
10079pub struct CommandContract {
10080 pub command: Command,
10081 pub action: Action,
10082 pub cancellable: bool,
10083 pub mutation: &'static str,
10084}
10085pub const LODESTONE_API_COMMAND_CONTRACTS: &[CommandContract] = &[
10086 CommandContract {
10087 command: Command::Discover,
10088 action: Action::IdentityDiscovery,
10089 cancellable: true,
10090 mutation: "read_only",
10091 },
10092 CommandContract {
10093 command: Command::ListIndexes,
10094 action: Action::CatalogRead,
10095 cancellable: true,
10096 mutation: "read_only",
10097 },
10098 CommandContract {
10099 command: Command::GetIndex,
10100 action: Action::CatalogRead,
10101 cancellable: true,
10102 mutation: "read_only",
10103 },
10104 CommandContract {
10105 command: Command::ValidateIndexChange,
10106 action: Action::IndexAdmin,
10107 cancellable: true,
10108 mutation: "read_only",
10109 },
10110 CommandContract {
10111 command: Command::ApplyIndexChange,
10112 action: Action::IndexAdmin,
10113 cancellable: true,
10114 mutation: "catalog_submit",
10115 },
10116 CommandContract {
10117 command: Command::ApplyAdministrationMutation,
10118 action: Action::LifecycleAdmin,
10119 cancellable: true,
10120 mutation: "administration_submit",
10121 },
10122 CommandContract {
10123 command: Command::ListAliases,
10124 action: Action::CatalogRead,
10125 cancellable: true,
10126 mutation: "read_only",
10127 },
10128 CommandContract {
10129 command: Command::GetAlias,
10130 action: Action::CatalogRead,
10131 cancellable: true,
10132 mutation: "read_only",
10133 },
10134 CommandContract {
10135 command: Command::ListDataStreams,
10136 action: Action::CatalogRead,
10137 cancellable: true,
10138 mutation: "read_only",
10139 },
10140 CommandContract {
10141 command: Command::GetDataStream,
10142 action: Action::CatalogRead,
10143 cancellable: true,
10144 mutation: "read_only",
10145 },
10146 CommandContract {
10147 command: Command::ListComponentTemplates,
10148 action: Action::CatalogRead,
10149 cancellable: true,
10150 mutation: "read_only",
10151 },
10152 CommandContract {
10153 command: Command::GetComponentTemplate,
10154 action: Action::CatalogRead,
10155 cancellable: true,
10156 mutation: "read_only",
10157 },
10158 CommandContract {
10159 command: Command::ListIndexTemplates,
10160 action: Action::CatalogRead,
10161 cancellable: true,
10162 mutation: "read_only",
10163 },
10164 CommandContract {
10165 command: Command::GetIndexTemplate,
10166 action: Action::CatalogRead,
10167 cancellable: true,
10168 mutation: "read_only",
10169 },
10170 CommandContract {
10171 command: Command::ListIngestPipelines,
10172 action: Action::LifecycleAdmin,
10173 cancellable: true,
10174 mutation: "read_only",
10175 },
10176 CommandContract {
10177 command: Command::GetIngestPipeline,
10178 action: Action::LifecycleAdmin,
10179 cancellable: true,
10180 mutation: "read_only",
10181 },
10182 CommandContract {
10183 command: Command::SimulateIngestPipeline,
10184 action: Action::LifecycleAdmin,
10185 cancellable: true,
10186 mutation: "read_only",
10187 },
10188 CommandContract {
10189 command: Command::ReprocessByQuery,
10190 action: Action::DataWrite,
10191 cancellable: true,
10192 mutation: "authority_submit",
10193 },
10194 CommandContract {
10195 command: Command::ListLifecyclePolicies,
10196 action: Action::CatalogRead,
10197 cancellable: true,
10198 mutation: "read_only",
10199 },
10200 CommandContract {
10201 command: Command::GetLifecyclePolicy,
10202 action: Action::CatalogRead,
10203 cancellable: true,
10204 mutation: "read_only",
10205 },
10206 CommandContract {
10207 command: Command::PrepareCreateIndex,
10208 action: Action::IndexAdmin,
10209 cancellable: true,
10210 mutation: "catalog_prepare",
10211 },
10212 CommandContract {
10213 command: Command::PrepareDeleteIndex,
10214 action: Action::IndexAdmin,
10215 cancellable: true,
10216 mutation: "catalog_prepare",
10217 },
10218 CommandContract {
10219 command: Command::SubmitCatalogAction,
10220 action: Action::IndexAdmin,
10221 cancellable: true,
10222 mutation: "catalog_submit",
10223 },
10224 CommandContract {
10225 command: Command::ResolveCatalogAction,
10226 action: Action::IndexAdmin,
10227 cancellable: true,
10228 mutation: "read_only",
10229 },
10230 CommandContract {
10231 command: Command::PrepareReplayableSourceIndex,
10232 action: Action::IndexAdmin,
10233 cancellable: true,
10234 mutation: "catalog_prepare",
10235 },
10236 CommandContract {
10237 command: Command::SubmitReplayableSourceIndex,
10238 action: Action::IndexAdmin,
10239 cancellable: true,
10240 mutation: "catalog_submit",
10241 },
10242 CommandContract {
10243 command: Command::GetReplayableSource,
10244 action: Action::CatalogRead,
10245 cancellable: true,
10246 mutation: "read_only",
10247 },
10248 CommandContract {
10249 command: Command::ControlReplayableSource,
10250 action: Action::IndexAdmin,
10251 cancellable: true,
10252 mutation: "catalog_submit",
10253 },
10254 CommandContract {
10255 command: Command::CloneIndex,
10256 action: Action::IndexAdmin,
10257 cancellable: true,
10258 mutation: "catalog_submit",
10259 },
10260 CommandContract {
10261 command: Command::ConfigureHistory,
10262 action: Action::IndexAdmin,
10263 cancellable: true,
10264 mutation: "catalog_submit",
10265 },
10266 CommandContract {
10267 command: Command::GetHistory,
10268 action: Action::CatalogRead,
10269 cancellable: true,
10270 mutation: "read_only",
10271 },
10272 CommandContract {
10273 command: Command::ResolveHistory,
10274 action: Action::DataRead,
10275 cancellable: true,
10276 mutation: "read_only",
10277 },
10278 CommandContract {
10279 command: Command::PlaceHistoryHold,
10280 action: Action::IndexAdmin,
10281 cancellable: true,
10282 mutation: "catalog_submit",
10283 },
10284 CommandContract {
10285 command: Command::ReleaseHistoryHold,
10286 action: Action::IndexAdmin,
10287 cancellable: true,
10288 mutation: "catalog_submit",
10289 },
10290 CommandContract {
10291 command: Command::PrepareDocumentMutation,
10292 action: Action::DataWrite,
10293 cancellable: true,
10294 mutation: "read_only_prepare",
10295 },
10296 CommandContract {
10297 command: Command::SubmitDocumentMutation,
10298 action: Action::DataWrite,
10299 cancellable: true,
10300 mutation: "wal_submit",
10301 },
10302 CommandContract {
10303 command: Command::PrepareDocumentBulk,
10304 action: Action::DataWrite,
10305 cancellable: true,
10306 mutation: "read_only_prepare",
10307 },
10308 CommandContract {
10309 command: Command::SubmitDocumentBulk,
10310 action: Action::DataWrite,
10311 cancellable: true,
10312 mutation: "wal_submit",
10313 },
10314 CommandContract {
10315 command: Command::ResolveDocumentBulk,
10316 action: Action::DataRead,
10317 cancellable: true,
10318 mutation: "read_only",
10319 },
10320 CommandContract {
10321 command: Command::PrepareAppendBulk,
10322 action: Action::Append,
10323 cancellable: true,
10324 mutation: "read_only_prepare",
10325 },
10326 CommandContract {
10327 command: Command::SubmitAppendBulk,
10328 action: Action::Append,
10329 cancellable: true,
10330 mutation: "wal_submit",
10331 },
10332 CommandContract {
10333 command: Command::ResolveAppendBulk,
10334 action: Action::ResolveAppend,
10335 cancellable: true,
10336 mutation: "read_only",
10337 },
10338 CommandContract {
10339 command: Command::ObserveAppendCommitted,
10340 action: Action::ResolveAppend,
10341 cancellable: true,
10342 mutation: "read_only",
10343 },
10344 CommandContract {
10345 command: Command::ResolveDocumentMutation,
10346 action: Action::DataRead,
10347 cancellable: true,
10348 mutation: "read_only",
10349 },
10350 CommandContract {
10351 command: Command::GetDocument,
10352 action: Action::DataRead,
10353 cancellable: true,
10354 mutation: "read_only",
10355 },
10356 CommandContract {
10357 command: Command::Search,
10358 action: Action::DataRead,
10359 cancellable: true,
10360 mutation: "read_only",
10361 },
10362 CommandContract {
10363 command: Command::TraverseRelationships,
10364 action: Action::DataRead,
10365 cancellable: true,
10366 mutation: "read_only",
10367 },
10368 CommandContract {
10369 command: Command::QueryProfiles,
10370 action: Action::DataRead,
10371 cancellable: true,
10372 mutation: "read_only",
10373 },
10374 CommandContract {
10375 command: Command::EvaluateTemporalEvidence,
10376 action: Action::DataRead,
10377 cancellable: true,
10378 mutation: "read_only",
10379 },
10380 CommandContract {
10381 command: Command::CreateContinuousTemporalEvaluation,
10382 action: Action::LifecycleAdmin,
10383 cancellable: true,
10384 mutation: "catalog_submit",
10385 },
10386 CommandContract {
10387 command: Command::GetContinuousTemporalEvaluation,
10388 action: Action::CatalogRead,
10389 cancellable: true,
10390 mutation: "read_only",
10391 },
10392 CommandContract {
10393 command: Command::PauseContinuousTemporalEvaluation,
10394 action: Action::LifecycleAdmin,
10395 cancellable: true,
10396 mutation: "catalog_submit",
10397 },
10398 CommandContract {
10399 command: Command::ResumeContinuousTemporalEvaluation,
10400 action: Action::LifecycleAdmin,
10401 cancellable: true,
10402 mutation: "catalog_submit",
10403 },
10404 CommandContract {
10405 command: Command::ReplaceContinuousTemporalEvaluation,
10406 action: Action::LifecycleAdmin,
10407 cancellable: true,
10408 mutation: "catalog_submit",
10409 },
10410 CommandContract {
10411 command: Command::RetireContinuousTemporalEvaluation,
10412 action: Action::LifecycleAdmin,
10413 cancellable: true,
10414 mutation: "catalog_submit",
10415 },
10416 CommandContract {
10417 command: Command::ReadContinuousTemporalEvidence,
10418 action: Action::DataRead,
10419 cancellable: true,
10420 mutation: "read_only",
10421 },
10422 CommandContract {
10423 command: Command::ValidateSearch,
10424 action: Action::DataRead,
10425 cancellable: true,
10426 mutation: "read_only",
10427 },
10428 CommandContract {
10429 command: Command::OpenPit,
10430 action: Action::DataRead,
10431 cancellable: true,
10432 mutation: "authority_submit",
10433 },
10434 CommandContract {
10435 command: Command::RenewPit,
10436 action: Action::DataRead,
10437 cancellable: true,
10438 mutation: "authority_submit",
10439 },
10440 CommandContract {
10441 command: Command::ClosePit,
10442 action: Action::DataRead,
10443 cancellable: true,
10444 mutation: "authority_submit",
10445 },
10446 CommandContract {
10447 command: Command::ListOperations,
10448 action: Action::OperationRead,
10449 cancellable: true,
10450 mutation: "read_only",
10451 },
10452 CommandContract {
10453 command: Command::GetOperation,
10454 action: Action::OperationRead,
10455 cancellable: true,
10456 mutation: "read_only",
10457 },
10458 CommandContract {
10459 command: Command::WaitOperation,
10460 action: Action::OperationRead,
10461 cancellable: true,
10462 mutation: "read_only",
10463 },
10464 CommandContract {
10465 command: Command::CancelOperation,
10466 action: Action::OperationCancel,
10467 cancellable: true,
10468 mutation: "authority_submit",
10469 },
10470 CommandContract {
10471 command: Command::ListAuditEvents,
10472 action: Action::AuditRead,
10473 cancellable: true,
10474 mutation: "read_only",
10475 },
10476 CommandContract {
10477 command: Command::ExportAuditEvents,
10478 action: Action::AuditRead,
10479 cancellable: true,
10480 mutation: "read_only",
10481 },
10482 CommandContract {
10483 command: Command::ReserveServiceCredential,
10484 action: Action::SecurityAdmin,
10485 cancellable: true,
10486 mutation: "security_reserve",
10487 },
10488 CommandContract {
10489 command: Command::ReserveServiceCredentialRotation,
10490 action: Action::SecurityAdmin,
10491 cancellable: true,
10492 mutation: "security_reserve",
10493 },
10494 CommandContract {
10495 command: Command::ActivateServiceCredential,
10496 action: Action::SecurityAdmin,
10497 cancellable: true,
10498 mutation: "security_submit",
10499 },
10500 CommandContract {
10501 command: Command::ResolveServiceCredentialReservation,
10502 action: Action::SecurityRead,
10503 cancellable: true,
10504 mutation: "read_only",
10505 },
10506 CommandContract {
10507 command: Command::PrepareRevokeServiceCredential,
10508 action: Action::SecurityAdmin,
10509 cancellable: true,
10510 mutation: "read_only_prepare",
10511 },
10512 CommandContract {
10513 command: Command::RevokeServiceCredential,
10514 action: Action::SecurityAdmin,
10515 cancellable: true,
10516 mutation: "security_submit",
10517 },
10518 CommandContract {
10519 command: Command::ResolveSecurityAction,
10520 action: Action::SecurityRead,
10521 cancellable: true,
10522 mutation: "read_only",
10523 },
10524 CommandContract {
10525 command: Command::GetSecurityRole,
10526 action: Action::SecurityRead,
10527 cancellable: true,
10528 mutation: "read_only",
10529 },
10530 CommandContract {
10531 command: Command::PrepareRoleAppendAccessChange,
10532 action: Action::SecurityAdmin,
10533 cancellable: true,
10534 mutation: "read_only_prepare",
10535 },
10536 CommandContract {
10537 command: Command::SubmitRoleAppendAccessChange,
10538 action: Action::SecurityAdmin,
10539 cancellable: true,
10540 mutation: "security_submit",
10541 },
10542 CommandContract {
10543 command: Command::ListServiceCredentials,
10544 action: Action::SecurityRead,
10545 cancellable: true,
10546 mutation: "read_only",
10547 },
10548 CommandContract {
10549 command: Command::GetRuntimeStatus,
10550 action: Action::CatalogRead,
10551 cancellable: true,
10552 mutation: "read_only",
10553 },
10554 CommandContract {
10555 command: Command::GetResultCacheStatus,
10556 action: Action::CatalogRead,
10557 cancellable: true,
10558 mutation: "read_only",
10559 },
10560 CommandContract {
10561 command: Command::GetFieldPromotionStatus,
10562 action: Action::CatalogRead,
10563 cancellable: true,
10564 mutation: "read_only",
10565 },
10566 CommandContract {
10567 command: Command::GetOverloadStatus,
10568 action: Action::CatalogRead,
10569 cancellable: true,
10570 mutation: "read_only",
10571 },
10572 CommandContract {
10573 command: Command::ConfigureExternalKey,
10574 action: Action::LifecycleAdmin,
10575 cancellable: true,
10576 mutation: "authority_submit",
10577 },
10578 CommandContract {
10579 command: Command::RotateExternalKeyBinding,
10580 action: Action::LifecycleAdmin,
10581 cancellable: true,
10582 mutation: "authority_submit",
10583 },
10584 CommandContract {
10585 command: Command::ConfigureAggregateThenDelete,
10586 action: Action::LifecycleAdmin,
10587 cancellable: true,
10588 mutation: "authority_submit",
10589 },
10590 CommandContract {
10591 command: Command::GetLifecycleStatus,
10592 action: Action::CatalogRead,
10593 cancellable: true,
10594 mutation: "read_only",
10595 },
10596 CommandContract {
10597 command: Command::GetQuota,
10598 action: Action::QuotaRead,
10599 cancellable: true,
10600 mutation: "read_only",
10601 },
10602 CommandContract {
10603 command: Command::UpdateQuota,
10604 action: Action::QuotaAdmin,
10605 cancellable: true,
10606 mutation: "quota_submit",
10607 },
10608 CommandContract {
10609 command: Command::GetBinding,
10610 action: Action::BindingRead,
10611 cancellable: true,
10612 mutation: "read_only",
10613 },
10614 CommandContract {
10615 command: Command::GetAdmissionStatus,
10616 action: Action::AdmissionRead,
10617 cancellable: true,
10618 mutation: "read_only",
10619 },
10620 CommandContract {
10621 command: Command::SetAdmission,
10622 action: Action::AdmissionAdmin,
10623 cancellable: true,
10624 mutation: "admission_submit",
10625 },
10626 CommandContract {
10627 command: Command::GetQuiesceStatus,
10628 action: Action::AdmissionRead,
10629 cancellable: true,
10630 mutation: "read_only",
10631 },
10632 CommandContract {
10633 command: Command::GetDecommissionReadiness,
10634 action: Action::AdmissionRead,
10635 cancellable: true,
10636 mutation: "read_only",
10637 },
10638 CommandContract {
10639 command: Command::GetUpgradeReadiness,
10640 action: Action::TaskRead,
10641 cancellable: true,
10642 mutation: "read_only",
10643 },
10644 CommandContract {
10645 command: Command::GetMaintenanceStatus,
10646 action: Action::TaskRead,
10647 cancellable: true,
10648 mutation: "read_only",
10649 },
10650 CommandContract {
10651 command: Command::WarmVectorIndex,
10652 action: Action::DataRead,
10653 cancellable: true,
10654 mutation: "read_only",
10655 },
10656 CommandContract {
10657 command: Command::EvaluateVectorRecall,
10658 action: Action::DiagnosticsCreate,
10659 cancellable: true,
10660 mutation: "diagnostic_submit",
10661 },
10662 CommandContract {
10663 command: Command::CalibrateVectorStrategy,
10664 action: Action::DiagnosticsCreate,
10665 cancellable: true,
10666 mutation: "diagnostic_submit",
10667 },
10668 CommandContract {
10669 command: Command::GetVectorDiagnostic,
10670 action: Action::DiagnosticsRead,
10671 cancellable: true,
10672 mutation: "read_only",
10673 },
10674 CommandContract {
10675 command: Command::CreateDiagnostic,
10676 action: Action::DiagnosticsCreate,
10677 cancellable: true,
10678 mutation: "diagnostic_submit",
10679 },
10680 CommandContract {
10681 command: Command::GetDiagnostic,
10682 action: Action::DiagnosticsRead,
10683 cancellable: true,
10684 mutation: "read_only",
10685 },
10686 CommandContract {
10687 command: Command::PrepareCollectionExport,
10688 action: Action::CollectionExport,
10689 cancellable: true,
10690 mutation: "read_only_prepare",
10691 },
10692 CommandContract {
10693 command: Command::StartCollectionExport,
10694 action: Action::CollectionExport,
10695 cancellable: true,
10696 mutation: "portability_submit",
10697 },
10698 CommandContract {
10699 command: Command::ResolveCollectionExport,
10700 action: Action::CollectionExport,
10701 cancellable: true,
10702 mutation: "read_only",
10703 },
10704 CommandContract {
10705 command: Command::VerifyCollectionExport,
10706 action: Action::CollectionExport,
10707 cancellable: true,
10708 mutation: "read_only",
10709 },
10710 CommandContract {
10711 command: Command::PrepareCollectionRestore,
10712 action: Action::CollectionRestore,
10713 cancellable: true,
10714 mutation: "read_only_prepare",
10715 },
10716 CommandContract {
10717 command: Command::StartCollectionRestore,
10718 action: Action::CollectionRestore,
10719 cancellable: true,
10720 mutation: "portability_submit",
10721 },
10722 CommandContract {
10723 command: Command::ResolveCollectionRestore,
10724 action: Action::CollectionRestore,
10725 cancellable: true,
10726 mutation: "read_only",
10727 },
10728 CommandContract {
10729 command: Command::PrepareIndexExport,
10730 action: Action::IndexExport,
10731 cancellable: true,
10732 mutation: "read_only_prepare",
10733 },
10734 CommandContract {
10735 command: Command::StartIndexExport,
10736 action: Action::IndexExport,
10737 cancellable: true,
10738 mutation: "portability_submit",
10739 },
10740 CommandContract {
10741 command: Command::ResolveIndexExport,
10742 action: Action::IndexExport,
10743 cancellable: true,
10744 mutation: "read_only",
10745 },
10746 CommandContract {
10747 command: Command::VerifyIndexExport,
10748 action: Action::IndexExport,
10749 cancellable: true,
10750 mutation: "read_only",
10751 },
10752 CommandContract {
10753 command: Command::PrepareIndexImport,
10754 action: Action::IndexImport,
10755 cancellable: true,
10756 mutation: "read_only_prepare",
10757 },
10758 CommandContract {
10759 command: Command::StartIndexImport,
10760 action: Action::IndexImport,
10761 cancellable: true,
10762 mutation: "portability_submit",
10763 },
10764 CommandContract {
10765 command: Command::ResolveIndexImport,
10766 action: Action::IndexImport,
10767 cancellable: true,
10768 mutation: "read_only",
10769 },
10770 CommandContract {
10771 command: Command::ReadArtifactChunk,
10772 action: Action::OperationRead,
10773 cancellable: true,
10774 mutation: "read_only",
10775 },
10776 CommandContract {
10777 command: Command::ExportUsage,
10778 action: Action::UsageRead,
10779 cancellable: true,
10780 mutation: "read_only",
10781 },
10782 CommandContract {
10783 command: Command::ExecuteStateRead,
10784 action: Action::DataRead,
10785 cancellable: true,
10786 mutation: "read_only",
10787 },
10788 CommandContract {
10789 command: Command::PrepareStateWrite,
10790 action: Action::DataWrite,
10791 cancellable: true,
10792 mutation: "read_only_prepare",
10793 },
10794 CommandContract {
10795 command: Command::SubmitStateWrite,
10796 action: Action::DataWrite,
10797 cancellable: true,
10798 mutation: "state_submit",
10799 },
10800 CommandContract {
10801 command: Command::ResolveStateWrite,
10802 action: Action::DataRead,
10803 cancellable: true,
10804 mutation: "read_only",
10805 },
10806];
10807#[derive(Clone, Copy, Debug, Eq, PartialEq)]
10808pub struct CommandSemanticContract {
10809 pub command: Command,
10810 pub admissible_errors: &'static [ErrorCode],
10811 pub limit_ids: &'static [&'static str],
10812 pub effect_class: &'static str,
10813 pub risk_flags: &'static [&'static str],
10814 pub capability_family: &'static str,
10815 pub retry_safety: &'static str,
10816 pub identity_requirement: &'static str,
10817 pub resolver: Option<Command>,
10818 pub cancellation: &'static str,
10819 pub side_effects: &'static [&'static str],
10820 pub recovery: &'static str,
10821 pub collection_index_ref: &'static str,
10822}
10823pub const LODESTONE_API_COMMAND_SEMANTICS: &[CommandSemanticContract] = &[
10824 CommandSemanticContract {
10825 command: Command::Discover,
10826 admissible_errors: &[
10827 ErrorCode::Aborted,
10828 ErrorCode::DeadlineExceeded,
10829 ErrorCode::InvalidRequest,
10830 ErrorCode::UnsupportedVersion,
10831 ErrorCode::Unauthenticated,
10832 ErrorCode::PermissionDenied,
10833 ErrorCode::NotFound,
10834 ErrorCode::LimitExceeded,
10835 ErrorCode::CapabilityUnavailable,
10836 ErrorCode::TemporarilyUnavailable,
10837 ErrorCode::Internal,
10838 ],
10839 limit_ids: &["request_bytes", "response_bytes"],
10840 effect_class: "read_only",
10841 risk_flags: &[],
10842 capability_family: "discovery",
10843 retry_safety: "safe",
10844 identity_requirement: "none",
10845 resolver: None,
10846 cancellation: "per_call",
10847 side_effects: &[],
10848 recovery: "retry",
10849 collection_index_ref: "none",
10850 },
10851 CommandSemanticContract {
10852 command: Command::ListIndexes,
10853 admissible_errors: &[
10854 ErrorCode::Aborted,
10855 ErrorCode::DeadlineExceeded,
10856 ErrorCode::InvalidRequest,
10857 ErrorCode::UnsupportedVersion,
10858 ErrorCode::Unauthenticated,
10859 ErrorCode::PermissionDenied,
10860 ErrorCode::NotFound,
10861 ErrorCode::StaleCursor,
10862 ErrorCode::RestartBudgetExhausted,
10863 ErrorCode::LimitExceeded,
10864 ErrorCode::CapabilityUnavailable,
10865 ErrorCode::TemporarilyUnavailable,
10866 ErrorCode::Internal,
10867 ],
10868 limit_ids: &[
10869 "request_bytes",
10870 "response_bytes",
10871 "page_size",
10872 "catalog_page_size",
10873 "catalog_restart_budget",
10874 ],
10875 effect_class: "read_only",
10876 risk_flags: &[],
10877 capability_family: "catalog",
10878 retry_safety: "safe",
10879 identity_requirement: "none",
10880 resolver: None,
10881 cancellation: "per_call",
10882 side_effects: &[],
10883 recovery: "retry",
10884 collection_index_ref: "none",
10885 },
10886 CommandSemanticContract {
10887 command: Command::GetIndex,
10888 admissible_errors: &[
10889 ErrorCode::Aborted,
10890 ErrorCode::DeadlineExceeded,
10891 ErrorCode::InvalidRequest,
10892 ErrorCode::UnsupportedVersion,
10893 ErrorCode::Unauthenticated,
10894 ErrorCode::PermissionDenied,
10895 ErrorCode::NotFound,
10896 ErrorCode::LimitExceeded,
10897 ErrorCode::CapabilityUnavailable,
10898 ErrorCode::TemporarilyUnavailable,
10899 ErrorCode::Internal,
10900 ],
10901 limit_ids: &["request_bytes", "response_bytes"],
10902 effect_class: "read_only",
10903 risk_flags: &[],
10904 capability_family: "catalog",
10905 retry_safety: "safe",
10906 identity_requirement: "none",
10907 resolver: None,
10908 cancellation: "per_call",
10909 side_effects: &[],
10910 recovery: "retry",
10911 collection_index_ref: "none",
10912 },
10913 CommandSemanticContract {
10914 command: Command::ValidateIndexChange,
10915 admissible_errors: &[
10916 ErrorCode::Aborted,
10917 ErrorCode::DeadlineExceeded,
10918 ErrorCode::InvalidRequest,
10919 ErrorCode::UnsupportedVersion,
10920 ErrorCode::Unauthenticated,
10921 ErrorCode::PermissionDenied,
10922 ErrorCode::NotFound,
10923 ErrorCode::LimitExceeded,
10924 ErrorCode::CapabilityUnavailable,
10925 ErrorCode::TemporarilyUnavailable,
10926 ErrorCode::Internal,
10927 ],
10928 limit_ids: &["request_bytes", "response_bytes"],
10929 effect_class: "read_only",
10930 risk_flags: &[],
10931 capability_family: "catalog",
10932 retry_safety: "safe",
10933 identity_requirement: "none",
10934 resolver: None,
10935 cancellation: "per_call",
10936 side_effects: &[],
10937 recovery: "retry",
10938 collection_index_ref: "request_name",
10939 },
10940 CommandSemanticContract {
10941 command: Command::ApplyIndexChange,
10942 admissible_errors: &[
10943 ErrorCode::Aborted,
10944 ErrorCode::DeadlineExceeded,
10945 ErrorCode::InvalidRequest,
10946 ErrorCode::UnsupportedVersion,
10947 ErrorCode::Unauthenticated,
10948 ErrorCode::PermissionDenied,
10949 ErrorCode::NotFound,
10950 ErrorCode::Conflict,
10951 ErrorCode::LimitExceeded,
10952 ErrorCode::CapabilityUnavailable,
10953 ErrorCode::NotSubmitted,
10954 ErrorCode::SubmittedIndeterminate,
10955 ErrorCode::ExpiredUnknown,
10956 ErrorCode::TemporarilyUnavailable,
10957 ErrorCode::Internal,
10958 ],
10959 limit_ids: &["request_bytes", "response_bytes"],
10960 effect_class: "durable_submit",
10961 risk_flags: &[],
10962 capability_family: "catalog",
10963 retry_safety: "pre_submit_only",
10964 identity_requirement: "caller_action_id",
10965 resolver: None,
10966 cancellation: "per_call_until_submission_then_resolve",
10967 side_effects: &["commits_authoritative_state"],
10968 recovery: "retry_if_not_submitted",
10969 collection_index_ref: "request_index",
10970 },
10971 CommandSemanticContract {
10972 command: Command::ApplyAdministrationMutation,
10973 admissible_errors: &[
10974 ErrorCode::Aborted,
10975 ErrorCode::DeadlineExceeded,
10976 ErrorCode::InvalidRequest,
10977 ErrorCode::UnsupportedVersion,
10978 ErrorCode::Unauthenticated,
10979 ErrorCode::PermissionDenied,
10980 ErrorCode::NotFound,
10981 ErrorCode::Conflict,
10982 ErrorCode::LimitExceeded,
10983 ErrorCode::CapabilityUnavailable,
10984 ErrorCode::NotSubmitted,
10985 ErrorCode::SubmittedIndeterminate,
10986 ErrorCode::ExpiredUnknown,
10987 ErrorCode::TemporarilyUnavailable,
10988 ErrorCode::Internal,
10989 ],
10990 limit_ids: &["request_bytes", "response_bytes"],
10991 effect_class: "control_write",
10992 risk_flags: &[],
10993 capability_family: "lifecycle",
10994 retry_safety: "pre_submit_only",
10995 identity_requirement: "caller_action_id",
10996 resolver: None,
10997 cancellation: "per_call_until_submission_then_resolve",
10998 side_effects: &["commits_authoritative_state"],
10999 recovery: "retry_if_not_submitted",
11000 collection_index_ref: "none",
11001 },
11002 CommandSemanticContract {
11003 command: Command::ListAliases,
11004 admissible_errors: &[
11005 ErrorCode::Aborted,
11006 ErrorCode::DeadlineExceeded,
11007 ErrorCode::InvalidRequest,
11008 ErrorCode::UnsupportedVersion,
11009 ErrorCode::Unauthenticated,
11010 ErrorCode::PermissionDenied,
11011 ErrorCode::NotFound,
11012 ErrorCode::StaleCursor,
11013 ErrorCode::RestartBudgetExhausted,
11014 ErrorCode::LimitExceeded,
11015 ErrorCode::CapabilityUnavailable,
11016 ErrorCode::TemporarilyUnavailable,
11017 ErrorCode::Internal,
11018 ],
11019 limit_ids: &[
11020 "request_bytes",
11021 "response_bytes",
11022 "page_size",
11023 "catalog_page_size",
11024 "catalog_restart_budget",
11025 ],
11026 effect_class: "read_only",
11027 risk_flags: &[],
11028 capability_family: "catalog",
11029 retry_safety: "safe",
11030 identity_requirement: "none",
11031 resolver: None,
11032 cancellation: "per_call",
11033 side_effects: &[],
11034 recovery: "retry",
11035 collection_index_ref: "none",
11036 },
11037 CommandSemanticContract {
11038 command: Command::GetAlias,
11039 admissible_errors: &[
11040 ErrorCode::Aborted,
11041 ErrorCode::DeadlineExceeded,
11042 ErrorCode::InvalidRequest,
11043 ErrorCode::UnsupportedVersion,
11044 ErrorCode::Unauthenticated,
11045 ErrorCode::PermissionDenied,
11046 ErrorCode::NotFound,
11047 ErrorCode::LimitExceeded,
11048 ErrorCode::CapabilityUnavailable,
11049 ErrorCode::TemporarilyUnavailable,
11050 ErrorCode::Internal,
11051 ],
11052 limit_ids: &["request_bytes", "response_bytes"],
11053 effect_class: "read_only",
11054 risk_flags: &[],
11055 capability_family: "catalog",
11056 retry_safety: "safe",
11057 identity_requirement: "none",
11058 resolver: None,
11059 cancellation: "per_call",
11060 side_effects: &[],
11061 recovery: "retry",
11062 collection_index_ref: "none",
11063 },
11064 CommandSemanticContract {
11065 command: Command::ListDataStreams,
11066 admissible_errors: &[
11067 ErrorCode::Aborted,
11068 ErrorCode::DeadlineExceeded,
11069 ErrorCode::InvalidRequest,
11070 ErrorCode::UnsupportedVersion,
11071 ErrorCode::Unauthenticated,
11072 ErrorCode::PermissionDenied,
11073 ErrorCode::NotFound,
11074 ErrorCode::StaleCursor,
11075 ErrorCode::RestartBudgetExhausted,
11076 ErrorCode::LimitExceeded,
11077 ErrorCode::CapabilityUnavailable,
11078 ErrorCode::TemporarilyUnavailable,
11079 ErrorCode::Internal,
11080 ],
11081 limit_ids: &[
11082 "request_bytes",
11083 "response_bytes",
11084 "page_size",
11085 "catalog_page_size",
11086 "catalog_restart_budget",
11087 ],
11088 effect_class: "read_only",
11089 risk_flags: &[],
11090 capability_family: "catalog",
11091 retry_safety: "safe",
11092 identity_requirement: "none",
11093 resolver: None,
11094 cancellation: "per_call",
11095 side_effects: &[],
11096 recovery: "retry",
11097 collection_index_ref: "none",
11098 },
11099 CommandSemanticContract {
11100 command: Command::GetDataStream,
11101 admissible_errors: &[
11102 ErrorCode::Aborted,
11103 ErrorCode::DeadlineExceeded,
11104 ErrorCode::InvalidRequest,
11105 ErrorCode::UnsupportedVersion,
11106 ErrorCode::Unauthenticated,
11107 ErrorCode::PermissionDenied,
11108 ErrorCode::NotFound,
11109 ErrorCode::LimitExceeded,
11110 ErrorCode::CapabilityUnavailable,
11111 ErrorCode::TemporarilyUnavailable,
11112 ErrorCode::Internal,
11113 ],
11114 limit_ids: &["request_bytes", "response_bytes"],
11115 effect_class: "read_only",
11116 risk_flags: &[],
11117 capability_family: "catalog",
11118 retry_safety: "safe",
11119 identity_requirement: "none",
11120 resolver: None,
11121 cancellation: "per_call",
11122 side_effects: &[],
11123 recovery: "retry",
11124 collection_index_ref: "none",
11125 },
11126 CommandSemanticContract {
11127 command: Command::ListComponentTemplates,
11128 admissible_errors: &[
11129 ErrorCode::Aborted,
11130 ErrorCode::DeadlineExceeded,
11131 ErrorCode::InvalidRequest,
11132 ErrorCode::UnsupportedVersion,
11133 ErrorCode::Unauthenticated,
11134 ErrorCode::PermissionDenied,
11135 ErrorCode::NotFound,
11136 ErrorCode::StaleCursor,
11137 ErrorCode::RestartBudgetExhausted,
11138 ErrorCode::LimitExceeded,
11139 ErrorCode::CapabilityUnavailable,
11140 ErrorCode::TemporarilyUnavailable,
11141 ErrorCode::Internal,
11142 ],
11143 limit_ids: &[
11144 "request_bytes",
11145 "response_bytes",
11146 "page_size",
11147 "catalog_page_size",
11148 "catalog_restart_budget",
11149 ],
11150 effect_class: "read_only",
11151 risk_flags: &[],
11152 capability_family: "catalog",
11153 retry_safety: "safe",
11154 identity_requirement: "none",
11155 resolver: None,
11156 cancellation: "per_call",
11157 side_effects: &[],
11158 recovery: "retry",
11159 collection_index_ref: "none",
11160 },
11161 CommandSemanticContract {
11162 command: Command::GetComponentTemplate,
11163 admissible_errors: &[
11164 ErrorCode::Aborted,
11165 ErrorCode::DeadlineExceeded,
11166 ErrorCode::InvalidRequest,
11167 ErrorCode::UnsupportedVersion,
11168 ErrorCode::Unauthenticated,
11169 ErrorCode::PermissionDenied,
11170 ErrorCode::NotFound,
11171 ErrorCode::LimitExceeded,
11172 ErrorCode::CapabilityUnavailable,
11173 ErrorCode::TemporarilyUnavailable,
11174 ErrorCode::Internal,
11175 ],
11176 limit_ids: &["request_bytes", "response_bytes"],
11177 effect_class: "read_only",
11178 risk_flags: &[],
11179 capability_family: "catalog",
11180 retry_safety: "safe",
11181 identity_requirement: "none",
11182 resolver: None,
11183 cancellation: "per_call",
11184 side_effects: &[],
11185 recovery: "retry",
11186 collection_index_ref: "none",
11187 },
11188 CommandSemanticContract {
11189 command: Command::ListIndexTemplates,
11190 admissible_errors: &[
11191 ErrorCode::Aborted,
11192 ErrorCode::DeadlineExceeded,
11193 ErrorCode::InvalidRequest,
11194 ErrorCode::UnsupportedVersion,
11195 ErrorCode::Unauthenticated,
11196 ErrorCode::PermissionDenied,
11197 ErrorCode::NotFound,
11198 ErrorCode::StaleCursor,
11199 ErrorCode::RestartBudgetExhausted,
11200 ErrorCode::LimitExceeded,
11201 ErrorCode::CapabilityUnavailable,
11202 ErrorCode::TemporarilyUnavailable,
11203 ErrorCode::Internal,
11204 ],
11205 limit_ids: &[
11206 "request_bytes",
11207 "response_bytes",
11208 "page_size",
11209 "catalog_page_size",
11210 "catalog_restart_budget",
11211 ],
11212 effect_class: "read_only",
11213 risk_flags: &[],
11214 capability_family: "catalog",
11215 retry_safety: "safe",
11216 identity_requirement: "none",
11217 resolver: None,
11218 cancellation: "per_call",
11219 side_effects: &[],
11220 recovery: "retry",
11221 collection_index_ref: "none",
11222 },
11223 CommandSemanticContract {
11224 command: Command::GetIndexTemplate,
11225 admissible_errors: &[
11226 ErrorCode::Aborted,
11227 ErrorCode::DeadlineExceeded,
11228 ErrorCode::InvalidRequest,
11229 ErrorCode::UnsupportedVersion,
11230 ErrorCode::Unauthenticated,
11231 ErrorCode::PermissionDenied,
11232 ErrorCode::NotFound,
11233 ErrorCode::LimitExceeded,
11234 ErrorCode::CapabilityUnavailable,
11235 ErrorCode::TemporarilyUnavailable,
11236 ErrorCode::Internal,
11237 ],
11238 limit_ids: &["request_bytes", "response_bytes"],
11239 effect_class: "read_only",
11240 risk_flags: &[],
11241 capability_family: "catalog",
11242 retry_safety: "safe",
11243 identity_requirement: "none",
11244 resolver: None,
11245 cancellation: "per_call",
11246 side_effects: &[],
11247 recovery: "retry",
11248 collection_index_ref: "none",
11249 },
11250 CommandSemanticContract {
11251 command: Command::ListIngestPipelines,
11252 admissible_errors: &[
11253 ErrorCode::Aborted,
11254 ErrorCode::DeadlineExceeded,
11255 ErrorCode::InvalidRequest,
11256 ErrorCode::UnsupportedVersion,
11257 ErrorCode::Unauthenticated,
11258 ErrorCode::PermissionDenied,
11259 ErrorCode::NotFound,
11260 ErrorCode::StaleCursor,
11261 ErrorCode::RestartBudgetExhausted,
11262 ErrorCode::LimitExceeded,
11263 ErrorCode::CapabilityUnavailable,
11264 ErrorCode::TemporarilyUnavailable,
11265 ErrorCode::Internal,
11266 ],
11267 limit_ids: &[
11268 "request_bytes",
11269 "response_bytes",
11270 "page_size",
11271 "catalog_page_size",
11272 "catalog_restart_budget",
11273 ],
11274 effect_class: "read_only",
11275 risk_flags: &[],
11276 capability_family: "lifecycle",
11277 retry_safety: "safe",
11278 identity_requirement: "none",
11279 resolver: None,
11280 cancellation: "per_call",
11281 side_effects: &[],
11282 recovery: "retry",
11283 collection_index_ref: "none",
11284 },
11285 CommandSemanticContract {
11286 command: Command::GetIngestPipeline,
11287 admissible_errors: &[
11288 ErrorCode::Aborted,
11289 ErrorCode::DeadlineExceeded,
11290 ErrorCode::InvalidRequest,
11291 ErrorCode::UnsupportedVersion,
11292 ErrorCode::Unauthenticated,
11293 ErrorCode::PermissionDenied,
11294 ErrorCode::NotFound,
11295 ErrorCode::LimitExceeded,
11296 ErrorCode::CapabilityUnavailable,
11297 ErrorCode::TemporarilyUnavailable,
11298 ErrorCode::Internal,
11299 ],
11300 limit_ids: &["request_bytes", "response_bytes"],
11301 effect_class: "read_only",
11302 risk_flags: &[],
11303 capability_family: "lifecycle",
11304 retry_safety: "safe",
11305 identity_requirement: "none",
11306 resolver: None,
11307 cancellation: "per_call",
11308 side_effects: &[],
11309 recovery: "retry",
11310 collection_index_ref: "none",
11311 },
11312 CommandSemanticContract {
11313 command: Command::SimulateIngestPipeline,
11314 admissible_errors: &[
11315 ErrorCode::Aborted,
11316 ErrorCode::DeadlineExceeded,
11317 ErrorCode::InvalidRequest,
11318 ErrorCode::UnsupportedVersion,
11319 ErrorCode::Unauthenticated,
11320 ErrorCode::PermissionDenied,
11321 ErrorCode::NotFound,
11322 ErrorCode::LimitExceeded,
11323 ErrorCode::CapabilityUnavailable,
11324 ErrorCode::TemporarilyUnavailable,
11325 ErrorCode::Internal,
11326 ],
11327 limit_ids: &["request_bytes", "response_bytes"],
11328 effect_class: "read_only",
11329 risk_flags: &[],
11330 capability_family: "lifecycle",
11331 retry_safety: "safe",
11332 identity_requirement: "none",
11333 resolver: None,
11334 cancellation: "per_call",
11335 side_effects: &[],
11336 recovery: "retry",
11337 collection_index_ref: "none",
11338 },
11339 CommandSemanticContract {
11340 command: Command::ReprocessByQuery,
11341 admissible_errors: &[
11342 ErrorCode::Aborted,
11343 ErrorCode::DeadlineExceeded,
11344 ErrorCode::InvalidRequest,
11345 ErrorCode::UnsupportedVersion,
11346 ErrorCode::Unauthenticated,
11347 ErrorCode::PermissionDenied,
11348 ErrorCode::NotFound,
11349 ErrorCode::Conflict,
11350 ErrorCode::LimitExceeded,
11351 ErrorCode::CapabilityUnavailable,
11352 ErrorCode::NotSubmitted,
11353 ErrorCode::SubmittedIndeterminate,
11354 ErrorCode::ExpiredUnknown,
11355 ErrorCode::TemporarilyUnavailable,
11356 ErrorCode::Internal,
11357 ],
11358 limit_ids: &["request_bytes", "response_bytes"],
11359 effect_class: "durable_submit",
11360 risk_flags: &[],
11361 capability_family: "data",
11362 retry_safety: "safe",
11363 identity_requirement: "caller_action_id",
11364 resolver: None,
11365 cancellation: "per_call_until_submission_then_resolve",
11366 side_effects: &["commits_authoritative_state"],
11367 recovery: "retry",
11368 collection_index_ref: "request_index",
11369 },
11370 CommandSemanticContract {
11371 command: Command::ListLifecyclePolicies,
11372 admissible_errors: &[
11373 ErrorCode::Aborted,
11374 ErrorCode::DeadlineExceeded,
11375 ErrorCode::InvalidRequest,
11376 ErrorCode::UnsupportedVersion,
11377 ErrorCode::Unauthenticated,
11378 ErrorCode::PermissionDenied,
11379 ErrorCode::NotFound,
11380 ErrorCode::StaleCursor,
11381 ErrorCode::RestartBudgetExhausted,
11382 ErrorCode::LimitExceeded,
11383 ErrorCode::CapabilityUnavailable,
11384 ErrorCode::TemporarilyUnavailable,
11385 ErrorCode::Internal,
11386 ],
11387 limit_ids: &[
11388 "request_bytes",
11389 "response_bytes",
11390 "page_size",
11391 "catalog_page_size",
11392 "catalog_restart_budget",
11393 ],
11394 effect_class: "read_only",
11395 risk_flags: &[],
11396 capability_family: "catalog",
11397 retry_safety: "safe",
11398 identity_requirement: "none",
11399 resolver: None,
11400 cancellation: "per_call",
11401 side_effects: &[],
11402 recovery: "retry",
11403 collection_index_ref: "none",
11404 },
11405 CommandSemanticContract {
11406 command: Command::GetLifecyclePolicy,
11407 admissible_errors: &[
11408 ErrorCode::Aborted,
11409 ErrorCode::DeadlineExceeded,
11410 ErrorCode::InvalidRequest,
11411 ErrorCode::UnsupportedVersion,
11412 ErrorCode::Unauthenticated,
11413 ErrorCode::PermissionDenied,
11414 ErrorCode::NotFound,
11415 ErrorCode::LimitExceeded,
11416 ErrorCode::CapabilityUnavailable,
11417 ErrorCode::TemporarilyUnavailable,
11418 ErrorCode::Internal,
11419 ],
11420 limit_ids: &["request_bytes", "response_bytes"],
11421 effect_class: "read_only",
11422 risk_flags: &[],
11423 capability_family: "catalog",
11424 retry_safety: "safe",
11425 identity_requirement: "none",
11426 resolver: None,
11427 cancellation: "per_call",
11428 side_effects: &[],
11429 recovery: "retry",
11430 collection_index_ref: "none",
11431 },
11432 CommandSemanticContract {
11433 command: Command::PrepareCreateIndex,
11434 admissible_errors: &[
11435 ErrorCode::Aborted,
11436 ErrorCode::DeadlineExceeded,
11437 ErrorCode::InvalidRequest,
11438 ErrorCode::UnsupportedVersion,
11439 ErrorCode::Unauthenticated,
11440 ErrorCode::PermissionDenied,
11441 ErrorCode::NotFound,
11442 ErrorCode::LimitExceeded,
11443 ErrorCode::CapabilityUnavailable,
11444 ErrorCode::TemporarilyUnavailable,
11445 ErrorCode::Internal,
11446 ],
11447 limit_ids: &[
11448 "request_bytes",
11449 "response_bytes",
11450 "resource_initial_shards",
11451 "resource_target_shard_bytes",
11452 "resource_admission_weight",
11453 "resource_ram_bytes",
11454 "resource_nvme_bytes",
11455 "resource_refresh_millis",
11456 "resource_memtable_bytes",
11457 "resource_parallelism",
11458 ],
11459 effect_class: "prepare",
11460 risk_flags: &[],
11461 capability_family: "catalog",
11462 retry_safety: "safe",
11463 identity_requirement: "server_locator",
11464 resolver: None,
11465 cancellation: "per_call",
11466 side_effects: &["creates_bounded_preparation"],
11467 recovery: "retry",
11468 collection_index_ref: "request_name",
11469 },
11470 CommandSemanticContract {
11471 command: Command::PrepareDeleteIndex,
11472 admissible_errors: &[
11473 ErrorCode::Aborted,
11474 ErrorCode::DeadlineExceeded,
11475 ErrorCode::InvalidRequest,
11476 ErrorCode::UnsupportedVersion,
11477 ErrorCode::Unauthenticated,
11478 ErrorCode::PermissionDenied,
11479 ErrorCode::NotFound,
11480 ErrorCode::LimitExceeded,
11481 ErrorCode::CapabilityUnavailable,
11482 ErrorCode::TemporarilyUnavailable,
11483 ErrorCode::Internal,
11484 ],
11485 limit_ids: &["request_bytes", "response_bytes"],
11486 effect_class: "prepare",
11487 risk_flags: &["destructive"],
11488 capability_family: "catalog",
11489 retry_safety: "safe",
11490 identity_requirement: "server_locator",
11491 resolver: None,
11492 cancellation: "per_call",
11493 side_effects: &["creates_bounded_preparation"],
11494 recovery: "retry",
11495 collection_index_ref: "request_name",
11496 },
11497 CommandSemanticContract {
11498 command: Command::SubmitCatalogAction,
11499 admissible_errors: &[
11500 ErrorCode::Aborted,
11501 ErrorCode::DeadlineExceeded,
11502 ErrorCode::InvalidRequest,
11503 ErrorCode::UnsupportedVersion,
11504 ErrorCode::Unauthenticated,
11505 ErrorCode::PermissionDenied,
11506 ErrorCode::NotFound,
11507 ErrorCode::Conflict,
11508 ErrorCode::LimitExceeded,
11509 ErrorCode::CapabilityUnavailable,
11510 ErrorCode::NotSubmitted,
11511 ErrorCode::SubmittedIndeterminate,
11512 ErrorCode::ExpiredUnknown,
11513 ErrorCode::TemporarilyUnavailable,
11514 ErrorCode::Internal,
11515 ],
11516 limit_ids: &[
11517 "request_bytes",
11518 "response_bytes",
11519 "resource_initial_shards",
11520 "resource_target_shard_bytes",
11521 "resource_admission_weight",
11522 "resource_ram_bytes",
11523 "resource_nvme_bytes",
11524 "resource_refresh_millis",
11525 "resource_memtable_bytes",
11526 "resource_parallelism",
11527 ],
11528 effect_class: "durable_submit",
11529 risk_flags: &[],
11530 capability_family: "catalog",
11531 retry_safety: "pre_submit_only",
11532 identity_requirement: "request_locator",
11533 resolver: Some(Command::ResolveCatalogAction),
11534 cancellation: "per_call_until_submission_then_resolve",
11535 side_effects: &["commits_authoritative_state"],
11536 recovery: "resolve_with_resolve_catalog_action",
11537 collection_index_ref: "request_name",
11538 },
11539 CommandSemanticContract {
11540 command: Command::ResolveCatalogAction,
11541 admissible_errors: &[
11542 ErrorCode::Aborted,
11543 ErrorCode::DeadlineExceeded,
11544 ErrorCode::InvalidRequest,
11545 ErrorCode::UnsupportedVersion,
11546 ErrorCode::Unauthenticated,
11547 ErrorCode::PermissionDenied,
11548 ErrorCode::NotFound,
11549 ErrorCode::LimitExceeded,
11550 ErrorCode::CapabilityUnavailable,
11551 ErrorCode::TemporarilyUnavailable,
11552 ErrorCode::Internal,
11553 ],
11554 limit_ids: &["request_bytes", "response_bytes"],
11555 effect_class: "read_only",
11556 risk_flags: &[],
11557 capability_family: "catalog",
11558 retry_safety: "safe",
11559 identity_requirement: "request_locator",
11560 resolver: None,
11561 cancellation: "per_call",
11562 side_effects: &[],
11563 recovery: "retry",
11564 collection_index_ref: "caller",
11565 },
11566 CommandSemanticContract {
11567 command: Command::PrepareReplayableSourceIndex,
11568 admissible_errors: &[
11569 ErrorCode::Aborted,
11570 ErrorCode::DeadlineExceeded,
11571 ErrorCode::InvalidRequest,
11572 ErrorCode::UnsupportedVersion,
11573 ErrorCode::Unauthenticated,
11574 ErrorCode::PermissionDenied,
11575 ErrorCode::NotFound,
11576 ErrorCode::LimitExceeded,
11577 ErrorCode::CapabilityUnavailable,
11578 ErrorCode::RetentionGap,
11579 ErrorCode::TemporarilyUnavailable,
11580 ErrorCode::Internal,
11581 ],
11582 limit_ids: &[
11583 "request_bytes",
11584 "response_bytes",
11585 "resource_initial_shards",
11586 "resource_target_shard_bytes",
11587 "resource_admission_weight",
11588 "resource_ram_bytes",
11589 "resource_nvme_bytes",
11590 "resource_refresh_millis",
11591 "resource_memtable_bytes",
11592 "resource_parallelism",
11593 ],
11594 effect_class: "prepare",
11595 risk_flags: &[],
11596 capability_family: "catalog",
11597 retry_safety: "safe",
11598 identity_requirement: "server_locator",
11599 resolver: None,
11600 cancellation: "per_call",
11601 side_effects: &["creates_bounded_preparation"],
11602 recovery: "retry",
11603 collection_index_ref: "request_name",
11604 },
11605 CommandSemanticContract {
11606 command: Command::SubmitReplayableSourceIndex,
11607 admissible_errors: &[
11608 ErrorCode::Aborted,
11609 ErrorCode::DeadlineExceeded,
11610 ErrorCode::InvalidRequest,
11611 ErrorCode::UnsupportedVersion,
11612 ErrorCode::Unauthenticated,
11613 ErrorCode::PermissionDenied,
11614 ErrorCode::NotFound,
11615 ErrorCode::Conflict,
11616 ErrorCode::LimitExceeded,
11617 ErrorCode::CapabilityUnavailable,
11618 ErrorCode::NotSubmitted,
11619 ErrorCode::SubmittedIndeterminate,
11620 ErrorCode::ExpiredUnknown,
11621 ErrorCode::RetentionGap,
11622 ErrorCode::TemporarilyUnavailable,
11623 ErrorCode::Internal,
11624 ],
11625 limit_ids: &[
11626 "request_bytes",
11627 "response_bytes",
11628 "resource_initial_shards",
11629 "resource_target_shard_bytes",
11630 "resource_admission_weight",
11631 "resource_ram_bytes",
11632 "resource_nvme_bytes",
11633 "resource_refresh_millis",
11634 "resource_memtable_bytes",
11635 "resource_parallelism",
11636 ],
11637 effect_class: "durable_submit",
11638 risk_flags: &[],
11639 capability_family: "catalog",
11640 retry_safety: "pre_submit_only",
11641 identity_requirement: "request_locator",
11642 resolver: Some(Command::ResolveCatalogAction),
11643 cancellation: "per_call_until_submission_then_resolve",
11644 side_effects: &["commits_authoritative_state"],
11645 recovery: "resolve_with_resolve_catalog_action",
11646 collection_index_ref: "request_name",
11647 },
11648 CommandSemanticContract {
11649 command: Command::GetReplayableSource,
11650 admissible_errors: &[
11651 ErrorCode::Aborted,
11652 ErrorCode::DeadlineExceeded,
11653 ErrorCode::InvalidRequest,
11654 ErrorCode::UnsupportedVersion,
11655 ErrorCode::Unauthenticated,
11656 ErrorCode::PermissionDenied,
11657 ErrorCode::NotFound,
11658 ErrorCode::LimitExceeded,
11659 ErrorCode::CapabilityUnavailable,
11660 ErrorCode::RetentionGap,
11661 ErrorCode::TemporarilyUnavailable,
11662 ErrorCode::Internal,
11663 ],
11664 limit_ids: &["request_bytes", "response_bytes"],
11665 effect_class: "read_only",
11666 risk_flags: &[],
11667 capability_family: "catalog",
11668 retry_safety: "safe",
11669 identity_requirement: "none",
11670 resolver: None,
11671 cancellation: "per_call",
11672 side_effects: &[],
11673 recovery: "retry",
11674 collection_index_ref: "none",
11675 },
11676 CommandSemanticContract {
11677 command: Command::ControlReplayableSource,
11678 admissible_errors: &[
11679 ErrorCode::Aborted,
11680 ErrorCode::DeadlineExceeded,
11681 ErrorCode::InvalidRequest,
11682 ErrorCode::UnsupportedVersion,
11683 ErrorCode::Unauthenticated,
11684 ErrorCode::PermissionDenied,
11685 ErrorCode::NotFound,
11686 ErrorCode::Conflict,
11687 ErrorCode::LimitExceeded,
11688 ErrorCode::CapabilityUnavailable,
11689 ErrorCode::NotSubmitted,
11690 ErrorCode::SubmittedIndeterminate,
11691 ErrorCode::ExpiredUnknown,
11692 ErrorCode::RetentionGap,
11693 ErrorCode::TemporarilyUnavailable,
11694 ErrorCode::Internal,
11695 ],
11696 limit_ids: &["request_bytes", "response_bytes"],
11697 effect_class: "durable_submit",
11698 risk_flags: &[],
11699 capability_family: "catalog",
11700 retry_safety: "pre_submit_only",
11701 identity_requirement: "none",
11702 resolver: None,
11703 cancellation: "per_call_until_submission_then_resolve",
11704 side_effects: &["commits_authoritative_state"],
11705 recovery: "retry_if_not_submitted",
11706 collection_index_ref: "request_index",
11707 },
11708 CommandSemanticContract {
11709 command: Command::CloneIndex,
11710 admissible_errors: &[
11711 ErrorCode::Aborted,
11712 ErrorCode::DeadlineExceeded,
11713 ErrorCode::InvalidRequest,
11714 ErrorCode::UnsupportedVersion,
11715 ErrorCode::Unauthenticated,
11716 ErrorCode::PermissionDenied,
11717 ErrorCode::NotFound,
11718 ErrorCode::Conflict,
11719 ErrorCode::LimitExceeded,
11720 ErrorCode::CapabilityUnavailable,
11721 ErrorCode::NotSubmitted,
11722 ErrorCode::SubmittedIndeterminate,
11723 ErrorCode::ExpiredUnknown,
11724 ErrorCode::TemporarilyUnavailable,
11725 ErrorCode::Internal,
11726 ],
11727 limit_ids: &["request_bytes", "response_bytes"],
11728 effect_class: "durable_submit",
11729 risk_flags: &[],
11730 capability_family: "catalog",
11731 retry_safety: "pre_submit_only",
11732 identity_requirement: "caller_action_id",
11733 resolver: Some(Command::CloneIndex),
11734 cancellation: "per_call_until_submission_then_resolve",
11735 side_effects: &["commits_authoritative_state"],
11736 recovery: "resolve_with_clone_index",
11737 collection_index_ref: "caller",
11738 },
11739 CommandSemanticContract {
11740 command: Command::ConfigureHistory,
11741 admissible_errors: &[
11742 ErrorCode::Aborted,
11743 ErrorCode::DeadlineExceeded,
11744 ErrorCode::InvalidRequest,
11745 ErrorCode::UnsupportedVersion,
11746 ErrorCode::Unauthenticated,
11747 ErrorCode::PermissionDenied,
11748 ErrorCode::NotFound,
11749 ErrorCode::Conflict,
11750 ErrorCode::LimitExceeded,
11751 ErrorCode::CapabilityUnavailable,
11752 ErrorCode::NotSubmitted,
11753 ErrorCode::SubmittedIndeterminate,
11754 ErrorCode::ExpiredUnknown,
11755 ErrorCode::TemporarilyUnavailable,
11756 ErrorCode::Internal,
11757 ],
11758 limit_ids: &["request_bytes", "response_bytes"],
11759 effect_class: "durable_submit",
11760 risk_flags: &[],
11761 capability_family: "catalog",
11762 retry_safety: "pre_submit_only",
11763 identity_requirement: "none",
11764 resolver: Some(Command::GetHistory),
11765 cancellation: "per_call_until_submission_then_resolve",
11766 side_effects: &["commits_authoritative_state"],
11767 recovery: "resolve_with_get_history",
11768 collection_index_ref: "request_index",
11769 },
11770 CommandSemanticContract {
11771 command: Command::GetHistory,
11772 admissible_errors: &[
11773 ErrorCode::Aborted,
11774 ErrorCode::DeadlineExceeded,
11775 ErrorCode::InvalidRequest,
11776 ErrorCode::UnsupportedVersion,
11777 ErrorCode::Unauthenticated,
11778 ErrorCode::PermissionDenied,
11779 ErrorCode::NotFound,
11780 ErrorCode::LimitExceeded,
11781 ErrorCode::CapabilityUnavailable,
11782 ErrorCode::TemporarilyUnavailable,
11783 ErrorCode::Internal,
11784 ],
11785 limit_ids: &["request_bytes", "response_bytes"],
11786 effect_class: "read_only",
11787 risk_flags: &[],
11788 capability_family: "catalog",
11789 retry_safety: "safe",
11790 identity_requirement: "none",
11791 resolver: None,
11792 cancellation: "per_call",
11793 side_effects: &[],
11794 recovery: "retry",
11795 collection_index_ref: "none",
11796 },
11797 CommandSemanticContract {
11798 command: Command::ResolveHistory,
11799 admissible_errors: &[
11800 ErrorCode::Aborted,
11801 ErrorCode::DeadlineExceeded,
11802 ErrorCode::InvalidRequest,
11803 ErrorCode::UnsupportedVersion,
11804 ErrorCode::Unauthenticated,
11805 ErrorCode::PermissionDenied,
11806 ErrorCode::NotFound,
11807 ErrorCode::LimitExceeded,
11808 ErrorCode::CapabilityUnavailable,
11809 ErrorCode::RetentionGap,
11810 ErrorCode::TemporarilyUnavailable,
11811 ErrorCode::Internal,
11812 ],
11813 limit_ids: &["request_bytes", "response_bytes"],
11814 effect_class: "read_only",
11815 risk_flags: &[],
11816 capability_family: "data",
11817 retry_safety: "safe",
11818 identity_requirement: "none",
11819 resolver: None,
11820 cancellation: "per_call",
11821 side_effects: &[],
11822 recovery: "retry",
11823 collection_index_ref: "request_index",
11824 },
11825 CommandSemanticContract {
11826 command: Command::PlaceHistoryHold,
11827 admissible_errors: &[
11828 ErrorCode::Aborted,
11829 ErrorCode::DeadlineExceeded,
11830 ErrorCode::InvalidRequest,
11831 ErrorCode::UnsupportedVersion,
11832 ErrorCode::Unauthenticated,
11833 ErrorCode::PermissionDenied,
11834 ErrorCode::NotFound,
11835 ErrorCode::Conflict,
11836 ErrorCode::LimitExceeded,
11837 ErrorCode::CapabilityUnavailable,
11838 ErrorCode::NotSubmitted,
11839 ErrorCode::SubmittedIndeterminate,
11840 ErrorCode::ExpiredUnknown,
11841 ErrorCode::TemporarilyUnavailable,
11842 ErrorCode::Internal,
11843 ],
11844 limit_ids: &["request_bytes", "response_bytes"],
11845 effect_class: "durable_submit",
11846 risk_flags: &[],
11847 capability_family: "catalog",
11848 retry_safety: "pre_submit_only",
11849 identity_requirement: "none",
11850 resolver: Some(Command::GetHistory),
11851 cancellation: "per_call_until_submission_then_resolve",
11852 side_effects: &["commits_authoritative_state"],
11853 recovery: "resolve_with_get_history",
11854 collection_index_ref: "request_index",
11855 },
11856 CommandSemanticContract {
11857 command: Command::ReleaseHistoryHold,
11858 admissible_errors: &[
11859 ErrorCode::Aborted,
11860 ErrorCode::DeadlineExceeded,
11861 ErrorCode::InvalidRequest,
11862 ErrorCode::UnsupportedVersion,
11863 ErrorCode::Unauthenticated,
11864 ErrorCode::PermissionDenied,
11865 ErrorCode::NotFound,
11866 ErrorCode::Conflict,
11867 ErrorCode::LimitExceeded,
11868 ErrorCode::CapabilityUnavailable,
11869 ErrorCode::NotSubmitted,
11870 ErrorCode::SubmittedIndeterminate,
11871 ErrorCode::ExpiredUnknown,
11872 ErrorCode::TemporarilyUnavailable,
11873 ErrorCode::Internal,
11874 ],
11875 limit_ids: &["request_bytes", "response_bytes"],
11876 effect_class: "durable_submit",
11877 risk_flags: &[],
11878 capability_family: "catalog",
11879 retry_safety: "pre_submit_only",
11880 identity_requirement: "none",
11881 resolver: Some(Command::GetHistory),
11882 cancellation: "per_call_until_submission_then_resolve",
11883 side_effects: &["commits_authoritative_state"],
11884 recovery: "resolve_with_get_history",
11885 collection_index_ref: "request_index",
11886 },
11887 CommandSemanticContract {
11888 command: Command::PrepareDocumentMutation,
11889 admissible_errors: &[
11890 ErrorCode::Aborted,
11891 ErrorCode::DeadlineExceeded,
11892 ErrorCode::InvalidRequest,
11893 ErrorCode::UnsupportedVersion,
11894 ErrorCode::Unauthenticated,
11895 ErrorCode::PermissionDenied,
11896 ErrorCode::NotFound,
11897 ErrorCode::LimitExceeded,
11898 ErrorCode::CapabilityUnavailable,
11899 ErrorCode::TemporarilyUnavailable,
11900 ErrorCode::Internal,
11901 ],
11902 limit_ids: &["request_bytes", "response_bytes"],
11903 effect_class: "prepare",
11904 risk_flags: &[],
11905 capability_family: "data",
11906 retry_safety: "safe",
11907 identity_requirement: "server_locator",
11908 resolver: None,
11909 cancellation: "per_call",
11910 side_effects: &["creates_bounded_preparation"],
11911 recovery: "retry",
11912 collection_index_ref: "request_index",
11913 },
11914 CommandSemanticContract {
11915 command: Command::SubmitDocumentMutation,
11916 admissible_errors: &[
11917 ErrorCode::Aborted,
11918 ErrorCode::DeadlineExceeded,
11919 ErrorCode::InvalidRequest,
11920 ErrorCode::UnsupportedVersion,
11921 ErrorCode::Unauthenticated,
11922 ErrorCode::PermissionDenied,
11923 ErrorCode::NotFound,
11924 ErrorCode::Conflict,
11925 ErrorCode::LimitExceeded,
11926 ErrorCode::CapabilityUnavailable,
11927 ErrorCode::NotSubmitted,
11928 ErrorCode::SubmittedIndeterminate,
11929 ErrorCode::ExpiredUnknown,
11930 ErrorCode::TemporarilyUnavailable,
11931 ErrorCode::Internal,
11932 ],
11933 limit_ids: &["request_bytes", "response_bytes"],
11934 effect_class: "durable_submit",
11935 risk_flags: &[],
11936 capability_family: "data",
11937 retry_safety: "pre_submit_only",
11938 identity_requirement: "request_locator",
11939 resolver: Some(Command::ResolveDocumentMutation),
11940 cancellation: "per_call_until_submission_then_resolve",
11941 side_effects: &["commits_authoritative_state"],
11942 recovery: "resolve_with_resolve_document_mutation",
11943 collection_index_ref: "request_index",
11944 },
11945 CommandSemanticContract {
11946 command: Command::PrepareDocumentBulk,
11947 admissible_errors: &[
11948 ErrorCode::Aborted,
11949 ErrorCode::DeadlineExceeded,
11950 ErrorCode::InvalidRequest,
11951 ErrorCode::UnsupportedVersion,
11952 ErrorCode::Unauthenticated,
11953 ErrorCode::PermissionDenied,
11954 ErrorCode::NotFound,
11955 ErrorCode::LimitExceeded,
11956 ErrorCode::CapabilityUnavailable,
11957 ErrorCode::TemporarilyUnavailable,
11958 ErrorCode::Internal,
11959 ],
11960 limit_ids: &[
11961 "request_bytes",
11962 "response_bytes",
11963 "bulk_document_items",
11964 "bulk_document_bytes",
11965 ],
11966 effect_class: "prepare",
11967 risk_flags: &[],
11968 capability_family: "data",
11969 retry_safety: "safe",
11970 identity_requirement: "caller_action_id",
11971 resolver: None,
11972 cancellation: "per_call",
11973 side_effects: &["creates_bounded_preparation"],
11974 recovery: "retry",
11975 collection_index_ref: "request_index",
11976 },
11977 CommandSemanticContract {
11978 command: Command::SubmitDocumentBulk,
11979 admissible_errors: &[
11980 ErrorCode::Aborted,
11981 ErrorCode::DeadlineExceeded,
11982 ErrorCode::InvalidRequest,
11983 ErrorCode::UnsupportedVersion,
11984 ErrorCode::Unauthenticated,
11985 ErrorCode::PermissionDenied,
11986 ErrorCode::NotFound,
11987 ErrorCode::Conflict,
11988 ErrorCode::LimitExceeded,
11989 ErrorCode::CapabilityUnavailable,
11990 ErrorCode::NotSubmitted,
11991 ErrorCode::SubmittedIndeterminate,
11992 ErrorCode::ExpiredUnknown,
11993 ErrorCode::TemporarilyUnavailable,
11994 ErrorCode::Internal,
11995 ],
11996 limit_ids: &[
11997 "request_bytes",
11998 "response_bytes",
11999 "bulk_document_items",
12000 "bulk_document_bytes",
12001 ],
12002 effect_class: "durable_submit",
12003 risk_flags: &[],
12004 capability_family: "data",
12005 retry_safety: "pre_submit_only",
12006 identity_requirement: "caller_action_id",
12007 resolver: Some(Command::ResolveDocumentBulk),
12008 cancellation: "per_call_until_submission_then_resolve",
12009 side_effects: &["commits_authoritative_state"],
12010 recovery: "resolve_with_resolve_document_bulk",
12011 collection_index_ref: "request_index",
12012 },
12013 CommandSemanticContract {
12014 command: Command::ResolveDocumentBulk,
12015 admissible_errors: &[
12016 ErrorCode::Aborted,
12017 ErrorCode::DeadlineExceeded,
12018 ErrorCode::InvalidRequest,
12019 ErrorCode::UnsupportedVersion,
12020 ErrorCode::Unauthenticated,
12021 ErrorCode::PermissionDenied,
12022 ErrorCode::NotFound,
12023 ErrorCode::LimitExceeded,
12024 ErrorCode::CapabilityUnavailable,
12025 ErrorCode::TemporarilyUnavailable,
12026 ErrorCode::Internal,
12027 ],
12028 limit_ids: &[
12029 "request_bytes",
12030 "response_bytes",
12031 "bulk_document_items",
12032 "bulk_document_bytes",
12033 ],
12034 effect_class: "read_only",
12035 risk_flags: &[],
12036 capability_family: "data",
12037 retry_safety: "safe",
12038 identity_requirement: "caller_action_id",
12039 resolver: None,
12040 cancellation: "per_call",
12041 side_effects: &[],
12042 recovery: "retry",
12043 collection_index_ref: "request_index",
12044 },
12045 CommandSemanticContract {
12046 command: Command::PrepareAppendBulk,
12047 admissible_errors: &[
12048 ErrorCode::Aborted,
12049 ErrorCode::DeadlineExceeded,
12050 ErrorCode::InvalidRequest,
12051 ErrorCode::UnsupportedVersion,
12052 ErrorCode::Unauthenticated,
12053 ErrorCode::PermissionDenied,
12054 ErrorCode::NotFound,
12055 ErrorCode::LimitExceeded,
12056 ErrorCode::CapabilityUnavailable,
12057 ErrorCode::TemporarilyUnavailable,
12058 ErrorCode::Internal,
12059 ],
12060 limit_ids: &[
12061 "request_bytes",
12062 "response_bytes",
12063 "bulk_document_items",
12064 "bulk_document_bytes",
12065 ],
12066 effect_class: "prepare",
12067 risk_flags: &[],
12068 capability_family: "data",
12069 retry_safety: "safe",
12070 identity_requirement: "caller_action_id",
12071 resolver: None,
12072 cancellation: "per_call",
12073 side_effects: &[],
12074 recovery: "retry",
12075 collection_index_ref: "request_index",
12076 },
12077 CommandSemanticContract {
12078 command: Command::SubmitAppendBulk,
12079 admissible_errors: &[
12080 ErrorCode::Aborted,
12081 ErrorCode::DeadlineExceeded,
12082 ErrorCode::InvalidRequest,
12083 ErrorCode::UnsupportedVersion,
12084 ErrorCode::Unauthenticated,
12085 ErrorCode::PermissionDenied,
12086 ErrorCode::NotFound,
12087 ErrorCode::Conflict,
12088 ErrorCode::LimitExceeded,
12089 ErrorCode::CapabilityUnavailable,
12090 ErrorCode::NotSubmitted,
12091 ErrorCode::SubmittedIndeterminate,
12092 ErrorCode::TemporarilyUnavailable,
12093 ErrorCode::Internal,
12094 ],
12095 limit_ids: &[
12096 "request_bytes",
12097 "response_bytes",
12098 "bulk_document_items",
12099 "bulk_document_bytes",
12100 ],
12101 effect_class: "durable_submit",
12102 risk_flags: &[],
12103 capability_family: "data",
12104 retry_safety: "pre_submit_only",
12105 identity_requirement: "request_locator",
12106 resolver: Some(Command::ResolveAppendBulk),
12107 cancellation: "per_call_until_submission_then_resolve",
12108 side_effects: &["commits_authoritative_state"],
12109 recovery: "resolve_with_resolve_append_bulk",
12110 collection_index_ref: "request_index",
12111 },
12112 CommandSemanticContract {
12113 command: Command::ResolveAppendBulk,
12114 admissible_errors: &[
12115 ErrorCode::Aborted,
12116 ErrorCode::DeadlineExceeded,
12117 ErrorCode::InvalidRequest,
12118 ErrorCode::UnsupportedVersion,
12119 ErrorCode::Unauthenticated,
12120 ErrorCode::PermissionDenied,
12121 ErrorCode::NotFound,
12122 ErrorCode::Conflict,
12123 ErrorCode::LimitExceeded,
12124 ErrorCode::CapabilityUnavailable,
12125 ErrorCode::TemporarilyUnavailable,
12126 ErrorCode::Internal,
12127 ],
12128 limit_ids: &[
12129 "request_bytes",
12130 "response_bytes",
12131 "bulk_document_items",
12132 "bulk_document_bytes",
12133 ],
12134 effect_class: "read_only",
12135 risk_flags: &[],
12136 capability_family: "data",
12137 retry_safety: "safe",
12138 identity_requirement: "request_locator",
12139 resolver: None,
12140 cancellation: "per_call",
12141 side_effects: &[],
12142 recovery: "retry",
12143 collection_index_ref: "request_index",
12144 },
12145 CommandSemanticContract {
12146 command: Command::ObserveAppendCommitted,
12147 admissible_errors: &[
12148 ErrorCode::Aborted,
12149 ErrorCode::DeadlineExceeded,
12150 ErrorCode::InvalidRequest,
12151 ErrorCode::UnsupportedVersion,
12152 ErrorCode::Unauthenticated,
12153 ErrorCode::PermissionDenied,
12154 ErrorCode::NotFound,
12155 ErrorCode::Conflict,
12156 ErrorCode::LimitExceeded,
12157 ErrorCode::CapabilityUnavailable,
12158 ErrorCode::TemporarilyUnavailable,
12159 ErrorCode::Internal,
12160 ],
12161 limit_ids: &["request_bytes", "response_bytes"],
12162 effect_class: "read_only",
12163 risk_flags: &[],
12164 capability_family: "data",
12165 retry_safety: "safe",
12166 identity_requirement: "request_locator",
12167 resolver: None,
12168 cancellation: "per_call",
12169 side_effects: &[],
12170 recovery: "retry",
12171 collection_index_ref: "request_index",
12172 },
12173 CommandSemanticContract {
12174 command: Command::ResolveDocumentMutation,
12175 admissible_errors: &[
12176 ErrorCode::Aborted,
12177 ErrorCode::DeadlineExceeded,
12178 ErrorCode::InvalidRequest,
12179 ErrorCode::UnsupportedVersion,
12180 ErrorCode::Unauthenticated,
12181 ErrorCode::PermissionDenied,
12182 ErrorCode::NotFound,
12183 ErrorCode::LimitExceeded,
12184 ErrorCode::CapabilityUnavailable,
12185 ErrorCode::TemporarilyUnavailable,
12186 ErrorCode::Internal,
12187 ],
12188 limit_ids: &["request_bytes", "response_bytes"],
12189 effect_class: "read_only",
12190 risk_flags: &[],
12191 capability_family: "data",
12192 retry_safety: "safe",
12193 identity_requirement: "request_locator",
12194 resolver: None,
12195 cancellation: "per_call",
12196 side_effects: &[],
12197 recovery: "retry",
12198 collection_index_ref: "caller",
12199 },
12200 CommandSemanticContract {
12201 command: Command::GetDocument,
12202 admissible_errors: &[
12203 ErrorCode::Aborted,
12204 ErrorCode::DeadlineExceeded,
12205 ErrorCode::InvalidRequest,
12206 ErrorCode::UnsupportedVersion,
12207 ErrorCode::Unauthenticated,
12208 ErrorCode::PermissionDenied,
12209 ErrorCode::NotFound,
12210 ErrorCode::LimitExceeded,
12211 ErrorCode::CapabilityUnavailable,
12212 ErrorCode::TemporarilyUnavailable,
12213 ErrorCode::Internal,
12214 ],
12215 limit_ids: &["request_bytes", "response_bytes"],
12216 effect_class: "read_only",
12217 risk_flags: &[],
12218 capability_family: "data",
12219 retry_safety: "safe",
12220 identity_requirement: "none",
12221 resolver: None,
12222 cancellation: "per_call",
12223 side_effects: &[],
12224 recovery: "retry",
12225 collection_index_ref: "request_index",
12226 },
12227 CommandSemanticContract {
12228 command: Command::Search,
12229 admissible_errors: &[
12230 ErrorCode::Aborted,
12231 ErrorCode::DeadlineExceeded,
12232 ErrorCode::InvalidRequest,
12233 ErrorCode::UnsupportedVersion,
12234 ErrorCode::Unauthenticated,
12235 ErrorCode::PermissionDenied,
12236 ErrorCode::NotFound,
12237 ErrorCode::StaleCursor,
12238 ErrorCode::RestartBudgetExhausted,
12239 ErrorCode::LimitExceeded,
12240 ErrorCode::CapabilityUnavailable,
12241 ErrorCode::TemporarilyUnavailable,
12242 ErrorCode::Internal,
12243 ],
12244 limit_ids: &[
12245 "request_bytes",
12246 "response_bytes",
12247 "page_size",
12248 "query_clauses",
12249 "aggregation_nodes",
12250 "aggregation_buckets",
12251 "routing_values",
12252 "routing_value_bytes",
12253 "query_recursion_depth",
12254 "text_query_bytes",
12255 "text_query_fields",
12256 "text_query_slop",
12257 "text_query_boost",
12258 "text_query_fuzzy_expansions",
12259 "text_query_fuzzy_distance",
12260 "text_query_dictionary_scan_terms",
12261 "text_query_dictionary_scan_bytes",
12262 "text_query_fuzzy_work_units",
12263 "vector_dimensions",
12264 "vector_query_bytes",
12265 "vector_request_bytes",
12266 "vector_candidates",
12267 "vector_set_query_vectors",
12268 "vector_set_query_bytes",
12269 "retrieval_branches",
12270 "retrieval_branch_name_bytes",
12271 "retrieval_window",
12272 "fragment_fields",
12273 "fragments_per_field",
12274 "fragment_bytes",
12275 "fragment_total_bytes",
12276 "result_feature_hits",
12277 "result_features",
12278 "diversification_fields",
12279 "diversification_per_group",
12280 "search_result_window",
12281 ],
12282 effect_class: "read_only",
12283 risk_flags: &[],
12284 capability_family: "data",
12285 retry_safety: "safe",
12286 identity_requirement: "none",
12287 resolver: None,
12288 cancellation: "per_call",
12289 side_effects: &[],
12290 recovery: "retry",
12291 collection_index_ref: "request_indexes_or_pit_authority",
12292 },
12293 CommandSemanticContract {
12294 command: Command::TraverseRelationships,
12295 admissible_errors: &[
12296 ErrorCode::Aborted,
12297 ErrorCode::DeadlineExceeded,
12298 ErrorCode::InvalidRequest,
12299 ErrorCode::UnsupportedVersion,
12300 ErrorCode::Unauthenticated,
12301 ErrorCode::PermissionDenied,
12302 ErrorCode::NotFound,
12303 ErrorCode::LimitExceeded,
12304 ErrorCode::CapabilityUnavailable,
12305 ErrorCode::TemporarilyUnavailable,
12306 ErrorCode::Internal,
12307 ],
12308 limit_ids: &[
12309 "request_bytes",
12310 "response_bytes",
12311 "relationship_indexes",
12312 "relationship_seeds",
12313 "relationship_filter_values",
12314 "relationship_depth",
12315 "relationship_fan_out",
12316 "relationship_visited_entities",
12317 "relationship_visited_records",
12318 "relationship_returned_records",
12319 "relationship_memory_bytes",
12320 "search_result_window",
12321 ],
12322 effect_class: "read_only",
12323 risk_flags: &[],
12324 capability_family: "data",
12325 retry_safety: "safe",
12326 identity_requirement: "none",
12327 resolver: None,
12328 cancellation: "per_call",
12329 side_effects: &[],
12330 recovery: "retry",
12331 collection_index_ref: "pit_authority",
12332 },
12333 CommandSemanticContract {
12334 command: Command::QueryProfiles,
12335 admissible_errors: &[
12336 ErrorCode::Aborted,
12337 ErrorCode::DeadlineExceeded,
12338 ErrorCode::InvalidRequest,
12339 ErrorCode::UnsupportedVersion,
12340 ErrorCode::Unauthenticated,
12341 ErrorCode::PermissionDenied,
12342 ErrorCode::NotFound,
12343 ErrorCode::LimitExceeded,
12344 ErrorCode::CapabilityUnavailable,
12345 ErrorCode::TemporarilyUnavailable,
12346 ErrorCode::Internal,
12347 ],
12348 limit_ids: &[
12349 "request_bytes",
12350 "response_bytes",
12351 "profile_indexes",
12352 "profile_filter_values",
12353 "profile_batches",
12354 "profile_samples",
12355 "profile_results",
12356 "profile_memory_bytes",
12357 "search_result_window",
12358 ],
12359 effect_class: "read_only",
12360 risk_flags: &[],
12361 capability_family: "data",
12362 retry_safety: "safe",
12363 identity_requirement: "none",
12364 resolver: None,
12365 cancellation: "per_call",
12366 side_effects: &[],
12367 recovery: "retry",
12368 collection_index_ref: "pit_authority",
12369 },
12370 CommandSemanticContract {
12371 command: Command::EvaluateTemporalEvidence,
12372 admissible_errors: &[
12373 ErrorCode::Aborted,
12374 ErrorCode::DeadlineExceeded,
12375 ErrorCode::InvalidRequest,
12376 ErrorCode::UnsupportedVersion,
12377 ErrorCode::Unauthenticated,
12378 ErrorCode::PermissionDenied,
12379 ErrorCode::NotFound,
12380 ErrorCode::LimitExceeded,
12381 ErrorCode::CapabilityUnavailable,
12382 ErrorCode::TemporarilyUnavailable,
12383 ErrorCode::Internal,
12384 ],
12385 limit_ids: &[
12386 "request_bytes",
12387 "response_bytes",
12388 "query_clauses",
12389 "query_recursion_depth",
12390 "search_result_window",
12391 "temporal_inputs",
12392 "temporal_pattern_nodes",
12393 "temporal_pattern_depth",
12394 "temporal_pattern_branches",
12395 "temporal_correlation_keys",
12396 "temporal_events",
12397 "temporal_states",
12398 "temporal_captured_events",
12399 "temporal_results",
12400 "temporal_state_bytes",
12401 "temporal_interval_nanos",
12402 ],
12403 effect_class: "read_only",
12404 risk_flags: &[],
12405 capability_family: "data",
12406 retry_safety: "safe",
12407 identity_requirement: "none",
12408 resolver: None,
12409 cancellation: "per_call",
12410 side_effects: &[],
12411 recovery: "retry",
12412 collection_index_ref: "pit_authority",
12413 },
12414 CommandSemanticContract {
12415 command: Command::CreateContinuousTemporalEvaluation,
12416 admissible_errors: &[
12417 ErrorCode::Aborted,
12418 ErrorCode::DeadlineExceeded,
12419 ErrorCode::InvalidRequest,
12420 ErrorCode::UnsupportedVersion,
12421 ErrorCode::Unauthenticated,
12422 ErrorCode::PermissionDenied,
12423 ErrorCode::NotFound,
12424 ErrorCode::Conflict,
12425 ErrorCode::LimitExceeded,
12426 ErrorCode::CapabilityUnavailable,
12427 ErrorCode::NotSubmitted,
12428 ErrorCode::SubmittedIndeterminate,
12429 ErrorCode::TemporarilyUnavailable,
12430 ErrorCode::Internal,
12431 ],
12432 limit_ids: &[
12433 "request_bytes",
12434 "response_bytes",
12435 "temporal_inputs",
12436 "temporal_pattern_nodes",
12437 "temporal_pattern_depth",
12438 "temporal_pattern_branches",
12439 "temporal_correlation_keys",
12440 "temporal_events",
12441 "temporal_states",
12442 "temporal_captured_events",
12443 "temporal_results",
12444 "temporal_state_bytes",
12445 "temporal_interval_nanos",
12446 ],
12447 effect_class: "durable_submit",
12448 risk_flags: &[],
12449 capability_family: "lifecycle",
12450 retry_safety: "pre_submit_only",
12451 identity_requirement: "caller_action_id",
12452 resolver: Some(Command::GetContinuousTemporalEvaluation),
12453 cancellation: "per_call_until_submission_then_resolve",
12454 side_effects: &["commits_authoritative_state"],
12455 recovery: "resolve_with_get_continuous_temporal_evaluation",
12456 collection_index_ref: "request_temporal_inputs",
12457 },
12458 CommandSemanticContract {
12459 command: Command::GetContinuousTemporalEvaluation,
12460 admissible_errors: &[
12461 ErrorCode::Aborted,
12462 ErrorCode::DeadlineExceeded,
12463 ErrorCode::InvalidRequest,
12464 ErrorCode::UnsupportedVersion,
12465 ErrorCode::Unauthenticated,
12466 ErrorCode::PermissionDenied,
12467 ErrorCode::NotFound,
12468 ErrorCode::LimitExceeded,
12469 ErrorCode::CapabilityUnavailable,
12470 ErrorCode::TemporarilyUnavailable,
12471 ErrorCode::Internal,
12472 ],
12473 limit_ids: &["request_bytes", "response_bytes"],
12474 effect_class: "read_only",
12475 risk_flags: &[],
12476 capability_family: "lifecycle",
12477 retry_safety: "safe",
12478 identity_requirement: "none",
12479 resolver: None,
12480 cancellation: "per_call",
12481 side_effects: &[],
12482 recovery: "retry",
12483 collection_index_ref: "request_evaluation",
12484 },
12485 CommandSemanticContract {
12486 command: Command::PauseContinuousTemporalEvaluation,
12487 admissible_errors: &[
12488 ErrorCode::Aborted,
12489 ErrorCode::DeadlineExceeded,
12490 ErrorCode::InvalidRequest,
12491 ErrorCode::UnsupportedVersion,
12492 ErrorCode::Unauthenticated,
12493 ErrorCode::PermissionDenied,
12494 ErrorCode::NotFound,
12495 ErrorCode::Conflict,
12496 ErrorCode::LimitExceeded,
12497 ErrorCode::CapabilityUnavailable,
12498 ErrorCode::NotSubmitted,
12499 ErrorCode::SubmittedIndeterminate,
12500 ErrorCode::TemporarilyUnavailable,
12501 ErrorCode::Internal,
12502 ],
12503 limit_ids: &["request_bytes", "response_bytes"],
12504 effect_class: "durable_submit",
12505 risk_flags: &[],
12506 capability_family: "lifecycle",
12507 retry_safety: "pre_submit_only",
12508 identity_requirement: "caller_action_id",
12509 resolver: Some(Command::GetContinuousTemporalEvaluation),
12510 cancellation: "per_call_until_submission_then_resolve",
12511 side_effects: &["commits_authoritative_state"],
12512 recovery: "resolve_with_get_continuous_temporal_evaluation",
12513 collection_index_ref: "request_evaluation",
12514 },
12515 CommandSemanticContract {
12516 command: Command::ResumeContinuousTemporalEvaluation,
12517 admissible_errors: &[
12518 ErrorCode::Aborted,
12519 ErrorCode::DeadlineExceeded,
12520 ErrorCode::InvalidRequest,
12521 ErrorCode::UnsupportedVersion,
12522 ErrorCode::Unauthenticated,
12523 ErrorCode::PermissionDenied,
12524 ErrorCode::NotFound,
12525 ErrorCode::Conflict,
12526 ErrorCode::LimitExceeded,
12527 ErrorCode::CapabilityUnavailable,
12528 ErrorCode::NotSubmitted,
12529 ErrorCode::SubmittedIndeterminate,
12530 ErrorCode::TemporarilyUnavailable,
12531 ErrorCode::Internal,
12532 ],
12533 limit_ids: &["request_bytes", "response_bytes"],
12534 effect_class: "durable_submit",
12535 risk_flags: &[],
12536 capability_family: "lifecycle",
12537 retry_safety: "pre_submit_only",
12538 identity_requirement: "caller_action_id",
12539 resolver: Some(Command::GetContinuousTemporalEvaluation),
12540 cancellation: "per_call_until_submission_then_resolve",
12541 side_effects: &["commits_authoritative_state"],
12542 recovery: "resolve_with_get_continuous_temporal_evaluation",
12543 collection_index_ref: "request_evaluation",
12544 },
12545 CommandSemanticContract {
12546 command: Command::ReplaceContinuousTemporalEvaluation,
12547 admissible_errors: &[
12548 ErrorCode::Aborted,
12549 ErrorCode::DeadlineExceeded,
12550 ErrorCode::InvalidRequest,
12551 ErrorCode::UnsupportedVersion,
12552 ErrorCode::Unauthenticated,
12553 ErrorCode::PermissionDenied,
12554 ErrorCode::NotFound,
12555 ErrorCode::Conflict,
12556 ErrorCode::LimitExceeded,
12557 ErrorCode::CapabilityUnavailable,
12558 ErrorCode::NotSubmitted,
12559 ErrorCode::SubmittedIndeterminate,
12560 ErrorCode::TemporarilyUnavailable,
12561 ErrorCode::Internal,
12562 ],
12563 limit_ids: &[
12564 "request_bytes",
12565 "response_bytes",
12566 "temporal_inputs",
12567 "temporal_pattern_nodes",
12568 "temporal_pattern_depth",
12569 "temporal_pattern_branches",
12570 "temporal_correlation_keys",
12571 "temporal_events",
12572 "temporal_states",
12573 "temporal_captured_events",
12574 "temporal_results",
12575 "temporal_state_bytes",
12576 "temporal_interval_nanos",
12577 ],
12578 effect_class: "durable_submit",
12579 risk_flags: &[],
12580 capability_family: "lifecycle",
12581 retry_safety: "pre_submit_only",
12582 identity_requirement: "caller_action_id",
12583 resolver: Some(Command::GetContinuousTemporalEvaluation),
12584 cancellation: "per_call_until_submission_then_resolve",
12585 side_effects: &["commits_authoritative_state"],
12586 recovery: "resolve_with_get_continuous_temporal_evaluation",
12587 collection_index_ref: "request_temporal_inputs",
12588 },
12589 CommandSemanticContract {
12590 command: Command::RetireContinuousTemporalEvaluation,
12591 admissible_errors: &[
12592 ErrorCode::Aborted,
12593 ErrorCode::DeadlineExceeded,
12594 ErrorCode::InvalidRequest,
12595 ErrorCode::UnsupportedVersion,
12596 ErrorCode::Unauthenticated,
12597 ErrorCode::PermissionDenied,
12598 ErrorCode::NotFound,
12599 ErrorCode::Conflict,
12600 ErrorCode::LimitExceeded,
12601 ErrorCode::CapabilityUnavailable,
12602 ErrorCode::NotSubmitted,
12603 ErrorCode::SubmittedIndeterminate,
12604 ErrorCode::TemporarilyUnavailable,
12605 ErrorCode::Internal,
12606 ],
12607 limit_ids: &["request_bytes", "response_bytes"],
12608 effect_class: "durable_submit",
12609 risk_flags: &["destructive"],
12610 capability_family: "lifecycle",
12611 retry_safety: "pre_submit_only",
12612 identity_requirement: "caller_action_id",
12613 resolver: Some(Command::GetContinuousTemporalEvaluation),
12614 cancellation: "per_call_until_submission_then_resolve",
12615 side_effects: &["commits_authoritative_state"],
12616 recovery: "resolve_with_get_continuous_temporal_evaluation",
12617 collection_index_ref: "request_evaluation",
12618 },
12619 CommandSemanticContract {
12620 command: Command::ReadContinuousTemporalEvidence,
12621 admissible_errors: &[
12622 ErrorCode::Aborted,
12623 ErrorCode::DeadlineExceeded,
12624 ErrorCode::InvalidRequest,
12625 ErrorCode::UnsupportedVersion,
12626 ErrorCode::Unauthenticated,
12627 ErrorCode::PermissionDenied,
12628 ErrorCode::NotFound,
12629 ErrorCode::Conflict,
12630 ErrorCode::RetentionGap,
12631 ErrorCode::LimitExceeded,
12632 ErrorCode::CapabilityUnavailable,
12633 ErrorCode::TemporarilyUnavailable,
12634 ErrorCode::Internal,
12635 ],
12636 limit_ids: &["request_bytes", "response_bytes", "page_size", "temporal_results"],
12637 effect_class: "read_only",
12638 risk_flags: &[],
12639 capability_family: "data",
12640 retry_safety: "safe",
12641 identity_requirement: "none",
12642 resolver: None,
12643 cancellation: "per_call",
12644 side_effects: &[],
12645 recovery: "retry",
12646 collection_index_ref: "request_evaluation",
12647 },
12648 CommandSemanticContract {
12649 command: Command::ValidateSearch,
12650 admissible_errors: &[
12651 ErrorCode::Aborted,
12652 ErrorCode::DeadlineExceeded,
12653 ErrorCode::InvalidRequest,
12654 ErrorCode::UnsupportedVersion,
12655 ErrorCode::Unauthenticated,
12656 ErrorCode::PermissionDenied,
12657 ErrorCode::NotFound,
12658 ErrorCode::LimitExceeded,
12659 ErrorCode::CapabilityUnavailable,
12660 ErrorCode::TemporarilyUnavailable,
12661 ErrorCode::Internal,
12662 ],
12663 limit_ids: &[
12664 "request_bytes",
12665 "response_bytes",
12666 "page_size",
12667 "query_clauses",
12668 "aggregation_nodes",
12669 "aggregation_buckets",
12670 "routing_values",
12671 "routing_value_bytes",
12672 "query_recursion_depth",
12673 "search_result_window",
12674 ],
12675 effect_class: "read_only",
12676 risk_flags: &[],
12677 capability_family: "data",
12678 retry_safety: "safe",
12679 identity_requirement: "none",
12680 resolver: None,
12681 cancellation: "per_call",
12682 side_effects: &[],
12683 recovery: "retry",
12684 collection_index_ref: "request_indexes_uniform",
12685 },
12686 CommandSemanticContract {
12687 command: Command::OpenPit,
12688 admissible_errors: &[
12689 ErrorCode::Aborted,
12690 ErrorCode::DeadlineExceeded,
12691 ErrorCode::InvalidRequest,
12692 ErrorCode::UnsupportedVersion,
12693 ErrorCode::Unauthenticated,
12694 ErrorCode::PermissionDenied,
12695 ErrorCode::NotFound,
12696 ErrorCode::Conflict,
12697 ErrorCode::LimitExceeded,
12698 ErrorCode::CapabilityUnavailable,
12699 ErrorCode::NotSubmitted,
12700 ErrorCode::SubmittedIndeterminate,
12701 ErrorCode::ExpiredUnknown,
12702 ErrorCode::TemporarilyUnavailable,
12703 ErrorCode::Internal,
12704 ],
12705 limit_ids: &["request_bytes", "response_bytes"],
12706 effect_class: "lease_renewing_read",
12707 risk_flags: &[],
12708 capability_family: "data",
12709 retry_safety: "pre_submit_only",
12710 identity_requirement: "none",
12711 resolver: None,
12712 cancellation: "per_call_until_submission_then_resolve",
12713 side_effects: &["renews_or_closes_existing_lease"],
12714 recovery: "retry_if_not_submitted",
12715 collection_index_ref: "request_indexes_uniform",
12716 },
12717 CommandSemanticContract {
12718 command: Command::RenewPit,
12719 admissible_errors: &[
12720 ErrorCode::Aborted,
12721 ErrorCode::DeadlineExceeded,
12722 ErrorCode::InvalidRequest,
12723 ErrorCode::UnsupportedVersion,
12724 ErrorCode::Unauthenticated,
12725 ErrorCode::PermissionDenied,
12726 ErrorCode::NotFound,
12727 ErrorCode::Conflict,
12728 ErrorCode::LimitExceeded,
12729 ErrorCode::CapabilityUnavailable,
12730 ErrorCode::NotSubmitted,
12731 ErrorCode::SubmittedIndeterminate,
12732 ErrorCode::ExpiredUnknown,
12733 ErrorCode::TemporarilyUnavailable,
12734 ErrorCode::Internal,
12735 ],
12736 limit_ids: &["request_bytes", "response_bytes"],
12737 effect_class: "lease_renewing_read",
12738 risk_flags: &[],
12739 capability_family: "data",
12740 retry_safety: "pre_submit_only",
12741 identity_requirement: "none",
12742 resolver: None,
12743 cancellation: "per_call_until_submission_then_resolve",
12744 side_effects: &["renews_or_closes_existing_lease"],
12745 recovery: "retry_if_not_submitted",
12746 collection_index_ref: "pit_authority",
12747 },
12748 CommandSemanticContract {
12749 command: Command::ClosePit,
12750 admissible_errors: &[
12751 ErrorCode::Aborted,
12752 ErrorCode::DeadlineExceeded,
12753 ErrorCode::InvalidRequest,
12754 ErrorCode::UnsupportedVersion,
12755 ErrorCode::Unauthenticated,
12756 ErrorCode::PermissionDenied,
12757 ErrorCode::NotFound,
12758 ErrorCode::Conflict,
12759 ErrorCode::LimitExceeded,
12760 ErrorCode::CapabilityUnavailable,
12761 ErrorCode::NotSubmitted,
12762 ErrorCode::SubmittedIndeterminate,
12763 ErrorCode::ExpiredUnknown,
12764 ErrorCode::TemporarilyUnavailable,
12765 ErrorCode::Internal,
12766 ],
12767 limit_ids: &["request_bytes", "response_bytes"],
12768 effect_class: "lease_renewing_read",
12769 risk_flags: &[],
12770 capability_family: "data",
12771 retry_safety: "pre_submit_only",
12772 identity_requirement: "none",
12773 resolver: None,
12774 cancellation: "per_call_until_submission_then_resolve",
12775 side_effects: &["renews_or_closes_existing_lease"],
12776 recovery: "retry_if_not_submitted",
12777 collection_index_ref: "pit_authority",
12778 },
12779 CommandSemanticContract {
12780 command: Command::ListOperations,
12781 admissible_errors: &[
12782 ErrorCode::Aborted,
12783 ErrorCode::DeadlineExceeded,
12784 ErrorCode::InvalidRequest,
12785 ErrorCode::UnsupportedVersion,
12786 ErrorCode::Unauthenticated,
12787 ErrorCode::PermissionDenied,
12788 ErrorCode::NotFound,
12789 ErrorCode::StaleCursor,
12790 ErrorCode::RestartBudgetExhausted,
12791 ErrorCode::LimitExceeded,
12792 ErrorCode::CapabilityUnavailable,
12793 ErrorCode::TemporarilyUnavailable,
12794 ErrorCode::Internal,
12795 ],
12796 limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
12797 effect_class: "read_only",
12798 risk_flags: &[],
12799 capability_family: "operations",
12800 retry_safety: "safe",
12801 identity_requirement: "none",
12802 resolver: None,
12803 cancellation: "per_call",
12804 side_effects: &[],
12805 recovery: "retry",
12806 collection_index_ref: "none",
12807 },
12808 CommandSemanticContract {
12809 command: Command::GetOperation,
12810 admissible_errors: &[
12811 ErrorCode::Aborted,
12812 ErrorCode::DeadlineExceeded,
12813 ErrorCode::InvalidRequest,
12814 ErrorCode::UnsupportedVersion,
12815 ErrorCode::Unauthenticated,
12816 ErrorCode::PermissionDenied,
12817 ErrorCode::NotFound,
12818 ErrorCode::LimitExceeded,
12819 ErrorCode::CapabilityUnavailable,
12820 ErrorCode::TemporarilyUnavailable,
12821 ErrorCode::Internal,
12822 ],
12823 limit_ids: &["request_bytes", "response_bytes"],
12824 effect_class: "read_only",
12825 risk_flags: &[],
12826 capability_family: "operations",
12827 retry_safety: "safe",
12828 identity_requirement: "request_locator",
12829 resolver: None,
12830 cancellation: "per_call",
12831 side_effects: &[],
12832 recovery: "retry",
12833 collection_index_ref: "none",
12834 },
12835 CommandSemanticContract {
12836 command: Command::WaitOperation,
12837 admissible_errors: &[
12838 ErrorCode::Aborted,
12839 ErrorCode::DeadlineExceeded,
12840 ErrorCode::InvalidRequest,
12841 ErrorCode::UnsupportedVersion,
12842 ErrorCode::Unauthenticated,
12843 ErrorCode::PermissionDenied,
12844 ErrorCode::NotFound,
12845 ErrorCode::Conflict,
12846 ErrorCode::LimitExceeded,
12847 ErrorCode::CapabilityUnavailable,
12848 ErrorCode::TemporarilyUnavailable,
12849 ErrorCode::Internal,
12850 ],
12851 limit_ids: &[
12852 "request_bytes",
12853 "response_bytes",
12854 "operation_wait_attempts",
12855 "operation_wait_interval_millis",
12856 ],
12857 effect_class: "read_only",
12858 risk_flags: &[],
12859 capability_family: "operations",
12860 retry_safety: "safe",
12861 identity_requirement: "request_locator",
12862 resolver: None,
12863 cancellation: "per_call",
12864 side_effects: &[],
12865 recovery: "retry",
12866 collection_index_ref: "none",
12867 },
12868 CommandSemanticContract {
12869 command: Command::CancelOperation,
12870 admissible_errors: &[
12871 ErrorCode::Aborted,
12872 ErrorCode::DeadlineExceeded,
12873 ErrorCode::InvalidRequest,
12874 ErrorCode::UnsupportedVersion,
12875 ErrorCode::Unauthenticated,
12876 ErrorCode::PermissionDenied,
12877 ErrorCode::NotFound,
12878 ErrorCode::Conflict,
12879 ErrorCode::LimitExceeded,
12880 ErrorCode::CapabilityUnavailable,
12881 ErrorCode::NotSubmitted,
12882 ErrorCode::SubmittedIndeterminate,
12883 ErrorCode::ExpiredUnknown,
12884 ErrorCode::TemporarilyUnavailable,
12885 ErrorCode::Internal,
12886 ],
12887 limit_ids: &["request_bytes", "response_bytes"],
12888 effect_class: "control_write",
12889 risk_flags: &[],
12890 capability_family: "operations",
12891 retry_safety: "pre_submit_only",
12892 identity_requirement: "request_locator",
12893 resolver: None,
12894 cancellation: "per_call_until_submission_then_resolve",
12895 side_effects: &["commits_authoritative_state"],
12896 recovery: "retry_if_not_submitted",
12897 collection_index_ref: "none",
12898 },
12899 CommandSemanticContract {
12900 command: Command::ListAuditEvents,
12901 admissible_errors: &[
12902 ErrorCode::Aborted,
12903 ErrorCode::DeadlineExceeded,
12904 ErrorCode::InvalidRequest,
12905 ErrorCode::UnsupportedVersion,
12906 ErrorCode::Unauthenticated,
12907 ErrorCode::PermissionDenied,
12908 ErrorCode::NotFound,
12909 ErrorCode::StaleCursor,
12910 ErrorCode::RestartBudgetExhausted,
12911 ErrorCode::LimitExceeded,
12912 ErrorCode::CapabilityUnavailable,
12913 ErrorCode::TemporarilyUnavailable,
12914 ErrorCode::Internal,
12915 ],
12916 limit_ids: &["request_bytes", "response_bytes", "page_size"],
12917 effect_class: "read_only",
12918 risk_flags: &[],
12919 capability_family: "audit",
12920 retry_safety: "safe",
12921 identity_requirement: "none",
12922 resolver: None,
12923 cancellation: "per_call",
12924 side_effects: &[],
12925 recovery: "retry",
12926 collection_index_ref: "none",
12927 },
12928 CommandSemanticContract {
12929 command: Command::ExportAuditEvents,
12930 admissible_errors: &[
12931 ErrorCode::Aborted,
12932 ErrorCode::DeadlineExceeded,
12933 ErrorCode::InvalidRequest,
12934 ErrorCode::UnsupportedVersion,
12935 ErrorCode::Unauthenticated,
12936 ErrorCode::PermissionDenied,
12937 ErrorCode::NotFound,
12938 ErrorCode::StaleCursor,
12939 ErrorCode::RestartBudgetExhausted,
12940 ErrorCode::LimitExceeded,
12941 ErrorCode::CapabilityUnavailable,
12942 ErrorCode::TemporarilyUnavailable,
12943 ErrorCode::Internal,
12944 ],
12945 limit_ids: &["request_bytes", "response_bytes", "page_size"],
12946 effect_class: "read_only",
12947 risk_flags: &[],
12948 capability_family: "audit",
12949 retry_safety: "safe",
12950 identity_requirement: "none",
12951 resolver: None,
12952 cancellation: "per_call",
12953 side_effects: &[],
12954 recovery: "retry",
12955 collection_index_ref: "none",
12956 },
12957 CommandSemanticContract {
12958 command: Command::ReserveServiceCredential,
12959 admissible_errors: &[
12960 ErrorCode::Aborted,
12961 ErrorCode::DeadlineExceeded,
12962 ErrorCode::InvalidRequest,
12963 ErrorCode::UnsupportedVersion,
12964 ErrorCode::Unauthenticated,
12965 ErrorCode::PermissionDenied,
12966 ErrorCode::NotFound,
12967 ErrorCode::Conflict,
12968 ErrorCode::LimitExceeded,
12969 ErrorCode::CapabilityUnavailable,
12970 ErrorCode::NotSubmitted,
12971 ErrorCode::SubmittedIndeterminate,
12972 ErrorCode::ExpiredUnknown,
12973 ErrorCode::SecretNotEscrowed,
12974 ErrorCode::TemporarilyUnavailable,
12975 ErrorCode::Internal,
12976 ],
12977 limit_ids: &["request_bytes", "response_bytes"],
12978 effect_class: "durable_submit",
12979 risk_flags: &["credential_sensitive"],
12980 capability_family: "security",
12981 retry_safety: "pre_submit_only",
12982 identity_requirement: "caller_action_id",
12983 resolver: Some(Command::ResolveServiceCredentialReservation),
12984 cancellation: "per_call_until_submission_then_resolve",
12985 side_effects: &["commits_authoritative_state"],
12986 recovery: "resolve_with_resolve_service_credential_reservation",
12987 collection_index_ref: "none",
12988 },
12989 CommandSemanticContract {
12990 command: Command::ReserveServiceCredentialRotation,
12991 admissible_errors: &[
12992 ErrorCode::Aborted,
12993 ErrorCode::DeadlineExceeded,
12994 ErrorCode::InvalidRequest,
12995 ErrorCode::UnsupportedVersion,
12996 ErrorCode::Unauthenticated,
12997 ErrorCode::PermissionDenied,
12998 ErrorCode::NotFound,
12999 ErrorCode::Conflict,
13000 ErrorCode::LimitExceeded,
13001 ErrorCode::CapabilityUnavailable,
13002 ErrorCode::NotSubmitted,
13003 ErrorCode::SubmittedIndeterminate,
13004 ErrorCode::ExpiredUnknown,
13005 ErrorCode::SecretNotEscrowed,
13006 ErrorCode::TemporarilyUnavailable,
13007 ErrorCode::Internal,
13008 ],
13009 limit_ids: &["request_bytes", "response_bytes"],
13010 effect_class: "durable_submit",
13011 risk_flags: &["credential_sensitive"],
13012 capability_family: "security",
13013 retry_safety: "pre_submit_only",
13014 identity_requirement: "caller_action_id",
13015 resolver: Some(Command::ResolveServiceCredentialReservation),
13016 cancellation: "per_call_until_submission_then_resolve",
13017 side_effects: &["commits_authoritative_state"],
13018 recovery: "resolve_with_resolve_service_credential_reservation",
13019 collection_index_ref: "none",
13020 },
13021 CommandSemanticContract {
13022 command: Command::ActivateServiceCredential,
13023 admissible_errors: &[
13024 ErrorCode::Aborted,
13025 ErrorCode::DeadlineExceeded,
13026 ErrorCode::InvalidRequest,
13027 ErrorCode::UnsupportedVersion,
13028 ErrorCode::Unauthenticated,
13029 ErrorCode::PermissionDenied,
13030 ErrorCode::NotFound,
13031 ErrorCode::Conflict,
13032 ErrorCode::LimitExceeded,
13033 ErrorCode::CapabilityUnavailable,
13034 ErrorCode::NotSubmitted,
13035 ErrorCode::SubmittedIndeterminate,
13036 ErrorCode::ExpiredUnknown,
13037 ErrorCode::SecretNotEscrowed,
13038 ErrorCode::TemporarilyUnavailable,
13039 ErrorCode::Internal,
13040 ],
13041 limit_ids: &["request_bytes", "response_bytes"],
13042 effect_class: "durable_submit",
13043 risk_flags: &["credential_sensitive"],
13044 capability_family: "security",
13045 retry_safety: "pre_submit_only",
13046 identity_requirement: "server_locator",
13047 resolver: Some(Command::ResolveServiceCredentialReservation),
13048 cancellation: "per_call_until_submission_then_resolve",
13049 side_effects: &["commits_authoritative_state"],
13050 recovery: "resolve_with_resolve_service_credential_reservation",
13051 collection_index_ref: "none",
13052 },
13053 CommandSemanticContract {
13054 command: Command::ResolveServiceCredentialReservation,
13055 admissible_errors: &[
13056 ErrorCode::Aborted,
13057 ErrorCode::DeadlineExceeded,
13058 ErrorCode::InvalidRequest,
13059 ErrorCode::UnsupportedVersion,
13060 ErrorCode::Unauthenticated,
13061 ErrorCode::PermissionDenied,
13062 ErrorCode::NotFound,
13063 ErrorCode::LimitExceeded,
13064 ErrorCode::CapabilityUnavailable,
13065 ErrorCode::SecretNotEscrowed,
13066 ErrorCode::TemporarilyUnavailable,
13067 ErrorCode::Internal,
13068 ],
13069 limit_ids: &["request_bytes", "response_bytes"],
13070 effect_class: "read_only",
13071 risk_flags: &["credential_sensitive"],
13072 capability_family: "security",
13073 retry_safety: "safe",
13074 identity_requirement: "caller_action_id",
13075 resolver: None,
13076 cancellation: "per_call",
13077 side_effects: &[],
13078 recovery: "retry",
13079 collection_index_ref: "none",
13080 },
13081 CommandSemanticContract {
13082 command: Command::PrepareRevokeServiceCredential,
13083 admissible_errors: &[
13084 ErrorCode::Aborted,
13085 ErrorCode::DeadlineExceeded,
13086 ErrorCode::InvalidRequest,
13087 ErrorCode::UnsupportedVersion,
13088 ErrorCode::Unauthenticated,
13089 ErrorCode::PermissionDenied,
13090 ErrorCode::NotFound,
13091 ErrorCode::LimitExceeded,
13092 ErrorCode::CapabilityUnavailable,
13093 ErrorCode::SecretNotEscrowed,
13094 ErrorCode::TemporarilyUnavailable,
13095 ErrorCode::Internal,
13096 ],
13097 limit_ids: &["request_bytes", "response_bytes"],
13098 effect_class: "prepare",
13099 risk_flags: &["destructive", "credential_sensitive"],
13100 capability_family: "security",
13101 retry_safety: "safe",
13102 identity_requirement: "server_locator",
13103 resolver: None,
13104 cancellation: "per_call",
13105 side_effects: &["creates_bounded_preparation"],
13106 recovery: "retry",
13107 collection_index_ref: "none",
13108 },
13109 CommandSemanticContract {
13110 command: Command::RevokeServiceCredential,
13111 admissible_errors: &[
13112 ErrorCode::Aborted,
13113 ErrorCode::DeadlineExceeded,
13114 ErrorCode::InvalidRequest,
13115 ErrorCode::UnsupportedVersion,
13116 ErrorCode::Unauthenticated,
13117 ErrorCode::PermissionDenied,
13118 ErrorCode::NotFound,
13119 ErrorCode::Conflict,
13120 ErrorCode::LimitExceeded,
13121 ErrorCode::CapabilityUnavailable,
13122 ErrorCode::NotSubmitted,
13123 ErrorCode::SubmittedIndeterminate,
13124 ErrorCode::ExpiredUnknown,
13125 ErrorCode::SecretNotEscrowed,
13126 ErrorCode::TemporarilyUnavailable,
13127 ErrorCode::Internal,
13128 ],
13129 limit_ids: &["request_bytes", "response_bytes"],
13130 effect_class: "durable_submit",
13131 risk_flags: &["destructive", "credential_sensitive"],
13132 capability_family: "security",
13133 retry_safety: "pre_submit_only",
13134 identity_requirement: "request_locator",
13135 resolver: Some(Command::ResolveSecurityAction),
13136 cancellation: "per_call_until_submission_then_resolve",
13137 side_effects: &["commits_authoritative_state"],
13138 recovery: "resolve_with_resolve_security_action",
13139 collection_index_ref: "none",
13140 },
13141 CommandSemanticContract {
13142 command: Command::ResolveSecurityAction,
13143 admissible_errors: &[
13144 ErrorCode::Aborted,
13145 ErrorCode::DeadlineExceeded,
13146 ErrorCode::InvalidRequest,
13147 ErrorCode::UnsupportedVersion,
13148 ErrorCode::Unauthenticated,
13149 ErrorCode::PermissionDenied,
13150 ErrorCode::NotFound,
13151 ErrorCode::LimitExceeded,
13152 ErrorCode::CapabilityUnavailable,
13153 ErrorCode::SecretNotEscrowed,
13154 ErrorCode::TemporarilyUnavailable,
13155 ErrorCode::Internal,
13156 ],
13157 limit_ids: &["request_bytes", "response_bytes"],
13158 effect_class: "read_only",
13159 risk_flags: &[],
13160 capability_family: "security",
13161 retry_safety: "safe",
13162 identity_requirement: "request_locator",
13163 resolver: None,
13164 cancellation: "per_call",
13165 side_effects: &[],
13166 recovery: "retry",
13167 collection_index_ref: "none",
13168 },
13169 CommandSemanticContract {
13170 command: Command::GetSecurityRole,
13171 admissible_errors: &[
13172 ErrorCode::Aborted,
13173 ErrorCode::DeadlineExceeded,
13174 ErrorCode::InvalidRequest,
13175 ErrorCode::UnsupportedVersion,
13176 ErrorCode::Unauthenticated,
13177 ErrorCode::PermissionDenied,
13178 ErrorCode::NotFound,
13179 ErrorCode::LimitExceeded,
13180 ErrorCode::CapabilityUnavailable,
13181 ErrorCode::TemporarilyUnavailable,
13182 ErrorCode::Internal,
13183 ],
13184 limit_ids: &["request_bytes", "response_bytes"],
13185 effect_class: "read_only",
13186 risk_flags: &[],
13187 capability_family: "security",
13188 retry_safety: "safe",
13189 identity_requirement: "none",
13190 resolver: None,
13191 cancellation: "per_call",
13192 side_effects: &[],
13193 recovery: "retry",
13194 collection_index_ref: "none",
13195 },
13196 CommandSemanticContract {
13197 command: Command::PrepareRoleAppendAccessChange,
13198 admissible_errors: &[
13199 ErrorCode::Aborted,
13200 ErrorCode::DeadlineExceeded,
13201 ErrorCode::InvalidRequest,
13202 ErrorCode::UnsupportedVersion,
13203 ErrorCode::Unauthenticated,
13204 ErrorCode::PermissionDenied,
13205 ErrorCode::NotFound,
13206 ErrorCode::Conflict,
13207 ErrorCode::LimitExceeded,
13208 ErrorCode::CapabilityUnavailable,
13209 ErrorCode::TemporarilyUnavailable,
13210 ErrorCode::Internal,
13211 ],
13212 limit_ids: &["request_bytes", "response_bytes"],
13213 effect_class: "prepare",
13214 risk_flags: &["destructive"],
13215 capability_family: "security",
13216 retry_safety: "safe",
13217 identity_requirement: "server_locator",
13218 resolver: None,
13219 cancellation: "per_call",
13220 side_effects: &["creates_bounded_preparation"],
13221 recovery: "retry",
13222 collection_index_ref: "none",
13223 },
13224 CommandSemanticContract {
13225 command: Command::SubmitRoleAppendAccessChange,
13226 admissible_errors: &[
13227 ErrorCode::Aborted,
13228 ErrorCode::DeadlineExceeded,
13229 ErrorCode::InvalidRequest,
13230 ErrorCode::UnsupportedVersion,
13231 ErrorCode::Unauthenticated,
13232 ErrorCode::PermissionDenied,
13233 ErrorCode::NotFound,
13234 ErrorCode::Conflict,
13235 ErrorCode::LimitExceeded,
13236 ErrorCode::CapabilityUnavailable,
13237 ErrorCode::NotSubmitted,
13238 ErrorCode::SubmittedIndeterminate,
13239 ErrorCode::ExpiredUnknown,
13240 ErrorCode::TemporarilyUnavailable,
13241 ErrorCode::Internal,
13242 ],
13243 limit_ids: &["request_bytes", "response_bytes"],
13244 effect_class: "durable_submit",
13245 risk_flags: &["destructive"],
13246 capability_family: "security",
13247 retry_safety: "pre_submit_only",
13248 identity_requirement: "request_locator",
13249 resolver: Some(Command::ResolveSecurityAction),
13250 cancellation: "per_call_until_submission_then_resolve",
13251 side_effects: &["commits_authoritative_state"],
13252 recovery: "resolve_with_resolve_security_action",
13253 collection_index_ref: "none",
13254 },
13255 CommandSemanticContract {
13256 command: Command::ListServiceCredentials,
13257 admissible_errors: &[
13258 ErrorCode::Aborted,
13259 ErrorCode::DeadlineExceeded,
13260 ErrorCode::InvalidRequest,
13261 ErrorCode::UnsupportedVersion,
13262 ErrorCode::Unauthenticated,
13263 ErrorCode::PermissionDenied,
13264 ErrorCode::NotFound,
13265 ErrorCode::StaleCursor,
13266 ErrorCode::RestartBudgetExhausted,
13267 ErrorCode::LimitExceeded,
13268 ErrorCode::CapabilityUnavailable,
13269 ErrorCode::SecretNotEscrowed,
13270 ErrorCode::TemporarilyUnavailable,
13271 ErrorCode::Internal,
13272 ],
13273 limit_ids: &["request_bytes", "response_bytes", "page_size"],
13274 effect_class: "read_only",
13275 risk_flags: &["credential_sensitive"],
13276 capability_family: "security",
13277 retry_safety: "safe",
13278 identity_requirement: "none",
13279 resolver: None,
13280 cancellation: "per_call",
13281 side_effects: &[],
13282 recovery: "retry",
13283 collection_index_ref: "none",
13284 },
13285 CommandSemanticContract {
13286 command: Command::GetRuntimeStatus,
13287 admissible_errors: &[
13288 ErrorCode::Aborted,
13289 ErrorCode::DeadlineExceeded,
13290 ErrorCode::InvalidRequest,
13291 ErrorCode::UnsupportedVersion,
13292 ErrorCode::Unauthenticated,
13293 ErrorCode::PermissionDenied,
13294 ErrorCode::NotFound,
13295 ErrorCode::LimitExceeded,
13296 ErrorCode::CapabilityUnavailable,
13297 ErrorCode::TemporarilyUnavailable,
13298 ErrorCode::Internal,
13299 ],
13300 limit_ids: &["request_bytes", "response_bytes"],
13301 effect_class: "read_only",
13302 risk_flags: &[],
13303 capability_family: "catalog",
13304 retry_safety: "safe",
13305 identity_requirement: "none",
13306 resolver: None,
13307 cancellation: "per_call",
13308 side_effects: &[],
13309 recovery: "retry",
13310 collection_index_ref: "none",
13311 },
13312 CommandSemanticContract {
13313 command: Command::GetResultCacheStatus,
13314 admissible_errors: &[
13315 ErrorCode::Aborted,
13316 ErrorCode::DeadlineExceeded,
13317 ErrorCode::InvalidRequest,
13318 ErrorCode::UnsupportedVersion,
13319 ErrorCode::Unauthenticated,
13320 ErrorCode::PermissionDenied,
13321 ErrorCode::NotFound,
13322 ErrorCode::LimitExceeded,
13323 ErrorCode::CapabilityUnavailable,
13324 ErrorCode::TemporarilyUnavailable,
13325 ErrorCode::Internal,
13326 ],
13327 limit_ids: &["request_bytes", "response_bytes"],
13328 effect_class: "read_only",
13329 risk_flags: &[],
13330 capability_family: "catalog",
13331 retry_safety: "safe",
13332 identity_requirement: "none",
13333 resolver: None,
13334 cancellation: "per_call",
13335 side_effects: &[],
13336 recovery: "retry",
13337 collection_index_ref: "none",
13338 },
13339 CommandSemanticContract {
13340 command: Command::GetFieldPromotionStatus,
13341 admissible_errors: &[
13342 ErrorCode::Aborted,
13343 ErrorCode::DeadlineExceeded,
13344 ErrorCode::InvalidRequest,
13345 ErrorCode::UnsupportedVersion,
13346 ErrorCode::Unauthenticated,
13347 ErrorCode::PermissionDenied,
13348 ErrorCode::NotFound,
13349 ErrorCode::LimitExceeded,
13350 ErrorCode::CapabilityUnavailable,
13351 ErrorCode::TemporarilyUnavailable,
13352 ErrorCode::Internal,
13353 ],
13354 limit_ids: &["request_bytes", "response_bytes"],
13355 effect_class: "read_only",
13356 risk_flags: &[],
13357 capability_family: "catalog",
13358 retry_safety: "safe",
13359 identity_requirement: "none",
13360 resolver: None,
13361 cancellation: "per_call",
13362 side_effects: &[],
13363 recovery: "retry",
13364 collection_index_ref: "none",
13365 },
13366 CommandSemanticContract {
13367 command: Command::GetOverloadStatus,
13368 admissible_errors: &[
13369 ErrorCode::Aborted,
13370 ErrorCode::DeadlineExceeded,
13371 ErrorCode::InvalidRequest,
13372 ErrorCode::UnsupportedVersion,
13373 ErrorCode::Unauthenticated,
13374 ErrorCode::PermissionDenied,
13375 ErrorCode::NotFound,
13376 ErrorCode::LimitExceeded,
13377 ErrorCode::CapabilityUnavailable,
13378 ErrorCode::TemporarilyUnavailable,
13379 ErrorCode::Internal,
13380 ],
13381 limit_ids: &["request_bytes", "response_bytes"],
13382 effect_class: "read_only",
13383 risk_flags: &[],
13384 capability_family: "catalog",
13385 retry_safety: "safe",
13386 identity_requirement: "none",
13387 resolver: None,
13388 cancellation: "per_call",
13389 side_effects: &[],
13390 recovery: "retry",
13391 collection_index_ref: "none",
13392 },
13393 CommandSemanticContract {
13394 command: Command::ConfigureExternalKey,
13395 admissible_errors: &[
13396 ErrorCode::Aborted,
13397 ErrorCode::DeadlineExceeded,
13398 ErrorCode::InvalidRequest,
13399 ErrorCode::UnsupportedVersion,
13400 ErrorCode::Unauthenticated,
13401 ErrorCode::PermissionDenied,
13402 ErrorCode::NotFound,
13403 ErrorCode::Conflict,
13404 ErrorCode::LimitExceeded,
13405 ErrorCode::CapabilityUnavailable,
13406 ErrorCode::NotSubmitted,
13407 ErrorCode::SubmittedIndeterminate,
13408 ErrorCode::ExpiredUnknown,
13409 ErrorCode::TemporarilyUnavailable,
13410 ErrorCode::Internal,
13411 ],
13412 limit_ids: &["request_bytes", "response_bytes"],
13413 effect_class: "control_write",
13414 risk_flags: &[],
13415 capability_family: "lifecycle",
13416 retry_safety: "pre_submit_only",
13417 identity_requirement: "none",
13418 resolver: None,
13419 cancellation: "per_call_until_submission_then_resolve",
13420 side_effects: &["commits_authoritative_state"],
13421 recovery: "retry_if_not_submitted",
13422 collection_index_ref: "request_index",
13423 },
13424 CommandSemanticContract {
13425 command: Command::RotateExternalKeyBinding,
13426 admissible_errors: &[
13427 ErrorCode::Aborted,
13428 ErrorCode::DeadlineExceeded,
13429 ErrorCode::InvalidRequest,
13430 ErrorCode::UnsupportedVersion,
13431 ErrorCode::Unauthenticated,
13432 ErrorCode::PermissionDenied,
13433 ErrorCode::NotFound,
13434 ErrorCode::Conflict,
13435 ErrorCode::LimitExceeded,
13436 ErrorCode::CapabilityUnavailable,
13437 ErrorCode::NotSubmitted,
13438 ErrorCode::SubmittedIndeterminate,
13439 ErrorCode::ExpiredUnknown,
13440 ErrorCode::TemporarilyUnavailable,
13441 ErrorCode::Internal,
13442 ],
13443 limit_ids: &["request_bytes", "response_bytes"],
13444 effect_class: "control_write",
13445 risk_flags: &[],
13446 capability_family: "lifecycle",
13447 retry_safety: "pre_submit_only",
13448 identity_requirement: "none",
13449 resolver: None,
13450 cancellation: "per_call_until_submission_then_resolve",
13451 side_effects: &["commits_authoritative_state"],
13452 recovery: "retry_if_not_submitted",
13453 collection_index_ref: "request_index",
13454 },
13455 CommandSemanticContract {
13456 command: Command::ConfigureAggregateThenDelete,
13457 admissible_errors: &[
13458 ErrorCode::Aborted,
13459 ErrorCode::DeadlineExceeded,
13460 ErrorCode::InvalidRequest,
13461 ErrorCode::UnsupportedVersion,
13462 ErrorCode::Unauthenticated,
13463 ErrorCode::PermissionDenied,
13464 ErrorCode::NotFound,
13465 ErrorCode::Conflict,
13466 ErrorCode::LimitExceeded,
13467 ErrorCode::CapabilityUnavailable,
13468 ErrorCode::NotSubmitted,
13469 ErrorCode::SubmittedIndeterminate,
13470 ErrorCode::ExpiredUnknown,
13471 ErrorCode::TemporarilyUnavailable,
13472 ErrorCode::Internal,
13473 ],
13474 limit_ids: &["request_bytes", "response_bytes"],
13475 effect_class: "control_write",
13476 risk_flags: &["destructive"],
13477 capability_family: "lifecycle",
13478 retry_safety: "pre_submit_only",
13479 identity_requirement: "none",
13480 resolver: None,
13481 cancellation: "per_call_until_submission_then_resolve",
13482 side_effects: &["commits_authoritative_state"],
13483 recovery: "retry_if_not_submitted",
13484 collection_index_ref: "request_index",
13485 },
13486 CommandSemanticContract {
13487 command: Command::GetLifecycleStatus,
13488 admissible_errors: &[
13489 ErrorCode::Aborted,
13490 ErrorCode::DeadlineExceeded,
13491 ErrorCode::InvalidRequest,
13492 ErrorCode::UnsupportedVersion,
13493 ErrorCode::Unauthenticated,
13494 ErrorCode::PermissionDenied,
13495 ErrorCode::NotFound,
13496 ErrorCode::LimitExceeded,
13497 ErrorCode::CapabilityUnavailable,
13498 ErrorCode::TemporarilyUnavailable,
13499 ErrorCode::Internal,
13500 ],
13501 limit_ids: &["request_bytes", "response_bytes"],
13502 effect_class: "read_only",
13503 risk_flags: &[],
13504 capability_family: "catalog",
13505 retry_safety: "safe",
13506 identity_requirement: "none",
13507 resolver: None,
13508 cancellation: "per_call",
13509 side_effects: &[],
13510 recovery: "retry",
13511 collection_index_ref: "none",
13512 },
13513 CommandSemanticContract {
13514 command: Command::GetQuota,
13515 admissible_errors: &[
13516 ErrorCode::Aborted,
13517 ErrorCode::DeadlineExceeded,
13518 ErrorCode::InvalidRequest,
13519 ErrorCode::UnsupportedVersion,
13520 ErrorCode::Unauthenticated,
13521 ErrorCode::PermissionDenied,
13522 ErrorCode::NotFound,
13523 ErrorCode::LimitExceeded,
13524 ErrorCode::CapabilityUnavailable,
13525 ErrorCode::TemporarilyUnavailable,
13526 ErrorCode::Internal,
13527 ],
13528 limit_ids: &["request_bytes", "response_bytes"],
13529 effect_class: "read_only",
13530 risk_flags: &[],
13531 capability_family: "quota",
13532 retry_safety: "safe",
13533 identity_requirement: "none",
13534 resolver: None,
13535 cancellation: "per_call",
13536 side_effects: &[],
13537 recovery: "retry",
13538 collection_index_ref: "none",
13539 },
13540 CommandSemanticContract {
13541 command: Command::UpdateQuota,
13542 admissible_errors: &[
13543 ErrorCode::Aborted,
13544 ErrorCode::DeadlineExceeded,
13545 ErrorCode::InvalidRequest,
13546 ErrorCode::UnsupportedVersion,
13547 ErrorCode::Unauthenticated,
13548 ErrorCode::PermissionDenied,
13549 ErrorCode::NotFound,
13550 ErrorCode::Conflict,
13551 ErrorCode::LimitExceeded,
13552 ErrorCode::CapabilityUnavailable,
13553 ErrorCode::NotSubmitted,
13554 ErrorCode::SubmittedIndeterminate,
13555 ErrorCode::ExpiredUnknown,
13556 ErrorCode::TemporarilyUnavailable,
13557 ErrorCode::Internal,
13558 ],
13559 limit_ids: &["request_bytes", "response_bytes"],
13560 effect_class: "control_write",
13561 risk_flags: &[],
13562 capability_family: "quota",
13563 retry_safety: "pre_submit_only",
13564 identity_requirement: "none",
13565 resolver: None,
13566 cancellation: "per_call_until_submission_then_resolve",
13567 side_effects: &["commits_authoritative_state"],
13568 recovery: "retry_if_not_submitted",
13569 collection_index_ref: "none",
13570 },
13571 CommandSemanticContract {
13572 command: Command::GetBinding,
13573 admissible_errors: &[
13574 ErrorCode::Aborted,
13575 ErrorCode::DeadlineExceeded,
13576 ErrorCode::InvalidRequest,
13577 ErrorCode::UnsupportedVersion,
13578 ErrorCode::Unauthenticated,
13579 ErrorCode::PermissionDenied,
13580 ErrorCode::NotFound,
13581 ErrorCode::LimitExceeded,
13582 ErrorCode::CapabilityUnavailable,
13583 ErrorCode::TemporarilyUnavailable,
13584 ErrorCode::Internal,
13585 ],
13586 limit_ids: &["request_bytes", "response_bytes"],
13587 effect_class: "read_only",
13588 risk_flags: &[],
13589 capability_family: "runtime_control",
13590 retry_safety: "safe",
13591 identity_requirement: "none",
13592 resolver: None,
13593 cancellation: "per_call",
13594 side_effects: &[],
13595 recovery: "retry",
13596 collection_index_ref: "none",
13597 },
13598 CommandSemanticContract {
13599 command: Command::GetAdmissionStatus,
13600 admissible_errors: &[
13601 ErrorCode::Aborted,
13602 ErrorCode::DeadlineExceeded,
13603 ErrorCode::InvalidRequest,
13604 ErrorCode::UnsupportedVersion,
13605 ErrorCode::Unauthenticated,
13606 ErrorCode::PermissionDenied,
13607 ErrorCode::NotFound,
13608 ErrorCode::LimitExceeded,
13609 ErrorCode::CapabilityUnavailable,
13610 ErrorCode::TemporarilyUnavailable,
13611 ErrorCode::Internal,
13612 ],
13613 limit_ids: &["request_bytes", "response_bytes"],
13614 effect_class: "read_only",
13615 risk_flags: &[],
13616 capability_family: "runtime_control",
13617 retry_safety: "safe",
13618 identity_requirement: "none",
13619 resolver: None,
13620 cancellation: "per_call",
13621 side_effects: &[],
13622 recovery: "retry",
13623 collection_index_ref: "none",
13624 },
13625 CommandSemanticContract {
13626 command: Command::SetAdmission,
13627 admissible_errors: &[
13628 ErrorCode::Aborted,
13629 ErrorCode::DeadlineExceeded,
13630 ErrorCode::InvalidRequest,
13631 ErrorCode::UnsupportedVersion,
13632 ErrorCode::Unauthenticated,
13633 ErrorCode::PermissionDenied,
13634 ErrorCode::NotFound,
13635 ErrorCode::Conflict,
13636 ErrorCode::LimitExceeded,
13637 ErrorCode::CapabilityUnavailable,
13638 ErrorCode::NotSubmitted,
13639 ErrorCode::SubmittedIndeterminate,
13640 ErrorCode::ExpiredUnknown,
13641 ErrorCode::TemporarilyUnavailable,
13642 ErrorCode::Internal,
13643 ],
13644 limit_ids: &["request_bytes", "response_bytes"],
13645 effect_class: "control_write",
13646 risk_flags: &[],
13647 capability_family: "runtime_control",
13648 retry_safety: "pre_submit_only",
13649 identity_requirement: "none",
13650 resolver: None,
13651 cancellation: "per_call_until_submission_then_resolve",
13652 side_effects: &["commits_authoritative_state"],
13653 recovery: "retry_if_not_submitted",
13654 collection_index_ref: "none",
13655 },
13656 CommandSemanticContract {
13657 command: Command::GetQuiesceStatus,
13658 admissible_errors: &[
13659 ErrorCode::Aborted,
13660 ErrorCode::DeadlineExceeded,
13661 ErrorCode::InvalidRequest,
13662 ErrorCode::UnsupportedVersion,
13663 ErrorCode::Unauthenticated,
13664 ErrorCode::PermissionDenied,
13665 ErrorCode::NotFound,
13666 ErrorCode::LimitExceeded,
13667 ErrorCode::CapabilityUnavailable,
13668 ErrorCode::TemporarilyUnavailable,
13669 ErrorCode::Internal,
13670 ],
13671 limit_ids: &["request_bytes", "response_bytes"],
13672 effect_class: "read_only",
13673 risk_flags: &[],
13674 capability_family: "runtime_control",
13675 retry_safety: "safe",
13676 identity_requirement: "none",
13677 resolver: None,
13678 cancellation: "per_call",
13679 side_effects: &[],
13680 recovery: "retry",
13681 collection_index_ref: "none",
13682 },
13683 CommandSemanticContract {
13684 command: Command::GetDecommissionReadiness,
13685 admissible_errors: &[
13686 ErrorCode::Aborted,
13687 ErrorCode::DeadlineExceeded,
13688 ErrorCode::InvalidRequest,
13689 ErrorCode::UnsupportedVersion,
13690 ErrorCode::Unauthenticated,
13691 ErrorCode::PermissionDenied,
13692 ErrorCode::NotFound,
13693 ErrorCode::LimitExceeded,
13694 ErrorCode::CapabilityUnavailable,
13695 ErrorCode::TemporarilyUnavailable,
13696 ErrorCode::Internal,
13697 ],
13698 limit_ids: &["request_bytes", "response_bytes"],
13699 effect_class: "read_only",
13700 risk_flags: &[],
13701 capability_family: "runtime_control",
13702 retry_safety: "safe",
13703 identity_requirement: "none",
13704 resolver: None,
13705 cancellation: "per_call",
13706 side_effects: &[],
13707 recovery: "retry",
13708 collection_index_ref: "none",
13709 },
13710 CommandSemanticContract {
13711 command: Command::GetUpgradeReadiness,
13712 admissible_errors: &[
13713 ErrorCode::Aborted,
13714 ErrorCode::DeadlineExceeded,
13715 ErrorCode::InvalidRequest,
13716 ErrorCode::UnsupportedVersion,
13717 ErrorCode::Unauthenticated,
13718 ErrorCode::PermissionDenied,
13719 ErrorCode::NotFound,
13720 ErrorCode::LimitExceeded,
13721 ErrorCode::CapabilityUnavailable,
13722 ErrorCode::TemporarilyUnavailable,
13723 ErrorCode::Internal,
13724 ],
13725 limit_ids: &["request_bytes", "response_bytes"],
13726 effect_class: "read_only",
13727 risk_flags: &[],
13728 capability_family: "operations",
13729 retry_safety: "safe",
13730 identity_requirement: "none",
13731 resolver: None,
13732 cancellation: "per_call",
13733 side_effects: &[],
13734 recovery: "retry",
13735 collection_index_ref: "none",
13736 },
13737 CommandSemanticContract {
13738 command: Command::GetMaintenanceStatus,
13739 admissible_errors: &[
13740 ErrorCode::Aborted,
13741 ErrorCode::DeadlineExceeded,
13742 ErrorCode::InvalidRequest,
13743 ErrorCode::UnsupportedVersion,
13744 ErrorCode::Unauthenticated,
13745 ErrorCode::PermissionDenied,
13746 ErrorCode::NotFound,
13747 ErrorCode::StaleCursor,
13748 ErrorCode::LimitExceeded,
13749 ErrorCode::CapabilityUnavailable,
13750 ErrorCode::TemporarilyUnavailable,
13751 ErrorCode::Internal,
13752 ],
13753 limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
13754 effect_class: "read_only",
13755 risk_flags: &[],
13756 capability_family: "operations",
13757 retry_safety: "safe",
13758 identity_requirement: "none",
13759 resolver: None,
13760 cancellation: "per_call",
13761 side_effects: &[],
13762 recovery: "retry",
13763 collection_index_ref: "optional_request_index",
13764 },
13765 CommandSemanticContract {
13766 command: Command::WarmVectorIndex,
13767 admissible_errors: &[
13768 ErrorCode::Aborted,
13769 ErrorCode::DeadlineExceeded,
13770 ErrorCode::InvalidRequest,
13771 ErrorCode::UnsupportedVersion,
13772 ErrorCode::Unauthenticated,
13773 ErrorCode::PermissionDenied,
13774 ErrorCode::NotFound,
13775 ErrorCode::Conflict,
13776 ErrorCode::LimitExceeded,
13777 ErrorCode::CapabilityUnavailable,
13778 ErrorCode::TemporarilyUnavailable,
13779 ErrorCode::Internal,
13780 ],
13781 limit_ids: &[
13782 "request_bytes",
13783 "response_bytes",
13784 "vector_warm_components",
13785 "vector_warm_requests",
13786 "vector_warm_bytes",
13787 "vector_warm_achievements",
13788 "vector_warm_ttl_millis",
13789 ],
13790 effect_class: "read_only",
13791 risk_flags: &[],
13792 capability_family: "data",
13793 retry_safety: "safe",
13794 identity_requirement: "exact_root",
13795 resolver: None,
13796 cancellation: "per_call",
13797 side_effects: &["populates_reconstructible_cache"],
13798 recovery: "retry",
13799 collection_index_ref: "request_index",
13800 },
13801 CommandSemanticContract {
13802 command: Command::EvaluateVectorRecall,
13803 admissible_errors: &[
13804 ErrorCode::Aborted,
13805 ErrorCode::DeadlineExceeded,
13806 ErrorCode::InvalidRequest,
13807 ErrorCode::UnsupportedVersion,
13808 ErrorCode::Unauthenticated,
13809 ErrorCode::PermissionDenied,
13810 ErrorCode::NotFound,
13811 ErrorCode::Conflict,
13812 ErrorCode::LimitExceeded,
13813 ErrorCode::CapabilityUnavailable,
13814 ErrorCode::NotSubmitted,
13815 ErrorCode::SubmittedIndeterminate,
13816 ErrorCode::ExpiredUnknown,
13817 ErrorCode::TemporarilyUnavailable,
13818 ErrorCode::Internal,
13819 ],
13820 limit_ids: &[
13821 "request_bytes",
13822 "response_bytes",
13823 "vector_dimensions",
13824 "vector_query_bytes",
13825 "vector_request_bytes",
13826 "vector_candidates",
13827 "vector_evaluation_queries",
13828 "vector_evaluation_k",
13829 "vector_evaluation_artifact_bytes",
13830 ],
13831 effect_class: "durable_submit",
13832 risk_flags: &[],
13833 capability_family: "diagnostics",
13834 retry_safety: "pre_submit_only",
13835 identity_requirement: "caller_action_id",
13836 resolver: None,
13837 cancellation: "per_call_until_submission_then_resolve",
13838 side_effects: &["commits_authoritative_state"],
13839 recovery: "retry_if_not_submitted",
13840 collection_index_ref: "request_index",
13841 },
13842 CommandSemanticContract {
13843 command: Command::CalibrateVectorStrategy,
13844 admissible_errors: &[
13845 ErrorCode::Aborted,
13846 ErrorCode::DeadlineExceeded,
13847 ErrorCode::InvalidRequest,
13848 ErrorCode::UnsupportedVersion,
13849 ErrorCode::Unauthenticated,
13850 ErrorCode::PermissionDenied,
13851 ErrorCode::NotFound,
13852 ErrorCode::Conflict,
13853 ErrorCode::LimitExceeded,
13854 ErrorCode::CapabilityUnavailable,
13855 ErrorCode::NotSubmitted,
13856 ErrorCode::SubmittedIndeterminate,
13857 ErrorCode::ExpiredUnknown,
13858 ErrorCode::TemporarilyUnavailable,
13859 ErrorCode::Internal,
13860 ],
13861 limit_ids: &[
13862 "request_bytes",
13863 "response_bytes",
13864 "vector_dimensions",
13865 "vector_query_bytes",
13866 "vector_request_bytes",
13867 "vector_candidates",
13868 "vector_evaluation_queries",
13869 "vector_evaluation_k",
13870 "vector_evaluation_profiles",
13871 "vector_evaluation_artifact_bytes",
13872 ],
13873 effect_class: "durable_submit",
13874 risk_flags: &[],
13875 capability_family: "diagnostics",
13876 retry_safety: "pre_submit_only",
13877 identity_requirement: "caller_action_id",
13878 resolver: None,
13879 cancellation: "per_call_until_submission_then_resolve",
13880 side_effects: &["commits_authoritative_state"],
13881 recovery: "retry_if_not_submitted",
13882 collection_index_ref: "request_index",
13883 },
13884 CommandSemanticContract {
13885 command: Command::GetVectorDiagnostic,
13886 admissible_errors: &[
13887 ErrorCode::Aborted,
13888 ErrorCode::DeadlineExceeded,
13889 ErrorCode::InvalidRequest,
13890 ErrorCode::UnsupportedVersion,
13891 ErrorCode::Unauthenticated,
13892 ErrorCode::PermissionDenied,
13893 ErrorCode::NotFound,
13894 ErrorCode::LimitExceeded,
13895 ErrorCode::CapabilityUnavailable,
13896 ErrorCode::TemporarilyUnavailable,
13897 ErrorCode::Internal,
13898 ],
13899 limit_ids: &["request_bytes", "response_bytes"],
13900 effect_class: "read_only",
13901 risk_flags: &[],
13902 capability_family: "diagnostics",
13903 retry_safety: "safe",
13904 identity_requirement: "request_locator",
13905 resolver: None,
13906 cancellation: "per_call",
13907 side_effects: &[],
13908 recovery: "retry",
13909 collection_index_ref: "none",
13910 },
13911 CommandSemanticContract {
13912 command: Command::CreateDiagnostic,
13913 admissible_errors: &[
13914 ErrorCode::Aborted,
13915 ErrorCode::DeadlineExceeded,
13916 ErrorCode::InvalidRequest,
13917 ErrorCode::UnsupportedVersion,
13918 ErrorCode::Unauthenticated,
13919 ErrorCode::PermissionDenied,
13920 ErrorCode::NotFound,
13921 ErrorCode::Conflict,
13922 ErrorCode::LimitExceeded,
13923 ErrorCode::CapabilityUnavailable,
13924 ErrorCode::NotSubmitted,
13925 ErrorCode::SubmittedIndeterminate,
13926 ErrorCode::ExpiredUnknown,
13927 ErrorCode::TemporarilyUnavailable,
13928 ErrorCode::Internal,
13929 ],
13930 limit_ids: &["request_bytes", "response_bytes"],
13931 effect_class: "durable_submit",
13932 risk_flags: &[],
13933 capability_family: "diagnostics",
13934 retry_safety: "pre_submit_only",
13935 identity_requirement: "none",
13936 resolver: None,
13937 cancellation: "per_call_until_submission_then_resolve",
13938 side_effects: &["commits_authoritative_state"],
13939 recovery: "retry_if_not_submitted",
13940 collection_index_ref: "none",
13941 },
13942 CommandSemanticContract {
13943 command: Command::GetDiagnostic,
13944 admissible_errors: &[
13945 ErrorCode::Aborted,
13946 ErrorCode::DeadlineExceeded,
13947 ErrorCode::InvalidRequest,
13948 ErrorCode::UnsupportedVersion,
13949 ErrorCode::Unauthenticated,
13950 ErrorCode::PermissionDenied,
13951 ErrorCode::NotFound,
13952 ErrorCode::LimitExceeded,
13953 ErrorCode::CapabilityUnavailable,
13954 ErrorCode::TemporarilyUnavailable,
13955 ErrorCode::Internal,
13956 ],
13957 limit_ids: &["request_bytes", "response_bytes"],
13958 effect_class: "read_only",
13959 risk_flags: &[],
13960 capability_family: "diagnostics",
13961 retry_safety: "safe",
13962 identity_requirement: "request_locator",
13963 resolver: None,
13964 cancellation: "per_call",
13965 side_effects: &[],
13966 recovery: "retry",
13967 collection_index_ref: "none",
13968 },
13969 CommandSemanticContract {
13970 command: Command::PrepareCollectionExport,
13971 admissible_errors: &[
13972 ErrorCode::Aborted,
13973 ErrorCode::DeadlineExceeded,
13974 ErrorCode::InvalidRequest,
13975 ErrorCode::UnsupportedVersion,
13976 ErrorCode::Unauthenticated,
13977 ErrorCode::PermissionDenied,
13978 ErrorCode::NotFound,
13979 ErrorCode::LimitExceeded,
13980 ErrorCode::CapabilityUnavailable,
13981 ErrorCode::TemporarilyUnavailable,
13982 ErrorCode::Internal,
13983 ],
13984 limit_ids: &[
13985 "request_bytes",
13986 "response_bytes",
13987 "collection_export_bytes",
13988 "portability_prefix_bytes",
13989 ],
13990 effect_class: "prepare",
13991 risk_flags: &[],
13992 capability_family: "portability",
13993 retry_safety: "safe",
13994 identity_requirement: "caller_action_id",
13995 resolver: None,
13996 cancellation: "per_call",
13997 side_effects: &[],
13998 recovery: "retry",
13999 collection_index_ref: "none",
14000 },
14001 CommandSemanticContract {
14002 command: Command::StartCollectionExport,
14003 admissible_errors: &[
14004 ErrorCode::Aborted,
14005 ErrorCode::DeadlineExceeded,
14006 ErrorCode::InvalidRequest,
14007 ErrorCode::UnsupportedVersion,
14008 ErrorCode::Unauthenticated,
14009 ErrorCode::PermissionDenied,
14010 ErrorCode::NotFound,
14011 ErrorCode::Conflict,
14012 ErrorCode::LimitExceeded,
14013 ErrorCode::CapabilityUnavailable,
14014 ErrorCode::NotSubmitted,
14015 ErrorCode::SubmittedIndeterminate,
14016 ErrorCode::ExpiredUnknown,
14017 ErrorCode::TemporarilyUnavailable,
14018 ErrorCode::Internal,
14019 ],
14020 limit_ids: &[
14021 "request_bytes",
14022 "response_bytes",
14023 "collection_export_bytes",
14024 "collection_export_documents",
14025 "portability_prefix_bytes",
14026 ],
14027 effect_class: "durable_submit",
14028 risk_flags: &[],
14029 capability_family: "portability",
14030 retry_safety: "pre_submit_only",
14031 identity_requirement: "caller_action_id",
14032 resolver: Some(Command::ResolveCollectionExport),
14033 cancellation: "per_call_until_submission_then_resolve",
14034 side_effects: &["commits_authoritative_state", "writes_external_artifact"],
14035 recovery: "resolve_with_resolve_collection_export",
14036 collection_index_ref: "none",
14037 },
14038 CommandSemanticContract {
14039 command: Command::ResolveCollectionExport,
14040 admissible_errors: &[
14041 ErrorCode::Aborted,
14042 ErrorCode::DeadlineExceeded,
14043 ErrorCode::InvalidRequest,
14044 ErrorCode::UnsupportedVersion,
14045 ErrorCode::Unauthenticated,
14046 ErrorCode::PermissionDenied,
14047 ErrorCode::NotFound,
14048 ErrorCode::LimitExceeded,
14049 ErrorCode::CapabilityUnavailable,
14050 ErrorCode::TemporarilyUnavailable,
14051 ErrorCode::Internal,
14052 ],
14053 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
14054 effect_class: "read_only",
14055 risk_flags: &[],
14056 capability_family: "portability",
14057 retry_safety: "safe",
14058 identity_requirement: "caller_action_id",
14059 resolver: None,
14060 cancellation: "per_call",
14061 side_effects: &[],
14062 recovery: "retry",
14063 collection_index_ref: "none",
14064 },
14065 CommandSemanticContract {
14066 command: Command::VerifyCollectionExport,
14067 admissible_errors: &[
14068 ErrorCode::Aborted,
14069 ErrorCode::DeadlineExceeded,
14070 ErrorCode::InvalidRequest,
14071 ErrorCode::UnsupportedVersion,
14072 ErrorCode::Unauthenticated,
14073 ErrorCode::PermissionDenied,
14074 ErrorCode::NotFound,
14075 ErrorCode::LimitExceeded,
14076 ErrorCode::CapabilityUnavailable,
14077 ErrorCode::ChecksumMismatch,
14078 ErrorCode::TemporarilyUnavailable,
14079 ErrorCode::Internal,
14080 ],
14081 limit_ids: &[
14082 "request_bytes",
14083 "response_bytes",
14084 "collection_export_bytes",
14085 "portability_prefix_bytes",
14086 ],
14087 effect_class: "read_only",
14088 risk_flags: &[],
14089 capability_family: "portability",
14090 retry_safety: "safe",
14091 identity_requirement: "request_locator",
14092 resolver: None,
14093 cancellation: "per_call",
14094 side_effects: &[],
14095 recovery: "retry",
14096 collection_index_ref: "none",
14097 },
14098 CommandSemanticContract {
14099 command: Command::PrepareCollectionRestore,
14100 admissible_errors: &[
14101 ErrorCode::Aborted,
14102 ErrorCode::DeadlineExceeded,
14103 ErrorCode::InvalidRequest,
14104 ErrorCode::UnsupportedVersion,
14105 ErrorCode::Unauthenticated,
14106 ErrorCode::PermissionDenied,
14107 ErrorCode::NotFound,
14108 ErrorCode::Conflict,
14109 ErrorCode::LimitExceeded,
14110 ErrorCode::CapabilityUnavailable,
14111 ErrorCode::ChecksumMismatch,
14112 ErrorCode::TemporarilyUnavailable,
14113 ErrorCode::Internal,
14114 ],
14115 limit_ids: &[
14116 "request_bytes",
14117 "response_bytes",
14118 "collection_export_bytes",
14119 "portability_prefix_bytes",
14120 ],
14121 effect_class: "prepare",
14122 risk_flags: &[],
14123 capability_family: "portability",
14124 retry_safety: "safe",
14125 identity_requirement: "caller_action_id",
14126 resolver: None,
14127 cancellation: "per_call",
14128 side_effects: &[],
14129 recovery: "retry",
14130 collection_index_ref: "none",
14131 },
14132 CommandSemanticContract {
14133 command: Command::StartCollectionRestore,
14134 admissible_errors: &[
14135 ErrorCode::Aborted,
14136 ErrorCode::DeadlineExceeded,
14137 ErrorCode::InvalidRequest,
14138 ErrorCode::UnsupportedVersion,
14139 ErrorCode::Unauthenticated,
14140 ErrorCode::PermissionDenied,
14141 ErrorCode::NotFound,
14142 ErrorCode::Conflict,
14143 ErrorCode::LimitExceeded,
14144 ErrorCode::CapabilityUnavailable,
14145 ErrorCode::NotSubmitted,
14146 ErrorCode::SubmittedIndeterminate,
14147 ErrorCode::ExpiredUnknown,
14148 ErrorCode::ChecksumMismatch,
14149 ErrorCode::TemporarilyUnavailable,
14150 ErrorCode::Internal,
14151 ],
14152 limit_ids: &[
14153 "request_bytes",
14154 "response_bytes",
14155 "collection_export_bytes",
14156 "collection_export_documents",
14157 "portability_prefix_bytes",
14158 ],
14159 effect_class: "durable_submit",
14160 risk_flags: &[],
14161 capability_family: "portability",
14162 retry_safety: "pre_submit_only",
14163 identity_requirement: "caller_action_id",
14164 resolver: Some(Command::ResolveCollectionRestore),
14165 cancellation: "per_call_until_submission_then_resolve",
14166 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
14167 recovery: "resolve_with_resolve_collection_restore",
14168 collection_index_ref: "none",
14169 },
14170 CommandSemanticContract {
14171 command: Command::ResolveCollectionRestore,
14172 admissible_errors: &[
14173 ErrorCode::Aborted,
14174 ErrorCode::DeadlineExceeded,
14175 ErrorCode::InvalidRequest,
14176 ErrorCode::UnsupportedVersion,
14177 ErrorCode::Unauthenticated,
14178 ErrorCode::PermissionDenied,
14179 ErrorCode::NotFound,
14180 ErrorCode::LimitExceeded,
14181 ErrorCode::CapabilityUnavailable,
14182 ErrorCode::TemporarilyUnavailable,
14183 ErrorCode::Internal,
14184 ],
14185 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
14186 effect_class: "read_only",
14187 risk_flags: &[],
14188 capability_family: "portability",
14189 retry_safety: "safe",
14190 identity_requirement: "caller_action_id",
14191 resolver: None,
14192 cancellation: "per_call",
14193 side_effects: &[],
14194 recovery: "retry",
14195 collection_index_ref: "none",
14196 },
14197 CommandSemanticContract {
14198 command: Command::PrepareIndexExport,
14199 admissible_errors: &[
14200 ErrorCode::Aborted,
14201 ErrorCode::DeadlineExceeded,
14202 ErrorCode::InvalidRequest,
14203 ErrorCode::UnsupportedVersion,
14204 ErrorCode::Unauthenticated,
14205 ErrorCode::PermissionDenied,
14206 ErrorCode::NotFound,
14207 ErrorCode::LimitExceeded,
14208 ErrorCode::CapabilityUnavailable,
14209 ErrorCode::TemporarilyUnavailable,
14210 ErrorCode::Internal,
14211 ],
14212 limit_ids: &[
14213 "request_bytes",
14214 "response_bytes",
14215 "index_transfer_bytes",
14216 "index_transfer_records",
14217 "index_transfer_pages",
14218 "portability_prefix_bytes",
14219 ],
14220 effect_class: "prepare",
14221 risk_flags: &[],
14222 capability_family: "portability",
14223 retry_safety: "safe",
14224 identity_requirement: "caller_action_id",
14225 resolver: None,
14226 cancellation: "per_call",
14227 side_effects: &[],
14228 recovery: "retry",
14229 collection_index_ref: "request_index",
14230 },
14231 CommandSemanticContract {
14232 command: Command::StartIndexExport,
14233 admissible_errors: &[
14234 ErrorCode::Aborted,
14235 ErrorCode::DeadlineExceeded,
14236 ErrorCode::InvalidRequest,
14237 ErrorCode::UnsupportedVersion,
14238 ErrorCode::Unauthenticated,
14239 ErrorCode::PermissionDenied,
14240 ErrorCode::NotFound,
14241 ErrorCode::Conflict,
14242 ErrorCode::LimitExceeded,
14243 ErrorCode::CapabilityUnavailable,
14244 ErrorCode::NotSubmitted,
14245 ErrorCode::SubmittedIndeterminate,
14246 ErrorCode::ExpiredUnknown,
14247 ErrorCode::TemporarilyUnavailable,
14248 ErrorCode::Internal,
14249 ],
14250 limit_ids: &[
14251 "request_bytes",
14252 "response_bytes",
14253 "index_transfer_bytes",
14254 "index_transfer_records",
14255 "index_transfer_pages",
14256 "portability_prefix_bytes",
14257 ],
14258 effect_class: "durable_submit",
14259 risk_flags: &[],
14260 capability_family: "portability",
14261 retry_safety: "pre_submit_only",
14262 identity_requirement: "caller_action_id",
14263 resolver: Some(Command::ResolveIndexExport),
14264 cancellation: "per_call_until_submission_then_resolve",
14265 side_effects: &["commits_authoritative_state", "writes_external_artifact"],
14266 recovery: "resolve_with_resolve_index_export",
14267 collection_index_ref: "request_index",
14268 },
14269 CommandSemanticContract {
14270 command: Command::ResolveIndexExport,
14271 admissible_errors: &[
14272 ErrorCode::Aborted,
14273 ErrorCode::DeadlineExceeded,
14274 ErrorCode::InvalidRequest,
14275 ErrorCode::UnsupportedVersion,
14276 ErrorCode::Unauthenticated,
14277 ErrorCode::PermissionDenied,
14278 ErrorCode::NotFound,
14279 ErrorCode::LimitExceeded,
14280 ErrorCode::CapabilityUnavailable,
14281 ErrorCode::ChecksumMismatch,
14282 ErrorCode::TemporarilyUnavailable,
14283 ErrorCode::Internal,
14284 ],
14285 limit_ids: &[
14286 "request_bytes",
14287 "response_bytes",
14288 "index_transfer_bytes",
14289 "index_transfer_pages",
14290 "portability_prefix_bytes",
14291 ],
14292 effect_class: "read_only",
14293 risk_flags: &[],
14294 capability_family: "portability",
14295 retry_safety: "safe",
14296 identity_requirement: "caller_action_id",
14297 resolver: None,
14298 cancellation: "per_call",
14299 side_effects: &[],
14300 recovery: "retry",
14301 collection_index_ref: "request_index",
14302 },
14303 CommandSemanticContract {
14304 command: Command::VerifyIndexExport,
14305 admissible_errors: &[
14306 ErrorCode::Aborted,
14307 ErrorCode::DeadlineExceeded,
14308 ErrorCode::InvalidRequest,
14309 ErrorCode::UnsupportedVersion,
14310 ErrorCode::Unauthenticated,
14311 ErrorCode::PermissionDenied,
14312 ErrorCode::NotFound,
14313 ErrorCode::LimitExceeded,
14314 ErrorCode::CapabilityUnavailable,
14315 ErrorCode::ChecksumMismatch,
14316 ErrorCode::TemporarilyUnavailable,
14317 ErrorCode::Internal,
14318 ],
14319 limit_ids: &[
14320 "request_bytes",
14321 "response_bytes",
14322 "index_transfer_bytes",
14323 "index_transfer_pages",
14324 "portability_prefix_bytes",
14325 ],
14326 effect_class: "read_only",
14327 risk_flags: &[],
14328 capability_family: "portability",
14329 retry_safety: "safe",
14330 identity_requirement: "request_locator",
14331 resolver: None,
14332 cancellation: "per_call",
14333 side_effects: &[],
14334 recovery: "retry",
14335 collection_index_ref: "request_artifact_source_index",
14336 },
14337 CommandSemanticContract {
14338 command: Command::PrepareIndexImport,
14339 admissible_errors: &[
14340 ErrorCode::Aborted,
14341 ErrorCode::DeadlineExceeded,
14342 ErrorCode::InvalidRequest,
14343 ErrorCode::UnsupportedVersion,
14344 ErrorCode::Unauthenticated,
14345 ErrorCode::PermissionDenied,
14346 ErrorCode::NotFound,
14347 ErrorCode::Conflict,
14348 ErrorCode::LimitExceeded,
14349 ErrorCode::CapabilityUnavailable,
14350 ErrorCode::ChecksumMismatch,
14351 ErrorCode::TemporarilyUnavailable,
14352 ErrorCode::Internal,
14353 ],
14354 limit_ids: &[
14355 "request_bytes",
14356 "response_bytes",
14357 "index_transfer_bytes",
14358 "index_transfer_pages",
14359 "portability_prefix_bytes",
14360 "resource_initial_shards",
14361 "resource_target_shard_bytes",
14362 "resource_admission_weight",
14363 "resource_ram_bytes",
14364 "resource_nvme_bytes",
14365 "resource_refresh_millis",
14366 "resource_memtable_bytes",
14367 "resource_parallelism",
14368 ],
14369 effect_class: "prepare",
14370 risk_flags: &[],
14371 capability_family: "portability",
14372 retry_safety: "safe",
14373 identity_requirement: "caller_action_id",
14374 resolver: None,
14375 cancellation: "per_call",
14376 side_effects: &[],
14377 recovery: "retry",
14378 collection_index_ref: "request_destination_name",
14379 },
14380 CommandSemanticContract {
14381 command: Command::StartIndexImport,
14382 admissible_errors: &[
14383 ErrorCode::Aborted,
14384 ErrorCode::DeadlineExceeded,
14385 ErrorCode::InvalidRequest,
14386 ErrorCode::UnsupportedVersion,
14387 ErrorCode::Unauthenticated,
14388 ErrorCode::PermissionDenied,
14389 ErrorCode::NotFound,
14390 ErrorCode::Conflict,
14391 ErrorCode::LimitExceeded,
14392 ErrorCode::CapabilityUnavailable,
14393 ErrorCode::NotSubmitted,
14394 ErrorCode::SubmittedIndeterminate,
14395 ErrorCode::ExpiredUnknown,
14396 ErrorCode::ChecksumMismatch,
14397 ErrorCode::TemporarilyUnavailable,
14398 ErrorCode::Internal,
14399 ],
14400 limit_ids: &[
14401 "request_bytes",
14402 "response_bytes",
14403 "index_transfer_bytes",
14404 "index_transfer_pages",
14405 "portability_prefix_bytes",
14406 "resource_initial_shards",
14407 "resource_target_shard_bytes",
14408 "resource_admission_weight",
14409 "resource_ram_bytes",
14410 "resource_nvme_bytes",
14411 "resource_refresh_millis",
14412 "resource_memtable_bytes",
14413 "resource_parallelism",
14414 ],
14415 effect_class: "durable_submit",
14416 risk_flags: &[],
14417 capability_family: "portability",
14418 retry_safety: "pre_submit_only",
14419 identity_requirement: "caller_action_id",
14420 resolver: Some(Command::ResolveIndexImport),
14421 cancellation: "per_call_until_submission_then_resolve",
14422 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
14423 recovery: "resolve_with_resolve_index_import",
14424 collection_index_ref: "request_destination_name",
14425 },
14426 CommandSemanticContract {
14427 command: Command::ResolveIndexImport,
14428 admissible_errors: &[
14429 ErrorCode::Aborted,
14430 ErrorCode::DeadlineExceeded,
14431 ErrorCode::InvalidRequest,
14432 ErrorCode::UnsupportedVersion,
14433 ErrorCode::Unauthenticated,
14434 ErrorCode::PermissionDenied,
14435 ErrorCode::NotFound,
14436 ErrorCode::LimitExceeded,
14437 ErrorCode::CapabilityUnavailable,
14438 ErrorCode::ChecksumMismatch,
14439 ErrorCode::TemporarilyUnavailable,
14440 ErrorCode::Internal,
14441 ],
14442 limit_ids: &[
14443 "request_bytes",
14444 "response_bytes",
14445 "index_transfer_bytes",
14446 "index_transfer_pages",
14447 "portability_prefix_bytes",
14448 ],
14449 effect_class: "read_only",
14450 risk_flags: &[],
14451 capability_family: "portability",
14452 retry_safety: "safe",
14453 identity_requirement: "caller_action_id",
14454 resolver: None,
14455 cancellation: "per_call",
14456 side_effects: &[],
14457 recovery: "retry",
14458 collection_index_ref: "request_destination_name",
14459 },
14460 CommandSemanticContract {
14461 command: Command::ReadArtifactChunk,
14462 admissible_errors: &[
14463 ErrorCode::Aborted,
14464 ErrorCode::DeadlineExceeded,
14465 ErrorCode::InvalidRequest,
14466 ErrorCode::UnsupportedVersion,
14467 ErrorCode::Unauthenticated,
14468 ErrorCode::PermissionDenied,
14469 ErrorCode::NotFound,
14470 ErrorCode::LimitExceeded,
14471 ErrorCode::CapabilityUnavailable,
14472 ErrorCode::ArtifactRangeInvalid,
14473 ErrorCode::ChecksumMismatch,
14474 ErrorCode::TemporarilyUnavailable,
14475 ErrorCode::Internal,
14476 ],
14477 limit_ids: &["request_bytes", "response_bytes", "artifact_chunk_bytes"],
14478 effect_class: "read_only",
14479 risk_flags: &[],
14480 capability_family: "operations",
14481 retry_safety: "safe",
14482 identity_requirement: "none",
14483 resolver: None,
14484 cancellation: "per_call",
14485 side_effects: &[],
14486 recovery: "retry",
14487 collection_index_ref: "none",
14488 },
14489 CommandSemanticContract {
14490 command: Command::ExportUsage,
14491 admissible_errors: &[
14492 ErrorCode::Aborted,
14493 ErrorCode::DeadlineExceeded,
14494 ErrorCode::InvalidRequest,
14495 ErrorCode::UnsupportedVersion,
14496 ErrorCode::Unauthenticated,
14497 ErrorCode::PermissionDenied,
14498 ErrorCode::NotFound,
14499 ErrorCode::StaleCursor,
14500 ErrorCode::RestartBudgetExhausted,
14501 ErrorCode::LimitExceeded,
14502 ErrorCode::CapabilityUnavailable,
14503 ErrorCode::TemporarilyUnavailable,
14504 ErrorCode::Internal,
14505 ],
14506 limit_ids: &["request_bytes", "response_bytes", "page_size"],
14507 effect_class: "read_only",
14508 risk_flags: &[],
14509 capability_family: "usage",
14510 retry_safety: "safe",
14511 identity_requirement: "none",
14512 resolver: None,
14513 cancellation: "per_call",
14514 side_effects: &[],
14515 recovery: "retry",
14516 collection_index_ref: "none",
14517 },
14518 CommandSemanticContract {
14519 command: Command::ExecuteStateRead,
14520 admissible_errors: &[
14521 ErrorCode::Aborted,
14522 ErrorCode::DeadlineExceeded,
14523 ErrorCode::InvalidRequest,
14524 ErrorCode::UnsupportedVersion,
14525 ErrorCode::Unauthenticated,
14526 ErrorCode::PermissionDenied,
14527 ErrorCode::NotFound,
14528 ErrorCode::LimitExceeded,
14529 ErrorCode::CapabilityUnavailable,
14530 ErrorCode::TemporarilyUnavailable,
14531 ErrorCode::Internal,
14532 ],
14533 limit_ids: &[
14534 "request_bytes",
14535 "response_bytes",
14536 "state_command_keys",
14537 "state_command_value_bytes",
14538 ],
14539 effect_class: "read_only",
14540 risk_flags: &[],
14541 capability_family: "data",
14542 retry_safety: "safe",
14543 identity_requirement: "none",
14544 resolver: None,
14545 cancellation: "per_call",
14546 side_effects: &[],
14547 recovery: "retry",
14548 collection_index_ref: "request_index",
14549 },
14550 CommandSemanticContract {
14551 command: Command::PrepareStateWrite,
14552 admissible_errors: &[
14553 ErrorCode::Aborted,
14554 ErrorCode::DeadlineExceeded,
14555 ErrorCode::InvalidRequest,
14556 ErrorCode::UnsupportedVersion,
14557 ErrorCode::Unauthenticated,
14558 ErrorCode::PermissionDenied,
14559 ErrorCode::NotFound,
14560 ErrorCode::LimitExceeded,
14561 ErrorCode::CapabilityUnavailable,
14562 ErrorCode::TemporarilyUnavailable,
14563 ErrorCode::Internal,
14564 ],
14565 limit_ids: &[
14566 "request_bytes",
14567 "response_bytes",
14568 "state_command_keys",
14569 "state_command_value_bytes",
14570 ],
14571 effect_class: "prepare",
14572 risk_flags: &[],
14573 capability_family: "data",
14574 retry_safety: "safe",
14575 identity_requirement: "caller_action_id",
14576 resolver: None,
14577 cancellation: "per_call",
14578 side_effects: &["creates_bounded_preparation"],
14579 recovery: "retry",
14580 collection_index_ref: "request_index",
14581 },
14582 CommandSemanticContract {
14583 command: Command::SubmitStateWrite,
14584 admissible_errors: &[
14585 ErrorCode::Aborted,
14586 ErrorCode::DeadlineExceeded,
14587 ErrorCode::InvalidRequest,
14588 ErrorCode::UnsupportedVersion,
14589 ErrorCode::Unauthenticated,
14590 ErrorCode::PermissionDenied,
14591 ErrorCode::NotFound,
14592 ErrorCode::Conflict,
14593 ErrorCode::LimitExceeded,
14594 ErrorCode::CapabilityUnavailable,
14595 ErrorCode::NotSubmitted,
14596 ErrorCode::SubmittedIndeterminate,
14597 ErrorCode::ExpiredUnknown,
14598 ErrorCode::TemporarilyUnavailable,
14599 ErrorCode::Internal,
14600 ],
14601 limit_ids: &[
14602 "request_bytes",
14603 "response_bytes",
14604 "state_command_keys",
14605 "state_command_value_bytes",
14606 ],
14607 effect_class: "durable_submit",
14608 risk_flags: &[],
14609 capability_family: "data",
14610 retry_safety: "pre_submit_only",
14611 identity_requirement: "request_locator",
14612 resolver: Some(Command::ResolveStateWrite),
14613 cancellation: "per_call_until_submission_then_resolve",
14614 side_effects: &["commits_authoritative_state"],
14615 recovery: "resolve_with_resolve_state_write",
14616 collection_index_ref: "request_index",
14617 },
14618 CommandSemanticContract {
14619 command: Command::ResolveStateWrite,
14620 admissible_errors: &[
14621 ErrorCode::Aborted,
14622 ErrorCode::DeadlineExceeded,
14623 ErrorCode::InvalidRequest,
14624 ErrorCode::UnsupportedVersion,
14625 ErrorCode::Unauthenticated,
14626 ErrorCode::PermissionDenied,
14627 ErrorCode::NotFound,
14628 ErrorCode::LimitExceeded,
14629 ErrorCode::CapabilityUnavailable,
14630 ErrorCode::TemporarilyUnavailable,
14631 ErrorCode::Internal,
14632 ],
14633 limit_ids: &[
14634 "request_bytes",
14635 "response_bytes",
14636 "state_command_keys",
14637 "state_command_value_bytes",
14638 ],
14639 effect_class: "read_only",
14640 risk_flags: &[],
14641 capability_family: "data",
14642 retry_safety: "safe",
14643 identity_requirement: "request_locator",
14644 resolver: None,
14645 cancellation: "per_call",
14646 side_effects: &[],
14647 recovery: "retry",
14648 collection_index_ref: "request_index",
14649 },
14650];
14651#[derive(Clone, Copy, Debug, Eq, PartialEq)]
14652pub struct CommandOutcomeContract {
14653 pub command: Command,
14654 pub possible_submission_states: &'static [&'static str],
14655 pub identity_requirement: &'static str,
14656 pub resolver_command: Option<Command>,
14657 pub cancellation: &'static str,
14658}
14659pub const LODESTONE_API_COMMAND_OUTCOMES: &[CommandOutcomeContract] = &[
14660 CommandOutcomeContract {
14661 command: Command::Discover,
14662 possible_submission_states: &["not_submitted", "resolved"],
14663 identity_requirement: "none",
14664 resolver_command: None,
14665 cancellation: "per_call",
14666 },
14667 CommandOutcomeContract {
14668 command: Command::ListIndexes,
14669 possible_submission_states: &["not_submitted", "resolved"],
14670 identity_requirement: "none",
14671 resolver_command: None,
14672 cancellation: "per_call",
14673 },
14674 CommandOutcomeContract {
14675 command: Command::GetIndex,
14676 possible_submission_states: &["not_submitted", "resolved"],
14677 identity_requirement: "none",
14678 resolver_command: None,
14679 cancellation: "per_call",
14680 },
14681 CommandOutcomeContract {
14682 command: Command::ValidateIndexChange,
14683 possible_submission_states: &["not_submitted", "resolved"],
14684 identity_requirement: "none",
14685 resolver_command: None,
14686 cancellation: "per_call",
14687 },
14688 CommandOutcomeContract {
14689 command: Command::ApplyIndexChange,
14690 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
14691 identity_requirement: "caller_action_id",
14692 resolver_command: None,
14693 cancellation: "per_call_until_submission_then_resolve",
14694 },
14695 CommandOutcomeContract {
14696 command: Command::ApplyAdministrationMutation,
14697 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
14698 identity_requirement: "caller_action_id",
14699 resolver_command: None,
14700 cancellation: "per_call_until_submission_then_resolve",
14701 },
14702 CommandOutcomeContract {
14703 command: Command::ListAliases,
14704 possible_submission_states: &["not_submitted", "resolved"],
14705 identity_requirement: "none",
14706 resolver_command: None,
14707 cancellation: "per_call",
14708 },
14709 CommandOutcomeContract {
14710 command: Command::GetAlias,
14711 possible_submission_states: &["not_submitted", "resolved"],
14712 identity_requirement: "none",
14713 resolver_command: None,
14714 cancellation: "per_call",
14715 },
14716 CommandOutcomeContract {
14717 command: Command::ListDataStreams,
14718 possible_submission_states: &["not_submitted", "resolved"],
14719 identity_requirement: "none",
14720 resolver_command: None,
14721 cancellation: "per_call",
14722 },
14723 CommandOutcomeContract {
14724 command: Command::GetDataStream,
14725 possible_submission_states: &["not_submitted", "resolved"],
14726 identity_requirement: "none",
14727 resolver_command: None,
14728 cancellation: "per_call",
14729 },
14730 CommandOutcomeContract {
14731 command: Command::ListComponentTemplates,
14732 possible_submission_states: &["not_submitted", "resolved"],
14733 identity_requirement: "none",
14734 resolver_command: None,
14735 cancellation: "per_call",
14736 },
14737 CommandOutcomeContract {
14738 command: Command::GetComponentTemplate,
14739 possible_submission_states: &["not_submitted", "resolved"],
14740 identity_requirement: "none",
14741 resolver_command: None,
14742 cancellation: "per_call",
14743 },
14744 CommandOutcomeContract {
14745 command: Command::ListIndexTemplates,
14746 possible_submission_states: &["not_submitted", "resolved"],
14747 identity_requirement: "none",
14748 resolver_command: None,
14749 cancellation: "per_call",
14750 },
14751 CommandOutcomeContract {
14752 command: Command::GetIndexTemplate,
14753 possible_submission_states: &["not_submitted", "resolved"],
14754 identity_requirement: "none",
14755 resolver_command: None,
14756 cancellation: "per_call",
14757 },
14758 CommandOutcomeContract {
14759 command: Command::ListIngestPipelines,
14760 possible_submission_states: &["not_submitted", "resolved"],
14761 identity_requirement: "none",
14762 resolver_command: None,
14763 cancellation: "per_call",
14764 },
14765 CommandOutcomeContract {
14766 command: Command::GetIngestPipeline,
14767 possible_submission_states: &["not_submitted", "resolved"],
14768 identity_requirement: "none",
14769 resolver_command: None,
14770 cancellation: "per_call",
14771 },
14772 CommandOutcomeContract {
14773 command: Command::SimulateIngestPipeline,
14774 possible_submission_states: &["not_submitted", "resolved"],
14775 identity_requirement: "none",
14776 resolver_command: None,
14777 cancellation: "per_call",
14778 },
14779 CommandOutcomeContract {
14780 command: Command::ReprocessByQuery,
14781 possible_submission_states: &[
14782 "not_submitted",
14783 "submitted",
14784 "known_retired",
14785 "indeterminate",
14786 "resolved",
14787 ],
14788 identity_requirement: "caller_action_id",
14789 resolver_command: None,
14790 cancellation: "per_call_until_submission_then_resolve",
14791 },
14792 CommandOutcomeContract {
14793 command: Command::ListLifecyclePolicies,
14794 possible_submission_states: &["not_submitted", "resolved"],
14795 identity_requirement: "none",
14796 resolver_command: None,
14797 cancellation: "per_call",
14798 },
14799 CommandOutcomeContract {
14800 command: Command::GetLifecyclePolicy,
14801 possible_submission_states: &["not_submitted", "resolved"],
14802 identity_requirement: "none",
14803 resolver_command: None,
14804 cancellation: "per_call",
14805 },
14806 CommandOutcomeContract {
14807 command: Command::PrepareCreateIndex,
14808 possible_submission_states: &["not_submitted", "resolved"],
14809 identity_requirement: "server_locator",
14810 resolver_command: None,
14811 cancellation: "per_call",
14812 },
14813 CommandOutcomeContract {
14814 command: Command::PrepareDeleteIndex,
14815 possible_submission_states: &["not_submitted", "resolved"],
14816 identity_requirement: "server_locator",
14817 resolver_command: None,
14818 cancellation: "per_call",
14819 },
14820 CommandOutcomeContract {
14821 command: Command::SubmitCatalogAction,
14822 possible_submission_states: &[
14823 "not_submitted",
14824 "submitted",
14825 "known_retired",
14826 "indeterminate",
14827 "resolved",
14828 ],
14829 identity_requirement: "request_locator",
14830 resolver_command: Some(Command::ResolveCatalogAction),
14831 cancellation: "per_call_until_submission_then_resolve",
14832 },
14833 CommandOutcomeContract {
14834 command: Command::ResolveCatalogAction,
14835 possible_submission_states: &["not_submitted", "resolved"],
14836 identity_requirement: "request_locator",
14837 resolver_command: None,
14838 cancellation: "per_call",
14839 },
14840 CommandOutcomeContract {
14841 command: Command::PrepareReplayableSourceIndex,
14842 possible_submission_states: &["not_submitted", "resolved"],
14843 identity_requirement: "server_locator",
14844 resolver_command: None,
14845 cancellation: "per_call",
14846 },
14847 CommandOutcomeContract {
14848 command: Command::SubmitReplayableSourceIndex,
14849 possible_submission_states: &[
14850 "not_submitted",
14851 "submitted",
14852 "known_retired",
14853 "indeterminate",
14854 "resolved",
14855 ],
14856 identity_requirement: "request_locator",
14857 resolver_command: Some(Command::ResolveCatalogAction),
14858 cancellation: "per_call_until_submission_then_resolve",
14859 },
14860 CommandOutcomeContract {
14861 command: Command::GetReplayableSource,
14862 possible_submission_states: &["not_submitted", "resolved"],
14863 identity_requirement: "none",
14864 resolver_command: None,
14865 cancellation: "per_call",
14866 },
14867 CommandOutcomeContract {
14868 command: Command::ControlReplayableSource,
14869 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
14870 identity_requirement: "none",
14871 resolver_command: None,
14872 cancellation: "per_call_until_submission_then_resolve",
14873 },
14874 CommandOutcomeContract {
14875 command: Command::CloneIndex,
14876 possible_submission_states: &[
14877 "not_submitted",
14878 "submitted",
14879 "known_retired",
14880 "indeterminate",
14881 "resolved",
14882 ],
14883 identity_requirement: "caller_action_id",
14884 resolver_command: Some(Command::CloneIndex),
14885 cancellation: "per_call_until_submission_then_resolve",
14886 },
14887 CommandOutcomeContract {
14888 command: Command::ConfigureHistory,
14889 possible_submission_states: &[
14890 "not_submitted",
14891 "submitted",
14892 "known_retired",
14893 "indeterminate",
14894 "resolved",
14895 ],
14896 identity_requirement: "none",
14897 resolver_command: Some(Command::GetHistory),
14898 cancellation: "per_call_until_submission_then_resolve",
14899 },
14900 CommandOutcomeContract {
14901 command: Command::GetHistory,
14902 possible_submission_states: &["not_submitted", "resolved"],
14903 identity_requirement: "none",
14904 resolver_command: None,
14905 cancellation: "per_call",
14906 },
14907 CommandOutcomeContract {
14908 command: Command::ResolveHistory,
14909 possible_submission_states: &["not_submitted", "resolved"],
14910 identity_requirement: "none",
14911 resolver_command: None,
14912 cancellation: "per_call",
14913 },
14914 CommandOutcomeContract {
14915 command: Command::PlaceHistoryHold,
14916 possible_submission_states: &[
14917 "not_submitted",
14918 "submitted",
14919 "known_retired",
14920 "indeterminate",
14921 "resolved",
14922 ],
14923 identity_requirement: "none",
14924 resolver_command: Some(Command::GetHistory),
14925 cancellation: "per_call_until_submission_then_resolve",
14926 },
14927 CommandOutcomeContract {
14928 command: Command::ReleaseHistoryHold,
14929 possible_submission_states: &[
14930 "not_submitted",
14931 "submitted",
14932 "known_retired",
14933 "indeterminate",
14934 "resolved",
14935 ],
14936 identity_requirement: "none",
14937 resolver_command: Some(Command::GetHistory),
14938 cancellation: "per_call_until_submission_then_resolve",
14939 },
14940 CommandOutcomeContract {
14941 command: Command::PrepareDocumentMutation,
14942 possible_submission_states: &["not_submitted", "resolved"],
14943 identity_requirement: "server_locator",
14944 resolver_command: None,
14945 cancellation: "per_call",
14946 },
14947 CommandOutcomeContract {
14948 command: Command::SubmitDocumentMutation,
14949 possible_submission_states: &[
14950 "not_submitted",
14951 "submitted",
14952 "known_retired",
14953 "indeterminate",
14954 "resolved",
14955 ],
14956 identity_requirement: "request_locator",
14957 resolver_command: Some(Command::ResolveDocumentMutation),
14958 cancellation: "per_call_until_submission_then_resolve",
14959 },
14960 CommandOutcomeContract {
14961 command: Command::PrepareDocumentBulk,
14962 possible_submission_states: &["not_submitted", "resolved"],
14963 identity_requirement: "caller_action_id",
14964 resolver_command: None,
14965 cancellation: "per_call",
14966 },
14967 CommandOutcomeContract {
14968 command: Command::SubmitDocumentBulk,
14969 possible_submission_states: &[
14970 "not_submitted",
14971 "submitted",
14972 "known_retired",
14973 "indeterminate",
14974 "resolved",
14975 ],
14976 identity_requirement: "caller_action_id",
14977 resolver_command: Some(Command::ResolveDocumentBulk),
14978 cancellation: "per_call_until_submission_then_resolve",
14979 },
14980 CommandOutcomeContract {
14981 command: Command::ResolveDocumentBulk,
14982 possible_submission_states: &["not_submitted", "resolved"],
14983 identity_requirement: "caller_action_id",
14984 resolver_command: None,
14985 cancellation: "per_call",
14986 },
14987 CommandOutcomeContract {
14988 command: Command::PrepareAppendBulk,
14989 possible_submission_states: &["not_submitted", "resolved"],
14990 identity_requirement: "caller_action_id",
14991 resolver_command: None,
14992 cancellation: "per_call",
14993 },
14994 CommandOutcomeContract {
14995 command: Command::SubmitAppendBulk,
14996 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
14997 identity_requirement: "request_locator",
14998 resolver_command: Some(Command::ResolveAppendBulk),
14999 cancellation: "per_call_until_submission_then_resolve",
15000 },
15001 CommandOutcomeContract {
15002 command: Command::ResolveAppendBulk,
15003 possible_submission_states: &["not_submitted", "resolved"],
15004 identity_requirement: "request_locator",
15005 resolver_command: None,
15006 cancellation: "per_call",
15007 },
15008 CommandOutcomeContract {
15009 command: Command::ObserveAppendCommitted,
15010 possible_submission_states: &["not_submitted", "resolved"],
15011 identity_requirement: "request_locator",
15012 resolver_command: None,
15013 cancellation: "per_call",
15014 },
15015 CommandOutcomeContract {
15016 command: Command::ResolveDocumentMutation,
15017 possible_submission_states: &["not_submitted", "resolved"],
15018 identity_requirement: "request_locator",
15019 resolver_command: None,
15020 cancellation: "per_call",
15021 },
15022 CommandOutcomeContract {
15023 command: Command::GetDocument,
15024 possible_submission_states: &["not_submitted", "resolved"],
15025 identity_requirement: "none",
15026 resolver_command: None,
15027 cancellation: "per_call",
15028 },
15029 CommandOutcomeContract {
15030 command: Command::Search,
15031 possible_submission_states: &["not_submitted", "resolved"],
15032 identity_requirement: "none",
15033 resolver_command: None,
15034 cancellation: "per_call",
15035 },
15036 CommandOutcomeContract {
15037 command: Command::TraverseRelationships,
15038 possible_submission_states: &["not_submitted", "resolved"],
15039 identity_requirement: "none",
15040 resolver_command: None,
15041 cancellation: "per_call",
15042 },
15043 CommandOutcomeContract {
15044 command: Command::QueryProfiles,
15045 possible_submission_states: &["not_submitted", "resolved"],
15046 identity_requirement: "none",
15047 resolver_command: None,
15048 cancellation: "per_call",
15049 },
15050 CommandOutcomeContract {
15051 command: Command::EvaluateTemporalEvidence,
15052 possible_submission_states: &["not_submitted", "resolved"],
15053 identity_requirement: "none",
15054 resolver_command: None,
15055 cancellation: "per_call",
15056 },
15057 CommandOutcomeContract {
15058 command: Command::CreateContinuousTemporalEvaluation,
15059 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15060 identity_requirement: "caller_action_id",
15061 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15062 cancellation: "per_call_until_submission_then_resolve",
15063 },
15064 CommandOutcomeContract {
15065 command: Command::GetContinuousTemporalEvaluation,
15066 possible_submission_states: &["not_submitted", "resolved"],
15067 identity_requirement: "none",
15068 resolver_command: None,
15069 cancellation: "per_call",
15070 },
15071 CommandOutcomeContract {
15072 command: Command::PauseContinuousTemporalEvaluation,
15073 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15074 identity_requirement: "caller_action_id",
15075 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15076 cancellation: "per_call_until_submission_then_resolve",
15077 },
15078 CommandOutcomeContract {
15079 command: Command::ResumeContinuousTemporalEvaluation,
15080 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15081 identity_requirement: "caller_action_id",
15082 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15083 cancellation: "per_call_until_submission_then_resolve",
15084 },
15085 CommandOutcomeContract {
15086 command: Command::ReplaceContinuousTemporalEvaluation,
15087 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15088 identity_requirement: "caller_action_id",
15089 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15090 cancellation: "per_call_until_submission_then_resolve",
15091 },
15092 CommandOutcomeContract {
15093 command: Command::RetireContinuousTemporalEvaluation,
15094 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15095 identity_requirement: "caller_action_id",
15096 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15097 cancellation: "per_call_until_submission_then_resolve",
15098 },
15099 CommandOutcomeContract {
15100 command: Command::ReadContinuousTemporalEvidence,
15101 possible_submission_states: &["not_submitted", "resolved"],
15102 identity_requirement: "none",
15103 resolver_command: None,
15104 cancellation: "per_call",
15105 },
15106 CommandOutcomeContract {
15107 command: Command::ValidateSearch,
15108 possible_submission_states: &["not_submitted", "resolved"],
15109 identity_requirement: "none",
15110 resolver_command: None,
15111 cancellation: "per_call",
15112 },
15113 CommandOutcomeContract {
15114 command: Command::OpenPit,
15115 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15116 identity_requirement: "none",
15117 resolver_command: None,
15118 cancellation: "per_call_until_submission_then_resolve",
15119 },
15120 CommandOutcomeContract {
15121 command: Command::RenewPit,
15122 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15123 identity_requirement: "none",
15124 resolver_command: None,
15125 cancellation: "per_call_until_submission_then_resolve",
15126 },
15127 CommandOutcomeContract {
15128 command: Command::ClosePit,
15129 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15130 identity_requirement: "none",
15131 resolver_command: None,
15132 cancellation: "per_call_until_submission_then_resolve",
15133 },
15134 CommandOutcomeContract {
15135 command: Command::ListOperations,
15136 possible_submission_states: &["not_submitted", "resolved"],
15137 identity_requirement: "none",
15138 resolver_command: None,
15139 cancellation: "per_call",
15140 },
15141 CommandOutcomeContract {
15142 command: Command::GetOperation,
15143 possible_submission_states: &["not_submitted", "resolved"],
15144 identity_requirement: "request_locator",
15145 resolver_command: None,
15146 cancellation: "per_call",
15147 },
15148 CommandOutcomeContract {
15149 command: Command::WaitOperation,
15150 possible_submission_states: &["not_submitted", "resolved"],
15151 identity_requirement: "request_locator",
15152 resolver_command: None,
15153 cancellation: "per_call",
15154 },
15155 CommandOutcomeContract {
15156 command: Command::CancelOperation,
15157 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15158 identity_requirement: "request_locator",
15159 resolver_command: None,
15160 cancellation: "per_call_until_submission_then_resolve",
15161 },
15162 CommandOutcomeContract {
15163 command: Command::ListAuditEvents,
15164 possible_submission_states: &["not_submitted", "resolved"],
15165 identity_requirement: "none",
15166 resolver_command: None,
15167 cancellation: "per_call",
15168 },
15169 CommandOutcomeContract {
15170 command: Command::ExportAuditEvents,
15171 possible_submission_states: &["not_submitted", "resolved"],
15172 identity_requirement: "none",
15173 resolver_command: None,
15174 cancellation: "per_call",
15175 },
15176 CommandOutcomeContract {
15177 command: Command::ReserveServiceCredential,
15178 possible_submission_states: &[
15179 "not_submitted",
15180 "submitted",
15181 "known_retired",
15182 "indeterminate",
15183 "resolved",
15184 ],
15185 identity_requirement: "caller_action_id",
15186 resolver_command: Some(Command::ResolveServiceCredentialReservation),
15187 cancellation: "per_call_until_submission_then_resolve",
15188 },
15189 CommandOutcomeContract {
15190 command: Command::ReserveServiceCredentialRotation,
15191 possible_submission_states: &[
15192 "not_submitted",
15193 "submitted",
15194 "known_retired",
15195 "indeterminate",
15196 "resolved",
15197 ],
15198 identity_requirement: "caller_action_id",
15199 resolver_command: Some(Command::ResolveServiceCredentialReservation),
15200 cancellation: "per_call_until_submission_then_resolve",
15201 },
15202 CommandOutcomeContract {
15203 command: Command::ActivateServiceCredential,
15204 possible_submission_states: &[
15205 "not_submitted",
15206 "submitted",
15207 "known_retired",
15208 "indeterminate",
15209 "resolved",
15210 ],
15211 identity_requirement: "server_locator",
15212 resolver_command: Some(Command::ResolveServiceCredentialReservation),
15213 cancellation: "per_call_until_submission_then_resolve",
15214 },
15215 CommandOutcomeContract {
15216 command: Command::ResolveServiceCredentialReservation,
15217 possible_submission_states: &["not_submitted", "resolved"],
15218 identity_requirement: "caller_action_id",
15219 resolver_command: None,
15220 cancellation: "per_call",
15221 },
15222 CommandOutcomeContract {
15223 command: Command::PrepareRevokeServiceCredential,
15224 possible_submission_states: &["not_submitted", "resolved"],
15225 identity_requirement: "server_locator",
15226 resolver_command: None,
15227 cancellation: "per_call",
15228 },
15229 CommandOutcomeContract {
15230 command: Command::RevokeServiceCredential,
15231 possible_submission_states: &[
15232 "not_submitted",
15233 "submitted",
15234 "known_retired",
15235 "indeterminate",
15236 "resolved",
15237 ],
15238 identity_requirement: "request_locator",
15239 resolver_command: Some(Command::ResolveSecurityAction),
15240 cancellation: "per_call_until_submission_then_resolve",
15241 },
15242 CommandOutcomeContract {
15243 command: Command::ResolveSecurityAction,
15244 possible_submission_states: &["not_submitted", "resolved"],
15245 identity_requirement: "request_locator",
15246 resolver_command: None,
15247 cancellation: "per_call",
15248 },
15249 CommandOutcomeContract {
15250 command: Command::GetSecurityRole,
15251 possible_submission_states: &["not_submitted", "resolved"],
15252 identity_requirement: "none",
15253 resolver_command: None,
15254 cancellation: "per_call",
15255 },
15256 CommandOutcomeContract {
15257 command: Command::PrepareRoleAppendAccessChange,
15258 possible_submission_states: &["not_submitted", "resolved"],
15259 identity_requirement: "server_locator",
15260 resolver_command: None,
15261 cancellation: "per_call",
15262 },
15263 CommandOutcomeContract {
15264 command: Command::SubmitRoleAppendAccessChange,
15265 possible_submission_states: &[
15266 "not_submitted",
15267 "submitted",
15268 "known_retired",
15269 "indeterminate",
15270 "resolved",
15271 ],
15272 identity_requirement: "request_locator",
15273 resolver_command: Some(Command::ResolveSecurityAction),
15274 cancellation: "per_call_until_submission_then_resolve",
15275 },
15276 CommandOutcomeContract {
15277 command: Command::ListServiceCredentials,
15278 possible_submission_states: &["not_submitted", "resolved"],
15279 identity_requirement: "none",
15280 resolver_command: None,
15281 cancellation: "per_call",
15282 },
15283 CommandOutcomeContract {
15284 command: Command::GetRuntimeStatus,
15285 possible_submission_states: &["not_submitted", "resolved"],
15286 identity_requirement: "none",
15287 resolver_command: None,
15288 cancellation: "per_call",
15289 },
15290 CommandOutcomeContract {
15291 command: Command::GetResultCacheStatus,
15292 possible_submission_states: &["not_submitted", "resolved"],
15293 identity_requirement: "none",
15294 resolver_command: None,
15295 cancellation: "per_call",
15296 },
15297 CommandOutcomeContract {
15298 command: Command::GetFieldPromotionStatus,
15299 possible_submission_states: &["not_submitted", "resolved"],
15300 identity_requirement: "none",
15301 resolver_command: None,
15302 cancellation: "per_call",
15303 },
15304 CommandOutcomeContract {
15305 command: Command::GetOverloadStatus,
15306 possible_submission_states: &["not_submitted", "resolved"],
15307 identity_requirement: "none",
15308 resolver_command: None,
15309 cancellation: "per_call",
15310 },
15311 CommandOutcomeContract {
15312 command: Command::ConfigureExternalKey,
15313 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15314 identity_requirement: "none",
15315 resolver_command: None,
15316 cancellation: "per_call_until_submission_then_resolve",
15317 },
15318 CommandOutcomeContract {
15319 command: Command::RotateExternalKeyBinding,
15320 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15321 identity_requirement: "none",
15322 resolver_command: None,
15323 cancellation: "per_call_until_submission_then_resolve",
15324 },
15325 CommandOutcomeContract {
15326 command: Command::ConfigureAggregateThenDelete,
15327 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15328 identity_requirement: "none",
15329 resolver_command: None,
15330 cancellation: "per_call_until_submission_then_resolve",
15331 },
15332 CommandOutcomeContract {
15333 command: Command::GetLifecycleStatus,
15334 possible_submission_states: &["not_submitted", "resolved"],
15335 identity_requirement: "none",
15336 resolver_command: None,
15337 cancellation: "per_call",
15338 },
15339 CommandOutcomeContract {
15340 command: Command::GetQuota,
15341 possible_submission_states: &["not_submitted", "resolved"],
15342 identity_requirement: "none",
15343 resolver_command: None,
15344 cancellation: "per_call",
15345 },
15346 CommandOutcomeContract {
15347 command: Command::UpdateQuota,
15348 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15349 identity_requirement: "none",
15350 resolver_command: None,
15351 cancellation: "per_call_until_submission_then_resolve",
15352 },
15353 CommandOutcomeContract {
15354 command: Command::GetBinding,
15355 possible_submission_states: &["not_submitted", "resolved"],
15356 identity_requirement: "none",
15357 resolver_command: None,
15358 cancellation: "per_call",
15359 },
15360 CommandOutcomeContract {
15361 command: Command::GetAdmissionStatus,
15362 possible_submission_states: &["not_submitted", "resolved"],
15363 identity_requirement: "none",
15364 resolver_command: None,
15365 cancellation: "per_call",
15366 },
15367 CommandOutcomeContract {
15368 command: Command::SetAdmission,
15369 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15370 identity_requirement: "none",
15371 resolver_command: None,
15372 cancellation: "per_call_until_submission_then_resolve",
15373 },
15374 CommandOutcomeContract {
15375 command: Command::GetQuiesceStatus,
15376 possible_submission_states: &["not_submitted", "resolved"],
15377 identity_requirement: "none",
15378 resolver_command: None,
15379 cancellation: "per_call",
15380 },
15381 CommandOutcomeContract {
15382 command: Command::GetDecommissionReadiness,
15383 possible_submission_states: &["not_submitted", "resolved"],
15384 identity_requirement: "none",
15385 resolver_command: None,
15386 cancellation: "per_call",
15387 },
15388 CommandOutcomeContract {
15389 command: Command::GetUpgradeReadiness,
15390 possible_submission_states: &["not_submitted", "resolved"],
15391 identity_requirement: "none",
15392 resolver_command: None,
15393 cancellation: "per_call",
15394 },
15395 CommandOutcomeContract {
15396 command: Command::GetMaintenanceStatus,
15397 possible_submission_states: &["not_submitted", "resolved"],
15398 identity_requirement: "none",
15399 resolver_command: None,
15400 cancellation: "per_call",
15401 },
15402 CommandOutcomeContract {
15403 command: Command::WarmVectorIndex,
15404 possible_submission_states: &["not_submitted", "resolved"],
15405 identity_requirement: "exact_root",
15406 resolver_command: None,
15407 cancellation: "per_call",
15408 },
15409 CommandOutcomeContract {
15410 command: Command::EvaluateVectorRecall,
15411 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15412 identity_requirement: "caller_action_id",
15413 resolver_command: None,
15414 cancellation: "per_call_until_submission_then_resolve",
15415 },
15416 CommandOutcomeContract {
15417 command: Command::CalibrateVectorStrategy,
15418 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15419 identity_requirement: "caller_action_id",
15420 resolver_command: None,
15421 cancellation: "per_call_until_submission_then_resolve",
15422 },
15423 CommandOutcomeContract {
15424 command: Command::GetVectorDiagnostic,
15425 possible_submission_states: &["not_submitted", "resolved"],
15426 identity_requirement: "request_locator",
15427 resolver_command: None,
15428 cancellation: "per_call",
15429 },
15430 CommandOutcomeContract {
15431 command: Command::CreateDiagnostic,
15432 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15433 identity_requirement: "none",
15434 resolver_command: None,
15435 cancellation: "per_call_until_submission_then_resolve",
15436 },
15437 CommandOutcomeContract {
15438 command: Command::GetDiagnostic,
15439 possible_submission_states: &["not_submitted", "resolved"],
15440 identity_requirement: "request_locator",
15441 resolver_command: None,
15442 cancellation: "per_call",
15443 },
15444 CommandOutcomeContract {
15445 command: Command::PrepareCollectionExport,
15446 possible_submission_states: &["not_submitted", "resolved"],
15447 identity_requirement: "caller_action_id",
15448 resolver_command: None,
15449 cancellation: "per_call",
15450 },
15451 CommandOutcomeContract {
15452 command: Command::StartCollectionExport,
15453 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15454 identity_requirement: "caller_action_id",
15455 resolver_command: Some(Command::ResolveCollectionExport),
15456 cancellation: "per_call_until_submission_then_resolve",
15457 },
15458 CommandOutcomeContract {
15459 command: Command::ResolveCollectionExport,
15460 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
15461 identity_requirement: "caller_action_id",
15462 resolver_command: None,
15463 cancellation: "per_call",
15464 },
15465 CommandOutcomeContract {
15466 command: Command::VerifyCollectionExport,
15467 possible_submission_states: &["not_submitted", "resolved"],
15468 identity_requirement: "request_locator",
15469 resolver_command: None,
15470 cancellation: "per_call",
15471 },
15472 CommandOutcomeContract {
15473 command: Command::PrepareCollectionRestore,
15474 possible_submission_states: &["not_submitted", "resolved"],
15475 identity_requirement: "caller_action_id",
15476 resolver_command: None,
15477 cancellation: "per_call",
15478 },
15479 CommandOutcomeContract {
15480 command: Command::StartCollectionRestore,
15481 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15482 identity_requirement: "caller_action_id",
15483 resolver_command: Some(Command::ResolveCollectionRestore),
15484 cancellation: "per_call_until_submission_then_resolve",
15485 },
15486 CommandOutcomeContract {
15487 command: Command::ResolveCollectionRestore,
15488 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
15489 identity_requirement: "caller_action_id",
15490 resolver_command: None,
15491 cancellation: "per_call",
15492 },
15493 CommandOutcomeContract {
15494 command: Command::PrepareIndexExport,
15495 possible_submission_states: &["not_submitted", "resolved"],
15496 identity_requirement: "caller_action_id",
15497 resolver_command: None,
15498 cancellation: "per_call",
15499 },
15500 CommandOutcomeContract {
15501 command: Command::StartIndexExport,
15502 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15503 identity_requirement: "caller_action_id",
15504 resolver_command: Some(Command::ResolveIndexExport),
15505 cancellation: "per_call_until_submission_then_resolve",
15506 },
15507 CommandOutcomeContract {
15508 command: Command::ResolveIndexExport,
15509 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
15510 identity_requirement: "caller_action_id",
15511 resolver_command: None,
15512 cancellation: "per_call",
15513 },
15514 CommandOutcomeContract {
15515 command: Command::VerifyIndexExport,
15516 possible_submission_states: &["not_submitted", "resolved"],
15517 identity_requirement: "request_locator",
15518 resolver_command: None,
15519 cancellation: "per_call",
15520 },
15521 CommandOutcomeContract {
15522 command: Command::PrepareIndexImport,
15523 possible_submission_states: &["not_submitted", "resolved"],
15524 identity_requirement: "caller_action_id",
15525 resolver_command: None,
15526 cancellation: "per_call",
15527 },
15528 CommandOutcomeContract {
15529 command: Command::StartIndexImport,
15530 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15531 identity_requirement: "caller_action_id",
15532 resolver_command: Some(Command::ResolveIndexImport),
15533 cancellation: "per_call_until_submission_then_resolve",
15534 },
15535 CommandOutcomeContract {
15536 command: Command::ResolveIndexImport,
15537 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
15538 identity_requirement: "caller_action_id",
15539 resolver_command: None,
15540 cancellation: "per_call",
15541 },
15542 CommandOutcomeContract {
15543 command: Command::ReadArtifactChunk,
15544 possible_submission_states: &["not_submitted", "resolved"],
15545 identity_requirement: "none",
15546 resolver_command: None,
15547 cancellation: "per_call",
15548 },
15549 CommandOutcomeContract {
15550 command: Command::ExportUsage,
15551 possible_submission_states: &["not_submitted", "resolved"],
15552 identity_requirement: "none",
15553 resolver_command: None,
15554 cancellation: "per_call",
15555 },
15556 CommandOutcomeContract {
15557 command: Command::ExecuteStateRead,
15558 possible_submission_states: &["not_submitted", "resolved"],
15559 identity_requirement: "none",
15560 resolver_command: None,
15561 cancellation: "per_call",
15562 },
15563 CommandOutcomeContract {
15564 command: Command::PrepareStateWrite,
15565 possible_submission_states: &["not_submitted", "resolved"],
15566 identity_requirement: "caller_action_id",
15567 resolver_command: None,
15568 cancellation: "per_call",
15569 },
15570 CommandOutcomeContract {
15571 command: Command::SubmitStateWrite,
15572 possible_submission_states: &[
15573 "not_submitted",
15574 "submitted",
15575 "known_retired",
15576 "indeterminate",
15577 "resolved",
15578 ],
15579 identity_requirement: "request_locator",
15580 resolver_command: Some(Command::ResolveStateWrite),
15581 cancellation: "per_call_until_submission_then_resolve",
15582 },
15583 CommandOutcomeContract {
15584 command: Command::ResolveStateWrite,
15585 possible_submission_states: &["not_submitted", "resolved"],
15586 identity_requirement: "request_locator",
15587 resolver_command: None,
15588 cancellation: "per_call",
15589 },
15590];
15591#[derive(Clone, Copy, Debug, Eq, PartialEq)]
15592pub struct ErrorOutcomeContract {
15593 pub code: ErrorCode,
15594 pub disposition: ErrorDisposition,
15595 pub recovery: RecoveryAction,
15596 pub retry_after_limit_id: Option<&'static str>,
15597 pub recovery_identity: &'static str,
15598}
15599pub const LODESTONE_API_ERROR_OUTCOMES: &[ErrorOutcomeContract] = &[
15600 ErrorOutcomeContract {
15601 code: ErrorCode::Aborted,
15602 disposition: ErrorDisposition::NotSubmitted,
15603 recovery: RecoveryAction::Retry,
15604 retry_after_limit_id: None,
15605 recovery_identity: "request_identity",
15606 },
15607 ErrorOutcomeContract {
15608 code: ErrorCode::Aborted,
15609 disposition: ErrorDisposition::Indeterminate,
15610 recovery: RecoveryAction::Resolve,
15611 retry_after_limit_id: None,
15612 recovery_identity: "request_identity",
15613 },
15614 ErrorOutcomeContract {
15615 code: ErrorCode::DeadlineExceeded,
15616 disposition: ErrorDisposition::NotSubmitted,
15617 recovery: RecoveryAction::Retry,
15618 retry_after_limit_id: None,
15619 recovery_identity: "request_identity",
15620 },
15621 ErrorOutcomeContract {
15622 code: ErrorCode::DeadlineExceeded,
15623 disposition: ErrorDisposition::Indeterminate,
15624 recovery: RecoveryAction::Resolve,
15625 retry_after_limit_id: None,
15626 recovery_identity: "request_identity",
15627 },
15628 ErrorOutcomeContract {
15629 code: ErrorCode::InvalidRequest,
15630 disposition: ErrorDisposition::NotSubmitted,
15631 recovery: RecoveryAction::Stop,
15632 retry_after_limit_id: None,
15633 recovery_identity: "none",
15634 },
15635 ErrorOutcomeContract {
15636 code: ErrorCode::UnsupportedVersion,
15637 disposition: ErrorDisposition::NotSubmitted,
15638 recovery: RecoveryAction::Stop,
15639 retry_after_limit_id: None,
15640 recovery_identity: "none",
15641 },
15642 ErrorOutcomeContract {
15643 code: ErrorCode::Unauthenticated,
15644 disposition: ErrorDisposition::NotSubmitted,
15645 recovery: RecoveryAction::RefreshCredential,
15646 retry_after_limit_id: None,
15647 recovery_identity: "none",
15648 },
15649 ErrorOutcomeContract {
15650 code: ErrorCode::PermissionDenied,
15651 disposition: ErrorDisposition::NotSubmitted,
15652 recovery: RecoveryAction::Stop,
15653 retry_after_limit_id: None,
15654 recovery_identity: "none",
15655 },
15656 ErrorOutcomeContract {
15657 code: ErrorCode::NotFound,
15658 disposition: ErrorDisposition::NotSubmitted,
15659 recovery: RecoveryAction::Stop,
15660 retry_after_limit_id: None,
15661 recovery_identity: "request_identity",
15662 },
15663 ErrorOutcomeContract {
15664 code: ErrorCode::NotFound,
15665 disposition: ErrorDisposition::Resolved,
15666 recovery: RecoveryAction::Stop,
15667 retry_after_limit_id: None,
15668 recovery_identity: "request_identity",
15669 },
15670 ErrorOutcomeContract {
15671 code: ErrorCode::Conflict,
15672 disposition: ErrorDisposition::NotSubmitted,
15673 recovery: RecoveryAction::RefreshPrecondition,
15674 retry_after_limit_id: None,
15675 recovery_identity: "request_identity",
15676 },
15677 ErrorOutcomeContract {
15678 code: ErrorCode::Conflict,
15679 disposition: ErrorDisposition::Resolved,
15680 recovery: RecoveryAction::Stop,
15681 retry_after_limit_id: None,
15682 recovery_identity: "request_identity",
15683 },
15684 ErrorOutcomeContract {
15685 code: ErrorCode::StaleCursor,
15686 disposition: ErrorDisposition::NotSubmitted,
15687 recovery: RecoveryAction::RestartPage,
15688 retry_after_limit_id: None,
15689 recovery_identity: "cursor",
15690 },
15691 ErrorOutcomeContract {
15692 code: ErrorCode::RestartBudgetExhausted,
15693 disposition: ErrorDisposition::NotSubmitted,
15694 recovery: RecoveryAction::Stop,
15695 retry_after_limit_id: None,
15696 recovery_identity: "cursor",
15697 },
15698 ErrorOutcomeContract {
15699 code: ErrorCode::LimitExceeded,
15700 disposition: ErrorDisposition::NotSubmitted,
15701 recovery: RecoveryAction::ReduceRequest,
15702 retry_after_limit_id: None,
15703 recovery_identity: "none",
15704 },
15705 ErrorOutcomeContract {
15706 code: ErrorCode::CapabilityUnavailable,
15707 disposition: ErrorDisposition::NotSubmitted,
15708 recovery: RecoveryAction::Stop,
15709 retry_after_limit_id: None,
15710 recovery_identity: "none",
15711 },
15712 ErrorOutcomeContract {
15713 code: ErrorCode::NotSubmitted,
15714 disposition: ErrorDisposition::NotSubmitted,
15715 recovery: RecoveryAction::RetryAfter,
15716 retry_after_limit_id: Some("retry_after_millis"),
15717 recovery_identity: "request_identity",
15718 },
15719 ErrorOutcomeContract {
15720 code: ErrorCode::SubmittedIndeterminate,
15721 disposition: ErrorDisposition::Indeterminate,
15722 recovery: RecoveryAction::Resolve,
15723 retry_after_limit_id: None,
15724 recovery_identity: "locator_or_caller_action_id",
15725 },
15726 ErrorOutcomeContract {
15727 code: ErrorCode::ExpiredUnknown,
15728 disposition: ErrorDisposition::KnownRetired,
15729 recovery: RecoveryAction::Stop,
15730 retry_after_limit_id: None,
15731 recovery_identity: "locator_or_caller_action_id",
15732 },
15733 ErrorOutcomeContract {
15734 code: ErrorCode::SecretNotEscrowed,
15735 disposition: ErrorDisposition::Resolved,
15736 recovery: RecoveryAction::Resolve,
15737 retry_after_limit_id: None,
15738 recovery_identity: "reservation_action_id",
15739 },
15740 ErrorOutcomeContract {
15741 code: ErrorCode::RetentionGap,
15742 disposition: ErrorDisposition::KnownRetired,
15743 recovery: RecoveryAction::Stop,
15744 retry_after_limit_id: None,
15745 recovery_identity: "cursor_or_locator",
15746 },
15747 ErrorOutcomeContract {
15748 code: ErrorCode::ArtifactRangeInvalid,
15749 disposition: ErrorDisposition::NotSubmitted,
15750 recovery: RecoveryAction::CorrectRange,
15751 retry_after_limit_id: None,
15752 recovery_identity: "artifact_identity",
15753 },
15754 ErrorOutcomeContract {
15755 code: ErrorCode::ChecksumMismatch,
15756 disposition: ErrorDisposition::Resolved,
15757 recovery: RecoveryAction::Stop,
15758 retry_after_limit_id: None,
15759 recovery_identity: "artifact_identity",
15760 },
15761 ErrorOutcomeContract {
15762 code: ErrorCode::TemporarilyUnavailable,
15763 disposition: ErrorDisposition::NotSubmitted,
15764 recovery: RecoveryAction::RetryAfter,
15765 retry_after_limit_id: Some("retry_after_millis"),
15766 recovery_identity: "request_identity",
15767 },
15768 ErrorOutcomeContract {
15769 code: ErrorCode::TemporarilyUnavailable,
15770 disposition: ErrorDisposition::Indeterminate,
15771 recovery: RecoveryAction::Resolve,
15772 retry_after_limit_id: Some("retry_after_millis"),
15773 recovery_identity: "request_identity",
15774 },
15775 ErrorOutcomeContract {
15776 code: ErrorCode::Internal,
15777 disposition: ErrorDisposition::NotSubmitted,
15778 recovery: RecoveryAction::Stop,
15779 retry_after_limit_id: None,
15780 recovery_identity: "request_identity",
15781 },
15782 ErrorOutcomeContract {
15783 code: ErrorCode::Internal,
15784 disposition: ErrorDisposition::Resolved,
15785 recovery: RecoveryAction::Stop,
15786 retry_after_limit_id: None,
15787 recovery_identity: "request_identity",
15788 },
15789 ErrorOutcomeContract {
15790 code: ErrorCode::Internal,
15791 disposition: ErrorDisposition::Indeterminate,
15792 recovery: RecoveryAction::Resolve,
15793 retry_after_limit_id: None,
15794 recovery_identity: "request_identity",
15795 },
15796];
15797#[derive(Clone, Copy, Debug, Eq, PartialEq)]
15798pub struct Limit {
15799 pub id: &'static str,
15800 pub default: u64,
15801 pub maximum: u64,
15802 pub unit: &'static str,
15803}
15804pub const LODESTONE_API_LIMITS: &[Limit] = &[
15805 Limit {
15806 id: "request_bytes",
15807 default: 2097152,
15808 maximum: 2097152,
15809 unit: "bytes",
15810 },
15811 Limit {
15812 id: "response_bytes",
15813 default: 2097152,
15814 maximum: 2097152,
15815 unit: "bytes",
15816 },
15817 Limit {
15818 id: "page_size",
15819 default: 100,
15820 maximum: 1000,
15821 unit: "items",
15822 },
15823 Limit {
15824 id: "catalog_page_size",
15825 default: 100,
15826 maximum: 100,
15827 unit: "items",
15828 },
15829 Limit {
15830 id: "catalog_restart_budget",
15831 default: 8,
15832 maximum: 8,
15833 unit: "restarts",
15834 },
15835 Limit {
15836 id: "query_clauses",
15837 default: 256,
15838 maximum: 1024,
15839 unit: "clauses",
15840 },
15841 Limit {
15842 id: "text_query_bytes",
15843 default: 16384,
15844 maximum: 16384,
15845 unit: "bytes",
15846 },
15847 Limit {
15848 id: "text_query_fields",
15849 default: 64,
15850 maximum: 64,
15851 unit: "fields",
15852 },
15853 Limit {
15854 id: "text_query_slop",
15855 default: 64,
15856 maximum: 64,
15857 unit: "positions",
15858 },
15859 Limit {
15860 id: "text_query_boost",
15861 default: 1024,
15862 maximum: 1024,
15863 unit: "multiplier",
15864 },
15865 Limit {
15866 id: "text_query_fuzzy_expansions",
15867 default: 1024,
15868 maximum: 1024,
15869 unit: "terms",
15870 },
15871 Limit {
15872 id: "text_query_fuzzy_distance",
15873 default: 2,
15874 maximum: 2,
15875 unit: "edits",
15876 },
15877 Limit {
15878 id: "text_query_dictionary_scan_terms",
15879 default: 65536,
15880 maximum: 65536,
15881 unit: "terms",
15882 },
15883 Limit {
15884 id: "text_query_dictionary_scan_bytes",
15885 default: 16777216,
15886 maximum: 16777216,
15887 unit: "bytes",
15888 },
15889 Limit {
15890 id: "text_query_fuzzy_work_units",
15891 default: 2000000,
15892 maximum: 2000000,
15893 unit: "distance_cells",
15894 },
15895 Limit {
15896 id: "aggregation_nodes",
15897 default: 64,
15898 maximum: 256,
15899 unit: "nodes",
15900 },
15901 Limit {
15902 id: "aggregation_buckets",
15903 default: 65536,
15904 maximum: 65536,
15905 unit: "buckets",
15906 },
15907 Limit {
15908 id: "metric_point_bytes",
15909 default: 1048576,
15910 maximum: 1048576,
15911 unit: "bytes",
15912 },
15913 Limit {
15914 id: "metric_attributes",
15915 default: 128,
15916 maximum: 128,
15917 unit: "items",
15918 },
15919 Limit {
15920 id: "metric_attribute_bytes",
15921 default: 65536,
15922 maximum: 65536,
15923 unit: "bytes",
15924 },
15925 Limit {
15926 id: "metric_exemplars",
15927 default: 8,
15928 maximum: 8,
15929 unit: "items",
15930 },
15931 Limit {
15932 id: "metric_histogram_buckets",
15933 default: 4097,
15934 maximum: 4097,
15935 unit: "buckets",
15936 },
15937 Limit {
15938 id: "time_series_grouping_keys",
15939 default: 4,
15940 maximum: 16,
15941 unit: "keys",
15942 },
15943 Limit {
15944 id: "time_series_points",
15945 default: 100000,
15946 maximum: 100000,
15947 unit: "points",
15948 },
15949 Limit {
15950 id: "time_series_series",
15951 default: 10000,
15952 maximum: 10000,
15953 unit: "series",
15954 },
15955 Limit {
15956 id: "time_series_buckets",
15957 default: 65536,
15958 maximum: 65536,
15959 unit: "buckets",
15960 },
15961 Limit {
15962 id: "time_series_results",
15963 default: 65536,
15964 maximum: 65536,
15965 unit: "results",
15966 },
15967 Limit {
15968 id: "time_series_quantiles",
15969 default: 10,
15970 maximum: 100,
15971 unit: "quantiles",
15972 },
15973 Limit {
15974 id: "time_series_state_bytes",
15975 default: 67108864,
15976 maximum: 67108864,
15977 unit: "bytes",
15978 },
15979 Limit {
15980 id: "temporal_inputs",
15981 default: 16,
15982 maximum: 16,
15983 unit: "indexes",
15984 },
15985 Limit {
15986 id: "temporal_pattern_nodes",
15987 default: 64,
15988 maximum: 64,
15989 unit: "nodes",
15990 },
15991 Limit {
15992 id: "temporal_pattern_depth",
15993 default: 16,
15994 maximum: 16,
15995 unit: "levels",
15996 },
15997 Limit {
15998 id: "temporal_pattern_branches",
15999 default: 16,
16000 maximum: 16,
16001 unit: "branches",
16002 },
16003 Limit {
16004 id: "temporal_correlation_keys",
16005 default: 4,
16006 maximum: 4,
16007 unit: "fields",
16008 },
16009 Limit {
16010 id: "temporal_events",
16011 default: 4096,
16012 maximum: 4096,
16013 unit: "events",
16014 },
16015 Limit {
16016 id: "temporal_states",
16017 default: 65536,
16018 maximum: 65536,
16019 unit: "states",
16020 },
16021 Limit {
16022 id: "temporal_captured_events",
16023 default: 256,
16024 maximum: 256,
16025 unit: "events",
16026 },
16027 Limit {
16028 id: "temporal_results",
16029 default: 4096,
16030 maximum: 4096,
16031 unit: "results",
16032 },
16033 Limit {
16034 id: "temporal_state_bytes",
16035 default: 67108864,
16036 maximum: 67108864,
16037 unit: "bytes",
16038 },
16039 Limit {
16040 id: "temporal_interval_nanos",
16041 default: 2678400000000000,
16042 maximum: 2678400000000000,
16043 unit: "nanoseconds",
16044 },
16045 Limit {
16046 id: "relationship_indexes",
16047 default: 4,
16048 maximum: 16,
16049 unit: "indexes",
16050 },
16051 Limit {
16052 id: "relationship_seeds",
16053 default: 16,
16054 maximum: 128,
16055 unit: "entities",
16056 },
16057 Limit {
16058 id: "relationship_filter_values",
16059 default: 16,
16060 maximum: 128,
16061 unit: "values",
16062 },
16063 Limit {
16064 id: "relationship_depth",
16065 default: 4,
16066 maximum: 16,
16067 unit: "levels",
16068 },
16069 Limit {
16070 id: "relationship_fan_out",
16071 default: 256,
16072 maximum: 4096,
16073 unit: "relationships",
16074 },
16075 Limit {
16076 id: "relationship_visited_entities",
16077 default: 10000,
16078 maximum: 65536,
16079 unit: "entities",
16080 },
16081 Limit {
16082 id: "relationship_visited_records",
16083 default: 10000,
16084 maximum: 10000,
16085 unit: "records",
16086 },
16087 Limit {
16088 id: "relationship_returned_records",
16089 default: 10000,
16090 maximum: 10000,
16091 unit: "records",
16092 },
16093 Limit {
16094 id: "relationship_memory_bytes",
16095 default: 67108864,
16096 maximum: 268435456,
16097 unit: "bytes",
16098 },
16099 Limit {
16100 id: "profile_indexes",
16101 default: 4,
16102 maximum: 16,
16103 unit: "indexes",
16104 },
16105 Limit {
16106 id: "profile_filter_values",
16107 default: 16,
16108 maximum: 128,
16109 unit: "values",
16110 },
16111 Limit {
16112 id: "profile_batches",
16113 default: 10000,
16114 maximum: 10000,
16115 unit: "batches",
16116 },
16117 Limit {
16118 id: "profile_samples",
16119 default: 100000,
16120 maximum: 100000,
16121 unit: "samples",
16122 },
16123 Limit {
16124 id: "profile_results",
16125 default: 10000,
16126 maximum: 10000,
16127 unit: "results",
16128 },
16129 Limit {
16130 id: "profile_memory_bytes",
16131 default: 67108864,
16132 maximum: 268435456,
16133 unit: "bytes",
16134 },
16135 Limit {
16136 id: "approximate_cardinality_precision",
16137 default: 12,
16138 maximum: 16,
16139 unit: "index_bits",
16140 },
16141 Limit {
16142 id: "approximate_percentile_precision",
16143 default: 10,
16144 maximum: 12,
16145 unit: "index_bits",
16146 },
16147 Limit {
16148 id: "operation_page_authorities",
16149 default: 7,
16150 maximum: 7,
16151 unit: "authorities",
16152 },
16153 Limit {
16154 id: "artifact_chunk_bytes",
16155 default: 262144,
16156 maximum: 1048576,
16157 unit: "bytes",
16158 },
16159 Limit {
16160 id: "bulk_document_items",
16161 default: 128,
16162 maximum: 1024,
16163 unit: "items",
16164 },
16165 Limit {
16166 id: "bulk_document_bytes",
16167 default: 2097152,
16168 maximum: 2097152,
16169 unit: "bytes",
16170 },
16171 Limit {
16172 id: "state_command_keys",
16173 default: 128,
16174 maximum: 128,
16175 unit: "keys",
16176 },
16177 Limit {
16178 id: "state_command_value_bytes",
16179 default: 1048576,
16180 maximum: 1048576,
16181 unit: "bytes",
16182 },
16183 Limit {
16184 id: "state_write_outcomes",
16185 default: 4096,
16186 maximum: 4096,
16187 unit: "entries",
16188 },
16189 Limit {
16190 id: "exact_decimal_scale",
16191 default: 18,
16192 maximum: 1024,
16193 unit: "decimal_places",
16194 },
16195 Limit {
16196 id: "retry_after_millis",
16197 default: 1000,
16198 maximum: 60000,
16199 unit: "milliseconds",
16200 },
16201 Limit {
16202 id: "mapping_fields",
16203 default: 16384,
16204 maximum: 16384,
16205 unit: "fields",
16206 },
16207 Limit {
16208 id: "search_result_window",
16209 default: 10000,
16210 maximum: 10000,
16211 unit: "items",
16212 },
16213 Limit {
16214 id: "routing_values",
16215 default: 1024,
16216 maximum: 1024,
16217 unit: "items",
16218 },
16219 Limit {
16220 id: "routing_value_bytes",
16221 default: 4096,
16222 maximum: 4096,
16223 unit: "bytes",
16224 },
16225 Limit {
16226 id: "query_recursion_depth",
16227 default: 64,
16228 maximum: 64,
16229 unit: "levels",
16230 },
16231 Limit {
16232 id: "vector_dimensions",
16233 default: 16384,
16234 maximum: 16384,
16235 unit: "dimensions",
16236 },
16237 Limit {
16238 id: "vector_query_bytes",
16239 default: 65536,
16240 maximum: 65536,
16241 unit: "bytes",
16242 },
16243 Limit {
16244 id: "vector_request_bytes",
16245 default: 1048576,
16246 maximum: 1048576,
16247 unit: "bytes",
16248 },
16249 Limit {
16250 id: "vector_candidates",
16251 default: 10000,
16252 maximum: 10000,
16253 unit: "items",
16254 },
16255 Limit {
16256 id: "vector_set_document_vectors",
16257 default: 128,
16258 maximum: 128,
16259 unit: "vectors",
16260 },
16261 Limit {
16262 id: "vector_set_document_bytes",
16263 default: 65536,
16264 maximum: 65536,
16265 unit: "bytes",
16266 },
16267 Limit {
16268 id: "vector_set_query_vectors",
16269 default: 32,
16270 maximum: 32,
16271 unit: "vectors",
16272 },
16273 Limit {
16274 id: "vector_set_query_bytes",
16275 default: 65536,
16276 maximum: 65536,
16277 unit: "bytes",
16278 },
16279 Limit {
16280 id: "retrieval_branches",
16281 default: 16,
16282 maximum: 16,
16283 unit: "branches",
16284 },
16285 Limit {
16286 id: "retrieval_branch_name_bytes",
16287 default: 64,
16288 maximum: 64,
16289 unit: "bytes",
16290 },
16291 Limit {
16292 id: "retrieval_window",
16293 default: 10000,
16294 maximum: 10000,
16295 unit: "items",
16296 },
16297 Limit {
16298 id: "fragment_fields",
16299 default: 4,
16300 maximum: 16,
16301 unit: "fields",
16302 },
16303 Limit {
16304 id: "fragments_per_field",
16305 default: 1,
16306 maximum: 8,
16307 unit: "items",
16308 },
16309 Limit {
16310 id: "fragment_bytes",
16311 default: 150,
16312 maximum: 8192,
16313 unit: "bytes",
16314 },
16315 Limit {
16316 id: "fragment_total_bytes",
16317 default: 65536,
16318 maximum: 65536,
16319 unit: "bytes",
16320 },
16321 Limit {
16322 id: "result_feature_hits",
16323 default: 10,
16324 maximum: 100,
16325 unit: "items",
16326 },
16327 Limit {
16328 id: "result_features",
16329 default: 4,
16330 maximum: 16,
16331 unit: "features",
16332 },
16333 Limit {
16334 id: "diversification_fields",
16335 default: 1,
16336 maximum: 4,
16337 unit: "fields",
16338 },
16339 Limit {
16340 id: "diversification_per_group",
16341 default: 1,
16342 maximum: 64,
16343 unit: "items",
16344 },
16345 Limit {
16346 id: "vector_evaluation_queries",
16347 default: 64,
16348 maximum: 256,
16349 unit: "queries",
16350 },
16351 Limit {
16352 id: "vector_evaluation_k",
16353 default: 10,
16354 maximum: 1000,
16355 unit: "items",
16356 },
16357 Limit {
16358 id: "vector_evaluation_profiles",
16359 default: 3,
16360 maximum: 3,
16361 unit: "profiles",
16362 },
16363 Limit {
16364 id: "vector_evaluation_artifact_bytes",
16365 default: 1048576,
16366 maximum: 1048576,
16367 unit: "bytes",
16368 },
16369 Limit {
16370 id: "vector_warm_components",
16371 default: 2,
16372 maximum: 3,
16373 unit: "components",
16374 },
16375 Limit {
16376 id: "vector_warm_requests",
16377 default: 1024,
16378 maximum: 65536,
16379 unit: "requests",
16380 },
16381 Limit {
16382 id: "vector_warm_bytes",
16383 default: 268435456,
16384 maximum: 1073741824,
16385 unit: "bytes",
16386 },
16387 Limit {
16388 id: "vector_warm_achievements",
16389 default: 1024,
16390 maximum: 10000,
16391 unit: "items",
16392 },
16393 Limit {
16394 id: "vector_warm_ttl_millis",
16395 default: 300000,
16396 maximum: 900000,
16397 unit: "milliseconds",
16398 },
16399 Limit {
16400 id: "operation_page_size",
16401 default: 100,
16402 maximum: 100,
16403 unit: "items",
16404 },
16405 Limit {
16406 id: "operation_wait_attempts",
16407 default: 20,
16408 maximum: 100,
16409 unit: "attempts",
16410 },
16411 Limit {
16412 id: "operation_wait_interval_millis",
16413 default: 100,
16414 maximum: 60000,
16415 unit: "milliseconds",
16416 },
16417 Limit {
16418 id: "resource_initial_shards",
16419 default: 1,
16420 maximum: 4096,
16421 unit: "shards",
16422 },
16423 Limit {
16424 id: "resource_target_shard_bytes",
16425 default: 536870912,
16426 maximum: 1125899906842624,
16427 unit: "bytes",
16428 },
16429 Limit {
16430 id: "resource_admission_weight",
16431 default: 1,
16432 maximum: 1000000,
16433 unit: "weight",
16434 },
16435 Limit {
16436 id: "resource_ram_bytes",
16437 default: 1073741824,
16438 maximum: 1125899906842624,
16439 unit: "bytes",
16440 },
16441 Limit {
16442 id: "resource_nvme_bytes",
16443 default: 2147483648,
16444 maximum: 1125899906842624,
16445 unit: "bytes",
16446 },
16447 Limit {
16448 id: "resource_refresh_millis",
16449 default: 200,
16450 maximum: 604800000,
16451 unit: "milliseconds",
16452 },
16453 Limit {
16454 id: "resource_memtable_bytes",
16455 default: 268435456,
16456 maximum: 1125899906842624,
16457 unit: "bytes",
16458 },
16459 Limit {
16460 id: "resource_parallelism",
16461 default: 1,
16462 maximum: 4096,
16463 unit: "workers",
16464 },
16465 Limit {
16466 id: "collection_export_bytes",
16467 default: 268435456,
16468 maximum: 268435456,
16469 unit: "bytes",
16470 },
16471 Limit {
16472 id: "collection_export_documents",
16473 default: 10000,
16474 maximum: 10000,
16475 unit: "documents",
16476 },
16477 Limit {
16478 id: "index_transfer_bytes",
16479 default: 268435456,
16480 maximum: 268435456,
16481 unit: "bytes",
16482 },
16483 Limit {
16484 id: "index_transfer_records",
16485 default: 10000,
16486 maximum: 10000,
16487 unit: "records",
16488 },
16489 Limit {
16490 id: "index_transfer_pages",
16491 default: 7,
16492 maximum: 7,
16493 unit: "pages",
16494 },
16495 Limit {
16496 id: "portability_prefix_bytes",
16497 default: 512,
16498 maximum: 512,
16499 unit: "bytes",
16500 },
16501];
16502#[derive(Clone, Copy, Debug, Eq, PartialEq)]
16503pub enum JsonError {
16504 DuplicateObjectField,
16505 InvalidScalar,
16506}
16507pub fn validate_semantic_json(value: &JsonValue) -> Result<(), JsonError> {
16508 match value {
16509 JsonValue::I64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
16510 JsonValue::U64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
16511 JsonValue::ExactDecimal(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
16512 JsonValue::Approximate(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
16513 JsonValue::Array(items) => items.iter().try_for_each(validate_semantic_json),
16514 JsonValue::Object(fields) => {
16515 let mut names = std::collections::BTreeSet::new();
16516 for field in fields {
16517 if !names.insert(field.name.as_str()) {
16518 return Err(JsonError::DuplicateObjectField);
16519 }
16520 validate_semantic_json(&field.value)?;
16521 }
16522 Ok(())
16523 }
16524 JsonValue::Null | JsonValue::Bool(_) | JsonValue::String(_) => Ok(()),
16525 }
16526}
16527#[cfg(test)]
16528mod tests {
16529 use super::*;
16530 fn assert_fixture<T>(value: &serde_json::Value) -> Result<(), Box<dyn std::error::Error>>
16531 where
16532 T: serde::de::DeserializeOwned + Serialize,
16533 {
16534 let decoded: T = serde_json::from_value(value.clone())?;
16535 assert_eq!(serde_json::to_value(decoded)?, *value);
16536 Ok(())
16537 }
16538 #[test]
16539 fn every_named_type_has_a_canonical_round_trip_fixture() -> Result<(), Box<dyn std::error::Error>> {
16540 let document: serde_json::Value =
16541 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
16542 assert_eq!(document["spec_sha256"], LODESTONE_API_SPEC_SHA256);
16543 let fixtures = document["named_types"]
16544 .as_object()
16545 .ok_or("named type fixtures are not an object")?;
16546 assert_eq!(fixtures.len(), LODESTONE_API_TYPE_CONTRACTS.len());
16547 for (name, value) in fixtures {
16548 match name.as_str() {
16549 "cursor" => assert_fixture::<Cursor>(value)?,
16550 "locator" => assert_fixture::<Locator>(value)?,
16551 "resource" => assert_fixture::<Resource>(value)?,
16552 "field_promotion_configuration" => assert_fixture::<FieldPromotionConfiguration>(value)?,
16553 "overload_configuration" => assert_fixture::<OverloadConfiguration>(value)?,
16554 "index_policies" => assert_fixture::<IndexPolicies>(value)?,
16555 "maintenance_budgets" => assert_fixture::<MaintenanceBudgets>(value)?,
16556 "resource_durability_class" => assert_fixture::<ResourceDurabilityClass>(value)?,
16557 "resource_storage_class" => assert_fixture::<ResourceStorageClass>(value)?,
16558 "vector_quality_objective" => assert_fixture::<VectorQualityObjective>(value)?,
16559 "vector_indexing_objective" => assert_fixture::<VectorIndexingObjective>(value)?,
16560 "vector_residency_intent" => assert_fixture::<VectorResidencyIntent>(value)?,
16561 "vector_calibration_binding" => assert_fixture::<VectorCalibrationBinding>(value)?,
16562 "vector_resource_policy" => assert_fixture::<VectorResourcePolicy>(value)?,
16563 "workload_class" => assert_fixture::<WorkloadClass>(value)?,
16564 "index_resource_spec" => assert_fixture::<IndexResourceSpec>(value)?,
16565 "index_summary" => assert_fixture::<IndexSummary>(value)?,
16566 "mapping_mode" => assert_fixture::<MappingMode>(value)?,
16567 "dynamic_mapping_policy" => assert_fixture::<DynamicMappingPolicy>(value)?,
16568 "mapping_analyzer" => assert_fixture::<MappingAnalyzer>(value)?,
16569 "keyword_normalizer" => assert_fixture::<KeywordNormalizer>(value)?,
16570 "vector_metric" => assert_fixture::<VectorMetric>(value)?,
16571 "mapping_scalar" => assert_fixture::<MappingScalar>(value)?,
16572 "sparse_vector_weight_type" => assert_fixture::<SparseVectorWeightType>(value)?,
16573 "mapping_field_type" => assert_fixture::<MappingFieldType>(value)?,
16574 "mapping_field" => assert_fixture::<MappingField>(value)?,
16575 "multi_field_projection" => assert_fixture::<MultiFieldProjection>(value)?,
16576 "analyzer_identity" => assert_fixture::<AnalyzerIdentity>(value)?,
16577 "keyword_limit" => assert_fixture::<KeywordLimit>(value)?,
16578 "profile_privacy_action" => assert_fixture::<ProfilePrivacyAction>(value)?,
16579 "profile_privacy_field" => assert_fixture::<ProfilePrivacyField>(value)?,
16580 "profile_privacy_rule" => assert_fixture::<ProfilePrivacyRule>(value)?,
16581 "profile_privacy_policy" => assert_fixture::<ProfilePrivacyPolicy>(value)?,
16582 "mapping_record_model" => assert_fixture::<MappingRecordModel>(value)?,
16583 "mapping" => assert_fixture::<Mapping>(value)?,
16584 "index_detail" => assert_fixture::<IndexDetail>(value)?,
16585 "source_provider" => assert_fixture::<SourceProvider>(value)?,
16586 "source_decoder" => assert_fixture::<SourceDecoder>(value)?,
16587 "source_replay_guarantees" => assert_fixture::<SourceReplayGuarantees>(value)?,
16588 "source_partition_configuration" => assert_fixture::<SourcePartitionConfiguration>(value)?,
16589 "replayable_source_configuration" => assert_fixture::<ReplayableSourceConfiguration>(value)?,
16590 "source_partition_status" => assert_fixture::<SourcePartitionStatus>(value)?,
16591 "replayable_source_status" => assert_fixture::<ReplayableSourceStatus>(value)?,
16592 "source_control_transition" => assert_fixture::<SourceControlTransition>(value)?,
16593 "history_ledger_precondition" => assert_fixture::<HistoryLedgerPrecondition>(value)?,
16594 "history_retention_policy" => assert_fixture::<HistoryRetentionPolicy>(value)?,
16595 "history_selector" => assert_fixture::<HistorySelector>(value)?,
16596 "history_hold" => assert_fixture::<HistoryHold>(value)?,
16597 "history_status" => assert_fixture::<HistoryStatus>(value)?,
16598 "history_resolution" => assert_fixture::<HistoryResolution>(value)?,
16599 "index_reference" => assert_fixture::<IndexReference>(value)?,
16600 "alias_target" => assert_fixture::<AliasTarget>(value)?,
16601 "alias_summary" => assert_fixture::<AliasSummary>(value)?,
16602 "alias_detail" => assert_fixture::<AliasDetail>(value)?,
16603 "data_stream_summary" => assert_fixture::<DataStreamSummary>(value)?,
16604 "component_template_binding" => assert_fixture::<ComponentTemplateBinding>(value)?,
16605 "index_template_binding" => assert_fixture::<IndexTemplateBinding>(value)?,
16606 "lifecycle_policy_binding" => assert_fixture::<LifecyclePolicyBinding>(value)?,
16607 "data_stream_detail" => assert_fixture::<DataStreamDetail>(value)?,
16608 "component_template_summary" => assert_fixture::<ComponentTemplateSummary>(value)?,
16609 "component_template_detail" => assert_fixture::<ComponentTemplateDetail>(value)?,
16610 "index_template_summary" => assert_fixture::<IndexTemplateSummary>(value)?,
16611 "index_template_detail" => assert_fixture::<IndexTemplateDetail>(value)?,
16612 "ingest_pipeline_summary" => assert_fixture::<IngestPipelineSummary>(value)?,
16613 "ingest_pipeline_detail" => assert_fixture::<IngestPipelineDetail>(value)?,
16614 "ingest_pipeline_selection" => assert_fixture::<IngestPipelineSelection>(value)?,
16615 "lifecycle_policy_summary" => assert_fixture::<LifecyclePolicySummary>(value)?,
16616 "rollover_thresholds" => assert_fixture::<RolloverThresholds>(value)?,
16617 "retention_policy" => assert_fixture::<RetentionPolicy>(value)?,
16618 "lifecycle_policy_detail" => assert_fixture::<LifecyclePolicyDetail>(value)?,
16619 "text_query_operator" => assert_fixture::<TextQueryOperator>(value)?,
16620 "text_query_analyzer" => assert_fixture::<TextQueryAnalyzer>(value)?,
16621 "zero_terms_query" => assert_fixture::<ZeroTermsQuery>(value)?,
16622 "text_query_options" => assert_fixture::<TextQueryOptions>(value)?,
16623 "multi_match_mode" => assert_fixture::<MultiMatchMode>(value)?,
16624 "multi_match_field" => assert_fixture::<MultiMatchField>(value)?,
16625 "multi_match_options" => assert_fixture::<MultiMatchOptions>(value)?,
16626 "sort_order" => assert_fixture::<SortOrder>(value)?,
16627 "sort_mode" => assert_fixture::<SortMode>(value)?,
16628 "missing_order" => assert_fixture::<MissingOrder>(value)?,
16629 "nested_score_mode" => assert_fixture::<NestedScoreMode>(value)?,
16630 "nested_inner_hits" => assert_fixture::<NestedInnerHits>(value)?,
16631 "sort_spec" => assert_fixture::<SortSpec>(value)?,
16632 "query" => assert_fixture::<Query>(value)?,
16633 "dense_retrieval_mode" => assert_fixture::<DenseRetrievalMode>(value)?,
16634 "vector_achieved_mode" => assert_fixture::<VectorAchievedMode>(value)?,
16635 "vector_branch_diagnostics" => assert_fixture::<VectorBranchDiagnostics>(value)?,
16636 "dense_vector_element_type" => assert_fixture::<DenseVectorElementType>(value)?,
16637 "dense_vector_byte_order" => assert_fixture::<DenseVectorByteOrder>(value)?,
16638 "vector_value" => assert_fixture::<VectorValue>(value)?,
16639 "sparse_vector_entry" => assert_fixture::<SparseVectorEntry>(value)?,
16640 "sparse_vector_value" => assert_fixture::<SparseVectorValue>(value)?,
16641 "vector_set_value" => assert_fixture::<VectorSetValue>(value)?,
16642 "vector_evaluation_snapshot" => assert_fixture::<VectorEvaluationSnapshot>(value)?,
16643 "vector_evaluation_query_set" => assert_fixture::<VectorEvaluationQuerySet>(value)?,
16644 "vector_evaluation_budget" => assert_fixture::<VectorEvaluationBudget>(value)?,
16645 "vector_candidate_policy" => assert_fixture::<VectorCandidatePolicy>(value)?,
16646 "vector_calibration_objective" => assert_fixture::<VectorCalibrationObjective>(value)?,
16647 "vector_strategy_profile" => assert_fixture::<VectorStrategyProfile>(value)?,
16648 "vector_evaluation_work" => assert_fixture::<VectorEvaluationWork>(value)?,
16649 "vector_evaluation_error_code" => assert_fixture::<VectorEvaluationErrorCode>(value)?,
16650 "vector_evaluation_error" => assert_fixture::<VectorEvaluationError>(value)?,
16651 "vector_recall_result" => assert_fixture::<VectorRecallResult>(value)?,
16652 "vector_calibration_candidate" => assert_fixture::<VectorCalibrationCandidate>(value)?,
16653 "vector_calibration_result" => assert_fixture::<VectorCalibrationResult>(value)?,
16654 "vector_diagnostic_result" => assert_fixture::<VectorDiagnosticResult>(value)?,
16655 "vector_warm_component" => assert_fixture::<VectorWarmComponent>(value)?,
16656 "vector_warm_state" => assert_fixture::<VectorWarmState>(value)?,
16657 "vector_warm_achievement" => assert_fixture::<VectorWarmAchievement>(value)?,
16658 "vector_warm_result" => assert_fixture::<VectorWarmResult>(value)?,
16659 "dense_retrieval_threshold" => assert_fixture::<DenseRetrievalThreshold>(value)?,
16660 "retrieval_branch" => assert_fixture::<RetrievalBranch>(value)?,
16661 "weighted_rrf_fusion" => assert_fixture::<WeightedRrfFusion>(value)?,
16662 "retrieval_plan" => assert_fixture::<RetrievalPlan>(value)?,
16663 "histogram_bounds" => assert_fixture::<HistogramBounds>(value)?,
16664 "date_histogram_bounds" => assert_fixture::<DateHistogramBounds>(value)?,
16665 "approximation_algorithm" => assert_fixture::<ApproximationAlgorithm>(value)?,
16666 "approximation" => assert_fixture::<Approximation>(value)?,
16667 "percentile_value" => assert_fixture::<PercentileValue>(value)?,
16668 "approximate_percentile_value" => assert_fixture::<ApproximatePercentileValue>(value)?,
16669 "time_series_operator" => assert_fixture::<TimeSeriesOperator>(value)?,
16670 "time_series_missing_data" => assert_fixture::<TimeSeriesMissingData>(value)?,
16671 "time_series_quantile_mode" => assert_fixture::<TimeSeriesQuantileMode>(value)?,
16672 "time_series_bucket_state" => assert_fixture::<TimeSeriesBucketState>(value)?,
16673 "time_series_quantile_value" => assert_fixture::<TimeSeriesQuantileValue>(value)?,
16674 "time_series_value" => assert_fixture::<TimeSeriesValue>(value)?,
16675 "time_series_bucket" => assert_fixture::<TimeSeriesBucket>(value)?,
16676 "relationship_traversal_direction" => assert_fixture::<RelationshipTraversalDirection>(value)?,
16677 "relationship_traversal_filter" => assert_fixture::<RelationshipTraversalFilter>(value)?,
16678 "relationship_traversal_budget" => assert_fixture::<RelationshipTraversalBudget>(value)?,
16679 "traversed_relationship" => assert_fixture::<TraversedRelationship>(value)?,
16680 "profile_query_operation" => assert_fixture::<ProfileQueryOperation>(value)?,
16681 "profile_group_by" => assert_fixture::<ProfileGroupBy>(value)?,
16682 "profile_query_filter" => assert_fixture::<ProfileQueryFilter>(value)?,
16683 "profile_query_budget" => assert_fixture::<ProfileQueryBudget>(value)?,
16684 "profile_query_row" => assert_fixture::<ProfileQueryRow>(value)?,
16685 "temporal_input" => assert_fixture::<TemporalInput>(value)?,
16686 "temporal_pattern" => assert_fixture::<TemporalPattern>(value)?,
16687 "historical_temporal_definition" => assert_fixture::<HistoricalTemporalDefinition>(value)?,
16688 "temporal_evidence_status" => assert_fixture::<TemporalEvidenceStatus>(value)?,
16689 "temporal_source_event" => assert_fixture::<TemporalSourceEvent>(value)?,
16690 "temporal_evidence" => assert_fixture::<TemporalEvidence>(value)?,
16691 "continuous_temporal_start" => assert_fixture::<ContinuousTemporalStart>(value)?,
16692 "continuous_temporal_watermark_policy" => assert_fixture::<ContinuousTemporalWatermarkPolicy>(value)?,
16693 "continuous_temporal_late_data_policy" => assert_fixture::<ContinuousTemporalLateDataPolicy>(value)?,
16694 "continuous_temporal_output" => assert_fixture::<ContinuousTemporalOutput>(value)?,
16695 "continuous_temporal_definition" => assert_fixture::<ContinuousTemporalDefinition>(value)?,
16696 "continuous_temporal_frontier" => assert_fixture::<ContinuousTemporalFrontier>(value)?,
16697 "continuous_temporal_available_frontier" => {
16698 assert_fixture::<ContinuousTemporalAvailableFrontier>(value)?
16699 }
16700 "continuous_temporal_gap_reason" => assert_fixture::<ContinuousTemporalGapReason>(value)?,
16701 "continuous_temporal_gap" => assert_fixture::<ContinuousTemporalGap>(value)?,
16702 "continuous_temporal_evaluation" => assert_fixture::<ContinuousTemporalEvaluation>(value)?,
16703 "composite_order" => assert_fixture::<CompositeOrder>(value)?,
16704 "composite_source" => assert_fixture::<CompositeSource>(value)?,
16705 "aggregation" => assert_fixture::<Aggregation>(value)?,
16706 "nested_search_hit" => assert_fixture::<NestedSearchHit>(value)?,
16707 "named_nested_inner_hits_result" => assert_fixture::<NamedNestedInnerHitsResult>(value)?,
16708 "fragment_boundary" => assert_fixture::<FragmentBoundary>(value)?,
16709 "fragment_offset_encoding" => assert_fixture::<FragmentOffsetEncoding>(value)?,
16710 "fragment_ranker" => assert_fixture::<FragmentRanker>(value)?,
16711 "fragment_request" => assert_fixture::<FragmentRequest>(value)?,
16712 "search_fragment" => assert_fixture::<SearchFragment>(value)?,
16713 "numeric_feature_transform" => assert_fixture::<NumericFeatureTransform>(value)?,
16714 "numeric_result_feature" => assert_fixture::<NumericResultFeature>(value)?,
16715 "result_feature_request" => assert_fixture::<ResultFeatureRequest>(value)?,
16716 "result_diversification" => assert_fixture::<ResultDiversification>(value)?,
16717 "branch_score_kind" => assert_fixture::<BranchScoreKind>(value)?,
16718 "result_feature" => assert_fixture::<ResultFeature>(value)?,
16719 "search_hit" => assert_fixture::<SearchHit>(value)?,
16720 "aggregation_bucket" => assert_fixture::<AggregationBucket>(value)?,
16721 "aggregation_result" => assert_fixture::<AggregationResult>(value)?,
16722 "shard_counts" => assert_fixture::<ShardCounts>(value)?,
16723 "total_hits_relation" => assert_fixture::<TotalHitsRelation>(value)?,
16724 "search_total" => assert_fixture::<SearchTotal>(value)?,
16725 "search_execution_freshness" => assert_fixture::<SearchExecutionFreshness>(value)?,
16726 "search_freshness" => assert_fixture::<SearchFreshness>(value)?,
16727 "search_degradation_reason" => assert_fixture::<SearchDegradationReason>(value)?,
16728 "search_achievement" => assert_fixture::<SearchAchievement>(value)?,
16729 "search_failure_stage" => assert_fixture::<SearchFailureStage>(value)?,
16730 "search_failure_reason" => assert_fixture::<SearchFailureReason>(value)?,
16731 "collection_shard" => assert_fixture::<CollectionShard>(value)?,
16732 "search_partial_failure" => assert_fixture::<SearchPartialFailure>(value)?,
16733 "artifact" => assert_fixture::<Artifact>(value)?,
16734 "portability_storage_capability" => assert_fixture::<PortabilityStorageCapability>(value)?,
16735 "collection_export_artifact" => assert_fixture::<CollectionExportArtifact>(value)?,
16736 "index_transfer_page" => assert_fixture::<IndexTransferPage>(value)?,
16737 "index_transfer_artifact" => assert_fixture::<IndexTransferArtifact>(value)?,
16738 "search_validation_bound" => assert_fixture::<SearchValidationBound>(value)?,
16739 "search_validation_estimates" => assert_fixture::<SearchValidationEstimates>(value)?,
16740 "search_validation_limit" => assert_fixture::<SearchValidationLimit>(value)?,
16741 "operation_kind" => assert_fixture::<OperationKind>(value)?,
16742 "operation_authority" => assert_fixture::<OperationAuthority>(value)?,
16743 "operation_target" => assert_fixture::<OperationTarget>(value)?,
16744 "operation_state" => assert_fixture::<OperationState>(value)?,
16745 "operation_pending_state" => assert_fixture::<OperationPendingState>(value)?,
16746 "operation_progress_unit" => assert_fixture::<OperationProgressUnit>(value)?,
16747 "operation_progress" => assert_fixture::<OperationProgress>(value)?,
16748 "operation_result" => assert_fixture::<OperationResult>(value)?,
16749 "operation_failure" => assert_fixture::<OperationFailure>(value)?,
16750 "operation_cancellation" => assert_fixture::<OperationCancellation>(value)?,
16751 "operation_retention_state" => assert_fixture::<OperationRetentionState>(value)?,
16752 "operation_retention" => assert_fixture::<OperationRetention>(value)?,
16753 "operation" => assert_fixture::<Operation>(value)?,
16754 "write_durability_boundary" => assert_fixture::<WriteDurabilityBoundary>(value)?,
16755 "write_visibility_mode" => assert_fixture::<WriteVisibilityMode>(value)?,
16756 "write_response_stage" => assert_fixture::<WriteResponseStage>(value)?,
16757 "write_achievement" => assert_fixture::<WriteAchievement>(value)?,
16758 "mutation_resolver" => assert_fixture::<MutationResolver>(value)?,
16759 "mutation_outcome" => assert_fixture::<MutationOutcome>(value)?,
16760 "submission_state" => assert_fixture::<SubmissionState>(value)?,
16761 "expected_binding" => assert_fixture::<ExpectedBinding>(value)?,
16762 "administration_alias_action" => assert_fixture::<AdministrationAliasAction>(value)?,
16763 "administration_mutation" => assert_fixture::<AdministrationMutation>(value)?,
16764 "administration_outcome" => assert_fixture::<AdministrationOutcome>(value)?,
16765 "index_change_apply_receipt" => assert_fixture::<IndexChangeApplyReceipt>(value)?,
16766 "bulk_document_item" => assert_fixture::<BulkDocumentItem>(value)?,
16767 "bulk_document_item_outcome" => assert_fixture::<BulkDocumentItemOutcome>(value)?,
16768 "bulk_document_outcome" => assert_fixture::<BulkDocumentOutcome>(value)?,
16769 "metric_attribute_value" => assert_fixture::<MetricAttributeValue>(value)?,
16770 "metric_attribute" => assert_fixture::<MetricAttribute>(value)?,
16771 "metric_number" => assert_fixture::<MetricNumber>(value)?,
16772 "metric_temporality" => assert_fixture::<MetricTemporality>(value)?,
16773 "metric_point_kind" => assert_fixture::<MetricPointKind>(value)?,
16774 "metric_exponential_buckets" => assert_fixture::<MetricExponentialBuckets>(value)?,
16775 "metric_data" => assert_fixture::<MetricData>(value)?,
16776 "metric_instrumentation_scope" => assert_fixture::<MetricInstrumentationScope>(value)?,
16777 "metric_exemplar" => assert_fixture::<MetricExemplar>(value)?,
16778 "metric_point" => assert_fixture::<MetricPoint>(value)?,
16779 "entity_ref" => assert_fixture::<EntityRef>(value)?,
16780 "relationship_evidence_ref" => assert_fixture::<RelationshipEvidenceRef>(value)?,
16781 "relationship_directionality" => assert_fixture::<RelationshipDirectionality>(value)?,
16782 "relationship_record" => assert_fixture::<RelationshipRecord>(value)?,
16783 "profile_label" => assert_fixture::<ProfileLabel>(value)?,
16784 "profile_sample_type" => assert_fixture::<ProfileSampleType>(value)?,
16785 "profile_mapping" => assert_fixture::<ProfileMapping>(value)?,
16786 "profile_function" => assert_fixture::<ProfileFunction>(value)?,
16787 "profile_line" => assert_fixture::<ProfileLine>(value)?,
16788 "profile_location" => assert_fixture::<ProfileLocation>(value)?,
16789 "profile_stack" => assert_fixture::<ProfileStack>(value)?,
16790 "profile_sample" => assert_fixture::<ProfileSample>(value)?,
16791 "profile_instrumentation_scope" => assert_fixture::<ProfileInstrumentationScope>(value)?,
16792 "profile_batch" => assert_fixture::<ProfileBatch>(value)?,
16793 "native_record" => assert_fixture::<NativeRecord>(value)?,
16794 "retained_append_item" => assert_fixture::<RetainedAppendItem>(value)?,
16795 "retained_append_state" => assert_fixture::<RetainedAppendState>(value)?,
16796 "retained_append_retry_safety" => assert_fixture::<RetainedAppendRetrySafety>(value)?,
16797 "retained_append_item_outcome" => assert_fixture::<RetainedAppendItemOutcome>(value)?,
16798 "retained_append_bulk_outcome" => assert_fixture::<RetainedAppendBulkOutcome>(value)?,
16799 "retained_append_observation_state" => assert_fixture::<RetainedAppendObservationState>(value)?,
16800 "retained_append_observation_outcome" => assert_fixture::<RetainedAppendObservationOutcome>(value)?,
16801 "binary_value" => assert_fixture::<BinaryValue>(value)?,
16802 "state_hash_field" => assert_fixture::<StateHashField>(value)?,
16803 "state_set_entry" => assert_fixture::<StateSetEntry>(value)?,
16804 "state_set_condition" => assert_fixture::<StateSetCondition>(value)?,
16805 "state_operation" => assert_fixture::<StateOperation>(value)?,
16806 "state_optional_value" => assert_fixture::<StateOptionalValue>(value)?,
16807 "state_command_result" => assert_fixture::<StateCommandResult>(value)?,
16808 "state_write_resolution" => assert_fixture::<StateWriteResolution>(value)?,
16809 "service_credential_reservation" => assert_fixture::<ServiceCredentialReservation>(value)?,
16810 "subscription_metadata_field" => assert_fixture::<SubscriptionMetadataField>(value)?,
16811 "subscription_field" => assert_fixture::<SubscriptionField>(value)?,
16812 "subscription_filter" => assert_fixture::<SubscriptionFilter>(value)?,
16813 "subscription_cursor_entry" => assert_fixture::<SubscriptionCursorEntry>(value)?,
16814 "subscription_route" => assert_fixture::<SubscriptionRoute>(value)?,
16815 "subscription_start_position" => assert_fixture::<SubscriptionStartPosition>(value)?,
16816 "subscription_start" => assert_fixture::<SubscriptionStart>(value)?,
16817 "subscription_accepted" => assert_fixture::<SubscriptionAccepted>(value)?,
16818 "subscription_writer_fence" => assert_fixture::<SubscriptionWriterFence>(value)?,
16819 "subscription_event" => assert_fixture::<SubscriptionEvent>(value)?,
16820 "subscription_heartbeat" => assert_fixture::<SubscriptionHeartbeat>(value)?,
16821 "subscription_gap" => assert_fixture::<SubscriptionGap>(value)?,
16822 "subscription_terminal_reason" => assert_fixture::<SubscriptionTerminalReason>(value)?,
16823 "subscription_terminal" => assert_fixture::<SubscriptionTerminal>(value)?,
16824 "subscription_frame" => assert_fixture::<SubscriptionFrame>(value)?,
16825 "stream_binding" => assert_fixture::<StreamBinding>(value)?,
16826 "capability_grant" => assert_fixture::<CapabilityGrant>(value)?,
16827 "protocol_limit" => assert_fixture::<ProtocolLimit>(value)?,
16828 "document_mutation_condition" => assert_fixture::<DocumentMutationCondition>(value)?,
16829 "audit_adapter" => assert_fixture::<AuditAdapter>(value)?,
16830 "audit_decision" => assert_fixture::<AuditDecision>(value)?,
16831 "audit_outcome" => assert_fixture::<AuditOutcome>(value)?,
16832 "audit_detail" => assert_fixture::<AuditDetail>(value)?,
16833 "audit_gap_reason" => assert_fixture::<AuditGapReason>(value)?,
16834 "audit_event" => assert_fixture::<AuditEvent>(value)?,
16835 "audit_gap" => assert_fixture::<AuditGap>(value)?,
16836 "audit_stream_state" => assert_fixture::<AuditStreamState>(value)?,
16837 "service_credential_grant" => assert_fixture::<ServiceCredentialGrant>(value)?,
16838 "service_credential_summary" => assert_fixture::<ServiceCredentialSummary>(value)?,
16839 "security_role" => assert_fixture::<SecurityRole>(value)?,
16840 "role_append_scope_change" => assert_fixture::<RoleAppendScopeChange>(value)?,
16841 "role_append_access_preparation" => assert_fixture::<RoleAppendAccessPreparation>(value)?,
16842 "security_action_outcome" => assert_fixture::<SecurityActionOutcome>(value)?,
16843 "maintenance_work_state" => assert_fixture::<MaintenanceWorkState>(value)?,
16844 "maintenance_attempt_state" => assert_fixture::<MaintenanceAttemptState>(value)?,
16845 "maintenance_failure_class" => assert_fixture::<MaintenanceFailureClass>(value)?,
16846 "maintenance_failure_class_count" => assert_fixture::<MaintenanceFailureClassCount>(value)?,
16847 "maintenance_attempt_observation" => assert_fixture::<MaintenanceAttemptObservation>(value)?,
16848 "maintenance_task_scope" => assert_fixture::<MaintenanceTaskScope>(value)?,
16849 "maintenance_task_status" => assert_fixture::<MaintenanceTaskStatus>(value)?,
16850 "maintenance_status_aggregate" => assert_fixture::<MaintenanceStatusAggregate>(value)?,
16851 "runtime_status_detail" => assert_fixture::<RuntimeStatusDetail>(value)?,
16852 "result_cache_status" => assert_fixture::<ResultCacheStatus>(value)?,
16853 "field_promotion_status" => assert_fixture::<FieldPromotionStatus>(value)?,
16854 "overload_shard_status" => assert_fixture::<OverloadShardStatus>(value)?,
16855 "external_key_binding" => assert_fixture::<ExternalKeyBinding>(value)?,
16856 "rollup_measure" => assert_fixture::<RollupMeasure>(value)?,
16857 "aggregate_then_delete_policy" => assert_fixture::<AggregateThenDeletePolicy>(value)?,
16858 "lifecycle_binding_status" => assert_fixture::<LifecycleBindingStatus>(value)?,
16859 "lifecycle_rollup_status" => assert_fixture::<LifecycleRollupStatus>(value)?,
16860 "lifecycle_status" => assert_fixture::<LifecycleStatus>(value)?,
16861 "quota_limit" => assert_fixture::<QuotaLimit>(value)?,
16862 "quota_consumption" => assert_fixture::<QuotaConsumption>(value)?,
16863 "quota_update" => assert_fixture::<QuotaUpdate>(value)?,
16864 "storage_overall_posture" => assert_fixture::<StorageOverallPosture>(value)?,
16865 "storage_profile_role" => assert_fixture::<StorageProfileRole>(value)?,
16866 "storage_provider_posture" => assert_fixture::<StorageProviderPosture>(value)?,
16867 "storage_backend_service_class" => assert_fixture::<StorageBackendServiceClass>(value)?,
16868 "storage_profile_role_binding" => assert_fixture::<StorageProfileRoleBinding>(value)?,
16869 "storage_profile_attestation" => assert_fixture::<StorageProfileAttestation>(value)?,
16870 "storage_profile_expectation" => assert_fixture::<StorageProfileExpectation>(value)?,
16871 "core_binding" => assert_fixture::<CoreBinding>(value)?,
16872 "readiness_observation" => assert_fixture::<ReadinessObservation>(value)?,
16873 "usage_dimension" => assert_fixture::<UsageDimension>(value)?,
16874 "physical_usage_value" => assert_fixture::<PhysicalUsageValue>(value)?,
16875 "core_usage_units" => assert_fixture::<CoreUsageUnits>(value)?,
16876 "core_usage_correction" => assert_fixture::<CoreUsageCorrection>(value)?,
16877 "response_meta" => assert_fixture::<ResponseMeta>(value)?,
16878 "error_disposition" => assert_fixture::<ErrorDisposition>(value)?,
16879 "recovery_action" => assert_fixture::<RecoveryAction>(value)?,
16880 "limit_class" => assert_fixture::<LimitClass>(value)?,
16881 "error_detail" => assert_fixture::<ErrorDetail>(value)?,
16882 "connection_profile" => assert_fixture::<ConnectionProfile>(value)?,
16883 _ => return Err("fixture names an unknown generated type".into()),
16884 }
16885 }
16886 Ok(())
16887 }
16888 #[test]
16889 fn every_aggregation_variant_has_a_canonical_fixture() -> Result<(), Box<dyn std::error::Error>> {
16890 let document: serde_json::Value =
16891 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
16892 let fixtures = document["aggregation_variants"]
16893 .as_object()
16894 .ok_or("aggregation fixtures are not an object")?;
16895 assert_eq!(fixtures.len(), 17);
16896 for value in fixtures.values() {
16897 assert_fixture::<Aggregation>(value)?;
16898 }
16899 Ok(())
16900 }
16901 #[test]
16902 fn exact_scalar_canonicality_is_closed() {
16903 assert_eq!(
16904 U64 {
16905 value: u64::MAX.to_string()
16906 }
16907 .validate(),
16908 Ok(())
16909 );
16910 assert_eq!(
16911 I64 {
16912 value: i64::MIN.to_string()
16913 }
16914 .validate(),
16915 Ok(())
16916 );
16917 assert_eq!(U64 { value: "01".to_owned() }.validate(), Err(ScalarError::InvalidU64));
16918 assert_eq!(
16919 ExactDecimal {
16920 coefficient: "12345".to_owned(),
16921 scale: 2
16922 }
16923 .validate(),
16924 Ok(())
16925 );
16926 assert_eq!(
16927 ExactDecimal {
16928 coefficient: "123450".to_owned(),
16929 scale: 3
16930 }
16931 .validate(),
16932 Err(ScalarError::InvalidDecimal)
16933 );
16934 assert_eq!(
16935 ExactDecimal {
16936 coefficient: "1".to_owned(),
16937 scale: 1_025
16938 }
16939 .validate(),
16940 Err(ScalarError::InvalidDecimal)
16941 );
16942 }
16943 #[test]
16944 fn scalar_decoders_refuse_numbers_and_noncanonical_strings() {
16945 assert!(serde_json::from_str::<U64>("9007199254740993").is_err());
16946 assert!(serde_json::from_str::<U64>(r#""01""#).is_err());
16947 assert!(serde_json::from_str::<Identity>(r#""0123456789ABCDEF0123456789ABCDEF""#).is_err());
16948 assert!(serde_json::from_str::<Digest>(r#""0123456789abcdef0123456789abcdef""#).is_err());
16949 assert!(serde_json::from_str::<ExactDecimal>(r#"{"coefficient":"123450","scale":3}"#).is_err());
16950 assert!(serde_json::from_str::<ApproximateNumber>(r#""1.0""#).is_err());
16951 }
16952 #[test]
16953 fn semantic_json_rejects_duplicate_fields() {
16954 let value = JsonValue::Object(vec![
16955 JsonField {
16956 name: "x".to_owned(),
16957 value: JsonValue::Null,
16958 },
16959 JsonField {
16960 name: "x".to_owned(),
16961 value: JsonValue::Bool(true),
16962 },
16963 ]);
16964 assert_eq!(validate_semantic_json(&value), Err(JsonError::DuplicateObjectField));
16965 }
16966 #[test]
16967 fn strict_generated_shapes_refuse_malformed_duplicate_unknown_field_and_tag() {
16968 assert!(serde_json::from_str::<DiscoverRequest>(r#"{"unexpected":true}"#).is_err());
16969 assert!(serde_json::from_str::<Cursor>(r#"{"value":"a","value":"b"}"#).is_err());
16970 assert!(serde_json::from_str::<Query>(r#"{"kind":"future_query"}"#).is_err());
16971 assert!(serde_json::from_str::<Cursor>(r#"{"value":1}"#).is_err());
16972 }
16973 fn admitted_error_detail(code: ErrorCode) -> ErrorDetail {
16974 match code {
16975 ErrorCode::Aborted => ErrorDetail::Aborted {
16976 reason: "test".to_owned(),
16977 },
16978 ErrorCode::DeadlineExceeded => ErrorDetail::DeadlineExceeded,
16979 ErrorCode::InvalidRequest => ErrorDetail::InvalidRequest {
16980 field: None,
16981 reason: "test".to_owned(),
16982 },
16983 ErrorCode::UnsupportedVersion => ErrorDetail::UnsupportedVersion {
16984 observed: 1,
16985 maximum_supported: 1,
16986 },
16987 ErrorCode::Unauthenticated => ErrorDetail::Unauthenticated,
16988 ErrorCode::PermissionDenied => ErrorDetail::PermissionDenied {
16989 action: None,
16990 workload_class: None,
16991 },
16992 ErrorCode::NotFound => ErrorDetail::NotFound { resource: None },
16993 ErrorCode::Conflict => ErrorDetail::Conflict {
16994 expected_revision: None,
16995 observed_revision: None,
16996 },
16997 ErrorCode::StaleCursor => ErrorDetail::StaleCursor { restart_count: 0 },
16998 ErrorCode::RestartBudgetExhausted => ErrorDetail::RestartBudgetExhausted { maximum_restarts: 0 },
16999 ErrorCode::LimitExceeded => ErrorDetail::LimitExceeded {
17000 class: LimitClass::RequestBound,
17001 limit_id: "test".to_owned(),
17002 maximum: U64 { value: "0".to_owned() },
17003 },
17004 ErrorCode::CapabilityUnavailable => ErrorDetail::CapabilityUnavailable { capability: None },
17005 ErrorCode::NotSubmitted => ErrorDetail::NotSubmitted {
17006 retry_after_millis: None,
17007 },
17008 ErrorCode::SubmittedIndeterminate => ErrorDetail::SubmittedIndeterminate { locator: None },
17009 ErrorCode::ExpiredUnknown => ErrorDetail::ExpiredUnknown { locator: None },
17010 ErrorCode::SecretNotEscrowed => ErrorDetail::SecretNotEscrowed,
17011 ErrorCode::RetentionGap => ErrorDetail::RetentionGap {
17012 retired_through: U64 { value: "0".to_owned() },
17013 },
17014 ErrorCode::ArtifactRangeInvalid => ErrorDetail::ArtifactRangeInvalid {
17015 maximum_bytes: U64 { value: "0".to_owned() },
17016 },
17017 ErrorCode::ChecksumMismatch => ErrorDetail::ChecksumMismatch {
17018 expected: Digest { value: "0".repeat(64) },
17019 observed: Digest { value: "0".repeat(64) },
17020 },
17021 ErrorCode::TemporarilyUnavailable => ErrorDetail::TemporarilyUnavailable {
17022 retry_after_millis: None,
17023 },
17024 ErrorCode::Internal => ErrorDetail::Internal,
17025 }
17026 }
17027 #[test]
17028 fn every_admitted_error_outcome_is_constructible_and_invalid_combinations_fail_closed() {
17029 let mut codes = std::collections::BTreeSet::new();
17030 for contract in LODESTONE_API_ERROR_OUTCOMES {
17031 codes.insert(format!("{:?}", contract.code));
17032 assert_eq!(
17033 ErrorBody::try_new(
17034 contract.code,
17035 "test".to_owned(),
17036 contract.disposition,
17037 contract.recovery,
17038 admitted_error_detail(contract.code)
17039 ),
17040 Ok(ErrorBody {
17041 code: contract.code,
17042 message: "test".to_owned(),
17043 disposition: contract.disposition,
17044 recovery: contract.recovery,
17045 details: admitted_error_detail(contract.code)
17046 })
17047 );
17048 }
17049 assert_eq!(codes.len(), 21);
17050 assert_eq!(
17051 ErrorBody::try_new(
17052 ErrorCode::Aborted,
17053 "test".to_owned(),
17054 ErrorDisposition::NotSubmitted,
17055 RecoveryAction::Stop,
17056 admitted_error_detail(ErrorCode::Aborted)
17057 ),
17058 Err(ErrorShapeError::OutcomeMismatch)
17059 );
17060 assert_eq!(
17061 ErrorBody::try_new(
17062 ErrorCode::Aborted,
17063 "test".to_owned(),
17064 ErrorDisposition::NotSubmitted,
17065 RecoveryAction::Retry,
17066 ErrorDetail::Internal
17067 ),
17068 Err(ErrorShapeError::DetailCodeMismatch)
17069 );
17070 assert_eq!(
17071 ErrorBody::try_new(
17072 ErrorCode::TemporarilyUnavailable,
17073 "test".to_owned(),
17074 ErrorDisposition::NotSubmitted,
17075 RecoveryAction::RetryAfter,
17076 ErrorDetail::TemporarilyUnavailable {
17077 retry_after_millis: Some(U64 {
17078 value: "60001".to_owned()
17079 })
17080 }
17081 ),
17082 Err(ErrorShapeError::RetryAfterOutOfRange)
17083 );
17084 }
17085 #[test]
17086 fn registries_match_the_idl() {
17087 assert_eq!(LODESTONE_API_COMMAND_CONTRACTS.len(), 120);
17088 assert_eq!(LODESTONE_API_COMMAND_SEMANTICS.len(), 120);
17089 assert_eq!(LODESTONE_API_COMMAND_OUTCOMES.len(), 120);
17090 assert_eq!(LODESTONE_API_ERROR_CODES.len(), 21);
17091 assert_eq!(LODESTONE_API_ERROR_OUTCOMES.len(), 28);
17092 assert_eq!(LODESTONE_API_TYPE_CONTRACTS.len(), 332);
17093 assert_eq!(LODESTONE_API_STREAM_CONTRACTS.len(), 1);
17094 assert_eq!(LODESTONE_API_LIMITS.len(), 116);
17095 assert_eq!(LODESTONE_API_CLUSTER_CONTROL_ACTIONS.len(), 23);
17096 assert_eq!(LODESTONE_API_CLUSTER_CONTROL_TYPES.len(), 10);
17097 }
17098 #[test]
17099 fn mutation_outcome_metadata_matches_submission_boundaries() {
17100 for (command, outcome) in LODESTONE_API_COMMAND_CONTRACTS
17101 .iter()
17102 .zip(LODESTONE_API_COMMAND_OUTCOMES)
17103 {
17104 assert_eq!(command.command, outcome.command);
17105 let submits = !matches!(command.mutation, "read_only" | "read_only_prepare" | "catalog_prepare");
17106 assert_eq!(outcome.possible_submission_states.contains(&"submitted"), submits);
17107 assert_eq!(outcome.possible_submission_states.contains(&"indeterminate"), submits);
17108 assert_eq!(
17109 outcome.cancellation == "per_call_until_submission_then_resolve",
17110 submits
17111 );
17112 }
17113 for command in [
17114 Command::ReserveServiceCredential,
17115 Command::ReserveServiceCredentialRotation,
17116 ] {
17117 let outcome = LODESTONE_API_COMMAND_OUTCOMES
17118 .iter()
17119 .find(|outcome| outcome.command == command);
17120 assert!(
17121 matches!(outcome, Some(value) if value.identity_requirement == "caller_action_id" && value.resolver_command == Some(Command::ResolveServiceCredentialReservation))
17122 );
17123 }
17124 }
17125}