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 = "56abf1051ead319a64e3f56e952ed97dda431f2eb711153acb89b295282b13f3";
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_SHAPE_VERSION: u16 = 1;
782pub const LODESTONE_API_FIELD_PROMOTION_CONFIGURATION_FORMAT_VERSION: u16 = 3;
783#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
784#[serde(deny_unknown_fields)]
785pub struct FieldPromotionConfiguration {
786 pub format_version: u32,
787 pub enabled: bool,
788 pub minimum_query_count: u32,
789 pub maximum_promoted_fields: u32,
790 pub maximum_cardinality: U64,
791 pub maximum_extra_bytes: U64,
792 pub allow_sensitive: bool,
793}
794
795pub const LODESTONE_API_OVERLOAD_CONFIGURATION_SHAPE_VERSION: u16 = 2;
796pub const LODESTONE_API_OVERLOAD_CONFIGURATION_FORMAT_VERSION: u16 = 3;
797#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
798#[serde(deny_unknown_fields)]
799pub struct OverloadConfiguration {
800 pub format_version: u32,
801 pub mode: String,
802 pub maximum_backlog_bytes: U64,
803 pub maximum_backlog_age_millis: U64,
804 pub maximum_collection_share_bytes: U64,
805 pub maximum_recovery_ops_per_pass: u32,
806 pub maximum_pending_overlay_documents: U64,
807}
808
809pub const LODESTONE_API_INDEX_POLICIES_FORMAT_VERSION: u16 = 1;
810#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
811#[serde(deny_unknown_fields)]
812pub struct IndexPolicies {
813 pub durability: String,
814 pub storage: String,
815 pub cache: String,
816 #[serde(default, skip_serializing_if = "Option::is_none")]
817 pub default_visibility: Option<String>,
818 pub field_promotion: FieldPromotionConfiguration,
819 pub overload: OverloadConfiguration,
820}
821
822pub const LODESTONE_API_MAINTENANCE_BUDGETS_FORMAT_VERSION: u16 = 1;
823#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
824#[serde(deny_unknown_fields)]
825pub struct MaintenanceBudgets {
826 pub memtable_max_bytes: U64,
827 pub refresh_max_millis: U64,
828 pub seal_max_bytes: U64,
829 pub seal_max_millis: U64,
830 pub merge_max_bytes: U64,
831 pub delete_resolution_max_bytes: U64,
832 pub wal_retention_max_bytes: U64,
833 pub gc_max_keys: u32,
834 pub fsck_max_objects: u32,
835 pub deleted_tombstone_retention_millis: U64,
836}
837
838pub const LODESTONE_API_RESOURCE_DURABILITY_CLASS_FORMAT_VERSION: u16 = 1;
839#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
840#[serde(rename_all = "snake_case")]
841pub enum ResourceDurabilityClass {
842 RegionalObject,
843 ZonalLowLatency,
844 Relaxed,
845 Ephemeral,
846}
847
848pub const LODESTONE_API_RESOURCE_STORAGE_CLASS_FORMAT_VERSION: u16 = 1;
849#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
850#[serde(rename_all = "snake_case")]
851pub enum ResourceStorageClass {
852 Standard,
853 Cold,
854}
855
856pub const LODESTONE_API_VECTOR_QUALITY_OBJECTIVE_FORMAT_VERSION: u16 = 1;
857#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
858#[serde(rename_all = "snake_case")]
859pub enum VectorQualityObjective {
860 Balanced,
861 HighRecall,
862 MemoryEfficient,
863}
864
865pub const LODESTONE_API_VECTOR_INDEXING_OBJECTIVE_FORMAT_VERSION: u16 = 1;
866#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
867#[serde(rename_all = "snake_case")]
868pub enum VectorIndexingObjective {
869 FastBuild,
870 Balanced,
871 Compact,
872}
873
874pub const LODESTONE_API_VECTOR_RESIDENCY_INTENT_FORMAT_VERSION: u16 = 1;
875#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
876#[serde(rename_all = "snake_case")]
877pub enum VectorResidencyIntent {
878 Automatic,
879 PreferResident,
880 RequireResident,
881}
882
883pub const LODESTONE_API_VECTOR_CALIBRATION_BINDING_FORMAT_VERSION: u16 = 1;
884#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
885#[serde(deny_unknown_fields)]
886pub struct VectorCalibrationBinding {
887 pub profile: VectorStrategyProfile,
888 pub evidence_digest: Digest,
889}
890
891pub const LODESTONE_API_VECTOR_RESOURCE_POLICY_FORMAT_VERSION: u16 = 2;
892#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
893#[serde(deny_unknown_fields)]
894pub struct VectorResourcePolicy {
895 pub quality: VectorQualityObjective,
896 pub indexing: VectorIndexingObjective,
897 #[serde(default, skip_serializing_if = "Option::is_none")]
898 pub residency: Option<VectorResidencyIntent>,
899 #[serde(default, skip_serializing_if = "Option::is_none")]
900 pub calibration: Option<VectorCalibrationBinding>,
901}
902
903pub const LODESTONE_API_WORKLOAD_CLASS_FORMAT_VERSION: u16 = 1;
904#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
905#[serde(rename_all = "snake_case")]
906pub enum WorkloadClass {
907 InteractiveSearch,
908 BatchAnalytics,
909 StreamingIngest,
910 BulkBackfill,
911 InternalMaintenance,
912}
913
914pub const LODESTONE_API_INDEX_RESOURCE_SPEC_SHAPE_VERSION: u16 = 3;
915pub const LODESTONE_API_INDEX_RESOURCE_SPEC_FORMAT_VERSION: u16 = 3;
916#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
917#[serde(deny_unknown_fields)]
918pub struct IndexResourceSpec {
919 pub format_version: u32,
920 pub revision: U64,
921 pub initial_shards: u32,
922 pub target_shard_bytes: U64,
923 pub durability: ResourceDurabilityClass,
924 pub storage_class: ResourceStorageClass,
925 pub ram_admission_weight: u32,
926 pub ram_hard_max_bytes: U64,
927 pub nvme_admission_weight: u32,
928 pub nvme_hard_max_bytes: U64,
929 pub refresh_objective_millis: u32,
930 pub memtable_hard_max_bytes: U64,
931 pub seal_parallelism: u32,
932 pub merge_parallelism: u32,
933 pub vector: VectorResourcePolicy,
934 #[serde(default, skip_serializing_if = "Option::is_none")]
935 pub lifecycle_binding: Option<Identity>,
936 pub encryption_required: bool,
937 #[serde(default, skip_serializing_if = "Option::is_none")]
938 pub resolver_capability: Option<Identity>,
939}
940
941pub const LODESTONE_API_INDEX_SUMMARY_FORMAT_VERSION: u16 = 1;
942#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
943#[serde(deny_unknown_fields)]
944pub struct IndexSummary {
945 pub name: String,
946 pub incarnation: Identity,
947 pub revision: U64,
948 pub mode: String,
949 pub retained_event_identity: bool,
950 pub state: String,
951 pub schema_generation: U64,
952 pub routing_revision: U64,
953 pub shard_count: u32,
954 pub policies: IndexPolicies,
955 pub management_mode: String,
956}
957
958pub const LODESTONE_API_MAPPING_MODE_FORMAT_VERSION: u16 = 1;
959#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
960#[serde(rename_all = "snake_case")]
961pub enum MappingMode {
962 Mutable,
963 AppendLog,
964 State,
965}
966
967pub const LODESTONE_API_DYNAMIC_MAPPING_POLICY_FORMAT_VERSION: u16 = 1;
968#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
969#[serde(rename_all = "snake_case")]
970pub enum DynamicMappingPolicy {
971 True,
972 False,
973 Strict,
974}
975
976pub const LODESTONE_API_MAPPING_ANALYZER_FORMAT_VERSION: u16 = 1;
977#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
978#[serde(rename_all = "snake_case")]
979pub enum MappingAnalyzer {
980 Keyword,
981 Simple,
982 Standard,
983 Whitespace,
984}
985
986pub const LODESTONE_API_KEYWORD_NORMALIZER_FORMAT_VERSION: u16 = 1;
987#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
988#[serde(rename_all = "snake_case")]
989pub enum KeywordNormalizer {
990 Keyword,
991 Lowercase,
992}
993
994pub const LODESTONE_API_VECTOR_METRIC_FORMAT_VERSION: u16 = 1;
995#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
996#[serde(rename_all = "snake_case")]
997pub enum VectorMetric {
998 Cosine,
999 DotProduct,
1000 SquaredL2,
1001}
1002
1003pub const LODESTONE_API_MAPPING_SCALAR_FORMAT_VERSION: u16 = 1;
1004#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1005#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1006pub enum MappingScalar {
1007 Boolean { value: bool },
1008 I64 { value: I64 },
1009 U64 { value: U64 },
1010 F64Bits { value: U64 },
1011 Keyword { value: String },
1012}
1013
1014pub const LODESTONE_API_SPARSE_VECTOR_WEIGHT_TYPE_FORMAT_VERSION: u16 = 1;
1015#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1016#[serde(rename_all = "snake_case")]
1017pub enum SparseVectorWeightType {
1018 F32,
1019 F16,
1020}
1021
1022pub const LODESTONE_API_MAPPING_FIELD_TYPE_SHAPE_VERSION: u16 = 3;
1023pub const LODESTONE_API_MAPPING_FIELD_TYPE_VECTOR_FORMAT_VERSION: u16 = 2;
1024pub const LODESTONE_API_MAPPING_FIELD_TYPE_SPARSE_VECTOR_FORMAT_VERSION: u16 = 1;
1025pub const LODESTONE_API_MAPPING_FIELD_TYPE_VECTOR_SET_FORMAT_VERSION: u16 = 1;
1026#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1027#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1028pub enum MappingFieldType {
1029 Text,
1030 Keyword,
1031 U64,
1032 Date,
1033 I64,
1034 F64,
1035 Bool,
1036 Nested,
1037 Vector {
1038 format_version: u32,
1039 field_id: u32,
1040 dimensions: u32,
1041 metric: VectorMetric,
1042 element_type: DenseVectorElementType,
1043 #[serde(default, skip_serializing_if = "Option::is_none")]
1044 quantization_scale: Option<ApproximateNumber>,
1045 },
1046 SparseVector {
1047 format_version: u32,
1048 field_id: u32,
1049 maximum_dimension: u32,
1050 weight_type: SparseVectorWeightType,
1051 },
1052 VectorSet {
1053 format_version: u32,
1054 field_id: u32,
1055 dimensions: u32,
1056 metric: VectorMetric,
1057 element_type: DenseVectorElementType,
1058 #[serde(default, skip_serializing_if = "Option::is_none")]
1059 quantization_scale: Option<ApproximateNumber>,
1060 maximum_vectors: u32,
1061 },
1062}
1063
1064pub const LODESTONE_API_MAPPING_FIELD_FORMAT_VERSION: u16 = 1;
1065#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1066#[serde(deny_unknown_fields)]
1067pub struct MappingField {
1068 pub path: String,
1069 pub field_type: MappingFieldType,
1070 pub stored: bool,
1071 #[serde(default, skip_serializing_if = "Option::is_none")]
1072 pub null_value: Option<MappingScalar>,
1073}
1074
1075pub const LODESTONE_API_MULTI_FIELD_PROJECTION_FORMAT_VERSION: u16 = 1;
1076#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1077#[serde(deny_unknown_fields)]
1078pub struct MultiFieldProjection {
1079 pub parent: String,
1080 pub child: String,
1081}
1082
1083pub const LODESTONE_API_ANALYZER_IDENTITY_FORMAT_VERSION: u16 = 1;
1084#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1085#[serde(deny_unknown_fields)]
1086pub struct AnalyzerIdentity {
1087 pub field: String,
1088 pub index_analyzer: MappingAnalyzer,
1089 pub search_analyzer: MappingAnalyzer,
1090}
1091
1092pub const LODESTONE_API_KEYWORD_LIMIT_FORMAT_VERSION: u16 = 1;
1093#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1094#[serde(deny_unknown_fields)]
1095pub struct KeywordLimit {
1096 pub field: String,
1097 pub max_bytes: u32,
1098 pub normalizer: KeywordNormalizer,
1099}
1100
1101pub const LODESTONE_API_PROFILE_PRIVACY_ACTION_FORMAT_VERSION: u16 = 1;
1102#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1103#[serde(rename_all = "snake_case")]
1104pub enum ProfilePrivacyAction {
1105 Allow,
1106 Drop,
1107 Redact,
1108 Reject,
1109}
1110
1111pub const LODESTONE_API_PROFILE_PRIVACY_FIELD_FORMAT_VERSION: u16 = 1;
1112#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1113#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1114pub enum ProfilePrivacyField {
1115 ResourceAttribute { key: String },
1116 ScopeAttribute { key: String },
1117 SampleLabel { key: String },
1118 FunctionName,
1119 FunctionSystemName,
1120 FunctionFilename,
1121 MappingFilename,
1122}
1123
1124pub const LODESTONE_API_PROFILE_PRIVACY_RULE_FORMAT_VERSION: u16 = 1;
1125#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1126#[serde(deny_unknown_fields)]
1127pub struct ProfilePrivacyRule {
1128 pub field: ProfilePrivacyField,
1129 pub action: ProfilePrivacyAction,
1130}
1131
1132pub const LODESTONE_API_PROFILE_PRIVACY_POLICY_SHAPE_VERSION: u16 = 1;
1133pub const LODESTONE_API_PROFILE_PRIVACY_POLICY_FORMAT_VERSION: u16 = 1;
1134#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1135#[serde(deny_unknown_fields)]
1136pub struct ProfilePrivacyPolicy {
1137 pub format_version: u32,
1138 pub rules: Vec<ProfilePrivacyRule>,
1139}
1140
1141pub const LODESTONE_API_MAPPING_RECORD_MODEL_SHAPE_VERSION: u16 = 3;
1142pub const LODESTONE_API_MAPPING_RECORD_MODEL_METRIC_V1_FORMAT_VERSION: u16 = 1;
1143pub const LODESTONE_API_MAPPING_RECORD_MODEL_RELATIONSHIP_V1_FORMAT_VERSION: u16 = 1;
1144pub const LODESTONE_API_MAPPING_RECORD_MODEL_PROFILE_V1_FORMAT_VERSION: u16 = 1;
1145#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1146#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1147pub enum MappingRecordModel {
1148 Document,
1149 MetricV1 {
1150 format_version: u32,
1151 grouping_attributes: Vec<String>,
1152 },
1153 RelationshipV1 {
1154 format_version: u32,
1155 },
1156 ProfileV1 {
1157 format_version: u32,
1158 privacy: ProfilePrivacyPolicy,
1159 },
1160}
1161
1162pub const LODESTONE_API_MAPPING_SHAPE_VERSION: u16 = 4;
1163pub const LODESTONE_API_MAPPING_FORMAT_VERSION: u16 = 10;
1164#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1165#[serde(deny_unknown_fields)]
1166pub struct Mapping {
1167 pub format_version: u32,
1168 pub generation: U64,
1169 pub mode: MappingMode,
1170 pub record_model: MappingRecordModel,
1171 pub dynamic_policy: DynamicMappingPolicy,
1172 pub fields: Vec<MappingField>,
1173 pub multi_field_projections: Vec<MultiFieldProjection>,
1174 pub analyzer_identities: Vec<AnalyzerIdentity>,
1175 pub keyword_limits: Vec<KeywordLimit>,
1176 pub nested_paths: Vec<String>,
1177}
1178
1179pub const LODESTONE_API_INDEX_DETAIL_FORMAT_VERSION: u16 = 1;
1180#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1181#[serde(deny_unknown_fields)]
1182pub struct IndexDetail {
1183 pub summary: IndexSummary,
1184 pub current_mapping: Mapping,
1185 pub budgets: MaintenanceBudgets,
1186 pub resource_spec: IndexResourceSpec,
1187 pub aliases: Vec<String>,
1188 pub data_streams: Vec<String>,
1189}
1190
1191pub const LODESTONE_API_SOURCE_PROVIDER_FORMAT_VERSION: u16 = 1;
1192#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1193#[serde(rename_all = "snake_case")]
1194pub enum SourceProvider {
1195 Kafka,
1196 ObjectLog,
1197 HttpReplay,
1198 GrpcReplay,
1199}
1200
1201pub const LODESTONE_API_SOURCE_DECODER_FORMAT_VERSION: u16 = 1;
1202#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1203#[serde(rename_all = "snake_case")]
1204pub enum SourceDecoder {
1205 LodestoneDocumentJson,
1206 DebeziumPostgresJson,
1207}
1208
1209pub const LODESTONE_API_SOURCE_REPLAY_GUARANTEES_FORMAT_VERSION: u16 = 1;
1210#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1211#[serde(deny_unknown_fields)]
1212pub struct SourceReplayGuarantees {
1213 pub durable_replay: bool,
1214 pub stable_partition_identity: bool,
1215 pub stable_operation_identity: bool,
1216 pub ordered_positions: bool,
1217 pub bounded_reads: bool,
1218 pub explicit_retention: bool,
1219 pub explicit_rewind: bool,
1220 pub minimum_replay_window_millis: U64,
1221}
1222
1223pub const LODESTONE_API_SOURCE_PARTITION_CONFIGURATION_FORMAT_VERSION: u16 = 1;
1224#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1225#[serde(deny_unknown_fields)]
1226pub struct SourcePartitionConfiguration {
1227 pub partition_id: u32,
1228 pub partition_incarnation: U64,
1229 pub initial_next_ordinal: U64,
1230 pub initial_resume_token_base64: String,
1231}
1232
1233pub const LODESTONE_API_REPLAYABLE_SOURCE_CONFIGURATION_FORMAT_VERSION: u16 = 1;
1234#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1235#[serde(deny_unknown_fields)]
1236pub struct ReplayableSourceConfiguration {
1237 pub source_incarnation: U64,
1238 pub source_identity_digest: Digest,
1239 pub provider: SourceProvider,
1240 pub decoder: SourceDecoder,
1241 pub partitions: Vec<SourcePartitionConfiguration>,
1242 pub guarantees: SourceReplayGuarantees,
1243}
1244
1245pub const LODESTONE_API_SOURCE_PARTITION_STATUS_FORMAT_VERSION: u16 = 1;
1246#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1247#[serde(deny_unknown_fields)]
1248pub struct SourcePartitionStatus {
1249 pub partition_id: u32,
1250 pub partition_incarnation: U64,
1251 pub indexed_next_ordinal: U64,
1252 #[serde(default, skip_serializing_if = "Option::is_none")]
1253 pub provider_high_watermark_next_ordinal: Option<U64>,
1254 #[serde(default, skip_serializing_if = "Option::is_none")]
1255 pub retention_floor_next_ordinal: Option<U64>,
1256 #[serde(default, skip_serializing_if = "Option::is_none")]
1257 pub lag_records: Option<U64>,
1258}
1259
1260pub const LODESTONE_API_REPLAYABLE_SOURCE_STATUS_FORMAT_VERSION: u16 = 1;
1261#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1262#[serde(deny_unknown_fields)]
1263pub struct ReplayableSourceStatus {
1264 pub index: Resource,
1265 pub provider: SourceProvider,
1266 pub decoder: SourceDecoder,
1267 pub source_incarnation: U64,
1268 pub source_identity_digest: Digest,
1269 pub lifecycle: String,
1270 pub lifecycle_generation: U64,
1271 #[serde(default, skip_serializing_if = "Option::is_none")]
1272 pub pause_reason: Option<String>,
1273 #[serde(default, skip_serializing_if = "Option::is_none")]
1274 pub rebuild_reason: Option<String>,
1275 pub retry_state: String,
1276 pub retention_risk: String,
1277 #[serde(default, skip_serializing_if = "Option::is_none")]
1278 pub last_batch_identity: Option<Identity>,
1279 pub partitions: Vec<SourcePartitionStatus>,
1280}
1281
1282pub const LODESTONE_API_SOURCE_CONTROL_TRANSITION_FORMAT_VERSION: u16 = 1;
1283#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1284#[serde(rename_all = "snake_case")]
1285pub enum SourceControlTransition {
1286 Pause,
1287 Resume,
1288 RequireRebuild,
1289}
1290
1291pub const LODESTONE_API_HISTORY_LEDGER_PRECONDITION_FORMAT_VERSION: u16 = 1;
1292#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1293#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1294pub enum HistoryLedgerPrecondition {
1295 Absent,
1296 Exact { revision: U64 },
1297}
1298
1299pub const LODESTONE_API_HISTORY_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1300#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1301#[serde(deny_unknown_fields)]
1302pub struct HistoryRetentionPolicy {
1303 pub keep_for_millis: U64,
1304 pub capture_interval_millis: U64,
1305 pub maximum_cuts: u32,
1306 pub privacy_overlay_identity_limit: u32,
1307}
1308
1309pub const LODESTONE_API_HISTORY_SELECTOR_FORMAT_VERSION: u16 = 1;
1310#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1311#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1312pub enum HistorySelector {
1313 ExactCut { cut_id: Identity },
1314 AtOrBeforeCommitTime { unix_millis: U64 },
1315}
1316
1317pub const LODESTONE_API_HISTORY_HOLD_FORMAT_VERSION: u16 = 1;
1318#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1319#[serde(deny_unknown_fields)]
1320pub struct HistoryHold {
1321 pub hold_id: Identity,
1322 pub cut_ids: Vec<Identity>,
1323}
1324
1325pub const LODESTONE_API_HISTORY_STATUS_FORMAT_VERSION: u16 = 1;
1326#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1327#[serde(deny_unknown_fields)]
1328pub struct HistoryStatus {
1329 pub index: Resource,
1330 pub revision: U64,
1331 pub policy: HistoryRetentionPolicy,
1332 pub page_count: u32,
1333 pub cut_count: u32,
1334 pub holds: Vec<HistoryHold>,
1335}
1336
1337pub const LODESTONE_API_HISTORY_RESOLUTION_FORMAT_VERSION: u16 = 1;
1338#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1339#[serde(deny_unknown_fields)]
1340pub struct HistoryResolution {
1341 pub index: Resource,
1342 pub selector: HistorySelector,
1343 pub cut_id: Identity,
1344 pub committed_at_unix_millis: U64,
1345 pub uncertainty_millis: U64,
1346 pub shard_count: u32,
1347 pub security_policy_revision: U64,
1348}
1349
1350pub const LODESTONE_API_INDEX_REFERENCE_FORMAT_VERSION: u16 = 1;
1351#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1352#[serde(deny_unknown_fields)]
1353pub struct IndexReference {
1354 pub name: String,
1355 pub incarnation: Identity,
1356}
1357
1358pub const LODESTONE_API_ALIAS_TARGET_FORMAT_VERSION: u16 = 1;
1359#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1360#[serde(deny_unknown_fields)]
1361pub struct AliasTarget {
1362 pub index: IndexReference,
1363 pub write_index: bool,
1364}
1365
1366pub const LODESTONE_API_ALIAS_SUMMARY_FORMAT_VERSION: u16 = 1;
1367#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1368#[serde(deny_unknown_fields)]
1369pub struct AliasSummary {
1370 pub name: String,
1371 pub revision: U64,
1372 pub visible_target_count: u32,
1373}
1374
1375pub const LODESTONE_API_ALIAS_DETAIL_FORMAT_VERSION: u16 = 1;
1376#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1377#[serde(deny_unknown_fields)]
1378pub struct AliasDetail {
1379 pub summary: AliasSummary,
1380 pub visible_targets: Vec<AliasTarget>,
1381 #[serde(default, skip_serializing_if = "Option::is_none")]
1382 pub filter: Option<RawJson>,
1383 #[serde(default, skip_serializing_if = "Option::is_none")]
1384 pub index_routing: Option<String>,
1385 #[serde(default, skip_serializing_if = "Option::is_none")]
1386 pub search_routing: Option<String>,
1387}
1388
1389pub const LODESTONE_API_DATA_STREAM_SUMMARY_FORMAT_VERSION: u16 = 1;
1390#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1391#[serde(deny_unknown_fields)]
1392pub struct DataStreamSummary {
1393 pub name: String,
1394 pub incarnation: Identity,
1395 pub revision: U64,
1396 pub generation: U64,
1397 pub state: String,
1398 pub visible_backing_count: u32,
1399}
1400
1401pub const LODESTONE_API_COMPONENT_TEMPLATE_BINDING_FORMAT_VERSION: u16 = 1;
1402#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1403#[serde(deny_unknown_fields)]
1404pub struct ComponentTemplateBinding {
1405 pub name: String,
1406 pub incarnation: Identity,
1407 pub revision: U64,
1408}
1409
1410pub const LODESTONE_API_INDEX_TEMPLATE_BINDING_FORMAT_VERSION: u16 = 1;
1411#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1412#[serde(deny_unknown_fields)]
1413pub struct IndexTemplateBinding {
1414 pub name: String,
1415 pub incarnation: Identity,
1416 pub revision: U64,
1417}
1418
1419pub const LODESTONE_API_LIFECYCLE_POLICY_BINDING_FORMAT_VERSION: u16 = 1;
1420#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1421#[serde(deny_unknown_fields)]
1422pub struct LifecyclePolicyBinding {
1423 pub name: String,
1424 pub incarnation: Identity,
1425 pub revision: U64,
1426}
1427
1428pub const LODESTONE_API_DATA_STREAM_DETAIL_FORMAT_VERSION: u16 = 1;
1429#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1430#[serde(deny_unknown_fields)]
1431pub struct DataStreamDetail {
1432 pub summary: DataStreamSummary,
1433 pub visible_backing_indices: Vec<IndexReference>,
1434 #[serde(default, skip_serializing_if = "Option::is_none")]
1435 pub write_index: Option<IndexReference>,
1436 pub timestamp_field: String,
1437 pub index_template: IndexTemplateBinding,
1438 #[serde(default, skip_serializing_if = "Option::is_none")]
1439 pub lifecycle_policy: Option<LifecyclePolicyBinding>,
1440}
1441
1442pub const LODESTONE_API_COMPONENT_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1443#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1444#[serde(deny_unknown_fields)]
1445pub struct ComponentTemplateSummary {
1446 pub name: String,
1447 pub incarnation: Identity,
1448 pub revision: U64,
1449}
1450
1451pub const LODESTONE_API_COMPONENT_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1452#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1453#[serde(deny_unknown_fields)]
1454pub struct ComponentTemplateDetail {
1455 pub summary: ComponentTemplateSummary,
1456 pub mapping: Mapping,
1457 pub settings: RawJson,
1458 #[serde(default, skip_serializing_if = "Option::is_none")]
1459 pub resource_spec: Option<IndexResourceSpec>,
1460}
1461
1462pub const LODESTONE_API_INDEX_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1463#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1464#[serde(deny_unknown_fields)]
1465pub struct IndexTemplateSummary {
1466 pub name: String,
1467 pub incarnation: Identity,
1468 pub revision: U64,
1469 pub priority: i32,
1470 pub data_stream: bool,
1471}
1472
1473pub const LODESTONE_API_INDEX_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1474#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1475#[serde(deny_unknown_fields)]
1476pub struct IndexTemplateDetail {
1477 pub summary: IndexTemplateSummary,
1478 pub index_patterns: Vec<String>,
1479 pub components: Vec<ComponentTemplateBinding>,
1480 pub mapping: Mapping,
1481 pub settings: RawJson,
1482 #[serde(default, skip_serializing_if = "Option::is_none")]
1483 pub resource_spec: Option<IndexResourceSpec>,
1484}
1485
1486pub const LODESTONE_API_INGEST_PIPELINE_SUMMARY_FORMAT_VERSION: u16 = 1;
1487#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1488#[serde(deny_unknown_fields)]
1489pub struct IngestPipelineSummary {
1490 pub name: String,
1491 pub incarnation: Identity,
1492 pub revision: U64,
1493 pub digest: Digest,
1494}
1495
1496pub const LODESTONE_API_INGEST_PIPELINE_DETAIL_FORMAT_VERSION: u16 = 1;
1497#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1498#[serde(deny_unknown_fields)]
1499pub struct IngestPipelineDetail {
1500 pub summary: IngestPipelineSummary,
1501 pub definition: RawJson,
1502}
1503
1504pub const LODESTONE_API_INGEST_PIPELINE_SELECTION_FORMAT_VERSION: u16 = 1;
1505#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1506#[serde(deny_unknown_fields)]
1507pub struct IngestPipelineSelection {
1508 pub name: String,
1509 pub expected: ExpectedBinding,
1510}
1511
1512pub const LODESTONE_API_LIFECYCLE_POLICY_SUMMARY_FORMAT_VERSION: u16 = 1;
1513#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1514#[serde(deny_unknown_fields)]
1515pub struct LifecyclePolicySummary {
1516 pub name: String,
1517 pub incarnation: Identity,
1518 pub revision: U64,
1519}
1520
1521pub const LODESTONE_API_ROLLOVER_THRESHOLDS_FORMAT_VERSION: u16 = 1;
1522#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1523#[serde(deny_unknown_fields)]
1524pub struct RolloverThresholds {
1525 #[serde(default, skip_serializing_if = "Option::is_none")]
1526 pub max_primary_docs: Option<U64>,
1527 #[serde(default, skip_serializing_if = "Option::is_none")]
1528 pub max_primary_bytes: Option<U64>,
1529 #[serde(default, skip_serializing_if = "Option::is_none")]
1530 pub max_age_millis: Option<U64>,
1531}
1532
1533pub const LODESTONE_API_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1534#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1535#[serde(deny_unknown_fields)]
1536pub struct RetentionPolicy {
1537 #[serde(default, skip_serializing_if = "Option::is_none")]
1538 pub document_max_age_millis: Option<U64>,
1539 #[serde(default, skip_serializing_if = "Option::is_none")]
1540 pub backing_index_max_age_millis: Option<U64>,
1541}
1542
1543pub const LODESTONE_API_LIFECYCLE_POLICY_DETAIL_FORMAT_VERSION: u16 = 1;
1544#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1545#[serde(deny_unknown_fields)]
1546pub struct LifecyclePolicyDetail {
1547 pub summary: LifecyclePolicySummary,
1548 pub rollover: RolloverThresholds,
1549 pub retention: RetentionPolicy,
1550 pub merge_hint: bool,
1551 pub freeze_hint: bool,
1552 pub delete_expired: bool,
1553}
1554
1555pub const LODESTONE_API_TEXT_QUERY_OPERATOR_FORMAT_VERSION: u16 = 1;
1556#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1557#[serde(rename_all = "snake_case")]
1558pub enum TextQueryOperator {
1559 Or,
1560 And,
1561}
1562
1563pub const LODESTONE_API_TEXT_QUERY_ANALYZER_FORMAT_VERSION: u16 = 1;
1564#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1565#[serde(rename_all = "snake_case")]
1566pub enum TextQueryAnalyzer {
1567 Mapping,
1568 Standard,
1569 Simple,
1570 Whitespace,
1571 Keyword,
1572}
1573
1574pub const LODESTONE_API_ZERO_TERMS_QUERY_FORMAT_VERSION: u16 = 1;
1575#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1576#[serde(rename_all = "snake_case")]
1577pub enum ZeroTermsQuery {
1578 None,
1579 All,
1580}
1581
1582pub const LODESTONE_API_TEXT_QUERY_OPTIONS_FORMAT_VERSION: u16 = 1;
1583#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1584#[serde(deny_unknown_fields)]
1585pub struct TextQueryOptions {
1586 pub operator: TextQueryOperator,
1587 #[serde(default, skip_serializing_if = "Option::is_none")]
1588 pub minimum_should_match: Option<u32>,
1589 pub analyzer: TextQueryAnalyzer,
1590 pub zero_terms_query: ZeroTermsQuery,
1591}
1592
1593pub const LODESTONE_API_MULTI_MATCH_MODE_FORMAT_VERSION: u16 = 1;
1594#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1595#[serde(rename_all = "snake_case")]
1596pub enum MultiMatchMode {
1597 BestFields,
1598 MostFields,
1599 Phrase,
1600 PhrasePrefix,
1601 CrossFields,
1602}
1603
1604pub const LODESTONE_API_MULTI_MATCH_FIELD_FORMAT_VERSION: u16 = 1;
1605#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1606#[serde(deny_unknown_fields)]
1607pub struct MultiMatchField {
1608 pub field: String,
1609 pub boost: ApproximateNumber,
1610}
1611
1612pub const LODESTONE_API_MULTI_MATCH_OPTIONS_FORMAT_VERSION: u16 = 1;
1613#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1614#[serde(deny_unknown_fields)]
1615pub struct MultiMatchOptions {
1616 pub mode: MultiMatchMode,
1617 pub operator: TextQueryOperator,
1618 #[serde(default, skip_serializing_if = "Option::is_none")]
1619 pub minimum_should_match: Option<u32>,
1620 pub analyzer: TextQueryAnalyzer,
1621 pub zero_terms_query: ZeroTermsQuery,
1622 pub slop: u32,
1623}
1624
1625pub const LODESTONE_API_SORT_ORDER_FORMAT_VERSION: u16 = 1;
1626#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1627#[serde(rename_all = "snake_case")]
1628pub enum SortOrder {
1629 Asc,
1630 Desc,
1631}
1632
1633pub const LODESTONE_API_SORT_MODE_FORMAT_VERSION: u16 = 1;
1634#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1635#[serde(rename_all = "snake_case")]
1636pub enum SortMode {
1637 Auto,
1638 Min,
1639 Max,
1640}
1641
1642pub const LODESTONE_API_MISSING_ORDER_FORMAT_VERSION: u16 = 1;
1643#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1644#[serde(rename_all = "snake_case")]
1645pub enum MissingOrder {
1646 First,
1647 Last,
1648}
1649
1650pub const LODESTONE_API_NESTED_SCORE_MODE_FORMAT_VERSION: u16 = 1;
1651#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1652#[serde(rename_all = "snake_case")]
1653pub enum NestedScoreMode {
1654 Avg,
1655 Max,
1656 Min,
1657 None,
1658 Sum,
1659}
1660
1661pub const LODESTONE_API_NESTED_INNER_HITS_FORMAT_VERSION: u16 = 1;
1662#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1663#[serde(deny_unknown_fields)]
1664pub struct NestedInnerHits {
1665 #[serde(default, skip_serializing_if = "Option::is_none")]
1666 pub name: Option<String>,
1667 pub from: u32,
1668 pub size: u32,
1669 pub sort: Vec<SortSpec>,
1670}
1671
1672pub const LODESTONE_API_SORT_SPEC_FORMAT_VERSION: u16 = 1;
1673#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1674#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1675pub enum SortSpec {
1676 Score {
1677 order: SortOrder,
1678 },
1679 Field {
1680 field: String,
1681 order: SortOrder,
1682 #[serde(default, skip_serializing_if = "Option::is_none")]
1683 missing: Option<MissingOrder>,
1684 mode: SortMode,
1685 },
1686 NestedField {
1687 path: String,
1688 field: String,
1689 #[serde(default, skip_serializing_if = "Option::is_none")]
1690 filter: Option<Box<Query>>,
1691 order: SortOrder,
1692 #[serde(default, skip_serializing_if = "Option::is_none")]
1693 missing: Option<MissingOrder>,
1694 mode: SortMode,
1695 },
1696}
1697
1698pub const LODESTONE_API_QUERY_FORMAT_VERSION: u16 = 1;
1699#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1700#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1701pub enum Query {
1702 MatchAll,
1703 Term {
1704 field: String,
1705 value: JsonValue,
1706 },
1707 Terms {
1708 field: String,
1709 values: Vec<JsonValue>,
1710 },
1711 Range {
1712 field: String,
1713 #[serde(default, skip_serializing_if = "Option::is_none")]
1714 lower: Option<JsonValue>,
1715 #[serde(default, skip_serializing_if = "Option::is_none")]
1716 upper: Option<JsonValue>,
1717 include_lower: bool,
1718 include_upper: bool,
1719 },
1720 Text {
1721 field: String,
1722 text: String,
1723 #[serde(default, skip_serializing_if = "Option::is_none")]
1724 options: Option<TextQueryOptions>,
1725 },
1726 MultiMatch {
1727 fields: Vec<MultiMatchField>,
1728 text: String,
1729 #[serde(default, skip_serializing_if = "Option::is_none")]
1730 options: Option<MultiMatchOptions>,
1731 },
1732 Exists {
1733 field: String,
1734 },
1735 Prefix {
1736 field: String,
1737 prefix: String,
1738 #[serde(default, skip_serializing_if = "Option::is_none")]
1739 analyzer: Option<TextQueryAnalyzer>,
1740 analyze_wildcard: bool,
1741 },
1742 Fuzzy {
1743 field: String,
1744 value: String,
1745 distance: u32,
1746 #[serde(default, skip_serializing_if = "Option::is_none")]
1747 analyzer: Option<TextQueryAnalyzer>,
1748 },
1749 Boost {
1750 query: Box<Query>,
1751 boost: ApproximateNumber,
1752 },
1753 Bool {
1754 must: Vec<Query>,
1755 filter: Vec<Query>,
1756 should: Vec<Query>,
1757 must_not: Vec<Query>,
1758 minimum_should_match: u32,
1759 },
1760 Nested {
1761 path: String,
1762 query: Box<Query>,
1763 score_mode: NestedScoreMode,
1764 ignore_unmapped: bool,
1765 #[serde(default, skip_serializing_if = "Option::is_none")]
1766 inner_hits: Option<NestedInnerHits>,
1767 },
1768}
1769
1770pub const LODESTONE_API_DENSE_RETRIEVAL_MODE_FORMAT_VERSION: u16 = 1;
1771#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1772#[serde(rename_all = "snake_case")]
1773pub enum DenseRetrievalMode {
1774 Auto,
1775 Ann,
1776 Exact,
1777}
1778
1779pub const LODESTONE_API_VECTOR_ACHIEVED_MODE_FORMAT_VERSION: u16 = 1;
1780#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1781#[serde(rename_all = "snake_case")]
1782pub enum VectorAchievedMode {
1783 Exact,
1784 Ann,
1785 Mixed,
1786}
1787
1788pub const LODESTONE_API_VECTOR_BRANCH_DIAGNOSTICS_FORMAT_VERSION: u16 = 2;
1789#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1790#[serde(deny_unknown_fields)]
1791pub struct VectorBranchDiagnostics {
1792 pub name: String,
1793 pub requested_mode: DenseRetrievalMode,
1794 pub achieved_mode: VectorAchievedMode,
1795 pub result_count: U64,
1796 pub exact_segments: U64,
1797 pub ann_segments: U64,
1798 pub exact_fallback_segments: U64,
1799 pub distance_evaluations: U64,
1800 pub peak_scratch_bytes: U64,
1801 pub fresh_vectors_scanned: U64,
1802 pub realtime_overlay_queries: U64,
1803 pub realtime_overlay_candidates: U64,
1804 pub bundle_roots: U64,
1805 pub object_read_requests: U64,
1806 pub object_bytes_read: U64,
1807 pub cache_hits: U64,
1808 pub cache_misses: U64,
1809 pub snapshot_digests: Vec<Digest>,
1810}
1811
1812pub const LODESTONE_API_DENSE_VECTOR_ELEMENT_TYPE_FORMAT_VERSION: u16 = 1;
1813#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1814#[serde(rename_all = "snake_case")]
1815pub enum DenseVectorElementType {
1816 F32,
1817 F16,
1818 I8,
1819}
1820
1821pub const LODESTONE_API_DENSE_VECTOR_BYTE_ORDER_FORMAT_VERSION: u16 = 1;
1822#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1823#[serde(rename_all = "snake_case")]
1824pub enum DenseVectorByteOrder {
1825 LittleEndian,
1826}
1827
1828pub const LODESTONE_API_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
1829#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1830#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1831pub enum VectorValue {
1832 Numeric {
1833 values: Vec<ApproximateNumber>,
1834 },
1835 Binary {
1836 element_type: DenseVectorElementType,
1837 byte_order: DenseVectorByteOrder,
1838 data_base64: String,
1839 #[serde(default, skip_serializing_if = "Option::is_none")]
1840 quantization_scale: Option<ApproximateNumber>,
1841 },
1842}
1843
1844pub const LODESTONE_API_SPARSE_VECTOR_ENTRY_FORMAT_VERSION: u16 = 1;
1845#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1846#[serde(deny_unknown_fields)]
1847pub struct SparseVectorEntry {
1848 pub dimension: u32,
1849 pub weight: ApproximateNumber,
1850}
1851
1852pub const LODESTONE_API_SPARSE_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
1853#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1854#[serde(deny_unknown_fields)]
1855pub struct SparseVectorValue {
1856 pub entries: Vec<SparseVectorEntry>,
1857}
1858
1859pub const LODESTONE_API_VECTOR_SET_VALUE_FORMAT_VERSION: u16 = 1;
1860#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1861#[serde(deny_unknown_fields)]
1862pub struct VectorSetValue {
1863 pub vectors: Vec<VectorValue>,
1864}
1865
1866pub const LODESTONE_API_VECTOR_EVALUATION_SNAPSHOT_FORMAT_VERSION: u16 = 1;
1867#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1868#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1869pub enum VectorEvaluationSnapshot {
1870 CommittedCut { digest: Digest },
1871 Pit { pit: Cursor },
1872}
1873
1874pub const LODESTONE_API_VECTOR_EVALUATION_QUERY_SET_FORMAT_VERSION: u16 = 1;
1875#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1876#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1877pub enum VectorEvaluationQuerySet {
1878 Sample { seed: U64, sample_count: u32 },
1879 Supplied { digest: Digest, queries: Vec<VectorValue> },
1880}
1881
1882pub const LODESTONE_API_VECTOR_EVALUATION_BUDGET_FORMAT_VERSION: u16 = 1;
1883#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1884#[serde(deny_unknown_fields)]
1885pub struct VectorEvaluationBudget {
1886 pub maximum_distance_evaluations: U64,
1887 pub maximum_elapsed_work_units: U64,
1888 pub maximum_peak_memory_bytes: U64,
1889 pub maximum_object_reads: U64,
1890 pub maximum_object_bytes: U64,
1891 pub maximum_build_scratch_bytes: U64,
1892 pub maximum_profile_comparisons: u32,
1893}
1894
1895pub const LODESTONE_API_VECTOR_CANDIDATE_POLICY_FORMAT_VERSION: u16 = 1;
1896#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1897#[serde(rename_all = "snake_case")]
1898pub enum VectorCandidatePolicy {
1899 Balanced,
1900 HighRecall,
1901 MemoryEfficient,
1902}
1903
1904pub const LODESTONE_API_VECTOR_CALIBRATION_OBJECTIVE_FORMAT_VERSION: u16 = 1;
1905#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1906#[serde(rename_all = "snake_case")]
1907pub enum VectorCalibrationObjective {
1908 Balanced,
1909 HighRecall,
1910 MemoryEfficient,
1911}
1912
1913pub const LODESTONE_API_VECTOR_STRATEGY_PROFILE_FORMAT_VERSION: u16 = 1;
1914#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1915#[serde(rename_all = "snake_case")]
1916pub enum VectorStrategyProfile {
1917 BalancedV1,
1918 HighRecallV1,
1919 MemoryEfficientV1,
1920}
1921
1922pub const LODESTONE_API_VECTOR_EVALUATION_WORK_FORMAT_VERSION: u16 = 1;
1923#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1924#[serde(deny_unknown_fields)]
1925pub struct VectorEvaluationWork {
1926 pub distance_evaluations: U64,
1927 pub elapsed_work_units: U64,
1928 pub peak_memory_bytes: U64,
1929 pub object_reads: U64,
1930 pub object_bytes: U64,
1931}
1932
1933pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_CODE_FORMAT_VERSION: u16 = 1;
1934#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1935#[serde(rename_all = "snake_case")]
1936pub enum VectorEvaluationErrorCode {
1937 AnnRefused,
1938 ExhaustiveRefused,
1939 TimedOut,
1940 Cancelled,
1941 Internal,
1942}
1943
1944pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_FORMAT_VERSION: u16 = 1;
1945#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1946#[serde(deny_unknown_fields)]
1947pub struct VectorEvaluationError {
1948 pub sample_ordinal: u32,
1949 pub code: VectorEvaluationErrorCode,
1950}
1951
1952pub const LODESTONE_API_VECTOR_RECALL_RESULT_SHAPE_VERSION: u16 = 1;
1953pub const LODESTONE_API_VECTOR_RECALL_RESULT_FORMAT_VERSION: u16 = 1;
1954#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1955#[serde(deny_unknown_fields)]
1956pub struct VectorRecallResult {
1957 pub format_version: u32,
1958 pub index: Resource,
1959 pub field: String,
1960 pub mapping_generation: U64,
1961 pub snapshot_digest: Digest,
1962 pub query_set_digest: Digest,
1963 pub metric: VectorMetric,
1964 pub k: u32,
1965 pub candidate_policy: VectorCandidatePolicy,
1966 pub strategy_identity: String,
1967 pub completed_samples: u32,
1968 pub ann_result_count: U64,
1969 pub exhaustive_result_count: U64,
1970 pub mean_recall_basis_points: u32,
1971 pub minimum_recall_basis_points: u32,
1972 pub p05_recall_basis_points: u32,
1973 pub p50_recall_basis_points: u32,
1974 pub p90_recall_basis_points: u32,
1975 pub p99_recall_basis_points: u32,
1976 pub ann_work: VectorEvaluationWork,
1977 pub exhaustive_work: VectorEvaluationWork,
1978 pub errors: Vec<VectorEvaluationError>,
1979}
1980
1981pub const LODESTONE_API_VECTOR_CALIBRATION_CANDIDATE_FORMAT_VERSION: u16 = 1;
1982#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1983#[serde(deny_unknown_fields)]
1984pub struct VectorCalibrationCandidate {
1985 pub profile: VectorStrategyProfile,
1986 pub recall: VectorRecallResult,
1987 pub build_scratch_bytes: U64,
1988 pub resident_bytes: U64,
1989 pub evidence_digest: Digest,
1990}
1991
1992pub const LODESTONE_API_VECTOR_CALIBRATION_RESULT_SHAPE_VERSION: u16 = 1;
1993pub const LODESTONE_API_VECTOR_CALIBRATION_RESULT_FORMAT_VERSION: u16 = 1;
1994#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1995#[serde(deny_unknown_fields)]
1996pub struct VectorCalibrationResult {
1997 pub format_version: u32,
1998 pub objective: VectorCalibrationObjective,
1999 pub candidates: Vec<VectorCalibrationCandidate>,
2000 pub recommended_profile: VectorStrategyProfile,
2001 pub recommended_evidence_digest: Digest,
2002 pub requires_explicit_resource_revision_and_rebuild: bool,
2003}
2004
2005pub const LODESTONE_API_VECTOR_DIAGNOSTIC_RESULT_FORMAT_VERSION: u16 = 1;
2006#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2007#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2008pub enum VectorDiagnosticResult {
2009 Recall { result: Box<VectorRecallResult> },
2010 Calibration { result: Box<VectorCalibrationResult> },
2011}
2012
2013pub const LODESTONE_API_VECTOR_WARM_COMPONENT_FORMAT_VERSION: u16 = 1;
2014#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2015#[serde(rename_all = "snake_case")]
2016pub enum VectorWarmComponent {
2017 Directory,
2018 Approximate,
2019 Exact,
2020}
2021
2022pub const LODESTONE_API_VECTOR_WARM_STATE_FORMAT_VERSION: u16 = 1;
2023#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2024#[serde(rename_all = "snake_case")]
2025pub enum VectorWarmState {
2026 Warmed,
2027 Partial,
2028 Stale,
2029}
2030
2031pub const LODESTONE_API_VECTOR_WARM_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
2032#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2033#[serde(deny_unknown_fields)]
2034pub struct VectorWarmAchievement {
2035 pub component: VectorWarmComponent,
2036 pub cache_identity: Digest,
2037 pub resident_bytes: U64,
2038}
2039
2040pub const LODESTONE_API_VECTOR_WARM_RESULT_SHAPE_VERSION: u16 = 1;
2041pub const LODESTONE_API_VECTOR_WARM_RESULT_FORMAT_VERSION: u16 = 1;
2042#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2043#[serde(deny_unknown_fields)]
2044pub struct VectorWarmResult {
2045 pub format_version: u32,
2046 pub operation_identity: Digest,
2047 pub index: Resource,
2048 pub root_digest: Digest,
2049 pub state: VectorWarmState,
2050 pub progress: ExactDecimal,
2051 pub achieved: Vec<VectorWarmAchievement>,
2052 pub object_requests: U64,
2053 pub object_bytes: U64,
2054 pub cache_hits: U64,
2055 pub cache_misses: U64,
2056 pub started_at: U64,
2057 pub completed_at: U64,
2058 pub expires_at: U64,
2059 #[serde(default, skip_serializing_if = "Option::is_none")]
2060 pub residency_intent: Option<VectorResidencyIntent>,
2061}
2062
2063pub const LODESTONE_API_DENSE_RETRIEVAL_THRESHOLD_FORMAT_VERSION: u16 = 1;
2064#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2065#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2066pub enum DenseRetrievalThreshold {
2067 MinimumScore { value: ApproximateNumber },
2068 MaximumDistance { value: ApproximateNumber },
2069}
2070
2071pub const LODESTONE_API_RETRIEVAL_BRANCH_FORMAT_VERSION: u16 = 3;
2072#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2073#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2074pub enum RetrievalBranch {
2075 Lexical {
2076 name: String,
2077 query: Box<Query>,
2078 #[serde(default, skip_serializing_if = "Option::is_none")]
2079 filter: Option<Box<Query>>,
2080 window: u32,
2081 weight: ApproximateNumber,
2082 },
2083 Dense {
2084 name: String,
2085 field: String,
2086 query_vector: VectorValue,
2087 #[serde(default, skip_serializing_if = "Option::is_none")]
2088 filter: Option<Box<Query>>,
2089 window: u32,
2090 #[serde(default, skip_serializing_if = "Option::is_none")]
2091 candidates: Option<u32>,
2092 weight: ApproximateNumber,
2093 mode: DenseRetrievalMode,
2094 #[serde(default, skip_serializing_if = "Option::is_none")]
2095 threshold: Option<DenseRetrievalThreshold>,
2096 },
2097 Sparse {
2098 name: String,
2099 field: String,
2100 query_vector: SparseVectorValue,
2101 #[serde(default, skip_serializing_if = "Option::is_none")]
2102 filter: Option<Box<Query>>,
2103 window: u32,
2104 weight: ApproximateNumber,
2105 },
2106 LateInteraction {
2107 name: String,
2108 field: String,
2109 query_vectors: VectorSetValue,
2110 #[serde(default, skip_serializing_if = "Option::is_none")]
2111 filter: Option<Box<Query>>,
2112 window: u32,
2113 candidates: u32,
2114 weight: ApproximateNumber,
2115 },
2116}
2117
2118pub const LODESTONE_API_WEIGHTED_RRF_FUSION_FORMAT_VERSION: u16 = 1;
2119#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2120#[serde(deny_unknown_fields)]
2121pub struct WeightedRrfFusion {
2122 pub rank_constant: u32,
2123}
2124
2125pub const LODESTONE_API_RETRIEVAL_PLAN_SHAPE_VERSION: u16 = 1;
2126pub const LODESTONE_API_RETRIEVAL_PLAN_FORMAT_VERSION: u16 = 1;
2127#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2128#[serde(deny_unknown_fields)]
2129pub struct RetrievalPlan {
2130 pub format_version: u32,
2131 #[serde(default, skip_serializing_if = "Option::is_none")]
2132 pub global_filter: Option<Box<Query>>,
2133 pub branches: Vec<RetrievalBranch>,
2134 pub fusion: WeightedRrfFusion,
2135 pub result_window: u32,
2136}
2137
2138pub const LODESTONE_API_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
2139#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2140#[serde(deny_unknown_fields)]
2141pub struct HistogramBounds {
2142 #[serde(default, skip_serializing_if = "Option::is_none")]
2143 pub min: Option<ApproximateNumber>,
2144 #[serde(default, skip_serializing_if = "Option::is_none")]
2145 pub max: Option<ApproximateNumber>,
2146}
2147
2148pub const LODESTONE_API_DATE_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
2149#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2150#[serde(deny_unknown_fields)]
2151pub struct DateHistogramBounds {
2152 #[serde(default, skip_serializing_if = "Option::is_none")]
2153 pub min: Option<I64>,
2154 #[serde(default, skip_serializing_if = "Option::is_none")]
2155 pub max: Option<I64>,
2156}
2157
2158pub const LODESTONE_API_APPROXIMATION_ALGORITHM_FORMAT_VERSION: u16 = 1;
2159#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2160#[serde(rename_all = "snake_case")]
2161pub enum ApproximationAlgorithm {
2162 HyperloglogV1,
2163 FloatPrefixHistogramV1,
2164}
2165
2166pub const LODESTONE_API_APPROXIMATION_FORMAT_VERSION: u16 = 1;
2167#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2168#[serde(deny_unknown_fields)]
2169pub struct Approximation {
2170 pub algorithm: ApproximationAlgorithm,
2171 pub algorithm_version: u32,
2172 pub precision: u32,
2173 pub state_bytes: U64,
2174 #[serde(default, skip_serializing_if = "Option::is_none")]
2175 pub relative_standard_error: Option<ApproximateNumber>,
2176 #[serde(default, skip_serializing_if = "Option::is_none")]
2177 pub maximum_rank_error: Option<ApproximateNumber>,
2178}
2179
2180pub const LODESTONE_API_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
2181#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2182#[serde(deny_unknown_fields)]
2183pub struct PercentileValue {
2184 pub percent: ApproximateNumber,
2185 #[serde(default, skip_serializing_if = "Option::is_none")]
2186 pub value: Option<ApproximateNumber>,
2187}
2188
2189pub const LODESTONE_API_APPROXIMATE_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
2190#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2191#[serde(deny_unknown_fields)]
2192pub struct ApproximatePercentileValue {
2193 pub percent: ApproximateNumber,
2194 pub value: ApproximateNumber,
2195 pub lower_bound: ApproximateNumber,
2196 pub upper_bound: ApproximateNumber,
2197 pub maximum_rank_error: ApproximateNumber,
2198}
2199
2200pub const LODESTONE_API_TIME_SERIES_OPERATOR_FORMAT_VERSION: u16 = 1;
2201#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2202#[serde(rename_all = "snake_case")]
2203pub enum TimeSeriesOperator {
2204 Raw,
2205 Sum,
2206 Count,
2207 Min,
2208 Max,
2209 Average,
2210 Delta,
2211 Increase,
2212 Rate,
2213 HistogramMerge,
2214 Quantiles,
2215}
2216
2217pub const LODESTONE_API_TIME_SERIES_MISSING_DATA_FORMAT_VERSION: u16 = 1;
2218#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2219#[serde(rename_all = "snake_case")]
2220pub enum TimeSeriesMissingData {
2221 Omit,
2222 ExplicitEmpty,
2223}
2224
2225pub const LODESTONE_API_TIME_SERIES_QUANTILE_MODE_FORMAT_VERSION: u16 = 1;
2226#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2227#[serde(rename_all = "snake_case")]
2228pub enum TimeSeriesQuantileMode {
2229 Exact,
2230 Approximate,
2231}
2232
2233pub const LODESTONE_API_TIME_SERIES_BUCKET_STATE_FORMAT_VERSION: u16 = 1;
2234#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2235#[serde(rename_all = "snake_case")]
2236pub enum TimeSeriesBucketState {
2237 Observed,
2238 ExplicitEmpty,
2239}
2240
2241pub const LODESTONE_API_TIME_SERIES_QUANTILE_VALUE_FORMAT_VERSION: u16 = 1;
2242#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2243#[serde(deny_unknown_fields)]
2244pub struct TimeSeriesQuantileValue {
2245 pub quantile: ApproximateNumber,
2246 #[serde(default, skip_serializing_if = "Option::is_none")]
2247 pub value: Option<MetricNumber>,
2248 #[serde(default, skip_serializing_if = "Option::is_none")]
2249 pub lower_bound: Option<MetricNumber>,
2250 #[serde(default, skip_serializing_if = "Option::is_none")]
2251 pub upper_bound: Option<MetricNumber>,
2252 #[serde(default, skip_serializing_if = "Option::is_none")]
2253 pub maximum_rank_error: Option<ApproximateNumber>,
2254}
2255
2256pub const LODESTONE_API_TIME_SERIES_VALUE_FORMAT_VERSION: u16 = 1;
2257#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2258#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2259pub enum TimeSeriesValue {
2260 Raw {
2261 values: Vec<MetricNumber>,
2262 },
2263 Number {
2264 value: MetricNumber,
2265 algorithm: String,
2266 },
2267 Count {
2268 value: U64,
2269 },
2270 ExplicitHistogram {
2271 count: U64,
2272 #[serde(default, skip_serializing_if = "Option::is_none")]
2273 sum: Option<MetricNumber>,
2274 bounds_f64_bits: Vec<U64>,
2275 bucket_counts: Vec<U64>,
2276 },
2277 ExponentialHistogram {
2278 count: U64,
2279 #[serde(default, skip_serializing_if = "Option::is_none")]
2280 sum: Option<MetricNumber>,
2281 scale: i32,
2282 zero_count: U64,
2283 positive: MetricExponentialBuckets,
2284 negative: MetricExponentialBuckets,
2285 },
2286 Quantiles {
2287 values: Vec<TimeSeriesQuantileValue>,
2288 exact: bool,
2289 algorithm: String,
2290 algorithm_version: u32,
2291 state_bytes: U64,
2292 },
2293}
2294
2295pub const LODESTONE_API_TIME_SERIES_BUCKET_FORMAT_VERSION: u16 = 1;
2296#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2297#[serde(deny_unknown_fields)]
2298pub struct TimeSeriesBucket {
2299 pub start_unix_nanos: U64,
2300 pub end_unix_nanos: U64,
2301 pub group: Vec<MetricAttribute>,
2302 pub state: TimeSeriesBucketState,
2303 pub reset: bool,
2304 #[serde(default, skip_serializing_if = "Option::is_none")]
2305 pub value: Option<TimeSeriesValue>,
2306 pub exemplars: Vec<MetricExemplar>,
2307}
2308
2309pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_DIRECTION_FORMAT_VERSION: u16 = 1;
2310#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2311#[serde(rename_all = "snake_case")]
2312pub enum RelationshipTraversalDirection {
2313 Inbound,
2314 Outbound,
2315 Both,
2316}
2317
2318pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_FILTER_FORMAT_VERSION: u16 = 1;
2319#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2320#[serde(deny_unknown_fields)]
2321pub struct RelationshipTraversalFilter {
2322 pub relationship_types: Vec<String>,
2323 pub assertion_classes: Vec<String>,
2324 pub provenance: Vec<String>,
2325 #[serde(default, skip_serializing_if = "Option::is_none")]
2326 pub valid_from_unix_nanos: Option<U64>,
2327 #[serde(default, skip_serializing_if = "Option::is_none")]
2328 pub valid_through_unix_nanos: Option<U64>,
2329}
2330
2331pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_BUDGET_FORMAT_VERSION: u16 = 1;
2332#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2333#[serde(deny_unknown_fields)]
2334pub struct RelationshipTraversalBudget {
2335 pub maximum_depth: u32,
2336 pub maximum_fan_out: u32,
2337 pub maximum_visited_entities: u32,
2338 pub maximum_visited_relationships: u32,
2339 pub maximum_returned_relationships: u32,
2340 pub maximum_memory_bytes: U64,
2341}
2342
2343pub const LODESTONE_API_TRAVERSED_RELATIONSHIP_FORMAT_VERSION: u16 = 1;
2344#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2345#[serde(deny_unknown_fields)]
2346pub struct TraversedRelationship {
2347 pub depth: u32,
2348 pub from: EntityRef,
2349 pub to: EntityRef,
2350 pub relationship: RelationshipRecord,
2351}
2352
2353pub const LODESTONE_API_PROFILE_QUERY_OPERATION_FORMAT_VERSION: u16 = 1;
2354#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2355#[serde(rename_all = "snake_case")]
2356pub enum ProfileQueryOperation {
2357 Flamegraph,
2358 TopStacks,
2359 TopFunctions,
2360 SampleTable,
2361}
2362
2363pub const LODESTONE_API_PROFILE_GROUP_BY_FORMAT_VERSION: u16 = 1;
2364#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2365#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2366pub enum ProfileGroupBy {
2367 ResourceAttribute { key: String },
2368 SampleLabel { key: String },
2369 BuildId,
2370 ModuleId,
2371}
2372
2373pub const LODESTONE_API_PROFILE_QUERY_FILTER_FORMAT_VERSION: u16 = 1;
2374#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2375#[serde(deny_unknown_fields)]
2376pub struct ProfileQueryFilter {
2377 pub profile_ids: Vec<String>,
2378 pub build_ids: Vec<String>,
2379 pub module_ids: Vec<String>,
2380 pub function_ids: Vec<String>,
2381 pub trace_ids: Vec<String>,
2382 pub span_ids: Vec<String>,
2383}
2384
2385pub const LODESTONE_API_PROFILE_QUERY_BUDGET_FORMAT_VERSION: u16 = 1;
2386#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2387#[serde(deny_unknown_fields)]
2388pub struct ProfileQueryBudget {
2389 pub maximum_batches: u32,
2390 pub maximum_samples: u32,
2391 pub maximum_results: u32,
2392 pub maximum_memory_bytes: U64,
2393}
2394
2395pub const LODESTONE_API_PROFILE_QUERY_ROW_FORMAT_VERSION: u16 = 1;
2396#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2397#[serde(deny_unknown_fields)]
2398pub struct ProfileQueryRow {
2399 pub key: String,
2400 pub stack: Vec<String>,
2401 pub value: MetricNumber,
2402 pub sample_count: U64,
2403}
2404
2405pub const LODESTONE_API_TEMPORAL_INPUT_FORMAT_VERSION: u16 = 1;
2406#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2407#[serde(deny_unknown_fields)]
2408pub struct TemporalInput {
2409 pub index: Resource,
2410 pub schema_generation: U64,
2411}
2412
2413pub const LODESTONE_API_TEMPORAL_PATTERN_FORMAT_VERSION: u16 = 1;
2414#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2415#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2416pub enum TemporalPattern {
2417 Event {
2418 node_id: String,
2419 query: Box<Query>,
2420 },
2421 Sequence {
2422 node_id: String,
2423 branches: Vec<TemporalPattern>,
2424 within_nanos: U64,
2425 },
2426 AllOf {
2427 node_id: String,
2428 branches: Vec<TemporalPattern>,
2429 within_nanos: U64,
2430 },
2431 AnyOf {
2432 node_id: String,
2433 branches: Vec<TemporalPattern>,
2434 },
2435 Count {
2436 node_id: String,
2437 pattern: Box<TemporalPattern>,
2438 minimum: u32,
2439 within_nanos: U64,
2440 },
2441 Repetition {
2442 node_id: String,
2443 pattern: Box<TemporalPattern>,
2444 count: u32,
2445 within_nanos: U64,
2446 },
2447 NotFollowedBy {
2448 node_id: String,
2449 anchor: Box<TemporalPattern>,
2450 forbidden: Box<TemporalPattern>,
2451 within_nanos: U64,
2452 },
2453}
2454
2455pub const LODESTONE_API_HISTORICAL_TEMPORAL_DEFINITION_SHAPE_VERSION: u16 = 1;
2456pub const LODESTONE_API_HISTORICAL_TEMPORAL_DEFINITION_FORMAT_VERSION: u16 = 1;
2457#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2458#[serde(deny_unknown_fields)]
2459pub struct HistoricalTemporalDefinition {
2460 pub format_version: u32,
2461 pub pattern_generation: U64,
2462 pub inputs: Vec<TemporalInput>,
2463 pub event_time_field: String,
2464 pub correlation_fields: Vec<String>,
2465 pub pattern: TemporalPattern,
2466 pub watermark_unix_nanos: U64,
2467 pub maximum_events: u32,
2468 pub maximum_states: u32,
2469 pub maximum_captured_events: u32,
2470 pub maximum_results: u32,
2471 pub maximum_state_bytes: U64,
2472}
2473
2474pub const LODESTONE_API_TEMPORAL_EVIDENCE_STATUS_FORMAT_VERSION: u16 = 2;
2475#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2476#[serde(rename_all = "snake_case")]
2477pub enum TemporalEvidenceStatus {
2478 Provisional,
2479 Final,
2480 Correction,
2481 Retraction,
2482}
2483
2484pub const LODESTONE_API_TEMPORAL_SOURCE_EVENT_FORMAT_VERSION: u16 = 1;
2485#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2486#[serde(deny_unknown_fields)]
2487pub struct TemporalSourceEvent {
2488 pub index: Resource,
2489 pub shard_id: u32,
2490 pub recovery_era: Identity,
2491 pub sequence: U64,
2492 pub document_id: String,
2493}
2494
2495pub const LODESTONE_API_TEMPORAL_EVIDENCE_FORMAT_VERSION: u16 = 2;
2496#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2497#[serde(deny_unknown_fields)]
2498pub struct TemporalEvidence {
2499 pub evidence_id: Digest,
2500 pub pattern_generation: U64,
2501 pub pattern_digest: Digest,
2502 pub correlation_key: Vec<JsonValue>,
2503 pub matched_node_id: String,
2504 pub interval_start_unix_nanos: U64,
2505 pub interval_end_unix_nanos: U64,
2506 pub watermark_unix_nanos: U64,
2507 pub source_events: Vec<TemporalSourceEvent>,
2508 pub input_cut_digest: Digest,
2509 pub status: TemporalEvidenceStatus,
2510 #[serde(default, skip_serializing_if = "Option::is_none")]
2511 pub predecessor_evidence_id: Option<Digest>,
2512}
2513
2514pub const LODESTONE_API_CONTINUOUS_TEMPORAL_START_FORMAT_VERSION: u16 = 1;
2515#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2516#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2517pub enum ContinuousTemporalStart {
2518 FromCurrentHeads,
2519 HistoricalThenFollow { pit: Cursor },
2520}
2521
2522pub const LODESTONE_API_CONTINUOUS_TEMPORAL_WATERMARK_POLICY_FORMAT_VERSION: u16 = 1;
2523#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2524#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2525pub enum ContinuousTemporalWatermarkPolicy {
2526 MaximumObservedMinusOutOfOrder {
2527 allowed_out_of_orderness_nanos: U64,
2528 },
2529 MappingBoundEvent {
2530 allowed_out_of_orderness_nanos: U64,
2531 predicate: Box<Query>,
2532 timestamp_field: String,
2533 },
2534}
2535
2536pub const LODESTONE_API_CONTINUOUS_TEMPORAL_LATE_DATA_POLICY_FORMAT_VERSION: u16 = 1;
2537#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2538#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2539pub enum ContinuousTemporalLateDataPolicy {
2540 RecomputeWithinHorizon { correction_horizon_nanos: U64 },
2541 PauseWithGap,
2542}
2543
2544pub const LODESTONE_API_CONTINUOUS_TEMPORAL_OUTPUT_FORMAT_VERSION: u16 = 1;
2545#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2546#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2547pub enum ContinuousTemporalOutput {
2548 InternalResults {
2549 maximum_retained_records: U64,
2550 maximum_retained_bytes: U64,
2551 maximum_retained_event_age_nanos: U64,
2552 },
2553 MaterializedIndex {
2554 index: Resource,
2555 schema_generation: U64,
2556 },
2557}
2558
2559pub const LODESTONE_API_CONTINUOUS_TEMPORAL_DEFINITION_SHAPE_VERSION: u16 = 1;
2560pub const LODESTONE_API_CONTINUOUS_TEMPORAL_DEFINITION_FORMAT_VERSION: u16 = 1;
2561#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2562#[serde(deny_unknown_fields)]
2563pub struct ContinuousTemporalDefinition {
2564 pub format_version: u32,
2565 pub evaluation_id: Identity,
2566 pub pattern_generation: U64,
2567 pub inputs: Vec<TemporalInput>,
2568 pub event_time_field: String,
2569 pub correlation_fields: Vec<String>,
2570 pub pattern: TemporalPattern,
2571 pub start: ContinuousTemporalStart,
2572 pub watermark_policy: ContinuousTemporalWatermarkPolicy,
2573 pub late_data_policy: ContinuousTemporalLateDataPolicy,
2574 pub maximum_events_per_step: u32,
2575 pub maximum_states: u32,
2576 pub maximum_captured_events: u32,
2577 pub maximum_results: u32,
2578 pub maximum_state_bytes: U64,
2579 pub maximum_lag_bytes: U64,
2580 pub maximum_lag_events: U64,
2581 pub maximum_lag_event_age_nanos: U64,
2582 pub output: ContinuousTemporalOutput,
2583}
2584
2585pub const LODESTONE_API_CONTINUOUS_TEMPORAL_FRONTIER_FORMAT_VERSION: u16 = 1;
2586#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2587#[serde(deny_unknown_fields)]
2588pub struct ContinuousTemporalFrontier {
2589 pub index: Resource,
2590 pub shard_id: u32,
2591 pub recovery_era: Identity,
2592 pub routing_revision: U64,
2593 pub registered_wal_frontier: U64,
2594 #[serde(default, skip_serializing_if = "Option::is_none")]
2595 pub watermark_unix_nanos: Option<U64>,
2596}
2597
2598pub const LODESTONE_API_CONTINUOUS_TEMPORAL_AVAILABLE_FRONTIER_FORMAT_VERSION: u16 = 1;
2599#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2600#[serde(deny_unknown_fields)]
2601pub struct ContinuousTemporalAvailableFrontier {
2602 pub index: Resource,
2603 pub shard_id: u32,
2604 pub sequence: U64,
2605}
2606
2607pub const LODESTONE_API_CONTINUOUS_TEMPORAL_GAP_REASON_FORMAT_VERSION: u16 = 1;
2608#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2609#[serde(rename_all = "snake_case")]
2610pub enum ContinuousTemporalGapReason {
2611 RetentionGap,
2612 LateDataGap,
2613 SchemaGap,
2614 RouteGap,
2615 OutputGap,
2616}
2617
2618pub const LODESTONE_API_CONTINUOUS_TEMPORAL_GAP_FORMAT_VERSION: u16 = 1;
2619#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2620#[serde(deny_unknown_fields)]
2621pub struct ContinuousTemporalGap {
2622 pub reason: ContinuousTemporalGapReason,
2623 pub last_complete_frontiers: Vec<ContinuousTemporalFrontier>,
2624 pub earliest_available_frontiers: Vec<ContinuousTemporalAvailableFrontier>,
2625}
2626
2627pub const LODESTONE_API_CONTINUOUS_TEMPORAL_EVALUATION_SHAPE_VERSION: u16 = 1;
2628pub const LODESTONE_API_CONTINUOUS_TEMPORAL_EVALUATION_FORMAT_VERSION: u16 = 1;
2629#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2630#[serde(deny_unknown_fields)]
2631pub struct ContinuousTemporalEvaluation {
2632 pub format_version: u32,
2633 pub evaluation_id: Identity,
2634 pub generation: U64,
2635 pub revision: U64,
2636 pub definition_digest: Digest,
2637 pub definition: ContinuousTemporalDefinition,
2638 pub lifecycle: String,
2639 pub frontiers: Vec<ContinuousTemporalFrontier>,
2640 #[serde(default, skip_serializing_if = "Option::is_none")]
2641 pub global_watermark_unix_nanos: Option<U64>,
2642 pub state_bytes: U64,
2643 pub active_states: U64,
2644 pub active_timers: U64,
2645 pub retained_results: U64,
2646 pub pending_emissions: U64,
2647 #[serde(default, skip_serializing_if = "Option::is_none")]
2648 pub last_materialized_frontier_digest: Option<Digest>,
2649 pub retry_count: u32,
2650 #[serde(default, skip_serializing_if = "Option::is_none")]
2651 pub gap: Option<ContinuousTemporalGap>,
2652}
2653
2654pub const LODESTONE_API_COMPOSITE_ORDER_FORMAT_VERSION: u16 = 1;
2655#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2656#[serde(rename_all = "snake_case")]
2657pub enum CompositeOrder {
2658 Asc,
2659 Desc,
2660}
2661
2662pub const LODESTONE_API_COMPOSITE_SOURCE_FORMAT_VERSION: u16 = 1;
2663#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2664#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2665pub enum CompositeSource {
2666 Terms {
2667 name: String,
2668 field: String,
2669 order: CompositeOrder,
2670 },
2671 DateHistogram {
2672 name: String,
2673 field: String,
2674 #[serde(default, skip_serializing_if = "Option::is_none")]
2675 fixed_interval_millis: Option<U64>,
2676 #[serde(default, skip_serializing_if = "Option::is_none")]
2677 calendar_interval: Option<String>,
2678 #[serde(default, skip_serializing_if = "Option::is_none")]
2679 time_zone: Option<String>,
2680 offset_millis: I64,
2681 order: CompositeOrder,
2682 },
2683}
2684
2685pub const LODESTONE_API_AGGREGATION_FORMAT_VERSION: u16 = 3;
2686#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2687#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2688pub enum Aggregation {
2689 Terms {
2690 name: String,
2691 field: String,
2692 size: u32,
2693 sub_aggregations: Vec<Aggregation>,
2694 },
2695 Histogram {
2696 name: String,
2697 field: String,
2698 interval: ApproximateNumber,
2699 min_doc_count: U64,
2700 #[serde(default, skip_serializing_if = "Option::is_none")]
2701 extended_bounds: Option<HistogramBounds>,
2702 #[serde(default, skip_serializing_if = "Option::is_none")]
2703 hard_bounds: Option<HistogramBounds>,
2704 offset: ApproximateNumber,
2705 #[serde(default, skip_serializing_if = "Option::is_none")]
2706 missing: Option<ApproximateNumber>,
2707 sub_aggregations: Vec<Aggregation>,
2708 },
2709 Cardinality {
2710 name: String,
2711 field: String,
2712 },
2713 Percentiles {
2714 name: String,
2715 field: String,
2716 percents: Vec<ApproximateNumber>,
2717 },
2718 ApproximateCardinality {
2719 name: String,
2720 field: String,
2721 precision: u32,
2722 },
2723 ApproximatePercentiles {
2724 name: String,
2725 field: String,
2726 percents: Vec<ApproximateNumber>,
2727 precision: u32,
2728 },
2729 Sum {
2730 name: String,
2731 field: String,
2732 },
2733 Avg {
2734 name: String,
2735 field: String,
2736 },
2737 Min {
2738 name: String,
2739 field: String,
2740 },
2741 Max {
2742 name: String,
2743 field: String,
2744 },
2745 Stats {
2746 name: String,
2747 field: String,
2748 },
2749 DateHistogram {
2750 name: String,
2751 field: String,
2752 #[serde(default, skip_serializing_if = "Option::is_none")]
2753 fixed_interval_millis: Option<U64>,
2754 #[serde(default, skip_serializing_if = "Option::is_none")]
2755 calendar_interval: Option<String>,
2756 #[serde(default, skip_serializing_if = "Option::is_none")]
2757 time_zone: Option<String>,
2758 min_doc_count: U64,
2759 #[serde(default, skip_serializing_if = "Option::is_none")]
2760 extended_bounds: Option<DateHistogramBounds>,
2761 #[serde(default, skip_serializing_if = "Option::is_none")]
2762 hard_bounds: Option<DateHistogramBounds>,
2763 offset_millis: I64,
2764 #[serde(default, skip_serializing_if = "Option::is_none")]
2765 missing: Option<I64>,
2766 sub_aggregations: Vec<Aggregation>,
2767 },
2768 Composite {
2769 name: String,
2770 size: u32,
2771 sources: Vec<CompositeSource>,
2772 #[serde(default, skip_serializing_if = "Option::is_none")]
2773 after: Option<Cursor>,
2774 sub_aggregations: Vec<Aggregation>,
2775 },
2776 Filter {
2777 name: String,
2778 query: Box<Query>,
2779 sub_aggregations: Vec<Aggregation>,
2780 },
2781 Nested {
2782 name: String,
2783 path: String,
2784 sub_aggregations: Vec<Aggregation>,
2785 },
2786 ReverseNested {
2787 name: String,
2788 #[serde(default, skip_serializing_if = "Option::is_none")]
2789 path: Option<String>,
2790 sub_aggregations: Vec<Aggregation>,
2791 },
2792 TimeSeriesV1 {
2793 name: String,
2794 metric_name: String,
2795 unit: String,
2796 point_kind: MetricPointKind,
2797 #[serde(default, skip_serializing_if = "Option::is_none")]
2798 temporality: Option<MetricTemporality>,
2799 #[serde(default, skip_serializing_if = "Option::is_none")]
2800 monotonic: Option<bool>,
2801 range_start_unix_nanos: U64,
2802 range_end_unix_nanos: U64,
2803 bucket_width_nanos: U64,
2804 alignment_origin_unix_nanos: U64,
2805 group_by: Vec<String>,
2806 operator: TimeSeriesOperator,
2807 missing_data: TimeSeriesMissingData,
2808 quantiles: Vec<ApproximateNumber>,
2809 quantile_mode: TimeSeriesQuantileMode,
2810 maximum_exemplars: u32,
2811 maximum_points: u32,
2812 maximum_series: u32,
2813 maximum_buckets: u32,
2814 maximum_results: u32,
2815 maximum_state_bytes: U64,
2816 },
2817}
2818
2819pub const LODESTONE_API_NESTED_SEARCH_HIT_FORMAT_VERSION: u16 = 1;
2820#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2821#[serde(deny_unknown_fields)]
2822pub struct NestedSearchHit {
2823 pub path: String,
2824 pub ordinal: u32,
2825 #[serde(default, skip_serializing_if = "Option::is_none")]
2826 pub score: Option<ApproximateNumber>,
2827 pub source: RawJson,
2828 pub sort: Vec<JsonValue>,
2829}
2830
2831pub const LODESTONE_API_NAMED_NESTED_INNER_HITS_RESULT_FORMAT_VERSION: u16 = 1;
2832#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2833#[serde(deny_unknown_fields)]
2834pub struct NamedNestedInnerHitsResult {
2835 pub name: String,
2836 pub total: U64,
2837 pub hits: Vec<NestedSearchHit>,
2838}
2839
2840pub const LODESTONE_API_FRAGMENT_BOUNDARY_FORMAT_VERSION: u16 = 1;
2841#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2842#[serde(rename_all = "snake_case")]
2843pub enum FragmentBoundary {
2844 Word,
2845 Sentence,
2846 Paragraph,
2847 WholeField,
2848}
2849
2850pub const LODESTONE_API_FRAGMENT_OFFSET_ENCODING_FORMAT_VERSION: u16 = 1;
2851#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2852#[serde(rename_all = "snake_case")]
2853pub enum FragmentOffsetEncoding {
2854 Utf8Bytes,
2855 Utf16CodeUnits,
2856 UnicodeCodepoints,
2857}
2858
2859pub const LODESTONE_API_FRAGMENT_RANKER_FORMAT_VERSION: u16 = 1;
2860#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2861#[serde(rename_all = "snake_case")]
2862pub enum FragmentRanker {
2863 LexicalMatchCountV1,
2864}
2865
2866pub const LODESTONE_API_FRAGMENT_REQUEST_FORMAT_VERSION: u16 = 1;
2867#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2868#[serde(deny_unknown_fields)]
2869pub struct FragmentRequest {
2870 pub fields: Vec<String>,
2871 pub max_fragment_bytes: u32,
2872 pub max_fragments: u32,
2873 pub boundary: FragmentBoundary,
2874 pub offset_encoding: FragmentOffsetEncoding,
2875 pub ranker: FragmentRanker,
2876}
2877
2878pub const LODESTONE_API_SEARCH_FRAGMENT_FORMAT_VERSION: u16 = 1;
2879#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2880#[serde(deny_unknown_fields)]
2881pub struct SearchFragment {
2882 pub field: String,
2883 pub text: String,
2884 pub start: u32,
2885 pub end: u32,
2886 pub offset_encoding: FragmentOffsetEncoding,
2887 pub rank: u32,
2888 pub match_count: u32,
2889 pub truncated: bool,
2890 pub partial: bool,
2891}
2892
2893pub const LODESTONE_API_NUMERIC_FEATURE_TRANSFORM_FORMAT_VERSION: u16 = 1;
2894#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2895#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2896pub enum NumericFeatureTransform {
2897 Identity,
2898 Log1p,
2899 Clamp {
2900 minimum: ApproximateNumber,
2901 maximum: ApproximateNumber,
2902 },
2903}
2904
2905pub const LODESTONE_API_NUMERIC_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
2906#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2907#[serde(deny_unknown_fields)]
2908pub struct NumericResultFeature {
2909 pub name: String,
2910 pub field: String,
2911 pub transform: NumericFeatureTransform,
2912}
2913
2914pub const LODESTONE_API_RESULT_FEATURE_REQUEST_FORMAT_VERSION: u16 = 1;
2915#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2916#[serde(deny_unknown_fields)]
2917pub struct ResultFeatureRequest {
2918 pub top_n: u32,
2919 pub include_branch_components: bool,
2920 pub numeric: Vec<NumericResultFeature>,
2921}
2922
2923pub const LODESTONE_API_RESULT_DIVERSIFICATION_FORMAT_VERSION: u16 = 1;
2924#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2925#[serde(deny_unknown_fields)]
2926pub struct ResultDiversification {
2927 pub fields: Vec<String>,
2928 pub max_per_group: u32,
2929}
2930
2931pub const LODESTONE_API_BRANCH_SCORE_KIND_FORMAT_VERSION: u16 = 2;
2932#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2933#[serde(rename_all = "snake_case")]
2934pub enum BranchScoreKind {
2935 LexicalScore,
2936 DenseSimilarity,
2937 SparseDotProduct,
2938 LateInteractionMaxsim,
2939}
2940
2941pub const LODESTONE_API_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
2942#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2943#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2944pub enum ResultFeature {
2945 Branch {
2946 branch: String,
2947 score_kind: BranchScoreKind,
2948 rank: u32,
2949 score: ApproximateNumber,
2950 },
2951 Numeric {
2952 name: String,
2953 field: String,
2954 value: ApproximateNumber,
2955 },
2956}
2957
2958pub const LODESTONE_API_SEARCH_HIT_FORMAT_VERSION: u16 = 2;
2959#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2960#[serde(deny_unknown_fields)]
2961pub struct SearchHit {
2962 pub index: Resource,
2963 pub document_id: String,
2964 #[serde(default, skip_serializing_if = "Option::is_none")]
2965 pub score: Option<ApproximateNumber>,
2966 #[serde(default, skip_serializing_if = "Option::is_none")]
2967 pub source: Option<RawJson>,
2968 pub sort: Vec<JsonValue>,
2969 pub fragments: Vec<SearchFragment>,
2970 pub features: Vec<ResultFeature>,
2971 pub group_values: Vec<JsonValue>,
2972 pub inner_hits: Vec<NamedNestedInnerHitsResult>,
2973}
2974
2975pub const LODESTONE_API_AGGREGATION_BUCKET_FORMAT_VERSION: u16 = 1;
2976#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2977#[serde(deny_unknown_fields)]
2978pub struct AggregationBucket {
2979 pub key: JsonValue,
2980 pub document_count: U64,
2981 pub sub_aggregations: Vec<AggregationResult>,
2982}
2983
2984pub const LODESTONE_API_AGGREGATION_RESULT_FORMAT_VERSION: u16 = 3;
2985#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2986#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2987pub enum AggregationResult {
2988 Terms {
2989 name: String,
2990 buckets: Vec<AggregationBucket>,
2991 partial: bool,
2992 },
2993 Histogram {
2994 name: String,
2995 buckets: Vec<AggregationBucket>,
2996 partial: bool,
2997 },
2998 DateHistogram {
2999 name: String,
3000 buckets: Vec<AggregationBucket>,
3001 partial: bool,
3002 },
3003 Composite {
3004 name: String,
3005 buckets: Vec<AggregationBucket>,
3006 #[serde(default, skip_serializing_if = "Option::is_none")]
3007 after: Option<Cursor>,
3008 partial: bool,
3009 },
3010 Filter {
3011 name: String,
3012 buckets: Vec<AggregationBucket>,
3013 partial: bool,
3014 },
3015 SingleBucket {
3016 name: String,
3017 document_count: U64,
3018 sub_aggregations: Vec<AggregationResult>,
3019 partial: bool,
3020 },
3021 Cardinality {
3022 name: String,
3023 #[serde(default, skip_serializing_if = "Option::is_none")]
3024 value: Option<ApproximateNumber>,
3025 partial: bool,
3026 },
3027 Percentiles {
3028 name: String,
3029 values: Vec<PercentileValue>,
3030 partial: bool,
3031 },
3032 ApproximateCardinality {
3033 name: String,
3034 value: ApproximateNumber,
3035 approximation: Approximation,
3036 partial: bool,
3037 },
3038 ApproximatePercentiles {
3039 name: String,
3040 values: Vec<ApproximatePercentileValue>,
3041 approximation: Approximation,
3042 partial: bool,
3043 },
3044 Sum {
3045 name: String,
3046 #[serde(default, skip_serializing_if = "Option::is_none")]
3047 value: Option<ApproximateNumber>,
3048 partial: bool,
3049 },
3050 Avg {
3051 name: String,
3052 #[serde(default, skip_serializing_if = "Option::is_none")]
3053 value: Option<ApproximateNumber>,
3054 partial: bool,
3055 },
3056 Min {
3057 name: String,
3058 #[serde(default, skip_serializing_if = "Option::is_none")]
3059 value: Option<ApproximateNumber>,
3060 partial: bool,
3061 },
3062 Max {
3063 name: String,
3064 #[serde(default, skip_serializing_if = "Option::is_none")]
3065 value: Option<ApproximateNumber>,
3066 partial: bool,
3067 },
3068 Stats {
3069 name: String,
3070 count: U64,
3071 #[serde(default, skip_serializing_if = "Option::is_none")]
3072 min: Option<ApproximateNumber>,
3073 #[serde(default, skip_serializing_if = "Option::is_none")]
3074 max: Option<ApproximateNumber>,
3075 #[serde(default, skip_serializing_if = "Option::is_none")]
3076 avg: Option<ApproximateNumber>,
3077 sum: ApproximateNumber,
3078 partial: bool,
3079 },
3080 TimeSeriesV1 {
3081 name: String,
3082 buckets: Vec<TimeSeriesBucket>,
3083 partial: bool,
3084 },
3085}
3086
3087pub const LODESTONE_API_SHARD_COUNTS_FORMAT_VERSION: u16 = 1;
3088#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3089#[serde(deny_unknown_fields)]
3090pub struct ShardCounts {
3091 pub total: u32,
3092 pub successful: u32,
3093 pub skipped: u32,
3094 pub failed: u32,
3095}
3096
3097pub const LODESTONE_API_TOTAL_HITS_RELATION_FORMAT_VERSION: u16 = 1;
3098#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3099#[serde(rename_all = "snake_case")]
3100pub enum TotalHitsRelation {
3101 Exact,
3102 LowerBound,
3103 Incomplete,
3104}
3105
3106pub const LODESTONE_API_SEARCH_TOTAL_FORMAT_VERSION: u16 = 1;
3107#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3108#[serde(deny_unknown_fields)]
3109pub struct SearchTotal {
3110 pub value: U64,
3111 pub relation: TotalHitsRelation,
3112 pub partial: bool,
3113}
3114
3115pub const LODESTONE_API_SEARCH_EXECUTION_FRESHNESS_FORMAT_VERSION: u16 = 1;
3116#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3117#[serde(rename_all = "snake_case")]
3118pub enum SearchExecutionFreshness {
3119 Realtime,
3120 Committed,
3121}
3122
3123pub const LODESTONE_API_SEARCH_FRESHNESS_FORMAT_VERSION: u16 = 1;
3124#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3125#[serde(rename_all = "snake_case")]
3126pub enum SearchFreshness {
3127 Auto,
3128 Realtime,
3129 Committed,
3130}
3131
3132pub const LODESTONE_API_SEARCH_DEGRADATION_REASON_FORMAT_VERSION: u16 = 1;
3133#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3134#[serde(rename_all = "snake_case")]
3135pub enum SearchDegradationReason {
3136 WriterUnavailable,
3137}
3138
3139pub const LODESTONE_API_SEARCH_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
3140#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3141#[serde(deny_unknown_fields)]
3142pub struct SearchAchievement {
3143 pub freshness: SearchExecutionFreshness,
3144 pub degradation_reasons: Vec<SearchDegradationReason>,
3145}
3146
3147pub const LODESTONE_API_SEARCH_FAILURE_STAGE_FORMAT_VERSION: u16 = 1;
3148#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3149#[serde(rename_all = "snake_case")]
3150pub enum SearchFailureStage {
3151 Preflight,
3152 Dispatch,
3153}
3154
3155pub const LODESTONE_API_SEARCH_FAILURE_REASON_FORMAT_VERSION: u16 = 1;
3156#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3157#[serde(rename_all = "snake_case")]
3158pub enum SearchFailureReason {
3159 Cancelled,
3160 Overloaded,
3161 ResourceLimit,
3162 DeadlineExceeded,
3163 Unavailable,
3164 InvalidResponse,
3165}
3166
3167pub const LODESTONE_API_COLLECTION_SHARD_FORMAT_VERSION: u16 = 1;
3168#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3169#[serde(deny_unknown_fields)]
3170pub struct CollectionShard {
3171 pub collection_id: Identity,
3172 pub index_id: Identity,
3173 pub shard_id: u32,
3174}
3175
3176pub const LODESTONE_API_SEARCH_PARTIAL_FAILURE_FORMAT_VERSION: u16 = 1;
3177#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3178#[serde(deny_unknown_fields)]
3179pub struct SearchPartialFailure {
3180 pub shard: CollectionShard,
3181 pub stage: SearchFailureStage,
3182 pub reason: SearchFailureReason,
3183 pub recovery: RecoveryAction,
3184}
3185
3186pub const LODESTONE_API_ARTIFACT_FORMAT_VERSION: u16 = 1;
3187#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3188#[serde(deny_unknown_fields)]
3189pub struct Artifact {
3190 pub locator: Locator,
3191 pub bytes: U64,
3192 pub sha256: Digest,
3193 pub expires_at: U64,
3194}
3195
3196pub const LODESTONE_API_PORTABILITY_STORAGE_CAPABILITY_FORMAT_VERSION: u16 = 1;
3197#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3198#[serde(deny_unknown_fields)]
3199pub struct PortabilityStorageCapability {
3200 pub backend_authority: String,
3201 pub object_prefix: String,
3202 pub maximum_bytes: U64,
3203 #[serde(default, skip_serializing_if = "Option::is_none")]
3204 pub key_capability_digest: Option<Digest>,
3205}
3206
3207pub const LODESTONE_API_COLLECTION_EXPORT_ARTIFACT_FORMAT_VERSION: u16 = 1;
3208#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3209#[serde(deny_unknown_fields)]
3210pub struct CollectionExportArtifact {
3211 pub artifact: Artifact,
3212 pub backend_authority: String,
3213 pub object_key: String,
3214 pub source_collection_id: Identity,
3215 pub source_catalog_revision: U64,
3216}
3217
3218pub const LODESTONE_API_INDEX_TRANSFER_PAGE_FORMAT_VERSION: u16 = 1;
3219#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3220#[serde(deny_unknown_fields)]
3221pub struct IndexTransferPage {
3222 pub ordinal: u32,
3223 pub object_key: String,
3224 pub bytes: U64,
3225 pub content_digest: Digest,
3226 pub record_count: u32,
3227}
3228
3229pub const LODESTONE_API_INDEX_TRANSFER_ARTIFACT_FORMAT_VERSION: u16 = 1;
3230#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3231#[serde(deny_unknown_fields)]
3232pub struct IndexTransferArtifact {
3233 pub manifest: Artifact,
3234 pub manifest_object_key: String,
3235 pub transfer_identity: Digest,
3236 pub source_cluster_storage_id: Identity,
3237 pub source_collection_id: Identity,
3238 pub source_index: Resource,
3239 pub source_catalog_revision: U64,
3240 pub source_cut_digest: Digest,
3241 pub pages: Vec<IndexTransferPage>,
3242 pub record_count: u32,
3243}
3244
3245pub const LODESTONE_API_SEARCH_VALIDATION_BOUND_FORMAT_VERSION: u16 = 1;
3246#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3247#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3248pub enum SearchValidationBound {
3249 Exact { value: U64 },
3250 UpperBound { value: U64 },
3251 Unknown { reason: String },
3252}
3253
3254pub const LODESTONE_API_SEARCH_VALIDATION_ESTIMATES_FORMAT_VERSION: u16 = 1;
3255#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3256#[serde(deny_unknown_fields)]
3257pub struct SearchValidationEstimates {
3258 pub shard_fanout: SearchValidationBound,
3259 pub candidate_documents: SearchValidationBound,
3260 pub segments: SearchValidationBound,
3261 pub buckets: SearchValidationBound,
3262 pub memory_bytes: SearchValidationBound,
3263 pub object_reads: SearchValidationBound,
3264 pub object_bytes: SearchValidationBound,
3265 pub response_bytes: SearchValidationBound,
3266 pub planning_work: SearchValidationBound,
3267}
3268
3269pub const LODESTONE_API_SEARCH_VALIDATION_LIMIT_FORMAT_VERSION: u16 = 1;
3270#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3271#[serde(deny_unknown_fields)]
3272pub struct SearchValidationLimit {
3273 pub id: String,
3274 pub applied: U64,
3275 pub unit: String,
3276}
3277
3278pub const LODESTONE_API_OPERATION_KIND_FORMAT_VERSION: u16 = 2;
3279#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3280#[serde(rename_all = "snake_case")]
3281pub enum OperationKind {
3282 Catalog,
3283 MaintenanceTask,
3284 Security,
3285 Diagnostic,
3286 CollectionExport,
3287 CollectionRestore,
3288 IndexExport,
3289 IndexImport,
3290 VectorEvaluation,
3291 VectorWarm,
3292 Lifecycle,
3293 Quota,
3294 Admission,
3295}
3296
3297pub const LODESTONE_API_OPERATION_AUTHORITY_FORMAT_VERSION: u16 = 1;
3298#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3299#[serde(rename_all = "snake_case")]
3300pub enum OperationAuthority {
3301 Catalog,
3302 Tasks,
3303 Security,
3304 Diagnostics,
3305 Portability,
3306 Lifecycle,
3307 Quota,
3308 Admission,
3309}
3310
3311pub const LODESTONE_API_OPERATION_TARGET_FORMAT_VERSION: u16 = 1;
3312#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3313#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3314pub enum OperationTarget {
3315 Collection { collection_id: Identity },
3316 Resource { resource: Resource },
3317 Artifact { locator: Locator },
3318 None,
3319}
3320
3321pub const LODESTONE_API_OPERATION_STATE_FORMAT_VERSION: u16 = 1;
3322#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3323#[serde(rename_all = "snake_case")]
3324pub enum OperationState {
3325 Pending,
3326 Succeeded,
3327 Failed,
3328 Cancelled,
3329}
3330
3331pub const LODESTONE_API_OPERATION_PENDING_STATE_FORMAT_VERSION: u16 = 1;
3332#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3333#[serde(rename_all = "snake_case")]
3334pub enum OperationPendingState {
3335 Queued,
3336 Running,
3337 CancelRequested,
3338}
3339
3340pub const LODESTONE_API_OPERATION_PROGRESS_UNIT_FORMAT_VERSION: u16 = 1;
3341#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3342#[serde(rename_all = "snake_case")]
3343pub enum OperationProgressUnit {
3344 BasisPoints,
3345 Items,
3346 Bytes,
3347 WorkUnits,
3348}
3349
3350pub const LODESTONE_API_OPERATION_PROGRESS_FORMAT_VERSION: u16 = 1;
3351#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3352#[serde(deny_unknown_fields)]
3353pub struct OperationProgress {
3354 pub completed: U64,
3355 pub total: U64,
3356 pub unit: OperationProgressUnit,
3357}
3358
3359pub const LODESTONE_API_OPERATION_RESULT_FORMAT_VERSION: u16 = 1;
3360#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3361#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3362pub enum OperationResult {
3363 None,
3364 Artifacts { items: Vec<Artifact> },
3365}
3366
3367pub const LODESTONE_API_OPERATION_FAILURE_FORMAT_VERSION: u16 = 1;
3368#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3369#[serde(deny_unknown_fields)]
3370pub struct OperationFailure {
3371 pub error: ErrorBody,
3372}
3373
3374pub const LODESTONE_API_OPERATION_CANCELLATION_FORMAT_VERSION: u16 = 1;
3375#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3376#[serde(rename_all = "snake_case")]
3377pub enum OperationCancellation {
3378 NotCancellable,
3379 Cancellable,
3380 CancelRequested,
3381 Cancelled,
3382}
3383
3384pub const LODESTONE_API_OPERATION_RETENTION_STATE_FORMAT_VERSION: u16 = 1;
3385#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3386#[serde(rename_all = "snake_case")]
3387pub enum OperationRetentionState {
3388 Active,
3389 Retired,
3390}
3391
3392pub const LODESTONE_API_OPERATION_RETENTION_FORMAT_VERSION: u16 = 1;
3393#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3394#[serde(deny_unknown_fields)]
3395pub struct OperationRetention {
3396 pub state: OperationRetentionState,
3397 #[serde(default, skip_serializing_if = "Option::is_none")]
3398 pub retire_after: Option<U64>,
3399}
3400
3401pub const LODESTONE_API_OPERATION_FORMAT_VERSION: u16 = 2;
3402#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3403#[serde(deny_unknown_fields)]
3404pub struct Operation {
3405 pub locator: Locator,
3406 pub kind: OperationKind,
3407 pub authority: OperationAuthority,
3408 pub target: OperationTarget,
3409 pub authority_revision: U64,
3410 pub current_state: OperationState,
3411 #[serde(default, skip_serializing_if = "Option::is_none")]
3412 pub pending_state: Option<OperationPendingState>,
3413 #[serde(default, skip_serializing_if = "Option::is_none")]
3414 pub progress: Option<OperationProgress>,
3415 #[serde(default, skip_serializing_if = "Option::is_none")]
3416 pub result: Option<OperationResult>,
3417 #[serde(default, skip_serializing_if = "Option::is_none")]
3418 pub failure: Option<OperationFailure>,
3419 pub cancellation: OperationCancellation,
3420 pub retention: OperationRetention,
3421 pub submitted_at: U64,
3422 #[serde(default, skip_serializing_if = "Option::is_none")]
3423 pub terminal_at: Option<U64>,
3424}
3425
3426pub const LODESTONE_API_WRITE_DURABILITY_BOUNDARY_FORMAT_VERSION: u16 = 1;
3427#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3428#[serde(rename_all = "snake_case")]
3429pub enum WriteDurabilityBoundary {
3430 Registered,
3431 IncarnationMemory,
3432}
3433
3434pub const LODESTONE_API_WRITE_VISIBILITY_MODE_FORMAT_VERSION: u16 = 1;
3435#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3436#[serde(rename_all = "snake_case")]
3437pub enum WriteVisibilityMode {
3438 Applied,
3439 WaitFor,
3440}
3441
3442pub const LODESTONE_API_WRITE_RESPONSE_STAGE_FORMAT_VERSION: u16 = 1;
3443#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3444#[serde(rename_all = "snake_case")]
3445pub enum WriteResponseStage {
3446 Validated,
3447 Admitted,
3448 Sequenced,
3449 ObjectPut,
3450 Registered,
3451 AppliedToActiveMemtable,
3452 MicroCommitted,
3453 Sealed,
3454}
3455
3456pub const LODESTONE_API_WRITE_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
3457#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3458#[serde(deny_unknown_fields)]
3459pub struct WriteAchievement {
3460 pub durability_class: ResourceDurabilityClass,
3461 pub durability_boundary: WriteDurabilityBoundary,
3462 pub visibility_mode: WriteVisibilityMode,
3463 pub response_stage: WriteResponseStage,
3464}
3465
3466pub const LODESTONE_API_MUTATION_COMMIT_POSITION_FORMAT_VERSION: u16 = 1;
3467#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3468#[serde(deny_unknown_fields)]
3469pub struct MutationCommitPosition {
3470 pub leader_term: U64,
3471 pub leader_node_id: U64,
3472 pub log_index: U64,
3473}
3474
3475pub const LODESTONE_API_MUTATION_COMMIT_RECEIPT_SHAPE_VERSION: u16 = 1;
3476pub const LODESTONE_API_MUTATION_COMMIT_RECEIPT_FORMAT_VERSION: u16 = 1;
3477#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3478#[serde(deny_unknown_fields)]
3479pub struct MutationCommitReceipt {
3480 pub format_version: u32,
3481 pub registration_position: MutationCommitPosition,
3482 pub sequence: U64,
3483 pub primary_term: U64,
3484 pub mapping_generation: U64,
3485 pub durability_class: ResourceDurabilityClass,
3486 pub durability_boundary: WriteDurabilityBoundary,
3487 pub committed_at_unix_millis: U64,
3488 pub committed_at_uncertainty_millis: U64,
3489}
3490
3491pub const LODESTONE_API_MUTATION_RESOLVER_FORMAT_VERSION: u16 = 1;
3492#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3493#[serde(rename_all = "snake_case")]
3494pub enum MutationResolver {
3495 CloneIndex,
3496 GetHistory,
3497 ResolveAppendBulk,
3498 ResolveCatalogAction,
3499 ResolveDocumentBulk,
3500 ResolveDocumentMutation,
3501 ResolveSecurityAction,
3502 ResolveServiceCredentialReservation,
3503 ResolveStateWrite,
3504}
3505
3506pub const LODESTONE_API_MUTATION_OUTCOME_FORMAT_VERSION: u16 = 1;
3507#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3508#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
3509pub enum MutationOutcome {
3510 Terminal,
3511 Pending {
3512 #[serde(default, skip_serializing_if = "Option::is_none")]
3513 resolver: Option<MutationResolver>,
3514 },
3515 Indeterminate {
3516 #[serde(default, skip_serializing_if = "Option::is_none")]
3517 resolver: Option<MutationResolver>,
3518 },
3519 ResolutionRequired {
3520 resolver: MutationResolver,
3521 },
3522}
3523
3524pub const LODESTONE_API_SUBMISSION_STATE_FORMAT_VERSION: u16 = 1;
3525#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3526#[serde(rename_all = "snake_case")]
3527pub enum SubmissionState {
3528 NotSubmitted,
3529 Submitted,
3530 Resolved,
3531 KnownRetired,
3532 Indeterminate,
3533}
3534
3535pub const LODESTONE_API_EXPECTED_BINDING_FORMAT_VERSION: u16 = 1;
3536#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3537#[serde(deny_unknown_fields)]
3538pub struct ExpectedBinding {
3539 pub incarnation: Identity,
3540 pub revision: U64,
3541}
3542
3543pub const LODESTONE_API_ADMINISTRATION_ALIAS_ACTION_FORMAT_VERSION: u16 = 1;
3544#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3545#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3546pub enum AdministrationAliasAction {
3547 Put {
3548 name: String,
3549 #[serde(default, skip_serializing_if = "Option::is_none")]
3550 expected_revision: Option<U64>,
3551 targets: Vec<AliasTarget>,
3552 #[serde(default, skip_serializing_if = "Option::is_none")]
3553 filter: Option<RawJson>,
3554 #[serde(default, skip_serializing_if = "Option::is_none")]
3555 index_routing: Option<String>,
3556 #[serde(default, skip_serializing_if = "Option::is_none")]
3557 search_routing: Option<String>,
3558 },
3559 Delete {
3560 name: String,
3561 expected_revision: U64,
3562 },
3563}
3564
3565pub const LODESTONE_API_ADMINISTRATION_MUTATION_FORMAT_VERSION: u16 = 1;
3566#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3567#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3568pub enum AdministrationMutation {
3569 ApplyAliasActions {
3570 actions: Vec<AdministrationAliasAction>,
3571 },
3572 PutComponentTemplate {
3573 name: String,
3574 #[serde(default, skip_serializing_if = "Option::is_none")]
3575 expected: Option<ExpectedBinding>,
3576 mapping: Mapping,
3577 settings: RawJson,
3578 #[serde(default, skip_serializing_if = "Option::is_none")]
3579 resource_spec: Option<IndexResourceSpec>,
3580 },
3581 DeleteComponentTemplate {
3582 name: String,
3583 expected: ExpectedBinding,
3584 },
3585 PutIndexTemplate {
3586 name: String,
3587 #[serde(default, skip_serializing_if = "Option::is_none")]
3588 expected: Option<ExpectedBinding>,
3589 priority: i32,
3590 data_stream: bool,
3591 index_patterns: Vec<String>,
3592 components: Vec<ExpectedBinding>,
3593 mapping: Mapping,
3594 settings: RawJson,
3595 #[serde(default, skip_serializing_if = "Option::is_none")]
3596 resource_spec: Option<IndexResourceSpec>,
3597 },
3598 DeleteIndexTemplate {
3599 name: String,
3600 expected: ExpectedBinding,
3601 },
3602 PutIngestPipeline {
3603 name: String,
3604 #[serde(default, skip_serializing_if = "Option::is_none")]
3605 expected: Option<ExpectedBinding>,
3606 definition: RawJson,
3607 },
3608 DeleteIngestPipeline {
3609 name: String,
3610 expected: ExpectedBinding,
3611 },
3612 PutLifecyclePolicy {
3613 name: String,
3614 #[serde(default, skip_serializing_if = "Option::is_none")]
3615 expected: Option<ExpectedBinding>,
3616 rollover: RolloverThresholds,
3617 retention: RetentionPolicy,
3618 merge_hint: bool,
3619 freeze_hint: bool,
3620 delete_expired: bool,
3621 },
3622 DeleteLifecyclePolicy {
3623 name: String,
3624 expected: ExpectedBinding,
3625 },
3626 CreateDataStream {
3627 name: String,
3628 timestamp_field: String,
3629 index_template: ExpectedBinding,
3630 #[serde(default, skip_serializing_if = "Option::is_none")]
3631 lifecycle_policy: Option<ExpectedBinding>,
3632 },
3633 DeleteDataStream {
3634 name: String,
3635 expected_revision: U64,
3636 },
3637 RolloverDataStream {
3638 name: String,
3639 expected_revision: U64,
3640 },
3641}
3642
3643pub const LODESTONE_API_ADMINISTRATION_OUTCOME_FORMAT_VERSION: u16 = 1;
3644#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3645#[serde(deny_unknown_fields)]
3646pub struct AdministrationOutcome {
3647 pub action_id: Digest,
3648 pub authority_revision: U64,
3649 pub state: String,
3650 #[serde(default, skip_serializing_if = "Option::is_none")]
3651 pub resource: Option<Resource>,
3652}
3653
3654pub const LODESTONE_API_INDEX_CHANGE_APPLY_RECEIPT_FORMAT_VERSION: u16 = 1;
3655#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3656#[serde(deny_unknown_fields)]
3657pub struct IndexChangeApplyReceipt {
3658 pub action_id: Digest,
3659 pub semantic_digest: Digest,
3660 pub index: Resource,
3661 pub revision: U64,
3662 pub schema_generation: U64,
3663 pub state: String,
3664}
3665
3666pub const LODESTONE_API_BULK_DOCUMENT_ITEM_FORMAT_VERSION: u16 = 2;
3667#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3668#[serde(deny_unknown_fields)]
3669pub struct BulkDocumentItem {
3670 pub item_action_id: Digest,
3671 pub document_id: String,
3672 pub operation: String,
3673 #[serde(default, skip_serializing_if = "Option::is_none")]
3674 pub source: Option<RawJson>,
3675 #[serde(default, skip_serializing_if = "Option::is_none")]
3676 pub record: Option<NativeRecord>,
3677 #[serde(default, skip_serializing_if = "Option::is_none")]
3678 pub routing: Option<String>,
3679 #[serde(default, skip_serializing_if = "Option::is_none")]
3680 pub condition: Option<DocumentMutationCondition>,
3681 #[serde(default, skip_serializing_if = "Option::is_none")]
3682 pub pipeline: Option<IngestPipelineSelection>,
3683 pub semantic_digest: Digest,
3684}
3685
3686pub const LODESTONE_API_BULK_DOCUMENT_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
3687#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3688#[serde(deny_unknown_fields)]
3689pub struct BulkDocumentItemOutcome {
3690 pub item_action_id: Digest,
3691 #[serde(default, skip_serializing_if = "Option::is_none")]
3692 pub locator: Option<Locator>,
3693 pub state: SubmissionState,
3694 #[serde(default, skip_serializing_if = "Option::is_none")]
3695 pub sequence: Option<U64>,
3696 #[serde(default, skip_serializing_if = "Option::is_none")]
3697 pub mapping_generation: Option<U64>,
3698 pub mapping_adopted: bool,
3699 pub no_document_effect: bool,
3700 #[serde(default, skip_serializing_if = "Option::is_none")]
3701 pub error: Option<ErrorBody>,
3702}
3703
3704pub const LODESTONE_API_BULK_DOCUMENT_OUTCOME_FORMAT_VERSION: u16 = 1;
3705#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3706#[serde(deny_unknown_fields)]
3707pub struct BulkDocumentOutcome {
3708 pub batch_id: Digest,
3709 pub index: Resource,
3710 pub items: Vec<BulkDocumentItemOutcome>,
3711 pub complete: bool,
3712 #[serde(default, skip_serializing_if = "Option::is_none")]
3713 pub achievement: Option<WriteAchievement>,
3714}
3715
3716pub const LODESTONE_API_METRIC_ATTRIBUTE_VALUE_FORMAT_VERSION: u16 = 1;
3717#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3718#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3719pub enum MetricAttributeValue {
3720 String { value: String },
3721 Boolean { value: bool },
3722 I64 { value: I64 },
3723 U64 { value: U64 },
3724 F64Bits { value: U64 },
3725}
3726
3727pub const LODESTONE_API_METRIC_ATTRIBUTE_FORMAT_VERSION: u16 = 1;
3728#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3729#[serde(deny_unknown_fields)]
3730pub struct MetricAttribute {
3731 pub key: String,
3732 pub value: MetricAttributeValue,
3733}
3734
3735pub const LODESTONE_API_METRIC_NUMBER_FORMAT_VERSION: u16 = 1;
3736#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3737#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3738pub enum MetricNumber {
3739 I64 { value: I64 },
3740 F64Bits { value: U64 },
3741}
3742
3743pub const LODESTONE_API_METRIC_TEMPORALITY_FORMAT_VERSION: u16 = 1;
3744#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3745#[serde(rename_all = "snake_case")]
3746pub enum MetricTemporality {
3747 Cumulative,
3748 Delta,
3749}
3750
3751pub const LODESTONE_API_METRIC_POINT_KIND_FORMAT_VERSION: u16 = 1;
3752#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3753#[serde(rename_all = "snake_case")]
3754pub enum MetricPointKind {
3755 Gauge,
3756 Sum,
3757 ExplicitHistogram,
3758 ExponentialHistogram,
3759}
3760
3761pub const LODESTONE_API_METRIC_EXPONENTIAL_BUCKETS_FORMAT_VERSION: u16 = 1;
3762#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3763#[serde(deny_unknown_fields)]
3764pub struct MetricExponentialBuckets {
3765 pub offset: i32,
3766 pub counts: Vec<U64>,
3767}
3768
3769pub const LODESTONE_API_METRIC_DATA_FORMAT_VERSION: u16 = 1;
3770#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3771#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3772pub enum MetricData {
3773 Gauge {
3774 value: MetricNumber,
3775 },
3776 Sum {
3777 value: MetricNumber,
3778 temporality: MetricTemporality,
3779 monotonic: bool,
3780 },
3781 ExplicitHistogram {
3782 temporality: MetricTemporality,
3783 count: U64,
3784 #[serde(default, skip_serializing_if = "Option::is_none")]
3785 sum: Option<MetricNumber>,
3786 bounds_f64_bits: Vec<U64>,
3787 bucket_counts: Vec<U64>,
3788 },
3789 ExponentialHistogram {
3790 temporality: MetricTemporality,
3791 count: U64,
3792 #[serde(default, skip_serializing_if = "Option::is_none")]
3793 sum: Option<MetricNumber>,
3794 scale: i32,
3795 zero_count: U64,
3796 positive: MetricExponentialBuckets,
3797 negative: MetricExponentialBuckets,
3798 },
3799}
3800
3801pub const LODESTONE_API_METRIC_INSTRUMENTATION_SCOPE_FORMAT_VERSION: u16 = 1;
3802#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3803#[serde(deny_unknown_fields)]
3804pub struct MetricInstrumentationScope {
3805 pub name: String,
3806 #[serde(default, skip_serializing_if = "Option::is_none")]
3807 pub version: Option<String>,
3808 #[serde(default, skip_serializing_if = "Option::is_none")]
3809 pub schema_url: Option<String>,
3810 pub attributes: Vec<MetricAttribute>,
3811}
3812
3813pub const LODESTONE_API_METRIC_EXEMPLAR_FORMAT_VERSION: u16 = 1;
3814#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3815#[serde(deny_unknown_fields)]
3816pub struct MetricExemplar {
3817 pub timestamp_unix_nanos: U64,
3818 pub value: MetricNumber,
3819 #[serde(default, skip_serializing_if = "Option::is_none")]
3820 pub trace_id: Option<String>,
3821 #[serde(default, skip_serializing_if = "Option::is_none")]
3822 pub span_id: Option<String>,
3823 pub filtered_attributes: Vec<MetricAttribute>,
3824}
3825
3826pub const LODESTONE_API_METRIC_POINT_SHAPE_VERSION: u16 = 1;
3827pub const LODESTONE_API_METRIC_POINT_FORMAT_VERSION: u16 = 1;
3828#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3829#[serde(deny_unknown_fields)]
3830pub struct MetricPoint {
3831 pub format_version: u32,
3832 pub resource_attributes: Vec<MetricAttribute>,
3833 pub instrumentation_scope: MetricInstrumentationScope,
3834 pub metric_name: String,
3835 #[serde(default, skip_serializing_if = "Option::is_none")]
3836 pub description: Option<String>,
3837 pub unit: String,
3838 pub series_attributes: Vec<MetricAttribute>,
3839 pub timestamp_unix_nanos: U64,
3840 #[serde(default, skip_serializing_if = "Option::is_none")]
3841 pub start_timestamp_unix_nanos: Option<U64>,
3842 pub data: MetricData,
3843 pub exemplars: Vec<MetricExemplar>,
3844}
3845
3846pub const LODESTONE_API_ENTITY_REF_FORMAT_VERSION: u16 = 1;
3847#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3848#[serde(deny_unknown_fields)]
3849pub struct EntityRef {
3850 pub entity_kind: String,
3851 pub entity_id: String,
3852}
3853
3854pub const LODESTONE_API_RELATIONSHIP_EVIDENCE_REF_FORMAT_VERSION: u16 = 1;
3855#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3856#[serde(deny_unknown_fields)]
3857pub struct RelationshipEvidenceRef {
3858 pub index: Resource,
3859 pub record_id: String,
3860}
3861
3862pub const LODESTONE_API_RELATIONSHIP_DIRECTIONALITY_FORMAT_VERSION: u16 = 1;
3863#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3864#[serde(rename_all = "snake_case")]
3865pub enum RelationshipDirectionality {
3866 Directed,
3867 Undirected,
3868}
3869
3870pub const LODESTONE_API_RELATIONSHIP_RECORD_SHAPE_VERSION: u16 = 1;
3871pub const LODESTONE_API_RELATIONSHIP_RECORD_FORMAT_VERSION: u16 = 1;
3872#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3873#[serde(deny_unknown_fields)]
3874pub struct RelationshipRecord {
3875 pub format_version: u32,
3876 pub relationship_id: String,
3877 pub source: EntityRef,
3878 pub target: EntityRef,
3879 pub relationship_type: String,
3880 pub directionality: RelationshipDirectionality,
3881 #[serde(default, skip_serializing_if = "Option::is_none")]
3882 pub valid_from_unix_nanos: Option<U64>,
3883 #[serde(default, skip_serializing_if = "Option::is_none")]
3884 pub valid_through_unix_nanos: Option<U64>,
3885 pub provenance: Vec<String>,
3886 pub evidence: Vec<RelationshipEvidenceRef>,
3887 pub assertion_class: String,
3888}
3889
3890pub const LODESTONE_API_PROFILE_LABEL_FORMAT_VERSION: u16 = 1;
3891#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3892#[serde(deny_unknown_fields)]
3893pub struct ProfileLabel {
3894 pub key: String,
3895 pub value: String,
3896}
3897
3898pub const LODESTONE_API_PROFILE_SAMPLE_TYPE_FORMAT_VERSION: u16 = 1;
3899#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3900#[serde(deny_unknown_fields)]
3901pub struct ProfileSampleType {
3902 pub sample_type: String,
3903 pub unit: String,
3904}
3905
3906pub const LODESTONE_API_PROFILE_MAPPING_FORMAT_VERSION: u16 = 1;
3907#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3908#[serde(deny_unknown_fields)]
3909pub struct ProfileMapping {
3910 pub mapping_id: String,
3911 pub build_id: String,
3912 pub module_id: String,
3913 #[serde(default, skip_serializing_if = "Option::is_none")]
3914 pub filename: Option<String>,
3915}
3916
3917pub const LODESTONE_API_PROFILE_FUNCTION_FORMAT_VERSION: u16 = 1;
3918#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3919#[serde(deny_unknown_fields)]
3920pub struct ProfileFunction {
3921 pub function_id: String,
3922 #[serde(default, skip_serializing_if = "Option::is_none")]
3923 pub name: Option<String>,
3924 #[serde(default, skip_serializing_if = "Option::is_none")]
3925 pub system_name: Option<String>,
3926 #[serde(default, skip_serializing_if = "Option::is_none")]
3927 pub filename: Option<String>,
3928 #[serde(default, skip_serializing_if = "Option::is_none")]
3929 pub start_line: Option<U64>,
3930 #[serde(default, skip_serializing_if = "Option::is_none")]
3931 pub symbol_observation_id: Option<String>,
3932}
3933
3934pub const LODESTONE_API_PROFILE_LINE_FORMAT_VERSION: u16 = 1;
3935#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3936#[serde(deny_unknown_fields)]
3937pub struct ProfileLine {
3938 pub function_id: String,
3939 pub line: U64,
3940}
3941
3942pub const LODESTONE_API_PROFILE_LOCATION_FORMAT_VERSION: u16 = 1;
3943#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3944#[serde(deny_unknown_fields)]
3945pub struct ProfileLocation {
3946 pub location_id: String,
3947 #[serde(default, skip_serializing_if = "Option::is_none")]
3948 pub mapping_id: Option<String>,
3949 pub address: U64,
3950 pub lines: Vec<ProfileLine>,
3951}
3952
3953pub const LODESTONE_API_PROFILE_STACK_FORMAT_VERSION: u16 = 1;
3954#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3955#[serde(deny_unknown_fields)]
3956pub struct ProfileStack {
3957 pub stack_id: String,
3958 #[serde(default, skip_serializing_if = "Option::is_none")]
3959 pub parent_stack_id: Option<String>,
3960 pub location_id: String,
3961}
3962
3963pub const LODESTONE_API_PROFILE_SAMPLE_FORMAT_VERSION: u16 = 1;
3964#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3965#[serde(deny_unknown_fields)]
3966pub struct ProfileSample {
3967 pub sample_id: String,
3968 pub stack_id: String,
3969 pub values: Vec<MetricNumber>,
3970 pub labels: Vec<ProfileLabel>,
3971 #[serde(default, skip_serializing_if = "Option::is_none")]
3972 pub trace_id: Option<String>,
3973 #[serde(default, skip_serializing_if = "Option::is_none")]
3974 pub span_id: Option<String>,
3975}
3976
3977pub const LODESTONE_API_PROFILE_INSTRUMENTATION_SCOPE_FORMAT_VERSION: u16 = 1;
3978#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3979#[serde(deny_unknown_fields)]
3980pub struct ProfileInstrumentationScope {
3981 pub name: String,
3982 #[serde(default, skip_serializing_if = "Option::is_none")]
3983 pub version: Option<String>,
3984 pub attributes: Vec<ProfileLabel>,
3985}
3986
3987pub const LODESTONE_API_PROFILE_BATCH_SHAPE_VERSION: u16 = 1;
3988pub const LODESTONE_API_PROFILE_BATCH_FORMAT_VERSION: u16 = 1;
3989#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3990#[serde(deny_unknown_fields)]
3991pub struct ProfileBatch {
3992 pub format_version: u32,
3993 pub profile_id: String,
3994 pub batch_id: String,
3995 pub start_unix_nanos: U64,
3996 pub end_unix_nanos: U64,
3997 pub duration_nanos: U64,
3998 pub period_nanos: U64,
3999 pub sample_types: Vec<ProfileSampleType>,
4000 pub resource_attributes: Vec<ProfileLabel>,
4001 pub instrumentation_scope: ProfileInstrumentationScope,
4002 pub mappings: Vec<ProfileMapping>,
4003 pub functions: Vec<ProfileFunction>,
4004 pub locations: Vec<ProfileLocation>,
4005 pub stacks: Vec<ProfileStack>,
4006 pub samples: Vec<ProfileSample>,
4007}
4008
4009pub const LODESTONE_API_NATIVE_RECORD_FORMAT_VERSION: u16 = 3;
4010#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4011#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4012pub enum NativeRecord {
4013 Document { source: RawJson },
4014 MetricPoint { point: Box<MetricPoint> },
4015 Relationship { relationship: Box<RelationshipRecord> },
4016 ProfileBatch { batch: Box<ProfileBatch> },
4017}
4018
4019pub const LODESTONE_API_RETAINED_APPEND_ITEM_FORMAT_VERSION: u16 = 4;
4020#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4021#[serde(deny_unknown_fields)]
4022pub struct RetainedAppendItem {
4023 pub item_action_id: Digest,
4024 pub document_id: String,
4025 pub record: NativeRecord,
4026}
4027
4028pub const LODESTONE_API_RETAINED_APPEND_STATE_FORMAT_VERSION: u16 = 1;
4029#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4030#[serde(rename_all = "snake_case")]
4031pub enum RetainedAppendState {
4032 Prepared,
4033 Committed,
4034 Replayed,
4035 Conflict,
4036 NotSubmittedRetryable,
4037 NotSubmittedTerminal,
4038 SubmittedIndeterminate,
4039 Retired,
4040}
4041
4042pub const LODESTONE_API_RETAINED_APPEND_RETRY_SAFETY_FORMAT_VERSION: u16 = 1;
4043#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4044#[serde(rename_all = "snake_case")]
4045pub enum RetainedAppendRetrySafety {
4046 Safe,
4047 ResolveOnly,
4048 Terminal,
4049}
4050
4051pub const LODESTONE_API_RETAINED_APPEND_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
4052#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4053#[serde(deny_unknown_fields)]
4054pub struct RetainedAppendItemOutcome {
4055 pub item_action_id: Digest,
4056 #[serde(default, skip_serializing_if = "Option::is_none")]
4057 pub locator: Option<Locator>,
4058 #[serde(default, skip_serializing_if = "Option::is_none")]
4059 pub semantic_digest: Option<Digest>,
4060 pub state: RetainedAppendState,
4061 pub retry_safety: RetainedAppendRetrySafety,
4062 #[serde(default, skip_serializing_if = "Option::is_none")]
4063 pub sequence: Option<U64>,
4064 #[serde(default, skip_serializing_if = "Option::is_none")]
4065 pub primary_term: Option<U64>,
4066 #[serde(default, skip_serializing_if = "Option::is_none")]
4067 pub error: Option<ErrorBody>,
4068}
4069
4070pub const LODESTONE_API_RETAINED_APPEND_BULK_OUTCOME_FORMAT_VERSION: u16 = 1;
4071#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4072#[serde(deny_unknown_fields)]
4073pub struct RetainedAppendBulkOutcome {
4074 pub batch_id: Digest,
4075 pub index: Resource,
4076 pub items: Vec<RetainedAppendItemOutcome>,
4077 pub complete: bool,
4078 #[serde(default, skip_serializing_if = "Option::is_none")]
4079 pub achievement: Option<WriteAchievement>,
4080}
4081
4082pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_STATE_FORMAT_VERSION: u16 = 1;
4083#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4084#[serde(rename_all = "snake_case")]
4085pub enum RetainedAppendObservationState {
4086 Visible,
4087 Pending,
4088 SubmittedIndeterminate,
4089 Conflict,
4090 Retired,
4091}
4092
4093pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_OUTCOME_FORMAT_VERSION: u16 = 1;
4094#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4095#[serde(deny_unknown_fields)]
4096pub struct RetainedAppendObservationOutcome {
4097 pub index: Resource,
4098 pub locator: Locator,
4099 pub state: RetainedAppendObservationState,
4100 #[serde(default, skip_serializing_if = "Option::is_none")]
4101 pub sequence: Option<U64>,
4102 #[serde(default, skip_serializing_if = "Option::is_none")]
4103 pub primary_term: Option<U64>,
4104}
4105
4106pub const LODESTONE_API_BINARY_VALUE_FORMAT_VERSION: u16 = 1;
4107#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4108#[serde(deny_unknown_fields)]
4109pub struct BinaryValue {
4110 pub bytes_base64: String,
4111}
4112
4113pub const LODESTONE_API_STATE_HASH_FIELD_FORMAT_VERSION: u16 = 1;
4114#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4115#[serde(deny_unknown_fields)]
4116pub struct StateHashField {
4117 pub field: BinaryValue,
4118 pub value: BinaryValue,
4119}
4120
4121pub const LODESTONE_API_STATE_SET_ENTRY_FORMAT_VERSION: u16 = 1;
4122#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4123#[serde(deny_unknown_fields)]
4124pub struct StateSetEntry {
4125 pub key: BinaryValue,
4126 pub value: BinaryValue,
4127}
4128
4129pub const LODESTONE_API_STATE_SET_CONDITION_FORMAT_VERSION: u16 = 1;
4130#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4131#[serde(rename_all = "snake_case")]
4132pub enum StateSetCondition {
4133 Always,
4134 IfAbsent,
4135 IfPresent,
4136}
4137
4138pub const LODESTONE_API_STATE_OPERATION_FORMAT_VERSION: u16 = 1;
4139#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4140#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4141pub enum StateOperation {
4142 Get {
4143 key: BinaryValue,
4144 },
4145 Set {
4146 key: BinaryValue,
4147 value: BinaryValue,
4148 condition: StateSetCondition,
4149 #[serde(default, skip_serializing_if = "Option::is_none")]
4150 expires_at_millis: Option<U64>,
4151 },
4152 Delete {
4153 keys: Vec<BinaryValue>,
4154 },
4155 Exists {
4156 keys: Vec<BinaryValue>,
4157 },
4158 ExpireAt {
4159 key: BinaryValue,
4160 absolute_millis: U64,
4161 },
4162 TtlStatus {
4163 key: BinaryValue,
4164 },
4165 Persist {
4166 key: BinaryValue,
4167 },
4168 MultiGet {
4169 keys: Vec<BinaryValue>,
4170 },
4171 MultiSet {
4172 entries: Vec<StateSetEntry>,
4173 },
4174 Increment {
4175 key: BinaryValue,
4176 delta: I64,
4177 },
4178 HashGet {
4179 key: BinaryValue,
4180 field: BinaryValue,
4181 },
4182 HashSet {
4183 key: BinaryValue,
4184 fields: Vec<StateHashField>,
4185 },
4186 HashGetAll {
4187 key: BinaryValue,
4188 },
4189}
4190
4191pub const LODESTONE_API_STATE_OPTIONAL_VALUE_FORMAT_VERSION: u16 = 1;
4192#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4193#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4194pub enum StateOptionalValue {
4195 Missing,
4196 Value { value: BinaryValue },
4197}
4198
4199pub const LODESTONE_API_STATE_COMMAND_RESULT_FORMAT_VERSION: u16 = 1;
4200#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4201#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4202pub enum StateCommandResult {
4203 Get {
4204 value: StateOptionalValue,
4205 },
4206 Set {
4207 applied: bool,
4208 },
4209 Delete {
4210 removed: u32,
4211 },
4212 Exists {
4213 count: u32,
4214 },
4215 Expire {
4216 changed: bool,
4217 },
4218 TtlStatus {
4219 state: String,
4220 #[serde(default, skip_serializing_if = "Option::is_none")]
4221 remaining_millis: Option<U64>,
4222 },
4223 Persist {
4224 changed: bool,
4225 },
4226 MultiGet {
4227 values: Vec<StateOptionalValue>,
4228 },
4229 MultiSet {
4230 written: u32,
4231 },
4232 Increment {
4233 value: I64,
4234 },
4235 HashGet {
4236 value: StateOptionalValue,
4237 },
4238 HashSet {
4239 fields_added: u32,
4240 },
4241 HashGetAll {
4242 fields: Vec<StateHashField>,
4243 },
4244}
4245
4246pub const LODESTONE_API_STATE_WRITE_RESOLUTION_FORMAT_VERSION: u16 = 1;
4247#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4248#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4249pub enum StateWriteResolution {
4250 NotSubmitted,
4251 Resolved {
4252 result: StateCommandResult,
4253 sequence: U64,
4254 },
4255 KnownRetired {
4256 retired_through: U64,
4257 },
4258 StateReset {
4259 submitted_reset_epoch: U64,
4260 current_reset_epoch: U64,
4261 },
4262 Indeterminate {
4263 #[serde(default, skip_serializing_if = "Option::is_none")]
4264 observed_high_water: Option<U64>,
4265 #[serde(default, skip_serializing_if = "Option::is_none")]
4266 current_high_water: Option<U64>,
4267 #[serde(default, skip_serializing_if = "Option::is_none")]
4268 retired_through: Option<U64>,
4269 },
4270}
4271
4272pub const LODESTONE_API_SERVICE_CREDENTIAL_RESERVATION_FORMAT_VERSION: u16 = 1;
4273#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4274#[serde(deny_unknown_fields)]
4275pub struct ServiceCredentialReservation {
4276 pub locator: Locator,
4277 pub reservation_action_id: Digest,
4278 pub activation_action_id: Digest,
4279 pub principal_id: Identity,
4280 pub api_key_id: Identity,
4281 pub generation: U64,
4282 pub reservation_expires_at: U64,
4283 pub credential_expires_at: U64,
4284 pub verifier_algorithm: String,
4285 pub verifier_algorithm_version: u32,
4286 pub required_secret_bytes: u32,
4287}
4288
4289pub const LODESTONE_API_SUBSCRIPTION_METADATA_FIELD_FORMAT_VERSION: u16 = 1;
4290#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4291#[serde(rename_all = "snake_case")]
4292pub enum SubscriptionMetadataField {
4293 Id,
4294 RoutingHash,
4295 Operation,
4296 Shard,
4297 Sequence,
4298}
4299
4300pub const LODESTONE_API_SUBSCRIPTION_FIELD_FORMAT_VERSION: u16 = 1;
4301#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4302#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4303pub enum SubscriptionField {
4304 Source { path: String },
4305 Metadata { field: SubscriptionMetadataField },
4306}
4307
4308pub const LODESTONE_API_SUBSCRIPTION_FILTER_FORMAT_VERSION: u16 = 1;
4309#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4310#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4311pub enum SubscriptionFilter {
4312 All,
4313 Bool {
4314 must: Vec<SubscriptionFilter>,
4315 should: Vec<SubscriptionFilter>,
4316 must_not: Vec<SubscriptionFilter>,
4317 minimum_should_match: u32,
4318 },
4319 Term {
4320 field: SubscriptionField,
4321 value: JsonValue,
4322 },
4323 Terms {
4324 field: SubscriptionField,
4325 values: Vec<JsonValue>,
4326 },
4327 Range {
4328 field: SubscriptionField,
4329 #[serde(default, skip_serializing_if = "Option::is_none")]
4330 gt: Option<JsonValue>,
4331 #[serde(default, skip_serializing_if = "Option::is_none")]
4332 gte: Option<JsonValue>,
4333 #[serde(default, skip_serializing_if = "Option::is_none")]
4334 lt: Option<JsonValue>,
4335 #[serde(default, skip_serializing_if = "Option::is_none")]
4336 lte: Option<JsonValue>,
4337 },
4338 Exists {
4339 field: SubscriptionField,
4340 },
4341 Prefix {
4342 field: SubscriptionField,
4343 value: String,
4344 },
4345}
4346
4347pub const LODESTONE_API_SUBSCRIPTION_CURSOR_ENTRY_FORMAT_VERSION: u16 = 1;
4348#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4349#[serde(deny_unknown_fields)]
4350pub struct SubscriptionCursorEntry {
4351 pub index: Resource,
4352 pub routing_revision: U64,
4353 pub recovery_era: Identity,
4354 pub shard_id: U64,
4355 pub sequence: U64,
4356}
4357
4358pub const LODESTONE_API_SUBSCRIPTION_ROUTE_FORMAT_VERSION: u16 = 1;
4359#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4360#[serde(deny_unknown_fields)]
4361pub struct SubscriptionRoute {
4362 pub index: Resource,
4363 pub routing_revision: U64,
4364 pub shard_ids: Vec<U64>,
4365}
4366
4367pub const LODESTONE_API_SUBSCRIPTION_START_POSITION_FORMAT_VERSION: u16 = 1;
4368#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4369#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4370pub enum SubscriptionStartPosition {
4371 FromNow,
4372 Resume {
4373 routes: Vec<SubscriptionRoute>,
4374 cut: Vec<SubscriptionCursorEntry>,
4375 },
4376}
4377
4378pub const LODESTONE_API_SUBSCRIPTION_START_SHAPE_VERSION: u16 = 1;
4379pub const LODESTONE_API_SUBSCRIPTION_START_FORMAT_VERSION: u16 = 1;
4380#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4381#[serde(deny_unknown_fields)]
4382pub struct SubscriptionStart {
4383 pub format_version: u32,
4384 pub request_id: String,
4385 pub index: Resource,
4386 #[serde(default, skip_serializing_if = "Option::is_none")]
4387 pub filter: Option<SubscriptionFilter>,
4388 pub include_deletes: bool,
4389 pub source_projection: Vec<String>,
4390 pub reconnect_attempt: u32,
4391 pub start: SubscriptionStartPosition,
4392 pub heartbeat_millis: U64,
4393 pub schema_digest: Digest,
4394}
4395
4396pub const LODESTONE_API_SUBSCRIPTION_ACCEPTED_SHAPE_VERSION: u16 = 1;
4397pub const LODESTONE_API_SUBSCRIPTION_ACCEPTED_FORMAT_VERSION: u16 = 1;
4398#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4399#[serde(deny_unknown_fields)]
4400pub struct SubscriptionAccepted {
4401 pub format_version: u32,
4402 pub routes: Vec<SubscriptionRoute>,
4403 pub accepted_cut: Vec<SubscriptionCursorEntry>,
4404 pub schema_digest: Digest,
4405}
4406
4407pub const LODESTONE_API_SUBSCRIPTION_WRITER_FENCE_FORMAT_VERSION: u16 = 1;
4408#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4409#[serde(deny_unknown_fields)]
4410pub struct SubscriptionWriterFence {
4411 pub recovery_era: Identity,
4412 pub epoch: u32,
4413}
4414
4415pub const LODESTONE_API_SUBSCRIPTION_EVENT_SHAPE_VERSION: u16 = 1;
4416pub const LODESTONE_API_SUBSCRIPTION_EVENT_FORMAT_VERSION: u16 = 1;
4417#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4418#[serde(deny_unknown_fields)]
4419pub struct SubscriptionEvent {
4420 pub format_version: u32,
4421 pub event_id: Digest,
4422 pub index: Resource,
4423 pub shard_id: U64,
4424 pub recovery_era: Identity,
4425 pub writer_fence: SubscriptionWriterFence,
4426 pub routing_revision: U64,
4427 pub sequence: U64,
4428 pub operation: String,
4429 pub document_id: String,
4430 pub routing_hash: u32,
4431 #[serde(default, skip_serializing_if = "Option::is_none")]
4432 pub source: Option<RawJson>,
4433}
4434
4435pub const LODESTONE_API_SUBSCRIPTION_HEARTBEAT_SHAPE_VERSION: u16 = 1;
4436pub const LODESTONE_API_SUBSCRIPTION_HEARTBEAT_FORMAT_VERSION: u16 = 1;
4437#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4438#[serde(deny_unknown_fields)]
4439pub struct SubscriptionHeartbeat {
4440 pub format_version: u32,
4441 pub confirmed_cut: Vec<SubscriptionCursorEntry>,
4442 pub route_revision: U64,
4443 pub authorization_revision: U64,
4444 pub authorization_valid_until_millis: U64,
4445}
4446
4447pub const LODESTONE_API_SUBSCRIPTION_GAP_SHAPE_VERSION: u16 = 1;
4448pub const LODESTONE_API_SUBSCRIPTION_GAP_FORMAT_VERSION: u16 = 1;
4449#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4450#[serde(deny_unknown_fields)]
4451pub struct SubscriptionGap {
4452 pub format_version: u32,
4453 pub affected: Vec<SubscriptionCursorEntry>,
4454 pub last_confirmed: Vec<SubscriptionCursorEntry>,
4455 pub earliest_available: Vec<SubscriptionCursorEntry>,
4456 pub reason: String,
4457 pub terminal: bool,
4458}
4459
4460pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_REASON_FORMAT_VERSION: u16 = 1;
4461#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4462#[serde(rename_all = "snake_case")]
4463pub enum SubscriptionTerminalReason {
4464 Completed,
4465 Cancelled,
4466 DeadlineExceeded,
4467 StaleCursor,
4468 RetentionGap,
4469 Unavailable,
4470 Internal,
4471}
4472
4473pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_SHAPE_VERSION: u16 = 2;
4474pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_FORMAT_VERSION: u16 = 2;
4475#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4476#[serde(deny_unknown_fields)]
4477pub struct SubscriptionTerminal {
4478 pub format_version: u32,
4479 pub reason: SubscriptionTerminalReason,
4480 pub recovery: RecoveryAction,
4481}
4482
4483pub const LODESTONE_API_SUBSCRIPTION_FRAME_FORMAT_VERSION: u16 = 1;
4484#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4485#[serde(tag = "frame", rename_all = "snake_case", deny_unknown_fields)]
4486pub enum SubscriptionFrame {
4487 Accepted { body: SubscriptionAccepted },
4488 Event { body: SubscriptionEvent },
4489 Heartbeat { body: SubscriptionHeartbeat },
4490 Gap { body: SubscriptionGap },
4491 Terminal { body: SubscriptionTerminal },
4492}
4493
4494pub const LODESTONE_API_STREAM_BINDING_FORMAT_VERSION: u16 = 1;
4495#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4496#[serde(deny_unknown_fields)]
4497pub struct StreamBinding {
4498 pub name: String,
4499 pub transport: String,
4500 pub service: String,
4501 pub method: String,
4502 pub endpoint: String,
4503 pub auth_metadata: String,
4504 pub auth_scheme: String,
4505 pub semantic_format_version: u32,
4506 pub schema_digest: Digest,
4507}
4508
4509pub const LODESTONE_API_CAPABILITY_GRANT_FORMAT_VERSION: u16 = 1;
4510#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4511#[serde(deny_unknown_fields)]
4512pub struct CapabilityGrant {
4513 pub command: String,
4514 pub action: String,
4515 pub state: String,
4516 pub reason: String,
4517 pub mutation_class: String,
4518 pub cancellable: bool,
4519 pub workload_classes: Vec<WorkloadClass>,
4520 pub possible_submission_states: Vec<String>,
4521 pub capability_family: String,
4522 pub effect_class: String,
4523 pub risk_flags: Vec<String>,
4524 pub admissible_errors: Vec<String>,
4525 pub referenced_limits: Vec<String>,
4526 pub retry_safety: String,
4527 pub identity_requirement: String,
4528 #[serde(default, skip_serializing_if = "Option::is_none")]
4529 pub resolver_command: Option<String>,
4530 pub cancellation: String,
4531 pub side_effects: Vec<String>,
4532 pub recovery: String,
4533 pub index_patterns: Vec<String>,
4534 pub exact_index_incarnations: Vec<Identity>,
4535}
4536
4537pub const LODESTONE_API_PROTOCOL_LIMIT_FORMAT_VERSION: u16 = 1;
4538#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4539#[serde(deny_unknown_fields)]
4540pub struct ProtocolLimit {
4541 pub id: String,
4542 pub default: U64,
4543 pub maximum: U64,
4544 pub unit: String,
4545}
4546
4547pub const LODESTONE_API_DOCUMENT_MUTATION_CONDITION_FORMAT_VERSION: u16 = 1;
4548#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4549#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4550pub enum DocumentMutationCondition {
4551 Any,
4552 MustNotExist,
4553 IfSeqNo { seq_no: U64 },
4554 IfSeqNoAndPrimaryTerm { seq_no: U64, primary_term: U64 },
4555}
4556
4557pub const LODESTONE_API_AUDIT_ADAPTER_FORMAT_VERSION: u16 = 1;
4558#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4559#[serde(rename_all = "snake_case")]
4560pub enum AuditAdapter {
4561 Native,
4562 Elasticsearch,
4563 Otlp,
4564 Jaeger,
4565 Grpc,
4566 WebSocket,
4567 Resp,
4568 InternalRpc,
4569 ControlPlane,
4570}
4571
4572pub const LODESTONE_API_AUDIT_DECISION_FORMAT_VERSION: u16 = 1;
4573#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4574#[serde(rename_all = "snake_case")]
4575pub enum AuditDecision {
4576 Allowed,
4577 DeniedAuthentication,
4578 DeniedAuthorization,
4579 DeniedQuota,
4580 DeniedStalePolicy,
4581}
4582
4583pub const LODESTONE_API_AUDIT_OUTCOME_FORMAT_VERSION: u16 = 1;
4584#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4585#[serde(rename_all = "snake_case")]
4586pub enum AuditOutcome {
4587 AdmissionAccepted,
4588 AuthenticationRefused,
4589 AuthorizationRefused,
4590 QuotaRefused,
4591 PolicyUnavailable,
4592 DecodeFailed,
4593 OperationSucceeded,
4594 OperationFailed,
4595 OperationIndeterminate,
4596 FailedRedacted,
4597}
4598
4599pub const LODESTONE_API_AUDIT_DETAIL_FORMAT_VERSION: u16 = 1;
4600#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4601#[serde(rename_all = "snake_case")]
4602pub enum AuditDetail {
4603 PolicyMutation,
4604 CredentialRotation,
4605 CredentialRevocation,
4606 QuotaAdmission,
4607 RequestAdmission,
4608 ExplicitCrashGap,
4609 BackupLifecycle,
4610 RetentionLifecycle,
4611 FieldPromotion,
4612}
4613
4614pub const LODESTONE_API_AUDIT_GAP_REASON_FORMAT_VERSION: u16 = 1;
4615#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4616#[serde(rename_all = "snake_case")]
4617pub enum AuditGapReason {
4618 ExplicitCrashGap,
4619 Retention,
4620}
4621
4622pub const LODESTONE_API_AUDIT_EVENT_FORMAT_VERSION: u16 = 2;
4623#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4624#[serde(deny_unknown_fields)]
4625pub struct AuditEvent {
4626 pub event_id: Digest,
4627 pub recovery_era: Identity,
4628 pub sequence: U64,
4629 pub server_time: U64,
4630 #[serde(default, skip_serializing_if = "Option::is_none")]
4631 pub principal_id: Option<Identity>,
4632 #[serde(default, skip_serializing_if = "Option::is_none")]
4633 pub api_key_id: Option<Identity>,
4634 pub policy_revision: U64,
4635 pub adapter: AuditAdapter,
4636 pub action: String,
4637 pub resource_digest: Digest,
4638 pub request_digest: Digest,
4639 #[serde(default, skip_serializing_if = "Option::is_none")]
4640 pub correlation_id: Option<Identity>,
4641 #[serde(default, skip_serializing_if = "Option::is_none")]
4642 pub diagnostic_id: Option<Identity>,
4643 pub decision: AuditDecision,
4644 pub outcome: AuditOutcome,
4645 pub detail: AuditDetail,
4646}
4647
4648pub const LODESTONE_API_AUDIT_GAP_FORMAT_VERSION: u16 = 2;
4649#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4650#[serde(deny_unknown_fields)]
4651pub struct AuditGap {
4652 pub recovery_era: Identity,
4653 pub first_sequence: U64,
4654 pub last_sequence: U64,
4655 pub reason: AuditGapReason,
4656}
4657
4658pub const LODESTONE_API_AUDIT_STREAM_STATE_FORMAT_VERSION: u16 = 1;
4659#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4660#[serde(deny_unknown_fields)]
4661pub struct AuditStreamState {
4662 pub recovery_era: Identity,
4663 pub earliest_available_sequence: U64,
4664 pub snapshot_through: U64,
4665}
4666
4667pub const LODESTONE_API_SERVICE_CREDENTIAL_GRANT_FORMAT_VERSION: u16 = 1;
4668#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4669#[serde(deny_unknown_fields)]
4670pub struct ServiceCredentialGrant {
4671 pub role_name: String,
4672 pub role_version: U64,
4673}
4674
4675pub const LODESTONE_API_SERVICE_CREDENTIAL_SUMMARY_FORMAT_VERSION: u16 = 1;
4676#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4677#[serde(deny_unknown_fields)]
4678pub struct ServiceCredentialSummary {
4679 pub principal_id: Identity,
4680 pub api_key_id: Identity,
4681 pub generation: U64,
4682 pub state: String,
4683 #[serde(default, skip_serializing_if = "Option::is_none")]
4684 pub expires_at: Option<U64>,
4685 pub grants: Vec<ServiceCredentialGrant>,
4686}
4687
4688pub const LODESTONE_API_SECURITY_ROLE_FORMAT_VERSION: u16 = 1;
4689#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4690#[serde(deny_unknown_fields)]
4691pub struct SecurityRole {
4692 pub role_name: String,
4693 pub version: U64,
4694 pub permissions: Vec<String>,
4695 pub delegable_permissions: Vec<String>,
4696 pub allowed_workload_classes: Vec<WorkloadClass>,
4697 pub index_patterns: Vec<String>,
4698 pub append_index_incarnations: Vec<Identity>,
4699}
4700
4701pub const LODESTONE_API_ROLE_APPEND_SCOPE_CHANGE_FORMAT_VERSION: u16 = 1;
4702#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4703#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4704pub enum RoleAppendScopeChange {
4705 Add { index: Resource },
4706 Remove { index_incarnation: Identity },
4707}
4708
4709pub const LODESTONE_API_ROLE_APPEND_ACCESS_PREPARATION_FORMAT_VERSION: u16 = 1;
4710#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4711#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4712pub enum RoleAppendAccessPreparation {
4713 Prepared {
4714 locator: Locator,
4715 semantic_digest: Digest,
4716 expires_at: U64,
4717 predecessor_role_version: U64,
4718 successor_role_version: U64,
4719 },
4720 AlreadySatisfied {
4721 role: SecurityRole,
4722 },
4723}
4724
4725pub const LODESTONE_API_SECURITY_ACTION_OUTCOME_FORMAT_VERSION: u16 = 1;
4726#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4727#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4728pub enum SecurityActionOutcome {
4729 Reserved {
4730 principal_id: Identity,
4731 api_key_id: Identity,
4732 generation: U64,
4733 },
4734 Activated {
4735 principal_id: Identity,
4736 api_key_id: Identity,
4737 generation: U64,
4738 },
4739 Revoked {
4740 principal_id: Identity,
4741 api_key_id: Identity,
4742 generation: U64,
4743 },
4744 Retired {
4745 principal_id: Identity,
4746 api_key_id: Identity,
4747 generation: U64,
4748 },
4749}
4750
4751pub const LODESTONE_API_MAINTENANCE_WORK_STATE_FORMAT_VERSION: u16 = 1;
4752#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4753#[serde(rename_all = "snake_case")]
4754pub enum MaintenanceWorkState {
4755 ParkedOperatorRequired,
4756 RetryWait,
4757 RetryReady,
4758 Leased,
4759 Deferred,
4760 Runnable,
4761}
4762
4763pub const LODESTONE_API_MAINTENANCE_ATTEMPT_STATE_FORMAT_VERSION: u16 = 1;
4764#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4765#[serde(rename_all = "snake_case")]
4766pub enum MaintenanceAttemptState {
4767 Running,
4768 DeadlineExceededDraining,
4769 DeadlineExceededReclaimPending,
4770 CancellationDraining,
4771 ClaimRecoveryPending,
4772}
4773
4774pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_FORMAT_VERSION: u16 = 1;
4775#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4776#[serde(rename_all = "snake_case")]
4777pub enum MaintenanceFailureClass {
4778 Corruption,
4779 AttemptBudget,
4780 StructuralLimit,
4781 Execution,
4782 Other,
4783}
4784
4785pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_COUNT_FORMAT_VERSION: u16 = 1;
4786#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4787#[serde(deny_unknown_fields)]
4788pub struct MaintenanceFailureClassCount {
4789 pub class: MaintenanceFailureClass,
4790 pub count: U64,
4791}
4792
4793pub const LODESTONE_API_MAINTENANCE_ATTEMPT_OBSERVATION_FORMAT_VERSION: u16 = 1;
4794#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4795#[serde(deny_unknown_fields)]
4796pub struct MaintenanceAttemptObservation {
4797 pub state: MaintenanceAttemptState,
4798 pub lease_epoch: U64,
4799 pub lease_expires_at: U64,
4800 pub observed_at_millis: U64,
4801}
4802
4803pub const LODESTONE_API_MAINTENANCE_TASK_SCOPE_FORMAT_VERSION: u16 = 1;
4804#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4805#[serde(deny_unknown_fields)]
4806pub struct MaintenanceTaskScope {
4807 pub kind: String,
4808 #[serde(default, skip_serializing_if = "Option::is_none")]
4809 pub index: Option<Resource>,
4810 #[serde(default, skip_serializing_if = "Option::is_none")]
4811 pub shard_id: Option<u32>,
4812}
4813
4814pub const LODESTONE_API_MAINTENANCE_TASK_STATUS_FORMAT_VERSION: u16 = 1;
4815#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4816#[serde(deny_unknown_fields)]
4817pub struct MaintenanceTaskStatus {
4818 pub task_id: Identity,
4819 pub kind: String,
4820 pub scope: MaintenanceTaskScope,
4821 pub checkpoint_generation: U64,
4822 pub attempt_count: u32,
4823 pub admitted_at: U64,
4824 pub last_transition_at: U64,
4825 pub last_progress_at: U64,
4826 pub work_state: MaintenanceWorkState,
4827 pub state_since: U64,
4828 #[serde(default, skip_serializing_if = "Option::is_none")]
4829 pub defer_reason: Option<String>,
4830 pub cancellation_requested: bool,
4831 #[serde(default, skip_serializing_if = "Option::is_none")]
4832 pub retry_not_before: Option<U64>,
4833 #[serde(default, skip_serializing_if = "Option::is_none")]
4834 pub failure_at: Option<U64>,
4835 #[serde(default, skip_serializing_if = "Option::is_none")]
4836 pub lease_acquired_at: Option<U64>,
4837 #[serde(default, skip_serializing_if = "Option::is_none")]
4838 pub lease_expires_at: Option<U64>,
4839 #[serde(default, skip_serializing_if = "Option::is_none")]
4840 pub failure_class: Option<MaintenanceFailureClass>,
4841 #[serde(default, skip_serializing_if = "Option::is_none")]
4842 pub failure_code: Option<String>,
4843 pub operator_action_required: bool,
4844 #[serde(default, skip_serializing_if = "Option::is_none")]
4845 pub local_attempt: Option<MaintenanceAttemptObservation>,
4846}
4847
4848pub const LODESTONE_API_MAINTENANCE_STATUS_AGGREGATE_SHAPE_VERSION: u16 = 1;
4849pub const LODESTONE_API_MAINTENANCE_STATUS_AGGREGATE_FORMAT_VERSION: u16 = 2;
4850#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4851#[serde(deny_unknown_fields)]
4852pub struct MaintenanceStatusAggregate {
4853 pub format_version: u32,
4854 pub recovery_era: Identity,
4855 pub source_revision: U64,
4856 pub root_revision: U64,
4857 pub logical_observation_time: U64,
4858 #[serde(default, skip_serializing_if = "Option::is_none")]
4859 pub local_observation_millis: Option<U64>,
4860 pub total_incomplete: U64,
4861 pub parked_operator_required: U64,
4862 pub retry_wait: U64,
4863 pub retry_ready: U64,
4864 pub leased: U64,
4865 pub deferred: U64,
4866 pub runnable: U64,
4867 pub eligible_backlog: U64,
4868 pub cancellation_requested: U64,
4869 #[serde(default, skip_serializing_if = "Option::is_none")]
4870 pub oldest_backlog_age: Option<U64>,
4871 #[serde(default, skip_serializing_if = "Option::is_none")]
4872 pub oldest_runnable_age: Option<U64>,
4873 #[serde(default, skip_serializing_if = "Option::is_none")]
4874 pub oldest_retry_wait_age: Option<U64>,
4875 #[serde(default, skip_serializing_if = "Option::is_none")]
4876 pub oldest_parked_age: Option<U64>,
4877 #[serde(default, skip_serializing_if = "Option::is_none")]
4878 pub oldest_no_progress_age: Option<U64>,
4879 pub current_action_capacity: u32,
4880 pub maximum_action_capacity: u32,
4881 pub active_passes: U64,
4882 pub local_in_flight: U64,
4883 pub deadline_draining: U64,
4884 pub cancellation_draining: U64,
4885 pub claim_recovery_pending: U64,
4886 pub projection_refresh_pending: bool,
4887 #[serde(default, skip_serializing_if = "Option::is_none")]
4888 pub durable_last_progress_at: Option<U64>,
4889 pub tasks_claimed_total: U64,
4890 pub tasks_progressed_total: U64,
4891 pub tasks_completed_total: U64,
4892 pub task_retries_total: U64,
4893 pub task_failures_total: U64,
4894 pub deadline_failures_total: U64,
4895 pub cancellations_total: U64,
4896 pub overlay_capacity_exhaustions_total: U64,
4897 pub failure_classes: Vec<MaintenanceFailureClassCount>,
4898}
4899
4900pub const LODESTONE_API_RUNTIME_STATUS_DETAIL_FORMAT_VERSION: u16 = 1;
4901#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4902#[serde(deny_unknown_fields)]
4903pub struct RuntimeStatusDetail {
4904 pub metastore_revision: U64,
4905 pub root_revision: U64,
4906 pub logical_time: U64,
4907 pub degraded_dependencies: Vec<String>,
4908}
4909
4910pub const LODESTONE_API_RESULT_CACHE_STATUS_SHAPE_VERSION: u16 = 2;
4911pub const LODESTONE_API_RESULT_CACHE_STATUS_FORMAT_VERSION: u16 = 3;
4912#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4913#[serde(deny_unknown_fields)]
4914pub struct ResultCacheStatus {
4915 pub format_version: u32,
4916 pub hits: U64,
4917 pub misses: U64,
4918 pub admissions: U64,
4919 pub bypasses: U64,
4920 pub evictions: U64,
4921 pub collection_bytes: U64,
4922 pub collection_entries: u32,
4923}
4924
4925pub const LODESTONE_API_FIELD_PROMOTION_STATUS_SHAPE_VERSION: u16 = 1;
4926pub const LODESTONE_API_FIELD_PROMOTION_STATUS_FORMAT_VERSION: u16 = 3;
4927#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4928#[serde(deny_unknown_fields)]
4929pub struct FieldPromotionStatus {
4930 pub format_version: u32,
4931 pub index: Resource,
4932 pub mapping_generation: U64,
4933 pub policy_generation: U64,
4934 #[serde(default, skip_serializing_if = "Option::is_none")]
4935 pub last_decision_generation: Option<U64>,
4936 pub heat_records: u32,
4937 pub promoted_fields: u32,
4938 pub extra_bytes: U64,
4939 pub enabled: bool,
4940}
4941
4942pub const LODESTONE_API_OVERLOAD_SHARD_STATUS_SHAPE_VERSION: u16 = 2;
4943pub const LODESTONE_API_OVERLOAD_SHARD_STATUS_FORMAT_VERSION: u16 = 3;
4944#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4945#[serde(deny_unknown_fields)]
4946pub struct OverloadShardStatus {
4947 pub format_version: u32,
4948 pub shard_id: u32,
4949 pub writer_epoch: U64,
4950 pub configured_mode: String,
4951 pub effective_disposition: String,
4952 pub registered_through: U64,
4953 pub indexed_through: U64,
4954 pub lag_operations: U64,
4955 pub backlog_bytes: U64,
4956 pub oldest_age_millis: U64,
4957 pub collection_share_bytes: U64,
4958 pub recovery_ops_this_pass: u32,
4959 pub pending_overlay_documents: U64,
4960 #[serde(default, skip_serializing_if = "Option::is_none")]
4961 pub shed_reason: Option<String>,
4962}
4963
4964pub const LODESTONE_API_EXTERNAL_KEY_BINDING_FORMAT_VERSION: u16 = 1;
4965#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4966#[serde(deny_unknown_fields)]
4967pub struct ExternalKeyBinding {
4968 pub content_key_id: Identity,
4969 pub content_key_generation: U64,
4970 pub binding_id: Identity,
4971 pub binding_generation: U64,
4972 pub access_generation: U64,
4973 pub opaque_binding_base64: String,
4974 pub object_context_digest: Digest,
4975}
4976
4977pub const LODESTONE_API_ROLLUP_MEASURE_FORMAT_VERSION: u16 = 1;
4978#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4979#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4980pub enum RollupMeasure {
4981 Count,
4982 Sum { field_path_digest: Digest },
4983 Min { field_path_digest: Digest },
4984 Max { field_path_digest: Digest },
4985}
4986
4987pub const LODESTONE_API_AGGREGATE_THEN_DELETE_POLICY_FORMAT_VERSION: u16 = 1;
4988#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4989#[serde(deny_unknown_fields)]
4990pub struct AggregateThenDeletePolicy {
4991 pub policy_id: Identity,
4992 pub policy_generation: U64,
4993 pub detail_retirement_acknowledged: bool,
4994 #[serde(default, skip_serializing_if = "Option::is_none")]
4995 pub expected_policy_generation: Option<U64>,
4996 pub timestamp_field_digest: Digest,
4997 pub bucket_width_millis: U64,
4998 pub bucket_alignment_millis: U64,
4999 pub dimensions: Vec<Digest>,
5000 pub measures: Vec<RollupMeasure>,
5001}
5002
5003pub const LODESTONE_API_LIFECYCLE_BINDING_STATUS_FORMAT_VERSION: u16 = 1;
5004#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5005#[serde(deny_unknown_fields)]
5006pub struct LifecycleBindingStatus {
5007 pub content_key_id: Identity,
5008 pub content_key_generation: U64,
5009 pub binding_id: Identity,
5010 pub binding_generation: U64,
5011 pub access_generation: U64,
5012}
5013
5014pub const LODESTONE_API_LIFECYCLE_ROLLUP_STATUS_FORMAT_VERSION: u16 = 1;
5015#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5016#[serde(deny_unknown_fields)]
5017pub struct LifecycleRollupStatus {
5018 pub policy_id: Identity,
5019 pub policy_generation: U64,
5020 pub ledger_revision: U64,
5021 pub coverages: u32,
5022 pub raw_retired_coverages: u32,
5023 pub detail_retirement_acknowledged: bool,
5024 pub query_contract_version: u32,
5025 pub timestamp_field_digest: Digest,
5026 pub bucket_width_millis: U64,
5027 pub bucket_alignment_millis: U64,
5028 pub dimensions: Vec<Digest>,
5029 pub measures: Vec<RollupMeasure>,
5030}
5031
5032pub const LODESTONE_API_LIFECYCLE_STATUS_SHAPE_VERSION: u16 = 2;
5033pub const LODESTONE_API_LIFECYCLE_STATUS_FORMAT_VERSION: u16 = 4;
5034#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5035#[serde(deny_unknown_fields)]
5036pub struct LifecycleStatus {
5037 pub format_version: u32,
5038 pub index: Resource,
5039 pub authority_revision: U64,
5040 pub active_bindings: Vec<LifecycleBindingStatus>,
5041 #[serde(default, skip_serializing_if = "Option::is_none")]
5042 pub rollup: Option<LifecycleRollupStatus>,
5043}
5044
5045pub const LODESTONE_API_QUOTA_LIMIT_FORMAT_VERSION: u16 = 1;
5046#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5047#[serde(deny_unknown_fields)]
5048pub struct QuotaLimit {
5049 pub dimension: String,
5050 pub maximum: U64,
5051 pub window_millis: U64,
5052}
5053
5054pub const LODESTONE_API_QUOTA_CONSUMPTION_FORMAT_VERSION: u16 = 1;
5055#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5056#[serde(deny_unknown_fields)]
5057pub struct QuotaConsumption {
5058 pub dimension: String,
5059 pub consumed: U64,
5060 pub window_millis: U64,
5061}
5062
5063pub const LODESTONE_API_QUOTA_UPDATE_FORMAT_VERSION: u16 = 1;
5064#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5065#[serde(deny_unknown_fields)]
5066pub struct QuotaUpdate {
5067 pub revision: U64,
5068 pub state: String,
5069}
5070
5071pub const LODESTONE_API_STORAGE_OVERALL_POSTURE_FORMAT_VERSION: u16 = 1;
5072#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5073#[serde(rename_all = "snake_case")]
5074pub enum StorageOverallPosture {
5075 FilesystemDevelopment,
5076 ProviderObjectStorage,
5077 S3CompatibleDevelopment,
5078 Mixed,
5079}
5080
5081pub const LODESTONE_API_STORAGE_PROFILE_ROLE_FORMAT_VERSION: u16 = 1;
5082#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5083#[serde(rename_all = "snake_case")]
5084pub enum StorageProfileRole {
5085 Control,
5086 DefaultWal,
5087 DefaultData,
5088}
5089
5090pub const LODESTONE_API_STORAGE_PROVIDER_POSTURE_FORMAT_VERSION: u16 = 1;
5091#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5092#[serde(rename_all = "snake_case")]
5093pub enum StorageProviderPosture {
5094 Aws,
5095 GoogleCloudStorage,
5096 AzureBlob,
5097 S3CompatibleDevelopment,
5098 FilesystemDevelopment,
5099}
5100
5101pub const LODESTONE_API_STORAGE_BACKEND_SERVICE_CLASS_FORMAT_VERSION: u16 = 1;
5102#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5103#[serde(rename_all = "snake_case")]
5104pub enum StorageBackendServiceClass {
5105 RegionalObject,
5106 ZonalLowLatency,
5107}
5108
5109pub const LODESTONE_API_STORAGE_PROFILE_ROLE_BINDING_FORMAT_VERSION: u16 = 1;
5110#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5111#[serde(deny_unknown_fields)]
5112pub struct StorageProfileRoleBinding {
5113 pub role: StorageProfileRole,
5114 pub authority_group: u32,
5115 pub provider: StorageProviderPosture,
5116 pub service_class: StorageBackendServiceClass,
5117}
5118
5119pub const LODESTONE_API_STORAGE_PROFILE_ATTESTATION_SHAPE_VERSION: u16 = 1;
5120pub const LODESTONE_API_STORAGE_PROFILE_ATTESTATION_FORMAT_VERSION: u16 = 1;
5121#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5122#[serde(deny_unknown_fields)]
5123pub struct StorageProfileAttestation {
5124 pub format_version: u32,
5125 pub configuration_generation: U64,
5126 pub overall_posture: StorageOverallPosture,
5127 pub roles: Vec<StorageProfileRoleBinding>,
5128 pub default_durability: ResourceDurabilityClass,
5129 pub default_storage: ResourceStorageClass,
5130 pub default_policy_digest: Digest,
5131 pub storage_profile_digest: Digest,
5132 pub attestation_digest: Digest,
5133}
5134
5135pub const LODESTONE_API_STORAGE_PROFILE_EXPECTATION_SHAPE_VERSION: u16 = 1;
5136pub const LODESTONE_API_STORAGE_PROFILE_EXPECTATION_FORMAT_VERSION: u16 = 1;
5137#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5138#[serde(deny_unknown_fields)]
5139pub struct StorageProfileExpectation {
5140 pub format_version: u32,
5141 #[serde(default, skip_serializing_if = "Option::is_none")]
5142 pub required_posture: Option<StorageOverallPosture>,
5143 #[serde(default, skip_serializing_if = "Option::is_none")]
5144 pub expected_storage_profile_digest: Option<Digest>,
5145}
5146
5147pub const LODESTONE_API_CORE_BINDING_FORMAT_VERSION: u16 = 3;
5148#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5149#[serde(deny_unknown_fields)]
5150pub struct CoreBinding {
5151 pub cluster_id: Identity,
5152 pub collection_id: Identity,
5153 pub configuration_generation: U64,
5154 pub native_endpoints: Vec<String>,
5155 pub selected_stream_endpoint: String,
5156 pub schema_id: String,
5157 pub schema_digest: Digest,
5158 pub storage_profile: StorageProfileAttestation,
5159}
5160
5161pub const LODESTONE_API_READINESS_OBSERVATION_FORMAT_VERSION: u16 = 1;
5162#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5163#[serde(deny_unknown_fields)]
5164pub struct ReadinessObservation {
5165 pub subject: String,
5166 pub state: String,
5167 #[serde(default, skip_serializing_if = "Option::is_none")]
5168 pub reason: Option<String>,
5169 pub revision: U64,
5170 pub observed_cut: U64,
5171}
5172
5173pub const LODESTONE_API_USAGE_DIMENSION_FORMAT_VERSION: u16 = 1;
5174#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5175#[serde(deny_unknown_fields)]
5176pub struct UsageDimension {
5177 pub name: String,
5178 pub value: String,
5179}
5180
5181pub const LODESTONE_API_PHYSICAL_USAGE_VALUE_FORMAT_VERSION: u16 = 2;
5182#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5183#[serde(deny_unknown_fields)]
5184pub struct PhysicalUsageValue {
5185 pub meter: String,
5186 pub unit: String,
5187 pub value: ExactDecimal,
5188}
5189
5190pub const LODESTONE_API_CORE_USAGE_UNITS_FORMAT_VERSION: u16 = 2;
5191#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5192#[serde(deny_unknown_fields)]
5193pub struct CoreUsageUnits {
5194 pub sequence: U64,
5195 pub record_identity: Digest,
5196 pub index_id: Identity,
5197 pub workload_class: WorkloadClass,
5198 pub window_start: U64,
5199 pub window_end: U64,
5200 pub meter_set_version: u32,
5201 pub dimensions: Vec<UsageDimension>,
5202 pub values: Vec<PhysicalUsageValue>,
5203 pub authority_revision: U64,
5204 pub source_digest: Digest,
5205}
5206
5207pub const LODESTONE_API_CORE_USAGE_CORRECTION_FORMAT_VERSION: u16 = 2;
5208#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5209#[serde(deny_unknown_fields)]
5210pub struct CoreUsageCorrection {
5211 pub sequence: U64,
5212 pub correction_sequence: U64,
5213 pub correction_identity: Digest,
5214 pub target_record_identity: Digest,
5215 pub index_id: Identity,
5216 pub workload_class: WorkloadClass,
5217 pub window_start: U64,
5218 pub window_end: U64,
5219 pub meter_set_version: u32,
5220 pub dimensions: Vec<UsageDimension>,
5221 pub values: Vec<PhysicalUsageValue>,
5222 pub reason_digest: Digest,
5223 pub authority_revision: U64,
5224 pub source_digest: Digest,
5225}
5226
5227pub const LODESTONE_API_RESPONSE_META_SHAPE_VERSION: u16 = 1;
5228pub const LODESTONE_API_RESPONSE_META_FORMAT_VERSION: u16 = 1;
5229#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5230#[serde(deny_unknown_fields)]
5231pub struct ResponseMeta {
5232 pub format_version: u32,
5233 pub request_id: String,
5234 pub correlation_id: Identity,
5235 pub diagnostic_id: Identity,
5236}
5237
5238pub const LODESTONE_API_ERROR_DISPOSITION_FORMAT_VERSION: u16 = 1;
5239#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5240#[serde(rename_all = "snake_case")]
5241pub enum ErrorDisposition {
5242 NotSubmitted,
5243 Submitted,
5244 Resolved,
5245 KnownRetired,
5246 Indeterminate,
5247}
5248
5249pub const LODESTONE_API_RECOVERY_ACTION_FORMAT_VERSION: u16 = 1;
5250#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5251#[serde(rename_all = "snake_case")]
5252pub enum RecoveryAction {
5253 Retry,
5254 RetryAfter,
5255 RefreshCredential,
5256 RestartPage,
5257 ReduceRequest,
5258 Resolve,
5259 RefreshPrecondition,
5260 CorrectRange,
5261 Stop,
5262}
5263
5264pub const LODESTONE_API_LIMIT_CLASS_FORMAT_VERSION: u16 = 1;
5265#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5266#[serde(rename_all = "snake_case")]
5267pub enum LimitClass {
5268 RequestBound,
5269 CollectionQuota,
5270 EngineSafety,
5271}
5272
5273pub const LODESTONE_API_ERROR_DETAIL_FORMAT_VERSION: u16 = 3;
5274#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5275#[serde(tag = "code", rename_all = "snake_case", deny_unknown_fields)]
5276pub enum ErrorDetail {
5277 Aborted {
5278 reason: String,
5279 },
5280 DeadlineExceeded,
5281 InvalidRequest {
5282 #[serde(default, skip_serializing_if = "Option::is_none")]
5283 field: Option<String>,
5284 reason: String,
5285 },
5286 UnsupportedVersion {
5287 observed: u32,
5288 maximum_supported: u32,
5289 },
5290 Unauthenticated,
5291 PermissionDenied {
5292 #[serde(default, skip_serializing_if = "Option::is_none")]
5293 action: Option<String>,
5294 #[serde(default, skip_serializing_if = "Option::is_none")]
5295 workload_class: Option<WorkloadClass>,
5296 },
5297 NotFound {
5298 #[serde(default, skip_serializing_if = "Option::is_none")]
5299 resource: Option<String>,
5300 },
5301 Conflict {
5302 #[serde(default, skip_serializing_if = "Option::is_none")]
5303 expected_revision: Option<U64>,
5304 #[serde(default, skip_serializing_if = "Option::is_none")]
5305 observed_revision: Option<U64>,
5306 },
5307 StaleCursor {
5308 restart_count: u32,
5309 },
5310 RestartBudgetExhausted {
5311 maximum_restarts: u32,
5312 },
5313 LimitExceeded {
5314 class: LimitClass,
5315 limit_id: String,
5316 maximum: U64,
5317 },
5318 CapabilityUnavailable {
5319 #[serde(default, skip_serializing_if = "Option::is_none")]
5320 capability: Option<String>,
5321 },
5322 NotSubmitted {
5323 #[serde(default, skip_serializing_if = "Option::is_none")]
5324 retry_after_millis: Option<U64>,
5325 },
5326 SubmittedIndeterminate {
5327 #[serde(default, skip_serializing_if = "Option::is_none")]
5328 locator: Option<Locator>,
5329 },
5330 ExpiredUnknown {
5331 #[serde(default, skip_serializing_if = "Option::is_none")]
5332 locator: Option<Locator>,
5333 },
5334 SecretNotEscrowed,
5335 RetentionGap {
5336 retired_through: U64,
5337 },
5338 ArtifactRangeInvalid {
5339 maximum_bytes: U64,
5340 },
5341 ChecksumMismatch {
5342 expected: Digest,
5343 observed: Digest,
5344 },
5345 TemporarilyUnavailable {
5346 #[serde(default, skip_serializing_if = "Option::is_none")]
5347 retry_after_millis: Option<U64>,
5348 },
5349 Internal,
5350}
5351
5352pub const LODESTONE_API_CONNECTION_PROFILE_SHAPE_VERSION: u16 = 4;
5353pub const LODESTONE_API_CONNECTION_PROFILE_FORMAT_VERSION: u16 = 4;
5354#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5355#[serde(deny_unknown_fields)]
5356pub struct ConnectionProfile {
5357 pub format_version: u32,
5358 pub profile_generation: U64,
5359 pub native_endpoints: Vec<String>,
5360 pub selected_stream_endpoint: String,
5361 pub tls_server_name: String,
5362 pub tls_trust_sha256: Digest,
5363 pub expected_cluster_id: Identity,
5364 pub expected_collection_id: Identity,
5365 pub expected_principal_id: Identity,
5366 pub schema_id: String,
5367 pub schema_digest: Digest,
5368 pub credential_id: Identity,
5369 pub credential_generation: U64,
5370 #[serde(default, skip_serializing_if = "Option::is_none")]
5371 pub credential_expires_at: Option<U64>,
5372 pub secret_reference: String,
5373 #[serde(default, skip_serializing_if = "Option::is_none")]
5374 pub storage_profile_expectation: Option<StorageProfileExpectation>,
5375}
5376
5377#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5378pub enum TypeKind {
5379 Enum,
5380 Struct,
5381 TaggedUnion,
5382}
5383#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5384pub struct TypeContract {
5385 pub name: &'static str,
5386 pub shape_version: u16,
5387 pub instance_format_version: Option<u16>,
5388 pub kind: TypeKind,
5389 pub wire: bool,
5390}
5391pub const LODESTONE_API_TYPE_CONTRACTS: &[TypeContract] = &[
5392 TypeContract {
5393 name: "cursor",
5394 shape_version: 1,
5395 instance_format_version: None,
5396 kind: TypeKind::Struct,
5397 wire: true,
5398 },
5399 TypeContract {
5400 name: "locator",
5401 shape_version: 1,
5402 instance_format_version: None,
5403 kind: TypeKind::Struct,
5404 wire: true,
5405 },
5406 TypeContract {
5407 name: "resource",
5408 shape_version: 1,
5409 instance_format_version: None,
5410 kind: TypeKind::Struct,
5411 wire: true,
5412 },
5413 TypeContract {
5414 name: "field_promotion_configuration",
5415 shape_version: 1,
5416 instance_format_version: Some(3),
5417 kind: TypeKind::Struct,
5418 wire: true,
5419 },
5420 TypeContract {
5421 name: "overload_configuration",
5422 shape_version: 2,
5423 instance_format_version: Some(3),
5424 kind: TypeKind::Struct,
5425 wire: true,
5426 },
5427 TypeContract {
5428 name: "index_policies",
5429 shape_version: 1,
5430 instance_format_version: None,
5431 kind: TypeKind::Struct,
5432 wire: true,
5433 },
5434 TypeContract {
5435 name: "maintenance_budgets",
5436 shape_version: 1,
5437 instance_format_version: None,
5438 kind: TypeKind::Struct,
5439 wire: true,
5440 },
5441 TypeContract {
5442 name: "resource_durability_class",
5443 shape_version: 1,
5444 instance_format_version: None,
5445 kind: TypeKind::Enum,
5446 wire: true,
5447 },
5448 TypeContract {
5449 name: "resource_storage_class",
5450 shape_version: 1,
5451 instance_format_version: None,
5452 kind: TypeKind::Enum,
5453 wire: true,
5454 },
5455 TypeContract {
5456 name: "vector_quality_objective",
5457 shape_version: 1,
5458 instance_format_version: None,
5459 kind: TypeKind::Enum,
5460 wire: true,
5461 },
5462 TypeContract {
5463 name: "vector_indexing_objective",
5464 shape_version: 1,
5465 instance_format_version: None,
5466 kind: TypeKind::Enum,
5467 wire: true,
5468 },
5469 TypeContract {
5470 name: "vector_residency_intent",
5471 shape_version: 1,
5472 instance_format_version: None,
5473 kind: TypeKind::Enum,
5474 wire: true,
5475 },
5476 TypeContract {
5477 name: "vector_calibration_binding",
5478 shape_version: 1,
5479 instance_format_version: None,
5480 kind: TypeKind::Struct,
5481 wire: true,
5482 },
5483 TypeContract {
5484 name: "vector_resource_policy",
5485 shape_version: 2,
5486 instance_format_version: None,
5487 kind: TypeKind::Struct,
5488 wire: true,
5489 },
5490 TypeContract {
5491 name: "workload_class",
5492 shape_version: 1,
5493 instance_format_version: None,
5494 kind: TypeKind::Enum,
5495 wire: true,
5496 },
5497 TypeContract {
5498 name: "index_resource_spec",
5499 shape_version: 3,
5500 instance_format_version: Some(3),
5501 kind: TypeKind::Struct,
5502 wire: true,
5503 },
5504 TypeContract {
5505 name: "index_summary",
5506 shape_version: 1,
5507 instance_format_version: None,
5508 kind: TypeKind::Struct,
5509 wire: true,
5510 },
5511 TypeContract {
5512 name: "mapping_mode",
5513 shape_version: 1,
5514 instance_format_version: None,
5515 kind: TypeKind::Enum,
5516 wire: true,
5517 },
5518 TypeContract {
5519 name: "dynamic_mapping_policy",
5520 shape_version: 1,
5521 instance_format_version: None,
5522 kind: TypeKind::Enum,
5523 wire: true,
5524 },
5525 TypeContract {
5526 name: "mapping_analyzer",
5527 shape_version: 1,
5528 instance_format_version: None,
5529 kind: TypeKind::Enum,
5530 wire: true,
5531 },
5532 TypeContract {
5533 name: "keyword_normalizer",
5534 shape_version: 1,
5535 instance_format_version: None,
5536 kind: TypeKind::Enum,
5537 wire: true,
5538 },
5539 TypeContract {
5540 name: "vector_metric",
5541 shape_version: 1,
5542 instance_format_version: None,
5543 kind: TypeKind::Enum,
5544 wire: true,
5545 },
5546 TypeContract {
5547 name: "mapping_scalar",
5548 shape_version: 1,
5549 instance_format_version: None,
5550 kind: TypeKind::TaggedUnion,
5551 wire: true,
5552 },
5553 TypeContract {
5554 name: "sparse_vector_weight_type",
5555 shape_version: 1,
5556 instance_format_version: None,
5557 kind: TypeKind::Enum,
5558 wire: true,
5559 },
5560 TypeContract {
5561 name: "mapping_field_type",
5562 shape_version: 3,
5563 instance_format_version: None,
5564 kind: TypeKind::TaggedUnion,
5565 wire: true,
5566 },
5567 TypeContract {
5568 name: "mapping_field",
5569 shape_version: 1,
5570 instance_format_version: None,
5571 kind: TypeKind::Struct,
5572 wire: true,
5573 },
5574 TypeContract {
5575 name: "multi_field_projection",
5576 shape_version: 1,
5577 instance_format_version: None,
5578 kind: TypeKind::Struct,
5579 wire: true,
5580 },
5581 TypeContract {
5582 name: "analyzer_identity",
5583 shape_version: 1,
5584 instance_format_version: None,
5585 kind: TypeKind::Struct,
5586 wire: true,
5587 },
5588 TypeContract {
5589 name: "keyword_limit",
5590 shape_version: 1,
5591 instance_format_version: None,
5592 kind: TypeKind::Struct,
5593 wire: true,
5594 },
5595 TypeContract {
5596 name: "profile_privacy_action",
5597 shape_version: 1,
5598 instance_format_version: None,
5599 kind: TypeKind::Enum,
5600 wire: true,
5601 },
5602 TypeContract {
5603 name: "profile_privacy_field",
5604 shape_version: 1,
5605 instance_format_version: None,
5606 kind: TypeKind::TaggedUnion,
5607 wire: true,
5608 },
5609 TypeContract {
5610 name: "profile_privacy_rule",
5611 shape_version: 1,
5612 instance_format_version: None,
5613 kind: TypeKind::Struct,
5614 wire: true,
5615 },
5616 TypeContract {
5617 name: "profile_privacy_policy",
5618 shape_version: 1,
5619 instance_format_version: Some(1),
5620 kind: TypeKind::Struct,
5621 wire: true,
5622 },
5623 TypeContract {
5624 name: "mapping_record_model",
5625 shape_version: 3,
5626 instance_format_version: None,
5627 kind: TypeKind::TaggedUnion,
5628 wire: true,
5629 },
5630 TypeContract {
5631 name: "mapping",
5632 shape_version: 4,
5633 instance_format_version: Some(10),
5634 kind: TypeKind::Struct,
5635 wire: true,
5636 },
5637 TypeContract {
5638 name: "index_detail",
5639 shape_version: 1,
5640 instance_format_version: None,
5641 kind: TypeKind::Struct,
5642 wire: true,
5643 },
5644 TypeContract {
5645 name: "source_provider",
5646 shape_version: 1,
5647 instance_format_version: None,
5648 kind: TypeKind::Enum,
5649 wire: true,
5650 },
5651 TypeContract {
5652 name: "source_decoder",
5653 shape_version: 1,
5654 instance_format_version: None,
5655 kind: TypeKind::Enum,
5656 wire: true,
5657 },
5658 TypeContract {
5659 name: "source_replay_guarantees",
5660 shape_version: 1,
5661 instance_format_version: None,
5662 kind: TypeKind::Struct,
5663 wire: true,
5664 },
5665 TypeContract {
5666 name: "source_partition_configuration",
5667 shape_version: 1,
5668 instance_format_version: None,
5669 kind: TypeKind::Struct,
5670 wire: true,
5671 },
5672 TypeContract {
5673 name: "replayable_source_configuration",
5674 shape_version: 1,
5675 instance_format_version: None,
5676 kind: TypeKind::Struct,
5677 wire: true,
5678 },
5679 TypeContract {
5680 name: "source_partition_status",
5681 shape_version: 1,
5682 instance_format_version: None,
5683 kind: TypeKind::Struct,
5684 wire: true,
5685 },
5686 TypeContract {
5687 name: "replayable_source_status",
5688 shape_version: 1,
5689 instance_format_version: None,
5690 kind: TypeKind::Struct,
5691 wire: true,
5692 },
5693 TypeContract {
5694 name: "source_control_transition",
5695 shape_version: 1,
5696 instance_format_version: None,
5697 kind: TypeKind::Enum,
5698 wire: true,
5699 },
5700 TypeContract {
5701 name: "history_ledger_precondition",
5702 shape_version: 1,
5703 instance_format_version: None,
5704 kind: TypeKind::TaggedUnion,
5705 wire: true,
5706 },
5707 TypeContract {
5708 name: "history_retention_policy",
5709 shape_version: 1,
5710 instance_format_version: None,
5711 kind: TypeKind::Struct,
5712 wire: true,
5713 },
5714 TypeContract {
5715 name: "history_selector",
5716 shape_version: 1,
5717 instance_format_version: None,
5718 kind: TypeKind::TaggedUnion,
5719 wire: true,
5720 },
5721 TypeContract {
5722 name: "history_hold",
5723 shape_version: 1,
5724 instance_format_version: None,
5725 kind: TypeKind::Struct,
5726 wire: true,
5727 },
5728 TypeContract {
5729 name: "history_status",
5730 shape_version: 1,
5731 instance_format_version: None,
5732 kind: TypeKind::Struct,
5733 wire: true,
5734 },
5735 TypeContract {
5736 name: "history_resolution",
5737 shape_version: 1,
5738 instance_format_version: None,
5739 kind: TypeKind::Struct,
5740 wire: true,
5741 },
5742 TypeContract {
5743 name: "index_reference",
5744 shape_version: 1,
5745 instance_format_version: None,
5746 kind: TypeKind::Struct,
5747 wire: true,
5748 },
5749 TypeContract {
5750 name: "alias_target",
5751 shape_version: 1,
5752 instance_format_version: None,
5753 kind: TypeKind::Struct,
5754 wire: true,
5755 },
5756 TypeContract {
5757 name: "alias_summary",
5758 shape_version: 1,
5759 instance_format_version: None,
5760 kind: TypeKind::Struct,
5761 wire: true,
5762 },
5763 TypeContract {
5764 name: "alias_detail",
5765 shape_version: 1,
5766 instance_format_version: None,
5767 kind: TypeKind::Struct,
5768 wire: true,
5769 },
5770 TypeContract {
5771 name: "data_stream_summary",
5772 shape_version: 1,
5773 instance_format_version: None,
5774 kind: TypeKind::Struct,
5775 wire: true,
5776 },
5777 TypeContract {
5778 name: "component_template_binding",
5779 shape_version: 1,
5780 instance_format_version: None,
5781 kind: TypeKind::Struct,
5782 wire: true,
5783 },
5784 TypeContract {
5785 name: "index_template_binding",
5786 shape_version: 1,
5787 instance_format_version: None,
5788 kind: TypeKind::Struct,
5789 wire: true,
5790 },
5791 TypeContract {
5792 name: "lifecycle_policy_binding",
5793 shape_version: 1,
5794 instance_format_version: None,
5795 kind: TypeKind::Struct,
5796 wire: true,
5797 },
5798 TypeContract {
5799 name: "data_stream_detail",
5800 shape_version: 1,
5801 instance_format_version: None,
5802 kind: TypeKind::Struct,
5803 wire: true,
5804 },
5805 TypeContract {
5806 name: "component_template_summary",
5807 shape_version: 1,
5808 instance_format_version: None,
5809 kind: TypeKind::Struct,
5810 wire: true,
5811 },
5812 TypeContract {
5813 name: "component_template_detail",
5814 shape_version: 1,
5815 instance_format_version: None,
5816 kind: TypeKind::Struct,
5817 wire: true,
5818 },
5819 TypeContract {
5820 name: "index_template_summary",
5821 shape_version: 1,
5822 instance_format_version: None,
5823 kind: TypeKind::Struct,
5824 wire: true,
5825 },
5826 TypeContract {
5827 name: "index_template_detail",
5828 shape_version: 1,
5829 instance_format_version: None,
5830 kind: TypeKind::Struct,
5831 wire: true,
5832 },
5833 TypeContract {
5834 name: "ingest_pipeline_summary",
5835 shape_version: 1,
5836 instance_format_version: None,
5837 kind: TypeKind::Struct,
5838 wire: true,
5839 },
5840 TypeContract {
5841 name: "ingest_pipeline_detail",
5842 shape_version: 1,
5843 instance_format_version: None,
5844 kind: TypeKind::Struct,
5845 wire: true,
5846 },
5847 TypeContract {
5848 name: "ingest_pipeline_selection",
5849 shape_version: 1,
5850 instance_format_version: None,
5851 kind: TypeKind::Struct,
5852 wire: true,
5853 },
5854 TypeContract {
5855 name: "lifecycle_policy_summary",
5856 shape_version: 1,
5857 instance_format_version: None,
5858 kind: TypeKind::Struct,
5859 wire: true,
5860 },
5861 TypeContract {
5862 name: "rollover_thresholds",
5863 shape_version: 1,
5864 instance_format_version: None,
5865 kind: TypeKind::Struct,
5866 wire: true,
5867 },
5868 TypeContract {
5869 name: "retention_policy",
5870 shape_version: 1,
5871 instance_format_version: None,
5872 kind: TypeKind::Struct,
5873 wire: true,
5874 },
5875 TypeContract {
5876 name: "lifecycle_policy_detail",
5877 shape_version: 1,
5878 instance_format_version: None,
5879 kind: TypeKind::Struct,
5880 wire: true,
5881 },
5882 TypeContract {
5883 name: "text_query_operator",
5884 shape_version: 1,
5885 instance_format_version: None,
5886 kind: TypeKind::Enum,
5887 wire: true,
5888 },
5889 TypeContract {
5890 name: "text_query_analyzer",
5891 shape_version: 1,
5892 instance_format_version: None,
5893 kind: TypeKind::Enum,
5894 wire: true,
5895 },
5896 TypeContract {
5897 name: "zero_terms_query",
5898 shape_version: 1,
5899 instance_format_version: None,
5900 kind: TypeKind::Enum,
5901 wire: true,
5902 },
5903 TypeContract {
5904 name: "text_query_options",
5905 shape_version: 1,
5906 instance_format_version: None,
5907 kind: TypeKind::Struct,
5908 wire: true,
5909 },
5910 TypeContract {
5911 name: "multi_match_mode",
5912 shape_version: 1,
5913 instance_format_version: None,
5914 kind: TypeKind::Enum,
5915 wire: true,
5916 },
5917 TypeContract {
5918 name: "multi_match_field",
5919 shape_version: 1,
5920 instance_format_version: None,
5921 kind: TypeKind::Struct,
5922 wire: true,
5923 },
5924 TypeContract {
5925 name: "multi_match_options",
5926 shape_version: 1,
5927 instance_format_version: None,
5928 kind: TypeKind::Struct,
5929 wire: true,
5930 },
5931 TypeContract {
5932 name: "sort_order",
5933 shape_version: 1,
5934 instance_format_version: None,
5935 kind: TypeKind::Enum,
5936 wire: true,
5937 },
5938 TypeContract {
5939 name: "sort_mode",
5940 shape_version: 1,
5941 instance_format_version: None,
5942 kind: TypeKind::Enum,
5943 wire: true,
5944 },
5945 TypeContract {
5946 name: "missing_order",
5947 shape_version: 1,
5948 instance_format_version: None,
5949 kind: TypeKind::Enum,
5950 wire: true,
5951 },
5952 TypeContract {
5953 name: "nested_score_mode",
5954 shape_version: 1,
5955 instance_format_version: None,
5956 kind: TypeKind::Enum,
5957 wire: true,
5958 },
5959 TypeContract {
5960 name: "nested_inner_hits",
5961 shape_version: 1,
5962 instance_format_version: None,
5963 kind: TypeKind::Struct,
5964 wire: true,
5965 },
5966 TypeContract {
5967 name: "sort_spec",
5968 shape_version: 1,
5969 instance_format_version: None,
5970 kind: TypeKind::TaggedUnion,
5971 wire: true,
5972 },
5973 TypeContract {
5974 name: "query",
5975 shape_version: 1,
5976 instance_format_version: None,
5977 kind: TypeKind::TaggedUnion,
5978 wire: true,
5979 },
5980 TypeContract {
5981 name: "dense_retrieval_mode",
5982 shape_version: 1,
5983 instance_format_version: None,
5984 kind: TypeKind::Enum,
5985 wire: true,
5986 },
5987 TypeContract {
5988 name: "vector_achieved_mode",
5989 shape_version: 1,
5990 instance_format_version: None,
5991 kind: TypeKind::Enum,
5992 wire: true,
5993 },
5994 TypeContract {
5995 name: "vector_branch_diagnostics",
5996 shape_version: 2,
5997 instance_format_version: None,
5998 kind: TypeKind::Struct,
5999 wire: true,
6000 },
6001 TypeContract {
6002 name: "dense_vector_element_type",
6003 shape_version: 1,
6004 instance_format_version: None,
6005 kind: TypeKind::Enum,
6006 wire: true,
6007 },
6008 TypeContract {
6009 name: "dense_vector_byte_order",
6010 shape_version: 1,
6011 instance_format_version: None,
6012 kind: TypeKind::Enum,
6013 wire: true,
6014 },
6015 TypeContract {
6016 name: "vector_value",
6017 shape_version: 1,
6018 instance_format_version: None,
6019 kind: TypeKind::TaggedUnion,
6020 wire: true,
6021 },
6022 TypeContract {
6023 name: "sparse_vector_entry",
6024 shape_version: 1,
6025 instance_format_version: None,
6026 kind: TypeKind::Struct,
6027 wire: true,
6028 },
6029 TypeContract {
6030 name: "sparse_vector_value",
6031 shape_version: 1,
6032 instance_format_version: None,
6033 kind: TypeKind::Struct,
6034 wire: true,
6035 },
6036 TypeContract {
6037 name: "vector_set_value",
6038 shape_version: 1,
6039 instance_format_version: None,
6040 kind: TypeKind::Struct,
6041 wire: true,
6042 },
6043 TypeContract {
6044 name: "vector_evaluation_snapshot",
6045 shape_version: 1,
6046 instance_format_version: None,
6047 kind: TypeKind::TaggedUnion,
6048 wire: true,
6049 },
6050 TypeContract {
6051 name: "vector_evaluation_query_set",
6052 shape_version: 1,
6053 instance_format_version: None,
6054 kind: TypeKind::TaggedUnion,
6055 wire: true,
6056 },
6057 TypeContract {
6058 name: "vector_evaluation_budget",
6059 shape_version: 1,
6060 instance_format_version: None,
6061 kind: TypeKind::Struct,
6062 wire: true,
6063 },
6064 TypeContract {
6065 name: "vector_candidate_policy",
6066 shape_version: 1,
6067 instance_format_version: None,
6068 kind: TypeKind::Enum,
6069 wire: true,
6070 },
6071 TypeContract {
6072 name: "vector_calibration_objective",
6073 shape_version: 1,
6074 instance_format_version: None,
6075 kind: TypeKind::Enum,
6076 wire: true,
6077 },
6078 TypeContract {
6079 name: "vector_strategy_profile",
6080 shape_version: 1,
6081 instance_format_version: None,
6082 kind: TypeKind::Enum,
6083 wire: true,
6084 },
6085 TypeContract {
6086 name: "vector_evaluation_work",
6087 shape_version: 1,
6088 instance_format_version: None,
6089 kind: TypeKind::Struct,
6090 wire: true,
6091 },
6092 TypeContract {
6093 name: "vector_evaluation_error_code",
6094 shape_version: 1,
6095 instance_format_version: None,
6096 kind: TypeKind::Enum,
6097 wire: true,
6098 },
6099 TypeContract {
6100 name: "vector_evaluation_error",
6101 shape_version: 1,
6102 instance_format_version: None,
6103 kind: TypeKind::Struct,
6104 wire: true,
6105 },
6106 TypeContract {
6107 name: "vector_recall_result",
6108 shape_version: 1,
6109 instance_format_version: Some(1),
6110 kind: TypeKind::Struct,
6111 wire: true,
6112 },
6113 TypeContract {
6114 name: "vector_calibration_candidate",
6115 shape_version: 1,
6116 instance_format_version: None,
6117 kind: TypeKind::Struct,
6118 wire: true,
6119 },
6120 TypeContract {
6121 name: "vector_calibration_result",
6122 shape_version: 1,
6123 instance_format_version: Some(1),
6124 kind: TypeKind::Struct,
6125 wire: true,
6126 },
6127 TypeContract {
6128 name: "vector_diagnostic_result",
6129 shape_version: 1,
6130 instance_format_version: None,
6131 kind: TypeKind::TaggedUnion,
6132 wire: true,
6133 },
6134 TypeContract {
6135 name: "vector_warm_component",
6136 shape_version: 1,
6137 instance_format_version: None,
6138 kind: TypeKind::Enum,
6139 wire: true,
6140 },
6141 TypeContract {
6142 name: "vector_warm_state",
6143 shape_version: 1,
6144 instance_format_version: None,
6145 kind: TypeKind::Enum,
6146 wire: true,
6147 },
6148 TypeContract {
6149 name: "vector_warm_achievement",
6150 shape_version: 1,
6151 instance_format_version: None,
6152 kind: TypeKind::Struct,
6153 wire: true,
6154 },
6155 TypeContract {
6156 name: "vector_warm_result",
6157 shape_version: 1,
6158 instance_format_version: Some(1),
6159 kind: TypeKind::Struct,
6160 wire: true,
6161 },
6162 TypeContract {
6163 name: "dense_retrieval_threshold",
6164 shape_version: 1,
6165 instance_format_version: None,
6166 kind: TypeKind::TaggedUnion,
6167 wire: true,
6168 },
6169 TypeContract {
6170 name: "retrieval_branch",
6171 shape_version: 3,
6172 instance_format_version: None,
6173 kind: TypeKind::TaggedUnion,
6174 wire: true,
6175 },
6176 TypeContract {
6177 name: "weighted_rrf_fusion",
6178 shape_version: 1,
6179 instance_format_version: None,
6180 kind: TypeKind::Struct,
6181 wire: true,
6182 },
6183 TypeContract {
6184 name: "retrieval_plan",
6185 shape_version: 1,
6186 instance_format_version: Some(1),
6187 kind: TypeKind::Struct,
6188 wire: true,
6189 },
6190 TypeContract {
6191 name: "histogram_bounds",
6192 shape_version: 1,
6193 instance_format_version: None,
6194 kind: TypeKind::Struct,
6195 wire: true,
6196 },
6197 TypeContract {
6198 name: "date_histogram_bounds",
6199 shape_version: 1,
6200 instance_format_version: None,
6201 kind: TypeKind::Struct,
6202 wire: true,
6203 },
6204 TypeContract {
6205 name: "approximation_algorithm",
6206 shape_version: 1,
6207 instance_format_version: None,
6208 kind: TypeKind::Enum,
6209 wire: true,
6210 },
6211 TypeContract {
6212 name: "approximation",
6213 shape_version: 1,
6214 instance_format_version: None,
6215 kind: TypeKind::Struct,
6216 wire: true,
6217 },
6218 TypeContract {
6219 name: "percentile_value",
6220 shape_version: 1,
6221 instance_format_version: None,
6222 kind: TypeKind::Struct,
6223 wire: true,
6224 },
6225 TypeContract {
6226 name: "approximate_percentile_value",
6227 shape_version: 1,
6228 instance_format_version: None,
6229 kind: TypeKind::Struct,
6230 wire: true,
6231 },
6232 TypeContract {
6233 name: "time_series_operator",
6234 shape_version: 1,
6235 instance_format_version: None,
6236 kind: TypeKind::Enum,
6237 wire: true,
6238 },
6239 TypeContract {
6240 name: "time_series_missing_data",
6241 shape_version: 1,
6242 instance_format_version: None,
6243 kind: TypeKind::Enum,
6244 wire: true,
6245 },
6246 TypeContract {
6247 name: "time_series_quantile_mode",
6248 shape_version: 1,
6249 instance_format_version: None,
6250 kind: TypeKind::Enum,
6251 wire: true,
6252 },
6253 TypeContract {
6254 name: "time_series_bucket_state",
6255 shape_version: 1,
6256 instance_format_version: None,
6257 kind: TypeKind::Enum,
6258 wire: true,
6259 },
6260 TypeContract {
6261 name: "time_series_quantile_value",
6262 shape_version: 1,
6263 instance_format_version: None,
6264 kind: TypeKind::Struct,
6265 wire: true,
6266 },
6267 TypeContract {
6268 name: "time_series_value",
6269 shape_version: 1,
6270 instance_format_version: None,
6271 kind: TypeKind::TaggedUnion,
6272 wire: true,
6273 },
6274 TypeContract {
6275 name: "time_series_bucket",
6276 shape_version: 1,
6277 instance_format_version: None,
6278 kind: TypeKind::Struct,
6279 wire: true,
6280 },
6281 TypeContract {
6282 name: "relationship_traversal_direction",
6283 shape_version: 1,
6284 instance_format_version: None,
6285 kind: TypeKind::Enum,
6286 wire: true,
6287 },
6288 TypeContract {
6289 name: "relationship_traversal_filter",
6290 shape_version: 1,
6291 instance_format_version: None,
6292 kind: TypeKind::Struct,
6293 wire: true,
6294 },
6295 TypeContract {
6296 name: "relationship_traversal_budget",
6297 shape_version: 1,
6298 instance_format_version: None,
6299 kind: TypeKind::Struct,
6300 wire: true,
6301 },
6302 TypeContract {
6303 name: "traversed_relationship",
6304 shape_version: 1,
6305 instance_format_version: None,
6306 kind: TypeKind::Struct,
6307 wire: true,
6308 },
6309 TypeContract {
6310 name: "profile_query_operation",
6311 shape_version: 1,
6312 instance_format_version: None,
6313 kind: TypeKind::Enum,
6314 wire: true,
6315 },
6316 TypeContract {
6317 name: "profile_group_by",
6318 shape_version: 1,
6319 instance_format_version: None,
6320 kind: TypeKind::TaggedUnion,
6321 wire: true,
6322 },
6323 TypeContract {
6324 name: "profile_query_filter",
6325 shape_version: 1,
6326 instance_format_version: None,
6327 kind: TypeKind::Struct,
6328 wire: true,
6329 },
6330 TypeContract {
6331 name: "profile_query_budget",
6332 shape_version: 1,
6333 instance_format_version: None,
6334 kind: TypeKind::Struct,
6335 wire: true,
6336 },
6337 TypeContract {
6338 name: "profile_query_row",
6339 shape_version: 1,
6340 instance_format_version: None,
6341 kind: TypeKind::Struct,
6342 wire: true,
6343 },
6344 TypeContract {
6345 name: "temporal_input",
6346 shape_version: 1,
6347 instance_format_version: None,
6348 kind: TypeKind::Struct,
6349 wire: true,
6350 },
6351 TypeContract {
6352 name: "temporal_pattern",
6353 shape_version: 1,
6354 instance_format_version: None,
6355 kind: TypeKind::TaggedUnion,
6356 wire: true,
6357 },
6358 TypeContract {
6359 name: "historical_temporal_definition",
6360 shape_version: 1,
6361 instance_format_version: Some(1),
6362 kind: TypeKind::Struct,
6363 wire: true,
6364 },
6365 TypeContract {
6366 name: "temporal_evidence_status",
6367 shape_version: 2,
6368 instance_format_version: None,
6369 kind: TypeKind::Enum,
6370 wire: true,
6371 },
6372 TypeContract {
6373 name: "temporal_source_event",
6374 shape_version: 1,
6375 instance_format_version: None,
6376 kind: TypeKind::Struct,
6377 wire: true,
6378 },
6379 TypeContract {
6380 name: "temporal_evidence",
6381 shape_version: 2,
6382 instance_format_version: None,
6383 kind: TypeKind::Struct,
6384 wire: true,
6385 },
6386 TypeContract {
6387 name: "continuous_temporal_start",
6388 shape_version: 1,
6389 instance_format_version: None,
6390 kind: TypeKind::TaggedUnion,
6391 wire: true,
6392 },
6393 TypeContract {
6394 name: "continuous_temporal_watermark_policy",
6395 shape_version: 1,
6396 instance_format_version: None,
6397 kind: TypeKind::TaggedUnion,
6398 wire: true,
6399 },
6400 TypeContract {
6401 name: "continuous_temporal_late_data_policy",
6402 shape_version: 1,
6403 instance_format_version: None,
6404 kind: TypeKind::TaggedUnion,
6405 wire: true,
6406 },
6407 TypeContract {
6408 name: "continuous_temporal_output",
6409 shape_version: 1,
6410 instance_format_version: None,
6411 kind: TypeKind::TaggedUnion,
6412 wire: true,
6413 },
6414 TypeContract {
6415 name: "continuous_temporal_definition",
6416 shape_version: 1,
6417 instance_format_version: Some(1),
6418 kind: TypeKind::Struct,
6419 wire: true,
6420 },
6421 TypeContract {
6422 name: "continuous_temporal_frontier",
6423 shape_version: 1,
6424 instance_format_version: None,
6425 kind: TypeKind::Struct,
6426 wire: true,
6427 },
6428 TypeContract {
6429 name: "continuous_temporal_available_frontier",
6430 shape_version: 1,
6431 instance_format_version: None,
6432 kind: TypeKind::Struct,
6433 wire: true,
6434 },
6435 TypeContract {
6436 name: "continuous_temporal_gap_reason",
6437 shape_version: 1,
6438 instance_format_version: None,
6439 kind: TypeKind::Enum,
6440 wire: true,
6441 },
6442 TypeContract {
6443 name: "continuous_temporal_gap",
6444 shape_version: 1,
6445 instance_format_version: None,
6446 kind: TypeKind::Struct,
6447 wire: true,
6448 },
6449 TypeContract {
6450 name: "continuous_temporal_evaluation",
6451 shape_version: 1,
6452 instance_format_version: Some(1),
6453 kind: TypeKind::Struct,
6454 wire: true,
6455 },
6456 TypeContract {
6457 name: "composite_order",
6458 shape_version: 1,
6459 instance_format_version: None,
6460 kind: TypeKind::Enum,
6461 wire: true,
6462 },
6463 TypeContract {
6464 name: "composite_source",
6465 shape_version: 1,
6466 instance_format_version: None,
6467 kind: TypeKind::TaggedUnion,
6468 wire: true,
6469 },
6470 TypeContract {
6471 name: "aggregation",
6472 shape_version: 3,
6473 instance_format_version: None,
6474 kind: TypeKind::TaggedUnion,
6475 wire: true,
6476 },
6477 TypeContract {
6478 name: "nested_search_hit",
6479 shape_version: 1,
6480 instance_format_version: None,
6481 kind: TypeKind::Struct,
6482 wire: true,
6483 },
6484 TypeContract {
6485 name: "named_nested_inner_hits_result",
6486 shape_version: 1,
6487 instance_format_version: None,
6488 kind: TypeKind::Struct,
6489 wire: true,
6490 },
6491 TypeContract {
6492 name: "fragment_boundary",
6493 shape_version: 1,
6494 instance_format_version: None,
6495 kind: TypeKind::Enum,
6496 wire: true,
6497 },
6498 TypeContract {
6499 name: "fragment_offset_encoding",
6500 shape_version: 1,
6501 instance_format_version: None,
6502 kind: TypeKind::Enum,
6503 wire: true,
6504 },
6505 TypeContract {
6506 name: "fragment_ranker",
6507 shape_version: 1,
6508 instance_format_version: None,
6509 kind: TypeKind::Enum,
6510 wire: true,
6511 },
6512 TypeContract {
6513 name: "fragment_request",
6514 shape_version: 1,
6515 instance_format_version: None,
6516 kind: TypeKind::Struct,
6517 wire: true,
6518 },
6519 TypeContract {
6520 name: "search_fragment",
6521 shape_version: 1,
6522 instance_format_version: None,
6523 kind: TypeKind::Struct,
6524 wire: true,
6525 },
6526 TypeContract {
6527 name: "numeric_feature_transform",
6528 shape_version: 1,
6529 instance_format_version: None,
6530 kind: TypeKind::TaggedUnion,
6531 wire: true,
6532 },
6533 TypeContract {
6534 name: "numeric_result_feature",
6535 shape_version: 1,
6536 instance_format_version: None,
6537 kind: TypeKind::Struct,
6538 wire: true,
6539 },
6540 TypeContract {
6541 name: "result_feature_request",
6542 shape_version: 1,
6543 instance_format_version: None,
6544 kind: TypeKind::Struct,
6545 wire: true,
6546 },
6547 TypeContract {
6548 name: "result_diversification",
6549 shape_version: 1,
6550 instance_format_version: None,
6551 kind: TypeKind::Struct,
6552 wire: true,
6553 },
6554 TypeContract {
6555 name: "branch_score_kind",
6556 shape_version: 2,
6557 instance_format_version: None,
6558 kind: TypeKind::Enum,
6559 wire: true,
6560 },
6561 TypeContract {
6562 name: "result_feature",
6563 shape_version: 1,
6564 instance_format_version: None,
6565 kind: TypeKind::TaggedUnion,
6566 wire: true,
6567 },
6568 TypeContract {
6569 name: "search_hit",
6570 shape_version: 2,
6571 instance_format_version: None,
6572 kind: TypeKind::Struct,
6573 wire: true,
6574 },
6575 TypeContract {
6576 name: "aggregation_bucket",
6577 shape_version: 1,
6578 instance_format_version: None,
6579 kind: TypeKind::Struct,
6580 wire: true,
6581 },
6582 TypeContract {
6583 name: "aggregation_result",
6584 shape_version: 3,
6585 instance_format_version: None,
6586 kind: TypeKind::TaggedUnion,
6587 wire: true,
6588 },
6589 TypeContract {
6590 name: "shard_counts",
6591 shape_version: 1,
6592 instance_format_version: None,
6593 kind: TypeKind::Struct,
6594 wire: true,
6595 },
6596 TypeContract {
6597 name: "total_hits_relation",
6598 shape_version: 1,
6599 instance_format_version: None,
6600 kind: TypeKind::Enum,
6601 wire: true,
6602 },
6603 TypeContract {
6604 name: "search_total",
6605 shape_version: 1,
6606 instance_format_version: None,
6607 kind: TypeKind::Struct,
6608 wire: true,
6609 },
6610 TypeContract {
6611 name: "search_execution_freshness",
6612 shape_version: 1,
6613 instance_format_version: None,
6614 kind: TypeKind::Enum,
6615 wire: true,
6616 },
6617 TypeContract {
6618 name: "search_freshness",
6619 shape_version: 1,
6620 instance_format_version: None,
6621 kind: TypeKind::Enum,
6622 wire: true,
6623 },
6624 TypeContract {
6625 name: "search_degradation_reason",
6626 shape_version: 1,
6627 instance_format_version: None,
6628 kind: TypeKind::Enum,
6629 wire: true,
6630 },
6631 TypeContract {
6632 name: "search_achievement",
6633 shape_version: 1,
6634 instance_format_version: None,
6635 kind: TypeKind::Struct,
6636 wire: true,
6637 },
6638 TypeContract {
6639 name: "search_failure_stage",
6640 shape_version: 1,
6641 instance_format_version: None,
6642 kind: TypeKind::Enum,
6643 wire: true,
6644 },
6645 TypeContract {
6646 name: "search_failure_reason",
6647 shape_version: 1,
6648 instance_format_version: None,
6649 kind: TypeKind::Enum,
6650 wire: true,
6651 },
6652 TypeContract {
6653 name: "collection_shard",
6654 shape_version: 1,
6655 instance_format_version: None,
6656 kind: TypeKind::Struct,
6657 wire: true,
6658 },
6659 TypeContract {
6660 name: "search_partial_failure",
6661 shape_version: 1,
6662 instance_format_version: None,
6663 kind: TypeKind::Struct,
6664 wire: true,
6665 },
6666 TypeContract {
6667 name: "artifact",
6668 shape_version: 1,
6669 instance_format_version: None,
6670 kind: TypeKind::Struct,
6671 wire: true,
6672 },
6673 TypeContract {
6674 name: "portability_storage_capability",
6675 shape_version: 1,
6676 instance_format_version: None,
6677 kind: TypeKind::Struct,
6678 wire: true,
6679 },
6680 TypeContract {
6681 name: "collection_export_artifact",
6682 shape_version: 1,
6683 instance_format_version: None,
6684 kind: TypeKind::Struct,
6685 wire: true,
6686 },
6687 TypeContract {
6688 name: "index_transfer_page",
6689 shape_version: 1,
6690 instance_format_version: None,
6691 kind: TypeKind::Struct,
6692 wire: true,
6693 },
6694 TypeContract {
6695 name: "index_transfer_artifact",
6696 shape_version: 1,
6697 instance_format_version: None,
6698 kind: TypeKind::Struct,
6699 wire: true,
6700 },
6701 TypeContract {
6702 name: "search_validation_bound",
6703 shape_version: 1,
6704 instance_format_version: None,
6705 kind: TypeKind::TaggedUnion,
6706 wire: true,
6707 },
6708 TypeContract {
6709 name: "search_validation_estimates",
6710 shape_version: 1,
6711 instance_format_version: None,
6712 kind: TypeKind::Struct,
6713 wire: true,
6714 },
6715 TypeContract {
6716 name: "search_validation_limit",
6717 shape_version: 1,
6718 instance_format_version: None,
6719 kind: TypeKind::Struct,
6720 wire: true,
6721 },
6722 TypeContract {
6723 name: "operation_kind",
6724 shape_version: 2,
6725 instance_format_version: None,
6726 kind: TypeKind::Enum,
6727 wire: true,
6728 },
6729 TypeContract {
6730 name: "operation_authority",
6731 shape_version: 1,
6732 instance_format_version: None,
6733 kind: TypeKind::Enum,
6734 wire: true,
6735 },
6736 TypeContract {
6737 name: "operation_target",
6738 shape_version: 1,
6739 instance_format_version: None,
6740 kind: TypeKind::TaggedUnion,
6741 wire: true,
6742 },
6743 TypeContract {
6744 name: "operation_state",
6745 shape_version: 1,
6746 instance_format_version: None,
6747 kind: TypeKind::Enum,
6748 wire: true,
6749 },
6750 TypeContract {
6751 name: "operation_pending_state",
6752 shape_version: 1,
6753 instance_format_version: None,
6754 kind: TypeKind::Enum,
6755 wire: true,
6756 },
6757 TypeContract {
6758 name: "operation_progress_unit",
6759 shape_version: 1,
6760 instance_format_version: None,
6761 kind: TypeKind::Enum,
6762 wire: true,
6763 },
6764 TypeContract {
6765 name: "operation_progress",
6766 shape_version: 1,
6767 instance_format_version: None,
6768 kind: TypeKind::Struct,
6769 wire: true,
6770 },
6771 TypeContract {
6772 name: "operation_result",
6773 shape_version: 1,
6774 instance_format_version: None,
6775 kind: TypeKind::TaggedUnion,
6776 wire: true,
6777 },
6778 TypeContract {
6779 name: "operation_failure",
6780 shape_version: 1,
6781 instance_format_version: None,
6782 kind: TypeKind::Struct,
6783 wire: true,
6784 },
6785 TypeContract {
6786 name: "operation_cancellation",
6787 shape_version: 1,
6788 instance_format_version: None,
6789 kind: TypeKind::Enum,
6790 wire: true,
6791 },
6792 TypeContract {
6793 name: "operation_retention_state",
6794 shape_version: 1,
6795 instance_format_version: None,
6796 kind: TypeKind::Enum,
6797 wire: true,
6798 },
6799 TypeContract {
6800 name: "operation_retention",
6801 shape_version: 1,
6802 instance_format_version: None,
6803 kind: TypeKind::Struct,
6804 wire: true,
6805 },
6806 TypeContract {
6807 name: "operation",
6808 shape_version: 2,
6809 instance_format_version: None,
6810 kind: TypeKind::Struct,
6811 wire: true,
6812 },
6813 TypeContract {
6814 name: "write_durability_boundary",
6815 shape_version: 1,
6816 instance_format_version: None,
6817 kind: TypeKind::Enum,
6818 wire: true,
6819 },
6820 TypeContract {
6821 name: "write_visibility_mode",
6822 shape_version: 1,
6823 instance_format_version: None,
6824 kind: TypeKind::Enum,
6825 wire: true,
6826 },
6827 TypeContract {
6828 name: "write_response_stage",
6829 shape_version: 1,
6830 instance_format_version: None,
6831 kind: TypeKind::Enum,
6832 wire: true,
6833 },
6834 TypeContract {
6835 name: "write_achievement",
6836 shape_version: 1,
6837 instance_format_version: None,
6838 kind: TypeKind::Struct,
6839 wire: true,
6840 },
6841 TypeContract {
6842 name: "mutation_commit_position",
6843 shape_version: 1,
6844 instance_format_version: None,
6845 kind: TypeKind::Struct,
6846 wire: true,
6847 },
6848 TypeContract {
6849 name: "mutation_commit_receipt",
6850 shape_version: 1,
6851 instance_format_version: Some(1),
6852 kind: TypeKind::Struct,
6853 wire: true,
6854 },
6855 TypeContract {
6856 name: "mutation_resolver",
6857 shape_version: 1,
6858 instance_format_version: None,
6859 kind: TypeKind::Enum,
6860 wire: true,
6861 },
6862 TypeContract {
6863 name: "mutation_outcome",
6864 shape_version: 1,
6865 instance_format_version: None,
6866 kind: TypeKind::TaggedUnion,
6867 wire: true,
6868 },
6869 TypeContract {
6870 name: "submission_state",
6871 shape_version: 1,
6872 instance_format_version: None,
6873 kind: TypeKind::Enum,
6874 wire: true,
6875 },
6876 TypeContract {
6877 name: "expected_binding",
6878 shape_version: 1,
6879 instance_format_version: None,
6880 kind: TypeKind::Struct,
6881 wire: true,
6882 },
6883 TypeContract {
6884 name: "administration_alias_action",
6885 shape_version: 1,
6886 instance_format_version: None,
6887 kind: TypeKind::TaggedUnion,
6888 wire: true,
6889 },
6890 TypeContract {
6891 name: "administration_mutation",
6892 shape_version: 1,
6893 instance_format_version: None,
6894 kind: TypeKind::TaggedUnion,
6895 wire: true,
6896 },
6897 TypeContract {
6898 name: "administration_outcome",
6899 shape_version: 1,
6900 instance_format_version: None,
6901 kind: TypeKind::Struct,
6902 wire: true,
6903 },
6904 TypeContract {
6905 name: "index_change_apply_receipt",
6906 shape_version: 1,
6907 instance_format_version: None,
6908 kind: TypeKind::Struct,
6909 wire: true,
6910 },
6911 TypeContract {
6912 name: "bulk_document_item",
6913 shape_version: 2,
6914 instance_format_version: None,
6915 kind: TypeKind::Struct,
6916 wire: true,
6917 },
6918 TypeContract {
6919 name: "bulk_document_item_outcome",
6920 shape_version: 1,
6921 instance_format_version: None,
6922 kind: TypeKind::Struct,
6923 wire: true,
6924 },
6925 TypeContract {
6926 name: "bulk_document_outcome",
6927 shape_version: 1,
6928 instance_format_version: None,
6929 kind: TypeKind::Struct,
6930 wire: true,
6931 },
6932 TypeContract {
6933 name: "metric_attribute_value",
6934 shape_version: 1,
6935 instance_format_version: None,
6936 kind: TypeKind::TaggedUnion,
6937 wire: true,
6938 },
6939 TypeContract {
6940 name: "metric_attribute",
6941 shape_version: 1,
6942 instance_format_version: None,
6943 kind: TypeKind::Struct,
6944 wire: true,
6945 },
6946 TypeContract {
6947 name: "metric_number",
6948 shape_version: 1,
6949 instance_format_version: None,
6950 kind: TypeKind::TaggedUnion,
6951 wire: true,
6952 },
6953 TypeContract {
6954 name: "metric_temporality",
6955 shape_version: 1,
6956 instance_format_version: None,
6957 kind: TypeKind::Enum,
6958 wire: true,
6959 },
6960 TypeContract {
6961 name: "metric_point_kind",
6962 shape_version: 1,
6963 instance_format_version: None,
6964 kind: TypeKind::Enum,
6965 wire: true,
6966 },
6967 TypeContract {
6968 name: "metric_exponential_buckets",
6969 shape_version: 1,
6970 instance_format_version: None,
6971 kind: TypeKind::Struct,
6972 wire: true,
6973 },
6974 TypeContract {
6975 name: "metric_data",
6976 shape_version: 1,
6977 instance_format_version: None,
6978 kind: TypeKind::TaggedUnion,
6979 wire: true,
6980 },
6981 TypeContract {
6982 name: "metric_instrumentation_scope",
6983 shape_version: 1,
6984 instance_format_version: None,
6985 kind: TypeKind::Struct,
6986 wire: true,
6987 },
6988 TypeContract {
6989 name: "metric_exemplar",
6990 shape_version: 1,
6991 instance_format_version: None,
6992 kind: TypeKind::Struct,
6993 wire: true,
6994 },
6995 TypeContract {
6996 name: "metric_point",
6997 shape_version: 1,
6998 instance_format_version: Some(1),
6999 kind: TypeKind::Struct,
7000 wire: true,
7001 },
7002 TypeContract {
7003 name: "entity_ref",
7004 shape_version: 1,
7005 instance_format_version: None,
7006 kind: TypeKind::Struct,
7007 wire: true,
7008 },
7009 TypeContract {
7010 name: "relationship_evidence_ref",
7011 shape_version: 1,
7012 instance_format_version: None,
7013 kind: TypeKind::Struct,
7014 wire: true,
7015 },
7016 TypeContract {
7017 name: "relationship_directionality",
7018 shape_version: 1,
7019 instance_format_version: None,
7020 kind: TypeKind::Enum,
7021 wire: true,
7022 },
7023 TypeContract {
7024 name: "relationship_record",
7025 shape_version: 1,
7026 instance_format_version: Some(1),
7027 kind: TypeKind::Struct,
7028 wire: true,
7029 },
7030 TypeContract {
7031 name: "profile_label",
7032 shape_version: 1,
7033 instance_format_version: None,
7034 kind: TypeKind::Struct,
7035 wire: true,
7036 },
7037 TypeContract {
7038 name: "profile_sample_type",
7039 shape_version: 1,
7040 instance_format_version: None,
7041 kind: TypeKind::Struct,
7042 wire: true,
7043 },
7044 TypeContract {
7045 name: "profile_mapping",
7046 shape_version: 1,
7047 instance_format_version: None,
7048 kind: TypeKind::Struct,
7049 wire: true,
7050 },
7051 TypeContract {
7052 name: "profile_function",
7053 shape_version: 1,
7054 instance_format_version: None,
7055 kind: TypeKind::Struct,
7056 wire: true,
7057 },
7058 TypeContract {
7059 name: "profile_line",
7060 shape_version: 1,
7061 instance_format_version: None,
7062 kind: TypeKind::Struct,
7063 wire: true,
7064 },
7065 TypeContract {
7066 name: "profile_location",
7067 shape_version: 1,
7068 instance_format_version: None,
7069 kind: TypeKind::Struct,
7070 wire: true,
7071 },
7072 TypeContract {
7073 name: "profile_stack",
7074 shape_version: 1,
7075 instance_format_version: None,
7076 kind: TypeKind::Struct,
7077 wire: true,
7078 },
7079 TypeContract {
7080 name: "profile_sample",
7081 shape_version: 1,
7082 instance_format_version: None,
7083 kind: TypeKind::Struct,
7084 wire: true,
7085 },
7086 TypeContract {
7087 name: "profile_instrumentation_scope",
7088 shape_version: 1,
7089 instance_format_version: None,
7090 kind: TypeKind::Struct,
7091 wire: true,
7092 },
7093 TypeContract {
7094 name: "profile_batch",
7095 shape_version: 1,
7096 instance_format_version: Some(1),
7097 kind: TypeKind::Struct,
7098 wire: true,
7099 },
7100 TypeContract {
7101 name: "native_record",
7102 shape_version: 3,
7103 instance_format_version: None,
7104 kind: TypeKind::TaggedUnion,
7105 wire: true,
7106 },
7107 TypeContract {
7108 name: "retained_append_item",
7109 shape_version: 4,
7110 instance_format_version: None,
7111 kind: TypeKind::Struct,
7112 wire: true,
7113 },
7114 TypeContract {
7115 name: "retained_append_state",
7116 shape_version: 1,
7117 instance_format_version: None,
7118 kind: TypeKind::Enum,
7119 wire: true,
7120 },
7121 TypeContract {
7122 name: "retained_append_retry_safety",
7123 shape_version: 1,
7124 instance_format_version: None,
7125 kind: TypeKind::Enum,
7126 wire: true,
7127 },
7128 TypeContract {
7129 name: "retained_append_item_outcome",
7130 shape_version: 1,
7131 instance_format_version: None,
7132 kind: TypeKind::Struct,
7133 wire: true,
7134 },
7135 TypeContract {
7136 name: "retained_append_bulk_outcome",
7137 shape_version: 1,
7138 instance_format_version: None,
7139 kind: TypeKind::Struct,
7140 wire: true,
7141 },
7142 TypeContract {
7143 name: "retained_append_observation_state",
7144 shape_version: 1,
7145 instance_format_version: None,
7146 kind: TypeKind::Enum,
7147 wire: true,
7148 },
7149 TypeContract {
7150 name: "retained_append_observation_outcome",
7151 shape_version: 1,
7152 instance_format_version: None,
7153 kind: TypeKind::Struct,
7154 wire: true,
7155 },
7156 TypeContract {
7157 name: "binary_value",
7158 shape_version: 1,
7159 instance_format_version: None,
7160 kind: TypeKind::Struct,
7161 wire: true,
7162 },
7163 TypeContract {
7164 name: "state_hash_field",
7165 shape_version: 1,
7166 instance_format_version: None,
7167 kind: TypeKind::Struct,
7168 wire: true,
7169 },
7170 TypeContract {
7171 name: "state_set_entry",
7172 shape_version: 1,
7173 instance_format_version: None,
7174 kind: TypeKind::Struct,
7175 wire: true,
7176 },
7177 TypeContract {
7178 name: "state_set_condition",
7179 shape_version: 1,
7180 instance_format_version: None,
7181 kind: TypeKind::Enum,
7182 wire: true,
7183 },
7184 TypeContract {
7185 name: "state_operation",
7186 shape_version: 1,
7187 instance_format_version: None,
7188 kind: TypeKind::TaggedUnion,
7189 wire: true,
7190 },
7191 TypeContract {
7192 name: "state_optional_value",
7193 shape_version: 1,
7194 instance_format_version: None,
7195 kind: TypeKind::TaggedUnion,
7196 wire: true,
7197 },
7198 TypeContract {
7199 name: "state_command_result",
7200 shape_version: 1,
7201 instance_format_version: None,
7202 kind: TypeKind::TaggedUnion,
7203 wire: true,
7204 },
7205 TypeContract {
7206 name: "state_write_resolution",
7207 shape_version: 1,
7208 instance_format_version: None,
7209 kind: TypeKind::TaggedUnion,
7210 wire: true,
7211 },
7212 TypeContract {
7213 name: "service_credential_reservation",
7214 shape_version: 1,
7215 instance_format_version: None,
7216 kind: TypeKind::Struct,
7217 wire: true,
7218 },
7219 TypeContract {
7220 name: "subscription_metadata_field",
7221 shape_version: 1,
7222 instance_format_version: None,
7223 kind: TypeKind::Enum,
7224 wire: true,
7225 },
7226 TypeContract {
7227 name: "subscription_field",
7228 shape_version: 1,
7229 instance_format_version: None,
7230 kind: TypeKind::TaggedUnion,
7231 wire: true,
7232 },
7233 TypeContract {
7234 name: "subscription_filter",
7235 shape_version: 1,
7236 instance_format_version: None,
7237 kind: TypeKind::TaggedUnion,
7238 wire: true,
7239 },
7240 TypeContract {
7241 name: "subscription_cursor_entry",
7242 shape_version: 1,
7243 instance_format_version: None,
7244 kind: TypeKind::Struct,
7245 wire: true,
7246 },
7247 TypeContract {
7248 name: "subscription_route",
7249 shape_version: 1,
7250 instance_format_version: None,
7251 kind: TypeKind::Struct,
7252 wire: true,
7253 },
7254 TypeContract {
7255 name: "subscription_start_position",
7256 shape_version: 1,
7257 instance_format_version: None,
7258 kind: TypeKind::TaggedUnion,
7259 wire: true,
7260 },
7261 TypeContract {
7262 name: "subscription_start",
7263 shape_version: 1,
7264 instance_format_version: Some(1),
7265 kind: TypeKind::Struct,
7266 wire: true,
7267 },
7268 TypeContract {
7269 name: "subscription_accepted",
7270 shape_version: 1,
7271 instance_format_version: Some(1),
7272 kind: TypeKind::Struct,
7273 wire: true,
7274 },
7275 TypeContract {
7276 name: "subscription_writer_fence",
7277 shape_version: 1,
7278 instance_format_version: None,
7279 kind: TypeKind::Struct,
7280 wire: true,
7281 },
7282 TypeContract {
7283 name: "subscription_event",
7284 shape_version: 1,
7285 instance_format_version: Some(1),
7286 kind: TypeKind::Struct,
7287 wire: true,
7288 },
7289 TypeContract {
7290 name: "subscription_heartbeat",
7291 shape_version: 1,
7292 instance_format_version: Some(1),
7293 kind: TypeKind::Struct,
7294 wire: true,
7295 },
7296 TypeContract {
7297 name: "subscription_gap",
7298 shape_version: 1,
7299 instance_format_version: Some(1),
7300 kind: TypeKind::Struct,
7301 wire: true,
7302 },
7303 TypeContract {
7304 name: "subscription_terminal_reason",
7305 shape_version: 1,
7306 instance_format_version: None,
7307 kind: TypeKind::Enum,
7308 wire: true,
7309 },
7310 TypeContract {
7311 name: "subscription_terminal",
7312 shape_version: 2,
7313 instance_format_version: Some(2),
7314 kind: TypeKind::Struct,
7315 wire: true,
7316 },
7317 TypeContract {
7318 name: "subscription_frame",
7319 shape_version: 1,
7320 instance_format_version: None,
7321 kind: TypeKind::TaggedUnion,
7322 wire: true,
7323 },
7324 TypeContract {
7325 name: "stream_binding",
7326 shape_version: 1,
7327 instance_format_version: None,
7328 kind: TypeKind::Struct,
7329 wire: true,
7330 },
7331 TypeContract {
7332 name: "capability_grant",
7333 shape_version: 1,
7334 instance_format_version: None,
7335 kind: TypeKind::Struct,
7336 wire: true,
7337 },
7338 TypeContract {
7339 name: "protocol_limit",
7340 shape_version: 1,
7341 instance_format_version: None,
7342 kind: TypeKind::Struct,
7343 wire: true,
7344 },
7345 TypeContract {
7346 name: "document_mutation_condition",
7347 shape_version: 1,
7348 instance_format_version: None,
7349 kind: TypeKind::TaggedUnion,
7350 wire: true,
7351 },
7352 TypeContract {
7353 name: "audit_adapter",
7354 shape_version: 1,
7355 instance_format_version: None,
7356 kind: TypeKind::Enum,
7357 wire: true,
7358 },
7359 TypeContract {
7360 name: "audit_decision",
7361 shape_version: 1,
7362 instance_format_version: None,
7363 kind: TypeKind::Enum,
7364 wire: true,
7365 },
7366 TypeContract {
7367 name: "audit_outcome",
7368 shape_version: 1,
7369 instance_format_version: None,
7370 kind: TypeKind::Enum,
7371 wire: true,
7372 },
7373 TypeContract {
7374 name: "audit_detail",
7375 shape_version: 1,
7376 instance_format_version: None,
7377 kind: TypeKind::Enum,
7378 wire: true,
7379 },
7380 TypeContract {
7381 name: "audit_gap_reason",
7382 shape_version: 1,
7383 instance_format_version: None,
7384 kind: TypeKind::Enum,
7385 wire: true,
7386 },
7387 TypeContract {
7388 name: "audit_event",
7389 shape_version: 2,
7390 instance_format_version: None,
7391 kind: TypeKind::Struct,
7392 wire: true,
7393 },
7394 TypeContract {
7395 name: "audit_gap",
7396 shape_version: 2,
7397 instance_format_version: None,
7398 kind: TypeKind::Struct,
7399 wire: true,
7400 },
7401 TypeContract {
7402 name: "audit_stream_state",
7403 shape_version: 1,
7404 instance_format_version: None,
7405 kind: TypeKind::Struct,
7406 wire: true,
7407 },
7408 TypeContract {
7409 name: "service_credential_grant",
7410 shape_version: 1,
7411 instance_format_version: None,
7412 kind: TypeKind::Struct,
7413 wire: true,
7414 },
7415 TypeContract {
7416 name: "service_credential_summary",
7417 shape_version: 1,
7418 instance_format_version: None,
7419 kind: TypeKind::Struct,
7420 wire: true,
7421 },
7422 TypeContract {
7423 name: "security_role",
7424 shape_version: 1,
7425 instance_format_version: None,
7426 kind: TypeKind::Struct,
7427 wire: true,
7428 },
7429 TypeContract {
7430 name: "role_append_scope_change",
7431 shape_version: 1,
7432 instance_format_version: None,
7433 kind: TypeKind::TaggedUnion,
7434 wire: true,
7435 },
7436 TypeContract {
7437 name: "role_append_access_preparation",
7438 shape_version: 1,
7439 instance_format_version: None,
7440 kind: TypeKind::TaggedUnion,
7441 wire: true,
7442 },
7443 TypeContract {
7444 name: "security_action_outcome",
7445 shape_version: 1,
7446 instance_format_version: None,
7447 kind: TypeKind::TaggedUnion,
7448 wire: true,
7449 },
7450 TypeContract {
7451 name: "maintenance_work_state",
7452 shape_version: 1,
7453 instance_format_version: None,
7454 kind: TypeKind::Enum,
7455 wire: true,
7456 },
7457 TypeContract {
7458 name: "maintenance_attempt_state",
7459 shape_version: 1,
7460 instance_format_version: None,
7461 kind: TypeKind::Enum,
7462 wire: true,
7463 },
7464 TypeContract {
7465 name: "maintenance_failure_class",
7466 shape_version: 1,
7467 instance_format_version: None,
7468 kind: TypeKind::Enum,
7469 wire: true,
7470 },
7471 TypeContract {
7472 name: "maintenance_failure_class_count",
7473 shape_version: 1,
7474 instance_format_version: None,
7475 kind: TypeKind::Struct,
7476 wire: true,
7477 },
7478 TypeContract {
7479 name: "maintenance_attempt_observation",
7480 shape_version: 1,
7481 instance_format_version: None,
7482 kind: TypeKind::Struct,
7483 wire: true,
7484 },
7485 TypeContract {
7486 name: "maintenance_task_scope",
7487 shape_version: 1,
7488 instance_format_version: None,
7489 kind: TypeKind::Struct,
7490 wire: true,
7491 },
7492 TypeContract {
7493 name: "maintenance_task_status",
7494 shape_version: 1,
7495 instance_format_version: None,
7496 kind: TypeKind::Struct,
7497 wire: true,
7498 },
7499 TypeContract {
7500 name: "maintenance_status_aggregate",
7501 shape_version: 1,
7502 instance_format_version: Some(2),
7503 kind: TypeKind::Struct,
7504 wire: true,
7505 },
7506 TypeContract {
7507 name: "runtime_status_detail",
7508 shape_version: 1,
7509 instance_format_version: None,
7510 kind: TypeKind::Struct,
7511 wire: true,
7512 },
7513 TypeContract {
7514 name: "result_cache_status",
7515 shape_version: 2,
7516 instance_format_version: Some(3),
7517 kind: TypeKind::Struct,
7518 wire: true,
7519 },
7520 TypeContract {
7521 name: "field_promotion_status",
7522 shape_version: 1,
7523 instance_format_version: Some(3),
7524 kind: TypeKind::Struct,
7525 wire: true,
7526 },
7527 TypeContract {
7528 name: "overload_shard_status",
7529 shape_version: 2,
7530 instance_format_version: Some(3),
7531 kind: TypeKind::Struct,
7532 wire: true,
7533 },
7534 TypeContract {
7535 name: "external_key_binding",
7536 shape_version: 1,
7537 instance_format_version: None,
7538 kind: TypeKind::Struct,
7539 wire: true,
7540 },
7541 TypeContract {
7542 name: "rollup_measure",
7543 shape_version: 1,
7544 instance_format_version: None,
7545 kind: TypeKind::TaggedUnion,
7546 wire: true,
7547 },
7548 TypeContract {
7549 name: "aggregate_then_delete_policy",
7550 shape_version: 1,
7551 instance_format_version: None,
7552 kind: TypeKind::Struct,
7553 wire: true,
7554 },
7555 TypeContract {
7556 name: "lifecycle_binding_status",
7557 shape_version: 1,
7558 instance_format_version: None,
7559 kind: TypeKind::Struct,
7560 wire: true,
7561 },
7562 TypeContract {
7563 name: "lifecycle_rollup_status",
7564 shape_version: 1,
7565 instance_format_version: None,
7566 kind: TypeKind::Struct,
7567 wire: true,
7568 },
7569 TypeContract {
7570 name: "lifecycle_status",
7571 shape_version: 2,
7572 instance_format_version: Some(4),
7573 kind: TypeKind::Struct,
7574 wire: true,
7575 },
7576 TypeContract {
7577 name: "quota_limit",
7578 shape_version: 1,
7579 instance_format_version: None,
7580 kind: TypeKind::Struct,
7581 wire: true,
7582 },
7583 TypeContract {
7584 name: "quota_consumption",
7585 shape_version: 1,
7586 instance_format_version: None,
7587 kind: TypeKind::Struct,
7588 wire: true,
7589 },
7590 TypeContract {
7591 name: "quota_update",
7592 shape_version: 1,
7593 instance_format_version: None,
7594 kind: TypeKind::Struct,
7595 wire: true,
7596 },
7597 TypeContract {
7598 name: "storage_overall_posture",
7599 shape_version: 1,
7600 instance_format_version: None,
7601 kind: TypeKind::Enum,
7602 wire: true,
7603 },
7604 TypeContract {
7605 name: "storage_profile_role",
7606 shape_version: 1,
7607 instance_format_version: None,
7608 kind: TypeKind::Enum,
7609 wire: true,
7610 },
7611 TypeContract {
7612 name: "storage_provider_posture",
7613 shape_version: 1,
7614 instance_format_version: None,
7615 kind: TypeKind::Enum,
7616 wire: true,
7617 },
7618 TypeContract {
7619 name: "storage_backend_service_class",
7620 shape_version: 1,
7621 instance_format_version: None,
7622 kind: TypeKind::Enum,
7623 wire: true,
7624 },
7625 TypeContract {
7626 name: "storage_profile_role_binding",
7627 shape_version: 1,
7628 instance_format_version: None,
7629 kind: TypeKind::Struct,
7630 wire: true,
7631 },
7632 TypeContract {
7633 name: "storage_profile_attestation",
7634 shape_version: 1,
7635 instance_format_version: Some(1),
7636 kind: TypeKind::Struct,
7637 wire: true,
7638 },
7639 TypeContract {
7640 name: "storage_profile_expectation",
7641 shape_version: 1,
7642 instance_format_version: Some(1),
7643 kind: TypeKind::Struct,
7644 wire: true,
7645 },
7646 TypeContract {
7647 name: "core_binding",
7648 shape_version: 3,
7649 instance_format_version: None,
7650 kind: TypeKind::Struct,
7651 wire: true,
7652 },
7653 TypeContract {
7654 name: "readiness_observation",
7655 shape_version: 1,
7656 instance_format_version: None,
7657 kind: TypeKind::Struct,
7658 wire: true,
7659 },
7660 TypeContract {
7661 name: "usage_dimension",
7662 shape_version: 1,
7663 instance_format_version: None,
7664 kind: TypeKind::Struct,
7665 wire: true,
7666 },
7667 TypeContract {
7668 name: "physical_usage_value",
7669 shape_version: 2,
7670 instance_format_version: None,
7671 kind: TypeKind::Struct,
7672 wire: true,
7673 },
7674 TypeContract {
7675 name: "core_usage_units",
7676 shape_version: 2,
7677 instance_format_version: None,
7678 kind: TypeKind::Struct,
7679 wire: true,
7680 },
7681 TypeContract {
7682 name: "core_usage_correction",
7683 shape_version: 2,
7684 instance_format_version: None,
7685 kind: TypeKind::Struct,
7686 wire: true,
7687 },
7688 TypeContract {
7689 name: "response_meta",
7690 shape_version: 1,
7691 instance_format_version: Some(1),
7692 kind: TypeKind::Struct,
7693 wire: true,
7694 },
7695 TypeContract {
7696 name: "error_disposition",
7697 shape_version: 1,
7698 instance_format_version: None,
7699 kind: TypeKind::Enum,
7700 wire: true,
7701 },
7702 TypeContract {
7703 name: "recovery_action",
7704 shape_version: 1,
7705 instance_format_version: None,
7706 kind: TypeKind::Enum,
7707 wire: true,
7708 },
7709 TypeContract {
7710 name: "limit_class",
7711 shape_version: 1,
7712 instance_format_version: None,
7713 kind: TypeKind::Enum,
7714 wire: true,
7715 },
7716 TypeContract {
7717 name: "error_detail",
7718 shape_version: 3,
7719 instance_format_version: None,
7720 kind: TypeKind::TaggedUnion,
7721 wire: true,
7722 },
7723 TypeContract {
7724 name: "connection_profile",
7725 shape_version: 4,
7726 instance_format_version: Some(4),
7727 kind: TypeKind::Struct,
7728 wire: false,
7729 },
7730];
7731#[derive(Clone, Copy, Debug, Eq, PartialEq)]
7732pub struct StreamContract {
7733 pub name: &'static str,
7734 pub action: Action,
7735 pub transport: &'static str,
7736 pub service: &'static str,
7737 pub method: &'static str,
7738 pub auth_metadata: &'static str,
7739 pub auth_scheme: &'static str,
7740 pub semantic_format_version: u16,
7741 pub start_type: &'static str,
7742 pub frame_type: &'static str,
7743}
7744pub const LODESTONE_API_STREAM_CONTRACTS: &[StreamContract] = &[StreamContract {
7745 name: "subscription",
7746 action: Action::SubscriptionRead,
7747 transport: "grpc_tls",
7748 service: "lodestone.api.FilterSubscription",
7749 method: "/lodestone.api.FilterSubscription/Subscribe",
7750 auth_metadata: "authorization",
7751 auth_scheme: "ApiKey",
7752 semantic_format_version: 1,
7753 start_type: "subscription_start",
7754 frame_type: "subscription_frame",
7755}];
7756#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7757#[serde(deny_unknown_fields)]
7758pub struct ErrorBody {
7759 pub code: ErrorCode,
7760 pub message: String,
7761 pub disposition: ErrorDisposition,
7762 pub recovery: RecoveryAction,
7763 pub details: ErrorDetail,
7764}
7765#[derive(Clone, Copy, Debug, Eq, PartialEq)]
7766pub enum ErrorShapeError {
7767 DetailCodeMismatch,
7768 OutcomeMismatch,
7769 RetryAfterOutOfRange,
7770}
7771impl ErrorBody {
7772 pub fn try_new(
7773 code: ErrorCode,
7774 message: String,
7775 disposition: ErrorDisposition,
7776 recovery: RecoveryAction,
7777 details: ErrorDetail,
7778 ) -> Result<Self, ErrorShapeError> {
7779 let body = Self {
7780 code,
7781 message,
7782 disposition,
7783 recovery,
7784 details,
7785 };
7786 validate_error_body(&body)?;
7787 Ok(body)
7788 }
7789 pub fn retry_safe(&self) -> bool {
7790 self.disposition == ErrorDisposition::NotSubmitted
7791 && matches!(
7792 self.recovery,
7793 RecoveryAction::Retry
7794 | RecoveryAction::RetryAfter
7795 | RecoveryAction::RefreshCredential
7796 | RecoveryAction::RestartPage
7797 | RecoveryAction::ReduceRequest
7798 | RecoveryAction::RefreshPrecondition
7799 | RecoveryAction::CorrectRange
7800 )
7801 }
7802 pub fn submitted(&self) -> bool {
7803 self.disposition != ErrorDisposition::NotSubmitted
7804 }
7805}
7806pub fn validate_error_body(body: &ErrorBody) -> Result<(), ErrorShapeError> {
7807 let detail_matches = matches!(
7808 (&body.code, &body.details),
7809 (ErrorCode::Aborted, ErrorDetail::Aborted { .. })
7810 | (ErrorCode::DeadlineExceeded, ErrorDetail::DeadlineExceeded)
7811 | (ErrorCode::InvalidRequest, ErrorDetail::InvalidRequest { .. })
7812 | (ErrorCode::UnsupportedVersion, ErrorDetail::UnsupportedVersion { .. })
7813 | (ErrorCode::Unauthenticated, ErrorDetail::Unauthenticated)
7814 | (ErrorCode::PermissionDenied, ErrorDetail::PermissionDenied { .. })
7815 | (ErrorCode::NotFound, ErrorDetail::NotFound { .. })
7816 | (ErrorCode::Conflict, ErrorDetail::Conflict { .. })
7817 | (ErrorCode::StaleCursor, ErrorDetail::StaleCursor { .. })
7818 | (
7819 ErrorCode::RestartBudgetExhausted,
7820 ErrorDetail::RestartBudgetExhausted { .. }
7821 )
7822 | (ErrorCode::LimitExceeded, ErrorDetail::LimitExceeded { .. })
7823 | (
7824 ErrorCode::CapabilityUnavailable,
7825 ErrorDetail::CapabilityUnavailable { .. }
7826 )
7827 | (ErrorCode::NotSubmitted, ErrorDetail::NotSubmitted { .. })
7828 | (
7829 ErrorCode::SubmittedIndeterminate,
7830 ErrorDetail::SubmittedIndeterminate { .. }
7831 )
7832 | (ErrorCode::ExpiredUnknown, ErrorDetail::ExpiredUnknown { .. })
7833 | (ErrorCode::SecretNotEscrowed, ErrorDetail::SecretNotEscrowed)
7834 | (ErrorCode::RetentionGap, ErrorDetail::RetentionGap { .. })
7835 | (
7836 ErrorCode::ArtifactRangeInvalid,
7837 ErrorDetail::ArtifactRangeInvalid { .. }
7838 )
7839 | (ErrorCode::ChecksumMismatch, ErrorDetail::ChecksumMismatch { .. })
7840 | (
7841 ErrorCode::TemporarilyUnavailable,
7842 ErrorDetail::TemporarilyUnavailable { .. }
7843 )
7844 | (ErrorCode::Internal, ErrorDetail::Internal)
7845 );
7846 if !detail_matches {
7847 return Err(ErrorShapeError::DetailCodeMismatch);
7848 }
7849 if !LODESTONE_API_ERROR_OUTCOMES.iter().any(|contract| {
7850 contract.code == body.code && contract.disposition == body.disposition && contract.recovery == body.recovery
7851 }) {
7852 return Err(ErrorShapeError::OutcomeMismatch);
7853 }
7854 let retry_after = match &body.details {
7855 ErrorDetail::NotSubmitted { retry_after_millis }
7856 | ErrorDetail::TemporarilyUnavailable { retry_after_millis } => retry_after_millis.as_ref(),
7857 _ => None,
7858 };
7859 if retry_after
7860 .and_then(|value| value.value.parse::<u64>().ok())
7861 .is_some_and(|value| value > 60000)
7862 {
7863 return Err(ErrorShapeError::RetryAfterOutOfRange);
7864 }
7865 Ok(())
7866}
7867#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
7868#[serde(deny_unknown_fields)]
7869pub struct RequestMeta {
7870 pub format_version: u16,
7871 pub request_id: String,
7872 pub correlation_id: Identity,
7873 pub absolute_deadline_unix_millis: U64,
7874 pub workload_class: WorkloadClass,
7875}
7876
7877#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7878#[serde(deny_unknown_fields)]
7879pub struct DiscoverRequest {}
7880
7881#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7882#[serde(deny_unknown_fields)]
7883pub struct DiscoverResult {
7884 pub principal_id: Identity,
7885 pub collection_id: Identity,
7886 pub policy_revision: U64,
7887 pub artifact_version: String,
7888 pub schema_id: String,
7889 pub schema_digest: Digest,
7890 pub streams: Vec<StreamBinding>,
7891 pub capabilities: Vec<CapabilityGrant>,
7892 pub limits: Vec<ProtocolLimit>,
7893}
7894
7895#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7896#[serde(deny_unknown_fields)]
7897pub struct ListIndexesRequest {
7898 pub page_size: u32,
7899 #[serde(default, skip_serializing_if = "Option::is_none")]
7900 pub cursor: Option<Cursor>,
7901 #[serde(default, skip_serializing_if = "Option::is_none")]
7902 pub name_prefix: Option<String>,
7903 #[serde(default, skip_serializing_if = "Option::is_none")]
7904 pub mode: Option<String>,
7905 #[serde(default, skip_serializing_if = "Option::is_none")]
7906 pub state: Option<String>,
7907 pub restart_count: u32,
7908}
7909
7910#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7911#[serde(deny_unknown_fields)]
7912pub struct ListIndexesResult {
7913 pub items: Vec<IndexSummary>,
7914 #[serde(default, skip_serializing_if = "Option::is_none")]
7915 pub next_cursor: Option<Cursor>,
7916 pub restart_count: u32,
7917}
7918
7919#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7920#[serde(deny_unknown_fields)]
7921pub struct GetIndexRequest {
7922 pub name: String,
7923 #[serde(default, skip_serializing_if = "Option::is_none")]
7924 pub expected_incarnation: Option<Identity>,
7925}
7926
7927#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7928#[serde(deny_unknown_fields)]
7929pub struct GetIndexResult {
7930 pub resource: IndexDetail,
7931}
7932
7933#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7934#[serde(deny_unknown_fields)]
7935pub struct ValidateIndexChangeRequest {
7936 pub action_kind: String,
7937 pub name: String,
7938 #[serde(default, skip_serializing_if = "Option::is_none")]
7939 pub expected_incarnation: Option<Identity>,
7940 #[serde(default, skip_serializing_if = "Option::is_none")]
7941 pub expected_revision: Option<U64>,
7942 #[serde(default, skip_serializing_if = "Option::is_none")]
7943 pub mode: Option<String>,
7944 #[serde(default, skip_serializing_if = "Option::is_none")]
7945 pub mapping: Option<Mapping>,
7946 #[serde(default, skip_serializing_if = "Option::is_none")]
7947 pub policies: Option<IndexPolicies>,
7948}
7949
7950#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7951#[serde(deny_unknown_fields)]
7952pub struct ValidateIndexChangeResult {
7953 pub change_kind: String,
7954 pub fields_added: Vec<String>,
7955 pub policy_axes_changed: Vec<String>,
7956 pub required_capabilities: Vec<String>,
7957 pub catalog_revision: U64,
7958 pub policy_revision: U64,
7959}
7960
7961#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7962#[serde(deny_unknown_fields)]
7963pub struct ApplyIndexChangeRequest {
7964 pub action_id: Digest,
7965 pub index: Resource,
7966 pub expected_revision: U64,
7967 #[serde(default, skip_serializing_if = "Option::is_none")]
7968 pub mapping: Option<Mapping>,
7969 #[serde(default, skip_serializing_if = "Option::is_none")]
7970 pub policies: Option<IndexPolicies>,
7971}
7972
7973#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7974#[serde(deny_unknown_fields)]
7975pub struct ApplyIndexChangeResult {
7976 pub receipt: IndexChangeApplyReceipt,
7977}
7978
7979#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7980#[serde(deny_unknown_fields)]
7981pub struct ApplyAdministrationMutationRequest {
7982 pub action_id: Digest,
7983 pub expected_revision: U64,
7984 pub mutation: AdministrationMutation,
7985}
7986
7987#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7988#[serde(deny_unknown_fields)]
7989pub struct ApplyAdministrationMutationResult {
7990 pub outcome: AdministrationOutcome,
7991}
7992
7993#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7994#[serde(deny_unknown_fields)]
7995pub struct ListAliasesRequest {
7996 pub page_size: u32,
7997 #[serde(default, skip_serializing_if = "Option::is_none")]
7998 pub cursor: Option<Cursor>,
7999 #[serde(default, skip_serializing_if = "Option::is_none")]
8000 pub name_prefix: Option<String>,
8001 pub restart_count: u32,
8002}
8003
8004#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8005#[serde(deny_unknown_fields)]
8006pub struct ListAliasesResult {
8007 pub items: Vec<AliasSummary>,
8008 #[serde(default, skip_serializing_if = "Option::is_none")]
8009 pub next_cursor: Option<Cursor>,
8010 pub restart_count: u32,
8011}
8012
8013#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8014#[serde(deny_unknown_fields)]
8015pub struct GetAliasRequest {
8016 pub name: String,
8017}
8018
8019#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8020#[serde(deny_unknown_fields)]
8021pub struct GetAliasResult {
8022 pub resource: AliasDetail,
8023}
8024
8025#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8026#[serde(deny_unknown_fields)]
8027pub struct ListDataStreamsRequest {
8028 pub page_size: u32,
8029 #[serde(default, skip_serializing_if = "Option::is_none")]
8030 pub cursor: Option<Cursor>,
8031 #[serde(default, skip_serializing_if = "Option::is_none")]
8032 pub name_prefix: Option<String>,
8033 pub restart_count: u32,
8034}
8035
8036#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8037#[serde(deny_unknown_fields)]
8038pub struct ListDataStreamsResult {
8039 pub items: Vec<DataStreamSummary>,
8040 #[serde(default, skip_serializing_if = "Option::is_none")]
8041 pub next_cursor: Option<Cursor>,
8042 pub restart_count: u32,
8043}
8044
8045#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8046#[serde(deny_unknown_fields)]
8047pub struct GetDataStreamRequest {
8048 pub name: String,
8049}
8050
8051#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8052#[serde(deny_unknown_fields)]
8053pub struct GetDataStreamResult {
8054 pub resource: DataStreamDetail,
8055}
8056
8057#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8058#[serde(deny_unknown_fields)]
8059pub struct ListComponentTemplatesRequest {
8060 pub page_size: u32,
8061 #[serde(default, skip_serializing_if = "Option::is_none")]
8062 pub cursor: Option<Cursor>,
8063 #[serde(default, skip_serializing_if = "Option::is_none")]
8064 pub name_prefix: Option<String>,
8065 pub restart_count: u32,
8066}
8067
8068#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8069#[serde(deny_unknown_fields)]
8070pub struct ListComponentTemplatesResult {
8071 pub items: Vec<ComponentTemplateSummary>,
8072 #[serde(default, skip_serializing_if = "Option::is_none")]
8073 pub next_cursor: Option<Cursor>,
8074 pub restart_count: u32,
8075}
8076
8077#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8078#[serde(deny_unknown_fields)]
8079pub struct GetComponentTemplateRequest {
8080 pub name: String,
8081 #[serde(default, skip_serializing_if = "Option::is_none")]
8082 pub expected_incarnation: Option<Identity>,
8083}
8084
8085#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8086#[serde(deny_unknown_fields)]
8087pub struct GetComponentTemplateResult {
8088 pub resource: ComponentTemplateDetail,
8089}
8090
8091#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8092#[serde(deny_unknown_fields)]
8093pub struct ListIndexTemplatesRequest {
8094 pub page_size: u32,
8095 #[serde(default, skip_serializing_if = "Option::is_none")]
8096 pub cursor: Option<Cursor>,
8097 #[serde(default, skip_serializing_if = "Option::is_none")]
8098 pub name_prefix: Option<String>,
8099 pub restart_count: u32,
8100}
8101
8102#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8103#[serde(deny_unknown_fields)]
8104pub struct ListIndexTemplatesResult {
8105 pub items: Vec<IndexTemplateSummary>,
8106 #[serde(default, skip_serializing_if = "Option::is_none")]
8107 pub next_cursor: Option<Cursor>,
8108 pub restart_count: u32,
8109}
8110
8111#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8112#[serde(deny_unknown_fields)]
8113pub struct GetIndexTemplateRequest {
8114 pub name: String,
8115 #[serde(default, skip_serializing_if = "Option::is_none")]
8116 pub expected_incarnation: Option<Identity>,
8117}
8118
8119#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8120#[serde(deny_unknown_fields)]
8121pub struct GetIndexTemplateResult {
8122 pub resource: IndexTemplateDetail,
8123}
8124
8125#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8126#[serde(deny_unknown_fields)]
8127pub struct ListIngestPipelinesRequest {
8128 pub page_size: u32,
8129 #[serde(default, skip_serializing_if = "Option::is_none")]
8130 pub cursor: Option<Cursor>,
8131 #[serde(default, skip_serializing_if = "Option::is_none")]
8132 pub name_prefix: Option<String>,
8133 pub restart_count: u32,
8134}
8135
8136#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8137#[serde(deny_unknown_fields)]
8138pub struct ListIngestPipelinesResult {
8139 pub items: Vec<IngestPipelineSummary>,
8140 #[serde(default, skip_serializing_if = "Option::is_none")]
8141 pub next_cursor: Option<Cursor>,
8142 pub restart_count: u32,
8143}
8144
8145#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8146#[serde(deny_unknown_fields)]
8147pub struct GetIngestPipelineRequest {
8148 pub name: String,
8149 #[serde(default, skip_serializing_if = "Option::is_none")]
8150 pub expected_incarnation: Option<Identity>,
8151}
8152
8153#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8154#[serde(deny_unknown_fields)]
8155pub struct GetIngestPipelineResult {
8156 pub resource: IngestPipelineDetail,
8157}
8158
8159#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8160#[serde(deny_unknown_fields)]
8161pub struct SimulateIngestPipelineRequest {
8162 #[serde(default, skip_serializing_if = "Option::is_none")]
8163 pub name: Option<String>,
8164 #[serde(default, skip_serializing_if = "Option::is_none")]
8165 pub expected: Option<ExpectedBinding>,
8166 #[serde(default, skip_serializing_if = "Option::is_none")]
8167 pub definition: Option<RawJson>,
8168 pub source: RawJson,
8169}
8170
8171#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8172#[serde(deny_unknown_fields)]
8173pub struct SimulateIngestPipelineResult {
8174 #[serde(default, skip_serializing_if = "Option::is_none")]
8175 pub source: Option<RawJson>,
8176 pub dropped: bool,
8177 pub changed: bool,
8178}
8179
8180#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8181#[serde(deny_unknown_fields)]
8182pub struct ReprocessByQueryRequest {
8183 pub action_id: Digest,
8184 pub index: Resource,
8185 pub query: Query,
8186 #[serde(default, skip_serializing_if = "Option::is_none")]
8187 pub pipeline: Option<IngestPipelineSelection>,
8188 pub batch_size: u32,
8189 pub max_docs: U64,
8190 pub proceed_on_conflict: bool,
8191 pub slices: u32,
8192 pub requests_per_second: u32,
8193 pub wait_for_completion: bool,
8194}
8195
8196#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8197#[serde(deny_unknown_fields)]
8198pub struct ReprocessByQueryResult {
8199 pub task_id: Identity,
8200 pub scanned: U64,
8201 pub updated: U64,
8202 pub noops: U64,
8203 pub version_conflicts: U64,
8204 pub batches: U64,
8205 pub completed: bool,
8206}
8207
8208#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8209#[serde(deny_unknown_fields)]
8210pub struct ListLifecyclePoliciesRequest {
8211 pub page_size: u32,
8212 #[serde(default, skip_serializing_if = "Option::is_none")]
8213 pub cursor: Option<Cursor>,
8214 #[serde(default, skip_serializing_if = "Option::is_none")]
8215 pub name_prefix: Option<String>,
8216 pub restart_count: u32,
8217}
8218
8219#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8220#[serde(deny_unknown_fields)]
8221pub struct ListLifecyclePoliciesResult {
8222 pub items: Vec<LifecyclePolicySummary>,
8223 #[serde(default, skip_serializing_if = "Option::is_none")]
8224 pub next_cursor: Option<Cursor>,
8225 pub restart_count: u32,
8226}
8227
8228#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8229#[serde(deny_unknown_fields)]
8230pub struct GetLifecyclePolicyRequest {
8231 pub name: String,
8232}
8233
8234#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8235#[serde(deny_unknown_fields)]
8236pub struct GetLifecyclePolicyResult {
8237 pub resource: LifecyclePolicyDetail,
8238}
8239
8240#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8241#[serde(deny_unknown_fields)]
8242pub struct PrepareCreateIndexRequest {
8243 pub name: String,
8244 pub mapping: Mapping,
8245 #[serde(default, skip_serializing_if = "Option::is_none")]
8246 pub resource_spec: Option<IndexResourceSpec>,
8247 #[serde(default, skip_serializing_if = "Option::is_none")]
8248 pub retained_event_identity: Option<bool>,
8249}
8250
8251#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8252#[serde(deny_unknown_fields)]
8253pub struct PrepareCreateIndexResult {
8254 pub locator: Locator,
8255 pub expires_at: U64,
8256 pub semantic_digest: Digest,
8257 pub resource_spec: IndexResourceSpec,
8258}
8259
8260#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8261#[serde(deny_unknown_fields)]
8262pub struct PrepareDeleteIndexRequest {
8263 pub name: String,
8264 pub expected_incarnation: Identity,
8265}
8266
8267#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8268#[serde(deny_unknown_fields)]
8269pub struct PrepareDeleteIndexResult {
8270 #[serde(default, skip_serializing_if = "Option::is_none")]
8271 pub locator: Option<Locator>,
8272 #[serde(default, skip_serializing_if = "Option::is_none")]
8273 pub expires_at: Option<U64>,
8274 #[serde(default, skip_serializing_if = "Option::is_none")]
8275 pub semantic_digest: Option<Digest>,
8276 pub impact_digest: Digest,
8277 pub blockers: Vec<String>,
8278 pub scheduled_effects: Vec<String>,
8279 #[serde(default, skip_serializing_if = "Option::is_none")]
8280 pub estimated_documents: Option<U64>,
8281 #[serde(default, skip_serializing_if = "Option::is_none")]
8282 pub estimated_logical_bytes: Option<U64>,
8283}
8284
8285#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8286#[serde(deny_unknown_fields)]
8287pub struct SubmitCatalogActionRequest {
8288 pub locator: Locator,
8289 pub semantic_digest: Digest,
8290 pub action_kind: String,
8291 pub name: String,
8292 #[serde(default, skip_serializing_if = "Option::is_none")]
8293 pub mapping: Option<Mapping>,
8294 #[serde(default, skip_serializing_if = "Option::is_none")]
8295 pub resource_spec: Option<IndexResourceSpec>,
8296 #[serde(default, skip_serializing_if = "Option::is_none")]
8297 pub expected_incarnation: Option<Identity>,
8298}
8299
8300#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8301#[serde(deny_unknown_fields)]
8302pub struct SubmitCatalogActionResult {
8303 pub locator: Locator,
8304 pub state: String,
8305 pub mutation_outcome: MutationOutcome,
8306}
8307
8308#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8309#[serde(deny_unknown_fields)]
8310pub struct ResolveCatalogActionRequest {
8311 pub locator: Locator,
8312}
8313
8314#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8315#[serde(deny_unknown_fields)]
8316pub struct ResolveCatalogActionResult {
8317 pub locator: Locator,
8318 pub state: String,
8319 #[serde(default, skip_serializing_if = "Option::is_none")]
8320 pub resource: Option<Resource>,
8321}
8322
8323#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8324#[serde(deny_unknown_fields)]
8325pub struct PrepareReplayableSourceIndexRequest {
8326 pub name: String,
8327 pub mapping: Mapping,
8328 #[serde(default, skip_serializing_if = "Option::is_none")]
8329 pub resource_spec: Option<IndexResourceSpec>,
8330 pub source: ReplayableSourceConfiguration,
8331}
8332
8333#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8334#[serde(deny_unknown_fields)]
8335pub struct PrepareReplayableSourceIndexResult {
8336 pub locator: Locator,
8337 pub expires_at: U64,
8338 pub semantic_digest: Digest,
8339 pub resource_spec: IndexResourceSpec,
8340}
8341
8342#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8343#[serde(deny_unknown_fields)]
8344pub struct SubmitReplayableSourceIndexRequest {
8345 pub locator: Locator,
8346 pub semantic_digest: Digest,
8347 pub name: String,
8348 pub mapping: Mapping,
8349 pub resource_spec: IndexResourceSpec,
8350 pub source: ReplayableSourceConfiguration,
8351}
8352
8353#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8354#[serde(deny_unknown_fields)]
8355pub struct SubmitReplayableSourceIndexResult {
8356 pub locator: Locator,
8357 pub state: String,
8358 pub mutation_outcome: MutationOutcome,
8359}
8360
8361#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8362#[serde(deny_unknown_fields)]
8363pub struct GetReplayableSourceRequest {
8364 pub index: Resource,
8365}
8366
8367#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8368#[serde(deny_unknown_fields)]
8369pub struct GetReplayableSourceResult {
8370 pub status: ReplayableSourceStatus,
8371}
8372
8373#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8374#[serde(deny_unknown_fields)]
8375pub struct ControlReplayableSourceRequest {
8376 pub index: Resource,
8377 pub expected_generation: U64,
8378 pub transition: SourceControlTransition,
8379}
8380
8381#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8382#[serde(deny_unknown_fields)]
8383pub struct ControlReplayableSourceResult {
8384 pub status: ReplayableSourceStatus,
8385 pub mutation_outcome: MutationOutcome,
8386}
8387
8388#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8389#[serde(deny_unknown_fields)]
8390pub struct CloneIndexRequest {
8391 pub source: Resource,
8392 pub destination_name: String,
8393 pub operation_id: Identity,
8394 pub source_cut_id: Identity,
8395}
8396
8397#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8398#[serde(deny_unknown_fields)]
8399pub struct CloneIndexResult {
8400 pub destination: Resource,
8401 pub source_cut_id: Identity,
8402 pub mutation_outcome: MutationOutcome,
8403}
8404
8405#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8406#[serde(deny_unknown_fields)]
8407pub struct ConfigureHistoryRequest {
8408 pub index: Resource,
8409 pub precondition: HistoryLedgerPrecondition,
8410 pub policy: HistoryRetentionPolicy,
8411}
8412
8413#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8414#[serde(deny_unknown_fields)]
8415pub struct ConfigureHistoryResult {
8416 pub status: HistoryStatus,
8417 pub mutation_outcome: MutationOutcome,
8418}
8419
8420#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8421#[serde(deny_unknown_fields)]
8422pub struct GetHistoryRequest {
8423 pub index: Resource,
8424}
8425
8426#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8427#[serde(deny_unknown_fields)]
8428pub struct GetHistoryResult {
8429 pub status: HistoryStatus,
8430}
8431
8432#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8433#[serde(deny_unknown_fields)]
8434pub struct ResolveHistoryRequest {
8435 pub index: Resource,
8436 pub selector: HistorySelector,
8437}
8438
8439#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8440#[serde(deny_unknown_fields)]
8441pub struct ResolveHistoryResult {
8442 pub resolution: HistoryResolution,
8443}
8444
8445#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8446#[serde(deny_unknown_fields)]
8447pub struct PlaceHistoryHoldRequest {
8448 pub index: Resource,
8449 pub expected_ledger_revision: U64,
8450 pub hold: HistoryHold,
8451}
8452
8453#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8454#[serde(deny_unknown_fields)]
8455pub struct PlaceHistoryHoldResult {
8456 pub status: HistoryStatus,
8457 pub mutation_outcome: MutationOutcome,
8458}
8459
8460#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8461#[serde(deny_unknown_fields)]
8462pub struct ReleaseHistoryHoldRequest {
8463 pub index: Resource,
8464 pub expected_ledger_revision: U64,
8465 pub hold_id: Identity,
8466}
8467
8468#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8469#[serde(deny_unknown_fields)]
8470pub struct ReleaseHistoryHoldResult {
8471 pub status: HistoryStatus,
8472 pub mutation_outcome: MutationOutcome,
8473}
8474
8475#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8476#[serde(deny_unknown_fields)]
8477pub struct PrepareDocumentMutationRequest {
8478 pub index: Resource,
8479 pub document_id: String,
8480 pub operation: String,
8481 #[serde(default, skip_serializing_if = "Option::is_none")]
8482 pub source: Option<RawJson>,
8483 #[serde(default, skip_serializing_if = "Option::is_none")]
8484 pub record: Option<NativeRecord>,
8485 #[serde(default, skip_serializing_if = "Option::is_none")]
8486 pub routing: Option<String>,
8487 #[serde(default, skip_serializing_if = "Option::is_none")]
8488 pub condition: Option<DocumentMutationCondition>,
8489 #[serde(default, skip_serializing_if = "Option::is_none")]
8490 pub pipeline: Option<IngestPipelineSelection>,
8491}
8492
8493#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8494#[serde(deny_unknown_fields)]
8495pub struct PrepareDocumentMutationResult {
8496 pub locator: Locator,
8497 pub semantic_digest: Digest,
8498 pub retention_max_entries: U64,
8499 pub retention_sequence_window: U64,
8500}
8501
8502#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8503#[serde(deny_unknown_fields)]
8504pub struct SubmitDocumentMutationRequest {
8505 pub locator: Locator,
8506 pub semantic_digest: Digest,
8507 pub index: Resource,
8508 pub document_id: String,
8509 pub operation: String,
8510 #[serde(default, skip_serializing_if = "Option::is_none")]
8511 pub source: Option<RawJson>,
8512 #[serde(default, skip_serializing_if = "Option::is_none")]
8513 pub record: Option<NativeRecord>,
8514 #[serde(default, skip_serializing_if = "Option::is_none")]
8515 pub routing: Option<String>,
8516 #[serde(default, skip_serializing_if = "Option::is_none")]
8517 pub condition: Option<DocumentMutationCondition>,
8518 #[serde(default, skip_serializing_if = "Option::is_none")]
8519 pub pipeline: Option<IngestPipelineSelection>,
8520}
8521
8522#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8523#[serde(deny_unknown_fields)]
8524pub struct SubmitDocumentMutationResult {
8525 pub locator: Locator,
8526 pub state: String,
8527 pub mutation_outcome: MutationOutcome,
8528 #[serde(default, skip_serializing_if = "Option::is_none")]
8529 pub achievement: Option<WriteAchievement>,
8530 #[serde(default, skip_serializing_if = "Option::is_none")]
8531 pub sequence: Option<U64>,
8532 #[serde(default, skip_serializing_if = "Option::is_none")]
8533 pub mapping_generation: Option<U64>,
8534 pub mapping_adopted: bool,
8535 #[serde(default, skip_serializing_if = "Option::is_none")]
8536 pub commit_receipt: Option<MutationCommitReceipt>,
8537}
8538
8539#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8540#[serde(deny_unknown_fields)]
8541pub struct PrepareDocumentBulkRequest {
8542 pub batch_id: Digest,
8543 pub index: Resource,
8544 pub items: Vec<BulkDocumentItem>,
8545}
8546
8547#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8548#[serde(deny_unknown_fields)]
8549pub struct PrepareDocumentBulkResult {
8550 pub outcome: BulkDocumentOutcome,
8551}
8552
8553#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8554#[serde(deny_unknown_fields)]
8555pub struct SubmitDocumentBulkRequest {
8556 pub batch_id: Digest,
8557 pub index: Resource,
8558 pub items: Vec<BulkDocumentItem>,
8559 pub preparations: Vec<BulkDocumentItemOutcome>,
8560}
8561
8562#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8563#[serde(deny_unknown_fields)]
8564pub struct SubmitDocumentBulkResult {
8565 pub outcome: BulkDocumentOutcome,
8566}
8567
8568#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8569#[serde(deny_unknown_fields)]
8570pub struct ResolveDocumentBulkRequest {
8571 pub batch_id: Digest,
8572 pub index: Resource,
8573 pub items: Vec<BulkDocumentItemOutcome>,
8574}
8575
8576#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8577#[serde(deny_unknown_fields)]
8578pub struct ResolveDocumentBulkResult {
8579 pub outcome: BulkDocumentOutcome,
8580}
8581
8582#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8583#[serde(deny_unknown_fields)]
8584pub struct PrepareAppendBulkRequest {
8585 pub batch_id: Digest,
8586 pub index: Resource,
8587 pub items: Vec<RetainedAppendItem>,
8588}
8589
8590#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8591#[serde(deny_unknown_fields)]
8592pub struct PrepareAppendBulkResult {
8593 pub outcome: RetainedAppendBulkOutcome,
8594}
8595
8596#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8597#[serde(deny_unknown_fields)]
8598pub struct SubmitAppendBulkRequest {
8599 pub batch_id: Digest,
8600 pub index: Resource,
8601 pub items: Vec<RetainedAppendItem>,
8602 pub preparations: Vec<RetainedAppendItemOutcome>,
8603}
8604
8605#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8606#[serde(deny_unknown_fields)]
8607pub struct SubmitAppendBulkResult {
8608 pub outcome: RetainedAppendBulkOutcome,
8609}
8610
8611#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8612#[serde(deny_unknown_fields)]
8613pub struct ResolveAppendBulkRequest {
8614 pub batch_id: Digest,
8615 pub index: Resource,
8616 pub items: Vec<RetainedAppendItemOutcome>,
8617}
8618
8619#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8620#[serde(deny_unknown_fields)]
8621pub struct ResolveAppendBulkResult {
8622 pub outcome: RetainedAppendBulkOutcome,
8623}
8624
8625#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8626#[serde(deny_unknown_fields)]
8627pub struct ObserveAppendCommittedRequest {
8628 pub index: Resource,
8629 pub locator: Locator,
8630}
8631
8632#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8633#[serde(deny_unknown_fields)]
8634pub struct ObserveAppendCommittedResult {
8635 pub outcome: RetainedAppendObservationOutcome,
8636}
8637
8638#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8639#[serde(deny_unknown_fields)]
8640pub struct ResolveDocumentMutationRequest {
8641 pub locator: Locator,
8642}
8643
8644#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8645#[serde(deny_unknown_fields)]
8646pub struct ResolveDocumentMutationResult {
8647 pub locator: Locator,
8648 pub state: String,
8649 #[serde(default, skip_serializing_if = "Option::is_none")]
8650 pub sequence: Option<U64>,
8651 #[serde(default, skip_serializing_if = "Option::is_none")]
8652 pub mapping_generation: Option<U64>,
8653 pub mapping_adopted: bool,
8654 #[serde(default, skip_serializing_if = "Option::is_none")]
8655 pub source: Option<RawJson>,
8656 #[serde(default, skip_serializing_if = "Option::is_none")]
8657 pub commit_receipt: Option<MutationCommitReceipt>,
8658}
8659
8660#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8661#[serde(deny_unknown_fields)]
8662pub struct GetDocumentRequest {
8663 pub index: Resource,
8664 pub document_id: String,
8665 #[serde(default, skip_serializing_if = "Option::is_none")]
8666 pub routing: Option<String>,
8667}
8668
8669#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8670#[serde(deny_unknown_fields)]
8671pub struct GetDocumentResult {
8672 pub found: bool,
8673 #[serde(default, skip_serializing_if = "Option::is_none")]
8674 pub source: Option<RawJson>,
8675 #[serde(default, skip_serializing_if = "Option::is_none")]
8676 pub sequence: Option<U64>,
8677 #[serde(default, skip_serializing_if = "Option::is_none")]
8678 pub primary_term: Option<U64>,
8679}
8680
8681#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8682#[serde(deny_unknown_fields)]
8683pub struct SearchRequest {
8684 #[serde(default, skip_serializing_if = "Option::is_none")]
8685 pub indexes: Option<Vec<Resource>>,
8686 #[serde(default, skip_serializing_if = "Option::is_none")]
8687 pub query: Option<Query>,
8688 #[serde(default, skip_serializing_if = "Option::is_none")]
8689 pub retrieval: Option<RetrievalPlan>,
8690 #[serde(default, skip_serializing_if = "Option::is_none")]
8691 pub aggregations: Option<Vec<Aggregation>>,
8692 pub sort: Vec<SortSpec>,
8693 #[serde(default, skip_serializing_if = "Option::is_none")]
8694 pub routing: Option<Vec<String>>,
8695 pub freshness: SearchFreshness,
8696 pub page_size: u32,
8697 #[serde(default, skip_serializing_if = "Option::is_none")]
8698 pub cursor: Option<Cursor>,
8699 #[serde(default, skip_serializing_if = "Option::is_none")]
8700 pub pit: Option<Cursor>,
8701 pub allow_partial: bool,
8702 #[serde(default, skip_serializing_if = "Option::is_none")]
8703 pub total_hits_threshold: Option<U64>,
8704 pub diagnostics: bool,
8705 #[serde(default, skip_serializing_if = "Option::is_none")]
8706 pub fragments: Option<FragmentRequest>,
8707 #[serde(default, skip_serializing_if = "Option::is_none")]
8708 pub features: Option<ResultFeatureRequest>,
8709 #[serde(default, skip_serializing_if = "Option::is_none")]
8710 pub diversification: Option<ResultDiversification>,
8711}
8712
8713#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8714#[serde(deny_unknown_fields)]
8715pub struct SearchResult {
8716 pub hits: Vec<SearchHit>,
8717 pub aggregations: Vec<AggregationResult>,
8718 #[serde(default, skip_serializing_if = "Option::is_none")]
8719 pub next_cursor: Option<Cursor>,
8720 pub timed_out: bool,
8721 pub partial: bool,
8722 pub achieved: SearchAchievement,
8723 pub shards: ShardCounts,
8724 pub total: SearchTotal,
8725 pub failures: Vec<SearchPartialFailure>,
8726 pub vector_diagnostics: Vec<VectorBranchDiagnostics>,
8727}
8728
8729#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8730#[serde(deny_unknown_fields)]
8731pub struct TraverseRelationshipsRequest {
8732 pub pit: Cursor,
8733 pub indexes: Vec<Resource>,
8734 pub seeds: Vec<EntityRef>,
8735 pub direction: RelationshipTraversalDirection,
8736 pub filter: RelationshipTraversalFilter,
8737 pub budget: RelationshipTraversalBudget,
8738 pub allow_partial: bool,
8739}
8740
8741#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8742#[serde(deny_unknown_fields)]
8743pub struct TraverseRelationshipsResult {
8744 pub relationships: Vec<TraversedRelationship>,
8745 pub visited_entities: Vec<EntityRef>,
8746 pub input_cut_digest: Digest,
8747 pub partial: bool,
8748 pub incomplete_frontier: Vec<EntityRef>,
8749 pub failures: Vec<SearchPartialFailure>,
8750}
8751
8752#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8753#[serde(deny_unknown_fields)]
8754pub struct QueryProfilesRequest {
8755 pub pit: Cursor,
8756 pub indexes: Vec<Resource>,
8757 pub operation: ProfileQueryOperation,
8758 pub start_unix_nanos: U64,
8759 pub end_unix_nanos: U64,
8760 pub sample_type: String,
8761 pub unit: String,
8762 pub filter: ProfileQueryFilter,
8763 #[serde(default, skip_serializing_if = "Option::is_none")]
8764 pub group_by: Option<ProfileGroupBy>,
8765 pub budget: ProfileQueryBudget,
8766 pub allow_partial: bool,
8767}
8768
8769#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8770#[serde(deny_unknown_fields)]
8771pub struct QueryProfilesResult {
8772 pub rows: Vec<ProfileQueryRow>,
8773 pub evaluated_batches: u32,
8774 pub evaluated_samples: u32,
8775 pub input_cut_digest: Digest,
8776 pub partial: bool,
8777 pub approximate: bool,
8778 pub failures: Vec<SearchPartialFailure>,
8779}
8780
8781#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8782#[serde(deny_unknown_fields)]
8783pub struct EvaluateTemporalEvidenceRequest {
8784 pub pit: Cursor,
8785 pub definition: HistoricalTemporalDefinition,
8786}
8787
8788#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8789#[serde(deny_unknown_fields)]
8790pub struct EvaluateTemporalEvidenceResult {
8791 pub evidence: Vec<TemporalEvidence>,
8792 pub input_cut_digest: Digest,
8793 pub pattern_digest: Digest,
8794 pub evaluated_events: u32,
8795}
8796
8797#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8798#[serde(deny_unknown_fields)]
8799pub struct CreateContinuousTemporalEvaluationRequest {
8800 pub action_id: Digest,
8801 pub definition: ContinuousTemporalDefinition,
8802}
8803
8804#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8805#[serde(deny_unknown_fields)]
8806pub struct CreateContinuousTemporalEvaluationResult {
8807 pub evaluation: ContinuousTemporalEvaluation,
8808 pub mutation_outcome: MutationOutcome,
8809}
8810
8811#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8812#[serde(deny_unknown_fields)]
8813pub struct GetContinuousTemporalEvaluationRequest {
8814 pub evaluation_id: Identity,
8815}
8816
8817#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8818#[serde(deny_unknown_fields)]
8819pub struct GetContinuousTemporalEvaluationResult {
8820 pub evaluation: ContinuousTemporalEvaluation,
8821}
8822
8823#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8824#[serde(deny_unknown_fields)]
8825pub struct PauseContinuousTemporalEvaluationRequest {
8826 pub action_id: Digest,
8827 pub evaluation_id: Identity,
8828 pub expected_revision: U64,
8829}
8830
8831#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8832#[serde(deny_unknown_fields)]
8833pub struct PauseContinuousTemporalEvaluationResult {
8834 pub evaluation: ContinuousTemporalEvaluation,
8835 pub mutation_outcome: MutationOutcome,
8836}
8837
8838#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8839#[serde(deny_unknown_fields)]
8840pub struct ResumeContinuousTemporalEvaluationRequest {
8841 pub action_id: Digest,
8842 pub evaluation_id: Identity,
8843 pub expected_revision: U64,
8844}
8845
8846#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8847#[serde(deny_unknown_fields)]
8848pub struct ResumeContinuousTemporalEvaluationResult {
8849 pub evaluation: ContinuousTemporalEvaluation,
8850 pub mutation_outcome: MutationOutcome,
8851}
8852
8853#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8854#[serde(deny_unknown_fields)]
8855pub struct ReplaceContinuousTemporalEvaluationRequest {
8856 pub action_id: Digest,
8857 pub expected_revision: U64,
8858 pub definition: ContinuousTemporalDefinition,
8859}
8860
8861#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8862#[serde(deny_unknown_fields)]
8863pub struct ReplaceContinuousTemporalEvaluationResult {
8864 pub evaluation: ContinuousTemporalEvaluation,
8865 pub mutation_outcome: MutationOutcome,
8866}
8867
8868#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8869#[serde(deny_unknown_fields)]
8870pub struct RetireContinuousTemporalEvaluationRequest {
8871 pub action_id: Digest,
8872 pub evaluation_id: Identity,
8873 pub expected_revision: U64,
8874}
8875
8876#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8877#[serde(deny_unknown_fields)]
8878pub struct RetireContinuousTemporalEvaluationResult {
8879 #[serde(default, skip_serializing_if = "Option::is_none")]
8880 pub evaluation: Option<ContinuousTemporalEvaluation>,
8881 pub mutation_outcome: MutationOutcome,
8882}
8883
8884#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8885#[serde(deny_unknown_fields)]
8886pub struct ReadContinuousTemporalEvidenceRequest {
8887 pub evaluation_id: Identity,
8888 pub expected_revision: U64,
8889 pub minimum_event_time_unix_nanos: U64,
8890 pub page_size: u32,
8891 #[serde(default, skip_serializing_if = "Option::is_none")]
8892 pub cursor: Option<Cursor>,
8893}
8894
8895#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8896#[serde(deny_unknown_fields)]
8897pub struct ReadContinuousTemporalEvidenceResult {
8898 pub evidence: Vec<TemporalEvidence>,
8899 #[serde(default, skip_serializing_if = "Option::is_none")]
8900 pub next_cursor: Option<Cursor>,
8901 pub retained_floor_unix_nanos: U64,
8902 pub evaluation_revision: U64,
8903}
8904
8905#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8906#[serde(deny_unknown_fields)]
8907pub struct ValidateSearchRequest {
8908 pub indexes: Vec<Resource>,
8909 #[serde(default, skip_serializing_if = "Option::is_none")]
8910 pub query: Option<Query>,
8911 #[serde(default, skip_serializing_if = "Option::is_none")]
8912 pub retrieval: Option<RetrievalPlan>,
8913 #[serde(default, skip_serializing_if = "Option::is_none")]
8914 pub aggregations: Option<Vec<Aggregation>>,
8915 pub sort: Vec<SortSpec>,
8916 #[serde(default, skip_serializing_if = "Option::is_none")]
8917 pub routing: Option<Vec<String>>,
8918 pub freshness: SearchFreshness,
8919 pub page_size: u32,
8920 pub allow_partial: bool,
8921 #[serde(default, skip_serializing_if = "Option::is_none")]
8922 pub total_hits_threshold: Option<U64>,
8923 #[serde(default, skip_serializing_if = "Option::is_none")]
8924 pub fragments: Option<FragmentRequest>,
8925 #[serde(default, skip_serializing_if = "Option::is_none")]
8926 pub features: Option<ResultFeatureRequest>,
8927 #[serde(default, skip_serializing_if = "Option::is_none")]
8928 pub diversification: Option<ResultDiversification>,
8929}
8930
8931#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8932#[serde(deny_unknown_fields)]
8933pub struct ValidateSearchResult {
8934 pub catalog_revision: U64,
8935 pub resolved_indexes: Vec<Resource>,
8936 pub authorized: bool,
8937 pub capabilities: Vec<String>,
8938 pub shape_digest: Digest,
8939 pub warnings: Vec<String>,
8940 pub refusals: Vec<String>,
8941 pub limits: Vec<SearchValidationLimit>,
8942 pub estimates: SearchValidationEstimates,
8943}
8944
8945#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8946#[serde(deny_unknown_fields)]
8947pub struct OpenPitRequest {
8948 pub indexes: Vec<Resource>,
8949 pub keep_alive_millis: U64,
8950}
8951
8952#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8953#[serde(deny_unknown_fields)]
8954pub struct OpenPitResult {
8955 pub pit: Cursor,
8956 pub expires_at: U64,
8957 pub shard_count: u32,
8958}
8959
8960#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8961#[serde(deny_unknown_fields)]
8962pub struct RenewPitRequest {
8963 pub pit: Cursor,
8964 pub keep_alive_millis: U64,
8965}
8966
8967#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8968#[serde(deny_unknown_fields)]
8969pub struct RenewPitResult {
8970 pub pit: Cursor,
8971 pub expires_at: U64,
8972 pub shard_count: u32,
8973}
8974
8975#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8976#[serde(deny_unknown_fields)]
8977pub struct ClosePitRequest {
8978 pub pit: Cursor,
8979}
8980
8981#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8982#[serde(deny_unknown_fields)]
8983pub struct ClosePitResult {
8984 pub removed: bool,
8985}
8986
8987#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8988#[serde(deny_unknown_fields)]
8989pub struct ListOperationsRequest {
8990 pub page_size: u32,
8991 #[serde(default, skip_serializing_if = "Option::is_none")]
8992 pub cursor: Option<Cursor>,
8993}
8994
8995#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8996#[serde(deny_unknown_fields)]
8997pub struct ListOperationsResult {
8998 pub items: Vec<Operation>,
8999 #[serde(default, skip_serializing_if = "Option::is_none")]
9000 pub next_cursor: Option<Cursor>,
9001}
9002
9003#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9004#[serde(deny_unknown_fields)]
9005pub struct GetOperationRequest {
9006 pub locator: Locator,
9007}
9008
9009#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9010#[serde(deny_unknown_fields)]
9011pub struct GetOperationResult {
9012 pub operation: Operation,
9013}
9014
9015#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9016#[serde(deny_unknown_fields)]
9017pub struct WaitOperationRequest {
9018 pub locator: Locator,
9019 pub after_authority_revision: U64,
9020 pub maximum_attempts: u32,
9021 pub interval_millis: U64,
9022}
9023
9024#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9025#[serde(deny_unknown_fields)]
9026pub struct WaitOperationResult {
9027 pub operation: Operation,
9028 pub attempts: u32,
9029}
9030
9031#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9032#[serde(deny_unknown_fields)]
9033pub struct CancelOperationRequest {
9034 pub locator: Locator,
9035 pub expected_authority_revision: U64,
9036 pub cancel_action: Identity,
9037}
9038
9039#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9040#[serde(deny_unknown_fields)]
9041pub struct CancelOperationResult {
9042 pub locator: Locator,
9043 pub cancel_generation: U64,
9044 pub mutation_outcome: MutationOutcome,
9045}
9046
9047#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9048#[serde(deny_unknown_fields)]
9049pub struct ListAuditEventsRequest {
9050 pub start_time: U64,
9051 pub end_time: U64,
9052 pub actions: Vec<String>,
9053 pub page_size: u32,
9054 #[serde(default, skip_serializing_if = "Option::is_none")]
9055 pub cursor: Option<Cursor>,
9056}
9057
9058#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9059#[serde(deny_unknown_fields)]
9060pub struct ListAuditEventsResult {
9061 pub stream: AuditStreamState,
9062 pub events: Vec<AuditEvent>,
9063 #[serde(default, skip_serializing_if = "Option::is_none")]
9064 pub next_cursor: Option<Cursor>,
9065 pub gaps: Vec<AuditGap>,
9066 pub object_reads: u32,
9067}
9068
9069#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9070#[serde(deny_unknown_fields)]
9071pub struct ExportAuditEventsRequest {
9072 pub start_time: U64,
9073 pub end_time: U64,
9074 pub actions: Vec<String>,
9075 pub page_size: u32,
9076 #[serde(default, skip_serializing_if = "Option::is_none")]
9077 pub cursor: Option<Cursor>,
9078}
9079
9080#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9081#[serde(deny_unknown_fields)]
9082pub struct ExportAuditEventsResult {
9083 pub stream: AuditStreamState,
9084 pub events: Vec<AuditEvent>,
9085 #[serde(default, skip_serializing_if = "Option::is_none")]
9086 pub next_cursor: Option<Cursor>,
9087 pub gaps: Vec<AuditGap>,
9088 pub object_reads: u32,
9089}
9090
9091#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9092#[serde(deny_unknown_fields)]
9093pub struct ReserveServiceCredentialRequest {
9094 pub reservation_action_id: Digest,
9095 pub activation_action_id: Digest,
9096 pub role_grants: Vec<ServiceCredentialGrant>,
9097 pub credential_expires_at: U64,
9098 pub reservation_expires_at: U64,
9099}
9100
9101#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9102#[serde(deny_unknown_fields)]
9103pub struct ReserveServiceCredentialResult {
9104 pub reservation: ServiceCredentialReservation,
9105}
9106
9107#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9108#[serde(deny_unknown_fields)]
9109pub struct ReserveServiceCredentialRotationRequest {
9110 pub reservation_action_id: Digest,
9111 pub activation_action_id: Digest,
9112 pub current_api_key_id: Identity,
9113 pub expected_generation: U64,
9114 pub credential_expires_at: U64,
9115 pub overlap_until: U64,
9116 pub reservation_expires_at: U64,
9117}
9118
9119#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9120#[serde(deny_unknown_fields)]
9121pub struct ReserveServiceCredentialRotationResult {
9122 pub reservation: ServiceCredentialReservation,
9123}
9124
9125#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9126#[serde(deny_unknown_fields)]
9127pub struct ActivateServiceCredentialRequest {
9128 pub reservation: ServiceCredentialReservation,
9129 pub verifier: Digest,
9130}
9131
9132#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9133#[serde(deny_unknown_fields)]
9134pub struct ActivateServiceCredentialResult {
9135 pub locator: Locator,
9136 pub outcome: SecurityActionOutcome,
9137 pub secret_escrowed: bool,
9138}
9139
9140#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9141#[serde(deny_unknown_fields)]
9142pub struct ResolveServiceCredentialReservationRequest {
9143 pub reservation_action_id: Digest,
9144}
9145
9146#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9147#[serde(deny_unknown_fields)]
9148pub struct ResolveServiceCredentialReservationResult {
9149 pub state: String,
9150 #[serde(default, skip_serializing_if = "Option::is_none")]
9151 pub reservation: Option<ServiceCredentialReservation>,
9152 #[serde(default, skip_serializing_if = "Option::is_none")]
9153 pub outcome: Option<SecurityActionOutcome>,
9154}
9155
9156#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9157#[serde(deny_unknown_fields)]
9158pub struct PrepareRevokeServiceCredentialRequest {
9159 pub api_key_id: Identity,
9160 pub expected_generation: U64,
9161}
9162
9163#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9164#[serde(deny_unknown_fields)]
9165pub struct PrepareRevokeServiceCredentialResult {
9166 pub locator: Locator,
9167 pub semantic_digest: Digest,
9168 pub expires_at: U64,
9169}
9170
9171#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9172#[serde(deny_unknown_fields)]
9173pub struct RevokeServiceCredentialRequest {
9174 pub locator: Locator,
9175 pub api_key_id: Identity,
9176 pub expected_generation: U64,
9177}
9178
9179#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9180#[serde(deny_unknown_fields)]
9181pub struct RevokeServiceCredentialResult {
9182 pub locator: Locator,
9183 pub principal_id: Identity,
9184 pub api_key_id: Identity,
9185 pub state: String,
9186}
9187
9188#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9189#[serde(deny_unknown_fields)]
9190pub struct ResolveSecurityActionRequest {
9191 pub locator: Locator,
9192}
9193
9194#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9195#[serde(deny_unknown_fields)]
9196pub struct ResolveSecurityActionResult {
9197 pub locator: Locator,
9198 pub state: String,
9199 #[serde(default, skip_serializing_if = "Option::is_none")]
9200 pub result: Option<SecurityActionOutcome>,
9201 pub secret_escrowed: bool,
9202}
9203
9204#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9205#[serde(deny_unknown_fields)]
9206pub struct GetSecurityRoleRequest {
9207 pub role_name: String,
9208}
9209
9210#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9211#[serde(deny_unknown_fields)]
9212pub struct GetSecurityRoleResult {
9213 pub role: SecurityRole,
9214}
9215
9216#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9217#[serde(deny_unknown_fields)]
9218pub struct PrepareRoleAppendAccessChangeRequest {
9219 pub role_name: String,
9220 pub expected_role_version: U64,
9221 pub changes: Vec<RoleAppendScopeChange>,
9222}
9223
9224#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9225#[serde(deny_unknown_fields)]
9226pub struct PrepareRoleAppendAccessChangeResult {
9227 pub preparation: RoleAppendAccessPreparation,
9228}
9229
9230#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9231#[serde(deny_unknown_fields)]
9232pub struct SubmitRoleAppendAccessChangeRequest {
9233 pub locator: Locator,
9234 pub semantic_digest: Digest,
9235 pub role_name: String,
9236 pub expected_role_version: U64,
9237 pub changes: Vec<RoleAppendScopeChange>,
9238}
9239
9240#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9241#[serde(deny_unknown_fields)]
9242pub struct SubmitRoleAppendAccessChangeResult {
9243 pub locator: Locator,
9244 pub state: String,
9245 pub target_policy_revision: U64,
9246 pub role: SecurityRole,
9247}
9248
9249#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9250#[serde(deny_unknown_fields)]
9251pub struct ListServiceCredentialsRequest {
9252 pub page_size: u32,
9253 #[serde(default, skip_serializing_if = "Option::is_none")]
9254 pub cursor: Option<Cursor>,
9255}
9256
9257#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9258#[serde(deny_unknown_fields)]
9259pub struct ListServiceCredentialsResult {
9260 pub items: Vec<ServiceCredentialSummary>,
9261 #[serde(default, skip_serializing_if = "Option::is_none")]
9262 pub next_cursor: Option<Cursor>,
9263}
9264
9265#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9266#[serde(deny_unknown_fields)]
9267pub struct GetRuntimeStatusRequest {}
9268
9269#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9270#[serde(deny_unknown_fields)]
9271pub struct GetRuntimeStatusResult {
9272 pub ready: bool,
9273 pub recovery_era: Identity,
9274 pub catalog_revision: U64,
9275 pub policy_revision: U64,
9276 pub redacted: RuntimeStatusDetail,
9277}
9278
9279#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9280#[serde(deny_unknown_fields)]
9281pub struct GetResultCacheStatusRequest {}
9282
9283#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9284#[serde(deny_unknown_fields)]
9285pub struct GetResultCacheStatusResult {
9286 pub status: ResultCacheStatus,
9287}
9288
9289#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9290#[serde(deny_unknown_fields)]
9291pub struct GetFieldPromotionStatusRequest {
9292 pub index: Resource,
9293}
9294
9295#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9296#[serde(deny_unknown_fields)]
9297pub struct GetFieldPromotionStatusResult {
9298 pub status: FieldPromotionStatus,
9299}
9300
9301#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9302#[serde(deny_unknown_fields)]
9303pub struct GetOverloadStatusRequest {
9304 pub index: Resource,
9305}
9306
9307#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9308#[serde(deny_unknown_fields)]
9309pub struct GetOverloadStatusResult {
9310 pub runtime_observed: bool,
9311 pub shards: Vec<OverloadShardStatus>,
9312}
9313
9314#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9315#[serde(deny_unknown_fields)]
9316pub struct ConfigureExternalKeyRequest {
9317 pub index: Resource,
9318 pub expected_authority_revision: U64,
9319 pub binding: ExternalKeyBinding,
9320}
9321
9322#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9323#[serde(deny_unknown_fields)]
9324pub struct ConfigureExternalKeyResult {
9325 pub status: LifecycleStatus,
9326 pub mutation_outcome: MutationOutcome,
9327}
9328
9329#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9330#[serde(deny_unknown_fields)]
9331pub struct RotateExternalKeyBindingRequest {
9332 pub index: Resource,
9333 pub expected_authority_revision: U64,
9334 pub predecessor_binding_id: Identity,
9335 pub binding: ExternalKeyBinding,
9336}
9337
9338#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9339#[serde(deny_unknown_fields)]
9340pub struct RotateExternalKeyBindingResult {
9341 pub status: LifecycleStatus,
9342 pub mutation_outcome: MutationOutcome,
9343}
9344
9345#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9346#[serde(deny_unknown_fields)]
9347pub struct ConfigureAggregateThenDeleteRequest {
9348 pub index: Resource,
9349 pub expected_authority_revision: U64,
9350 pub policy: AggregateThenDeletePolicy,
9351}
9352
9353#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9354#[serde(deny_unknown_fields)]
9355pub struct ConfigureAggregateThenDeleteResult {
9356 pub status: LifecycleStatus,
9357 pub mutation_outcome: MutationOutcome,
9358}
9359
9360#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9361#[serde(deny_unknown_fields)]
9362pub struct GetLifecycleStatusRequest {
9363 pub index: Resource,
9364}
9365
9366#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9367#[serde(deny_unknown_fields)]
9368pub struct GetLifecycleStatusResult {
9369 pub status: LifecycleStatus,
9370}
9371
9372#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9373#[serde(deny_unknown_fields)]
9374pub struct GetQuotaRequest {}
9375
9376#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9377#[serde(deny_unknown_fields)]
9378pub struct GetQuotaResult {
9379 pub revision: U64,
9380 pub limits: Vec<QuotaLimit>,
9381 pub usage: Vec<QuotaConsumption>,
9382}
9383
9384#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9385#[serde(deny_unknown_fields)]
9386pub struct UpdateQuotaRequest {
9387 pub expected_revision: U64,
9388 pub limits: Vec<QuotaLimit>,
9389}
9390
9391#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9392#[serde(deny_unknown_fields)]
9393pub struct UpdateQuotaResult {
9394 pub update: QuotaUpdate,
9395}
9396
9397#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9398#[serde(deny_unknown_fields)]
9399pub struct GetBindingRequest {}
9400
9401#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9402#[serde(deny_unknown_fields)]
9403pub struct GetBindingResult {
9404 pub binding: CoreBinding,
9405 pub derived: bool,
9406 pub revision: U64,
9407}
9408
9409#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9410#[serde(deny_unknown_fields)]
9411pub struct GetAdmissionStatusRequest {}
9412
9413#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9414#[serde(deny_unknown_fields)]
9415pub struct GetAdmissionStatusResult {
9416 pub state: String,
9417 pub revision: U64,
9418 pub converged: bool,
9419}
9420
9421#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9422#[serde(deny_unknown_fields)]
9423pub struct SetAdmissionRequest {
9424 pub expected_revision: U64,
9425 pub state: String,
9426}
9427
9428#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9429#[serde(deny_unknown_fields)]
9430pub struct SetAdmissionResult {
9431 pub state: String,
9432 pub revision: U64,
9433 pub converged: bool,
9434}
9435
9436#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9437#[serde(deny_unknown_fields)]
9438pub struct GetQuiesceStatusRequest {}
9439
9440#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9441#[serde(deny_unknown_fields)]
9442pub struct GetQuiesceStatusResult {
9443 pub ready: bool,
9444 pub blockers: Vec<String>,
9445 pub observations: Vec<ReadinessObservation>,
9446 pub recovery_era: Identity,
9447 pub observed_at: U64,
9448 pub expires_at: U64,
9449}
9450
9451#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9452#[serde(deny_unknown_fields)]
9453pub struct GetDecommissionReadinessRequest {}
9454
9455#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9456#[serde(deny_unknown_fields)]
9457pub struct GetDecommissionReadinessResult {
9458 pub ready: bool,
9459 pub blockers: Vec<String>,
9460 pub observations: Vec<ReadinessObservation>,
9461 pub recovery_era: Identity,
9462 pub observed_at: U64,
9463 pub expires_at: U64,
9464}
9465
9466#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9467#[serde(deny_unknown_fields)]
9468pub struct GetUpgradeReadinessRequest {}
9469
9470#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9471#[serde(deny_unknown_fields)]
9472pub struct GetUpgradeReadinessResult {
9473 pub ready: bool,
9474 pub blockers: Vec<String>,
9475 pub observations: Vec<ReadinessObservation>,
9476 pub recovery_era: Identity,
9477 pub observed_at: U64,
9478 pub expires_at: U64,
9479}
9480
9481#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9482#[serde(deny_unknown_fields)]
9483pub struct GetMaintenanceStatusRequest {
9484 pub page_size: u32,
9485 #[serde(default, skip_serializing_if = "Option::is_none")]
9486 pub cursor: Option<Cursor>,
9487 #[serde(default, skip_serializing_if = "Option::is_none")]
9488 pub index: Option<Resource>,
9489}
9490
9491#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9492#[serde(deny_unknown_fields)]
9493pub struct GetMaintenanceStatusResult {
9494 pub aggregate: MaintenanceStatusAggregate,
9495 pub items: Vec<MaintenanceTaskStatus>,
9496 #[serde(default, skip_serializing_if = "Option::is_none")]
9497 pub next_cursor: Option<Cursor>,
9498}
9499
9500#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9501#[serde(deny_unknown_fields)]
9502pub struct WarmVectorIndexRequest {
9503 pub index: Resource,
9504 #[serde(default, skip_serializing_if = "Option::is_none")]
9505 pub expected_root_digest: Option<Digest>,
9506 pub components: Vec<VectorWarmComponent>,
9507 pub maximum_requests: u32,
9508 pub maximum_bytes: U64,
9509 pub maximum_achievements: u32,
9510 pub expires_at: U64,
9511}
9512
9513#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9514#[serde(deny_unknown_fields)]
9515pub struct WarmVectorIndexResult {
9516 pub result: VectorWarmResult,
9517}
9518
9519#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9520#[serde(deny_unknown_fields)]
9521pub struct EvaluateVectorRecallRequest {
9522 pub action_id: Digest,
9523 pub index: Resource,
9524 pub field: String,
9525 pub mapping_generation: U64,
9526 pub snapshot: VectorEvaluationSnapshot,
9527 pub query_set: VectorEvaluationQuerySet,
9528 #[serde(default, skip_serializing_if = "Option::is_none")]
9529 pub filter: Option<Query>,
9530 pub metric: VectorMetric,
9531 pub k: u32,
9532 pub candidate_policy: VectorCandidatePolicy,
9533 pub budget: VectorEvaluationBudget,
9534 pub maximum_bytes: U64,
9535}
9536
9537#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9538#[serde(deny_unknown_fields)]
9539pub struct EvaluateVectorRecallResult {
9540 pub operation: Operation,
9541}
9542
9543#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9544#[serde(deny_unknown_fields)]
9545pub struct CalibrateVectorStrategyRequest {
9546 pub action_id: Digest,
9547 pub index: Resource,
9548 pub field: String,
9549 pub mapping_generation: U64,
9550 pub snapshot: VectorEvaluationSnapshot,
9551 pub query_set: VectorEvaluationQuerySet,
9552 #[serde(default, skip_serializing_if = "Option::is_none")]
9553 pub filter: Option<Query>,
9554 pub metric: VectorMetric,
9555 pub k: u32,
9556 pub objective: VectorCalibrationObjective,
9557 pub minimum_recall_basis_points: u32,
9558 pub budget: VectorEvaluationBudget,
9559 pub maximum_bytes: U64,
9560}
9561
9562#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9563#[serde(deny_unknown_fields)]
9564pub struct CalibrateVectorStrategyResult {
9565 pub operation: Operation,
9566}
9567
9568#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9569#[serde(deny_unknown_fields)]
9570pub struct GetVectorDiagnosticRequest {
9571 pub locator: Locator,
9572}
9573
9574#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9575#[serde(deny_unknown_fields)]
9576pub struct GetVectorDiagnosticResult {
9577 pub operation: Operation,
9578 pub artifacts: Vec<Artifact>,
9579 #[serde(default, skip_serializing_if = "Option::is_none")]
9580 pub result: Option<VectorDiagnosticResult>,
9581}
9582
9583#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9584#[serde(deny_unknown_fields)]
9585pub struct CreateDiagnosticRequest {
9586 pub scope: String,
9587 pub maximum_bytes: U64,
9588}
9589
9590#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9591#[serde(deny_unknown_fields)]
9592pub struct CreateDiagnosticResult {
9593 pub operation: Operation,
9594}
9595
9596#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9597#[serde(deny_unknown_fields)]
9598pub struct GetDiagnosticRequest {
9599 pub locator: Locator,
9600}
9601
9602#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9603#[serde(deny_unknown_fields)]
9604pub struct GetDiagnosticResult {
9605 pub operation: Operation,
9606 pub artifacts: Vec<Artifact>,
9607}
9608
9609#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9610#[serde(deny_unknown_fields)]
9611pub struct PrepareCollectionExportRequest {
9612 pub action_id: Digest,
9613 pub storage: PortabilityStorageCapability,
9614}
9615
9616#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9617#[serde(deny_unknown_fields)]
9618pub struct PrepareCollectionExportResult {
9619 pub semantic_digest: Digest,
9620 pub maximum_bytes: U64,
9621}
9622
9623#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9624#[serde(deny_unknown_fields)]
9625pub struct StartCollectionExportRequest {
9626 pub action_id: Digest,
9627 pub semantic_digest: Digest,
9628 pub storage: PortabilityStorageCapability,
9629}
9630
9631#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9632#[serde(deny_unknown_fields)]
9633pub struct StartCollectionExportResult {
9634 pub operation: Operation,
9635}
9636
9637#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9638#[serde(deny_unknown_fields)]
9639pub struct ResolveCollectionExportRequest {
9640 pub action_id: Digest,
9641 pub semantic_digest: Digest,
9642 pub storage: PortabilityStorageCapability,
9643}
9644
9645#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9646#[serde(deny_unknown_fields)]
9647pub struct ResolveCollectionExportResult {
9648 #[serde(default, skip_serializing_if = "Option::is_none")]
9649 pub operation: Option<Operation>,
9650 #[serde(default, skip_serializing_if = "Option::is_none")]
9651 pub artifact: Option<CollectionExportArtifact>,
9652 pub expired_unknown: bool,
9653}
9654
9655#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9656#[serde(deny_unknown_fields)]
9657pub struct VerifyCollectionExportRequest {
9658 pub artifact: CollectionExportArtifact,
9659 pub storage: PortabilityStorageCapability,
9660}
9661
9662#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9663#[serde(deny_unknown_fields)]
9664pub struct VerifyCollectionExportResult {
9665 pub verified: bool,
9666 pub source_collection_id: Identity,
9667 pub source_catalog_revision: U64,
9668 pub index_count: u32,
9669 pub document_count: U64,
9670}
9671
9672#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9673#[serde(deny_unknown_fields)]
9674pub struct PrepareCollectionRestoreRequest {
9675 pub action_id: Digest,
9676 pub artifact: CollectionExportArtifact,
9677 pub storage: PortabilityStorageCapability,
9678}
9679
9680#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9681#[serde(deny_unknown_fields)]
9682pub struct PrepareCollectionRestoreResult {
9683 pub semantic_digest: Digest,
9684 pub source_collection_id: Identity,
9685 pub maximum_bytes: U64,
9686}
9687
9688#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9689#[serde(deny_unknown_fields)]
9690pub struct StartCollectionRestoreRequest {
9691 pub action_id: Digest,
9692 pub semantic_digest: Digest,
9693 pub artifact: CollectionExportArtifact,
9694 pub storage: PortabilityStorageCapability,
9695}
9696
9697#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9698#[serde(deny_unknown_fields)]
9699pub struct StartCollectionRestoreResult {
9700 pub operation: Operation,
9701}
9702
9703#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9704#[serde(deny_unknown_fields)]
9705pub struct ResolveCollectionRestoreRequest {
9706 pub action_id: Digest,
9707 pub semantic_digest: Digest,
9708 pub artifact: CollectionExportArtifact,
9709 pub storage: PortabilityStorageCapability,
9710}
9711
9712#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9713#[serde(deny_unknown_fields)]
9714pub struct ResolveCollectionRestoreResult {
9715 #[serde(default, skip_serializing_if = "Option::is_none")]
9716 pub operation: Option<Operation>,
9717 pub expired_unknown: bool,
9718}
9719
9720#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9721#[serde(deny_unknown_fields)]
9722pub struct PrepareIndexExportRequest {
9723 pub action_id: Digest,
9724 pub index: Resource,
9725 pub storage: PortabilityStorageCapability,
9726 pub maximum_records: u32,
9727 pub maximum_pages: u32,
9728 pub maximum_page_bytes: U64,
9729}
9730
9731#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9732#[serde(deny_unknown_fields)]
9733pub struct PrepareIndexExportResult {
9734 pub semantic_digest: Digest,
9735 pub maximum_bytes: U64,
9736}
9737
9738#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9739#[serde(deny_unknown_fields)]
9740pub struct StartIndexExportRequest {
9741 pub action_id: Digest,
9742 pub semantic_digest: Digest,
9743 pub index: Resource,
9744 pub storage: PortabilityStorageCapability,
9745 pub maximum_records: u32,
9746 pub maximum_pages: u32,
9747 pub maximum_page_bytes: U64,
9748}
9749
9750#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9751#[serde(deny_unknown_fields)]
9752pub struct StartIndexExportResult {
9753 pub operation: Operation,
9754}
9755
9756#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9757#[serde(deny_unknown_fields)]
9758pub struct ResolveIndexExportRequest {
9759 pub action_id: Digest,
9760 pub semantic_digest: Digest,
9761 pub index: Resource,
9762 pub storage: PortabilityStorageCapability,
9763 pub maximum_records: u32,
9764 pub maximum_pages: u32,
9765 pub maximum_page_bytes: U64,
9766}
9767
9768#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9769#[serde(deny_unknown_fields)]
9770pub struct ResolveIndexExportResult {
9771 #[serde(default, skip_serializing_if = "Option::is_none")]
9772 pub operation: Option<Operation>,
9773 #[serde(default, skip_serializing_if = "Option::is_none")]
9774 pub artifact: Option<IndexTransferArtifact>,
9775 pub expired_unknown: bool,
9776}
9777
9778#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9779#[serde(deny_unknown_fields)]
9780pub struct VerifyIndexExportRequest {
9781 pub artifact: IndexTransferArtifact,
9782 pub storage: PortabilityStorageCapability,
9783}
9784
9785#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9786#[serde(deny_unknown_fields)]
9787pub struct VerifyIndexExportResult {
9788 pub verified: bool,
9789 pub source_cluster_storage_id: Identity,
9790 pub source_collection_id: Identity,
9791 pub source_index: Resource,
9792 pub source_catalog_revision: U64,
9793 pub source_cut_digest: Digest,
9794 pub page_count: u32,
9795 pub record_count: u32,
9796}
9797
9798#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9799#[serde(deny_unknown_fields)]
9800pub struct PrepareIndexImportRequest {
9801 pub action_id: Digest,
9802 pub artifact: IndexTransferArtifact,
9803 pub storage: PortabilityStorageCapability,
9804 pub destination_name: String,
9805 pub expected_name_absent: bool,
9806 pub destination_policies: IndexPolicies,
9807 pub destination_resource_spec: IndexResourceSpec,
9808}
9809
9810#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9811#[serde(deny_unknown_fields)]
9812pub struct PrepareIndexImportResult {
9813 pub semantic_digest: Digest,
9814 pub source_cluster_storage_id: Identity,
9815 pub source_collection_id: Identity,
9816 pub source_index: Resource,
9817 pub maximum_bytes: U64,
9818}
9819
9820#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9821#[serde(deny_unknown_fields)]
9822pub struct StartIndexImportRequest {
9823 pub action_id: Digest,
9824 pub semantic_digest: Digest,
9825 pub artifact: IndexTransferArtifact,
9826 pub storage: PortabilityStorageCapability,
9827 pub destination_name: String,
9828 pub expected_name_absent: bool,
9829 pub destination_policies: IndexPolicies,
9830 pub destination_resource_spec: IndexResourceSpec,
9831}
9832
9833#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9834#[serde(deny_unknown_fields)]
9835pub struct StartIndexImportResult {
9836 pub operation: Operation,
9837}
9838
9839#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9840#[serde(deny_unknown_fields)]
9841pub struct ResolveIndexImportRequest {
9842 pub action_id: Digest,
9843 pub semantic_digest: Digest,
9844 pub artifact: IndexTransferArtifact,
9845 pub storage: PortabilityStorageCapability,
9846 pub destination_name: String,
9847 pub expected_name_absent: bool,
9848 pub destination_policies: IndexPolicies,
9849 pub destination_resource_spec: IndexResourceSpec,
9850}
9851
9852#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9853#[serde(deny_unknown_fields)]
9854pub struct ResolveIndexImportResult {
9855 #[serde(default, skip_serializing_if = "Option::is_none")]
9856 pub operation: Option<Operation>,
9857 #[serde(default, skip_serializing_if = "Option::is_none")]
9858 pub destination: Option<Resource>,
9859 pub expired_unknown: bool,
9860}
9861
9862#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9863#[serde(deny_unknown_fields)]
9864pub struct ReadArtifactChunkRequest {
9865 pub artifact: Artifact,
9866 pub offset: U64,
9867 pub length: u32,
9868}
9869
9870#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9871#[serde(deny_unknown_fields)]
9872pub struct ReadArtifactChunkResult {
9873 pub offset: U64,
9874 pub bytes_base64: String,
9875 pub chunk_sha256: String,
9876 pub artifact_sha256: String,
9877 pub complete: bool,
9878}
9879
9880#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9881#[serde(deny_unknown_fields)]
9882pub struct ExportUsageRequest {
9883 pub window_start: U64,
9884 pub window_end: U64,
9885 pub page_size: u32,
9886 #[serde(default, skip_serializing_if = "Option::is_none")]
9887 pub cursor: Option<Cursor>,
9888}
9889
9890#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9891#[serde(deny_unknown_fields)]
9892pub struct ExportUsageResult {
9893 pub units: Vec<CoreUsageUnits>,
9894 pub corrections: Vec<CoreUsageCorrection>,
9895 #[serde(default, skip_serializing_if = "Option::is_none")]
9896 pub next_cursor: Option<Cursor>,
9897 pub cumulative_through: U64,
9898}
9899
9900#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9901#[serde(deny_unknown_fields)]
9902pub struct ExecuteStateReadRequest {
9903 pub index: Resource,
9904 pub operation: StateOperation,
9905}
9906
9907#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9908#[serde(deny_unknown_fields)]
9909pub struct ExecuteStateReadResult {
9910 pub result: StateCommandResult,
9911}
9912
9913#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9914#[serde(deny_unknown_fields)]
9915pub struct PrepareStateWriteRequest {
9916 pub index: Resource,
9917 pub action_id: Digest,
9918 pub operation: StateOperation,
9919}
9920
9921#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9922#[serde(deny_unknown_fields)]
9923pub struct PrepareStateWriteResult {
9924 pub locator: Locator,
9925 pub semantic_digest: Digest,
9926 pub retention_max_entries: U64,
9927 pub retention_sequence_window: U64,
9928}
9929
9930#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9931#[serde(deny_unknown_fields)]
9932pub struct SubmitStateWriteRequest {
9933 pub index: Resource,
9934 pub action_id: Digest,
9935 pub operation: StateOperation,
9936 pub locator: Locator,
9937 pub semantic_digest: Digest,
9938}
9939
9940#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9941#[serde(deny_unknown_fields)]
9942pub struct SubmitStateWriteResult {
9943 #[serde(default, skip_serializing_if = "Option::is_none")]
9944 pub result: Option<StateCommandResult>,
9945 #[serde(default, skip_serializing_if = "Option::is_none")]
9946 pub resolution: Option<StateWriteResolution>,
9947 pub mutation_outcome: MutationOutcome,
9948 #[serde(default, skip_serializing_if = "Option::is_none")]
9949 pub achievement: Option<WriteAchievement>,
9950}
9951
9952#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9953#[serde(deny_unknown_fields)]
9954pub struct ResolveStateWriteRequest {
9955 pub index: Resource,
9956 pub action_id: Digest,
9957 pub operation: StateOperation,
9958 pub locator: Locator,
9959 pub semantic_digest: Digest,
9960}
9961
9962#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9963#[serde(deny_unknown_fields)]
9964pub struct ResolveStateWriteResult {
9965 pub resolution: StateWriteResolution,
9966}
9967
9968#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9969#[serde(tag = "command", content = "body", rename_all = "snake_case")]
9970pub enum RequestBody {
9971 Discover(DiscoverRequest),
9972 ListIndexes(ListIndexesRequest),
9973 GetIndex(GetIndexRequest),
9974 ValidateIndexChange(ValidateIndexChangeRequest),
9975 ApplyIndexChange(ApplyIndexChangeRequest),
9976 ApplyAdministrationMutation(ApplyAdministrationMutationRequest),
9977 ListAliases(ListAliasesRequest),
9978 GetAlias(GetAliasRequest),
9979 ListDataStreams(ListDataStreamsRequest),
9980 GetDataStream(GetDataStreamRequest),
9981 ListComponentTemplates(ListComponentTemplatesRequest),
9982 GetComponentTemplate(GetComponentTemplateRequest),
9983 ListIndexTemplates(ListIndexTemplatesRequest),
9984 GetIndexTemplate(GetIndexTemplateRequest),
9985 ListIngestPipelines(ListIngestPipelinesRequest),
9986 GetIngestPipeline(GetIngestPipelineRequest),
9987 SimulateIngestPipeline(SimulateIngestPipelineRequest),
9988 ReprocessByQuery(ReprocessByQueryRequest),
9989 ListLifecyclePolicies(ListLifecyclePoliciesRequest),
9990 GetLifecyclePolicy(GetLifecyclePolicyRequest),
9991 PrepareCreateIndex(PrepareCreateIndexRequest),
9992 PrepareDeleteIndex(PrepareDeleteIndexRequest),
9993 SubmitCatalogAction(SubmitCatalogActionRequest),
9994 ResolveCatalogAction(ResolveCatalogActionRequest),
9995 PrepareReplayableSourceIndex(PrepareReplayableSourceIndexRequest),
9996 SubmitReplayableSourceIndex(SubmitReplayableSourceIndexRequest),
9997 GetReplayableSource(GetReplayableSourceRequest),
9998 ControlReplayableSource(ControlReplayableSourceRequest),
9999 CloneIndex(CloneIndexRequest),
10000 ConfigureHistory(ConfigureHistoryRequest),
10001 GetHistory(GetHistoryRequest),
10002 ResolveHistory(ResolveHistoryRequest),
10003 PlaceHistoryHold(PlaceHistoryHoldRequest),
10004 ReleaseHistoryHold(ReleaseHistoryHoldRequest),
10005 PrepareDocumentMutation(PrepareDocumentMutationRequest),
10006 SubmitDocumentMutation(SubmitDocumentMutationRequest),
10007 PrepareDocumentBulk(PrepareDocumentBulkRequest),
10008 SubmitDocumentBulk(SubmitDocumentBulkRequest),
10009 ResolveDocumentBulk(ResolveDocumentBulkRequest),
10010 PrepareAppendBulk(PrepareAppendBulkRequest),
10011 SubmitAppendBulk(SubmitAppendBulkRequest),
10012 ResolveAppendBulk(ResolveAppendBulkRequest),
10013 ObserveAppendCommitted(ObserveAppendCommittedRequest),
10014 ResolveDocumentMutation(ResolveDocumentMutationRequest),
10015 GetDocument(GetDocumentRequest),
10016 Search(SearchRequest),
10017 TraverseRelationships(TraverseRelationshipsRequest),
10018 QueryProfiles(QueryProfilesRequest),
10019 EvaluateTemporalEvidence(EvaluateTemporalEvidenceRequest),
10020 CreateContinuousTemporalEvaluation(CreateContinuousTemporalEvaluationRequest),
10021 GetContinuousTemporalEvaluation(GetContinuousTemporalEvaluationRequest),
10022 PauseContinuousTemporalEvaluation(PauseContinuousTemporalEvaluationRequest),
10023 ResumeContinuousTemporalEvaluation(ResumeContinuousTemporalEvaluationRequest),
10024 ReplaceContinuousTemporalEvaluation(ReplaceContinuousTemporalEvaluationRequest),
10025 RetireContinuousTemporalEvaluation(RetireContinuousTemporalEvaluationRequest),
10026 ReadContinuousTemporalEvidence(ReadContinuousTemporalEvidenceRequest),
10027 ValidateSearch(ValidateSearchRequest),
10028 OpenPit(OpenPitRequest),
10029 RenewPit(RenewPitRequest),
10030 ClosePit(ClosePitRequest),
10031 ListOperations(ListOperationsRequest),
10032 GetOperation(GetOperationRequest),
10033 WaitOperation(WaitOperationRequest),
10034 CancelOperation(CancelOperationRequest),
10035 ListAuditEvents(ListAuditEventsRequest),
10036 ExportAuditEvents(ExportAuditEventsRequest),
10037 ReserveServiceCredential(ReserveServiceCredentialRequest),
10038 ReserveServiceCredentialRotation(ReserveServiceCredentialRotationRequest),
10039 ActivateServiceCredential(ActivateServiceCredentialRequest),
10040 ResolveServiceCredentialReservation(ResolveServiceCredentialReservationRequest),
10041 PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialRequest),
10042 RevokeServiceCredential(RevokeServiceCredentialRequest),
10043 ResolveSecurityAction(ResolveSecurityActionRequest),
10044 GetSecurityRole(GetSecurityRoleRequest),
10045 PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeRequest),
10046 SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeRequest),
10047 ListServiceCredentials(ListServiceCredentialsRequest),
10048 GetRuntimeStatus(GetRuntimeStatusRequest),
10049 GetResultCacheStatus(GetResultCacheStatusRequest),
10050 GetFieldPromotionStatus(GetFieldPromotionStatusRequest),
10051 GetOverloadStatus(GetOverloadStatusRequest),
10052 ConfigureExternalKey(ConfigureExternalKeyRequest),
10053 RotateExternalKeyBinding(RotateExternalKeyBindingRequest),
10054 ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteRequest),
10055 GetLifecycleStatus(GetLifecycleStatusRequest),
10056 GetQuota(GetQuotaRequest),
10057 UpdateQuota(UpdateQuotaRequest),
10058 GetBinding(GetBindingRequest),
10059 GetAdmissionStatus(GetAdmissionStatusRequest),
10060 SetAdmission(SetAdmissionRequest),
10061 GetQuiesceStatus(GetQuiesceStatusRequest),
10062 GetDecommissionReadiness(GetDecommissionReadinessRequest),
10063 GetUpgradeReadiness(GetUpgradeReadinessRequest),
10064 GetMaintenanceStatus(GetMaintenanceStatusRequest),
10065 WarmVectorIndex(WarmVectorIndexRequest),
10066 EvaluateVectorRecall(EvaluateVectorRecallRequest),
10067 CalibrateVectorStrategy(CalibrateVectorStrategyRequest),
10068 GetVectorDiagnostic(GetVectorDiagnosticRequest),
10069 CreateDiagnostic(CreateDiagnosticRequest),
10070 GetDiagnostic(GetDiagnosticRequest),
10071 PrepareCollectionExport(PrepareCollectionExportRequest),
10072 StartCollectionExport(StartCollectionExportRequest),
10073 ResolveCollectionExport(ResolveCollectionExportRequest),
10074 VerifyCollectionExport(VerifyCollectionExportRequest),
10075 PrepareCollectionRestore(PrepareCollectionRestoreRequest),
10076 StartCollectionRestore(StartCollectionRestoreRequest),
10077 ResolveCollectionRestore(ResolveCollectionRestoreRequest),
10078 PrepareIndexExport(PrepareIndexExportRequest),
10079 StartIndexExport(StartIndexExportRequest),
10080 ResolveIndexExport(ResolveIndexExportRequest),
10081 VerifyIndexExport(VerifyIndexExportRequest),
10082 PrepareIndexImport(PrepareIndexImportRequest),
10083 StartIndexImport(StartIndexImportRequest),
10084 ResolveIndexImport(ResolveIndexImportRequest),
10085 ReadArtifactChunk(ReadArtifactChunkRequest),
10086 ExportUsage(ExportUsageRequest),
10087 ExecuteStateRead(ExecuteStateReadRequest),
10088 PrepareStateWrite(PrepareStateWriteRequest),
10089 SubmitStateWrite(SubmitStateWriteRequest),
10090 ResolveStateWrite(ResolveStateWriteRequest),
10091}
10092
10093#[allow(clippy::large_enum_variant)]
10096#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10097#[serde(tag = "command", content = "body", rename_all = "snake_case")]
10098pub enum ResultBody {
10099 Discover(DiscoverResult),
10100 ListIndexes(ListIndexesResult),
10101 GetIndex(GetIndexResult),
10102 ValidateIndexChange(ValidateIndexChangeResult),
10103 ApplyIndexChange(ApplyIndexChangeResult),
10104 ApplyAdministrationMutation(ApplyAdministrationMutationResult),
10105 ListAliases(ListAliasesResult),
10106 GetAlias(GetAliasResult),
10107 ListDataStreams(ListDataStreamsResult),
10108 GetDataStream(GetDataStreamResult),
10109 ListComponentTemplates(ListComponentTemplatesResult),
10110 GetComponentTemplate(GetComponentTemplateResult),
10111 ListIndexTemplates(ListIndexTemplatesResult),
10112 GetIndexTemplate(GetIndexTemplateResult),
10113 ListIngestPipelines(ListIngestPipelinesResult),
10114 GetIngestPipeline(GetIngestPipelineResult),
10115 SimulateIngestPipeline(SimulateIngestPipelineResult),
10116 ReprocessByQuery(ReprocessByQueryResult),
10117 ListLifecyclePolicies(ListLifecyclePoliciesResult),
10118 GetLifecyclePolicy(GetLifecyclePolicyResult),
10119 PrepareCreateIndex(PrepareCreateIndexResult),
10120 PrepareDeleteIndex(PrepareDeleteIndexResult),
10121 SubmitCatalogAction(SubmitCatalogActionResult),
10122 ResolveCatalogAction(ResolveCatalogActionResult),
10123 PrepareReplayableSourceIndex(PrepareReplayableSourceIndexResult),
10124 SubmitReplayableSourceIndex(SubmitReplayableSourceIndexResult),
10125 GetReplayableSource(GetReplayableSourceResult),
10126 ControlReplayableSource(ControlReplayableSourceResult),
10127 CloneIndex(CloneIndexResult),
10128 ConfigureHistory(ConfigureHistoryResult),
10129 GetHistory(GetHistoryResult),
10130 ResolveHistory(ResolveHistoryResult),
10131 PlaceHistoryHold(PlaceHistoryHoldResult),
10132 ReleaseHistoryHold(ReleaseHistoryHoldResult),
10133 PrepareDocumentMutation(PrepareDocumentMutationResult),
10134 SubmitDocumentMutation(SubmitDocumentMutationResult),
10135 PrepareDocumentBulk(PrepareDocumentBulkResult),
10136 SubmitDocumentBulk(SubmitDocumentBulkResult),
10137 ResolveDocumentBulk(ResolveDocumentBulkResult),
10138 PrepareAppendBulk(PrepareAppendBulkResult),
10139 SubmitAppendBulk(SubmitAppendBulkResult),
10140 ResolveAppendBulk(ResolveAppendBulkResult),
10141 ObserveAppendCommitted(ObserveAppendCommittedResult),
10142 ResolveDocumentMutation(ResolveDocumentMutationResult),
10143 GetDocument(GetDocumentResult),
10144 Search(SearchResult),
10145 TraverseRelationships(TraverseRelationshipsResult),
10146 QueryProfiles(QueryProfilesResult),
10147 EvaluateTemporalEvidence(EvaluateTemporalEvidenceResult),
10148 CreateContinuousTemporalEvaluation(CreateContinuousTemporalEvaluationResult),
10149 GetContinuousTemporalEvaluation(GetContinuousTemporalEvaluationResult),
10150 PauseContinuousTemporalEvaluation(PauseContinuousTemporalEvaluationResult),
10151 ResumeContinuousTemporalEvaluation(ResumeContinuousTemporalEvaluationResult),
10152 ReplaceContinuousTemporalEvaluation(ReplaceContinuousTemporalEvaluationResult),
10153 RetireContinuousTemporalEvaluation(RetireContinuousTemporalEvaluationResult),
10154 ReadContinuousTemporalEvidence(ReadContinuousTemporalEvidenceResult),
10155 ValidateSearch(ValidateSearchResult),
10156 OpenPit(OpenPitResult),
10157 RenewPit(RenewPitResult),
10158 ClosePit(ClosePitResult),
10159 ListOperations(ListOperationsResult),
10160 GetOperation(GetOperationResult),
10161 WaitOperation(WaitOperationResult),
10162 CancelOperation(CancelOperationResult),
10163 ListAuditEvents(ListAuditEventsResult),
10164 ExportAuditEvents(ExportAuditEventsResult),
10165 ReserveServiceCredential(ReserveServiceCredentialResult),
10166 ReserveServiceCredentialRotation(ReserveServiceCredentialRotationResult),
10167 ActivateServiceCredential(ActivateServiceCredentialResult),
10168 ResolveServiceCredentialReservation(ResolveServiceCredentialReservationResult),
10169 PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialResult),
10170 RevokeServiceCredential(RevokeServiceCredentialResult),
10171 ResolveSecurityAction(ResolveSecurityActionResult),
10172 GetSecurityRole(GetSecurityRoleResult),
10173 PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeResult),
10174 SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeResult),
10175 ListServiceCredentials(ListServiceCredentialsResult),
10176 GetRuntimeStatus(GetRuntimeStatusResult),
10177 GetResultCacheStatus(GetResultCacheStatusResult),
10178 GetFieldPromotionStatus(GetFieldPromotionStatusResult),
10179 GetOverloadStatus(GetOverloadStatusResult),
10180 ConfigureExternalKey(ConfigureExternalKeyResult),
10181 RotateExternalKeyBinding(RotateExternalKeyBindingResult),
10182 ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteResult),
10183 GetLifecycleStatus(GetLifecycleStatusResult),
10184 GetQuota(GetQuotaResult),
10185 UpdateQuota(UpdateQuotaResult),
10186 GetBinding(GetBindingResult),
10187 GetAdmissionStatus(GetAdmissionStatusResult),
10188 SetAdmission(SetAdmissionResult),
10189 GetQuiesceStatus(GetQuiesceStatusResult),
10190 GetDecommissionReadiness(GetDecommissionReadinessResult),
10191 GetUpgradeReadiness(GetUpgradeReadinessResult),
10192 GetMaintenanceStatus(GetMaintenanceStatusResult),
10193 WarmVectorIndex(WarmVectorIndexResult),
10194 EvaluateVectorRecall(EvaluateVectorRecallResult),
10195 CalibrateVectorStrategy(CalibrateVectorStrategyResult),
10196 GetVectorDiagnostic(GetVectorDiagnosticResult),
10197 CreateDiagnostic(CreateDiagnosticResult),
10198 GetDiagnostic(GetDiagnosticResult),
10199 PrepareCollectionExport(PrepareCollectionExportResult),
10200 StartCollectionExport(StartCollectionExportResult),
10201 ResolveCollectionExport(ResolveCollectionExportResult),
10202 VerifyCollectionExport(VerifyCollectionExportResult),
10203 PrepareCollectionRestore(PrepareCollectionRestoreResult),
10204 StartCollectionRestore(StartCollectionRestoreResult),
10205 ResolveCollectionRestore(ResolveCollectionRestoreResult),
10206 PrepareIndexExport(PrepareIndexExportResult),
10207 StartIndexExport(StartIndexExportResult),
10208 ResolveIndexExport(ResolveIndexExportResult),
10209 VerifyIndexExport(VerifyIndexExportResult),
10210 PrepareIndexImport(PrepareIndexImportResult),
10211 StartIndexImport(StartIndexImportResult),
10212 ResolveIndexImport(ResolveIndexImportResult),
10213 ReadArtifactChunk(ReadArtifactChunkResult),
10214 ExportUsage(ExportUsageResult),
10215 ExecuteStateRead(ExecuteStateReadResult),
10216 PrepareStateWrite(PrepareStateWriteResult),
10217 SubmitStateWrite(SubmitStateWriteResult),
10218 ResolveStateWrite(ResolveStateWriteResult),
10219}
10220
10221pub const fn command_for_request(value: &RequestBody) -> Command {
10222 match value {
10223 RequestBody::Discover(_) => Command::Discover,
10224 RequestBody::ListIndexes(_) => Command::ListIndexes,
10225 RequestBody::GetIndex(_) => Command::GetIndex,
10226 RequestBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
10227 RequestBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
10228 RequestBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
10229 RequestBody::ListAliases(_) => Command::ListAliases,
10230 RequestBody::GetAlias(_) => Command::GetAlias,
10231 RequestBody::ListDataStreams(_) => Command::ListDataStreams,
10232 RequestBody::GetDataStream(_) => Command::GetDataStream,
10233 RequestBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
10234 RequestBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
10235 RequestBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
10236 RequestBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
10237 RequestBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
10238 RequestBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
10239 RequestBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
10240 RequestBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
10241 RequestBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
10242 RequestBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
10243 RequestBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
10244 RequestBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
10245 RequestBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
10246 RequestBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
10247 RequestBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
10248 RequestBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
10249 RequestBody::GetReplayableSource(_) => Command::GetReplayableSource,
10250 RequestBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
10251 RequestBody::CloneIndex(_) => Command::CloneIndex,
10252 RequestBody::ConfigureHistory(_) => Command::ConfigureHistory,
10253 RequestBody::GetHistory(_) => Command::GetHistory,
10254 RequestBody::ResolveHistory(_) => Command::ResolveHistory,
10255 RequestBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
10256 RequestBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
10257 RequestBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
10258 RequestBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
10259 RequestBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
10260 RequestBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
10261 RequestBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
10262 RequestBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
10263 RequestBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
10264 RequestBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
10265 RequestBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
10266 RequestBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
10267 RequestBody::GetDocument(_) => Command::GetDocument,
10268 RequestBody::Search(_) => Command::Search,
10269 RequestBody::TraverseRelationships(_) => Command::TraverseRelationships,
10270 RequestBody::QueryProfiles(_) => Command::QueryProfiles,
10271 RequestBody::EvaluateTemporalEvidence(_) => Command::EvaluateTemporalEvidence,
10272 RequestBody::CreateContinuousTemporalEvaluation(_) => Command::CreateContinuousTemporalEvaluation,
10273 RequestBody::GetContinuousTemporalEvaluation(_) => Command::GetContinuousTemporalEvaluation,
10274 RequestBody::PauseContinuousTemporalEvaluation(_) => Command::PauseContinuousTemporalEvaluation,
10275 RequestBody::ResumeContinuousTemporalEvaluation(_) => Command::ResumeContinuousTemporalEvaluation,
10276 RequestBody::ReplaceContinuousTemporalEvaluation(_) => Command::ReplaceContinuousTemporalEvaluation,
10277 RequestBody::RetireContinuousTemporalEvaluation(_) => Command::RetireContinuousTemporalEvaluation,
10278 RequestBody::ReadContinuousTemporalEvidence(_) => Command::ReadContinuousTemporalEvidence,
10279 RequestBody::ValidateSearch(_) => Command::ValidateSearch,
10280 RequestBody::OpenPit(_) => Command::OpenPit,
10281 RequestBody::RenewPit(_) => Command::RenewPit,
10282 RequestBody::ClosePit(_) => Command::ClosePit,
10283 RequestBody::ListOperations(_) => Command::ListOperations,
10284 RequestBody::GetOperation(_) => Command::GetOperation,
10285 RequestBody::WaitOperation(_) => Command::WaitOperation,
10286 RequestBody::CancelOperation(_) => Command::CancelOperation,
10287 RequestBody::ListAuditEvents(_) => Command::ListAuditEvents,
10288 RequestBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
10289 RequestBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
10290 RequestBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
10291 RequestBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
10292 RequestBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
10293 RequestBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
10294 RequestBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
10295 RequestBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
10296 RequestBody::GetSecurityRole(_) => Command::GetSecurityRole,
10297 RequestBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
10298 RequestBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
10299 RequestBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
10300 RequestBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
10301 RequestBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
10302 RequestBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
10303 RequestBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
10304 RequestBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
10305 RequestBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
10306 RequestBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
10307 RequestBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
10308 RequestBody::GetQuota(_) => Command::GetQuota,
10309 RequestBody::UpdateQuota(_) => Command::UpdateQuota,
10310 RequestBody::GetBinding(_) => Command::GetBinding,
10311 RequestBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
10312 RequestBody::SetAdmission(_) => Command::SetAdmission,
10313 RequestBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
10314 RequestBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
10315 RequestBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
10316 RequestBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
10317 RequestBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
10318 RequestBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
10319 RequestBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
10320 RequestBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
10321 RequestBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
10322 RequestBody::GetDiagnostic(_) => Command::GetDiagnostic,
10323 RequestBody::PrepareCollectionExport(_) => Command::PrepareCollectionExport,
10324 RequestBody::StartCollectionExport(_) => Command::StartCollectionExport,
10325 RequestBody::ResolveCollectionExport(_) => Command::ResolveCollectionExport,
10326 RequestBody::VerifyCollectionExport(_) => Command::VerifyCollectionExport,
10327 RequestBody::PrepareCollectionRestore(_) => Command::PrepareCollectionRestore,
10328 RequestBody::StartCollectionRestore(_) => Command::StartCollectionRestore,
10329 RequestBody::ResolveCollectionRestore(_) => Command::ResolveCollectionRestore,
10330 RequestBody::PrepareIndexExport(_) => Command::PrepareIndexExport,
10331 RequestBody::StartIndexExport(_) => Command::StartIndexExport,
10332 RequestBody::ResolveIndexExport(_) => Command::ResolveIndexExport,
10333 RequestBody::VerifyIndexExport(_) => Command::VerifyIndexExport,
10334 RequestBody::PrepareIndexImport(_) => Command::PrepareIndexImport,
10335 RequestBody::StartIndexImport(_) => Command::StartIndexImport,
10336 RequestBody::ResolveIndexImport(_) => Command::ResolveIndexImport,
10337 RequestBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
10338 RequestBody::ExportUsage(_) => Command::ExportUsage,
10339 RequestBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
10340 RequestBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
10341 RequestBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
10342 RequestBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
10343 }
10344}
10345
10346pub const fn command_for_result(value: &ResultBody) -> Command {
10347 match value {
10348 ResultBody::Discover(_) => Command::Discover,
10349 ResultBody::ListIndexes(_) => Command::ListIndexes,
10350 ResultBody::GetIndex(_) => Command::GetIndex,
10351 ResultBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
10352 ResultBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
10353 ResultBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
10354 ResultBody::ListAliases(_) => Command::ListAliases,
10355 ResultBody::GetAlias(_) => Command::GetAlias,
10356 ResultBody::ListDataStreams(_) => Command::ListDataStreams,
10357 ResultBody::GetDataStream(_) => Command::GetDataStream,
10358 ResultBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
10359 ResultBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
10360 ResultBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
10361 ResultBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
10362 ResultBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
10363 ResultBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
10364 ResultBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
10365 ResultBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
10366 ResultBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
10367 ResultBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
10368 ResultBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
10369 ResultBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
10370 ResultBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
10371 ResultBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
10372 ResultBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
10373 ResultBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
10374 ResultBody::GetReplayableSource(_) => Command::GetReplayableSource,
10375 ResultBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
10376 ResultBody::CloneIndex(_) => Command::CloneIndex,
10377 ResultBody::ConfigureHistory(_) => Command::ConfigureHistory,
10378 ResultBody::GetHistory(_) => Command::GetHistory,
10379 ResultBody::ResolveHistory(_) => Command::ResolveHistory,
10380 ResultBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
10381 ResultBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
10382 ResultBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
10383 ResultBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
10384 ResultBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
10385 ResultBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
10386 ResultBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
10387 ResultBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
10388 ResultBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
10389 ResultBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
10390 ResultBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
10391 ResultBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
10392 ResultBody::GetDocument(_) => Command::GetDocument,
10393 ResultBody::Search(_) => Command::Search,
10394 ResultBody::TraverseRelationships(_) => Command::TraverseRelationships,
10395 ResultBody::QueryProfiles(_) => Command::QueryProfiles,
10396 ResultBody::EvaluateTemporalEvidence(_) => Command::EvaluateTemporalEvidence,
10397 ResultBody::CreateContinuousTemporalEvaluation(_) => Command::CreateContinuousTemporalEvaluation,
10398 ResultBody::GetContinuousTemporalEvaluation(_) => Command::GetContinuousTemporalEvaluation,
10399 ResultBody::PauseContinuousTemporalEvaluation(_) => Command::PauseContinuousTemporalEvaluation,
10400 ResultBody::ResumeContinuousTemporalEvaluation(_) => Command::ResumeContinuousTemporalEvaluation,
10401 ResultBody::ReplaceContinuousTemporalEvaluation(_) => Command::ReplaceContinuousTemporalEvaluation,
10402 ResultBody::RetireContinuousTemporalEvaluation(_) => Command::RetireContinuousTemporalEvaluation,
10403 ResultBody::ReadContinuousTemporalEvidence(_) => Command::ReadContinuousTemporalEvidence,
10404 ResultBody::ValidateSearch(_) => Command::ValidateSearch,
10405 ResultBody::OpenPit(_) => Command::OpenPit,
10406 ResultBody::RenewPit(_) => Command::RenewPit,
10407 ResultBody::ClosePit(_) => Command::ClosePit,
10408 ResultBody::ListOperations(_) => Command::ListOperations,
10409 ResultBody::GetOperation(_) => Command::GetOperation,
10410 ResultBody::WaitOperation(_) => Command::WaitOperation,
10411 ResultBody::CancelOperation(_) => Command::CancelOperation,
10412 ResultBody::ListAuditEvents(_) => Command::ListAuditEvents,
10413 ResultBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
10414 ResultBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
10415 ResultBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
10416 ResultBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
10417 ResultBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
10418 ResultBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
10419 ResultBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
10420 ResultBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
10421 ResultBody::GetSecurityRole(_) => Command::GetSecurityRole,
10422 ResultBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
10423 ResultBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
10424 ResultBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
10425 ResultBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
10426 ResultBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
10427 ResultBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
10428 ResultBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
10429 ResultBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
10430 ResultBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
10431 ResultBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
10432 ResultBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
10433 ResultBody::GetQuota(_) => Command::GetQuota,
10434 ResultBody::UpdateQuota(_) => Command::UpdateQuota,
10435 ResultBody::GetBinding(_) => Command::GetBinding,
10436 ResultBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
10437 ResultBody::SetAdmission(_) => Command::SetAdmission,
10438 ResultBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
10439 ResultBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
10440 ResultBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
10441 ResultBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
10442 ResultBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
10443 ResultBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
10444 ResultBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
10445 ResultBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
10446 ResultBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
10447 ResultBody::GetDiagnostic(_) => Command::GetDiagnostic,
10448 ResultBody::PrepareCollectionExport(_) => Command::PrepareCollectionExport,
10449 ResultBody::StartCollectionExport(_) => Command::StartCollectionExport,
10450 ResultBody::ResolveCollectionExport(_) => Command::ResolveCollectionExport,
10451 ResultBody::VerifyCollectionExport(_) => Command::VerifyCollectionExport,
10452 ResultBody::PrepareCollectionRestore(_) => Command::PrepareCollectionRestore,
10453 ResultBody::StartCollectionRestore(_) => Command::StartCollectionRestore,
10454 ResultBody::ResolveCollectionRestore(_) => Command::ResolveCollectionRestore,
10455 ResultBody::PrepareIndexExport(_) => Command::PrepareIndexExport,
10456 ResultBody::StartIndexExport(_) => Command::StartIndexExport,
10457 ResultBody::ResolveIndexExport(_) => Command::ResolveIndexExport,
10458 ResultBody::VerifyIndexExport(_) => Command::VerifyIndexExport,
10459 ResultBody::PrepareIndexImport(_) => Command::PrepareIndexImport,
10460 ResultBody::StartIndexImport(_) => Command::StartIndexImport,
10461 ResultBody::ResolveIndexImport(_) => Command::ResolveIndexImport,
10462 ResultBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
10463 ResultBody::ExportUsage(_) => Command::ExportUsage,
10464 ResultBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
10465 ResultBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
10466 ResultBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
10467 ResultBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
10468 }
10469}
10470
10471#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10472#[serde(deny_unknown_fields)]
10473pub struct RequestEnvelope {
10474 pub meta: RequestMeta,
10475 pub request: RequestBody,
10476}
10477#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10478#[serde(tag = "outcome", rename_all = "snake_case")]
10479pub enum ResponseEnvelope {
10480 Success {
10481 meta: ResponseMeta,
10482 result: Box<ResultBody>,
10483 },
10484 Error {
10485 meta: ResponseMeta,
10486 error: ErrorBody,
10487 },
10488}
10489
10490#[derive(Clone, Copy, Debug, Eq, PartialEq)]
10491pub struct CommandContract {
10492 pub command: Command,
10493 pub action: Action,
10494 pub cancellable: bool,
10495 pub mutation: &'static str,
10496}
10497pub const LODESTONE_API_COMMAND_CONTRACTS: &[CommandContract] = &[
10498 CommandContract {
10499 command: Command::Discover,
10500 action: Action::IdentityDiscovery,
10501 cancellable: true,
10502 mutation: "read_only",
10503 },
10504 CommandContract {
10505 command: Command::ListIndexes,
10506 action: Action::CatalogRead,
10507 cancellable: true,
10508 mutation: "read_only",
10509 },
10510 CommandContract {
10511 command: Command::GetIndex,
10512 action: Action::CatalogRead,
10513 cancellable: true,
10514 mutation: "read_only",
10515 },
10516 CommandContract {
10517 command: Command::ValidateIndexChange,
10518 action: Action::IndexAdmin,
10519 cancellable: true,
10520 mutation: "read_only",
10521 },
10522 CommandContract {
10523 command: Command::ApplyIndexChange,
10524 action: Action::IndexAdmin,
10525 cancellable: true,
10526 mutation: "catalog_submit",
10527 },
10528 CommandContract {
10529 command: Command::ApplyAdministrationMutation,
10530 action: Action::LifecycleAdmin,
10531 cancellable: true,
10532 mutation: "administration_submit",
10533 },
10534 CommandContract {
10535 command: Command::ListAliases,
10536 action: Action::CatalogRead,
10537 cancellable: true,
10538 mutation: "read_only",
10539 },
10540 CommandContract {
10541 command: Command::GetAlias,
10542 action: Action::CatalogRead,
10543 cancellable: true,
10544 mutation: "read_only",
10545 },
10546 CommandContract {
10547 command: Command::ListDataStreams,
10548 action: Action::CatalogRead,
10549 cancellable: true,
10550 mutation: "read_only",
10551 },
10552 CommandContract {
10553 command: Command::GetDataStream,
10554 action: Action::CatalogRead,
10555 cancellable: true,
10556 mutation: "read_only",
10557 },
10558 CommandContract {
10559 command: Command::ListComponentTemplates,
10560 action: Action::CatalogRead,
10561 cancellable: true,
10562 mutation: "read_only",
10563 },
10564 CommandContract {
10565 command: Command::GetComponentTemplate,
10566 action: Action::CatalogRead,
10567 cancellable: true,
10568 mutation: "read_only",
10569 },
10570 CommandContract {
10571 command: Command::ListIndexTemplates,
10572 action: Action::CatalogRead,
10573 cancellable: true,
10574 mutation: "read_only",
10575 },
10576 CommandContract {
10577 command: Command::GetIndexTemplate,
10578 action: Action::CatalogRead,
10579 cancellable: true,
10580 mutation: "read_only",
10581 },
10582 CommandContract {
10583 command: Command::ListIngestPipelines,
10584 action: Action::LifecycleAdmin,
10585 cancellable: true,
10586 mutation: "read_only",
10587 },
10588 CommandContract {
10589 command: Command::GetIngestPipeline,
10590 action: Action::LifecycleAdmin,
10591 cancellable: true,
10592 mutation: "read_only",
10593 },
10594 CommandContract {
10595 command: Command::SimulateIngestPipeline,
10596 action: Action::LifecycleAdmin,
10597 cancellable: true,
10598 mutation: "read_only",
10599 },
10600 CommandContract {
10601 command: Command::ReprocessByQuery,
10602 action: Action::DataWrite,
10603 cancellable: true,
10604 mutation: "authority_submit",
10605 },
10606 CommandContract {
10607 command: Command::ListLifecyclePolicies,
10608 action: Action::CatalogRead,
10609 cancellable: true,
10610 mutation: "read_only",
10611 },
10612 CommandContract {
10613 command: Command::GetLifecyclePolicy,
10614 action: Action::CatalogRead,
10615 cancellable: true,
10616 mutation: "read_only",
10617 },
10618 CommandContract {
10619 command: Command::PrepareCreateIndex,
10620 action: Action::IndexAdmin,
10621 cancellable: true,
10622 mutation: "catalog_prepare",
10623 },
10624 CommandContract {
10625 command: Command::PrepareDeleteIndex,
10626 action: Action::IndexAdmin,
10627 cancellable: true,
10628 mutation: "catalog_prepare",
10629 },
10630 CommandContract {
10631 command: Command::SubmitCatalogAction,
10632 action: Action::IndexAdmin,
10633 cancellable: true,
10634 mutation: "catalog_submit",
10635 },
10636 CommandContract {
10637 command: Command::ResolveCatalogAction,
10638 action: Action::IndexAdmin,
10639 cancellable: true,
10640 mutation: "read_only",
10641 },
10642 CommandContract {
10643 command: Command::PrepareReplayableSourceIndex,
10644 action: Action::IndexAdmin,
10645 cancellable: true,
10646 mutation: "catalog_prepare",
10647 },
10648 CommandContract {
10649 command: Command::SubmitReplayableSourceIndex,
10650 action: Action::IndexAdmin,
10651 cancellable: true,
10652 mutation: "catalog_submit",
10653 },
10654 CommandContract {
10655 command: Command::GetReplayableSource,
10656 action: Action::CatalogRead,
10657 cancellable: true,
10658 mutation: "read_only",
10659 },
10660 CommandContract {
10661 command: Command::ControlReplayableSource,
10662 action: Action::IndexAdmin,
10663 cancellable: true,
10664 mutation: "catalog_submit",
10665 },
10666 CommandContract {
10667 command: Command::CloneIndex,
10668 action: Action::IndexAdmin,
10669 cancellable: true,
10670 mutation: "catalog_submit",
10671 },
10672 CommandContract {
10673 command: Command::ConfigureHistory,
10674 action: Action::IndexAdmin,
10675 cancellable: true,
10676 mutation: "catalog_submit",
10677 },
10678 CommandContract {
10679 command: Command::GetHistory,
10680 action: Action::CatalogRead,
10681 cancellable: true,
10682 mutation: "read_only",
10683 },
10684 CommandContract {
10685 command: Command::ResolveHistory,
10686 action: Action::DataRead,
10687 cancellable: true,
10688 mutation: "read_only",
10689 },
10690 CommandContract {
10691 command: Command::PlaceHistoryHold,
10692 action: Action::IndexAdmin,
10693 cancellable: true,
10694 mutation: "catalog_submit",
10695 },
10696 CommandContract {
10697 command: Command::ReleaseHistoryHold,
10698 action: Action::IndexAdmin,
10699 cancellable: true,
10700 mutation: "catalog_submit",
10701 },
10702 CommandContract {
10703 command: Command::PrepareDocumentMutation,
10704 action: Action::DataWrite,
10705 cancellable: true,
10706 mutation: "read_only_prepare",
10707 },
10708 CommandContract {
10709 command: Command::SubmitDocumentMutation,
10710 action: Action::DataWrite,
10711 cancellable: true,
10712 mutation: "wal_submit",
10713 },
10714 CommandContract {
10715 command: Command::PrepareDocumentBulk,
10716 action: Action::DataWrite,
10717 cancellable: true,
10718 mutation: "read_only_prepare",
10719 },
10720 CommandContract {
10721 command: Command::SubmitDocumentBulk,
10722 action: Action::DataWrite,
10723 cancellable: true,
10724 mutation: "wal_submit",
10725 },
10726 CommandContract {
10727 command: Command::ResolveDocumentBulk,
10728 action: Action::DataRead,
10729 cancellable: true,
10730 mutation: "read_only",
10731 },
10732 CommandContract {
10733 command: Command::PrepareAppendBulk,
10734 action: Action::Append,
10735 cancellable: true,
10736 mutation: "read_only_prepare",
10737 },
10738 CommandContract {
10739 command: Command::SubmitAppendBulk,
10740 action: Action::Append,
10741 cancellable: true,
10742 mutation: "wal_submit",
10743 },
10744 CommandContract {
10745 command: Command::ResolveAppendBulk,
10746 action: Action::ResolveAppend,
10747 cancellable: true,
10748 mutation: "read_only",
10749 },
10750 CommandContract {
10751 command: Command::ObserveAppendCommitted,
10752 action: Action::ResolveAppend,
10753 cancellable: true,
10754 mutation: "read_only",
10755 },
10756 CommandContract {
10757 command: Command::ResolveDocumentMutation,
10758 action: Action::DataRead,
10759 cancellable: true,
10760 mutation: "read_only",
10761 },
10762 CommandContract {
10763 command: Command::GetDocument,
10764 action: Action::DataRead,
10765 cancellable: true,
10766 mutation: "read_only",
10767 },
10768 CommandContract {
10769 command: Command::Search,
10770 action: Action::DataRead,
10771 cancellable: true,
10772 mutation: "read_only",
10773 },
10774 CommandContract {
10775 command: Command::TraverseRelationships,
10776 action: Action::DataRead,
10777 cancellable: true,
10778 mutation: "read_only",
10779 },
10780 CommandContract {
10781 command: Command::QueryProfiles,
10782 action: Action::DataRead,
10783 cancellable: true,
10784 mutation: "read_only",
10785 },
10786 CommandContract {
10787 command: Command::EvaluateTemporalEvidence,
10788 action: Action::DataRead,
10789 cancellable: true,
10790 mutation: "read_only",
10791 },
10792 CommandContract {
10793 command: Command::CreateContinuousTemporalEvaluation,
10794 action: Action::LifecycleAdmin,
10795 cancellable: true,
10796 mutation: "catalog_submit",
10797 },
10798 CommandContract {
10799 command: Command::GetContinuousTemporalEvaluation,
10800 action: Action::CatalogRead,
10801 cancellable: true,
10802 mutation: "read_only",
10803 },
10804 CommandContract {
10805 command: Command::PauseContinuousTemporalEvaluation,
10806 action: Action::LifecycleAdmin,
10807 cancellable: true,
10808 mutation: "catalog_submit",
10809 },
10810 CommandContract {
10811 command: Command::ResumeContinuousTemporalEvaluation,
10812 action: Action::LifecycleAdmin,
10813 cancellable: true,
10814 mutation: "catalog_submit",
10815 },
10816 CommandContract {
10817 command: Command::ReplaceContinuousTemporalEvaluation,
10818 action: Action::LifecycleAdmin,
10819 cancellable: true,
10820 mutation: "catalog_submit",
10821 },
10822 CommandContract {
10823 command: Command::RetireContinuousTemporalEvaluation,
10824 action: Action::LifecycleAdmin,
10825 cancellable: true,
10826 mutation: "catalog_submit",
10827 },
10828 CommandContract {
10829 command: Command::ReadContinuousTemporalEvidence,
10830 action: Action::DataRead,
10831 cancellable: true,
10832 mutation: "read_only",
10833 },
10834 CommandContract {
10835 command: Command::ValidateSearch,
10836 action: Action::DataRead,
10837 cancellable: true,
10838 mutation: "read_only",
10839 },
10840 CommandContract {
10841 command: Command::OpenPit,
10842 action: Action::DataRead,
10843 cancellable: true,
10844 mutation: "authority_submit",
10845 },
10846 CommandContract {
10847 command: Command::RenewPit,
10848 action: Action::DataRead,
10849 cancellable: true,
10850 mutation: "authority_submit",
10851 },
10852 CommandContract {
10853 command: Command::ClosePit,
10854 action: Action::DataRead,
10855 cancellable: true,
10856 mutation: "authority_submit",
10857 },
10858 CommandContract {
10859 command: Command::ListOperations,
10860 action: Action::OperationRead,
10861 cancellable: true,
10862 mutation: "read_only",
10863 },
10864 CommandContract {
10865 command: Command::GetOperation,
10866 action: Action::OperationRead,
10867 cancellable: true,
10868 mutation: "read_only",
10869 },
10870 CommandContract {
10871 command: Command::WaitOperation,
10872 action: Action::OperationRead,
10873 cancellable: true,
10874 mutation: "read_only",
10875 },
10876 CommandContract {
10877 command: Command::CancelOperation,
10878 action: Action::OperationCancel,
10879 cancellable: true,
10880 mutation: "authority_submit",
10881 },
10882 CommandContract {
10883 command: Command::ListAuditEvents,
10884 action: Action::AuditRead,
10885 cancellable: true,
10886 mutation: "read_only",
10887 },
10888 CommandContract {
10889 command: Command::ExportAuditEvents,
10890 action: Action::AuditRead,
10891 cancellable: true,
10892 mutation: "read_only",
10893 },
10894 CommandContract {
10895 command: Command::ReserveServiceCredential,
10896 action: Action::SecurityAdmin,
10897 cancellable: true,
10898 mutation: "security_reserve",
10899 },
10900 CommandContract {
10901 command: Command::ReserveServiceCredentialRotation,
10902 action: Action::SecurityAdmin,
10903 cancellable: true,
10904 mutation: "security_reserve",
10905 },
10906 CommandContract {
10907 command: Command::ActivateServiceCredential,
10908 action: Action::SecurityAdmin,
10909 cancellable: true,
10910 mutation: "security_submit",
10911 },
10912 CommandContract {
10913 command: Command::ResolveServiceCredentialReservation,
10914 action: Action::SecurityRead,
10915 cancellable: true,
10916 mutation: "read_only",
10917 },
10918 CommandContract {
10919 command: Command::PrepareRevokeServiceCredential,
10920 action: Action::SecurityAdmin,
10921 cancellable: true,
10922 mutation: "read_only_prepare",
10923 },
10924 CommandContract {
10925 command: Command::RevokeServiceCredential,
10926 action: Action::SecurityAdmin,
10927 cancellable: true,
10928 mutation: "security_submit",
10929 },
10930 CommandContract {
10931 command: Command::ResolveSecurityAction,
10932 action: Action::SecurityRead,
10933 cancellable: true,
10934 mutation: "read_only",
10935 },
10936 CommandContract {
10937 command: Command::GetSecurityRole,
10938 action: Action::SecurityRead,
10939 cancellable: true,
10940 mutation: "read_only",
10941 },
10942 CommandContract {
10943 command: Command::PrepareRoleAppendAccessChange,
10944 action: Action::SecurityAdmin,
10945 cancellable: true,
10946 mutation: "read_only_prepare",
10947 },
10948 CommandContract {
10949 command: Command::SubmitRoleAppendAccessChange,
10950 action: Action::SecurityAdmin,
10951 cancellable: true,
10952 mutation: "security_submit",
10953 },
10954 CommandContract {
10955 command: Command::ListServiceCredentials,
10956 action: Action::SecurityRead,
10957 cancellable: true,
10958 mutation: "read_only",
10959 },
10960 CommandContract {
10961 command: Command::GetRuntimeStatus,
10962 action: Action::CatalogRead,
10963 cancellable: true,
10964 mutation: "read_only",
10965 },
10966 CommandContract {
10967 command: Command::GetResultCacheStatus,
10968 action: Action::CatalogRead,
10969 cancellable: true,
10970 mutation: "read_only",
10971 },
10972 CommandContract {
10973 command: Command::GetFieldPromotionStatus,
10974 action: Action::CatalogRead,
10975 cancellable: true,
10976 mutation: "read_only",
10977 },
10978 CommandContract {
10979 command: Command::GetOverloadStatus,
10980 action: Action::CatalogRead,
10981 cancellable: true,
10982 mutation: "read_only",
10983 },
10984 CommandContract {
10985 command: Command::ConfigureExternalKey,
10986 action: Action::LifecycleAdmin,
10987 cancellable: true,
10988 mutation: "authority_submit",
10989 },
10990 CommandContract {
10991 command: Command::RotateExternalKeyBinding,
10992 action: Action::LifecycleAdmin,
10993 cancellable: true,
10994 mutation: "authority_submit",
10995 },
10996 CommandContract {
10997 command: Command::ConfigureAggregateThenDelete,
10998 action: Action::LifecycleAdmin,
10999 cancellable: true,
11000 mutation: "authority_submit",
11001 },
11002 CommandContract {
11003 command: Command::GetLifecycleStatus,
11004 action: Action::CatalogRead,
11005 cancellable: true,
11006 mutation: "read_only",
11007 },
11008 CommandContract {
11009 command: Command::GetQuota,
11010 action: Action::QuotaRead,
11011 cancellable: true,
11012 mutation: "read_only",
11013 },
11014 CommandContract {
11015 command: Command::UpdateQuota,
11016 action: Action::QuotaAdmin,
11017 cancellable: true,
11018 mutation: "quota_submit",
11019 },
11020 CommandContract {
11021 command: Command::GetBinding,
11022 action: Action::BindingRead,
11023 cancellable: true,
11024 mutation: "read_only",
11025 },
11026 CommandContract {
11027 command: Command::GetAdmissionStatus,
11028 action: Action::AdmissionRead,
11029 cancellable: true,
11030 mutation: "read_only",
11031 },
11032 CommandContract {
11033 command: Command::SetAdmission,
11034 action: Action::AdmissionAdmin,
11035 cancellable: true,
11036 mutation: "admission_submit",
11037 },
11038 CommandContract {
11039 command: Command::GetQuiesceStatus,
11040 action: Action::AdmissionRead,
11041 cancellable: true,
11042 mutation: "read_only",
11043 },
11044 CommandContract {
11045 command: Command::GetDecommissionReadiness,
11046 action: Action::AdmissionRead,
11047 cancellable: true,
11048 mutation: "read_only",
11049 },
11050 CommandContract {
11051 command: Command::GetUpgradeReadiness,
11052 action: Action::TaskRead,
11053 cancellable: true,
11054 mutation: "read_only",
11055 },
11056 CommandContract {
11057 command: Command::GetMaintenanceStatus,
11058 action: Action::TaskRead,
11059 cancellable: true,
11060 mutation: "read_only",
11061 },
11062 CommandContract {
11063 command: Command::WarmVectorIndex,
11064 action: Action::DataRead,
11065 cancellable: true,
11066 mutation: "read_only",
11067 },
11068 CommandContract {
11069 command: Command::EvaluateVectorRecall,
11070 action: Action::DiagnosticsCreate,
11071 cancellable: true,
11072 mutation: "diagnostic_submit",
11073 },
11074 CommandContract {
11075 command: Command::CalibrateVectorStrategy,
11076 action: Action::DiagnosticsCreate,
11077 cancellable: true,
11078 mutation: "diagnostic_submit",
11079 },
11080 CommandContract {
11081 command: Command::GetVectorDiagnostic,
11082 action: Action::DiagnosticsRead,
11083 cancellable: true,
11084 mutation: "read_only",
11085 },
11086 CommandContract {
11087 command: Command::CreateDiagnostic,
11088 action: Action::DiagnosticsCreate,
11089 cancellable: true,
11090 mutation: "diagnostic_submit",
11091 },
11092 CommandContract {
11093 command: Command::GetDiagnostic,
11094 action: Action::DiagnosticsRead,
11095 cancellable: true,
11096 mutation: "read_only",
11097 },
11098 CommandContract {
11099 command: Command::PrepareCollectionExport,
11100 action: Action::CollectionExport,
11101 cancellable: true,
11102 mutation: "read_only_prepare",
11103 },
11104 CommandContract {
11105 command: Command::StartCollectionExport,
11106 action: Action::CollectionExport,
11107 cancellable: true,
11108 mutation: "portability_submit",
11109 },
11110 CommandContract {
11111 command: Command::ResolveCollectionExport,
11112 action: Action::CollectionExport,
11113 cancellable: true,
11114 mutation: "read_only",
11115 },
11116 CommandContract {
11117 command: Command::VerifyCollectionExport,
11118 action: Action::CollectionExport,
11119 cancellable: true,
11120 mutation: "read_only",
11121 },
11122 CommandContract {
11123 command: Command::PrepareCollectionRestore,
11124 action: Action::CollectionRestore,
11125 cancellable: true,
11126 mutation: "read_only_prepare",
11127 },
11128 CommandContract {
11129 command: Command::StartCollectionRestore,
11130 action: Action::CollectionRestore,
11131 cancellable: true,
11132 mutation: "portability_submit",
11133 },
11134 CommandContract {
11135 command: Command::ResolveCollectionRestore,
11136 action: Action::CollectionRestore,
11137 cancellable: true,
11138 mutation: "read_only",
11139 },
11140 CommandContract {
11141 command: Command::PrepareIndexExport,
11142 action: Action::IndexExport,
11143 cancellable: true,
11144 mutation: "read_only_prepare",
11145 },
11146 CommandContract {
11147 command: Command::StartIndexExport,
11148 action: Action::IndexExport,
11149 cancellable: true,
11150 mutation: "portability_submit",
11151 },
11152 CommandContract {
11153 command: Command::ResolveIndexExport,
11154 action: Action::IndexExport,
11155 cancellable: true,
11156 mutation: "read_only",
11157 },
11158 CommandContract {
11159 command: Command::VerifyIndexExport,
11160 action: Action::IndexExport,
11161 cancellable: true,
11162 mutation: "read_only",
11163 },
11164 CommandContract {
11165 command: Command::PrepareIndexImport,
11166 action: Action::IndexImport,
11167 cancellable: true,
11168 mutation: "read_only_prepare",
11169 },
11170 CommandContract {
11171 command: Command::StartIndexImport,
11172 action: Action::IndexImport,
11173 cancellable: true,
11174 mutation: "portability_submit",
11175 },
11176 CommandContract {
11177 command: Command::ResolveIndexImport,
11178 action: Action::IndexImport,
11179 cancellable: true,
11180 mutation: "read_only",
11181 },
11182 CommandContract {
11183 command: Command::ReadArtifactChunk,
11184 action: Action::OperationRead,
11185 cancellable: true,
11186 mutation: "read_only",
11187 },
11188 CommandContract {
11189 command: Command::ExportUsage,
11190 action: Action::UsageRead,
11191 cancellable: true,
11192 mutation: "read_only",
11193 },
11194 CommandContract {
11195 command: Command::ExecuteStateRead,
11196 action: Action::DataRead,
11197 cancellable: true,
11198 mutation: "read_only",
11199 },
11200 CommandContract {
11201 command: Command::PrepareStateWrite,
11202 action: Action::DataWrite,
11203 cancellable: true,
11204 mutation: "read_only_prepare",
11205 },
11206 CommandContract {
11207 command: Command::SubmitStateWrite,
11208 action: Action::DataWrite,
11209 cancellable: true,
11210 mutation: "state_submit",
11211 },
11212 CommandContract {
11213 command: Command::ResolveStateWrite,
11214 action: Action::DataRead,
11215 cancellable: true,
11216 mutation: "read_only",
11217 },
11218];
11219#[derive(Clone, Copy, Debug, Eq, PartialEq)]
11220pub struct CommandSemanticContract {
11221 pub command: Command,
11222 pub admissible_errors: &'static [ErrorCode],
11223 pub limit_ids: &'static [&'static str],
11224 pub effect_class: &'static str,
11225 pub risk_flags: &'static [&'static str],
11226 pub capability_family: &'static str,
11227 pub retry_safety: &'static str,
11228 pub identity_requirement: &'static str,
11229 pub resolver: Option<Command>,
11230 pub cancellation: &'static str,
11231 pub side_effects: &'static [&'static str],
11232 pub recovery: &'static str,
11233 pub collection_index_ref: &'static str,
11234}
11235pub const LODESTONE_API_COMMAND_SEMANTICS: &[CommandSemanticContract] = &[
11236 CommandSemanticContract {
11237 command: Command::Discover,
11238 admissible_errors: &[
11239 ErrorCode::Aborted,
11240 ErrorCode::DeadlineExceeded,
11241 ErrorCode::InvalidRequest,
11242 ErrorCode::UnsupportedVersion,
11243 ErrorCode::Unauthenticated,
11244 ErrorCode::PermissionDenied,
11245 ErrorCode::NotFound,
11246 ErrorCode::LimitExceeded,
11247 ErrorCode::CapabilityUnavailable,
11248 ErrorCode::TemporarilyUnavailable,
11249 ErrorCode::Internal,
11250 ],
11251 limit_ids: &["request_bytes", "response_bytes"],
11252 effect_class: "read_only",
11253 risk_flags: &[],
11254 capability_family: "discovery",
11255 retry_safety: "safe",
11256 identity_requirement: "none",
11257 resolver: None,
11258 cancellation: "per_call",
11259 side_effects: &[],
11260 recovery: "retry",
11261 collection_index_ref: "none",
11262 },
11263 CommandSemanticContract {
11264 command: Command::ListIndexes,
11265 admissible_errors: &[
11266 ErrorCode::Aborted,
11267 ErrorCode::DeadlineExceeded,
11268 ErrorCode::InvalidRequest,
11269 ErrorCode::UnsupportedVersion,
11270 ErrorCode::Unauthenticated,
11271 ErrorCode::PermissionDenied,
11272 ErrorCode::NotFound,
11273 ErrorCode::StaleCursor,
11274 ErrorCode::RestartBudgetExhausted,
11275 ErrorCode::LimitExceeded,
11276 ErrorCode::CapabilityUnavailable,
11277 ErrorCode::TemporarilyUnavailable,
11278 ErrorCode::Internal,
11279 ],
11280 limit_ids: &[
11281 "request_bytes",
11282 "response_bytes",
11283 "page_size",
11284 "catalog_page_size",
11285 "catalog_restart_budget",
11286 ],
11287 effect_class: "read_only",
11288 risk_flags: &[],
11289 capability_family: "catalog",
11290 retry_safety: "safe",
11291 identity_requirement: "none",
11292 resolver: None,
11293 cancellation: "per_call",
11294 side_effects: &[],
11295 recovery: "retry",
11296 collection_index_ref: "none",
11297 },
11298 CommandSemanticContract {
11299 command: Command::GetIndex,
11300 admissible_errors: &[
11301 ErrorCode::Aborted,
11302 ErrorCode::DeadlineExceeded,
11303 ErrorCode::InvalidRequest,
11304 ErrorCode::UnsupportedVersion,
11305 ErrorCode::Unauthenticated,
11306 ErrorCode::PermissionDenied,
11307 ErrorCode::NotFound,
11308 ErrorCode::LimitExceeded,
11309 ErrorCode::CapabilityUnavailable,
11310 ErrorCode::TemporarilyUnavailable,
11311 ErrorCode::Internal,
11312 ],
11313 limit_ids: &["request_bytes", "response_bytes"],
11314 effect_class: "read_only",
11315 risk_flags: &[],
11316 capability_family: "catalog",
11317 retry_safety: "safe",
11318 identity_requirement: "none",
11319 resolver: None,
11320 cancellation: "per_call",
11321 side_effects: &[],
11322 recovery: "retry",
11323 collection_index_ref: "none",
11324 },
11325 CommandSemanticContract {
11326 command: Command::ValidateIndexChange,
11327 admissible_errors: &[
11328 ErrorCode::Aborted,
11329 ErrorCode::DeadlineExceeded,
11330 ErrorCode::InvalidRequest,
11331 ErrorCode::UnsupportedVersion,
11332 ErrorCode::Unauthenticated,
11333 ErrorCode::PermissionDenied,
11334 ErrorCode::NotFound,
11335 ErrorCode::LimitExceeded,
11336 ErrorCode::CapabilityUnavailable,
11337 ErrorCode::TemporarilyUnavailable,
11338 ErrorCode::Internal,
11339 ],
11340 limit_ids: &["request_bytes", "response_bytes"],
11341 effect_class: "read_only",
11342 risk_flags: &[],
11343 capability_family: "catalog",
11344 retry_safety: "safe",
11345 identity_requirement: "none",
11346 resolver: None,
11347 cancellation: "per_call",
11348 side_effects: &[],
11349 recovery: "retry",
11350 collection_index_ref: "request_name",
11351 },
11352 CommandSemanticContract {
11353 command: Command::ApplyIndexChange,
11354 admissible_errors: &[
11355 ErrorCode::Aborted,
11356 ErrorCode::DeadlineExceeded,
11357 ErrorCode::InvalidRequest,
11358 ErrorCode::UnsupportedVersion,
11359 ErrorCode::Unauthenticated,
11360 ErrorCode::PermissionDenied,
11361 ErrorCode::NotFound,
11362 ErrorCode::Conflict,
11363 ErrorCode::LimitExceeded,
11364 ErrorCode::CapabilityUnavailable,
11365 ErrorCode::NotSubmitted,
11366 ErrorCode::SubmittedIndeterminate,
11367 ErrorCode::ExpiredUnknown,
11368 ErrorCode::TemporarilyUnavailable,
11369 ErrorCode::Internal,
11370 ],
11371 limit_ids: &["request_bytes", "response_bytes"],
11372 effect_class: "durable_submit",
11373 risk_flags: &[],
11374 capability_family: "catalog",
11375 retry_safety: "pre_submit_only",
11376 identity_requirement: "caller_action_id",
11377 resolver: None,
11378 cancellation: "per_call_until_submission_then_resolve",
11379 side_effects: &["commits_authoritative_state"],
11380 recovery: "retry_if_not_submitted",
11381 collection_index_ref: "request_index",
11382 },
11383 CommandSemanticContract {
11384 command: Command::ApplyAdministrationMutation,
11385 admissible_errors: &[
11386 ErrorCode::Aborted,
11387 ErrorCode::DeadlineExceeded,
11388 ErrorCode::InvalidRequest,
11389 ErrorCode::UnsupportedVersion,
11390 ErrorCode::Unauthenticated,
11391 ErrorCode::PermissionDenied,
11392 ErrorCode::NotFound,
11393 ErrorCode::Conflict,
11394 ErrorCode::LimitExceeded,
11395 ErrorCode::CapabilityUnavailable,
11396 ErrorCode::NotSubmitted,
11397 ErrorCode::SubmittedIndeterminate,
11398 ErrorCode::ExpiredUnknown,
11399 ErrorCode::TemporarilyUnavailable,
11400 ErrorCode::Internal,
11401 ],
11402 limit_ids: &["request_bytes", "response_bytes"],
11403 effect_class: "control_write",
11404 risk_flags: &[],
11405 capability_family: "lifecycle",
11406 retry_safety: "pre_submit_only",
11407 identity_requirement: "caller_action_id",
11408 resolver: None,
11409 cancellation: "per_call_until_submission_then_resolve",
11410 side_effects: &["commits_authoritative_state"],
11411 recovery: "retry_if_not_submitted",
11412 collection_index_ref: "none",
11413 },
11414 CommandSemanticContract {
11415 command: Command::ListAliases,
11416 admissible_errors: &[
11417 ErrorCode::Aborted,
11418 ErrorCode::DeadlineExceeded,
11419 ErrorCode::InvalidRequest,
11420 ErrorCode::UnsupportedVersion,
11421 ErrorCode::Unauthenticated,
11422 ErrorCode::PermissionDenied,
11423 ErrorCode::NotFound,
11424 ErrorCode::StaleCursor,
11425 ErrorCode::RestartBudgetExhausted,
11426 ErrorCode::LimitExceeded,
11427 ErrorCode::CapabilityUnavailable,
11428 ErrorCode::TemporarilyUnavailable,
11429 ErrorCode::Internal,
11430 ],
11431 limit_ids: &[
11432 "request_bytes",
11433 "response_bytes",
11434 "page_size",
11435 "catalog_page_size",
11436 "catalog_restart_budget",
11437 ],
11438 effect_class: "read_only",
11439 risk_flags: &[],
11440 capability_family: "catalog",
11441 retry_safety: "safe",
11442 identity_requirement: "none",
11443 resolver: None,
11444 cancellation: "per_call",
11445 side_effects: &[],
11446 recovery: "retry",
11447 collection_index_ref: "none",
11448 },
11449 CommandSemanticContract {
11450 command: Command::GetAlias,
11451 admissible_errors: &[
11452 ErrorCode::Aborted,
11453 ErrorCode::DeadlineExceeded,
11454 ErrorCode::InvalidRequest,
11455 ErrorCode::UnsupportedVersion,
11456 ErrorCode::Unauthenticated,
11457 ErrorCode::PermissionDenied,
11458 ErrorCode::NotFound,
11459 ErrorCode::LimitExceeded,
11460 ErrorCode::CapabilityUnavailable,
11461 ErrorCode::TemporarilyUnavailable,
11462 ErrorCode::Internal,
11463 ],
11464 limit_ids: &["request_bytes", "response_bytes"],
11465 effect_class: "read_only",
11466 risk_flags: &[],
11467 capability_family: "catalog",
11468 retry_safety: "safe",
11469 identity_requirement: "none",
11470 resolver: None,
11471 cancellation: "per_call",
11472 side_effects: &[],
11473 recovery: "retry",
11474 collection_index_ref: "none",
11475 },
11476 CommandSemanticContract {
11477 command: Command::ListDataStreams,
11478 admissible_errors: &[
11479 ErrorCode::Aborted,
11480 ErrorCode::DeadlineExceeded,
11481 ErrorCode::InvalidRequest,
11482 ErrorCode::UnsupportedVersion,
11483 ErrorCode::Unauthenticated,
11484 ErrorCode::PermissionDenied,
11485 ErrorCode::NotFound,
11486 ErrorCode::StaleCursor,
11487 ErrorCode::RestartBudgetExhausted,
11488 ErrorCode::LimitExceeded,
11489 ErrorCode::CapabilityUnavailable,
11490 ErrorCode::TemporarilyUnavailable,
11491 ErrorCode::Internal,
11492 ],
11493 limit_ids: &[
11494 "request_bytes",
11495 "response_bytes",
11496 "page_size",
11497 "catalog_page_size",
11498 "catalog_restart_budget",
11499 ],
11500 effect_class: "read_only",
11501 risk_flags: &[],
11502 capability_family: "catalog",
11503 retry_safety: "safe",
11504 identity_requirement: "none",
11505 resolver: None,
11506 cancellation: "per_call",
11507 side_effects: &[],
11508 recovery: "retry",
11509 collection_index_ref: "none",
11510 },
11511 CommandSemanticContract {
11512 command: Command::GetDataStream,
11513 admissible_errors: &[
11514 ErrorCode::Aborted,
11515 ErrorCode::DeadlineExceeded,
11516 ErrorCode::InvalidRequest,
11517 ErrorCode::UnsupportedVersion,
11518 ErrorCode::Unauthenticated,
11519 ErrorCode::PermissionDenied,
11520 ErrorCode::NotFound,
11521 ErrorCode::LimitExceeded,
11522 ErrorCode::CapabilityUnavailable,
11523 ErrorCode::TemporarilyUnavailable,
11524 ErrorCode::Internal,
11525 ],
11526 limit_ids: &["request_bytes", "response_bytes"],
11527 effect_class: "read_only",
11528 risk_flags: &[],
11529 capability_family: "catalog",
11530 retry_safety: "safe",
11531 identity_requirement: "none",
11532 resolver: None,
11533 cancellation: "per_call",
11534 side_effects: &[],
11535 recovery: "retry",
11536 collection_index_ref: "none",
11537 },
11538 CommandSemanticContract {
11539 command: Command::ListComponentTemplates,
11540 admissible_errors: &[
11541 ErrorCode::Aborted,
11542 ErrorCode::DeadlineExceeded,
11543 ErrorCode::InvalidRequest,
11544 ErrorCode::UnsupportedVersion,
11545 ErrorCode::Unauthenticated,
11546 ErrorCode::PermissionDenied,
11547 ErrorCode::NotFound,
11548 ErrorCode::StaleCursor,
11549 ErrorCode::RestartBudgetExhausted,
11550 ErrorCode::LimitExceeded,
11551 ErrorCode::CapabilityUnavailable,
11552 ErrorCode::TemporarilyUnavailable,
11553 ErrorCode::Internal,
11554 ],
11555 limit_ids: &[
11556 "request_bytes",
11557 "response_bytes",
11558 "page_size",
11559 "catalog_page_size",
11560 "catalog_restart_budget",
11561 ],
11562 effect_class: "read_only",
11563 risk_flags: &[],
11564 capability_family: "catalog",
11565 retry_safety: "safe",
11566 identity_requirement: "none",
11567 resolver: None,
11568 cancellation: "per_call",
11569 side_effects: &[],
11570 recovery: "retry",
11571 collection_index_ref: "none",
11572 },
11573 CommandSemanticContract {
11574 command: Command::GetComponentTemplate,
11575 admissible_errors: &[
11576 ErrorCode::Aborted,
11577 ErrorCode::DeadlineExceeded,
11578 ErrorCode::InvalidRequest,
11579 ErrorCode::UnsupportedVersion,
11580 ErrorCode::Unauthenticated,
11581 ErrorCode::PermissionDenied,
11582 ErrorCode::NotFound,
11583 ErrorCode::LimitExceeded,
11584 ErrorCode::CapabilityUnavailable,
11585 ErrorCode::TemporarilyUnavailable,
11586 ErrorCode::Internal,
11587 ],
11588 limit_ids: &["request_bytes", "response_bytes"],
11589 effect_class: "read_only",
11590 risk_flags: &[],
11591 capability_family: "catalog",
11592 retry_safety: "safe",
11593 identity_requirement: "none",
11594 resolver: None,
11595 cancellation: "per_call",
11596 side_effects: &[],
11597 recovery: "retry",
11598 collection_index_ref: "none",
11599 },
11600 CommandSemanticContract {
11601 command: Command::ListIndexTemplates,
11602 admissible_errors: &[
11603 ErrorCode::Aborted,
11604 ErrorCode::DeadlineExceeded,
11605 ErrorCode::InvalidRequest,
11606 ErrorCode::UnsupportedVersion,
11607 ErrorCode::Unauthenticated,
11608 ErrorCode::PermissionDenied,
11609 ErrorCode::NotFound,
11610 ErrorCode::StaleCursor,
11611 ErrorCode::RestartBudgetExhausted,
11612 ErrorCode::LimitExceeded,
11613 ErrorCode::CapabilityUnavailable,
11614 ErrorCode::TemporarilyUnavailable,
11615 ErrorCode::Internal,
11616 ],
11617 limit_ids: &[
11618 "request_bytes",
11619 "response_bytes",
11620 "page_size",
11621 "catalog_page_size",
11622 "catalog_restart_budget",
11623 ],
11624 effect_class: "read_only",
11625 risk_flags: &[],
11626 capability_family: "catalog",
11627 retry_safety: "safe",
11628 identity_requirement: "none",
11629 resolver: None,
11630 cancellation: "per_call",
11631 side_effects: &[],
11632 recovery: "retry",
11633 collection_index_ref: "none",
11634 },
11635 CommandSemanticContract {
11636 command: Command::GetIndexTemplate,
11637 admissible_errors: &[
11638 ErrorCode::Aborted,
11639 ErrorCode::DeadlineExceeded,
11640 ErrorCode::InvalidRequest,
11641 ErrorCode::UnsupportedVersion,
11642 ErrorCode::Unauthenticated,
11643 ErrorCode::PermissionDenied,
11644 ErrorCode::NotFound,
11645 ErrorCode::LimitExceeded,
11646 ErrorCode::CapabilityUnavailable,
11647 ErrorCode::TemporarilyUnavailable,
11648 ErrorCode::Internal,
11649 ],
11650 limit_ids: &["request_bytes", "response_bytes"],
11651 effect_class: "read_only",
11652 risk_flags: &[],
11653 capability_family: "catalog",
11654 retry_safety: "safe",
11655 identity_requirement: "none",
11656 resolver: None,
11657 cancellation: "per_call",
11658 side_effects: &[],
11659 recovery: "retry",
11660 collection_index_ref: "none",
11661 },
11662 CommandSemanticContract {
11663 command: Command::ListIngestPipelines,
11664 admissible_errors: &[
11665 ErrorCode::Aborted,
11666 ErrorCode::DeadlineExceeded,
11667 ErrorCode::InvalidRequest,
11668 ErrorCode::UnsupportedVersion,
11669 ErrorCode::Unauthenticated,
11670 ErrorCode::PermissionDenied,
11671 ErrorCode::NotFound,
11672 ErrorCode::StaleCursor,
11673 ErrorCode::RestartBudgetExhausted,
11674 ErrorCode::LimitExceeded,
11675 ErrorCode::CapabilityUnavailable,
11676 ErrorCode::TemporarilyUnavailable,
11677 ErrorCode::Internal,
11678 ],
11679 limit_ids: &[
11680 "request_bytes",
11681 "response_bytes",
11682 "page_size",
11683 "catalog_page_size",
11684 "catalog_restart_budget",
11685 ],
11686 effect_class: "read_only",
11687 risk_flags: &[],
11688 capability_family: "lifecycle",
11689 retry_safety: "safe",
11690 identity_requirement: "none",
11691 resolver: None,
11692 cancellation: "per_call",
11693 side_effects: &[],
11694 recovery: "retry",
11695 collection_index_ref: "none",
11696 },
11697 CommandSemanticContract {
11698 command: Command::GetIngestPipeline,
11699 admissible_errors: &[
11700 ErrorCode::Aborted,
11701 ErrorCode::DeadlineExceeded,
11702 ErrorCode::InvalidRequest,
11703 ErrorCode::UnsupportedVersion,
11704 ErrorCode::Unauthenticated,
11705 ErrorCode::PermissionDenied,
11706 ErrorCode::NotFound,
11707 ErrorCode::LimitExceeded,
11708 ErrorCode::CapabilityUnavailable,
11709 ErrorCode::TemporarilyUnavailable,
11710 ErrorCode::Internal,
11711 ],
11712 limit_ids: &["request_bytes", "response_bytes"],
11713 effect_class: "read_only",
11714 risk_flags: &[],
11715 capability_family: "lifecycle",
11716 retry_safety: "safe",
11717 identity_requirement: "none",
11718 resolver: None,
11719 cancellation: "per_call",
11720 side_effects: &[],
11721 recovery: "retry",
11722 collection_index_ref: "none",
11723 },
11724 CommandSemanticContract {
11725 command: Command::SimulateIngestPipeline,
11726 admissible_errors: &[
11727 ErrorCode::Aborted,
11728 ErrorCode::DeadlineExceeded,
11729 ErrorCode::InvalidRequest,
11730 ErrorCode::UnsupportedVersion,
11731 ErrorCode::Unauthenticated,
11732 ErrorCode::PermissionDenied,
11733 ErrorCode::NotFound,
11734 ErrorCode::LimitExceeded,
11735 ErrorCode::CapabilityUnavailable,
11736 ErrorCode::TemporarilyUnavailable,
11737 ErrorCode::Internal,
11738 ],
11739 limit_ids: &["request_bytes", "response_bytes"],
11740 effect_class: "read_only",
11741 risk_flags: &[],
11742 capability_family: "lifecycle",
11743 retry_safety: "safe",
11744 identity_requirement: "none",
11745 resolver: None,
11746 cancellation: "per_call",
11747 side_effects: &[],
11748 recovery: "retry",
11749 collection_index_ref: "none",
11750 },
11751 CommandSemanticContract {
11752 command: Command::ReprocessByQuery,
11753 admissible_errors: &[
11754 ErrorCode::Aborted,
11755 ErrorCode::DeadlineExceeded,
11756 ErrorCode::InvalidRequest,
11757 ErrorCode::UnsupportedVersion,
11758 ErrorCode::Unauthenticated,
11759 ErrorCode::PermissionDenied,
11760 ErrorCode::NotFound,
11761 ErrorCode::Conflict,
11762 ErrorCode::LimitExceeded,
11763 ErrorCode::CapabilityUnavailable,
11764 ErrorCode::NotSubmitted,
11765 ErrorCode::SubmittedIndeterminate,
11766 ErrorCode::ExpiredUnknown,
11767 ErrorCode::TemporarilyUnavailable,
11768 ErrorCode::Internal,
11769 ],
11770 limit_ids: &["request_bytes", "response_bytes"],
11771 effect_class: "durable_submit",
11772 risk_flags: &[],
11773 capability_family: "data",
11774 retry_safety: "safe",
11775 identity_requirement: "caller_action_id",
11776 resolver: None,
11777 cancellation: "per_call_until_submission_then_resolve",
11778 side_effects: &["commits_authoritative_state"],
11779 recovery: "retry",
11780 collection_index_ref: "request_index",
11781 },
11782 CommandSemanticContract {
11783 command: Command::ListLifecyclePolicies,
11784 admissible_errors: &[
11785 ErrorCode::Aborted,
11786 ErrorCode::DeadlineExceeded,
11787 ErrorCode::InvalidRequest,
11788 ErrorCode::UnsupportedVersion,
11789 ErrorCode::Unauthenticated,
11790 ErrorCode::PermissionDenied,
11791 ErrorCode::NotFound,
11792 ErrorCode::StaleCursor,
11793 ErrorCode::RestartBudgetExhausted,
11794 ErrorCode::LimitExceeded,
11795 ErrorCode::CapabilityUnavailable,
11796 ErrorCode::TemporarilyUnavailable,
11797 ErrorCode::Internal,
11798 ],
11799 limit_ids: &[
11800 "request_bytes",
11801 "response_bytes",
11802 "page_size",
11803 "catalog_page_size",
11804 "catalog_restart_budget",
11805 ],
11806 effect_class: "read_only",
11807 risk_flags: &[],
11808 capability_family: "catalog",
11809 retry_safety: "safe",
11810 identity_requirement: "none",
11811 resolver: None,
11812 cancellation: "per_call",
11813 side_effects: &[],
11814 recovery: "retry",
11815 collection_index_ref: "none",
11816 },
11817 CommandSemanticContract {
11818 command: Command::GetLifecyclePolicy,
11819 admissible_errors: &[
11820 ErrorCode::Aborted,
11821 ErrorCode::DeadlineExceeded,
11822 ErrorCode::InvalidRequest,
11823 ErrorCode::UnsupportedVersion,
11824 ErrorCode::Unauthenticated,
11825 ErrorCode::PermissionDenied,
11826 ErrorCode::NotFound,
11827 ErrorCode::LimitExceeded,
11828 ErrorCode::CapabilityUnavailable,
11829 ErrorCode::TemporarilyUnavailable,
11830 ErrorCode::Internal,
11831 ],
11832 limit_ids: &["request_bytes", "response_bytes"],
11833 effect_class: "read_only",
11834 risk_flags: &[],
11835 capability_family: "catalog",
11836 retry_safety: "safe",
11837 identity_requirement: "none",
11838 resolver: None,
11839 cancellation: "per_call",
11840 side_effects: &[],
11841 recovery: "retry",
11842 collection_index_ref: "none",
11843 },
11844 CommandSemanticContract {
11845 command: Command::PrepareCreateIndex,
11846 admissible_errors: &[
11847 ErrorCode::Aborted,
11848 ErrorCode::DeadlineExceeded,
11849 ErrorCode::InvalidRequest,
11850 ErrorCode::UnsupportedVersion,
11851 ErrorCode::Unauthenticated,
11852 ErrorCode::PermissionDenied,
11853 ErrorCode::NotFound,
11854 ErrorCode::LimitExceeded,
11855 ErrorCode::CapabilityUnavailable,
11856 ErrorCode::TemporarilyUnavailable,
11857 ErrorCode::Internal,
11858 ],
11859 limit_ids: &[
11860 "request_bytes",
11861 "response_bytes",
11862 "resource_initial_shards",
11863 "resource_target_shard_bytes",
11864 "resource_admission_weight",
11865 "resource_ram_bytes",
11866 "resource_nvme_bytes",
11867 "resource_refresh_millis",
11868 "resource_memtable_bytes",
11869 "resource_parallelism",
11870 ],
11871 effect_class: "prepare",
11872 risk_flags: &[],
11873 capability_family: "catalog",
11874 retry_safety: "safe",
11875 identity_requirement: "server_locator",
11876 resolver: None,
11877 cancellation: "per_call",
11878 side_effects: &["creates_bounded_preparation"],
11879 recovery: "retry",
11880 collection_index_ref: "request_name",
11881 },
11882 CommandSemanticContract {
11883 command: Command::PrepareDeleteIndex,
11884 admissible_errors: &[
11885 ErrorCode::Aborted,
11886 ErrorCode::DeadlineExceeded,
11887 ErrorCode::InvalidRequest,
11888 ErrorCode::UnsupportedVersion,
11889 ErrorCode::Unauthenticated,
11890 ErrorCode::PermissionDenied,
11891 ErrorCode::NotFound,
11892 ErrorCode::LimitExceeded,
11893 ErrorCode::CapabilityUnavailable,
11894 ErrorCode::TemporarilyUnavailable,
11895 ErrorCode::Internal,
11896 ],
11897 limit_ids: &["request_bytes", "response_bytes"],
11898 effect_class: "prepare",
11899 risk_flags: &["destructive"],
11900 capability_family: "catalog",
11901 retry_safety: "safe",
11902 identity_requirement: "server_locator",
11903 resolver: None,
11904 cancellation: "per_call",
11905 side_effects: &["creates_bounded_preparation"],
11906 recovery: "retry",
11907 collection_index_ref: "request_name",
11908 },
11909 CommandSemanticContract {
11910 command: Command::SubmitCatalogAction,
11911 admissible_errors: &[
11912 ErrorCode::Aborted,
11913 ErrorCode::DeadlineExceeded,
11914 ErrorCode::InvalidRequest,
11915 ErrorCode::UnsupportedVersion,
11916 ErrorCode::Unauthenticated,
11917 ErrorCode::PermissionDenied,
11918 ErrorCode::NotFound,
11919 ErrorCode::Conflict,
11920 ErrorCode::LimitExceeded,
11921 ErrorCode::CapabilityUnavailable,
11922 ErrorCode::NotSubmitted,
11923 ErrorCode::SubmittedIndeterminate,
11924 ErrorCode::ExpiredUnknown,
11925 ErrorCode::TemporarilyUnavailable,
11926 ErrorCode::Internal,
11927 ],
11928 limit_ids: &[
11929 "request_bytes",
11930 "response_bytes",
11931 "resource_initial_shards",
11932 "resource_target_shard_bytes",
11933 "resource_admission_weight",
11934 "resource_ram_bytes",
11935 "resource_nvme_bytes",
11936 "resource_refresh_millis",
11937 "resource_memtable_bytes",
11938 "resource_parallelism",
11939 ],
11940 effect_class: "durable_submit",
11941 risk_flags: &[],
11942 capability_family: "catalog",
11943 retry_safety: "pre_submit_only",
11944 identity_requirement: "request_locator",
11945 resolver: Some(Command::ResolveCatalogAction),
11946 cancellation: "per_call_until_submission_then_resolve",
11947 side_effects: &["commits_authoritative_state"],
11948 recovery: "resolve_with_resolve_catalog_action",
11949 collection_index_ref: "request_name",
11950 },
11951 CommandSemanticContract {
11952 command: Command::ResolveCatalogAction,
11953 admissible_errors: &[
11954 ErrorCode::Aborted,
11955 ErrorCode::DeadlineExceeded,
11956 ErrorCode::InvalidRequest,
11957 ErrorCode::UnsupportedVersion,
11958 ErrorCode::Unauthenticated,
11959 ErrorCode::PermissionDenied,
11960 ErrorCode::NotFound,
11961 ErrorCode::LimitExceeded,
11962 ErrorCode::CapabilityUnavailable,
11963 ErrorCode::TemporarilyUnavailable,
11964 ErrorCode::Internal,
11965 ],
11966 limit_ids: &["request_bytes", "response_bytes"],
11967 effect_class: "read_only",
11968 risk_flags: &[],
11969 capability_family: "catalog",
11970 retry_safety: "safe",
11971 identity_requirement: "request_locator",
11972 resolver: None,
11973 cancellation: "per_call",
11974 side_effects: &[],
11975 recovery: "retry",
11976 collection_index_ref: "caller",
11977 },
11978 CommandSemanticContract {
11979 command: Command::PrepareReplayableSourceIndex,
11980 admissible_errors: &[
11981 ErrorCode::Aborted,
11982 ErrorCode::DeadlineExceeded,
11983 ErrorCode::InvalidRequest,
11984 ErrorCode::UnsupportedVersion,
11985 ErrorCode::Unauthenticated,
11986 ErrorCode::PermissionDenied,
11987 ErrorCode::NotFound,
11988 ErrorCode::LimitExceeded,
11989 ErrorCode::CapabilityUnavailable,
11990 ErrorCode::RetentionGap,
11991 ErrorCode::TemporarilyUnavailable,
11992 ErrorCode::Internal,
11993 ],
11994 limit_ids: &[
11995 "request_bytes",
11996 "response_bytes",
11997 "resource_initial_shards",
11998 "resource_target_shard_bytes",
11999 "resource_admission_weight",
12000 "resource_ram_bytes",
12001 "resource_nvme_bytes",
12002 "resource_refresh_millis",
12003 "resource_memtable_bytes",
12004 "resource_parallelism",
12005 ],
12006 effect_class: "prepare",
12007 risk_flags: &[],
12008 capability_family: "catalog",
12009 retry_safety: "safe",
12010 identity_requirement: "server_locator",
12011 resolver: None,
12012 cancellation: "per_call",
12013 side_effects: &["creates_bounded_preparation"],
12014 recovery: "retry",
12015 collection_index_ref: "request_name",
12016 },
12017 CommandSemanticContract {
12018 command: Command::SubmitReplayableSourceIndex,
12019 admissible_errors: &[
12020 ErrorCode::Aborted,
12021 ErrorCode::DeadlineExceeded,
12022 ErrorCode::InvalidRequest,
12023 ErrorCode::UnsupportedVersion,
12024 ErrorCode::Unauthenticated,
12025 ErrorCode::PermissionDenied,
12026 ErrorCode::NotFound,
12027 ErrorCode::Conflict,
12028 ErrorCode::LimitExceeded,
12029 ErrorCode::CapabilityUnavailable,
12030 ErrorCode::NotSubmitted,
12031 ErrorCode::SubmittedIndeterminate,
12032 ErrorCode::ExpiredUnknown,
12033 ErrorCode::RetentionGap,
12034 ErrorCode::TemporarilyUnavailable,
12035 ErrorCode::Internal,
12036 ],
12037 limit_ids: &[
12038 "request_bytes",
12039 "response_bytes",
12040 "resource_initial_shards",
12041 "resource_target_shard_bytes",
12042 "resource_admission_weight",
12043 "resource_ram_bytes",
12044 "resource_nvme_bytes",
12045 "resource_refresh_millis",
12046 "resource_memtable_bytes",
12047 "resource_parallelism",
12048 ],
12049 effect_class: "durable_submit",
12050 risk_flags: &[],
12051 capability_family: "catalog",
12052 retry_safety: "pre_submit_only",
12053 identity_requirement: "request_locator",
12054 resolver: Some(Command::ResolveCatalogAction),
12055 cancellation: "per_call_until_submission_then_resolve",
12056 side_effects: &["commits_authoritative_state"],
12057 recovery: "resolve_with_resolve_catalog_action",
12058 collection_index_ref: "request_name",
12059 },
12060 CommandSemanticContract {
12061 command: Command::GetReplayableSource,
12062 admissible_errors: &[
12063 ErrorCode::Aborted,
12064 ErrorCode::DeadlineExceeded,
12065 ErrorCode::InvalidRequest,
12066 ErrorCode::UnsupportedVersion,
12067 ErrorCode::Unauthenticated,
12068 ErrorCode::PermissionDenied,
12069 ErrorCode::NotFound,
12070 ErrorCode::LimitExceeded,
12071 ErrorCode::CapabilityUnavailable,
12072 ErrorCode::RetentionGap,
12073 ErrorCode::TemporarilyUnavailable,
12074 ErrorCode::Internal,
12075 ],
12076 limit_ids: &["request_bytes", "response_bytes"],
12077 effect_class: "read_only",
12078 risk_flags: &[],
12079 capability_family: "catalog",
12080 retry_safety: "safe",
12081 identity_requirement: "none",
12082 resolver: None,
12083 cancellation: "per_call",
12084 side_effects: &[],
12085 recovery: "retry",
12086 collection_index_ref: "none",
12087 },
12088 CommandSemanticContract {
12089 command: Command::ControlReplayableSource,
12090 admissible_errors: &[
12091 ErrorCode::Aborted,
12092 ErrorCode::DeadlineExceeded,
12093 ErrorCode::InvalidRequest,
12094 ErrorCode::UnsupportedVersion,
12095 ErrorCode::Unauthenticated,
12096 ErrorCode::PermissionDenied,
12097 ErrorCode::NotFound,
12098 ErrorCode::Conflict,
12099 ErrorCode::LimitExceeded,
12100 ErrorCode::CapabilityUnavailable,
12101 ErrorCode::NotSubmitted,
12102 ErrorCode::SubmittedIndeterminate,
12103 ErrorCode::ExpiredUnknown,
12104 ErrorCode::RetentionGap,
12105 ErrorCode::TemporarilyUnavailable,
12106 ErrorCode::Internal,
12107 ],
12108 limit_ids: &["request_bytes", "response_bytes"],
12109 effect_class: "durable_submit",
12110 risk_flags: &[],
12111 capability_family: "catalog",
12112 retry_safety: "pre_submit_only",
12113 identity_requirement: "none",
12114 resolver: None,
12115 cancellation: "per_call_until_submission_then_resolve",
12116 side_effects: &["commits_authoritative_state"],
12117 recovery: "retry_if_not_submitted",
12118 collection_index_ref: "request_index",
12119 },
12120 CommandSemanticContract {
12121 command: Command::CloneIndex,
12122 admissible_errors: &[
12123 ErrorCode::Aborted,
12124 ErrorCode::DeadlineExceeded,
12125 ErrorCode::InvalidRequest,
12126 ErrorCode::UnsupportedVersion,
12127 ErrorCode::Unauthenticated,
12128 ErrorCode::PermissionDenied,
12129 ErrorCode::NotFound,
12130 ErrorCode::Conflict,
12131 ErrorCode::LimitExceeded,
12132 ErrorCode::CapabilityUnavailable,
12133 ErrorCode::NotSubmitted,
12134 ErrorCode::SubmittedIndeterminate,
12135 ErrorCode::ExpiredUnknown,
12136 ErrorCode::TemporarilyUnavailable,
12137 ErrorCode::Internal,
12138 ],
12139 limit_ids: &["request_bytes", "response_bytes"],
12140 effect_class: "durable_submit",
12141 risk_flags: &[],
12142 capability_family: "catalog",
12143 retry_safety: "pre_submit_only",
12144 identity_requirement: "caller_action_id",
12145 resolver: Some(Command::CloneIndex),
12146 cancellation: "per_call_until_submission_then_resolve",
12147 side_effects: &["commits_authoritative_state"],
12148 recovery: "resolve_with_clone_index",
12149 collection_index_ref: "caller",
12150 },
12151 CommandSemanticContract {
12152 command: Command::ConfigureHistory,
12153 admissible_errors: &[
12154 ErrorCode::Aborted,
12155 ErrorCode::DeadlineExceeded,
12156 ErrorCode::InvalidRequest,
12157 ErrorCode::UnsupportedVersion,
12158 ErrorCode::Unauthenticated,
12159 ErrorCode::PermissionDenied,
12160 ErrorCode::NotFound,
12161 ErrorCode::Conflict,
12162 ErrorCode::LimitExceeded,
12163 ErrorCode::CapabilityUnavailable,
12164 ErrorCode::NotSubmitted,
12165 ErrorCode::SubmittedIndeterminate,
12166 ErrorCode::ExpiredUnknown,
12167 ErrorCode::TemporarilyUnavailable,
12168 ErrorCode::Internal,
12169 ],
12170 limit_ids: &["request_bytes", "response_bytes"],
12171 effect_class: "durable_submit",
12172 risk_flags: &[],
12173 capability_family: "catalog",
12174 retry_safety: "pre_submit_only",
12175 identity_requirement: "none",
12176 resolver: Some(Command::GetHistory),
12177 cancellation: "per_call_until_submission_then_resolve",
12178 side_effects: &["commits_authoritative_state"],
12179 recovery: "resolve_with_get_history",
12180 collection_index_ref: "request_index",
12181 },
12182 CommandSemanticContract {
12183 command: Command::GetHistory,
12184 admissible_errors: &[
12185 ErrorCode::Aborted,
12186 ErrorCode::DeadlineExceeded,
12187 ErrorCode::InvalidRequest,
12188 ErrorCode::UnsupportedVersion,
12189 ErrorCode::Unauthenticated,
12190 ErrorCode::PermissionDenied,
12191 ErrorCode::NotFound,
12192 ErrorCode::LimitExceeded,
12193 ErrorCode::CapabilityUnavailable,
12194 ErrorCode::TemporarilyUnavailable,
12195 ErrorCode::Internal,
12196 ],
12197 limit_ids: &["request_bytes", "response_bytes"],
12198 effect_class: "read_only",
12199 risk_flags: &[],
12200 capability_family: "catalog",
12201 retry_safety: "safe",
12202 identity_requirement: "none",
12203 resolver: None,
12204 cancellation: "per_call",
12205 side_effects: &[],
12206 recovery: "retry",
12207 collection_index_ref: "none",
12208 },
12209 CommandSemanticContract {
12210 command: Command::ResolveHistory,
12211 admissible_errors: &[
12212 ErrorCode::Aborted,
12213 ErrorCode::DeadlineExceeded,
12214 ErrorCode::InvalidRequest,
12215 ErrorCode::UnsupportedVersion,
12216 ErrorCode::Unauthenticated,
12217 ErrorCode::PermissionDenied,
12218 ErrorCode::NotFound,
12219 ErrorCode::LimitExceeded,
12220 ErrorCode::CapabilityUnavailable,
12221 ErrorCode::RetentionGap,
12222 ErrorCode::TemporarilyUnavailable,
12223 ErrorCode::Internal,
12224 ],
12225 limit_ids: &["request_bytes", "response_bytes"],
12226 effect_class: "read_only",
12227 risk_flags: &[],
12228 capability_family: "data",
12229 retry_safety: "safe",
12230 identity_requirement: "none",
12231 resolver: None,
12232 cancellation: "per_call",
12233 side_effects: &[],
12234 recovery: "retry",
12235 collection_index_ref: "request_index",
12236 },
12237 CommandSemanticContract {
12238 command: Command::PlaceHistoryHold,
12239 admissible_errors: &[
12240 ErrorCode::Aborted,
12241 ErrorCode::DeadlineExceeded,
12242 ErrorCode::InvalidRequest,
12243 ErrorCode::UnsupportedVersion,
12244 ErrorCode::Unauthenticated,
12245 ErrorCode::PermissionDenied,
12246 ErrorCode::NotFound,
12247 ErrorCode::Conflict,
12248 ErrorCode::LimitExceeded,
12249 ErrorCode::CapabilityUnavailable,
12250 ErrorCode::NotSubmitted,
12251 ErrorCode::SubmittedIndeterminate,
12252 ErrorCode::ExpiredUnknown,
12253 ErrorCode::TemporarilyUnavailable,
12254 ErrorCode::Internal,
12255 ],
12256 limit_ids: &["request_bytes", "response_bytes"],
12257 effect_class: "durable_submit",
12258 risk_flags: &[],
12259 capability_family: "catalog",
12260 retry_safety: "pre_submit_only",
12261 identity_requirement: "none",
12262 resolver: Some(Command::GetHistory),
12263 cancellation: "per_call_until_submission_then_resolve",
12264 side_effects: &["commits_authoritative_state"],
12265 recovery: "resolve_with_get_history",
12266 collection_index_ref: "request_index",
12267 },
12268 CommandSemanticContract {
12269 command: Command::ReleaseHistoryHold,
12270 admissible_errors: &[
12271 ErrorCode::Aborted,
12272 ErrorCode::DeadlineExceeded,
12273 ErrorCode::InvalidRequest,
12274 ErrorCode::UnsupportedVersion,
12275 ErrorCode::Unauthenticated,
12276 ErrorCode::PermissionDenied,
12277 ErrorCode::NotFound,
12278 ErrorCode::Conflict,
12279 ErrorCode::LimitExceeded,
12280 ErrorCode::CapabilityUnavailable,
12281 ErrorCode::NotSubmitted,
12282 ErrorCode::SubmittedIndeterminate,
12283 ErrorCode::ExpiredUnknown,
12284 ErrorCode::TemporarilyUnavailable,
12285 ErrorCode::Internal,
12286 ],
12287 limit_ids: &["request_bytes", "response_bytes"],
12288 effect_class: "durable_submit",
12289 risk_flags: &[],
12290 capability_family: "catalog",
12291 retry_safety: "pre_submit_only",
12292 identity_requirement: "none",
12293 resolver: Some(Command::GetHistory),
12294 cancellation: "per_call_until_submission_then_resolve",
12295 side_effects: &["commits_authoritative_state"],
12296 recovery: "resolve_with_get_history",
12297 collection_index_ref: "request_index",
12298 },
12299 CommandSemanticContract {
12300 command: Command::PrepareDocumentMutation,
12301 admissible_errors: &[
12302 ErrorCode::Aborted,
12303 ErrorCode::DeadlineExceeded,
12304 ErrorCode::InvalidRequest,
12305 ErrorCode::UnsupportedVersion,
12306 ErrorCode::Unauthenticated,
12307 ErrorCode::PermissionDenied,
12308 ErrorCode::NotFound,
12309 ErrorCode::LimitExceeded,
12310 ErrorCode::CapabilityUnavailable,
12311 ErrorCode::TemporarilyUnavailable,
12312 ErrorCode::Internal,
12313 ],
12314 limit_ids: &["request_bytes", "response_bytes"],
12315 effect_class: "prepare",
12316 risk_flags: &[],
12317 capability_family: "data",
12318 retry_safety: "safe",
12319 identity_requirement: "server_locator",
12320 resolver: None,
12321 cancellation: "per_call",
12322 side_effects: &["creates_bounded_preparation"],
12323 recovery: "retry",
12324 collection_index_ref: "request_index",
12325 },
12326 CommandSemanticContract {
12327 command: Command::SubmitDocumentMutation,
12328 admissible_errors: &[
12329 ErrorCode::Aborted,
12330 ErrorCode::DeadlineExceeded,
12331 ErrorCode::InvalidRequest,
12332 ErrorCode::UnsupportedVersion,
12333 ErrorCode::Unauthenticated,
12334 ErrorCode::PermissionDenied,
12335 ErrorCode::NotFound,
12336 ErrorCode::Conflict,
12337 ErrorCode::LimitExceeded,
12338 ErrorCode::CapabilityUnavailable,
12339 ErrorCode::NotSubmitted,
12340 ErrorCode::SubmittedIndeterminate,
12341 ErrorCode::ExpiredUnknown,
12342 ErrorCode::TemporarilyUnavailable,
12343 ErrorCode::Internal,
12344 ],
12345 limit_ids: &["request_bytes", "response_bytes"],
12346 effect_class: "durable_submit",
12347 risk_flags: &[],
12348 capability_family: "data",
12349 retry_safety: "pre_submit_only",
12350 identity_requirement: "request_locator",
12351 resolver: Some(Command::ResolveDocumentMutation),
12352 cancellation: "per_call_until_submission_then_resolve",
12353 side_effects: &["commits_authoritative_state"],
12354 recovery: "resolve_with_resolve_document_mutation",
12355 collection_index_ref: "request_index",
12356 },
12357 CommandSemanticContract {
12358 command: Command::PrepareDocumentBulk,
12359 admissible_errors: &[
12360 ErrorCode::Aborted,
12361 ErrorCode::DeadlineExceeded,
12362 ErrorCode::InvalidRequest,
12363 ErrorCode::UnsupportedVersion,
12364 ErrorCode::Unauthenticated,
12365 ErrorCode::PermissionDenied,
12366 ErrorCode::NotFound,
12367 ErrorCode::LimitExceeded,
12368 ErrorCode::CapabilityUnavailable,
12369 ErrorCode::TemporarilyUnavailable,
12370 ErrorCode::Internal,
12371 ],
12372 limit_ids: &[
12373 "request_bytes",
12374 "response_bytes",
12375 "bulk_document_items",
12376 "bulk_document_bytes",
12377 ],
12378 effect_class: "prepare",
12379 risk_flags: &[],
12380 capability_family: "data",
12381 retry_safety: "safe",
12382 identity_requirement: "caller_action_id",
12383 resolver: None,
12384 cancellation: "per_call",
12385 side_effects: &["creates_bounded_preparation"],
12386 recovery: "retry",
12387 collection_index_ref: "request_index",
12388 },
12389 CommandSemanticContract {
12390 command: Command::SubmitDocumentBulk,
12391 admissible_errors: &[
12392 ErrorCode::Aborted,
12393 ErrorCode::DeadlineExceeded,
12394 ErrorCode::InvalidRequest,
12395 ErrorCode::UnsupportedVersion,
12396 ErrorCode::Unauthenticated,
12397 ErrorCode::PermissionDenied,
12398 ErrorCode::NotFound,
12399 ErrorCode::Conflict,
12400 ErrorCode::LimitExceeded,
12401 ErrorCode::CapabilityUnavailable,
12402 ErrorCode::NotSubmitted,
12403 ErrorCode::SubmittedIndeterminate,
12404 ErrorCode::ExpiredUnknown,
12405 ErrorCode::TemporarilyUnavailable,
12406 ErrorCode::Internal,
12407 ],
12408 limit_ids: &[
12409 "request_bytes",
12410 "response_bytes",
12411 "bulk_document_items",
12412 "bulk_document_bytes",
12413 ],
12414 effect_class: "durable_submit",
12415 risk_flags: &[],
12416 capability_family: "data",
12417 retry_safety: "pre_submit_only",
12418 identity_requirement: "caller_action_id",
12419 resolver: Some(Command::ResolveDocumentBulk),
12420 cancellation: "per_call_until_submission_then_resolve",
12421 side_effects: &["commits_authoritative_state"],
12422 recovery: "resolve_with_resolve_document_bulk",
12423 collection_index_ref: "request_index",
12424 },
12425 CommandSemanticContract {
12426 command: Command::ResolveDocumentBulk,
12427 admissible_errors: &[
12428 ErrorCode::Aborted,
12429 ErrorCode::DeadlineExceeded,
12430 ErrorCode::InvalidRequest,
12431 ErrorCode::UnsupportedVersion,
12432 ErrorCode::Unauthenticated,
12433 ErrorCode::PermissionDenied,
12434 ErrorCode::NotFound,
12435 ErrorCode::LimitExceeded,
12436 ErrorCode::CapabilityUnavailable,
12437 ErrorCode::TemporarilyUnavailable,
12438 ErrorCode::Internal,
12439 ],
12440 limit_ids: &[
12441 "request_bytes",
12442 "response_bytes",
12443 "bulk_document_items",
12444 "bulk_document_bytes",
12445 ],
12446 effect_class: "read_only",
12447 risk_flags: &[],
12448 capability_family: "data",
12449 retry_safety: "safe",
12450 identity_requirement: "caller_action_id",
12451 resolver: None,
12452 cancellation: "per_call",
12453 side_effects: &[],
12454 recovery: "retry",
12455 collection_index_ref: "request_index",
12456 },
12457 CommandSemanticContract {
12458 command: Command::PrepareAppendBulk,
12459 admissible_errors: &[
12460 ErrorCode::Aborted,
12461 ErrorCode::DeadlineExceeded,
12462 ErrorCode::InvalidRequest,
12463 ErrorCode::UnsupportedVersion,
12464 ErrorCode::Unauthenticated,
12465 ErrorCode::PermissionDenied,
12466 ErrorCode::NotFound,
12467 ErrorCode::LimitExceeded,
12468 ErrorCode::CapabilityUnavailable,
12469 ErrorCode::TemporarilyUnavailable,
12470 ErrorCode::Internal,
12471 ],
12472 limit_ids: &[
12473 "request_bytes",
12474 "response_bytes",
12475 "bulk_document_items",
12476 "bulk_document_bytes",
12477 ],
12478 effect_class: "prepare",
12479 risk_flags: &[],
12480 capability_family: "data",
12481 retry_safety: "safe",
12482 identity_requirement: "caller_action_id",
12483 resolver: None,
12484 cancellation: "per_call",
12485 side_effects: &[],
12486 recovery: "retry",
12487 collection_index_ref: "request_index",
12488 },
12489 CommandSemanticContract {
12490 command: Command::SubmitAppendBulk,
12491 admissible_errors: &[
12492 ErrorCode::Aborted,
12493 ErrorCode::DeadlineExceeded,
12494 ErrorCode::InvalidRequest,
12495 ErrorCode::UnsupportedVersion,
12496 ErrorCode::Unauthenticated,
12497 ErrorCode::PermissionDenied,
12498 ErrorCode::NotFound,
12499 ErrorCode::Conflict,
12500 ErrorCode::LimitExceeded,
12501 ErrorCode::CapabilityUnavailable,
12502 ErrorCode::NotSubmitted,
12503 ErrorCode::SubmittedIndeterminate,
12504 ErrorCode::TemporarilyUnavailable,
12505 ErrorCode::Internal,
12506 ],
12507 limit_ids: &[
12508 "request_bytes",
12509 "response_bytes",
12510 "bulk_document_items",
12511 "bulk_document_bytes",
12512 ],
12513 effect_class: "durable_submit",
12514 risk_flags: &[],
12515 capability_family: "data",
12516 retry_safety: "pre_submit_only",
12517 identity_requirement: "request_locator",
12518 resolver: Some(Command::ResolveAppendBulk),
12519 cancellation: "per_call_until_submission_then_resolve",
12520 side_effects: &["commits_authoritative_state"],
12521 recovery: "resolve_with_resolve_append_bulk",
12522 collection_index_ref: "request_index",
12523 },
12524 CommandSemanticContract {
12525 command: Command::ResolveAppendBulk,
12526 admissible_errors: &[
12527 ErrorCode::Aborted,
12528 ErrorCode::DeadlineExceeded,
12529 ErrorCode::InvalidRequest,
12530 ErrorCode::UnsupportedVersion,
12531 ErrorCode::Unauthenticated,
12532 ErrorCode::PermissionDenied,
12533 ErrorCode::NotFound,
12534 ErrorCode::Conflict,
12535 ErrorCode::LimitExceeded,
12536 ErrorCode::CapabilityUnavailable,
12537 ErrorCode::TemporarilyUnavailable,
12538 ErrorCode::Internal,
12539 ],
12540 limit_ids: &[
12541 "request_bytes",
12542 "response_bytes",
12543 "bulk_document_items",
12544 "bulk_document_bytes",
12545 ],
12546 effect_class: "read_only",
12547 risk_flags: &[],
12548 capability_family: "data",
12549 retry_safety: "safe",
12550 identity_requirement: "request_locator",
12551 resolver: None,
12552 cancellation: "per_call",
12553 side_effects: &[],
12554 recovery: "retry",
12555 collection_index_ref: "request_index",
12556 },
12557 CommandSemanticContract {
12558 command: Command::ObserveAppendCommitted,
12559 admissible_errors: &[
12560 ErrorCode::Aborted,
12561 ErrorCode::DeadlineExceeded,
12562 ErrorCode::InvalidRequest,
12563 ErrorCode::UnsupportedVersion,
12564 ErrorCode::Unauthenticated,
12565 ErrorCode::PermissionDenied,
12566 ErrorCode::NotFound,
12567 ErrorCode::Conflict,
12568 ErrorCode::LimitExceeded,
12569 ErrorCode::CapabilityUnavailable,
12570 ErrorCode::TemporarilyUnavailable,
12571 ErrorCode::Internal,
12572 ],
12573 limit_ids: &["request_bytes", "response_bytes"],
12574 effect_class: "read_only",
12575 risk_flags: &[],
12576 capability_family: "data",
12577 retry_safety: "safe",
12578 identity_requirement: "request_locator",
12579 resolver: None,
12580 cancellation: "per_call",
12581 side_effects: &[],
12582 recovery: "retry",
12583 collection_index_ref: "request_index",
12584 },
12585 CommandSemanticContract {
12586 command: Command::ResolveDocumentMutation,
12587 admissible_errors: &[
12588 ErrorCode::Aborted,
12589 ErrorCode::DeadlineExceeded,
12590 ErrorCode::InvalidRequest,
12591 ErrorCode::UnsupportedVersion,
12592 ErrorCode::Unauthenticated,
12593 ErrorCode::PermissionDenied,
12594 ErrorCode::NotFound,
12595 ErrorCode::LimitExceeded,
12596 ErrorCode::CapabilityUnavailable,
12597 ErrorCode::TemporarilyUnavailable,
12598 ErrorCode::Internal,
12599 ],
12600 limit_ids: &["request_bytes", "response_bytes"],
12601 effect_class: "read_only",
12602 risk_flags: &[],
12603 capability_family: "data",
12604 retry_safety: "safe",
12605 identity_requirement: "request_locator",
12606 resolver: None,
12607 cancellation: "per_call",
12608 side_effects: &[],
12609 recovery: "retry",
12610 collection_index_ref: "caller",
12611 },
12612 CommandSemanticContract {
12613 command: Command::GetDocument,
12614 admissible_errors: &[
12615 ErrorCode::Aborted,
12616 ErrorCode::DeadlineExceeded,
12617 ErrorCode::InvalidRequest,
12618 ErrorCode::UnsupportedVersion,
12619 ErrorCode::Unauthenticated,
12620 ErrorCode::PermissionDenied,
12621 ErrorCode::NotFound,
12622 ErrorCode::LimitExceeded,
12623 ErrorCode::CapabilityUnavailable,
12624 ErrorCode::TemporarilyUnavailable,
12625 ErrorCode::Internal,
12626 ],
12627 limit_ids: &["request_bytes", "response_bytes"],
12628 effect_class: "read_only",
12629 risk_flags: &[],
12630 capability_family: "data",
12631 retry_safety: "safe",
12632 identity_requirement: "none",
12633 resolver: None,
12634 cancellation: "per_call",
12635 side_effects: &[],
12636 recovery: "retry",
12637 collection_index_ref: "request_index",
12638 },
12639 CommandSemanticContract {
12640 command: Command::Search,
12641 admissible_errors: &[
12642 ErrorCode::Aborted,
12643 ErrorCode::DeadlineExceeded,
12644 ErrorCode::InvalidRequest,
12645 ErrorCode::UnsupportedVersion,
12646 ErrorCode::Unauthenticated,
12647 ErrorCode::PermissionDenied,
12648 ErrorCode::NotFound,
12649 ErrorCode::StaleCursor,
12650 ErrorCode::RestartBudgetExhausted,
12651 ErrorCode::LimitExceeded,
12652 ErrorCode::CapabilityUnavailable,
12653 ErrorCode::TemporarilyUnavailable,
12654 ErrorCode::Internal,
12655 ],
12656 limit_ids: &[
12657 "request_bytes",
12658 "response_bytes",
12659 "page_size",
12660 "query_clauses",
12661 "aggregation_nodes",
12662 "aggregation_buckets",
12663 "routing_values",
12664 "routing_value_bytes",
12665 "query_recursion_depth",
12666 "text_query_bytes",
12667 "text_query_fields",
12668 "text_query_slop",
12669 "text_query_boost",
12670 "text_query_fuzzy_expansions",
12671 "text_query_fuzzy_distance",
12672 "text_query_dictionary_scan_terms",
12673 "text_query_dictionary_scan_bytes",
12674 "text_query_fuzzy_work_units",
12675 "vector_dimensions",
12676 "vector_query_bytes",
12677 "vector_request_bytes",
12678 "vector_candidates",
12679 "vector_set_query_vectors",
12680 "vector_set_query_bytes",
12681 "retrieval_branches",
12682 "retrieval_branch_name_bytes",
12683 "retrieval_window",
12684 "fragment_fields",
12685 "fragments_per_field",
12686 "fragment_bytes",
12687 "fragment_total_bytes",
12688 "result_feature_hits",
12689 "result_features",
12690 "diversification_fields",
12691 "diversification_per_group",
12692 "search_result_window",
12693 ],
12694 effect_class: "read_only",
12695 risk_flags: &[],
12696 capability_family: "data",
12697 retry_safety: "safe",
12698 identity_requirement: "none",
12699 resolver: None,
12700 cancellation: "per_call",
12701 side_effects: &[],
12702 recovery: "retry",
12703 collection_index_ref: "request_indexes_or_pit_authority",
12704 },
12705 CommandSemanticContract {
12706 command: Command::TraverseRelationships,
12707 admissible_errors: &[
12708 ErrorCode::Aborted,
12709 ErrorCode::DeadlineExceeded,
12710 ErrorCode::InvalidRequest,
12711 ErrorCode::UnsupportedVersion,
12712 ErrorCode::Unauthenticated,
12713 ErrorCode::PermissionDenied,
12714 ErrorCode::NotFound,
12715 ErrorCode::LimitExceeded,
12716 ErrorCode::CapabilityUnavailable,
12717 ErrorCode::TemporarilyUnavailable,
12718 ErrorCode::Internal,
12719 ],
12720 limit_ids: &[
12721 "request_bytes",
12722 "response_bytes",
12723 "relationship_indexes",
12724 "relationship_seeds",
12725 "relationship_filter_values",
12726 "relationship_depth",
12727 "relationship_fan_out",
12728 "relationship_visited_entities",
12729 "relationship_visited_records",
12730 "relationship_returned_records",
12731 "relationship_memory_bytes",
12732 "search_result_window",
12733 ],
12734 effect_class: "read_only",
12735 risk_flags: &[],
12736 capability_family: "data",
12737 retry_safety: "safe",
12738 identity_requirement: "none",
12739 resolver: None,
12740 cancellation: "per_call",
12741 side_effects: &[],
12742 recovery: "retry",
12743 collection_index_ref: "pit_authority",
12744 },
12745 CommandSemanticContract {
12746 command: Command::QueryProfiles,
12747 admissible_errors: &[
12748 ErrorCode::Aborted,
12749 ErrorCode::DeadlineExceeded,
12750 ErrorCode::InvalidRequest,
12751 ErrorCode::UnsupportedVersion,
12752 ErrorCode::Unauthenticated,
12753 ErrorCode::PermissionDenied,
12754 ErrorCode::NotFound,
12755 ErrorCode::LimitExceeded,
12756 ErrorCode::CapabilityUnavailable,
12757 ErrorCode::TemporarilyUnavailable,
12758 ErrorCode::Internal,
12759 ],
12760 limit_ids: &[
12761 "request_bytes",
12762 "response_bytes",
12763 "profile_indexes",
12764 "profile_filter_values",
12765 "profile_batches",
12766 "profile_samples",
12767 "profile_results",
12768 "profile_memory_bytes",
12769 "search_result_window",
12770 ],
12771 effect_class: "read_only",
12772 risk_flags: &[],
12773 capability_family: "data",
12774 retry_safety: "safe",
12775 identity_requirement: "none",
12776 resolver: None,
12777 cancellation: "per_call",
12778 side_effects: &[],
12779 recovery: "retry",
12780 collection_index_ref: "pit_authority",
12781 },
12782 CommandSemanticContract {
12783 command: Command::EvaluateTemporalEvidence,
12784 admissible_errors: &[
12785 ErrorCode::Aborted,
12786 ErrorCode::DeadlineExceeded,
12787 ErrorCode::InvalidRequest,
12788 ErrorCode::UnsupportedVersion,
12789 ErrorCode::Unauthenticated,
12790 ErrorCode::PermissionDenied,
12791 ErrorCode::NotFound,
12792 ErrorCode::LimitExceeded,
12793 ErrorCode::CapabilityUnavailable,
12794 ErrorCode::TemporarilyUnavailable,
12795 ErrorCode::Internal,
12796 ],
12797 limit_ids: &[
12798 "request_bytes",
12799 "response_bytes",
12800 "query_clauses",
12801 "query_recursion_depth",
12802 "search_result_window",
12803 "temporal_inputs",
12804 "temporal_pattern_nodes",
12805 "temporal_pattern_depth",
12806 "temporal_pattern_branches",
12807 "temporal_correlation_keys",
12808 "temporal_events",
12809 "temporal_states",
12810 "temporal_captured_events",
12811 "temporal_results",
12812 "temporal_state_bytes",
12813 "temporal_interval_nanos",
12814 ],
12815 effect_class: "read_only",
12816 risk_flags: &[],
12817 capability_family: "data",
12818 retry_safety: "safe",
12819 identity_requirement: "none",
12820 resolver: None,
12821 cancellation: "per_call",
12822 side_effects: &[],
12823 recovery: "retry",
12824 collection_index_ref: "pit_authority",
12825 },
12826 CommandSemanticContract {
12827 command: Command::CreateContinuousTemporalEvaluation,
12828 admissible_errors: &[
12829 ErrorCode::Aborted,
12830 ErrorCode::DeadlineExceeded,
12831 ErrorCode::InvalidRequest,
12832 ErrorCode::UnsupportedVersion,
12833 ErrorCode::Unauthenticated,
12834 ErrorCode::PermissionDenied,
12835 ErrorCode::NotFound,
12836 ErrorCode::Conflict,
12837 ErrorCode::LimitExceeded,
12838 ErrorCode::CapabilityUnavailable,
12839 ErrorCode::NotSubmitted,
12840 ErrorCode::SubmittedIndeterminate,
12841 ErrorCode::TemporarilyUnavailable,
12842 ErrorCode::Internal,
12843 ],
12844 limit_ids: &[
12845 "request_bytes",
12846 "response_bytes",
12847 "temporal_inputs",
12848 "temporal_pattern_nodes",
12849 "temporal_pattern_depth",
12850 "temporal_pattern_branches",
12851 "temporal_correlation_keys",
12852 "temporal_events",
12853 "temporal_states",
12854 "temporal_captured_events",
12855 "temporal_results",
12856 "temporal_state_bytes",
12857 "temporal_interval_nanos",
12858 ],
12859 effect_class: "durable_submit",
12860 risk_flags: &[],
12861 capability_family: "lifecycle",
12862 retry_safety: "pre_submit_only",
12863 identity_requirement: "caller_action_id",
12864 resolver: Some(Command::GetContinuousTemporalEvaluation),
12865 cancellation: "per_call_until_submission_then_resolve",
12866 side_effects: &["commits_authoritative_state"],
12867 recovery: "resolve_with_get_continuous_temporal_evaluation",
12868 collection_index_ref: "request_temporal_inputs",
12869 },
12870 CommandSemanticContract {
12871 command: Command::GetContinuousTemporalEvaluation,
12872 admissible_errors: &[
12873 ErrorCode::Aborted,
12874 ErrorCode::DeadlineExceeded,
12875 ErrorCode::InvalidRequest,
12876 ErrorCode::UnsupportedVersion,
12877 ErrorCode::Unauthenticated,
12878 ErrorCode::PermissionDenied,
12879 ErrorCode::NotFound,
12880 ErrorCode::LimitExceeded,
12881 ErrorCode::CapabilityUnavailable,
12882 ErrorCode::TemporarilyUnavailable,
12883 ErrorCode::Internal,
12884 ],
12885 limit_ids: &["request_bytes", "response_bytes"],
12886 effect_class: "read_only",
12887 risk_flags: &[],
12888 capability_family: "lifecycle",
12889 retry_safety: "safe",
12890 identity_requirement: "none",
12891 resolver: None,
12892 cancellation: "per_call",
12893 side_effects: &[],
12894 recovery: "retry",
12895 collection_index_ref: "request_evaluation",
12896 },
12897 CommandSemanticContract {
12898 command: Command::PauseContinuousTemporalEvaluation,
12899 admissible_errors: &[
12900 ErrorCode::Aborted,
12901 ErrorCode::DeadlineExceeded,
12902 ErrorCode::InvalidRequest,
12903 ErrorCode::UnsupportedVersion,
12904 ErrorCode::Unauthenticated,
12905 ErrorCode::PermissionDenied,
12906 ErrorCode::NotFound,
12907 ErrorCode::Conflict,
12908 ErrorCode::LimitExceeded,
12909 ErrorCode::CapabilityUnavailable,
12910 ErrorCode::NotSubmitted,
12911 ErrorCode::SubmittedIndeterminate,
12912 ErrorCode::TemporarilyUnavailable,
12913 ErrorCode::Internal,
12914 ],
12915 limit_ids: &["request_bytes", "response_bytes"],
12916 effect_class: "durable_submit",
12917 risk_flags: &[],
12918 capability_family: "lifecycle",
12919 retry_safety: "pre_submit_only",
12920 identity_requirement: "caller_action_id",
12921 resolver: Some(Command::GetContinuousTemporalEvaluation),
12922 cancellation: "per_call_until_submission_then_resolve",
12923 side_effects: &["commits_authoritative_state"],
12924 recovery: "resolve_with_get_continuous_temporal_evaluation",
12925 collection_index_ref: "request_evaluation",
12926 },
12927 CommandSemanticContract {
12928 command: Command::ResumeContinuousTemporalEvaluation,
12929 admissible_errors: &[
12930 ErrorCode::Aborted,
12931 ErrorCode::DeadlineExceeded,
12932 ErrorCode::InvalidRequest,
12933 ErrorCode::UnsupportedVersion,
12934 ErrorCode::Unauthenticated,
12935 ErrorCode::PermissionDenied,
12936 ErrorCode::NotFound,
12937 ErrorCode::Conflict,
12938 ErrorCode::LimitExceeded,
12939 ErrorCode::CapabilityUnavailable,
12940 ErrorCode::NotSubmitted,
12941 ErrorCode::SubmittedIndeterminate,
12942 ErrorCode::TemporarilyUnavailable,
12943 ErrorCode::Internal,
12944 ],
12945 limit_ids: &["request_bytes", "response_bytes"],
12946 effect_class: "durable_submit",
12947 risk_flags: &[],
12948 capability_family: "lifecycle",
12949 retry_safety: "pre_submit_only",
12950 identity_requirement: "caller_action_id",
12951 resolver: Some(Command::GetContinuousTemporalEvaluation),
12952 cancellation: "per_call_until_submission_then_resolve",
12953 side_effects: &["commits_authoritative_state"],
12954 recovery: "resolve_with_get_continuous_temporal_evaluation",
12955 collection_index_ref: "request_evaluation",
12956 },
12957 CommandSemanticContract {
12958 command: Command::ReplaceContinuousTemporalEvaluation,
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::TemporarilyUnavailable,
12973 ErrorCode::Internal,
12974 ],
12975 limit_ids: &[
12976 "request_bytes",
12977 "response_bytes",
12978 "temporal_inputs",
12979 "temporal_pattern_nodes",
12980 "temporal_pattern_depth",
12981 "temporal_pattern_branches",
12982 "temporal_correlation_keys",
12983 "temporal_events",
12984 "temporal_states",
12985 "temporal_captured_events",
12986 "temporal_results",
12987 "temporal_state_bytes",
12988 "temporal_interval_nanos",
12989 ],
12990 effect_class: "durable_submit",
12991 risk_flags: &[],
12992 capability_family: "lifecycle",
12993 retry_safety: "pre_submit_only",
12994 identity_requirement: "caller_action_id",
12995 resolver: Some(Command::GetContinuousTemporalEvaluation),
12996 cancellation: "per_call_until_submission_then_resolve",
12997 side_effects: &["commits_authoritative_state"],
12998 recovery: "resolve_with_get_continuous_temporal_evaluation",
12999 collection_index_ref: "request_temporal_inputs",
13000 },
13001 CommandSemanticContract {
13002 command: Command::RetireContinuousTemporalEvaluation,
13003 admissible_errors: &[
13004 ErrorCode::Aborted,
13005 ErrorCode::DeadlineExceeded,
13006 ErrorCode::InvalidRequest,
13007 ErrorCode::UnsupportedVersion,
13008 ErrorCode::Unauthenticated,
13009 ErrorCode::PermissionDenied,
13010 ErrorCode::NotFound,
13011 ErrorCode::Conflict,
13012 ErrorCode::LimitExceeded,
13013 ErrorCode::CapabilityUnavailable,
13014 ErrorCode::NotSubmitted,
13015 ErrorCode::SubmittedIndeterminate,
13016 ErrorCode::TemporarilyUnavailable,
13017 ErrorCode::Internal,
13018 ],
13019 limit_ids: &["request_bytes", "response_bytes"],
13020 effect_class: "durable_submit",
13021 risk_flags: &["destructive"],
13022 capability_family: "lifecycle",
13023 retry_safety: "pre_submit_only",
13024 identity_requirement: "caller_action_id",
13025 resolver: Some(Command::GetContinuousTemporalEvaluation),
13026 cancellation: "per_call_until_submission_then_resolve",
13027 side_effects: &["commits_authoritative_state"],
13028 recovery: "resolve_with_get_continuous_temporal_evaluation",
13029 collection_index_ref: "request_evaluation",
13030 },
13031 CommandSemanticContract {
13032 command: Command::ReadContinuousTemporalEvidence,
13033 admissible_errors: &[
13034 ErrorCode::Aborted,
13035 ErrorCode::DeadlineExceeded,
13036 ErrorCode::InvalidRequest,
13037 ErrorCode::UnsupportedVersion,
13038 ErrorCode::Unauthenticated,
13039 ErrorCode::PermissionDenied,
13040 ErrorCode::NotFound,
13041 ErrorCode::Conflict,
13042 ErrorCode::RetentionGap,
13043 ErrorCode::LimitExceeded,
13044 ErrorCode::CapabilityUnavailable,
13045 ErrorCode::TemporarilyUnavailable,
13046 ErrorCode::Internal,
13047 ],
13048 limit_ids: &["request_bytes", "response_bytes", "page_size", "temporal_results"],
13049 effect_class: "read_only",
13050 risk_flags: &[],
13051 capability_family: "data",
13052 retry_safety: "safe",
13053 identity_requirement: "none",
13054 resolver: None,
13055 cancellation: "per_call",
13056 side_effects: &[],
13057 recovery: "retry",
13058 collection_index_ref: "request_evaluation",
13059 },
13060 CommandSemanticContract {
13061 command: Command::ValidateSearch,
13062 admissible_errors: &[
13063 ErrorCode::Aborted,
13064 ErrorCode::DeadlineExceeded,
13065 ErrorCode::InvalidRequest,
13066 ErrorCode::UnsupportedVersion,
13067 ErrorCode::Unauthenticated,
13068 ErrorCode::PermissionDenied,
13069 ErrorCode::NotFound,
13070 ErrorCode::LimitExceeded,
13071 ErrorCode::CapabilityUnavailable,
13072 ErrorCode::TemporarilyUnavailable,
13073 ErrorCode::Internal,
13074 ],
13075 limit_ids: &[
13076 "request_bytes",
13077 "response_bytes",
13078 "page_size",
13079 "query_clauses",
13080 "aggregation_nodes",
13081 "aggregation_buckets",
13082 "routing_values",
13083 "routing_value_bytes",
13084 "query_recursion_depth",
13085 "search_result_window",
13086 ],
13087 effect_class: "read_only",
13088 risk_flags: &[],
13089 capability_family: "data",
13090 retry_safety: "safe",
13091 identity_requirement: "none",
13092 resolver: None,
13093 cancellation: "per_call",
13094 side_effects: &[],
13095 recovery: "retry",
13096 collection_index_ref: "request_indexes_uniform",
13097 },
13098 CommandSemanticContract {
13099 command: Command::OpenPit,
13100 admissible_errors: &[
13101 ErrorCode::Aborted,
13102 ErrorCode::DeadlineExceeded,
13103 ErrorCode::InvalidRequest,
13104 ErrorCode::UnsupportedVersion,
13105 ErrorCode::Unauthenticated,
13106 ErrorCode::PermissionDenied,
13107 ErrorCode::NotFound,
13108 ErrorCode::Conflict,
13109 ErrorCode::LimitExceeded,
13110 ErrorCode::CapabilityUnavailable,
13111 ErrorCode::NotSubmitted,
13112 ErrorCode::SubmittedIndeterminate,
13113 ErrorCode::ExpiredUnknown,
13114 ErrorCode::TemporarilyUnavailable,
13115 ErrorCode::Internal,
13116 ],
13117 limit_ids: &["request_bytes", "response_bytes"],
13118 effect_class: "lease_renewing_read",
13119 risk_flags: &[],
13120 capability_family: "data",
13121 retry_safety: "pre_submit_only",
13122 identity_requirement: "none",
13123 resolver: None,
13124 cancellation: "per_call_until_submission_then_resolve",
13125 side_effects: &["renews_or_closes_existing_lease"],
13126 recovery: "retry_if_not_submitted",
13127 collection_index_ref: "request_indexes_uniform",
13128 },
13129 CommandSemanticContract {
13130 command: Command::RenewPit,
13131 admissible_errors: &[
13132 ErrorCode::Aborted,
13133 ErrorCode::DeadlineExceeded,
13134 ErrorCode::InvalidRequest,
13135 ErrorCode::UnsupportedVersion,
13136 ErrorCode::Unauthenticated,
13137 ErrorCode::PermissionDenied,
13138 ErrorCode::NotFound,
13139 ErrorCode::Conflict,
13140 ErrorCode::LimitExceeded,
13141 ErrorCode::CapabilityUnavailable,
13142 ErrorCode::NotSubmitted,
13143 ErrorCode::SubmittedIndeterminate,
13144 ErrorCode::ExpiredUnknown,
13145 ErrorCode::TemporarilyUnavailable,
13146 ErrorCode::Internal,
13147 ],
13148 limit_ids: &["request_bytes", "response_bytes"],
13149 effect_class: "lease_renewing_read",
13150 risk_flags: &[],
13151 capability_family: "data",
13152 retry_safety: "pre_submit_only",
13153 identity_requirement: "none",
13154 resolver: None,
13155 cancellation: "per_call_until_submission_then_resolve",
13156 side_effects: &["renews_or_closes_existing_lease"],
13157 recovery: "retry_if_not_submitted",
13158 collection_index_ref: "pit_authority",
13159 },
13160 CommandSemanticContract {
13161 command: Command::ClosePit,
13162 admissible_errors: &[
13163 ErrorCode::Aborted,
13164 ErrorCode::DeadlineExceeded,
13165 ErrorCode::InvalidRequest,
13166 ErrorCode::UnsupportedVersion,
13167 ErrorCode::Unauthenticated,
13168 ErrorCode::PermissionDenied,
13169 ErrorCode::NotFound,
13170 ErrorCode::Conflict,
13171 ErrorCode::LimitExceeded,
13172 ErrorCode::CapabilityUnavailable,
13173 ErrorCode::NotSubmitted,
13174 ErrorCode::SubmittedIndeterminate,
13175 ErrorCode::ExpiredUnknown,
13176 ErrorCode::TemporarilyUnavailable,
13177 ErrorCode::Internal,
13178 ],
13179 limit_ids: &["request_bytes", "response_bytes"],
13180 effect_class: "lease_renewing_read",
13181 risk_flags: &[],
13182 capability_family: "data",
13183 retry_safety: "pre_submit_only",
13184 identity_requirement: "none",
13185 resolver: None,
13186 cancellation: "per_call_until_submission_then_resolve",
13187 side_effects: &["renews_or_closes_existing_lease"],
13188 recovery: "retry_if_not_submitted",
13189 collection_index_ref: "pit_authority",
13190 },
13191 CommandSemanticContract {
13192 command: Command::ListOperations,
13193 admissible_errors: &[
13194 ErrorCode::Aborted,
13195 ErrorCode::DeadlineExceeded,
13196 ErrorCode::InvalidRequest,
13197 ErrorCode::UnsupportedVersion,
13198 ErrorCode::Unauthenticated,
13199 ErrorCode::PermissionDenied,
13200 ErrorCode::NotFound,
13201 ErrorCode::StaleCursor,
13202 ErrorCode::RestartBudgetExhausted,
13203 ErrorCode::LimitExceeded,
13204 ErrorCode::CapabilityUnavailable,
13205 ErrorCode::TemporarilyUnavailable,
13206 ErrorCode::Internal,
13207 ],
13208 limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
13209 effect_class: "read_only",
13210 risk_flags: &[],
13211 capability_family: "operations",
13212 retry_safety: "safe",
13213 identity_requirement: "none",
13214 resolver: None,
13215 cancellation: "per_call",
13216 side_effects: &[],
13217 recovery: "retry",
13218 collection_index_ref: "none",
13219 },
13220 CommandSemanticContract {
13221 command: Command::GetOperation,
13222 admissible_errors: &[
13223 ErrorCode::Aborted,
13224 ErrorCode::DeadlineExceeded,
13225 ErrorCode::InvalidRequest,
13226 ErrorCode::UnsupportedVersion,
13227 ErrorCode::Unauthenticated,
13228 ErrorCode::PermissionDenied,
13229 ErrorCode::NotFound,
13230 ErrorCode::LimitExceeded,
13231 ErrorCode::CapabilityUnavailable,
13232 ErrorCode::TemporarilyUnavailable,
13233 ErrorCode::Internal,
13234 ],
13235 limit_ids: &["request_bytes", "response_bytes"],
13236 effect_class: "read_only",
13237 risk_flags: &[],
13238 capability_family: "operations",
13239 retry_safety: "safe",
13240 identity_requirement: "request_locator",
13241 resolver: None,
13242 cancellation: "per_call",
13243 side_effects: &[],
13244 recovery: "retry",
13245 collection_index_ref: "none",
13246 },
13247 CommandSemanticContract {
13248 command: Command::WaitOperation,
13249 admissible_errors: &[
13250 ErrorCode::Aborted,
13251 ErrorCode::DeadlineExceeded,
13252 ErrorCode::InvalidRequest,
13253 ErrorCode::UnsupportedVersion,
13254 ErrorCode::Unauthenticated,
13255 ErrorCode::PermissionDenied,
13256 ErrorCode::NotFound,
13257 ErrorCode::Conflict,
13258 ErrorCode::LimitExceeded,
13259 ErrorCode::CapabilityUnavailable,
13260 ErrorCode::TemporarilyUnavailable,
13261 ErrorCode::Internal,
13262 ],
13263 limit_ids: &[
13264 "request_bytes",
13265 "response_bytes",
13266 "operation_wait_attempts",
13267 "operation_wait_interval_millis",
13268 ],
13269 effect_class: "read_only",
13270 risk_flags: &[],
13271 capability_family: "operations",
13272 retry_safety: "safe",
13273 identity_requirement: "request_locator",
13274 resolver: None,
13275 cancellation: "per_call",
13276 side_effects: &[],
13277 recovery: "retry",
13278 collection_index_ref: "none",
13279 },
13280 CommandSemanticContract {
13281 command: Command::CancelOperation,
13282 admissible_errors: &[
13283 ErrorCode::Aborted,
13284 ErrorCode::DeadlineExceeded,
13285 ErrorCode::InvalidRequest,
13286 ErrorCode::UnsupportedVersion,
13287 ErrorCode::Unauthenticated,
13288 ErrorCode::PermissionDenied,
13289 ErrorCode::NotFound,
13290 ErrorCode::Conflict,
13291 ErrorCode::LimitExceeded,
13292 ErrorCode::CapabilityUnavailable,
13293 ErrorCode::NotSubmitted,
13294 ErrorCode::SubmittedIndeterminate,
13295 ErrorCode::ExpiredUnknown,
13296 ErrorCode::TemporarilyUnavailable,
13297 ErrorCode::Internal,
13298 ],
13299 limit_ids: &["request_bytes", "response_bytes"],
13300 effect_class: "control_write",
13301 risk_flags: &[],
13302 capability_family: "operations",
13303 retry_safety: "pre_submit_only",
13304 identity_requirement: "request_locator",
13305 resolver: None,
13306 cancellation: "per_call_until_submission_then_resolve",
13307 side_effects: &["commits_authoritative_state"],
13308 recovery: "retry_if_not_submitted",
13309 collection_index_ref: "none",
13310 },
13311 CommandSemanticContract {
13312 command: Command::ListAuditEvents,
13313 admissible_errors: &[
13314 ErrorCode::Aborted,
13315 ErrorCode::DeadlineExceeded,
13316 ErrorCode::InvalidRequest,
13317 ErrorCode::UnsupportedVersion,
13318 ErrorCode::Unauthenticated,
13319 ErrorCode::PermissionDenied,
13320 ErrorCode::NotFound,
13321 ErrorCode::StaleCursor,
13322 ErrorCode::RestartBudgetExhausted,
13323 ErrorCode::LimitExceeded,
13324 ErrorCode::CapabilityUnavailable,
13325 ErrorCode::TemporarilyUnavailable,
13326 ErrorCode::Internal,
13327 ],
13328 limit_ids: &["request_bytes", "response_bytes", "page_size"],
13329 effect_class: "read_only",
13330 risk_flags: &[],
13331 capability_family: "audit",
13332 retry_safety: "safe",
13333 identity_requirement: "none",
13334 resolver: None,
13335 cancellation: "per_call",
13336 side_effects: &[],
13337 recovery: "retry",
13338 collection_index_ref: "none",
13339 },
13340 CommandSemanticContract {
13341 command: Command::ExportAuditEvents,
13342 admissible_errors: &[
13343 ErrorCode::Aborted,
13344 ErrorCode::DeadlineExceeded,
13345 ErrorCode::InvalidRequest,
13346 ErrorCode::UnsupportedVersion,
13347 ErrorCode::Unauthenticated,
13348 ErrorCode::PermissionDenied,
13349 ErrorCode::NotFound,
13350 ErrorCode::StaleCursor,
13351 ErrorCode::RestartBudgetExhausted,
13352 ErrorCode::LimitExceeded,
13353 ErrorCode::CapabilityUnavailable,
13354 ErrorCode::TemporarilyUnavailable,
13355 ErrorCode::Internal,
13356 ],
13357 limit_ids: &["request_bytes", "response_bytes", "page_size"],
13358 effect_class: "read_only",
13359 risk_flags: &[],
13360 capability_family: "audit",
13361 retry_safety: "safe",
13362 identity_requirement: "none",
13363 resolver: None,
13364 cancellation: "per_call",
13365 side_effects: &[],
13366 recovery: "retry",
13367 collection_index_ref: "none",
13368 },
13369 CommandSemanticContract {
13370 command: Command::ReserveServiceCredential,
13371 admissible_errors: &[
13372 ErrorCode::Aborted,
13373 ErrorCode::DeadlineExceeded,
13374 ErrorCode::InvalidRequest,
13375 ErrorCode::UnsupportedVersion,
13376 ErrorCode::Unauthenticated,
13377 ErrorCode::PermissionDenied,
13378 ErrorCode::NotFound,
13379 ErrorCode::Conflict,
13380 ErrorCode::LimitExceeded,
13381 ErrorCode::CapabilityUnavailable,
13382 ErrorCode::NotSubmitted,
13383 ErrorCode::SubmittedIndeterminate,
13384 ErrorCode::ExpiredUnknown,
13385 ErrorCode::SecretNotEscrowed,
13386 ErrorCode::TemporarilyUnavailable,
13387 ErrorCode::Internal,
13388 ],
13389 limit_ids: &["request_bytes", "response_bytes"],
13390 effect_class: "durable_submit",
13391 risk_flags: &["credential_sensitive"],
13392 capability_family: "security",
13393 retry_safety: "pre_submit_only",
13394 identity_requirement: "caller_action_id",
13395 resolver: Some(Command::ResolveServiceCredentialReservation),
13396 cancellation: "per_call_until_submission_then_resolve",
13397 side_effects: &["commits_authoritative_state"],
13398 recovery: "resolve_with_resolve_service_credential_reservation",
13399 collection_index_ref: "none",
13400 },
13401 CommandSemanticContract {
13402 command: Command::ReserveServiceCredentialRotation,
13403 admissible_errors: &[
13404 ErrorCode::Aborted,
13405 ErrorCode::DeadlineExceeded,
13406 ErrorCode::InvalidRequest,
13407 ErrorCode::UnsupportedVersion,
13408 ErrorCode::Unauthenticated,
13409 ErrorCode::PermissionDenied,
13410 ErrorCode::NotFound,
13411 ErrorCode::Conflict,
13412 ErrorCode::LimitExceeded,
13413 ErrorCode::CapabilityUnavailable,
13414 ErrorCode::NotSubmitted,
13415 ErrorCode::SubmittedIndeterminate,
13416 ErrorCode::ExpiredUnknown,
13417 ErrorCode::SecretNotEscrowed,
13418 ErrorCode::TemporarilyUnavailable,
13419 ErrorCode::Internal,
13420 ],
13421 limit_ids: &["request_bytes", "response_bytes"],
13422 effect_class: "durable_submit",
13423 risk_flags: &["credential_sensitive"],
13424 capability_family: "security",
13425 retry_safety: "pre_submit_only",
13426 identity_requirement: "caller_action_id",
13427 resolver: Some(Command::ResolveServiceCredentialReservation),
13428 cancellation: "per_call_until_submission_then_resolve",
13429 side_effects: &["commits_authoritative_state"],
13430 recovery: "resolve_with_resolve_service_credential_reservation",
13431 collection_index_ref: "none",
13432 },
13433 CommandSemanticContract {
13434 command: Command::ActivateServiceCredential,
13435 admissible_errors: &[
13436 ErrorCode::Aborted,
13437 ErrorCode::DeadlineExceeded,
13438 ErrorCode::InvalidRequest,
13439 ErrorCode::UnsupportedVersion,
13440 ErrorCode::Unauthenticated,
13441 ErrorCode::PermissionDenied,
13442 ErrorCode::NotFound,
13443 ErrorCode::Conflict,
13444 ErrorCode::LimitExceeded,
13445 ErrorCode::CapabilityUnavailable,
13446 ErrorCode::NotSubmitted,
13447 ErrorCode::SubmittedIndeterminate,
13448 ErrorCode::ExpiredUnknown,
13449 ErrorCode::SecretNotEscrowed,
13450 ErrorCode::TemporarilyUnavailable,
13451 ErrorCode::Internal,
13452 ],
13453 limit_ids: &["request_bytes", "response_bytes"],
13454 effect_class: "durable_submit",
13455 risk_flags: &["credential_sensitive"],
13456 capability_family: "security",
13457 retry_safety: "pre_submit_only",
13458 identity_requirement: "server_locator",
13459 resolver: Some(Command::ResolveServiceCredentialReservation),
13460 cancellation: "per_call_until_submission_then_resolve",
13461 side_effects: &["commits_authoritative_state"],
13462 recovery: "resolve_with_resolve_service_credential_reservation",
13463 collection_index_ref: "none",
13464 },
13465 CommandSemanticContract {
13466 command: Command::ResolveServiceCredentialReservation,
13467 admissible_errors: &[
13468 ErrorCode::Aborted,
13469 ErrorCode::DeadlineExceeded,
13470 ErrorCode::InvalidRequest,
13471 ErrorCode::UnsupportedVersion,
13472 ErrorCode::Unauthenticated,
13473 ErrorCode::PermissionDenied,
13474 ErrorCode::NotFound,
13475 ErrorCode::LimitExceeded,
13476 ErrorCode::CapabilityUnavailable,
13477 ErrorCode::SecretNotEscrowed,
13478 ErrorCode::TemporarilyUnavailable,
13479 ErrorCode::Internal,
13480 ],
13481 limit_ids: &["request_bytes", "response_bytes"],
13482 effect_class: "read_only",
13483 risk_flags: &["credential_sensitive"],
13484 capability_family: "security",
13485 retry_safety: "safe",
13486 identity_requirement: "caller_action_id",
13487 resolver: None,
13488 cancellation: "per_call",
13489 side_effects: &[],
13490 recovery: "retry",
13491 collection_index_ref: "none",
13492 },
13493 CommandSemanticContract {
13494 command: Command::PrepareRevokeServiceCredential,
13495 admissible_errors: &[
13496 ErrorCode::Aborted,
13497 ErrorCode::DeadlineExceeded,
13498 ErrorCode::InvalidRequest,
13499 ErrorCode::UnsupportedVersion,
13500 ErrorCode::Unauthenticated,
13501 ErrorCode::PermissionDenied,
13502 ErrorCode::NotFound,
13503 ErrorCode::LimitExceeded,
13504 ErrorCode::CapabilityUnavailable,
13505 ErrorCode::SecretNotEscrowed,
13506 ErrorCode::TemporarilyUnavailable,
13507 ErrorCode::Internal,
13508 ],
13509 limit_ids: &["request_bytes", "response_bytes"],
13510 effect_class: "prepare",
13511 risk_flags: &["destructive", "credential_sensitive"],
13512 capability_family: "security",
13513 retry_safety: "safe",
13514 identity_requirement: "server_locator",
13515 resolver: None,
13516 cancellation: "per_call",
13517 side_effects: &["creates_bounded_preparation"],
13518 recovery: "retry",
13519 collection_index_ref: "none",
13520 },
13521 CommandSemanticContract {
13522 command: Command::RevokeServiceCredential,
13523 admissible_errors: &[
13524 ErrorCode::Aborted,
13525 ErrorCode::DeadlineExceeded,
13526 ErrorCode::InvalidRequest,
13527 ErrorCode::UnsupportedVersion,
13528 ErrorCode::Unauthenticated,
13529 ErrorCode::PermissionDenied,
13530 ErrorCode::NotFound,
13531 ErrorCode::Conflict,
13532 ErrorCode::LimitExceeded,
13533 ErrorCode::CapabilityUnavailable,
13534 ErrorCode::NotSubmitted,
13535 ErrorCode::SubmittedIndeterminate,
13536 ErrorCode::ExpiredUnknown,
13537 ErrorCode::SecretNotEscrowed,
13538 ErrorCode::TemporarilyUnavailable,
13539 ErrorCode::Internal,
13540 ],
13541 limit_ids: &["request_bytes", "response_bytes"],
13542 effect_class: "durable_submit",
13543 risk_flags: &["destructive", "credential_sensitive"],
13544 capability_family: "security",
13545 retry_safety: "pre_submit_only",
13546 identity_requirement: "request_locator",
13547 resolver: Some(Command::ResolveSecurityAction),
13548 cancellation: "per_call_until_submission_then_resolve",
13549 side_effects: &["commits_authoritative_state"],
13550 recovery: "resolve_with_resolve_security_action",
13551 collection_index_ref: "none",
13552 },
13553 CommandSemanticContract {
13554 command: Command::ResolveSecurityAction,
13555 admissible_errors: &[
13556 ErrorCode::Aborted,
13557 ErrorCode::DeadlineExceeded,
13558 ErrorCode::InvalidRequest,
13559 ErrorCode::UnsupportedVersion,
13560 ErrorCode::Unauthenticated,
13561 ErrorCode::PermissionDenied,
13562 ErrorCode::NotFound,
13563 ErrorCode::LimitExceeded,
13564 ErrorCode::CapabilityUnavailable,
13565 ErrorCode::SecretNotEscrowed,
13566 ErrorCode::TemporarilyUnavailable,
13567 ErrorCode::Internal,
13568 ],
13569 limit_ids: &["request_bytes", "response_bytes"],
13570 effect_class: "read_only",
13571 risk_flags: &[],
13572 capability_family: "security",
13573 retry_safety: "safe",
13574 identity_requirement: "request_locator",
13575 resolver: None,
13576 cancellation: "per_call",
13577 side_effects: &[],
13578 recovery: "retry",
13579 collection_index_ref: "none",
13580 },
13581 CommandSemanticContract {
13582 command: Command::GetSecurityRole,
13583 admissible_errors: &[
13584 ErrorCode::Aborted,
13585 ErrorCode::DeadlineExceeded,
13586 ErrorCode::InvalidRequest,
13587 ErrorCode::UnsupportedVersion,
13588 ErrorCode::Unauthenticated,
13589 ErrorCode::PermissionDenied,
13590 ErrorCode::NotFound,
13591 ErrorCode::LimitExceeded,
13592 ErrorCode::CapabilityUnavailable,
13593 ErrorCode::TemporarilyUnavailable,
13594 ErrorCode::Internal,
13595 ],
13596 limit_ids: &["request_bytes", "response_bytes"],
13597 effect_class: "read_only",
13598 risk_flags: &[],
13599 capability_family: "security",
13600 retry_safety: "safe",
13601 identity_requirement: "none",
13602 resolver: None,
13603 cancellation: "per_call",
13604 side_effects: &[],
13605 recovery: "retry",
13606 collection_index_ref: "none",
13607 },
13608 CommandSemanticContract {
13609 command: Command::PrepareRoleAppendAccessChange,
13610 admissible_errors: &[
13611 ErrorCode::Aborted,
13612 ErrorCode::DeadlineExceeded,
13613 ErrorCode::InvalidRequest,
13614 ErrorCode::UnsupportedVersion,
13615 ErrorCode::Unauthenticated,
13616 ErrorCode::PermissionDenied,
13617 ErrorCode::NotFound,
13618 ErrorCode::Conflict,
13619 ErrorCode::LimitExceeded,
13620 ErrorCode::CapabilityUnavailable,
13621 ErrorCode::TemporarilyUnavailable,
13622 ErrorCode::Internal,
13623 ],
13624 limit_ids: &["request_bytes", "response_bytes"],
13625 effect_class: "prepare",
13626 risk_flags: &["destructive"],
13627 capability_family: "security",
13628 retry_safety: "safe",
13629 identity_requirement: "server_locator",
13630 resolver: None,
13631 cancellation: "per_call",
13632 side_effects: &["creates_bounded_preparation"],
13633 recovery: "retry",
13634 collection_index_ref: "none",
13635 },
13636 CommandSemanticContract {
13637 command: Command::SubmitRoleAppendAccessChange,
13638 admissible_errors: &[
13639 ErrorCode::Aborted,
13640 ErrorCode::DeadlineExceeded,
13641 ErrorCode::InvalidRequest,
13642 ErrorCode::UnsupportedVersion,
13643 ErrorCode::Unauthenticated,
13644 ErrorCode::PermissionDenied,
13645 ErrorCode::NotFound,
13646 ErrorCode::Conflict,
13647 ErrorCode::LimitExceeded,
13648 ErrorCode::CapabilityUnavailable,
13649 ErrorCode::NotSubmitted,
13650 ErrorCode::SubmittedIndeterminate,
13651 ErrorCode::ExpiredUnknown,
13652 ErrorCode::TemporarilyUnavailable,
13653 ErrorCode::Internal,
13654 ],
13655 limit_ids: &["request_bytes", "response_bytes"],
13656 effect_class: "durable_submit",
13657 risk_flags: &["destructive"],
13658 capability_family: "security",
13659 retry_safety: "pre_submit_only",
13660 identity_requirement: "request_locator",
13661 resolver: Some(Command::ResolveSecurityAction),
13662 cancellation: "per_call_until_submission_then_resolve",
13663 side_effects: &["commits_authoritative_state"],
13664 recovery: "resolve_with_resolve_security_action",
13665 collection_index_ref: "none",
13666 },
13667 CommandSemanticContract {
13668 command: Command::ListServiceCredentials,
13669 admissible_errors: &[
13670 ErrorCode::Aborted,
13671 ErrorCode::DeadlineExceeded,
13672 ErrorCode::InvalidRequest,
13673 ErrorCode::UnsupportedVersion,
13674 ErrorCode::Unauthenticated,
13675 ErrorCode::PermissionDenied,
13676 ErrorCode::NotFound,
13677 ErrorCode::StaleCursor,
13678 ErrorCode::RestartBudgetExhausted,
13679 ErrorCode::LimitExceeded,
13680 ErrorCode::CapabilityUnavailable,
13681 ErrorCode::SecretNotEscrowed,
13682 ErrorCode::TemporarilyUnavailable,
13683 ErrorCode::Internal,
13684 ],
13685 limit_ids: &["request_bytes", "response_bytes", "page_size"],
13686 effect_class: "read_only",
13687 risk_flags: &["credential_sensitive"],
13688 capability_family: "security",
13689 retry_safety: "safe",
13690 identity_requirement: "none",
13691 resolver: None,
13692 cancellation: "per_call",
13693 side_effects: &[],
13694 recovery: "retry",
13695 collection_index_ref: "none",
13696 },
13697 CommandSemanticContract {
13698 command: Command::GetRuntimeStatus,
13699 admissible_errors: &[
13700 ErrorCode::Aborted,
13701 ErrorCode::DeadlineExceeded,
13702 ErrorCode::InvalidRequest,
13703 ErrorCode::UnsupportedVersion,
13704 ErrorCode::Unauthenticated,
13705 ErrorCode::PermissionDenied,
13706 ErrorCode::NotFound,
13707 ErrorCode::LimitExceeded,
13708 ErrorCode::CapabilityUnavailable,
13709 ErrorCode::TemporarilyUnavailable,
13710 ErrorCode::Internal,
13711 ],
13712 limit_ids: &["request_bytes", "response_bytes"],
13713 effect_class: "read_only",
13714 risk_flags: &[],
13715 capability_family: "catalog",
13716 retry_safety: "safe",
13717 identity_requirement: "none",
13718 resolver: None,
13719 cancellation: "per_call",
13720 side_effects: &[],
13721 recovery: "retry",
13722 collection_index_ref: "none",
13723 },
13724 CommandSemanticContract {
13725 command: Command::GetResultCacheStatus,
13726 admissible_errors: &[
13727 ErrorCode::Aborted,
13728 ErrorCode::DeadlineExceeded,
13729 ErrorCode::InvalidRequest,
13730 ErrorCode::UnsupportedVersion,
13731 ErrorCode::Unauthenticated,
13732 ErrorCode::PermissionDenied,
13733 ErrorCode::NotFound,
13734 ErrorCode::LimitExceeded,
13735 ErrorCode::CapabilityUnavailable,
13736 ErrorCode::TemporarilyUnavailable,
13737 ErrorCode::Internal,
13738 ],
13739 limit_ids: &["request_bytes", "response_bytes"],
13740 effect_class: "read_only",
13741 risk_flags: &[],
13742 capability_family: "catalog",
13743 retry_safety: "safe",
13744 identity_requirement: "none",
13745 resolver: None,
13746 cancellation: "per_call",
13747 side_effects: &[],
13748 recovery: "retry",
13749 collection_index_ref: "none",
13750 },
13751 CommandSemanticContract {
13752 command: Command::GetFieldPromotionStatus,
13753 admissible_errors: &[
13754 ErrorCode::Aborted,
13755 ErrorCode::DeadlineExceeded,
13756 ErrorCode::InvalidRequest,
13757 ErrorCode::UnsupportedVersion,
13758 ErrorCode::Unauthenticated,
13759 ErrorCode::PermissionDenied,
13760 ErrorCode::NotFound,
13761 ErrorCode::LimitExceeded,
13762 ErrorCode::CapabilityUnavailable,
13763 ErrorCode::TemporarilyUnavailable,
13764 ErrorCode::Internal,
13765 ],
13766 limit_ids: &["request_bytes", "response_bytes"],
13767 effect_class: "read_only",
13768 risk_flags: &[],
13769 capability_family: "catalog",
13770 retry_safety: "safe",
13771 identity_requirement: "none",
13772 resolver: None,
13773 cancellation: "per_call",
13774 side_effects: &[],
13775 recovery: "retry",
13776 collection_index_ref: "none",
13777 },
13778 CommandSemanticContract {
13779 command: Command::GetOverloadStatus,
13780 admissible_errors: &[
13781 ErrorCode::Aborted,
13782 ErrorCode::DeadlineExceeded,
13783 ErrorCode::InvalidRequest,
13784 ErrorCode::UnsupportedVersion,
13785 ErrorCode::Unauthenticated,
13786 ErrorCode::PermissionDenied,
13787 ErrorCode::NotFound,
13788 ErrorCode::LimitExceeded,
13789 ErrorCode::CapabilityUnavailable,
13790 ErrorCode::TemporarilyUnavailable,
13791 ErrorCode::Internal,
13792 ],
13793 limit_ids: &["request_bytes", "response_bytes"],
13794 effect_class: "read_only",
13795 risk_flags: &[],
13796 capability_family: "catalog",
13797 retry_safety: "safe",
13798 identity_requirement: "none",
13799 resolver: None,
13800 cancellation: "per_call",
13801 side_effects: &[],
13802 recovery: "retry",
13803 collection_index_ref: "none",
13804 },
13805 CommandSemanticContract {
13806 command: Command::ConfigureExternalKey,
13807 admissible_errors: &[
13808 ErrorCode::Aborted,
13809 ErrorCode::DeadlineExceeded,
13810 ErrorCode::InvalidRequest,
13811 ErrorCode::UnsupportedVersion,
13812 ErrorCode::Unauthenticated,
13813 ErrorCode::PermissionDenied,
13814 ErrorCode::NotFound,
13815 ErrorCode::Conflict,
13816 ErrorCode::LimitExceeded,
13817 ErrorCode::CapabilityUnavailable,
13818 ErrorCode::NotSubmitted,
13819 ErrorCode::SubmittedIndeterminate,
13820 ErrorCode::ExpiredUnknown,
13821 ErrorCode::TemporarilyUnavailable,
13822 ErrorCode::Internal,
13823 ],
13824 limit_ids: &["request_bytes", "response_bytes"],
13825 effect_class: "control_write",
13826 risk_flags: &[],
13827 capability_family: "lifecycle",
13828 retry_safety: "pre_submit_only",
13829 identity_requirement: "none",
13830 resolver: None,
13831 cancellation: "per_call_until_submission_then_resolve",
13832 side_effects: &["commits_authoritative_state"],
13833 recovery: "retry_if_not_submitted",
13834 collection_index_ref: "request_index",
13835 },
13836 CommandSemanticContract {
13837 command: Command::RotateExternalKeyBinding,
13838 admissible_errors: &[
13839 ErrorCode::Aborted,
13840 ErrorCode::DeadlineExceeded,
13841 ErrorCode::InvalidRequest,
13842 ErrorCode::UnsupportedVersion,
13843 ErrorCode::Unauthenticated,
13844 ErrorCode::PermissionDenied,
13845 ErrorCode::NotFound,
13846 ErrorCode::Conflict,
13847 ErrorCode::LimitExceeded,
13848 ErrorCode::CapabilityUnavailable,
13849 ErrorCode::NotSubmitted,
13850 ErrorCode::SubmittedIndeterminate,
13851 ErrorCode::ExpiredUnknown,
13852 ErrorCode::TemporarilyUnavailable,
13853 ErrorCode::Internal,
13854 ],
13855 limit_ids: &["request_bytes", "response_bytes"],
13856 effect_class: "control_write",
13857 risk_flags: &[],
13858 capability_family: "lifecycle",
13859 retry_safety: "pre_submit_only",
13860 identity_requirement: "none",
13861 resolver: None,
13862 cancellation: "per_call_until_submission_then_resolve",
13863 side_effects: &["commits_authoritative_state"],
13864 recovery: "retry_if_not_submitted",
13865 collection_index_ref: "request_index",
13866 },
13867 CommandSemanticContract {
13868 command: Command::ConfigureAggregateThenDelete,
13869 admissible_errors: &[
13870 ErrorCode::Aborted,
13871 ErrorCode::DeadlineExceeded,
13872 ErrorCode::InvalidRequest,
13873 ErrorCode::UnsupportedVersion,
13874 ErrorCode::Unauthenticated,
13875 ErrorCode::PermissionDenied,
13876 ErrorCode::NotFound,
13877 ErrorCode::Conflict,
13878 ErrorCode::LimitExceeded,
13879 ErrorCode::CapabilityUnavailable,
13880 ErrorCode::NotSubmitted,
13881 ErrorCode::SubmittedIndeterminate,
13882 ErrorCode::ExpiredUnknown,
13883 ErrorCode::TemporarilyUnavailable,
13884 ErrorCode::Internal,
13885 ],
13886 limit_ids: &["request_bytes", "response_bytes"],
13887 effect_class: "control_write",
13888 risk_flags: &["destructive"],
13889 capability_family: "lifecycle",
13890 retry_safety: "pre_submit_only",
13891 identity_requirement: "none",
13892 resolver: None,
13893 cancellation: "per_call_until_submission_then_resolve",
13894 side_effects: &["commits_authoritative_state"],
13895 recovery: "retry_if_not_submitted",
13896 collection_index_ref: "request_index",
13897 },
13898 CommandSemanticContract {
13899 command: Command::GetLifecycleStatus,
13900 admissible_errors: &[
13901 ErrorCode::Aborted,
13902 ErrorCode::DeadlineExceeded,
13903 ErrorCode::InvalidRequest,
13904 ErrorCode::UnsupportedVersion,
13905 ErrorCode::Unauthenticated,
13906 ErrorCode::PermissionDenied,
13907 ErrorCode::NotFound,
13908 ErrorCode::LimitExceeded,
13909 ErrorCode::CapabilityUnavailable,
13910 ErrorCode::TemporarilyUnavailable,
13911 ErrorCode::Internal,
13912 ],
13913 limit_ids: &["request_bytes", "response_bytes"],
13914 effect_class: "read_only",
13915 risk_flags: &[],
13916 capability_family: "catalog",
13917 retry_safety: "safe",
13918 identity_requirement: "none",
13919 resolver: None,
13920 cancellation: "per_call",
13921 side_effects: &[],
13922 recovery: "retry",
13923 collection_index_ref: "none",
13924 },
13925 CommandSemanticContract {
13926 command: Command::GetQuota,
13927 admissible_errors: &[
13928 ErrorCode::Aborted,
13929 ErrorCode::DeadlineExceeded,
13930 ErrorCode::InvalidRequest,
13931 ErrorCode::UnsupportedVersion,
13932 ErrorCode::Unauthenticated,
13933 ErrorCode::PermissionDenied,
13934 ErrorCode::NotFound,
13935 ErrorCode::LimitExceeded,
13936 ErrorCode::CapabilityUnavailable,
13937 ErrorCode::TemporarilyUnavailable,
13938 ErrorCode::Internal,
13939 ],
13940 limit_ids: &["request_bytes", "response_bytes"],
13941 effect_class: "read_only",
13942 risk_flags: &[],
13943 capability_family: "quota",
13944 retry_safety: "safe",
13945 identity_requirement: "none",
13946 resolver: None,
13947 cancellation: "per_call",
13948 side_effects: &[],
13949 recovery: "retry",
13950 collection_index_ref: "none",
13951 },
13952 CommandSemanticContract {
13953 command: Command::UpdateQuota,
13954 admissible_errors: &[
13955 ErrorCode::Aborted,
13956 ErrorCode::DeadlineExceeded,
13957 ErrorCode::InvalidRequest,
13958 ErrorCode::UnsupportedVersion,
13959 ErrorCode::Unauthenticated,
13960 ErrorCode::PermissionDenied,
13961 ErrorCode::NotFound,
13962 ErrorCode::Conflict,
13963 ErrorCode::LimitExceeded,
13964 ErrorCode::CapabilityUnavailable,
13965 ErrorCode::NotSubmitted,
13966 ErrorCode::SubmittedIndeterminate,
13967 ErrorCode::ExpiredUnknown,
13968 ErrorCode::TemporarilyUnavailable,
13969 ErrorCode::Internal,
13970 ],
13971 limit_ids: &["request_bytes", "response_bytes"],
13972 effect_class: "control_write",
13973 risk_flags: &[],
13974 capability_family: "quota",
13975 retry_safety: "pre_submit_only",
13976 identity_requirement: "none",
13977 resolver: None,
13978 cancellation: "per_call_until_submission_then_resolve",
13979 side_effects: &["commits_authoritative_state"],
13980 recovery: "retry_if_not_submitted",
13981 collection_index_ref: "none",
13982 },
13983 CommandSemanticContract {
13984 command: Command::GetBinding,
13985 admissible_errors: &[
13986 ErrorCode::Aborted,
13987 ErrorCode::DeadlineExceeded,
13988 ErrorCode::InvalidRequest,
13989 ErrorCode::UnsupportedVersion,
13990 ErrorCode::Unauthenticated,
13991 ErrorCode::PermissionDenied,
13992 ErrorCode::NotFound,
13993 ErrorCode::LimitExceeded,
13994 ErrorCode::CapabilityUnavailable,
13995 ErrorCode::TemporarilyUnavailable,
13996 ErrorCode::Internal,
13997 ],
13998 limit_ids: &["request_bytes", "response_bytes"],
13999 effect_class: "read_only",
14000 risk_flags: &[],
14001 capability_family: "runtime_control",
14002 retry_safety: "safe",
14003 identity_requirement: "none",
14004 resolver: None,
14005 cancellation: "per_call",
14006 side_effects: &[],
14007 recovery: "retry",
14008 collection_index_ref: "none",
14009 },
14010 CommandSemanticContract {
14011 command: Command::GetAdmissionStatus,
14012 admissible_errors: &[
14013 ErrorCode::Aborted,
14014 ErrorCode::DeadlineExceeded,
14015 ErrorCode::InvalidRequest,
14016 ErrorCode::UnsupportedVersion,
14017 ErrorCode::Unauthenticated,
14018 ErrorCode::PermissionDenied,
14019 ErrorCode::NotFound,
14020 ErrorCode::LimitExceeded,
14021 ErrorCode::CapabilityUnavailable,
14022 ErrorCode::TemporarilyUnavailable,
14023 ErrorCode::Internal,
14024 ],
14025 limit_ids: &["request_bytes", "response_bytes"],
14026 effect_class: "read_only",
14027 risk_flags: &[],
14028 capability_family: "runtime_control",
14029 retry_safety: "safe",
14030 identity_requirement: "none",
14031 resolver: None,
14032 cancellation: "per_call",
14033 side_effects: &[],
14034 recovery: "retry",
14035 collection_index_ref: "none",
14036 },
14037 CommandSemanticContract {
14038 command: Command::SetAdmission,
14039 admissible_errors: &[
14040 ErrorCode::Aborted,
14041 ErrorCode::DeadlineExceeded,
14042 ErrorCode::InvalidRequest,
14043 ErrorCode::UnsupportedVersion,
14044 ErrorCode::Unauthenticated,
14045 ErrorCode::PermissionDenied,
14046 ErrorCode::NotFound,
14047 ErrorCode::Conflict,
14048 ErrorCode::LimitExceeded,
14049 ErrorCode::CapabilityUnavailable,
14050 ErrorCode::NotSubmitted,
14051 ErrorCode::SubmittedIndeterminate,
14052 ErrorCode::ExpiredUnknown,
14053 ErrorCode::TemporarilyUnavailable,
14054 ErrorCode::Internal,
14055 ],
14056 limit_ids: &["request_bytes", "response_bytes"],
14057 effect_class: "control_write",
14058 risk_flags: &[],
14059 capability_family: "runtime_control",
14060 retry_safety: "pre_submit_only",
14061 identity_requirement: "none",
14062 resolver: None,
14063 cancellation: "per_call_until_submission_then_resolve",
14064 side_effects: &["commits_authoritative_state"],
14065 recovery: "retry_if_not_submitted",
14066 collection_index_ref: "none",
14067 },
14068 CommandSemanticContract {
14069 command: Command::GetQuiesceStatus,
14070 admissible_errors: &[
14071 ErrorCode::Aborted,
14072 ErrorCode::DeadlineExceeded,
14073 ErrorCode::InvalidRequest,
14074 ErrorCode::UnsupportedVersion,
14075 ErrorCode::Unauthenticated,
14076 ErrorCode::PermissionDenied,
14077 ErrorCode::NotFound,
14078 ErrorCode::LimitExceeded,
14079 ErrorCode::CapabilityUnavailable,
14080 ErrorCode::TemporarilyUnavailable,
14081 ErrorCode::Internal,
14082 ],
14083 limit_ids: &["request_bytes", "response_bytes"],
14084 effect_class: "read_only",
14085 risk_flags: &[],
14086 capability_family: "runtime_control",
14087 retry_safety: "safe",
14088 identity_requirement: "none",
14089 resolver: None,
14090 cancellation: "per_call",
14091 side_effects: &[],
14092 recovery: "retry",
14093 collection_index_ref: "none",
14094 },
14095 CommandSemanticContract {
14096 command: Command::GetDecommissionReadiness,
14097 admissible_errors: &[
14098 ErrorCode::Aborted,
14099 ErrorCode::DeadlineExceeded,
14100 ErrorCode::InvalidRequest,
14101 ErrorCode::UnsupportedVersion,
14102 ErrorCode::Unauthenticated,
14103 ErrorCode::PermissionDenied,
14104 ErrorCode::NotFound,
14105 ErrorCode::LimitExceeded,
14106 ErrorCode::CapabilityUnavailable,
14107 ErrorCode::TemporarilyUnavailable,
14108 ErrorCode::Internal,
14109 ],
14110 limit_ids: &["request_bytes", "response_bytes"],
14111 effect_class: "read_only",
14112 risk_flags: &[],
14113 capability_family: "runtime_control",
14114 retry_safety: "safe",
14115 identity_requirement: "none",
14116 resolver: None,
14117 cancellation: "per_call",
14118 side_effects: &[],
14119 recovery: "retry",
14120 collection_index_ref: "none",
14121 },
14122 CommandSemanticContract {
14123 command: Command::GetUpgradeReadiness,
14124 admissible_errors: &[
14125 ErrorCode::Aborted,
14126 ErrorCode::DeadlineExceeded,
14127 ErrorCode::InvalidRequest,
14128 ErrorCode::UnsupportedVersion,
14129 ErrorCode::Unauthenticated,
14130 ErrorCode::PermissionDenied,
14131 ErrorCode::NotFound,
14132 ErrorCode::LimitExceeded,
14133 ErrorCode::CapabilityUnavailable,
14134 ErrorCode::TemporarilyUnavailable,
14135 ErrorCode::Internal,
14136 ],
14137 limit_ids: &["request_bytes", "response_bytes"],
14138 effect_class: "read_only",
14139 risk_flags: &[],
14140 capability_family: "operations",
14141 retry_safety: "safe",
14142 identity_requirement: "none",
14143 resolver: None,
14144 cancellation: "per_call",
14145 side_effects: &[],
14146 recovery: "retry",
14147 collection_index_ref: "none",
14148 },
14149 CommandSemanticContract {
14150 command: Command::GetMaintenanceStatus,
14151 admissible_errors: &[
14152 ErrorCode::Aborted,
14153 ErrorCode::DeadlineExceeded,
14154 ErrorCode::InvalidRequest,
14155 ErrorCode::UnsupportedVersion,
14156 ErrorCode::Unauthenticated,
14157 ErrorCode::PermissionDenied,
14158 ErrorCode::NotFound,
14159 ErrorCode::StaleCursor,
14160 ErrorCode::LimitExceeded,
14161 ErrorCode::CapabilityUnavailable,
14162 ErrorCode::TemporarilyUnavailable,
14163 ErrorCode::Internal,
14164 ],
14165 limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
14166 effect_class: "read_only",
14167 risk_flags: &[],
14168 capability_family: "operations",
14169 retry_safety: "safe",
14170 identity_requirement: "none",
14171 resolver: None,
14172 cancellation: "per_call",
14173 side_effects: &[],
14174 recovery: "retry",
14175 collection_index_ref: "optional_request_index",
14176 },
14177 CommandSemanticContract {
14178 command: Command::WarmVectorIndex,
14179 admissible_errors: &[
14180 ErrorCode::Aborted,
14181 ErrorCode::DeadlineExceeded,
14182 ErrorCode::InvalidRequest,
14183 ErrorCode::UnsupportedVersion,
14184 ErrorCode::Unauthenticated,
14185 ErrorCode::PermissionDenied,
14186 ErrorCode::NotFound,
14187 ErrorCode::Conflict,
14188 ErrorCode::LimitExceeded,
14189 ErrorCode::CapabilityUnavailable,
14190 ErrorCode::TemporarilyUnavailable,
14191 ErrorCode::Internal,
14192 ],
14193 limit_ids: &[
14194 "request_bytes",
14195 "response_bytes",
14196 "vector_warm_components",
14197 "vector_warm_requests",
14198 "vector_warm_bytes",
14199 "vector_warm_achievements",
14200 "vector_warm_ttl_millis",
14201 ],
14202 effect_class: "read_only",
14203 risk_flags: &[],
14204 capability_family: "data",
14205 retry_safety: "safe",
14206 identity_requirement: "exact_root",
14207 resolver: None,
14208 cancellation: "per_call",
14209 side_effects: &["populates_reconstructible_cache"],
14210 recovery: "retry",
14211 collection_index_ref: "request_index",
14212 },
14213 CommandSemanticContract {
14214 command: Command::EvaluateVectorRecall,
14215 admissible_errors: &[
14216 ErrorCode::Aborted,
14217 ErrorCode::DeadlineExceeded,
14218 ErrorCode::InvalidRequest,
14219 ErrorCode::UnsupportedVersion,
14220 ErrorCode::Unauthenticated,
14221 ErrorCode::PermissionDenied,
14222 ErrorCode::NotFound,
14223 ErrorCode::Conflict,
14224 ErrorCode::LimitExceeded,
14225 ErrorCode::CapabilityUnavailable,
14226 ErrorCode::NotSubmitted,
14227 ErrorCode::SubmittedIndeterminate,
14228 ErrorCode::ExpiredUnknown,
14229 ErrorCode::TemporarilyUnavailable,
14230 ErrorCode::Internal,
14231 ],
14232 limit_ids: &[
14233 "request_bytes",
14234 "response_bytes",
14235 "vector_dimensions",
14236 "vector_query_bytes",
14237 "vector_request_bytes",
14238 "vector_candidates",
14239 "vector_evaluation_queries",
14240 "vector_evaluation_k",
14241 "vector_evaluation_artifact_bytes",
14242 ],
14243 effect_class: "durable_submit",
14244 risk_flags: &[],
14245 capability_family: "diagnostics",
14246 retry_safety: "pre_submit_only",
14247 identity_requirement: "caller_action_id",
14248 resolver: None,
14249 cancellation: "per_call_until_submission_then_resolve",
14250 side_effects: &["commits_authoritative_state"],
14251 recovery: "retry_if_not_submitted",
14252 collection_index_ref: "request_index",
14253 },
14254 CommandSemanticContract {
14255 command: Command::CalibrateVectorStrategy,
14256 admissible_errors: &[
14257 ErrorCode::Aborted,
14258 ErrorCode::DeadlineExceeded,
14259 ErrorCode::InvalidRequest,
14260 ErrorCode::UnsupportedVersion,
14261 ErrorCode::Unauthenticated,
14262 ErrorCode::PermissionDenied,
14263 ErrorCode::NotFound,
14264 ErrorCode::Conflict,
14265 ErrorCode::LimitExceeded,
14266 ErrorCode::CapabilityUnavailable,
14267 ErrorCode::NotSubmitted,
14268 ErrorCode::SubmittedIndeterminate,
14269 ErrorCode::ExpiredUnknown,
14270 ErrorCode::TemporarilyUnavailable,
14271 ErrorCode::Internal,
14272 ],
14273 limit_ids: &[
14274 "request_bytes",
14275 "response_bytes",
14276 "vector_dimensions",
14277 "vector_query_bytes",
14278 "vector_request_bytes",
14279 "vector_candidates",
14280 "vector_evaluation_queries",
14281 "vector_evaluation_k",
14282 "vector_evaluation_profiles",
14283 "vector_evaluation_artifact_bytes",
14284 ],
14285 effect_class: "durable_submit",
14286 risk_flags: &[],
14287 capability_family: "diagnostics",
14288 retry_safety: "pre_submit_only",
14289 identity_requirement: "caller_action_id",
14290 resolver: None,
14291 cancellation: "per_call_until_submission_then_resolve",
14292 side_effects: &["commits_authoritative_state"],
14293 recovery: "retry_if_not_submitted",
14294 collection_index_ref: "request_index",
14295 },
14296 CommandSemanticContract {
14297 command: Command::GetVectorDiagnostic,
14298 admissible_errors: &[
14299 ErrorCode::Aborted,
14300 ErrorCode::DeadlineExceeded,
14301 ErrorCode::InvalidRequest,
14302 ErrorCode::UnsupportedVersion,
14303 ErrorCode::Unauthenticated,
14304 ErrorCode::PermissionDenied,
14305 ErrorCode::NotFound,
14306 ErrorCode::LimitExceeded,
14307 ErrorCode::CapabilityUnavailable,
14308 ErrorCode::TemporarilyUnavailable,
14309 ErrorCode::Internal,
14310 ],
14311 limit_ids: &["request_bytes", "response_bytes"],
14312 effect_class: "read_only",
14313 risk_flags: &[],
14314 capability_family: "diagnostics",
14315 retry_safety: "safe",
14316 identity_requirement: "request_locator",
14317 resolver: None,
14318 cancellation: "per_call",
14319 side_effects: &[],
14320 recovery: "retry",
14321 collection_index_ref: "none",
14322 },
14323 CommandSemanticContract {
14324 command: Command::CreateDiagnostic,
14325 admissible_errors: &[
14326 ErrorCode::Aborted,
14327 ErrorCode::DeadlineExceeded,
14328 ErrorCode::InvalidRequest,
14329 ErrorCode::UnsupportedVersion,
14330 ErrorCode::Unauthenticated,
14331 ErrorCode::PermissionDenied,
14332 ErrorCode::NotFound,
14333 ErrorCode::Conflict,
14334 ErrorCode::LimitExceeded,
14335 ErrorCode::CapabilityUnavailable,
14336 ErrorCode::NotSubmitted,
14337 ErrorCode::SubmittedIndeterminate,
14338 ErrorCode::ExpiredUnknown,
14339 ErrorCode::TemporarilyUnavailable,
14340 ErrorCode::Internal,
14341 ],
14342 limit_ids: &["request_bytes", "response_bytes"],
14343 effect_class: "durable_submit",
14344 risk_flags: &[],
14345 capability_family: "diagnostics",
14346 retry_safety: "pre_submit_only",
14347 identity_requirement: "none",
14348 resolver: None,
14349 cancellation: "per_call_until_submission_then_resolve",
14350 side_effects: &["commits_authoritative_state"],
14351 recovery: "retry_if_not_submitted",
14352 collection_index_ref: "none",
14353 },
14354 CommandSemanticContract {
14355 command: Command::GetDiagnostic,
14356 admissible_errors: &[
14357 ErrorCode::Aborted,
14358 ErrorCode::DeadlineExceeded,
14359 ErrorCode::InvalidRequest,
14360 ErrorCode::UnsupportedVersion,
14361 ErrorCode::Unauthenticated,
14362 ErrorCode::PermissionDenied,
14363 ErrorCode::NotFound,
14364 ErrorCode::LimitExceeded,
14365 ErrorCode::CapabilityUnavailable,
14366 ErrorCode::TemporarilyUnavailable,
14367 ErrorCode::Internal,
14368 ],
14369 limit_ids: &["request_bytes", "response_bytes"],
14370 effect_class: "read_only",
14371 risk_flags: &[],
14372 capability_family: "diagnostics",
14373 retry_safety: "safe",
14374 identity_requirement: "request_locator",
14375 resolver: None,
14376 cancellation: "per_call",
14377 side_effects: &[],
14378 recovery: "retry",
14379 collection_index_ref: "none",
14380 },
14381 CommandSemanticContract {
14382 command: Command::PrepareCollectionExport,
14383 admissible_errors: &[
14384 ErrorCode::Aborted,
14385 ErrorCode::DeadlineExceeded,
14386 ErrorCode::InvalidRequest,
14387 ErrorCode::UnsupportedVersion,
14388 ErrorCode::Unauthenticated,
14389 ErrorCode::PermissionDenied,
14390 ErrorCode::NotFound,
14391 ErrorCode::LimitExceeded,
14392 ErrorCode::CapabilityUnavailable,
14393 ErrorCode::TemporarilyUnavailable,
14394 ErrorCode::Internal,
14395 ],
14396 limit_ids: &[
14397 "request_bytes",
14398 "response_bytes",
14399 "collection_export_bytes",
14400 "portability_prefix_bytes",
14401 ],
14402 effect_class: "prepare",
14403 risk_flags: &[],
14404 capability_family: "portability",
14405 retry_safety: "safe",
14406 identity_requirement: "caller_action_id",
14407 resolver: None,
14408 cancellation: "per_call",
14409 side_effects: &[],
14410 recovery: "retry",
14411 collection_index_ref: "none",
14412 },
14413 CommandSemanticContract {
14414 command: Command::StartCollectionExport,
14415 admissible_errors: &[
14416 ErrorCode::Aborted,
14417 ErrorCode::DeadlineExceeded,
14418 ErrorCode::InvalidRequest,
14419 ErrorCode::UnsupportedVersion,
14420 ErrorCode::Unauthenticated,
14421 ErrorCode::PermissionDenied,
14422 ErrorCode::NotFound,
14423 ErrorCode::Conflict,
14424 ErrorCode::LimitExceeded,
14425 ErrorCode::CapabilityUnavailable,
14426 ErrorCode::NotSubmitted,
14427 ErrorCode::SubmittedIndeterminate,
14428 ErrorCode::ExpiredUnknown,
14429 ErrorCode::TemporarilyUnavailable,
14430 ErrorCode::Internal,
14431 ],
14432 limit_ids: &[
14433 "request_bytes",
14434 "response_bytes",
14435 "collection_export_bytes",
14436 "collection_export_documents",
14437 "portability_prefix_bytes",
14438 ],
14439 effect_class: "durable_submit",
14440 risk_flags: &[],
14441 capability_family: "portability",
14442 retry_safety: "pre_submit_only",
14443 identity_requirement: "caller_action_id",
14444 resolver: Some(Command::ResolveCollectionExport),
14445 cancellation: "per_call_until_submission_then_resolve",
14446 side_effects: &["commits_authoritative_state", "writes_external_artifact"],
14447 recovery: "resolve_with_resolve_collection_export",
14448 collection_index_ref: "none",
14449 },
14450 CommandSemanticContract {
14451 command: Command::ResolveCollectionExport,
14452 admissible_errors: &[
14453 ErrorCode::Aborted,
14454 ErrorCode::DeadlineExceeded,
14455 ErrorCode::InvalidRequest,
14456 ErrorCode::UnsupportedVersion,
14457 ErrorCode::Unauthenticated,
14458 ErrorCode::PermissionDenied,
14459 ErrorCode::NotFound,
14460 ErrorCode::LimitExceeded,
14461 ErrorCode::CapabilityUnavailable,
14462 ErrorCode::TemporarilyUnavailable,
14463 ErrorCode::Internal,
14464 ],
14465 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
14466 effect_class: "read_only",
14467 risk_flags: &[],
14468 capability_family: "portability",
14469 retry_safety: "safe",
14470 identity_requirement: "caller_action_id",
14471 resolver: None,
14472 cancellation: "per_call",
14473 side_effects: &[],
14474 recovery: "retry",
14475 collection_index_ref: "none",
14476 },
14477 CommandSemanticContract {
14478 command: Command::VerifyCollectionExport,
14479 admissible_errors: &[
14480 ErrorCode::Aborted,
14481 ErrorCode::DeadlineExceeded,
14482 ErrorCode::InvalidRequest,
14483 ErrorCode::UnsupportedVersion,
14484 ErrorCode::Unauthenticated,
14485 ErrorCode::PermissionDenied,
14486 ErrorCode::NotFound,
14487 ErrorCode::LimitExceeded,
14488 ErrorCode::CapabilityUnavailable,
14489 ErrorCode::ChecksumMismatch,
14490 ErrorCode::TemporarilyUnavailable,
14491 ErrorCode::Internal,
14492 ],
14493 limit_ids: &[
14494 "request_bytes",
14495 "response_bytes",
14496 "collection_export_bytes",
14497 "portability_prefix_bytes",
14498 ],
14499 effect_class: "read_only",
14500 risk_flags: &[],
14501 capability_family: "portability",
14502 retry_safety: "safe",
14503 identity_requirement: "request_locator",
14504 resolver: None,
14505 cancellation: "per_call",
14506 side_effects: &[],
14507 recovery: "retry",
14508 collection_index_ref: "none",
14509 },
14510 CommandSemanticContract {
14511 command: Command::PrepareCollectionRestore,
14512 admissible_errors: &[
14513 ErrorCode::Aborted,
14514 ErrorCode::DeadlineExceeded,
14515 ErrorCode::InvalidRequest,
14516 ErrorCode::UnsupportedVersion,
14517 ErrorCode::Unauthenticated,
14518 ErrorCode::PermissionDenied,
14519 ErrorCode::NotFound,
14520 ErrorCode::Conflict,
14521 ErrorCode::LimitExceeded,
14522 ErrorCode::CapabilityUnavailable,
14523 ErrorCode::ChecksumMismatch,
14524 ErrorCode::TemporarilyUnavailable,
14525 ErrorCode::Internal,
14526 ],
14527 limit_ids: &[
14528 "request_bytes",
14529 "response_bytes",
14530 "collection_export_bytes",
14531 "portability_prefix_bytes",
14532 ],
14533 effect_class: "prepare",
14534 risk_flags: &[],
14535 capability_family: "portability",
14536 retry_safety: "safe",
14537 identity_requirement: "caller_action_id",
14538 resolver: None,
14539 cancellation: "per_call",
14540 side_effects: &[],
14541 recovery: "retry",
14542 collection_index_ref: "none",
14543 },
14544 CommandSemanticContract {
14545 command: Command::StartCollectionRestore,
14546 admissible_errors: &[
14547 ErrorCode::Aborted,
14548 ErrorCode::DeadlineExceeded,
14549 ErrorCode::InvalidRequest,
14550 ErrorCode::UnsupportedVersion,
14551 ErrorCode::Unauthenticated,
14552 ErrorCode::PermissionDenied,
14553 ErrorCode::NotFound,
14554 ErrorCode::Conflict,
14555 ErrorCode::LimitExceeded,
14556 ErrorCode::CapabilityUnavailable,
14557 ErrorCode::NotSubmitted,
14558 ErrorCode::SubmittedIndeterminate,
14559 ErrorCode::ExpiredUnknown,
14560 ErrorCode::ChecksumMismatch,
14561 ErrorCode::TemporarilyUnavailable,
14562 ErrorCode::Internal,
14563 ],
14564 limit_ids: &[
14565 "request_bytes",
14566 "response_bytes",
14567 "collection_export_bytes",
14568 "collection_export_documents",
14569 "portability_prefix_bytes",
14570 ],
14571 effect_class: "durable_submit",
14572 risk_flags: &[],
14573 capability_family: "portability",
14574 retry_safety: "pre_submit_only",
14575 identity_requirement: "caller_action_id",
14576 resolver: Some(Command::ResolveCollectionRestore),
14577 cancellation: "per_call_until_submission_then_resolve",
14578 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
14579 recovery: "resolve_with_resolve_collection_restore",
14580 collection_index_ref: "none",
14581 },
14582 CommandSemanticContract {
14583 command: Command::ResolveCollectionRestore,
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::LimitExceeded,
14593 ErrorCode::CapabilityUnavailable,
14594 ErrorCode::TemporarilyUnavailable,
14595 ErrorCode::Internal,
14596 ],
14597 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
14598 effect_class: "read_only",
14599 risk_flags: &[],
14600 capability_family: "portability",
14601 retry_safety: "safe",
14602 identity_requirement: "caller_action_id",
14603 resolver: None,
14604 cancellation: "per_call",
14605 side_effects: &[],
14606 recovery: "retry",
14607 collection_index_ref: "none",
14608 },
14609 CommandSemanticContract {
14610 command: Command::PrepareIndexExport,
14611 admissible_errors: &[
14612 ErrorCode::Aborted,
14613 ErrorCode::DeadlineExceeded,
14614 ErrorCode::InvalidRequest,
14615 ErrorCode::UnsupportedVersion,
14616 ErrorCode::Unauthenticated,
14617 ErrorCode::PermissionDenied,
14618 ErrorCode::NotFound,
14619 ErrorCode::LimitExceeded,
14620 ErrorCode::CapabilityUnavailable,
14621 ErrorCode::TemporarilyUnavailable,
14622 ErrorCode::Internal,
14623 ],
14624 limit_ids: &[
14625 "request_bytes",
14626 "response_bytes",
14627 "index_transfer_bytes",
14628 "index_transfer_records",
14629 "index_transfer_pages",
14630 "portability_prefix_bytes",
14631 ],
14632 effect_class: "prepare",
14633 risk_flags: &[],
14634 capability_family: "portability",
14635 retry_safety: "safe",
14636 identity_requirement: "caller_action_id",
14637 resolver: None,
14638 cancellation: "per_call",
14639 side_effects: &[],
14640 recovery: "retry",
14641 collection_index_ref: "request_index",
14642 },
14643 CommandSemanticContract {
14644 command: Command::StartIndexExport,
14645 admissible_errors: &[
14646 ErrorCode::Aborted,
14647 ErrorCode::DeadlineExceeded,
14648 ErrorCode::InvalidRequest,
14649 ErrorCode::UnsupportedVersion,
14650 ErrorCode::Unauthenticated,
14651 ErrorCode::PermissionDenied,
14652 ErrorCode::NotFound,
14653 ErrorCode::Conflict,
14654 ErrorCode::LimitExceeded,
14655 ErrorCode::CapabilityUnavailable,
14656 ErrorCode::NotSubmitted,
14657 ErrorCode::SubmittedIndeterminate,
14658 ErrorCode::ExpiredUnknown,
14659 ErrorCode::TemporarilyUnavailable,
14660 ErrorCode::Internal,
14661 ],
14662 limit_ids: &[
14663 "request_bytes",
14664 "response_bytes",
14665 "index_transfer_bytes",
14666 "index_transfer_records",
14667 "index_transfer_pages",
14668 "portability_prefix_bytes",
14669 ],
14670 effect_class: "durable_submit",
14671 risk_flags: &[],
14672 capability_family: "portability",
14673 retry_safety: "pre_submit_only",
14674 identity_requirement: "caller_action_id",
14675 resolver: Some(Command::ResolveIndexExport),
14676 cancellation: "per_call_until_submission_then_resolve",
14677 side_effects: &["commits_authoritative_state", "writes_external_artifact"],
14678 recovery: "resolve_with_resolve_index_export",
14679 collection_index_ref: "request_index",
14680 },
14681 CommandSemanticContract {
14682 command: Command::ResolveIndexExport,
14683 admissible_errors: &[
14684 ErrorCode::Aborted,
14685 ErrorCode::DeadlineExceeded,
14686 ErrorCode::InvalidRequest,
14687 ErrorCode::UnsupportedVersion,
14688 ErrorCode::Unauthenticated,
14689 ErrorCode::PermissionDenied,
14690 ErrorCode::NotFound,
14691 ErrorCode::LimitExceeded,
14692 ErrorCode::CapabilityUnavailable,
14693 ErrorCode::ChecksumMismatch,
14694 ErrorCode::TemporarilyUnavailable,
14695 ErrorCode::Internal,
14696 ],
14697 limit_ids: &[
14698 "request_bytes",
14699 "response_bytes",
14700 "index_transfer_bytes",
14701 "index_transfer_pages",
14702 "portability_prefix_bytes",
14703 ],
14704 effect_class: "read_only",
14705 risk_flags: &[],
14706 capability_family: "portability",
14707 retry_safety: "safe",
14708 identity_requirement: "caller_action_id",
14709 resolver: None,
14710 cancellation: "per_call",
14711 side_effects: &[],
14712 recovery: "retry",
14713 collection_index_ref: "request_index",
14714 },
14715 CommandSemanticContract {
14716 command: Command::VerifyIndexExport,
14717 admissible_errors: &[
14718 ErrorCode::Aborted,
14719 ErrorCode::DeadlineExceeded,
14720 ErrorCode::InvalidRequest,
14721 ErrorCode::UnsupportedVersion,
14722 ErrorCode::Unauthenticated,
14723 ErrorCode::PermissionDenied,
14724 ErrorCode::NotFound,
14725 ErrorCode::LimitExceeded,
14726 ErrorCode::CapabilityUnavailable,
14727 ErrorCode::ChecksumMismatch,
14728 ErrorCode::TemporarilyUnavailable,
14729 ErrorCode::Internal,
14730 ],
14731 limit_ids: &[
14732 "request_bytes",
14733 "response_bytes",
14734 "index_transfer_bytes",
14735 "index_transfer_pages",
14736 "portability_prefix_bytes",
14737 ],
14738 effect_class: "read_only",
14739 risk_flags: &[],
14740 capability_family: "portability",
14741 retry_safety: "safe",
14742 identity_requirement: "request_locator",
14743 resolver: None,
14744 cancellation: "per_call",
14745 side_effects: &[],
14746 recovery: "retry",
14747 collection_index_ref: "request_artifact_source_index",
14748 },
14749 CommandSemanticContract {
14750 command: Command::PrepareIndexImport,
14751 admissible_errors: &[
14752 ErrorCode::Aborted,
14753 ErrorCode::DeadlineExceeded,
14754 ErrorCode::InvalidRequest,
14755 ErrorCode::UnsupportedVersion,
14756 ErrorCode::Unauthenticated,
14757 ErrorCode::PermissionDenied,
14758 ErrorCode::NotFound,
14759 ErrorCode::Conflict,
14760 ErrorCode::LimitExceeded,
14761 ErrorCode::CapabilityUnavailable,
14762 ErrorCode::ChecksumMismatch,
14763 ErrorCode::TemporarilyUnavailable,
14764 ErrorCode::Internal,
14765 ],
14766 limit_ids: &[
14767 "request_bytes",
14768 "response_bytes",
14769 "index_transfer_bytes",
14770 "index_transfer_pages",
14771 "portability_prefix_bytes",
14772 "resource_initial_shards",
14773 "resource_target_shard_bytes",
14774 "resource_admission_weight",
14775 "resource_ram_bytes",
14776 "resource_nvme_bytes",
14777 "resource_refresh_millis",
14778 "resource_memtable_bytes",
14779 "resource_parallelism",
14780 ],
14781 effect_class: "prepare",
14782 risk_flags: &[],
14783 capability_family: "portability",
14784 retry_safety: "safe",
14785 identity_requirement: "caller_action_id",
14786 resolver: None,
14787 cancellation: "per_call",
14788 side_effects: &[],
14789 recovery: "retry",
14790 collection_index_ref: "request_destination_name",
14791 },
14792 CommandSemanticContract {
14793 command: Command::StartIndexImport,
14794 admissible_errors: &[
14795 ErrorCode::Aborted,
14796 ErrorCode::DeadlineExceeded,
14797 ErrorCode::InvalidRequest,
14798 ErrorCode::UnsupportedVersion,
14799 ErrorCode::Unauthenticated,
14800 ErrorCode::PermissionDenied,
14801 ErrorCode::NotFound,
14802 ErrorCode::Conflict,
14803 ErrorCode::LimitExceeded,
14804 ErrorCode::CapabilityUnavailable,
14805 ErrorCode::NotSubmitted,
14806 ErrorCode::SubmittedIndeterminate,
14807 ErrorCode::ExpiredUnknown,
14808 ErrorCode::ChecksumMismatch,
14809 ErrorCode::TemporarilyUnavailable,
14810 ErrorCode::Internal,
14811 ],
14812 limit_ids: &[
14813 "request_bytes",
14814 "response_bytes",
14815 "index_transfer_bytes",
14816 "index_transfer_pages",
14817 "portability_prefix_bytes",
14818 "resource_initial_shards",
14819 "resource_target_shard_bytes",
14820 "resource_admission_weight",
14821 "resource_ram_bytes",
14822 "resource_nvme_bytes",
14823 "resource_refresh_millis",
14824 "resource_memtable_bytes",
14825 "resource_parallelism",
14826 ],
14827 effect_class: "durable_submit",
14828 risk_flags: &[],
14829 capability_family: "portability",
14830 retry_safety: "pre_submit_only",
14831 identity_requirement: "caller_action_id",
14832 resolver: Some(Command::ResolveIndexImport),
14833 cancellation: "per_call_until_submission_then_resolve",
14834 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
14835 recovery: "resolve_with_resolve_index_import",
14836 collection_index_ref: "request_destination_name",
14837 },
14838 CommandSemanticContract {
14839 command: Command::ResolveIndexImport,
14840 admissible_errors: &[
14841 ErrorCode::Aborted,
14842 ErrorCode::DeadlineExceeded,
14843 ErrorCode::InvalidRequest,
14844 ErrorCode::UnsupportedVersion,
14845 ErrorCode::Unauthenticated,
14846 ErrorCode::PermissionDenied,
14847 ErrorCode::NotFound,
14848 ErrorCode::LimitExceeded,
14849 ErrorCode::CapabilityUnavailable,
14850 ErrorCode::ChecksumMismatch,
14851 ErrorCode::TemporarilyUnavailable,
14852 ErrorCode::Internal,
14853 ],
14854 limit_ids: &[
14855 "request_bytes",
14856 "response_bytes",
14857 "index_transfer_bytes",
14858 "index_transfer_pages",
14859 "portability_prefix_bytes",
14860 ],
14861 effect_class: "read_only",
14862 risk_flags: &[],
14863 capability_family: "portability",
14864 retry_safety: "safe",
14865 identity_requirement: "caller_action_id",
14866 resolver: None,
14867 cancellation: "per_call",
14868 side_effects: &[],
14869 recovery: "retry",
14870 collection_index_ref: "request_destination_name",
14871 },
14872 CommandSemanticContract {
14873 command: Command::ReadArtifactChunk,
14874 admissible_errors: &[
14875 ErrorCode::Aborted,
14876 ErrorCode::DeadlineExceeded,
14877 ErrorCode::InvalidRequest,
14878 ErrorCode::UnsupportedVersion,
14879 ErrorCode::Unauthenticated,
14880 ErrorCode::PermissionDenied,
14881 ErrorCode::NotFound,
14882 ErrorCode::LimitExceeded,
14883 ErrorCode::CapabilityUnavailable,
14884 ErrorCode::ArtifactRangeInvalid,
14885 ErrorCode::ChecksumMismatch,
14886 ErrorCode::TemporarilyUnavailable,
14887 ErrorCode::Internal,
14888 ],
14889 limit_ids: &["request_bytes", "response_bytes", "artifact_chunk_bytes"],
14890 effect_class: "read_only",
14891 risk_flags: &[],
14892 capability_family: "operations",
14893 retry_safety: "safe",
14894 identity_requirement: "none",
14895 resolver: None,
14896 cancellation: "per_call",
14897 side_effects: &[],
14898 recovery: "retry",
14899 collection_index_ref: "none",
14900 },
14901 CommandSemanticContract {
14902 command: Command::ExportUsage,
14903 admissible_errors: &[
14904 ErrorCode::Aborted,
14905 ErrorCode::DeadlineExceeded,
14906 ErrorCode::InvalidRequest,
14907 ErrorCode::UnsupportedVersion,
14908 ErrorCode::Unauthenticated,
14909 ErrorCode::PermissionDenied,
14910 ErrorCode::NotFound,
14911 ErrorCode::StaleCursor,
14912 ErrorCode::RestartBudgetExhausted,
14913 ErrorCode::LimitExceeded,
14914 ErrorCode::CapabilityUnavailable,
14915 ErrorCode::TemporarilyUnavailable,
14916 ErrorCode::Internal,
14917 ],
14918 limit_ids: &["request_bytes", "response_bytes", "page_size"],
14919 effect_class: "read_only",
14920 risk_flags: &[],
14921 capability_family: "usage",
14922 retry_safety: "safe",
14923 identity_requirement: "none",
14924 resolver: None,
14925 cancellation: "per_call",
14926 side_effects: &[],
14927 recovery: "retry",
14928 collection_index_ref: "none",
14929 },
14930 CommandSemanticContract {
14931 command: Command::ExecuteStateRead,
14932 admissible_errors: &[
14933 ErrorCode::Aborted,
14934 ErrorCode::DeadlineExceeded,
14935 ErrorCode::InvalidRequest,
14936 ErrorCode::UnsupportedVersion,
14937 ErrorCode::Unauthenticated,
14938 ErrorCode::PermissionDenied,
14939 ErrorCode::NotFound,
14940 ErrorCode::LimitExceeded,
14941 ErrorCode::CapabilityUnavailable,
14942 ErrorCode::TemporarilyUnavailable,
14943 ErrorCode::Internal,
14944 ],
14945 limit_ids: &[
14946 "request_bytes",
14947 "response_bytes",
14948 "state_command_keys",
14949 "state_command_value_bytes",
14950 ],
14951 effect_class: "read_only",
14952 risk_flags: &[],
14953 capability_family: "data",
14954 retry_safety: "safe",
14955 identity_requirement: "none",
14956 resolver: None,
14957 cancellation: "per_call",
14958 side_effects: &[],
14959 recovery: "retry",
14960 collection_index_ref: "request_index",
14961 },
14962 CommandSemanticContract {
14963 command: Command::PrepareStateWrite,
14964 admissible_errors: &[
14965 ErrorCode::Aborted,
14966 ErrorCode::DeadlineExceeded,
14967 ErrorCode::InvalidRequest,
14968 ErrorCode::UnsupportedVersion,
14969 ErrorCode::Unauthenticated,
14970 ErrorCode::PermissionDenied,
14971 ErrorCode::NotFound,
14972 ErrorCode::LimitExceeded,
14973 ErrorCode::CapabilityUnavailable,
14974 ErrorCode::TemporarilyUnavailable,
14975 ErrorCode::Internal,
14976 ],
14977 limit_ids: &[
14978 "request_bytes",
14979 "response_bytes",
14980 "state_command_keys",
14981 "state_command_value_bytes",
14982 ],
14983 effect_class: "prepare",
14984 risk_flags: &[],
14985 capability_family: "data",
14986 retry_safety: "safe",
14987 identity_requirement: "caller_action_id",
14988 resolver: None,
14989 cancellation: "per_call",
14990 side_effects: &["creates_bounded_preparation"],
14991 recovery: "retry",
14992 collection_index_ref: "request_index",
14993 },
14994 CommandSemanticContract {
14995 command: Command::SubmitStateWrite,
14996 admissible_errors: &[
14997 ErrorCode::Aborted,
14998 ErrorCode::DeadlineExceeded,
14999 ErrorCode::InvalidRequest,
15000 ErrorCode::UnsupportedVersion,
15001 ErrorCode::Unauthenticated,
15002 ErrorCode::PermissionDenied,
15003 ErrorCode::NotFound,
15004 ErrorCode::Conflict,
15005 ErrorCode::LimitExceeded,
15006 ErrorCode::CapabilityUnavailable,
15007 ErrorCode::NotSubmitted,
15008 ErrorCode::SubmittedIndeterminate,
15009 ErrorCode::ExpiredUnknown,
15010 ErrorCode::TemporarilyUnavailable,
15011 ErrorCode::Internal,
15012 ],
15013 limit_ids: &[
15014 "request_bytes",
15015 "response_bytes",
15016 "state_command_keys",
15017 "state_command_value_bytes",
15018 ],
15019 effect_class: "durable_submit",
15020 risk_flags: &[],
15021 capability_family: "data",
15022 retry_safety: "pre_submit_only",
15023 identity_requirement: "request_locator",
15024 resolver: Some(Command::ResolveStateWrite),
15025 cancellation: "per_call_until_submission_then_resolve",
15026 side_effects: &["commits_authoritative_state"],
15027 recovery: "resolve_with_resolve_state_write",
15028 collection_index_ref: "request_index",
15029 },
15030 CommandSemanticContract {
15031 command: Command::ResolveStateWrite,
15032 admissible_errors: &[
15033 ErrorCode::Aborted,
15034 ErrorCode::DeadlineExceeded,
15035 ErrorCode::InvalidRequest,
15036 ErrorCode::UnsupportedVersion,
15037 ErrorCode::Unauthenticated,
15038 ErrorCode::PermissionDenied,
15039 ErrorCode::NotFound,
15040 ErrorCode::LimitExceeded,
15041 ErrorCode::CapabilityUnavailable,
15042 ErrorCode::TemporarilyUnavailable,
15043 ErrorCode::Internal,
15044 ],
15045 limit_ids: &[
15046 "request_bytes",
15047 "response_bytes",
15048 "state_command_keys",
15049 "state_command_value_bytes",
15050 ],
15051 effect_class: "read_only",
15052 risk_flags: &[],
15053 capability_family: "data",
15054 retry_safety: "safe",
15055 identity_requirement: "request_locator",
15056 resolver: None,
15057 cancellation: "per_call",
15058 side_effects: &[],
15059 recovery: "retry",
15060 collection_index_ref: "request_index",
15061 },
15062];
15063#[derive(Clone, Copy, Debug, Eq, PartialEq)]
15064pub struct CommandOutcomeContract {
15065 pub command: Command,
15066 pub possible_submission_states: &'static [&'static str],
15067 pub identity_requirement: &'static str,
15068 pub resolver_command: Option<Command>,
15069 pub cancellation: &'static str,
15070}
15071pub const LODESTONE_API_COMMAND_OUTCOMES: &[CommandOutcomeContract] = &[
15072 CommandOutcomeContract {
15073 command: Command::Discover,
15074 possible_submission_states: &["not_submitted", "resolved"],
15075 identity_requirement: "none",
15076 resolver_command: None,
15077 cancellation: "per_call",
15078 },
15079 CommandOutcomeContract {
15080 command: Command::ListIndexes,
15081 possible_submission_states: &["not_submitted", "resolved"],
15082 identity_requirement: "none",
15083 resolver_command: None,
15084 cancellation: "per_call",
15085 },
15086 CommandOutcomeContract {
15087 command: Command::GetIndex,
15088 possible_submission_states: &["not_submitted", "resolved"],
15089 identity_requirement: "none",
15090 resolver_command: None,
15091 cancellation: "per_call",
15092 },
15093 CommandOutcomeContract {
15094 command: Command::ValidateIndexChange,
15095 possible_submission_states: &["not_submitted", "resolved"],
15096 identity_requirement: "none",
15097 resolver_command: None,
15098 cancellation: "per_call",
15099 },
15100 CommandOutcomeContract {
15101 command: Command::ApplyIndexChange,
15102 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15103 identity_requirement: "caller_action_id",
15104 resolver_command: None,
15105 cancellation: "per_call_until_submission_then_resolve",
15106 },
15107 CommandOutcomeContract {
15108 command: Command::ApplyAdministrationMutation,
15109 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15110 identity_requirement: "caller_action_id",
15111 resolver_command: None,
15112 cancellation: "per_call_until_submission_then_resolve",
15113 },
15114 CommandOutcomeContract {
15115 command: Command::ListAliases,
15116 possible_submission_states: &["not_submitted", "resolved"],
15117 identity_requirement: "none",
15118 resolver_command: None,
15119 cancellation: "per_call",
15120 },
15121 CommandOutcomeContract {
15122 command: Command::GetAlias,
15123 possible_submission_states: &["not_submitted", "resolved"],
15124 identity_requirement: "none",
15125 resolver_command: None,
15126 cancellation: "per_call",
15127 },
15128 CommandOutcomeContract {
15129 command: Command::ListDataStreams,
15130 possible_submission_states: &["not_submitted", "resolved"],
15131 identity_requirement: "none",
15132 resolver_command: None,
15133 cancellation: "per_call",
15134 },
15135 CommandOutcomeContract {
15136 command: Command::GetDataStream,
15137 possible_submission_states: &["not_submitted", "resolved"],
15138 identity_requirement: "none",
15139 resolver_command: None,
15140 cancellation: "per_call",
15141 },
15142 CommandOutcomeContract {
15143 command: Command::ListComponentTemplates,
15144 possible_submission_states: &["not_submitted", "resolved"],
15145 identity_requirement: "none",
15146 resolver_command: None,
15147 cancellation: "per_call",
15148 },
15149 CommandOutcomeContract {
15150 command: Command::GetComponentTemplate,
15151 possible_submission_states: &["not_submitted", "resolved"],
15152 identity_requirement: "none",
15153 resolver_command: None,
15154 cancellation: "per_call",
15155 },
15156 CommandOutcomeContract {
15157 command: Command::ListIndexTemplates,
15158 possible_submission_states: &["not_submitted", "resolved"],
15159 identity_requirement: "none",
15160 resolver_command: None,
15161 cancellation: "per_call",
15162 },
15163 CommandOutcomeContract {
15164 command: Command::GetIndexTemplate,
15165 possible_submission_states: &["not_submitted", "resolved"],
15166 identity_requirement: "none",
15167 resolver_command: None,
15168 cancellation: "per_call",
15169 },
15170 CommandOutcomeContract {
15171 command: Command::ListIngestPipelines,
15172 possible_submission_states: &["not_submitted", "resolved"],
15173 identity_requirement: "none",
15174 resolver_command: None,
15175 cancellation: "per_call",
15176 },
15177 CommandOutcomeContract {
15178 command: Command::GetIngestPipeline,
15179 possible_submission_states: &["not_submitted", "resolved"],
15180 identity_requirement: "none",
15181 resolver_command: None,
15182 cancellation: "per_call",
15183 },
15184 CommandOutcomeContract {
15185 command: Command::SimulateIngestPipeline,
15186 possible_submission_states: &["not_submitted", "resolved"],
15187 identity_requirement: "none",
15188 resolver_command: None,
15189 cancellation: "per_call",
15190 },
15191 CommandOutcomeContract {
15192 command: Command::ReprocessByQuery,
15193 possible_submission_states: &[
15194 "not_submitted",
15195 "submitted",
15196 "known_retired",
15197 "indeterminate",
15198 "resolved",
15199 ],
15200 identity_requirement: "caller_action_id",
15201 resolver_command: None,
15202 cancellation: "per_call_until_submission_then_resolve",
15203 },
15204 CommandOutcomeContract {
15205 command: Command::ListLifecyclePolicies,
15206 possible_submission_states: &["not_submitted", "resolved"],
15207 identity_requirement: "none",
15208 resolver_command: None,
15209 cancellation: "per_call",
15210 },
15211 CommandOutcomeContract {
15212 command: Command::GetLifecyclePolicy,
15213 possible_submission_states: &["not_submitted", "resolved"],
15214 identity_requirement: "none",
15215 resolver_command: None,
15216 cancellation: "per_call",
15217 },
15218 CommandOutcomeContract {
15219 command: Command::PrepareCreateIndex,
15220 possible_submission_states: &["not_submitted", "resolved"],
15221 identity_requirement: "server_locator",
15222 resolver_command: None,
15223 cancellation: "per_call",
15224 },
15225 CommandOutcomeContract {
15226 command: Command::PrepareDeleteIndex,
15227 possible_submission_states: &["not_submitted", "resolved"],
15228 identity_requirement: "server_locator",
15229 resolver_command: None,
15230 cancellation: "per_call",
15231 },
15232 CommandOutcomeContract {
15233 command: Command::SubmitCatalogAction,
15234 possible_submission_states: &[
15235 "not_submitted",
15236 "submitted",
15237 "known_retired",
15238 "indeterminate",
15239 "resolved",
15240 ],
15241 identity_requirement: "request_locator",
15242 resolver_command: Some(Command::ResolveCatalogAction),
15243 cancellation: "per_call_until_submission_then_resolve",
15244 },
15245 CommandOutcomeContract {
15246 command: Command::ResolveCatalogAction,
15247 possible_submission_states: &["not_submitted", "resolved"],
15248 identity_requirement: "request_locator",
15249 resolver_command: None,
15250 cancellation: "per_call",
15251 },
15252 CommandOutcomeContract {
15253 command: Command::PrepareReplayableSourceIndex,
15254 possible_submission_states: &["not_submitted", "resolved"],
15255 identity_requirement: "server_locator",
15256 resolver_command: None,
15257 cancellation: "per_call",
15258 },
15259 CommandOutcomeContract {
15260 command: Command::SubmitReplayableSourceIndex,
15261 possible_submission_states: &[
15262 "not_submitted",
15263 "submitted",
15264 "known_retired",
15265 "indeterminate",
15266 "resolved",
15267 ],
15268 identity_requirement: "request_locator",
15269 resolver_command: Some(Command::ResolveCatalogAction),
15270 cancellation: "per_call_until_submission_then_resolve",
15271 },
15272 CommandOutcomeContract {
15273 command: Command::GetReplayableSource,
15274 possible_submission_states: &["not_submitted", "resolved"],
15275 identity_requirement: "none",
15276 resolver_command: None,
15277 cancellation: "per_call",
15278 },
15279 CommandOutcomeContract {
15280 command: Command::ControlReplayableSource,
15281 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15282 identity_requirement: "none",
15283 resolver_command: None,
15284 cancellation: "per_call_until_submission_then_resolve",
15285 },
15286 CommandOutcomeContract {
15287 command: Command::CloneIndex,
15288 possible_submission_states: &[
15289 "not_submitted",
15290 "submitted",
15291 "known_retired",
15292 "indeterminate",
15293 "resolved",
15294 ],
15295 identity_requirement: "caller_action_id",
15296 resolver_command: Some(Command::CloneIndex),
15297 cancellation: "per_call_until_submission_then_resolve",
15298 },
15299 CommandOutcomeContract {
15300 command: Command::ConfigureHistory,
15301 possible_submission_states: &[
15302 "not_submitted",
15303 "submitted",
15304 "known_retired",
15305 "indeterminate",
15306 "resolved",
15307 ],
15308 identity_requirement: "none",
15309 resolver_command: Some(Command::GetHistory),
15310 cancellation: "per_call_until_submission_then_resolve",
15311 },
15312 CommandOutcomeContract {
15313 command: Command::GetHistory,
15314 possible_submission_states: &["not_submitted", "resolved"],
15315 identity_requirement: "none",
15316 resolver_command: None,
15317 cancellation: "per_call",
15318 },
15319 CommandOutcomeContract {
15320 command: Command::ResolveHistory,
15321 possible_submission_states: &["not_submitted", "resolved"],
15322 identity_requirement: "none",
15323 resolver_command: None,
15324 cancellation: "per_call",
15325 },
15326 CommandOutcomeContract {
15327 command: Command::PlaceHistoryHold,
15328 possible_submission_states: &[
15329 "not_submitted",
15330 "submitted",
15331 "known_retired",
15332 "indeterminate",
15333 "resolved",
15334 ],
15335 identity_requirement: "none",
15336 resolver_command: Some(Command::GetHistory),
15337 cancellation: "per_call_until_submission_then_resolve",
15338 },
15339 CommandOutcomeContract {
15340 command: Command::ReleaseHistoryHold,
15341 possible_submission_states: &[
15342 "not_submitted",
15343 "submitted",
15344 "known_retired",
15345 "indeterminate",
15346 "resolved",
15347 ],
15348 identity_requirement: "none",
15349 resolver_command: Some(Command::GetHistory),
15350 cancellation: "per_call_until_submission_then_resolve",
15351 },
15352 CommandOutcomeContract {
15353 command: Command::PrepareDocumentMutation,
15354 possible_submission_states: &["not_submitted", "resolved"],
15355 identity_requirement: "server_locator",
15356 resolver_command: None,
15357 cancellation: "per_call",
15358 },
15359 CommandOutcomeContract {
15360 command: Command::SubmitDocumentMutation,
15361 possible_submission_states: &[
15362 "not_submitted",
15363 "submitted",
15364 "known_retired",
15365 "indeterminate",
15366 "resolved",
15367 ],
15368 identity_requirement: "request_locator",
15369 resolver_command: Some(Command::ResolveDocumentMutation),
15370 cancellation: "per_call_until_submission_then_resolve",
15371 },
15372 CommandOutcomeContract {
15373 command: Command::PrepareDocumentBulk,
15374 possible_submission_states: &["not_submitted", "resolved"],
15375 identity_requirement: "caller_action_id",
15376 resolver_command: None,
15377 cancellation: "per_call",
15378 },
15379 CommandOutcomeContract {
15380 command: Command::SubmitDocumentBulk,
15381 possible_submission_states: &[
15382 "not_submitted",
15383 "submitted",
15384 "known_retired",
15385 "indeterminate",
15386 "resolved",
15387 ],
15388 identity_requirement: "caller_action_id",
15389 resolver_command: Some(Command::ResolveDocumentBulk),
15390 cancellation: "per_call_until_submission_then_resolve",
15391 },
15392 CommandOutcomeContract {
15393 command: Command::ResolveDocumentBulk,
15394 possible_submission_states: &["not_submitted", "resolved"],
15395 identity_requirement: "caller_action_id",
15396 resolver_command: None,
15397 cancellation: "per_call",
15398 },
15399 CommandOutcomeContract {
15400 command: Command::PrepareAppendBulk,
15401 possible_submission_states: &["not_submitted", "resolved"],
15402 identity_requirement: "caller_action_id",
15403 resolver_command: None,
15404 cancellation: "per_call",
15405 },
15406 CommandOutcomeContract {
15407 command: Command::SubmitAppendBulk,
15408 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15409 identity_requirement: "request_locator",
15410 resolver_command: Some(Command::ResolveAppendBulk),
15411 cancellation: "per_call_until_submission_then_resolve",
15412 },
15413 CommandOutcomeContract {
15414 command: Command::ResolveAppendBulk,
15415 possible_submission_states: &["not_submitted", "resolved"],
15416 identity_requirement: "request_locator",
15417 resolver_command: None,
15418 cancellation: "per_call",
15419 },
15420 CommandOutcomeContract {
15421 command: Command::ObserveAppendCommitted,
15422 possible_submission_states: &["not_submitted", "resolved"],
15423 identity_requirement: "request_locator",
15424 resolver_command: None,
15425 cancellation: "per_call",
15426 },
15427 CommandOutcomeContract {
15428 command: Command::ResolveDocumentMutation,
15429 possible_submission_states: &["not_submitted", "resolved"],
15430 identity_requirement: "request_locator",
15431 resolver_command: None,
15432 cancellation: "per_call",
15433 },
15434 CommandOutcomeContract {
15435 command: Command::GetDocument,
15436 possible_submission_states: &["not_submitted", "resolved"],
15437 identity_requirement: "none",
15438 resolver_command: None,
15439 cancellation: "per_call",
15440 },
15441 CommandOutcomeContract {
15442 command: Command::Search,
15443 possible_submission_states: &["not_submitted", "resolved"],
15444 identity_requirement: "none",
15445 resolver_command: None,
15446 cancellation: "per_call",
15447 },
15448 CommandOutcomeContract {
15449 command: Command::TraverseRelationships,
15450 possible_submission_states: &["not_submitted", "resolved"],
15451 identity_requirement: "none",
15452 resolver_command: None,
15453 cancellation: "per_call",
15454 },
15455 CommandOutcomeContract {
15456 command: Command::QueryProfiles,
15457 possible_submission_states: &["not_submitted", "resolved"],
15458 identity_requirement: "none",
15459 resolver_command: None,
15460 cancellation: "per_call",
15461 },
15462 CommandOutcomeContract {
15463 command: Command::EvaluateTemporalEvidence,
15464 possible_submission_states: &["not_submitted", "resolved"],
15465 identity_requirement: "none",
15466 resolver_command: None,
15467 cancellation: "per_call",
15468 },
15469 CommandOutcomeContract {
15470 command: Command::CreateContinuousTemporalEvaluation,
15471 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15472 identity_requirement: "caller_action_id",
15473 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15474 cancellation: "per_call_until_submission_then_resolve",
15475 },
15476 CommandOutcomeContract {
15477 command: Command::GetContinuousTemporalEvaluation,
15478 possible_submission_states: &["not_submitted", "resolved"],
15479 identity_requirement: "none",
15480 resolver_command: None,
15481 cancellation: "per_call",
15482 },
15483 CommandOutcomeContract {
15484 command: Command::PauseContinuousTemporalEvaluation,
15485 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15486 identity_requirement: "caller_action_id",
15487 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15488 cancellation: "per_call_until_submission_then_resolve",
15489 },
15490 CommandOutcomeContract {
15491 command: Command::ResumeContinuousTemporalEvaluation,
15492 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15493 identity_requirement: "caller_action_id",
15494 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15495 cancellation: "per_call_until_submission_then_resolve",
15496 },
15497 CommandOutcomeContract {
15498 command: Command::ReplaceContinuousTemporalEvaluation,
15499 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15500 identity_requirement: "caller_action_id",
15501 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15502 cancellation: "per_call_until_submission_then_resolve",
15503 },
15504 CommandOutcomeContract {
15505 command: Command::RetireContinuousTemporalEvaluation,
15506 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15507 identity_requirement: "caller_action_id",
15508 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15509 cancellation: "per_call_until_submission_then_resolve",
15510 },
15511 CommandOutcomeContract {
15512 command: Command::ReadContinuousTemporalEvidence,
15513 possible_submission_states: &["not_submitted", "resolved"],
15514 identity_requirement: "none",
15515 resolver_command: None,
15516 cancellation: "per_call",
15517 },
15518 CommandOutcomeContract {
15519 command: Command::ValidateSearch,
15520 possible_submission_states: &["not_submitted", "resolved"],
15521 identity_requirement: "none",
15522 resolver_command: None,
15523 cancellation: "per_call",
15524 },
15525 CommandOutcomeContract {
15526 command: Command::OpenPit,
15527 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15528 identity_requirement: "none",
15529 resolver_command: None,
15530 cancellation: "per_call_until_submission_then_resolve",
15531 },
15532 CommandOutcomeContract {
15533 command: Command::RenewPit,
15534 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15535 identity_requirement: "none",
15536 resolver_command: None,
15537 cancellation: "per_call_until_submission_then_resolve",
15538 },
15539 CommandOutcomeContract {
15540 command: Command::ClosePit,
15541 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15542 identity_requirement: "none",
15543 resolver_command: None,
15544 cancellation: "per_call_until_submission_then_resolve",
15545 },
15546 CommandOutcomeContract {
15547 command: Command::ListOperations,
15548 possible_submission_states: &["not_submitted", "resolved"],
15549 identity_requirement: "none",
15550 resolver_command: None,
15551 cancellation: "per_call",
15552 },
15553 CommandOutcomeContract {
15554 command: Command::GetOperation,
15555 possible_submission_states: &["not_submitted", "resolved"],
15556 identity_requirement: "request_locator",
15557 resolver_command: None,
15558 cancellation: "per_call",
15559 },
15560 CommandOutcomeContract {
15561 command: Command::WaitOperation,
15562 possible_submission_states: &["not_submitted", "resolved"],
15563 identity_requirement: "request_locator",
15564 resolver_command: None,
15565 cancellation: "per_call",
15566 },
15567 CommandOutcomeContract {
15568 command: Command::CancelOperation,
15569 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15570 identity_requirement: "request_locator",
15571 resolver_command: None,
15572 cancellation: "per_call_until_submission_then_resolve",
15573 },
15574 CommandOutcomeContract {
15575 command: Command::ListAuditEvents,
15576 possible_submission_states: &["not_submitted", "resolved"],
15577 identity_requirement: "none",
15578 resolver_command: None,
15579 cancellation: "per_call",
15580 },
15581 CommandOutcomeContract {
15582 command: Command::ExportAuditEvents,
15583 possible_submission_states: &["not_submitted", "resolved"],
15584 identity_requirement: "none",
15585 resolver_command: None,
15586 cancellation: "per_call",
15587 },
15588 CommandOutcomeContract {
15589 command: Command::ReserveServiceCredential,
15590 possible_submission_states: &[
15591 "not_submitted",
15592 "submitted",
15593 "known_retired",
15594 "indeterminate",
15595 "resolved",
15596 ],
15597 identity_requirement: "caller_action_id",
15598 resolver_command: Some(Command::ResolveServiceCredentialReservation),
15599 cancellation: "per_call_until_submission_then_resolve",
15600 },
15601 CommandOutcomeContract {
15602 command: Command::ReserveServiceCredentialRotation,
15603 possible_submission_states: &[
15604 "not_submitted",
15605 "submitted",
15606 "known_retired",
15607 "indeterminate",
15608 "resolved",
15609 ],
15610 identity_requirement: "caller_action_id",
15611 resolver_command: Some(Command::ResolveServiceCredentialReservation),
15612 cancellation: "per_call_until_submission_then_resolve",
15613 },
15614 CommandOutcomeContract {
15615 command: Command::ActivateServiceCredential,
15616 possible_submission_states: &[
15617 "not_submitted",
15618 "submitted",
15619 "known_retired",
15620 "indeterminate",
15621 "resolved",
15622 ],
15623 identity_requirement: "server_locator",
15624 resolver_command: Some(Command::ResolveServiceCredentialReservation),
15625 cancellation: "per_call_until_submission_then_resolve",
15626 },
15627 CommandOutcomeContract {
15628 command: Command::ResolveServiceCredentialReservation,
15629 possible_submission_states: &["not_submitted", "resolved"],
15630 identity_requirement: "caller_action_id",
15631 resolver_command: None,
15632 cancellation: "per_call",
15633 },
15634 CommandOutcomeContract {
15635 command: Command::PrepareRevokeServiceCredential,
15636 possible_submission_states: &["not_submitted", "resolved"],
15637 identity_requirement: "server_locator",
15638 resolver_command: None,
15639 cancellation: "per_call",
15640 },
15641 CommandOutcomeContract {
15642 command: Command::RevokeServiceCredential,
15643 possible_submission_states: &[
15644 "not_submitted",
15645 "submitted",
15646 "known_retired",
15647 "indeterminate",
15648 "resolved",
15649 ],
15650 identity_requirement: "request_locator",
15651 resolver_command: Some(Command::ResolveSecurityAction),
15652 cancellation: "per_call_until_submission_then_resolve",
15653 },
15654 CommandOutcomeContract {
15655 command: Command::ResolveSecurityAction,
15656 possible_submission_states: &["not_submitted", "resolved"],
15657 identity_requirement: "request_locator",
15658 resolver_command: None,
15659 cancellation: "per_call",
15660 },
15661 CommandOutcomeContract {
15662 command: Command::GetSecurityRole,
15663 possible_submission_states: &["not_submitted", "resolved"],
15664 identity_requirement: "none",
15665 resolver_command: None,
15666 cancellation: "per_call",
15667 },
15668 CommandOutcomeContract {
15669 command: Command::PrepareRoleAppendAccessChange,
15670 possible_submission_states: &["not_submitted", "resolved"],
15671 identity_requirement: "server_locator",
15672 resolver_command: None,
15673 cancellation: "per_call",
15674 },
15675 CommandOutcomeContract {
15676 command: Command::SubmitRoleAppendAccessChange,
15677 possible_submission_states: &[
15678 "not_submitted",
15679 "submitted",
15680 "known_retired",
15681 "indeterminate",
15682 "resolved",
15683 ],
15684 identity_requirement: "request_locator",
15685 resolver_command: Some(Command::ResolveSecurityAction),
15686 cancellation: "per_call_until_submission_then_resolve",
15687 },
15688 CommandOutcomeContract {
15689 command: Command::ListServiceCredentials,
15690 possible_submission_states: &["not_submitted", "resolved"],
15691 identity_requirement: "none",
15692 resolver_command: None,
15693 cancellation: "per_call",
15694 },
15695 CommandOutcomeContract {
15696 command: Command::GetRuntimeStatus,
15697 possible_submission_states: &["not_submitted", "resolved"],
15698 identity_requirement: "none",
15699 resolver_command: None,
15700 cancellation: "per_call",
15701 },
15702 CommandOutcomeContract {
15703 command: Command::GetResultCacheStatus,
15704 possible_submission_states: &["not_submitted", "resolved"],
15705 identity_requirement: "none",
15706 resolver_command: None,
15707 cancellation: "per_call",
15708 },
15709 CommandOutcomeContract {
15710 command: Command::GetFieldPromotionStatus,
15711 possible_submission_states: &["not_submitted", "resolved"],
15712 identity_requirement: "none",
15713 resolver_command: None,
15714 cancellation: "per_call",
15715 },
15716 CommandOutcomeContract {
15717 command: Command::GetOverloadStatus,
15718 possible_submission_states: &["not_submitted", "resolved"],
15719 identity_requirement: "none",
15720 resolver_command: None,
15721 cancellation: "per_call",
15722 },
15723 CommandOutcomeContract {
15724 command: Command::ConfigureExternalKey,
15725 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15726 identity_requirement: "none",
15727 resolver_command: None,
15728 cancellation: "per_call_until_submission_then_resolve",
15729 },
15730 CommandOutcomeContract {
15731 command: Command::RotateExternalKeyBinding,
15732 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15733 identity_requirement: "none",
15734 resolver_command: None,
15735 cancellation: "per_call_until_submission_then_resolve",
15736 },
15737 CommandOutcomeContract {
15738 command: Command::ConfigureAggregateThenDelete,
15739 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15740 identity_requirement: "none",
15741 resolver_command: None,
15742 cancellation: "per_call_until_submission_then_resolve",
15743 },
15744 CommandOutcomeContract {
15745 command: Command::GetLifecycleStatus,
15746 possible_submission_states: &["not_submitted", "resolved"],
15747 identity_requirement: "none",
15748 resolver_command: None,
15749 cancellation: "per_call",
15750 },
15751 CommandOutcomeContract {
15752 command: Command::GetQuota,
15753 possible_submission_states: &["not_submitted", "resolved"],
15754 identity_requirement: "none",
15755 resolver_command: None,
15756 cancellation: "per_call",
15757 },
15758 CommandOutcomeContract {
15759 command: Command::UpdateQuota,
15760 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15761 identity_requirement: "none",
15762 resolver_command: None,
15763 cancellation: "per_call_until_submission_then_resolve",
15764 },
15765 CommandOutcomeContract {
15766 command: Command::GetBinding,
15767 possible_submission_states: &["not_submitted", "resolved"],
15768 identity_requirement: "none",
15769 resolver_command: None,
15770 cancellation: "per_call",
15771 },
15772 CommandOutcomeContract {
15773 command: Command::GetAdmissionStatus,
15774 possible_submission_states: &["not_submitted", "resolved"],
15775 identity_requirement: "none",
15776 resolver_command: None,
15777 cancellation: "per_call",
15778 },
15779 CommandOutcomeContract {
15780 command: Command::SetAdmission,
15781 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15782 identity_requirement: "none",
15783 resolver_command: None,
15784 cancellation: "per_call_until_submission_then_resolve",
15785 },
15786 CommandOutcomeContract {
15787 command: Command::GetQuiesceStatus,
15788 possible_submission_states: &["not_submitted", "resolved"],
15789 identity_requirement: "none",
15790 resolver_command: None,
15791 cancellation: "per_call",
15792 },
15793 CommandOutcomeContract {
15794 command: Command::GetDecommissionReadiness,
15795 possible_submission_states: &["not_submitted", "resolved"],
15796 identity_requirement: "none",
15797 resolver_command: None,
15798 cancellation: "per_call",
15799 },
15800 CommandOutcomeContract {
15801 command: Command::GetUpgradeReadiness,
15802 possible_submission_states: &["not_submitted", "resolved"],
15803 identity_requirement: "none",
15804 resolver_command: None,
15805 cancellation: "per_call",
15806 },
15807 CommandOutcomeContract {
15808 command: Command::GetMaintenanceStatus,
15809 possible_submission_states: &["not_submitted", "resolved"],
15810 identity_requirement: "none",
15811 resolver_command: None,
15812 cancellation: "per_call",
15813 },
15814 CommandOutcomeContract {
15815 command: Command::WarmVectorIndex,
15816 possible_submission_states: &["not_submitted", "resolved"],
15817 identity_requirement: "exact_root",
15818 resolver_command: None,
15819 cancellation: "per_call",
15820 },
15821 CommandOutcomeContract {
15822 command: Command::EvaluateVectorRecall,
15823 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15824 identity_requirement: "caller_action_id",
15825 resolver_command: None,
15826 cancellation: "per_call_until_submission_then_resolve",
15827 },
15828 CommandOutcomeContract {
15829 command: Command::CalibrateVectorStrategy,
15830 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15831 identity_requirement: "caller_action_id",
15832 resolver_command: None,
15833 cancellation: "per_call_until_submission_then_resolve",
15834 },
15835 CommandOutcomeContract {
15836 command: Command::GetVectorDiagnostic,
15837 possible_submission_states: &["not_submitted", "resolved"],
15838 identity_requirement: "request_locator",
15839 resolver_command: None,
15840 cancellation: "per_call",
15841 },
15842 CommandOutcomeContract {
15843 command: Command::CreateDiagnostic,
15844 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15845 identity_requirement: "none",
15846 resolver_command: None,
15847 cancellation: "per_call_until_submission_then_resolve",
15848 },
15849 CommandOutcomeContract {
15850 command: Command::GetDiagnostic,
15851 possible_submission_states: &["not_submitted", "resolved"],
15852 identity_requirement: "request_locator",
15853 resolver_command: None,
15854 cancellation: "per_call",
15855 },
15856 CommandOutcomeContract {
15857 command: Command::PrepareCollectionExport,
15858 possible_submission_states: &["not_submitted", "resolved"],
15859 identity_requirement: "caller_action_id",
15860 resolver_command: None,
15861 cancellation: "per_call",
15862 },
15863 CommandOutcomeContract {
15864 command: Command::StartCollectionExport,
15865 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15866 identity_requirement: "caller_action_id",
15867 resolver_command: Some(Command::ResolveCollectionExport),
15868 cancellation: "per_call_until_submission_then_resolve",
15869 },
15870 CommandOutcomeContract {
15871 command: Command::ResolveCollectionExport,
15872 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
15873 identity_requirement: "caller_action_id",
15874 resolver_command: None,
15875 cancellation: "per_call",
15876 },
15877 CommandOutcomeContract {
15878 command: Command::VerifyCollectionExport,
15879 possible_submission_states: &["not_submitted", "resolved"],
15880 identity_requirement: "request_locator",
15881 resolver_command: None,
15882 cancellation: "per_call",
15883 },
15884 CommandOutcomeContract {
15885 command: Command::PrepareCollectionRestore,
15886 possible_submission_states: &["not_submitted", "resolved"],
15887 identity_requirement: "caller_action_id",
15888 resolver_command: None,
15889 cancellation: "per_call",
15890 },
15891 CommandOutcomeContract {
15892 command: Command::StartCollectionRestore,
15893 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15894 identity_requirement: "caller_action_id",
15895 resolver_command: Some(Command::ResolveCollectionRestore),
15896 cancellation: "per_call_until_submission_then_resolve",
15897 },
15898 CommandOutcomeContract {
15899 command: Command::ResolveCollectionRestore,
15900 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
15901 identity_requirement: "caller_action_id",
15902 resolver_command: None,
15903 cancellation: "per_call",
15904 },
15905 CommandOutcomeContract {
15906 command: Command::PrepareIndexExport,
15907 possible_submission_states: &["not_submitted", "resolved"],
15908 identity_requirement: "caller_action_id",
15909 resolver_command: None,
15910 cancellation: "per_call",
15911 },
15912 CommandOutcomeContract {
15913 command: Command::StartIndexExport,
15914 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15915 identity_requirement: "caller_action_id",
15916 resolver_command: Some(Command::ResolveIndexExport),
15917 cancellation: "per_call_until_submission_then_resolve",
15918 },
15919 CommandOutcomeContract {
15920 command: Command::ResolveIndexExport,
15921 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
15922 identity_requirement: "caller_action_id",
15923 resolver_command: None,
15924 cancellation: "per_call",
15925 },
15926 CommandOutcomeContract {
15927 command: Command::VerifyIndexExport,
15928 possible_submission_states: &["not_submitted", "resolved"],
15929 identity_requirement: "request_locator",
15930 resolver_command: None,
15931 cancellation: "per_call",
15932 },
15933 CommandOutcomeContract {
15934 command: Command::PrepareIndexImport,
15935 possible_submission_states: &["not_submitted", "resolved"],
15936 identity_requirement: "caller_action_id",
15937 resolver_command: None,
15938 cancellation: "per_call",
15939 },
15940 CommandOutcomeContract {
15941 command: Command::StartIndexImport,
15942 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15943 identity_requirement: "caller_action_id",
15944 resolver_command: Some(Command::ResolveIndexImport),
15945 cancellation: "per_call_until_submission_then_resolve",
15946 },
15947 CommandOutcomeContract {
15948 command: Command::ResolveIndexImport,
15949 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
15950 identity_requirement: "caller_action_id",
15951 resolver_command: None,
15952 cancellation: "per_call",
15953 },
15954 CommandOutcomeContract {
15955 command: Command::ReadArtifactChunk,
15956 possible_submission_states: &["not_submitted", "resolved"],
15957 identity_requirement: "none",
15958 resolver_command: None,
15959 cancellation: "per_call",
15960 },
15961 CommandOutcomeContract {
15962 command: Command::ExportUsage,
15963 possible_submission_states: &["not_submitted", "resolved"],
15964 identity_requirement: "none",
15965 resolver_command: None,
15966 cancellation: "per_call",
15967 },
15968 CommandOutcomeContract {
15969 command: Command::ExecuteStateRead,
15970 possible_submission_states: &["not_submitted", "resolved"],
15971 identity_requirement: "none",
15972 resolver_command: None,
15973 cancellation: "per_call",
15974 },
15975 CommandOutcomeContract {
15976 command: Command::PrepareStateWrite,
15977 possible_submission_states: &["not_submitted", "resolved"],
15978 identity_requirement: "caller_action_id",
15979 resolver_command: None,
15980 cancellation: "per_call",
15981 },
15982 CommandOutcomeContract {
15983 command: Command::SubmitStateWrite,
15984 possible_submission_states: &[
15985 "not_submitted",
15986 "submitted",
15987 "known_retired",
15988 "indeterminate",
15989 "resolved",
15990 ],
15991 identity_requirement: "request_locator",
15992 resolver_command: Some(Command::ResolveStateWrite),
15993 cancellation: "per_call_until_submission_then_resolve",
15994 },
15995 CommandOutcomeContract {
15996 command: Command::ResolveStateWrite,
15997 possible_submission_states: &["not_submitted", "resolved"],
15998 identity_requirement: "request_locator",
15999 resolver_command: None,
16000 cancellation: "per_call",
16001 },
16002];
16003#[derive(Clone, Copy, Debug, Eq, PartialEq)]
16004pub struct ErrorOutcomeContract {
16005 pub code: ErrorCode,
16006 pub disposition: ErrorDisposition,
16007 pub recovery: RecoveryAction,
16008 pub retry_after_limit_id: Option<&'static str>,
16009 pub recovery_identity: &'static str,
16010}
16011pub const LODESTONE_API_ERROR_OUTCOMES: &[ErrorOutcomeContract] = &[
16012 ErrorOutcomeContract {
16013 code: ErrorCode::Aborted,
16014 disposition: ErrorDisposition::NotSubmitted,
16015 recovery: RecoveryAction::Retry,
16016 retry_after_limit_id: None,
16017 recovery_identity: "request_identity",
16018 },
16019 ErrorOutcomeContract {
16020 code: ErrorCode::Aborted,
16021 disposition: ErrorDisposition::Indeterminate,
16022 recovery: RecoveryAction::Resolve,
16023 retry_after_limit_id: None,
16024 recovery_identity: "request_identity",
16025 },
16026 ErrorOutcomeContract {
16027 code: ErrorCode::DeadlineExceeded,
16028 disposition: ErrorDisposition::NotSubmitted,
16029 recovery: RecoveryAction::Retry,
16030 retry_after_limit_id: None,
16031 recovery_identity: "request_identity",
16032 },
16033 ErrorOutcomeContract {
16034 code: ErrorCode::DeadlineExceeded,
16035 disposition: ErrorDisposition::Indeterminate,
16036 recovery: RecoveryAction::Resolve,
16037 retry_after_limit_id: None,
16038 recovery_identity: "request_identity",
16039 },
16040 ErrorOutcomeContract {
16041 code: ErrorCode::InvalidRequest,
16042 disposition: ErrorDisposition::NotSubmitted,
16043 recovery: RecoveryAction::Stop,
16044 retry_after_limit_id: None,
16045 recovery_identity: "none",
16046 },
16047 ErrorOutcomeContract {
16048 code: ErrorCode::UnsupportedVersion,
16049 disposition: ErrorDisposition::NotSubmitted,
16050 recovery: RecoveryAction::Stop,
16051 retry_after_limit_id: None,
16052 recovery_identity: "none",
16053 },
16054 ErrorOutcomeContract {
16055 code: ErrorCode::Unauthenticated,
16056 disposition: ErrorDisposition::NotSubmitted,
16057 recovery: RecoveryAction::RefreshCredential,
16058 retry_after_limit_id: None,
16059 recovery_identity: "none",
16060 },
16061 ErrorOutcomeContract {
16062 code: ErrorCode::PermissionDenied,
16063 disposition: ErrorDisposition::NotSubmitted,
16064 recovery: RecoveryAction::Stop,
16065 retry_after_limit_id: None,
16066 recovery_identity: "none",
16067 },
16068 ErrorOutcomeContract {
16069 code: ErrorCode::NotFound,
16070 disposition: ErrorDisposition::NotSubmitted,
16071 recovery: RecoveryAction::Stop,
16072 retry_after_limit_id: None,
16073 recovery_identity: "request_identity",
16074 },
16075 ErrorOutcomeContract {
16076 code: ErrorCode::NotFound,
16077 disposition: ErrorDisposition::Resolved,
16078 recovery: RecoveryAction::Stop,
16079 retry_after_limit_id: None,
16080 recovery_identity: "request_identity",
16081 },
16082 ErrorOutcomeContract {
16083 code: ErrorCode::Conflict,
16084 disposition: ErrorDisposition::NotSubmitted,
16085 recovery: RecoveryAction::RefreshPrecondition,
16086 retry_after_limit_id: None,
16087 recovery_identity: "request_identity",
16088 },
16089 ErrorOutcomeContract {
16090 code: ErrorCode::Conflict,
16091 disposition: ErrorDisposition::Resolved,
16092 recovery: RecoveryAction::Stop,
16093 retry_after_limit_id: None,
16094 recovery_identity: "request_identity",
16095 },
16096 ErrorOutcomeContract {
16097 code: ErrorCode::StaleCursor,
16098 disposition: ErrorDisposition::NotSubmitted,
16099 recovery: RecoveryAction::RestartPage,
16100 retry_after_limit_id: None,
16101 recovery_identity: "cursor",
16102 },
16103 ErrorOutcomeContract {
16104 code: ErrorCode::RestartBudgetExhausted,
16105 disposition: ErrorDisposition::NotSubmitted,
16106 recovery: RecoveryAction::Stop,
16107 retry_after_limit_id: None,
16108 recovery_identity: "cursor",
16109 },
16110 ErrorOutcomeContract {
16111 code: ErrorCode::LimitExceeded,
16112 disposition: ErrorDisposition::NotSubmitted,
16113 recovery: RecoveryAction::ReduceRequest,
16114 retry_after_limit_id: None,
16115 recovery_identity: "none",
16116 },
16117 ErrorOutcomeContract {
16118 code: ErrorCode::CapabilityUnavailable,
16119 disposition: ErrorDisposition::NotSubmitted,
16120 recovery: RecoveryAction::Stop,
16121 retry_after_limit_id: None,
16122 recovery_identity: "none",
16123 },
16124 ErrorOutcomeContract {
16125 code: ErrorCode::NotSubmitted,
16126 disposition: ErrorDisposition::NotSubmitted,
16127 recovery: RecoveryAction::RetryAfter,
16128 retry_after_limit_id: Some("retry_after_millis"),
16129 recovery_identity: "request_identity",
16130 },
16131 ErrorOutcomeContract {
16132 code: ErrorCode::SubmittedIndeterminate,
16133 disposition: ErrorDisposition::Indeterminate,
16134 recovery: RecoveryAction::Resolve,
16135 retry_after_limit_id: None,
16136 recovery_identity: "locator_or_caller_action_id",
16137 },
16138 ErrorOutcomeContract {
16139 code: ErrorCode::ExpiredUnknown,
16140 disposition: ErrorDisposition::KnownRetired,
16141 recovery: RecoveryAction::Stop,
16142 retry_after_limit_id: None,
16143 recovery_identity: "locator_or_caller_action_id",
16144 },
16145 ErrorOutcomeContract {
16146 code: ErrorCode::SecretNotEscrowed,
16147 disposition: ErrorDisposition::Resolved,
16148 recovery: RecoveryAction::Resolve,
16149 retry_after_limit_id: None,
16150 recovery_identity: "reservation_action_id",
16151 },
16152 ErrorOutcomeContract {
16153 code: ErrorCode::RetentionGap,
16154 disposition: ErrorDisposition::KnownRetired,
16155 recovery: RecoveryAction::Stop,
16156 retry_after_limit_id: None,
16157 recovery_identity: "cursor_or_locator",
16158 },
16159 ErrorOutcomeContract {
16160 code: ErrorCode::ArtifactRangeInvalid,
16161 disposition: ErrorDisposition::NotSubmitted,
16162 recovery: RecoveryAction::CorrectRange,
16163 retry_after_limit_id: None,
16164 recovery_identity: "artifact_identity",
16165 },
16166 ErrorOutcomeContract {
16167 code: ErrorCode::ChecksumMismatch,
16168 disposition: ErrorDisposition::Resolved,
16169 recovery: RecoveryAction::Stop,
16170 retry_after_limit_id: None,
16171 recovery_identity: "artifact_identity",
16172 },
16173 ErrorOutcomeContract {
16174 code: ErrorCode::TemporarilyUnavailable,
16175 disposition: ErrorDisposition::NotSubmitted,
16176 recovery: RecoveryAction::RetryAfter,
16177 retry_after_limit_id: Some("retry_after_millis"),
16178 recovery_identity: "request_identity",
16179 },
16180 ErrorOutcomeContract {
16181 code: ErrorCode::TemporarilyUnavailable,
16182 disposition: ErrorDisposition::Indeterminate,
16183 recovery: RecoveryAction::Resolve,
16184 retry_after_limit_id: Some("retry_after_millis"),
16185 recovery_identity: "request_identity",
16186 },
16187 ErrorOutcomeContract {
16188 code: ErrorCode::Internal,
16189 disposition: ErrorDisposition::NotSubmitted,
16190 recovery: RecoveryAction::Stop,
16191 retry_after_limit_id: None,
16192 recovery_identity: "request_identity",
16193 },
16194 ErrorOutcomeContract {
16195 code: ErrorCode::Internal,
16196 disposition: ErrorDisposition::Resolved,
16197 recovery: RecoveryAction::Stop,
16198 retry_after_limit_id: None,
16199 recovery_identity: "request_identity",
16200 },
16201 ErrorOutcomeContract {
16202 code: ErrorCode::Internal,
16203 disposition: ErrorDisposition::Indeterminate,
16204 recovery: RecoveryAction::Resolve,
16205 retry_after_limit_id: None,
16206 recovery_identity: "request_identity",
16207 },
16208];
16209#[derive(Clone, Copy, Debug, Eq, PartialEq)]
16210pub struct Limit {
16211 pub id: &'static str,
16212 pub default: u64,
16213 pub maximum: u64,
16214 pub unit: &'static str,
16215}
16216pub const LODESTONE_API_LIMITS: &[Limit] = &[
16217 Limit {
16218 id: "request_bytes",
16219 default: 2097152,
16220 maximum: 2097152,
16221 unit: "bytes",
16222 },
16223 Limit {
16224 id: "response_bytes",
16225 default: 2097152,
16226 maximum: 2097152,
16227 unit: "bytes",
16228 },
16229 Limit {
16230 id: "page_size",
16231 default: 100,
16232 maximum: 1000,
16233 unit: "items",
16234 },
16235 Limit {
16236 id: "catalog_page_size",
16237 default: 100,
16238 maximum: 100,
16239 unit: "items",
16240 },
16241 Limit {
16242 id: "catalog_restart_budget",
16243 default: 8,
16244 maximum: 8,
16245 unit: "restarts",
16246 },
16247 Limit {
16248 id: "query_clauses",
16249 default: 256,
16250 maximum: 1024,
16251 unit: "clauses",
16252 },
16253 Limit {
16254 id: "text_query_bytes",
16255 default: 16384,
16256 maximum: 16384,
16257 unit: "bytes",
16258 },
16259 Limit {
16260 id: "text_query_fields",
16261 default: 64,
16262 maximum: 64,
16263 unit: "fields",
16264 },
16265 Limit {
16266 id: "text_query_slop",
16267 default: 64,
16268 maximum: 64,
16269 unit: "positions",
16270 },
16271 Limit {
16272 id: "text_query_boost",
16273 default: 1024,
16274 maximum: 1024,
16275 unit: "multiplier",
16276 },
16277 Limit {
16278 id: "text_query_fuzzy_expansions",
16279 default: 1024,
16280 maximum: 1024,
16281 unit: "terms",
16282 },
16283 Limit {
16284 id: "text_query_fuzzy_distance",
16285 default: 2,
16286 maximum: 2,
16287 unit: "edits",
16288 },
16289 Limit {
16290 id: "text_query_dictionary_scan_terms",
16291 default: 65536,
16292 maximum: 65536,
16293 unit: "terms",
16294 },
16295 Limit {
16296 id: "text_query_dictionary_scan_bytes",
16297 default: 16777216,
16298 maximum: 16777216,
16299 unit: "bytes",
16300 },
16301 Limit {
16302 id: "text_query_fuzzy_work_units",
16303 default: 2000000,
16304 maximum: 2000000,
16305 unit: "distance_cells",
16306 },
16307 Limit {
16308 id: "aggregation_nodes",
16309 default: 64,
16310 maximum: 256,
16311 unit: "nodes",
16312 },
16313 Limit {
16314 id: "aggregation_buckets",
16315 default: 65536,
16316 maximum: 65536,
16317 unit: "buckets",
16318 },
16319 Limit {
16320 id: "metric_point_bytes",
16321 default: 1048576,
16322 maximum: 1048576,
16323 unit: "bytes",
16324 },
16325 Limit {
16326 id: "metric_attributes",
16327 default: 128,
16328 maximum: 128,
16329 unit: "items",
16330 },
16331 Limit {
16332 id: "metric_attribute_bytes",
16333 default: 65536,
16334 maximum: 65536,
16335 unit: "bytes",
16336 },
16337 Limit {
16338 id: "metric_exemplars",
16339 default: 8,
16340 maximum: 8,
16341 unit: "items",
16342 },
16343 Limit {
16344 id: "metric_histogram_buckets",
16345 default: 4097,
16346 maximum: 4097,
16347 unit: "buckets",
16348 },
16349 Limit {
16350 id: "time_series_grouping_keys",
16351 default: 4,
16352 maximum: 16,
16353 unit: "keys",
16354 },
16355 Limit {
16356 id: "time_series_points",
16357 default: 100000,
16358 maximum: 100000,
16359 unit: "points",
16360 },
16361 Limit {
16362 id: "time_series_series",
16363 default: 10000,
16364 maximum: 10000,
16365 unit: "series",
16366 },
16367 Limit {
16368 id: "time_series_buckets",
16369 default: 65536,
16370 maximum: 65536,
16371 unit: "buckets",
16372 },
16373 Limit {
16374 id: "time_series_results",
16375 default: 65536,
16376 maximum: 65536,
16377 unit: "results",
16378 },
16379 Limit {
16380 id: "time_series_quantiles",
16381 default: 10,
16382 maximum: 100,
16383 unit: "quantiles",
16384 },
16385 Limit {
16386 id: "time_series_state_bytes",
16387 default: 67108864,
16388 maximum: 67108864,
16389 unit: "bytes",
16390 },
16391 Limit {
16392 id: "temporal_inputs",
16393 default: 16,
16394 maximum: 16,
16395 unit: "indexes",
16396 },
16397 Limit {
16398 id: "temporal_pattern_nodes",
16399 default: 64,
16400 maximum: 64,
16401 unit: "nodes",
16402 },
16403 Limit {
16404 id: "temporal_pattern_depth",
16405 default: 16,
16406 maximum: 16,
16407 unit: "levels",
16408 },
16409 Limit {
16410 id: "temporal_pattern_branches",
16411 default: 16,
16412 maximum: 16,
16413 unit: "branches",
16414 },
16415 Limit {
16416 id: "temporal_correlation_keys",
16417 default: 4,
16418 maximum: 4,
16419 unit: "fields",
16420 },
16421 Limit {
16422 id: "temporal_events",
16423 default: 4096,
16424 maximum: 4096,
16425 unit: "events",
16426 },
16427 Limit {
16428 id: "temporal_states",
16429 default: 65536,
16430 maximum: 65536,
16431 unit: "states",
16432 },
16433 Limit {
16434 id: "temporal_captured_events",
16435 default: 256,
16436 maximum: 256,
16437 unit: "events",
16438 },
16439 Limit {
16440 id: "temporal_results",
16441 default: 4096,
16442 maximum: 4096,
16443 unit: "results",
16444 },
16445 Limit {
16446 id: "temporal_state_bytes",
16447 default: 67108864,
16448 maximum: 67108864,
16449 unit: "bytes",
16450 },
16451 Limit {
16452 id: "temporal_interval_nanos",
16453 default: 2678400000000000,
16454 maximum: 2678400000000000,
16455 unit: "nanoseconds",
16456 },
16457 Limit {
16458 id: "relationship_indexes",
16459 default: 4,
16460 maximum: 16,
16461 unit: "indexes",
16462 },
16463 Limit {
16464 id: "relationship_seeds",
16465 default: 16,
16466 maximum: 128,
16467 unit: "entities",
16468 },
16469 Limit {
16470 id: "relationship_filter_values",
16471 default: 16,
16472 maximum: 128,
16473 unit: "values",
16474 },
16475 Limit {
16476 id: "relationship_depth",
16477 default: 4,
16478 maximum: 16,
16479 unit: "levels",
16480 },
16481 Limit {
16482 id: "relationship_fan_out",
16483 default: 256,
16484 maximum: 4096,
16485 unit: "relationships",
16486 },
16487 Limit {
16488 id: "relationship_visited_entities",
16489 default: 10000,
16490 maximum: 65536,
16491 unit: "entities",
16492 },
16493 Limit {
16494 id: "relationship_visited_records",
16495 default: 10000,
16496 maximum: 10000,
16497 unit: "records",
16498 },
16499 Limit {
16500 id: "relationship_returned_records",
16501 default: 10000,
16502 maximum: 10000,
16503 unit: "records",
16504 },
16505 Limit {
16506 id: "relationship_memory_bytes",
16507 default: 67108864,
16508 maximum: 268435456,
16509 unit: "bytes",
16510 },
16511 Limit {
16512 id: "profile_indexes",
16513 default: 4,
16514 maximum: 16,
16515 unit: "indexes",
16516 },
16517 Limit {
16518 id: "profile_filter_values",
16519 default: 16,
16520 maximum: 128,
16521 unit: "values",
16522 },
16523 Limit {
16524 id: "profile_batches",
16525 default: 10000,
16526 maximum: 10000,
16527 unit: "batches",
16528 },
16529 Limit {
16530 id: "profile_samples",
16531 default: 100000,
16532 maximum: 100000,
16533 unit: "samples",
16534 },
16535 Limit {
16536 id: "profile_results",
16537 default: 10000,
16538 maximum: 10000,
16539 unit: "results",
16540 },
16541 Limit {
16542 id: "profile_memory_bytes",
16543 default: 67108864,
16544 maximum: 268435456,
16545 unit: "bytes",
16546 },
16547 Limit {
16548 id: "approximate_cardinality_precision",
16549 default: 12,
16550 maximum: 16,
16551 unit: "index_bits",
16552 },
16553 Limit {
16554 id: "approximate_percentile_precision",
16555 default: 10,
16556 maximum: 12,
16557 unit: "index_bits",
16558 },
16559 Limit {
16560 id: "operation_page_authorities",
16561 default: 7,
16562 maximum: 7,
16563 unit: "authorities",
16564 },
16565 Limit {
16566 id: "artifact_chunk_bytes",
16567 default: 262144,
16568 maximum: 1048576,
16569 unit: "bytes",
16570 },
16571 Limit {
16572 id: "bulk_document_items",
16573 default: 128,
16574 maximum: 1024,
16575 unit: "items",
16576 },
16577 Limit {
16578 id: "bulk_document_bytes",
16579 default: 2097152,
16580 maximum: 2097152,
16581 unit: "bytes",
16582 },
16583 Limit {
16584 id: "state_command_keys",
16585 default: 128,
16586 maximum: 128,
16587 unit: "keys",
16588 },
16589 Limit {
16590 id: "state_command_value_bytes",
16591 default: 1048576,
16592 maximum: 1048576,
16593 unit: "bytes",
16594 },
16595 Limit {
16596 id: "state_write_outcomes",
16597 default: 4096,
16598 maximum: 4096,
16599 unit: "entries",
16600 },
16601 Limit {
16602 id: "exact_decimal_scale",
16603 default: 18,
16604 maximum: 1024,
16605 unit: "decimal_places",
16606 },
16607 Limit {
16608 id: "retry_after_millis",
16609 default: 1000,
16610 maximum: 60000,
16611 unit: "milliseconds",
16612 },
16613 Limit {
16614 id: "mapping_fields",
16615 default: 16384,
16616 maximum: 16384,
16617 unit: "fields",
16618 },
16619 Limit {
16620 id: "search_result_window",
16621 default: 10000,
16622 maximum: 10000,
16623 unit: "items",
16624 },
16625 Limit {
16626 id: "routing_values",
16627 default: 1024,
16628 maximum: 1024,
16629 unit: "items",
16630 },
16631 Limit {
16632 id: "routing_value_bytes",
16633 default: 4096,
16634 maximum: 4096,
16635 unit: "bytes",
16636 },
16637 Limit {
16638 id: "query_recursion_depth",
16639 default: 64,
16640 maximum: 64,
16641 unit: "levels",
16642 },
16643 Limit {
16644 id: "vector_dimensions",
16645 default: 16384,
16646 maximum: 16384,
16647 unit: "dimensions",
16648 },
16649 Limit {
16650 id: "vector_query_bytes",
16651 default: 65536,
16652 maximum: 65536,
16653 unit: "bytes",
16654 },
16655 Limit {
16656 id: "vector_request_bytes",
16657 default: 1048576,
16658 maximum: 1048576,
16659 unit: "bytes",
16660 },
16661 Limit {
16662 id: "vector_candidates",
16663 default: 10000,
16664 maximum: 10000,
16665 unit: "items",
16666 },
16667 Limit {
16668 id: "vector_set_document_vectors",
16669 default: 128,
16670 maximum: 128,
16671 unit: "vectors",
16672 },
16673 Limit {
16674 id: "vector_set_document_bytes",
16675 default: 65536,
16676 maximum: 65536,
16677 unit: "bytes",
16678 },
16679 Limit {
16680 id: "vector_set_query_vectors",
16681 default: 32,
16682 maximum: 32,
16683 unit: "vectors",
16684 },
16685 Limit {
16686 id: "vector_set_query_bytes",
16687 default: 65536,
16688 maximum: 65536,
16689 unit: "bytes",
16690 },
16691 Limit {
16692 id: "retrieval_branches",
16693 default: 16,
16694 maximum: 16,
16695 unit: "branches",
16696 },
16697 Limit {
16698 id: "retrieval_branch_name_bytes",
16699 default: 64,
16700 maximum: 64,
16701 unit: "bytes",
16702 },
16703 Limit {
16704 id: "retrieval_window",
16705 default: 10000,
16706 maximum: 10000,
16707 unit: "items",
16708 },
16709 Limit {
16710 id: "fragment_fields",
16711 default: 4,
16712 maximum: 16,
16713 unit: "fields",
16714 },
16715 Limit {
16716 id: "fragments_per_field",
16717 default: 1,
16718 maximum: 8,
16719 unit: "items",
16720 },
16721 Limit {
16722 id: "fragment_bytes",
16723 default: 150,
16724 maximum: 8192,
16725 unit: "bytes",
16726 },
16727 Limit {
16728 id: "fragment_total_bytes",
16729 default: 65536,
16730 maximum: 65536,
16731 unit: "bytes",
16732 },
16733 Limit {
16734 id: "result_feature_hits",
16735 default: 10,
16736 maximum: 100,
16737 unit: "items",
16738 },
16739 Limit {
16740 id: "result_features",
16741 default: 4,
16742 maximum: 16,
16743 unit: "features",
16744 },
16745 Limit {
16746 id: "diversification_fields",
16747 default: 1,
16748 maximum: 4,
16749 unit: "fields",
16750 },
16751 Limit {
16752 id: "diversification_per_group",
16753 default: 1,
16754 maximum: 64,
16755 unit: "items",
16756 },
16757 Limit {
16758 id: "vector_evaluation_queries",
16759 default: 64,
16760 maximum: 256,
16761 unit: "queries",
16762 },
16763 Limit {
16764 id: "vector_evaluation_k",
16765 default: 10,
16766 maximum: 1000,
16767 unit: "items",
16768 },
16769 Limit {
16770 id: "vector_evaluation_profiles",
16771 default: 3,
16772 maximum: 3,
16773 unit: "profiles",
16774 },
16775 Limit {
16776 id: "vector_evaluation_artifact_bytes",
16777 default: 1048576,
16778 maximum: 1048576,
16779 unit: "bytes",
16780 },
16781 Limit {
16782 id: "vector_warm_components",
16783 default: 2,
16784 maximum: 3,
16785 unit: "components",
16786 },
16787 Limit {
16788 id: "vector_warm_requests",
16789 default: 1024,
16790 maximum: 65536,
16791 unit: "requests",
16792 },
16793 Limit {
16794 id: "vector_warm_bytes",
16795 default: 268435456,
16796 maximum: 1073741824,
16797 unit: "bytes",
16798 },
16799 Limit {
16800 id: "vector_warm_achievements",
16801 default: 1024,
16802 maximum: 10000,
16803 unit: "items",
16804 },
16805 Limit {
16806 id: "vector_warm_ttl_millis",
16807 default: 300000,
16808 maximum: 900000,
16809 unit: "milliseconds",
16810 },
16811 Limit {
16812 id: "operation_page_size",
16813 default: 100,
16814 maximum: 100,
16815 unit: "items",
16816 },
16817 Limit {
16818 id: "operation_wait_attempts",
16819 default: 20,
16820 maximum: 100,
16821 unit: "attempts",
16822 },
16823 Limit {
16824 id: "operation_wait_interval_millis",
16825 default: 100,
16826 maximum: 60000,
16827 unit: "milliseconds",
16828 },
16829 Limit {
16830 id: "resource_initial_shards",
16831 default: 1,
16832 maximum: 4096,
16833 unit: "shards",
16834 },
16835 Limit {
16836 id: "resource_target_shard_bytes",
16837 default: 536870912,
16838 maximum: 1125899906842624,
16839 unit: "bytes",
16840 },
16841 Limit {
16842 id: "resource_admission_weight",
16843 default: 1,
16844 maximum: 1000000,
16845 unit: "weight",
16846 },
16847 Limit {
16848 id: "resource_ram_bytes",
16849 default: 1073741824,
16850 maximum: 1125899906842624,
16851 unit: "bytes",
16852 },
16853 Limit {
16854 id: "resource_nvme_bytes",
16855 default: 2147483648,
16856 maximum: 1125899906842624,
16857 unit: "bytes",
16858 },
16859 Limit {
16860 id: "resource_refresh_millis",
16861 default: 200,
16862 maximum: 604800000,
16863 unit: "milliseconds",
16864 },
16865 Limit {
16866 id: "resource_memtable_bytes",
16867 default: 268435456,
16868 maximum: 1125899906842624,
16869 unit: "bytes",
16870 },
16871 Limit {
16872 id: "resource_parallelism",
16873 default: 1,
16874 maximum: 4096,
16875 unit: "workers",
16876 },
16877 Limit {
16878 id: "collection_export_bytes",
16879 default: 268435456,
16880 maximum: 268435456,
16881 unit: "bytes",
16882 },
16883 Limit {
16884 id: "collection_export_documents",
16885 default: 10000,
16886 maximum: 10000,
16887 unit: "documents",
16888 },
16889 Limit {
16890 id: "index_transfer_bytes",
16891 default: 268435456,
16892 maximum: 268435456,
16893 unit: "bytes",
16894 },
16895 Limit {
16896 id: "index_transfer_records",
16897 default: 10000,
16898 maximum: 10000,
16899 unit: "records",
16900 },
16901 Limit {
16902 id: "index_transfer_pages",
16903 default: 7,
16904 maximum: 7,
16905 unit: "pages",
16906 },
16907 Limit {
16908 id: "portability_prefix_bytes",
16909 default: 512,
16910 maximum: 512,
16911 unit: "bytes",
16912 },
16913];
16914#[derive(Clone, Copy, Debug, Eq, PartialEq)]
16915pub enum JsonError {
16916 DuplicateObjectField,
16917 InvalidScalar,
16918}
16919pub fn validate_semantic_json(value: &JsonValue) -> Result<(), JsonError> {
16920 match value {
16921 JsonValue::I64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
16922 JsonValue::U64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
16923 JsonValue::ExactDecimal(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
16924 JsonValue::Approximate(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
16925 JsonValue::Array(items) => items.iter().try_for_each(validate_semantic_json),
16926 JsonValue::Object(fields) => {
16927 let mut names = std::collections::BTreeSet::new();
16928 for field in fields {
16929 if !names.insert(field.name.as_str()) {
16930 return Err(JsonError::DuplicateObjectField);
16931 }
16932 validate_semantic_json(&field.value)?;
16933 }
16934 Ok(())
16935 }
16936 JsonValue::Null | JsonValue::Bool(_) | JsonValue::String(_) => Ok(()),
16937 }
16938}
16939#[cfg(test)]
16940mod tests {
16941 use super::*;
16942 fn assert_fixture<T>(value: &serde_json::Value) -> Result<(), Box<dyn std::error::Error>>
16943 where
16944 T: serde::de::DeserializeOwned + Serialize,
16945 {
16946 let decoded: T = serde_json::from_value(value.clone())?;
16947 assert_eq!(serde_json::to_value(decoded)?, *value);
16948 Ok(())
16949 }
16950 #[test]
16951 fn every_named_type_has_a_canonical_round_trip_fixture() -> Result<(), Box<dyn std::error::Error>> {
16952 let document: serde_json::Value =
16953 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
16954 assert_eq!(document["spec_sha256"], LODESTONE_API_SPEC_SHA256);
16955 let fixtures = document["named_types"]
16956 .as_object()
16957 .ok_or("named type fixtures are not an object")?;
16958 assert_eq!(fixtures.len(), LODESTONE_API_TYPE_CONTRACTS.len());
16959 for (name, value) in fixtures {
16960 match name.as_str() {
16961 "cursor" => assert_fixture::<Cursor>(value)?,
16962 "locator" => assert_fixture::<Locator>(value)?,
16963 "resource" => assert_fixture::<Resource>(value)?,
16964 "field_promotion_configuration" => assert_fixture::<FieldPromotionConfiguration>(value)?,
16965 "overload_configuration" => assert_fixture::<OverloadConfiguration>(value)?,
16966 "index_policies" => assert_fixture::<IndexPolicies>(value)?,
16967 "maintenance_budgets" => assert_fixture::<MaintenanceBudgets>(value)?,
16968 "resource_durability_class" => assert_fixture::<ResourceDurabilityClass>(value)?,
16969 "resource_storage_class" => assert_fixture::<ResourceStorageClass>(value)?,
16970 "vector_quality_objective" => assert_fixture::<VectorQualityObjective>(value)?,
16971 "vector_indexing_objective" => assert_fixture::<VectorIndexingObjective>(value)?,
16972 "vector_residency_intent" => assert_fixture::<VectorResidencyIntent>(value)?,
16973 "vector_calibration_binding" => assert_fixture::<VectorCalibrationBinding>(value)?,
16974 "vector_resource_policy" => assert_fixture::<VectorResourcePolicy>(value)?,
16975 "workload_class" => assert_fixture::<WorkloadClass>(value)?,
16976 "index_resource_spec" => assert_fixture::<IndexResourceSpec>(value)?,
16977 "index_summary" => assert_fixture::<IndexSummary>(value)?,
16978 "mapping_mode" => assert_fixture::<MappingMode>(value)?,
16979 "dynamic_mapping_policy" => assert_fixture::<DynamicMappingPolicy>(value)?,
16980 "mapping_analyzer" => assert_fixture::<MappingAnalyzer>(value)?,
16981 "keyword_normalizer" => assert_fixture::<KeywordNormalizer>(value)?,
16982 "vector_metric" => assert_fixture::<VectorMetric>(value)?,
16983 "mapping_scalar" => assert_fixture::<MappingScalar>(value)?,
16984 "sparse_vector_weight_type" => assert_fixture::<SparseVectorWeightType>(value)?,
16985 "mapping_field_type" => assert_fixture::<MappingFieldType>(value)?,
16986 "mapping_field" => assert_fixture::<MappingField>(value)?,
16987 "multi_field_projection" => assert_fixture::<MultiFieldProjection>(value)?,
16988 "analyzer_identity" => assert_fixture::<AnalyzerIdentity>(value)?,
16989 "keyword_limit" => assert_fixture::<KeywordLimit>(value)?,
16990 "profile_privacy_action" => assert_fixture::<ProfilePrivacyAction>(value)?,
16991 "profile_privacy_field" => assert_fixture::<ProfilePrivacyField>(value)?,
16992 "profile_privacy_rule" => assert_fixture::<ProfilePrivacyRule>(value)?,
16993 "profile_privacy_policy" => assert_fixture::<ProfilePrivacyPolicy>(value)?,
16994 "mapping_record_model" => assert_fixture::<MappingRecordModel>(value)?,
16995 "mapping" => assert_fixture::<Mapping>(value)?,
16996 "index_detail" => assert_fixture::<IndexDetail>(value)?,
16997 "source_provider" => assert_fixture::<SourceProvider>(value)?,
16998 "source_decoder" => assert_fixture::<SourceDecoder>(value)?,
16999 "source_replay_guarantees" => assert_fixture::<SourceReplayGuarantees>(value)?,
17000 "source_partition_configuration" => assert_fixture::<SourcePartitionConfiguration>(value)?,
17001 "replayable_source_configuration" => assert_fixture::<ReplayableSourceConfiguration>(value)?,
17002 "source_partition_status" => assert_fixture::<SourcePartitionStatus>(value)?,
17003 "replayable_source_status" => assert_fixture::<ReplayableSourceStatus>(value)?,
17004 "source_control_transition" => assert_fixture::<SourceControlTransition>(value)?,
17005 "history_ledger_precondition" => assert_fixture::<HistoryLedgerPrecondition>(value)?,
17006 "history_retention_policy" => assert_fixture::<HistoryRetentionPolicy>(value)?,
17007 "history_selector" => assert_fixture::<HistorySelector>(value)?,
17008 "history_hold" => assert_fixture::<HistoryHold>(value)?,
17009 "history_status" => assert_fixture::<HistoryStatus>(value)?,
17010 "history_resolution" => assert_fixture::<HistoryResolution>(value)?,
17011 "index_reference" => assert_fixture::<IndexReference>(value)?,
17012 "alias_target" => assert_fixture::<AliasTarget>(value)?,
17013 "alias_summary" => assert_fixture::<AliasSummary>(value)?,
17014 "alias_detail" => assert_fixture::<AliasDetail>(value)?,
17015 "data_stream_summary" => assert_fixture::<DataStreamSummary>(value)?,
17016 "component_template_binding" => assert_fixture::<ComponentTemplateBinding>(value)?,
17017 "index_template_binding" => assert_fixture::<IndexTemplateBinding>(value)?,
17018 "lifecycle_policy_binding" => assert_fixture::<LifecyclePolicyBinding>(value)?,
17019 "data_stream_detail" => assert_fixture::<DataStreamDetail>(value)?,
17020 "component_template_summary" => assert_fixture::<ComponentTemplateSummary>(value)?,
17021 "component_template_detail" => assert_fixture::<ComponentTemplateDetail>(value)?,
17022 "index_template_summary" => assert_fixture::<IndexTemplateSummary>(value)?,
17023 "index_template_detail" => assert_fixture::<IndexTemplateDetail>(value)?,
17024 "ingest_pipeline_summary" => assert_fixture::<IngestPipelineSummary>(value)?,
17025 "ingest_pipeline_detail" => assert_fixture::<IngestPipelineDetail>(value)?,
17026 "ingest_pipeline_selection" => assert_fixture::<IngestPipelineSelection>(value)?,
17027 "lifecycle_policy_summary" => assert_fixture::<LifecyclePolicySummary>(value)?,
17028 "rollover_thresholds" => assert_fixture::<RolloverThresholds>(value)?,
17029 "retention_policy" => assert_fixture::<RetentionPolicy>(value)?,
17030 "lifecycle_policy_detail" => assert_fixture::<LifecyclePolicyDetail>(value)?,
17031 "text_query_operator" => assert_fixture::<TextQueryOperator>(value)?,
17032 "text_query_analyzer" => assert_fixture::<TextQueryAnalyzer>(value)?,
17033 "zero_terms_query" => assert_fixture::<ZeroTermsQuery>(value)?,
17034 "text_query_options" => assert_fixture::<TextQueryOptions>(value)?,
17035 "multi_match_mode" => assert_fixture::<MultiMatchMode>(value)?,
17036 "multi_match_field" => assert_fixture::<MultiMatchField>(value)?,
17037 "multi_match_options" => assert_fixture::<MultiMatchOptions>(value)?,
17038 "sort_order" => assert_fixture::<SortOrder>(value)?,
17039 "sort_mode" => assert_fixture::<SortMode>(value)?,
17040 "missing_order" => assert_fixture::<MissingOrder>(value)?,
17041 "nested_score_mode" => assert_fixture::<NestedScoreMode>(value)?,
17042 "nested_inner_hits" => assert_fixture::<NestedInnerHits>(value)?,
17043 "sort_spec" => assert_fixture::<SortSpec>(value)?,
17044 "query" => assert_fixture::<Query>(value)?,
17045 "dense_retrieval_mode" => assert_fixture::<DenseRetrievalMode>(value)?,
17046 "vector_achieved_mode" => assert_fixture::<VectorAchievedMode>(value)?,
17047 "vector_branch_diagnostics" => assert_fixture::<VectorBranchDiagnostics>(value)?,
17048 "dense_vector_element_type" => assert_fixture::<DenseVectorElementType>(value)?,
17049 "dense_vector_byte_order" => assert_fixture::<DenseVectorByteOrder>(value)?,
17050 "vector_value" => assert_fixture::<VectorValue>(value)?,
17051 "sparse_vector_entry" => assert_fixture::<SparseVectorEntry>(value)?,
17052 "sparse_vector_value" => assert_fixture::<SparseVectorValue>(value)?,
17053 "vector_set_value" => assert_fixture::<VectorSetValue>(value)?,
17054 "vector_evaluation_snapshot" => assert_fixture::<VectorEvaluationSnapshot>(value)?,
17055 "vector_evaluation_query_set" => assert_fixture::<VectorEvaluationQuerySet>(value)?,
17056 "vector_evaluation_budget" => assert_fixture::<VectorEvaluationBudget>(value)?,
17057 "vector_candidate_policy" => assert_fixture::<VectorCandidatePolicy>(value)?,
17058 "vector_calibration_objective" => assert_fixture::<VectorCalibrationObjective>(value)?,
17059 "vector_strategy_profile" => assert_fixture::<VectorStrategyProfile>(value)?,
17060 "vector_evaluation_work" => assert_fixture::<VectorEvaluationWork>(value)?,
17061 "vector_evaluation_error_code" => assert_fixture::<VectorEvaluationErrorCode>(value)?,
17062 "vector_evaluation_error" => assert_fixture::<VectorEvaluationError>(value)?,
17063 "vector_recall_result" => assert_fixture::<VectorRecallResult>(value)?,
17064 "vector_calibration_candidate" => assert_fixture::<VectorCalibrationCandidate>(value)?,
17065 "vector_calibration_result" => assert_fixture::<VectorCalibrationResult>(value)?,
17066 "vector_diagnostic_result" => assert_fixture::<VectorDiagnosticResult>(value)?,
17067 "vector_warm_component" => assert_fixture::<VectorWarmComponent>(value)?,
17068 "vector_warm_state" => assert_fixture::<VectorWarmState>(value)?,
17069 "vector_warm_achievement" => assert_fixture::<VectorWarmAchievement>(value)?,
17070 "vector_warm_result" => assert_fixture::<VectorWarmResult>(value)?,
17071 "dense_retrieval_threshold" => assert_fixture::<DenseRetrievalThreshold>(value)?,
17072 "retrieval_branch" => assert_fixture::<RetrievalBranch>(value)?,
17073 "weighted_rrf_fusion" => assert_fixture::<WeightedRrfFusion>(value)?,
17074 "retrieval_plan" => assert_fixture::<RetrievalPlan>(value)?,
17075 "histogram_bounds" => assert_fixture::<HistogramBounds>(value)?,
17076 "date_histogram_bounds" => assert_fixture::<DateHistogramBounds>(value)?,
17077 "approximation_algorithm" => assert_fixture::<ApproximationAlgorithm>(value)?,
17078 "approximation" => assert_fixture::<Approximation>(value)?,
17079 "percentile_value" => assert_fixture::<PercentileValue>(value)?,
17080 "approximate_percentile_value" => assert_fixture::<ApproximatePercentileValue>(value)?,
17081 "time_series_operator" => assert_fixture::<TimeSeriesOperator>(value)?,
17082 "time_series_missing_data" => assert_fixture::<TimeSeriesMissingData>(value)?,
17083 "time_series_quantile_mode" => assert_fixture::<TimeSeriesQuantileMode>(value)?,
17084 "time_series_bucket_state" => assert_fixture::<TimeSeriesBucketState>(value)?,
17085 "time_series_quantile_value" => assert_fixture::<TimeSeriesQuantileValue>(value)?,
17086 "time_series_value" => assert_fixture::<TimeSeriesValue>(value)?,
17087 "time_series_bucket" => assert_fixture::<TimeSeriesBucket>(value)?,
17088 "relationship_traversal_direction" => assert_fixture::<RelationshipTraversalDirection>(value)?,
17089 "relationship_traversal_filter" => assert_fixture::<RelationshipTraversalFilter>(value)?,
17090 "relationship_traversal_budget" => assert_fixture::<RelationshipTraversalBudget>(value)?,
17091 "traversed_relationship" => assert_fixture::<TraversedRelationship>(value)?,
17092 "profile_query_operation" => assert_fixture::<ProfileQueryOperation>(value)?,
17093 "profile_group_by" => assert_fixture::<ProfileGroupBy>(value)?,
17094 "profile_query_filter" => assert_fixture::<ProfileQueryFilter>(value)?,
17095 "profile_query_budget" => assert_fixture::<ProfileQueryBudget>(value)?,
17096 "profile_query_row" => assert_fixture::<ProfileQueryRow>(value)?,
17097 "temporal_input" => assert_fixture::<TemporalInput>(value)?,
17098 "temporal_pattern" => assert_fixture::<TemporalPattern>(value)?,
17099 "historical_temporal_definition" => assert_fixture::<HistoricalTemporalDefinition>(value)?,
17100 "temporal_evidence_status" => assert_fixture::<TemporalEvidenceStatus>(value)?,
17101 "temporal_source_event" => assert_fixture::<TemporalSourceEvent>(value)?,
17102 "temporal_evidence" => assert_fixture::<TemporalEvidence>(value)?,
17103 "continuous_temporal_start" => assert_fixture::<ContinuousTemporalStart>(value)?,
17104 "continuous_temporal_watermark_policy" => assert_fixture::<ContinuousTemporalWatermarkPolicy>(value)?,
17105 "continuous_temporal_late_data_policy" => assert_fixture::<ContinuousTemporalLateDataPolicy>(value)?,
17106 "continuous_temporal_output" => assert_fixture::<ContinuousTemporalOutput>(value)?,
17107 "continuous_temporal_definition" => assert_fixture::<ContinuousTemporalDefinition>(value)?,
17108 "continuous_temporal_frontier" => assert_fixture::<ContinuousTemporalFrontier>(value)?,
17109 "continuous_temporal_available_frontier" => {
17110 assert_fixture::<ContinuousTemporalAvailableFrontier>(value)?
17111 }
17112 "continuous_temporal_gap_reason" => assert_fixture::<ContinuousTemporalGapReason>(value)?,
17113 "continuous_temporal_gap" => assert_fixture::<ContinuousTemporalGap>(value)?,
17114 "continuous_temporal_evaluation" => assert_fixture::<ContinuousTemporalEvaluation>(value)?,
17115 "composite_order" => assert_fixture::<CompositeOrder>(value)?,
17116 "composite_source" => assert_fixture::<CompositeSource>(value)?,
17117 "aggregation" => assert_fixture::<Aggregation>(value)?,
17118 "nested_search_hit" => assert_fixture::<NestedSearchHit>(value)?,
17119 "named_nested_inner_hits_result" => assert_fixture::<NamedNestedInnerHitsResult>(value)?,
17120 "fragment_boundary" => assert_fixture::<FragmentBoundary>(value)?,
17121 "fragment_offset_encoding" => assert_fixture::<FragmentOffsetEncoding>(value)?,
17122 "fragment_ranker" => assert_fixture::<FragmentRanker>(value)?,
17123 "fragment_request" => assert_fixture::<FragmentRequest>(value)?,
17124 "search_fragment" => assert_fixture::<SearchFragment>(value)?,
17125 "numeric_feature_transform" => assert_fixture::<NumericFeatureTransform>(value)?,
17126 "numeric_result_feature" => assert_fixture::<NumericResultFeature>(value)?,
17127 "result_feature_request" => assert_fixture::<ResultFeatureRequest>(value)?,
17128 "result_diversification" => assert_fixture::<ResultDiversification>(value)?,
17129 "branch_score_kind" => assert_fixture::<BranchScoreKind>(value)?,
17130 "result_feature" => assert_fixture::<ResultFeature>(value)?,
17131 "search_hit" => assert_fixture::<SearchHit>(value)?,
17132 "aggregation_bucket" => assert_fixture::<AggregationBucket>(value)?,
17133 "aggregation_result" => assert_fixture::<AggregationResult>(value)?,
17134 "shard_counts" => assert_fixture::<ShardCounts>(value)?,
17135 "total_hits_relation" => assert_fixture::<TotalHitsRelation>(value)?,
17136 "search_total" => assert_fixture::<SearchTotal>(value)?,
17137 "search_execution_freshness" => assert_fixture::<SearchExecutionFreshness>(value)?,
17138 "search_freshness" => assert_fixture::<SearchFreshness>(value)?,
17139 "search_degradation_reason" => assert_fixture::<SearchDegradationReason>(value)?,
17140 "search_achievement" => assert_fixture::<SearchAchievement>(value)?,
17141 "search_failure_stage" => assert_fixture::<SearchFailureStage>(value)?,
17142 "search_failure_reason" => assert_fixture::<SearchFailureReason>(value)?,
17143 "collection_shard" => assert_fixture::<CollectionShard>(value)?,
17144 "search_partial_failure" => assert_fixture::<SearchPartialFailure>(value)?,
17145 "artifact" => assert_fixture::<Artifact>(value)?,
17146 "portability_storage_capability" => assert_fixture::<PortabilityStorageCapability>(value)?,
17147 "collection_export_artifact" => assert_fixture::<CollectionExportArtifact>(value)?,
17148 "index_transfer_page" => assert_fixture::<IndexTransferPage>(value)?,
17149 "index_transfer_artifact" => assert_fixture::<IndexTransferArtifact>(value)?,
17150 "search_validation_bound" => assert_fixture::<SearchValidationBound>(value)?,
17151 "search_validation_estimates" => assert_fixture::<SearchValidationEstimates>(value)?,
17152 "search_validation_limit" => assert_fixture::<SearchValidationLimit>(value)?,
17153 "operation_kind" => assert_fixture::<OperationKind>(value)?,
17154 "operation_authority" => assert_fixture::<OperationAuthority>(value)?,
17155 "operation_target" => assert_fixture::<OperationTarget>(value)?,
17156 "operation_state" => assert_fixture::<OperationState>(value)?,
17157 "operation_pending_state" => assert_fixture::<OperationPendingState>(value)?,
17158 "operation_progress_unit" => assert_fixture::<OperationProgressUnit>(value)?,
17159 "operation_progress" => assert_fixture::<OperationProgress>(value)?,
17160 "operation_result" => assert_fixture::<OperationResult>(value)?,
17161 "operation_failure" => assert_fixture::<OperationFailure>(value)?,
17162 "operation_cancellation" => assert_fixture::<OperationCancellation>(value)?,
17163 "operation_retention_state" => assert_fixture::<OperationRetentionState>(value)?,
17164 "operation_retention" => assert_fixture::<OperationRetention>(value)?,
17165 "operation" => assert_fixture::<Operation>(value)?,
17166 "write_durability_boundary" => assert_fixture::<WriteDurabilityBoundary>(value)?,
17167 "write_visibility_mode" => assert_fixture::<WriteVisibilityMode>(value)?,
17168 "write_response_stage" => assert_fixture::<WriteResponseStage>(value)?,
17169 "write_achievement" => assert_fixture::<WriteAchievement>(value)?,
17170 "mutation_commit_position" => assert_fixture::<MutationCommitPosition>(value)?,
17171 "mutation_commit_receipt" => assert_fixture::<MutationCommitReceipt>(value)?,
17172 "mutation_resolver" => assert_fixture::<MutationResolver>(value)?,
17173 "mutation_outcome" => assert_fixture::<MutationOutcome>(value)?,
17174 "submission_state" => assert_fixture::<SubmissionState>(value)?,
17175 "expected_binding" => assert_fixture::<ExpectedBinding>(value)?,
17176 "administration_alias_action" => assert_fixture::<AdministrationAliasAction>(value)?,
17177 "administration_mutation" => assert_fixture::<AdministrationMutation>(value)?,
17178 "administration_outcome" => assert_fixture::<AdministrationOutcome>(value)?,
17179 "index_change_apply_receipt" => assert_fixture::<IndexChangeApplyReceipt>(value)?,
17180 "bulk_document_item" => assert_fixture::<BulkDocumentItem>(value)?,
17181 "bulk_document_item_outcome" => assert_fixture::<BulkDocumentItemOutcome>(value)?,
17182 "bulk_document_outcome" => assert_fixture::<BulkDocumentOutcome>(value)?,
17183 "metric_attribute_value" => assert_fixture::<MetricAttributeValue>(value)?,
17184 "metric_attribute" => assert_fixture::<MetricAttribute>(value)?,
17185 "metric_number" => assert_fixture::<MetricNumber>(value)?,
17186 "metric_temporality" => assert_fixture::<MetricTemporality>(value)?,
17187 "metric_point_kind" => assert_fixture::<MetricPointKind>(value)?,
17188 "metric_exponential_buckets" => assert_fixture::<MetricExponentialBuckets>(value)?,
17189 "metric_data" => assert_fixture::<MetricData>(value)?,
17190 "metric_instrumentation_scope" => assert_fixture::<MetricInstrumentationScope>(value)?,
17191 "metric_exemplar" => assert_fixture::<MetricExemplar>(value)?,
17192 "metric_point" => assert_fixture::<MetricPoint>(value)?,
17193 "entity_ref" => assert_fixture::<EntityRef>(value)?,
17194 "relationship_evidence_ref" => assert_fixture::<RelationshipEvidenceRef>(value)?,
17195 "relationship_directionality" => assert_fixture::<RelationshipDirectionality>(value)?,
17196 "relationship_record" => assert_fixture::<RelationshipRecord>(value)?,
17197 "profile_label" => assert_fixture::<ProfileLabel>(value)?,
17198 "profile_sample_type" => assert_fixture::<ProfileSampleType>(value)?,
17199 "profile_mapping" => assert_fixture::<ProfileMapping>(value)?,
17200 "profile_function" => assert_fixture::<ProfileFunction>(value)?,
17201 "profile_line" => assert_fixture::<ProfileLine>(value)?,
17202 "profile_location" => assert_fixture::<ProfileLocation>(value)?,
17203 "profile_stack" => assert_fixture::<ProfileStack>(value)?,
17204 "profile_sample" => assert_fixture::<ProfileSample>(value)?,
17205 "profile_instrumentation_scope" => assert_fixture::<ProfileInstrumentationScope>(value)?,
17206 "profile_batch" => assert_fixture::<ProfileBatch>(value)?,
17207 "native_record" => assert_fixture::<NativeRecord>(value)?,
17208 "retained_append_item" => assert_fixture::<RetainedAppendItem>(value)?,
17209 "retained_append_state" => assert_fixture::<RetainedAppendState>(value)?,
17210 "retained_append_retry_safety" => assert_fixture::<RetainedAppendRetrySafety>(value)?,
17211 "retained_append_item_outcome" => assert_fixture::<RetainedAppendItemOutcome>(value)?,
17212 "retained_append_bulk_outcome" => assert_fixture::<RetainedAppendBulkOutcome>(value)?,
17213 "retained_append_observation_state" => assert_fixture::<RetainedAppendObservationState>(value)?,
17214 "retained_append_observation_outcome" => assert_fixture::<RetainedAppendObservationOutcome>(value)?,
17215 "binary_value" => assert_fixture::<BinaryValue>(value)?,
17216 "state_hash_field" => assert_fixture::<StateHashField>(value)?,
17217 "state_set_entry" => assert_fixture::<StateSetEntry>(value)?,
17218 "state_set_condition" => assert_fixture::<StateSetCondition>(value)?,
17219 "state_operation" => assert_fixture::<StateOperation>(value)?,
17220 "state_optional_value" => assert_fixture::<StateOptionalValue>(value)?,
17221 "state_command_result" => assert_fixture::<StateCommandResult>(value)?,
17222 "state_write_resolution" => assert_fixture::<StateWriteResolution>(value)?,
17223 "service_credential_reservation" => assert_fixture::<ServiceCredentialReservation>(value)?,
17224 "subscription_metadata_field" => assert_fixture::<SubscriptionMetadataField>(value)?,
17225 "subscription_field" => assert_fixture::<SubscriptionField>(value)?,
17226 "subscription_filter" => assert_fixture::<SubscriptionFilter>(value)?,
17227 "subscription_cursor_entry" => assert_fixture::<SubscriptionCursorEntry>(value)?,
17228 "subscription_route" => assert_fixture::<SubscriptionRoute>(value)?,
17229 "subscription_start_position" => assert_fixture::<SubscriptionStartPosition>(value)?,
17230 "subscription_start" => assert_fixture::<SubscriptionStart>(value)?,
17231 "subscription_accepted" => assert_fixture::<SubscriptionAccepted>(value)?,
17232 "subscription_writer_fence" => assert_fixture::<SubscriptionWriterFence>(value)?,
17233 "subscription_event" => assert_fixture::<SubscriptionEvent>(value)?,
17234 "subscription_heartbeat" => assert_fixture::<SubscriptionHeartbeat>(value)?,
17235 "subscription_gap" => assert_fixture::<SubscriptionGap>(value)?,
17236 "subscription_terminal_reason" => assert_fixture::<SubscriptionTerminalReason>(value)?,
17237 "subscription_terminal" => assert_fixture::<SubscriptionTerminal>(value)?,
17238 "subscription_frame" => assert_fixture::<SubscriptionFrame>(value)?,
17239 "stream_binding" => assert_fixture::<StreamBinding>(value)?,
17240 "capability_grant" => assert_fixture::<CapabilityGrant>(value)?,
17241 "protocol_limit" => assert_fixture::<ProtocolLimit>(value)?,
17242 "document_mutation_condition" => assert_fixture::<DocumentMutationCondition>(value)?,
17243 "audit_adapter" => assert_fixture::<AuditAdapter>(value)?,
17244 "audit_decision" => assert_fixture::<AuditDecision>(value)?,
17245 "audit_outcome" => assert_fixture::<AuditOutcome>(value)?,
17246 "audit_detail" => assert_fixture::<AuditDetail>(value)?,
17247 "audit_gap_reason" => assert_fixture::<AuditGapReason>(value)?,
17248 "audit_event" => assert_fixture::<AuditEvent>(value)?,
17249 "audit_gap" => assert_fixture::<AuditGap>(value)?,
17250 "audit_stream_state" => assert_fixture::<AuditStreamState>(value)?,
17251 "service_credential_grant" => assert_fixture::<ServiceCredentialGrant>(value)?,
17252 "service_credential_summary" => assert_fixture::<ServiceCredentialSummary>(value)?,
17253 "security_role" => assert_fixture::<SecurityRole>(value)?,
17254 "role_append_scope_change" => assert_fixture::<RoleAppendScopeChange>(value)?,
17255 "role_append_access_preparation" => assert_fixture::<RoleAppendAccessPreparation>(value)?,
17256 "security_action_outcome" => assert_fixture::<SecurityActionOutcome>(value)?,
17257 "maintenance_work_state" => assert_fixture::<MaintenanceWorkState>(value)?,
17258 "maintenance_attempt_state" => assert_fixture::<MaintenanceAttemptState>(value)?,
17259 "maintenance_failure_class" => assert_fixture::<MaintenanceFailureClass>(value)?,
17260 "maintenance_failure_class_count" => assert_fixture::<MaintenanceFailureClassCount>(value)?,
17261 "maintenance_attempt_observation" => assert_fixture::<MaintenanceAttemptObservation>(value)?,
17262 "maintenance_task_scope" => assert_fixture::<MaintenanceTaskScope>(value)?,
17263 "maintenance_task_status" => assert_fixture::<MaintenanceTaskStatus>(value)?,
17264 "maintenance_status_aggregate" => assert_fixture::<MaintenanceStatusAggregate>(value)?,
17265 "runtime_status_detail" => assert_fixture::<RuntimeStatusDetail>(value)?,
17266 "result_cache_status" => assert_fixture::<ResultCacheStatus>(value)?,
17267 "field_promotion_status" => assert_fixture::<FieldPromotionStatus>(value)?,
17268 "overload_shard_status" => assert_fixture::<OverloadShardStatus>(value)?,
17269 "external_key_binding" => assert_fixture::<ExternalKeyBinding>(value)?,
17270 "rollup_measure" => assert_fixture::<RollupMeasure>(value)?,
17271 "aggregate_then_delete_policy" => assert_fixture::<AggregateThenDeletePolicy>(value)?,
17272 "lifecycle_binding_status" => assert_fixture::<LifecycleBindingStatus>(value)?,
17273 "lifecycle_rollup_status" => assert_fixture::<LifecycleRollupStatus>(value)?,
17274 "lifecycle_status" => assert_fixture::<LifecycleStatus>(value)?,
17275 "quota_limit" => assert_fixture::<QuotaLimit>(value)?,
17276 "quota_consumption" => assert_fixture::<QuotaConsumption>(value)?,
17277 "quota_update" => assert_fixture::<QuotaUpdate>(value)?,
17278 "storage_overall_posture" => assert_fixture::<StorageOverallPosture>(value)?,
17279 "storage_profile_role" => assert_fixture::<StorageProfileRole>(value)?,
17280 "storage_provider_posture" => assert_fixture::<StorageProviderPosture>(value)?,
17281 "storage_backend_service_class" => assert_fixture::<StorageBackendServiceClass>(value)?,
17282 "storage_profile_role_binding" => assert_fixture::<StorageProfileRoleBinding>(value)?,
17283 "storage_profile_attestation" => assert_fixture::<StorageProfileAttestation>(value)?,
17284 "storage_profile_expectation" => assert_fixture::<StorageProfileExpectation>(value)?,
17285 "core_binding" => assert_fixture::<CoreBinding>(value)?,
17286 "readiness_observation" => assert_fixture::<ReadinessObservation>(value)?,
17287 "usage_dimension" => assert_fixture::<UsageDimension>(value)?,
17288 "physical_usage_value" => assert_fixture::<PhysicalUsageValue>(value)?,
17289 "core_usage_units" => assert_fixture::<CoreUsageUnits>(value)?,
17290 "core_usage_correction" => assert_fixture::<CoreUsageCorrection>(value)?,
17291 "response_meta" => assert_fixture::<ResponseMeta>(value)?,
17292 "error_disposition" => assert_fixture::<ErrorDisposition>(value)?,
17293 "recovery_action" => assert_fixture::<RecoveryAction>(value)?,
17294 "limit_class" => assert_fixture::<LimitClass>(value)?,
17295 "error_detail" => assert_fixture::<ErrorDetail>(value)?,
17296 "connection_profile" => assert_fixture::<ConnectionProfile>(value)?,
17297 _ => return Err("fixture names an unknown generated type".into()),
17298 }
17299 }
17300 Ok(())
17301 }
17302 #[test]
17303 fn every_aggregation_variant_has_a_canonical_fixture() -> Result<(), Box<dyn std::error::Error>> {
17304 let document: serde_json::Value =
17305 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
17306 let fixtures = document["aggregation_variants"]
17307 .as_object()
17308 .ok_or("aggregation fixtures are not an object")?;
17309 assert_eq!(fixtures.len(), 17);
17310 for value in fixtures.values() {
17311 assert_fixture::<Aggregation>(value)?;
17312 }
17313 Ok(())
17314 }
17315 #[test]
17316 fn every_versioned_union_variant_has_a_canonical_fixture() -> Result<(), Box<dyn std::error::Error>> {
17317 let document: serde_json::Value =
17318 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
17319 let fixtures = document["versioned_union_variants"]
17320 .as_object()
17321 .ok_or("versioned union fixtures are not an object")?;
17322 assert_eq!(fixtures.len(), 6);
17323 for (name, value) in fixtures {
17324 match name.as_str() {
17325 "mapping_field_type.vector" => assert_fixture::<MappingFieldType>(value)?,
17326 "mapping_field_type.sparse_vector" => assert_fixture::<MappingFieldType>(value)?,
17327 "mapping_field_type.vector_set" => assert_fixture::<MappingFieldType>(value)?,
17328 "mapping_record_model.metric_v1" => assert_fixture::<MappingRecordModel>(value)?,
17329 "mapping_record_model.relationship_v1" => assert_fixture::<MappingRecordModel>(value)?,
17330 "mapping_record_model.profile_v1" => assert_fixture::<MappingRecordModel>(value)?,
17331 _ => return Err("fixture names an unknown versioned union variant".into()),
17332 }
17333 }
17334 Ok(())
17335 }
17336 #[test]
17337 fn exact_scalar_canonicality_is_closed() {
17338 assert_eq!(
17339 U64 {
17340 value: u64::MAX.to_string()
17341 }
17342 .validate(),
17343 Ok(())
17344 );
17345 assert_eq!(
17346 I64 {
17347 value: i64::MIN.to_string()
17348 }
17349 .validate(),
17350 Ok(())
17351 );
17352 assert_eq!(U64 { value: "01".to_owned() }.validate(), Err(ScalarError::InvalidU64));
17353 assert_eq!(
17354 ExactDecimal {
17355 coefficient: "12345".to_owned(),
17356 scale: 2
17357 }
17358 .validate(),
17359 Ok(())
17360 );
17361 assert_eq!(
17362 ExactDecimal {
17363 coefficient: "123450".to_owned(),
17364 scale: 3
17365 }
17366 .validate(),
17367 Err(ScalarError::InvalidDecimal)
17368 );
17369 assert_eq!(
17370 ExactDecimal {
17371 coefficient: "1".to_owned(),
17372 scale: 1_025
17373 }
17374 .validate(),
17375 Err(ScalarError::InvalidDecimal)
17376 );
17377 }
17378 #[test]
17379 fn scalar_decoders_refuse_numbers_and_noncanonical_strings() {
17380 assert!(serde_json::from_str::<U64>("9007199254740993").is_err());
17381 assert!(serde_json::from_str::<U64>(r#""01""#).is_err());
17382 assert!(serde_json::from_str::<Identity>(r#""0123456789ABCDEF0123456789ABCDEF""#).is_err());
17383 assert!(serde_json::from_str::<Digest>(r#""0123456789abcdef0123456789abcdef""#).is_err());
17384 assert!(serde_json::from_str::<ExactDecimal>(r#"{"coefficient":"123450","scale":3}"#).is_err());
17385 assert!(serde_json::from_str::<ApproximateNumber>(r#""1.0""#).is_err());
17386 }
17387 #[test]
17388 fn semantic_json_rejects_duplicate_fields() {
17389 let value = JsonValue::Object(vec![
17390 JsonField {
17391 name: "x".to_owned(),
17392 value: JsonValue::Null,
17393 },
17394 JsonField {
17395 name: "x".to_owned(),
17396 value: JsonValue::Bool(true),
17397 },
17398 ]);
17399 assert_eq!(validate_semantic_json(&value), Err(JsonError::DuplicateObjectField));
17400 }
17401 #[test]
17402 fn strict_generated_shapes_refuse_malformed_duplicate_unknown_field_and_tag() {
17403 assert!(serde_json::from_str::<DiscoverRequest>(r#"{"unexpected":true}"#).is_err());
17404 assert!(serde_json::from_str::<Cursor>(r#"{"value":"a","value":"b"}"#).is_err());
17405 assert!(serde_json::from_str::<Query>(r#"{"kind":"future_query"}"#).is_err());
17406 assert!(serde_json::from_str::<Cursor>(r#"{"value":1}"#).is_err());
17407 }
17408 fn admitted_error_detail(code: ErrorCode) -> ErrorDetail {
17409 match code {
17410 ErrorCode::Aborted => ErrorDetail::Aborted {
17411 reason: "test".to_owned(),
17412 },
17413 ErrorCode::DeadlineExceeded => ErrorDetail::DeadlineExceeded,
17414 ErrorCode::InvalidRequest => ErrorDetail::InvalidRequest {
17415 field: None,
17416 reason: "test".to_owned(),
17417 },
17418 ErrorCode::UnsupportedVersion => ErrorDetail::UnsupportedVersion {
17419 observed: 1,
17420 maximum_supported: 1,
17421 },
17422 ErrorCode::Unauthenticated => ErrorDetail::Unauthenticated,
17423 ErrorCode::PermissionDenied => ErrorDetail::PermissionDenied {
17424 action: None,
17425 workload_class: None,
17426 },
17427 ErrorCode::NotFound => ErrorDetail::NotFound { resource: None },
17428 ErrorCode::Conflict => ErrorDetail::Conflict {
17429 expected_revision: None,
17430 observed_revision: None,
17431 },
17432 ErrorCode::StaleCursor => ErrorDetail::StaleCursor { restart_count: 0 },
17433 ErrorCode::RestartBudgetExhausted => ErrorDetail::RestartBudgetExhausted { maximum_restarts: 0 },
17434 ErrorCode::LimitExceeded => ErrorDetail::LimitExceeded {
17435 class: LimitClass::RequestBound,
17436 limit_id: "test".to_owned(),
17437 maximum: U64 { value: "0".to_owned() },
17438 },
17439 ErrorCode::CapabilityUnavailable => ErrorDetail::CapabilityUnavailable { capability: None },
17440 ErrorCode::NotSubmitted => ErrorDetail::NotSubmitted {
17441 retry_after_millis: None,
17442 },
17443 ErrorCode::SubmittedIndeterminate => ErrorDetail::SubmittedIndeterminate { locator: None },
17444 ErrorCode::ExpiredUnknown => ErrorDetail::ExpiredUnknown { locator: None },
17445 ErrorCode::SecretNotEscrowed => ErrorDetail::SecretNotEscrowed,
17446 ErrorCode::RetentionGap => ErrorDetail::RetentionGap {
17447 retired_through: U64 { value: "0".to_owned() },
17448 },
17449 ErrorCode::ArtifactRangeInvalid => ErrorDetail::ArtifactRangeInvalid {
17450 maximum_bytes: U64 { value: "0".to_owned() },
17451 },
17452 ErrorCode::ChecksumMismatch => ErrorDetail::ChecksumMismatch {
17453 expected: Digest { value: "0".repeat(64) },
17454 observed: Digest { value: "0".repeat(64) },
17455 },
17456 ErrorCode::TemporarilyUnavailable => ErrorDetail::TemporarilyUnavailable {
17457 retry_after_millis: None,
17458 },
17459 ErrorCode::Internal => ErrorDetail::Internal,
17460 }
17461 }
17462 #[test]
17463 fn every_admitted_error_outcome_is_constructible_and_invalid_combinations_fail_closed() {
17464 let mut codes = std::collections::BTreeSet::new();
17465 for contract in LODESTONE_API_ERROR_OUTCOMES {
17466 codes.insert(format!("{:?}", contract.code));
17467 assert_eq!(
17468 ErrorBody::try_new(
17469 contract.code,
17470 "test".to_owned(),
17471 contract.disposition,
17472 contract.recovery,
17473 admitted_error_detail(contract.code)
17474 ),
17475 Ok(ErrorBody {
17476 code: contract.code,
17477 message: "test".to_owned(),
17478 disposition: contract.disposition,
17479 recovery: contract.recovery,
17480 details: admitted_error_detail(contract.code)
17481 })
17482 );
17483 }
17484 assert_eq!(codes.len(), 21);
17485 assert_eq!(
17486 ErrorBody::try_new(
17487 ErrorCode::Aborted,
17488 "test".to_owned(),
17489 ErrorDisposition::NotSubmitted,
17490 RecoveryAction::Stop,
17491 admitted_error_detail(ErrorCode::Aborted)
17492 ),
17493 Err(ErrorShapeError::OutcomeMismatch)
17494 );
17495 assert_eq!(
17496 ErrorBody::try_new(
17497 ErrorCode::Aborted,
17498 "test".to_owned(),
17499 ErrorDisposition::NotSubmitted,
17500 RecoveryAction::Retry,
17501 ErrorDetail::Internal
17502 ),
17503 Err(ErrorShapeError::DetailCodeMismatch)
17504 );
17505 assert_eq!(
17506 ErrorBody::try_new(
17507 ErrorCode::TemporarilyUnavailable,
17508 "test".to_owned(),
17509 ErrorDisposition::NotSubmitted,
17510 RecoveryAction::RetryAfter,
17511 ErrorDetail::TemporarilyUnavailable {
17512 retry_after_millis: Some(U64 {
17513 value: "60001".to_owned()
17514 })
17515 }
17516 ),
17517 Err(ErrorShapeError::RetryAfterOutOfRange)
17518 );
17519 }
17520 #[test]
17521 fn registries_match_the_idl() {
17522 assert_eq!(LODESTONE_API_COMMAND_CONTRACTS.len(), 120);
17523 assert_eq!(LODESTONE_API_COMMAND_SEMANTICS.len(), 120);
17524 assert_eq!(LODESTONE_API_COMMAND_OUTCOMES.len(), 120);
17525 assert_eq!(LODESTONE_API_ERROR_CODES.len(), 21);
17526 assert_eq!(LODESTONE_API_ERROR_OUTCOMES.len(), 28);
17527 assert_eq!(LODESTONE_API_TYPE_CONTRACTS.len(), 334);
17528 assert_eq!(LODESTONE_API_STREAM_CONTRACTS.len(), 1);
17529 assert_eq!(LODESTONE_API_LIMITS.len(), 116);
17530 assert_eq!(LODESTONE_API_CLUSTER_CONTROL_ACTIONS.len(), 23);
17531 assert_eq!(LODESTONE_API_CLUSTER_CONTROL_TYPES.len(), 10);
17532 }
17533 #[test]
17534 fn mutation_outcome_metadata_matches_submission_boundaries() {
17535 for (command, outcome) in LODESTONE_API_COMMAND_CONTRACTS
17536 .iter()
17537 .zip(LODESTONE_API_COMMAND_OUTCOMES)
17538 {
17539 assert_eq!(command.command, outcome.command);
17540 let submits = !matches!(command.mutation, "read_only" | "read_only_prepare" | "catalog_prepare");
17541 assert_eq!(outcome.possible_submission_states.contains(&"submitted"), submits);
17542 assert_eq!(outcome.possible_submission_states.contains(&"indeterminate"), submits);
17543 assert_eq!(
17544 outcome.cancellation == "per_call_until_submission_then_resolve",
17545 submits
17546 );
17547 }
17548 for command in [
17549 Command::ReserveServiceCredential,
17550 Command::ReserveServiceCredentialRotation,
17551 ] {
17552 let outcome = LODESTONE_API_COMMAND_OUTCOMES
17553 .iter()
17554 .find(|outcome| outcome.command == command);
17555 assert!(
17556 matches!(outcome, Some(value) if value.identity_requirement == "caller_action_id" && value.resolver_command == Some(Command::ResolveServiceCredentialReservation))
17557 );
17558 }
17559 }
17560}