1use serde::{Deserialize, Serialize};
5mod bulk_batch_id;
6mod document_mutation_semantic_digest;
7pub use bulk_batch_id::{BulkBatchIdError, bulk_batch_id};
8pub use document_mutation_semantic_digest::{DocumentMutationSemanticDigestError, document_mutation_semantic_digest};
9
10pub const LODESTONE_API_SCHEMA_ID: &str = "lodestone-api";
11pub const LODESTONE_API_SPEC_SHA256: &str = "ccbe3b18498a1eb32c6204f3a950d5b17c784ae34123b056c4925cb321adc693";
12pub const LODESTONE_API_FORMAT_VERSION: u16 = 4;
13pub const LODESTONE_API_ALPN: &str = "lodestone";
14pub const BULK_BATCH_ID_FORMAT_VERSION: u16 = 2;
15pub const BULK_BATCH_ID_DOMAIN: &[u8] = b"lodestone/bulk-batch\0";
16pub const DOCUMENT_MUTATION_SEMANTIC_DIGEST_FORMAT_VERSION: u16 = 1;
17pub const DOCUMENT_MUTATION_SEMANTIC_DIGEST_DOMAIN: &[u8] = b"lodestone/document-mutation-recovery/v1\0";
18pub const LODESTONE_API_MAX_OPERATION_WAIT_ATTEMPTS: u32 = 100;
19pub const LODESTONE_API_MAX_OPERATION_WAIT_INTERVAL_MILLIS: u64 = 60000;
20
21#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
22#[serde(transparent)]
23pub struct I64 {
24 pub value: String,
25}
26#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
27#[serde(transparent)]
28pub struct U64 {
29 pub value: String,
30}
31#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
32#[serde(transparent)]
33pub struct Identity {
34 pub value: String,
35}
36#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
37#[serde(transparent)]
38pub struct Digest {
39 pub value: String,
40}
41#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
42pub struct ExactDecimal {
43 pub coefficient: String,
44 pub scale: u32,
45}
46#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
47#[serde(transparent)]
48pub struct ApproximateNumber {
49 pub canonical_value: String,
50}
51#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
52#[serde(deny_unknown_fields)]
53pub struct RawJson {
54 pub bytes_base64: String,
55}
56#[derive(Clone, Copy, Debug, Eq, PartialEq)]
57pub enum ScalarError {
58 InvalidI64,
59 InvalidU64,
60 InvalidIdentity,
61 InvalidDigest,
62 InvalidDecimal,
63 InvalidApproximateNumber,
64}
65impl std::fmt::Display for ScalarError {
66 fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
67 write!(formatter, "invalid Lodestone API scalar: {self:?}")
68 }
69}
70impl I64 {
71 pub fn validate(&self) -> Result<(), ScalarError> {
72 self.value
73 .parse::<i64>()
74 .ok()
75 .filter(|parsed| parsed.to_string() == self.value)
76 .map(|_| ())
77 .ok_or(ScalarError::InvalidI64)
78 }
79}
80impl U64 {
81 pub fn validate(&self) -> Result<(), ScalarError> {
82 self.value
83 .parse::<u64>()
84 .ok()
85 .filter(|parsed| parsed.to_string() == self.value)
86 .map(|_| ())
87 .ok_or(ScalarError::InvalidU64)
88 }
89}
90impl Identity {
91 pub fn validate(&self) -> Result<(), ScalarError> {
92 (self.value.len() == 32
93 && self
94 .value
95 .bytes()
96 .all(|byte| byte.is_ascii_digit() || (b'a'..=b'f').contains(&byte)))
97 .then_some(())
98 .ok_or(ScalarError::InvalidIdentity)
99 }
100}
101impl Digest {
102 pub fn validate(&self) -> Result<(), ScalarError> {
103 (self.value.len() == 64
104 && self
105 .value
106 .bytes()
107 .all(|byte| byte.is_ascii_digit() || (b'a'..=b'f').contains(&byte)))
108 .then_some(())
109 .ok_or(ScalarError::InvalidDigest)
110 }
111}
112impl ExactDecimal {
113 pub fn validate(&self) -> Result<(), ScalarError> {
114 let unsigned = self.coefficient.strip_prefix('-').unwrap_or(&self.coefficient);
115 let canonical = self.coefficient == "0"
116 || (!unsigned.is_empty()
117 && !unsigned.starts_with('0')
118 && unsigned.bytes().all(|byte| byte.is_ascii_digit()));
119 (canonical
120 && self.coefficient != "-0"
121 && self.scale <= 1024
122 && (self.scale == 0 || !self.coefficient.ends_with('0')))
123 .then_some(())
124 .ok_or(ScalarError::InvalidDecimal)
125 }
126}
127impl ApproximateNumber {
128 pub fn validate(&self) -> Result<(), ScalarError> {
129 self.canonical_value
130 .parse::<f64>()
131 .ok()
132 .filter(|parsed| {
133 parsed.is_finite() && self.canonical_value != "-0" && parsed.to_string() == self.canonical_value
134 })
135 .map(|_| ())
136 .ok_or(ScalarError::InvalidApproximateNumber)
137 }
138}
139macro_rules! deserialize_validated_string_scalar {
140 ($type:ty) => {
141 impl<'de> Deserialize<'de> for $type {
142 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
143 where
144 D: serde::Deserializer<'de>,
145 {
146 let value = String::deserialize(deserializer)?;
147 let scalar = Self { value };
148 scalar.validate().map_err(serde::de::Error::custom)?;
149 Ok(scalar)
150 }
151 }
152 };
153}
154deserialize_validated_string_scalar!(I64);
155deserialize_validated_string_scalar!(U64);
156deserialize_validated_string_scalar!(Identity);
157deserialize_validated_string_scalar!(Digest);
158impl<'de> Deserialize<'de> for ExactDecimal {
159 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
160 where
161 D: serde::Deserializer<'de>,
162 {
163 #[derive(Deserialize)]
164 #[serde(deny_unknown_fields)]
165 struct Wire {
166 coefficient: String,
167 scale: u32,
168 }
169 let wire = Wire::deserialize(deserializer)?;
170 let scalar = Self {
171 coefficient: wire.coefficient,
172 scale: wire.scale,
173 };
174 scalar.validate().map_err(serde::de::Error::custom)?;
175 Ok(scalar)
176 }
177}
178impl<'de> Deserialize<'de> for ApproximateNumber {
179 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
180 where
181 D: serde::Deserializer<'de>,
182 {
183 let canonical_value = String::deserialize(deserializer)?;
184 let scalar = Self { canonical_value };
185 scalar.validate().map_err(serde::de::Error::custom)?;
186 Ok(scalar)
187 }
188}
189#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
190#[serde(tag = "kind", content = "value", rename_all = "snake_case")]
191pub enum JsonValue {
192 Null,
193 Bool(bool),
194 String(String),
195 I64(I64),
196 U64(U64),
197 ExactDecimal(ExactDecimal),
198 Approximate(ApproximateNumber),
199 Array(Vec<JsonValue>),
200 Object(Vec<JsonField>),
201}
202#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
203#[serde(deny_unknown_fields)]
204pub struct JsonField {
205 pub name: String,
206 pub value: JsonValue,
207}
208#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
209#[serde(rename_all = "snake_case")]
210pub enum Action {
211 IdentityDiscovery,
212 DataRead,
213 DataWrite,
214 Append,
215 ResolveAppend,
216 IndexAdmin,
217 CatalogRead,
218 TaskRead,
219 SubscriptionRead,
220 DiagnosticsRead,
221 DiagnosticsCreate,
222 SecurityRead,
223 SecurityAdmin,
224 AuditRead,
225 QuotaRead,
226 QuotaAdmin,
227 BindingRead,
228 LifecycleAdmin,
229 AdmissionRead,
230 AdmissionAdmin,
231 UsageRead,
232 OperationRead,
233 OperationCancel,
234 CollectionExport,
235 CollectionRestore,
236 CollectionTransferExport,
237 CollectionTransferRestore,
238 IndexExport,
239 IndexImport,
240}
241
242#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
243#[serde(rename_all = "snake_case")]
244pub enum ErrorCode {
245 Aborted,
246 DeadlineExceeded,
247 InvalidRequest,
248 UnsupportedVersion,
249 Unauthenticated,
250 PermissionDenied,
251 NotFound,
252 Conflict,
253 StaleCursor,
254 RestartBudgetExhausted,
255 LimitExceeded,
256 CapabilityUnavailable,
257 NotSubmitted,
258 SubmittedIndeterminate,
259 ExpiredUnknown,
260 SecretNotEscrowed,
261 RetentionGap,
262 ArtifactRangeInvalid,
263 ChecksumMismatch,
264 TemporarilyUnavailable,
265 Internal,
266}
267
268#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
269#[serde(rename_all = "snake_case")]
270pub enum Command {
271 Discover,
272 ListIndexes,
273 GetIndex,
274 ValidateIndexChange,
275 ApplyIndexChange,
276 ResolveIndexChange,
277 ApplyAdministrationMutation,
278 ListAliases,
279 GetAlias,
280 ListDataStreams,
281 GetDataStream,
282 ListComponentTemplates,
283 GetComponentTemplate,
284 ListIndexTemplates,
285 GetIndexTemplate,
286 ListIngestPipelines,
287 GetIngestPipeline,
288 SimulateIngestPipeline,
289 ReprocessByQuery,
290 ListLifecyclePolicies,
291 GetLifecyclePolicy,
292 PrepareCreateIndex,
293 PrepareDeleteIndex,
294 SubmitCatalogAction,
295 ResolveCatalogAction,
296 PrepareReplayableSourceIndex,
297 SubmitReplayableSourceIndex,
298 GetReplayableSource,
299 ControlReplayableSource,
300 CloneIndex,
301 ConfigureHistory,
302 GetHistory,
303 ResolveHistory,
304 PlaceHistoryHold,
305 ReleaseHistoryHold,
306 PrepareDocumentMutation,
307 SubmitDocumentMutation,
308 PrepareDocumentBulk,
309 SubmitDocumentBulk,
310 ResolveDocumentBulk,
311 PrepareAppendBulk,
312 SubmitAppendBulk,
313 ResolveAppendBulk,
314 ObserveAppendCommitted,
315 ResolveDocumentMutation,
316 GetDocument,
317 Search,
318 TraverseRelationships,
319 QueryProfiles,
320 EvaluateTemporalEvidence,
321 CreateContinuousTemporalEvaluation,
322 GetContinuousTemporalEvaluation,
323 PauseContinuousTemporalEvaluation,
324 ResumeContinuousTemporalEvaluation,
325 ReplaceContinuousTemporalEvaluation,
326 RetireContinuousTemporalEvaluation,
327 ReadContinuousTemporalEvidence,
328 ValidateSearch,
329 OpenPit,
330 RenewPit,
331 ClosePit,
332 ListOperations,
333 GetOperation,
334 WaitOperation,
335 CancelOperation,
336 ListAuditEvents,
337 ExportAuditEvents,
338 ReserveServiceCredential,
339 ReserveServiceCredentialRotation,
340 ActivateServiceCredential,
341 ResolveServiceCredentialReservation,
342 PrepareRevokeServiceCredential,
343 RevokeServiceCredential,
344 ResolveSecurityAction,
345 GetSecurityRole,
346 PrepareRoleAppendAccessChange,
347 SubmitRoleAppendAccessChange,
348 ListServiceCredentials,
349 GetRuntimeStatus,
350 GetResultCacheStatus,
351 GetFieldPromotionStatus,
352 GetOverloadStatus,
353 ConfigureExternalKey,
354 RotateExternalKeyBinding,
355 ConfigureAggregateThenDelete,
356 GetLifecycleStatus,
357 GetQuota,
358 UpdateQuota,
359 GetBinding,
360 GetAdmissionStatus,
361 SetAdmission,
362 GetQuiesceStatus,
363 GetDecommissionReadiness,
364 GetUpgradeReadiness,
365 GetMaintenanceStatus,
366 WarmVectorIndex,
367 EvaluateVectorRecall,
368 CalibrateVectorStrategy,
369 GetVectorDiagnostic,
370 CreateDiagnostic,
371 GetDiagnostic,
372 PrepareCollectionExport,
373 StartCollectionExport,
374 ResolveCollectionExport,
375 VerifyCollectionExport,
376 PrepareCollectionExportRetirement,
377 StartCollectionExportRetirement,
378 ResolveCollectionExportRetirement,
379 PrepareCollectionRestore,
380 StartCollectionRestore,
381 ResolveCollectionRestore,
382 PrepareCollectionTransferExport,
383 StartCollectionTransferExport,
384 ResolveCollectionTransferExport,
385 PrepareCollectionTransferRestore,
386 StartCollectionTransferRestore,
387 ResolveCollectionTransferRestore,
388 PrepareIndexExport,
389 StartIndexExport,
390 ResolveIndexExport,
391 VerifyIndexExport,
392 PrepareIndexImport,
393 StartIndexImport,
394 ResolveIndexImport,
395 ReadArtifactChunk,
396 ExportUsage,
397 ReadLogicalOccupancy,
398 ExecuteStateRead,
399 PrepareStateWrite,
400 SubmitStateWrite,
401 ResolveStateWrite,
402}
403
404pub const LODESTONE_API_ERROR_CODES: &[ErrorCode] = &[
405 ErrorCode::Aborted,
406 ErrorCode::DeadlineExceeded,
407 ErrorCode::InvalidRequest,
408 ErrorCode::UnsupportedVersion,
409 ErrorCode::Unauthenticated,
410 ErrorCode::PermissionDenied,
411 ErrorCode::NotFound,
412 ErrorCode::Conflict,
413 ErrorCode::StaleCursor,
414 ErrorCode::RestartBudgetExhausted,
415 ErrorCode::LimitExceeded,
416 ErrorCode::CapabilityUnavailable,
417 ErrorCode::NotSubmitted,
418 ErrorCode::SubmittedIndeterminate,
419 ErrorCode::ExpiredUnknown,
420 ErrorCode::SecretNotEscrowed,
421 ErrorCode::RetentionGap,
422 ErrorCode::ArtifactRangeInvalid,
423 ErrorCode::ChecksumMismatch,
424 ErrorCode::TemporarilyUnavailable,
425 ErrorCode::Internal,
426];
427
428#[derive(Clone, Copy, Debug, Eq, PartialEq)]
429pub struct ActionAuthorizationContract {
430 pub action: Action,
431 pub any_of_permission_ids: &'static [&'static str],
432}
433pub const LODESTONE_API_ACTION_AUTHORIZATION: &[ActionAuthorizationContract] = &[
434 ActionAuthorizationContract {
435 action: Action::IdentityDiscovery,
436 any_of_permission_ids: &["security_read"],
437 },
438 ActionAuthorizationContract {
439 action: Action::DataRead,
440 any_of_permission_ids: &["data_read"],
441 },
442 ActionAuthorizationContract {
443 action: Action::DataWrite,
444 any_of_permission_ids: &["data_write"],
445 },
446 ActionAuthorizationContract {
447 action: Action::Append,
448 any_of_permission_ids: &["append"],
449 },
450 ActionAuthorizationContract {
451 action: Action::ResolveAppend,
452 any_of_permission_ids: &["resolve_append"],
453 },
454 ActionAuthorizationContract {
455 action: Action::IndexAdmin,
456 any_of_permission_ids: &["index_admin"],
457 },
458 ActionAuthorizationContract {
459 action: Action::CatalogRead,
460 any_of_permission_ids: &["catalog_read"],
461 },
462 ActionAuthorizationContract {
463 action: Action::TaskRead,
464 any_of_permission_ids: &["task_read"],
465 },
466 ActionAuthorizationContract {
467 action: Action::SubscriptionRead,
468 any_of_permission_ids: &["subscription_read"],
469 },
470 ActionAuthorizationContract {
471 action: Action::DiagnosticsRead,
472 any_of_permission_ids: &["diagnostics_read"],
473 },
474 ActionAuthorizationContract {
475 action: Action::DiagnosticsCreate,
476 any_of_permission_ids: &["diagnostics_create"],
477 },
478 ActionAuthorizationContract {
479 action: Action::SecurityRead,
480 any_of_permission_ids: &["security_read"],
481 },
482 ActionAuthorizationContract {
483 action: Action::SecurityAdmin,
484 any_of_permission_ids: &["security_admin"],
485 },
486 ActionAuthorizationContract {
487 action: Action::AuditRead,
488 any_of_permission_ids: &["audit_read"],
489 },
490 ActionAuthorizationContract {
491 action: Action::QuotaRead,
492 any_of_permission_ids: &["quota_read"],
493 },
494 ActionAuthorizationContract {
495 action: Action::QuotaAdmin,
496 any_of_permission_ids: &["quota_admin"],
497 },
498 ActionAuthorizationContract {
499 action: Action::BindingRead,
500 any_of_permission_ids: &["binding_read"],
501 },
502 ActionAuthorizationContract {
503 action: Action::LifecycleAdmin,
504 any_of_permission_ids: &["lifecycle_admin"],
505 },
506 ActionAuthorizationContract {
507 action: Action::AdmissionRead,
508 any_of_permission_ids: &["admission_read"],
509 },
510 ActionAuthorizationContract {
511 action: Action::AdmissionAdmin,
512 any_of_permission_ids: &["admission_admin"],
513 },
514 ActionAuthorizationContract {
515 action: Action::UsageRead,
516 any_of_permission_ids: &["usage_read"],
517 },
518 ActionAuthorizationContract {
519 action: Action::OperationRead,
520 any_of_permission_ids: &[
521 "catalog_read",
522 "task_read",
523 "security_read",
524 "diagnostics_read",
525 "collection_export",
526 "collection_restore",
527 "index_export",
528 "index_import",
529 ],
530 },
531 ActionAuthorizationContract {
532 action: Action::OperationCancel,
533 any_of_permission_ids: &[
534 "index_admin",
535 "task_admin",
536 "security_admin",
537 "diagnostics_create",
538 "collection_export",
539 "index_export",
540 ],
541 },
542 ActionAuthorizationContract {
543 action: Action::CollectionExport,
544 any_of_permission_ids: &["collection_export"],
545 },
546 ActionAuthorizationContract {
547 action: Action::CollectionRestore,
548 any_of_permission_ids: &["collection_restore"],
549 },
550 ActionAuthorizationContract {
551 action: Action::CollectionTransferExport,
552 any_of_permission_ids: &["collection_export"],
553 },
554 ActionAuthorizationContract {
555 action: Action::CollectionTransferRestore,
556 any_of_permission_ids: &["collection_restore"],
557 },
558 ActionAuthorizationContract {
559 action: Action::IndexExport,
560 any_of_permission_ids: &["index_export"],
561 },
562 ActionAuthorizationContract {
563 action: Action::IndexImport,
564 any_of_permission_ids: &["index_import"],
565 },
566];
567pub fn action_authorization(action: Action) -> Option<&'static ActionAuthorizationContract> {
568 LODESTONE_API_ACTION_AUTHORIZATION
569 .iter()
570 .find(|contract| contract.action == action)
571}
572
573#[derive(Clone, Copy, Debug, Eq, PartialEq)]
574pub struct RuntimeCapabilityAuthorizationContract {
575 pub capability_id: &'static str,
576 pub required_permission_ids: &'static [&'static str],
577}
578pub const LODESTONE_API_RUNTIME_CAPABILITY_AUTHORIZATION: &[RuntimeCapabilityAuthorizationContract] = &[
579 RuntimeCapabilityAuthorizationContract {
580 capability_id: "search_and_append_log",
581 required_permission_ids: &["data_read", "data_write"],
582 },
583 RuntimeCapabilityAuthorizationContract {
584 capability_id: "native_metric_records_and_time_series",
585 required_permission_ids: &["data_read", "append"],
586 },
587 RuntimeCapabilityAuthorizationContract {
588 capability_id: "historical_temporal_evidence",
589 required_permission_ids: &["data_read"],
590 },
591 RuntimeCapabilityAuthorizationContract {
592 capability_id: "continuous_temporal_evidence",
593 required_permission_ids: &["data_read", "lifecycle_admin"],
594 },
595 RuntimeCapabilityAuthorizationContract {
596 capability_id: "bounded_relationship_traversal",
597 required_permission_ids: &["data_read", "data_write", "append"],
598 },
599 RuntimeCapabilityAuthorizationContract {
600 capability_id: "native_continuous_profiles",
601 required_permission_ids: &["data_read", "append"],
602 },
603 RuntimeCapabilityAuthorizationContract {
604 capability_id: "committed_vector_and_hybrid",
605 required_permission_ids: &["data_read"],
606 },
607 RuntimeCapabilityAuthorizationContract {
608 capability_id: "realtime_or_pit_vector",
609 required_permission_ids: &["data_read"],
610 },
611 RuntimeCapabilityAuthorizationContract {
612 capability_id: "state_standard_express_ephemeral",
613 required_permission_ids: &["data_read", "data_write"],
614 },
615 RuntimeCapabilityAuthorizationContract {
616 capability_id: "state_relaxed",
617 required_permission_ids: &[],
618 },
619 RuntimeCapabilityAuthorizationContract {
620 capability_id: "bounded_resp",
621 required_permission_ids: &["data_read", "data_write"],
622 },
623 RuntimeCapabilityAuthorizationContract {
624 capability_id: "lodestone_rust_client",
625 required_permission_ids: &[],
626 },
627 RuntimeCapabilityAuthorizationContract {
628 capability_id: "replayable_source_indexes",
629 required_permission_ids: &["index_admin"],
630 },
631 RuntimeCapabilityAuthorizationContract {
632 capability_id: "zero_copy_clones",
633 required_permission_ids: &["index_admin"],
634 },
635 RuntimeCapabilityAuthorizationContract {
636 capability_id: "retained_history",
637 required_permission_ids: &["data_read"],
638 },
639 RuntimeCapabilityAuthorizationContract {
640 capability_id: "generation_result_cache",
641 required_permission_ids: &["data_read"],
642 },
643 RuntimeCapabilityAuthorizationContract {
644 capability_id: "adaptive_field_promotion",
645 required_permission_ids: &["index_admin"],
646 },
647 RuntimeCapabilityAuthorizationContract {
648 capability_id: "durable_overload_buffering",
649 required_permission_ids: &["data_read", "data_write"],
650 },
651 RuntimeCapabilityAuthorizationContract {
652 capability_id: "current_table_reader",
653 required_permission_ids: &["data_read"],
654 },
655 RuntimeCapabilityAuthorizationContract {
656 capability_id: "crypto_shred_and_rollup_lifecycle",
657 required_permission_ids: &["lifecycle_admin"],
658 },
659];
660pub fn runtime_capability_authorization(
661 capability_id: &str,
662) -> Option<&'static RuntimeCapabilityAuthorizationContract> {
663 LODESTONE_API_RUNTIME_CAPABILITY_AUTHORIZATION
664 .iter()
665 .find(|contract| contract.capability_id == capability_id)
666}
667
668#[derive(Clone, Copy, Debug, Eq, PartialEq)]
669pub struct ClusterControlActionContract {
670 pub credential_kind: &'static str,
671 pub action: &'static str,
672}
673pub const LODESTONE_API_CLUSTER_CONTROL_FORMAT_VERSION: u16 = 2;
674pub const LODESTONE_API_CLUSTER_CONTROL_TRANSPORT: &str = "isolated_tls_u32_be_length_then_canonical_json";
675pub const LODESTONE_API_CLUSTER_CONTROL_ACTIONS: &[ClusterControlActionContract] = &[
676 ClusterControlActionContract {
677 credential_kind: "collection_provisioner",
678 action: "initialize_collection_authority",
679 },
680 ClusterControlActionContract {
681 credential_kind: "collection_provisioner",
682 action: "activate_collection_authority",
683 },
684 ClusterControlActionContract {
685 credential_kind: "collection_provisioner",
686 action: "resolve_collection_authority",
687 },
688 ClusterControlActionContract {
689 credential_kind: "collection_provisioner",
690 action: "inspect_collection_retirement",
691 },
692 ClusterControlActionContract {
693 credential_kind: "collection_provisioner",
694 action: "retire_collection_authority",
695 },
696 ClusterControlActionContract {
697 credential_kind: "collection_provisioner",
698 action: "reserve_cluster_control_credential_rotation",
699 },
700 ClusterControlActionContract {
701 credential_kind: "collection_provisioner",
702 action: "activate_cluster_control_credential_rotation",
703 },
704 ClusterControlActionContract {
705 credential_kind: "collection_provisioner",
706 action: "revoke_cluster_control_credential",
707 },
708 ClusterControlActionContract {
709 credential_kind: "collection_provisioner",
710 action: "resolve_cluster_control_credential",
711 },
712 ClusterControlActionContract {
713 credential_kind: "capacity_observer",
714 action: "observe_cluster_capacity",
715 },
716 ClusterControlActionContract {
717 credential_kind: "capacity_observer",
718 action: "observe_resource_diagnostics",
719 },
720 ClusterControlActionContract {
721 credential_kind: "recovery_operator",
722 action: "list_cluster_backups",
723 },
724 ClusterControlActionContract {
725 credential_kind: "recovery_operator",
726 action: "get_cluster_backup",
727 },
728 ClusterControlActionContract {
729 credential_kind: "recovery_operator",
730 action: "create_cluster_backup",
731 },
732 ClusterControlActionContract {
733 credential_kind: "recovery_operator",
734 action: "resolve_cluster_backup",
735 },
736 ClusterControlActionContract {
737 credential_kind: "recovery_operator",
738 action: "delete_cluster_backup",
739 },
740 ClusterControlActionContract {
741 credential_kind: "recovery_operator",
742 action: "resolve_cluster_backup_deletion",
743 },
744 ClusterControlActionContract {
745 credential_kind: "recovery_operator",
746 action: "get_cluster_restore_readiness",
747 },
748 ClusterControlActionContract {
749 credential_kind: "recovery_operator",
750 action: "prepare_offline_recovery",
751 },
752 ClusterControlActionContract {
753 credential_kind: "recovery_operator",
754 action: "reserve_cluster_control_credential_rotation",
755 },
756 ClusterControlActionContract {
757 credential_kind: "recovery_operator",
758 action: "activate_cluster_control_credential_rotation",
759 },
760 ClusterControlActionContract {
761 credential_kind: "recovery_operator",
762 action: "revoke_cluster_control_credential",
763 },
764 ClusterControlActionContract {
765 credential_kind: "recovery_operator",
766 action: "resolve_cluster_control_credential",
767 },
768];
769pub const LODESTONE_API_CLUSTER_CONTROL_TYPES: &[&str] = &[
770 "cluster_control_session",
771 "cluster_control_request",
772 "cluster_control_response",
773 "collection_authority_operation",
774 "collection_retirement_operation",
775 "collection_retirement_blockers",
776 "core_capacity_observation",
777 "core_resource_diagnostic_page",
778 "cluster_control_credential_rotation",
779 "cluster_backup_operation",
780 "cluster_restore_readiness",
781];
782
783pub const LODESTONE_API_CURSOR_FORMAT_VERSION: u16 = 1;
784#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
785#[serde(deny_unknown_fields)]
786pub struct Cursor {
787 pub value: String,
788}
789
790pub const LODESTONE_API_LOCATOR_FORMAT_VERSION: u16 = 1;
791#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
792#[serde(deny_unknown_fields)]
793pub struct Locator {
794 pub authority: String,
795 pub value: String,
796}
797
798pub const LODESTONE_API_RESOURCE_FORMAT_VERSION: u16 = 1;
799#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
800#[serde(deny_unknown_fields)]
801pub struct Resource {
802 pub kind: String,
803 pub name: String,
804 pub incarnation: Identity,
805}
806
807pub const LODESTONE_API_READ_CUT_KIND_FORMAT_VERSION: u16 = 1;
808#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
809#[serde(rename_all = "snake_case")]
810pub enum ReadCutKind {
811 Committed,
812}
813
814pub const LODESTONE_API_READ_CUT_INDEX_EVIDENCE_FORMAT_VERSION: u16 = 1;
815#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
816#[serde(deny_unknown_fields)]
817pub struct ReadCutIndexEvidence {
818 pub index: Resource,
819 pub pinned_schema_generation: U64,
820 pub cut_digest: Digest,
821}
822
823pub const LODESTONE_API_READ_CUT_EVIDENCE_SHAPE_VERSION: u16 = 1;
824pub const LODESTONE_API_READ_CUT_EVIDENCE_FORMAT_VERSION: u16 = 1;
825#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
826#[serde(deny_unknown_fields)]
827pub struct ReadCutEvidence {
828 pub format_version: u32,
829 pub kind: ReadCutKind,
830 pub collection_id: Identity,
831 pub recovery_era: Identity,
832 pub catalog_revision: U64,
833 pub indexes: Vec<ReadCutIndexEvidence>,
834 pub aggregate_digest: Digest,
835}
836
837pub const LODESTONE_API_LOGICAL_OCCUPANCY_COUNTS_FORMAT_VERSION: u16 = 1;
838#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
839#[serde(deny_unknown_fields)]
840pub struct LogicalOccupancyCounts {
841 pub live_records: U64,
842 pub indexed_source_bytes: U64,
843 pub dense_vector_values: U64,
844 pub dense_vector_bytes: U64,
845 pub sparse_vector_values: U64,
846 pub sparse_vector_nonzero: U64,
847 pub sparse_vector_bytes: U64,
848 pub vector_set_values: U64,
849 pub vector_set_vectors: U64,
850 pub vector_set_bytes: U64,
851}
852
853pub const LODESTONE_API_LOGICAL_OCCUPANCY_GAP_STATE_FORMAT_VERSION: u16 = 1;
854#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
855#[serde(rename_all = "snake_case")]
856pub enum LogicalOccupancyGapState {
857 None,
858 AuthoritativeLifecycleTransitionsUnavailable,
859}
860
861pub const LODESTONE_API_LOGICAL_OCCUPANCY_SNAPSHOT_EVIDENCE_SHAPE_VERSION: u16 = 1;
862pub const LODESTONE_API_LOGICAL_OCCUPANCY_SNAPSHOT_EVIDENCE_FORMAT_VERSION: u16 = 1;
863#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
864#[serde(deny_unknown_fields)]
865pub struct LogicalOccupancySnapshotEvidence {
866 pub format_version: u32,
867 pub index: Resource,
868 pub mapping_generation: U64,
869 pub read_cut: ReadCutEvidence,
870 pub page_ordinal: u32,
871 pub page: LogicalOccupancyCounts,
872 pub cumulative: LogicalOccupancyCounts,
873 pub record_identity: Digest,
874 pub source_revision: Digest,
875 pub completeness_watermark: Digest,
876 pub complete: bool,
877 pub gap_state: LogicalOccupancyGapState,
878 #[serde(default, skip_serializing_if = "Option::is_none")]
879 pub corrects_record: Option<Digest>,
880}
881
882pub const LODESTONE_API_LOGICAL_OCCUPANCY_WINDOW_GAP_SHAPE_VERSION: u16 = 1;
883pub const LODESTONE_API_LOGICAL_OCCUPANCY_WINDOW_GAP_FORMAT_VERSION: u16 = 1;
884#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
885#[serde(deny_unknown_fields)]
886pub struct LogicalOccupancyWindowGap {
887 pub format_version: u32,
888 pub index: Resource,
889 pub window_start: U64,
890 pub window_end: U64,
891 pub gap_state: LogicalOccupancyGapState,
892}
893
894pub const LODESTONE_API_FIELD_PROMOTION_CONFIGURATION_SHAPE_VERSION: u16 = 1;
895pub const LODESTONE_API_FIELD_PROMOTION_CONFIGURATION_FORMAT_VERSION: u16 = 3;
896#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
897#[serde(deny_unknown_fields)]
898pub struct FieldPromotionConfiguration {
899 pub format_version: u32,
900 pub enabled: bool,
901 pub minimum_query_count: u32,
902 pub maximum_promoted_fields: u32,
903 pub maximum_cardinality: U64,
904 pub maximum_extra_bytes: U64,
905 pub allow_sensitive: bool,
906}
907
908pub const LODESTONE_API_OVERLOAD_CONFIGURATION_SHAPE_VERSION: u16 = 2;
909pub const LODESTONE_API_OVERLOAD_CONFIGURATION_FORMAT_VERSION: u16 = 3;
910#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
911#[serde(deny_unknown_fields)]
912pub struct OverloadConfiguration {
913 pub format_version: u32,
914 pub mode: String,
915 pub maximum_backlog_bytes: U64,
916 pub maximum_backlog_age_millis: U64,
917 pub maximum_collection_share_bytes: U64,
918 pub maximum_recovery_ops_per_pass: u32,
919 pub maximum_pending_overlay_documents: U64,
920}
921
922pub const LODESTONE_API_INDEX_POLICIES_FORMAT_VERSION: u16 = 1;
923#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
924#[serde(deny_unknown_fields)]
925pub struct IndexPolicies {
926 pub durability: String,
927 pub storage: String,
928 pub cache: String,
929 #[serde(default, skip_serializing_if = "Option::is_none")]
930 pub default_visibility: Option<String>,
931 pub field_promotion: FieldPromotionConfiguration,
932 pub overload: OverloadConfiguration,
933}
934
935pub const LODESTONE_API_MAINTENANCE_BUDGETS_FORMAT_VERSION: u16 = 1;
936#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
937#[serde(deny_unknown_fields)]
938pub struct MaintenanceBudgets {
939 pub memtable_max_bytes: U64,
940 pub refresh_max_millis: U64,
941 pub seal_max_bytes: U64,
942 pub seal_max_millis: U64,
943 pub merge_max_bytes: U64,
944 pub delete_resolution_max_bytes: U64,
945 pub wal_retention_max_bytes: U64,
946 pub gc_max_keys: u32,
947 pub fsck_max_objects: u32,
948 pub deleted_tombstone_retention_millis: U64,
949}
950
951pub const LODESTONE_API_RESOURCE_DURABILITY_CLASS_FORMAT_VERSION: u16 = 1;
952#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
953#[serde(rename_all = "snake_case")]
954pub enum ResourceDurabilityClass {
955 RegionalObject,
956 ZonalLowLatency,
957 Relaxed,
958 Ephemeral,
959}
960
961pub const LODESTONE_API_RESOURCE_STORAGE_CLASS_FORMAT_VERSION: u16 = 1;
962#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
963#[serde(rename_all = "snake_case")]
964pub enum ResourceStorageClass {
965 Standard,
966 Cold,
967}
968
969pub const LODESTONE_API_VECTOR_QUALITY_OBJECTIVE_FORMAT_VERSION: u16 = 1;
970#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
971#[serde(rename_all = "snake_case")]
972pub enum VectorQualityObjective {
973 Balanced,
974 HighRecall,
975 MemoryEfficient,
976}
977
978pub const LODESTONE_API_VECTOR_INDEXING_OBJECTIVE_FORMAT_VERSION: u16 = 1;
979#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
980#[serde(rename_all = "snake_case")]
981pub enum VectorIndexingObjective {
982 FastBuild,
983 Balanced,
984 Compact,
985}
986
987pub const LODESTONE_API_VECTOR_RESIDENCY_INTENT_FORMAT_VERSION: u16 = 1;
988#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
989#[serde(rename_all = "snake_case")]
990pub enum VectorResidencyIntent {
991 Automatic,
992 PreferResident,
993 RequireResident,
994}
995
996pub const LODESTONE_API_VECTOR_CALIBRATION_BINDING_FORMAT_VERSION: u16 = 1;
997#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
998#[serde(deny_unknown_fields)]
999pub struct VectorCalibrationBinding {
1000 pub profile: VectorStrategyProfile,
1001 pub evidence_digest: Digest,
1002}
1003
1004pub const LODESTONE_API_VECTOR_RESOURCE_POLICY_FORMAT_VERSION: u16 = 2;
1005#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1006#[serde(deny_unknown_fields)]
1007pub struct VectorResourcePolicy {
1008 pub quality: VectorQualityObjective,
1009 pub indexing: VectorIndexingObjective,
1010 #[serde(default, skip_serializing_if = "Option::is_none")]
1011 pub residency: Option<VectorResidencyIntent>,
1012 #[serde(default, skip_serializing_if = "Option::is_none")]
1013 pub calibration: Option<VectorCalibrationBinding>,
1014}
1015
1016pub const LODESTONE_API_WORKLOAD_CLASS_FORMAT_VERSION: u16 = 1;
1017#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1018#[serde(rename_all = "snake_case")]
1019pub enum WorkloadClass {
1020 InteractiveSearch,
1021 BatchAnalytics,
1022 StreamingIngest,
1023 BulkBackfill,
1024 InternalMaintenance,
1025}
1026
1027pub const LODESTONE_API_INDEX_RESOURCE_SPEC_SHAPE_VERSION: u16 = 3;
1028pub const LODESTONE_API_INDEX_RESOURCE_SPEC_FORMAT_VERSION: u16 = 3;
1029#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1030#[serde(deny_unknown_fields)]
1031pub struct IndexResourceSpec {
1032 pub format_version: u32,
1033 pub revision: U64,
1034 pub initial_shards: u32,
1035 pub target_shard_bytes: U64,
1036 pub durability: ResourceDurabilityClass,
1037 pub storage_class: ResourceStorageClass,
1038 pub ram_admission_weight: u32,
1039 pub ram_hard_max_bytes: U64,
1040 pub nvme_admission_weight: u32,
1041 pub nvme_hard_max_bytes: U64,
1042 pub refresh_objective_millis: u32,
1043 pub memtable_hard_max_bytes: U64,
1044 pub seal_parallelism: u32,
1045 pub merge_parallelism: u32,
1046 pub vector: VectorResourcePolicy,
1047 #[serde(default, skip_serializing_if = "Option::is_none")]
1048 pub lifecycle_binding: Option<Identity>,
1049 pub encryption_required: bool,
1050 #[serde(default, skip_serializing_if = "Option::is_none")]
1051 pub resolver_capability: Option<Identity>,
1052}
1053
1054pub const LODESTONE_API_INDEX_SUMMARY_FORMAT_VERSION: u16 = 1;
1055#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1056#[serde(deny_unknown_fields)]
1057pub struct IndexSummary {
1058 pub name: String,
1059 pub incarnation: Identity,
1060 pub revision: U64,
1061 pub mode: String,
1062 pub retained_event_identity: bool,
1063 pub state: String,
1064 pub schema_generation: U64,
1065 pub routing_revision: U64,
1066 pub shard_count: u32,
1067 pub policies: IndexPolicies,
1068 pub management_mode: String,
1069}
1070
1071pub const LODESTONE_API_MAPPING_MODE_FORMAT_VERSION: u16 = 1;
1072#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1073#[serde(rename_all = "snake_case")]
1074pub enum MappingMode {
1075 Mutable,
1076 AppendLog,
1077 State,
1078}
1079
1080pub const LODESTONE_API_DYNAMIC_MAPPING_POLICY_FORMAT_VERSION: u16 = 1;
1081#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1082#[serde(rename_all = "snake_case")]
1083pub enum DynamicMappingPolicy {
1084 True,
1085 False,
1086 Strict,
1087}
1088
1089pub const LODESTONE_API_MAPPING_ANALYZER_FORMAT_VERSION: u16 = 1;
1090#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1091#[serde(rename_all = "snake_case")]
1092pub enum MappingAnalyzer {
1093 Keyword,
1094 Simple,
1095 Standard,
1096 Whitespace,
1097}
1098
1099pub const LODESTONE_API_KEYWORD_NORMALIZER_FORMAT_VERSION: u16 = 1;
1100#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1101#[serde(rename_all = "snake_case")]
1102pub enum KeywordNormalizer {
1103 Keyword,
1104 Lowercase,
1105}
1106
1107pub const LODESTONE_API_VECTOR_METRIC_FORMAT_VERSION: u16 = 1;
1108#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1109#[serde(rename_all = "snake_case")]
1110pub enum VectorMetric {
1111 Cosine,
1112 DotProduct,
1113 SquaredL2,
1114}
1115
1116pub const LODESTONE_API_MAPPING_SCALAR_FORMAT_VERSION: u16 = 1;
1117#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1118#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1119pub enum MappingScalar {
1120 Boolean { value: bool },
1121 I64 { value: I64 },
1122 U64 { value: U64 },
1123 F64Bits { value: U64 },
1124 Keyword { value: String },
1125}
1126
1127pub const LODESTONE_API_SPARSE_VECTOR_WEIGHT_TYPE_FORMAT_VERSION: u16 = 1;
1128#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1129#[serde(rename_all = "snake_case")]
1130pub enum SparseVectorWeightType {
1131 F32,
1132 F16,
1133}
1134
1135pub const LODESTONE_API_MAPPING_FIELD_TYPE_SHAPE_VERSION: u16 = 3;
1136pub const LODESTONE_API_MAPPING_FIELD_TYPE_VECTOR_FORMAT_VERSION: u16 = 2;
1137pub const LODESTONE_API_MAPPING_FIELD_TYPE_SPARSE_VECTOR_FORMAT_VERSION: u16 = 1;
1138pub const LODESTONE_API_MAPPING_FIELD_TYPE_VECTOR_SET_FORMAT_VERSION: u16 = 1;
1139#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1140#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1141pub enum MappingFieldType {
1142 Text,
1143 Keyword,
1144 U64,
1145 Date,
1146 I64,
1147 F64,
1148 Bool,
1149 Nested,
1150 Vector {
1151 format_version: u32,
1152 field_id: u32,
1153 dimensions: u32,
1154 metric: VectorMetric,
1155 element_type: DenseVectorElementType,
1156 #[serde(default, skip_serializing_if = "Option::is_none")]
1157 quantization_scale: Option<ApproximateNumber>,
1158 },
1159 SparseVector {
1160 format_version: u32,
1161 field_id: u32,
1162 maximum_dimension: u32,
1163 weight_type: SparseVectorWeightType,
1164 },
1165 VectorSet {
1166 format_version: u32,
1167 field_id: u32,
1168 dimensions: u32,
1169 metric: VectorMetric,
1170 element_type: DenseVectorElementType,
1171 #[serde(default, skip_serializing_if = "Option::is_none")]
1172 quantization_scale: Option<ApproximateNumber>,
1173 maximum_vectors: u32,
1174 },
1175}
1176
1177pub const LODESTONE_API_MAPPING_FIELD_FORMAT_VERSION: u16 = 1;
1178#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1179#[serde(deny_unknown_fields)]
1180pub struct MappingField {
1181 pub path: String,
1182 pub field_type: MappingFieldType,
1183 pub stored: bool,
1184 #[serde(default, skip_serializing_if = "Option::is_none")]
1185 pub null_value: Option<MappingScalar>,
1186}
1187
1188pub const LODESTONE_API_MULTI_FIELD_PROJECTION_FORMAT_VERSION: u16 = 1;
1189#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1190#[serde(deny_unknown_fields)]
1191pub struct MultiFieldProjection {
1192 pub parent: String,
1193 pub child: String,
1194}
1195
1196pub const LODESTONE_API_ANALYZER_IDENTITY_FORMAT_VERSION: u16 = 1;
1197#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1198#[serde(deny_unknown_fields)]
1199pub struct AnalyzerIdentity {
1200 pub field: String,
1201 pub index_analyzer: MappingAnalyzer,
1202 pub search_analyzer: MappingAnalyzer,
1203}
1204
1205pub const LODESTONE_API_KEYWORD_LIMIT_FORMAT_VERSION: u16 = 1;
1206#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1207#[serde(deny_unknown_fields)]
1208pub struct KeywordLimit {
1209 pub field: String,
1210 pub max_bytes: u32,
1211 pub normalizer: KeywordNormalizer,
1212}
1213
1214pub const LODESTONE_API_PROFILE_PRIVACY_ACTION_FORMAT_VERSION: u16 = 1;
1215#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1216#[serde(rename_all = "snake_case")]
1217pub enum ProfilePrivacyAction {
1218 Allow,
1219 Drop,
1220 Redact,
1221 Reject,
1222}
1223
1224pub const LODESTONE_API_PROFILE_PRIVACY_FIELD_FORMAT_VERSION: u16 = 1;
1225#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1226#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1227pub enum ProfilePrivacyField {
1228 ResourceAttribute { key: String },
1229 ScopeAttribute { key: String },
1230 SampleLabel { key: String },
1231 FunctionName,
1232 FunctionSystemName,
1233 FunctionFilename,
1234 MappingFilename,
1235}
1236
1237pub const LODESTONE_API_PROFILE_PRIVACY_RULE_FORMAT_VERSION: u16 = 1;
1238#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1239#[serde(deny_unknown_fields)]
1240pub struct ProfilePrivacyRule {
1241 pub field: ProfilePrivacyField,
1242 pub action: ProfilePrivacyAction,
1243}
1244
1245pub const LODESTONE_API_PROFILE_PRIVACY_POLICY_SHAPE_VERSION: u16 = 1;
1246pub const LODESTONE_API_PROFILE_PRIVACY_POLICY_FORMAT_VERSION: u16 = 1;
1247#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1248#[serde(deny_unknown_fields)]
1249pub struct ProfilePrivacyPolicy {
1250 pub format_version: u32,
1251 pub rules: Vec<ProfilePrivacyRule>,
1252}
1253
1254pub const LODESTONE_API_MAPPING_RECORD_MODEL_SHAPE_VERSION: u16 = 3;
1255pub const LODESTONE_API_MAPPING_RECORD_MODEL_METRIC_V1_FORMAT_VERSION: u16 = 1;
1256pub const LODESTONE_API_MAPPING_RECORD_MODEL_RELATIONSHIP_V1_FORMAT_VERSION: u16 = 1;
1257pub const LODESTONE_API_MAPPING_RECORD_MODEL_PROFILE_V1_FORMAT_VERSION: u16 = 1;
1258#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1259#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1260pub enum MappingRecordModel {
1261 Document,
1262 MetricV1 {
1263 format_version: u32,
1264 grouping_attributes: Vec<String>,
1265 },
1266 RelationshipV1 {
1267 format_version: u32,
1268 },
1269 ProfileV1 {
1270 format_version: u32,
1271 privacy: ProfilePrivacyPolicy,
1272 },
1273}
1274
1275pub const LODESTONE_API_MAPPING_SHAPE_VERSION: u16 = 4;
1276pub const LODESTONE_API_MAPPING_FORMAT_VERSION: u16 = 10;
1277#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1278#[serde(deny_unknown_fields)]
1279pub struct Mapping {
1280 pub format_version: u32,
1281 pub generation: U64,
1282 pub mode: MappingMode,
1283 pub record_model: MappingRecordModel,
1284 pub dynamic_policy: DynamicMappingPolicy,
1285 pub fields: Vec<MappingField>,
1286 pub multi_field_projections: Vec<MultiFieldProjection>,
1287 pub analyzer_identities: Vec<AnalyzerIdentity>,
1288 pub keyword_limits: Vec<KeywordLimit>,
1289 pub nested_paths: Vec<String>,
1290}
1291
1292pub const LODESTONE_API_INDEX_DETAIL_FORMAT_VERSION: u16 = 1;
1293#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1294#[serde(deny_unknown_fields)]
1295pub struct IndexDetail {
1296 pub summary: IndexSummary,
1297 pub current_mapping: Mapping,
1298 pub budgets: MaintenanceBudgets,
1299 pub resource_spec: IndexResourceSpec,
1300 pub aliases: Vec<String>,
1301 pub data_streams: Vec<String>,
1302}
1303
1304pub const LODESTONE_API_SOURCE_PROVIDER_FORMAT_VERSION: u16 = 1;
1305#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1306#[serde(rename_all = "snake_case")]
1307pub enum SourceProvider {
1308 Kafka,
1309 ObjectLog,
1310 HttpReplay,
1311 GrpcReplay,
1312}
1313
1314pub const LODESTONE_API_SOURCE_DECODER_FORMAT_VERSION: u16 = 1;
1315#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1316#[serde(rename_all = "snake_case")]
1317pub enum SourceDecoder {
1318 LodestoneDocumentJson,
1319 DebeziumPostgresJson,
1320}
1321
1322pub const LODESTONE_API_SOURCE_REPLAY_GUARANTEES_FORMAT_VERSION: u16 = 1;
1323#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1324#[serde(deny_unknown_fields)]
1325pub struct SourceReplayGuarantees {
1326 pub durable_replay: bool,
1327 pub stable_partition_identity: bool,
1328 pub stable_operation_identity: bool,
1329 pub ordered_positions: bool,
1330 pub bounded_reads: bool,
1331 pub explicit_retention: bool,
1332 pub explicit_rewind: bool,
1333 pub minimum_replay_window_millis: U64,
1334}
1335
1336pub const LODESTONE_API_SOURCE_PARTITION_CONFIGURATION_FORMAT_VERSION: u16 = 1;
1337#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1338#[serde(deny_unknown_fields)]
1339pub struct SourcePartitionConfiguration {
1340 pub partition_id: u32,
1341 pub partition_incarnation: U64,
1342 pub initial_next_ordinal: U64,
1343 pub initial_resume_token_base64: String,
1344}
1345
1346pub const LODESTONE_API_REPLAYABLE_SOURCE_CONFIGURATION_FORMAT_VERSION: u16 = 1;
1347#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1348#[serde(deny_unknown_fields)]
1349pub struct ReplayableSourceConfiguration {
1350 pub source_incarnation: U64,
1351 pub source_identity_digest: Digest,
1352 pub provider: SourceProvider,
1353 pub decoder: SourceDecoder,
1354 pub partitions: Vec<SourcePartitionConfiguration>,
1355 pub guarantees: SourceReplayGuarantees,
1356}
1357
1358pub const LODESTONE_API_SOURCE_PARTITION_STATUS_FORMAT_VERSION: u16 = 1;
1359#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1360#[serde(deny_unknown_fields)]
1361pub struct SourcePartitionStatus {
1362 pub partition_id: u32,
1363 pub partition_incarnation: U64,
1364 pub indexed_next_ordinal: U64,
1365 #[serde(default, skip_serializing_if = "Option::is_none")]
1366 pub provider_high_watermark_next_ordinal: Option<U64>,
1367 #[serde(default, skip_serializing_if = "Option::is_none")]
1368 pub retention_floor_next_ordinal: Option<U64>,
1369 #[serde(default, skip_serializing_if = "Option::is_none")]
1370 pub lag_records: Option<U64>,
1371}
1372
1373pub const LODESTONE_API_REPLAYABLE_SOURCE_STATUS_FORMAT_VERSION: u16 = 1;
1374#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1375#[serde(deny_unknown_fields)]
1376pub struct ReplayableSourceStatus {
1377 pub index: Resource,
1378 pub provider: SourceProvider,
1379 pub decoder: SourceDecoder,
1380 pub source_incarnation: U64,
1381 pub source_identity_digest: Digest,
1382 pub lifecycle: String,
1383 pub lifecycle_generation: U64,
1384 #[serde(default, skip_serializing_if = "Option::is_none")]
1385 pub pause_reason: Option<String>,
1386 #[serde(default, skip_serializing_if = "Option::is_none")]
1387 pub rebuild_reason: Option<String>,
1388 pub retry_state: String,
1389 pub retention_risk: String,
1390 #[serde(default, skip_serializing_if = "Option::is_none")]
1391 pub last_batch_identity: Option<Identity>,
1392 pub partitions: Vec<SourcePartitionStatus>,
1393}
1394
1395pub const LODESTONE_API_SOURCE_CONTROL_TRANSITION_FORMAT_VERSION: u16 = 1;
1396#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1397#[serde(rename_all = "snake_case")]
1398pub enum SourceControlTransition {
1399 Pause,
1400 Resume,
1401 RequireRebuild,
1402}
1403
1404pub const LODESTONE_API_HISTORY_LEDGER_PRECONDITION_FORMAT_VERSION: u16 = 1;
1405#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1406#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1407pub enum HistoryLedgerPrecondition {
1408 Absent,
1409 Exact { revision: U64 },
1410}
1411
1412pub const LODESTONE_API_HISTORY_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1413#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1414#[serde(deny_unknown_fields)]
1415pub struct HistoryRetentionPolicy {
1416 pub keep_for_millis: U64,
1417 pub capture_interval_millis: U64,
1418 pub maximum_cuts: u32,
1419 pub privacy_overlay_identity_limit: u32,
1420}
1421
1422pub const LODESTONE_API_HISTORY_SELECTOR_FORMAT_VERSION: u16 = 1;
1423#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1424#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1425pub enum HistorySelector {
1426 ExactCut { cut_id: Identity },
1427 AtOrBeforeCommitTime { unix_millis: U64 },
1428}
1429
1430pub const LODESTONE_API_HISTORY_HOLD_FORMAT_VERSION: u16 = 1;
1431#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1432#[serde(deny_unknown_fields)]
1433pub struct HistoryHold {
1434 pub hold_id: Identity,
1435 pub cut_ids: Vec<Identity>,
1436}
1437
1438pub const LODESTONE_API_HISTORY_STATUS_FORMAT_VERSION: u16 = 1;
1439#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1440#[serde(deny_unknown_fields)]
1441pub struct HistoryStatus {
1442 pub index: Resource,
1443 pub revision: U64,
1444 pub policy: HistoryRetentionPolicy,
1445 pub page_count: u32,
1446 pub cut_count: u32,
1447 pub holds: Vec<HistoryHold>,
1448}
1449
1450pub const LODESTONE_API_HISTORY_RESOLUTION_FORMAT_VERSION: u16 = 1;
1451#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1452#[serde(deny_unknown_fields)]
1453pub struct HistoryResolution {
1454 pub index: Resource,
1455 pub selector: HistorySelector,
1456 pub cut_id: Identity,
1457 pub committed_at_unix_millis: U64,
1458 pub uncertainty_millis: U64,
1459 pub shard_count: u32,
1460 pub security_policy_revision: U64,
1461}
1462
1463pub const LODESTONE_API_INDEX_REFERENCE_FORMAT_VERSION: u16 = 1;
1464#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1465#[serde(deny_unknown_fields)]
1466pub struct IndexReference {
1467 pub name: String,
1468 pub incarnation: Identity,
1469}
1470
1471pub const LODESTONE_API_ALIAS_TARGET_FORMAT_VERSION: u16 = 1;
1472#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1473#[serde(deny_unknown_fields)]
1474pub struct AliasTarget {
1475 pub index: IndexReference,
1476 pub write_index: bool,
1477}
1478
1479pub const LODESTONE_API_ALIAS_SUMMARY_FORMAT_VERSION: u16 = 1;
1480#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1481#[serde(deny_unknown_fields)]
1482pub struct AliasSummary {
1483 pub name: String,
1484 pub revision: U64,
1485 pub visible_target_count: u32,
1486}
1487
1488pub const LODESTONE_API_ALIAS_DETAIL_FORMAT_VERSION: u16 = 1;
1489#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1490#[serde(deny_unknown_fields)]
1491pub struct AliasDetail {
1492 pub summary: AliasSummary,
1493 pub visible_targets: Vec<AliasTarget>,
1494 #[serde(default, skip_serializing_if = "Option::is_none")]
1495 pub filter: Option<RawJson>,
1496 #[serde(default, skip_serializing_if = "Option::is_none")]
1497 pub index_routing: Option<String>,
1498 #[serde(default, skip_serializing_if = "Option::is_none")]
1499 pub search_routing: Option<String>,
1500}
1501
1502pub const LODESTONE_API_DATA_STREAM_SUMMARY_FORMAT_VERSION: u16 = 1;
1503#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1504#[serde(deny_unknown_fields)]
1505pub struct DataStreamSummary {
1506 pub name: String,
1507 pub incarnation: Identity,
1508 pub revision: U64,
1509 pub generation: U64,
1510 pub state: String,
1511 pub visible_backing_count: u32,
1512}
1513
1514pub const LODESTONE_API_COMPONENT_TEMPLATE_BINDING_FORMAT_VERSION: u16 = 1;
1515#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1516#[serde(deny_unknown_fields)]
1517pub struct ComponentTemplateBinding {
1518 pub name: String,
1519 pub incarnation: Identity,
1520 pub revision: U64,
1521}
1522
1523pub const LODESTONE_API_INDEX_TEMPLATE_BINDING_FORMAT_VERSION: u16 = 1;
1524#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1525#[serde(deny_unknown_fields)]
1526pub struct IndexTemplateBinding {
1527 pub name: String,
1528 pub incarnation: Identity,
1529 pub revision: U64,
1530}
1531
1532pub const LODESTONE_API_LIFECYCLE_POLICY_BINDING_FORMAT_VERSION: u16 = 1;
1533#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1534#[serde(deny_unknown_fields)]
1535pub struct LifecyclePolicyBinding {
1536 pub name: String,
1537 pub incarnation: Identity,
1538 pub revision: U64,
1539}
1540
1541pub const LODESTONE_API_DATA_STREAM_DETAIL_FORMAT_VERSION: u16 = 1;
1542#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1543#[serde(deny_unknown_fields)]
1544pub struct DataStreamDetail {
1545 pub summary: DataStreamSummary,
1546 pub visible_backing_indices: Vec<IndexReference>,
1547 #[serde(default, skip_serializing_if = "Option::is_none")]
1548 pub write_index: Option<IndexReference>,
1549 pub timestamp_field: String,
1550 pub index_template: IndexTemplateBinding,
1551 #[serde(default, skip_serializing_if = "Option::is_none")]
1552 pub lifecycle_policy: Option<LifecyclePolicyBinding>,
1553}
1554
1555pub const LODESTONE_API_COMPONENT_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1556#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1557#[serde(deny_unknown_fields)]
1558pub struct ComponentTemplateSummary {
1559 pub name: String,
1560 pub incarnation: Identity,
1561 pub revision: U64,
1562}
1563
1564pub const LODESTONE_API_COMPONENT_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1565#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1566#[serde(deny_unknown_fields)]
1567pub struct ComponentTemplateDetail {
1568 pub summary: ComponentTemplateSummary,
1569 pub mapping: Mapping,
1570 pub settings: RawJson,
1571 #[serde(default, skip_serializing_if = "Option::is_none")]
1572 pub resource_spec: Option<IndexResourceSpec>,
1573}
1574
1575pub const LODESTONE_API_INDEX_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1576#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1577#[serde(deny_unknown_fields)]
1578pub struct IndexTemplateSummary {
1579 pub name: String,
1580 pub incarnation: Identity,
1581 pub revision: U64,
1582 pub priority: i32,
1583 pub data_stream: bool,
1584}
1585
1586pub const LODESTONE_API_INDEX_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1587#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1588#[serde(deny_unknown_fields)]
1589pub struct IndexTemplateDetail {
1590 pub summary: IndexTemplateSummary,
1591 pub index_patterns: Vec<String>,
1592 pub components: Vec<ComponentTemplateBinding>,
1593 pub mapping: Mapping,
1594 pub settings: RawJson,
1595 #[serde(default, skip_serializing_if = "Option::is_none")]
1596 pub resource_spec: Option<IndexResourceSpec>,
1597}
1598
1599pub const LODESTONE_API_INGEST_PIPELINE_SUMMARY_FORMAT_VERSION: u16 = 1;
1600#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1601#[serde(deny_unknown_fields)]
1602pub struct IngestPipelineSummary {
1603 pub name: String,
1604 pub incarnation: Identity,
1605 pub revision: U64,
1606 pub digest: Digest,
1607}
1608
1609pub const LODESTONE_API_INGEST_PIPELINE_DETAIL_FORMAT_VERSION: u16 = 1;
1610#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1611#[serde(deny_unknown_fields)]
1612pub struct IngestPipelineDetail {
1613 pub summary: IngestPipelineSummary,
1614 pub definition: RawJson,
1615}
1616
1617pub const LODESTONE_API_INGEST_PIPELINE_SELECTION_FORMAT_VERSION: u16 = 1;
1618#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1619#[serde(deny_unknown_fields)]
1620pub struct IngestPipelineSelection {
1621 pub name: String,
1622 pub expected: ExpectedBinding,
1623}
1624
1625pub const LODESTONE_API_LIFECYCLE_POLICY_SUMMARY_FORMAT_VERSION: u16 = 1;
1626#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1627#[serde(deny_unknown_fields)]
1628pub struct LifecyclePolicySummary {
1629 pub name: String,
1630 pub incarnation: Identity,
1631 pub revision: U64,
1632}
1633
1634pub const LODESTONE_API_ROLLOVER_THRESHOLDS_FORMAT_VERSION: u16 = 1;
1635#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1636#[serde(deny_unknown_fields)]
1637pub struct RolloverThresholds {
1638 #[serde(default, skip_serializing_if = "Option::is_none")]
1639 pub max_primary_docs: Option<U64>,
1640 #[serde(default, skip_serializing_if = "Option::is_none")]
1641 pub max_primary_bytes: Option<U64>,
1642 #[serde(default, skip_serializing_if = "Option::is_none")]
1643 pub max_age_millis: Option<U64>,
1644}
1645
1646pub const LODESTONE_API_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1647#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1648#[serde(deny_unknown_fields)]
1649pub struct RetentionPolicy {
1650 #[serde(default, skip_serializing_if = "Option::is_none")]
1651 pub document_max_age_millis: Option<U64>,
1652 #[serde(default, skip_serializing_if = "Option::is_none")]
1653 pub backing_index_max_age_millis: Option<U64>,
1654}
1655
1656pub const LODESTONE_API_LIFECYCLE_POLICY_DETAIL_FORMAT_VERSION: u16 = 1;
1657#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1658#[serde(deny_unknown_fields)]
1659pub struct LifecyclePolicyDetail {
1660 pub summary: LifecyclePolicySummary,
1661 pub rollover: RolloverThresholds,
1662 pub retention: RetentionPolicy,
1663 pub merge_hint: bool,
1664 pub freeze_hint: bool,
1665 pub delete_expired: bool,
1666}
1667
1668pub const LODESTONE_API_TEXT_QUERY_OPERATOR_FORMAT_VERSION: u16 = 1;
1669#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1670#[serde(rename_all = "snake_case")]
1671pub enum TextQueryOperator {
1672 Or,
1673 And,
1674}
1675
1676pub const LODESTONE_API_TEXT_QUERY_ANALYZER_FORMAT_VERSION: u16 = 1;
1677#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1678#[serde(rename_all = "snake_case")]
1679pub enum TextQueryAnalyzer {
1680 Mapping,
1681 Standard,
1682 Simple,
1683 Whitespace,
1684 Keyword,
1685}
1686
1687pub const LODESTONE_API_ZERO_TERMS_QUERY_FORMAT_VERSION: u16 = 1;
1688#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1689#[serde(rename_all = "snake_case")]
1690pub enum ZeroTermsQuery {
1691 None,
1692 All,
1693}
1694
1695pub const LODESTONE_API_TEXT_QUERY_OPTIONS_FORMAT_VERSION: u16 = 1;
1696#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1697#[serde(deny_unknown_fields)]
1698pub struct TextQueryOptions {
1699 pub operator: TextQueryOperator,
1700 #[serde(default, skip_serializing_if = "Option::is_none")]
1701 pub minimum_should_match: Option<u32>,
1702 pub analyzer: TextQueryAnalyzer,
1703 pub zero_terms_query: ZeroTermsQuery,
1704}
1705
1706pub const LODESTONE_API_MULTI_MATCH_MODE_FORMAT_VERSION: u16 = 1;
1707#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1708#[serde(rename_all = "snake_case")]
1709pub enum MultiMatchMode {
1710 BestFields,
1711 MostFields,
1712 Phrase,
1713 PhrasePrefix,
1714 CrossFields,
1715}
1716
1717pub const LODESTONE_API_MULTI_MATCH_FIELD_FORMAT_VERSION: u16 = 1;
1718#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1719#[serde(deny_unknown_fields)]
1720pub struct MultiMatchField {
1721 pub field: String,
1722 pub boost: ApproximateNumber,
1723}
1724
1725pub const LODESTONE_API_MULTI_MATCH_OPTIONS_FORMAT_VERSION: u16 = 1;
1726#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1727#[serde(deny_unknown_fields)]
1728pub struct MultiMatchOptions {
1729 pub mode: MultiMatchMode,
1730 pub operator: TextQueryOperator,
1731 #[serde(default, skip_serializing_if = "Option::is_none")]
1732 pub minimum_should_match: Option<u32>,
1733 pub analyzer: TextQueryAnalyzer,
1734 pub zero_terms_query: ZeroTermsQuery,
1735 pub slop: u32,
1736}
1737
1738pub const LODESTONE_API_SORT_ORDER_FORMAT_VERSION: u16 = 1;
1739#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1740#[serde(rename_all = "snake_case")]
1741pub enum SortOrder {
1742 Asc,
1743 Desc,
1744}
1745
1746pub const LODESTONE_API_SORT_MODE_FORMAT_VERSION: u16 = 1;
1747#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1748#[serde(rename_all = "snake_case")]
1749pub enum SortMode {
1750 Auto,
1751 Min,
1752 Max,
1753}
1754
1755pub const LODESTONE_API_MISSING_ORDER_FORMAT_VERSION: u16 = 1;
1756#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1757#[serde(rename_all = "snake_case")]
1758pub enum MissingOrder {
1759 First,
1760 Last,
1761}
1762
1763pub const LODESTONE_API_NESTED_SCORE_MODE_FORMAT_VERSION: u16 = 1;
1764#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1765#[serde(rename_all = "snake_case")]
1766pub enum NestedScoreMode {
1767 Avg,
1768 Max,
1769 Min,
1770 None,
1771 Sum,
1772}
1773
1774pub const LODESTONE_API_NESTED_INNER_HITS_FORMAT_VERSION: u16 = 1;
1775#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1776#[serde(deny_unknown_fields)]
1777pub struct NestedInnerHits {
1778 #[serde(default, skip_serializing_if = "Option::is_none")]
1779 pub name: Option<String>,
1780 pub from: u32,
1781 pub size: u32,
1782 pub sort: Vec<SortSpec>,
1783}
1784
1785pub const LODESTONE_API_SORT_SPEC_FORMAT_VERSION: u16 = 1;
1786#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1787#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1788pub enum SortSpec {
1789 Score {
1790 order: SortOrder,
1791 },
1792 Field {
1793 field: String,
1794 order: SortOrder,
1795 #[serde(default, skip_serializing_if = "Option::is_none")]
1796 missing: Option<MissingOrder>,
1797 mode: SortMode,
1798 },
1799 NestedField {
1800 path: String,
1801 field: String,
1802 #[serde(default, skip_serializing_if = "Option::is_none")]
1803 filter: Option<Box<Query>>,
1804 order: SortOrder,
1805 #[serde(default, skip_serializing_if = "Option::is_none")]
1806 missing: Option<MissingOrder>,
1807 mode: SortMode,
1808 },
1809}
1810
1811pub const LODESTONE_API_QUERY_FORMAT_VERSION: u16 = 1;
1812#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1813#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1814pub enum Query {
1815 MatchAll,
1816 Term {
1817 field: String,
1818 value: JsonValue,
1819 },
1820 Terms {
1821 field: String,
1822 values: Vec<JsonValue>,
1823 },
1824 Range {
1825 field: String,
1826 #[serde(default, skip_serializing_if = "Option::is_none")]
1827 lower: Option<JsonValue>,
1828 #[serde(default, skip_serializing_if = "Option::is_none")]
1829 upper: Option<JsonValue>,
1830 include_lower: bool,
1831 include_upper: bool,
1832 },
1833 Text {
1834 field: String,
1835 text: String,
1836 #[serde(default, skip_serializing_if = "Option::is_none")]
1837 options: Option<TextQueryOptions>,
1838 },
1839 MultiMatch {
1840 fields: Vec<MultiMatchField>,
1841 text: String,
1842 #[serde(default, skip_serializing_if = "Option::is_none")]
1843 options: Option<MultiMatchOptions>,
1844 },
1845 Exists {
1846 field: String,
1847 },
1848 Prefix {
1849 field: String,
1850 prefix: String,
1851 #[serde(default, skip_serializing_if = "Option::is_none")]
1852 analyzer: Option<TextQueryAnalyzer>,
1853 analyze_wildcard: bool,
1854 },
1855 Fuzzy {
1856 field: String,
1857 value: String,
1858 distance: u32,
1859 #[serde(default, skip_serializing_if = "Option::is_none")]
1860 analyzer: Option<TextQueryAnalyzer>,
1861 },
1862 Boost {
1863 query: Box<Query>,
1864 boost: ApproximateNumber,
1865 },
1866 Bool {
1867 must: Vec<Query>,
1868 filter: Vec<Query>,
1869 should: Vec<Query>,
1870 must_not: Vec<Query>,
1871 minimum_should_match: u32,
1872 },
1873 Nested {
1874 path: String,
1875 query: Box<Query>,
1876 score_mode: NestedScoreMode,
1877 ignore_unmapped: bool,
1878 #[serde(default, skip_serializing_if = "Option::is_none")]
1879 inner_hits: Option<NestedInnerHits>,
1880 },
1881}
1882
1883pub const LODESTONE_API_DENSE_RETRIEVAL_MODE_FORMAT_VERSION: u16 = 1;
1884#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1885#[serde(rename_all = "snake_case")]
1886pub enum DenseRetrievalMode {
1887 Auto,
1888 Ann,
1889 Exact,
1890}
1891
1892pub const LODESTONE_API_VECTOR_ACHIEVED_MODE_FORMAT_VERSION: u16 = 1;
1893#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1894#[serde(rename_all = "snake_case")]
1895pub enum VectorAchievedMode {
1896 Exact,
1897 Ann,
1898 Mixed,
1899}
1900
1901pub const LODESTONE_API_VECTOR_BRANCH_DIAGNOSTICS_FORMAT_VERSION: u16 = 2;
1902#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1903#[serde(deny_unknown_fields)]
1904pub struct VectorBranchDiagnostics {
1905 pub name: String,
1906 pub requested_mode: DenseRetrievalMode,
1907 pub achieved_mode: VectorAchievedMode,
1908 pub result_count: U64,
1909 pub exact_segments: U64,
1910 pub ann_segments: U64,
1911 pub exact_fallback_segments: U64,
1912 pub distance_evaluations: U64,
1913 pub peak_scratch_bytes: U64,
1914 pub fresh_vectors_scanned: U64,
1915 pub realtime_overlay_queries: U64,
1916 pub realtime_overlay_candidates: U64,
1917 pub bundle_roots: U64,
1918 pub object_read_requests: U64,
1919 pub object_bytes_read: U64,
1920 pub cache_hits: U64,
1921 pub cache_misses: U64,
1922 pub snapshot_digests: Vec<Digest>,
1923}
1924
1925pub const LODESTONE_API_DENSE_VECTOR_ELEMENT_TYPE_FORMAT_VERSION: u16 = 1;
1926#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1927#[serde(rename_all = "snake_case")]
1928pub enum DenseVectorElementType {
1929 F32,
1930 F16,
1931 I8,
1932}
1933
1934pub const LODESTONE_API_DENSE_VECTOR_BYTE_ORDER_FORMAT_VERSION: u16 = 1;
1935#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1936#[serde(rename_all = "snake_case")]
1937pub enum DenseVectorByteOrder {
1938 LittleEndian,
1939}
1940
1941pub const LODESTONE_API_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
1942#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1943#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1944pub enum VectorValue {
1945 Numeric {
1946 values: Vec<ApproximateNumber>,
1947 },
1948 Binary {
1949 element_type: DenseVectorElementType,
1950 byte_order: DenseVectorByteOrder,
1951 data_base64: String,
1952 #[serde(default, skip_serializing_if = "Option::is_none")]
1953 quantization_scale: Option<ApproximateNumber>,
1954 },
1955}
1956
1957pub const LODESTONE_API_SPARSE_VECTOR_ENTRY_FORMAT_VERSION: u16 = 1;
1958#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1959#[serde(deny_unknown_fields)]
1960pub struct SparseVectorEntry {
1961 pub dimension: u32,
1962 pub weight: ApproximateNumber,
1963}
1964
1965pub const LODESTONE_API_SPARSE_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
1966#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1967#[serde(deny_unknown_fields)]
1968pub struct SparseVectorValue {
1969 pub entries: Vec<SparseVectorEntry>,
1970}
1971
1972pub const LODESTONE_API_VECTOR_SET_VALUE_FORMAT_VERSION: u16 = 1;
1973#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1974#[serde(deny_unknown_fields)]
1975pub struct VectorSetValue {
1976 pub vectors: Vec<VectorValue>,
1977}
1978
1979pub const LODESTONE_API_VECTOR_EVALUATION_SNAPSHOT_FORMAT_VERSION: u16 = 1;
1980#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1981#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1982pub enum VectorEvaluationSnapshot {
1983 CommittedCut { digest: Digest },
1984 Pit { pit: Cursor },
1985}
1986
1987pub const LODESTONE_API_VECTOR_EVALUATION_QUERY_SET_FORMAT_VERSION: u16 = 1;
1988#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1989#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1990pub enum VectorEvaluationQuerySet {
1991 Sample { seed: U64, sample_count: u32 },
1992 Supplied { digest: Digest, queries: Vec<VectorValue> },
1993}
1994
1995pub const LODESTONE_API_VECTOR_EVALUATION_BUDGET_FORMAT_VERSION: u16 = 1;
1996#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1997#[serde(deny_unknown_fields)]
1998pub struct VectorEvaluationBudget {
1999 pub maximum_distance_evaluations: U64,
2000 pub maximum_elapsed_work_units: U64,
2001 pub maximum_peak_memory_bytes: U64,
2002 pub maximum_object_reads: U64,
2003 pub maximum_object_bytes: U64,
2004 pub maximum_build_scratch_bytes: U64,
2005 pub maximum_profile_comparisons: u32,
2006}
2007
2008pub const LODESTONE_API_VECTOR_CANDIDATE_POLICY_FORMAT_VERSION: u16 = 1;
2009#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2010#[serde(rename_all = "snake_case")]
2011pub enum VectorCandidatePolicy {
2012 Balanced,
2013 HighRecall,
2014 MemoryEfficient,
2015}
2016
2017pub const LODESTONE_API_VECTOR_CALIBRATION_OBJECTIVE_FORMAT_VERSION: u16 = 1;
2018#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2019#[serde(rename_all = "snake_case")]
2020pub enum VectorCalibrationObjective {
2021 Balanced,
2022 HighRecall,
2023 MemoryEfficient,
2024}
2025
2026pub const LODESTONE_API_VECTOR_STRATEGY_PROFILE_FORMAT_VERSION: u16 = 1;
2027#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2028#[serde(rename_all = "snake_case")]
2029pub enum VectorStrategyProfile {
2030 BalancedV1,
2031 HighRecallV1,
2032 MemoryEfficientV1,
2033}
2034
2035pub const LODESTONE_API_VECTOR_EVALUATION_WORK_FORMAT_VERSION: u16 = 1;
2036#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2037#[serde(deny_unknown_fields)]
2038pub struct VectorEvaluationWork {
2039 pub distance_evaluations: U64,
2040 pub elapsed_work_units: U64,
2041 pub peak_memory_bytes: U64,
2042 pub object_reads: U64,
2043 pub object_bytes: U64,
2044}
2045
2046pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_CODE_FORMAT_VERSION: u16 = 1;
2047#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2048#[serde(rename_all = "snake_case")]
2049pub enum VectorEvaluationErrorCode {
2050 AnnRefused,
2051 ExhaustiveRefused,
2052 TimedOut,
2053 Cancelled,
2054 Internal,
2055}
2056
2057pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_FORMAT_VERSION: u16 = 1;
2058#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2059#[serde(deny_unknown_fields)]
2060pub struct VectorEvaluationError {
2061 pub sample_ordinal: u32,
2062 pub code: VectorEvaluationErrorCode,
2063}
2064
2065pub const LODESTONE_API_VECTOR_RECALL_RESULT_SHAPE_VERSION: u16 = 1;
2066pub const LODESTONE_API_VECTOR_RECALL_RESULT_FORMAT_VERSION: u16 = 1;
2067#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2068#[serde(deny_unknown_fields)]
2069pub struct VectorRecallResult {
2070 pub format_version: u32,
2071 pub index: Resource,
2072 pub field: String,
2073 pub mapping_generation: U64,
2074 pub snapshot_digest: Digest,
2075 pub query_set_digest: Digest,
2076 pub metric: VectorMetric,
2077 pub k: u32,
2078 pub candidate_policy: VectorCandidatePolicy,
2079 pub strategy_identity: String,
2080 pub completed_samples: u32,
2081 pub ann_result_count: U64,
2082 pub exhaustive_result_count: U64,
2083 pub mean_recall_basis_points: u32,
2084 pub minimum_recall_basis_points: u32,
2085 pub p05_recall_basis_points: u32,
2086 pub p50_recall_basis_points: u32,
2087 pub p90_recall_basis_points: u32,
2088 pub p99_recall_basis_points: u32,
2089 pub ann_work: VectorEvaluationWork,
2090 pub exhaustive_work: VectorEvaluationWork,
2091 pub errors: Vec<VectorEvaluationError>,
2092}
2093
2094pub const LODESTONE_API_VECTOR_CALIBRATION_CANDIDATE_FORMAT_VERSION: u16 = 1;
2095#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2096#[serde(deny_unknown_fields)]
2097pub struct VectorCalibrationCandidate {
2098 pub profile: VectorStrategyProfile,
2099 pub recall: VectorRecallResult,
2100 pub build_scratch_bytes: U64,
2101 pub resident_bytes: U64,
2102 pub evidence_digest: Digest,
2103}
2104
2105pub const LODESTONE_API_VECTOR_CALIBRATION_RESULT_SHAPE_VERSION: u16 = 1;
2106pub const LODESTONE_API_VECTOR_CALIBRATION_RESULT_FORMAT_VERSION: u16 = 1;
2107#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2108#[serde(deny_unknown_fields)]
2109pub struct VectorCalibrationResult {
2110 pub format_version: u32,
2111 pub objective: VectorCalibrationObjective,
2112 pub candidates: Vec<VectorCalibrationCandidate>,
2113 pub recommended_profile: VectorStrategyProfile,
2114 pub recommended_evidence_digest: Digest,
2115 pub requires_explicit_resource_revision_and_rebuild: bool,
2116}
2117
2118pub const LODESTONE_API_VECTOR_DIAGNOSTIC_RESULT_FORMAT_VERSION: u16 = 1;
2119#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2120#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2121pub enum VectorDiagnosticResult {
2122 Recall { result: Box<VectorRecallResult> },
2123 Calibration { result: Box<VectorCalibrationResult> },
2124}
2125
2126pub const LODESTONE_API_VECTOR_WARM_COMPONENT_FORMAT_VERSION: u16 = 1;
2127#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2128#[serde(rename_all = "snake_case")]
2129pub enum VectorWarmComponent {
2130 Directory,
2131 Approximate,
2132 Exact,
2133}
2134
2135pub const LODESTONE_API_VECTOR_WARM_STATE_FORMAT_VERSION: u16 = 1;
2136#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2137#[serde(rename_all = "snake_case")]
2138pub enum VectorWarmState {
2139 Warmed,
2140 Partial,
2141 Stale,
2142}
2143
2144pub const LODESTONE_API_VECTOR_WARM_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
2145#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2146#[serde(deny_unknown_fields)]
2147pub struct VectorWarmAchievement {
2148 pub component: VectorWarmComponent,
2149 pub cache_identity: Digest,
2150 pub resident_bytes: U64,
2151}
2152
2153pub const LODESTONE_API_VECTOR_WARM_RESULT_SHAPE_VERSION: u16 = 1;
2154pub const LODESTONE_API_VECTOR_WARM_RESULT_FORMAT_VERSION: u16 = 1;
2155#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2156#[serde(deny_unknown_fields)]
2157pub struct VectorWarmResult {
2158 pub format_version: u32,
2159 pub operation_identity: Digest,
2160 pub index: Resource,
2161 pub root_digest: Digest,
2162 pub state: VectorWarmState,
2163 pub progress: ExactDecimal,
2164 pub achieved: Vec<VectorWarmAchievement>,
2165 pub object_requests: U64,
2166 pub object_bytes: U64,
2167 pub cache_hits: U64,
2168 pub cache_misses: U64,
2169 pub started_at: U64,
2170 pub completed_at: U64,
2171 pub expires_at: U64,
2172 #[serde(default, skip_serializing_if = "Option::is_none")]
2173 pub residency_intent: Option<VectorResidencyIntent>,
2174}
2175
2176pub const LODESTONE_API_DENSE_RETRIEVAL_THRESHOLD_FORMAT_VERSION: u16 = 1;
2177#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2178#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2179pub enum DenseRetrievalThreshold {
2180 MinimumScore { value: ApproximateNumber },
2181 MaximumDistance { value: ApproximateNumber },
2182}
2183
2184pub const LODESTONE_API_RETRIEVAL_BRANCH_FORMAT_VERSION: u16 = 3;
2185#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2186#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2187pub enum RetrievalBranch {
2188 Lexical {
2189 name: String,
2190 query: Box<Query>,
2191 #[serde(default, skip_serializing_if = "Option::is_none")]
2192 filter: Option<Box<Query>>,
2193 window: u32,
2194 weight: ApproximateNumber,
2195 },
2196 Dense {
2197 name: String,
2198 field: String,
2199 query_vector: VectorValue,
2200 #[serde(default, skip_serializing_if = "Option::is_none")]
2201 filter: Option<Box<Query>>,
2202 window: u32,
2203 #[serde(default, skip_serializing_if = "Option::is_none")]
2204 candidates: Option<u32>,
2205 weight: ApproximateNumber,
2206 mode: DenseRetrievalMode,
2207 #[serde(default, skip_serializing_if = "Option::is_none")]
2208 threshold: Option<DenseRetrievalThreshold>,
2209 },
2210 Sparse {
2211 name: String,
2212 field: String,
2213 query_vector: SparseVectorValue,
2214 #[serde(default, skip_serializing_if = "Option::is_none")]
2215 filter: Option<Box<Query>>,
2216 window: u32,
2217 weight: ApproximateNumber,
2218 },
2219 LateInteraction {
2220 name: String,
2221 field: String,
2222 query_vectors: VectorSetValue,
2223 #[serde(default, skip_serializing_if = "Option::is_none")]
2224 filter: Option<Box<Query>>,
2225 window: u32,
2226 candidates: u32,
2227 weight: ApproximateNumber,
2228 },
2229}
2230
2231pub const LODESTONE_API_WEIGHTED_RRF_FUSION_FORMAT_VERSION: u16 = 1;
2232#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2233#[serde(deny_unknown_fields)]
2234pub struct WeightedRrfFusion {
2235 pub rank_constant: u32,
2236}
2237
2238pub const LODESTONE_API_RETRIEVAL_PLAN_SHAPE_VERSION: u16 = 1;
2239pub const LODESTONE_API_RETRIEVAL_PLAN_FORMAT_VERSION: u16 = 1;
2240#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2241#[serde(deny_unknown_fields)]
2242pub struct RetrievalPlan {
2243 pub format_version: u32,
2244 #[serde(default, skip_serializing_if = "Option::is_none")]
2245 pub global_filter: Option<Box<Query>>,
2246 pub branches: Vec<RetrievalBranch>,
2247 pub fusion: WeightedRrfFusion,
2248 pub result_window: u32,
2249}
2250
2251pub const LODESTONE_API_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
2252#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2253#[serde(deny_unknown_fields)]
2254pub struct HistogramBounds {
2255 #[serde(default, skip_serializing_if = "Option::is_none")]
2256 pub min: Option<ApproximateNumber>,
2257 #[serde(default, skip_serializing_if = "Option::is_none")]
2258 pub max: Option<ApproximateNumber>,
2259}
2260
2261pub const LODESTONE_API_DATE_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
2262#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2263#[serde(deny_unknown_fields)]
2264pub struct DateHistogramBounds {
2265 #[serde(default, skip_serializing_if = "Option::is_none")]
2266 pub min: Option<I64>,
2267 #[serde(default, skip_serializing_if = "Option::is_none")]
2268 pub max: Option<I64>,
2269}
2270
2271pub const LODESTONE_API_APPROXIMATION_ALGORITHM_FORMAT_VERSION: u16 = 1;
2272#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2273#[serde(rename_all = "snake_case")]
2274pub enum ApproximationAlgorithm {
2275 HyperloglogV1,
2276 FloatPrefixHistogramV1,
2277}
2278
2279pub const LODESTONE_API_APPROXIMATION_FORMAT_VERSION: u16 = 1;
2280#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2281#[serde(deny_unknown_fields)]
2282pub struct Approximation {
2283 pub algorithm: ApproximationAlgorithm,
2284 pub algorithm_version: u32,
2285 pub precision: u32,
2286 pub state_bytes: U64,
2287 #[serde(default, skip_serializing_if = "Option::is_none")]
2288 pub relative_standard_error: Option<ApproximateNumber>,
2289 #[serde(default, skip_serializing_if = "Option::is_none")]
2290 pub maximum_rank_error: Option<ApproximateNumber>,
2291}
2292
2293pub const LODESTONE_API_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
2294#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2295#[serde(deny_unknown_fields)]
2296pub struct PercentileValue {
2297 pub percent: ApproximateNumber,
2298 #[serde(default, skip_serializing_if = "Option::is_none")]
2299 pub value: Option<ApproximateNumber>,
2300}
2301
2302pub const LODESTONE_API_APPROXIMATE_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
2303#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2304#[serde(deny_unknown_fields)]
2305pub struct ApproximatePercentileValue {
2306 pub percent: ApproximateNumber,
2307 pub value: ApproximateNumber,
2308 pub lower_bound: ApproximateNumber,
2309 pub upper_bound: ApproximateNumber,
2310 pub maximum_rank_error: ApproximateNumber,
2311}
2312
2313pub const LODESTONE_API_TIME_SERIES_OPERATOR_FORMAT_VERSION: u16 = 1;
2314#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2315#[serde(rename_all = "snake_case")]
2316pub enum TimeSeriesOperator {
2317 Raw,
2318 Sum,
2319 Count,
2320 Min,
2321 Max,
2322 Average,
2323 Delta,
2324 Increase,
2325 Rate,
2326 HistogramMerge,
2327 Quantiles,
2328}
2329
2330pub const LODESTONE_API_TIME_SERIES_MISSING_DATA_FORMAT_VERSION: u16 = 1;
2331#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2332#[serde(rename_all = "snake_case")]
2333pub enum TimeSeriesMissingData {
2334 Omit,
2335 ExplicitEmpty,
2336}
2337
2338pub const LODESTONE_API_TIME_SERIES_QUANTILE_MODE_FORMAT_VERSION: u16 = 1;
2339#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2340#[serde(rename_all = "snake_case")]
2341pub enum TimeSeriesQuantileMode {
2342 Exact,
2343 Approximate,
2344}
2345
2346pub const LODESTONE_API_TIME_SERIES_BUCKET_STATE_FORMAT_VERSION: u16 = 1;
2347#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2348#[serde(rename_all = "snake_case")]
2349pub enum TimeSeriesBucketState {
2350 Observed,
2351 ExplicitEmpty,
2352}
2353
2354pub const LODESTONE_API_TIME_SERIES_QUANTILE_VALUE_FORMAT_VERSION: u16 = 1;
2355#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2356#[serde(deny_unknown_fields)]
2357pub struct TimeSeriesQuantileValue {
2358 pub quantile: ApproximateNumber,
2359 #[serde(default, skip_serializing_if = "Option::is_none")]
2360 pub value: Option<MetricNumber>,
2361 #[serde(default, skip_serializing_if = "Option::is_none")]
2362 pub lower_bound: Option<MetricNumber>,
2363 #[serde(default, skip_serializing_if = "Option::is_none")]
2364 pub upper_bound: Option<MetricNumber>,
2365 #[serde(default, skip_serializing_if = "Option::is_none")]
2366 pub maximum_rank_error: Option<ApproximateNumber>,
2367}
2368
2369pub const LODESTONE_API_TIME_SERIES_VALUE_FORMAT_VERSION: u16 = 1;
2370#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2371#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2372pub enum TimeSeriesValue {
2373 Raw {
2374 values: Vec<MetricNumber>,
2375 },
2376 Number {
2377 value: MetricNumber,
2378 algorithm: String,
2379 },
2380 Count {
2381 value: U64,
2382 },
2383 ExplicitHistogram {
2384 count: U64,
2385 #[serde(default, skip_serializing_if = "Option::is_none")]
2386 sum: Option<MetricNumber>,
2387 bounds_f64_bits: Vec<U64>,
2388 bucket_counts: Vec<U64>,
2389 },
2390 ExponentialHistogram {
2391 count: U64,
2392 #[serde(default, skip_serializing_if = "Option::is_none")]
2393 sum: Option<MetricNumber>,
2394 scale: i32,
2395 zero_count: U64,
2396 positive: MetricExponentialBuckets,
2397 negative: MetricExponentialBuckets,
2398 },
2399 Quantiles {
2400 values: Vec<TimeSeriesQuantileValue>,
2401 exact: bool,
2402 algorithm: String,
2403 algorithm_version: u32,
2404 state_bytes: U64,
2405 },
2406}
2407
2408pub const LODESTONE_API_TIME_SERIES_BUCKET_FORMAT_VERSION: u16 = 1;
2409#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2410#[serde(deny_unknown_fields)]
2411pub struct TimeSeriesBucket {
2412 pub start_unix_nanos: U64,
2413 pub end_unix_nanos: U64,
2414 pub group: Vec<MetricAttribute>,
2415 pub state: TimeSeriesBucketState,
2416 pub reset: bool,
2417 #[serde(default, skip_serializing_if = "Option::is_none")]
2418 pub value: Option<TimeSeriesValue>,
2419 pub exemplars: Vec<MetricExemplar>,
2420}
2421
2422pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_DIRECTION_FORMAT_VERSION: u16 = 1;
2423#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2424#[serde(rename_all = "snake_case")]
2425pub enum RelationshipTraversalDirection {
2426 Inbound,
2427 Outbound,
2428 Both,
2429}
2430
2431pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_FILTER_FORMAT_VERSION: u16 = 1;
2432#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2433#[serde(deny_unknown_fields)]
2434pub struct RelationshipTraversalFilter {
2435 pub relationship_types: Vec<String>,
2436 pub assertion_classes: Vec<String>,
2437 pub provenance: Vec<String>,
2438 #[serde(default, skip_serializing_if = "Option::is_none")]
2439 pub valid_from_unix_nanos: Option<U64>,
2440 #[serde(default, skip_serializing_if = "Option::is_none")]
2441 pub valid_through_unix_nanos: Option<U64>,
2442}
2443
2444pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_BUDGET_FORMAT_VERSION: u16 = 1;
2445#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2446#[serde(deny_unknown_fields)]
2447pub struct RelationshipTraversalBudget {
2448 pub maximum_depth: u32,
2449 pub maximum_fan_out: u32,
2450 pub maximum_visited_entities: u32,
2451 pub maximum_visited_relationships: u32,
2452 pub maximum_returned_relationships: u32,
2453 pub maximum_memory_bytes: U64,
2454}
2455
2456pub const LODESTONE_API_TRAVERSED_RELATIONSHIP_FORMAT_VERSION: u16 = 1;
2457#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2458#[serde(deny_unknown_fields)]
2459pub struct TraversedRelationship {
2460 pub depth: u32,
2461 pub from: EntityRef,
2462 pub to: EntityRef,
2463 pub relationship: RelationshipRecord,
2464}
2465
2466pub const LODESTONE_API_PROFILE_QUERY_OPERATION_FORMAT_VERSION: u16 = 1;
2467#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2468#[serde(rename_all = "snake_case")]
2469pub enum ProfileQueryOperation {
2470 Flamegraph,
2471 TopStacks,
2472 TopFunctions,
2473 SampleTable,
2474}
2475
2476pub const LODESTONE_API_PROFILE_GROUP_BY_FORMAT_VERSION: u16 = 1;
2477#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2478#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2479pub enum ProfileGroupBy {
2480 ResourceAttribute { key: String },
2481 SampleLabel { key: String },
2482 BuildId,
2483 ModuleId,
2484}
2485
2486pub const LODESTONE_API_PROFILE_QUERY_FILTER_FORMAT_VERSION: u16 = 1;
2487#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2488#[serde(deny_unknown_fields)]
2489pub struct ProfileQueryFilter {
2490 pub profile_ids: Vec<String>,
2491 pub build_ids: Vec<String>,
2492 pub module_ids: Vec<String>,
2493 pub function_ids: Vec<String>,
2494 pub trace_ids: Vec<String>,
2495 pub span_ids: Vec<String>,
2496}
2497
2498pub const LODESTONE_API_PROFILE_QUERY_BUDGET_FORMAT_VERSION: u16 = 1;
2499#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2500#[serde(deny_unknown_fields)]
2501pub struct ProfileQueryBudget {
2502 pub maximum_batches: u32,
2503 pub maximum_samples: u32,
2504 pub maximum_results: u32,
2505 pub maximum_memory_bytes: U64,
2506}
2507
2508pub const LODESTONE_API_PROFILE_QUERY_ROW_FORMAT_VERSION: u16 = 1;
2509#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2510#[serde(deny_unknown_fields)]
2511pub struct ProfileQueryRow {
2512 pub key: String,
2513 pub stack: Vec<String>,
2514 pub value: MetricNumber,
2515 pub sample_count: U64,
2516}
2517
2518pub const LODESTONE_API_TEMPORAL_INPUT_FORMAT_VERSION: u16 = 1;
2519#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2520#[serde(deny_unknown_fields)]
2521pub struct TemporalInput {
2522 pub index: Resource,
2523 pub schema_generation: U64,
2524}
2525
2526pub const LODESTONE_API_TEMPORAL_PATTERN_FORMAT_VERSION: u16 = 1;
2527#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2528#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2529pub enum TemporalPattern {
2530 Event {
2531 node_id: String,
2532 query: Box<Query>,
2533 },
2534 Sequence {
2535 node_id: String,
2536 branches: Vec<TemporalPattern>,
2537 within_nanos: U64,
2538 },
2539 AllOf {
2540 node_id: String,
2541 branches: Vec<TemporalPattern>,
2542 within_nanos: U64,
2543 },
2544 AnyOf {
2545 node_id: String,
2546 branches: Vec<TemporalPattern>,
2547 },
2548 Count {
2549 node_id: String,
2550 pattern: Box<TemporalPattern>,
2551 minimum: u32,
2552 within_nanos: U64,
2553 },
2554 Repetition {
2555 node_id: String,
2556 pattern: Box<TemporalPattern>,
2557 count: u32,
2558 within_nanos: U64,
2559 },
2560 NotFollowedBy {
2561 node_id: String,
2562 anchor: Box<TemporalPattern>,
2563 forbidden: Box<TemporalPattern>,
2564 within_nanos: U64,
2565 },
2566}
2567
2568pub const LODESTONE_API_HISTORICAL_TEMPORAL_DEFINITION_SHAPE_VERSION: u16 = 1;
2569pub const LODESTONE_API_HISTORICAL_TEMPORAL_DEFINITION_FORMAT_VERSION: u16 = 1;
2570#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2571#[serde(deny_unknown_fields)]
2572pub struct HistoricalTemporalDefinition {
2573 pub format_version: u32,
2574 pub pattern_generation: U64,
2575 pub inputs: Vec<TemporalInput>,
2576 pub event_time_field: String,
2577 pub correlation_fields: Vec<String>,
2578 pub pattern: TemporalPattern,
2579 pub watermark_unix_nanos: U64,
2580 pub maximum_events: u32,
2581 pub maximum_states: u32,
2582 pub maximum_captured_events: u32,
2583 pub maximum_results: u32,
2584 pub maximum_state_bytes: U64,
2585}
2586
2587pub const LODESTONE_API_TEMPORAL_EVIDENCE_STATUS_FORMAT_VERSION: u16 = 2;
2588#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2589#[serde(rename_all = "snake_case")]
2590pub enum TemporalEvidenceStatus {
2591 Provisional,
2592 Final,
2593 Correction,
2594 Retraction,
2595}
2596
2597pub const LODESTONE_API_TEMPORAL_SOURCE_EVENT_FORMAT_VERSION: u16 = 1;
2598#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2599#[serde(deny_unknown_fields)]
2600pub struct TemporalSourceEvent {
2601 pub index: Resource,
2602 pub shard_id: u32,
2603 pub recovery_era: Identity,
2604 pub sequence: U64,
2605 pub document_id: String,
2606}
2607
2608pub const LODESTONE_API_TEMPORAL_EVIDENCE_FORMAT_VERSION: u16 = 2;
2609#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2610#[serde(deny_unknown_fields)]
2611pub struct TemporalEvidence {
2612 pub evidence_id: Digest,
2613 pub pattern_generation: U64,
2614 pub pattern_digest: Digest,
2615 pub correlation_key: Vec<JsonValue>,
2616 pub matched_node_id: String,
2617 pub interval_start_unix_nanos: U64,
2618 pub interval_end_unix_nanos: U64,
2619 pub watermark_unix_nanos: U64,
2620 pub source_events: Vec<TemporalSourceEvent>,
2621 pub input_cut_digest: Digest,
2622 pub status: TemporalEvidenceStatus,
2623 #[serde(default, skip_serializing_if = "Option::is_none")]
2624 pub predecessor_evidence_id: Option<Digest>,
2625}
2626
2627pub const LODESTONE_API_CONTINUOUS_TEMPORAL_START_FORMAT_VERSION: u16 = 1;
2628#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2629#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2630pub enum ContinuousTemporalStart {
2631 FromCurrentHeads,
2632 HistoricalThenFollow { pit: Cursor },
2633}
2634
2635pub const LODESTONE_API_CONTINUOUS_TEMPORAL_WATERMARK_POLICY_FORMAT_VERSION: u16 = 1;
2636#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2637#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2638pub enum ContinuousTemporalWatermarkPolicy {
2639 MaximumObservedMinusOutOfOrder {
2640 allowed_out_of_orderness_nanos: U64,
2641 },
2642 MappingBoundEvent {
2643 allowed_out_of_orderness_nanos: U64,
2644 predicate: Box<Query>,
2645 timestamp_field: String,
2646 },
2647}
2648
2649pub const LODESTONE_API_CONTINUOUS_TEMPORAL_LATE_DATA_POLICY_FORMAT_VERSION: u16 = 1;
2650#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2651#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2652pub enum ContinuousTemporalLateDataPolicy {
2653 RecomputeWithinHorizon { correction_horizon_nanos: U64 },
2654 PauseWithGap,
2655}
2656
2657pub const LODESTONE_API_CONTINUOUS_TEMPORAL_OUTPUT_FORMAT_VERSION: u16 = 1;
2658#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2659#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2660pub enum ContinuousTemporalOutput {
2661 InternalResults {
2662 maximum_retained_records: U64,
2663 maximum_retained_bytes: U64,
2664 maximum_retained_event_age_nanos: U64,
2665 },
2666 MaterializedIndex {
2667 index: Resource,
2668 schema_generation: U64,
2669 },
2670}
2671
2672pub const LODESTONE_API_CONTINUOUS_TEMPORAL_DEFINITION_SHAPE_VERSION: u16 = 1;
2673pub const LODESTONE_API_CONTINUOUS_TEMPORAL_DEFINITION_FORMAT_VERSION: u16 = 1;
2674#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2675#[serde(deny_unknown_fields)]
2676pub struct ContinuousTemporalDefinition {
2677 pub format_version: u32,
2678 pub evaluation_id: Identity,
2679 pub pattern_generation: U64,
2680 pub inputs: Vec<TemporalInput>,
2681 pub event_time_field: String,
2682 pub correlation_fields: Vec<String>,
2683 pub pattern: TemporalPattern,
2684 pub start: ContinuousTemporalStart,
2685 pub watermark_policy: ContinuousTemporalWatermarkPolicy,
2686 pub late_data_policy: ContinuousTemporalLateDataPolicy,
2687 pub maximum_events_per_step: u32,
2688 pub maximum_states: u32,
2689 pub maximum_captured_events: u32,
2690 pub maximum_results: u32,
2691 pub maximum_state_bytes: U64,
2692 pub maximum_lag_bytes: U64,
2693 pub maximum_lag_events: U64,
2694 pub maximum_lag_event_age_nanos: U64,
2695 pub output: ContinuousTemporalOutput,
2696}
2697
2698pub const LODESTONE_API_CONTINUOUS_TEMPORAL_FRONTIER_FORMAT_VERSION: u16 = 1;
2699#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2700#[serde(deny_unknown_fields)]
2701pub struct ContinuousTemporalFrontier {
2702 pub index: Resource,
2703 pub shard_id: u32,
2704 pub recovery_era: Identity,
2705 pub routing_revision: U64,
2706 pub registered_wal_frontier: U64,
2707 #[serde(default, skip_serializing_if = "Option::is_none")]
2708 pub watermark_unix_nanos: Option<U64>,
2709}
2710
2711pub const LODESTONE_API_CONTINUOUS_TEMPORAL_AVAILABLE_FRONTIER_FORMAT_VERSION: u16 = 1;
2712#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2713#[serde(deny_unknown_fields)]
2714pub struct ContinuousTemporalAvailableFrontier {
2715 pub index: Resource,
2716 pub shard_id: u32,
2717 pub sequence: U64,
2718}
2719
2720pub const LODESTONE_API_CONTINUOUS_TEMPORAL_GAP_REASON_FORMAT_VERSION: u16 = 1;
2721#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2722#[serde(rename_all = "snake_case")]
2723pub enum ContinuousTemporalGapReason {
2724 RetentionGap,
2725 LateDataGap,
2726 SchemaGap,
2727 RouteGap,
2728 OutputGap,
2729}
2730
2731pub const LODESTONE_API_CONTINUOUS_TEMPORAL_GAP_FORMAT_VERSION: u16 = 1;
2732#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2733#[serde(deny_unknown_fields)]
2734pub struct ContinuousTemporalGap {
2735 pub reason: ContinuousTemporalGapReason,
2736 pub last_complete_frontiers: Vec<ContinuousTemporalFrontier>,
2737 pub earliest_available_frontiers: Vec<ContinuousTemporalAvailableFrontier>,
2738}
2739
2740pub const LODESTONE_API_CONTINUOUS_TEMPORAL_EVALUATION_SHAPE_VERSION: u16 = 1;
2741pub const LODESTONE_API_CONTINUOUS_TEMPORAL_EVALUATION_FORMAT_VERSION: u16 = 1;
2742#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2743#[serde(deny_unknown_fields)]
2744pub struct ContinuousTemporalEvaluation {
2745 pub format_version: u32,
2746 pub evaluation_id: Identity,
2747 pub generation: U64,
2748 pub revision: U64,
2749 pub definition_digest: Digest,
2750 pub definition: ContinuousTemporalDefinition,
2751 pub lifecycle: String,
2752 pub frontiers: Vec<ContinuousTemporalFrontier>,
2753 #[serde(default, skip_serializing_if = "Option::is_none")]
2754 pub global_watermark_unix_nanos: Option<U64>,
2755 pub state_bytes: U64,
2756 pub active_states: U64,
2757 pub active_timers: U64,
2758 pub retained_results: U64,
2759 pub pending_emissions: U64,
2760 #[serde(default, skip_serializing_if = "Option::is_none")]
2761 pub last_materialized_frontier_digest: Option<Digest>,
2762 pub retry_count: u32,
2763 #[serde(default, skip_serializing_if = "Option::is_none")]
2764 pub gap: Option<ContinuousTemporalGap>,
2765}
2766
2767pub const LODESTONE_API_COMPOSITE_ORDER_FORMAT_VERSION: u16 = 1;
2768#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2769#[serde(rename_all = "snake_case")]
2770pub enum CompositeOrder {
2771 Asc,
2772 Desc,
2773}
2774
2775pub const LODESTONE_API_COMPOSITE_SOURCE_FORMAT_VERSION: u16 = 1;
2776#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2777#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2778pub enum CompositeSource {
2779 Terms {
2780 name: String,
2781 field: String,
2782 order: CompositeOrder,
2783 },
2784 DateHistogram {
2785 name: String,
2786 field: String,
2787 #[serde(default, skip_serializing_if = "Option::is_none")]
2788 fixed_interval_millis: Option<U64>,
2789 #[serde(default, skip_serializing_if = "Option::is_none")]
2790 calendar_interval: Option<String>,
2791 #[serde(default, skip_serializing_if = "Option::is_none")]
2792 time_zone: Option<String>,
2793 offset_millis: I64,
2794 order: CompositeOrder,
2795 },
2796}
2797
2798pub const LODESTONE_API_AGGREGATION_FORMAT_VERSION: u16 = 3;
2799#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2800#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2801pub enum Aggregation {
2802 Terms {
2803 name: String,
2804 field: String,
2805 size: u32,
2806 sub_aggregations: Vec<Aggregation>,
2807 },
2808 Histogram {
2809 name: String,
2810 field: String,
2811 interval: ApproximateNumber,
2812 min_doc_count: U64,
2813 #[serde(default, skip_serializing_if = "Option::is_none")]
2814 extended_bounds: Option<HistogramBounds>,
2815 #[serde(default, skip_serializing_if = "Option::is_none")]
2816 hard_bounds: Option<HistogramBounds>,
2817 offset: ApproximateNumber,
2818 #[serde(default, skip_serializing_if = "Option::is_none")]
2819 missing: Option<ApproximateNumber>,
2820 sub_aggregations: Vec<Aggregation>,
2821 },
2822 Cardinality {
2823 name: String,
2824 field: String,
2825 },
2826 Percentiles {
2827 name: String,
2828 field: String,
2829 percents: Vec<ApproximateNumber>,
2830 },
2831 ApproximateCardinality {
2832 name: String,
2833 field: String,
2834 precision: u32,
2835 },
2836 ApproximatePercentiles {
2837 name: String,
2838 field: String,
2839 percents: Vec<ApproximateNumber>,
2840 precision: u32,
2841 },
2842 Sum {
2843 name: String,
2844 field: String,
2845 },
2846 Avg {
2847 name: String,
2848 field: String,
2849 },
2850 Min {
2851 name: String,
2852 field: String,
2853 },
2854 Max {
2855 name: String,
2856 field: String,
2857 },
2858 Stats {
2859 name: String,
2860 field: String,
2861 },
2862 DateHistogram {
2863 name: String,
2864 field: String,
2865 #[serde(default, skip_serializing_if = "Option::is_none")]
2866 fixed_interval_millis: Option<U64>,
2867 #[serde(default, skip_serializing_if = "Option::is_none")]
2868 calendar_interval: Option<String>,
2869 #[serde(default, skip_serializing_if = "Option::is_none")]
2870 time_zone: Option<String>,
2871 min_doc_count: U64,
2872 #[serde(default, skip_serializing_if = "Option::is_none")]
2873 extended_bounds: Option<DateHistogramBounds>,
2874 #[serde(default, skip_serializing_if = "Option::is_none")]
2875 hard_bounds: Option<DateHistogramBounds>,
2876 offset_millis: I64,
2877 #[serde(default, skip_serializing_if = "Option::is_none")]
2878 missing: Option<I64>,
2879 sub_aggregations: Vec<Aggregation>,
2880 },
2881 Composite {
2882 name: String,
2883 size: u32,
2884 sources: Vec<CompositeSource>,
2885 #[serde(default, skip_serializing_if = "Option::is_none")]
2886 after: Option<Cursor>,
2887 sub_aggregations: Vec<Aggregation>,
2888 },
2889 Filter {
2890 name: String,
2891 query: Box<Query>,
2892 sub_aggregations: Vec<Aggregation>,
2893 },
2894 Nested {
2895 name: String,
2896 path: String,
2897 sub_aggregations: Vec<Aggregation>,
2898 },
2899 ReverseNested {
2900 name: String,
2901 #[serde(default, skip_serializing_if = "Option::is_none")]
2902 path: Option<String>,
2903 sub_aggregations: Vec<Aggregation>,
2904 },
2905 TimeSeriesV1 {
2906 name: String,
2907 metric_name: String,
2908 unit: String,
2909 point_kind: MetricPointKind,
2910 #[serde(default, skip_serializing_if = "Option::is_none")]
2911 temporality: Option<MetricTemporality>,
2912 #[serde(default, skip_serializing_if = "Option::is_none")]
2913 monotonic: Option<bool>,
2914 range_start_unix_nanos: U64,
2915 range_end_unix_nanos: U64,
2916 bucket_width_nanos: U64,
2917 alignment_origin_unix_nanos: U64,
2918 group_by: Vec<String>,
2919 operator: TimeSeriesOperator,
2920 missing_data: TimeSeriesMissingData,
2921 quantiles: Vec<ApproximateNumber>,
2922 quantile_mode: TimeSeriesQuantileMode,
2923 maximum_exemplars: u32,
2924 maximum_points: u32,
2925 maximum_series: u32,
2926 maximum_buckets: u32,
2927 maximum_results: u32,
2928 maximum_state_bytes: U64,
2929 },
2930}
2931
2932pub const LODESTONE_API_NESTED_SEARCH_HIT_FORMAT_VERSION: u16 = 2;
2933#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2934#[serde(deny_unknown_fields)]
2935pub struct NestedSearchHit {
2936 pub path: String,
2937 pub ordinal: u32,
2938 #[serde(default, skip_serializing_if = "Option::is_none")]
2939 pub score: Option<ApproximateNumber>,
2940 #[serde(default, skip_serializing_if = "Option::is_none")]
2941 pub source: Option<RawJson>,
2942 pub sort: Vec<JsonValue>,
2943}
2944
2945pub const LODESTONE_API_NAMED_NESTED_INNER_HITS_RESULT_FORMAT_VERSION: u16 = 1;
2946#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2947#[serde(deny_unknown_fields)]
2948pub struct NamedNestedInnerHitsResult {
2949 pub name: String,
2950 pub total: U64,
2951 pub hits: Vec<NestedSearchHit>,
2952}
2953
2954pub const LODESTONE_API_FRAGMENT_BOUNDARY_FORMAT_VERSION: u16 = 1;
2955#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2956#[serde(rename_all = "snake_case")]
2957pub enum FragmentBoundary {
2958 Word,
2959 Sentence,
2960 Paragraph,
2961 WholeField,
2962}
2963
2964pub const LODESTONE_API_FRAGMENT_OFFSET_ENCODING_FORMAT_VERSION: u16 = 1;
2965#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2966#[serde(rename_all = "snake_case")]
2967pub enum FragmentOffsetEncoding {
2968 Utf8Bytes,
2969 Utf16CodeUnits,
2970 UnicodeCodepoints,
2971}
2972
2973pub const LODESTONE_API_FRAGMENT_RANKER_FORMAT_VERSION: u16 = 1;
2974#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2975#[serde(rename_all = "snake_case")]
2976pub enum FragmentRanker {
2977 LexicalMatchCountV1,
2978}
2979
2980pub const LODESTONE_API_FRAGMENT_REQUEST_FORMAT_VERSION: u16 = 1;
2981#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2982#[serde(deny_unknown_fields)]
2983pub struct FragmentRequest {
2984 pub fields: Vec<String>,
2985 pub max_fragment_bytes: u32,
2986 pub max_fragments: u32,
2987 pub boundary: FragmentBoundary,
2988 pub offset_encoding: FragmentOffsetEncoding,
2989 pub ranker: FragmentRanker,
2990}
2991
2992pub const LODESTONE_API_SEARCH_FRAGMENT_FORMAT_VERSION: u16 = 1;
2993#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2994#[serde(deny_unknown_fields)]
2995pub struct SearchFragment {
2996 pub field: String,
2997 pub text: String,
2998 pub start: u32,
2999 pub end: u32,
3000 pub offset_encoding: FragmentOffsetEncoding,
3001 pub rank: u32,
3002 pub match_count: u32,
3003 pub truncated: bool,
3004 pub partial: bool,
3005}
3006
3007pub const LODESTONE_API_NUMERIC_FEATURE_TRANSFORM_FORMAT_VERSION: u16 = 1;
3008#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3009#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3010pub enum NumericFeatureTransform {
3011 Identity,
3012 Log1p,
3013 Clamp {
3014 minimum: ApproximateNumber,
3015 maximum: ApproximateNumber,
3016 },
3017}
3018
3019pub const LODESTONE_API_NUMERIC_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
3020#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3021#[serde(deny_unknown_fields)]
3022pub struct NumericResultFeature {
3023 pub name: String,
3024 pub field: String,
3025 pub transform: NumericFeatureTransform,
3026}
3027
3028pub const LODESTONE_API_RESULT_FEATURE_REQUEST_FORMAT_VERSION: u16 = 1;
3029#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3030#[serde(deny_unknown_fields)]
3031pub struct ResultFeatureRequest {
3032 pub top_n: u32,
3033 pub include_branch_components: bool,
3034 pub numeric: Vec<NumericResultFeature>,
3035}
3036
3037pub const LODESTONE_API_RESULT_DIVERSIFICATION_FORMAT_VERSION: u16 = 1;
3038#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3039#[serde(deny_unknown_fields)]
3040pub struct ResultDiversification {
3041 pub fields: Vec<String>,
3042 pub max_per_group: u32,
3043}
3044
3045pub const LODESTONE_API_SOURCE_PROJECTION_FORMAT_VERSION: u16 = 1;
3046#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3047#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3048pub enum SourceProjection {
3049 Full,
3050 Omit,
3051 Filter {
3052 includes: Vec<String>,
3053 excludes: Vec<String>,
3054 },
3055}
3056
3057pub const LODESTONE_API_BRANCH_SCORE_KIND_FORMAT_VERSION: u16 = 2;
3058#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3059#[serde(rename_all = "snake_case")]
3060pub enum BranchScoreKind {
3061 LexicalScore,
3062 DenseSimilarity,
3063 SparseDotProduct,
3064 LateInteractionMaxsim,
3065}
3066
3067pub const LODESTONE_API_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
3068#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3069#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3070pub enum ResultFeature {
3071 Branch {
3072 branch: String,
3073 score_kind: BranchScoreKind,
3074 rank: u32,
3075 score: ApproximateNumber,
3076 },
3077 Numeric {
3078 name: String,
3079 field: String,
3080 value: ApproximateNumber,
3081 },
3082}
3083
3084pub const LODESTONE_API_SEARCH_HIT_FORMAT_VERSION: u16 = 2;
3085#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3086#[serde(deny_unknown_fields)]
3087pub struct SearchHit {
3088 pub index: Resource,
3089 pub document_id: String,
3090 #[serde(default, skip_serializing_if = "Option::is_none")]
3091 pub score: Option<ApproximateNumber>,
3092 #[serde(default, skip_serializing_if = "Option::is_none")]
3093 pub source: Option<RawJson>,
3094 pub sort: Vec<JsonValue>,
3095 pub fragments: Vec<SearchFragment>,
3096 pub features: Vec<ResultFeature>,
3097 pub group_values: Vec<JsonValue>,
3098 pub inner_hits: Vec<NamedNestedInnerHitsResult>,
3099}
3100
3101pub const LODESTONE_API_AGGREGATION_BUCKET_FORMAT_VERSION: u16 = 1;
3102#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3103#[serde(deny_unknown_fields)]
3104pub struct AggregationBucket {
3105 pub key: JsonValue,
3106 pub document_count: U64,
3107 pub sub_aggregations: Vec<AggregationResult>,
3108}
3109
3110pub const LODESTONE_API_AGGREGATION_RESULT_FORMAT_VERSION: u16 = 3;
3111#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3112#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3113pub enum AggregationResult {
3114 Terms {
3115 name: String,
3116 buckets: Vec<AggregationBucket>,
3117 partial: bool,
3118 },
3119 Histogram {
3120 name: String,
3121 buckets: Vec<AggregationBucket>,
3122 partial: bool,
3123 },
3124 DateHistogram {
3125 name: String,
3126 buckets: Vec<AggregationBucket>,
3127 partial: bool,
3128 },
3129 Composite {
3130 name: String,
3131 buckets: Vec<AggregationBucket>,
3132 #[serde(default, skip_serializing_if = "Option::is_none")]
3133 after: Option<Cursor>,
3134 partial: bool,
3135 },
3136 Filter {
3137 name: String,
3138 buckets: Vec<AggregationBucket>,
3139 partial: bool,
3140 },
3141 SingleBucket {
3142 name: String,
3143 document_count: U64,
3144 sub_aggregations: Vec<AggregationResult>,
3145 partial: bool,
3146 },
3147 Cardinality {
3148 name: String,
3149 #[serde(default, skip_serializing_if = "Option::is_none")]
3150 value: Option<ApproximateNumber>,
3151 partial: bool,
3152 },
3153 Percentiles {
3154 name: String,
3155 values: Vec<PercentileValue>,
3156 partial: bool,
3157 },
3158 ApproximateCardinality {
3159 name: String,
3160 value: ApproximateNumber,
3161 approximation: Approximation,
3162 partial: bool,
3163 },
3164 ApproximatePercentiles {
3165 name: String,
3166 values: Vec<ApproximatePercentileValue>,
3167 approximation: Approximation,
3168 partial: bool,
3169 },
3170 Sum {
3171 name: String,
3172 #[serde(default, skip_serializing_if = "Option::is_none")]
3173 value: Option<ApproximateNumber>,
3174 partial: bool,
3175 },
3176 Avg {
3177 name: String,
3178 #[serde(default, skip_serializing_if = "Option::is_none")]
3179 value: Option<ApproximateNumber>,
3180 partial: bool,
3181 },
3182 Min {
3183 name: String,
3184 #[serde(default, skip_serializing_if = "Option::is_none")]
3185 value: Option<ApproximateNumber>,
3186 partial: bool,
3187 },
3188 Max {
3189 name: String,
3190 #[serde(default, skip_serializing_if = "Option::is_none")]
3191 value: Option<ApproximateNumber>,
3192 partial: bool,
3193 },
3194 Stats {
3195 name: String,
3196 count: U64,
3197 #[serde(default, skip_serializing_if = "Option::is_none")]
3198 min: Option<ApproximateNumber>,
3199 #[serde(default, skip_serializing_if = "Option::is_none")]
3200 max: Option<ApproximateNumber>,
3201 #[serde(default, skip_serializing_if = "Option::is_none")]
3202 avg: Option<ApproximateNumber>,
3203 sum: ApproximateNumber,
3204 partial: bool,
3205 },
3206 TimeSeriesV1 {
3207 name: String,
3208 buckets: Vec<TimeSeriesBucket>,
3209 partial: bool,
3210 },
3211}
3212
3213pub const LODESTONE_API_SHARD_COUNTS_FORMAT_VERSION: u16 = 1;
3214#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3215#[serde(deny_unknown_fields)]
3216pub struct ShardCounts {
3217 pub total: u32,
3218 pub successful: u32,
3219 pub skipped: u32,
3220 pub failed: u32,
3221}
3222
3223pub const LODESTONE_API_TOTAL_HITS_RELATION_FORMAT_VERSION: u16 = 1;
3224#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3225#[serde(rename_all = "snake_case")]
3226pub enum TotalHitsRelation {
3227 Exact,
3228 LowerBound,
3229 Incomplete,
3230}
3231
3232pub const LODESTONE_API_SEARCH_TOTAL_FORMAT_VERSION: u16 = 1;
3233#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3234#[serde(deny_unknown_fields)]
3235pub struct SearchTotal {
3236 pub value: U64,
3237 pub relation: TotalHitsRelation,
3238 pub partial: bool,
3239}
3240
3241pub const LODESTONE_API_SEARCH_EXECUTION_FRESHNESS_FORMAT_VERSION: u16 = 1;
3242#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3243#[serde(rename_all = "snake_case")]
3244pub enum SearchExecutionFreshness {
3245 Realtime,
3246 Committed,
3247}
3248
3249pub const LODESTONE_API_SEARCH_FRESHNESS_FORMAT_VERSION: u16 = 1;
3250#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3251#[serde(rename_all = "snake_case")]
3252pub enum SearchFreshness {
3253 Auto,
3254 Realtime,
3255 Committed,
3256}
3257
3258pub const LODESTONE_API_SEARCH_DEGRADATION_REASON_FORMAT_VERSION: u16 = 1;
3259#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3260#[serde(rename_all = "snake_case")]
3261pub enum SearchDegradationReason {
3262 WriterUnavailable,
3263}
3264
3265pub const LODESTONE_API_SEARCH_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
3266#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3267#[serde(deny_unknown_fields)]
3268pub struct SearchAchievement {
3269 pub freshness: SearchExecutionFreshness,
3270 pub degradation_reasons: Vec<SearchDegradationReason>,
3271}
3272
3273pub const LODESTONE_API_SEARCH_FAILURE_STAGE_FORMAT_VERSION: u16 = 1;
3274#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3275#[serde(rename_all = "snake_case")]
3276pub enum SearchFailureStage {
3277 Preflight,
3278 Dispatch,
3279}
3280
3281pub const LODESTONE_API_SEARCH_FAILURE_REASON_FORMAT_VERSION: u16 = 1;
3282#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3283#[serde(rename_all = "snake_case")]
3284pub enum SearchFailureReason {
3285 Cancelled,
3286 Overloaded,
3287 ResourceLimit,
3288 DeadlineExceeded,
3289 Unavailable,
3290 InvalidResponse,
3291}
3292
3293pub const LODESTONE_API_COLLECTION_SHARD_FORMAT_VERSION: u16 = 1;
3294#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3295#[serde(deny_unknown_fields)]
3296pub struct CollectionShard {
3297 pub collection_id: Identity,
3298 pub index_id: Identity,
3299 pub shard_id: u32,
3300}
3301
3302pub const LODESTONE_API_SEARCH_PARTIAL_FAILURE_FORMAT_VERSION: u16 = 1;
3303#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3304#[serde(deny_unknown_fields)]
3305pub struct SearchPartialFailure {
3306 pub shard: CollectionShard,
3307 pub stage: SearchFailureStage,
3308 pub reason: SearchFailureReason,
3309 pub recovery: RecoveryAction,
3310}
3311
3312pub const LODESTONE_API_ARTIFACT_FORMAT_VERSION: u16 = 1;
3313#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3314#[serde(deny_unknown_fields)]
3315pub struct Artifact {
3316 pub locator: Locator,
3317 pub bytes: U64,
3318 pub sha256: Digest,
3319 pub expires_at: U64,
3320}
3321
3322pub const LODESTONE_API_PORTABILITY_STORAGE_CAPABILITY_FORMAT_VERSION: u16 = 1;
3323#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3324#[serde(deny_unknown_fields)]
3325pub struct PortabilityStorageCapability {
3326 pub backend_authority: String,
3327 pub object_prefix: String,
3328 pub maximum_bytes: U64,
3329 #[serde(default, skip_serializing_if = "Option::is_none")]
3330 pub key_capability_digest: Option<Digest>,
3331}
3332
3333pub const LODESTONE_API_COLLECTION_EXPORT_ARTIFACT_FORMAT_VERSION: u16 = 1;
3334#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3335#[serde(deny_unknown_fields)]
3336pub struct CollectionExportArtifact {
3337 pub artifact: Artifact,
3338 pub backend_authority: String,
3339 pub object_key: String,
3340 pub source_collection_id: Identity,
3341 pub source_catalog_revision: U64,
3342}
3343
3344pub const LODESTONE_API_COLLECTION_TRANSFER_SEQUENCE_FORMAT_VERSION: u16 = 1;
3345#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3346#[serde(deny_unknown_fields)]
3347pub struct CollectionTransferSequence {
3348 pub source_index_incarnation: Identity,
3349 pub shard_id: u32,
3350 #[serde(default, skip_serializing_if = "Option::is_none")]
3351 pub registered_through: Option<U64>,
3352}
3353
3354pub const LODESTONE_API_COLLECTION_TRANSFER_ARTIFACT_FORMAT_VERSION: u16 = 1;
3355#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3356#[serde(deny_unknown_fields)]
3357pub struct CollectionTransferArtifact {
3358 pub artifact: Artifact,
3359 pub backend_authority: String,
3360 pub object_key: String,
3361 pub source_collection_id: Identity,
3362 pub base_catalog_revision: U64,
3363 pub final_catalog_revision: U64,
3364 pub admitted_security_generation: U64,
3365 pub fenced_security_generation: U64,
3366 pub base_content_digest: Digest,
3367 pub final_content_digest: Digest,
3368 pub final_sequence_digest: Digest,
3369 pub final_sequences: Vec<CollectionTransferSequence>,
3370 pub delta_entries: u32,
3371}
3372
3373pub const LODESTONE_API_PORTABILITY_KEY_CAPABILITY_REFERENCE_STATE_FORMAT_VERSION: u16 = 1;
3374#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3375#[serde(rename_all = "snake_case")]
3376pub enum PortabilityKeyCapabilityReferenceState {
3377 NotApplicable,
3378 Released,
3379}
3380
3381pub const LODESTONE_API_COLLECTION_EXPORT_RETIREMENT_FORMAT_VERSION: u16 = 1;
3382#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3383#[serde(deny_unknown_fields)]
3384pub struct CollectionExportRetirement {
3385 pub artifact: CollectionExportArtifact,
3386 pub artifact_absent: bool,
3387 pub key_capability_reference_state: PortabilityKeyCapabilityReferenceState,
3388}
3389
3390pub const LODESTONE_API_INDEX_TRANSFER_PAGE_FORMAT_VERSION: u16 = 1;
3391#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3392#[serde(deny_unknown_fields)]
3393pub struct IndexTransferPage {
3394 pub ordinal: u32,
3395 pub object_key: String,
3396 pub bytes: U64,
3397 pub content_digest: Digest,
3398 pub record_count: u32,
3399}
3400
3401pub const LODESTONE_API_INDEX_TRANSFER_ARTIFACT_FORMAT_VERSION: u16 = 1;
3402#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3403#[serde(deny_unknown_fields)]
3404pub struct IndexTransferArtifact {
3405 pub manifest: Artifact,
3406 pub manifest_object_key: String,
3407 pub transfer_identity: Digest,
3408 pub source_cluster_storage_id: Identity,
3409 pub source_collection_id: Identity,
3410 pub source_index: Resource,
3411 pub source_catalog_revision: U64,
3412 pub source_cut_digest: Digest,
3413 pub pages: Vec<IndexTransferPage>,
3414 pub record_count: u32,
3415}
3416
3417pub const LODESTONE_API_SEARCH_VALIDATION_BOUND_FORMAT_VERSION: u16 = 1;
3418#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3419#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3420pub enum SearchValidationBound {
3421 Exact { value: U64 },
3422 UpperBound { value: U64 },
3423 Unknown { reason: String },
3424}
3425
3426pub const LODESTONE_API_SEARCH_VALIDATION_ESTIMATES_FORMAT_VERSION: u16 = 1;
3427#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3428#[serde(deny_unknown_fields)]
3429pub struct SearchValidationEstimates {
3430 pub shard_fanout: SearchValidationBound,
3431 pub candidate_documents: SearchValidationBound,
3432 pub segments: SearchValidationBound,
3433 pub buckets: SearchValidationBound,
3434 pub memory_bytes: SearchValidationBound,
3435 pub object_reads: SearchValidationBound,
3436 pub object_bytes: SearchValidationBound,
3437 pub response_bytes: SearchValidationBound,
3438 pub planning_work: SearchValidationBound,
3439}
3440
3441pub const LODESTONE_API_SEARCH_VALIDATION_LIMIT_FORMAT_VERSION: u16 = 1;
3442#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3443#[serde(deny_unknown_fields)]
3444pub struct SearchValidationLimit {
3445 pub id: String,
3446 pub applied: U64,
3447 pub unit: String,
3448}
3449
3450pub const LODESTONE_API_OPERATION_KIND_FORMAT_VERSION: u16 = 4;
3451#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3452#[serde(rename_all = "snake_case")]
3453pub enum OperationKind {
3454 Catalog,
3455 MaintenanceTask,
3456 Security,
3457 Diagnostic,
3458 CollectionExport,
3459 CollectionExportRetirement,
3460 CollectionRestore,
3461 CollectionTransferExport,
3462 CollectionTransferRestore,
3463 IndexExport,
3464 IndexImport,
3465 VectorEvaluation,
3466 VectorWarm,
3467 Lifecycle,
3468 Quota,
3469 Admission,
3470}
3471
3472pub const LODESTONE_API_OPERATION_AUTHORITY_FORMAT_VERSION: u16 = 1;
3473#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3474#[serde(rename_all = "snake_case")]
3475pub enum OperationAuthority {
3476 Catalog,
3477 Tasks,
3478 Security,
3479 Diagnostics,
3480 Portability,
3481 Lifecycle,
3482 Quota,
3483 Admission,
3484}
3485
3486pub const LODESTONE_API_OPERATION_TARGET_FORMAT_VERSION: u16 = 1;
3487#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3488#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3489pub enum OperationTarget {
3490 Collection { collection_id: Identity },
3491 Resource { resource: Resource },
3492 Artifact { locator: Locator },
3493 None,
3494}
3495
3496pub const LODESTONE_API_OPERATION_STATE_FORMAT_VERSION: u16 = 1;
3497#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3498#[serde(rename_all = "snake_case")]
3499pub enum OperationState {
3500 Pending,
3501 Succeeded,
3502 Failed,
3503 Cancelled,
3504}
3505
3506pub const LODESTONE_API_OPERATION_PENDING_STATE_FORMAT_VERSION: u16 = 1;
3507#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3508#[serde(rename_all = "snake_case")]
3509pub enum OperationPendingState {
3510 Queued,
3511 Running,
3512 CancelRequested,
3513}
3514
3515pub const LODESTONE_API_OPERATION_PROGRESS_UNIT_FORMAT_VERSION: u16 = 1;
3516#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3517#[serde(rename_all = "snake_case")]
3518pub enum OperationProgressUnit {
3519 BasisPoints,
3520 Items,
3521 Bytes,
3522 WorkUnits,
3523}
3524
3525pub const LODESTONE_API_OPERATION_PROGRESS_FORMAT_VERSION: u16 = 1;
3526#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3527#[serde(deny_unknown_fields)]
3528pub struct OperationProgress {
3529 pub completed: U64,
3530 pub total: U64,
3531 pub unit: OperationProgressUnit,
3532}
3533
3534pub const LODESTONE_API_OPERATION_RESULT_FORMAT_VERSION: u16 = 1;
3535#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3536#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3537pub enum OperationResult {
3538 None,
3539 Artifacts { items: Vec<Artifact> },
3540}
3541
3542pub const LODESTONE_API_OPERATION_FAILURE_FORMAT_VERSION: u16 = 1;
3543#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3544#[serde(deny_unknown_fields)]
3545pub struct OperationFailure {
3546 pub error: ErrorBody,
3547}
3548
3549pub const LODESTONE_API_OPERATION_CANCELLATION_FORMAT_VERSION: u16 = 1;
3550#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3551#[serde(rename_all = "snake_case")]
3552pub enum OperationCancellation {
3553 NotCancellable,
3554 Cancellable,
3555 CancelRequested,
3556 Cancelled,
3557}
3558
3559pub const LODESTONE_API_OPERATION_RETENTION_STATE_FORMAT_VERSION: u16 = 1;
3560#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3561#[serde(rename_all = "snake_case")]
3562pub enum OperationRetentionState {
3563 Active,
3564 Retired,
3565}
3566
3567pub const LODESTONE_API_OPERATION_RETENTION_FORMAT_VERSION: u16 = 1;
3568#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3569#[serde(deny_unknown_fields)]
3570pub struct OperationRetention {
3571 pub state: OperationRetentionState,
3572 #[serde(default, skip_serializing_if = "Option::is_none")]
3573 pub retire_after: Option<U64>,
3574}
3575
3576pub const LODESTONE_API_OPERATION_FORMAT_VERSION: u16 = 2;
3577#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3578#[serde(deny_unknown_fields)]
3579pub struct Operation {
3580 pub locator: Locator,
3581 pub kind: OperationKind,
3582 pub authority: OperationAuthority,
3583 pub target: OperationTarget,
3584 pub authority_revision: U64,
3585 pub current_state: OperationState,
3586 #[serde(default, skip_serializing_if = "Option::is_none")]
3587 pub pending_state: Option<OperationPendingState>,
3588 #[serde(default, skip_serializing_if = "Option::is_none")]
3589 pub progress: Option<OperationProgress>,
3590 #[serde(default, skip_serializing_if = "Option::is_none")]
3591 pub result: Option<OperationResult>,
3592 #[serde(default, skip_serializing_if = "Option::is_none")]
3593 pub failure: Option<OperationFailure>,
3594 pub cancellation: OperationCancellation,
3595 pub retention: OperationRetention,
3596 pub submitted_at: U64,
3597 #[serde(default, skip_serializing_if = "Option::is_none")]
3598 pub terminal_at: Option<U64>,
3599}
3600
3601pub const LODESTONE_API_WRITE_DURABILITY_BOUNDARY_FORMAT_VERSION: u16 = 1;
3602#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3603#[serde(rename_all = "snake_case")]
3604pub enum WriteDurabilityBoundary {
3605 Registered,
3606 IncarnationMemory,
3607}
3608
3609pub const LODESTONE_API_WRITE_VISIBILITY_MODE_FORMAT_VERSION: u16 = 1;
3610#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3611#[serde(rename_all = "snake_case")]
3612pub enum WriteVisibilityMode {
3613 Applied,
3614 WaitFor,
3615}
3616
3617pub const LODESTONE_API_WRITE_RESPONSE_STAGE_FORMAT_VERSION: u16 = 1;
3618#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3619#[serde(rename_all = "snake_case")]
3620pub enum WriteResponseStage {
3621 Validated,
3622 Admitted,
3623 Sequenced,
3624 ObjectPut,
3625 Registered,
3626 AppliedToActiveMemtable,
3627 MicroCommitted,
3628 Sealed,
3629}
3630
3631pub const LODESTONE_API_WRITE_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
3632#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3633#[serde(deny_unknown_fields)]
3634pub struct WriteAchievement {
3635 pub durability_class: ResourceDurabilityClass,
3636 pub durability_boundary: WriteDurabilityBoundary,
3637 pub visibility_mode: WriteVisibilityMode,
3638 pub response_stage: WriteResponseStage,
3639}
3640
3641pub const LODESTONE_API_MUTATION_COMMIT_POSITION_FORMAT_VERSION: u16 = 1;
3642#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3643#[serde(deny_unknown_fields)]
3644pub struct MutationCommitPosition {
3645 pub leader_term: U64,
3646 pub leader_node_id: U64,
3647 pub log_index: U64,
3648}
3649
3650pub const LODESTONE_API_MUTATION_COMMIT_RECEIPT_SHAPE_VERSION: u16 = 1;
3651pub const LODESTONE_API_MUTATION_COMMIT_RECEIPT_FORMAT_VERSION: u16 = 1;
3652#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3653#[serde(deny_unknown_fields)]
3654pub struct MutationCommitReceipt {
3655 pub format_version: u32,
3656 pub registration_position: MutationCommitPosition,
3657 pub sequence: U64,
3658 pub primary_term: U64,
3659 pub mapping_generation: U64,
3660 pub durability_class: ResourceDurabilityClass,
3661 pub durability_boundary: WriteDurabilityBoundary,
3662 pub committed_at_unix_millis: U64,
3663 pub committed_at_uncertainty_millis: U64,
3664}
3665
3666pub const LODESTONE_API_MUTATION_RESOLVER_FORMAT_VERSION: u16 = 1;
3667#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3668#[serde(rename_all = "snake_case")]
3669pub enum MutationResolver {
3670 CloneIndex,
3671 GetHistory,
3672 ResolveAppendBulk,
3673 ResolveCatalogAction,
3674 ResolveDocumentBulk,
3675 ResolveDocumentMutation,
3676 ResolveIndexChange,
3677 ResolveSecurityAction,
3678 ResolveServiceCredentialReservation,
3679 ResolveStateWrite,
3680}
3681
3682pub const LODESTONE_API_MUTATION_OUTCOME_FORMAT_VERSION: u16 = 1;
3683#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3684#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
3685pub enum MutationOutcome {
3686 Terminal,
3687 Pending {
3688 #[serde(default, skip_serializing_if = "Option::is_none")]
3689 resolver: Option<MutationResolver>,
3690 },
3691 Indeterminate {
3692 #[serde(default, skip_serializing_if = "Option::is_none")]
3693 resolver: Option<MutationResolver>,
3694 },
3695 ResolutionRequired {
3696 resolver: MutationResolver,
3697 },
3698}
3699
3700pub const LODESTONE_API_SUBMISSION_STATE_FORMAT_VERSION: u16 = 1;
3701#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3702#[serde(rename_all = "snake_case")]
3703pub enum SubmissionState {
3704 NotSubmitted,
3705 Submitted,
3706 Resolved,
3707 KnownRetired,
3708 Indeterminate,
3709}
3710
3711pub const LODESTONE_API_EXPECTED_BINDING_FORMAT_VERSION: u16 = 1;
3712#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3713#[serde(deny_unknown_fields)]
3714pub struct ExpectedBinding {
3715 pub incarnation: Identity,
3716 pub revision: U64,
3717}
3718
3719pub const LODESTONE_API_ADMINISTRATION_ALIAS_ACTION_FORMAT_VERSION: u16 = 1;
3720#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3721#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3722pub enum AdministrationAliasAction {
3723 Put {
3724 name: String,
3725 #[serde(default, skip_serializing_if = "Option::is_none")]
3726 expected_revision: Option<U64>,
3727 targets: Vec<AliasTarget>,
3728 #[serde(default, skip_serializing_if = "Option::is_none")]
3729 filter: Option<RawJson>,
3730 #[serde(default, skip_serializing_if = "Option::is_none")]
3731 index_routing: Option<String>,
3732 #[serde(default, skip_serializing_if = "Option::is_none")]
3733 search_routing: Option<String>,
3734 },
3735 Delete {
3736 name: String,
3737 expected_revision: U64,
3738 },
3739}
3740
3741pub const LODESTONE_API_ADMINISTRATION_MUTATION_FORMAT_VERSION: u16 = 2;
3742#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3743#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3744pub enum AdministrationMutation {
3745 ApplyAliasActions {
3746 actions: Vec<AdministrationAliasAction>,
3747 },
3748 PutComponentTemplate {
3749 name: String,
3750 #[serde(default, skip_serializing_if = "Option::is_none")]
3751 expected: Option<ExpectedBinding>,
3752 mapping: Mapping,
3753 settings: RawJson,
3754 #[serde(default, skip_serializing_if = "Option::is_none")]
3755 resource_spec: Option<IndexResourceSpec>,
3756 },
3757 DeleteComponentTemplate {
3758 name: String,
3759 expected: ExpectedBinding,
3760 },
3761 PutIndexTemplate {
3762 name: String,
3763 #[serde(default, skip_serializing_if = "Option::is_none")]
3764 expected: Option<ExpectedBinding>,
3765 priority: i32,
3766 data_stream: bool,
3767 index_patterns: Vec<String>,
3768 components: Vec<ExpectedBinding>,
3769 mapping: Mapping,
3770 settings: RawJson,
3771 #[serde(default, skip_serializing_if = "Option::is_none")]
3772 resource_spec: Option<IndexResourceSpec>,
3773 },
3774 DeleteIndexTemplate {
3775 name: String,
3776 expected: ExpectedBinding,
3777 },
3778 PutIngestPipeline {
3779 name: String,
3780 #[serde(default, skip_serializing_if = "Option::is_none")]
3781 expected: Option<ExpectedBinding>,
3782 definition: RawJson,
3783 },
3784 DeleteIngestPipeline {
3785 name: String,
3786 expected: ExpectedBinding,
3787 },
3788 PutLifecyclePolicy {
3789 name: String,
3790 #[serde(default, skip_serializing_if = "Option::is_none")]
3791 expected: Option<ExpectedBinding>,
3792 rollover: RolloverThresholds,
3793 retention: RetentionPolicy,
3794 merge_hint: bool,
3795 freeze_hint: bool,
3796 delete_expired: bool,
3797 },
3798 DeleteLifecyclePolicy {
3799 name: String,
3800 expected: ExpectedBinding,
3801 },
3802 CreateDataStream {
3803 name: String,
3804 timestamp_field: String,
3805 index_template: ExpectedBinding,
3806 #[serde(default, skip_serializing_if = "Option::is_none")]
3807 lifecycle_policy: Option<ExpectedBinding>,
3808 },
3809 UpdateDataStream {
3810 name: String,
3811 expected_revision: U64,
3812 timestamp_field: String,
3813 index_template: ExpectedBinding,
3814 #[serde(default, skip_serializing_if = "Option::is_none")]
3815 lifecycle_policy: Option<ExpectedBinding>,
3816 },
3817 DeleteDataStream {
3818 name: String,
3819 expected_revision: U64,
3820 },
3821 RolloverDataStream {
3822 name: String,
3823 expected_revision: U64,
3824 },
3825}
3826
3827pub const LODESTONE_API_ADMINISTRATION_OUTCOME_FORMAT_VERSION: u16 = 1;
3828#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3829#[serde(deny_unknown_fields)]
3830pub struct AdministrationOutcome {
3831 pub action_id: Digest,
3832 pub authority_revision: U64,
3833 pub state: String,
3834 #[serde(default, skip_serializing_if = "Option::is_none")]
3835 pub resource: Option<Resource>,
3836}
3837
3838pub const LODESTONE_API_INDEX_CHANGE_APPLY_RECEIPT_FORMAT_VERSION: u16 = 1;
3839#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3840#[serde(deny_unknown_fields)]
3841pub struct IndexChangeApplyReceipt {
3842 pub action_id: Digest,
3843 pub semantic_digest: Digest,
3844 pub index: Resource,
3845 pub revision: U64,
3846 pub schema_generation: U64,
3847 pub state: String,
3848}
3849
3850pub const LODESTONE_API_INDEX_CHANGE_RESOLUTION_STATE_FORMAT_VERSION: u16 = 1;
3851#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3852#[serde(rename_all = "snake_case")]
3853pub enum IndexChangeResolutionState {
3854 NotSubmitted,
3855 Prepared,
3856 Pending,
3857 Applied,
3858 Failed,
3859 KnownRetired,
3860 ExpiredUnknown,
3861}
3862
3863pub const LODESTONE_API_BULK_DOCUMENT_ITEM_FORMAT_VERSION: u16 = 2;
3864#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3865#[serde(deny_unknown_fields)]
3866pub struct BulkDocumentItem {
3867 pub item_action_id: Digest,
3868 pub document_id: String,
3869 pub operation: String,
3870 #[serde(default, skip_serializing_if = "Option::is_none")]
3871 pub source: Option<RawJson>,
3872 #[serde(default, skip_serializing_if = "Option::is_none")]
3873 pub record: Option<NativeRecord>,
3874 #[serde(default, skip_serializing_if = "Option::is_none")]
3875 pub routing: Option<String>,
3876 #[serde(default, skip_serializing_if = "Option::is_none")]
3877 pub condition: Option<DocumentMutationCondition>,
3878 #[serde(default, skip_serializing_if = "Option::is_none")]
3879 pub pipeline: Option<IngestPipelineSelection>,
3880 pub semantic_digest: Digest,
3881}
3882
3883pub const LODESTONE_API_BULK_DOCUMENT_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
3884#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3885#[serde(deny_unknown_fields)]
3886pub struct BulkDocumentItemOutcome {
3887 pub item_action_id: Digest,
3888 #[serde(default, skip_serializing_if = "Option::is_none")]
3889 pub locator: Option<Locator>,
3890 pub state: SubmissionState,
3891 #[serde(default, skip_serializing_if = "Option::is_none")]
3892 pub sequence: Option<U64>,
3893 #[serde(default, skip_serializing_if = "Option::is_none")]
3894 pub mapping_generation: Option<U64>,
3895 pub mapping_adopted: bool,
3896 pub no_document_effect: bool,
3897 #[serde(default, skip_serializing_if = "Option::is_none")]
3898 pub error: Option<ErrorBody>,
3899}
3900
3901pub const LODESTONE_API_BULK_DOCUMENT_OUTCOME_FORMAT_VERSION: u16 = 1;
3902#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3903#[serde(deny_unknown_fields)]
3904pub struct BulkDocumentOutcome {
3905 pub batch_id: Digest,
3906 pub index: Resource,
3907 pub items: Vec<BulkDocumentItemOutcome>,
3908 pub complete: bool,
3909 #[serde(default, skip_serializing_if = "Option::is_none")]
3910 pub achievement: Option<WriteAchievement>,
3911}
3912
3913pub const LODESTONE_API_METRIC_ATTRIBUTE_VALUE_FORMAT_VERSION: u16 = 1;
3914#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3915#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3916pub enum MetricAttributeValue {
3917 String { value: String },
3918 Boolean { value: bool },
3919 I64 { value: I64 },
3920 U64 { value: U64 },
3921 F64Bits { value: U64 },
3922}
3923
3924pub const LODESTONE_API_METRIC_ATTRIBUTE_FORMAT_VERSION: u16 = 1;
3925#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3926#[serde(deny_unknown_fields)]
3927pub struct MetricAttribute {
3928 pub key: String,
3929 pub value: MetricAttributeValue,
3930}
3931
3932pub const LODESTONE_API_METRIC_NUMBER_FORMAT_VERSION: u16 = 1;
3933#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3934#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3935pub enum MetricNumber {
3936 I64 { value: I64 },
3937 F64Bits { value: U64 },
3938}
3939
3940pub const LODESTONE_API_METRIC_TEMPORALITY_FORMAT_VERSION: u16 = 1;
3941#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3942#[serde(rename_all = "snake_case")]
3943pub enum MetricTemporality {
3944 Cumulative,
3945 Delta,
3946}
3947
3948pub const LODESTONE_API_METRIC_POINT_KIND_FORMAT_VERSION: u16 = 1;
3949#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3950#[serde(rename_all = "snake_case")]
3951pub enum MetricPointKind {
3952 Gauge,
3953 Sum,
3954 ExplicitHistogram,
3955 ExponentialHistogram,
3956}
3957
3958pub const LODESTONE_API_METRIC_EXPONENTIAL_BUCKETS_FORMAT_VERSION: u16 = 1;
3959#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3960#[serde(deny_unknown_fields)]
3961pub struct MetricExponentialBuckets {
3962 pub offset: i32,
3963 pub counts: Vec<U64>,
3964}
3965
3966pub const LODESTONE_API_METRIC_DATA_FORMAT_VERSION: u16 = 1;
3967#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3968#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3969pub enum MetricData {
3970 Gauge {
3971 value: MetricNumber,
3972 },
3973 Sum {
3974 value: MetricNumber,
3975 temporality: MetricTemporality,
3976 monotonic: bool,
3977 },
3978 ExplicitHistogram {
3979 temporality: MetricTemporality,
3980 count: U64,
3981 #[serde(default, skip_serializing_if = "Option::is_none")]
3982 sum: Option<MetricNumber>,
3983 bounds_f64_bits: Vec<U64>,
3984 bucket_counts: Vec<U64>,
3985 },
3986 ExponentialHistogram {
3987 temporality: MetricTemporality,
3988 count: U64,
3989 #[serde(default, skip_serializing_if = "Option::is_none")]
3990 sum: Option<MetricNumber>,
3991 scale: i32,
3992 zero_count: U64,
3993 positive: MetricExponentialBuckets,
3994 negative: MetricExponentialBuckets,
3995 },
3996}
3997
3998pub const LODESTONE_API_METRIC_INSTRUMENTATION_SCOPE_FORMAT_VERSION: u16 = 1;
3999#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4000#[serde(deny_unknown_fields)]
4001pub struct MetricInstrumentationScope {
4002 pub name: String,
4003 #[serde(default, skip_serializing_if = "Option::is_none")]
4004 pub version: Option<String>,
4005 #[serde(default, skip_serializing_if = "Option::is_none")]
4006 pub schema_url: Option<String>,
4007 pub attributes: Vec<MetricAttribute>,
4008}
4009
4010pub const LODESTONE_API_METRIC_EXEMPLAR_FORMAT_VERSION: u16 = 1;
4011#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4012#[serde(deny_unknown_fields)]
4013pub struct MetricExemplar {
4014 pub timestamp_unix_nanos: U64,
4015 pub value: MetricNumber,
4016 #[serde(default, skip_serializing_if = "Option::is_none")]
4017 pub trace_id: Option<String>,
4018 #[serde(default, skip_serializing_if = "Option::is_none")]
4019 pub span_id: Option<String>,
4020 pub filtered_attributes: Vec<MetricAttribute>,
4021}
4022
4023pub const LODESTONE_API_METRIC_POINT_SHAPE_VERSION: u16 = 1;
4024pub const LODESTONE_API_METRIC_POINT_FORMAT_VERSION: u16 = 1;
4025#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4026#[serde(deny_unknown_fields)]
4027pub struct MetricPoint {
4028 pub format_version: u32,
4029 pub resource_attributes: Vec<MetricAttribute>,
4030 pub instrumentation_scope: MetricInstrumentationScope,
4031 pub metric_name: String,
4032 #[serde(default, skip_serializing_if = "Option::is_none")]
4033 pub description: Option<String>,
4034 pub unit: String,
4035 pub series_attributes: Vec<MetricAttribute>,
4036 pub timestamp_unix_nanos: U64,
4037 #[serde(default, skip_serializing_if = "Option::is_none")]
4038 pub start_timestamp_unix_nanos: Option<U64>,
4039 pub data: MetricData,
4040 pub exemplars: Vec<MetricExemplar>,
4041}
4042
4043pub const LODESTONE_API_ENTITY_REF_FORMAT_VERSION: u16 = 1;
4044#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4045#[serde(deny_unknown_fields)]
4046pub struct EntityRef {
4047 pub entity_kind: String,
4048 pub entity_id: String,
4049}
4050
4051pub const LODESTONE_API_RELATIONSHIP_EVIDENCE_REF_FORMAT_VERSION: u16 = 1;
4052#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4053#[serde(deny_unknown_fields)]
4054pub struct RelationshipEvidenceRef {
4055 pub index: Resource,
4056 pub record_id: String,
4057}
4058
4059pub const LODESTONE_API_RELATIONSHIP_DIRECTIONALITY_FORMAT_VERSION: u16 = 1;
4060#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4061#[serde(rename_all = "snake_case")]
4062pub enum RelationshipDirectionality {
4063 Directed,
4064 Undirected,
4065}
4066
4067pub const LODESTONE_API_RELATIONSHIP_RECORD_SHAPE_VERSION: u16 = 1;
4068pub const LODESTONE_API_RELATIONSHIP_RECORD_FORMAT_VERSION: u16 = 1;
4069#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4070#[serde(deny_unknown_fields)]
4071pub struct RelationshipRecord {
4072 pub format_version: u32,
4073 pub relationship_id: String,
4074 pub source: EntityRef,
4075 pub target: EntityRef,
4076 pub relationship_type: String,
4077 pub directionality: RelationshipDirectionality,
4078 #[serde(default, skip_serializing_if = "Option::is_none")]
4079 pub valid_from_unix_nanos: Option<U64>,
4080 #[serde(default, skip_serializing_if = "Option::is_none")]
4081 pub valid_through_unix_nanos: Option<U64>,
4082 pub provenance: Vec<String>,
4083 pub evidence: Vec<RelationshipEvidenceRef>,
4084 pub assertion_class: String,
4085}
4086
4087pub const LODESTONE_API_PROFILE_LABEL_FORMAT_VERSION: u16 = 1;
4088#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4089#[serde(deny_unknown_fields)]
4090pub struct ProfileLabel {
4091 pub key: String,
4092 pub value: String,
4093}
4094
4095pub const LODESTONE_API_PROFILE_SAMPLE_TYPE_FORMAT_VERSION: u16 = 1;
4096#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4097#[serde(deny_unknown_fields)]
4098pub struct ProfileSampleType {
4099 pub sample_type: String,
4100 pub unit: String,
4101}
4102
4103pub const LODESTONE_API_PROFILE_MAPPING_FORMAT_VERSION: u16 = 1;
4104#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4105#[serde(deny_unknown_fields)]
4106pub struct ProfileMapping {
4107 pub mapping_id: String,
4108 pub build_id: String,
4109 pub module_id: String,
4110 #[serde(default, skip_serializing_if = "Option::is_none")]
4111 pub filename: Option<String>,
4112}
4113
4114pub const LODESTONE_API_PROFILE_FUNCTION_FORMAT_VERSION: u16 = 1;
4115#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4116#[serde(deny_unknown_fields)]
4117pub struct ProfileFunction {
4118 pub function_id: String,
4119 #[serde(default, skip_serializing_if = "Option::is_none")]
4120 pub name: Option<String>,
4121 #[serde(default, skip_serializing_if = "Option::is_none")]
4122 pub system_name: Option<String>,
4123 #[serde(default, skip_serializing_if = "Option::is_none")]
4124 pub filename: Option<String>,
4125 #[serde(default, skip_serializing_if = "Option::is_none")]
4126 pub start_line: Option<U64>,
4127 #[serde(default, skip_serializing_if = "Option::is_none")]
4128 pub symbol_observation_id: Option<String>,
4129}
4130
4131pub const LODESTONE_API_PROFILE_LINE_FORMAT_VERSION: u16 = 1;
4132#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4133#[serde(deny_unknown_fields)]
4134pub struct ProfileLine {
4135 pub function_id: String,
4136 pub line: U64,
4137}
4138
4139pub const LODESTONE_API_PROFILE_LOCATION_FORMAT_VERSION: u16 = 1;
4140#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4141#[serde(deny_unknown_fields)]
4142pub struct ProfileLocation {
4143 pub location_id: String,
4144 #[serde(default, skip_serializing_if = "Option::is_none")]
4145 pub mapping_id: Option<String>,
4146 pub address: U64,
4147 pub lines: Vec<ProfileLine>,
4148}
4149
4150pub const LODESTONE_API_PROFILE_STACK_FORMAT_VERSION: u16 = 1;
4151#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4152#[serde(deny_unknown_fields)]
4153pub struct ProfileStack {
4154 pub stack_id: String,
4155 #[serde(default, skip_serializing_if = "Option::is_none")]
4156 pub parent_stack_id: Option<String>,
4157 pub location_id: String,
4158}
4159
4160pub const LODESTONE_API_PROFILE_SAMPLE_FORMAT_VERSION: u16 = 1;
4161#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4162#[serde(deny_unknown_fields)]
4163pub struct ProfileSample {
4164 pub sample_id: String,
4165 pub stack_id: String,
4166 pub values: Vec<MetricNumber>,
4167 pub labels: Vec<ProfileLabel>,
4168 #[serde(default, skip_serializing_if = "Option::is_none")]
4169 pub trace_id: Option<String>,
4170 #[serde(default, skip_serializing_if = "Option::is_none")]
4171 pub span_id: Option<String>,
4172}
4173
4174pub const LODESTONE_API_PROFILE_INSTRUMENTATION_SCOPE_FORMAT_VERSION: u16 = 1;
4175#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4176#[serde(deny_unknown_fields)]
4177pub struct ProfileInstrumentationScope {
4178 pub name: String,
4179 #[serde(default, skip_serializing_if = "Option::is_none")]
4180 pub version: Option<String>,
4181 pub attributes: Vec<ProfileLabel>,
4182}
4183
4184pub const LODESTONE_API_PROFILE_BATCH_SHAPE_VERSION: u16 = 1;
4185pub const LODESTONE_API_PROFILE_BATCH_FORMAT_VERSION: u16 = 1;
4186#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4187#[serde(deny_unknown_fields)]
4188pub struct ProfileBatch {
4189 pub format_version: u32,
4190 pub profile_id: String,
4191 pub batch_id: String,
4192 pub start_unix_nanos: U64,
4193 pub end_unix_nanos: U64,
4194 pub duration_nanos: U64,
4195 pub period_nanos: U64,
4196 pub sample_types: Vec<ProfileSampleType>,
4197 pub resource_attributes: Vec<ProfileLabel>,
4198 pub instrumentation_scope: ProfileInstrumentationScope,
4199 pub mappings: Vec<ProfileMapping>,
4200 pub functions: Vec<ProfileFunction>,
4201 pub locations: Vec<ProfileLocation>,
4202 pub stacks: Vec<ProfileStack>,
4203 pub samples: Vec<ProfileSample>,
4204}
4205
4206pub const LODESTONE_API_NATIVE_RECORD_FORMAT_VERSION: u16 = 3;
4207#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4208#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4209pub enum NativeRecord {
4210 Document { source: RawJson },
4211 MetricPoint { point: Box<MetricPoint> },
4212 Relationship { relationship: Box<RelationshipRecord> },
4213 ProfileBatch { batch: Box<ProfileBatch> },
4214}
4215
4216pub const LODESTONE_API_RETAINED_APPEND_ITEM_FORMAT_VERSION: u16 = 4;
4217#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4218#[serde(deny_unknown_fields)]
4219pub struct RetainedAppendItem {
4220 pub item_action_id: Digest,
4221 pub document_id: String,
4222 pub record: NativeRecord,
4223}
4224
4225pub const LODESTONE_API_RETAINED_APPEND_STATE_FORMAT_VERSION: u16 = 1;
4226#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4227#[serde(rename_all = "snake_case")]
4228pub enum RetainedAppendState {
4229 Prepared,
4230 Committed,
4231 Replayed,
4232 Conflict,
4233 NotSubmittedRetryable,
4234 NotSubmittedTerminal,
4235 SubmittedIndeterminate,
4236 Retired,
4237}
4238
4239pub const LODESTONE_API_RETAINED_APPEND_RETRY_SAFETY_FORMAT_VERSION: u16 = 1;
4240#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4241#[serde(rename_all = "snake_case")]
4242pub enum RetainedAppendRetrySafety {
4243 Safe,
4244 ResolveOnly,
4245 Terminal,
4246}
4247
4248pub const LODESTONE_API_RETAINED_APPEND_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
4249#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4250#[serde(deny_unknown_fields)]
4251pub struct RetainedAppendItemOutcome {
4252 pub item_action_id: Digest,
4253 #[serde(default, skip_serializing_if = "Option::is_none")]
4254 pub locator: Option<Locator>,
4255 #[serde(default, skip_serializing_if = "Option::is_none")]
4256 pub semantic_digest: Option<Digest>,
4257 pub state: RetainedAppendState,
4258 pub retry_safety: RetainedAppendRetrySafety,
4259 #[serde(default, skip_serializing_if = "Option::is_none")]
4260 pub sequence: Option<U64>,
4261 #[serde(default, skip_serializing_if = "Option::is_none")]
4262 pub primary_term: Option<U64>,
4263 #[serde(default, skip_serializing_if = "Option::is_none")]
4264 pub error: Option<ErrorBody>,
4265}
4266
4267pub const LODESTONE_API_RETAINED_APPEND_BULK_OUTCOME_FORMAT_VERSION: u16 = 1;
4268#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4269#[serde(deny_unknown_fields)]
4270pub struct RetainedAppendBulkOutcome {
4271 pub batch_id: Digest,
4272 pub index: Resource,
4273 pub items: Vec<RetainedAppendItemOutcome>,
4274 pub complete: bool,
4275 #[serde(default, skip_serializing_if = "Option::is_none")]
4276 pub achievement: Option<WriteAchievement>,
4277}
4278
4279pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_STATE_FORMAT_VERSION: u16 = 1;
4280#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4281#[serde(rename_all = "snake_case")]
4282pub enum RetainedAppendObservationState {
4283 Visible,
4284 Pending,
4285 SubmittedIndeterminate,
4286 Conflict,
4287 Retired,
4288}
4289
4290pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_OUTCOME_FORMAT_VERSION: u16 = 1;
4291#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4292#[serde(deny_unknown_fields)]
4293pub struct RetainedAppendObservationOutcome {
4294 pub index: Resource,
4295 pub locator: Locator,
4296 pub state: RetainedAppendObservationState,
4297 #[serde(default, skip_serializing_if = "Option::is_none")]
4298 pub sequence: Option<U64>,
4299 #[serde(default, skip_serializing_if = "Option::is_none")]
4300 pub primary_term: Option<U64>,
4301}
4302
4303pub const LODESTONE_API_BINARY_VALUE_FORMAT_VERSION: u16 = 1;
4304#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4305#[serde(deny_unknown_fields)]
4306pub struct BinaryValue {
4307 pub bytes_base64: String,
4308}
4309
4310pub const LODESTONE_API_STATE_HASH_FIELD_FORMAT_VERSION: u16 = 1;
4311#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4312#[serde(deny_unknown_fields)]
4313pub struct StateHashField {
4314 pub field: BinaryValue,
4315 pub value: BinaryValue,
4316}
4317
4318pub const LODESTONE_API_STATE_SET_ENTRY_FORMAT_VERSION: u16 = 1;
4319#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4320#[serde(deny_unknown_fields)]
4321pub struct StateSetEntry {
4322 pub key: BinaryValue,
4323 pub value: BinaryValue,
4324}
4325
4326pub const LODESTONE_API_STATE_SET_CONDITION_FORMAT_VERSION: u16 = 1;
4327#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4328#[serde(rename_all = "snake_case")]
4329pub enum StateSetCondition {
4330 Always,
4331 IfAbsent,
4332 IfPresent,
4333}
4334
4335pub const LODESTONE_API_STATE_OPERATION_FORMAT_VERSION: u16 = 1;
4336#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4337#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4338pub enum StateOperation {
4339 Get {
4340 key: BinaryValue,
4341 },
4342 Set {
4343 key: BinaryValue,
4344 value: BinaryValue,
4345 condition: StateSetCondition,
4346 #[serde(default, skip_serializing_if = "Option::is_none")]
4347 expires_at_millis: Option<U64>,
4348 },
4349 Delete {
4350 keys: Vec<BinaryValue>,
4351 },
4352 Exists {
4353 keys: Vec<BinaryValue>,
4354 },
4355 ExpireAt {
4356 key: BinaryValue,
4357 absolute_millis: U64,
4358 },
4359 TtlStatus {
4360 key: BinaryValue,
4361 },
4362 Persist {
4363 key: BinaryValue,
4364 },
4365 MultiGet {
4366 keys: Vec<BinaryValue>,
4367 },
4368 MultiSet {
4369 entries: Vec<StateSetEntry>,
4370 },
4371 Increment {
4372 key: BinaryValue,
4373 delta: I64,
4374 },
4375 HashGet {
4376 key: BinaryValue,
4377 field: BinaryValue,
4378 },
4379 HashSet {
4380 key: BinaryValue,
4381 fields: Vec<StateHashField>,
4382 },
4383 HashGetAll {
4384 key: BinaryValue,
4385 },
4386}
4387
4388pub const LODESTONE_API_STATE_OPTIONAL_VALUE_FORMAT_VERSION: u16 = 1;
4389#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4390#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4391pub enum StateOptionalValue {
4392 Missing,
4393 Value { value: BinaryValue },
4394}
4395
4396pub const LODESTONE_API_STATE_COMMAND_RESULT_FORMAT_VERSION: u16 = 1;
4397#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4398#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4399pub enum StateCommandResult {
4400 Get {
4401 value: StateOptionalValue,
4402 },
4403 Set {
4404 applied: bool,
4405 },
4406 Delete {
4407 removed: u32,
4408 },
4409 Exists {
4410 count: u32,
4411 },
4412 Expire {
4413 changed: bool,
4414 },
4415 TtlStatus {
4416 state: String,
4417 #[serde(default, skip_serializing_if = "Option::is_none")]
4418 remaining_millis: Option<U64>,
4419 },
4420 Persist {
4421 changed: bool,
4422 },
4423 MultiGet {
4424 values: Vec<StateOptionalValue>,
4425 },
4426 MultiSet {
4427 written: u32,
4428 },
4429 Increment {
4430 value: I64,
4431 },
4432 HashGet {
4433 value: StateOptionalValue,
4434 },
4435 HashSet {
4436 fields_added: u32,
4437 },
4438 HashGetAll {
4439 fields: Vec<StateHashField>,
4440 },
4441}
4442
4443pub const LODESTONE_API_STATE_WRITE_RESOLUTION_FORMAT_VERSION: u16 = 1;
4444#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4445#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4446pub enum StateWriteResolution {
4447 NotSubmitted,
4448 Resolved {
4449 result: StateCommandResult,
4450 sequence: U64,
4451 },
4452 KnownRetired {
4453 retired_through: U64,
4454 },
4455 StateReset {
4456 submitted_reset_epoch: U64,
4457 current_reset_epoch: U64,
4458 },
4459 Indeterminate {
4460 #[serde(default, skip_serializing_if = "Option::is_none")]
4461 observed_high_water: Option<U64>,
4462 #[serde(default, skip_serializing_if = "Option::is_none")]
4463 current_high_water: Option<U64>,
4464 #[serde(default, skip_serializing_if = "Option::is_none")]
4465 retired_through: Option<U64>,
4466 },
4467}
4468
4469pub const LODESTONE_API_SERVICE_CREDENTIAL_RESERVATION_FORMAT_VERSION: u16 = 1;
4470#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4471#[serde(deny_unknown_fields)]
4472pub struct ServiceCredentialReservation {
4473 pub locator: Locator,
4474 pub reservation_action_id: Digest,
4475 pub activation_action_id: Digest,
4476 pub principal_id: Identity,
4477 pub api_key_id: Identity,
4478 pub generation: U64,
4479 pub reservation_expires_at: U64,
4480 pub credential_expires_at: U64,
4481 pub verifier_algorithm: String,
4482 pub verifier_algorithm_version: u32,
4483 pub required_secret_bytes: u32,
4484}
4485
4486pub const LODESTONE_API_SUBSCRIPTION_METADATA_FIELD_FORMAT_VERSION: u16 = 1;
4487#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4488#[serde(rename_all = "snake_case")]
4489pub enum SubscriptionMetadataField {
4490 Id,
4491 RoutingHash,
4492 Operation,
4493 Shard,
4494 Sequence,
4495}
4496
4497pub const LODESTONE_API_SUBSCRIPTION_FIELD_FORMAT_VERSION: u16 = 1;
4498#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4499#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4500pub enum SubscriptionField {
4501 Source { path: String },
4502 Metadata { field: SubscriptionMetadataField },
4503}
4504
4505pub const LODESTONE_API_SUBSCRIPTION_FILTER_FORMAT_VERSION: u16 = 1;
4506#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4507#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4508pub enum SubscriptionFilter {
4509 All,
4510 Bool {
4511 must: Vec<SubscriptionFilter>,
4512 should: Vec<SubscriptionFilter>,
4513 must_not: Vec<SubscriptionFilter>,
4514 minimum_should_match: u32,
4515 },
4516 Term {
4517 field: SubscriptionField,
4518 value: JsonValue,
4519 },
4520 Terms {
4521 field: SubscriptionField,
4522 values: Vec<JsonValue>,
4523 },
4524 Range {
4525 field: SubscriptionField,
4526 #[serde(default, skip_serializing_if = "Option::is_none")]
4527 gt: Option<JsonValue>,
4528 #[serde(default, skip_serializing_if = "Option::is_none")]
4529 gte: Option<JsonValue>,
4530 #[serde(default, skip_serializing_if = "Option::is_none")]
4531 lt: Option<JsonValue>,
4532 #[serde(default, skip_serializing_if = "Option::is_none")]
4533 lte: Option<JsonValue>,
4534 },
4535 Exists {
4536 field: SubscriptionField,
4537 },
4538 Prefix {
4539 field: SubscriptionField,
4540 value: String,
4541 },
4542}
4543
4544pub const LODESTONE_API_SUBSCRIPTION_CURSOR_ENTRY_FORMAT_VERSION: u16 = 1;
4545#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4546#[serde(deny_unknown_fields)]
4547pub struct SubscriptionCursorEntry {
4548 pub index: Resource,
4549 pub routing_revision: U64,
4550 pub recovery_era: Identity,
4551 pub shard_id: U64,
4552 pub sequence: U64,
4553}
4554
4555pub const LODESTONE_API_SUBSCRIPTION_ROUTE_FORMAT_VERSION: u16 = 1;
4556#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4557#[serde(deny_unknown_fields)]
4558pub struct SubscriptionRoute {
4559 pub index: Resource,
4560 pub routing_revision: U64,
4561 pub shard_ids: Vec<U64>,
4562}
4563
4564pub const LODESTONE_API_SUBSCRIPTION_START_POSITION_FORMAT_VERSION: u16 = 1;
4565#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4566#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4567pub enum SubscriptionStartPosition {
4568 FromNow,
4569 Resume {
4570 routes: Vec<SubscriptionRoute>,
4571 cut: Vec<SubscriptionCursorEntry>,
4572 },
4573}
4574
4575pub const LODESTONE_API_SUBSCRIPTION_START_SHAPE_VERSION: u16 = 1;
4576pub const LODESTONE_API_SUBSCRIPTION_START_FORMAT_VERSION: u16 = 1;
4577#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4578#[serde(deny_unknown_fields)]
4579pub struct SubscriptionStart {
4580 pub format_version: u32,
4581 pub request_id: String,
4582 pub index: Resource,
4583 #[serde(default, skip_serializing_if = "Option::is_none")]
4584 pub filter: Option<SubscriptionFilter>,
4585 pub include_deletes: bool,
4586 pub source_projection: Vec<String>,
4587 pub reconnect_attempt: u32,
4588 pub start: SubscriptionStartPosition,
4589 pub heartbeat_millis: U64,
4590 pub schema_digest: Digest,
4591}
4592
4593pub const LODESTONE_API_SUBSCRIPTION_ACCEPTED_SHAPE_VERSION: u16 = 1;
4594pub const LODESTONE_API_SUBSCRIPTION_ACCEPTED_FORMAT_VERSION: u16 = 1;
4595#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4596#[serde(deny_unknown_fields)]
4597pub struct SubscriptionAccepted {
4598 pub format_version: u32,
4599 pub routes: Vec<SubscriptionRoute>,
4600 pub accepted_cut: Vec<SubscriptionCursorEntry>,
4601 pub schema_digest: Digest,
4602}
4603
4604pub const LODESTONE_API_SUBSCRIPTION_WRITER_FENCE_FORMAT_VERSION: u16 = 1;
4605#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4606#[serde(deny_unknown_fields)]
4607pub struct SubscriptionWriterFence {
4608 pub recovery_era: Identity,
4609 pub epoch: u32,
4610}
4611
4612pub const LODESTONE_API_SUBSCRIPTION_EVENT_SHAPE_VERSION: u16 = 1;
4613pub const LODESTONE_API_SUBSCRIPTION_EVENT_FORMAT_VERSION: u16 = 1;
4614#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4615#[serde(deny_unknown_fields)]
4616pub struct SubscriptionEvent {
4617 pub format_version: u32,
4618 pub event_id: Digest,
4619 pub index: Resource,
4620 pub shard_id: U64,
4621 pub recovery_era: Identity,
4622 pub writer_fence: SubscriptionWriterFence,
4623 pub routing_revision: U64,
4624 pub sequence: U64,
4625 pub operation: String,
4626 pub document_id: String,
4627 pub routing_hash: u32,
4628 #[serde(default, skip_serializing_if = "Option::is_none")]
4629 pub source: Option<RawJson>,
4630}
4631
4632pub const LODESTONE_API_SUBSCRIPTION_HEARTBEAT_SHAPE_VERSION: u16 = 1;
4633pub const LODESTONE_API_SUBSCRIPTION_HEARTBEAT_FORMAT_VERSION: u16 = 1;
4634#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4635#[serde(deny_unknown_fields)]
4636pub struct SubscriptionHeartbeat {
4637 pub format_version: u32,
4638 pub confirmed_cut: Vec<SubscriptionCursorEntry>,
4639 pub route_revision: U64,
4640 pub authorization_revision: U64,
4641 pub authorization_valid_until_millis: U64,
4642}
4643
4644pub const LODESTONE_API_SUBSCRIPTION_GAP_SHAPE_VERSION: u16 = 1;
4645pub const LODESTONE_API_SUBSCRIPTION_GAP_FORMAT_VERSION: u16 = 1;
4646#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4647#[serde(deny_unknown_fields)]
4648pub struct SubscriptionGap {
4649 pub format_version: u32,
4650 pub affected: Vec<SubscriptionCursorEntry>,
4651 pub last_confirmed: Vec<SubscriptionCursorEntry>,
4652 pub earliest_available: Vec<SubscriptionCursorEntry>,
4653 pub reason: String,
4654 pub terminal: bool,
4655}
4656
4657pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_REASON_FORMAT_VERSION: u16 = 1;
4658#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4659#[serde(rename_all = "snake_case")]
4660pub enum SubscriptionTerminalReason {
4661 Completed,
4662 Cancelled,
4663 DeadlineExceeded,
4664 StaleCursor,
4665 RetentionGap,
4666 Unavailable,
4667 Internal,
4668}
4669
4670pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_SHAPE_VERSION: u16 = 2;
4671pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_FORMAT_VERSION: u16 = 2;
4672#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4673#[serde(deny_unknown_fields)]
4674pub struct SubscriptionTerminal {
4675 pub format_version: u32,
4676 pub reason: SubscriptionTerminalReason,
4677 pub recovery: RecoveryAction,
4678}
4679
4680pub const LODESTONE_API_SUBSCRIPTION_FRAME_FORMAT_VERSION: u16 = 1;
4681#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4682#[serde(tag = "frame", rename_all = "snake_case", deny_unknown_fields)]
4683pub enum SubscriptionFrame {
4684 Accepted { body: SubscriptionAccepted },
4685 Event { body: SubscriptionEvent },
4686 Heartbeat { body: SubscriptionHeartbeat },
4687 Gap { body: SubscriptionGap },
4688 Terminal { body: SubscriptionTerminal },
4689}
4690
4691pub const LODESTONE_API_STREAM_BINDING_FORMAT_VERSION: u16 = 1;
4692#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4693#[serde(deny_unknown_fields)]
4694pub struct StreamBinding {
4695 pub name: String,
4696 pub transport: String,
4697 pub service: String,
4698 pub method: String,
4699 pub endpoint: String,
4700 pub auth_metadata: String,
4701 pub auth_scheme: String,
4702 pub semantic_format_version: u32,
4703 pub schema_digest: Digest,
4704}
4705
4706pub const LODESTONE_API_CAPABILITY_GRANT_FORMAT_VERSION: u16 = 1;
4707#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4708#[serde(deny_unknown_fields)]
4709pub struct CapabilityGrant {
4710 pub command: String,
4711 pub action: String,
4712 pub state: String,
4713 pub reason: String,
4714 pub mutation_class: String,
4715 pub cancellable: bool,
4716 pub workload_classes: Vec<WorkloadClass>,
4717 pub possible_submission_states: Vec<String>,
4718 pub capability_family: String,
4719 pub effect_class: String,
4720 pub risk_flags: Vec<String>,
4721 pub admissible_errors: Vec<String>,
4722 pub referenced_limits: Vec<String>,
4723 pub retry_safety: String,
4724 pub identity_requirement: String,
4725 #[serde(default, skip_serializing_if = "Option::is_none")]
4726 pub resolver_command: Option<String>,
4727 pub cancellation: String,
4728 pub side_effects: Vec<String>,
4729 pub recovery: String,
4730 pub index_patterns: Vec<String>,
4731 pub exact_index_incarnations: Vec<Identity>,
4732}
4733
4734pub const LODESTONE_API_PROTOCOL_LIMIT_FORMAT_VERSION: u16 = 1;
4735#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4736#[serde(deny_unknown_fields)]
4737pub struct ProtocolLimit {
4738 pub id: String,
4739 pub default: U64,
4740 pub maximum: U64,
4741 pub unit: String,
4742}
4743
4744pub const LODESTONE_API_DOCUMENT_MUTATION_CONDITION_FORMAT_VERSION: u16 = 1;
4745#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4746#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4747pub enum DocumentMutationCondition {
4748 Any,
4749 MustNotExist,
4750 IfSeqNo { seq_no: U64 },
4751 IfSeqNoAndPrimaryTerm { seq_no: U64, primary_term: U64 },
4752}
4753
4754pub const LODESTONE_API_AUDIT_ADAPTER_FORMAT_VERSION: u16 = 1;
4755#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4756#[serde(rename_all = "snake_case")]
4757pub enum AuditAdapter {
4758 Native,
4759 Elasticsearch,
4760 Otlp,
4761 Jaeger,
4762 Grpc,
4763 WebSocket,
4764 Resp,
4765 InternalRpc,
4766 ControlPlane,
4767}
4768
4769pub const LODESTONE_API_AUDIT_DECISION_FORMAT_VERSION: u16 = 1;
4770#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4771#[serde(rename_all = "snake_case")]
4772pub enum AuditDecision {
4773 Allowed,
4774 DeniedAuthentication,
4775 DeniedAuthorization,
4776 DeniedQuota,
4777 DeniedStalePolicy,
4778}
4779
4780pub const LODESTONE_API_AUDIT_OUTCOME_FORMAT_VERSION: u16 = 1;
4781#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4782#[serde(rename_all = "snake_case")]
4783pub enum AuditOutcome {
4784 AdmissionAccepted,
4785 AuthenticationRefused,
4786 AuthorizationRefused,
4787 QuotaRefused,
4788 PolicyUnavailable,
4789 DecodeFailed,
4790 OperationSucceeded,
4791 OperationFailed,
4792 OperationIndeterminate,
4793 FailedRedacted,
4794}
4795
4796pub const LODESTONE_API_AUDIT_DETAIL_FORMAT_VERSION: u16 = 1;
4797#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4798#[serde(rename_all = "snake_case")]
4799pub enum AuditDetail {
4800 PolicyMutation,
4801 CredentialRotation,
4802 CredentialRevocation,
4803 QuotaAdmission,
4804 RequestAdmission,
4805 ExplicitCrashGap,
4806 BackupLifecycle,
4807 RetentionLifecycle,
4808 FieldPromotion,
4809}
4810
4811pub const LODESTONE_API_AUDIT_GAP_REASON_FORMAT_VERSION: u16 = 1;
4812#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4813#[serde(rename_all = "snake_case")]
4814pub enum AuditGapReason {
4815 ExplicitCrashGap,
4816 Retention,
4817}
4818
4819pub const LODESTONE_API_AUDIT_EVENT_FORMAT_VERSION: u16 = 2;
4820#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4821#[serde(deny_unknown_fields)]
4822pub struct AuditEvent {
4823 pub event_id: Digest,
4824 pub recovery_era: Identity,
4825 pub sequence: U64,
4826 pub server_time: U64,
4827 #[serde(default, skip_serializing_if = "Option::is_none")]
4828 pub principal_id: Option<Identity>,
4829 #[serde(default, skip_serializing_if = "Option::is_none")]
4830 pub api_key_id: Option<Identity>,
4831 pub policy_revision: U64,
4832 pub adapter: AuditAdapter,
4833 pub action: String,
4834 pub resource_digest: Digest,
4835 pub request_digest: Digest,
4836 #[serde(default, skip_serializing_if = "Option::is_none")]
4837 pub correlation_id: Option<Identity>,
4838 #[serde(default, skip_serializing_if = "Option::is_none")]
4839 pub diagnostic_id: Option<Identity>,
4840 pub decision: AuditDecision,
4841 pub outcome: AuditOutcome,
4842 pub detail: AuditDetail,
4843}
4844
4845pub const LODESTONE_API_AUDIT_GAP_FORMAT_VERSION: u16 = 2;
4846#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4847#[serde(deny_unknown_fields)]
4848pub struct AuditGap {
4849 pub recovery_era: Identity,
4850 pub first_sequence: U64,
4851 pub last_sequence: U64,
4852 pub reason: AuditGapReason,
4853}
4854
4855pub const LODESTONE_API_AUDIT_STREAM_STATE_FORMAT_VERSION: u16 = 1;
4856#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4857#[serde(deny_unknown_fields)]
4858pub struct AuditStreamState {
4859 pub recovery_era: Identity,
4860 pub earliest_available_sequence: U64,
4861 pub snapshot_through: U64,
4862}
4863
4864pub const LODESTONE_API_SERVICE_CREDENTIAL_GRANT_FORMAT_VERSION: u16 = 1;
4865#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4866#[serde(deny_unknown_fields)]
4867pub struct ServiceCredentialGrant {
4868 pub role_name: String,
4869 pub role_version: U64,
4870}
4871
4872pub const LODESTONE_API_SERVICE_CREDENTIAL_SUMMARY_FORMAT_VERSION: u16 = 1;
4873#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4874#[serde(deny_unknown_fields)]
4875pub struct ServiceCredentialSummary {
4876 pub principal_id: Identity,
4877 pub api_key_id: Identity,
4878 pub generation: U64,
4879 pub state: String,
4880 #[serde(default, skip_serializing_if = "Option::is_none")]
4881 pub expires_at: Option<U64>,
4882 pub grants: Vec<ServiceCredentialGrant>,
4883}
4884
4885pub const LODESTONE_API_SECURITY_ROLE_FORMAT_VERSION: u16 = 2;
4886#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4887#[serde(deny_unknown_fields)]
4888pub struct SecurityRole {
4889 pub role_name: String,
4890 pub version: U64,
4891 pub permissions: Vec<String>,
4892 pub delegable_permissions: Vec<String>,
4893 pub allowed_workload_classes: Vec<WorkloadClass>,
4894 pub index_patterns: Vec<String>,
4895 pub append_index_incarnations: Vec<Identity>,
4896}
4897
4898pub const LODESTONE_API_ROLE_APPEND_SCOPE_CHANGE_FORMAT_VERSION: u16 = 1;
4899#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4900#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4901pub enum RoleAppendScopeChange {
4902 Add { index: Resource },
4903 Remove { index_incarnation: Identity },
4904}
4905
4906pub const LODESTONE_API_ROLE_APPEND_ACCESS_PREPARATION_FORMAT_VERSION: u16 = 1;
4907#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4908#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4909pub enum RoleAppendAccessPreparation {
4910 Prepared {
4911 locator: Locator,
4912 semantic_digest: Digest,
4913 expires_at: U64,
4914 predecessor_role_version: U64,
4915 successor_role_version: U64,
4916 },
4917 AlreadySatisfied {
4918 role: SecurityRole,
4919 },
4920}
4921
4922pub const LODESTONE_API_SECURITY_ACTION_OUTCOME_FORMAT_VERSION: u16 = 1;
4923#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4924#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4925pub enum SecurityActionOutcome {
4926 Reserved {
4927 principal_id: Identity,
4928 api_key_id: Identity,
4929 generation: U64,
4930 },
4931 Activated {
4932 principal_id: Identity,
4933 api_key_id: Identity,
4934 generation: U64,
4935 },
4936 Revoked {
4937 principal_id: Identity,
4938 api_key_id: Identity,
4939 generation: U64,
4940 },
4941 Retired {
4942 principal_id: Identity,
4943 api_key_id: Identity,
4944 generation: U64,
4945 },
4946}
4947
4948pub const LODESTONE_API_MAINTENANCE_WORK_STATE_FORMAT_VERSION: u16 = 1;
4949#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4950#[serde(rename_all = "snake_case")]
4951pub enum MaintenanceWorkState {
4952 ParkedOperatorRequired,
4953 RetryWait,
4954 RetryReady,
4955 Leased,
4956 Deferred,
4957 Runnable,
4958}
4959
4960pub const LODESTONE_API_MAINTENANCE_ATTEMPT_STATE_FORMAT_VERSION: u16 = 1;
4961#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4962#[serde(rename_all = "snake_case")]
4963pub enum MaintenanceAttemptState {
4964 Running,
4965 DeadlineExceededDraining,
4966 DeadlineExceededReclaimPending,
4967 CancellationDraining,
4968 ClaimRecoveryPending,
4969}
4970
4971pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_FORMAT_VERSION: u16 = 1;
4972#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4973#[serde(rename_all = "snake_case")]
4974pub enum MaintenanceFailureClass {
4975 Corruption,
4976 AttemptBudget,
4977 StructuralLimit,
4978 Execution,
4979 Other,
4980}
4981
4982pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_COUNT_FORMAT_VERSION: u16 = 1;
4983#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4984#[serde(deny_unknown_fields)]
4985pub struct MaintenanceFailureClassCount {
4986 pub class: MaintenanceFailureClass,
4987 pub count: U64,
4988}
4989
4990pub const LODESTONE_API_MAINTENANCE_ATTEMPT_OBSERVATION_FORMAT_VERSION: u16 = 1;
4991#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4992#[serde(deny_unknown_fields)]
4993pub struct MaintenanceAttemptObservation {
4994 pub state: MaintenanceAttemptState,
4995 pub lease_epoch: U64,
4996 pub lease_expires_at: U64,
4997 pub observed_at_millis: U64,
4998}
4999
5000pub const LODESTONE_API_MAINTENANCE_TASK_SCOPE_FORMAT_VERSION: u16 = 1;
5001#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5002#[serde(deny_unknown_fields)]
5003pub struct MaintenanceTaskScope {
5004 pub kind: String,
5005 #[serde(default, skip_serializing_if = "Option::is_none")]
5006 pub index: Option<Resource>,
5007 #[serde(default, skip_serializing_if = "Option::is_none")]
5008 pub shard_id: Option<u32>,
5009}
5010
5011pub const LODESTONE_API_MAINTENANCE_TASK_STATUS_FORMAT_VERSION: u16 = 1;
5012#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5013#[serde(deny_unknown_fields)]
5014pub struct MaintenanceTaskStatus {
5015 pub task_id: Identity,
5016 pub kind: String,
5017 pub scope: MaintenanceTaskScope,
5018 pub checkpoint_generation: U64,
5019 pub attempt_count: u32,
5020 pub admitted_at: U64,
5021 pub last_transition_at: U64,
5022 pub last_progress_at: U64,
5023 pub work_state: MaintenanceWorkState,
5024 pub state_since: U64,
5025 #[serde(default, skip_serializing_if = "Option::is_none")]
5026 pub defer_reason: Option<String>,
5027 pub cancellation_requested: bool,
5028 #[serde(default, skip_serializing_if = "Option::is_none")]
5029 pub retry_not_before: Option<U64>,
5030 #[serde(default, skip_serializing_if = "Option::is_none")]
5031 pub failure_at: Option<U64>,
5032 #[serde(default, skip_serializing_if = "Option::is_none")]
5033 pub lease_acquired_at: Option<U64>,
5034 #[serde(default, skip_serializing_if = "Option::is_none")]
5035 pub lease_expires_at: Option<U64>,
5036 #[serde(default, skip_serializing_if = "Option::is_none")]
5037 pub failure_class: Option<MaintenanceFailureClass>,
5038 #[serde(default, skip_serializing_if = "Option::is_none")]
5039 pub failure_code: Option<String>,
5040 pub operator_action_required: bool,
5041 #[serde(default, skip_serializing_if = "Option::is_none")]
5042 pub local_attempt: Option<MaintenanceAttemptObservation>,
5043}
5044
5045pub const LODESTONE_API_MAINTENANCE_STATUS_AGGREGATE_SHAPE_VERSION: u16 = 1;
5046pub const LODESTONE_API_MAINTENANCE_STATUS_AGGREGATE_FORMAT_VERSION: u16 = 2;
5047#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5048#[serde(deny_unknown_fields)]
5049pub struct MaintenanceStatusAggregate {
5050 pub format_version: u32,
5051 pub recovery_era: Identity,
5052 pub source_revision: U64,
5053 pub root_revision: U64,
5054 pub logical_observation_time: U64,
5055 #[serde(default, skip_serializing_if = "Option::is_none")]
5056 pub local_observation_millis: Option<U64>,
5057 pub total_incomplete: U64,
5058 pub parked_operator_required: U64,
5059 pub retry_wait: U64,
5060 pub retry_ready: U64,
5061 pub leased: U64,
5062 pub deferred: U64,
5063 pub runnable: U64,
5064 pub eligible_backlog: U64,
5065 pub cancellation_requested: U64,
5066 #[serde(default, skip_serializing_if = "Option::is_none")]
5067 pub oldest_backlog_age: Option<U64>,
5068 #[serde(default, skip_serializing_if = "Option::is_none")]
5069 pub oldest_runnable_age: Option<U64>,
5070 #[serde(default, skip_serializing_if = "Option::is_none")]
5071 pub oldest_retry_wait_age: Option<U64>,
5072 #[serde(default, skip_serializing_if = "Option::is_none")]
5073 pub oldest_parked_age: Option<U64>,
5074 #[serde(default, skip_serializing_if = "Option::is_none")]
5075 pub oldest_no_progress_age: Option<U64>,
5076 pub current_action_capacity: u32,
5077 pub maximum_action_capacity: u32,
5078 pub active_passes: U64,
5079 pub local_in_flight: U64,
5080 pub deadline_draining: U64,
5081 pub cancellation_draining: U64,
5082 pub claim_recovery_pending: U64,
5083 pub projection_refresh_pending: bool,
5084 #[serde(default, skip_serializing_if = "Option::is_none")]
5085 pub durable_last_progress_at: Option<U64>,
5086 pub tasks_claimed_total: U64,
5087 pub tasks_progressed_total: U64,
5088 pub tasks_completed_total: U64,
5089 pub task_retries_total: U64,
5090 pub task_failures_total: U64,
5091 pub deadline_failures_total: U64,
5092 pub cancellations_total: U64,
5093 pub overlay_capacity_exhaustions_total: U64,
5094 pub failure_classes: Vec<MaintenanceFailureClassCount>,
5095}
5096
5097pub const LODESTONE_API_RUNTIME_STATUS_DETAIL_FORMAT_VERSION: u16 = 1;
5098#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5099#[serde(deny_unknown_fields)]
5100pub struct RuntimeStatusDetail {
5101 pub metastore_revision: U64,
5102 pub root_revision: U64,
5103 pub logical_time: U64,
5104 pub degraded_dependencies: Vec<String>,
5105}
5106
5107pub const LODESTONE_API_RESULT_CACHE_STATUS_SHAPE_VERSION: u16 = 2;
5108pub const LODESTONE_API_RESULT_CACHE_STATUS_FORMAT_VERSION: u16 = 3;
5109#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5110#[serde(deny_unknown_fields)]
5111pub struct ResultCacheStatus {
5112 pub format_version: u32,
5113 pub hits: U64,
5114 pub misses: U64,
5115 pub admissions: U64,
5116 pub bypasses: U64,
5117 pub evictions: U64,
5118 pub collection_bytes: U64,
5119 pub collection_entries: u32,
5120}
5121
5122pub const LODESTONE_API_FIELD_PROMOTION_STATUS_SHAPE_VERSION: u16 = 1;
5123pub const LODESTONE_API_FIELD_PROMOTION_STATUS_FORMAT_VERSION: u16 = 3;
5124#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5125#[serde(deny_unknown_fields)]
5126pub struct FieldPromotionStatus {
5127 pub format_version: u32,
5128 pub index: Resource,
5129 pub mapping_generation: U64,
5130 pub policy_generation: U64,
5131 #[serde(default, skip_serializing_if = "Option::is_none")]
5132 pub last_decision_generation: Option<U64>,
5133 pub heat_records: u32,
5134 pub promoted_fields: u32,
5135 pub extra_bytes: U64,
5136 pub enabled: bool,
5137}
5138
5139pub const LODESTONE_API_OVERLOAD_SHARD_STATUS_SHAPE_VERSION: u16 = 2;
5140pub const LODESTONE_API_OVERLOAD_SHARD_STATUS_FORMAT_VERSION: u16 = 3;
5141#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5142#[serde(deny_unknown_fields)]
5143pub struct OverloadShardStatus {
5144 pub format_version: u32,
5145 pub shard_id: u32,
5146 pub writer_epoch: U64,
5147 pub configured_mode: String,
5148 pub effective_disposition: String,
5149 pub registered_through: U64,
5150 pub indexed_through: U64,
5151 pub lag_operations: U64,
5152 pub backlog_bytes: U64,
5153 pub oldest_age_millis: U64,
5154 pub collection_share_bytes: U64,
5155 pub recovery_ops_this_pass: u32,
5156 pub pending_overlay_documents: U64,
5157 #[serde(default, skip_serializing_if = "Option::is_none")]
5158 pub shed_reason: Option<String>,
5159}
5160
5161pub const LODESTONE_API_EXTERNAL_KEY_BINDING_FORMAT_VERSION: u16 = 1;
5162#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5163#[serde(deny_unknown_fields)]
5164pub struct ExternalKeyBinding {
5165 pub content_key_id: Identity,
5166 pub content_key_generation: U64,
5167 pub binding_id: Identity,
5168 pub binding_generation: U64,
5169 pub access_generation: U64,
5170 pub opaque_binding_base64: String,
5171 pub object_context_digest: Digest,
5172}
5173
5174pub const LODESTONE_API_ROLLUP_MEASURE_FORMAT_VERSION: u16 = 1;
5175#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5176#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
5177pub enum RollupMeasure {
5178 Count,
5179 Sum { field_path_digest: Digest },
5180 Min { field_path_digest: Digest },
5181 Max { field_path_digest: Digest },
5182}
5183
5184pub const LODESTONE_API_AGGREGATE_THEN_DELETE_POLICY_FORMAT_VERSION: u16 = 1;
5185#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5186#[serde(deny_unknown_fields)]
5187pub struct AggregateThenDeletePolicy {
5188 pub policy_id: Identity,
5189 pub policy_generation: U64,
5190 pub detail_retirement_acknowledged: bool,
5191 #[serde(default, skip_serializing_if = "Option::is_none")]
5192 pub expected_policy_generation: Option<U64>,
5193 pub timestamp_field_digest: Digest,
5194 pub bucket_width_millis: U64,
5195 pub bucket_alignment_millis: U64,
5196 pub dimensions: Vec<Digest>,
5197 pub measures: Vec<RollupMeasure>,
5198}
5199
5200pub const LODESTONE_API_LIFECYCLE_BINDING_STATUS_FORMAT_VERSION: u16 = 1;
5201#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5202#[serde(deny_unknown_fields)]
5203pub struct LifecycleBindingStatus {
5204 pub content_key_id: Identity,
5205 pub content_key_generation: U64,
5206 pub binding_id: Identity,
5207 pub binding_generation: U64,
5208 pub access_generation: U64,
5209}
5210
5211pub const LODESTONE_API_LIFECYCLE_ROLLUP_STATUS_FORMAT_VERSION: u16 = 1;
5212#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5213#[serde(deny_unknown_fields)]
5214pub struct LifecycleRollupStatus {
5215 pub policy_id: Identity,
5216 pub policy_generation: U64,
5217 pub ledger_revision: U64,
5218 pub coverages: u32,
5219 pub raw_retired_coverages: u32,
5220 pub detail_retirement_acknowledged: bool,
5221 pub query_contract_version: u32,
5222 pub timestamp_field_digest: Digest,
5223 pub bucket_width_millis: U64,
5224 pub bucket_alignment_millis: U64,
5225 pub dimensions: Vec<Digest>,
5226 pub measures: Vec<RollupMeasure>,
5227}
5228
5229pub const LODESTONE_API_LIFECYCLE_STATUS_SHAPE_VERSION: u16 = 2;
5230pub const LODESTONE_API_LIFECYCLE_STATUS_FORMAT_VERSION: u16 = 4;
5231#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5232#[serde(deny_unknown_fields)]
5233pub struct LifecycleStatus {
5234 pub format_version: u32,
5235 pub index: Resource,
5236 pub authority_revision: U64,
5237 pub active_bindings: Vec<LifecycleBindingStatus>,
5238 #[serde(default, skip_serializing_if = "Option::is_none")]
5239 pub rollup: Option<LifecycleRollupStatus>,
5240}
5241
5242pub const LODESTONE_API_QUOTA_LIMIT_FORMAT_VERSION: u16 = 1;
5243#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5244#[serde(deny_unknown_fields)]
5245pub struct QuotaLimit {
5246 pub dimension: String,
5247 pub maximum: U64,
5248 pub window_millis: U64,
5249}
5250
5251pub const LODESTONE_API_QUOTA_CONSUMPTION_FORMAT_VERSION: u16 = 1;
5252#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5253#[serde(deny_unknown_fields)]
5254pub struct QuotaConsumption {
5255 pub dimension: String,
5256 pub consumed: U64,
5257 pub window_millis: U64,
5258}
5259
5260pub const LODESTONE_API_QUOTA_UPDATE_FORMAT_VERSION: u16 = 1;
5261#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5262#[serde(deny_unknown_fields)]
5263pub struct QuotaUpdate {
5264 pub revision: U64,
5265 pub state: String,
5266}
5267
5268pub const LODESTONE_API_STORAGE_OVERALL_POSTURE_FORMAT_VERSION: u16 = 1;
5269#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5270#[serde(rename_all = "snake_case")]
5271pub enum StorageOverallPosture {
5272 FilesystemDevelopment,
5273 ProviderObjectStorage,
5274 S3CompatibleDevelopment,
5275 Mixed,
5276}
5277
5278pub const LODESTONE_API_STORAGE_PROFILE_ROLE_FORMAT_VERSION: u16 = 1;
5279#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5280#[serde(rename_all = "snake_case")]
5281pub enum StorageProfileRole {
5282 Control,
5283 DefaultWal,
5284 DefaultData,
5285}
5286
5287pub const LODESTONE_API_STORAGE_PROVIDER_POSTURE_FORMAT_VERSION: u16 = 1;
5288#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5289#[serde(rename_all = "snake_case")]
5290pub enum StorageProviderPosture {
5291 Aws,
5292 GoogleCloudStorage,
5293 AzureBlob,
5294 S3CompatibleDevelopment,
5295 FilesystemDevelopment,
5296}
5297
5298pub const LODESTONE_API_STORAGE_BACKEND_SERVICE_CLASS_FORMAT_VERSION: u16 = 1;
5299#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5300#[serde(rename_all = "snake_case")]
5301pub enum StorageBackendServiceClass {
5302 RegionalObject,
5303 ZonalLowLatency,
5304}
5305
5306pub const LODESTONE_API_STORAGE_PROFILE_ROLE_BINDING_FORMAT_VERSION: u16 = 1;
5307#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5308#[serde(deny_unknown_fields)]
5309pub struct StorageProfileRoleBinding {
5310 pub role: StorageProfileRole,
5311 pub authority_group: u32,
5312 pub provider: StorageProviderPosture,
5313 pub service_class: StorageBackendServiceClass,
5314}
5315
5316pub const LODESTONE_API_STORAGE_PROFILE_ATTESTATION_SHAPE_VERSION: u16 = 1;
5317pub const LODESTONE_API_STORAGE_PROFILE_ATTESTATION_FORMAT_VERSION: u16 = 1;
5318#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5319#[serde(deny_unknown_fields)]
5320pub struct StorageProfileAttestation {
5321 pub format_version: u32,
5322 pub configuration_generation: U64,
5323 pub overall_posture: StorageOverallPosture,
5324 pub roles: Vec<StorageProfileRoleBinding>,
5325 pub default_durability: ResourceDurabilityClass,
5326 pub default_storage: ResourceStorageClass,
5327 pub default_policy_digest: Digest,
5328 pub storage_profile_digest: Digest,
5329 pub attestation_digest: Digest,
5330}
5331
5332pub const LODESTONE_API_STORAGE_PROFILE_EXPECTATION_SHAPE_VERSION: u16 = 1;
5333pub const LODESTONE_API_STORAGE_PROFILE_EXPECTATION_FORMAT_VERSION: u16 = 1;
5334#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5335#[serde(deny_unknown_fields)]
5336pub struct StorageProfileExpectation {
5337 pub format_version: u32,
5338 #[serde(default, skip_serializing_if = "Option::is_none")]
5339 pub required_posture: Option<StorageOverallPosture>,
5340 #[serde(default, skip_serializing_if = "Option::is_none")]
5341 pub expected_storage_profile_digest: Option<Digest>,
5342}
5343
5344pub const LODESTONE_API_CORE_BINDING_FORMAT_VERSION: u16 = 3;
5345#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5346#[serde(deny_unknown_fields)]
5347pub struct CoreBinding {
5348 pub cluster_id: Identity,
5349 pub collection_id: Identity,
5350 pub configuration_generation: U64,
5351 pub native_endpoints: Vec<String>,
5352 pub selected_stream_endpoint: String,
5353 pub schema_id: String,
5354 pub schema_digest: Digest,
5355 pub storage_profile: StorageProfileAttestation,
5356}
5357
5358pub const LODESTONE_API_READINESS_OBSERVATION_FORMAT_VERSION: u16 = 1;
5359#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5360#[serde(deny_unknown_fields)]
5361pub struct ReadinessObservation {
5362 pub subject: String,
5363 pub state: String,
5364 #[serde(default, skip_serializing_if = "Option::is_none")]
5365 pub reason: Option<String>,
5366 pub revision: U64,
5367 pub observed_cut: U64,
5368}
5369
5370pub const LODESTONE_API_USAGE_DIMENSION_FORMAT_VERSION: u16 = 1;
5371#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5372#[serde(deny_unknown_fields)]
5373pub struct UsageDimension {
5374 pub name: String,
5375 pub value: String,
5376}
5377
5378pub const LODESTONE_API_PHYSICAL_USAGE_VALUE_FORMAT_VERSION: u16 = 2;
5379#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5380#[serde(deny_unknown_fields)]
5381pub struct PhysicalUsageValue {
5382 pub meter: String,
5383 pub unit: String,
5384 pub value: ExactDecimal,
5385}
5386
5387pub const LODESTONE_API_CORE_USAGE_UNITS_FORMAT_VERSION: u16 = 2;
5388#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5389#[serde(deny_unknown_fields)]
5390pub struct CoreUsageUnits {
5391 pub sequence: U64,
5392 pub record_identity: Digest,
5393 pub index_id: Identity,
5394 pub workload_class: WorkloadClass,
5395 pub window_start: U64,
5396 pub window_end: U64,
5397 pub meter_set_version: u32,
5398 pub dimensions: Vec<UsageDimension>,
5399 pub values: Vec<PhysicalUsageValue>,
5400 pub authority_revision: U64,
5401 pub source_digest: Digest,
5402}
5403
5404pub const LODESTONE_API_CORE_USAGE_CORRECTION_FORMAT_VERSION: u16 = 2;
5405#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5406#[serde(deny_unknown_fields)]
5407pub struct CoreUsageCorrection {
5408 pub sequence: U64,
5409 pub correction_sequence: U64,
5410 pub correction_identity: Digest,
5411 pub target_record_identity: Digest,
5412 pub index_id: Identity,
5413 pub workload_class: WorkloadClass,
5414 pub window_start: U64,
5415 pub window_end: U64,
5416 pub meter_set_version: u32,
5417 pub dimensions: Vec<UsageDimension>,
5418 pub values: Vec<PhysicalUsageValue>,
5419 pub reason_digest: Digest,
5420 pub authority_revision: U64,
5421 pub source_digest: Digest,
5422}
5423
5424pub const LODESTONE_API_RESPONSE_META_SHAPE_VERSION: u16 = 1;
5425pub const LODESTONE_API_RESPONSE_META_FORMAT_VERSION: u16 = 1;
5426#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5427#[serde(deny_unknown_fields)]
5428pub struct ResponseMeta {
5429 pub format_version: u32,
5430 pub request_id: String,
5431 pub correlation_id: Identity,
5432 pub diagnostic_id: Identity,
5433}
5434
5435pub const LODESTONE_API_ERROR_DISPOSITION_FORMAT_VERSION: u16 = 1;
5436#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5437#[serde(rename_all = "snake_case")]
5438pub enum ErrorDisposition {
5439 NotSubmitted,
5440 Submitted,
5441 Resolved,
5442 KnownRetired,
5443 Indeterminate,
5444}
5445
5446pub const LODESTONE_API_RECOVERY_ACTION_FORMAT_VERSION: u16 = 1;
5447#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5448#[serde(rename_all = "snake_case")]
5449pub enum RecoveryAction {
5450 Retry,
5451 RetryAfter,
5452 RefreshCredential,
5453 RestartPage,
5454 ReduceRequest,
5455 Resolve,
5456 RefreshPrecondition,
5457 CorrectRange,
5458 Stop,
5459}
5460
5461pub const LODESTONE_API_LIMIT_CLASS_FORMAT_VERSION: u16 = 1;
5462#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5463#[serde(rename_all = "snake_case")]
5464pub enum LimitClass {
5465 RequestBound,
5466 CollectionQuota,
5467 EngineSafety,
5468}
5469
5470pub const LODESTONE_API_ERROR_DETAIL_FORMAT_VERSION: u16 = 3;
5471#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5472#[serde(tag = "code", rename_all = "snake_case", deny_unknown_fields)]
5473pub enum ErrorDetail {
5474 Aborted {
5475 reason: String,
5476 },
5477 DeadlineExceeded,
5478 InvalidRequest {
5479 #[serde(default, skip_serializing_if = "Option::is_none")]
5480 field: Option<String>,
5481 reason: String,
5482 },
5483 UnsupportedVersion {
5484 observed: u32,
5485 maximum_supported: u32,
5486 },
5487 Unauthenticated,
5488 PermissionDenied {
5489 #[serde(default, skip_serializing_if = "Option::is_none")]
5490 action: Option<String>,
5491 #[serde(default, skip_serializing_if = "Option::is_none")]
5492 workload_class: Option<WorkloadClass>,
5493 },
5494 NotFound {
5495 #[serde(default, skip_serializing_if = "Option::is_none")]
5496 resource: Option<String>,
5497 },
5498 Conflict {
5499 #[serde(default, skip_serializing_if = "Option::is_none")]
5500 expected_revision: Option<U64>,
5501 #[serde(default, skip_serializing_if = "Option::is_none")]
5502 observed_revision: Option<U64>,
5503 },
5504 StaleCursor {
5505 restart_count: u32,
5506 },
5507 RestartBudgetExhausted {
5508 maximum_restarts: u32,
5509 },
5510 LimitExceeded {
5511 class: LimitClass,
5512 limit_id: String,
5513 maximum: U64,
5514 },
5515 CapabilityUnavailable {
5516 #[serde(default, skip_serializing_if = "Option::is_none")]
5517 capability: Option<String>,
5518 },
5519 NotSubmitted {
5520 #[serde(default, skip_serializing_if = "Option::is_none")]
5521 retry_after_millis: Option<U64>,
5522 },
5523 SubmittedIndeterminate {
5524 #[serde(default, skip_serializing_if = "Option::is_none")]
5525 locator: Option<Locator>,
5526 },
5527 ExpiredUnknown {
5528 #[serde(default, skip_serializing_if = "Option::is_none")]
5529 locator: Option<Locator>,
5530 },
5531 SecretNotEscrowed,
5532 RetentionGap {
5533 retired_through: U64,
5534 },
5535 ArtifactRangeInvalid {
5536 maximum_bytes: U64,
5537 },
5538 ChecksumMismatch {
5539 expected: Digest,
5540 observed: Digest,
5541 },
5542 TemporarilyUnavailable {
5543 #[serde(default, skip_serializing_if = "Option::is_none")]
5544 retry_after_millis: Option<U64>,
5545 },
5546 Internal,
5547}
5548
5549pub const LODESTONE_API_CONNECTION_PROFILE_SHAPE_VERSION: u16 = 4;
5550pub const LODESTONE_API_CONNECTION_PROFILE_FORMAT_VERSION: u16 = 4;
5551#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5552#[serde(deny_unknown_fields)]
5553pub struct ConnectionProfile {
5554 pub format_version: u32,
5555 pub profile_generation: U64,
5556 pub native_endpoints: Vec<String>,
5557 pub selected_stream_endpoint: String,
5558 pub tls_server_name: String,
5559 pub tls_trust_sha256: Digest,
5560 pub expected_cluster_id: Identity,
5561 pub expected_collection_id: Identity,
5562 pub expected_principal_id: Identity,
5563 pub schema_id: String,
5564 pub schema_digest: Digest,
5565 pub credential_id: Identity,
5566 pub credential_generation: U64,
5567 #[serde(default, skip_serializing_if = "Option::is_none")]
5568 pub credential_expires_at: Option<U64>,
5569 pub secret_reference: String,
5570 #[serde(default, skip_serializing_if = "Option::is_none")]
5571 pub storage_profile_expectation: Option<StorageProfileExpectation>,
5572}
5573
5574#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5575pub enum TypeKind {
5576 Enum,
5577 Struct,
5578 TaggedUnion,
5579}
5580#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5581pub struct TypeContract {
5582 pub name: &'static str,
5583 pub shape_version: u16,
5584 pub instance_format_version: Option<u16>,
5585 pub kind: TypeKind,
5586 pub wire: bool,
5587}
5588pub const LODESTONE_API_TYPE_CONTRACTS: &[TypeContract] = &[
5589 TypeContract {
5590 name: "cursor",
5591 shape_version: 1,
5592 instance_format_version: None,
5593 kind: TypeKind::Struct,
5594 wire: true,
5595 },
5596 TypeContract {
5597 name: "locator",
5598 shape_version: 1,
5599 instance_format_version: None,
5600 kind: TypeKind::Struct,
5601 wire: true,
5602 },
5603 TypeContract {
5604 name: "resource",
5605 shape_version: 1,
5606 instance_format_version: None,
5607 kind: TypeKind::Struct,
5608 wire: true,
5609 },
5610 TypeContract {
5611 name: "read_cut_kind",
5612 shape_version: 1,
5613 instance_format_version: None,
5614 kind: TypeKind::Enum,
5615 wire: true,
5616 },
5617 TypeContract {
5618 name: "read_cut_index_evidence",
5619 shape_version: 1,
5620 instance_format_version: None,
5621 kind: TypeKind::Struct,
5622 wire: true,
5623 },
5624 TypeContract {
5625 name: "read_cut_evidence",
5626 shape_version: 1,
5627 instance_format_version: Some(1),
5628 kind: TypeKind::Struct,
5629 wire: true,
5630 },
5631 TypeContract {
5632 name: "logical_occupancy_counts",
5633 shape_version: 1,
5634 instance_format_version: None,
5635 kind: TypeKind::Struct,
5636 wire: true,
5637 },
5638 TypeContract {
5639 name: "logical_occupancy_gap_state",
5640 shape_version: 1,
5641 instance_format_version: None,
5642 kind: TypeKind::Enum,
5643 wire: true,
5644 },
5645 TypeContract {
5646 name: "logical_occupancy_snapshot_evidence",
5647 shape_version: 1,
5648 instance_format_version: Some(1),
5649 kind: TypeKind::Struct,
5650 wire: true,
5651 },
5652 TypeContract {
5653 name: "logical_occupancy_window_gap",
5654 shape_version: 1,
5655 instance_format_version: Some(1),
5656 kind: TypeKind::Struct,
5657 wire: true,
5658 },
5659 TypeContract {
5660 name: "field_promotion_configuration",
5661 shape_version: 1,
5662 instance_format_version: Some(3),
5663 kind: TypeKind::Struct,
5664 wire: true,
5665 },
5666 TypeContract {
5667 name: "overload_configuration",
5668 shape_version: 2,
5669 instance_format_version: Some(3),
5670 kind: TypeKind::Struct,
5671 wire: true,
5672 },
5673 TypeContract {
5674 name: "index_policies",
5675 shape_version: 1,
5676 instance_format_version: None,
5677 kind: TypeKind::Struct,
5678 wire: true,
5679 },
5680 TypeContract {
5681 name: "maintenance_budgets",
5682 shape_version: 1,
5683 instance_format_version: None,
5684 kind: TypeKind::Struct,
5685 wire: true,
5686 },
5687 TypeContract {
5688 name: "resource_durability_class",
5689 shape_version: 1,
5690 instance_format_version: None,
5691 kind: TypeKind::Enum,
5692 wire: true,
5693 },
5694 TypeContract {
5695 name: "resource_storage_class",
5696 shape_version: 1,
5697 instance_format_version: None,
5698 kind: TypeKind::Enum,
5699 wire: true,
5700 },
5701 TypeContract {
5702 name: "vector_quality_objective",
5703 shape_version: 1,
5704 instance_format_version: None,
5705 kind: TypeKind::Enum,
5706 wire: true,
5707 },
5708 TypeContract {
5709 name: "vector_indexing_objective",
5710 shape_version: 1,
5711 instance_format_version: None,
5712 kind: TypeKind::Enum,
5713 wire: true,
5714 },
5715 TypeContract {
5716 name: "vector_residency_intent",
5717 shape_version: 1,
5718 instance_format_version: None,
5719 kind: TypeKind::Enum,
5720 wire: true,
5721 },
5722 TypeContract {
5723 name: "vector_calibration_binding",
5724 shape_version: 1,
5725 instance_format_version: None,
5726 kind: TypeKind::Struct,
5727 wire: true,
5728 },
5729 TypeContract {
5730 name: "vector_resource_policy",
5731 shape_version: 2,
5732 instance_format_version: None,
5733 kind: TypeKind::Struct,
5734 wire: true,
5735 },
5736 TypeContract {
5737 name: "workload_class",
5738 shape_version: 1,
5739 instance_format_version: None,
5740 kind: TypeKind::Enum,
5741 wire: true,
5742 },
5743 TypeContract {
5744 name: "index_resource_spec",
5745 shape_version: 3,
5746 instance_format_version: Some(3),
5747 kind: TypeKind::Struct,
5748 wire: true,
5749 },
5750 TypeContract {
5751 name: "index_summary",
5752 shape_version: 1,
5753 instance_format_version: None,
5754 kind: TypeKind::Struct,
5755 wire: true,
5756 },
5757 TypeContract {
5758 name: "mapping_mode",
5759 shape_version: 1,
5760 instance_format_version: None,
5761 kind: TypeKind::Enum,
5762 wire: true,
5763 },
5764 TypeContract {
5765 name: "dynamic_mapping_policy",
5766 shape_version: 1,
5767 instance_format_version: None,
5768 kind: TypeKind::Enum,
5769 wire: true,
5770 },
5771 TypeContract {
5772 name: "mapping_analyzer",
5773 shape_version: 1,
5774 instance_format_version: None,
5775 kind: TypeKind::Enum,
5776 wire: true,
5777 },
5778 TypeContract {
5779 name: "keyword_normalizer",
5780 shape_version: 1,
5781 instance_format_version: None,
5782 kind: TypeKind::Enum,
5783 wire: true,
5784 },
5785 TypeContract {
5786 name: "vector_metric",
5787 shape_version: 1,
5788 instance_format_version: None,
5789 kind: TypeKind::Enum,
5790 wire: true,
5791 },
5792 TypeContract {
5793 name: "mapping_scalar",
5794 shape_version: 1,
5795 instance_format_version: None,
5796 kind: TypeKind::TaggedUnion,
5797 wire: true,
5798 },
5799 TypeContract {
5800 name: "sparse_vector_weight_type",
5801 shape_version: 1,
5802 instance_format_version: None,
5803 kind: TypeKind::Enum,
5804 wire: true,
5805 },
5806 TypeContract {
5807 name: "mapping_field_type",
5808 shape_version: 3,
5809 instance_format_version: None,
5810 kind: TypeKind::TaggedUnion,
5811 wire: true,
5812 },
5813 TypeContract {
5814 name: "mapping_field",
5815 shape_version: 1,
5816 instance_format_version: None,
5817 kind: TypeKind::Struct,
5818 wire: true,
5819 },
5820 TypeContract {
5821 name: "multi_field_projection",
5822 shape_version: 1,
5823 instance_format_version: None,
5824 kind: TypeKind::Struct,
5825 wire: true,
5826 },
5827 TypeContract {
5828 name: "analyzer_identity",
5829 shape_version: 1,
5830 instance_format_version: None,
5831 kind: TypeKind::Struct,
5832 wire: true,
5833 },
5834 TypeContract {
5835 name: "keyword_limit",
5836 shape_version: 1,
5837 instance_format_version: None,
5838 kind: TypeKind::Struct,
5839 wire: true,
5840 },
5841 TypeContract {
5842 name: "profile_privacy_action",
5843 shape_version: 1,
5844 instance_format_version: None,
5845 kind: TypeKind::Enum,
5846 wire: true,
5847 },
5848 TypeContract {
5849 name: "profile_privacy_field",
5850 shape_version: 1,
5851 instance_format_version: None,
5852 kind: TypeKind::TaggedUnion,
5853 wire: true,
5854 },
5855 TypeContract {
5856 name: "profile_privacy_rule",
5857 shape_version: 1,
5858 instance_format_version: None,
5859 kind: TypeKind::Struct,
5860 wire: true,
5861 },
5862 TypeContract {
5863 name: "profile_privacy_policy",
5864 shape_version: 1,
5865 instance_format_version: Some(1),
5866 kind: TypeKind::Struct,
5867 wire: true,
5868 },
5869 TypeContract {
5870 name: "mapping_record_model",
5871 shape_version: 3,
5872 instance_format_version: None,
5873 kind: TypeKind::TaggedUnion,
5874 wire: true,
5875 },
5876 TypeContract {
5877 name: "mapping",
5878 shape_version: 4,
5879 instance_format_version: Some(10),
5880 kind: TypeKind::Struct,
5881 wire: true,
5882 },
5883 TypeContract {
5884 name: "index_detail",
5885 shape_version: 1,
5886 instance_format_version: None,
5887 kind: TypeKind::Struct,
5888 wire: true,
5889 },
5890 TypeContract {
5891 name: "source_provider",
5892 shape_version: 1,
5893 instance_format_version: None,
5894 kind: TypeKind::Enum,
5895 wire: true,
5896 },
5897 TypeContract {
5898 name: "source_decoder",
5899 shape_version: 1,
5900 instance_format_version: None,
5901 kind: TypeKind::Enum,
5902 wire: true,
5903 },
5904 TypeContract {
5905 name: "source_replay_guarantees",
5906 shape_version: 1,
5907 instance_format_version: None,
5908 kind: TypeKind::Struct,
5909 wire: true,
5910 },
5911 TypeContract {
5912 name: "source_partition_configuration",
5913 shape_version: 1,
5914 instance_format_version: None,
5915 kind: TypeKind::Struct,
5916 wire: true,
5917 },
5918 TypeContract {
5919 name: "replayable_source_configuration",
5920 shape_version: 1,
5921 instance_format_version: None,
5922 kind: TypeKind::Struct,
5923 wire: true,
5924 },
5925 TypeContract {
5926 name: "source_partition_status",
5927 shape_version: 1,
5928 instance_format_version: None,
5929 kind: TypeKind::Struct,
5930 wire: true,
5931 },
5932 TypeContract {
5933 name: "replayable_source_status",
5934 shape_version: 1,
5935 instance_format_version: None,
5936 kind: TypeKind::Struct,
5937 wire: true,
5938 },
5939 TypeContract {
5940 name: "source_control_transition",
5941 shape_version: 1,
5942 instance_format_version: None,
5943 kind: TypeKind::Enum,
5944 wire: true,
5945 },
5946 TypeContract {
5947 name: "history_ledger_precondition",
5948 shape_version: 1,
5949 instance_format_version: None,
5950 kind: TypeKind::TaggedUnion,
5951 wire: true,
5952 },
5953 TypeContract {
5954 name: "history_retention_policy",
5955 shape_version: 1,
5956 instance_format_version: None,
5957 kind: TypeKind::Struct,
5958 wire: true,
5959 },
5960 TypeContract {
5961 name: "history_selector",
5962 shape_version: 1,
5963 instance_format_version: None,
5964 kind: TypeKind::TaggedUnion,
5965 wire: true,
5966 },
5967 TypeContract {
5968 name: "history_hold",
5969 shape_version: 1,
5970 instance_format_version: None,
5971 kind: TypeKind::Struct,
5972 wire: true,
5973 },
5974 TypeContract {
5975 name: "history_status",
5976 shape_version: 1,
5977 instance_format_version: None,
5978 kind: TypeKind::Struct,
5979 wire: true,
5980 },
5981 TypeContract {
5982 name: "history_resolution",
5983 shape_version: 1,
5984 instance_format_version: None,
5985 kind: TypeKind::Struct,
5986 wire: true,
5987 },
5988 TypeContract {
5989 name: "index_reference",
5990 shape_version: 1,
5991 instance_format_version: None,
5992 kind: TypeKind::Struct,
5993 wire: true,
5994 },
5995 TypeContract {
5996 name: "alias_target",
5997 shape_version: 1,
5998 instance_format_version: None,
5999 kind: TypeKind::Struct,
6000 wire: true,
6001 },
6002 TypeContract {
6003 name: "alias_summary",
6004 shape_version: 1,
6005 instance_format_version: None,
6006 kind: TypeKind::Struct,
6007 wire: true,
6008 },
6009 TypeContract {
6010 name: "alias_detail",
6011 shape_version: 1,
6012 instance_format_version: None,
6013 kind: TypeKind::Struct,
6014 wire: true,
6015 },
6016 TypeContract {
6017 name: "data_stream_summary",
6018 shape_version: 1,
6019 instance_format_version: None,
6020 kind: TypeKind::Struct,
6021 wire: true,
6022 },
6023 TypeContract {
6024 name: "component_template_binding",
6025 shape_version: 1,
6026 instance_format_version: None,
6027 kind: TypeKind::Struct,
6028 wire: true,
6029 },
6030 TypeContract {
6031 name: "index_template_binding",
6032 shape_version: 1,
6033 instance_format_version: None,
6034 kind: TypeKind::Struct,
6035 wire: true,
6036 },
6037 TypeContract {
6038 name: "lifecycle_policy_binding",
6039 shape_version: 1,
6040 instance_format_version: None,
6041 kind: TypeKind::Struct,
6042 wire: true,
6043 },
6044 TypeContract {
6045 name: "data_stream_detail",
6046 shape_version: 1,
6047 instance_format_version: None,
6048 kind: TypeKind::Struct,
6049 wire: true,
6050 },
6051 TypeContract {
6052 name: "component_template_summary",
6053 shape_version: 1,
6054 instance_format_version: None,
6055 kind: TypeKind::Struct,
6056 wire: true,
6057 },
6058 TypeContract {
6059 name: "component_template_detail",
6060 shape_version: 1,
6061 instance_format_version: None,
6062 kind: TypeKind::Struct,
6063 wire: true,
6064 },
6065 TypeContract {
6066 name: "index_template_summary",
6067 shape_version: 1,
6068 instance_format_version: None,
6069 kind: TypeKind::Struct,
6070 wire: true,
6071 },
6072 TypeContract {
6073 name: "index_template_detail",
6074 shape_version: 1,
6075 instance_format_version: None,
6076 kind: TypeKind::Struct,
6077 wire: true,
6078 },
6079 TypeContract {
6080 name: "ingest_pipeline_summary",
6081 shape_version: 1,
6082 instance_format_version: None,
6083 kind: TypeKind::Struct,
6084 wire: true,
6085 },
6086 TypeContract {
6087 name: "ingest_pipeline_detail",
6088 shape_version: 1,
6089 instance_format_version: None,
6090 kind: TypeKind::Struct,
6091 wire: true,
6092 },
6093 TypeContract {
6094 name: "ingest_pipeline_selection",
6095 shape_version: 1,
6096 instance_format_version: None,
6097 kind: TypeKind::Struct,
6098 wire: true,
6099 },
6100 TypeContract {
6101 name: "lifecycle_policy_summary",
6102 shape_version: 1,
6103 instance_format_version: None,
6104 kind: TypeKind::Struct,
6105 wire: true,
6106 },
6107 TypeContract {
6108 name: "rollover_thresholds",
6109 shape_version: 1,
6110 instance_format_version: None,
6111 kind: TypeKind::Struct,
6112 wire: true,
6113 },
6114 TypeContract {
6115 name: "retention_policy",
6116 shape_version: 1,
6117 instance_format_version: None,
6118 kind: TypeKind::Struct,
6119 wire: true,
6120 },
6121 TypeContract {
6122 name: "lifecycle_policy_detail",
6123 shape_version: 1,
6124 instance_format_version: None,
6125 kind: TypeKind::Struct,
6126 wire: true,
6127 },
6128 TypeContract {
6129 name: "text_query_operator",
6130 shape_version: 1,
6131 instance_format_version: None,
6132 kind: TypeKind::Enum,
6133 wire: true,
6134 },
6135 TypeContract {
6136 name: "text_query_analyzer",
6137 shape_version: 1,
6138 instance_format_version: None,
6139 kind: TypeKind::Enum,
6140 wire: true,
6141 },
6142 TypeContract {
6143 name: "zero_terms_query",
6144 shape_version: 1,
6145 instance_format_version: None,
6146 kind: TypeKind::Enum,
6147 wire: true,
6148 },
6149 TypeContract {
6150 name: "text_query_options",
6151 shape_version: 1,
6152 instance_format_version: None,
6153 kind: TypeKind::Struct,
6154 wire: true,
6155 },
6156 TypeContract {
6157 name: "multi_match_mode",
6158 shape_version: 1,
6159 instance_format_version: None,
6160 kind: TypeKind::Enum,
6161 wire: true,
6162 },
6163 TypeContract {
6164 name: "multi_match_field",
6165 shape_version: 1,
6166 instance_format_version: None,
6167 kind: TypeKind::Struct,
6168 wire: true,
6169 },
6170 TypeContract {
6171 name: "multi_match_options",
6172 shape_version: 1,
6173 instance_format_version: None,
6174 kind: TypeKind::Struct,
6175 wire: true,
6176 },
6177 TypeContract {
6178 name: "sort_order",
6179 shape_version: 1,
6180 instance_format_version: None,
6181 kind: TypeKind::Enum,
6182 wire: true,
6183 },
6184 TypeContract {
6185 name: "sort_mode",
6186 shape_version: 1,
6187 instance_format_version: None,
6188 kind: TypeKind::Enum,
6189 wire: true,
6190 },
6191 TypeContract {
6192 name: "missing_order",
6193 shape_version: 1,
6194 instance_format_version: None,
6195 kind: TypeKind::Enum,
6196 wire: true,
6197 },
6198 TypeContract {
6199 name: "nested_score_mode",
6200 shape_version: 1,
6201 instance_format_version: None,
6202 kind: TypeKind::Enum,
6203 wire: true,
6204 },
6205 TypeContract {
6206 name: "nested_inner_hits",
6207 shape_version: 1,
6208 instance_format_version: None,
6209 kind: TypeKind::Struct,
6210 wire: true,
6211 },
6212 TypeContract {
6213 name: "sort_spec",
6214 shape_version: 1,
6215 instance_format_version: None,
6216 kind: TypeKind::TaggedUnion,
6217 wire: true,
6218 },
6219 TypeContract {
6220 name: "query",
6221 shape_version: 1,
6222 instance_format_version: None,
6223 kind: TypeKind::TaggedUnion,
6224 wire: true,
6225 },
6226 TypeContract {
6227 name: "dense_retrieval_mode",
6228 shape_version: 1,
6229 instance_format_version: None,
6230 kind: TypeKind::Enum,
6231 wire: true,
6232 },
6233 TypeContract {
6234 name: "vector_achieved_mode",
6235 shape_version: 1,
6236 instance_format_version: None,
6237 kind: TypeKind::Enum,
6238 wire: true,
6239 },
6240 TypeContract {
6241 name: "vector_branch_diagnostics",
6242 shape_version: 2,
6243 instance_format_version: None,
6244 kind: TypeKind::Struct,
6245 wire: true,
6246 },
6247 TypeContract {
6248 name: "dense_vector_element_type",
6249 shape_version: 1,
6250 instance_format_version: None,
6251 kind: TypeKind::Enum,
6252 wire: true,
6253 },
6254 TypeContract {
6255 name: "dense_vector_byte_order",
6256 shape_version: 1,
6257 instance_format_version: None,
6258 kind: TypeKind::Enum,
6259 wire: true,
6260 },
6261 TypeContract {
6262 name: "vector_value",
6263 shape_version: 1,
6264 instance_format_version: None,
6265 kind: TypeKind::TaggedUnion,
6266 wire: true,
6267 },
6268 TypeContract {
6269 name: "sparse_vector_entry",
6270 shape_version: 1,
6271 instance_format_version: None,
6272 kind: TypeKind::Struct,
6273 wire: true,
6274 },
6275 TypeContract {
6276 name: "sparse_vector_value",
6277 shape_version: 1,
6278 instance_format_version: None,
6279 kind: TypeKind::Struct,
6280 wire: true,
6281 },
6282 TypeContract {
6283 name: "vector_set_value",
6284 shape_version: 1,
6285 instance_format_version: None,
6286 kind: TypeKind::Struct,
6287 wire: true,
6288 },
6289 TypeContract {
6290 name: "vector_evaluation_snapshot",
6291 shape_version: 1,
6292 instance_format_version: None,
6293 kind: TypeKind::TaggedUnion,
6294 wire: true,
6295 },
6296 TypeContract {
6297 name: "vector_evaluation_query_set",
6298 shape_version: 1,
6299 instance_format_version: None,
6300 kind: TypeKind::TaggedUnion,
6301 wire: true,
6302 },
6303 TypeContract {
6304 name: "vector_evaluation_budget",
6305 shape_version: 1,
6306 instance_format_version: None,
6307 kind: TypeKind::Struct,
6308 wire: true,
6309 },
6310 TypeContract {
6311 name: "vector_candidate_policy",
6312 shape_version: 1,
6313 instance_format_version: None,
6314 kind: TypeKind::Enum,
6315 wire: true,
6316 },
6317 TypeContract {
6318 name: "vector_calibration_objective",
6319 shape_version: 1,
6320 instance_format_version: None,
6321 kind: TypeKind::Enum,
6322 wire: true,
6323 },
6324 TypeContract {
6325 name: "vector_strategy_profile",
6326 shape_version: 1,
6327 instance_format_version: None,
6328 kind: TypeKind::Enum,
6329 wire: true,
6330 },
6331 TypeContract {
6332 name: "vector_evaluation_work",
6333 shape_version: 1,
6334 instance_format_version: None,
6335 kind: TypeKind::Struct,
6336 wire: true,
6337 },
6338 TypeContract {
6339 name: "vector_evaluation_error_code",
6340 shape_version: 1,
6341 instance_format_version: None,
6342 kind: TypeKind::Enum,
6343 wire: true,
6344 },
6345 TypeContract {
6346 name: "vector_evaluation_error",
6347 shape_version: 1,
6348 instance_format_version: None,
6349 kind: TypeKind::Struct,
6350 wire: true,
6351 },
6352 TypeContract {
6353 name: "vector_recall_result",
6354 shape_version: 1,
6355 instance_format_version: Some(1),
6356 kind: TypeKind::Struct,
6357 wire: true,
6358 },
6359 TypeContract {
6360 name: "vector_calibration_candidate",
6361 shape_version: 1,
6362 instance_format_version: None,
6363 kind: TypeKind::Struct,
6364 wire: true,
6365 },
6366 TypeContract {
6367 name: "vector_calibration_result",
6368 shape_version: 1,
6369 instance_format_version: Some(1),
6370 kind: TypeKind::Struct,
6371 wire: true,
6372 },
6373 TypeContract {
6374 name: "vector_diagnostic_result",
6375 shape_version: 1,
6376 instance_format_version: None,
6377 kind: TypeKind::TaggedUnion,
6378 wire: true,
6379 },
6380 TypeContract {
6381 name: "vector_warm_component",
6382 shape_version: 1,
6383 instance_format_version: None,
6384 kind: TypeKind::Enum,
6385 wire: true,
6386 },
6387 TypeContract {
6388 name: "vector_warm_state",
6389 shape_version: 1,
6390 instance_format_version: None,
6391 kind: TypeKind::Enum,
6392 wire: true,
6393 },
6394 TypeContract {
6395 name: "vector_warm_achievement",
6396 shape_version: 1,
6397 instance_format_version: None,
6398 kind: TypeKind::Struct,
6399 wire: true,
6400 },
6401 TypeContract {
6402 name: "vector_warm_result",
6403 shape_version: 1,
6404 instance_format_version: Some(1),
6405 kind: TypeKind::Struct,
6406 wire: true,
6407 },
6408 TypeContract {
6409 name: "dense_retrieval_threshold",
6410 shape_version: 1,
6411 instance_format_version: None,
6412 kind: TypeKind::TaggedUnion,
6413 wire: true,
6414 },
6415 TypeContract {
6416 name: "retrieval_branch",
6417 shape_version: 3,
6418 instance_format_version: None,
6419 kind: TypeKind::TaggedUnion,
6420 wire: true,
6421 },
6422 TypeContract {
6423 name: "weighted_rrf_fusion",
6424 shape_version: 1,
6425 instance_format_version: None,
6426 kind: TypeKind::Struct,
6427 wire: true,
6428 },
6429 TypeContract {
6430 name: "retrieval_plan",
6431 shape_version: 1,
6432 instance_format_version: Some(1),
6433 kind: TypeKind::Struct,
6434 wire: true,
6435 },
6436 TypeContract {
6437 name: "histogram_bounds",
6438 shape_version: 1,
6439 instance_format_version: None,
6440 kind: TypeKind::Struct,
6441 wire: true,
6442 },
6443 TypeContract {
6444 name: "date_histogram_bounds",
6445 shape_version: 1,
6446 instance_format_version: None,
6447 kind: TypeKind::Struct,
6448 wire: true,
6449 },
6450 TypeContract {
6451 name: "approximation_algorithm",
6452 shape_version: 1,
6453 instance_format_version: None,
6454 kind: TypeKind::Enum,
6455 wire: true,
6456 },
6457 TypeContract {
6458 name: "approximation",
6459 shape_version: 1,
6460 instance_format_version: None,
6461 kind: TypeKind::Struct,
6462 wire: true,
6463 },
6464 TypeContract {
6465 name: "percentile_value",
6466 shape_version: 1,
6467 instance_format_version: None,
6468 kind: TypeKind::Struct,
6469 wire: true,
6470 },
6471 TypeContract {
6472 name: "approximate_percentile_value",
6473 shape_version: 1,
6474 instance_format_version: None,
6475 kind: TypeKind::Struct,
6476 wire: true,
6477 },
6478 TypeContract {
6479 name: "time_series_operator",
6480 shape_version: 1,
6481 instance_format_version: None,
6482 kind: TypeKind::Enum,
6483 wire: true,
6484 },
6485 TypeContract {
6486 name: "time_series_missing_data",
6487 shape_version: 1,
6488 instance_format_version: None,
6489 kind: TypeKind::Enum,
6490 wire: true,
6491 },
6492 TypeContract {
6493 name: "time_series_quantile_mode",
6494 shape_version: 1,
6495 instance_format_version: None,
6496 kind: TypeKind::Enum,
6497 wire: true,
6498 },
6499 TypeContract {
6500 name: "time_series_bucket_state",
6501 shape_version: 1,
6502 instance_format_version: None,
6503 kind: TypeKind::Enum,
6504 wire: true,
6505 },
6506 TypeContract {
6507 name: "time_series_quantile_value",
6508 shape_version: 1,
6509 instance_format_version: None,
6510 kind: TypeKind::Struct,
6511 wire: true,
6512 },
6513 TypeContract {
6514 name: "time_series_value",
6515 shape_version: 1,
6516 instance_format_version: None,
6517 kind: TypeKind::TaggedUnion,
6518 wire: true,
6519 },
6520 TypeContract {
6521 name: "time_series_bucket",
6522 shape_version: 1,
6523 instance_format_version: None,
6524 kind: TypeKind::Struct,
6525 wire: true,
6526 },
6527 TypeContract {
6528 name: "relationship_traversal_direction",
6529 shape_version: 1,
6530 instance_format_version: None,
6531 kind: TypeKind::Enum,
6532 wire: true,
6533 },
6534 TypeContract {
6535 name: "relationship_traversal_filter",
6536 shape_version: 1,
6537 instance_format_version: None,
6538 kind: TypeKind::Struct,
6539 wire: true,
6540 },
6541 TypeContract {
6542 name: "relationship_traversal_budget",
6543 shape_version: 1,
6544 instance_format_version: None,
6545 kind: TypeKind::Struct,
6546 wire: true,
6547 },
6548 TypeContract {
6549 name: "traversed_relationship",
6550 shape_version: 1,
6551 instance_format_version: None,
6552 kind: TypeKind::Struct,
6553 wire: true,
6554 },
6555 TypeContract {
6556 name: "profile_query_operation",
6557 shape_version: 1,
6558 instance_format_version: None,
6559 kind: TypeKind::Enum,
6560 wire: true,
6561 },
6562 TypeContract {
6563 name: "profile_group_by",
6564 shape_version: 1,
6565 instance_format_version: None,
6566 kind: TypeKind::TaggedUnion,
6567 wire: true,
6568 },
6569 TypeContract {
6570 name: "profile_query_filter",
6571 shape_version: 1,
6572 instance_format_version: None,
6573 kind: TypeKind::Struct,
6574 wire: true,
6575 },
6576 TypeContract {
6577 name: "profile_query_budget",
6578 shape_version: 1,
6579 instance_format_version: None,
6580 kind: TypeKind::Struct,
6581 wire: true,
6582 },
6583 TypeContract {
6584 name: "profile_query_row",
6585 shape_version: 1,
6586 instance_format_version: None,
6587 kind: TypeKind::Struct,
6588 wire: true,
6589 },
6590 TypeContract {
6591 name: "temporal_input",
6592 shape_version: 1,
6593 instance_format_version: None,
6594 kind: TypeKind::Struct,
6595 wire: true,
6596 },
6597 TypeContract {
6598 name: "temporal_pattern",
6599 shape_version: 1,
6600 instance_format_version: None,
6601 kind: TypeKind::TaggedUnion,
6602 wire: true,
6603 },
6604 TypeContract {
6605 name: "historical_temporal_definition",
6606 shape_version: 1,
6607 instance_format_version: Some(1),
6608 kind: TypeKind::Struct,
6609 wire: true,
6610 },
6611 TypeContract {
6612 name: "temporal_evidence_status",
6613 shape_version: 2,
6614 instance_format_version: None,
6615 kind: TypeKind::Enum,
6616 wire: true,
6617 },
6618 TypeContract {
6619 name: "temporal_source_event",
6620 shape_version: 1,
6621 instance_format_version: None,
6622 kind: TypeKind::Struct,
6623 wire: true,
6624 },
6625 TypeContract {
6626 name: "temporal_evidence",
6627 shape_version: 2,
6628 instance_format_version: None,
6629 kind: TypeKind::Struct,
6630 wire: true,
6631 },
6632 TypeContract {
6633 name: "continuous_temporal_start",
6634 shape_version: 1,
6635 instance_format_version: None,
6636 kind: TypeKind::TaggedUnion,
6637 wire: true,
6638 },
6639 TypeContract {
6640 name: "continuous_temporal_watermark_policy",
6641 shape_version: 1,
6642 instance_format_version: None,
6643 kind: TypeKind::TaggedUnion,
6644 wire: true,
6645 },
6646 TypeContract {
6647 name: "continuous_temporal_late_data_policy",
6648 shape_version: 1,
6649 instance_format_version: None,
6650 kind: TypeKind::TaggedUnion,
6651 wire: true,
6652 },
6653 TypeContract {
6654 name: "continuous_temporal_output",
6655 shape_version: 1,
6656 instance_format_version: None,
6657 kind: TypeKind::TaggedUnion,
6658 wire: true,
6659 },
6660 TypeContract {
6661 name: "continuous_temporal_definition",
6662 shape_version: 1,
6663 instance_format_version: Some(1),
6664 kind: TypeKind::Struct,
6665 wire: true,
6666 },
6667 TypeContract {
6668 name: "continuous_temporal_frontier",
6669 shape_version: 1,
6670 instance_format_version: None,
6671 kind: TypeKind::Struct,
6672 wire: true,
6673 },
6674 TypeContract {
6675 name: "continuous_temporal_available_frontier",
6676 shape_version: 1,
6677 instance_format_version: None,
6678 kind: TypeKind::Struct,
6679 wire: true,
6680 },
6681 TypeContract {
6682 name: "continuous_temporal_gap_reason",
6683 shape_version: 1,
6684 instance_format_version: None,
6685 kind: TypeKind::Enum,
6686 wire: true,
6687 },
6688 TypeContract {
6689 name: "continuous_temporal_gap",
6690 shape_version: 1,
6691 instance_format_version: None,
6692 kind: TypeKind::Struct,
6693 wire: true,
6694 },
6695 TypeContract {
6696 name: "continuous_temporal_evaluation",
6697 shape_version: 1,
6698 instance_format_version: Some(1),
6699 kind: TypeKind::Struct,
6700 wire: true,
6701 },
6702 TypeContract {
6703 name: "composite_order",
6704 shape_version: 1,
6705 instance_format_version: None,
6706 kind: TypeKind::Enum,
6707 wire: true,
6708 },
6709 TypeContract {
6710 name: "composite_source",
6711 shape_version: 1,
6712 instance_format_version: None,
6713 kind: TypeKind::TaggedUnion,
6714 wire: true,
6715 },
6716 TypeContract {
6717 name: "aggregation",
6718 shape_version: 3,
6719 instance_format_version: None,
6720 kind: TypeKind::TaggedUnion,
6721 wire: true,
6722 },
6723 TypeContract {
6724 name: "nested_search_hit",
6725 shape_version: 2,
6726 instance_format_version: None,
6727 kind: TypeKind::Struct,
6728 wire: true,
6729 },
6730 TypeContract {
6731 name: "named_nested_inner_hits_result",
6732 shape_version: 1,
6733 instance_format_version: None,
6734 kind: TypeKind::Struct,
6735 wire: true,
6736 },
6737 TypeContract {
6738 name: "fragment_boundary",
6739 shape_version: 1,
6740 instance_format_version: None,
6741 kind: TypeKind::Enum,
6742 wire: true,
6743 },
6744 TypeContract {
6745 name: "fragment_offset_encoding",
6746 shape_version: 1,
6747 instance_format_version: None,
6748 kind: TypeKind::Enum,
6749 wire: true,
6750 },
6751 TypeContract {
6752 name: "fragment_ranker",
6753 shape_version: 1,
6754 instance_format_version: None,
6755 kind: TypeKind::Enum,
6756 wire: true,
6757 },
6758 TypeContract {
6759 name: "fragment_request",
6760 shape_version: 1,
6761 instance_format_version: None,
6762 kind: TypeKind::Struct,
6763 wire: true,
6764 },
6765 TypeContract {
6766 name: "search_fragment",
6767 shape_version: 1,
6768 instance_format_version: None,
6769 kind: TypeKind::Struct,
6770 wire: true,
6771 },
6772 TypeContract {
6773 name: "numeric_feature_transform",
6774 shape_version: 1,
6775 instance_format_version: None,
6776 kind: TypeKind::TaggedUnion,
6777 wire: true,
6778 },
6779 TypeContract {
6780 name: "numeric_result_feature",
6781 shape_version: 1,
6782 instance_format_version: None,
6783 kind: TypeKind::Struct,
6784 wire: true,
6785 },
6786 TypeContract {
6787 name: "result_feature_request",
6788 shape_version: 1,
6789 instance_format_version: None,
6790 kind: TypeKind::Struct,
6791 wire: true,
6792 },
6793 TypeContract {
6794 name: "result_diversification",
6795 shape_version: 1,
6796 instance_format_version: None,
6797 kind: TypeKind::Struct,
6798 wire: true,
6799 },
6800 TypeContract {
6801 name: "source_projection",
6802 shape_version: 1,
6803 instance_format_version: None,
6804 kind: TypeKind::TaggedUnion,
6805 wire: true,
6806 },
6807 TypeContract {
6808 name: "branch_score_kind",
6809 shape_version: 2,
6810 instance_format_version: None,
6811 kind: TypeKind::Enum,
6812 wire: true,
6813 },
6814 TypeContract {
6815 name: "result_feature",
6816 shape_version: 1,
6817 instance_format_version: None,
6818 kind: TypeKind::TaggedUnion,
6819 wire: true,
6820 },
6821 TypeContract {
6822 name: "search_hit",
6823 shape_version: 2,
6824 instance_format_version: None,
6825 kind: TypeKind::Struct,
6826 wire: true,
6827 },
6828 TypeContract {
6829 name: "aggregation_bucket",
6830 shape_version: 1,
6831 instance_format_version: None,
6832 kind: TypeKind::Struct,
6833 wire: true,
6834 },
6835 TypeContract {
6836 name: "aggregation_result",
6837 shape_version: 3,
6838 instance_format_version: None,
6839 kind: TypeKind::TaggedUnion,
6840 wire: true,
6841 },
6842 TypeContract {
6843 name: "shard_counts",
6844 shape_version: 1,
6845 instance_format_version: None,
6846 kind: TypeKind::Struct,
6847 wire: true,
6848 },
6849 TypeContract {
6850 name: "total_hits_relation",
6851 shape_version: 1,
6852 instance_format_version: None,
6853 kind: TypeKind::Enum,
6854 wire: true,
6855 },
6856 TypeContract {
6857 name: "search_total",
6858 shape_version: 1,
6859 instance_format_version: None,
6860 kind: TypeKind::Struct,
6861 wire: true,
6862 },
6863 TypeContract {
6864 name: "search_execution_freshness",
6865 shape_version: 1,
6866 instance_format_version: None,
6867 kind: TypeKind::Enum,
6868 wire: true,
6869 },
6870 TypeContract {
6871 name: "search_freshness",
6872 shape_version: 1,
6873 instance_format_version: None,
6874 kind: TypeKind::Enum,
6875 wire: true,
6876 },
6877 TypeContract {
6878 name: "search_degradation_reason",
6879 shape_version: 1,
6880 instance_format_version: None,
6881 kind: TypeKind::Enum,
6882 wire: true,
6883 },
6884 TypeContract {
6885 name: "search_achievement",
6886 shape_version: 1,
6887 instance_format_version: None,
6888 kind: TypeKind::Struct,
6889 wire: true,
6890 },
6891 TypeContract {
6892 name: "search_failure_stage",
6893 shape_version: 1,
6894 instance_format_version: None,
6895 kind: TypeKind::Enum,
6896 wire: true,
6897 },
6898 TypeContract {
6899 name: "search_failure_reason",
6900 shape_version: 1,
6901 instance_format_version: None,
6902 kind: TypeKind::Enum,
6903 wire: true,
6904 },
6905 TypeContract {
6906 name: "collection_shard",
6907 shape_version: 1,
6908 instance_format_version: None,
6909 kind: TypeKind::Struct,
6910 wire: true,
6911 },
6912 TypeContract {
6913 name: "search_partial_failure",
6914 shape_version: 1,
6915 instance_format_version: None,
6916 kind: TypeKind::Struct,
6917 wire: true,
6918 },
6919 TypeContract {
6920 name: "artifact",
6921 shape_version: 1,
6922 instance_format_version: None,
6923 kind: TypeKind::Struct,
6924 wire: true,
6925 },
6926 TypeContract {
6927 name: "portability_storage_capability",
6928 shape_version: 1,
6929 instance_format_version: None,
6930 kind: TypeKind::Struct,
6931 wire: true,
6932 },
6933 TypeContract {
6934 name: "collection_export_artifact",
6935 shape_version: 1,
6936 instance_format_version: None,
6937 kind: TypeKind::Struct,
6938 wire: true,
6939 },
6940 TypeContract {
6941 name: "collection_transfer_sequence",
6942 shape_version: 1,
6943 instance_format_version: None,
6944 kind: TypeKind::Struct,
6945 wire: true,
6946 },
6947 TypeContract {
6948 name: "collection_transfer_artifact",
6949 shape_version: 1,
6950 instance_format_version: None,
6951 kind: TypeKind::Struct,
6952 wire: true,
6953 },
6954 TypeContract {
6955 name: "portability_key_capability_reference_state",
6956 shape_version: 1,
6957 instance_format_version: None,
6958 kind: TypeKind::Enum,
6959 wire: true,
6960 },
6961 TypeContract {
6962 name: "collection_export_retirement",
6963 shape_version: 1,
6964 instance_format_version: None,
6965 kind: TypeKind::Struct,
6966 wire: true,
6967 },
6968 TypeContract {
6969 name: "index_transfer_page",
6970 shape_version: 1,
6971 instance_format_version: None,
6972 kind: TypeKind::Struct,
6973 wire: true,
6974 },
6975 TypeContract {
6976 name: "index_transfer_artifact",
6977 shape_version: 1,
6978 instance_format_version: None,
6979 kind: TypeKind::Struct,
6980 wire: true,
6981 },
6982 TypeContract {
6983 name: "search_validation_bound",
6984 shape_version: 1,
6985 instance_format_version: None,
6986 kind: TypeKind::TaggedUnion,
6987 wire: true,
6988 },
6989 TypeContract {
6990 name: "search_validation_estimates",
6991 shape_version: 1,
6992 instance_format_version: None,
6993 kind: TypeKind::Struct,
6994 wire: true,
6995 },
6996 TypeContract {
6997 name: "search_validation_limit",
6998 shape_version: 1,
6999 instance_format_version: None,
7000 kind: TypeKind::Struct,
7001 wire: true,
7002 },
7003 TypeContract {
7004 name: "operation_kind",
7005 shape_version: 4,
7006 instance_format_version: None,
7007 kind: TypeKind::Enum,
7008 wire: true,
7009 },
7010 TypeContract {
7011 name: "operation_authority",
7012 shape_version: 1,
7013 instance_format_version: None,
7014 kind: TypeKind::Enum,
7015 wire: true,
7016 },
7017 TypeContract {
7018 name: "operation_target",
7019 shape_version: 1,
7020 instance_format_version: None,
7021 kind: TypeKind::TaggedUnion,
7022 wire: true,
7023 },
7024 TypeContract {
7025 name: "operation_state",
7026 shape_version: 1,
7027 instance_format_version: None,
7028 kind: TypeKind::Enum,
7029 wire: true,
7030 },
7031 TypeContract {
7032 name: "operation_pending_state",
7033 shape_version: 1,
7034 instance_format_version: None,
7035 kind: TypeKind::Enum,
7036 wire: true,
7037 },
7038 TypeContract {
7039 name: "operation_progress_unit",
7040 shape_version: 1,
7041 instance_format_version: None,
7042 kind: TypeKind::Enum,
7043 wire: true,
7044 },
7045 TypeContract {
7046 name: "operation_progress",
7047 shape_version: 1,
7048 instance_format_version: None,
7049 kind: TypeKind::Struct,
7050 wire: true,
7051 },
7052 TypeContract {
7053 name: "operation_result",
7054 shape_version: 1,
7055 instance_format_version: None,
7056 kind: TypeKind::TaggedUnion,
7057 wire: true,
7058 },
7059 TypeContract {
7060 name: "operation_failure",
7061 shape_version: 1,
7062 instance_format_version: None,
7063 kind: TypeKind::Struct,
7064 wire: true,
7065 },
7066 TypeContract {
7067 name: "operation_cancellation",
7068 shape_version: 1,
7069 instance_format_version: None,
7070 kind: TypeKind::Enum,
7071 wire: true,
7072 },
7073 TypeContract {
7074 name: "operation_retention_state",
7075 shape_version: 1,
7076 instance_format_version: None,
7077 kind: TypeKind::Enum,
7078 wire: true,
7079 },
7080 TypeContract {
7081 name: "operation_retention",
7082 shape_version: 1,
7083 instance_format_version: None,
7084 kind: TypeKind::Struct,
7085 wire: true,
7086 },
7087 TypeContract {
7088 name: "operation",
7089 shape_version: 2,
7090 instance_format_version: None,
7091 kind: TypeKind::Struct,
7092 wire: true,
7093 },
7094 TypeContract {
7095 name: "write_durability_boundary",
7096 shape_version: 1,
7097 instance_format_version: None,
7098 kind: TypeKind::Enum,
7099 wire: true,
7100 },
7101 TypeContract {
7102 name: "write_visibility_mode",
7103 shape_version: 1,
7104 instance_format_version: None,
7105 kind: TypeKind::Enum,
7106 wire: true,
7107 },
7108 TypeContract {
7109 name: "write_response_stage",
7110 shape_version: 1,
7111 instance_format_version: None,
7112 kind: TypeKind::Enum,
7113 wire: true,
7114 },
7115 TypeContract {
7116 name: "write_achievement",
7117 shape_version: 1,
7118 instance_format_version: None,
7119 kind: TypeKind::Struct,
7120 wire: true,
7121 },
7122 TypeContract {
7123 name: "mutation_commit_position",
7124 shape_version: 1,
7125 instance_format_version: None,
7126 kind: TypeKind::Struct,
7127 wire: true,
7128 },
7129 TypeContract {
7130 name: "mutation_commit_receipt",
7131 shape_version: 1,
7132 instance_format_version: Some(1),
7133 kind: TypeKind::Struct,
7134 wire: true,
7135 },
7136 TypeContract {
7137 name: "mutation_resolver",
7138 shape_version: 1,
7139 instance_format_version: None,
7140 kind: TypeKind::Enum,
7141 wire: true,
7142 },
7143 TypeContract {
7144 name: "mutation_outcome",
7145 shape_version: 1,
7146 instance_format_version: None,
7147 kind: TypeKind::TaggedUnion,
7148 wire: true,
7149 },
7150 TypeContract {
7151 name: "submission_state",
7152 shape_version: 1,
7153 instance_format_version: None,
7154 kind: TypeKind::Enum,
7155 wire: true,
7156 },
7157 TypeContract {
7158 name: "expected_binding",
7159 shape_version: 1,
7160 instance_format_version: None,
7161 kind: TypeKind::Struct,
7162 wire: true,
7163 },
7164 TypeContract {
7165 name: "administration_alias_action",
7166 shape_version: 1,
7167 instance_format_version: None,
7168 kind: TypeKind::TaggedUnion,
7169 wire: true,
7170 },
7171 TypeContract {
7172 name: "administration_mutation",
7173 shape_version: 2,
7174 instance_format_version: None,
7175 kind: TypeKind::TaggedUnion,
7176 wire: true,
7177 },
7178 TypeContract {
7179 name: "administration_outcome",
7180 shape_version: 1,
7181 instance_format_version: None,
7182 kind: TypeKind::Struct,
7183 wire: true,
7184 },
7185 TypeContract {
7186 name: "index_change_apply_receipt",
7187 shape_version: 1,
7188 instance_format_version: None,
7189 kind: TypeKind::Struct,
7190 wire: true,
7191 },
7192 TypeContract {
7193 name: "index_change_resolution_state",
7194 shape_version: 1,
7195 instance_format_version: None,
7196 kind: TypeKind::Enum,
7197 wire: true,
7198 },
7199 TypeContract {
7200 name: "bulk_document_item",
7201 shape_version: 2,
7202 instance_format_version: None,
7203 kind: TypeKind::Struct,
7204 wire: true,
7205 },
7206 TypeContract {
7207 name: "bulk_document_item_outcome",
7208 shape_version: 1,
7209 instance_format_version: None,
7210 kind: TypeKind::Struct,
7211 wire: true,
7212 },
7213 TypeContract {
7214 name: "bulk_document_outcome",
7215 shape_version: 1,
7216 instance_format_version: None,
7217 kind: TypeKind::Struct,
7218 wire: true,
7219 },
7220 TypeContract {
7221 name: "metric_attribute_value",
7222 shape_version: 1,
7223 instance_format_version: None,
7224 kind: TypeKind::TaggedUnion,
7225 wire: true,
7226 },
7227 TypeContract {
7228 name: "metric_attribute",
7229 shape_version: 1,
7230 instance_format_version: None,
7231 kind: TypeKind::Struct,
7232 wire: true,
7233 },
7234 TypeContract {
7235 name: "metric_number",
7236 shape_version: 1,
7237 instance_format_version: None,
7238 kind: TypeKind::TaggedUnion,
7239 wire: true,
7240 },
7241 TypeContract {
7242 name: "metric_temporality",
7243 shape_version: 1,
7244 instance_format_version: None,
7245 kind: TypeKind::Enum,
7246 wire: true,
7247 },
7248 TypeContract {
7249 name: "metric_point_kind",
7250 shape_version: 1,
7251 instance_format_version: None,
7252 kind: TypeKind::Enum,
7253 wire: true,
7254 },
7255 TypeContract {
7256 name: "metric_exponential_buckets",
7257 shape_version: 1,
7258 instance_format_version: None,
7259 kind: TypeKind::Struct,
7260 wire: true,
7261 },
7262 TypeContract {
7263 name: "metric_data",
7264 shape_version: 1,
7265 instance_format_version: None,
7266 kind: TypeKind::TaggedUnion,
7267 wire: true,
7268 },
7269 TypeContract {
7270 name: "metric_instrumentation_scope",
7271 shape_version: 1,
7272 instance_format_version: None,
7273 kind: TypeKind::Struct,
7274 wire: true,
7275 },
7276 TypeContract {
7277 name: "metric_exemplar",
7278 shape_version: 1,
7279 instance_format_version: None,
7280 kind: TypeKind::Struct,
7281 wire: true,
7282 },
7283 TypeContract {
7284 name: "metric_point",
7285 shape_version: 1,
7286 instance_format_version: Some(1),
7287 kind: TypeKind::Struct,
7288 wire: true,
7289 },
7290 TypeContract {
7291 name: "entity_ref",
7292 shape_version: 1,
7293 instance_format_version: None,
7294 kind: TypeKind::Struct,
7295 wire: true,
7296 },
7297 TypeContract {
7298 name: "relationship_evidence_ref",
7299 shape_version: 1,
7300 instance_format_version: None,
7301 kind: TypeKind::Struct,
7302 wire: true,
7303 },
7304 TypeContract {
7305 name: "relationship_directionality",
7306 shape_version: 1,
7307 instance_format_version: None,
7308 kind: TypeKind::Enum,
7309 wire: true,
7310 },
7311 TypeContract {
7312 name: "relationship_record",
7313 shape_version: 1,
7314 instance_format_version: Some(1),
7315 kind: TypeKind::Struct,
7316 wire: true,
7317 },
7318 TypeContract {
7319 name: "profile_label",
7320 shape_version: 1,
7321 instance_format_version: None,
7322 kind: TypeKind::Struct,
7323 wire: true,
7324 },
7325 TypeContract {
7326 name: "profile_sample_type",
7327 shape_version: 1,
7328 instance_format_version: None,
7329 kind: TypeKind::Struct,
7330 wire: true,
7331 },
7332 TypeContract {
7333 name: "profile_mapping",
7334 shape_version: 1,
7335 instance_format_version: None,
7336 kind: TypeKind::Struct,
7337 wire: true,
7338 },
7339 TypeContract {
7340 name: "profile_function",
7341 shape_version: 1,
7342 instance_format_version: None,
7343 kind: TypeKind::Struct,
7344 wire: true,
7345 },
7346 TypeContract {
7347 name: "profile_line",
7348 shape_version: 1,
7349 instance_format_version: None,
7350 kind: TypeKind::Struct,
7351 wire: true,
7352 },
7353 TypeContract {
7354 name: "profile_location",
7355 shape_version: 1,
7356 instance_format_version: None,
7357 kind: TypeKind::Struct,
7358 wire: true,
7359 },
7360 TypeContract {
7361 name: "profile_stack",
7362 shape_version: 1,
7363 instance_format_version: None,
7364 kind: TypeKind::Struct,
7365 wire: true,
7366 },
7367 TypeContract {
7368 name: "profile_sample",
7369 shape_version: 1,
7370 instance_format_version: None,
7371 kind: TypeKind::Struct,
7372 wire: true,
7373 },
7374 TypeContract {
7375 name: "profile_instrumentation_scope",
7376 shape_version: 1,
7377 instance_format_version: None,
7378 kind: TypeKind::Struct,
7379 wire: true,
7380 },
7381 TypeContract {
7382 name: "profile_batch",
7383 shape_version: 1,
7384 instance_format_version: Some(1),
7385 kind: TypeKind::Struct,
7386 wire: true,
7387 },
7388 TypeContract {
7389 name: "native_record",
7390 shape_version: 3,
7391 instance_format_version: None,
7392 kind: TypeKind::TaggedUnion,
7393 wire: true,
7394 },
7395 TypeContract {
7396 name: "retained_append_item",
7397 shape_version: 4,
7398 instance_format_version: None,
7399 kind: TypeKind::Struct,
7400 wire: true,
7401 },
7402 TypeContract {
7403 name: "retained_append_state",
7404 shape_version: 1,
7405 instance_format_version: None,
7406 kind: TypeKind::Enum,
7407 wire: true,
7408 },
7409 TypeContract {
7410 name: "retained_append_retry_safety",
7411 shape_version: 1,
7412 instance_format_version: None,
7413 kind: TypeKind::Enum,
7414 wire: true,
7415 },
7416 TypeContract {
7417 name: "retained_append_item_outcome",
7418 shape_version: 1,
7419 instance_format_version: None,
7420 kind: TypeKind::Struct,
7421 wire: true,
7422 },
7423 TypeContract {
7424 name: "retained_append_bulk_outcome",
7425 shape_version: 1,
7426 instance_format_version: None,
7427 kind: TypeKind::Struct,
7428 wire: true,
7429 },
7430 TypeContract {
7431 name: "retained_append_observation_state",
7432 shape_version: 1,
7433 instance_format_version: None,
7434 kind: TypeKind::Enum,
7435 wire: true,
7436 },
7437 TypeContract {
7438 name: "retained_append_observation_outcome",
7439 shape_version: 1,
7440 instance_format_version: None,
7441 kind: TypeKind::Struct,
7442 wire: true,
7443 },
7444 TypeContract {
7445 name: "binary_value",
7446 shape_version: 1,
7447 instance_format_version: None,
7448 kind: TypeKind::Struct,
7449 wire: true,
7450 },
7451 TypeContract {
7452 name: "state_hash_field",
7453 shape_version: 1,
7454 instance_format_version: None,
7455 kind: TypeKind::Struct,
7456 wire: true,
7457 },
7458 TypeContract {
7459 name: "state_set_entry",
7460 shape_version: 1,
7461 instance_format_version: None,
7462 kind: TypeKind::Struct,
7463 wire: true,
7464 },
7465 TypeContract {
7466 name: "state_set_condition",
7467 shape_version: 1,
7468 instance_format_version: None,
7469 kind: TypeKind::Enum,
7470 wire: true,
7471 },
7472 TypeContract {
7473 name: "state_operation",
7474 shape_version: 1,
7475 instance_format_version: None,
7476 kind: TypeKind::TaggedUnion,
7477 wire: true,
7478 },
7479 TypeContract {
7480 name: "state_optional_value",
7481 shape_version: 1,
7482 instance_format_version: None,
7483 kind: TypeKind::TaggedUnion,
7484 wire: true,
7485 },
7486 TypeContract {
7487 name: "state_command_result",
7488 shape_version: 1,
7489 instance_format_version: None,
7490 kind: TypeKind::TaggedUnion,
7491 wire: true,
7492 },
7493 TypeContract {
7494 name: "state_write_resolution",
7495 shape_version: 1,
7496 instance_format_version: None,
7497 kind: TypeKind::TaggedUnion,
7498 wire: true,
7499 },
7500 TypeContract {
7501 name: "service_credential_reservation",
7502 shape_version: 1,
7503 instance_format_version: None,
7504 kind: TypeKind::Struct,
7505 wire: true,
7506 },
7507 TypeContract {
7508 name: "subscription_metadata_field",
7509 shape_version: 1,
7510 instance_format_version: None,
7511 kind: TypeKind::Enum,
7512 wire: true,
7513 },
7514 TypeContract {
7515 name: "subscription_field",
7516 shape_version: 1,
7517 instance_format_version: None,
7518 kind: TypeKind::TaggedUnion,
7519 wire: true,
7520 },
7521 TypeContract {
7522 name: "subscription_filter",
7523 shape_version: 1,
7524 instance_format_version: None,
7525 kind: TypeKind::TaggedUnion,
7526 wire: true,
7527 },
7528 TypeContract {
7529 name: "subscription_cursor_entry",
7530 shape_version: 1,
7531 instance_format_version: None,
7532 kind: TypeKind::Struct,
7533 wire: true,
7534 },
7535 TypeContract {
7536 name: "subscription_route",
7537 shape_version: 1,
7538 instance_format_version: None,
7539 kind: TypeKind::Struct,
7540 wire: true,
7541 },
7542 TypeContract {
7543 name: "subscription_start_position",
7544 shape_version: 1,
7545 instance_format_version: None,
7546 kind: TypeKind::TaggedUnion,
7547 wire: true,
7548 },
7549 TypeContract {
7550 name: "subscription_start",
7551 shape_version: 1,
7552 instance_format_version: Some(1),
7553 kind: TypeKind::Struct,
7554 wire: true,
7555 },
7556 TypeContract {
7557 name: "subscription_accepted",
7558 shape_version: 1,
7559 instance_format_version: Some(1),
7560 kind: TypeKind::Struct,
7561 wire: true,
7562 },
7563 TypeContract {
7564 name: "subscription_writer_fence",
7565 shape_version: 1,
7566 instance_format_version: None,
7567 kind: TypeKind::Struct,
7568 wire: true,
7569 },
7570 TypeContract {
7571 name: "subscription_event",
7572 shape_version: 1,
7573 instance_format_version: Some(1),
7574 kind: TypeKind::Struct,
7575 wire: true,
7576 },
7577 TypeContract {
7578 name: "subscription_heartbeat",
7579 shape_version: 1,
7580 instance_format_version: Some(1),
7581 kind: TypeKind::Struct,
7582 wire: true,
7583 },
7584 TypeContract {
7585 name: "subscription_gap",
7586 shape_version: 1,
7587 instance_format_version: Some(1),
7588 kind: TypeKind::Struct,
7589 wire: true,
7590 },
7591 TypeContract {
7592 name: "subscription_terminal_reason",
7593 shape_version: 1,
7594 instance_format_version: None,
7595 kind: TypeKind::Enum,
7596 wire: true,
7597 },
7598 TypeContract {
7599 name: "subscription_terminal",
7600 shape_version: 2,
7601 instance_format_version: Some(2),
7602 kind: TypeKind::Struct,
7603 wire: true,
7604 },
7605 TypeContract {
7606 name: "subscription_frame",
7607 shape_version: 1,
7608 instance_format_version: None,
7609 kind: TypeKind::TaggedUnion,
7610 wire: true,
7611 },
7612 TypeContract {
7613 name: "stream_binding",
7614 shape_version: 1,
7615 instance_format_version: None,
7616 kind: TypeKind::Struct,
7617 wire: true,
7618 },
7619 TypeContract {
7620 name: "capability_grant",
7621 shape_version: 1,
7622 instance_format_version: None,
7623 kind: TypeKind::Struct,
7624 wire: true,
7625 },
7626 TypeContract {
7627 name: "protocol_limit",
7628 shape_version: 1,
7629 instance_format_version: None,
7630 kind: TypeKind::Struct,
7631 wire: true,
7632 },
7633 TypeContract {
7634 name: "document_mutation_condition",
7635 shape_version: 1,
7636 instance_format_version: None,
7637 kind: TypeKind::TaggedUnion,
7638 wire: true,
7639 },
7640 TypeContract {
7641 name: "audit_adapter",
7642 shape_version: 1,
7643 instance_format_version: None,
7644 kind: TypeKind::Enum,
7645 wire: true,
7646 },
7647 TypeContract {
7648 name: "audit_decision",
7649 shape_version: 1,
7650 instance_format_version: None,
7651 kind: TypeKind::Enum,
7652 wire: true,
7653 },
7654 TypeContract {
7655 name: "audit_outcome",
7656 shape_version: 1,
7657 instance_format_version: None,
7658 kind: TypeKind::Enum,
7659 wire: true,
7660 },
7661 TypeContract {
7662 name: "audit_detail",
7663 shape_version: 1,
7664 instance_format_version: None,
7665 kind: TypeKind::Enum,
7666 wire: true,
7667 },
7668 TypeContract {
7669 name: "audit_gap_reason",
7670 shape_version: 1,
7671 instance_format_version: None,
7672 kind: TypeKind::Enum,
7673 wire: true,
7674 },
7675 TypeContract {
7676 name: "audit_event",
7677 shape_version: 2,
7678 instance_format_version: None,
7679 kind: TypeKind::Struct,
7680 wire: true,
7681 },
7682 TypeContract {
7683 name: "audit_gap",
7684 shape_version: 2,
7685 instance_format_version: None,
7686 kind: TypeKind::Struct,
7687 wire: true,
7688 },
7689 TypeContract {
7690 name: "audit_stream_state",
7691 shape_version: 1,
7692 instance_format_version: None,
7693 kind: TypeKind::Struct,
7694 wire: true,
7695 },
7696 TypeContract {
7697 name: "service_credential_grant",
7698 shape_version: 1,
7699 instance_format_version: None,
7700 kind: TypeKind::Struct,
7701 wire: true,
7702 },
7703 TypeContract {
7704 name: "service_credential_summary",
7705 shape_version: 1,
7706 instance_format_version: None,
7707 kind: TypeKind::Struct,
7708 wire: true,
7709 },
7710 TypeContract {
7711 name: "security_role",
7712 shape_version: 2,
7713 instance_format_version: None,
7714 kind: TypeKind::Struct,
7715 wire: true,
7716 },
7717 TypeContract {
7718 name: "role_append_scope_change",
7719 shape_version: 1,
7720 instance_format_version: None,
7721 kind: TypeKind::TaggedUnion,
7722 wire: true,
7723 },
7724 TypeContract {
7725 name: "role_append_access_preparation",
7726 shape_version: 1,
7727 instance_format_version: None,
7728 kind: TypeKind::TaggedUnion,
7729 wire: true,
7730 },
7731 TypeContract {
7732 name: "security_action_outcome",
7733 shape_version: 1,
7734 instance_format_version: None,
7735 kind: TypeKind::TaggedUnion,
7736 wire: true,
7737 },
7738 TypeContract {
7739 name: "maintenance_work_state",
7740 shape_version: 1,
7741 instance_format_version: None,
7742 kind: TypeKind::Enum,
7743 wire: true,
7744 },
7745 TypeContract {
7746 name: "maintenance_attempt_state",
7747 shape_version: 1,
7748 instance_format_version: None,
7749 kind: TypeKind::Enum,
7750 wire: true,
7751 },
7752 TypeContract {
7753 name: "maintenance_failure_class",
7754 shape_version: 1,
7755 instance_format_version: None,
7756 kind: TypeKind::Enum,
7757 wire: true,
7758 },
7759 TypeContract {
7760 name: "maintenance_failure_class_count",
7761 shape_version: 1,
7762 instance_format_version: None,
7763 kind: TypeKind::Struct,
7764 wire: true,
7765 },
7766 TypeContract {
7767 name: "maintenance_attempt_observation",
7768 shape_version: 1,
7769 instance_format_version: None,
7770 kind: TypeKind::Struct,
7771 wire: true,
7772 },
7773 TypeContract {
7774 name: "maintenance_task_scope",
7775 shape_version: 1,
7776 instance_format_version: None,
7777 kind: TypeKind::Struct,
7778 wire: true,
7779 },
7780 TypeContract {
7781 name: "maintenance_task_status",
7782 shape_version: 1,
7783 instance_format_version: None,
7784 kind: TypeKind::Struct,
7785 wire: true,
7786 },
7787 TypeContract {
7788 name: "maintenance_status_aggregate",
7789 shape_version: 1,
7790 instance_format_version: Some(2),
7791 kind: TypeKind::Struct,
7792 wire: true,
7793 },
7794 TypeContract {
7795 name: "runtime_status_detail",
7796 shape_version: 1,
7797 instance_format_version: None,
7798 kind: TypeKind::Struct,
7799 wire: true,
7800 },
7801 TypeContract {
7802 name: "result_cache_status",
7803 shape_version: 2,
7804 instance_format_version: Some(3),
7805 kind: TypeKind::Struct,
7806 wire: true,
7807 },
7808 TypeContract {
7809 name: "field_promotion_status",
7810 shape_version: 1,
7811 instance_format_version: Some(3),
7812 kind: TypeKind::Struct,
7813 wire: true,
7814 },
7815 TypeContract {
7816 name: "overload_shard_status",
7817 shape_version: 2,
7818 instance_format_version: Some(3),
7819 kind: TypeKind::Struct,
7820 wire: true,
7821 },
7822 TypeContract {
7823 name: "external_key_binding",
7824 shape_version: 1,
7825 instance_format_version: None,
7826 kind: TypeKind::Struct,
7827 wire: true,
7828 },
7829 TypeContract {
7830 name: "rollup_measure",
7831 shape_version: 1,
7832 instance_format_version: None,
7833 kind: TypeKind::TaggedUnion,
7834 wire: true,
7835 },
7836 TypeContract {
7837 name: "aggregate_then_delete_policy",
7838 shape_version: 1,
7839 instance_format_version: None,
7840 kind: TypeKind::Struct,
7841 wire: true,
7842 },
7843 TypeContract {
7844 name: "lifecycle_binding_status",
7845 shape_version: 1,
7846 instance_format_version: None,
7847 kind: TypeKind::Struct,
7848 wire: true,
7849 },
7850 TypeContract {
7851 name: "lifecycle_rollup_status",
7852 shape_version: 1,
7853 instance_format_version: None,
7854 kind: TypeKind::Struct,
7855 wire: true,
7856 },
7857 TypeContract {
7858 name: "lifecycle_status",
7859 shape_version: 2,
7860 instance_format_version: Some(4),
7861 kind: TypeKind::Struct,
7862 wire: true,
7863 },
7864 TypeContract {
7865 name: "quota_limit",
7866 shape_version: 1,
7867 instance_format_version: None,
7868 kind: TypeKind::Struct,
7869 wire: true,
7870 },
7871 TypeContract {
7872 name: "quota_consumption",
7873 shape_version: 1,
7874 instance_format_version: None,
7875 kind: TypeKind::Struct,
7876 wire: true,
7877 },
7878 TypeContract {
7879 name: "quota_update",
7880 shape_version: 1,
7881 instance_format_version: None,
7882 kind: TypeKind::Struct,
7883 wire: true,
7884 },
7885 TypeContract {
7886 name: "storage_overall_posture",
7887 shape_version: 1,
7888 instance_format_version: None,
7889 kind: TypeKind::Enum,
7890 wire: true,
7891 },
7892 TypeContract {
7893 name: "storage_profile_role",
7894 shape_version: 1,
7895 instance_format_version: None,
7896 kind: TypeKind::Enum,
7897 wire: true,
7898 },
7899 TypeContract {
7900 name: "storage_provider_posture",
7901 shape_version: 1,
7902 instance_format_version: None,
7903 kind: TypeKind::Enum,
7904 wire: true,
7905 },
7906 TypeContract {
7907 name: "storage_backend_service_class",
7908 shape_version: 1,
7909 instance_format_version: None,
7910 kind: TypeKind::Enum,
7911 wire: true,
7912 },
7913 TypeContract {
7914 name: "storage_profile_role_binding",
7915 shape_version: 1,
7916 instance_format_version: None,
7917 kind: TypeKind::Struct,
7918 wire: true,
7919 },
7920 TypeContract {
7921 name: "storage_profile_attestation",
7922 shape_version: 1,
7923 instance_format_version: Some(1),
7924 kind: TypeKind::Struct,
7925 wire: true,
7926 },
7927 TypeContract {
7928 name: "storage_profile_expectation",
7929 shape_version: 1,
7930 instance_format_version: Some(1),
7931 kind: TypeKind::Struct,
7932 wire: true,
7933 },
7934 TypeContract {
7935 name: "core_binding",
7936 shape_version: 3,
7937 instance_format_version: None,
7938 kind: TypeKind::Struct,
7939 wire: true,
7940 },
7941 TypeContract {
7942 name: "readiness_observation",
7943 shape_version: 1,
7944 instance_format_version: None,
7945 kind: TypeKind::Struct,
7946 wire: true,
7947 },
7948 TypeContract {
7949 name: "usage_dimension",
7950 shape_version: 1,
7951 instance_format_version: None,
7952 kind: TypeKind::Struct,
7953 wire: true,
7954 },
7955 TypeContract {
7956 name: "physical_usage_value",
7957 shape_version: 2,
7958 instance_format_version: None,
7959 kind: TypeKind::Struct,
7960 wire: true,
7961 },
7962 TypeContract {
7963 name: "core_usage_units",
7964 shape_version: 2,
7965 instance_format_version: None,
7966 kind: TypeKind::Struct,
7967 wire: true,
7968 },
7969 TypeContract {
7970 name: "core_usage_correction",
7971 shape_version: 2,
7972 instance_format_version: None,
7973 kind: TypeKind::Struct,
7974 wire: true,
7975 },
7976 TypeContract {
7977 name: "response_meta",
7978 shape_version: 1,
7979 instance_format_version: Some(1),
7980 kind: TypeKind::Struct,
7981 wire: true,
7982 },
7983 TypeContract {
7984 name: "error_disposition",
7985 shape_version: 1,
7986 instance_format_version: None,
7987 kind: TypeKind::Enum,
7988 wire: true,
7989 },
7990 TypeContract {
7991 name: "recovery_action",
7992 shape_version: 1,
7993 instance_format_version: None,
7994 kind: TypeKind::Enum,
7995 wire: true,
7996 },
7997 TypeContract {
7998 name: "limit_class",
7999 shape_version: 1,
8000 instance_format_version: None,
8001 kind: TypeKind::Enum,
8002 wire: true,
8003 },
8004 TypeContract {
8005 name: "error_detail",
8006 shape_version: 3,
8007 instance_format_version: None,
8008 kind: TypeKind::TaggedUnion,
8009 wire: true,
8010 },
8011 TypeContract {
8012 name: "connection_profile",
8013 shape_version: 4,
8014 instance_format_version: Some(4),
8015 kind: TypeKind::Struct,
8016 wire: false,
8017 },
8018];
8019#[derive(Clone, Copy, Debug, Eq, PartialEq)]
8020pub struct StreamContract {
8021 pub name: &'static str,
8022 pub action: Action,
8023 pub transport: &'static str,
8024 pub service: &'static str,
8025 pub method: &'static str,
8026 pub auth_metadata: &'static str,
8027 pub auth_scheme: &'static str,
8028 pub semantic_format_version: u16,
8029 pub start_type: &'static str,
8030 pub frame_type: &'static str,
8031}
8032pub const LODESTONE_API_STREAM_CONTRACTS: &[StreamContract] = &[StreamContract {
8033 name: "subscription",
8034 action: Action::SubscriptionRead,
8035 transport: "grpc_tls",
8036 service: "lodestone.api.FilterSubscription",
8037 method: "/lodestone.api.FilterSubscription/Subscribe",
8038 auth_metadata: "authorization",
8039 auth_scheme: "ApiKey",
8040 semantic_format_version: 1,
8041 start_type: "subscription_start",
8042 frame_type: "subscription_frame",
8043}];
8044#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8045#[serde(deny_unknown_fields)]
8046pub struct ErrorBody {
8047 pub code: ErrorCode,
8048 pub message: String,
8049 pub disposition: ErrorDisposition,
8050 pub recovery: RecoveryAction,
8051 pub details: ErrorDetail,
8052}
8053#[derive(Clone, Copy, Debug, Eq, PartialEq)]
8054pub enum ErrorShapeError {
8055 DetailCodeMismatch,
8056 OutcomeMismatch,
8057 RetryAfterOutOfRange,
8058}
8059impl ErrorBody {
8060 pub fn try_new(
8061 code: ErrorCode,
8062 message: String,
8063 disposition: ErrorDisposition,
8064 recovery: RecoveryAction,
8065 details: ErrorDetail,
8066 ) -> Result<Self, ErrorShapeError> {
8067 let body = Self {
8068 code,
8069 message,
8070 disposition,
8071 recovery,
8072 details,
8073 };
8074 validate_error_body(&body)?;
8075 Ok(body)
8076 }
8077 pub fn retry_safe(&self) -> bool {
8078 self.disposition == ErrorDisposition::NotSubmitted
8079 && matches!(
8080 self.recovery,
8081 RecoveryAction::Retry
8082 | RecoveryAction::RetryAfter
8083 | RecoveryAction::RefreshCredential
8084 | RecoveryAction::RestartPage
8085 | RecoveryAction::ReduceRequest
8086 | RecoveryAction::RefreshPrecondition
8087 | RecoveryAction::CorrectRange
8088 )
8089 }
8090 pub fn submitted(&self) -> bool {
8091 self.disposition != ErrorDisposition::NotSubmitted
8092 }
8093}
8094pub fn validate_error_body(body: &ErrorBody) -> Result<(), ErrorShapeError> {
8095 let detail_matches = matches!(
8096 (&body.code, &body.details),
8097 (ErrorCode::Aborted, ErrorDetail::Aborted { .. })
8098 | (ErrorCode::DeadlineExceeded, ErrorDetail::DeadlineExceeded)
8099 | (ErrorCode::InvalidRequest, ErrorDetail::InvalidRequest { .. })
8100 | (ErrorCode::UnsupportedVersion, ErrorDetail::UnsupportedVersion { .. })
8101 | (ErrorCode::Unauthenticated, ErrorDetail::Unauthenticated)
8102 | (ErrorCode::PermissionDenied, ErrorDetail::PermissionDenied { .. })
8103 | (ErrorCode::NotFound, ErrorDetail::NotFound { .. })
8104 | (ErrorCode::Conflict, ErrorDetail::Conflict { .. })
8105 | (ErrorCode::StaleCursor, ErrorDetail::StaleCursor { .. })
8106 | (
8107 ErrorCode::RestartBudgetExhausted,
8108 ErrorDetail::RestartBudgetExhausted { .. }
8109 )
8110 | (ErrorCode::LimitExceeded, ErrorDetail::LimitExceeded { .. })
8111 | (
8112 ErrorCode::CapabilityUnavailable,
8113 ErrorDetail::CapabilityUnavailable { .. }
8114 )
8115 | (ErrorCode::NotSubmitted, ErrorDetail::NotSubmitted { .. })
8116 | (
8117 ErrorCode::SubmittedIndeterminate,
8118 ErrorDetail::SubmittedIndeterminate { .. }
8119 )
8120 | (ErrorCode::ExpiredUnknown, ErrorDetail::ExpiredUnknown { .. })
8121 | (ErrorCode::SecretNotEscrowed, ErrorDetail::SecretNotEscrowed)
8122 | (ErrorCode::RetentionGap, ErrorDetail::RetentionGap { .. })
8123 | (
8124 ErrorCode::ArtifactRangeInvalid,
8125 ErrorDetail::ArtifactRangeInvalid { .. }
8126 )
8127 | (ErrorCode::ChecksumMismatch, ErrorDetail::ChecksumMismatch { .. })
8128 | (
8129 ErrorCode::TemporarilyUnavailable,
8130 ErrorDetail::TemporarilyUnavailable { .. }
8131 )
8132 | (ErrorCode::Internal, ErrorDetail::Internal)
8133 );
8134 if !detail_matches {
8135 return Err(ErrorShapeError::DetailCodeMismatch);
8136 }
8137 if !LODESTONE_API_ERROR_OUTCOMES.iter().any(|contract| {
8138 contract.code == body.code && contract.disposition == body.disposition && contract.recovery == body.recovery
8139 }) {
8140 return Err(ErrorShapeError::OutcomeMismatch);
8141 }
8142 let retry_after = match &body.details {
8143 ErrorDetail::NotSubmitted { retry_after_millis }
8144 | ErrorDetail::TemporarilyUnavailable { retry_after_millis } => retry_after_millis.as_ref(),
8145 _ => None,
8146 };
8147 if retry_after
8148 .and_then(|value| value.value.parse::<u64>().ok())
8149 .is_some_and(|value| value > 60000)
8150 {
8151 return Err(ErrorShapeError::RetryAfterOutOfRange);
8152 }
8153 Ok(())
8154}
8155#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
8156#[serde(deny_unknown_fields)]
8157pub struct RequestMeta {
8158 pub format_version: u16,
8159 pub request_id: String,
8160 pub correlation_id: Identity,
8161 pub absolute_deadline_unix_millis: U64,
8162 pub workload_class: WorkloadClass,
8163}
8164
8165#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8166#[serde(deny_unknown_fields)]
8167pub struct DiscoverRequest {}
8168
8169#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8170#[serde(deny_unknown_fields)]
8171pub struct DiscoverResult {
8172 pub principal_id: Identity,
8173 pub collection_id: Identity,
8174 pub policy_revision: U64,
8175 pub artifact_version: String,
8176 pub schema_id: String,
8177 pub schema_digest: Digest,
8178 pub streams: Vec<StreamBinding>,
8179 pub capabilities: Vec<CapabilityGrant>,
8180 pub limits: Vec<ProtocolLimit>,
8181}
8182
8183#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8184#[serde(deny_unknown_fields)]
8185pub struct ListIndexesRequest {
8186 pub page_size: u32,
8187 #[serde(default, skip_serializing_if = "Option::is_none")]
8188 pub cursor: Option<Cursor>,
8189 #[serde(default, skip_serializing_if = "Option::is_none")]
8190 pub name_prefix: Option<String>,
8191 #[serde(default, skip_serializing_if = "Option::is_none")]
8192 pub mode: Option<String>,
8193 #[serde(default, skip_serializing_if = "Option::is_none")]
8194 pub state: Option<String>,
8195 pub restart_count: u32,
8196}
8197
8198#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8199#[serde(deny_unknown_fields)]
8200pub struct ListIndexesResult {
8201 pub items: Vec<IndexSummary>,
8202 #[serde(default, skip_serializing_if = "Option::is_none")]
8203 pub next_cursor: Option<Cursor>,
8204 pub restart_count: u32,
8205}
8206
8207#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8208#[serde(deny_unknown_fields)]
8209pub struct GetIndexRequest {
8210 pub name: String,
8211 #[serde(default, skip_serializing_if = "Option::is_none")]
8212 pub expected_incarnation: Option<Identity>,
8213}
8214
8215#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8216#[serde(deny_unknown_fields)]
8217pub struct GetIndexResult {
8218 pub resource: IndexDetail,
8219}
8220
8221#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8222#[serde(deny_unknown_fields)]
8223pub struct ValidateIndexChangeRequest {
8224 pub action_kind: String,
8225 pub name: String,
8226 #[serde(default, skip_serializing_if = "Option::is_none")]
8227 pub expected_incarnation: Option<Identity>,
8228 #[serde(default, skip_serializing_if = "Option::is_none")]
8229 pub expected_revision: Option<U64>,
8230 #[serde(default, skip_serializing_if = "Option::is_none")]
8231 pub mode: Option<String>,
8232 #[serde(default, skip_serializing_if = "Option::is_none")]
8233 pub mapping: Option<Mapping>,
8234 #[serde(default, skip_serializing_if = "Option::is_none")]
8235 pub policies: Option<IndexPolicies>,
8236}
8237
8238#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8239#[serde(deny_unknown_fields)]
8240pub struct ValidateIndexChangeResult {
8241 pub change_kind: String,
8242 #[serde(default, skip_serializing_if = "Option::is_none")]
8243 pub action_id: Option<Digest>,
8244 pub fields_added: Vec<String>,
8245 pub policy_axes_changed: Vec<String>,
8246 pub required_capabilities: Vec<String>,
8247 pub catalog_revision: U64,
8248 pub policy_revision: U64,
8249}
8250
8251#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8252#[serde(deny_unknown_fields)]
8253pub struct ApplyIndexChangeRequest {
8254 pub action_id: Digest,
8255 pub index: Resource,
8256 pub expected_revision: U64,
8257 #[serde(default, skip_serializing_if = "Option::is_none")]
8258 pub mapping: Option<Mapping>,
8259 #[serde(default, skip_serializing_if = "Option::is_none")]
8260 pub policies: Option<IndexPolicies>,
8261}
8262
8263#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8264#[serde(deny_unknown_fields)]
8265pub struct ApplyIndexChangeResult {
8266 pub receipt: IndexChangeApplyReceipt,
8267}
8268
8269#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8270#[serde(deny_unknown_fields)]
8271pub struct ResolveIndexChangeRequest {
8272 pub action_id: Digest,
8273 pub index: Resource,
8274 pub expected_revision: U64,
8275 #[serde(default, skip_serializing_if = "Option::is_none")]
8276 pub mapping: Option<Mapping>,
8277 #[serde(default, skip_serializing_if = "Option::is_none")]
8278 pub policies: Option<IndexPolicies>,
8279}
8280
8281#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8282#[serde(deny_unknown_fields)]
8283pub struct ResolveIndexChangeResult {
8284 pub state: IndexChangeResolutionState,
8285 #[serde(default, skip_serializing_if = "Option::is_none")]
8286 pub receipt: Option<IndexChangeApplyReceipt>,
8287 #[serde(default, skip_serializing_if = "Option::is_none")]
8288 pub failure: Option<String>,
8289}
8290
8291#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8292#[serde(deny_unknown_fields)]
8293pub struct ApplyAdministrationMutationRequest {
8294 pub action_id: Digest,
8295 pub expected_revision: U64,
8296 pub mutation: AdministrationMutation,
8297}
8298
8299#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8300#[serde(deny_unknown_fields)]
8301pub struct ApplyAdministrationMutationResult {
8302 pub outcome: AdministrationOutcome,
8303}
8304
8305#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8306#[serde(deny_unknown_fields)]
8307pub struct ListAliasesRequest {
8308 pub page_size: u32,
8309 #[serde(default, skip_serializing_if = "Option::is_none")]
8310 pub cursor: Option<Cursor>,
8311 #[serde(default, skip_serializing_if = "Option::is_none")]
8312 pub name_prefix: Option<String>,
8313 pub restart_count: u32,
8314}
8315
8316#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8317#[serde(deny_unknown_fields)]
8318pub struct ListAliasesResult {
8319 pub items: Vec<AliasSummary>,
8320 #[serde(default, skip_serializing_if = "Option::is_none")]
8321 pub next_cursor: Option<Cursor>,
8322 pub restart_count: u32,
8323}
8324
8325#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8326#[serde(deny_unknown_fields)]
8327pub struct GetAliasRequest {
8328 pub name: String,
8329}
8330
8331#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8332#[serde(deny_unknown_fields)]
8333pub struct GetAliasResult {
8334 pub resource: AliasDetail,
8335}
8336
8337#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8338#[serde(deny_unknown_fields)]
8339pub struct ListDataStreamsRequest {
8340 pub page_size: u32,
8341 #[serde(default, skip_serializing_if = "Option::is_none")]
8342 pub cursor: Option<Cursor>,
8343 #[serde(default, skip_serializing_if = "Option::is_none")]
8344 pub name_prefix: Option<String>,
8345 pub restart_count: u32,
8346}
8347
8348#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8349#[serde(deny_unknown_fields)]
8350pub struct ListDataStreamsResult {
8351 pub items: Vec<DataStreamSummary>,
8352 #[serde(default, skip_serializing_if = "Option::is_none")]
8353 pub next_cursor: Option<Cursor>,
8354 pub restart_count: u32,
8355}
8356
8357#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8358#[serde(deny_unknown_fields)]
8359pub struct GetDataStreamRequest {
8360 pub name: String,
8361}
8362
8363#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8364#[serde(deny_unknown_fields)]
8365pub struct GetDataStreamResult {
8366 pub resource: DataStreamDetail,
8367}
8368
8369#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8370#[serde(deny_unknown_fields)]
8371pub struct ListComponentTemplatesRequest {
8372 pub page_size: u32,
8373 #[serde(default, skip_serializing_if = "Option::is_none")]
8374 pub cursor: Option<Cursor>,
8375 #[serde(default, skip_serializing_if = "Option::is_none")]
8376 pub name_prefix: Option<String>,
8377 pub restart_count: u32,
8378}
8379
8380#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8381#[serde(deny_unknown_fields)]
8382pub struct ListComponentTemplatesResult {
8383 pub items: Vec<ComponentTemplateSummary>,
8384 #[serde(default, skip_serializing_if = "Option::is_none")]
8385 pub next_cursor: Option<Cursor>,
8386 pub restart_count: u32,
8387}
8388
8389#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8390#[serde(deny_unknown_fields)]
8391pub struct GetComponentTemplateRequest {
8392 pub name: String,
8393 #[serde(default, skip_serializing_if = "Option::is_none")]
8394 pub expected_incarnation: Option<Identity>,
8395}
8396
8397#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8398#[serde(deny_unknown_fields)]
8399pub struct GetComponentTemplateResult {
8400 pub resource: ComponentTemplateDetail,
8401}
8402
8403#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8404#[serde(deny_unknown_fields)]
8405pub struct ListIndexTemplatesRequest {
8406 pub page_size: u32,
8407 #[serde(default, skip_serializing_if = "Option::is_none")]
8408 pub cursor: Option<Cursor>,
8409 #[serde(default, skip_serializing_if = "Option::is_none")]
8410 pub name_prefix: Option<String>,
8411 pub restart_count: u32,
8412}
8413
8414#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8415#[serde(deny_unknown_fields)]
8416pub struct ListIndexTemplatesResult {
8417 pub items: Vec<IndexTemplateSummary>,
8418 #[serde(default, skip_serializing_if = "Option::is_none")]
8419 pub next_cursor: Option<Cursor>,
8420 pub restart_count: u32,
8421}
8422
8423#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8424#[serde(deny_unknown_fields)]
8425pub struct GetIndexTemplateRequest {
8426 pub name: String,
8427 #[serde(default, skip_serializing_if = "Option::is_none")]
8428 pub expected_incarnation: Option<Identity>,
8429}
8430
8431#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8432#[serde(deny_unknown_fields)]
8433pub struct GetIndexTemplateResult {
8434 pub resource: IndexTemplateDetail,
8435}
8436
8437#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8438#[serde(deny_unknown_fields)]
8439pub struct ListIngestPipelinesRequest {
8440 pub page_size: u32,
8441 #[serde(default, skip_serializing_if = "Option::is_none")]
8442 pub cursor: Option<Cursor>,
8443 #[serde(default, skip_serializing_if = "Option::is_none")]
8444 pub name_prefix: Option<String>,
8445 pub restart_count: u32,
8446}
8447
8448#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8449#[serde(deny_unknown_fields)]
8450pub struct ListIngestPipelinesResult {
8451 pub items: Vec<IngestPipelineSummary>,
8452 #[serde(default, skip_serializing_if = "Option::is_none")]
8453 pub next_cursor: Option<Cursor>,
8454 pub restart_count: u32,
8455}
8456
8457#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8458#[serde(deny_unknown_fields)]
8459pub struct GetIngestPipelineRequest {
8460 pub name: String,
8461 #[serde(default, skip_serializing_if = "Option::is_none")]
8462 pub expected_incarnation: Option<Identity>,
8463}
8464
8465#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8466#[serde(deny_unknown_fields)]
8467pub struct GetIngestPipelineResult {
8468 pub resource: IngestPipelineDetail,
8469}
8470
8471#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8472#[serde(deny_unknown_fields)]
8473pub struct SimulateIngestPipelineRequest {
8474 #[serde(default, skip_serializing_if = "Option::is_none")]
8475 pub name: Option<String>,
8476 #[serde(default, skip_serializing_if = "Option::is_none")]
8477 pub expected: Option<ExpectedBinding>,
8478 #[serde(default, skip_serializing_if = "Option::is_none")]
8479 pub definition: Option<RawJson>,
8480 pub source: RawJson,
8481}
8482
8483#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8484#[serde(deny_unknown_fields)]
8485pub struct SimulateIngestPipelineResult {
8486 #[serde(default, skip_serializing_if = "Option::is_none")]
8487 pub source: Option<RawJson>,
8488 pub dropped: bool,
8489 pub changed: bool,
8490}
8491
8492#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8493#[serde(deny_unknown_fields)]
8494pub struct ReprocessByQueryRequest {
8495 pub action_id: Digest,
8496 pub index: Resource,
8497 pub query: Query,
8498 #[serde(default, skip_serializing_if = "Option::is_none")]
8499 pub pipeline: Option<IngestPipelineSelection>,
8500 pub batch_size: u32,
8501 pub max_docs: U64,
8502 pub proceed_on_conflict: bool,
8503 pub slices: u32,
8504 pub requests_per_second: u32,
8505 pub wait_for_completion: bool,
8506}
8507
8508#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8509#[serde(deny_unknown_fields)]
8510pub struct ReprocessByQueryResult {
8511 pub task_id: Identity,
8512 pub scanned: U64,
8513 pub updated: U64,
8514 pub noops: U64,
8515 pub version_conflicts: U64,
8516 pub batches: U64,
8517 pub completed: bool,
8518}
8519
8520#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8521#[serde(deny_unknown_fields)]
8522pub struct ListLifecyclePoliciesRequest {
8523 pub page_size: u32,
8524 #[serde(default, skip_serializing_if = "Option::is_none")]
8525 pub cursor: Option<Cursor>,
8526 #[serde(default, skip_serializing_if = "Option::is_none")]
8527 pub name_prefix: Option<String>,
8528 pub restart_count: u32,
8529}
8530
8531#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8532#[serde(deny_unknown_fields)]
8533pub struct ListLifecyclePoliciesResult {
8534 pub items: Vec<LifecyclePolicySummary>,
8535 #[serde(default, skip_serializing_if = "Option::is_none")]
8536 pub next_cursor: Option<Cursor>,
8537 pub restart_count: u32,
8538}
8539
8540#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8541#[serde(deny_unknown_fields)]
8542pub struct GetLifecyclePolicyRequest {
8543 pub name: String,
8544}
8545
8546#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8547#[serde(deny_unknown_fields)]
8548pub struct GetLifecyclePolicyResult {
8549 pub resource: LifecyclePolicyDetail,
8550}
8551
8552#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8553#[serde(deny_unknown_fields)]
8554pub struct PrepareCreateIndexRequest {
8555 pub name: String,
8556 pub mapping: Mapping,
8557 #[serde(default, skip_serializing_if = "Option::is_none")]
8558 pub resource_spec: Option<IndexResourceSpec>,
8559 #[serde(default, skip_serializing_if = "Option::is_none")]
8560 pub retained_event_identity: Option<bool>,
8561}
8562
8563#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8564#[serde(deny_unknown_fields)]
8565pub struct PrepareCreateIndexResult {
8566 pub locator: Locator,
8567 pub expires_at: U64,
8568 pub semantic_digest: Digest,
8569 pub resource_spec: IndexResourceSpec,
8570}
8571
8572#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8573#[serde(deny_unknown_fields)]
8574pub struct PrepareDeleteIndexRequest {
8575 pub name: String,
8576 pub expected_incarnation: Identity,
8577}
8578
8579#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8580#[serde(deny_unknown_fields)]
8581pub struct PrepareDeleteIndexResult {
8582 #[serde(default, skip_serializing_if = "Option::is_none")]
8583 pub locator: Option<Locator>,
8584 #[serde(default, skip_serializing_if = "Option::is_none")]
8585 pub expires_at: Option<U64>,
8586 #[serde(default, skip_serializing_if = "Option::is_none")]
8587 pub semantic_digest: Option<Digest>,
8588 pub impact_digest: Digest,
8589 pub blockers: Vec<String>,
8590 pub scheduled_effects: Vec<String>,
8591 #[serde(default, skip_serializing_if = "Option::is_none")]
8592 pub estimated_documents: Option<U64>,
8593 #[serde(default, skip_serializing_if = "Option::is_none")]
8594 pub estimated_logical_bytes: Option<U64>,
8595}
8596
8597#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8598#[serde(deny_unknown_fields)]
8599pub struct SubmitCatalogActionRequest {
8600 pub locator: Locator,
8601 pub semantic_digest: Digest,
8602 pub action_kind: String,
8603 pub name: String,
8604 #[serde(default, skip_serializing_if = "Option::is_none")]
8605 pub mapping: Option<Mapping>,
8606 #[serde(default, skip_serializing_if = "Option::is_none")]
8607 pub resource_spec: Option<IndexResourceSpec>,
8608 #[serde(default, skip_serializing_if = "Option::is_none")]
8609 pub expected_incarnation: Option<Identity>,
8610}
8611
8612#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8613#[serde(deny_unknown_fields)]
8614pub struct SubmitCatalogActionResult {
8615 pub locator: Locator,
8616 pub state: String,
8617 pub mutation_outcome: MutationOutcome,
8618}
8619
8620#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8621#[serde(deny_unknown_fields)]
8622pub struct ResolveCatalogActionRequest {
8623 pub locator: Locator,
8624}
8625
8626#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8627#[serde(deny_unknown_fields)]
8628pub struct ResolveCatalogActionResult {
8629 pub locator: Locator,
8630 pub state: String,
8631 #[serde(default, skip_serializing_if = "Option::is_none")]
8632 pub resource: Option<Resource>,
8633}
8634
8635#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8636#[serde(deny_unknown_fields)]
8637pub struct PrepareReplayableSourceIndexRequest {
8638 pub name: String,
8639 pub mapping: Mapping,
8640 #[serde(default, skip_serializing_if = "Option::is_none")]
8641 pub resource_spec: Option<IndexResourceSpec>,
8642 pub source: ReplayableSourceConfiguration,
8643}
8644
8645#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8646#[serde(deny_unknown_fields)]
8647pub struct PrepareReplayableSourceIndexResult {
8648 pub locator: Locator,
8649 pub expires_at: U64,
8650 pub semantic_digest: Digest,
8651 pub resource_spec: IndexResourceSpec,
8652}
8653
8654#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8655#[serde(deny_unknown_fields)]
8656pub struct SubmitReplayableSourceIndexRequest {
8657 pub locator: Locator,
8658 pub semantic_digest: Digest,
8659 pub name: String,
8660 pub mapping: Mapping,
8661 pub resource_spec: IndexResourceSpec,
8662 pub source: ReplayableSourceConfiguration,
8663}
8664
8665#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8666#[serde(deny_unknown_fields)]
8667pub struct SubmitReplayableSourceIndexResult {
8668 pub locator: Locator,
8669 pub state: String,
8670 pub mutation_outcome: MutationOutcome,
8671}
8672
8673#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8674#[serde(deny_unknown_fields)]
8675pub struct GetReplayableSourceRequest {
8676 pub index: Resource,
8677}
8678
8679#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8680#[serde(deny_unknown_fields)]
8681pub struct GetReplayableSourceResult {
8682 pub status: ReplayableSourceStatus,
8683}
8684
8685#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8686#[serde(deny_unknown_fields)]
8687pub struct ControlReplayableSourceRequest {
8688 pub index: Resource,
8689 pub expected_generation: U64,
8690 pub transition: SourceControlTransition,
8691}
8692
8693#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8694#[serde(deny_unknown_fields)]
8695pub struct ControlReplayableSourceResult {
8696 pub status: ReplayableSourceStatus,
8697 pub mutation_outcome: MutationOutcome,
8698}
8699
8700#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8701#[serde(deny_unknown_fields)]
8702pub struct CloneIndexRequest {
8703 pub source: Resource,
8704 pub destination_name: String,
8705 pub operation_id: Identity,
8706 pub source_cut_id: Identity,
8707}
8708
8709#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8710#[serde(deny_unknown_fields)]
8711pub struct CloneIndexResult {
8712 pub destination: Resource,
8713 pub source_cut_id: Identity,
8714 pub mutation_outcome: MutationOutcome,
8715}
8716
8717#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8718#[serde(deny_unknown_fields)]
8719pub struct ConfigureHistoryRequest {
8720 pub index: Resource,
8721 pub precondition: HistoryLedgerPrecondition,
8722 pub policy: HistoryRetentionPolicy,
8723}
8724
8725#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8726#[serde(deny_unknown_fields)]
8727pub struct ConfigureHistoryResult {
8728 pub status: HistoryStatus,
8729 pub mutation_outcome: MutationOutcome,
8730}
8731
8732#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8733#[serde(deny_unknown_fields)]
8734pub struct GetHistoryRequest {
8735 pub index: Resource,
8736}
8737
8738#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8739#[serde(deny_unknown_fields)]
8740pub struct GetHistoryResult {
8741 pub status: HistoryStatus,
8742}
8743
8744#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8745#[serde(deny_unknown_fields)]
8746pub struct ResolveHistoryRequest {
8747 pub index: Resource,
8748 pub selector: HistorySelector,
8749}
8750
8751#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8752#[serde(deny_unknown_fields)]
8753pub struct ResolveHistoryResult {
8754 pub resolution: HistoryResolution,
8755}
8756
8757#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8758#[serde(deny_unknown_fields)]
8759pub struct PlaceHistoryHoldRequest {
8760 pub index: Resource,
8761 pub expected_ledger_revision: U64,
8762 pub hold: HistoryHold,
8763}
8764
8765#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8766#[serde(deny_unknown_fields)]
8767pub struct PlaceHistoryHoldResult {
8768 pub status: HistoryStatus,
8769 pub mutation_outcome: MutationOutcome,
8770}
8771
8772#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8773#[serde(deny_unknown_fields)]
8774pub struct ReleaseHistoryHoldRequest {
8775 pub index: Resource,
8776 pub expected_ledger_revision: U64,
8777 pub hold_id: Identity,
8778}
8779
8780#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8781#[serde(deny_unknown_fields)]
8782pub struct ReleaseHistoryHoldResult {
8783 pub status: HistoryStatus,
8784 pub mutation_outcome: MutationOutcome,
8785}
8786
8787#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8788#[serde(deny_unknown_fields)]
8789pub struct PrepareDocumentMutationRequest {
8790 pub index: Resource,
8791 pub document_id: String,
8792 pub operation: String,
8793 #[serde(default, skip_serializing_if = "Option::is_none")]
8794 pub source: Option<RawJson>,
8795 #[serde(default, skip_serializing_if = "Option::is_none")]
8796 pub record: Option<NativeRecord>,
8797 #[serde(default, skip_serializing_if = "Option::is_none")]
8798 pub routing: Option<String>,
8799 #[serde(default, skip_serializing_if = "Option::is_none")]
8800 pub condition: Option<DocumentMutationCondition>,
8801 #[serde(default, skip_serializing_if = "Option::is_none")]
8802 pub pipeline: Option<IngestPipelineSelection>,
8803}
8804
8805#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8806#[serde(deny_unknown_fields)]
8807pub struct PrepareDocumentMutationResult {
8808 pub locator: Locator,
8809 pub semantic_digest: Digest,
8810 pub retention_max_entries: U64,
8811 pub retention_sequence_window: U64,
8812}
8813
8814#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8815#[serde(deny_unknown_fields)]
8816pub struct SubmitDocumentMutationRequest {
8817 pub locator: Locator,
8818 pub semantic_digest: Digest,
8819 pub index: Resource,
8820 pub document_id: String,
8821 pub operation: String,
8822 #[serde(default, skip_serializing_if = "Option::is_none")]
8823 pub source: Option<RawJson>,
8824 #[serde(default, skip_serializing_if = "Option::is_none")]
8825 pub record: Option<NativeRecord>,
8826 #[serde(default, skip_serializing_if = "Option::is_none")]
8827 pub routing: Option<String>,
8828 #[serde(default, skip_serializing_if = "Option::is_none")]
8829 pub condition: Option<DocumentMutationCondition>,
8830 #[serde(default, skip_serializing_if = "Option::is_none")]
8831 pub pipeline: Option<IngestPipelineSelection>,
8832}
8833
8834#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8835#[serde(deny_unknown_fields)]
8836pub struct SubmitDocumentMutationResult {
8837 pub locator: Locator,
8838 pub state: String,
8839 pub mutation_outcome: MutationOutcome,
8840 #[serde(default, skip_serializing_if = "Option::is_none")]
8841 pub achievement: Option<WriteAchievement>,
8842 #[serde(default, skip_serializing_if = "Option::is_none")]
8843 pub sequence: Option<U64>,
8844 #[serde(default, skip_serializing_if = "Option::is_none")]
8845 pub mapping_generation: Option<U64>,
8846 pub mapping_adopted: bool,
8847 #[serde(default, skip_serializing_if = "Option::is_none")]
8848 pub commit_receipt: Option<MutationCommitReceipt>,
8849}
8850
8851#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8852#[serde(deny_unknown_fields)]
8853pub struct PrepareDocumentBulkRequest {
8854 pub batch_id: Digest,
8855 pub index: Resource,
8856 pub items: Vec<BulkDocumentItem>,
8857}
8858
8859#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8860#[serde(deny_unknown_fields)]
8861pub struct PrepareDocumentBulkResult {
8862 pub outcome: BulkDocumentOutcome,
8863}
8864
8865#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8866#[serde(deny_unknown_fields)]
8867pub struct SubmitDocumentBulkRequest {
8868 pub batch_id: Digest,
8869 pub index: Resource,
8870 pub items: Vec<BulkDocumentItem>,
8871 pub preparations: Vec<BulkDocumentItemOutcome>,
8872}
8873
8874#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8875#[serde(deny_unknown_fields)]
8876pub struct SubmitDocumentBulkResult {
8877 pub outcome: BulkDocumentOutcome,
8878}
8879
8880#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8881#[serde(deny_unknown_fields)]
8882pub struct ResolveDocumentBulkRequest {
8883 pub batch_id: Digest,
8884 pub index: Resource,
8885 pub items: Vec<BulkDocumentItemOutcome>,
8886}
8887
8888#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8889#[serde(deny_unknown_fields)]
8890pub struct ResolveDocumentBulkResult {
8891 pub outcome: BulkDocumentOutcome,
8892}
8893
8894#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8895#[serde(deny_unknown_fields)]
8896pub struct PrepareAppendBulkRequest {
8897 pub batch_id: Digest,
8898 pub index: Resource,
8899 pub items: Vec<RetainedAppendItem>,
8900}
8901
8902#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8903#[serde(deny_unknown_fields)]
8904pub struct PrepareAppendBulkResult {
8905 pub outcome: RetainedAppendBulkOutcome,
8906}
8907
8908#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8909#[serde(deny_unknown_fields)]
8910pub struct SubmitAppendBulkRequest {
8911 pub batch_id: Digest,
8912 pub index: Resource,
8913 pub items: Vec<RetainedAppendItem>,
8914 pub preparations: Vec<RetainedAppendItemOutcome>,
8915}
8916
8917#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8918#[serde(deny_unknown_fields)]
8919pub struct SubmitAppendBulkResult {
8920 pub outcome: RetainedAppendBulkOutcome,
8921}
8922
8923#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8924#[serde(deny_unknown_fields)]
8925pub struct ResolveAppendBulkRequest {
8926 pub batch_id: Digest,
8927 pub index: Resource,
8928 pub items: Vec<RetainedAppendItemOutcome>,
8929}
8930
8931#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8932#[serde(deny_unknown_fields)]
8933pub struct ResolveAppendBulkResult {
8934 pub outcome: RetainedAppendBulkOutcome,
8935}
8936
8937#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8938#[serde(deny_unknown_fields)]
8939pub struct ObserveAppendCommittedRequest {
8940 pub index: Resource,
8941 pub locator: Locator,
8942}
8943
8944#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8945#[serde(deny_unknown_fields)]
8946pub struct ObserveAppendCommittedResult {
8947 pub outcome: RetainedAppendObservationOutcome,
8948}
8949
8950#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8951#[serde(deny_unknown_fields)]
8952pub struct ResolveDocumentMutationRequest {
8953 pub locator: Locator,
8954}
8955
8956#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8957#[serde(deny_unknown_fields)]
8958pub struct ResolveDocumentMutationResult {
8959 pub locator: Locator,
8960 pub state: String,
8961 #[serde(default, skip_serializing_if = "Option::is_none")]
8962 pub sequence: Option<U64>,
8963 #[serde(default, skip_serializing_if = "Option::is_none")]
8964 pub mapping_generation: Option<U64>,
8965 pub mapping_adopted: bool,
8966 #[serde(default, skip_serializing_if = "Option::is_none")]
8967 pub source: Option<RawJson>,
8968 #[serde(default, skip_serializing_if = "Option::is_none")]
8969 pub commit_receipt: Option<MutationCommitReceipt>,
8970}
8971
8972#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8973#[serde(deny_unknown_fields)]
8974pub struct GetDocumentRequest {
8975 pub index: Resource,
8976 pub document_id: String,
8977 #[serde(default, skip_serializing_if = "Option::is_none")]
8978 pub routing: Option<String>,
8979}
8980
8981#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8982#[serde(deny_unknown_fields)]
8983pub struct GetDocumentResult {
8984 pub found: bool,
8985 #[serde(default, skip_serializing_if = "Option::is_none")]
8986 pub source: Option<RawJson>,
8987 #[serde(default, skip_serializing_if = "Option::is_none")]
8988 pub sequence: Option<U64>,
8989 #[serde(default, skip_serializing_if = "Option::is_none")]
8990 pub primary_term: Option<U64>,
8991}
8992
8993#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8994#[serde(deny_unknown_fields)]
8995pub struct SearchRequest {
8996 #[serde(default, skip_serializing_if = "Option::is_none")]
8997 pub indexes: Option<Vec<Resource>>,
8998 #[serde(default, skip_serializing_if = "Option::is_none")]
8999 pub query: Option<Query>,
9000 #[serde(default, skip_serializing_if = "Option::is_none")]
9001 pub retrieval: Option<RetrievalPlan>,
9002 #[serde(default, skip_serializing_if = "Option::is_none")]
9003 pub aggregations: Option<Vec<Aggregation>>,
9004 pub sort: Vec<SortSpec>,
9005 #[serde(default, skip_serializing_if = "Option::is_none")]
9006 pub routing: Option<Vec<String>>,
9007 pub freshness: SearchFreshness,
9008 pub page_size: u32,
9009 #[serde(default, skip_serializing_if = "Option::is_none")]
9010 pub cursor: Option<Cursor>,
9011 #[serde(default, skip_serializing_if = "Option::is_none")]
9012 pub pit: Option<Cursor>,
9013 pub allow_partial: bool,
9014 #[serde(default, skip_serializing_if = "Option::is_none")]
9015 pub total_hits_threshold: Option<U64>,
9016 pub diagnostics: bool,
9017 #[serde(default, skip_serializing_if = "Option::is_none")]
9018 pub fragments: Option<FragmentRequest>,
9019 #[serde(default, skip_serializing_if = "Option::is_none")]
9020 pub features: Option<ResultFeatureRequest>,
9021 #[serde(default, skip_serializing_if = "Option::is_none")]
9022 pub diversification: Option<ResultDiversification>,
9023 #[serde(default, skip_serializing_if = "Option::is_none")]
9024 pub source_projection: Option<SourceProjection>,
9025}
9026
9027#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9028#[serde(deny_unknown_fields)]
9029pub struct SearchResult {
9030 pub hits: Vec<SearchHit>,
9031 pub aggregations: Vec<AggregationResult>,
9032 #[serde(default, skip_serializing_if = "Option::is_none")]
9033 pub next_cursor: Option<Cursor>,
9034 pub timed_out: bool,
9035 pub partial: bool,
9036 pub achieved: SearchAchievement,
9037 pub shards: ShardCounts,
9038 pub total: SearchTotal,
9039 pub failures: Vec<SearchPartialFailure>,
9040 pub vector_diagnostics: Vec<VectorBranchDiagnostics>,
9041 #[serde(default, skip_serializing_if = "Option::is_none")]
9042 pub read_cut: Option<ReadCutEvidence>,
9043}
9044
9045#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9046#[serde(deny_unknown_fields)]
9047pub struct TraverseRelationshipsRequest {
9048 pub pit: Cursor,
9049 pub indexes: Vec<Resource>,
9050 pub seeds: Vec<EntityRef>,
9051 pub direction: RelationshipTraversalDirection,
9052 pub filter: RelationshipTraversalFilter,
9053 pub budget: RelationshipTraversalBudget,
9054 pub allow_partial: bool,
9055}
9056
9057#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9058#[serde(deny_unknown_fields)]
9059pub struct TraverseRelationshipsResult {
9060 pub relationships: Vec<TraversedRelationship>,
9061 pub visited_entities: Vec<EntityRef>,
9062 pub input_cut_digest: Digest,
9063 pub partial: bool,
9064 pub incomplete_frontier: Vec<EntityRef>,
9065 pub failures: Vec<SearchPartialFailure>,
9066}
9067
9068#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9069#[serde(deny_unknown_fields)]
9070pub struct QueryProfilesRequest {
9071 pub pit: Cursor,
9072 pub indexes: Vec<Resource>,
9073 pub operation: ProfileQueryOperation,
9074 pub start_unix_nanos: U64,
9075 pub end_unix_nanos: U64,
9076 pub sample_type: String,
9077 pub unit: String,
9078 pub filter: ProfileQueryFilter,
9079 #[serde(default, skip_serializing_if = "Option::is_none")]
9080 pub group_by: Option<ProfileGroupBy>,
9081 pub budget: ProfileQueryBudget,
9082 pub allow_partial: bool,
9083}
9084
9085#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9086#[serde(deny_unknown_fields)]
9087pub struct QueryProfilesResult {
9088 pub rows: Vec<ProfileQueryRow>,
9089 pub evaluated_batches: u32,
9090 pub evaluated_samples: u32,
9091 pub input_cut_digest: Digest,
9092 pub partial: bool,
9093 pub approximate: bool,
9094 pub failures: Vec<SearchPartialFailure>,
9095}
9096
9097#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9098#[serde(deny_unknown_fields)]
9099pub struct EvaluateTemporalEvidenceRequest {
9100 pub pit: Cursor,
9101 pub definition: HistoricalTemporalDefinition,
9102}
9103
9104#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9105#[serde(deny_unknown_fields)]
9106pub struct EvaluateTemporalEvidenceResult {
9107 pub evidence: Vec<TemporalEvidence>,
9108 pub input_cut_digest: Digest,
9109 pub pattern_digest: Digest,
9110 pub evaluated_events: u32,
9111}
9112
9113#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9114#[serde(deny_unknown_fields)]
9115pub struct CreateContinuousTemporalEvaluationRequest {
9116 pub action_id: Digest,
9117 pub definition: ContinuousTemporalDefinition,
9118}
9119
9120#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9121#[serde(deny_unknown_fields)]
9122pub struct CreateContinuousTemporalEvaluationResult {
9123 pub evaluation: ContinuousTemporalEvaluation,
9124 pub mutation_outcome: MutationOutcome,
9125}
9126
9127#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9128#[serde(deny_unknown_fields)]
9129pub struct GetContinuousTemporalEvaluationRequest {
9130 pub evaluation_id: Identity,
9131}
9132
9133#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9134#[serde(deny_unknown_fields)]
9135pub struct GetContinuousTemporalEvaluationResult {
9136 pub evaluation: ContinuousTemporalEvaluation,
9137}
9138
9139#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9140#[serde(deny_unknown_fields)]
9141pub struct PauseContinuousTemporalEvaluationRequest {
9142 pub action_id: Digest,
9143 pub evaluation_id: Identity,
9144 pub expected_revision: U64,
9145}
9146
9147#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9148#[serde(deny_unknown_fields)]
9149pub struct PauseContinuousTemporalEvaluationResult {
9150 pub evaluation: ContinuousTemporalEvaluation,
9151 pub mutation_outcome: MutationOutcome,
9152}
9153
9154#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9155#[serde(deny_unknown_fields)]
9156pub struct ResumeContinuousTemporalEvaluationRequest {
9157 pub action_id: Digest,
9158 pub evaluation_id: Identity,
9159 pub expected_revision: U64,
9160}
9161
9162#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9163#[serde(deny_unknown_fields)]
9164pub struct ResumeContinuousTemporalEvaluationResult {
9165 pub evaluation: ContinuousTemporalEvaluation,
9166 pub mutation_outcome: MutationOutcome,
9167}
9168
9169#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9170#[serde(deny_unknown_fields)]
9171pub struct ReplaceContinuousTemporalEvaluationRequest {
9172 pub action_id: Digest,
9173 pub expected_revision: U64,
9174 pub definition: ContinuousTemporalDefinition,
9175}
9176
9177#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9178#[serde(deny_unknown_fields)]
9179pub struct ReplaceContinuousTemporalEvaluationResult {
9180 pub evaluation: ContinuousTemporalEvaluation,
9181 pub mutation_outcome: MutationOutcome,
9182}
9183
9184#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9185#[serde(deny_unknown_fields)]
9186pub struct RetireContinuousTemporalEvaluationRequest {
9187 pub action_id: Digest,
9188 pub evaluation_id: Identity,
9189 pub expected_revision: U64,
9190}
9191
9192#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9193#[serde(deny_unknown_fields)]
9194pub struct RetireContinuousTemporalEvaluationResult {
9195 #[serde(default, skip_serializing_if = "Option::is_none")]
9196 pub evaluation: Option<ContinuousTemporalEvaluation>,
9197 pub mutation_outcome: MutationOutcome,
9198}
9199
9200#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9201#[serde(deny_unknown_fields)]
9202pub struct ReadContinuousTemporalEvidenceRequest {
9203 pub evaluation_id: Identity,
9204 pub expected_revision: U64,
9205 pub minimum_event_time_unix_nanos: U64,
9206 pub page_size: u32,
9207 #[serde(default, skip_serializing_if = "Option::is_none")]
9208 pub cursor: Option<Cursor>,
9209}
9210
9211#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9212#[serde(deny_unknown_fields)]
9213pub struct ReadContinuousTemporalEvidenceResult {
9214 pub evidence: Vec<TemporalEvidence>,
9215 #[serde(default, skip_serializing_if = "Option::is_none")]
9216 pub next_cursor: Option<Cursor>,
9217 pub retained_floor_unix_nanos: U64,
9218 pub evaluation_revision: U64,
9219}
9220
9221#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9222#[serde(deny_unknown_fields)]
9223pub struct ValidateSearchRequest {
9224 pub indexes: Vec<Resource>,
9225 #[serde(default, skip_serializing_if = "Option::is_none")]
9226 pub query: Option<Query>,
9227 #[serde(default, skip_serializing_if = "Option::is_none")]
9228 pub retrieval: Option<RetrievalPlan>,
9229 #[serde(default, skip_serializing_if = "Option::is_none")]
9230 pub aggregations: Option<Vec<Aggregation>>,
9231 pub sort: Vec<SortSpec>,
9232 #[serde(default, skip_serializing_if = "Option::is_none")]
9233 pub routing: Option<Vec<String>>,
9234 pub freshness: SearchFreshness,
9235 pub page_size: u32,
9236 pub allow_partial: bool,
9237 #[serde(default, skip_serializing_if = "Option::is_none")]
9238 pub total_hits_threshold: Option<U64>,
9239 #[serde(default, skip_serializing_if = "Option::is_none")]
9240 pub fragments: Option<FragmentRequest>,
9241 #[serde(default, skip_serializing_if = "Option::is_none")]
9242 pub features: Option<ResultFeatureRequest>,
9243 #[serde(default, skip_serializing_if = "Option::is_none")]
9244 pub diversification: Option<ResultDiversification>,
9245 #[serde(default, skip_serializing_if = "Option::is_none")]
9246 pub source_projection: Option<SourceProjection>,
9247}
9248
9249#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9250#[serde(deny_unknown_fields)]
9251pub struct ValidateSearchResult {
9252 pub catalog_revision: U64,
9253 pub resolved_indexes: Vec<Resource>,
9254 pub authorized: bool,
9255 pub capabilities: Vec<String>,
9256 pub shape_digest: Digest,
9257 pub warnings: Vec<String>,
9258 pub refusals: Vec<String>,
9259 pub limits: Vec<SearchValidationLimit>,
9260 pub estimates: SearchValidationEstimates,
9261}
9262
9263#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9264#[serde(deny_unknown_fields)]
9265pub struct OpenPitRequest {
9266 pub indexes: Vec<Resource>,
9267 pub keep_alive_millis: U64,
9268}
9269
9270#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9271#[serde(deny_unknown_fields)]
9272pub struct OpenPitResult {
9273 pub pit: Cursor,
9274 pub expires_at: U64,
9275 pub shard_count: u32,
9276 pub read_cut: ReadCutEvidence,
9277}
9278
9279#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9280#[serde(deny_unknown_fields)]
9281pub struct RenewPitRequest {
9282 pub pit: Cursor,
9283 pub keep_alive_millis: U64,
9284}
9285
9286#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9287#[serde(deny_unknown_fields)]
9288pub struct RenewPitResult {
9289 pub pit: Cursor,
9290 pub expires_at: U64,
9291 pub shard_count: u32,
9292 pub read_cut: ReadCutEvidence,
9293}
9294
9295#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9296#[serde(deny_unknown_fields)]
9297pub struct ClosePitRequest {
9298 pub pit: Cursor,
9299}
9300
9301#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9302#[serde(deny_unknown_fields)]
9303pub struct ClosePitResult {
9304 pub removed: bool,
9305}
9306
9307#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9308#[serde(deny_unknown_fields)]
9309pub struct ListOperationsRequest {
9310 pub page_size: u32,
9311 #[serde(default, skip_serializing_if = "Option::is_none")]
9312 pub cursor: Option<Cursor>,
9313}
9314
9315#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9316#[serde(deny_unknown_fields)]
9317pub struct ListOperationsResult {
9318 pub items: Vec<Operation>,
9319 #[serde(default, skip_serializing_if = "Option::is_none")]
9320 pub next_cursor: Option<Cursor>,
9321}
9322
9323#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9324#[serde(deny_unknown_fields)]
9325pub struct GetOperationRequest {
9326 pub locator: Locator,
9327}
9328
9329#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9330#[serde(deny_unknown_fields)]
9331pub struct GetOperationResult {
9332 pub operation: Operation,
9333}
9334
9335#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9336#[serde(deny_unknown_fields)]
9337pub struct WaitOperationRequest {
9338 pub locator: Locator,
9339 pub after_authority_revision: U64,
9340 pub maximum_attempts: u32,
9341 pub interval_millis: U64,
9342}
9343
9344#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9345#[serde(deny_unknown_fields)]
9346pub struct WaitOperationResult {
9347 pub operation: Operation,
9348 pub attempts: u32,
9349}
9350
9351#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9352#[serde(deny_unknown_fields)]
9353pub struct CancelOperationRequest {
9354 pub locator: Locator,
9355 pub expected_authority_revision: U64,
9356 pub cancel_action: Identity,
9357}
9358
9359#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9360#[serde(deny_unknown_fields)]
9361pub struct CancelOperationResult {
9362 pub locator: Locator,
9363 pub cancel_generation: U64,
9364 pub mutation_outcome: MutationOutcome,
9365}
9366
9367#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9368#[serde(deny_unknown_fields)]
9369pub struct ListAuditEventsRequest {
9370 pub start_time: U64,
9371 pub end_time: U64,
9372 pub actions: Vec<String>,
9373 pub page_size: u32,
9374 #[serde(default, skip_serializing_if = "Option::is_none")]
9375 pub cursor: Option<Cursor>,
9376}
9377
9378#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9379#[serde(deny_unknown_fields)]
9380pub struct ListAuditEventsResult {
9381 pub stream: AuditStreamState,
9382 pub events: Vec<AuditEvent>,
9383 #[serde(default, skip_serializing_if = "Option::is_none")]
9384 pub next_cursor: Option<Cursor>,
9385 pub gaps: Vec<AuditGap>,
9386 pub object_reads: u32,
9387}
9388
9389#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9390#[serde(deny_unknown_fields)]
9391pub struct ExportAuditEventsRequest {
9392 pub start_time: U64,
9393 pub end_time: U64,
9394 pub actions: Vec<String>,
9395 pub page_size: u32,
9396 #[serde(default, skip_serializing_if = "Option::is_none")]
9397 pub cursor: Option<Cursor>,
9398}
9399
9400#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9401#[serde(deny_unknown_fields)]
9402pub struct ExportAuditEventsResult {
9403 pub stream: AuditStreamState,
9404 pub events: Vec<AuditEvent>,
9405 #[serde(default, skip_serializing_if = "Option::is_none")]
9406 pub next_cursor: Option<Cursor>,
9407 pub gaps: Vec<AuditGap>,
9408 pub object_reads: u32,
9409}
9410
9411#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9412#[serde(deny_unknown_fields)]
9413pub struct ReserveServiceCredentialRequest {
9414 pub reservation_action_id: Digest,
9415 pub activation_action_id: Digest,
9416 pub role_grants: Vec<ServiceCredentialGrant>,
9417 pub credential_expires_at: U64,
9418 pub reservation_expires_at: U64,
9419}
9420
9421#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9422#[serde(deny_unknown_fields)]
9423pub struct ReserveServiceCredentialResult {
9424 pub reservation: ServiceCredentialReservation,
9425}
9426
9427#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9428#[serde(deny_unknown_fields)]
9429pub struct ReserveServiceCredentialRotationRequest {
9430 pub reservation_action_id: Digest,
9431 pub activation_action_id: Digest,
9432 pub current_api_key_id: Identity,
9433 pub expected_generation: U64,
9434 pub credential_expires_at: U64,
9435 pub overlap_until: U64,
9436 pub reservation_expires_at: U64,
9437}
9438
9439#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9440#[serde(deny_unknown_fields)]
9441pub struct ReserveServiceCredentialRotationResult {
9442 pub reservation: ServiceCredentialReservation,
9443}
9444
9445#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9446#[serde(deny_unknown_fields)]
9447pub struct ActivateServiceCredentialRequest {
9448 pub reservation: ServiceCredentialReservation,
9449 pub verifier: Digest,
9450}
9451
9452#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9453#[serde(deny_unknown_fields)]
9454pub struct ActivateServiceCredentialResult {
9455 pub locator: Locator,
9456 pub outcome: SecurityActionOutcome,
9457 pub secret_escrowed: bool,
9458}
9459
9460#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9461#[serde(deny_unknown_fields)]
9462pub struct ResolveServiceCredentialReservationRequest {
9463 pub reservation_action_id: Digest,
9464}
9465
9466#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9467#[serde(deny_unknown_fields)]
9468pub struct ResolveServiceCredentialReservationResult {
9469 pub state: String,
9470 #[serde(default, skip_serializing_if = "Option::is_none")]
9471 pub reservation: Option<ServiceCredentialReservation>,
9472 #[serde(default, skip_serializing_if = "Option::is_none")]
9473 pub outcome: Option<SecurityActionOutcome>,
9474}
9475
9476#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9477#[serde(deny_unknown_fields)]
9478pub struct PrepareRevokeServiceCredentialRequest {
9479 pub api_key_id: Identity,
9480 pub expected_generation: U64,
9481}
9482
9483#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9484#[serde(deny_unknown_fields)]
9485pub struct PrepareRevokeServiceCredentialResult {
9486 pub locator: Locator,
9487 pub semantic_digest: Digest,
9488 pub expires_at: U64,
9489}
9490
9491#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9492#[serde(deny_unknown_fields)]
9493pub struct RevokeServiceCredentialRequest {
9494 pub locator: Locator,
9495 pub api_key_id: Identity,
9496 pub expected_generation: U64,
9497}
9498
9499#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9500#[serde(deny_unknown_fields)]
9501pub struct RevokeServiceCredentialResult {
9502 pub locator: Locator,
9503 pub principal_id: Identity,
9504 pub api_key_id: Identity,
9505 pub state: String,
9506}
9507
9508#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9509#[serde(deny_unknown_fields)]
9510pub struct ResolveSecurityActionRequest {
9511 pub locator: Locator,
9512}
9513
9514#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9515#[serde(deny_unknown_fields)]
9516pub struct ResolveSecurityActionResult {
9517 pub locator: Locator,
9518 pub state: String,
9519 #[serde(default, skip_serializing_if = "Option::is_none")]
9520 pub result: Option<SecurityActionOutcome>,
9521 pub secret_escrowed: bool,
9522}
9523
9524#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9525#[serde(deny_unknown_fields)]
9526pub struct GetSecurityRoleRequest {
9527 pub role_name: String,
9528}
9529
9530#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9531#[serde(deny_unknown_fields)]
9532pub struct GetSecurityRoleResult {
9533 pub role: SecurityRole,
9534}
9535
9536#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9537#[serde(deny_unknown_fields)]
9538pub struct PrepareRoleAppendAccessChangeRequest {
9539 pub role_name: String,
9540 pub expected_role_version: U64,
9541 pub changes: Vec<RoleAppendScopeChange>,
9542}
9543
9544#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9545#[serde(deny_unknown_fields)]
9546pub struct PrepareRoleAppendAccessChangeResult {
9547 pub preparation: RoleAppendAccessPreparation,
9548}
9549
9550#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9551#[serde(deny_unknown_fields)]
9552pub struct SubmitRoleAppendAccessChangeRequest {
9553 pub locator: Locator,
9554 pub semantic_digest: Digest,
9555 pub role_name: String,
9556 pub expected_role_version: U64,
9557 pub changes: Vec<RoleAppendScopeChange>,
9558}
9559
9560#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9561#[serde(deny_unknown_fields)]
9562pub struct SubmitRoleAppendAccessChangeResult {
9563 pub locator: Locator,
9564 pub state: String,
9565 pub target_policy_revision: U64,
9566 pub role: SecurityRole,
9567}
9568
9569#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9570#[serde(deny_unknown_fields)]
9571pub struct ListServiceCredentialsRequest {
9572 pub page_size: u32,
9573 #[serde(default, skip_serializing_if = "Option::is_none")]
9574 pub cursor: Option<Cursor>,
9575}
9576
9577#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9578#[serde(deny_unknown_fields)]
9579pub struct ListServiceCredentialsResult {
9580 pub items: Vec<ServiceCredentialSummary>,
9581 #[serde(default, skip_serializing_if = "Option::is_none")]
9582 pub next_cursor: Option<Cursor>,
9583}
9584
9585#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9586#[serde(deny_unknown_fields)]
9587pub struct GetRuntimeStatusRequest {}
9588
9589#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9590#[serde(deny_unknown_fields)]
9591pub struct GetRuntimeStatusResult {
9592 pub ready: bool,
9593 pub recovery_era: Identity,
9594 pub catalog_revision: U64,
9595 pub policy_revision: U64,
9596 pub redacted: RuntimeStatusDetail,
9597}
9598
9599#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9600#[serde(deny_unknown_fields)]
9601pub struct GetResultCacheStatusRequest {}
9602
9603#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9604#[serde(deny_unknown_fields)]
9605pub struct GetResultCacheStatusResult {
9606 pub status: ResultCacheStatus,
9607}
9608
9609#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9610#[serde(deny_unknown_fields)]
9611pub struct GetFieldPromotionStatusRequest {
9612 pub index: Resource,
9613}
9614
9615#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9616#[serde(deny_unknown_fields)]
9617pub struct GetFieldPromotionStatusResult {
9618 pub status: FieldPromotionStatus,
9619}
9620
9621#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9622#[serde(deny_unknown_fields)]
9623pub struct GetOverloadStatusRequest {
9624 pub index: Resource,
9625}
9626
9627#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9628#[serde(deny_unknown_fields)]
9629pub struct GetOverloadStatusResult {
9630 pub runtime_observed: bool,
9631 pub shards: Vec<OverloadShardStatus>,
9632}
9633
9634#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9635#[serde(deny_unknown_fields)]
9636pub struct ConfigureExternalKeyRequest {
9637 pub index: Resource,
9638 pub expected_authority_revision: U64,
9639 pub binding: ExternalKeyBinding,
9640}
9641
9642#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9643#[serde(deny_unknown_fields)]
9644pub struct ConfigureExternalKeyResult {
9645 pub status: LifecycleStatus,
9646 pub mutation_outcome: MutationOutcome,
9647}
9648
9649#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9650#[serde(deny_unknown_fields)]
9651pub struct RotateExternalKeyBindingRequest {
9652 pub index: Resource,
9653 pub expected_authority_revision: U64,
9654 pub predecessor_binding_id: Identity,
9655 pub binding: ExternalKeyBinding,
9656}
9657
9658#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9659#[serde(deny_unknown_fields)]
9660pub struct RotateExternalKeyBindingResult {
9661 pub status: LifecycleStatus,
9662 pub mutation_outcome: MutationOutcome,
9663}
9664
9665#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9666#[serde(deny_unknown_fields)]
9667pub struct ConfigureAggregateThenDeleteRequest {
9668 pub index: Resource,
9669 pub expected_authority_revision: U64,
9670 pub policy: AggregateThenDeletePolicy,
9671}
9672
9673#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9674#[serde(deny_unknown_fields)]
9675pub struct ConfigureAggregateThenDeleteResult {
9676 pub status: LifecycleStatus,
9677 pub mutation_outcome: MutationOutcome,
9678}
9679
9680#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9681#[serde(deny_unknown_fields)]
9682pub struct GetLifecycleStatusRequest {
9683 pub index: Resource,
9684}
9685
9686#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9687#[serde(deny_unknown_fields)]
9688pub struct GetLifecycleStatusResult {
9689 pub status: LifecycleStatus,
9690}
9691
9692#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9693#[serde(deny_unknown_fields)]
9694pub struct GetQuotaRequest {}
9695
9696#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9697#[serde(deny_unknown_fields)]
9698pub struct GetQuotaResult {
9699 pub revision: U64,
9700 pub limits: Vec<QuotaLimit>,
9701 pub usage: Vec<QuotaConsumption>,
9702}
9703
9704#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9705#[serde(deny_unknown_fields)]
9706pub struct UpdateQuotaRequest {
9707 pub expected_revision: U64,
9708 pub limits: Vec<QuotaLimit>,
9709}
9710
9711#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9712#[serde(deny_unknown_fields)]
9713pub struct UpdateQuotaResult {
9714 pub update: QuotaUpdate,
9715}
9716
9717#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9718#[serde(deny_unknown_fields)]
9719pub struct GetBindingRequest {}
9720
9721#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9722#[serde(deny_unknown_fields)]
9723pub struct GetBindingResult {
9724 pub binding: CoreBinding,
9725 pub derived: bool,
9726 pub revision: U64,
9727}
9728
9729#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9730#[serde(deny_unknown_fields)]
9731pub struct GetAdmissionStatusRequest {}
9732
9733#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9734#[serde(deny_unknown_fields)]
9735pub struct GetAdmissionStatusResult {
9736 pub state: String,
9737 pub revision: U64,
9738 pub converged: bool,
9739}
9740
9741#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9742#[serde(deny_unknown_fields)]
9743pub struct SetAdmissionRequest {
9744 pub expected_revision: U64,
9745 pub state: String,
9746}
9747
9748#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9749#[serde(deny_unknown_fields)]
9750pub struct SetAdmissionResult {
9751 pub state: String,
9752 pub revision: U64,
9753 pub converged: bool,
9754}
9755
9756#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9757#[serde(deny_unknown_fields)]
9758pub struct GetQuiesceStatusRequest {}
9759
9760#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9761#[serde(deny_unknown_fields)]
9762pub struct GetQuiesceStatusResult {
9763 pub ready: bool,
9764 pub blockers: Vec<String>,
9765 pub observations: Vec<ReadinessObservation>,
9766 pub recovery_era: Identity,
9767 pub observed_at: U64,
9768 pub expires_at: U64,
9769}
9770
9771#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9772#[serde(deny_unknown_fields)]
9773pub struct GetDecommissionReadinessRequest {}
9774
9775#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9776#[serde(deny_unknown_fields)]
9777pub struct GetDecommissionReadinessResult {
9778 pub ready: bool,
9779 pub blockers: Vec<String>,
9780 pub observations: Vec<ReadinessObservation>,
9781 pub recovery_era: Identity,
9782 pub observed_at: U64,
9783 pub expires_at: U64,
9784}
9785
9786#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9787#[serde(deny_unknown_fields)]
9788pub struct GetUpgradeReadinessRequest {}
9789
9790#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9791#[serde(deny_unknown_fields)]
9792pub struct GetUpgradeReadinessResult {
9793 pub ready: bool,
9794 pub blockers: Vec<String>,
9795 pub observations: Vec<ReadinessObservation>,
9796 pub recovery_era: Identity,
9797 pub observed_at: U64,
9798 pub expires_at: U64,
9799}
9800
9801#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9802#[serde(deny_unknown_fields)]
9803pub struct GetMaintenanceStatusRequest {
9804 pub page_size: u32,
9805 #[serde(default, skip_serializing_if = "Option::is_none")]
9806 pub cursor: Option<Cursor>,
9807 #[serde(default, skip_serializing_if = "Option::is_none")]
9808 pub index: Option<Resource>,
9809}
9810
9811#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9812#[serde(deny_unknown_fields)]
9813pub struct GetMaintenanceStatusResult {
9814 pub aggregate: MaintenanceStatusAggregate,
9815 pub items: Vec<MaintenanceTaskStatus>,
9816 #[serde(default, skip_serializing_if = "Option::is_none")]
9817 pub next_cursor: Option<Cursor>,
9818}
9819
9820#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9821#[serde(deny_unknown_fields)]
9822pub struct WarmVectorIndexRequest {
9823 pub index: Resource,
9824 #[serde(default, skip_serializing_if = "Option::is_none")]
9825 pub expected_root_digest: Option<Digest>,
9826 pub components: Vec<VectorWarmComponent>,
9827 pub maximum_requests: u32,
9828 pub maximum_bytes: U64,
9829 pub maximum_achievements: u32,
9830 pub expires_at: U64,
9831}
9832
9833#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9834#[serde(deny_unknown_fields)]
9835pub struct WarmVectorIndexResult {
9836 pub result: VectorWarmResult,
9837}
9838
9839#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9840#[serde(deny_unknown_fields)]
9841pub struct EvaluateVectorRecallRequest {
9842 pub action_id: Digest,
9843 pub index: Resource,
9844 pub field: String,
9845 pub mapping_generation: U64,
9846 pub snapshot: VectorEvaluationSnapshot,
9847 pub query_set: VectorEvaluationQuerySet,
9848 #[serde(default, skip_serializing_if = "Option::is_none")]
9849 pub filter: Option<Query>,
9850 pub metric: VectorMetric,
9851 pub k: u32,
9852 pub candidate_policy: VectorCandidatePolicy,
9853 pub budget: VectorEvaluationBudget,
9854 pub maximum_bytes: U64,
9855}
9856
9857#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9858#[serde(deny_unknown_fields)]
9859pub struct EvaluateVectorRecallResult {
9860 pub operation: Operation,
9861}
9862
9863#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9864#[serde(deny_unknown_fields)]
9865pub struct CalibrateVectorStrategyRequest {
9866 pub action_id: Digest,
9867 pub index: Resource,
9868 pub field: String,
9869 pub mapping_generation: U64,
9870 pub snapshot: VectorEvaluationSnapshot,
9871 pub query_set: VectorEvaluationQuerySet,
9872 #[serde(default, skip_serializing_if = "Option::is_none")]
9873 pub filter: Option<Query>,
9874 pub metric: VectorMetric,
9875 pub k: u32,
9876 pub objective: VectorCalibrationObjective,
9877 pub minimum_recall_basis_points: u32,
9878 pub budget: VectorEvaluationBudget,
9879 pub maximum_bytes: U64,
9880}
9881
9882#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9883#[serde(deny_unknown_fields)]
9884pub struct CalibrateVectorStrategyResult {
9885 pub operation: Operation,
9886}
9887
9888#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9889#[serde(deny_unknown_fields)]
9890pub struct GetVectorDiagnosticRequest {
9891 pub locator: Locator,
9892}
9893
9894#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9895#[serde(deny_unknown_fields)]
9896pub struct GetVectorDiagnosticResult {
9897 pub operation: Operation,
9898 pub artifacts: Vec<Artifact>,
9899 #[serde(default, skip_serializing_if = "Option::is_none")]
9900 pub result: Option<VectorDiagnosticResult>,
9901}
9902
9903#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9904#[serde(deny_unknown_fields)]
9905pub struct CreateDiagnosticRequest {
9906 pub scope: String,
9907 pub maximum_bytes: U64,
9908}
9909
9910#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9911#[serde(deny_unknown_fields)]
9912pub struct CreateDiagnosticResult {
9913 pub operation: Operation,
9914}
9915
9916#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9917#[serde(deny_unknown_fields)]
9918pub struct GetDiagnosticRequest {
9919 pub locator: Locator,
9920}
9921
9922#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9923#[serde(deny_unknown_fields)]
9924pub struct GetDiagnosticResult {
9925 pub operation: Operation,
9926 pub artifacts: Vec<Artifact>,
9927}
9928
9929#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9930#[serde(deny_unknown_fields)]
9931pub struct PrepareCollectionExportRequest {
9932 pub action_id: Digest,
9933 pub storage: PortabilityStorageCapability,
9934}
9935
9936#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9937#[serde(deny_unknown_fields)]
9938pub struct PrepareCollectionExportResult {
9939 pub semantic_digest: Digest,
9940 pub maximum_bytes: U64,
9941}
9942
9943#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9944#[serde(deny_unknown_fields)]
9945pub struct StartCollectionExportRequest {
9946 pub action_id: Digest,
9947 pub semantic_digest: Digest,
9948 pub storage: PortabilityStorageCapability,
9949}
9950
9951#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9952#[serde(deny_unknown_fields)]
9953pub struct StartCollectionExportResult {
9954 pub operation: Operation,
9955}
9956
9957#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9958#[serde(deny_unknown_fields)]
9959pub struct ResolveCollectionExportRequest {
9960 pub action_id: Digest,
9961 pub semantic_digest: Digest,
9962 pub storage: PortabilityStorageCapability,
9963}
9964
9965#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9966#[serde(deny_unknown_fields)]
9967pub struct ResolveCollectionExportResult {
9968 #[serde(default, skip_serializing_if = "Option::is_none")]
9969 pub operation: Option<Operation>,
9970 #[serde(default, skip_serializing_if = "Option::is_none")]
9971 pub artifact: Option<CollectionExportArtifact>,
9972 pub expired_unknown: bool,
9973}
9974
9975#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9976#[serde(deny_unknown_fields)]
9977pub struct VerifyCollectionExportRequest {
9978 pub artifact: CollectionExportArtifact,
9979 pub storage: PortabilityStorageCapability,
9980}
9981
9982#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9983#[serde(deny_unknown_fields)]
9984pub struct VerifyCollectionExportResult {
9985 pub verified: bool,
9986 pub source_collection_id: Identity,
9987 pub source_catalog_revision: U64,
9988 pub index_count: u32,
9989 pub document_count: U64,
9990}
9991
9992#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9993#[serde(deny_unknown_fields)]
9994pub struct PrepareCollectionExportRetirementRequest {
9995 pub action_id: Digest,
9996 pub artifact: CollectionExportArtifact,
9997 pub storage: PortabilityStorageCapability,
9998}
9999
10000#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10001#[serde(deny_unknown_fields)]
10002pub struct PrepareCollectionExportRetirementResult {
10003 pub semantic_digest: Digest,
10004 pub maximum_bytes: U64,
10005}
10006
10007#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10008#[serde(deny_unknown_fields)]
10009pub struct StartCollectionExportRetirementRequest {
10010 pub action_id: Digest,
10011 pub semantic_digest: Digest,
10012 pub artifact: CollectionExportArtifact,
10013 pub storage: PortabilityStorageCapability,
10014}
10015
10016#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10017#[serde(deny_unknown_fields)]
10018pub struct StartCollectionExportRetirementResult {
10019 pub operation: Operation,
10020}
10021
10022#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10023#[serde(deny_unknown_fields)]
10024pub struct ResolveCollectionExportRetirementRequest {
10025 pub action_id: Digest,
10026 pub semantic_digest: Digest,
10027 pub artifact: CollectionExportArtifact,
10028 pub storage: PortabilityStorageCapability,
10029}
10030
10031#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10032#[serde(deny_unknown_fields)]
10033pub struct ResolveCollectionExportRetirementResult {
10034 #[serde(default, skip_serializing_if = "Option::is_none")]
10035 pub operation: Option<Operation>,
10036 #[serde(default, skip_serializing_if = "Option::is_none")]
10037 pub retirement: Option<CollectionExportRetirement>,
10038 pub expired_unknown: bool,
10039}
10040
10041#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10042#[serde(deny_unknown_fields)]
10043pub struct PrepareCollectionRestoreRequest {
10044 pub action_id: Digest,
10045 pub artifact: CollectionExportArtifact,
10046 pub storage: PortabilityStorageCapability,
10047}
10048
10049#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10050#[serde(deny_unknown_fields)]
10051pub struct PrepareCollectionRestoreResult {
10052 pub semantic_digest: Digest,
10053 pub source_collection_id: Identity,
10054 pub maximum_bytes: U64,
10055}
10056
10057#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10058#[serde(deny_unknown_fields)]
10059pub struct StartCollectionRestoreRequest {
10060 pub action_id: Digest,
10061 pub semantic_digest: Digest,
10062 pub artifact: CollectionExportArtifact,
10063 pub storage: PortabilityStorageCapability,
10064}
10065
10066#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10067#[serde(deny_unknown_fields)]
10068pub struct StartCollectionRestoreResult {
10069 pub operation: Operation,
10070}
10071
10072#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10073#[serde(deny_unknown_fields)]
10074pub struct ResolveCollectionRestoreRequest {
10075 pub action_id: Digest,
10076 pub semantic_digest: Digest,
10077 pub artifact: CollectionExportArtifact,
10078 pub storage: PortabilityStorageCapability,
10079}
10080
10081#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10082#[serde(deny_unknown_fields)]
10083pub struct ResolveCollectionRestoreResult {
10084 #[serde(default, skip_serializing_if = "Option::is_none")]
10085 pub operation: Option<Operation>,
10086 pub expired_unknown: bool,
10087}
10088
10089#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10090#[serde(deny_unknown_fields)]
10091pub struct PrepareCollectionTransferExportRequest {
10092 pub action_id: Digest,
10093 pub expected_security_generation: U64,
10094 pub storage: PortabilityStorageCapability,
10095}
10096
10097#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10098#[serde(deny_unknown_fields)]
10099pub struct PrepareCollectionTransferExportResult {
10100 pub semantic_digest: Digest,
10101 pub maximum_bytes: U64,
10102}
10103
10104#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10105#[serde(deny_unknown_fields)]
10106pub struct StartCollectionTransferExportRequest {
10107 pub action_id: Digest,
10108 pub semantic_digest: Digest,
10109 pub expected_security_generation: U64,
10110 pub storage: PortabilityStorageCapability,
10111}
10112
10113#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10114#[serde(deny_unknown_fields)]
10115pub struct StartCollectionTransferExportResult {
10116 pub operation: Operation,
10117}
10118
10119#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10120#[serde(deny_unknown_fields)]
10121pub struct ResolveCollectionTransferExportRequest {
10122 pub action_id: Digest,
10123 pub semantic_digest: Digest,
10124 pub expected_security_generation: U64,
10125 pub storage: PortabilityStorageCapability,
10126}
10127
10128#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10129#[serde(deny_unknown_fields)]
10130pub struct ResolveCollectionTransferExportResult {
10131 #[serde(default, skip_serializing_if = "Option::is_none")]
10132 pub operation: Option<Operation>,
10133 #[serde(default, skip_serializing_if = "Option::is_none")]
10134 pub artifact: Option<CollectionTransferArtifact>,
10135 pub expired_unknown: bool,
10136}
10137
10138#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10139#[serde(deny_unknown_fields)]
10140pub struct PrepareCollectionTransferRestoreRequest {
10141 pub action_id: Digest,
10142 pub artifact: CollectionTransferArtifact,
10143 pub storage: PortabilityStorageCapability,
10144}
10145
10146#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10147#[serde(deny_unknown_fields)]
10148pub struct PrepareCollectionTransferRestoreResult {
10149 pub semantic_digest: Digest,
10150 pub source_collection_id: Identity,
10151 pub final_content_digest: Digest,
10152 pub maximum_bytes: U64,
10153}
10154
10155#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10156#[serde(deny_unknown_fields)]
10157pub struct StartCollectionTransferRestoreRequest {
10158 pub action_id: Digest,
10159 pub semantic_digest: Digest,
10160 pub artifact: CollectionTransferArtifact,
10161 pub storage: PortabilityStorageCapability,
10162}
10163
10164#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10165#[serde(deny_unknown_fields)]
10166pub struct StartCollectionTransferRestoreResult {
10167 pub operation: Operation,
10168}
10169
10170#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10171#[serde(deny_unknown_fields)]
10172pub struct ResolveCollectionTransferRestoreRequest {
10173 pub action_id: Digest,
10174 pub semantic_digest: Digest,
10175 pub artifact: CollectionTransferArtifact,
10176 pub storage: PortabilityStorageCapability,
10177}
10178
10179#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10180#[serde(deny_unknown_fields)]
10181pub struct ResolveCollectionTransferRestoreResult {
10182 #[serde(default, skip_serializing_if = "Option::is_none")]
10183 pub operation: Option<Operation>,
10184 #[serde(default, skip_serializing_if = "Option::is_none")]
10185 pub verified_content_digest: Option<Digest>,
10186 pub expired_unknown: bool,
10187}
10188
10189#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10190#[serde(deny_unknown_fields)]
10191pub struct PrepareIndexExportRequest {
10192 pub action_id: Digest,
10193 pub index: Resource,
10194 pub storage: PortabilityStorageCapability,
10195 pub maximum_records: u32,
10196 pub maximum_pages: u32,
10197 pub maximum_page_bytes: U64,
10198}
10199
10200#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10201#[serde(deny_unknown_fields)]
10202pub struct PrepareIndexExportResult {
10203 pub semantic_digest: Digest,
10204 pub maximum_bytes: U64,
10205}
10206
10207#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10208#[serde(deny_unknown_fields)]
10209pub struct StartIndexExportRequest {
10210 pub action_id: Digest,
10211 pub semantic_digest: Digest,
10212 pub index: Resource,
10213 pub storage: PortabilityStorageCapability,
10214 pub maximum_records: u32,
10215 pub maximum_pages: u32,
10216 pub maximum_page_bytes: U64,
10217}
10218
10219#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10220#[serde(deny_unknown_fields)]
10221pub struct StartIndexExportResult {
10222 pub operation: Operation,
10223}
10224
10225#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10226#[serde(deny_unknown_fields)]
10227pub struct ResolveIndexExportRequest {
10228 pub action_id: Digest,
10229 pub semantic_digest: Digest,
10230 pub index: Resource,
10231 pub storage: PortabilityStorageCapability,
10232 pub maximum_records: u32,
10233 pub maximum_pages: u32,
10234 pub maximum_page_bytes: U64,
10235}
10236
10237#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10238#[serde(deny_unknown_fields)]
10239pub struct ResolveIndexExportResult {
10240 #[serde(default, skip_serializing_if = "Option::is_none")]
10241 pub operation: Option<Operation>,
10242 #[serde(default, skip_serializing_if = "Option::is_none")]
10243 pub artifact: Option<IndexTransferArtifact>,
10244 pub expired_unknown: bool,
10245}
10246
10247#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10248#[serde(deny_unknown_fields)]
10249pub struct VerifyIndexExportRequest {
10250 pub artifact: IndexTransferArtifact,
10251 pub storage: PortabilityStorageCapability,
10252}
10253
10254#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10255#[serde(deny_unknown_fields)]
10256pub struct VerifyIndexExportResult {
10257 pub verified: bool,
10258 pub source_cluster_storage_id: Identity,
10259 pub source_collection_id: Identity,
10260 pub source_index: Resource,
10261 pub source_catalog_revision: U64,
10262 pub source_cut_digest: Digest,
10263 pub page_count: u32,
10264 pub record_count: u32,
10265}
10266
10267#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10268#[serde(deny_unknown_fields)]
10269pub struct PrepareIndexImportRequest {
10270 pub action_id: Digest,
10271 pub artifact: IndexTransferArtifact,
10272 pub storage: PortabilityStorageCapability,
10273 pub destination_name: String,
10274 pub expected_name_absent: bool,
10275 pub destination_policies: IndexPolicies,
10276 pub destination_resource_spec: IndexResourceSpec,
10277}
10278
10279#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10280#[serde(deny_unknown_fields)]
10281pub struct PrepareIndexImportResult {
10282 pub semantic_digest: Digest,
10283 pub source_cluster_storage_id: Identity,
10284 pub source_collection_id: Identity,
10285 pub source_index: Resource,
10286 pub maximum_bytes: U64,
10287}
10288
10289#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10290#[serde(deny_unknown_fields)]
10291pub struct StartIndexImportRequest {
10292 pub action_id: Digest,
10293 pub semantic_digest: Digest,
10294 pub artifact: IndexTransferArtifact,
10295 pub storage: PortabilityStorageCapability,
10296 pub destination_name: String,
10297 pub expected_name_absent: bool,
10298 pub destination_policies: IndexPolicies,
10299 pub destination_resource_spec: IndexResourceSpec,
10300}
10301
10302#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10303#[serde(deny_unknown_fields)]
10304pub struct StartIndexImportResult {
10305 pub operation: Operation,
10306}
10307
10308#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10309#[serde(deny_unknown_fields)]
10310pub struct ResolveIndexImportRequest {
10311 pub action_id: Digest,
10312 pub semantic_digest: Digest,
10313 pub artifact: IndexTransferArtifact,
10314 pub storage: PortabilityStorageCapability,
10315 pub destination_name: String,
10316 pub expected_name_absent: bool,
10317 pub destination_policies: IndexPolicies,
10318 pub destination_resource_spec: IndexResourceSpec,
10319}
10320
10321#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10322#[serde(deny_unknown_fields)]
10323pub struct ResolveIndexImportResult {
10324 #[serde(default, skip_serializing_if = "Option::is_none")]
10325 pub operation: Option<Operation>,
10326 #[serde(default, skip_serializing_if = "Option::is_none")]
10327 pub destination: Option<Resource>,
10328 pub expired_unknown: bool,
10329}
10330
10331#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10332#[serde(deny_unknown_fields)]
10333pub struct ReadArtifactChunkRequest {
10334 pub artifact: Artifact,
10335 pub offset: U64,
10336 pub length: u32,
10337}
10338
10339#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10340#[serde(deny_unknown_fields)]
10341pub struct ReadArtifactChunkResult {
10342 pub offset: U64,
10343 pub bytes_base64: String,
10344 pub chunk_sha256: String,
10345 pub artifact_sha256: String,
10346 pub complete: bool,
10347}
10348
10349#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10350#[serde(deny_unknown_fields)]
10351pub struct ExportUsageRequest {
10352 pub window_start: U64,
10353 pub window_end: U64,
10354 pub page_size: u32,
10355 #[serde(default, skip_serializing_if = "Option::is_none")]
10356 pub cursor: Option<Cursor>,
10357}
10358
10359#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10360#[serde(deny_unknown_fields)]
10361pub struct ExportUsageResult {
10362 pub units: Vec<CoreUsageUnits>,
10363 pub corrections: Vec<CoreUsageCorrection>,
10364 #[serde(default, skip_serializing_if = "Option::is_none")]
10365 pub next_cursor: Option<Cursor>,
10366 pub cumulative_through: U64,
10367}
10368
10369#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10370#[serde(deny_unknown_fields)]
10371pub struct ReadLogicalOccupancyRequest {
10372 pub index: Resource,
10373 #[serde(default, skip_serializing_if = "Option::is_none")]
10374 pub pit: Option<Cursor>,
10375 #[serde(default, skip_serializing_if = "Option::is_none")]
10376 pub window_start: Option<U64>,
10377 #[serde(default, skip_serializing_if = "Option::is_none")]
10378 pub window_end: Option<U64>,
10379 pub page_size: u32,
10380 #[serde(default, skip_serializing_if = "Option::is_none")]
10381 pub cursor: Option<Cursor>,
10382}
10383
10384#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10385#[serde(deny_unknown_fields)]
10386pub struct ReadLogicalOccupancyResult {
10387 #[serde(default, skip_serializing_if = "Option::is_none")]
10388 pub evidence: Option<LogicalOccupancySnapshotEvidence>,
10389 #[serde(default, skip_serializing_if = "Option::is_none")]
10390 pub window_gap: Option<LogicalOccupancyWindowGap>,
10391 #[serde(default, skip_serializing_if = "Option::is_none")]
10392 pub next_cursor: Option<Cursor>,
10393}
10394
10395#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10396#[serde(deny_unknown_fields)]
10397pub struct ExecuteStateReadRequest {
10398 pub index: Resource,
10399 pub operation: StateOperation,
10400}
10401
10402#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10403#[serde(deny_unknown_fields)]
10404pub struct ExecuteStateReadResult {
10405 pub result: StateCommandResult,
10406}
10407
10408#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10409#[serde(deny_unknown_fields)]
10410pub struct PrepareStateWriteRequest {
10411 pub index: Resource,
10412 pub action_id: Digest,
10413 pub operation: StateOperation,
10414}
10415
10416#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10417#[serde(deny_unknown_fields)]
10418pub struct PrepareStateWriteResult {
10419 pub locator: Locator,
10420 pub semantic_digest: Digest,
10421 pub retention_max_entries: U64,
10422 pub retention_sequence_window: U64,
10423}
10424
10425#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10426#[serde(deny_unknown_fields)]
10427pub struct SubmitStateWriteRequest {
10428 pub index: Resource,
10429 pub action_id: Digest,
10430 pub operation: StateOperation,
10431 pub locator: Locator,
10432 pub semantic_digest: Digest,
10433}
10434
10435#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10436#[serde(deny_unknown_fields)]
10437pub struct SubmitStateWriteResult {
10438 #[serde(default, skip_serializing_if = "Option::is_none")]
10439 pub result: Option<StateCommandResult>,
10440 #[serde(default, skip_serializing_if = "Option::is_none")]
10441 pub resolution: Option<StateWriteResolution>,
10442 pub mutation_outcome: MutationOutcome,
10443 #[serde(default, skip_serializing_if = "Option::is_none")]
10444 pub achievement: Option<WriteAchievement>,
10445}
10446
10447#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10448#[serde(deny_unknown_fields)]
10449pub struct ResolveStateWriteRequest {
10450 pub index: Resource,
10451 pub action_id: Digest,
10452 pub operation: StateOperation,
10453 pub locator: Locator,
10454 pub semantic_digest: Digest,
10455}
10456
10457#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10458#[serde(deny_unknown_fields)]
10459pub struct ResolveStateWriteResult {
10460 pub resolution: StateWriteResolution,
10461}
10462
10463#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10464#[serde(tag = "command", content = "body", rename_all = "snake_case")]
10465pub enum RequestBody {
10466 Discover(DiscoverRequest),
10467 ListIndexes(ListIndexesRequest),
10468 GetIndex(GetIndexRequest),
10469 ValidateIndexChange(ValidateIndexChangeRequest),
10470 ApplyIndexChange(ApplyIndexChangeRequest),
10471 ResolveIndexChange(ResolveIndexChangeRequest),
10472 ApplyAdministrationMutation(ApplyAdministrationMutationRequest),
10473 ListAliases(ListAliasesRequest),
10474 GetAlias(GetAliasRequest),
10475 ListDataStreams(ListDataStreamsRequest),
10476 GetDataStream(GetDataStreamRequest),
10477 ListComponentTemplates(ListComponentTemplatesRequest),
10478 GetComponentTemplate(GetComponentTemplateRequest),
10479 ListIndexTemplates(ListIndexTemplatesRequest),
10480 GetIndexTemplate(GetIndexTemplateRequest),
10481 ListIngestPipelines(ListIngestPipelinesRequest),
10482 GetIngestPipeline(GetIngestPipelineRequest),
10483 SimulateIngestPipeline(SimulateIngestPipelineRequest),
10484 ReprocessByQuery(ReprocessByQueryRequest),
10485 ListLifecyclePolicies(ListLifecyclePoliciesRequest),
10486 GetLifecyclePolicy(GetLifecyclePolicyRequest),
10487 PrepareCreateIndex(PrepareCreateIndexRequest),
10488 PrepareDeleteIndex(PrepareDeleteIndexRequest),
10489 SubmitCatalogAction(SubmitCatalogActionRequest),
10490 ResolveCatalogAction(ResolveCatalogActionRequest),
10491 PrepareReplayableSourceIndex(PrepareReplayableSourceIndexRequest),
10492 SubmitReplayableSourceIndex(SubmitReplayableSourceIndexRequest),
10493 GetReplayableSource(GetReplayableSourceRequest),
10494 ControlReplayableSource(ControlReplayableSourceRequest),
10495 CloneIndex(CloneIndexRequest),
10496 ConfigureHistory(ConfigureHistoryRequest),
10497 GetHistory(GetHistoryRequest),
10498 ResolveHistory(ResolveHistoryRequest),
10499 PlaceHistoryHold(PlaceHistoryHoldRequest),
10500 ReleaseHistoryHold(ReleaseHistoryHoldRequest),
10501 PrepareDocumentMutation(PrepareDocumentMutationRequest),
10502 SubmitDocumentMutation(SubmitDocumentMutationRequest),
10503 PrepareDocumentBulk(PrepareDocumentBulkRequest),
10504 SubmitDocumentBulk(SubmitDocumentBulkRequest),
10505 ResolveDocumentBulk(ResolveDocumentBulkRequest),
10506 PrepareAppendBulk(PrepareAppendBulkRequest),
10507 SubmitAppendBulk(SubmitAppendBulkRequest),
10508 ResolveAppendBulk(ResolveAppendBulkRequest),
10509 ObserveAppendCommitted(ObserveAppendCommittedRequest),
10510 ResolveDocumentMutation(ResolveDocumentMutationRequest),
10511 GetDocument(GetDocumentRequest),
10512 Search(SearchRequest),
10513 TraverseRelationships(TraverseRelationshipsRequest),
10514 QueryProfiles(QueryProfilesRequest),
10515 EvaluateTemporalEvidence(EvaluateTemporalEvidenceRequest),
10516 CreateContinuousTemporalEvaluation(CreateContinuousTemporalEvaluationRequest),
10517 GetContinuousTemporalEvaluation(GetContinuousTemporalEvaluationRequest),
10518 PauseContinuousTemporalEvaluation(PauseContinuousTemporalEvaluationRequest),
10519 ResumeContinuousTemporalEvaluation(ResumeContinuousTemporalEvaluationRequest),
10520 ReplaceContinuousTemporalEvaluation(ReplaceContinuousTemporalEvaluationRequest),
10521 RetireContinuousTemporalEvaluation(RetireContinuousTemporalEvaluationRequest),
10522 ReadContinuousTemporalEvidence(ReadContinuousTemporalEvidenceRequest),
10523 ValidateSearch(ValidateSearchRequest),
10524 OpenPit(OpenPitRequest),
10525 RenewPit(RenewPitRequest),
10526 ClosePit(ClosePitRequest),
10527 ListOperations(ListOperationsRequest),
10528 GetOperation(GetOperationRequest),
10529 WaitOperation(WaitOperationRequest),
10530 CancelOperation(CancelOperationRequest),
10531 ListAuditEvents(ListAuditEventsRequest),
10532 ExportAuditEvents(ExportAuditEventsRequest),
10533 ReserveServiceCredential(ReserveServiceCredentialRequest),
10534 ReserveServiceCredentialRotation(ReserveServiceCredentialRotationRequest),
10535 ActivateServiceCredential(ActivateServiceCredentialRequest),
10536 ResolveServiceCredentialReservation(ResolveServiceCredentialReservationRequest),
10537 PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialRequest),
10538 RevokeServiceCredential(RevokeServiceCredentialRequest),
10539 ResolveSecurityAction(ResolveSecurityActionRequest),
10540 GetSecurityRole(GetSecurityRoleRequest),
10541 PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeRequest),
10542 SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeRequest),
10543 ListServiceCredentials(ListServiceCredentialsRequest),
10544 GetRuntimeStatus(GetRuntimeStatusRequest),
10545 GetResultCacheStatus(GetResultCacheStatusRequest),
10546 GetFieldPromotionStatus(GetFieldPromotionStatusRequest),
10547 GetOverloadStatus(GetOverloadStatusRequest),
10548 ConfigureExternalKey(ConfigureExternalKeyRequest),
10549 RotateExternalKeyBinding(RotateExternalKeyBindingRequest),
10550 ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteRequest),
10551 GetLifecycleStatus(GetLifecycleStatusRequest),
10552 GetQuota(GetQuotaRequest),
10553 UpdateQuota(UpdateQuotaRequest),
10554 GetBinding(GetBindingRequest),
10555 GetAdmissionStatus(GetAdmissionStatusRequest),
10556 SetAdmission(SetAdmissionRequest),
10557 GetQuiesceStatus(GetQuiesceStatusRequest),
10558 GetDecommissionReadiness(GetDecommissionReadinessRequest),
10559 GetUpgradeReadiness(GetUpgradeReadinessRequest),
10560 GetMaintenanceStatus(GetMaintenanceStatusRequest),
10561 WarmVectorIndex(WarmVectorIndexRequest),
10562 EvaluateVectorRecall(EvaluateVectorRecallRequest),
10563 CalibrateVectorStrategy(CalibrateVectorStrategyRequest),
10564 GetVectorDiagnostic(GetVectorDiagnosticRequest),
10565 CreateDiagnostic(CreateDiagnosticRequest),
10566 GetDiagnostic(GetDiagnosticRequest),
10567 PrepareCollectionExport(PrepareCollectionExportRequest),
10568 StartCollectionExport(StartCollectionExportRequest),
10569 ResolveCollectionExport(ResolveCollectionExportRequest),
10570 VerifyCollectionExport(VerifyCollectionExportRequest),
10571 PrepareCollectionExportRetirement(PrepareCollectionExportRetirementRequest),
10572 StartCollectionExportRetirement(StartCollectionExportRetirementRequest),
10573 ResolveCollectionExportRetirement(ResolveCollectionExportRetirementRequest),
10574 PrepareCollectionRestore(PrepareCollectionRestoreRequest),
10575 StartCollectionRestore(StartCollectionRestoreRequest),
10576 ResolveCollectionRestore(ResolveCollectionRestoreRequest),
10577 PrepareCollectionTransferExport(PrepareCollectionTransferExportRequest),
10578 StartCollectionTransferExport(StartCollectionTransferExportRequest),
10579 ResolveCollectionTransferExport(ResolveCollectionTransferExportRequest),
10580 PrepareCollectionTransferRestore(PrepareCollectionTransferRestoreRequest),
10581 StartCollectionTransferRestore(StartCollectionTransferRestoreRequest),
10582 ResolveCollectionTransferRestore(ResolveCollectionTransferRestoreRequest),
10583 PrepareIndexExport(PrepareIndexExportRequest),
10584 StartIndexExport(StartIndexExportRequest),
10585 ResolveIndexExport(ResolveIndexExportRequest),
10586 VerifyIndexExport(VerifyIndexExportRequest),
10587 PrepareIndexImport(PrepareIndexImportRequest),
10588 StartIndexImport(StartIndexImportRequest),
10589 ResolveIndexImport(ResolveIndexImportRequest),
10590 ReadArtifactChunk(ReadArtifactChunkRequest),
10591 ExportUsage(ExportUsageRequest),
10592 ReadLogicalOccupancy(ReadLogicalOccupancyRequest),
10593 ExecuteStateRead(ExecuteStateReadRequest),
10594 PrepareStateWrite(PrepareStateWriteRequest),
10595 SubmitStateWrite(SubmitStateWriteRequest),
10596 ResolveStateWrite(ResolveStateWriteRequest),
10597}
10598
10599#[allow(clippy::large_enum_variant)]
10602#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10603#[serde(tag = "command", content = "body", rename_all = "snake_case")]
10604pub enum ResultBody {
10605 Discover(DiscoverResult),
10606 ListIndexes(ListIndexesResult),
10607 GetIndex(GetIndexResult),
10608 ValidateIndexChange(ValidateIndexChangeResult),
10609 ApplyIndexChange(ApplyIndexChangeResult),
10610 ResolveIndexChange(ResolveIndexChangeResult),
10611 ApplyAdministrationMutation(ApplyAdministrationMutationResult),
10612 ListAliases(ListAliasesResult),
10613 GetAlias(GetAliasResult),
10614 ListDataStreams(ListDataStreamsResult),
10615 GetDataStream(GetDataStreamResult),
10616 ListComponentTemplates(ListComponentTemplatesResult),
10617 GetComponentTemplate(GetComponentTemplateResult),
10618 ListIndexTemplates(ListIndexTemplatesResult),
10619 GetIndexTemplate(GetIndexTemplateResult),
10620 ListIngestPipelines(ListIngestPipelinesResult),
10621 GetIngestPipeline(GetIngestPipelineResult),
10622 SimulateIngestPipeline(SimulateIngestPipelineResult),
10623 ReprocessByQuery(ReprocessByQueryResult),
10624 ListLifecyclePolicies(ListLifecyclePoliciesResult),
10625 GetLifecyclePolicy(GetLifecyclePolicyResult),
10626 PrepareCreateIndex(PrepareCreateIndexResult),
10627 PrepareDeleteIndex(PrepareDeleteIndexResult),
10628 SubmitCatalogAction(SubmitCatalogActionResult),
10629 ResolveCatalogAction(ResolveCatalogActionResult),
10630 PrepareReplayableSourceIndex(PrepareReplayableSourceIndexResult),
10631 SubmitReplayableSourceIndex(SubmitReplayableSourceIndexResult),
10632 GetReplayableSource(GetReplayableSourceResult),
10633 ControlReplayableSource(ControlReplayableSourceResult),
10634 CloneIndex(CloneIndexResult),
10635 ConfigureHistory(ConfigureHistoryResult),
10636 GetHistory(GetHistoryResult),
10637 ResolveHistory(ResolveHistoryResult),
10638 PlaceHistoryHold(PlaceHistoryHoldResult),
10639 ReleaseHistoryHold(ReleaseHistoryHoldResult),
10640 PrepareDocumentMutation(PrepareDocumentMutationResult),
10641 SubmitDocumentMutation(SubmitDocumentMutationResult),
10642 PrepareDocumentBulk(PrepareDocumentBulkResult),
10643 SubmitDocumentBulk(SubmitDocumentBulkResult),
10644 ResolveDocumentBulk(ResolveDocumentBulkResult),
10645 PrepareAppendBulk(PrepareAppendBulkResult),
10646 SubmitAppendBulk(SubmitAppendBulkResult),
10647 ResolveAppendBulk(ResolveAppendBulkResult),
10648 ObserveAppendCommitted(ObserveAppendCommittedResult),
10649 ResolveDocumentMutation(ResolveDocumentMutationResult),
10650 GetDocument(GetDocumentResult),
10651 Search(SearchResult),
10652 TraverseRelationships(TraverseRelationshipsResult),
10653 QueryProfiles(QueryProfilesResult),
10654 EvaluateTemporalEvidence(EvaluateTemporalEvidenceResult),
10655 CreateContinuousTemporalEvaluation(CreateContinuousTemporalEvaluationResult),
10656 GetContinuousTemporalEvaluation(GetContinuousTemporalEvaluationResult),
10657 PauseContinuousTemporalEvaluation(PauseContinuousTemporalEvaluationResult),
10658 ResumeContinuousTemporalEvaluation(ResumeContinuousTemporalEvaluationResult),
10659 ReplaceContinuousTemporalEvaluation(ReplaceContinuousTemporalEvaluationResult),
10660 RetireContinuousTemporalEvaluation(RetireContinuousTemporalEvaluationResult),
10661 ReadContinuousTemporalEvidence(ReadContinuousTemporalEvidenceResult),
10662 ValidateSearch(ValidateSearchResult),
10663 OpenPit(OpenPitResult),
10664 RenewPit(RenewPitResult),
10665 ClosePit(ClosePitResult),
10666 ListOperations(ListOperationsResult),
10667 GetOperation(GetOperationResult),
10668 WaitOperation(WaitOperationResult),
10669 CancelOperation(CancelOperationResult),
10670 ListAuditEvents(ListAuditEventsResult),
10671 ExportAuditEvents(ExportAuditEventsResult),
10672 ReserveServiceCredential(ReserveServiceCredentialResult),
10673 ReserveServiceCredentialRotation(ReserveServiceCredentialRotationResult),
10674 ActivateServiceCredential(ActivateServiceCredentialResult),
10675 ResolveServiceCredentialReservation(ResolveServiceCredentialReservationResult),
10676 PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialResult),
10677 RevokeServiceCredential(RevokeServiceCredentialResult),
10678 ResolveSecurityAction(ResolveSecurityActionResult),
10679 GetSecurityRole(GetSecurityRoleResult),
10680 PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeResult),
10681 SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeResult),
10682 ListServiceCredentials(ListServiceCredentialsResult),
10683 GetRuntimeStatus(GetRuntimeStatusResult),
10684 GetResultCacheStatus(GetResultCacheStatusResult),
10685 GetFieldPromotionStatus(GetFieldPromotionStatusResult),
10686 GetOverloadStatus(GetOverloadStatusResult),
10687 ConfigureExternalKey(ConfigureExternalKeyResult),
10688 RotateExternalKeyBinding(RotateExternalKeyBindingResult),
10689 ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteResult),
10690 GetLifecycleStatus(GetLifecycleStatusResult),
10691 GetQuota(GetQuotaResult),
10692 UpdateQuota(UpdateQuotaResult),
10693 GetBinding(GetBindingResult),
10694 GetAdmissionStatus(GetAdmissionStatusResult),
10695 SetAdmission(SetAdmissionResult),
10696 GetQuiesceStatus(GetQuiesceStatusResult),
10697 GetDecommissionReadiness(GetDecommissionReadinessResult),
10698 GetUpgradeReadiness(GetUpgradeReadinessResult),
10699 GetMaintenanceStatus(GetMaintenanceStatusResult),
10700 WarmVectorIndex(WarmVectorIndexResult),
10701 EvaluateVectorRecall(EvaluateVectorRecallResult),
10702 CalibrateVectorStrategy(CalibrateVectorStrategyResult),
10703 GetVectorDiagnostic(GetVectorDiagnosticResult),
10704 CreateDiagnostic(CreateDiagnosticResult),
10705 GetDiagnostic(GetDiagnosticResult),
10706 PrepareCollectionExport(PrepareCollectionExportResult),
10707 StartCollectionExport(StartCollectionExportResult),
10708 ResolveCollectionExport(ResolveCollectionExportResult),
10709 VerifyCollectionExport(VerifyCollectionExportResult),
10710 PrepareCollectionExportRetirement(PrepareCollectionExportRetirementResult),
10711 StartCollectionExportRetirement(StartCollectionExportRetirementResult),
10712 ResolveCollectionExportRetirement(ResolveCollectionExportRetirementResult),
10713 PrepareCollectionRestore(PrepareCollectionRestoreResult),
10714 StartCollectionRestore(StartCollectionRestoreResult),
10715 ResolveCollectionRestore(ResolveCollectionRestoreResult),
10716 PrepareCollectionTransferExport(PrepareCollectionTransferExportResult),
10717 StartCollectionTransferExport(StartCollectionTransferExportResult),
10718 ResolveCollectionTransferExport(ResolveCollectionTransferExportResult),
10719 PrepareCollectionTransferRestore(PrepareCollectionTransferRestoreResult),
10720 StartCollectionTransferRestore(StartCollectionTransferRestoreResult),
10721 ResolveCollectionTransferRestore(ResolveCollectionTransferRestoreResult),
10722 PrepareIndexExport(PrepareIndexExportResult),
10723 StartIndexExport(StartIndexExportResult),
10724 ResolveIndexExport(ResolveIndexExportResult),
10725 VerifyIndexExport(VerifyIndexExportResult),
10726 PrepareIndexImport(PrepareIndexImportResult),
10727 StartIndexImport(StartIndexImportResult),
10728 ResolveIndexImport(ResolveIndexImportResult),
10729 ReadArtifactChunk(ReadArtifactChunkResult),
10730 ExportUsage(ExportUsageResult),
10731 ReadLogicalOccupancy(ReadLogicalOccupancyResult),
10732 ExecuteStateRead(ExecuteStateReadResult),
10733 PrepareStateWrite(PrepareStateWriteResult),
10734 SubmitStateWrite(SubmitStateWriteResult),
10735 ResolveStateWrite(ResolveStateWriteResult),
10736}
10737
10738pub const fn command_for_request(value: &RequestBody) -> Command {
10739 match value {
10740 RequestBody::Discover(_) => Command::Discover,
10741 RequestBody::ListIndexes(_) => Command::ListIndexes,
10742 RequestBody::GetIndex(_) => Command::GetIndex,
10743 RequestBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
10744 RequestBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
10745 RequestBody::ResolveIndexChange(_) => Command::ResolveIndexChange,
10746 RequestBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
10747 RequestBody::ListAliases(_) => Command::ListAliases,
10748 RequestBody::GetAlias(_) => Command::GetAlias,
10749 RequestBody::ListDataStreams(_) => Command::ListDataStreams,
10750 RequestBody::GetDataStream(_) => Command::GetDataStream,
10751 RequestBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
10752 RequestBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
10753 RequestBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
10754 RequestBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
10755 RequestBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
10756 RequestBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
10757 RequestBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
10758 RequestBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
10759 RequestBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
10760 RequestBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
10761 RequestBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
10762 RequestBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
10763 RequestBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
10764 RequestBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
10765 RequestBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
10766 RequestBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
10767 RequestBody::GetReplayableSource(_) => Command::GetReplayableSource,
10768 RequestBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
10769 RequestBody::CloneIndex(_) => Command::CloneIndex,
10770 RequestBody::ConfigureHistory(_) => Command::ConfigureHistory,
10771 RequestBody::GetHistory(_) => Command::GetHistory,
10772 RequestBody::ResolveHistory(_) => Command::ResolveHistory,
10773 RequestBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
10774 RequestBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
10775 RequestBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
10776 RequestBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
10777 RequestBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
10778 RequestBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
10779 RequestBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
10780 RequestBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
10781 RequestBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
10782 RequestBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
10783 RequestBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
10784 RequestBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
10785 RequestBody::GetDocument(_) => Command::GetDocument,
10786 RequestBody::Search(_) => Command::Search,
10787 RequestBody::TraverseRelationships(_) => Command::TraverseRelationships,
10788 RequestBody::QueryProfiles(_) => Command::QueryProfiles,
10789 RequestBody::EvaluateTemporalEvidence(_) => Command::EvaluateTemporalEvidence,
10790 RequestBody::CreateContinuousTemporalEvaluation(_) => Command::CreateContinuousTemporalEvaluation,
10791 RequestBody::GetContinuousTemporalEvaluation(_) => Command::GetContinuousTemporalEvaluation,
10792 RequestBody::PauseContinuousTemporalEvaluation(_) => Command::PauseContinuousTemporalEvaluation,
10793 RequestBody::ResumeContinuousTemporalEvaluation(_) => Command::ResumeContinuousTemporalEvaluation,
10794 RequestBody::ReplaceContinuousTemporalEvaluation(_) => Command::ReplaceContinuousTemporalEvaluation,
10795 RequestBody::RetireContinuousTemporalEvaluation(_) => Command::RetireContinuousTemporalEvaluation,
10796 RequestBody::ReadContinuousTemporalEvidence(_) => Command::ReadContinuousTemporalEvidence,
10797 RequestBody::ValidateSearch(_) => Command::ValidateSearch,
10798 RequestBody::OpenPit(_) => Command::OpenPit,
10799 RequestBody::RenewPit(_) => Command::RenewPit,
10800 RequestBody::ClosePit(_) => Command::ClosePit,
10801 RequestBody::ListOperations(_) => Command::ListOperations,
10802 RequestBody::GetOperation(_) => Command::GetOperation,
10803 RequestBody::WaitOperation(_) => Command::WaitOperation,
10804 RequestBody::CancelOperation(_) => Command::CancelOperation,
10805 RequestBody::ListAuditEvents(_) => Command::ListAuditEvents,
10806 RequestBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
10807 RequestBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
10808 RequestBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
10809 RequestBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
10810 RequestBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
10811 RequestBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
10812 RequestBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
10813 RequestBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
10814 RequestBody::GetSecurityRole(_) => Command::GetSecurityRole,
10815 RequestBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
10816 RequestBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
10817 RequestBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
10818 RequestBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
10819 RequestBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
10820 RequestBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
10821 RequestBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
10822 RequestBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
10823 RequestBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
10824 RequestBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
10825 RequestBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
10826 RequestBody::GetQuota(_) => Command::GetQuota,
10827 RequestBody::UpdateQuota(_) => Command::UpdateQuota,
10828 RequestBody::GetBinding(_) => Command::GetBinding,
10829 RequestBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
10830 RequestBody::SetAdmission(_) => Command::SetAdmission,
10831 RequestBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
10832 RequestBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
10833 RequestBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
10834 RequestBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
10835 RequestBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
10836 RequestBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
10837 RequestBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
10838 RequestBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
10839 RequestBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
10840 RequestBody::GetDiagnostic(_) => Command::GetDiagnostic,
10841 RequestBody::PrepareCollectionExport(_) => Command::PrepareCollectionExport,
10842 RequestBody::StartCollectionExport(_) => Command::StartCollectionExport,
10843 RequestBody::ResolveCollectionExport(_) => Command::ResolveCollectionExport,
10844 RequestBody::VerifyCollectionExport(_) => Command::VerifyCollectionExport,
10845 RequestBody::PrepareCollectionExportRetirement(_) => Command::PrepareCollectionExportRetirement,
10846 RequestBody::StartCollectionExportRetirement(_) => Command::StartCollectionExportRetirement,
10847 RequestBody::ResolveCollectionExportRetirement(_) => Command::ResolveCollectionExportRetirement,
10848 RequestBody::PrepareCollectionRestore(_) => Command::PrepareCollectionRestore,
10849 RequestBody::StartCollectionRestore(_) => Command::StartCollectionRestore,
10850 RequestBody::ResolveCollectionRestore(_) => Command::ResolveCollectionRestore,
10851 RequestBody::PrepareCollectionTransferExport(_) => Command::PrepareCollectionTransferExport,
10852 RequestBody::StartCollectionTransferExport(_) => Command::StartCollectionTransferExport,
10853 RequestBody::ResolveCollectionTransferExport(_) => Command::ResolveCollectionTransferExport,
10854 RequestBody::PrepareCollectionTransferRestore(_) => Command::PrepareCollectionTransferRestore,
10855 RequestBody::StartCollectionTransferRestore(_) => Command::StartCollectionTransferRestore,
10856 RequestBody::ResolveCollectionTransferRestore(_) => Command::ResolveCollectionTransferRestore,
10857 RequestBody::PrepareIndexExport(_) => Command::PrepareIndexExport,
10858 RequestBody::StartIndexExport(_) => Command::StartIndexExport,
10859 RequestBody::ResolveIndexExport(_) => Command::ResolveIndexExport,
10860 RequestBody::VerifyIndexExport(_) => Command::VerifyIndexExport,
10861 RequestBody::PrepareIndexImport(_) => Command::PrepareIndexImport,
10862 RequestBody::StartIndexImport(_) => Command::StartIndexImport,
10863 RequestBody::ResolveIndexImport(_) => Command::ResolveIndexImport,
10864 RequestBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
10865 RequestBody::ExportUsage(_) => Command::ExportUsage,
10866 RequestBody::ReadLogicalOccupancy(_) => Command::ReadLogicalOccupancy,
10867 RequestBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
10868 RequestBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
10869 RequestBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
10870 RequestBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
10871 }
10872}
10873
10874pub const fn command_for_result(value: &ResultBody) -> Command {
10875 match value {
10876 ResultBody::Discover(_) => Command::Discover,
10877 ResultBody::ListIndexes(_) => Command::ListIndexes,
10878 ResultBody::GetIndex(_) => Command::GetIndex,
10879 ResultBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
10880 ResultBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
10881 ResultBody::ResolveIndexChange(_) => Command::ResolveIndexChange,
10882 ResultBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
10883 ResultBody::ListAliases(_) => Command::ListAliases,
10884 ResultBody::GetAlias(_) => Command::GetAlias,
10885 ResultBody::ListDataStreams(_) => Command::ListDataStreams,
10886 ResultBody::GetDataStream(_) => Command::GetDataStream,
10887 ResultBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
10888 ResultBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
10889 ResultBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
10890 ResultBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
10891 ResultBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
10892 ResultBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
10893 ResultBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
10894 ResultBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
10895 ResultBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
10896 ResultBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
10897 ResultBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
10898 ResultBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
10899 ResultBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
10900 ResultBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
10901 ResultBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
10902 ResultBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
10903 ResultBody::GetReplayableSource(_) => Command::GetReplayableSource,
10904 ResultBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
10905 ResultBody::CloneIndex(_) => Command::CloneIndex,
10906 ResultBody::ConfigureHistory(_) => Command::ConfigureHistory,
10907 ResultBody::GetHistory(_) => Command::GetHistory,
10908 ResultBody::ResolveHistory(_) => Command::ResolveHistory,
10909 ResultBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
10910 ResultBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
10911 ResultBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
10912 ResultBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
10913 ResultBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
10914 ResultBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
10915 ResultBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
10916 ResultBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
10917 ResultBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
10918 ResultBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
10919 ResultBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
10920 ResultBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
10921 ResultBody::GetDocument(_) => Command::GetDocument,
10922 ResultBody::Search(_) => Command::Search,
10923 ResultBody::TraverseRelationships(_) => Command::TraverseRelationships,
10924 ResultBody::QueryProfiles(_) => Command::QueryProfiles,
10925 ResultBody::EvaluateTemporalEvidence(_) => Command::EvaluateTemporalEvidence,
10926 ResultBody::CreateContinuousTemporalEvaluation(_) => Command::CreateContinuousTemporalEvaluation,
10927 ResultBody::GetContinuousTemporalEvaluation(_) => Command::GetContinuousTemporalEvaluation,
10928 ResultBody::PauseContinuousTemporalEvaluation(_) => Command::PauseContinuousTemporalEvaluation,
10929 ResultBody::ResumeContinuousTemporalEvaluation(_) => Command::ResumeContinuousTemporalEvaluation,
10930 ResultBody::ReplaceContinuousTemporalEvaluation(_) => Command::ReplaceContinuousTemporalEvaluation,
10931 ResultBody::RetireContinuousTemporalEvaluation(_) => Command::RetireContinuousTemporalEvaluation,
10932 ResultBody::ReadContinuousTemporalEvidence(_) => Command::ReadContinuousTemporalEvidence,
10933 ResultBody::ValidateSearch(_) => Command::ValidateSearch,
10934 ResultBody::OpenPit(_) => Command::OpenPit,
10935 ResultBody::RenewPit(_) => Command::RenewPit,
10936 ResultBody::ClosePit(_) => Command::ClosePit,
10937 ResultBody::ListOperations(_) => Command::ListOperations,
10938 ResultBody::GetOperation(_) => Command::GetOperation,
10939 ResultBody::WaitOperation(_) => Command::WaitOperation,
10940 ResultBody::CancelOperation(_) => Command::CancelOperation,
10941 ResultBody::ListAuditEvents(_) => Command::ListAuditEvents,
10942 ResultBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
10943 ResultBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
10944 ResultBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
10945 ResultBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
10946 ResultBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
10947 ResultBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
10948 ResultBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
10949 ResultBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
10950 ResultBody::GetSecurityRole(_) => Command::GetSecurityRole,
10951 ResultBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
10952 ResultBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
10953 ResultBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
10954 ResultBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
10955 ResultBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
10956 ResultBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
10957 ResultBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
10958 ResultBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
10959 ResultBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
10960 ResultBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
10961 ResultBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
10962 ResultBody::GetQuota(_) => Command::GetQuota,
10963 ResultBody::UpdateQuota(_) => Command::UpdateQuota,
10964 ResultBody::GetBinding(_) => Command::GetBinding,
10965 ResultBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
10966 ResultBody::SetAdmission(_) => Command::SetAdmission,
10967 ResultBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
10968 ResultBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
10969 ResultBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
10970 ResultBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
10971 ResultBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
10972 ResultBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
10973 ResultBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
10974 ResultBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
10975 ResultBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
10976 ResultBody::GetDiagnostic(_) => Command::GetDiagnostic,
10977 ResultBody::PrepareCollectionExport(_) => Command::PrepareCollectionExport,
10978 ResultBody::StartCollectionExport(_) => Command::StartCollectionExport,
10979 ResultBody::ResolveCollectionExport(_) => Command::ResolveCollectionExport,
10980 ResultBody::VerifyCollectionExport(_) => Command::VerifyCollectionExport,
10981 ResultBody::PrepareCollectionExportRetirement(_) => Command::PrepareCollectionExportRetirement,
10982 ResultBody::StartCollectionExportRetirement(_) => Command::StartCollectionExportRetirement,
10983 ResultBody::ResolveCollectionExportRetirement(_) => Command::ResolveCollectionExportRetirement,
10984 ResultBody::PrepareCollectionRestore(_) => Command::PrepareCollectionRestore,
10985 ResultBody::StartCollectionRestore(_) => Command::StartCollectionRestore,
10986 ResultBody::ResolveCollectionRestore(_) => Command::ResolveCollectionRestore,
10987 ResultBody::PrepareCollectionTransferExport(_) => Command::PrepareCollectionTransferExport,
10988 ResultBody::StartCollectionTransferExport(_) => Command::StartCollectionTransferExport,
10989 ResultBody::ResolveCollectionTransferExport(_) => Command::ResolveCollectionTransferExport,
10990 ResultBody::PrepareCollectionTransferRestore(_) => Command::PrepareCollectionTransferRestore,
10991 ResultBody::StartCollectionTransferRestore(_) => Command::StartCollectionTransferRestore,
10992 ResultBody::ResolveCollectionTransferRestore(_) => Command::ResolveCollectionTransferRestore,
10993 ResultBody::PrepareIndexExport(_) => Command::PrepareIndexExport,
10994 ResultBody::StartIndexExport(_) => Command::StartIndexExport,
10995 ResultBody::ResolveIndexExport(_) => Command::ResolveIndexExport,
10996 ResultBody::VerifyIndexExport(_) => Command::VerifyIndexExport,
10997 ResultBody::PrepareIndexImport(_) => Command::PrepareIndexImport,
10998 ResultBody::StartIndexImport(_) => Command::StartIndexImport,
10999 ResultBody::ResolveIndexImport(_) => Command::ResolveIndexImport,
11000 ResultBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
11001 ResultBody::ExportUsage(_) => Command::ExportUsage,
11002 ResultBody::ReadLogicalOccupancy(_) => Command::ReadLogicalOccupancy,
11003 ResultBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
11004 ResultBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
11005 ResultBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
11006 ResultBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
11007 }
11008}
11009
11010#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11011#[serde(deny_unknown_fields)]
11012pub struct RequestEnvelope {
11013 pub meta: RequestMeta,
11014 pub request: RequestBody,
11015}
11016#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11017#[serde(tag = "outcome", rename_all = "snake_case")]
11018pub enum ResponseEnvelope {
11019 Success {
11020 meta: ResponseMeta,
11021 result: Box<ResultBody>,
11022 },
11023 Error {
11024 meta: ResponseMeta,
11025 error: ErrorBody,
11026 },
11027}
11028
11029#[derive(Clone, Copy, Debug, Eq, PartialEq)]
11030pub struct CommandContract {
11031 pub command: Command,
11032 pub action: Action,
11033 pub cancellable: bool,
11034 pub mutation: &'static str,
11035}
11036pub const LODESTONE_API_COMMAND_CONTRACTS: &[CommandContract] = &[
11037 CommandContract {
11038 command: Command::Discover,
11039 action: Action::IdentityDiscovery,
11040 cancellable: true,
11041 mutation: "read_only",
11042 },
11043 CommandContract {
11044 command: Command::ListIndexes,
11045 action: Action::CatalogRead,
11046 cancellable: true,
11047 mutation: "read_only",
11048 },
11049 CommandContract {
11050 command: Command::GetIndex,
11051 action: Action::CatalogRead,
11052 cancellable: true,
11053 mutation: "read_only",
11054 },
11055 CommandContract {
11056 command: Command::ValidateIndexChange,
11057 action: Action::IndexAdmin,
11058 cancellable: true,
11059 mutation: "read_only",
11060 },
11061 CommandContract {
11062 command: Command::ApplyIndexChange,
11063 action: Action::IndexAdmin,
11064 cancellable: true,
11065 mutation: "catalog_submit",
11066 },
11067 CommandContract {
11068 command: Command::ResolveIndexChange,
11069 action: Action::IndexAdmin,
11070 cancellable: true,
11071 mutation: "read_only",
11072 },
11073 CommandContract {
11074 command: Command::ApplyAdministrationMutation,
11075 action: Action::LifecycleAdmin,
11076 cancellable: true,
11077 mutation: "administration_submit",
11078 },
11079 CommandContract {
11080 command: Command::ListAliases,
11081 action: Action::CatalogRead,
11082 cancellable: true,
11083 mutation: "read_only",
11084 },
11085 CommandContract {
11086 command: Command::GetAlias,
11087 action: Action::CatalogRead,
11088 cancellable: true,
11089 mutation: "read_only",
11090 },
11091 CommandContract {
11092 command: Command::ListDataStreams,
11093 action: Action::CatalogRead,
11094 cancellable: true,
11095 mutation: "read_only",
11096 },
11097 CommandContract {
11098 command: Command::GetDataStream,
11099 action: Action::CatalogRead,
11100 cancellable: true,
11101 mutation: "read_only",
11102 },
11103 CommandContract {
11104 command: Command::ListComponentTemplates,
11105 action: Action::CatalogRead,
11106 cancellable: true,
11107 mutation: "read_only",
11108 },
11109 CommandContract {
11110 command: Command::GetComponentTemplate,
11111 action: Action::CatalogRead,
11112 cancellable: true,
11113 mutation: "read_only",
11114 },
11115 CommandContract {
11116 command: Command::ListIndexTemplates,
11117 action: Action::CatalogRead,
11118 cancellable: true,
11119 mutation: "read_only",
11120 },
11121 CommandContract {
11122 command: Command::GetIndexTemplate,
11123 action: Action::CatalogRead,
11124 cancellable: true,
11125 mutation: "read_only",
11126 },
11127 CommandContract {
11128 command: Command::ListIngestPipelines,
11129 action: Action::LifecycleAdmin,
11130 cancellable: true,
11131 mutation: "read_only",
11132 },
11133 CommandContract {
11134 command: Command::GetIngestPipeline,
11135 action: Action::LifecycleAdmin,
11136 cancellable: true,
11137 mutation: "read_only",
11138 },
11139 CommandContract {
11140 command: Command::SimulateIngestPipeline,
11141 action: Action::LifecycleAdmin,
11142 cancellable: true,
11143 mutation: "read_only",
11144 },
11145 CommandContract {
11146 command: Command::ReprocessByQuery,
11147 action: Action::DataWrite,
11148 cancellable: true,
11149 mutation: "authority_submit",
11150 },
11151 CommandContract {
11152 command: Command::ListLifecyclePolicies,
11153 action: Action::CatalogRead,
11154 cancellable: true,
11155 mutation: "read_only",
11156 },
11157 CommandContract {
11158 command: Command::GetLifecyclePolicy,
11159 action: Action::CatalogRead,
11160 cancellable: true,
11161 mutation: "read_only",
11162 },
11163 CommandContract {
11164 command: Command::PrepareCreateIndex,
11165 action: Action::IndexAdmin,
11166 cancellable: true,
11167 mutation: "catalog_prepare",
11168 },
11169 CommandContract {
11170 command: Command::PrepareDeleteIndex,
11171 action: Action::IndexAdmin,
11172 cancellable: true,
11173 mutation: "catalog_prepare",
11174 },
11175 CommandContract {
11176 command: Command::SubmitCatalogAction,
11177 action: Action::IndexAdmin,
11178 cancellable: true,
11179 mutation: "catalog_submit",
11180 },
11181 CommandContract {
11182 command: Command::ResolveCatalogAction,
11183 action: Action::IndexAdmin,
11184 cancellable: true,
11185 mutation: "read_only",
11186 },
11187 CommandContract {
11188 command: Command::PrepareReplayableSourceIndex,
11189 action: Action::IndexAdmin,
11190 cancellable: true,
11191 mutation: "catalog_prepare",
11192 },
11193 CommandContract {
11194 command: Command::SubmitReplayableSourceIndex,
11195 action: Action::IndexAdmin,
11196 cancellable: true,
11197 mutation: "catalog_submit",
11198 },
11199 CommandContract {
11200 command: Command::GetReplayableSource,
11201 action: Action::CatalogRead,
11202 cancellable: true,
11203 mutation: "read_only",
11204 },
11205 CommandContract {
11206 command: Command::ControlReplayableSource,
11207 action: Action::IndexAdmin,
11208 cancellable: true,
11209 mutation: "catalog_submit",
11210 },
11211 CommandContract {
11212 command: Command::CloneIndex,
11213 action: Action::IndexAdmin,
11214 cancellable: true,
11215 mutation: "catalog_submit",
11216 },
11217 CommandContract {
11218 command: Command::ConfigureHistory,
11219 action: Action::IndexAdmin,
11220 cancellable: true,
11221 mutation: "catalog_submit",
11222 },
11223 CommandContract {
11224 command: Command::GetHistory,
11225 action: Action::CatalogRead,
11226 cancellable: true,
11227 mutation: "read_only",
11228 },
11229 CommandContract {
11230 command: Command::ResolveHistory,
11231 action: Action::DataRead,
11232 cancellable: true,
11233 mutation: "read_only",
11234 },
11235 CommandContract {
11236 command: Command::PlaceHistoryHold,
11237 action: Action::IndexAdmin,
11238 cancellable: true,
11239 mutation: "catalog_submit",
11240 },
11241 CommandContract {
11242 command: Command::ReleaseHistoryHold,
11243 action: Action::IndexAdmin,
11244 cancellable: true,
11245 mutation: "catalog_submit",
11246 },
11247 CommandContract {
11248 command: Command::PrepareDocumentMutation,
11249 action: Action::DataWrite,
11250 cancellable: true,
11251 mutation: "read_only_prepare",
11252 },
11253 CommandContract {
11254 command: Command::SubmitDocumentMutation,
11255 action: Action::DataWrite,
11256 cancellable: true,
11257 mutation: "wal_submit",
11258 },
11259 CommandContract {
11260 command: Command::PrepareDocumentBulk,
11261 action: Action::DataWrite,
11262 cancellable: true,
11263 mutation: "read_only_prepare",
11264 },
11265 CommandContract {
11266 command: Command::SubmitDocumentBulk,
11267 action: Action::DataWrite,
11268 cancellable: true,
11269 mutation: "wal_submit",
11270 },
11271 CommandContract {
11272 command: Command::ResolveDocumentBulk,
11273 action: Action::DataRead,
11274 cancellable: true,
11275 mutation: "read_only",
11276 },
11277 CommandContract {
11278 command: Command::PrepareAppendBulk,
11279 action: Action::Append,
11280 cancellable: true,
11281 mutation: "read_only_prepare",
11282 },
11283 CommandContract {
11284 command: Command::SubmitAppendBulk,
11285 action: Action::Append,
11286 cancellable: true,
11287 mutation: "wal_submit",
11288 },
11289 CommandContract {
11290 command: Command::ResolveAppendBulk,
11291 action: Action::ResolveAppend,
11292 cancellable: true,
11293 mutation: "read_only",
11294 },
11295 CommandContract {
11296 command: Command::ObserveAppendCommitted,
11297 action: Action::ResolveAppend,
11298 cancellable: true,
11299 mutation: "read_only",
11300 },
11301 CommandContract {
11302 command: Command::ResolveDocumentMutation,
11303 action: Action::DataRead,
11304 cancellable: true,
11305 mutation: "read_only",
11306 },
11307 CommandContract {
11308 command: Command::GetDocument,
11309 action: Action::DataRead,
11310 cancellable: true,
11311 mutation: "read_only",
11312 },
11313 CommandContract {
11314 command: Command::Search,
11315 action: Action::DataRead,
11316 cancellable: true,
11317 mutation: "read_only",
11318 },
11319 CommandContract {
11320 command: Command::TraverseRelationships,
11321 action: Action::DataRead,
11322 cancellable: true,
11323 mutation: "read_only",
11324 },
11325 CommandContract {
11326 command: Command::QueryProfiles,
11327 action: Action::DataRead,
11328 cancellable: true,
11329 mutation: "read_only",
11330 },
11331 CommandContract {
11332 command: Command::EvaluateTemporalEvidence,
11333 action: Action::DataRead,
11334 cancellable: true,
11335 mutation: "read_only",
11336 },
11337 CommandContract {
11338 command: Command::CreateContinuousTemporalEvaluation,
11339 action: Action::LifecycleAdmin,
11340 cancellable: true,
11341 mutation: "catalog_submit",
11342 },
11343 CommandContract {
11344 command: Command::GetContinuousTemporalEvaluation,
11345 action: Action::CatalogRead,
11346 cancellable: true,
11347 mutation: "read_only",
11348 },
11349 CommandContract {
11350 command: Command::PauseContinuousTemporalEvaluation,
11351 action: Action::LifecycleAdmin,
11352 cancellable: true,
11353 mutation: "catalog_submit",
11354 },
11355 CommandContract {
11356 command: Command::ResumeContinuousTemporalEvaluation,
11357 action: Action::LifecycleAdmin,
11358 cancellable: true,
11359 mutation: "catalog_submit",
11360 },
11361 CommandContract {
11362 command: Command::ReplaceContinuousTemporalEvaluation,
11363 action: Action::LifecycleAdmin,
11364 cancellable: true,
11365 mutation: "catalog_submit",
11366 },
11367 CommandContract {
11368 command: Command::RetireContinuousTemporalEvaluation,
11369 action: Action::LifecycleAdmin,
11370 cancellable: true,
11371 mutation: "catalog_submit",
11372 },
11373 CommandContract {
11374 command: Command::ReadContinuousTemporalEvidence,
11375 action: Action::DataRead,
11376 cancellable: true,
11377 mutation: "read_only",
11378 },
11379 CommandContract {
11380 command: Command::ValidateSearch,
11381 action: Action::DataRead,
11382 cancellable: true,
11383 mutation: "read_only",
11384 },
11385 CommandContract {
11386 command: Command::OpenPit,
11387 action: Action::DataRead,
11388 cancellable: true,
11389 mutation: "authority_submit",
11390 },
11391 CommandContract {
11392 command: Command::RenewPit,
11393 action: Action::DataRead,
11394 cancellable: true,
11395 mutation: "authority_submit",
11396 },
11397 CommandContract {
11398 command: Command::ClosePit,
11399 action: Action::DataRead,
11400 cancellable: true,
11401 mutation: "authority_submit",
11402 },
11403 CommandContract {
11404 command: Command::ListOperations,
11405 action: Action::OperationRead,
11406 cancellable: true,
11407 mutation: "read_only",
11408 },
11409 CommandContract {
11410 command: Command::GetOperation,
11411 action: Action::OperationRead,
11412 cancellable: true,
11413 mutation: "read_only",
11414 },
11415 CommandContract {
11416 command: Command::WaitOperation,
11417 action: Action::OperationRead,
11418 cancellable: true,
11419 mutation: "read_only",
11420 },
11421 CommandContract {
11422 command: Command::CancelOperation,
11423 action: Action::OperationCancel,
11424 cancellable: true,
11425 mutation: "authority_submit",
11426 },
11427 CommandContract {
11428 command: Command::ListAuditEvents,
11429 action: Action::AuditRead,
11430 cancellable: true,
11431 mutation: "read_only",
11432 },
11433 CommandContract {
11434 command: Command::ExportAuditEvents,
11435 action: Action::AuditRead,
11436 cancellable: true,
11437 mutation: "read_only",
11438 },
11439 CommandContract {
11440 command: Command::ReserveServiceCredential,
11441 action: Action::SecurityAdmin,
11442 cancellable: true,
11443 mutation: "security_reserve",
11444 },
11445 CommandContract {
11446 command: Command::ReserveServiceCredentialRotation,
11447 action: Action::SecurityAdmin,
11448 cancellable: true,
11449 mutation: "security_reserve",
11450 },
11451 CommandContract {
11452 command: Command::ActivateServiceCredential,
11453 action: Action::SecurityAdmin,
11454 cancellable: true,
11455 mutation: "security_submit",
11456 },
11457 CommandContract {
11458 command: Command::ResolveServiceCredentialReservation,
11459 action: Action::SecurityRead,
11460 cancellable: true,
11461 mutation: "read_only",
11462 },
11463 CommandContract {
11464 command: Command::PrepareRevokeServiceCredential,
11465 action: Action::SecurityAdmin,
11466 cancellable: true,
11467 mutation: "read_only_prepare",
11468 },
11469 CommandContract {
11470 command: Command::RevokeServiceCredential,
11471 action: Action::SecurityAdmin,
11472 cancellable: true,
11473 mutation: "security_submit",
11474 },
11475 CommandContract {
11476 command: Command::ResolveSecurityAction,
11477 action: Action::SecurityRead,
11478 cancellable: true,
11479 mutation: "read_only",
11480 },
11481 CommandContract {
11482 command: Command::GetSecurityRole,
11483 action: Action::SecurityRead,
11484 cancellable: true,
11485 mutation: "read_only",
11486 },
11487 CommandContract {
11488 command: Command::PrepareRoleAppendAccessChange,
11489 action: Action::SecurityAdmin,
11490 cancellable: true,
11491 mutation: "read_only_prepare",
11492 },
11493 CommandContract {
11494 command: Command::SubmitRoleAppendAccessChange,
11495 action: Action::SecurityAdmin,
11496 cancellable: true,
11497 mutation: "security_submit",
11498 },
11499 CommandContract {
11500 command: Command::ListServiceCredentials,
11501 action: Action::SecurityRead,
11502 cancellable: true,
11503 mutation: "read_only",
11504 },
11505 CommandContract {
11506 command: Command::GetRuntimeStatus,
11507 action: Action::CatalogRead,
11508 cancellable: true,
11509 mutation: "read_only",
11510 },
11511 CommandContract {
11512 command: Command::GetResultCacheStatus,
11513 action: Action::CatalogRead,
11514 cancellable: true,
11515 mutation: "read_only",
11516 },
11517 CommandContract {
11518 command: Command::GetFieldPromotionStatus,
11519 action: Action::CatalogRead,
11520 cancellable: true,
11521 mutation: "read_only",
11522 },
11523 CommandContract {
11524 command: Command::GetOverloadStatus,
11525 action: Action::CatalogRead,
11526 cancellable: true,
11527 mutation: "read_only",
11528 },
11529 CommandContract {
11530 command: Command::ConfigureExternalKey,
11531 action: Action::LifecycleAdmin,
11532 cancellable: true,
11533 mutation: "authority_submit",
11534 },
11535 CommandContract {
11536 command: Command::RotateExternalKeyBinding,
11537 action: Action::LifecycleAdmin,
11538 cancellable: true,
11539 mutation: "authority_submit",
11540 },
11541 CommandContract {
11542 command: Command::ConfigureAggregateThenDelete,
11543 action: Action::LifecycleAdmin,
11544 cancellable: true,
11545 mutation: "authority_submit",
11546 },
11547 CommandContract {
11548 command: Command::GetLifecycleStatus,
11549 action: Action::CatalogRead,
11550 cancellable: true,
11551 mutation: "read_only",
11552 },
11553 CommandContract {
11554 command: Command::GetQuota,
11555 action: Action::QuotaRead,
11556 cancellable: true,
11557 mutation: "read_only",
11558 },
11559 CommandContract {
11560 command: Command::UpdateQuota,
11561 action: Action::QuotaAdmin,
11562 cancellable: true,
11563 mutation: "quota_submit",
11564 },
11565 CommandContract {
11566 command: Command::GetBinding,
11567 action: Action::BindingRead,
11568 cancellable: true,
11569 mutation: "read_only",
11570 },
11571 CommandContract {
11572 command: Command::GetAdmissionStatus,
11573 action: Action::AdmissionRead,
11574 cancellable: true,
11575 mutation: "read_only",
11576 },
11577 CommandContract {
11578 command: Command::SetAdmission,
11579 action: Action::AdmissionAdmin,
11580 cancellable: true,
11581 mutation: "admission_submit",
11582 },
11583 CommandContract {
11584 command: Command::GetQuiesceStatus,
11585 action: Action::AdmissionRead,
11586 cancellable: true,
11587 mutation: "read_only",
11588 },
11589 CommandContract {
11590 command: Command::GetDecommissionReadiness,
11591 action: Action::AdmissionRead,
11592 cancellable: true,
11593 mutation: "read_only",
11594 },
11595 CommandContract {
11596 command: Command::GetUpgradeReadiness,
11597 action: Action::TaskRead,
11598 cancellable: true,
11599 mutation: "read_only",
11600 },
11601 CommandContract {
11602 command: Command::GetMaintenanceStatus,
11603 action: Action::TaskRead,
11604 cancellable: true,
11605 mutation: "read_only",
11606 },
11607 CommandContract {
11608 command: Command::WarmVectorIndex,
11609 action: Action::DataRead,
11610 cancellable: true,
11611 mutation: "read_only",
11612 },
11613 CommandContract {
11614 command: Command::EvaluateVectorRecall,
11615 action: Action::DiagnosticsCreate,
11616 cancellable: true,
11617 mutation: "diagnostic_submit",
11618 },
11619 CommandContract {
11620 command: Command::CalibrateVectorStrategy,
11621 action: Action::DiagnosticsCreate,
11622 cancellable: true,
11623 mutation: "diagnostic_submit",
11624 },
11625 CommandContract {
11626 command: Command::GetVectorDiagnostic,
11627 action: Action::DiagnosticsRead,
11628 cancellable: true,
11629 mutation: "read_only",
11630 },
11631 CommandContract {
11632 command: Command::CreateDiagnostic,
11633 action: Action::DiagnosticsCreate,
11634 cancellable: true,
11635 mutation: "diagnostic_submit",
11636 },
11637 CommandContract {
11638 command: Command::GetDiagnostic,
11639 action: Action::DiagnosticsRead,
11640 cancellable: true,
11641 mutation: "read_only",
11642 },
11643 CommandContract {
11644 command: Command::PrepareCollectionExport,
11645 action: Action::CollectionExport,
11646 cancellable: true,
11647 mutation: "read_only_prepare",
11648 },
11649 CommandContract {
11650 command: Command::StartCollectionExport,
11651 action: Action::CollectionExport,
11652 cancellable: true,
11653 mutation: "portability_submit",
11654 },
11655 CommandContract {
11656 command: Command::ResolveCollectionExport,
11657 action: Action::CollectionExport,
11658 cancellable: true,
11659 mutation: "read_only",
11660 },
11661 CommandContract {
11662 command: Command::VerifyCollectionExport,
11663 action: Action::CollectionExport,
11664 cancellable: true,
11665 mutation: "read_only",
11666 },
11667 CommandContract {
11668 command: Command::PrepareCollectionExportRetirement,
11669 action: Action::CollectionExport,
11670 cancellable: true,
11671 mutation: "read_only_prepare",
11672 },
11673 CommandContract {
11674 command: Command::StartCollectionExportRetirement,
11675 action: Action::CollectionExport,
11676 cancellable: true,
11677 mutation: "portability_submit",
11678 },
11679 CommandContract {
11680 command: Command::ResolveCollectionExportRetirement,
11681 action: Action::CollectionExport,
11682 cancellable: true,
11683 mutation: "read_only",
11684 },
11685 CommandContract {
11686 command: Command::PrepareCollectionRestore,
11687 action: Action::CollectionRestore,
11688 cancellable: true,
11689 mutation: "read_only_prepare",
11690 },
11691 CommandContract {
11692 command: Command::StartCollectionRestore,
11693 action: Action::CollectionRestore,
11694 cancellable: true,
11695 mutation: "portability_submit",
11696 },
11697 CommandContract {
11698 command: Command::ResolveCollectionRestore,
11699 action: Action::CollectionRestore,
11700 cancellable: true,
11701 mutation: "read_only",
11702 },
11703 CommandContract {
11704 command: Command::PrepareCollectionTransferExport,
11705 action: Action::CollectionTransferExport,
11706 cancellable: true,
11707 mutation: "read_only_prepare",
11708 },
11709 CommandContract {
11710 command: Command::StartCollectionTransferExport,
11711 action: Action::CollectionTransferExport,
11712 cancellable: true,
11713 mutation: "portability_submit",
11714 },
11715 CommandContract {
11716 command: Command::ResolveCollectionTransferExport,
11717 action: Action::CollectionTransferExport,
11718 cancellable: true,
11719 mutation: "read_only",
11720 },
11721 CommandContract {
11722 command: Command::PrepareCollectionTransferRestore,
11723 action: Action::CollectionTransferRestore,
11724 cancellable: true,
11725 mutation: "read_only_prepare",
11726 },
11727 CommandContract {
11728 command: Command::StartCollectionTransferRestore,
11729 action: Action::CollectionTransferRestore,
11730 cancellable: true,
11731 mutation: "portability_submit",
11732 },
11733 CommandContract {
11734 command: Command::ResolveCollectionTransferRestore,
11735 action: Action::CollectionTransferRestore,
11736 cancellable: true,
11737 mutation: "read_only",
11738 },
11739 CommandContract {
11740 command: Command::PrepareIndexExport,
11741 action: Action::IndexExport,
11742 cancellable: true,
11743 mutation: "read_only_prepare",
11744 },
11745 CommandContract {
11746 command: Command::StartIndexExport,
11747 action: Action::IndexExport,
11748 cancellable: true,
11749 mutation: "portability_submit",
11750 },
11751 CommandContract {
11752 command: Command::ResolveIndexExport,
11753 action: Action::IndexExport,
11754 cancellable: true,
11755 mutation: "read_only",
11756 },
11757 CommandContract {
11758 command: Command::VerifyIndexExport,
11759 action: Action::IndexExport,
11760 cancellable: true,
11761 mutation: "read_only",
11762 },
11763 CommandContract {
11764 command: Command::PrepareIndexImport,
11765 action: Action::IndexImport,
11766 cancellable: true,
11767 mutation: "read_only_prepare",
11768 },
11769 CommandContract {
11770 command: Command::StartIndexImport,
11771 action: Action::IndexImport,
11772 cancellable: true,
11773 mutation: "portability_submit",
11774 },
11775 CommandContract {
11776 command: Command::ResolveIndexImport,
11777 action: Action::IndexImport,
11778 cancellable: true,
11779 mutation: "read_only",
11780 },
11781 CommandContract {
11782 command: Command::ReadArtifactChunk,
11783 action: Action::OperationRead,
11784 cancellable: true,
11785 mutation: "read_only",
11786 },
11787 CommandContract {
11788 command: Command::ExportUsage,
11789 action: Action::UsageRead,
11790 cancellable: true,
11791 mutation: "read_only",
11792 },
11793 CommandContract {
11794 command: Command::ReadLogicalOccupancy,
11795 action: Action::UsageRead,
11796 cancellable: true,
11797 mutation: "read_only",
11798 },
11799 CommandContract {
11800 command: Command::ExecuteStateRead,
11801 action: Action::DataRead,
11802 cancellable: true,
11803 mutation: "read_only",
11804 },
11805 CommandContract {
11806 command: Command::PrepareStateWrite,
11807 action: Action::DataWrite,
11808 cancellable: true,
11809 mutation: "read_only_prepare",
11810 },
11811 CommandContract {
11812 command: Command::SubmitStateWrite,
11813 action: Action::DataWrite,
11814 cancellable: true,
11815 mutation: "state_submit",
11816 },
11817 CommandContract {
11818 command: Command::ResolveStateWrite,
11819 action: Action::DataRead,
11820 cancellable: true,
11821 mutation: "read_only",
11822 },
11823];
11824#[derive(Clone, Copy, Debug, Eq, PartialEq)]
11825pub struct CommandSemanticContract {
11826 pub command: Command,
11827 pub admissible_errors: &'static [ErrorCode],
11828 pub limit_ids: &'static [&'static str],
11829 pub effect_class: &'static str,
11830 pub risk_flags: &'static [&'static str],
11831 pub capability_family: &'static str,
11832 pub retry_safety: &'static str,
11833 pub identity_requirement: &'static str,
11834 pub resolver: Option<Command>,
11835 pub cancellation: &'static str,
11836 pub side_effects: &'static [&'static str],
11837 pub recovery: &'static str,
11838 pub collection_index_ref: &'static str,
11839}
11840pub const LODESTONE_API_COMMAND_SEMANTICS: &[CommandSemanticContract] = &[
11841 CommandSemanticContract {
11842 command: Command::Discover,
11843 admissible_errors: &[
11844 ErrorCode::Aborted,
11845 ErrorCode::DeadlineExceeded,
11846 ErrorCode::InvalidRequest,
11847 ErrorCode::UnsupportedVersion,
11848 ErrorCode::Unauthenticated,
11849 ErrorCode::PermissionDenied,
11850 ErrorCode::NotFound,
11851 ErrorCode::LimitExceeded,
11852 ErrorCode::CapabilityUnavailable,
11853 ErrorCode::TemporarilyUnavailable,
11854 ErrorCode::Internal,
11855 ],
11856 limit_ids: &["request_bytes", "response_bytes"],
11857 effect_class: "read_only",
11858 risk_flags: &[],
11859 capability_family: "discovery",
11860 retry_safety: "safe",
11861 identity_requirement: "none",
11862 resolver: None,
11863 cancellation: "per_call",
11864 side_effects: &[],
11865 recovery: "retry",
11866 collection_index_ref: "none",
11867 },
11868 CommandSemanticContract {
11869 command: Command::ListIndexes,
11870 admissible_errors: &[
11871 ErrorCode::Aborted,
11872 ErrorCode::DeadlineExceeded,
11873 ErrorCode::InvalidRequest,
11874 ErrorCode::UnsupportedVersion,
11875 ErrorCode::Unauthenticated,
11876 ErrorCode::PermissionDenied,
11877 ErrorCode::NotFound,
11878 ErrorCode::StaleCursor,
11879 ErrorCode::RestartBudgetExhausted,
11880 ErrorCode::LimitExceeded,
11881 ErrorCode::CapabilityUnavailable,
11882 ErrorCode::TemporarilyUnavailable,
11883 ErrorCode::Internal,
11884 ],
11885 limit_ids: &[
11886 "request_bytes",
11887 "response_bytes",
11888 "page_size",
11889 "catalog_page_size",
11890 "catalog_restart_budget",
11891 ],
11892 effect_class: "read_only",
11893 risk_flags: &[],
11894 capability_family: "catalog",
11895 retry_safety: "safe",
11896 identity_requirement: "none",
11897 resolver: None,
11898 cancellation: "per_call",
11899 side_effects: &[],
11900 recovery: "retry",
11901 collection_index_ref: "none",
11902 },
11903 CommandSemanticContract {
11904 command: Command::GetIndex,
11905 admissible_errors: &[
11906 ErrorCode::Aborted,
11907 ErrorCode::DeadlineExceeded,
11908 ErrorCode::InvalidRequest,
11909 ErrorCode::UnsupportedVersion,
11910 ErrorCode::Unauthenticated,
11911 ErrorCode::PermissionDenied,
11912 ErrorCode::NotFound,
11913 ErrorCode::LimitExceeded,
11914 ErrorCode::CapabilityUnavailable,
11915 ErrorCode::TemporarilyUnavailable,
11916 ErrorCode::Internal,
11917 ],
11918 limit_ids: &["request_bytes", "response_bytes"],
11919 effect_class: "read_only",
11920 risk_flags: &[],
11921 capability_family: "catalog",
11922 retry_safety: "safe",
11923 identity_requirement: "none",
11924 resolver: None,
11925 cancellation: "per_call",
11926 side_effects: &[],
11927 recovery: "retry",
11928 collection_index_ref: "none",
11929 },
11930 CommandSemanticContract {
11931 command: Command::ValidateIndexChange,
11932 admissible_errors: &[
11933 ErrorCode::Aborted,
11934 ErrorCode::DeadlineExceeded,
11935 ErrorCode::InvalidRequest,
11936 ErrorCode::UnsupportedVersion,
11937 ErrorCode::Unauthenticated,
11938 ErrorCode::PermissionDenied,
11939 ErrorCode::NotFound,
11940 ErrorCode::LimitExceeded,
11941 ErrorCode::CapabilityUnavailable,
11942 ErrorCode::TemporarilyUnavailable,
11943 ErrorCode::Internal,
11944 ],
11945 limit_ids: &["request_bytes", "response_bytes"],
11946 effect_class: "read_only",
11947 risk_flags: &[],
11948 capability_family: "catalog",
11949 retry_safety: "safe",
11950 identity_requirement: "none",
11951 resolver: None,
11952 cancellation: "per_call",
11953 side_effects: &[],
11954 recovery: "retry",
11955 collection_index_ref: "request_name",
11956 },
11957 CommandSemanticContract {
11958 command: Command::ApplyIndexChange,
11959 admissible_errors: &[
11960 ErrorCode::Aborted,
11961 ErrorCode::DeadlineExceeded,
11962 ErrorCode::InvalidRequest,
11963 ErrorCode::UnsupportedVersion,
11964 ErrorCode::Unauthenticated,
11965 ErrorCode::PermissionDenied,
11966 ErrorCode::NotFound,
11967 ErrorCode::Conflict,
11968 ErrorCode::LimitExceeded,
11969 ErrorCode::CapabilityUnavailable,
11970 ErrorCode::NotSubmitted,
11971 ErrorCode::SubmittedIndeterminate,
11972 ErrorCode::ExpiredUnknown,
11973 ErrorCode::TemporarilyUnavailable,
11974 ErrorCode::Internal,
11975 ],
11976 limit_ids: &["request_bytes", "response_bytes"],
11977 effect_class: "durable_submit",
11978 risk_flags: &[],
11979 capability_family: "catalog",
11980 retry_safety: "safe",
11981 identity_requirement: "caller_action_id",
11982 resolver: Some(Command::ResolveIndexChange),
11983 cancellation: "per_call_until_submission_then_resolve",
11984 side_effects: &["commits_authoritative_state"],
11985 recovery: "resolve_with_resolve_index_change",
11986 collection_index_ref: "request_index",
11987 },
11988 CommandSemanticContract {
11989 command: Command::ResolveIndexChange,
11990 admissible_errors: &[
11991 ErrorCode::Aborted,
11992 ErrorCode::DeadlineExceeded,
11993 ErrorCode::InvalidRequest,
11994 ErrorCode::UnsupportedVersion,
11995 ErrorCode::Unauthenticated,
11996 ErrorCode::PermissionDenied,
11997 ErrorCode::NotFound,
11998 ErrorCode::LimitExceeded,
11999 ErrorCode::CapabilityUnavailable,
12000 ErrorCode::TemporarilyUnavailable,
12001 ErrorCode::Internal,
12002 ],
12003 limit_ids: &["request_bytes", "response_bytes"],
12004 effect_class: "read_only",
12005 risk_flags: &[],
12006 capability_family: "catalog",
12007 retry_safety: "safe",
12008 identity_requirement: "caller_action_id",
12009 resolver: None,
12010 cancellation: "per_call",
12011 side_effects: &[],
12012 recovery: "retry",
12013 collection_index_ref: "request_index",
12014 },
12015 CommandSemanticContract {
12016 command: Command::ApplyAdministrationMutation,
12017 admissible_errors: &[
12018 ErrorCode::Aborted,
12019 ErrorCode::DeadlineExceeded,
12020 ErrorCode::InvalidRequest,
12021 ErrorCode::UnsupportedVersion,
12022 ErrorCode::Unauthenticated,
12023 ErrorCode::PermissionDenied,
12024 ErrorCode::NotFound,
12025 ErrorCode::Conflict,
12026 ErrorCode::LimitExceeded,
12027 ErrorCode::CapabilityUnavailable,
12028 ErrorCode::NotSubmitted,
12029 ErrorCode::SubmittedIndeterminate,
12030 ErrorCode::ExpiredUnknown,
12031 ErrorCode::TemporarilyUnavailable,
12032 ErrorCode::Internal,
12033 ],
12034 limit_ids: &["request_bytes", "response_bytes"],
12035 effect_class: "control_write",
12036 risk_flags: &[],
12037 capability_family: "lifecycle",
12038 retry_safety: "pre_submit_only",
12039 identity_requirement: "caller_action_id",
12040 resolver: None,
12041 cancellation: "per_call_until_submission_then_resolve",
12042 side_effects: &["commits_authoritative_state"],
12043 recovery: "retry_if_not_submitted",
12044 collection_index_ref: "none",
12045 },
12046 CommandSemanticContract {
12047 command: Command::ListAliases,
12048 admissible_errors: &[
12049 ErrorCode::Aborted,
12050 ErrorCode::DeadlineExceeded,
12051 ErrorCode::InvalidRequest,
12052 ErrorCode::UnsupportedVersion,
12053 ErrorCode::Unauthenticated,
12054 ErrorCode::PermissionDenied,
12055 ErrorCode::NotFound,
12056 ErrorCode::StaleCursor,
12057 ErrorCode::RestartBudgetExhausted,
12058 ErrorCode::LimitExceeded,
12059 ErrorCode::CapabilityUnavailable,
12060 ErrorCode::TemporarilyUnavailable,
12061 ErrorCode::Internal,
12062 ],
12063 limit_ids: &[
12064 "request_bytes",
12065 "response_bytes",
12066 "page_size",
12067 "catalog_page_size",
12068 "catalog_restart_budget",
12069 ],
12070 effect_class: "read_only",
12071 risk_flags: &[],
12072 capability_family: "catalog",
12073 retry_safety: "safe",
12074 identity_requirement: "none",
12075 resolver: None,
12076 cancellation: "per_call",
12077 side_effects: &[],
12078 recovery: "retry",
12079 collection_index_ref: "none",
12080 },
12081 CommandSemanticContract {
12082 command: Command::GetAlias,
12083 admissible_errors: &[
12084 ErrorCode::Aborted,
12085 ErrorCode::DeadlineExceeded,
12086 ErrorCode::InvalidRequest,
12087 ErrorCode::UnsupportedVersion,
12088 ErrorCode::Unauthenticated,
12089 ErrorCode::PermissionDenied,
12090 ErrorCode::NotFound,
12091 ErrorCode::LimitExceeded,
12092 ErrorCode::CapabilityUnavailable,
12093 ErrorCode::TemporarilyUnavailable,
12094 ErrorCode::Internal,
12095 ],
12096 limit_ids: &["request_bytes", "response_bytes"],
12097 effect_class: "read_only",
12098 risk_flags: &[],
12099 capability_family: "catalog",
12100 retry_safety: "safe",
12101 identity_requirement: "none",
12102 resolver: None,
12103 cancellation: "per_call",
12104 side_effects: &[],
12105 recovery: "retry",
12106 collection_index_ref: "none",
12107 },
12108 CommandSemanticContract {
12109 command: Command::ListDataStreams,
12110 admissible_errors: &[
12111 ErrorCode::Aborted,
12112 ErrorCode::DeadlineExceeded,
12113 ErrorCode::InvalidRequest,
12114 ErrorCode::UnsupportedVersion,
12115 ErrorCode::Unauthenticated,
12116 ErrorCode::PermissionDenied,
12117 ErrorCode::NotFound,
12118 ErrorCode::StaleCursor,
12119 ErrorCode::RestartBudgetExhausted,
12120 ErrorCode::LimitExceeded,
12121 ErrorCode::CapabilityUnavailable,
12122 ErrorCode::TemporarilyUnavailable,
12123 ErrorCode::Internal,
12124 ],
12125 limit_ids: &[
12126 "request_bytes",
12127 "response_bytes",
12128 "page_size",
12129 "catalog_page_size",
12130 "catalog_restart_budget",
12131 ],
12132 effect_class: "read_only",
12133 risk_flags: &[],
12134 capability_family: "catalog",
12135 retry_safety: "safe",
12136 identity_requirement: "none",
12137 resolver: None,
12138 cancellation: "per_call",
12139 side_effects: &[],
12140 recovery: "retry",
12141 collection_index_ref: "none",
12142 },
12143 CommandSemanticContract {
12144 command: Command::GetDataStream,
12145 admissible_errors: &[
12146 ErrorCode::Aborted,
12147 ErrorCode::DeadlineExceeded,
12148 ErrorCode::InvalidRequest,
12149 ErrorCode::UnsupportedVersion,
12150 ErrorCode::Unauthenticated,
12151 ErrorCode::PermissionDenied,
12152 ErrorCode::NotFound,
12153 ErrorCode::LimitExceeded,
12154 ErrorCode::CapabilityUnavailable,
12155 ErrorCode::TemporarilyUnavailable,
12156 ErrorCode::Internal,
12157 ],
12158 limit_ids: &["request_bytes", "response_bytes"],
12159 effect_class: "read_only",
12160 risk_flags: &[],
12161 capability_family: "catalog",
12162 retry_safety: "safe",
12163 identity_requirement: "none",
12164 resolver: None,
12165 cancellation: "per_call",
12166 side_effects: &[],
12167 recovery: "retry",
12168 collection_index_ref: "none",
12169 },
12170 CommandSemanticContract {
12171 command: Command::ListComponentTemplates,
12172 admissible_errors: &[
12173 ErrorCode::Aborted,
12174 ErrorCode::DeadlineExceeded,
12175 ErrorCode::InvalidRequest,
12176 ErrorCode::UnsupportedVersion,
12177 ErrorCode::Unauthenticated,
12178 ErrorCode::PermissionDenied,
12179 ErrorCode::NotFound,
12180 ErrorCode::StaleCursor,
12181 ErrorCode::RestartBudgetExhausted,
12182 ErrorCode::LimitExceeded,
12183 ErrorCode::CapabilityUnavailable,
12184 ErrorCode::TemporarilyUnavailable,
12185 ErrorCode::Internal,
12186 ],
12187 limit_ids: &[
12188 "request_bytes",
12189 "response_bytes",
12190 "page_size",
12191 "catalog_page_size",
12192 "catalog_restart_budget",
12193 ],
12194 effect_class: "read_only",
12195 risk_flags: &[],
12196 capability_family: "catalog",
12197 retry_safety: "safe",
12198 identity_requirement: "none",
12199 resolver: None,
12200 cancellation: "per_call",
12201 side_effects: &[],
12202 recovery: "retry",
12203 collection_index_ref: "none",
12204 },
12205 CommandSemanticContract {
12206 command: Command::GetComponentTemplate,
12207 admissible_errors: &[
12208 ErrorCode::Aborted,
12209 ErrorCode::DeadlineExceeded,
12210 ErrorCode::InvalidRequest,
12211 ErrorCode::UnsupportedVersion,
12212 ErrorCode::Unauthenticated,
12213 ErrorCode::PermissionDenied,
12214 ErrorCode::NotFound,
12215 ErrorCode::LimitExceeded,
12216 ErrorCode::CapabilityUnavailable,
12217 ErrorCode::TemporarilyUnavailable,
12218 ErrorCode::Internal,
12219 ],
12220 limit_ids: &["request_bytes", "response_bytes"],
12221 effect_class: "read_only",
12222 risk_flags: &[],
12223 capability_family: "catalog",
12224 retry_safety: "safe",
12225 identity_requirement: "none",
12226 resolver: None,
12227 cancellation: "per_call",
12228 side_effects: &[],
12229 recovery: "retry",
12230 collection_index_ref: "none",
12231 },
12232 CommandSemanticContract {
12233 command: Command::ListIndexTemplates,
12234 admissible_errors: &[
12235 ErrorCode::Aborted,
12236 ErrorCode::DeadlineExceeded,
12237 ErrorCode::InvalidRequest,
12238 ErrorCode::UnsupportedVersion,
12239 ErrorCode::Unauthenticated,
12240 ErrorCode::PermissionDenied,
12241 ErrorCode::NotFound,
12242 ErrorCode::StaleCursor,
12243 ErrorCode::RestartBudgetExhausted,
12244 ErrorCode::LimitExceeded,
12245 ErrorCode::CapabilityUnavailable,
12246 ErrorCode::TemporarilyUnavailable,
12247 ErrorCode::Internal,
12248 ],
12249 limit_ids: &[
12250 "request_bytes",
12251 "response_bytes",
12252 "page_size",
12253 "catalog_page_size",
12254 "catalog_restart_budget",
12255 ],
12256 effect_class: "read_only",
12257 risk_flags: &[],
12258 capability_family: "catalog",
12259 retry_safety: "safe",
12260 identity_requirement: "none",
12261 resolver: None,
12262 cancellation: "per_call",
12263 side_effects: &[],
12264 recovery: "retry",
12265 collection_index_ref: "none",
12266 },
12267 CommandSemanticContract {
12268 command: Command::GetIndexTemplate,
12269 admissible_errors: &[
12270 ErrorCode::Aborted,
12271 ErrorCode::DeadlineExceeded,
12272 ErrorCode::InvalidRequest,
12273 ErrorCode::UnsupportedVersion,
12274 ErrorCode::Unauthenticated,
12275 ErrorCode::PermissionDenied,
12276 ErrorCode::NotFound,
12277 ErrorCode::LimitExceeded,
12278 ErrorCode::CapabilityUnavailable,
12279 ErrorCode::TemporarilyUnavailable,
12280 ErrorCode::Internal,
12281 ],
12282 limit_ids: &["request_bytes", "response_bytes"],
12283 effect_class: "read_only",
12284 risk_flags: &[],
12285 capability_family: "catalog",
12286 retry_safety: "safe",
12287 identity_requirement: "none",
12288 resolver: None,
12289 cancellation: "per_call",
12290 side_effects: &[],
12291 recovery: "retry",
12292 collection_index_ref: "none",
12293 },
12294 CommandSemanticContract {
12295 command: Command::ListIngestPipelines,
12296 admissible_errors: &[
12297 ErrorCode::Aborted,
12298 ErrorCode::DeadlineExceeded,
12299 ErrorCode::InvalidRequest,
12300 ErrorCode::UnsupportedVersion,
12301 ErrorCode::Unauthenticated,
12302 ErrorCode::PermissionDenied,
12303 ErrorCode::NotFound,
12304 ErrorCode::StaleCursor,
12305 ErrorCode::RestartBudgetExhausted,
12306 ErrorCode::LimitExceeded,
12307 ErrorCode::CapabilityUnavailable,
12308 ErrorCode::TemporarilyUnavailable,
12309 ErrorCode::Internal,
12310 ],
12311 limit_ids: &[
12312 "request_bytes",
12313 "response_bytes",
12314 "page_size",
12315 "catalog_page_size",
12316 "catalog_restart_budget",
12317 ],
12318 effect_class: "read_only",
12319 risk_flags: &[],
12320 capability_family: "lifecycle",
12321 retry_safety: "safe",
12322 identity_requirement: "none",
12323 resolver: None,
12324 cancellation: "per_call",
12325 side_effects: &[],
12326 recovery: "retry",
12327 collection_index_ref: "none",
12328 },
12329 CommandSemanticContract {
12330 command: Command::GetIngestPipeline,
12331 admissible_errors: &[
12332 ErrorCode::Aborted,
12333 ErrorCode::DeadlineExceeded,
12334 ErrorCode::InvalidRequest,
12335 ErrorCode::UnsupportedVersion,
12336 ErrorCode::Unauthenticated,
12337 ErrorCode::PermissionDenied,
12338 ErrorCode::NotFound,
12339 ErrorCode::LimitExceeded,
12340 ErrorCode::CapabilityUnavailable,
12341 ErrorCode::TemporarilyUnavailable,
12342 ErrorCode::Internal,
12343 ],
12344 limit_ids: &["request_bytes", "response_bytes"],
12345 effect_class: "read_only",
12346 risk_flags: &[],
12347 capability_family: "lifecycle",
12348 retry_safety: "safe",
12349 identity_requirement: "none",
12350 resolver: None,
12351 cancellation: "per_call",
12352 side_effects: &[],
12353 recovery: "retry",
12354 collection_index_ref: "none",
12355 },
12356 CommandSemanticContract {
12357 command: Command::SimulateIngestPipeline,
12358 admissible_errors: &[
12359 ErrorCode::Aborted,
12360 ErrorCode::DeadlineExceeded,
12361 ErrorCode::InvalidRequest,
12362 ErrorCode::UnsupportedVersion,
12363 ErrorCode::Unauthenticated,
12364 ErrorCode::PermissionDenied,
12365 ErrorCode::NotFound,
12366 ErrorCode::LimitExceeded,
12367 ErrorCode::CapabilityUnavailable,
12368 ErrorCode::TemporarilyUnavailable,
12369 ErrorCode::Internal,
12370 ],
12371 limit_ids: &["request_bytes", "response_bytes"],
12372 effect_class: "read_only",
12373 risk_flags: &[],
12374 capability_family: "lifecycle",
12375 retry_safety: "safe",
12376 identity_requirement: "none",
12377 resolver: None,
12378 cancellation: "per_call",
12379 side_effects: &[],
12380 recovery: "retry",
12381 collection_index_ref: "none",
12382 },
12383 CommandSemanticContract {
12384 command: Command::ReprocessByQuery,
12385 admissible_errors: &[
12386 ErrorCode::Aborted,
12387 ErrorCode::DeadlineExceeded,
12388 ErrorCode::InvalidRequest,
12389 ErrorCode::UnsupportedVersion,
12390 ErrorCode::Unauthenticated,
12391 ErrorCode::PermissionDenied,
12392 ErrorCode::NotFound,
12393 ErrorCode::Conflict,
12394 ErrorCode::LimitExceeded,
12395 ErrorCode::CapabilityUnavailable,
12396 ErrorCode::NotSubmitted,
12397 ErrorCode::SubmittedIndeterminate,
12398 ErrorCode::ExpiredUnknown,
12399 ErrorCode::TemporarilyUnavailable,
12400 ErrorCode::Internal,
12401 ],
12402 limit_ids: &["request_bytes", "response_bytes"],
12403 effect_class: "durable_submit",
12404 risk_flags: &[],
12405 capability_family: "data",
12406 retry_safety: "safe",
12407 identity_requirement: "caller_action_id",
12408 resolver: None,
12409 cancellation: "per_call_until_submission_then_resolve",
12410 side_effects: &["commits_authoritative_state"],
12411 recovery: "retry",
12412 collection_index_ref: "request_index",
12413 },
12414 CommandSemanticContract {
12415 command: Command::ListLifecyclePolicies,
12416 admissible_errors: &[
12417 ErrorCode::Aborted,
12418 ErrorCode::DeadlineExceeded,
12419 ErrorCode::InvalidRequest,
12420 ErrorCode::UnsupportedVersion,
12421 ErrorCode::Unauthenticated,
12422 ErrorCode::PermissionDenied,
12423 ErrorCode::NotFound,
12424 ErrorCode::StaleCursor,
12425 ErrorCode::RestartBudgetExhausted,
12426 ErrorCode::LimitExceeded,
12427 ErrorCode::CapabilityUnavailable,
12428 ErrorCode::TemporarilyUnavailable,
12429 ErrorCode::Internal,
12430 ],
12431 limit_ids: &[
12432 "request_bytes",
12433 "response_bytes",
12434 "page_size",
12435 "catalog_page_size",
12436 "catalog_restart_budget",
12437 ],
12438 effect_class: "read_only",
12439 risk_flags: &[],
12440 capability_family: "catalog",
12441 retry_safety: "safe",
12442 identity_requirement: "none",
12443 resolver: None,
12444 cancellation: "per_call",
12445 side_effects: &[],
12446 recovery: "retry",
12447 collection_index_ref: "none",
12448 },
12449 CommandSemanticContract {
12450 command: Command::GetLifecyclePolicy,
12451 admissible_errors: &[
12452 ErrorCode::Aborted,
12453 ErrorCode::DeadlineExceeded,
12454 ErrorCode::InvalidRequest,
12455 ErrorCode::UnsupportedVersion,
12456 ErrorCode::Unauthenticated,
12457 ErrorCode::PermissionDenied,
12458 ErrorCode::NotFound,
12459 ErrorCode::LimitExceeded,
12460 ErrorCode::CapabilityUnavailable,
12461 ErrorCode::TemporarilyUnavailable,
12462 ErrorCode::Internal,
12463 ],
12464 limit_ids: &["request_bytes", "response_bytes"],
12465 effect_class: "read_only",
12466 risk_flags: &[],
12467 capability_family: "catalog",
12468 retry_safety: "safe",
12469 identity_requirement: "none",
12470 resolver: None,
12471 cancellation: "per_call",
12472 side_effects: &[],
12473 recovery: "retry",
12474 collection_index_ref: "none",
12475 },
12476 CommandSemanticContract {
12477 command: Command::PrepareCreateIndex,
12478 admissible_errors: &[
12479 ErrorCode::Aborted,
12480 ErrorCode::DeadlineExceeded,
12481 ErrorCode::InvalidRequest,
12482 ErrorCode::UnsupportedVersion,
12483 ErrorCode::Unauthenticated,
12484 ErrorCode::PermissionDenied,
12485 ErrorCode::NotFound,
12486 ErrorCode::LimitExceeded,
12487 ErrorCode::CapabilityUnavailable,
12488 ErrorCode::TemporarilyUnavailable,
12489 ErrorCode::Internal,
12490 ],
12491 limit_ids: &[
12492 "request_bytes",
12493 "response_bytes",
12494 "resource_initial_shards",
12495 "resource_target_shard_bytes",
12496 "resource_admission_weight",
12497 "resource_ram_bytes",
12498 "resource_nvme_bytes",
12499 "resource_refresh_millis",
12500 "resource_memtable_bytes",
12501 "resource_parallelism",
12502 ],
12503 effect_class: "prepare",
12504 risk_flags: &[],
12505 capability_family: "catalog",
12506 retry_safety: "safe",
12507 identity_requirement: "server_locator",
12508 resolver: None,
12509 cancellation: "per_call",
12510 side_effects: &["creates_bounded_preparation"],
12511 recovery: "retry",
12512 collection_index_ref: "request_name",
12513 },
12514 CommandSemanticContract {
12515 command: Command::PrepareDeleteIndex,
12516 admissible_errors: &[
12517 ErrorCode::Aborted,
12518 ErrorCode::DeadlineExceeded,
12519 ErrorCode::InvalidRequest,
12520 ErrorCode::UnsupportedVersion,
12521 ErrorCode::Unauthenticated,
12522 ErrorCode::PermissionDenied,
12523 ErrorCode::NotFound,
12524 ErrorCode::LimitExceeded,
12525 ErrorCode::CapabilityUnavailable,
12526 ErrorCode::TemporarilyUnavailable,
12527 ErrorCode::Internal,
12528 ],
12529 limit_ids: &["request_bytes", "response_bytes"],
12530 effect_class: "prepare",
12531 risk_flags: &["destructive"],
12532 capability_family: "catalog",
12533 retry_safety: "safe",
12534 identity_requirement: "server_locator",
12535 resolver: None,
12536 cancellation: "per_call",
12537 side_effects: &["creates_bounded_preparation"],
12538 recovery: "retry",
12539 collection_index_ref: "request_name",
12540 },
12541 CommandSemanticContract {
12542 command: Command::SubmitCatalogAction,
12543 admissible_errors: &[
12544 ErrorCode::Aborted,
12545 ErrorCode::DeadlineExceeded,
12546 ErrorCode::InvalidRequest,
12547 ErrorCode::UnsupportedVersion,
12548 ErrorCode::Unauthenticated,
12549 ErrorCode::PermissionDenied,
12550 ErrorCode::NotFound,
12551 ErrorCode::Conflict,
12552 ErrorCode::LimitExceeded,
12553 ErrorCode::CapabilityUnavailable,
12554 ErrorCode::NotSubmitted,
12555 ErrorCode::SubmittedIndeterminate,
12556 ErrorCode::ExpiredUnknown,
12557 ErrorCode::TemporarilyUnavailable,
12558 ErrorCode::Internal,
12559 ],
12560 limit_ids: &[
12561 "request_bytes",
12562 "response_bytes",
12563 "resource_initial_shards",
12564 "resource_target_shard_bytes",
12565 "resource_admission_weight",
12566 "resource_ram_bytes",
12567 "resource_nvme_bytes",
12568 "resource_refresh_millis",
12569 "resource_memtable_bytes",
12570 "resource_parallelism",
12571 ],
12572 effect_class: "durable_submit",
12573 risk_flags: &[],
12574 capability_family: "catalog",
12575 retry_safety: "pre_submit_only",
12576 identity_requirement: "request_locator",
12577 resolver: Some(Command::ResolveCatalogAction),
12578 cancellation: "per_call_until_submission_then_resolve",
12579 side_effects: &["commits_authoritative_state"],
12580 recovery: "resolve_with_resolve_catalog_action",
12581 collection_index_ref: "request_name",
12582 },
12583 CommandSemanticContract {
12584 command: Command::ResolveCatalogAction,
12585 admissible_errors: &[
12586 ErrorCode::Aborted,
12587 ErrorCode::DeadlineExceeded,
12588 ErrorCode::InvalidRequest,
12589 ErrorCode::UnsupportedVersion,
12590 ErrorCode::Unauthenticated,
12591 ErrorCode::PermissionDenied,
12592 ErrorCode::NotFound,
12593 ErrorCode::LimitExceeded,
12594 ErrorCode::CapabilityUnavailable,
12595 ErrorCode::TemporarilyUnavailable,
12596 ErrorCode::Internal,
12597 ],
12598 limit_ids: &["request_bytes", "response_bytes"],
12599 effect_class: "read_only",
12600 risk_flags: &[],
12601 capability_family: "catalog",
12602 retry_safety: "safe",
12603 identity_requirement: "request_locator",
12604 resolver: None,
12605 cancellation: "per_call",
12606 side_effects: &[],
12607 recovery: "retry",
12608 collection_index_ref: "caller",
12609 },
12610 CommandSemanticContract {
12611 command: Command::PrepareReplayableSourceIndex,
12612 admissible_errors: &[
12613 ErrorCode::Aborted,
12614 ErrorCode::DeadlineExceeded,
12615 ErrorCode::InvalidRequest,
12616 ErrorCode::UnsupportedVersion,
12617 ErrorCode::Unauthenticated,
12618 ErrorCode::PermissionDenied,
12619 ErrorCode::NotFound,
12620 ErrorCode::LimitExceeded,
12621 ErrorCode::CapabilityUnavailable,
12622 ErrorCode::RetentionGap,
12623 ErrorCode::TemporarilyUnavailable,
12624 ErrorCode::Internal,
12625 ],
12626 limit_ids: &[
12627 "request_bytes",
12628 "response_bytes",
12629 "resource_initial_shards",
12630 "resource_target_shard_bytes",
12631 "resource_admission_weight",
12632 "resource_ram_bytes",
12633 "resource_nvme_bytes",
12634 "resource_refresh_millis",
12635 "resource_memtable_bytes",
12636 "resource_parallelism",
12637 ],
12638 effect_class: "prepare",
12639 risk_flags: &[],
12640 capability_family: "catalog",
12641 retry_safety: "safe",
12642 identity_requirement: "server_locator",
12643 resolver: None,
12644 cancellation: "per_call",
12645 side_effects: &["creates_bounded_preparation"],
12646 recovery: "retry",
12647 collection_index_ref: "request_name",
12648 },
12649 CommandSemanticContract {
12650 command: Command::SubmitReplayableSourceIndex,
12651 admissible_errors: &[
12652 ErrorCode::Aborted,
12653 ErrorCode::DeadlineExceeded,
12654 ErrorCode::InvalidRequest,
12655 ErrorCode::UnsupportedVersion,
12656 ErrorCode::Unauthenticated,
12657 ErrorCode::PermissionDenied,
12658 ErrorCode::NotFound,
12659 ErrorCode::Conflict,
12660 ErrorCode::LimitExceeded,
12661 ErrorCode::CapabilityUnavailable,
12662 ErrorCode::NotSubmitted,
12663 ErrorCode::SubmittedIndeterminate,
12664 ErrorCode::ExpiredUnknown,
12665 ErrorCode::RetentionGap,
12666 ErrorCode::TemporarilyUnavailable,
12667 ErrorCode::Internal,
12668 ],
12669 limit_ids: &[
12670 "request_bytes",
12671 "response_bytes",
12672 "resource_initial_shards",
12673 "resource_target_shard_bytes",
12674 "resource_admission_weight",
12675 "resource_ram_bytes",
12676 "resource_nvme_bytes",
12677 "resource_refresh_millis",
12678 "resource_memtable_bytes",
12679 "resource_parallelism",
12680 ],
12681 effect_class: "durable_submit",
12682 risk_flags: &[],
12683 capability_family: "catalog",
12684 retry_safety: "pre_submit_only",
12685 identity_requirement: "request_locator",
12686 resolver: Some(Command::ResolveCatalogAction),
12687 cancellation: "per_call_until_submission_then_resolve",
12688 side_effects: &["commits_authoritative_state"],
12689 recovery: "resolve_with_resolve_catalog_action",
12690 collection_index_ref: "request_name",
12691 },
12692 CommandSemanticContract {
12693 command: Command::GetReplayableSource,
12694 admissible_errors: &[
12695 ErrorCode::Aborted,
12696 ErrorCode::DeadlineExceeded,
12697 ErrorCode::InvalidRequest,
12698 ErrorCode::UnsupportedVersion,
12699 ErrorCode::Unauthenticated,
12700 ErrorCode::PermissionDenied,
12701 ErrorCode::NotFound,
12702 ErrorCode::LimitExceeded,
12703 ErrorCode::CapabilityUnavailable,
12704 ErrorCode::RetentionGap,
12705 ErrorCode::TemporarilyUnavailable,
12706 ErrorCode::Internal,
12707 ],
12708 limit_ids: &["request_bytes", "response_bytes"],
12709 effect_class: "read_only",
12710 risk_flags: &[],
12711 capability_family: "catalog",
12712 retry_safety: "safe",
12713 identity_requirement: "none",
12714 resolver: None,
12715 cancellation: "per_call",
12716 side_effects: &[],
12717 recovery: "retry",
12718 collection_index_ref: "none",
12719 },
12720 CommandSemanticContract {
12721 command: Command::ControlReplayableSource,
12722 admissible_errors: &[
12723 ErrorCode::Aborted,
12724 ErrorCode::DeadlineExceeded,
12725 ErrorCode::InvalidRequest,
12726 ErrorCode::UnsupportedVersion,
12727 ErrorCode::Unauthenticated,
12728 ErrorCode::PermissionDenied,
12729 ErrorCode::NotFound,
12730 ErrorCode::Conflict,
12731 ErrorCode::LimitExceeded,
12732 ErrorCode::CapabilityUnavailable,
12733 ErrorCode::NotSubmitted,
12734 ErrorCode::SubmittedIndeterminate,
12735 ErrorCode::ExpiredUnknown,
12736 ErrorCode::RetentionGap,
12737 ErrorCode::TemporarilyUnavailable,
12738 ErrorCode::Internal,
12739 ],
12740 limit_ids: &["request_bytes", "response_bytes"],
12741 effect_class: "durable_submit",
12742 risk_flags: &[],
12743 capability_family: "catalog",
12744 retry_safety: "pre_submit_only",
12745 identity_requirement: "none",
12746 resolver: None,
12747 cancellation: "per_call_until_submission_then_resolve",
12748 side_effects: &["commits_authoritative_state"],
12749 recovery: "retry_if_not_submitted",
12750 collection_index_ref: "request_index",
12751 },
12752 CommandSemanticContract {
12753 command: Command::CloneIndex,
12754 admissible_errors: &[
12755 ErrorCode::Aborted,
12756 ErrorCode::DeadlineExceeded,
12757 ErrorCode::InvalidRequest,
12758 ErrorCode::UnsupportedVersion,
12759 ErrorCode::Unauthenticated,
12760 ErrorCode::PermissionDenied,
12761 ErrorCode::NotFound,
12762 ErrorCode::Conflict,
12763 ErrorCode::LimitExceeded,
12764 ErrorCode::CapabilityUnavailable,
12765 ErrorCode::NotSubmitted,
12766 ErrorCode::SubmittedIndeterminate,
12767 ErrorCode::ExpiredUnknown,
12768 ErrorCode::TemporarilyUnavailable,
12769 ErrorCode::Internal,
12770 ],
12771 limit_ids: &["request_bytes", "response_bytes"],
12772 effect_class: "durable_submit",
12773 risk_flags: &[],
12774 capability_family: "catalog",
12775 retry_safety: "pre_submit_only",
12776 identity_requirement: "caller_action_id",
12777 resolver: Some(Command::CloneIndex),
12778 cancellation: "per_call_until_submission_then_resolve",
12779 side_effects: &["commits_authoritative_state"],
12780 recovery: "resolve_with_clone_index",
12781 collection_index_ref: "caller",
12782 },
12783 CommandSemanticContract {
12784 command: Command::ConfigureHistory,
12785 admissible_errors: &[
12786 ErrorCode::Aborted,
12787 ErrorCode::DeadlineExceeded,
12788 ErrorCode::InvalidRequest,
12789 ErrorCode::UnsupportedVersion,
12790 ErrorCode::Unauthenticated,
12791 ErrorCode::PermissionDenied,
12792 ErrorCode::NotFound,
12793 ErrorCode::Conflict,
12794 ErrorCode::LimitExceeded,
12795 ErrorCode::CapabilityUnavailable,
12796 ErrorCode::NotSubmitted,
12797 ErrorCode::SubmittedIndeterminate,
12798 ErrorCode::ExpiredUnknown,
12799 ErrorCode::TemporarilyUnavailable,
12800 ErrorCode::Internal,
12801 ],
12802 limit_ids: &["request_bytes", "response_bytes"],
12803 effect_class: "durable_submit",
12804 risk_flags: &[],
12805 capability_family: "catalog",
12806 retry_safety: "pre_submit_only",
12807 identity_requirement: "none",
12808 resolver: Some(Command::GetHistory),
12809 cancellation: "per_call_until_submission_then_resolve",
12810 side_effects: &["commits_authoritative_state"],
12811 recovery: "resolve_with_get_history",
12812 collection_index_ref: "request_index",
12813 },
12814 CommandSemanticContract {
12815 command: Command::GetHistory,
12816 admissible_errors: &[
12817 ErrorCode::Aborted,
12818 ErrorCode::DeadlineExceeded,
12819 ErrorCode::InvalidRequest,
12820 ErrorCode::UnsupportedVersion,
12821 ErrorCode::Unauthenticated,
12822 ErrorCode::PermissionDenied,
12823 ErrorCode::NotFound,
12824 ErrorCode::LimitExceeded,
12825 ErrorCode::CapabilityUnavailable,
12826 ErrorCode::TemporarilyUnavailable,
12827 ErrorCode::Internal,
12828 ],
12829 limit_ids: &["request_bytes", "response_bytes"],
12830 effect_class: "read_only",
12831 risk_flags: &[],
12832 capability_family: "catalog",
12833 retry_safety: "safe",
12834 identity_requirement: "none",
12835 resolver: None,
12836 cancellation: "per_call",
12837 side_effects: &[],
12838 recovery: "retry",
12839 collection_index_ref: "none",
12840 },
12841 CommandSemanticContract {
12842 command: Command::ResolveHistory,
12843 admissible_errors: &[
12844 ErrorCode::Aborted,
12845 ErrorCode::DeadlineExceeded,
12846 ErrorCode::InvalidRequest,
12847 ErrorCode::UnsupportedVersion,
12848 ErrorCode::Unauthenticated,
12849 ErrorCode::PermissionDenied,
12850 ErrorCode::NotFound,
12851 ErrorCode::LimitExceeded,
12852 ErrorCode::CapabilityUnavailable,
12853 ErrorCode::RetentionGap,
12854 ErrorCode::TemporarilyUnavailable,
12855 ErrorCode::Internal,
12856 ],
12857 limit_ids: &["request_bytes", "response_bytes"],
12858 effect_class: "read_only",
12859 risk_flags: &[],
12860 capability_family: "data",
12861 retry_safety: "safe",
12862 identity_requirement: "none",
12863 resolver: None,
12864 cancellation: "per_call",
12865 side_effects: &[],
12866 recovery: "retry",
12867 collection_index_ref: "request_index",
12868 },
12869 CommandSemanticContract {
12870 command: Command::PlaceHistoryHold,
12871 admissible_errors: &[
12872 ErrorCode::Aborted,
12873 ErrorCode::DeadlineExceeded,
12874 ErrorCode::InvalidRequest,
12875 ErrorCode::UnsupportedVersion,
12876 ErrorCode::Unauthenticated,
12877 ErrorCode::PermissionDenied,
12878 ErrorCode::NotFound,
12879 ErrorCode::Conflict,
12880 ErrorCode::LimitExceeded,
12881 ErrorCode::CapabilityUnavailable,
12882 ErrorCode::NotSubmitted,
12883 ErrorCode::SubmittedIndeterminate,
12884 ErrorCode::ExpiredUnknown,
12885 ErrorCode::TemporarilyUnavailable,
12886 ErrorCode::Internal,
12887 ],
12888 limit_ids: &["request_bytes", "response_bytes"],
12889 effect_class: "durable_submit",
12890 risk_flags: &[],
12891 capability_family: "catalog",
12892 retry_safety: "pre_submit_only",
12893 identity_requirement: "none",
12894 resolver: Some(Command::GetHistory),
12895 cancellation: "per_call_until_submission_then_resolve",
12896 side_effects: &["commits_authoritative_state"],
12897 recovery: "resolve_with_get_history",
12898 collection_index_ref: "request_index",
12899 },
12900 CommandSemanticContract {
12901 command: Command::ReleaseHistoryHold,
12902 admissible_errors: &[
12903 ErrorCode::Aborted,
12904 ErrorCode::DeadlineExceeded,
12905 ErrorCode::InvalidRequest,
12906 ErrorCode::UnsupportedVersion,
12907 ErrorCode::Unauthenticated,
12908 ErrorCode::PermissionDenied,
12909 ErrorCode::NotFound,
12910 ErrorCode::Conflict,
12911 ErrorCode::LimitExceeded,
12912 ErrorCode::CapabilityUnavailable,
12913 ErrorCode::NotSubmitted,
12914 ErrorCode::SubmittedIndeterminate,
12915 ErrorCode::ExpiredUnknown,
12916 ErrorCode::TemporarilyUnavailable,
12917 ErrorCode::Internal,
12918 ],
12919 limit_ids: &["request_bytes", "response_bytes"],
12920 effect_class: "durable_submit",
12921 risk_flags: &[],
12922 capability_family: "catalog",
12923 retry_safety: "pre_submit_only",
12924 identity_requirement: "none",
12925 resolver: Some(Command::GetHistory),
12926 cancellation: "per_call_until_submission_then_resolve",
12927 side_effects: &["commits_authoritative_state"],
12928 recovery: "resolve_with_get_history",
12929 collection_index_ref: "request_index",
12930 },
12931 CommandSemanticContract {
12932 command: Command::PrepareDocumentMutation,
12933 admissible_errors: &[
12934 ErrorCode::Aborted,
12935 ErrorCode::DeadlineExceeded,
12936 ErrorCode::InvalidRequest,
12937 ErrorCode::UnsupportedVersion,
12938 ErrorCode::Unauthenticated,
12939 ErrorCode::PermissionDenied,
12940 ErrorCode::NotFound,
12941 ErrorCode::LimitExceeded,
12942 ErrorCode::CapabilityUnavailable,
12943 ErrorCode::TemporarilyUnavailable,
12944 ErrorCode::Internal,
12945 ],
12946 limit_ids: &["request_bytes", "response_bytes"],
12947 effect_class: "prepare",
12948 risk_flags: &[],
12949 capability_family: "data",
12950 retry_safety: "safe",
12951 identity_requirement: "server_locator",
12952 resolver: None,
12953 cancellation: "per_call",
12954 side_effects: &["creates_bounded_preparation"],
12955 recovery: "retry",
12956 collection_index_ref: "request_index",
12957 },
12958 CommandSemanticContract {
12959 command: Command::SubmitDocumentMutation,
12960 admissible_errors: &[
12961 ErrorCode::Aborted,
12962 ErrorCode::DeadlineExceeded,
12963 ErrorCode::InvalidRequest,
12964 ErrorCode::UnsupportedVersion,
12965 ErrorCode::Unauthenticated,
12966 ErrorCode::PermissionDenied,
12967 ErrorCode::NotFound,
12968 ErrorCode::Conflict,
12969 ErrorCode::LimitExceeded,
12970 ErrorCode::CapabilityUnavailable,
12971 ErrorCode::NotSubmitted,
12972 ErrorCode::SubmittedIndeterminate,
12973 ErrorCode::ExpiredUnknown,
12974 ErrorCode::TemporarilyUnavailable,
12975 ErrorCode::Internal,
12976 ],
12977 limit_ids: &["request_bytes", "response_bytes"],
12978 effect_class: "durable_submit",
12979 risk_flags: &[],
12980 capability_family: "data",
12981 retry_safety: "pre_submit_only",
12982 identity_requirement: "request_locator",
12983 resolver: Some(Command::ResolveDocumentMutation),
12984 cancellation: "per_call_until_submission_then_resolve",
12985 side_effects: &["commits_authoritative_state"],
12986 recovery: "resolve_with_resolve_document_mutation",
12987 collection_index_ref: "request_index",
12988 },
12989 CommandSemanticContract {
12990 command: Command::PrepareDocumentBulk,
12991 admissible_errors: &[
12992 ErrorCode::Aborted,
12993 ErrorCode::DeadlineExceeded,
12994 ErrorCode::InvalidRequest,
12995 ErrorCode::UnsupportedVersion,
12996 ErrorCode::Unauthenticated,
12997 ErrorCode::PermissionDenied,
12998 ErrorCode::NotFound,
12999 ErrorCode::LimitExceeded,
13000 ErrorCode::CapabilityUnavailable,
13001 ErrorCode::TemporarilyUnavailable,
13002 ErrorCode::Internal,
13003 ],
13004 limit_ids: &[
13005 "request_bytes",
13006 "response_bytes",
13007 "bulk_document_items",
13008 "bulk_document_bytes",
13009 ],
13010 effect_class: "prepare",
13011 risk_flags: &[],
13012 capability_family: "data",
13013 retry_safety: "safe",
13014 identity_requirement: "caller_action_id",
13015 resolver: None,
13016 cancellation: "per_call",
13017 side_effects: &["creates_bounded_preparation"],
13018 recovery: "retry",
13019 collection_index_ref: "request_index",
13020 },
13021 CommandSemanticContract {
13022 command: Command::SubmitDocumentBulk,
13023 admissible_errors: &[
13024 ErrorCode::Aborted,
13025 ErrorCode::DeadlineExceeded,
13026 ErrorCode::InvalidRequest,
13027 ErrorCode::UnsupportedVersion,
13028 ErrorCode::Unauthenticated,
13029 ErrorCode::PermissionDenied,
13030 ErrorCode::NotFound,
13031 ErrorCode::Conflict,
13032 ErrorCode::LimitExceeded,
13033 ErrorCode::CapabilityUnavailable,
13034 ErrorCode::NotSubmitted,
13035 ErrorCode::SubmittedIndeterminate,
13036 ErrorCode::ExpiredUnknown,
13037 ErrorCode::TemporarilyUnavailable,
13038 ErrorCode::Internal,
13039 ],
13040 limit_ids: &[
13041 "request_bytes",
13042 "response_bytes",
13043 "bulk_document_items",
13044 "bulk_document_bytes",
13045 ],
13046 effect_class: "durable_submit",
13047 risk_flags: &[],
13048 capability_family: "data",
13049 retry_safety: "pre_submit_only",
13050 identity_requirement: "caller_action_id",
13051 resolver: Some(Command::ResolveDocumentBulk),
13052 cancellation: "per_call_until_submission_then_resolve",
13053 side_effects: &["commits_authoritative_state"],
13054 recovery: "resolve_with_resolve_document_bulk",
13055 collection_index_ref: "request_index",
13056 },
13057 CommandSemanticContract {
13058 command: Command::ResolveDocumentBulk,
13059 admissible_errors: &[
13060 ErrorCode::Aborted,
13061 ErrorCode::DeadlineExceeded,
13062 ErrorCode::InvalidRequest,
13063 ErrorCode::UnsupportedVersion,
13064 ErrorCode::Unauthenticated,
13065 ErrorCode::PermissionDenied,
13066 ErrorCode::NotFound,
13067 ErrorCode::LimitExceeded,
13068 ErrorCode::CapabilityUnavailable,
13069 ErrorCode::TemporarilyUnavailable,
13070 ErrorCode::Internal,
13071 ],
13072 limit_ids: &[
13073 "request_bytes",
13074 "response_bytes",
13075 "bulk_document_items",
13076 "bulk_document_bytes",
13077 ],
13078 effect_class: "read_only",
13079 risk_flags: &[],
13080 capability_family: "data",
13081 retry_safety: "safe",
13082 identity_requirement: "caller_action_id",
13083 resolver: None,
13084 cancellation: "per_call",
13085 side_effects: &[],
13086 recovery: "retry",
13087 collection_index_ref: "request_index",
13088 },
13089 CommandSemanticContract {
13090 command: Command::PrepareAppendBulk,
13091 admissible_errors: &[
13092 ErrorCode::Aborted,
13093 ErrorCode::DeadlineExceeded,
13094 ErrorCode::InvalidRequest,
13095 ErrorCode::UnsupportedVersion,
13096 ErrorCode::Unauthenticated,
13097 ErrorCode::PermissionDenied,
13098 ErrorCode::NotFound,
13099 ErrorCode::LimitExceeded,
13100 ErrorCode::CapabilityUnavailable,
13101 ErrorCode::TemporarilyUnavailable,
13102 ErrorCode::Internal,
13103 ],
13104 limit_ids: &[
13105 "request_bytes",
13106 "response_bytes",
13107 "bulk_document_items",
13108 "bulk_document_bytes",
13109 ],
13110 effect_class: "prepare",
13111 risk_flags: &[],
13112 capability_family: "data",
13113 retry_safety: "safe",
13114 identity_requirement: "caller_action_id",
13115 resolver: None,
13116 cancellation: "per_call",
13117 side_effects: &[],
13118 recovery: "retry",
13119 collection_index_ref: "request_index",
13120 },
13121 CommandSemanticContract {
13122 command: Command::SubmitAppendBulk,
13123 admissible_errors: &[
13124 ErrorCode::Aborted,
13125 ErrorCode::DeadlineExceeded,
13126 ErrorCode::InvalidRequest,
13127 ErrorCode::UnsupportedVersion,
13128 ErrorCode::Unauthenticated,
13129 ErrorCode::PermissionDenied,
13130 ErrorCode::NotFound,
13131 ErrorCode::Conflict,
13132 ErrorCode::LimitExceeded,
13133 ErrorCode::CapabilityUnavailable,
13134 ErrorCode::NotSubmitted,
13135 ErrorCode::SubmittedIndeterminate,
13136 ErrorCode::TemporarilyUnavailable,
13137 ErrorCode::Internal,
13138 ],
13139 limit_ids: &[
13140 "request_bytes",
13141 "response_bytes",
13142 "bulk_document_items",
13143 "bulk_document_bytes",
13144 ],
13145 effect_class: "durable_submit",
13146 risk_flags: &[],
13147 capability_family: "data",
13148 retry_safety: "pre_submit_only",
13149 identity_requirement: "request_locator",
13150 resolver: Some(Command::ResolveAppendBulk),
13151 cancellation: "per_call_until_submission_then_resolve",
13152 side_effects: &["commits_authoritative_state"],
13153 recovery: "resolve_with_resolve_append_bulk",
13154 collection_index_ref: "request_index",
13155 },
13156 CommandSemanticContract {
13157 command: Command::ResolveAppendBulk,
13158 admissible_errors: &[
13159 ErrorCode::Aborted,
13160 ErrorCode::DeadlineExceeded,
13161 ErrorCode::InvalidRequest,
13162 ErrorCode::UnsupportedVersion,
13163 ErrorCode::Unauthenticated,
13164 ErrorCode::PermissionDenied,
13165 ErrorCode::NotFound,
13166 ErrorCode::Conflict,
13167 ErrorCode::LimitExceeded,
13168 ErrorCode::CapabilityUnavailable,
13169 ErrorCode::TemporarilyUnavailable,
13170 ErrorCode::Internal,
13171 ],
13172 limit_ids: &[
13173 "request_bytes",
13174 "response_bytes",
13175 "bulk_document_items",
13176 "bulk_document_bytes",
13177 ],
13178 effect_class: "read_only",
13179 risk_flags: &[],
13180 capability_family: "data",
13181 retry_safety: "safe",
13182 identity_requirement: "request_locator",
13183 resolver: None,
13184 cancellation: "per_call",
13185 side_effects: &[],
13186 recovery: "retry",
13187 collection_index_ref: "request_index",
13188 },
13189 CommandSemanticContract {
13190 command: Command::ObserveAppendCommitted,
13191 admissible_errors: &[
13192 ErrorCode::Aborted,
13193 ErrorCode::DeadlineExceeded,
13194 ErrorCode::InvalidRequest,
13195 ErrorCode::UnsupportedVersion,
13196 ErrorCode::Unauthenticated,
13197 ErrorCode::PermissionDenied,
13198 ErrorCode::NotFound,
13199 ErrorCode::Conflict,
13200 ErrorCode::LimitExceeded,
13201 ErrorCode::CapabilityUnavailable,
13202 ErrorCode::TemporarilyUnavailable,
13203 ErrorCode::Internal,
13204 ],
13205 limit_ids: &["request_bytes", "response_bytes"],
13206 effect_class: "read_only",
13207 risk_flags: &[],
13208 capability_family: "data",
13209 retry_safety: "safe",
13210 identity_requirement: "request_locator",
13211 resolver: None,
13212 cancellation: "per_call",
13213 side_effects: &[],
13214 recovery: "retry",
13215 collection_index_ref: "request_index",
13216 },
13217 CommandSemanticContract {
13218 command: Command::ResolveDocumentMutation,
13219 admissible_errors: &[
13220 ErrorCode::Aborted,
13221 ErrorCode::DeadlineExceeded,
13222 ErrorCode::InvalidRequest,
13223 ErrorCode::UnsupportedVersion,
13224 ErrorCode::Unauthenticated,
13225 ErrorCode::PermissionDenied,
13226 ErrorCode::NotFound,
13227 ErrorCode::LimitExceeded,
13228 ErrorCode::CapabilityUnavailable,
13229 ErrorCode::TemporarilyUnavailable,
13230 ErrorCode::Internal,
13231 ],
13232 limit_ids: &["request_bytes", "response_bytes"],
13233 effect_class: "read_only",
13234 risk_flags: &[],
13235 capability_family: "data",
13236 retry_safety: "safe",
13237 identity_requirement: "request_locator",
13238 resolver: None,
13239 cancellation: "per_call",
13240 side_effects: &[],
13241 recovery: "retry",
13242 collection_index_ref: "caller",
13243 },
13244 CommandSemanticContract {
13245 command: Command::GetDocument,
13246 admissible_errors: &[
13247 ErrorCode::Aborted,
13248 ErrorCode::DeadlineExceeded,
13249 ErrorCode::InvalidRequest,
13250 ErrorCode::UnsupportedVersion,
13251 ErrorCode::Unauthenticated,
13252 ErrorCode::PermissionDenied,
13253 ErrorCode::NotFound,
13254 ErrorCode::LimitExceeded,
13255 ErrorCode::CapabilityUnavailable,
13256 ErrorCode::TemporarilyUnavailable,
13257 ErrorCode::Internal,
13258 ],
13259 limit_ids: &["request_bytes", "response_bytes"],
13260 effect_class: "read_only",
13261 risk_flags: &[],
13262 capability_family: "data",
13263 retry_safety: "safe",
13264 identity_requirement: "none",
13265 resolver: None,
13266 cancellation: "per_call",
13267 side_effects: &[],
13268 recovery: "retry",
13269 collection_index_ref: "request_index",
13270 },
13271 CommandSemanticContract {
13272 command: Command::Search,
13273 admissible_errors: &[
13274 ErrorCode::Aborted,
13275 ErrorCode::DeadlineExceeded,
13276 ErrorCode::InvalidRequest,
13277 ErrorCode::UnsupportedVersion,
13278 ErrorCode::Unauthenticated,
13279 ErrorCode::PermissionDenied,
13280 ErrorCode::NotFound,
13281 ErrorCode::StaleCursor,
13282 ErrorCode::RestartBudgetExhausted,
13283 ErrorCode::LimitExceeded,
13284 ErrorCode::CapabilityUnavailable,
13285 ErrorCode::TemporarilyUnavailable,
13286 ErrorCode::Internal,
13287 ],
13288 limit_ids: &[
13289 "request_bytes",
13290 "response_bytes",
13291 "page_size",
13292 "query_clauses",
13293 "aggregation_nodes",
13294 "aggregation_buckets",
13295 "routing_values",
13296 "routing_value_bytes",
13297 "query_recursion_depth",
13298 "text_query_bytes",
13299 "text_query_fields",
13300 "text_query_slop",
13301 "text_query_boost",
13302 "text_query_fuzzy_expansions",
13303 "text_query_fuzzy_distance",
13304 "text_query_dictionary_scan_terms",
13305 "text_query_dictionary_scan_bytes",
13306 "text_query_fuzzy_work_units",
13307 "vector_dimensions",
13308 "vector_query_bytes",
13309 "vector_request_bytes",
13310 "vector_candidates",
13311 "vector_set_query_vectors",
13312 "vector_set_query_bytes",
13313 "retrieval_branches",
13314 "retrieval_branch_name_bytes",
13315 "retrieval_window",
13316 "fragment_fields",
13317 "fragments_per_field",
13318 "fragment_bytes",
13319 "fragment_total_bytes",
13320 "result_feature_hits",
13321 "result_features",
13322 "diversification_fields",
13323 "diversification_per_group",
13324 "source_projection_patterns",
13325 "source_projection_pattern_bytes",
13326 "search_result_window",
13327 ],
13328 effect_class: "read_only",
13329 risk_flags: &[],
13330 capability_family: "data",
13331 retry_safety: "safe",
13332 identity_requirement: "none",
13333 resolver: None,
13334 cancellation: "per_call",
13335 side_effects: &[],
13336 recovery: "retry",
13337 collection_index_ref: "request_indexes_or_pit_authority",
13338 },
13339 CommandSemanticContract {
13340 command: Command::TraverseRelationships,
13341 admissible_errors: &[
13342 ErrorCode::Aborted,
13343 ErrorCode::DeadlineExceeded,
13344 ErrorCode::InvalidRequest,
13345 ErrorCode::UnsupportedVersion,
13346 ErrorCode::Unauthenticated,
13347 ErrorCode::PermissionDenied,
13348 ErrorCode::NotFound,
13349 ErrorCode::LimitExceeded,
13350 ErrorCode::CapabilityUnavailable,
13351 ErrorCode::TemporarilyUnavailable,
13352 ErrorCode::Internal,
13353 ],
13354 limit_ids: &[
13355 "request_bytes",
13356 "response_bytes",
13357 "relationship_indexes",
13358 "relationship_seeds",
13359 "relationship_filter_values",
13360 "relationship_depth",
13361 "relationship_fan_out",
13362 "relationship_visited_entities",
13363 "relationship_visited_records",
13364 "relationship_returned_records",
13365 "relationship_memory_bytes",
13366 "search_result_window",
13367 ],
13368 effect_class: "read_only",
13369 risk_flags: &[],
13370 capability_family: "data",
13371 retry_safety: "safe",
13372 identity_requirement: "none",
13373 resolver: None,
13374 cancellation: "per_call",
13375 side_effects: &[],
13376 recovery: "retry",
13377 collection_index_ref: "pit_authority",
13378 },
13379 CommandSemanticContract {
13380 command: Command::QueryProfiles,
13381 admissible_errors: &[
13382 ErrorCode::Aborted,
13383 ErrorCode::DeadlineExceeded,
13384 ErrorCode::InvalidRequest,
13385 ErrorCode::UnsupportedVersion,
13386 ErrorCode::Unauthenticated,
13387 ErrorCode::PermissionDenied,
13388 ErrorCode::NotFound,
13389 ErrorCode::LimitExceeded,
13390 ErrorCode::CapabilityUnavailable,
13391 ErrorCode::TemporarilyUnavailable,
13392 ErrorCode::Internal,
13393 ],
13394 limit_ids: &[
13395 "request_bytes",
13396 "response_bytes",
13397 "profile_indexes",
13398 "profile_filter_values",
13399 "profile_batches",
13400 "profile_samples",
13401 "profile_results",
13402 "profile_memory_bytes",
13403 "search_result_window",
13404 ],
13405 effect_class: "read_only",
13406 risk_flags: &[],
13407 capability_family: "data",
13408 retry_safety: "safe",
13409 identity_requirement: "none",
13410 resolver: None,
13411 cancellation: "per_call",
13412 side_effects: &[],
13413 recovery: "retry",
13414 collection_index_ref: "pit_authority",
13415 },
13416 CommandSemanticContract {
13417 command: Command::EvaluateTemporalEvidence,
13418 admissible_errors: &[
13419 ErrorCode::Aborted,
13420 ErrorCode::DeadlineExceeded,
13421 ErrorCode::InvalidRequest,
13422 ErrorCode::UnsupportedVersion,
13423 ErrorCode::Unauthenticated,
13424 ErrorCode::PermissionDenied,
13425 ErrorCode::NotFound,
13426 ErrorCode::LimitExceeded,
13427 ErrorCode::CapabilityUnavailable,
13428 ErrorCode::TemporarilyUnavailable,
13429 ErrorCode::Internal,
13430 ],
13431 limit_ids: &[
13432 "request_bytes",
13433 "response_bytes",
13434 "query_clauses",
13435 "query_recursion_depth",
13436 "search_result_window",
13437 "temporal_inputs",
13438 "temporal_pattern_nodes",
13439 "temporal_pattern_depth",
13440 "temporal_pattern_branches",
13441 "temporal_correlation_keys",
13442 "temporal_events",
13443 "temporal_states",
13444 "temporal_captured_events",
13445 "temporal_results",
13446 "temporal_state_bytes",
13447 "temporal_interval_nanos",
13448 ],
13449 effect_class: "read_only",
13450 risk_flags: &[],
13451 capability_family: "data",
13452 retry_safety: "safe",
13453 identity_requirement: "none",
13454 resolver: None,
13455 cancellation: "per_call",
13456 side_effects: &[],
13457 recovery: "retry",
13458 collection_index_ref: "pit_authority",
13459 },
13460 CommandSemanticContract {
13461 command: Command::CreateContinuousTemporalEvaluation,
13462 admissible_errors: &[
13463 ErrorCode::Aborted,
13464 ErrorCode::DeadlineExceeded,
13465 ErrorCode::InvalidRequest,
13466 ErrorCode::UnsupportedVersion,
13467 ErrorCode::Unauthenticated,
13468 ErrorCode::PermissionDenied,
13469 ErrorCode::NotFound,
13470 ErrorCode::Conflict,
13471 ErrorCode::LimitExceeded,
13472 ErrorCode::CapabilityUnavailable,
13473 ErrorCode::NotSubmitted,
13474 ErrorCode::SubmittedIndeterminate,
13475 ErrorCode::TemporarilyUnavailable,
13476 ErrorCode::Internal,
13477 ],
13478 limit_ids: &[
13479 "request_bytes",
13480 "response_bytes",
13481 "temporal_inputs",
13482 "temporal_pattern_nodes",
13483 "temporal_pattern_depth",
13484 "temporal_pattern_branches",
13485 "temporal_correlation_keys",
13486 "temporal_events",
13487 "temporal_states",
13488 "temporal_captured_events",
13489 "temporal_results",
13490 "temporal_state_bytes",
13491 "temporal_interval_nanos",
13492 ],
13493 effect_class: "durable_submit",
13494 risk_flags: &[],
13495 capability_family: "lifecycle",
13496 retry_safety: "pre_submit_only",
13497 identity_requirement: "caller_action_id",
13498 resolver: Some(Command::GetContinuousTemporalEvaluation),
13499 cancellation: "per_call_until_submission_then_resolve",
13500 side_effects: &["commits_authoritative_state"],
13501 recovery: "resolve_with_get_continuous_temporal_evaluation",
13502 collection_index_ref: "request_temporal_inputs",
13503 },
13504 CommandSemanticContract {
13505 command: Command::GetContinuousTemporalEvaluation,
13506 admissible_errors: &[
13507 ErrorCode::Aborted,
13508 ErrorCode::DeadlineExceeded,
13509 ErrorCode::InvalidRequest,
13510 ErrorCode::UnsupportedVersion,
13511 ErrorCode::Unauthenticated,
13512 ErrorCode::PermissionDenied,
13513 ErrorCode::NotFound,
13514 ErrorCode::LimitExceeded,
13515 ErrorCode::CapabilityUnavailable,
13516 ErrorCode::TemporarilyUnavailable,
13517 ErrorCode::Internal,
13518 ],
13519 limit_ids: &["request_bytes", "response_bytes"],
13520 effect_class: "read_only",
13521 risk_flags: &[],
13522 capability_family: "lifecycle",
13523 retry_safety: "safe",
13524 identity_requirement: "none",
13525 resolver: None,
13526 cancellation: "per_call",
13527 side_effects: &[],
13528 recovery: "retry",
13529 collection_index_ref: "request_evaluation",
13530 },
13531 CommandSemanticContract {
13532 command: Command::PauseContinuousTemporalEvaluation,
13533 admissible_errors: &[
13534 ErrorCode::Aborted,
13535 ErrorCode::DeadlineExceeded,
13536 ErrorCode::InvalidRequest,
13537 ErrorCode::UnsupportedVersion,
13538 ErrorCode::Unauthenticated,
13539 ErrorCode::PermissionDenied,
13540 ErrorCode::NotFound,
13541 ErrorCode::Conflict,
13542 ErrorCode::LimitExceeded,
13543 ErrorCode::CapabilityUnavailable,
13544 ErrorCode::NotSubmitted,
13545 ErrorCode::SubmittedIndeterminate,
13546 ErrorCode::TemporarilyUnavailable,
13547 ErrorCode::Internal,
13548 ],
13549 limit_ids: &["request_bytes", "response_bytes"],
13550 effect_class: "durable_submit",
13551 risk_flags: &[],
13552 capability_family: "lifecycle",
13553 retry_safety: "pre_submit_only",
13554 identity_requirement: "caller_action_id",
13555 resolver: Some(Command::GetContinuousTemporalEvaluation),
13556 cancellation: "per_call_until_submission_then_resolve",
13557 side_effects: &["commits_authoritative_state"],
13558 recovery: "resolve_with_get_continuous_temporal_evaluation",
13559 collection_index_ref: "request_evaluation",
13560 },
13561 CommandSemanticContract {
13562 command: Command::ResumeContinuousTemporalEvaluation,
13563 admissible_errors: &[
13564 ErrorCode::Aborted,
13565 ErrorCode::DeadlineExceeded,
13566 ErrorCode::InvalidRequest,
13567 ErrorCode::UnsupportedVersion,
13568 ErrorCode::Unauthenticated,
13569 ErrorCode::PermissionDenied,
13570 ErrorCode::NotFound,
13571 ErrorCode::Conflict,
13572 ErrorCode::LimitExceeded,
13573 ErrorCode::CapabilityUnavailable,
13574 ErrorCode::NotSubmitted,
13575 ErrorCode::SubmittedIndeterminate,
13576 ErrorCode::TemporarilyUnavailable,
13577 ErrorCode::Internal,
13578 ],
13579 limit_ids: &["request_bytes", "response_bytes"],
13580 effect_class: "durable_submit",
13581 risk_flags: &[],
13582 capability_family: "lifecycle",
13583 retry_safety: "pre_submit_only",
13584 identity_requirement: "caller_action_id",
13585 resolver: Some(Command::GetContinuousTemporalEvaluation),
13586 cancellation: "per_call_until_submission_then_resolve",
13587 side_effects: &["commits_authoritative_state"],
13588 recovery: "resolve_with_get_continuous_temporal_evaluation",
13589 collection_index_ref: "request_evaluation",
13590 },
13591 CommandSemanticContract {
13592 command: Command::ReplaceContinuousTemporalEvaluation,
13593 admissible_errors: &[
13594 ErrorCode::Aborted,
13595 ErrorCode::DeadlineExceeded,
13596 ErrorCode::InvalidRequest,
13597 ErrorCode::UnsupportedVersion,
13598 ErrorCode::Unauthenticated,
13599 ErrorCode::PermissionDenied,
13600 ErrorCode::NotFound,
13601 ErrorCode::Conflict,
13602 ErrorCode::LimitExceeded,
13603 ErrorCode::CapabilityUnavailable,
13604 ErrorCode::NotSubmitted,
13605 ErrorCode::SubmittedIndeterminate,
13606 ErrorCode::TemporarilyUnavailable,
13607 ErrorCode::Internal,
13608 ],
13609 limit_ids: &[
13610 "request_bytes",
13611 "response_bytes",
13612 "temporal_inputs",
13613 "temporal_pattern_nodes",
13614 "temporal_pattern_depth",
13615 "temporal_pattern_branches",
13616 "temporal_correlation_keys",
13617 "temporal_events",
13618 "temporal_states",
13619 "temporal_captured_events",
13620 "temporal_results",
13621 "temporal_state_bytes",
13622 "temporal_interval_nanos",
13623 ],
13624 effect_class: "durable_submit",
13625 risk_flags: &[],
13626 capability_family: "lifecycle",
13627 retry_safety: "pre_submit_only",
13628 identity_requirement: "caller_action_id",
13629 resolver: Some(Command::GetContinuousTemporalEvaluation),
13630 cancellation: "per_call_until_submission_then_resolve",
13631 side_effects: &["commits_authoritative_state"],
13632 recovery: "resolve_with_get_continuous_temporal_evaluation",
13633 collection_index_ref: "request_temporal_inputs",
13634 },
13635 CommandSemanticContract {
13636 command: Command::RetireContinuousTemporalEvaluation,
13637 admissible_errors: &[
13638 ErrorCode::Aborted,
13639 ErrorCode::DeadlineExceeded,
13640 ErrorCode::InvalidRequest,
13641 ErrorCode::UnsupportedVersion,
13642 ErrorCode::Unauthenticated,
13643 ErrorCode::PermissionDenied,
13644 ErrorCode::NotFound,
13645 ErrorCode::Conflict,
13646 ErrorCode::LimitExceeded,
13647 ErrorCode::CapabilityUnavailable,
13648 ErrorCode::NotSubmitted,
13649 ErrorCode::SubmittedIndeterminate,
13650 ErrorCode::TemporarilyUnavailable,
13651 ErrorCode::Internal,
13652 ],
13653 limit_ids: &["request_bytes", "response_bytes"],
13654 effect_class: "durable_submit",
13655 risk_flags: &["destructive"],
13656 capability_family: "lifecycle",
13657 retry_safety: "pre_submit_only",
13658 identity_requirement: "caller_action_id",
13659 resolver: Some(Command::GetContinuousTemporalEvaluation),
13660 cancellation: "per_call_until_submission_then_resolve",
13661 side_effects: &["commits_authoritative_state"],
13662 recovery: "resolve_with_get_continuous_temporal_evaluation",
13663 collection_index_ref: "request_evaluation",
13664 },
13665 CommandSemanticContract {
13666 command: Command::ReadContinuousTemporalEvidence,
13667 admissible_errors: &[
13668 ErrorCode::Aborted,
13669 ErrorCode::DeadlineExceeded,
13670 ErrorCode::InvalidRequest,
13671 ErrorCode::UnsupportedVersion,
13672 ErrorCode::Unauthenticated,
13673 ErrorCode::PermissionDenied,
13674 ErrorCode::NotFound,
13675 ErrorCode::Conflict,
13676 ErrorCode::RetentionGap,
13677 ErrorCode::LimitExceeded,
13678 ErrorCode::CapabilityUnavailable,
13679 ErrorCode::TemporarilyUnavailable,
13680 ErrorCode::Internal,
13681 ],
13682 limit_ids: &["request_bytes", "response_bytes", "page_size", "temporal_results"],
13683 effect_class: "read_only",
13684 risk_flags: &[],
13685 capability_family: "data",
13686 retry_safety: "safe",
13687 identity_requirement: "none",
13688 resolver: None,
13689 cancellation: "per_call",
13690 side_effects: &[],
13691 recovery: "retry",
13692 collection_index_ref: "request_evaluation",
13693 },
13694 CommandSemanticContract {
13695 command: Command::ValidateSearch,
13696 admissible_errors: &[
13697 ErrorCode::Aborted,
13698 ErrorCode::DeadlineExceeded,
13699 ErrorCode::InvalidRequest,
13700 ErrorCode::UnsupportedVersion,
13701 ErrorCode::Unauthenticated,
13702 ErrorCode::PermissionDenied,
13703 ErrorCode::NotFound,
13704 ErrorCode::LimitExceeded,
13705 ErrorCode::CapabilityUnavailable,
13706 ErrorCode::TemporarilyUnavailable,
13707 ErrorCode::Internal,
13708 ],
13709 limit_ids: &[
13710 "request_bytes",
13711 "response_bytes",
13712 "page_size",
13713 "query_clauses",
13714 "aggregation_nodes",
13715 "aggregation_buckets",
13716 "routing_values",
13717 "routing_value_bytes",
13718 "query_recursion_depth",
13719 "source_projection_patterns",
13720 "source_projection_pattern_bytes",
13721 "search_result_window",
13722 ],
13723 effect_class: "read_only",
13724 risk_flags: &[],
13725 capability_family: "data",
13726 retry_safety: "safe",
13727 identity_requirement: "none",
13728 resolver: None,
13729 cancellation: "per_call",
13730 side_effects: &[],
13731 recovery: "retry",
13732 collection_index_ref: "request_indexes_uniform",
13733 },
13734 CommandSemanticContract {
13735 command: Command::OpenPit,
13736 admissible_errors: &[
13737 ErrorCode::Aborted,
13738 ErrorCode::DeadlineExceeded,
13739 ErrorCode::InvalidRequest,
13740 ErrorCode::UnsupportedVersion,
13741 ErrorCode::Unauthenticated,
13742 ErrorCode::PermissionDenied,
13743 ErrorCode::NotFound,
13744 ErrorCode::Conflict,
13745 ErrorCode::LimitExceeded,
13746 ErrorCode::CapabilityUnavailable,
13747 ErrorCode::NotSubmitted,
13748 ErrorCode::SubmittedIndeterminate,
13749 ErrorCode::ExpiredUnknown,
13750 ErrorCode::TemporarilyUnavailable,
13751 ErrorCode::Internal,
13752 ],
13753 limit_ids: &["request_bytes", "response_bytes"],
13754 effect_class: "lease_renewing_read",
13755 risk_flags: &[],
13756 capability_family: "data",
13757 retry_safety: "pre_submit_only",
13758 identity_requirement: "none",
13759 resolver: None,
13760 cancellation: "per_call_until_submission_then_resolve",
13761 side_effects: &["renews_or_closes_existing_lease"],
13762 recovery: "retry_if_not_submitted",
13763 collection_index_ref: "request_indexes_uniform",
13764 },
13765 CommandSemanticContract {
13766 command: Command::RenewPit,
13767 admissible_errors: &[
13768 ErrorCode::Aborted,
13769 ErrorCode::DeadlineExceeded,
13770 ErrorCode::InvalidRequest,
13771 ErrorCode::UnsupportedVersion,
13772 ErrorCode::Unauthenticated,
13773 ErrorCode::PermissionDenied,
13774 ErrorCode::NotFound,
13775 ErrorCode::Conflict,
13776 ErrorCode::LimitExceeded,
13777 ErrorCode::CapabilityUnavailable,
13778 ErrorCode::NotSubmitted,
13779 ErrorCode::SubmittedIndeterminate,
13780 ErrorCode::ExpiredUnknown,
13781 ErrorCode::TemporarilyUnavailable,
13782 ErrorCode::Internal,
13783 ],
13784 limit_ids: &["request_bytes", "response_bytes"],
13785 effect_class: "lease_renewing_read",
13786 risk_flags: &[],
13787 capability_family: "data",
13788 retry_safety: "pre_submit_only",
13789 identity_requirement: "none",
13790 resolver: None,
13791 cancellation: "per_call_until_submission_then_resolve",
13792 side_effects: &["renews_or_closes_existing_lease"],
13793 recovery: "retry_if_not_submitted",
13794 collection_index_ref: "pit_authority",
13795 },
13796 CommandSemanticContract {
13797 command: Command::ClosePit,
13798 admissible_errors: &[
13799 ErrorCode::Aborted,
13800 ErrorCode::DeadlineExceeded,
13801 ErrorCode::InvalidRequest,
13802 ErrorCode::UnsupportedVersion,
13803 ErrorCode::Unauthenticated,
13804 ErrorCode::PermissionDenied,
13805 ErrorCode::NotFound,
13806 ErrorCode::Conflict,
13807 ErrorCode::LimitExceeded,
13808 ErrorCode::CapabilityUnavailable,
13809 ErrorCode::NotSubmitted,
13810 ErrorCode::SubmittedIndeterminate,
13811 ErrorCode::ExpiredUnknown,
13812 ErrorCode::TemporarilyUnavailable,
13813 ErrorCode::Internal,
13814 ],
13815 limit_ids: &["request_bytes", "response_bytes"],
13816 effect_class: "lease_renewing_read",
13817 risk_flags: &[],
13818 capability_family: "data",
13819 retry_safety: "pre_submit_only",
13820 identity_requirement: "none",
13821 resolver: None,
13822 cancellation: "per_call_until_submission_then_resolve",
13823 side_effects: &["renews_or_closes_existing_lease"],
13824 recovery: "retry_if_not_submitted",
13825 collection_index_ref: "pit_authority",
13826 },
13827 CommandSemanticContract {
13828 command: Command::ListOperations,
13829 admissible_errors: &[
13830 ErrorCode::Aborted,
13831 ErrorCode::DeadlineExceeded,
13832 ErrorCode::InvalidRequest,
13833 ErrorCode::UnsupportedVersion,
13834 ErrorCode::Unauthenticated,
13835 ErrorCode::PermissionDenied,
13836 ErrorCode::NotFound,
13837 ErrorCode::StaleCursor,
13838 ErrorCode::RestartBudgetExhausted,
13839 ErrorCode::LimitExceeded,
13840 ErrorCode::CapabilityUnavailable,
13841 ErrorCode::TemporarilyUnavailable,
13842 ErrorCode::Internal,
13843 ],
13844 limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
13845 effect_class: "read_only",
13846 risk_flags: &[],
13847 capability_family: "operations",
13848 retry_safety: "safe",
13849 identity_requirement: "none",
13850 resolver: None,
13851 cancellation: "per_call",
13852 side_effects: &[],
13853 recovery: "retry",
13854 collection_index_ref: "none",
13855 },
13856 CommandSemanticContract {
13857 command: Command::GetOperation,
13858 admissible_errors: &[
13859 ErrorCode::Aborted,
13860 ErrorCode::DeadlineExceeded,
13861 ErrorCode::InvalidRequest,
13862 ErrorCode::UnsupportedVersion,
13863 ErrorCode::Unauthenticated,
13864 ErrorCode::PermissionDenied,
13865 ErrorCode::NotFound,
13866 ErrorCode::LimitExceeded,
13867 ErrorCode::CapabilityUnavailable,
13868 ErrorCode::TemporarilyUnavailable,
13869 ErrorCode::Internal,
13870 ],
13871 limit_ids: &["request_bytes", "response_bytes"],
13872 effect_class: "read_only",
13873 risk_flags: &[],
13874 capability_family: "operations",
13875 retry_safety: "safe",
13876 identity_requirement: "request_locator",
13877 resolver: None,
13878 cancellation: "per_call",
13879 side_effects: &[],
13880 recovery: "retry",
13881 collection_index_ref: "none",
13882 },
13883 CommandSemanticContract {
13884 command: Command::WaitOperation,
13885 admissible_errors: &[
13886 ErrorCode::Aborted,
13887 ErrorCode::DeadlineExceeded,
13888 ErrorCode::InvalidRequest,
13889 ErrorCode::UnsupportedVersion,
13890 ErrorCode::Unauthenticated,
13891 ErrorCode::PermissionDenied,
13892 ErrorCode::NotFound,
13893 ErrorCode::Conflict,
13894 ErrorCode::LimitExceeded,
13895 ErrorCode::CapabilityUnavailable,
13896 ErrorCode::TemporarilyUnavailable,
13897 ErrorCode::Internal,
13898 ],
13899 limit_ids: &[
13900 "request_bytes",
13901 "response_bytes",
13902 "operation_wait_attempts",
13903 "operation_wait_interval_millis",
13904 ],
13905 effect_class: "read_only",
13906 risk_flags: &[],
13907 capability_family: "operations",
13908 retry_safety: "safe",
13909 identity_requirement: "request_locator",
13910 resolver: None,
13911 cancellation: "per_call",
13912 side_effects: &[],
13913 recovery: "retry",
13914 collection_index_ref: "none",
13915 },
13916 CommandSemanticContract {
13917 command: Command::CancelOperation,
13918 admissible_errors: &[
13919 ErrorCode::Aborted,
13920 ErrorCode::DeadlineExceeded,
13921 ErrorCode::InvalidRequest,
13922 ErrorCode::UnsupportedVersion,
13923 ErrorCode::Unauthenticated,
13924 ErrorCode::PermissionDenied,
13925 ErrorCode::NotFound,
13926 ErrorCode::Conflict,
13927 ErrorCode::LimitExceeded,
13928 ErrorCode::CapabilityUnavailable,
13929 ErrorCode::NotSubmitted,
13930 ErrorCode::SubmittedIndeterminate,
13931 ErrorCode::ExpiredUnknown,
13932 ErrorCode::TemporarilyUnavailable,
13933 ErrorCode::Internal,
13934 ],
13935 limit_ids: &["request_bytes", "response_bytes"],
13936 effect_class: "control_write",
13937 risk_flags: &[],
13938 capability_family: "operations",
13939 retry_safety: "pre_submit_only",
13940 identity_requirement: "request_locator",
13941 resolver: None,
13942 cancellation: "per_call_until_submission_then_resolve",
13943 side_effects: &["commits_authoritative_state"],
13944 recovery: "retry_if_not_submitted",
13945 collection_index_ref: "none",
13946 },
13947 CommandSemanticContract {
13948 command: Command::ListAuditEvents,
13949 admissible_errors: &[
13950 ErrorCode::Aborted,
13951 ErrorCode::DeadlineExceeded,
13952 ErrorCode::InvalidRequest,
13953 ErrorCode::UnsupportedVersion,
13954 ErrorCode::Unauthenticated,
13955 ErrorCode::PermissionDenied,
13956 ErrorCode::NotFound,
13957 ErrorCode::StaleCursor,
13958 ErrorCode::RestartBudgetExhausted,
13959 ErrorCode::LimitExceeded,
13960 ErrorCode::CapabilityUnavailable,
13961 ErrorCode::TemporarilyUnavailable,
13962 ErrorCode::Internal,
13963 ],
13964 limit_ids: &["request_bytes", "response_bytes", "page_size"],
13965 effect_class: "read_only",
13966 risk_flags: &[],
13967 capability_family: "audit",
13968 retry_safety: "safe",
13969 identity_requirement: "none",
13970 resolver: None,
13971 cancellation: "per_call",
13972 side_effects: &[],
13973 recovery: "retry",
13974 collection_index_ref: "none",
13975 },
13976 CommandSemanticContract {
13977 command: Command::ExportAuditEvents,
13978 admissible_errors: &[
13979 ErrorCode::Aborted,
13980 ErrorCode::DeadlineExceeded,
13981 ErrorCode::InvalidRequest,
13982 ErrorCode::UnsupportedVersion,
13983 ErrorCode::Unauthenticated,
13984 ErrorCode::PermissionDenied,
13985 ErrorCode::NotFound,
13986 ErrorCode::StaleCursor,
13987 ErrorCode::RestartBudgetExhausted,
13988 ErrorCode::LimitExceeded,
13989 ErrorCode::CapabilityUnavailable,
13990 ErrorCode::TemporarilyUnavailable,
13991 ErrorCode::Internal,
13992 ],
13993 limit_ids: &["request_bytes", "response_bytes", "page_size"],
13994 effect_class: "read_only",
13995 risk_flags: &[],
13996 capability_family: "audit",
13997 retry_safety: "safe",
13998 identity_requirement: "none",
13999 resolver: None,
14000 cancellation: "per_call",
14001 side_effects: &[],
14002 recovery: "retry",
14003 collection_index_ref: "none",
14004 },
14005 CommandSemanticContract {
14006 command: Command::ReserveServiceCredential,
14007 admissible_errors: &[
14008 ErrorCode::Aborted,
14009 ErrorCode::DeadlineExceeded,
14010 ErrorCode::InvalidRequest,
14011 ErrorCode::UnsupportedVersion,
14012 ErrorCode::Unauthenticated,
14013 ErrorCode::PermissionDenied,
14014 ErrorCode::NotFound,
14015 ErrorCode::Conflict,
14016 ErrorCode::LimitExceeded,
14017 ErrorCode::CapabilityUnavailable,
14018 ErrorCode::NotSubmitted,
14019 ErrorCode::SubmittedIndeterminate,
14020 ErrorCode::ExpiredUnknown,
14021 ErrorCode::SecretNotEscrowed,
14022 ErrorCode::TemporarilyUnavailable,
14023 ErrorCode::Internal,
14024 ],
14025 limit_ids: &["request_bytes", "response_bytes"],
14026 effect_class: "durable_submit",
14027 risk_flags: &["credential_sensitive"],
14028 capability_family: "security",
14029 retry_safety: "pre_submit_only",
14030 identity_requirement: "caller_action_id",
14031 resolver: Some(Command::ResolveServiceCredentialReservation),
14032 cancellation: "per_call_until_submission_then_resolve",
14033 side_effects: &["commits_authoritative_state"],
14034 recovery: "resolve_with_resolve_service_credential_reservation",
14035 collection_index_ref: "none",
14036 },
14037 CommandSemanticContract {
14038 command: Command::ReserveServiceCredentialRotation,
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::SecretNotEscrowed,
14054 ErrorCode::TemporarilyUnavailable,
14055 ErrorCode::Internal,
14056 ],
14057 limit_ids: &["request_bytes", "response_bytes"],
14058 effect_class: "durable_submit",
14059 risk_flags: &["credential_sensitive"],
14060 capability_family: "security",
14061 retry_safety: "pre_submit_only",
14062 identity_requirement: "caller_action_id",
14063 resolver: Some(Command::ResolveServiceCredentialReservation),
14064 cancellation: "per_call_until_submission_then_resolve",
14065 side_effects: &["commits_authoritative_state"],
14066 recovery: "resolve_with_resolve_service_credential_reservation",
14067 collection_index_ref: "none",
14068 },
14069 CommandSemanticContract {
14070 command: Command::ActivateServiceCredential,
14071 admissible_errors: &[
14072 ErrorCode::Aborted,
14073 ErrorCode::DeadlineExceeded,
14074 ErrorCode::InvalidRequest,
14075 ErrorCode::UnsupportedVersion,
14076 ErrorCode::Unauthenticated,
14077 ErrorCode::PermissionDenied,
14078 ErrorCode::NotFound,
14079 ErrorCode::Conflict,
14080 ErrorCode::LimitExceeded,
14081 ErrorCode::CapabilityUnavailable,
14082 ErrorCode::NotSubmitted,
14083 ErrorCode::SubmittedIndeterminate,
14084 ErrorCode::ExpiredUnknown,
14085 ErrorCode::SecretNotEscrowed,
14086 ErrorCode::TemporarilyUnavailable,
14087 ErrorCode::Internal,
14088 ],
14089 limit_ids: &["request_bytes", "response_bytes"],
14090 effect_class: "durable_submit",
14091 risk_flags: &["credential_sensitive"],
14092 capability_family: "security",
14093 retry_safety: "pre_submit_only",
14094 identity_requirement: "server_locator",
14095 resolver: Some(Command::ResolveServiceCredentialReservation),
14096 cancellation: "per_call_until_submission_then_resolve",
14097 side_effects: &["commits_authoritative_state"],
14098 recovery: "resolve_with_resolve_service_credential_reservation",
14099 collection_index_ref: "none",
14100 },
14101 CommandSemanticContract {
14102 command: Command::ResolveServiceCredentialReservation,
14103 admissible_errors: &[
14104 ErrorCode::Aborted,
14105 ErrorCode::DeadlineExceeded,
14106 ErrorCode::InvalidRequest,
14107 ErrorCode::UnsupportedVersion,
14108 ErrorCode::Unauthenticated,
14109 ErrorCode::PermissionDenied,
14110 ErrorCode::NotFound,
14111 ErrorCode::LimitExceeded,
14112 ErrorCode::CapabilityUnavailable,
14113 ErrorCode::SecretNotEscrowed,
14114 ErrorCode::TemporarilyUnavailable,
14115 ErrorCode::Internal,
14116 ],
14117 limit_ids: &["request_bytes", "response_bytes"],
14118 effect_class: "read_only",
14119 risk_flags: &["credential_sensitive"],
14120 capability_family: "security",
14121 retry_safety: "safe",
14122 identity_requirement: "caller_action_id",
14123 resolver: None,
14124 cancellation: "per_call",
14125 side_effects: &[],
14126 recovery: "retry",
14127 collection_index_ref: "none",
14128 },
14129 CommandSemanticContract {
14130 command: Command::PrepareRevokeServiceCredential,
14131 admissible_errors: &[
14132 ErrorCode::Aborted,
14133 ErrorCode::DeadlineExceeded,
14134 ErrorCode::InvalidRequest,
14135 ErrorCode::UnsupportedVersion,
14136 ErrorCode::Unauthenticated,
14137 ErrorCode::PermissionDenied,
14138 ErrorCode::NotFound,
14139 ErrorCode::LimitExceeded,
14140 ErrorCode::CapabilityUnavailable,
14141 ErrorCode::SecretNotEscrowed,
14142 ErrorCode::TemporarilyUnavailable,
14143 ErrorCode::Internal,
14144 ],
14145 limit_ids: &["request_bytes", "response_bytes"],
14146 effect_class: "prepare",
14147 risk_flags: &["destructive", "credential_sensitive"],
14148 capability_family: "security",
14149 retry_safety: "safe",
14150 identity_requirement: "server_locator",
14151 resolver: None,
14152 cancellation: "per_call",
14153 side_effects: &["creates_bounded_preparation"],
14154 recovery: "retry",
14155 collection_index_ref: "none",
14156 },
14157 CommandSemanticContract {
14158 command: Command::RevokeServiceCredential,
14159 admissible_errors: &[
14160 ErrorCode::Aborted,
14161 ErrorCode::DeadlineExceeded,
14162 ErrorCode::InvalidRequest,
14163 ErrorCode::UnsupportedVersion,
14164 ErrorCode::Unauthenticated,
14165 ErrorCode::PermissionDenied,
14166 ErrorCode::NotFound,
14167 ErrorCode::Conflict,
14168 ErrorCode::LimitExceeded,
14169 ErrorCode::CapabilityUnavailable,
14170 ErrorCode::NotSubmitted,
14171 ErrorCode::SubmittedIndeterminate,
14172 ErrorCode::ExpiredUnknown,
14173 ErrorCode::SecretNotEscrowed,
14174 ErrorCode::TemporarilyUnavailable,
14175 ErrorCode::Internal,
14176 ],
14177 limit_ids: &["request_bytes", "response_bytes"],
14178 effect_class: "durable_submit",
14179 risk_flags: &["destructive", "credential_sensitive"],
14180 capability_family: "security",
14181 retry_safety: "pre_submit_only",
14182 identity_requirement: "request_locator",
14183 resolver: Some(Command::ResolveSecurityAction),
14184 cancellation: "per_call_until_submission_then_resolve",
14185 side_effects: &["commits_authoritative_state"],
14186 recovery: "resolve_with_resolve_security_action",
14187 collection_index_ref: "none",
14188 },
14189 CommandSemanticContract {
14190 command: Command::ResolveSecurityAction,
14191 admissible_errors: &[
14192 ErrorCode::Aborted,
14193 ErrorCode::DeadlineExceeded,
14194 ErrorCode::InvalidRequest,
14195 ErrorCode::UnsupportedVersion,
14196 ErrorCode::Unauthenticated,
14197 ErrorCode::PermissionDenied,
14198 ErrorCode::NotFound,
14199 ErrorCode::LimitExceeded,
14200 ErrorCode::CapabilityUnavailable,
14201 ErrorCode::SecretNotEscrowed,
14202 ErrorCode::TemporarilyUnavailable,
14203 ErrorCode::Internal,
14204 ],
14205 limit_ids: &["request_bytes", "response_bytes"],
14206 effect_class: "read_only",
14207 risk_flags: &[],
14208 capability_family: "security",
14209 retry_safety: "safe",
14210 identity_requirement: "request_locator",
14211 resolver: None,
14212 cancellation: "per_call",
14213 side_effects: &[],
14214 recovery: "retry",
14215 collection_index_ref: "none",
14216 },
14217 CommandSemanticContract {
14218 command: Command::GetSecurityRole,
14219 admissible_errors: &[
14220 ErrorCode::Aborted,
14221 ErrorCode::DeadlineExceeded,
14222 ErrorCode::InvalidRequest,
14223 ErrorCode::UnsupportedVersion,
14224 ErrorCode::Unauthenticated,
14225 ErrorCode::PermissionDenied,
14226 ErrorCode::NotFound,
14227 ErrorCode::LimitExceeded,
14228 ErrorCode::CapabilityUnavailable,
14229 ErrorCode::TemporarilyUnavailable,
14230 ErrorCode::Internal,
14231 ],
14232 limit_ids: &["request_bytes", "response_bytes"],
14233 effect_class: "read_only",
14234 risk_flags: &[],
14235 capability_family: "security",
14236 retry_safety: "safe",
14237 identity_requirement: "none",
14238 resolver: None,
14239 cancellation: "per_call",
14240 side_effects: &[],
14241 recovery: "retry",
14242 collection_index_ref: "none",
14243 },
14244 CommandSemanticContract {
14245 command: Command::PrepareRoleAppendAccessChange,
14246 admissible_errors: &[
14247 ErrorCode::Aborted,
14248 ErrorCode::DeadlineExceeded,
14249 ErrorCode::InvalidRequest,
14250 ErrorCode::UnsupportedVersion,
14251 ErrorCode::Unauthenticated,
14252 ErrorCode::PermissionDenied,
14253 ErrorCode::NotFound,
14254 ErrorCode::Conflict,
14255 ErrorCode::LimitExceeded,
14256 ErrorCode::CapabilityUnavailable,
14257 ErrorCode::TemporarilyUnavailable,
14258 ErrorCode::Internal,
14259 ],
14260 limit_ids: &["request_bytes", "response_bytes"],
14261 effect_class: "prepare",
14262 risk_flags: &["destructive"],
14263 capability_family: "security",
14264 retry_safety: "safe",
14265 identity_requirement: "server_locator",
14266 resolver: None,
14267 cancellation: "per_call",
14268 side_effects: &["creates_bounded_preparation"],
14269 recovery: "retry",
14270 collection_index_ref: "none",
14271 },
14272 CommandSemanticContract {
14273 command: Command::SubmitRoleAppendAccessChange,
14274 admissible_errors: &[
14275 ErrorCode::Aborted,
14276 ErrorCode::DeadlineExceeded,
14277 ErrorCode::InvalidRequest,
14278 ErrorCode::UnsupportedVersion,
14279 ErrorCode::Unauthenticated,
14280 ErrorCode::PermissionDenied,
14281 ErrorCode::NotFound,
14282 ErrorCode::Conflict,
14283 ErrorCode::LimitExceeded,
14284 ErrorCode::CapabilityUnavailable,
14285 ErrorCode::NotSubmitted,
14286 ErrorCode::SubmittedIndeterminate,
14287 ErrorCode::ExpiredUnknown,
14288 ErrorCode::TemporarilyUnavailable,
14289 ErrorCode::Internal,
14290 ],
14291 limit_ids: &["request_bytes", "response_bytes"],
14292 effect_class: "durable_submit",
14293 risk_flags: &["destructive"],
14294 capability_family: "security",
14295 retry_safety: "pre_submit_only",
14296 identity_requirement: "request_locator",
14297 resolver: Some(Command::ResolveSecurityAction),
14298 cancellation: "per_call_until_submission_then_resolve",
14299 side_effects: &["commits_authoritative_state"],
14300 recovery: "resolve_with_resolve_security_action",
14301 collection_index_ref: "none",
14302 },
14303 CommandSemanticContract {
14304 command: Command::ListServiceCredentials,
14305 admissible_errors: &[
14306 ErrorCode::Aborted,
14307 ErrorCode::DeadlineExceeded,
14308 ErrorCode::InvalidRequest,
14309 ErrorCode::UnsupportedVersion,
14310 ErrorCode::Unauthenticated,
14311 ErrorCode::PermissionDenied,
14312 ErrorCode::NotFound,
14313 ErrorCode::StaleCursor,
14314 ErrorCode::RestartBudgetExhausted,
14315 ErrorCode::LimitExceeded,
14316 ErrorCode::CapabilityUnavailable,
14317 ErrorCode::SecretNotEscrowed,
14318 ErrorCode::TemporarilyUnavailable,
14319 ErrorCode::Internal,
14320 ],
14321 limit_ids: &["request_bytes", "response_bytes", "page_size"],
14322 effect_class: "read_only",
14323 risk_flags: &["credential_sensitive"],
14324 capability_family: "security",
14325 retry_safety: "safe",
14326 identity_requirement: "none",
14327 resolver: None,
14328 cancellation: "per_call",
14329 side_effects: &[],
14330 recovery: "retry",
14331 collection_index_ref: "none",
14332 },
14333 CommandSemanticContract {
14334 command: Command::GetRuntimeStatus,
14335 admissible_errors: &[
14336 ErrorCode::Aborted,
14337 ErrorCode::DeadlineExceeded,
14338 ErrorCode::InvalidRequest,
14339 ErrorCode::UnsupportedVersion,
14340 ErrorCode::Unauthenticated,
14341 ErrorCode::PermissionDenied,
14342 ErrorCode::NotFound,
14343 ErrorCode::LimitExceeded,
14344 ErrorCode::CapabilityUnavailable,
14345 ErrorCode::TemporarilyUnavailable,
14346 ErrorCode::Internal,
14347 ],
14348 limit_ids: &["request_bytes", "response_bytes"],
14349 effect_class: "read_only",
14350 risk_flags: &[],
14351 capability_family: "catalog",
14352 retry_safety: "safe",
14353 identity_requirement: "none",
14354 resolver: None,
14355 cancellation: "per_call",
14356 side_effects: &[],
14357 recovery: "retry",
14358 collection_index_ref: "none",
14359 },
14360 CommandSemanticContract {
14361 command: Command::GetResultCacheStatus,
14362 admissible_errors: &[
14363 ErrorCode::Aborted,
14364 ErrorCode::DeadlineExceeded,
14365 ErrorCode::InvalidRequest,
14366 ErrorCode::UnsupportedVersion,
14367 ErrorCode::Unauthenticated,
14368 ErrorCode::PermissionDenied,
14369 ErrorCode::NotFound,
14370 ErrorCode::LimitExceeded,
14371 ErrorCode::CapabilityUnavailable,
14372 ErrorCode::TemporarilyUnavailable,
14373 ErrorCode::Internal,
14374 ],
14375 limit_ids: &["request_bytes", "response_bytes"],
14376 effect_class: "read_only",
14377 risk_flags: &[],
14378 capability_family: "catalog",
14379 retry_safety: "safe",
14380 identity_requirement: "none",
14381 resolver: None,
14382 cancellation: "per_call",
14383 side_effects: &[],
14384 recovery: "retry",
14385 collection_index_ref: "none",
14386 },
14387 CommandSemanticContract {
14388 command: Command::GetFieldPromotionStatus,
14389 admissible_errors: &[
14390 ErrorCode::Aborted,
14391 ErrorCode::DeadlineExceeded,
14392 ErrorCode::InvalidRequest,
14393 ErrorCode::UnsupportedVersion,
14394 ErrorCode::Unauthenticated,
14395 ErrorCode::PermissionDenied,
14396 ErrorCode::NotFound,
14397 ErrorCode::LimitExceeded,
14398 ErrorCode::CapabilityUnavailable,
14399 ErrorCode::TemporarilyUnavailable,
14400 ErrorCode::Internal,
14401 ],
14402 limit_ids: &["request_bytes", "response_bytes"],
14403 effect_class: "read_only",
14404 risk_flags: &[],
14405 capability_family: "catalog",
14406 retry_safety: "safe",
14407 identity_requirement: "none",
14408 resolver: None,
14409 cancellation: "per_call",
14410 side_effects: &[],
14411 recovery: "retry",
14412 collection_index_ref: "none",
14413 },
14414 CommandSemanticContract {
14415 command: Command::GetOverloadStatus,
14416 admissible_errors: &[
14417 ErrorCode::Aborted,
14418 ErrorCode::DeadlineExceeded,
14419 ErrorCode::InvalidRequest,
14420 ErrorCode::UnsupportedVersion,
14421 ErrorCode::Unauthenticated,
14422 ErrorCode::PermissionDenied,
14423 ErrorCode::NotFound,
14424 ErrorCode::LimitExceeded,
14425 ErrorCode::CapabilityUnavailable,
14426 ErrorCode::TemporarilyUnavailable,
14427 ErrorCode::Internal,
14428 ],
14429 limit_ids: &["request_bytes", "response_bytes"],
14430 effect_class: "read_only",
14431 risk_flags: &[],
14432 capability_family: "catalog",
14433 retry_safety: "safe",
14434 identity_requirement: "none",
14435 resolver: None,
14436 cancellation: "per_call",
14437 side_effects: &[],
14438 recovery: "retry",
14439 collection_index_ref: "none",
14440 },
14441 CommandSemanticContract {
14442 command: Command::ConfigureExternalKey,
14443 admissible_errors: &[
14444 ErrorCode::Aborted,
14445 ErrorCode::DeadlineExceeded,
14446 ErrorCode::InvalidRequest,
14447 ErrorCode::UnsupportedVersion,
14448 ErrorCode::Unauthenticated,
14449 ErrorCode::PermissionDenied,
14450 ErrorCode::NotFound,
14451 ErrorCode::Conflict,
14452 ErrorCode::LimitExceeded,
14453 ErrorCode::CapabilityUnavailable,
14454 ErrorCode::NotSubmitted,
14455 ErrorCode::SubmittedIndeterminate,
14456 ErrorCode::ExpiredUnknown,
14457 ErrorCode::TemporarilyUnavailable,
14458 ErrorCode::Internal,
14459 ],
14460 limit_ids: &["request_bytes", "response_bytes"],
14461 effect_class: "control_write",
14462 risk_flags: &[],
14463 capability_family: "lifecycle",
14464 retry_safety: "pre_submit_only",
14465 identity_requirement: "none",
14466 resolver: None,
14467 cancellation: "per_call_until_submission_then_resolve",
14468 side_effects: &["commits_authoritative_state"],
14469 recovery: "retry_if_not_submitted",
14470 collection_index_ref: "request_index",
14471 },
14472 CommandSemanticContract {
14473 command: Command::RotateExternalKeyBinding,
14474 admissible_errors: &[
14475 ErrorCode::Aborted,
14476 ErrorCode::DeadlineExceeded,
14477 ErrorCode::InvalidRequest,
14478 ErrorCode::UnsupportedVersion,
14479 ErrorCode::Unauthenticated,
14480 ErrorCode::PermissionDenied,
14481 ErrorCode::NotFound,
14482 ErrorCode::Conflict,
14483 ErrorCode::LimitExceeded,
14484 ErrorCode::CapabilityUnavailable,
14485 ErrorCode::NotSubmitted,
14486 ErrorCode::SubmittedIndeterminate,
14487 ErrorCode::ExpiredUnknown,
14488 ErrorCode::TemporarilyUnavailable,
14489 ErrorCode::Internal,
14490 ],
14491 limit_ids: &["request_bytes", "response_bytes"],
14492 effect_class: "control_write",
14493 risk_flags: &[],
14494 capability_family: "lifecycle",
14495 retry_safety: "pre_submit_only",
14496 identity_requirement: "none",
14497 resolver: None,
14498 cancellation: "per_call_until_submission_then_resolve",
14499 side_effects: &["commits_authoritative_state"],
14500 recovery: "retry_if_not_submitted",
14501 collection_index_ref: "request_index",
14502 },
14503 CommandSemanticContract {
14504 command: Command::ConfigureAggregateThenDelete,
14505 admissible_errors: &[
14506 ErrorCode::Aborted,
14507 ErrorCode::DeadlineExceeded,
14508 ErrorCode::InvalidRequest,
14509 ErrorCode::UnsupportedVersion,
14510 ErrorCode::Unauthenticated,
14511 ErrorCode::PermissionDenied,
14512 ErrorCode::NotFound,
14513 ErrorCode::Conflict,
14514 ErrorCode::LimitExceeded,
14515 ErrorCode::CapabilityUnavailable,
14516 ErrorCode::NotSubmitted,
14517 ErrorCode::SubmittedIndeterminate,
14518 ErrorCode::ExpiredUnknown,
14519 ErrorCode::TemporarilyUnavailable,
14520 ErrorCode::Internal,
14521 ],
14522 limit_ids: &["request_bytes", "response_bytes"],
14523 effect_class: "control_write",
14524 risk_flags: &["destructive"],
14525 capability_family: "lifecycle",
14526 retry_safety: "pre_submit_only",
14527 identity_requirement: "none",
14528 resolver: None,
14529 cancellation: "per_call_until_submission_then_resolve",
14530 side_effects: &["commits_authoritative_state"],
14531 recovery: "retry_if_not_submitted",
14532 collection_index_ref: "request_index",
14533 },
14534 CommandSemanticContract {
14535 command: Command::GetLifecycleStatus,
14536 admissible_errors: &[
14537 ErrorCode::Aborted,
14538 ErrorCode::DeadlineExceeded,
14539 ErrorCode::InvalidRequest,
14540 ErrorCode::UnsupportedVersion,
14541 ErrorCode::Unauthenticated,
14542 ErrorCode::PermissionDenied,
14543 ErrorCode::NotFound,
14544 ErrorCode::LimitExceeded,
14545 ErrorCode::CapabilityUnavailable,
14546 ErrorCode::TemporarilyUnavailable,
14547 ErrorCode::Internal,
14548 ],
14549 limit_ids: &["request_bytes", "response_bytes"],
14550 effect_class: "read_only",
14551 risk_flags: &[],
14552 capability_family: "catalog",
14553 retry_safety: "safe",
14554 identity_requirement: "none",
14555 resolver: None,
14556 cancellation: "per_call",
14557 side_effects: &[],
14558 recovery: "retry",
14559 collection_index_ref: "none",
14560 },
14561 CommandSemanticContract {
14562 command: Command::GetQuota,
14563 admissible_errors: &[
14564 ErrorCode::Aborted,
14565 ErrorCode::DeadlineExceeded,
14566 ErrorCode::InvalidRequest,
14567 ErrorCode::UnsupportedVersion,
14568 ErrorCode::Unauthenticated,
14569 ErrorCode::PermissionDenied,
14570 ErrorCode::NotFound,
14571 ErrorCode::LimitExceeded,
14572 ErrorCode::CapabilityUnavailable,
14573 ErrorCode::TemporarilyUnavailable,
14574 ErrorCode::Internal,
14575 ],
14576 limit_ids: &["request_bytes", "response_bytes"],
14577 effect_class: "read_only",
14578 risk_flags: &[],
14579 capability_family: "quota",
14580 retry_safety: "safe",
14581 identity_requirement: "none",
14582 resolver: None,
14583 cancellation: "per_call",
14584 side_effects: &[],
14585 recovery: "retry",
14586 collection_index_ref: "none",
14587 },
14588 CommandSemanticContract {
14589 command: Command::UpdateQuota,
14590 admissible_errors: &[
14591 ErrorCode::Aborted,
14592 ErrorCode::DeadlineExceeded,
14593 ErrorCode::InvalidRequest,
14594 ErrorCode::UnsupportedVersion,
14595 ErrorCode::Unauthenticated,
14596 ErrorCode::PermissionDenied,
14597 ErrorCode::NotFound,
14598 ErrorCode::Conflict,
14599 ErrorCode::LimitExceeded,
14600 ErrorCode::CapabilityUnavailable,
14601 ErrorCode::NotSubmitted,
14602 ErrorCode::SubmittedIndeterminate,
14603 ErrorCode::ExpiredUnknown,
14604 ErrorCode::TemporarilyUnavailable,
14605 ErrorCode::Internal,
14606 ],
14607 limit_ids: &["request_bytes", "response_bytes"],
14608 effect_class: "control_write",
14609 risk_flags: &[],
14610 capability_family: "quota",
14611 retry_safety: "pre_submit_only",
14612 identity_requirement: "none",
14613 resolver: None,
14614 cancellation: "per_call_until_submission_then_resolve",
14615 side_effects: &["commits_authoritative_state"],
14616 recovery: "retry_if_not_submitted",
14617 collection_index_ref: "none",
14618 },
14619 CommandSemanticContract {
14620 command: Command::GetBinding,
14621 admissible_errors: &[
14622 ErrorCode::Aborted,
14623 ErrorCode::DeadlineExceeded,
14624 ErrorCode::InvalidRequest,
14625 ErrorCode::UnsupportedVersion,
14626 ErrorCode::Unauthenticated,
14627 ErrorCode::PermissionDenied,
14628 ErrorCode::NotFound,
14629 ErrorCode::LimitExceeded,
14630 ErrorCode::CapabilityUnavailable,
14631 ErrorCode::TemporarilyUnavailable,
14632 ErrorCode::Internal,
14633 ],
14634 limit_ids: &["request_bytes", "response_bytes"],
14635 effect_class: "read_only",
14636 risk_flags: &[],
14637 capability_family: "runtime_control",
14638 retry_safety: "safe",
14639 identity_requirement: "none",
14640 resolver: None,
14641 cancellation: "per_call",
14642 side_effects: &[],
14643 recovery: "retry",
14644 collection_index_ref: "none",
14645 },
14646 CommandSemanticContract {
14647 command: Command::GetAdmissionStatus,
14648 admissible_errors: &[
14649 ErrorCode::Aborted,
14650 ErrorCode::DeadlineExceeded,
14651 ErrorCode::InvalidRequest,
14652 ErrorCode::UnsupportedVersion,
14653 ErrorCode::Unauthenticated,
14654 ErrorCode::PermissionDenied,
14655 ErrorCode::NotFound,
14656 ErrorCode::LimitExceeded,
14657 ErrorCode::CapabilityUnavailable,
14658 ErrorCode::TemporarilyUnavailable,
14659 ErrorCode::Internal,
14660 ],
14661 limit_ids: &["request_bytes", "response_bytes"],
14662 effect_class: "read_only",
14663 risk_flags: &[],
14664 capability_family: "runtime_control",
14665 retry_safety: "safe",
14666 identity_requirement: "none",
14667 resolver: None,
14668 cancellation: "per_call",
14669 side_effects: &[],
14670 recovery: "retry",
14671 collection_index_ref: "none",
14672 },
14673 CommandSemanticContract {
14674 command: Command::SetAdmission,
14675 admissible_errors: &[
14676 ErrorCode::Aborted,
14677 ErrorCode::DeadlineExceeded,
14678 ErrorCode::InvalidRequest,
14679 ErrorCode::UnsupportedVersion,
14680 ErrorCode::Unauthenticated,
14681 ErrorCode::PermissionDenied,
14682 ErrorCode::NotFound,
14683 ErrorCode::Conflict,
14684 ErrorCode::LimitExceeded,
14685 ErrorCode::CapabilityUnavailable,
14686 ErrorCode::NotSubmitted,
14687 ErrorCode::SubmittedIndeterminate,
14688 ErrorCode::ExpiredUnknown,
14689 ErrorCode::TemporarilyUnavailable,
14690 ErrorCode::Internal,
14691 ],
14692 limit_ids: &["request_bytes", "response_bytes"],
14693 effect_class: "control_write",
14694 risk_flags: &[],
14695 capability_family: "runtime_control",
14696 retry_safety: "pre_submit_only",
14697 identity_requirement: "none",
14698 resolver: None,
14699 cancellation: "per_call_until_submission_then_resolve",
14700 side_effects: &["commits_authoritative_state"],
14701 recovery: "retry_if_not_submitted",
14702 collection_index_ref: "none",
14703 },
14704 CommandSemanticContract {
14705 command: Command::GetQuiesceStatus,
14706 admissible_errors: &[
14707 ErrorCode::Aborted,
14708 ErrorCode::DeadlineExceeded,
14709 ErrorCode::InvalidRequest,
14710 ErrorCode::UnsupportedVersion,
14711 ErrorCode::Unauthenticated,
14712 ErrorCode::PermissionDenied,
14713 ErrorCode::NotFound,
14714 ErrorCode::LimitExceeded,
14715 ErrorCode::CapabilityUnavailable,
14716 ErrorCode::TemporarilyUnavailable,
14717 ErrorCode::Internal,
14718 ],
14719 limit_ids: &["request_bytes", "response_bytes"],
14720 effect_class: "read_only",
14721 risk_flags: &[],
14722 capability_family: "runtime_control",
14723 retry_safety: "safe",
14724 identity_requirement: "none",
14725 resolver: None,
14726 cancellation: "per_call",
14727 side_effects: &[],
14728 recovery: "retry",
14729 collection_index_ref: "none",
14730 },
14731 CommandSemanticContract {
14732 command: Command::GetDecommissionReadiness,
14733 admissible_errors: &[
14734 ErrorCode::Aborted,
14735 ErrorCode::DeadlineExceeded,
14736 ErrorCode::InvalidRequest,
14737 ErrorCode::UnsupportedVersion,
14738 ErrorCode::Unauthenticated,
14739 ErrorCode::PermissionDenied,
14740 ErrorCode::NotFound,
14741 ErrorCode::LimitExceeded,
14742 ErrorCode::CapabilityUnavailable,
14743 ErrorCode::TemporarilyUnavailable,
14744 ErrorCode::Internal,
14745 ],
14746 limit_ids: &["request_bytes", "response_bytes"],
14747 effect_class: "read_only",
14748 risk_flags: &[],
14749 capability_family: "runtime_control",
14750 retry_safety: "safe",
14751 identity_requirement: "none",
14752 resolver: None,
14753 cancellation: "per_call",
14754 side_effects: &[],
14755 recovery: "retry",
14756 collection_index_ref: "none",
14757 },
14758 CommandSemanticContract {
14759 command: Command::GetUpgradeReadiness,
14760 admissible_errors: &[
14761 ErrorCode::Aborted,
14762 ErrorCode::DeadlineExceeded,
14763 ErrorCode::InvalidRequest,
14764 ErrorCode::UnsupportedVersion,
14765 ErrorCode::Unauthenticated,
14766 ErrorCode::PermissionDenied,
14767 ErrorCode::NotFound,
14768 ErrorCode::LimitExceeded,
14769 ErrorCode::CapabilityUnavailable,
14770 ErrorCode::TemporarilyUnavailable,
14771 ErrorCode::Internal,
14772 ],
14773 limit_ids: &["request_bytes", "response_bytes"],
14774 effect_class: "read_only",
14775 risk_flags: &[],
14776 capability_family: "operations",
14777 retry_safety: "safe",
14778 identity_requirement: "none",
14779 resolver: None,
14780 cancellation: "per_call",
14781 side_effects: &[],
14782 recovery: "retry",
14783 collection_index_ref: "none",
14784 },
14785 CommandSemanticContract {
14786 command: Command::GetMaintenanceStatus,
14787 admissible_errors: &[
14788 ErrorCode::Aborted,
14789 ErrorCode::DeadlineExceeded,
14790 ErrorCode::InvalidRequest,
14791 ErrorCode::UnsupportedVersion,
14792 ErrorCode::Unauthenticated,
14793 ErrorCode::PermissionDenied,
14794 ErrorCode::NotFound,
14795 ErrorCode::StaleCursor,
14796 ErrorCode::LimitExceeded,
14797 ErrorCode::CapabilityUnavailable,
14798 ErrorCode::TemporarilyUnavailable,
14799 ErrorCode::Internal,
14800 ],
14801 limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
14802 effect_class: "read_only",
14803 risk_flags: &[],
14804 capability_family: "operations",
14805 retry_safety: "safe",
14806 identity_requirement: "none",
14807 resolver: None,
14808 cancellation: "per_call",
14809 side_effects: &[],
14810 recovery: "retry",
14811 collection_index_ref: "optional_request_index",
14812 },
14813 CommandSemanticContract {
14814 command: Command::WarmVectorIndex,
14815 admissible_errors: &[
14816 ErrorCode::Aborted,
14817 ErrorCode::DeadlineExceeded,
14818 ErrorCode::InvalidRequest,
14819 ErrorCode::UnsupportedVersion,
14820 ErrorCode::Unauthenticated,
14821 ErrorCode::PermissionDenied,
14822 ErrorCode::NotFound,
14823 ErrorCode::Conflict,
14824 ErrorCode::LimitExceeded,
14825 ErrorCode::CapabilityUnavailable,
14826 ErrorCode::TemporarilyUnavailable,
14827 ErrorCode::Internal,
14828 ],
14829 limit_ids: &[
14830 "request_bytes",
14831 "response_bytes",
14832 "vector_warm_components",
14833 "vector_warm_requests",
14834 "vector_warm_bytes",
14835 "vector_warm_achievements",
14836 "vector_warm_ttl_millis",
14837 ],
14838 effect_class: "read_only",
14839 risk_flags: &[],
14840 capability_family: "data",
14841 retry_safety: "safe",
14842 identity_requirement: "exact_root",
14843 resolver: None,
14844 cancellation: "per_call",
14845 side_effects: &["populates_reconstructible_cache"],
14846 recovery: "retry",
14847 collection_index_ref: "request_index",
14848 },
14849 CommandSemanticContract {
14850 command: Command::EvaluateVectorRecall,
14851 admissible_errors: &[
14852 ErrorCode::Aborted,
14853 ErrorCode::DeadlineExceeded,
14854 ErrorCode::InvalidRequest,
14855 ErrorCode::UnsupportedVersion,
14856 ErrorCode::Unauthenticated,
14857 ErrorCode::PermissionDenied,
14858 ErrorCode::NotFound,
14859 ErrorCode::Conflict,
14860 ErrorCode::LimitExceeded,
14861 ErrorCode::CapabilityUnavailable,
14862 ErrorCode::NotSubmitted,
14863 ErrorCode::SubmittedIndeterminate,
14864 ErrorCode::ExpiredUnknown,
14865 ErrorCode::TemporarilyUnavailable,
14866 ErrorCode::Internal,
14867 ],
14868 limit_ids: &[
14869 "request_bytes",
14870 "response_bytes",
14871 "vector_dimensions",
14872 "vector_query_bytes",
14873 "vector_request_bytes",
14874 "vector_candidates",
14875 "vector_evaluation_queries",
14876 "vector_evaluation_k",
14877 "vector_evaluation_artifact_bytes",
14878 ],
14879 effect_class: "durable_submit",
14880 risk_flags: &[],
14881 capability_family: "diagnostics",
14882 retry_safety: "pre_submit_only",
14883 identity_requirement: "caller_action_id",
14884 resolver: None,
14885 cancellation: "per_call_until_submission_then_resolve",
14886 side_effects: &["commits_authoritative_state"],
14887 recovery: "retry_if_not_submitted",
14888 collection_index_ref: "request_index",
14889 },
14890 CommandSemanticContract {
14891 command: Command::CalibrateVectorStrategy,
14892 admissible_errors: &[
14893 ErrorCode::Aborted,
14894 ErrorCode::DeadlineExceeded,
14895 ErrorCode::InvalidRequest,
14896 ErrorCode::UnsupportedVersion,
14897 ErrorCode::Unauthenticated,
14898 ErrorCode::PermissionDenied,
14899 ErrorCode::NotFound,
14900 ErrorCode::Conflict,
14901 ErrorCode::LimitExceeded,
14902 ErrorCode::CapabilityUnavailable,
14903 ErrorCode::NotSubmitted,
14904 ErrorCode::SubmittedIndeterminate,
14905 ErrorCode::ExpiredUnknown,
14906 ErrorCode::TemporarilyUnavailable,
14907 ErrorCode::Internal,
14908 ],
14909 limit_ids: &[
14910 "request_bytes",
14911 "response_bytes",
14912 "vector_dimensions",
14913 "vector_query_bytes",
14914 "vector_request_bytes",
14915 "vector_candidates",
14916 "vector_evaluation_queries",
14917 "vector_evaluation_k",
14918 "vector_evaluation_profiles",
14919 "vector_evaluation_artifact_bytes",
14920 ],
14921 effect_class: "durable_submit",
14922 risk_flags: &[],
14923 capability_family: "diagnostics",
14924 retry_safety: "pre_submit_only",
14925 identity_requirement: "caller_action_id",
14926 resolver: None,
14927 cancellation: "per_call_until_submission_then_resolve",
14928 side_effects: &["commits_authoritative_state"],
14929 recovery: "retry_if_not_submitted",
14930 collection_index_ref: "request_index",
14931 },
14932 CommandSemanticContract {
14933 command: Command::GetVectorDiagnostic,
14934 admissible_errors: &[
14935 ErrorCode::Aborted,
14936 ErrorCode::DeadlineExceeded,
14937 ErrorCode::InvalidRequest,
14938 ErrorCode::UnsupportedVersion,
14939 ErrorCode::Unauthenticated,
14940 ErrorCode::PermissionDenied,
14941 ErrorCode::NotFound,
14942 ErrorCode::LimitExceeded,
14943 ErrorCode::CapabilityUnavailable,
14944 ErrorCode::TemporarilyUnavailable,
14945 ErrorCode::Internal,
14946 ],
14947 limit_ids: &["request_bytes", "response_bytes"],
14948 effect_class: "read_only",
14949 risk_flags: &[],
14950 capability_family: "diagnostics",
14951 retry_safety: "safe",
14952 identity_requirement: "request_locator",
14953 resolver: None,
14954 cancellation: "per_call",
14955 side_effects: &[],
14956 recovery: "retry",
14957 collection_index_ref: "none",
14958 },
14959 CommandSemanticContract {
14960 command: Command::CreateDiagnostic,
14961 admissible_errors: &[
14962 ErrorCode::Aborted,
14963 ErrorCode::DeadlineExceeded,
14964 ErrorCode::InvalidRequest,
14965 ErrorCode::UnsupportedVersion,
14966 ErrorCode::Unauthenticated,
14967 ErrorCode::PermissionDenied,
14968 ErrorCode::NotFound,
14969 ErrorCode::Conflict,
14970 ErrorCode::LimitExceeded,
14971 ErrorCode::CapabilityUnavailable,
14972 ErrorCode::NotSubmitted,
14973 ErrorCode::SubmittedIndeterminate,
14974 ErrorCode::ExpiredUnknown,
14975 ErrorCode::TemporarilyUnavailable,
14976 ErrorCode::Internal,
14977 ],
14978 limit_ids: &["request_bytes", "response_bytes"],
14979 effect_class: "durable_submit",
14980 risk_flags: &[],
14981 capability_family: "diagnostics",
14982 retry_safety: "pre_submit_only",
14983 identity_requirement: "none",
14984 resolver: None,
14985 cancellation: "per_call_until_submission_then_resolve",
14986 side_effects: &["commits_authoritative_state"],
14987 recovery: "retry_if_not_submitted",
14988 collection_index_ref: "none",
14989 },
14990 CommandSemanticContract {
14991 command: Command::GetDiagnostic,
14992 admissible_errors: &[
14993 ErrorCode::Aborted,
14994 ErrorCode::DeadlineExceeded,
14995 ErrorCode::InvalidRequest,
14996 ErrorCode::UnsupportedVersion,
14997 ErrorCode::Unauthenticated,
14998 ErrorCode::PermissionDenied,
14999 ErrorCode::NotFound,
15000 ErrorCode::LimitExceeded,
15001 ErrorCode::CapabilityUnavailable,
15002 ErrorCode::TemporarilyUnavailable,
15003 ErrorCode::Internal,
15004 ],
15005 limit_ids: &["request_bytes", "response_bytes"],
15006 effect_class: "read_only",
15007 risk_flags: &[],
15008 capability_family: "diagnostics",
15009 retry_safety: "safe",
15010 identity_requirement: "request_locator",
15011 resolver: None,
15012 cancellation: "per_call",
15013 side_effects: &[],
15014 recovery: "retry",
15015 collection_index_ref: "none",
15016 },
15017 CommandSemanticContract {
15018 command: Command::PrepareCollectionExport,
15019 admissible_errors: &[
15020 ErrorCode::Aborted,
15021 ErrorCode::DeadlineExceeded,
15022 ErrorCode::InvalidRequest,
15023 ErrorCode::UnsupportedVersion,
15024 ErrorCode::Unauthenticated,
15025 ErrorCode::PermissionDenied,
15026 ErrorCode::NotFound,
15027 ErrorCode::LimitExceeded,
15028 ErrorCode::CapabilityUnavailable,
15029 ErrorCode::TemporarilyUnavailable,
15030 ErrorCode::Internal,
15031 ],
15032 limit_ids: &[
15033 "request_bytes",
15034 "response_bytes",
15035 "collection_export_bytes",
15036 "portability_prefix_bytes",
15037 ],
15038 effect_class: "prepare",
15039 risk_flags: &[],
15040 capability_family: "portability",
15041 retry_safety: "safe",
15042 identity_requirement: "caller_action_id",
15043 resolver: None,
15044 cancellation: "per_call",
15045 side_effects: &[],
15046 recovery: "retry",
15047 collection_index_ref: "none",
15048 },
15049 CommandSemanticContract {
15050 command: Command::StartCollectionExport,
15051 admissible_errors: &[
15052 ErrorCode::Aborted,
15053 ErrorCode::DeadlineExceeded,
15054 ErrorCode::InvalidRequest,
15055 ErrorCode::UnsupportedVersion,
15056 ErrorCode::Unauthenticated,
15057 ErrorCode::PermissionDenied,
15058 ErrorCode::NotFound,
15059 ErrorCode::Conflict,
15060 ErrorCode::LimitExceeded,
15061 ErrorCode::CapabilityUnavailable,
15062 ErrorCode::NotSubmitted,
15063 ErrorCode::SubmittedIndeterminate,
15064 ErrorCode::ExpiredUnknown,
15065 ErrorCode::TemporarilyUnavailable,
15066 ErrorCode::Internal,
15067 ],
15068 limit_ids: &[
15069 "request_bytes",
15070 "response_bytes",
15071 "collection_export_bytes",
15072 "collection_export_documents",
15073 "portability_prefix_bytes",
15074 ],
15075 effect_class: "durable_submit",
15076 risk_flags: &[],
15077 capability_family: "portability",
15078 retry_safety: "pre_submit_only",
15079 identity_requirement: "caller_action_id",
15080 resolver: Some(Command::ResolveCollectionExport),
15081 cancellation: "per_call_until_submission_then_resolve",
15082 side_effects: &["commits_authoritative_state", "writes_external_artifact"],
15083 recovery: "resolve_with_resolve_collection_export",
15084 collection_index_ref: "none",
15085 },
15086 CommandSemanticContract {
15087 command: Command::ResolveCollectionExport,
15088 admissible_errors: &[
15089 ErrorCode::Aborted,
15090 ErrorCode::DeadlineExceeded,
15091 ErrorCode::InvalidRequest,
15092 ErrorCode::UnsupportedVersion,
15093 ErrorCode::Unauthenticated,
15094 ErrorCode::PermissionDenied,
15095 ErrorCode::NotFound,
15096 ErrorCode::LimitExceeded,
15097 ErrorCode::CapabilityUnavailable,
15098 ErrorCode::TemporarilyUnavailable,
15099 ErrorCode::Internal,
15100 ],
15101 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
15102 effect_class: "read_only",
15103 risk_flags: &[],
15104 capability_family: "portability",
15105 retry_safety: "safe",
15106 identity_requirement: "caller_action_id",
15107 resolver: None,
15108 cancellation: "per_call",
15109 side_effects: &[],
15110 recovery: "retry",
15111 collection_index_ref: "none",
15112 },
15113 CommandSemanticContract {
15114 command: Command::VerifyCollectionExport,
15115 admissible_errors: &[
15116 ErrorCode::Aborted,
15117 ErrorCode::DeadlineExceeded,
15118 ErrorCode::InvalidRequest,
15119 ErrorCode::UnsupportedVersion,
15120 ErrorCode::Unauthenticated,
15121 ErrorCode::PermissionDenied,
15122 ErrorCode::NotFound,
15123 ErrorCode::LimitExceeded,
15124 ErrorCode::CapabilityUnavailable,
15125 ErrorCode::ChecksumMismatch,
15126 ErrorCode::TemporarilyUnavailable,
15127 ErrorCode::Internal,
15128 ],
15129 limit_ids: &[
15130 "request_bytes",
15131 "response_bytes",
15132 "collection_export_bytes",
15133 "portability_prefix_bytes",
15134 ],
15135 effect_class: "read_only",
15136 risk_flags: &[],
15137 capability_family: "portability",
15138 retry_safety: "safe",
15139 identity_requirement: "request_locator",
15140 resolver: None,
15141 cancellation: "per_call",
15142 side_effects: &[],
15143 recovery: "retry",
15144 collection_index_ref: "none",
15145 },
15146 CommandSemanticContract {
15147 command: Command::PrepareCollectionExportRetirement,
15148 admissible_errors: &[
15149 ErrorCode::Aborted,
15150 ErrorCode::DeadlineExceeded,
15151 ErrorCode::InvalidRequest,
15152 ErrorCode::UnsupportedVersion,
15153 ErrorCode::Unauthenticated,
15154 ErrorCode::PermissionDenied,
15155 ErrorCode::NotFound,
15156 ErrorCode::Conflict,
15157 ErrorCode::LimitExceeded,
15158 ErrorCode::CapabilityUnavailable,
15159 ErrorCode::ChecksumMismatch,
15160 ErrorCode::TemporarilyUnavailable,
15161 ErrorCode::Internal,
15162 ],
15163 limit_ids: &[
15164 "request_bytes",
15165 "response_bytes",
15166 "collection_export_bytes",
15167 "portability_prefix_bytes",
15168 ],
15169 effect_class: "prepare",
15170 risk_flags: &["destructive"],
15171 capability_family: "portability",
15172 retry_safety: "safe",
15173 identity_requirement: "caller_action_id",
15174 resolver: None,
15175 cancellation: "per_call",
15176 side_effects: &[],
15177 recovery: "retry",
15178 collection_index_ref: "none",
15179 },
15180 CommandSemanticContract {
15181 command: Command::StartCollectionExportRetirement,
15182 admissible_errors: &[
15183 ErrorCode::Aborted,
15184 ErrorCode::DeadlineExceeded,
15185 ErrorCode::InvalidRequest,
15186 ErrorCode::UnsupportedVersion,
15187 ErrorCode::Unauthenticated,
15188 ErrorCode::PermissionDenied,
15189 ErrorCode::NotFound,
15190 ErrorCode::Conflict,
15191 ErrorCode::LimitExceeded,
15192 ErrorCode::CapabilityUnavailable,
15193 ErrorCode::NotSubmitted,
15194 ErrorCode::SubmittedIndeterminate,
15195 ErrorCode::ExpiredUnknown,
15196 ErrorCode::ChecksumMismatch,
15197 ErrorCode::TemporarilyUnavailable,
15198 ErrorCode::Internal,
15199 ],
15200 limit_ids: &[
15201 "request_bytes",
15202 "response_bytes",
15203 "collection_export_bytes",
15204 "portability_prefix_bytes",
15205 ],
15206 effect_class: "durable_submit",
15207 risk_flags: &["destructive"],
15208 capability_family: "portability",
15209 retry_safety: "pre_submit_only",
15210 identity_requirement: "caller_action_id",
15211 resolver: Some(Command::ResolveCollectionExportRetirement),
15212 cancellation: "per_call_until_submission_then_resolve",
15213 side_effects: &[
15214 "commits_authoritative_state",
15215 "deletes_external_artifact",
15216 "releases_key_capability_reference",
15217 ],
15218 recovery: "resolve_with_resolve_collection_export_retirement",
15219 collection_index_ref: "none",
15220 },
15221 CommandSemanticContract {
15222 command: Command::ResolveCollectionExportRetirement,
15223 admissible_errors: &[
15224 ErrorCode::Aborted,
15225 ErrorCode::DeadlineExceeded,
15226 ErrorCode::InvalidRequest,
15227 ErrorCode::UnsupportedVersion,
15228 ErrorCode::Unauthenticated,
15229 ErrorCode::PermissionDenied,
15230 ErrorCode::NotFound,
15231 ErrorCode::Conflict,
15232 ErrorCode::LimitExceeded,
15233 ErrorCode::CapabilityUnavailable,
15234 ErrorCode::TemporarilyUnavailable,
15235 ErrorCode::Internal,
15236 ],
15237 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
15238 effect_class: "read_only",
15239 risk_flags: &[],
15240 capability_family: "portability",
15241 retry_safety: "safe",
15242 identity_requirement: "caller_action_id",
15243 resolver: None,
15244 cancellation: "per_call",
15245 side_effects: &[],
15246 recovery: "retry",
15247 collection_index_ref: "none",
15248 },
15249 CommandSemanticContract {
15250 command: Command::PrepareCollectionRestore,
15251 admissible_errors: &[
15252 ErrorCode::Aborted,
15253 ErrorCode::DeadlineExceeded,
15254 ErrorCode::InvalidRequest,
15255 ErrorCode::UnsupportedVersion,
15256 ErrorCode::Unauthenticated,
15257 ErrorCode::PermissionDenied,
15258 ErrorCode::NotFound,
15259 ErrorCode::Conflict,
15260 ErrorCode::LimitExceeded,
15261 ErrorCode::CapabilityUnavailable,
15262 ErrorCode::ChecksumMismatch,
15263 ErrorCode::TemporarilyUnavailable,
15264 ErrorCode::Internal,
15265 ],
15266 limit_ids: &[
15267 "request_bytes",
15268 "response_bytes",
15269 "collection_export_bytes",
15270 "portability_prefix_bytes",
15271 ],
15272 effect_class: "prepare",
15273 risk_flags: &[],
15274 capability_family: "portability",
15275 retry_safety: "safe",
15276 identity_requirement: "caller_action_id",
15277 resolver: None,
15278 cancellation: "per_call",
15279 side_effects: &[],
15280 recovery: "retry",
15281 collection_index_ref: "none",
15282 },
15283 CommandSemanticContract {
15284 command: Command::StartCollectionRestore,
15285 admissible_errors: &[
15286 ErrorCode::Aborted,
15287 ErrorCode::DeadlineExceeded,
15288 ErrorCode::InvalidRequest,
15289 ErrorCode::UnsupportedVersion,
15290 ErrorCode::Unauthenticated,
15291 ErrorCode::PermissionDenied,
15292 ErrorCode::NotFound,
15293 ErrorCode::Conflict,
15294 ErrorCode::LimitExceeded,
15295 ErrorCode::CapabilityUnavailable,
15296 ErrorCode::NotSubmitted,
15297 ErrorCode::SubmittedIndeterminate,
15298 ErrorCode::ExpiredUnknown,
15299 ErrorCode::ChecksumMismatch,
15300 ErrorCode::TemporarilyUnavailable,
15301 ErrorCode::Internal,
15302 ],
15303 limit_ids: &[
15304 "request_bytes",
15305 "response_bytes",
15306 "collection_export_bytes",
15307 "collection_export_documents",
15308 "portability_prefix_bytes",
15309 ],
15310 effect_class: "durable_submit",
15311 risk_flags: &[],
15312 capability_family: "portability",
15313 retry_safety: "pre_submit_only",
15314 identity_requirement: "caller_action_id",
15315 resolver: Some(Command::ResolveCollectionRestore),
15316 cancellation: "per_call_until_submission_then_resolve",
15317 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
15318 recovery: "resolve_with_resolve_collection_restore",
15319 collection_index_ref: "none",
15320 },
15321 CommandSemanticContract {
15322 command: Command::ResolveCollectionRestore,
15323 admissible_errors: &[
15324 ErrorCode::Aborted,
15325 ErrorCode::DeadlineExceeded,
15326 ErrorCode::InvalidRequest,
15327 ErrorCode::UnsupportedVersion,
15328 ErrorCode::Unauthenticated,
15329 ErrorCode::PermissionDenied,
15330 ErrorCode::NotFound,
15331 ErrorCode::LimitExceeded,
15332 ErrorCode::CapabilityUnavailable,
15333 ErrorCode::TemporarilyUnavailable,
15334 ErrorCode::Internal,
15335 ],
15336 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
15337 effect_class: "read_only",
15338 risk_flags: &[],
15339 capability_family: "portability",
15340 retry_safety: "safe",
15341 identity_requirement: "caller_action_id",
15342 resolver: None,
15343 cancellation: "per_call",
15344 side_effects: &[],
15345 recovery: "retry",
15346 collection_index_ref: "none",
15347 },
15348 CommandSemanticContract {
15349 command: Command::PrepareCollectionTransferExport,
15350 admissible_errors: &[
15351 ErrorCode::Aborted,
15352 ErrorCode::DeadlineExceeded,
15353 ErrorCode::InvalidRequest,
15354 ErrorCode::UnsupportedVersion,
15355 ErrorCode::Unauthenticated,
15356 ErrorCode::PermissionDenied,
15357 ErrorCode::NotFound,
15358 ErrorCode::Conflict,
15359 ErrorCode::LimitExceeded,
15360 ErrorCode::CapabilityUnavailable,
15361 ErrorCode::TemporarilyUnavailable,
15362 ErrorCode::Internal,
15363 ],
15364 limit_ids: &[
15365 "request_bytes",
15366 "response_bytes",
15367 "collection_export_bytes",
15368 "portability_prefix_bytes",
15369 ],
15370 effect_class: "prepare",
15371 risk_flags: &[],
15372 capability_family: "portability",
15373 retry_safety: "safe",
15374 identity_requirement: "caller_action_id",
15375 resolver: None,
15376 cancellation: "per_call",
15377 side_effects: &[],
15378 recovery: "retry",
15379 collection_index_ref: "none",
15380 },
15381 CommandSemanticContract {
15382 command: Command::StartCollectionTransferExport,
15383 admissible_errors: &[
15384 ErrorCode::Aborted,
15385 ErrorCode::DeadlineExceeded,
15386 ErrorCode::InvalidRequest,
15387 ErrorCode::UnsupportedVersion,
15388 ErrorCode::Unauthenticated,
15389 ErrorCode::PermissionDenied,
15390 ErrorCode::NotFound,
15391 ErrorCode::Conflict,
15392 ErrorCode::LimitExceeded,
15393 ErrorCode::CapabilityUnavailable,
15394 ErrorCode::NotSubmitted,
15395 ErrorCode::SubmittedIndeterminate,
15396 ErrorCode::ExpiredUnknown,
15397 ErrorCode::TemporarilyUnavailable,
15398 ErrorCode::Internal,
15399 ],
15400 limit_ids: &[
15401 "request_bytes",
15402 "response_bytes",
15403 "collection_export_bytes",
15404 "collection_export_documents",
15405 "portability_prefix_bytes",
15406 ],
15407 effect_class: "durable_submit",
15408 risk_flags: &[],
15409 capability_family: "portability",
15410 retry_safety: "pre_submit_only",
15411 identity_requirement: "caller_action_id",
15412 resolver: Some(Command::ResolveCollectionTransferExport),
15413 cancellation: "per_call_until_submission_then_resolve",
15414 side_effects: &[
15415 "commits_authoritative_state",
15416 "closes_collection_admission",
15417 "writes_external_artifact",
15418 ],
15419 recovery: "resolve_with_resolve_collection_transfer_export",
15420 collection_index_ref: "none",
15421 },
15422 CommandSemanticContract {
15423 command: Command::ResolveCollectionTransferExport,
15424 admissible_errors: &[
15425 ErrorCode::Aborted,
15426 ErrorCode::DeadlineExceeded,
15427 ErrorCode::InvalidRequest,
15428 ErrorCode::UnsupportedVersion,
15429 ErrorCode::Unauthenticated,
15430 ErrorCode::PermissionDenied,
15431 ErrorCode::NotFound,
15432 ErrorCode::LimitExceeded,
15433 ErrorCode::CapabilityUnavailable,
15434 ErrorCode::ChecksumMismatch,
15435 ErrorCode::TemporarilyUnavailable,
15436 ErrorCode::Internal,
15437 ],
15438 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
15439 effect_class: "read_only",
15440 risk_flags: &[],
15441 capability_family: "portability",
15442 retry_safety: "safe",
15443 identity_requirement: "caller_action_id",
15444 resolver: None,
15445 cancellation: "per_call",
15446 side_effects: &[],
15447 recovery: "retry",
15448 collection_index_ref: "none",
15449 },
15450 CommandSemanticContract {
15451 command: Command::PrepareCollectionTransferRestore,
15452 admissible_errors: &[
15453 ErrorCode::Aborted,
15454 ErrorCode::DeadlineExceeded,
15455 ErrorCode::InvalidRequest,
15456 ErrorCode::UnsupportedVersion,
15457 ErrorCode::Unauthenticated,
15458 ErrorCode::PermissionDenied,
15459 ErrorCode::NotFound,
15460 ErrorCode::Conflict,
15461 ErrorCode::LimitExceeded,
15462 ErrorCode::CapabilityUnavailable,
15463 ErrorCode::ChecksumMismatch,
15464 ErrorCode::TemporarilyUnavailable,
15465 ErrorCode::Internal,
15466 ],
15467 limit_ids: &[
15468 "request_bytes",
15469 "response_bytes",
15470 "collection_export_bytes",
15471 "portability_prefix_bytes",
15472 ],
15473 effect_class: "prepare",
15474 risk_flags: &[],
15475 capability_family: "portability",
15476 retry_safety: "safe",
15477 identity_requirement: "caller_action_id",
15478 resolver: None,
15479 cancellation: "per_call",
15480 side_effects: &[],
15481 recovery: "retry",
15482 collection_index_ref: "none",
15483 },
15484 CommandSemanticContract {
15485 command: Command::StartCollectionTransferRestore,
15486 admissible_errors: &[
15487 ErrorCode::Aborted,
15488 ErrorCode::DeadlineExceeded,
15489 ErrorCode::InvalidRequest,
15490 ErrorCode::UnsupportedVersion,
15491 ErrorCode::Unauthenticated,
15492 ErrorCode::PermissionDenied,
15493 ErrorCode::NotFound,
15494 ErrorCode::Conflict,
15495 ErrorCode::LimitExceeded,
15496 ErrorCode::CapabilityUnavailable,
15497 ErrorCode::NotSubmitted,
15498 ErrorCode::SubmittedIndeterminate,
15499 ErrorCode::ExpiredUnknown,
15500 ErrorCode::ChecksumMismatch,
15501 ErrorCode::TemporarilyUnavailable,
15502 ErrorCode::Internal,
15503 ],
15504 limit_ids: &[
15505 "request_bytes",
15506 "response_bytes",
15507 "collection_export_bytes",
15508 "collection_export_documents",
15509 "portability_prefix_bytes",
15510 ],
15511 effect_class: "durable_submit",
15512 risk_flags: &[],
15513 capability_family: "portability",
15514 retry_safety: "pre_submit_only",
15515 identity_requirement: "caller_action_id",
15516 resolver: Some(Command::ResolveCollectionTransferRestore),
15517 cancellation: "per_call_until_submission_then_resolve",
15518 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
15519 recovery: "resolve_with_resolve_collection_transfer_restore",
15520 collection_index_ref: "none",
15521 },
15522 CommandSemanticContract {
15523 command: Command::ResolveCollectionTransferRestore,
15524 admissible_errors: &[
15525 ErrorCode::Aborted,
15526 ErrorCode::DeadlineExceeded,
15527 ErrorCode::InvalidRequest,
15528 ErrorCode::UnsupportedVersion,
15529 ErrorCode::Unauthenticated,
15530 ErrorCode::PermissionDenied,
15531 ErrorCode::NotFound,
15532 ErrorCode::LimitExceeded,
15533 ErrorCode::CapabilityUnavailable,
15534 ErrorCode::ChecksumMismatch,
15535 ErrorCode::TemporarilyUnavailable,
15536 ErrorCode::Internal,
15537 ],
15538 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
15539 effect_class: "read_only",
15540 risk_flags: &[],
15541 capability_family: "portability",
15542 retry_safety: "safe",
15543 identity_requirement: "caller_action_id",
15544 resolver: None,
15545 cancellation: "per_call",
15546 side_effects: &[],
15547 recovery: "retry",
15548 collection_index_ref: "none",
15549 },
15550 CommandSemanticContract {
15551 command: Command::PrepareIndexExport,
15552 admissible_errors: &[
15553 ErrorCode::Aborted,
15554 ErrorCode::DeadlineExceeded,
15555 ErrorCode::InvalidRequest,
15556 ErrorCode::UnsupportedVersion,
15557 ErrorCode::Unauthenticated,
15558 ErrorCode::PermissionDenied,
15559 ErrorCode::NotFound,
15560 ErrorCode::LimitExceeded,
15561 ErrorCode::CapabilityUnavailable,
15562 ErrorCode::TemporarilyUnavailable,
15563 ErrorCode::Internal,
15564 ],
15565 limit_ids: &[
15566 "request_bytes",
15567 "response_bytes",
15568 "index_transfer_bytes",
15569 "index_transfer_records",
15570 "index_transfer_pages",
15571 "portability_prefix_bytes",
15572 ],
15573 effect_class: "prepare",
15574 risk_flags: &[],
15575 capability_family: "portability",
15576 retry_safety: "safe",
15577 identity_requirement: "caller_action_id",
15578 resolver: None,
15579 cancellation: "per_call",
15580 side_effects: &[],
15581 recovery: "retry",
15582 collection_index_ref: "request_index",
15583 },
15584 CommandSemanticContract {
15585 command: Command::StartIndexExport,
15586 admissible_errors: &[
15587 ErrorCode::Aborted,
15588 ErrorCode::DeadlineExceeded,
15589 ErrorCode::InvalidRequest,
15590 ErrorCode::UnsupportedVersion,
15591 ErrorCode::Unauthenticated,
15592 ErrorCode::PermissionDenied,
15593 ErrorCode::NotFound,
15594 ErrorCode::Conflict,
15595 ErrorCode::LimitExceeded,
15596 ErrorCode::CapabilityUnavailable,
15597 ErrorCode::NotSubmitted,
15598 ErrorCode::SubmittedIndeterminate,
15599 ErrorCode::ExpiredUnknown,
15600 ErrorCode::TemporarilyUnavailable,
15601 ErrorCode::Internal,
15602 ],
15603 limit_ids: &[
15604 "request_bytes",
15605 "response_bytes",
15606 "index_transfer_bytes",
15607 "index_transfer_records",
15608 "index_transfer_pages",
15609 "portability_prefix_bytes",
15610 ],
15611 effect_class: "durable_submit",
15612 risk_flags: &[],
15613 capability_family: "portability",
15614 retry_safety: "pre_submit_only",
15615 identity_requirement: "caller_action_id",
15616 resolver: Some(Command::ResolveIndexExport),
15617 cancellation: "per_call_until_submission_then_resolve",
15618 side_effects: &["commits_authoritative_state", "writes_external_artifact"],
15619 recovery: "resolve_with_resolve_index_export",
15620 collection_index_ref: "request_index",
15621 },
15622 CommandSemanticContract {
15623 command: Command::ResolveIndexExport,
15624 admissible_errors: &[
15625 ErrorCode::Aborted,
15626 ErrorCode::DeadlineExceeded,
15627 ErrorCode::InvalidRequest,
15628 ErrorCode::UnsupportedVersion,
15629 ErrorCode::Unauthenticated,
15630 ErrorCode::PermissionDenied,
15631 ErrorCode::NotFound,
15632 ErrorCode::LimitExceeded,
15633 ErrorCode::CapabilityUnavailable,
15634 ErrorCode::ChecksumMismatch,
15635 ErrorCode::TemporarilyUnavailable,
15636 ErrorCode::Internal,
15637 ],
15638 limit_ids: &[
15639 "request_bytes",
15640 "response_bytes",
15641 "index_transfer_bytes",
15642 "index_transfer_pages",
15643 "portability_prefix_bytes",
15644 ],
15645 effect_class: "read_only",
15646 risk_flags: &[],
15647 capability_family: "portability",
15648 retry_safety: "safe",
15649 identity_requirement: "caller_action_id",
15650 resolver: None,
15651 cancellation: "per_call",
15652 side_effects: &[],
15653 recovery: "retry",
15654 collection_index_ref: "request_index",
15655 },
15656 CommandSemanticContract {
15657 command: Command::VerifyIndexExport,
15658 admissible_errors: &[
15659 ErrorCode::Aborted,
15660 ErrorCode::DeadlineExceeded,
15661 ErrorCode::InvalidRequest,
15662 ErrorCode::UnsupportedVersion,
15663 ErrorCode::Unauthenticated,
15664 ErrorCode::PermissionDenied,
15665 ErrorCode::NotFound,
15666 ErrorCode::LimitExceeded,
15667 ErrorCode::CapabilityUnavailable,
15668 ErrorCode::ChecksumMismatch,
15669 ErrorCode::TemporarilyUnavailable,
15670 ErrorCode::Internal,
15671 ],
15672 limit_ids: &[
15673 "request_bytes",
15674 "response_bytes",
15675 "index_transfer_bytes",
15676 "index_transfer_pages",
15677 "portability_prefix_bytes",
15678 ],
15679 effect_class: "read_only",
15680 risk_flags: &[],
15681 capability_family: "portability",
15682 retry_safety: "safe",
15683 identity_requirement: "request_locator",
15684 resolver: None,
15685 cancellation: "per_call",
15686 side_effects: &[],
15687 recovery: "retry",
15688 collection_index_ref: "request_artifact_source_index",
15689 },
15690 CommandSemanticContract {
15691 command: Command::PrepareIndexImport,
15692 admissible_errors: &[
15693 ErrorCode::Aborted,
15694 ErrorCode::DeadlineExceeded,
15695 ErrorCode::InvalidRequest,
15696 ErrorCode::UnsupportedVersion,
15697 ErrorCode::Unauthenticated,
15698 ErrorCode::PermissionDenied,
15699 ErrorCode::NotFound,
15700 ErrorCode::Conflict,
15701 ErrorCode::LimitExceeded,
15702 ErrorCode::CapabilityUnavailable,
15703 ErrorCode::ChecksumMismatch,
15704 ErrorCode::TemporarilyUnavailable,
15705 ErrorCode::Internal,
15706 ],
15707 limit_ids: &[
15708 "request_bytes",
15709 "response_bytes",
15710 "index_transfer_bytes",
15711 "index_transfer_pages",
15712 "portability_prefix_bytes",
15713 "resource_initial_shards",
15714 "resource_target_shard_bytes",
15715 "resource_admission_weight",
15716 "resource_ram_bytes",
15717 "resource_nvme_bytes",
15718 "resource_refresh_millis",
15719 "resource_memtable_bytes",
15720 "resource_parallelism",
15721 ],
15722 effect_class: "prepare",
15723 risk_flags: &[],
15724 capability_family: "portability",
15725 retry_safety: "safe",
15726 identity_requirement: "caller_action_id",
15727 resolver: None,
15728 cancellation: "per_call",
15729 side_effects: &[],
15730 recovery: "retry",
15731 collection_index_ref: "request_destination_name",
15732 },
15733 CommandSemanticContract {
15734 command: Command::StartIndexImport,
15735 admissible_errors: &[
15736 ErrorCode::Aborted,
15737 ErrorCode::DeadlineExceeded,
15738 ErrorCode::InvalidRequest,
15739 ErrorCode::UnsupportedVersion,
15740 ErrorCode::Unauthenticated,
15741 ErrorCode::PermissionDenied,
15742 ErrorCode::NotFound,
15743 ErrorCode::Conflict,
15744 ErrorCode::LimitExceeded,
15745 ErrorCode::CapabilityUnavailable,
15746 ErrorCode::NotSubmitted,
15747 ErrorCode::SubmittedIndeterminate,
15748 ErrorCode::ExpiredUnknown,
15749 ErrorCode::ChecksumMismatch,
15750 ErrorCode::TemporarilyUnavailable,
15751 ErrorCode::Internal,
15752 ],
15753 limit_ids: &[
15754 "request_bytes",
15755 "response_bytes",
15756 "index_transfer_bytes",
15757 "index_transfer_pages",
15758 "portability_prefix_bytes",
15759 "resource_initial_shards",
15760 "resource_target_shard_bytes",
15761 "resource_admission_weight",
15762 "resource_ram_bytes",
15763 "resource_nvme_bytes",
15764 "resource_refresh_millis",
15765 "resource_memtable_bytes",
15766 "resource_parallelism",
15767 ],
15768 effect_class: "durable_submit",
15769 risk_flags: &[],
15770 capability_family: "portability",
15771 retry_safety: "pre_submit_only",
15772 identity_requirement: "caller_action_id",
15773 resolver: Some(Command::ResolveIndexImport),
15774 cancellation: "per_call_until_submission_then_resolve",
15775 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
15776 recovery: "resolve_with_resolve_index_import",
15777 collection_index_ref: "request_destination_name",
15778 },
15779 CommandSemanticContract {
15780 command: Command::ResolveIndexImport,
15781 admissible_errors: &[
15782 ErrorCode::Aborted,
15783 ErrorCode::DeadlineExceeded,
15784 ErrorCode::InvalidRequest,
15785 ErrorCode::UnsupportedVersion,
15786 ErrorCode::Unauthenticated,
15787 ErrorCode::PermissionDenied,
15788 ErrorCode::NotFound,
15789 ErrorCode::LimitExceeded,
15790 ErrorCode::CapabilityUnavailable,
15791 ErrorCode::ChecksumMismatch,
15792 ErrorCode::TemporarilyUnavailable,
15793 ErrorCode::Internal,
15794 ],
15795 limit_ids: &[
15796 "request_bytes",
15797 "response_bytes",
15798 "index_transfer_bytes",
15799 "index_transfer_pages",
15800 "portability_prefix_bytes",
15801 ],
15802 effect_class: "read_only",
15803 risk_flags: &[],
15804 capability_family: "portability",
15805 retry_safety: "safe",
15806 identity_requirement: "caller_action_id",
15807 resolver: None,
15808 cancellation: "per_call",
15809 side_effects: &[],
15810 recovery: "retry",
15811 collection_index_ref: "request_destination_name",
15812 },
15813 CommandSemanticContract {
15814 command: Command::ReadArtifactChunk,
15815 admissible_errors: &[
15816 ErrorCode::Aborted,
15817 ErrorCode::DeadlineExceeded,
15818 ErrorCode::InvalidRequest,
15819 ErrorCode::UnsupportedVersion,
15820 ErrorCode::Unauthenticated,
15821 ErrorCode::PermissionDenied,
15822 ErrorCode::NotFound,
15823 ErrorCode::LimitExceeded,
15824 ErrorCode::CapabilityUnavailable,
15825 ErrorCode::ArtifactRangeInvalid,
15826 ErrorCode::ChecksumMismatch,
15827 ErrorCode::TemporarilyUnavailable,
15828 ErrorCode::Internal,
15829 ],
15830 limit_ids: &["request_bytes", "response_bytes", "artifact_chunk_bytes"],
15831 effect_class: "read_only",
15832 risk_flags: &[],
15833 capability_family: "operations",
15834 retry_safety: "safe",
15835 identity_requirement: "none",
15836 resolver: None,
15837 cancellation: "per_call",
15838 side_effects: &[],
15839 recovery: "retry",
15840 collection_index_ref: "none",
15841 },
15842 CommandSemanticContract {
15843 command: Command::ExportUsage,
15844 admissible_errors: &[
15845 ErrorCode::Aborted,
15846 ErrorCode::DeadlineExceeded,
15847 ErrorCode::InvalidRequest,
15848 ErrorCode::UnsupportedVersion,
15849 ErrorCode::Unauthenticated,
15850 ErrorCode::PermissionDenied,
15851 ErrorCode::NotFound,
15852 ErrorCode::StaleCursor,
15853 ErrorCode::RestartBudgetExhausted,
15854 ErrorCode::LimitExceeded,
15855 ErrorCode::CapabilityUnavailable,
15856 ErrorCode::TemporarilyUnavailable,
15857 ErrorCode::Internal,
15858 ],
15859 limit_ids: &["request_bytes", "response_bytes", "page_size"],
15860 effect_class: "read_only",
15861 risk_flags: &[],
15862 capability_family: "usage",
15863 retry_safety: "safe",
15864 identity_requirement: "none",
15865 resolver: None,
15866 cancellation: "per_call",
15867 side_effects: &[],
15868 recovery: "retry",
15869 collection_index_ref: "none",
15870 },
15871 CommandSemanticContract {
15872 command: Command::ReadLogicalOccupancy,
15873 admissible_errors: &[
15874 ErrorCode::Aborted,
15875 ErrorCode::DeadlineExceeded,
15876 ErrorCode::InvalidRequest,
15877 ErrorCode::UnsupportedVersion,
15878 ErrorCode::Unauthenticated,
15879 ErrorCode::PermissionDenied,
15880 ErrorCode::NotFound,
15881 ErrorCode::StaleCursor,
15882 ErrorCode::LimitExceeded,
15883 ErrorCode::CapabilityUnavailable,
15884 ErrorCode::TemporarilyUnavailable,
15885 ErrorCode::Internal,
15886 ],
15887 limit_ids: &["request_bytes", "response_bytes", "page_size", "search_result_window"],
15888 effect_class: "read_only",
15889 risk_flags: &[],
15890 capability_family: "usage",
15891 retry_safety: "safe",
15892 identity_requirement: "none",
15893 resolver: None,
15894 cancellation: "per_call",
15895 side_effects: &[],
15896 recovery: "retry",
15897 collection_index_ref: "request_index",
15898 },
15899 CommandSemanticContract {
15900 command: Command::ExecuteStateRead,
15901 admissible_errors: &[
15902 ErrorCode::Aborted,
15903 ErrorCode::DeadlineExceeded,
15904 ErrorCode::InvalidRequest,
15905 ErrorCode::UnsupportedVersion,
15906 ErrorCode::Unauthenticated,
15907 ErrorCode::PermissionDenied,
15908 ErrorCode::NotFound,
15909 ErrorCode::LimitExceeded,
15910 ErrorCode::CapabilityUnavailable,
15911 ErrorCode::TemporarilyUnavailable,
15912 ErrorCode::Internal,
15913 ],
15914 limit_ids: &[
15915 "request_bytes",
15916 "response_bytes",
15917 "state_command_keys",
15918 "state_command_value_bytes",
15919 ],
15920 effect_class: "read_only",
15921 risk_flags: &[],
15922 capability_family: "data",
15923 retry_safety: "safe",
15924 identity_requirement: "none",
15925 resolver: None,
15926 cancellation: "per_call",
15927 side_effects: &[],
15928 recovery: "retry",
15929 collection_index_ref: "request_index",
15930 },
15931 CommandSemanticContract {
15932 command: Command::PrepareStateWrite,
15933 admissible_errors: &[
15934 ErrorCode::Aborted,
15935 ErrorCode::DeadlineExceeded,
15936 ErrorCode::InvalidRequest,
15937 ErrorCode::UnsupportedVersion,
15938 ErrorCode::Unauthenticated,
15939 ErrorCode::PermissionDenied,
15940 ErrorCode::NotFound,
15941 ErrorCode::LimitExceeded,
15942 ErrorCode::CapabilityUnavailable,
15943 ErrorCode::TemporarilyUnavailable,
15944 ErrorCode::Internal,
15945 ],
15946 limit_ids: &[
15947 "request_bytes",
15948 "response_bytes",
15949 "state_command_keys",
15950 "state_command_value_bytes",
15951 ],
15952 effect_class: "prepare",
15953 risk_flags: &[],
15954 capability_family: "data",
15955 retry_safety: "safe",
15956 identity_requirement: "caller_action_id",
15957 resolver: None,
15958 cancellation: "per_call",
15959 side_effects: &["creates_bounded_preparation"],
15960 recovery: "retry",
15961 collection_index_ref: "request_index",
15962 },
15963 CommandSemanticContract {
15964 command: Command::SubmitStateWrite,
15965 admissible_errors: &[
15966 ErrorCode::Aborted,
15967 ErrorCode::DeadlineExceeded,
15968 ErrorCode::InvalidRequest,
15969 ErrorCode::UnsupportedVersion,
15970 ErrorCode::Unauthenticated,
15971 ErrorCode::PermissionDenied,
15972 ErrorCode::NotFound,
15973 ErrorCode::Conflict,
15974 ErrorCode::LimitExceeded,
15975 ErrorCode::CapabilityUnavailable,
15976 ErrorCode::NotSubmitted,
15977 ErrorCode::SubmittedIndeterminate,
15978 ErrorCode::ExpiredUnknown,
15979 ErrorCode::TemporarilyUnavailable,
15980 ErrorCode::Internal,
15981 ],
15982 limit_ids: &[
15983 "request_bytes",
15984 "response_bytes",
15985 "state_command_keys",
15986 "state_command_value_bytes",
15987 ],
15988 effect_class: "durable_submit",
15989 risk_flags: &[],
15990 capability_family: "data",
15991 retry_safety: "pre_submit_only",
15992 identity_requirement: "request_locator",
15993 resolver: Some(Command::ResolveStateWrite),
15994 cancellation: "per_call_until_submission_then_resolve",
15995 side_effects: &["commits_authoritative_state"],
15996 recovery: "resolve_with_resolve_state_write",
15997 collection_index_ref: "request_index",
15998 },
15999 CommandSemanticContract {
16000 command: Command::ResolveStateWrite,
16001 admissible_errors: &[
16002 ErrorCode::Aborted,
16003 ErrorCode::DeadlineExceeded,
16004 ErrorCode::InvalidRequest,
16005 ErrorCode::UnsupportedVersion,
16006 ErrorCode::Unauthenticated,
16007 ErrorCode::PermissionDenied,
16008 ErrorCode::NotFound,
16009 ErrorCode::LimitExceeded,
16010 ErrorCode::CapabilityUnavailable,
16011 ErrorCode::TemporarilyUnavailable,
16012 ErrorCode::Internal,
16013 ],
16014 limit_ids: &[
16015 "request_bytes",
16016 "response_bytes",
16017 "state_command_keys",
16018 "state_command_value_bytes",
16019 ],
16020 effect_class: "read_only",
16021 risk_flags: &[],
16022 capability_family: "data",
16023 retry_safety: "safe",
16024 identity_requirement: "request_locator",
16025 resolver: None,
16026 cancellation: "per_call",
16027 side_effects: &[],
16028 recovery: "retry",
16029 collection_index_ref: "request_index",
16030 },
16031];
16032#[derive(Clone, Copy, Debug, Eq, PartialEq)]
16033pub struct CommandOutcomeContract {
16034 pub command: Command,
16035 pub possible_submission_states: &'static [&'static str],
16036 pub identity_requirement: &'static str,
16037 pub resolver_command: Option<Command>,
16038 pub cancellation: &'static str,
16039}
16040pub const LODESTONE_API_COMMAND_OUTCOMES: &[CommandOutcomeContract] = &[
16041 CommandOutcomeContract {
16042 command: Command::Discover,
16043 possible_submission_states: &["not_submitted", "resolved"],
16044 identity_requirement: "none",
16045 resolver_command: None,
16046 cancellation: "per_call",
16047 },
16048 CommandOutcomeContract {
16049 command: Command::ListIndexes,
16050 possible_submission_states: &["not_submitted", "resolved"],
16051 identity_requirement: "none",
16052 resolver_command: None,
16053 cancellation: "per_call",
16054 },
16055 CommandOutcomeContract {
16056 command: Command::GetIndex,
16057 possible_submission_states: &["not_submitted", "resolved"],
16058 identity_requirement: "none",
16059 resolver_command: None,
16060 cancellation: "per_call",
16061 },
16062 CommandOutcomeContract {
16063 command: Command::ValidateIndexChange,
16064 possible_submission_states: &["not_submitted", "resolved"],
16065 identity_requirement: "none",
16066 resolver_command: None,
16067 cancellation: "per_call",
16068 },
16069 CommandOutcomeContract {
16070 command: Command::ApplyIndexChange,
16071 possible_submission_states: &[
16072 "not_submitted",
16073 "submitted",
16074 "known_retired",
16075 "indeterminate",
16076 "resolved",
16077 ],
16078 identity_requirement: "caller_action_id",
16079 resolver_command: Some(Command::ResolveIndexChange),
16080 cancellation: "per_call_until_submission_then_resolve",
16081 },
16082 CommandOutcomeContract {
16083 command: Command::ResolveIndexChange,
16084 possible_submission_states: &["not_submitted", "resolved"],
16085 identity_requirement: "caller_action_id",
16086 resolver_command: None,
16087 cancellation: "per_call",
16088 },
16089 CommandOutcomeContract {
16090 command: Command::ApplyAdministrationMutation,
16091 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16092 identity_requirement: "caller_action_id",
16093 resolver_command: None,
16094 cancellation: "per_call_until_submission_then_resolve",
16095 },
16096 CommandOutcomeContract {
16097 command: Command::ListAliases,
16098 possible_submission_states: &["not_submitted", "resolved"],
16099 identity_requirement: "none",
16100 resolver_command: None,
16101 cancellation: "per_call",
16102 },
16103 CommandOutcomeContract {
16104 command: Command::GetAlias,
16105 possible_submission_states: &["not_submitted", "resolved"],
16106 identity_requirement: "none",
16107 resolver_command: None,
16108 cancellation: "per_call",
16109 },
16110 CommandOutcomeContract {
16111 command: Command::ListDataStreams,
16112 possible_submission_states: &["not_submitted", "resolved"],
16113 identity_requirement: "none",
16114 resolver_command: None,
16115 cancellation: "per_call",
16116 },
16117 CommandOutcomeContract {
16118 command: Command::GetDataStream,
16119 possible_submission_states: &["not_submitted", "resolved"],
16120 identity_requirement: "none",
16121 resolver_command: None,
16122 cancellation: "per_call",
16123 },
16124 CommandOutcomeContract {
16125 command: Command::ListComponentTemplates,
16126 possible_submission_states: &["not_submitted", "resolved"],
16127 identity_requirement: "none",
16128 resolver_command: None,
16129 cancellation: "per_call",
16130 },
16131 CommandOutcomeContract {
16132 command: Command::GetComponentTemplate,
16133 possible_submission_states: &["not_submitted", "resolved"],
16134 identity_requirement: "none",
16135 resolver_command: None,
16136 cancellation: "per_call",
16137 },
16138 CommandOutcomeContract {
16139 command: Command::ListIndexTemplates,
16140 possible_submission_states: &["not_submitted", "resolved"],
16141 identity_requirement: "none",
16142 resolver_command: None,
16143 cancellation: "per_call",
16144 },
16145 CommandOutcomeContract {
16146 command: Command::GetIndexTemplate,
16147 possible_submission_states: &["not_submitted", "resolved"],
16148 identity_requirement: "none",
16149 resolver_command: None,
16150 cancellation: "per_call",
16151 },
16152 CommandOutcomeContract {
16153 command: Command::ListIngestPipelines,
16154 possible_submission_states: &["not_submitted", "resolved"],
16155 identity_requirement: "none",
16156 resolver_command: None,
16157 cancellation: "per_call",
16158 },
16159 CommandOutcomeContract {
16160 command: Command::GetIngestPipeline,
16161 possible_submission_states: &["not_submitted", "resolved"],
16162 identity_requirement: "none",
16163 resolver_command: None,
16164 cancellation: "per_call",
16165 },
16166 CommandOutcomeContract {
16167 command: Command::SimulateIngestPipeline,
16168 possible_submission_states: &["not_submitted", "resolved"],
16169 identity_requirement: "none",
16170 resolver_command: None,
16171 cancellation: "per_call",
16172 },
16173 CommandOutcomeContract {
16174 command: Command::ReprocessByQuery,
16175 possible_submission_states: &[
16176 "not_submitted",
16177 "submitted",
16178 "known_retired",
16179 "indeterminate",
16180 "resolved",
16181 ],
16182 identity_requirement: "caller_action_id",
16183 resolver_command: None,
16184 cancellation: "per_call_until_submission_then_resolve",
16185 },
16186 CommandOutcomeContract {
16187 command: Command::ListLifecyclePolicies,
16188 possible_submission_states: &["not_submitted", "resolved"],
16189 identity_requirement: "none",
16190 resolver_command: None,
16191 cancellation: "per_call",
16192 },
16193 CommandOutcomeContract {
16194 command: Command::GetLifecyclePolicy,
16195 possible_submission_states: &["not_submitted", "resolved"],
16196 identity_requirement: "none",
16197 resolver_command: None,
16198 cancellation: "per_call",
16199 },
16200 CommandOutcomeContract {
16201 command: Command::PrepareCreateIndex,
16202 possible_submission_states: &["not_submitted", "resolved"],
16203 identity_requirement: "server_locator",
16204 resolver_command: None,
16205 cancellation: "per_call",
16206 },
16207 CommandOutcomeContract {
16208 command: Command::PrepareDeleteIndex,
16209 possible_submission_states: &["not_submitted", "resolved"],
16210 identity_requirement: "server_locator",
16211 resolver_command: None,
16212 cancellation: "per_call",
16213 },
16214 CommandOutcomeContract {
16215 command: Command::SubmitCatalogAction,
16216 possible_submission_states: &[
16217 "not_submitted",
16218 "submitted",
16219 "known_retired",
16220 "indeterminate",
16221 "resolved",
16222 ],
16223 identity_requirement: "request_locator",
16224 resolver_command: Some(Command::ResolveCatalogAction),
16225 cancellation: "per_call_until_submission_then_resolve",
16226 },
16227 CommandOutcomeContract {
16228 command: Command::ResolveCatalogAction,
16229 possible_submission_states: &["not_submitted", "resolved"],
16230 identity_requirement: "request_locator",
16231 resolver_command: None,
16232 cancellation: "per_call",
16233 },
16234 CommandOutcomeContract {
16235 command: Command::PrepareReplayableSourceIndex,
16236 possible_submission_states: &["not_submitted", "resolved"],
16237 identity_requirement: "server_locator",
16238 resolver_command: None,
16239 cancellation: "per_call",
16240 },
16241 CommandOutcomeContract {
16242 command: Command::SubmitReplayableSourceIndex,
16243 possible_submission_states: &[
16244 "not_submitted",
16245 "submitted",
16246 "known_retired",
16247 "indeterminate",
16248 "resolved",
16249 ],
16250 identity_requirement: "request_locator",
16251 resolver_command: Some(Command::ResolveCatalogAction),
16252 cancellation: "per_call_until_submission_then_resolve",
16253 },
16254 CommandOutcomeContract {
16255 command: Command::GetReplayableSource,
16256 possible_submission_states: &["not_submitted", "resolved"],
16257 identity_requirement: "none",
16258 resolver_command: None,
16259 cancellation: "per_call",
16260 },
16261 CommandOutcomeContract {
16262 command: Command::ControlReplayableSource,
16263 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16264 identity_requirement: "none",
16265 resolver_command: None,
16266 cancellation: "per_call_until_submission_then_resolve",
16267 },
16268 CommandOutcomeContract {
16269 command: Command::CloneIndex,
16270 possible_submission_states: &[
16271 "not_submitted",
16272 "submitted",
16273 "known_retired",
16274 "indeterminate",
16275 "resolved",
16276 ],
16277 identity_requirement: "caller_action_id",
16278 resolver_command: Some(Command::CloneIndex),
16279 cancellation: "per_call_until_submission_then_resolve",
16280 },
16281 CommandOutcomeContract {
16282 command: Command::ConfigureHistory,
16283 possible_submission_states: &[
16284 "not_submitted",
16285 "submitted",
16286 "known_retired",
16287 "indeterminate",
16288 "resolved",
16289 ],
16290 identity_requirement: "none",
16291 resolver_command: Some(Command::GetHistory),
16292 cancellation: "per_call_until_submission_then_resolve",
16293 },
16294 CommandOutcomeContract {
16295 command: Command::GetHistory,
16296 possible_submission_states: &["not_submitted", "resolved"],
16297 identity_requirement: "none",
16298 resolver_command: None,
16299 cancellation: "per_call",
16300 },
16301 CommandOutcomeContract {
16302 command: Command::ResolveHistory,
16303 possible_submission_states: &["not_submitted", "resolved"],
16304 identity_requirement: "none",
16305 resolver_command: None,
16306 cancellation: "per_call",
16307 },
16308 CommandOutcomeContract {
16309 command: Command::PlaceHistoryHold,
16310 possible_submission_states: &[
16311 "not_submitted",
16312 "submitted",
16313 "known_retired",
16314 "indeterminate",
16315 "resolved",
16316 ],
16317 identity_requirement: "none",
16318 resolver_command: Some(Command::GetHistory),
16319 cancellation: "per_call_until_submission_then_resolve",
16320 },
16321 CommandOutcomeContract {
16322 command: Command::ReleaseHistoryHold,
16323 possible_submission_states: &[
16324 "not_submitted",
16325 "submitted",
16326 "known_retired",
16327 "indeterminate",
16328 "resolved",
16329 ],
16330 identity_requirement: "none",
16331 resolver_command: Some(Command::GetHistory),
16332 cancellation: "per_call_until_submission_then_resolve",
16333 },
16334 CommandOutcomeContract {
16335 command: Command::PrepareDocumentMutation,
16336 possible_submission_states: &["not_submitted", "resolved"],
16337 identity_requirement: "server_locator",
16338 resolver_command: None,
16339 cancellation: "per_call",
16340 },
16341 CommandOutcomeContract {
16342 command: Command::SubmitDocumentMutation,
16343 possible_submission_states: &[
16344 "not_submitted",
16345 "submitted",
16346 "known_retired",
16347 "indeterminate",
16348 "resolved",
16349 ],
16350 identity_requirement: "request_locator",
16351 resolver_command: Some(Command::ResolveDocumentMutation),
16352 cancellation: "per_call_until_submission_then_resolve",
16353 },
16354 CommandOutcomeContract {
16355 command: Command::PrepareDocumentBulk,
16356 possible_submission_states: &["not_submitted", "resolved"],
16357 identity_requirement: "caller_action_id",
16358 resolver_command: None,
16359 cancellation: "per_call",
16360 },
16361 CommandOutcomeContract {
16362 command: Command::SubmitDocumentBulk,
16363 possible_submission_states: &[
16364 "not_submitted",
16365 "submitted",
16366 "known_retired",
16367 "indeterminate",
16368 "resolved",
16369 ],
16370 identity_requirement: "caller_action_id",
16371 resolver_command: Some(Command::ResolveDocumentBulk),
16372 cancellation: "per_call_until_submission_then_resolve",
16373 },
16374 CommandOutcomeContract {
16375 command: Command::ResolveDocumentBulk,
16376 possible_submission_states: &["not_submitted", "resolved"],
16377 identity_requirement: "caller_action_id",
16378 resolver_command: None,
16379 cancellation: "per_call",
16380 },
16381 CommandOutcomeContract {
16382 command: Command::PrepareAppendBulk,
16383 possible_submission_states: &["not_submitted", "resolved"],
16384 identity_requirement: "caller_action_id",
16385 resolver_command: None,
16386 cancellation: "per_call",
16387 },
16388 CommandOutcomeContract {
16389 command: Command::SubmitAppendBulk,
16390 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16391 identity_requirement: "request_locator",
16392 resolver_command: Some(Command::ResolveAppendBulk),
16393 cancellation: "per_call_until_submission_then_resolve",
16394 },
16395 CommandOutcomeContract {
16396 command: Command::ResolveAppendBulk,
16397 possible_submission_states: &["not_submitted", "resolved"],
16398 identity_requirement: "request_locator",
16399 resolver_command: None,
16400 cancellation: "per_call",
16401 },
16402 CommandOutcomeContract {
16403 command: Command::ObserveAppendCommitted,
16404 possible_submission_states: &["not_submitted", "resolved"],
16405 identity_requirement: "request_locator",
16406 resolver_command: None,
16407 cancellation: "per_call",
16408 },
16409 CommandOutcomeContract {
16410 command: Command::ResolveDocumentMutation,
16411 possible_submission_states: &["not_submitted", "resolved"],
16412 identity_requirement: "request_locator",
16413 resolver_command: None,
16414 cancellation: "per_call",
16415 },
16416 CommandOutcomeContract {
16417 command: Command::GetDocument,
16418 possible_submission_states: &["not_submitted", "resolved"],
16419 identity_requirement: "none",
16420 resolver_command: None,
16421 cancellation: "per_call",
16422 },
16423 CommandOutcomeContract {
16424 command: Command::Search,
16425 possible_submission_states: &["not_submitted", "resolved"],
16426 identity_requirement: "none",
16427 resolver_command: None,
16428 cancellation: "per_call",
16429 },
16430 CommandOutcomeContract {
16431 command: Command::TraverseRelationships,
16432 possible_submission_states: &["not_submitted", "resolved"],
16433 identity_requirement: "none",
16434 resolver_command: None,
16435 cancellation: "per_call",
16436 },
16437 CommandOutcomeContract {
16438 command: Command::QueryProfiles,
16439 possible_submission_states: &["not_submitted", "resolved"],
16440 identity_requirement: "none",
16441 resolver_command: None,
16442 cancellation: "per_call",
16443 },
16444 CommandOutcomeContract {
16445 command: Command::EvaluateTemporalEvidence,
16446 possible_submission_states: &["not_submitted", "resolved"],
16447 identity_requirement: "none",
16448 resolver_command: None,
16449 cancellation: "per_call",
16450 },
16451 CommandOutcomeContract {
16452 command: Command::CreateContinuousTemporalEvaluation,
16453 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16454 identity_requirement: "caller_action_id",
16455 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
16456 cancellation: "per_call_until_submission_then_resolve",
16457 },
16458 CommandOutcomeContract {
16459 command: Command::GetContinuousTemporalEvaluation,
16460 possible_submission_states: &["not_submitted", "resolved"],
16461 identity_requirement: "none",
16462 resolver_command: None,
16463 cancellation: "per_call",
16464 },
16465 CommandOutcomeContract {
16466 command: Command::PauseContinuousTemporalEvaluation,
16467 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16468 identity_requirement: "caller_action_id",
16469 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
16470 cancellation: "per_call_until_submission_then_resolve",
16471 },
16472 CommandOutcomeContract {
16473 command: Command::ResumeContinuousTemporalEvaluation,
16474 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16475 identity_requirement: "caller_action_id",
16476 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
16477 cancellation: "per_call_until_submission_then_resolve",
16478 },
16479 CommandOutcomeContract {
16480 command: Command::ReplaceContinuousTemporalEvaluation,
16481 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16482 identity_requirement: "caller_action_id",
16483 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
16484 cancellation: "per_call_until_submission_then_resolve",
16485 },
16486 CommandOutcomeContract {
16487 command: Command::RetireContinuousTemporalEvaluation,
16488 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16489 identity_requirement: "caller_action_id",
16490 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
16491 cancellation: "per_call_until_submission_then_resolve",
16492 },
16493 CommandOutcomeContract {
16494 command: Command::ReadContinuousTemporalEvidence,
16495 possible_submission_states: &["not_submitted", "resolved"],
16496 identity_requirement: "none",
16497 resolver_command: None,
16498 cancellation: "per_call",
16499 },
16500 CommandOutcomeContract {
16501 command: Command::ValidateSearch,
16502 possible_submission_states: &["not_submitted", "resolved"],
16503 identity_requirement: "none",
16504 resolver_command: None,
16505 cancellation: "per_call",
16506 },
16507 CommandOutcomeContract {
16508 command: Command::OpenPit,
16509 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16510 identity_requirement: "none",
16511 resolver_command: None,
16512 cancellation: "per_call_until_submission_then_resolve",
16513 },
16514 CommandOutcomeContract {
16515 command: Command::RenewPit,
16516 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16517 identity_requirement: "none",
16518 resolver_command: None,
16519 cancellation: "per_call_until_submission_then_resolve",
16520 },
16521 CommandOutcomeContract {
16522 command: Command::ClosePit,
16523 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16524 identity_requirement: "none",
16525 resolver_command: None,
16526 cancellation: "per_call_until_submission_then_resolve",
16527 },
16528 CommandOutcomeContract {
16529 command: Command::ListOperations,
16530 possible_submission_states: &["not_submitted", "resolved"],
16531 identity_requirement: "none",
16532 resolver_command: None,
16533 cancellation: "per_call",
16534 },
16535 CommandOutcomeContract {
16536 command: Command::GetOperation,
16537 possible_submission_states: &["not_submitted", "resolved"],
16538 identity_requirement: "request_locator",
16539 resolver_command: None,
16540 cancellation: "per_call",
16541 },
16542 CommandOutcomeContract {
16543 command: Command::WaitOperation,
16544 possible_submission_states: &["not_submitted", "resolved"],
16545 identity_requirement: "request_locator",
16546 resolver_command: None,
16547 cancellation: "per_call",
16548 },
16549 CommandOutcomeContract {
16550 command: Command::CancelOperation,
16551 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16552 identity_requirement: "request_locator",
16553 resolver_command: None,
16554 cancellation: "per_call_until_submission_then_resolve",
16555 },
16556 CommandOutcomeContract {
16557 command: Command::ListAuditEvents,
16558 possible_submission_states: &["not_submitted", "resolved"],
16559 identity_requirement: "none",
16560 resolver_command: None,
16561 cancellation: "per_call",
16562 },
16563 CommandOutcomeContract {
16564 command: Command::ExportAuditEvents,
16565 possible_submission_states: &["not_submitted", "resolved"],
16566 identity_requirement: "none",
16567 resolver_command: None,
16568 cancellation: "per_call",
16569 },
16570 CommandOutcomeContract {
16571 command: Command::ReserveServiceCredential,
16572 possible_submission_states: &[
16573 "not_submitted",
16574 "submitted",
16575 "known_retired",
16576 "indeterminate",
16577 "resolved",
16578 ],
16579 identity_requirement: "caller_action_id",
16580 resolver_command: Some(Command::ResolveServiceCredentialReservation),
16581 cancellation: "per_call_until_submission_then_resolve",
16582 },
16583 CommandOutcomeContract {
16584 command: Command::ReserveServiceCredentialRotation,
16585 possible_submission_states: &[
16586 "not_submitted",
16587 "submitted",
16588 "known_retired",
16589 "indeterminate",
16590 "resolved",
16591 ],
16592 identity_requirement: "caller_action_id",
16593 resolver_command: Some(Command::ResolveServiceCredentialReservation),
16594 cancellation: "per_call_until_submission_then_resolve",
16595 },
16596 CommandOutcomeContract {
16597 command: Command::ActivateServiceCredential,
16598 possible_submission_states: &[
16599 "not_submitted",
16600 "submitted",
16601 "known_retired",
16602 "indeterminate",
16603 "resolved",
16604 ],
16605 identity_requirement: "server_locator",
16606 resolver_command: Some(Command::ResolveServiceCredentialReservation),
16607 cancellation: "per_call_until_submission_then_resolve",
16608 },
16609 CommandOutcomeContract {
16610 command: Command::ResolveServiceCredentialReservation,
16611 possible_submission_states: &["not_submitted", "resolved"],
16612 identity_requirement: "caller_action_id",
16613 resolver_command: None,
16614 cancellation: "per_call",
16615 },
16616 CommandOutcomeContract {
16617 command: Command::PrepareRevokeServiceCredential,
16618 possible_submission_states: &["not_submitted", "resolved"],
16619 identity_requirement: "server_locator",
16620 resolver_command: None,
16621 cancellation: "per_call",
16622 },
16623 CommandOutcomeContract {
16624 command: Command::RevokeServiceCredential,
16625 possible_submission_states: &[
16626 "not_submitted",
16627 "submitted",
16628 "known_retired",
16629 "indeterminate",
16630 "resolved",
16631 ],
16632 identity_requirement: "request_locator",
16633 resolver_command: Some(Command::ResolveSecurityAction),
16634 cancellation: "per_call_until_submission_then_resolve",
16635 },
16636 CommandOutcomeContract {
16637 command: Command::ResolveSecurityAction,
16638 possible_submission_states: &["not_submitted", "resolved"],
16639 identity_requirement: "request_locator",
16640 resolver_command: None,
16641 cancellation: "per_call",
16642 },
16643 CommandOutcomeContract {
16644 command: Command::GetSecurityRole,
16645 possible_submission_states: &["not_submitted", "resolved"],
16646 identity_requirement: "none",
16647 resolver_command: None,
16648 cancellation: "per_call",
16649 },
16650 CommandOutcomeContract {
16651 command: Command::PrepareRoleAppendAccessChange,
16652 possible_submission_states: &["not_submitted", "resolved"],
16653 identity_requirement: "server_locator",
16654 resolver_command: None,
16655 cancellation: "per_call",
16656 },
16657 CommandOutcomeContract {
16658 command: Command::SubmitRoleAppendAccessChange,
16659 possible_submission_states: &[
16660 "not_submitted",
16661 "submitted",
16662 "known_retired",
16663 "indeterminate",
16664 "resolved",
16665 ],
16666 identity_requirement: "request_locator",
16667 resolver_command: Some(Command::ResolveSecurityAction),
16668 cancellation: "per_call_until_submission_then_resolve",
16669 },
16670 CommandOutcomeContract {
16671 command: Command::ListServiceCredentials,
16672 possible_submission_states: &["not_submitted", "resolved"],
16673 identity_requirement: "none",
16674 resolver_command: None,
16675 cancellation: "per_call",
16676 },
16677 CommandOutcomeContract {
16678 command: Command::GetRuntimeStatus,
16679 possible_submission_states: &["not_submitted", "resolved"],
16680 identity_requirement: "none",
16681 resolver_command: None,
16682 cancellation: "per_call",
16683 },
16684 CommandOutcomeContract {
16685 command: Command::GetResultCacheStatus,
16686 possible_submission_states: &["not_submitted", "resolved"],
16687 identity_requirement: "none",
16688 resolver_command: None,
16689 cancellation: "per_call",
16690 },
16691 CommandOutcomeContract {
16692 command: Command::GetFieldPromotionStatus,
16693 possible_submission_states: &["not_submitted", "resolved"],
16694 identity_requirement: "none",
16695 resolver_command: None,
16696 cancellation: "per_call",
16697 },
16698 CommandOutcomeContract {
16699 command: Command::GetOverloadStatus,
16700 possible_submission_states: &["not_submitted", "resolved"],
16701 identity_requirement: "none",
16702 resolver_command: None,
16703 cancellation: "per_call",
16704 },
16705 CommandOutcomeContract {
16706 command: Command::ConfigureExternalKey,
16707 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16708 identity_requirement: "none",
16709 resolver_command: None,
16710 cancellation: "per_call_until_submission_then_resolve",
16711 },
16712 CommandOutcomeContract {
16713 command: Command::RotateExternalKeyBinding,
16714 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16715 identity_requirement: "none",
16716 resolver_command: None,
16717 cancellation: "per_call_until_submission_then_resolve",
16718 },
16719 CommandOutcomeContract {
16720 command: Command::ConfigureAggregateThenDelete,
16721 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16722 identity_requirement: "none",
16723 resolver_command: None,
16724 cancellation: "per_call_until_submission_then_resolve",
16725 },
16726 CommandOutcomeContract {
16727 command: Command::GetLifecycleStatus,
16728 possible_submission_states: &["not_submitted", "resolved"],
16729 identity_requirement: "none",
16730 resolver_command: None,
16731 cancellation: "per_call",
16732 },
16733 CommandOutcomeContract {
16734 command: Command::GetQuota,
16735 possible_submission_states: &["not_submitted", "resolved"],
16736 identity_requirement: "none",
16737 resolver_command: None,
16738 cancellation: "per_call",
16739 },
16740 CommandOutcomeContract {
16741 command: Command::UpdateQuota,
16742 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16743 identity_requirement: "none",
16744 resolver_command: None,
16745 cancellation: "per_call_until_submission_then_resolve",
16746 },
16747 CommandOutcomeContract {
16748 command: Command::GetBinding,
16749 possible_submission_states: &["not_submitted", "resolved"],
16750 identity_requirement: "none",
16751 resolver_command: None,
16752 cancellation: "per_call",
16753 },
16754 CommandOutcomeContract {
16755 command: Command::GetAdmissionStatus,
16756 possible_submission_states: &["not_submitted", "resolved"],
16757 identity_requirement: "none",
16758 resolver_command: None,
16759 cancellation: "per_call",
16760 },
16761 CommandOutcomeContract {
16762 command: Command::SetAdmission,
16763 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16764 identity_requirement: "none",
16765 resolver_command: None,
16766 cancellation: "per_call_until_submission_then_resolve",
16767 },
16768 CommandOutcomeContract {
16769 command: Command::GetQuiesceStatus,
16770 possible_submission_states: &["not_submitted", "resolved"],
16771 identity_requirement: "none",
16772 resolver_command: None,
16773 cancellation: "per_call",
16774 },
16775 CommandOutcomeContract {
16776 command: Command::GetDecommissionReadiness,
16777 possible_submission_states: &["not_submitted", "resolved"],
16778 identity_requirement: "none",
16779 resolver_command: None,
16780 cancellation: "per_call",
16781 },
16782 CommandOutcomeContract {
16783 command: Command::GetUpgradeReadiness,
16784 possible_submission_states: &["not_submitted", "resolved"],
16785 identity_requirement: "none",
16786 resolver_command: None,
16787 cancellation: "per_call",
16788 },
16789 CommandOutcomeContract {
16790 command: Command::GetMaintenanceStatus,
16791 possible_submission_states: &["not_submitted", "resolved"],
16792 identity_requirement: "none",
16793 resolver_command: None,
16794 cancellation: "per_call",
16795 },
16796 CommandOutcomeContract {
16797 command: Command::WarmVectorIndex,
16798 possible_submission_states: &["not_submitted", "resolved"],
16799 identity_requirement: "exact_root",
16800 resolver_command: None,
16801 cancellation: "per_call",
16802 },
16803 CommandOutcomeContract {
16804 command: Command::EvaluateVectorRecall,
16805 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16806 identity_requirement: "caller_action_id",
16807 resolver_command: None,
16808 cancellation: "per_call_until_submission_then_resolve",
16809 },
16810 CommandOutcomeContract {
16811 command: Command::CalibrateVectorStrategy,
16812 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16813 identity_requirement: "caller_action_id",
16814 resolver_command: None,
16815 cancellation: "per_call_until_submission_then_resolve",
16816 },
16817 CommandOutcomeContract {
16818 command: Command::GetVectorDiagnostic,
16819 possible_submission_states: &["not_submitted", "resolved"],
16820 identity_requirement: "request_locator",
16821 resolver_command: None,
16822 cancellation: "per_call",
16823 },
16824 CommandOutcomeContract {
16825 command: Command::CreateDiagnostic,
16826 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16827 identity_requirement: "none",
16828 resolver_command: None,
16829 cancellation: "per_call_until_submission_then_resolve",
16830 },
16831 CommandOutcomeContract {
16832 command: Command::GetDiagnostic,
16833 possible_submission_states: &["not_submitted", "resolved"],
16834 identity_requirement: "request_locator",
16835 resolver_command: None,
16836 cancellation: "per_call",
16837 },
16838 CommandOutcomeContract {
16839 command: Command::PrepareCollectionExport,
16840 possible_submission_states: &["not_submitted", "resolved"],
16841 identity_requirement: "caller_action_id",
16842 resolver_command: None,
16843 cancellation: "per_call",
16844 },
16845 CommandOutcomeContract {
16846 command: Command::StartCollectionExport,
16847 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16848 identity_requirement: "caller_action_id",
16849 resolver_command: Some(Command::ResolveCollectionExport),
16850 cancellation: "per_call_until_submission_then_resolve",
16851 },
16852 CommandOutcomeContract {
16853 command: Command::ResolveCollectionExport,
16854 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
16855 identity_requirement: "caller_action_id",
16856 resolver_command: None,
16857 cancellation: "per_call",
16858 },
16859 CommandOutcomeContract {
16860 command: Command::VerifyCollectionExport,
16861 possible_submission_states: &["not_submitted", "resolved"],
16862 identity_requirement: "request_locator",
16863 resolver_command: None,
16864 cancellation: "per_call",
16865 },
16866 CommandOutcomeContract {
16867 command: Command::PrepareCollectionExportRetirement,
16868 possible_submission_states: &["not_submitted", "resolved"],
16869 identity_requirement: "caller_action_id",
16870 resolver_command: None,
16871 cancellation: "per_call",
16872 },
16873 CommandOutcomeContract {
16874 command: Command::StartCollectionExportRetirement,
16875 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16876 identity_requirement: "caller_action_id",
16877 resolver_command: Some(Command::ResolveCollectionExportRetirement),
16878 cancellation: "per_call_until_submission_then_resolve",
16879 },
16880 CommandOutcomeContract {
16881 command: Command::ResolveCollectionExportRetirement,
16882 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
16883 identity_requirement: "caller_action_id",
16884 resolver_command: None,
16885 cancellation: "per_call",
16886 },
16887 CommandOutcomeContract {
16888 command: Command::PrepareCollectionRestore,
16889 possible_submission_states: &["not_submitted", "resolved"],
16890 identity_requirement: "caller_action_id",
16891 resolver_command: None,
16892 cancellation: "per_call",
16893 },
16894 CommandOutcomeContract {
16895 command: Command::StartCollectionRestore,
16896 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16897 identity_requirement: "caller_action_id",
16898 resolver_command: Some(Command::ResolveCollectionRestore),
16899 cancellation: "per_call_until_submission_then_resolve",
16900 },
16901 CommandOutcomeContract {
16902 command: Command::ResolveCollectionRestore,
16903 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
16904 identity_requirement: "caller_action_id",
16905 resolver_command: None,
16906 cancellation: "per_call",
16907 },
16908 CommandOutcomeContract {
16909 command: Command::PrepareCollectionTransferExport,
16910 possible_submission_states: &["not_submitted", "resolved"],
16911 identity_requirement: "caller_action_id",
16912 resolver_command: None,
16913 cancellation: "per_call",
16914 },
16915 CommandOutcomeContract {
16916 command: Command::StartCollectionTransferExport,
16917 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16918 identity_requirement: "caller_action_id",
16919 resolver_command: Some(Command::ResolveCollectionTransferExport),
16920 cancellation: "per_call_until_submission_then_resolve",
16921 },
16922 CommandOutcomeContract {
16923 command: Command::ResolveCollectionTransferExport,
16924 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
16925 identity_requirement: "caller_action_id",
16926 resolver_command: None,
16927 cancellation: "per_call",
16928 },
16929 CommandOutcomeContract {
16930 command: Command::PrepareCollectionTransferRestore,
16931 possible_submission_states: &["not_submitted", "resolved"],
16932 identity_requirement: "caller_action_id",
16933 resolver_command: None,
16934 cancellation: "per_call",
16935 },
16936 CommandOutcomeContract {
16937 command: Command::StartCollectionTransferRestore,
16938 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16939 identity_requirement: "caller_action_id",
16940 resolver_command: Some(Command::ResolveCollectionTransferRestore),
16941 cancellation: "per_call_until_submission_then_resolve",
16942 },
16943 CommandOutcomeContract {
16944 command: Command::ResolveCollectionTransferRestore,
16945 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
16946 identity_requirement: "caller_action_id",
16947 resolver_command: None,
16948 cancellation: "per_call",
16949 },
16950 CommandOutcomeContract {
16951 command: Command::PrepareIndexExport,
16952 possible_submission_states: &["not_submitted", "resolved"],
16953 identity_requirement: "caller_action_id",
16954 resolver_command: None,
16955 cancellation: "per_call",
16956 },
16957 CommandOutcomeContract {
16958 command: Command::StartIndexExport,
16959 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16960 identity_requirement: "caller_action_id",
16961 resolver_command: Some(Command::ResolveIndexExport),
16962 cancellation: "per_call_until_submission_then_resolve",
16963 },
16964 CommandOutcomeContract {
16965 command: Command::ResolveIndexExport,
16966 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
16967 identity_requirement: "caller_action_id",
16968 resolver_command: None,
16969 cancellation: "per_call",
16970 },
16971 CommandOutcomeContract {
16972 command: Command::VerifyIndexExport,
16973 possible_submission_states: &["not_submitted", "resolved"],
16974 identity_requirement: "request_locator",
16975 resolver_command: None,
16976 cancellation: "per_call",
16977 },
16978 CommandOutcomeContract {
16979 command: Command::PrepareIndexImport,
16980 possible_submission_states: &["not_submitted", "resolved"],
16981 identity_requirement: "caller_action_id",
16982 resolver_command: None,
16983 cancellation: "per_call",
16984 },
16985 CommandOutcomeContract {
16986 command: Command::StartIndexImport,
16987 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16988 identity_requirement: "caller_action_id",
16989 resolver_command: Some(Command::ResolveIndexImport),
16990 cancellation: "per_call_until_submission_then_resolve",
16991 },
16992 CommandOutcomeContract {
16993 command: Command::ResolveIndexImport,
16994 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
16995 identity_requirement: "caller_action_id",
16996 resolver_command: None,
16997 cancellation: "per_call",
16998 },
16999 CommandOutcomeContract {
17000 command: Command::ReadArtifactChunk,
17001 possible_submission_states: &["not_submitted", "resolved"],
17002 identity_requirement: "none",
17003 resolver_command: None,
17004 cancellation: "per_call",
17005 },
17006 CommandOutcomeContract {
17007 command: Command::ExportUsage,
17008 possible_submission_states: &["not_submitted", "resolved"],
17009 identity_requirement: "none",
17010 resolver_command: None,
17011 cancellation: "per_call",
17012 },
17013 CommandOutcomeContract {
17014 command: Command::ReadLogicalOccupancy,
17015 possible_submission_states: &["not_submitted", "resolved"],
17016 identity_requirement: "none",
17017 resolver_command: None,
17018 cancellation: "per_call",
17019 },
17020 CommandOutcomeContract {
17021 command: Command::ExecuteStateRead,
17022 possible_submission_states: &["not_submitted", "resolved"],
17023 identity_requirement: "none",
17024 resolver_command: None,
17025 cancellation: "per_call",
17026 },
17027 CommandOutcomeContract {
17028 command: Command::PrepareStateWrite,
17029 possible_submission_states: &["not_submitted", "resolved"],
17030 identity_requirement: "caller_action_id",
17031 resolver_command: None,
17032 cancellation: "per_call",
17033 },
17034 CommandOutcomeContract {
17035 command: Command::SubmitStateWrite,
17036 possible_submission_states: &[
17037 "not_submitted",
17038 "submitted",
17039 "known_retired",
17040 "indeterminate",
17041 "resolved",
17042 ],
17043 identity_requirement: "request_locator",
17044 resolver_command: Some(Command::ResolveStateWrite),
17045 cancellation: "per_call_until_submission_then_resolve",
17046 },
17047 CommandOutcomeContract {
17048 command: Command::ResolveStateWrite,
17049 possible_submission_states: &["not_submitted", "resolved"],
17050 identity_requirement: "request_locator",
17051 resolver_command: None,
17052 cancellation: "per_call",
17053 },
17054];
17055#[derive(Clone, Copy, Debug, Eq, PartialEq)]
17056pub struct ErrorOutcomeContract {
17057 pub code: ErrorCode,
17058 pub disposition: ErrorDisposition,
17059 pub recovery: RecoveryAction,
17060 pub retry_after_limit_id: Option<&'static str>,
17061 pub recovery_identity: &'static str,
17062}
17063pub const LODESTONE_API_ERROR_OUTCOMES: &[ErrorOutcomeContract] = &[
17064 ErrorOutcomeContract {
17065 code: ErrorCode::Aborted,
17066 disposition: ErrorDisposition::NotSubmitted,
17067 recovery: RecoveryAction::Retry,
17068 retry_after_limit_id: None,
17069 recovery_identity: "request_identity",
17070 },
17071 ErrorOutcomeContract {
17072 code: ErrorCode::Aborted,
17073 disposition: ErrorDisposition::Indeterminate,
17074 recovery: RecoveryAction::Resolve,
17075 retry_after_limit_id: None,
17076 recovery_identity: "request_identity",
17077 },
17078 ErrorOutcomeContract {
17079 code: ErrorCode::DeadlineExceeded,
17080 disposition: ErrorDisposition::NotSubmitted,
17081 recovery: RecoveryAction::Retry,
17082 retry_after_limit_id: None,
17083 recovery_identity: "request_identity",
17084 },
17085 ErrorOutcomeContract {
17086 code: ErrorCode::DeadlineExceeded,
17087 disposition: ErrorDisposition::Indeterminate,
17088 recovery: RecoveryAction::Resolve,
17089 retry_after_limit_id: None,
17090 recovery_identity: "request_identity",
17091 },
17092 ErrorOutcomeContract {
17093 code: ErrorCode::InvalidRequest,
17094 disposition: ErrorDisposition::NotSubmitted,
17095 recovery: RecoveryAction::Stop,
17096 retry_after_limit_id: None,
17097 recovery_identity: "none",
17098 },
17099 ErrorOutcomeContract {
17100 code: ErrorCode::UnsupportedVersion,
17101 disposition: ErrorDisposition::NotSubmitted,
17102 recovery: RecoveryAction::Stop,
17103 retry_after_limit_id: None,
17104 recovery_identity: "none",
17105 },
17106 ErrorOutcomeContract {
17107 code: ErrorCode::Unauthenticated,
17108 disposition: ErrorDisposition::NotSubmitted,
17109 recovery: RecoveryAction::RefreshCredential,
17110 retry_after_limit_id: None,
17111 recovery_identity: "none",
17112 },
17113 ErrorOutcomeContract {
17114 code: ErrorCode::PermissionDenied,
17115 disposition: ErrorDisposition::NotSubmitted,
17116 recovery: RecoveryAction::Stop,
17117 retry_after_limit_id: None,
17118 recovery_identity: "none",
17119 },
17120 ErrorOutcomeContract {
17121 code: ErrorCode::NotFound,
17122 disposition: ErrorDisposition::NotSubmitted,
17123 recovery: RecoveryAction::Stop,
17124 retry_after_limit_id: None,
17125 recovery_identity: "request_identity",
17126 },
17127 ErrorOutcomeContract {
17128 code: ErrorCode::NotFound,
17129 disposition: ErrorDisposition::Resolved,
17130 recovery: RecoveryAction::Stop,
17131 retry_after_limit_id: None,
17132 recovery_identity: "request_identity",
17133 },
17134 ErrorOutcomeContract {
17135 code: ErrorCode::Conflict,
17136 disposition: ErrorDisposition::NotSubmitted,
17137 recovery: RecoveryAction::RefreshPrecondition,
17138 retry_after_limit_id: None,
17139 recovery_identity: "request_identity",
17140 },
17141 ErrorOutcomeContract {
17142 code: ErrorCode::Conflict,
17143 disposition: ErrorDisposition::Resolved,
17144 recovery: RecoveryAction::Stop,
17145 retry_after_limit_id: None,
17146 recovery_identity: "request_identity",
17147 },
17148 ErrorOutcomeContract {
17149 code: ErrorCode::StaleCursor,
17150 disposition: ErrorDisposition::NotSubmitted,
17151 recovery: RecoveryAction::RestartPage,
17152 retry_after_limit_id: None,
17153 recovery_identity: "cursor",
17154 },
17155 ErrorOutcomeContract {
17156 code: ErrorCode::RestartBudgetExhausted,
17157 disposition: ErrorDisposition::NotSubmitted,
17158 recovery: RecoveryAction::Stop,
17159 retry_after_limit_id: None,
17160 recovery_identity: "cursor",
17161 },
17162 ErrorOutcomeContract {
17163 code: ErrorCode::LimitExceeded,
17164 disposition: ErrorDisposition::NotSubmitted,
17165 recovery: RecoveryAction::ReduceRequest,
17166 retry_after_limit_id: None,
17167 recovery_identity: "none",
17168 },
17169 ErrorOutcomeContract {
17170 code: ErrorCode::CapabilityUnavailable,
17171 disposition: ErrorDisposition::NotSubmitted,
17172 recovery: RecoveryAction::Stop,
17173 retry_after_limit_id: None,
17174 recovery_identity: "none",
17175 },
17176 ErrorOutcomeContract {
17177 code: ErrorCode::NotSubmitted,
17178 disposition: ErrorDisposition::NotSubmitted,
17179 recovery: RecoveryAction::RetryAfter,
17180 retry_after_limit_id: Some("retry_after_millis"),
17181 recovery_identity: "request_identity",
17182 },
17183 ErrorOutcomeContract {
17184 code: ErrorCode::SubmittedIndeterminate,
17185 disposition: ErrorDisposition::Indeterminate,
17186 recovery: RecoveryAction::Resolve,
17187 retry_after_limit_id: None,
17188 recovery_identity: "locator_or_caller_action_id",
17189 },
17190 ErrorOutcomeContract {
17191 code: ErrorCode::ExpiredUnknown,
17192 disposition: ErrorDisposition::KnownRetired,
17193 recovery: RecoveryAction::Stop,
17194 retry_after_limit_id: None,
17195 recovery_identity: "locator_or_caller_action_id",
17196 },
17197 ErrorOutcomeContract {
17198 code: ErrorCode::SecretNotEscrowed,
17199 disposition: ErrorDisposition::Resolved,
17200 recovery: RecoveryAction::Resolve,
17201 retry_after_limit_id: None,
17202 recovery_identity: "reservation_action_id",
17203 },
17204 ErrorOutcomeContract {
17205 code: ErrorCode::RetentionGap,
17206 disposition: ErrorDisposition::KnownRetired,
17207 recovery: RecoveryAction::Stop,
17208 retry_after_limit_id: None,
17209 recovery_identity: "cursor_or_locator",
17210 },
17211 ErrorOutcomeContract {
17212 code: ErrorCode::ArtifactRangeInvalid,
17213 disposition: ErrorDisposition::NotSubmitted,
17214 recovery: RecoveryAction::CorrectRange,
17215 retry_after_limit_id: None,
17216 recovery_identity: "artifact_identity",
17217 },
17218 ErrorOutcomeContract {
17219 code: ErrorCode::ChecksumMismatch,
17220 disposition: ErrorDisposition::Resolved,
17221 recovery: RecoveryAction::Stop,
17222 retry_after_limit_id: None,
17223 recovery_identity: "artifact_identity",
17224 },
17225 ErrorOutcomeContract {
17226 code: ErrorCode::TemporarilyUnavailable,
17227 disposition: ErrorDisposition::NotSubmitted,
17228 recovery: RecoveryAction::RetryAfter,
17229 retry_after_limit_id: Some("retry_after_millis"),
17230 recovery_identity: "request_identity",
17231 },
17232 ErrorOutcomeContract {
17233 code: ErrorCode::TemporarilyUnavailable,
17234 disposition: ErrorDisposition::Indeterminate,
17235 recovery: RecoveryAction::Resolve,
17236 retry_after_limit_id: Some("retry_after_millis"),
17237 recovery_identity: "request_identity",
17238 },
17239 ErrorOutcomeContract {
17240 code: ErrorCode::Internal,
17241 disposition: ErrorDisposition::NotSubmitted,
17242 recovery: RecoveryAction::Stop,
17243 retry_after_limit_id: None,
17244 recovery_identity: "request_identity",
17245 },
17246 ErrorOutcomeContract {
17247 code: ErrorCode::Internal,
17248 disposition: ErrorDisposition::Resolved,
17249 recovery: RecoveryAction::Stop,
17250 retry_after_limit_id: None,
17251 recovery_identity: "request_identity",
17252 },
17253 ErrorOutcomeContract {
17254 code: ErrorCode::Internal,
17255 disposition: ErrorDisposition::Indeterminate,
17256 recovery: RecoveryAction::Resolve,
17257 retry_after_limit_id: None,
17258 recovery_identity: "request_identity",
17259 },
17260];
17261#[derive(Clone, Copy, Debug, Eq, PartialEq)]
17262pub struct Limit {
17263 pub id: &'static str,
17264 pub default: u64,
17265 pub maximum: u64,
17266 pub unit: &'static str,
17267}
17268pub const LODESTONE_API_LIMITS: &[Limit] = &[
17269 Limit {
17270 id: "request_bytes",
17271 default: 2097152,
17272 maximum: 2097152,
17273 unit: "bytes",
17274 },
17275 Limit {
17276 id: "response_bytes",
17277 default: 2097152,
17278 maximum: 2097152,
17279 unit: "bytes",
17280 },
17281 Limit {
17282 id: "page_size",
17283 default: 100,
17284 maximum: 1000,
17285 unit: "items",
17286 },
17287 Limit {
17288 id: "catalog_page_size",
17289 default: 100,
17290 maximum: 100,
17291 unit: "items",
17292 },
17293 Limit {
17294 id: "catalog_restart_budget",
17295 default: 8,
17296 maximum: 8,
17297 unit: "restarts",
17298 },
17299 Limit {
17300 id: "query_clauses",
17301 default: 256,
17302 maximum: 1024,
17303 unit: "clauses",
17304 },
17305 Limit {
17306 id: "text_query_bytes",
17307 default: 16384,
17308 maximum: 16384,
17309 unit: "bytes",
17310 },
17311 Limit {
17312 id: "text_query_fields",
17313 default: 64,
17314 maximum: 64,
17315 unit: "fields",
17316 },
17317 Limit {
17318 id: "text_query_slop",
17319 default: 64,
17320 maximum: 64,
17321 unit: "positions",
17322 },
17323 Limit {
17324 id: "text_query_boost",
17325 default: 1024,
17326 maximum: 1024,
17327 unit: "multiplier",
17328 },
17329 Limit {
17330 id: "text_query_fuzzy_expansions",
17331 default: 1024,
17332 maximum: 1024,
17333 unit: "terms",
17334 },
17335 Limit {
17336 id: "text_query_fuzzy_distance",
17337 default: 2,
17338 maximum: 2,
17339 unit: "edits",
17340 },
17341 Limit {
17342 id: "text_query_dictionary_scan_terms",
17343 default: 65536,
17344 maximum: 65536,
17345 unit: "terms",
17346 },
17347 Limit {
17348 id: "text_query_dictionary_scan_bytes",
17349 default: 16777216,
17350 maximum: 16777216,
17351 unit: "bytes",
17352 },
17353 Limit {
17354 id: "text_query_fuzzy_work_units",
17355 default: 2000000,
17356 maximum: 2000000,
17357 unit: "distance_cells",
17358 },
17359 Limit {
17360 id: "aggregation_nodes",
17361 default: 64,
17362 maximum: 256,
17363 unit: "nodes",
17364 },
17365 Limit {
17366 id: "aggregation_buckets",
17367 default: 65536,
17368 maximum: 65536,
17369 unit: "buckets",
17370 },
17371 Limit {
17372 id: "metric_point_bytes",
17373 default: 1048576,
17374 maximum: 1048576,
17375 unit: "bytes",
17376 },
17377 Limit {
17378 id: "metric_attributes",
17379 default: 128,
17380 maximum: 128,
17381 unit: "items",
17382 },
17383 Limit {
17384 id: "metric_attribute_bytes",
17385 default: 65536,
17386 maximum: 65536,
17387 unit: "bytes",
17388 },
17389 Limit {
17390 id: "metric_exemplars",
17391 default: 8,
17392 maximum: 8,
17393 unit: "items",
17394 },
17395 Limit {
17396 id: "metric_histogram_buckets",
17397 default: 4097,
17398 maximum: 4097,
17399 unit: "buckets",
17400 },
17401 Limit {
17402 id: "time_series_grouping_keys",
17403 default: 4,
17404 maximum: 16,
17405 unit: "keys",
17406 },
17407 Limit {
17408 id: "time_series_points",
17409 default: 100000,
17410 maximum: 100000,
17411 unit: "points",
17412 },
17413 Limit {
17414 id: "time_series_series",
17415 default: 10000,
17416 maximum: 10000,
17417 unit: "series",
17418 },
17419 Limit {
17420 id: "time_series_buckets",
17421 default: 65536,
17422 maximum: 65536,
17423 unit: "buckets",
17424 },
17425 Limit {
17426 id: "time_series_results",
17427 default: 65536,
17428 maximum: 65536,
17429 unit: "results",
17430 },
17431 Limit {
17432 id: "time_series_quantiles",
17433 default: 10,
17434 maximum: 100,
17435 unit: "quantiles",
17436 },
17437 Limit {
17438 id: "time_series_state_bytes",
17439 default: 67108864,
17440 maximum: 67108864,
17441 unit: "bytes",
17442 },
17443 Limit {
17444 id: "temporal_inputs",
17445 default: 16,
17446 maximum: 16,
17447 unit: "indexes",
17448 },
17449 Limit {
17450 id: "temporal_pattern_nodes",
17451 default: 64,
17452 maximum: 64,
17453 unit: "nodes",
17454 },
17455 Limit {
17456 id: "temporal_pattern_depth",
17457 default: 16,
17458 maximum: 16,
17459 unit: "levels",
17460 },
17461 Limit {
17462 id: "temporal_pattern_branches",
17463 default: 16,
17464 maximum: 16,
17465 unit: "branches",
17466 },
17467 Limit {
17468 id: "temporal_correlation_keys",
17469 default: 4,
17470 maximum: 4,
17471 unit: "fields",
17472 },
17473 Limit {
17474 id: "temporal_events",
17475 default: 4096,
17476 maximum: 4096,
17477 unit: "events",
17478 },
17479 Limit {
17480 id: "temporal_states",
17481 default: 65536,
17482 maximum: 65536,
17483 unit: "states",
17484 },
17485 Limit {
17486 id: "temporal_captured_events",
17487 default: 256,
17488 maximum: 256,
17489 unit: "events",
17490 },
17491 Limit {
17492 id: "temporal_results",
17493 default: 4096,
17494 maximum: 4096,
17495 unit: "results",
17496 },
17497 Limit {
17498 id: "temporal_state_bytes",
17499 default: 67108864,
17500 maximum: 67108864,
17501 unit: "bytes",
17502 },
17503 Limit {
17504 id: "temporal_interval_nanos",
17505 default: 2678400000000000,
17506 maximum: 2678400000000000,
17507 unit: "nanoseconds",
17508 },
17509 Limit {
17510 id: "relationship_indexes",
17511 default: 4,
17512 maximum: 16,
17513 unit: "indexes",
17514 },
17515 Limit {
17516 id: "relationship_seeds",
17517 default: 16,
17518 maximum: 128,
17519 unit: "entities",
17520 },
17521 Limit {
17522 id: "relationship_filter_values",
17523 default: 16,
17524 maximum: 128,
17525 unit: "values",
17526 },
17527 Limit {
17528 id: "relationship_depth",
17529 default: 4,
17530 maximum: 16,
17531 unit: "levels",
17532 },
17533 Limit {
17534 id: "relationship_fan_out",
17535 default: 256,
17536 maximum: 4096,
17537 unit: "relationships",
17538 },
17539 Limit {
17540 id: "relationship_visited_entities",
17541 default: 10000,
17542 maximum: 65536,
17543 unit: "entities",
17544 },
17545 Limit {
17546 id: "relationship_visited_records",
17547 default: 10000,
17548 maximum: 10000,
17549 unit: "records",
17550 },
17551 Limit {
17552 id: "relationship_returned_records",
17553 default: 10000,
17554 maximum: 10000,
17555 unit: "records",
17556 },
17557 Limit {
17558 id: "relationship_memory_bytes",
17559 default: 67108864,
17560 maximum: 268435456,
17561 unit: "bytes",
17562 },
17563 Limit {
17564 id: "profile_indexes",
17565 default: 4,
17566 maximum: 16,
17567 unit: "indexes",
17568 },
17569 Limit {
17570 id: "profile_filter_values",
17571 default: 16,
17572 maximum: 128,
17573 unit: "values",
17574 },
17575 Limit {
17576 id: "profile_batches",
17577 default: 10000,
17578 maximum: 10000,
17579 unit: "batches",
17580 },
17581 Limit {
17582 id: "profile_samples",
17583 default: 100000,
17584 maximum: 100000,
17585 unit: "samples",
17586 },
17587 Limit {
17588 id: "profile_results",
17589 default: 10000,
17590 maximum: 10000,
17591 unit: "results",
17592 },
17593 Limit {
17594 id: "profile_memory_bytes",
17595 default: 67108864,
17596 maximum: 268435456,
17597 unit: "bytes",
17598 },
17599 Limit {
17600 id: "approximate_cardinality_precision",
17601 default: 12,
17602 maximum: 16,
17603 unit: "index_bits",
17604 },
17605 Limit {
17606 id: "approximate_percentile_precision",
17607 default: 10,
17608 maximum: 12,
17609 unit: "index_bits",
17610 },
17611 Limit {
17612 id: "operation_page_authorities",
17613 default: 7,
17614 maximum: 7,
17615 unit: "authorities",
17616 },
17617 Limit {
17618 id: "artifact_chunk_bytes",
17619 default: 262144,
17620 maximum: 1048576,
17621 unit: "bytes",
17622 },
17623 Limit {
17624 id: "bulk_document_items",
17625 default: 128,
17626 maximum: 1024,
17627 unit: "items",
17628 },
17629 Limit {
17630 id: "bulk_document_bytes",
17631 default: 2097152,
17632 maximum: 2097152,
17633 unit: "bytes",
17634 },
17635 Limit {
17636 id: "state_command_keys",
17637 default: 128,
17638 maximum: 128,
17639 unit: "keys",
17640 },
17641 Limit {
17642 id: "state_command_value_bytes",
17643 default: 1048576,
17644 maximum: 1048576,
17645 unit: "bytes",
17646 },
17647 Limit {
17648 id: "state_write_outcomes",
17649 default: 4096,
17650 maximum: 4096,
17651 unit: "entries",
17652 },
17653 Limit {
17654 id: "exact_decimal_scale",
17655 default: 18,
17656 maximum: 1024,
17657 unit: "decimal_places",
17658 },
17659 Limit {
17660 id: "retry_after_millis",
17661 default: 1000,
17662 maximum: 60000,
17663 unit: "milliseconds",
17664 },
17665 Limit {
17666 id: "mapping_fields",
17667 default: 16384,
17668 maximum: 16384,
17669 unit: "fields",
17670 },
17671 Limit {
17672 id: "search_result_window",
17673 default: 10000,
17674 maximum: 10000,
17675 unit: "items",
17676 },
17677 Limit {
17678 id: "routing_values",
17679 default: 1024,
17680 maximum: 1024,
17681 unit: "items",
17682 },
17683 Limit {
17684 id: "routing_value_bytes",
17685 default: 4096,
17686 maximum: 4096,
17687 unit: "bytes",
17688 },
17689 Limit {
17690 id: "query_recursion_depth",
17691 default: 64,
17692 maximum: 64,
17693 unit: "levels",
17694 },
17695 Limit {
17696 id: "vector_dimensions",
17697 default: 16384,
17698 maximum: 16384,
17699 unit: "dimensions",
17700 },
17701 Limit {
17702 id: "vector_query_bytes",
17703 default: 65536,
17704 maximum: 65536,
17705 unit: "bytes",
17706 },
17707 Limit {
17708 id: "vector_request_bytes",
17709 default: 1048576,
17710 maximum: 1048576,
17711 unit: "bytes",
17712 },
17713 Limit {
17714 id: "vector_candidates",
17715 default: 10000,
17716 maximum: 10000,
17717 unit: "items",
17718 },
17719 Limit {
17720 id: "vector_set_document_vectors",
17721 default: 128,
17722 maximum: 128,
17723 unit: "vectors",
17724 },
17725 Limit {
17726 id: "vector_set_document_bytes",
17727 default: 65536,
17728 maximum: 65536,
17729 unit: "bytes",
17730 },
17731 Limit {
17732 id: "vector_set_query_vectors",
17733 default: 32,
17734 maximum: 32,
17735 unit: "vectors",
17736 },
17737 Limit {
17738 id: "vector_set_query_bytes",
17739 default: 65536,
17740 maximum: 65536,
17741 unit: "bytes",
17742 },
17743 Limit {
17744 id: "retrieval_branches",
17745 default: 16,
17746 maximum: 16,
17747 unit: "branches",
17748 },
17749 Limit {
17750 id: "retrieval_branch_name_bytes",
17751 default: 64,
17752 maximum: 64,
17753 unit: "bytes",
17754 },
17755 Limit {
17756 id: "retrieval_window",
17757 default: 10000,
17758 maximum: 10000,
17759 unit: "items",
17760 },
17761 Limit {
17762 id: "fragment_fields",
17763 default: 4,
17764 maximum: 16,
17765 unit: "fields",
17766 },
17767 Limit {
17768 id: "fragments_per_field",
17769 default: 1,
17770 maximum: 8,
17771 unit: "items",
17772 },
17773 Limit {
17774 id: "fragment_bytes",
17775 default: 150,
17776 maximum: 8192,
17777 unit: "bytes",
17778 },
17779 Limit {
17780 id: "fragment_total_bytes",
17781 default: 65536,
17782 maximum: 65536,
17783 unit: "bytes",
17784 },
17785 Limit {
17786 id: "result_feature_hits",
17787 default: 10,
17788 maximum: 100,
17789 unit: "items",
17790 },
17791 Limit {
17792 id: "result_features",
17793 default: 4,
17794 maximum: 16,
17795 unit: "features",
17796 },
17797 Limit {
17798 id: "diversification_fields",
17799 default: 1,
17800 maximum: 4,
17801 unit: "fields",
17802 },
17803 Limit {
17804 id: "diversification_per_group",
17805 default: 1,
17806 maximum: 64,
17807 unit: "items",
17808 },
17809 Limit {
17810 id: "source_projection_patterns",
17811 default: 128,
17812 maximum: 128,
17813 unit: "patterns",
17814 },
17815 Limit {
17816 id: "source_projection_pattern_bytes",
17817 default: 512,
17818 maximum: 512,
17819 unit: "bytes",
17820 },
17821 Limit {
17822 id: "vector_evaluation_queries",
17823 default: 64,
17824 maximum: 256,
17825 unit: "queries",
17826 },
17827 Limit {
17828 id: "vector_evaluation_k",
17829 default: 10,
17830 maximum: 1000,
17831 unit: "items",
17832 },
17833 Limit {
17834 id: "vector_evaluation_profiles",
17835 default: 3,
17836 maximum: 3,
17837 unit: "profiles",
17838 },
17839 Limit {
17840 id: "vector_evaluation_artifact_bytes",
17841 default: 1048576,
17842 maximum: 1048576,
17843 unit: "bytes",
17844 },
17845 Limit {
17846 id: "vector_warm_components",
17847 default: 2,
17848 maximum: 3,
17849 unit: "components",
17850 },
17851 Limit {
17852 id: "vector_warm_requests",
17853 default: 1024,
17854 maximum: 65536,
17855 unit: "requests",
17856 },
17857 Limit {
17858 id: "vector_warm_bytes",
17859 default: 268435456,
17860 maximum: 1073741824,
17861 unit: "bytes",
17862 },
17863 Limit {
17864 id: "vector_warm_achievements",
17865 default: 1024,
17866 maximum: 10000,
17867 unit: "items",
17868 },
17869 Limit {
17870 id: "vector_warm_ttl_millis",
17871 default: 300000,
17872 maximum: 900000,
17873 unit: "milliseconds",
17874 },
17875 Limit {
17876 id: "operation_page_size",
17877 default: 100,
17878 maximum: 100,
17879 unit: "items",
17880 },
17881 Limit {
17882 id: "operation_wait_attempts",
17883 default: 20,
17884 maximum: 100,
17885 unit: "attempts",
17886 },
17887 Limit {
17888 id: "operation_wait_interval_millis",
17889 default: 100,
17890 maximum: 60000,
17891 unit: "milliseconds",
17892 },
17893 Limit {
17894 id: "resource_initial_shards",
17895 default: 1,
17896 maximum: 4096,
17897 unit: "shards",
17898 },
17899 Limit {
17900 id: "resource_target_shard_bytes",
17901 default: 536870912,
17902 maximum: 1125899906842624,
17903 unit: "bytes",
17904 },
17905 Limit {
17906 id: "resource_admission_weight",
17907 default: 1,
17908 maximum: 1000000,
17909 unit: "weight",
17910 },
17911 Limit {
17912 id: "resource_ram_bytes",
17913 default: 1073741824,
17914 maximum: 1125899906842624,
17915 unit: "bytes",
17916 },
17917 Limit {
17918 id: "resource_nvme_bytes",
17919 default: 2147483648,
17920 maximum: 1125899906842624,
17921 unit: "bytes",
17922 },
17923 Limit {
17924 id: "resource_refresh_millis",
17925 default: 200,
17926 maximum: 604800000,
17927 unit: "milliseconds",
17928 },
17929 Limit {
17930 id: "resource_memtable_bytes",
17931 default: 268435456,
17932 maximum: 1125899906842624,
17933 unit: "bytes",
17934 },
17935 Limit {
17936 id: "resource_parallelism",
17937 default: 1,
17938 maximum: 4096,
17939 unit: "workers",
17940 },
17941 Limit {
17942 id: "collection_export_bytes",
17943 default: 268435456,
17944 maximum: 268435456,
17945 unit: "bytes",
17946 },
17947 Limit {
17948 id: "collection_export_documents",
17949 default: 10000,
17950 maximum: 10000,
17951 unit: "documents",
17952 },
17953 Limit {
17954 id: "index_transfer_bytes",
17955 default: 268435456,
17956 maximum: 268435456,
17957 unit: "bytes",
17958 },
17959 Limit {
17960 id: "index_transfer_records",
17961 default: 10000,
17962 maximum: 10000,
17963 unit: "records",
17964 },
17965 Limit {
17966 id: "index_transfer_pages",
17967 default: 7,
17968 maximum: 7,
17969 unit: "pages",
17970 },
17971 Limit {
17972 id: "portability_prefix_bytes",
17973 default: 512,
17974 maximum: 512,
17975 unit: "bytes",
17976 },
17977];
17978#[derive(Clone, Copy, Debug, Eq, PartialEq)]
17979pub enum JsonError {
17980 DuplicateObjectField,
17981 InvalidScalar,
17982}
17983pub fn validate_semantic_json(value: &JsonValue) -> Result<(), JsonError> {
17984 match value {
17985 JsonValue::I64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
17986 JsonValue::U64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
17987 JsonValue::ExactDecimal(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
17988 JsonValue::Approximate(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
17989 JsonValue::Array(items) => items.iter().try_for_each(validate_semantic_json),
17990 JsonValue::Object(fields) => {
17991 let mut names = std::collections::BTreeSet::new();
17992 for field in fields {
17993 if !names.insert(field.name.as_str()) {
17994 return Err(JsonError::DuplicateObjectField);
17995 }
17996 validate_semantic_json(&field.value)?;
17997 }
17998 Ok(())
17999 }
18000 JsonValue::Null | JsonValue::Bool(_) | JsonValue::String(_) => Ok(()),
18001 }
18002}
18003#[cfg(test)]
18004mod tests {
18005 use super::*;
18006 fn assert_fixture<T>(value: &serde_json::Value) -> Result<(), Box<dyn std::error::Error>>
18007 where
18008 T: serde::de::DeserializeOwned + Serialize,
18009 {
18010 let decoded: T = serde_json::from_value(value.clone())?;
18011 assert_eq!(serde_json::to_value(decoded)?, *value);
18012 Ok(())
18013 }
18014 #[test]
18015 fn every_named_type_has_a_canonical_round_trip_fixture() -> Result<(), Box<dyn std::error::Error>> {
18016 let document: serde_json::Value =
18017 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
18018 assert_eq!(document["spec_sha256"], LODESTONE_API_SPEC_SHA256);
18019 let fixtures = document["named_types"]
18020 .as_object()
18021 .ok_or("named type fixtures are not an object")?;
18022 assert_eq!(fixtures.len(), LODESTONE_API_TYPE_CONTRACTS.len());
18023 for (name, value) in fixtures {
18024 match name.as_str() {
18025 "cursor" => assert_fixture::<Cursor>(value)?,
18026 "locator" => assert_fixture::<Locator>(value)?,
18027 "resource" => assert_fixture::<Resource>(value)?,
18028 "read_cut_kind" => assert_fixture::<ReadCutKind>(value)?,
18029 "read_cut_index_evidence" => assert_fixture::<ReadCutIndexEvidence>(value)?,
18030 "read_cut_evidence" => assert_fixture::<ReadCutEvidence>(value)?,
18031 "logical_occupancy_counts" => assert_fixture::<LogicalOccupancyCounts>(value)?,
18032 "logical_occupancy_gap_state" => assert_fixture::<LogicalOccupancyGapState>(value)?,
18033 "logical_occupancy_snapshot_evidence" => assert_fixture::<LogicalOccupancySnapshotEvidence>(value)?,
18034 "logical_occupancy_window_gap" => assert_fixture::<LogicalOccupancyWindowGap>(value)?,
18035 "field_promotion_configuration" => assert_fixture::<FieldPromotionConfiguration>(value)?,
18036 "overload_configuration" => assert_fixture::<OverloadConfiguration>(value)?,
18037 "index_policies" => assert_fixture::<IndexPolicies>(value)?,
18038 "maintenance_budgets" => assert_fixture::<MaintenanceBudgets>(value)?,
18039 "resource_durability_class" => assert_fixture::<ResourceDurabilityClass>(value)?,
18040 "resource_storage_class" => assert_fixture::<ResourceStorageClass>(value)?,
18041 "vector_quality_objective" => assert_fixture::<VectorQualityObjective>(value)?,
18042 "vector_indexing_objective" => assert_fixture::<VectorIndexingObjective>(value)?,
18043 "vector_residency_intent" => assert_fixture::<VectorResidencyIntent>(value)?,
18044 "vector_calibration_binding" => assert_fixture::<VectorCalibrationBinding>(value)?,
18045 "vector_resource_policy" => assert_fixture::<VectorResourcePolicy>(value)?,
18046 "workload_class" => assert_fixture::<WorkloadClass>(value)?,
18047 "index_resource_spec" => assert_fixture::<IndexResourceSpec>(value)?,
18048 "index_summary" => assert_fixture::<IndexSummary>(value)?,
18049 "mapping_mode" => assert_fixture::<MappingMode>(value)?,
18050 "dynamic_mapping_policy" => assert_fixture::<DynamicMappingPolicy>(value)?,
18051 "mapping_analyzer" => assert_fixture::<MappingAnalyzer>(value)?,
18052 "keyword_normalizer" => assert_fixture::<KeywordNormalizer>(value)?,
18053 "vector_metric" => assert_fixture::<VectorMetric>(value)?,
18054 "mapping_scalar" => assert_fixture::<MappingScalar>(value)?,
18055 "sparse_vector_weight_type" => assert_fixture::<SparseVectorWeightType>(value)?,
18056 "mapping_field_type" => assert_fixture::<MappingFieldType>(value)?,
18057 "mapping_field" => assert_fixture::<MappingField>(value)?,
18058 "multi_field_projection" => assert_fixture::<MultiFieldProjection>(value)?,
18059 "analyzer_identity" => assert_fixture::<AnalyzerIdentity>(value)?,
18060 "keyword_limit" => assert_fixture::<KeywordLimit>(value)?,
18061 "profile_privacy_action" => assert_fixture::<ProfilePrivacyAction>(value)?,
18062 "profile_privacy_field" => assert_fixture::<ProfilePrivacyField>(value)?,
18063 "profile_privacy_rule" => assert_fixture::<ProfilePrivacyRule>(value)?,
18064 "profile_privacy_policy" => assert_fixture::<ProfilePrivacyPolicy>(value)?,
18065 "mapping_record_model" => assert_fixture::<MappingRecordModel>(value)?,
18066 "mapping" => assert_fixture::<Mapping>(value)?,
18067 "index_detail" => assert_fixture::<IndexDetail>(value)?,
18068 "source_provider" => assert_fixture::<SourceProvider>(value)?,
18069 "source_decoder" => assert_fixture::<SourceDecoder>(value)?,
18070 "source_replay_guarantees" => assert_fixture::<SourceReplayGuarantees>(value)?,
18071 "source_partition_configuration" => assert_fixture::<SourcePartitionConfiguration>(value)?,
18072 "replayable_source_configuration" => assert_fixture::<ReplayableSourceConfiguration>(value)?,
18073 "source_partition_status" => assert_fixture::<SourcePartitionStatus>(value)?,
18074 "replayable_source_status" => assert_fixture::<ReplayableSourceStatus>(value)?,
18075 "source_control_transition" => assert_fixture::<SourceControlTransition>(value)?,
18076 "history_ledger_precondition" => assert_fixture::<HistoryLedgerPrecondition>(value)?,
18077 "history_retention_policy" => assert_fixture::<HistoryRetentionPolicy>(value)?,
18078 "history_selector" => assert_fixture::<HistorySelector>(value)?,
18079 "history_hold" => assert_fixture::<HistoryHold>(value)?,
18080 "history_status" => assert_fixture::<HistoryStatus>(value)?,
18081 "history_resolution" => assert_fixture::<HistoryResolution>(value)?,
18082 "index_reference" => assert_fixture::<IndexReference>(value)?,
18083 "alias_target" => assert_fixture::<AliasTarget>(value)?,
18084 "alias_summary" => assert_fixture::<AliasSummary>(value)?,
18085 "alias_detail" => assert_fixture::<AliasDetail>(value)?,
18086 "data_stream_summary" => assert_fixture::<DataStreamSummary>(value)?,
18087 "component_template_binding" => assert_fixture::<ComponentTemplateBinding>(value)?,
18088 "index_template_binding" => assert_fixture::<IndexTemplateBinding>(value)?,
18089 "lifecycle_policy_binding" => assert_fixture::<LifecyclePolicyBinding>(value)?,
18090 "data_stream_detail" => assert_fixture::<DataStreamDetail>(value)?,
18091 "component_template_summary" => assert_fixture::<ComponentTemplateSummary>(value)?,
18092 "component_template_detail" => assert_fixture::<ComponentTemplateDetail>(value)?,
18093 "index_template_summary" => assert_fixture::<IndexTemplateSummary>(value)?,
18094 "index_template_detail" => assert_fixture::<IndexTemplateDetail>(value)?,
18095 "ingest_pipeline_summary" => assert_fixture::<IngestPipelineSummary>(value)?,
18096 "ingest_pipeline_detail" => assert_fixture::<IngestPipelineDetail>(value)?,
18097 "ingest_pipeline_selection" => assert_fixture::<IngestPipelineSelection>(value)?,
18098 "lifecycle_policy_summary" => assert_fixture::<LifecyclePolicySummary>(value)?,
18099 "rollover_thresholds" => assert_fixture::<RolloverThresholds>(value)?,
18100 "retention_policy" => assert_fixture::<RetentionPolicy>(value)?,
18101 "lifecycle_policy_detail" => assert_fixture::<LifecyclePolicyDetail>(value)?,
18102 "text_query_operator" => assert_fixture::<TextQueryOperator>(value)?,
18103 "text_query_analyzer" => assert_fixture::<TextQueryAnalyzer>(value)?,
18104 "zero_terms_query" => assert_fixture::<ZeroTermsQuery>(value)?,
18105 "text_query_options" => assert_fixture::<TextQueryOptions>(value)?,
18106 "multi_match_mode" => assert_fixture::<MultiMatchMode>(value)?,
18107 "multi_match_field" => assert_fixture::<MultiMatchField>(value)?,
18108 "multi_match_options" => assert_fixture::<MultiMatchOptions>(value)?,
18109 "sort_order" => assert_fixture::<SortOrder>(value)?,
18110 "sort_mode" => assert_fixture::<SortMode>(value)?,
18111 "missing_order" => assert_fixture::<MissingOrder>(value)?,
18112 "nested_score_mode" => assert_fixture::<NestedScoreMode>(value)?,
18113 "nested_inner_hits" => assert_fixture::<NestedInnerHits>(value)?,
18114 "sort_spec" => assert_fixture::<SortSpec>(value)?,
18115 "query" => assert_fixture::<Query>(value)?,
18116 "dense_retrieval_mode" => assert_fixture::<DenseRetrievalMode>(value)?,
18117 "vector_achieved_mode" => assert_fixture::<VectorAchievedMode>(value)?,
18118 "vector_branch_diagnostics" => assert_fixture::<VectorBranchDiagnostics>(value)?,
18119 "dense_vector_element_type" => assert_fixture::<DenseVectorElementType>(value)?,
18120 "dense_vector_byte_order" => assert_fixture::<DenseVectorByteOrder>(value)?,
18121 "vector_value" => assert_fixture::<VectorValue>(value)?,
18122 "sparse_vector_entry" => assert_fixture::<SparseVectorEntry>(value)?,
18123 "sparse_vector_value" => assert_fixture::<SparseVectorValue>(value)?,
18124 "vector_set_value" => assert_fixture::<VectorSetValue>(value)?,
18125 "vector_evaluation_snapshot" => assert_fixture::<VectorEvaluationSnapshot>(value)?,
18126 "vector_evaluation_query_set" => assert_fixture::<VectorEvaluationQuerySet>(value)?,
18127 "vector_evaluation_budget" => assert_fixture::<VectorEvaluationBudget>(value)?,
18128 "vector_candidate_policy" => assert_fixture::<VectorCandidatePolicy>(value)?,
18129 "vector_calibration_objective" => assert_fixture::<VectorCalibrationObjective>(value)?,
18130 "vector_strategy_profile" => assert_fixture::<VectorStrategyProfile>(value)?,
18131 "vector_evaluation_work" => assert_fixture::<VectorEvaluationWork>(value)?,
18132 "vector_evaluation_error_code" => assert_fixture::<VectorEvaluationErrorCode>(value)?,
18133 "vector_evaluation_error" => assert_fixture::<VectorEvaluationError>(value)?,
18134 "vector_recall_result" => assert_fixture::<VectorRecallResult>(value)?,
18135 "vector_calibration_candidate" => assert_fixture::<VectorCalibrationCandidate>(value)?,
18136 "vector_calibration_result" => assert_fixture::<VectorCalibrationResult>(value)?,
18137 "vector_diagnostic_result" => assert_fixture::<VectorDiagnosticResult>(value)?,
18138 "vector_warm_component" => assert_fixture::<VectorWarmComponent>(value)?,
18139 "vector_warm_state" => assert_fixture::<VectorWarmState>(value)?,
18140 "vector_warm_achievement" => assert_fixture::<VectorWarmAchievement>(value)?,
18141 "vector_warm_result" => assert_fixture::<VectorWarmResult>(value)?,
18142 "dense_retrieval_threshold" => assert_fixture::<DenseRetrievalThreshold>(value)?,
18143 "retrieval_branch" => assert_fixture::<RetrievalBranch>(value)?,
18144 "weighted_rrf_fusion" => assert_fixture::<WeightedRrfFusion>(value)?,
18145 "retrieval_plan" => assert_fixture::<RetrievalPlan>(value)?,
18146 "histogram_bounds" => assert_fixture::<HistogramBounds>(value)?,
18147 "date_histogram_bounds" => assert_fixture::<DateHistogramBounds>(value)?,
18148 "approximation_algorithm" => assert_fixture::<ApproximationAlgorithm>(value)?,
18149 "approximation" => assert_fixture::<Approximation>(value)?,
18150 "percentile_value" => assert_fixture::<PercentileValue>(value)?,
18151 "approximate_percentile_value" => assert_fixture::<ApproximatePercentileValue>(value)?,
18152 "time_series_operator" => assert_fixture::<TimeSeriesOperator>(value)?,
18153 "time_series_missing_data" => assert_fixture::<TimeSeriesMissingData>(value)?,
18154 "time_series_quantile_mode" => assert_fixture::<TimeSeriesQuantileMode>(value)?,
18155 "time_series_bucket_state" => assert_fixture::<TimeSeriesBucketState>(value)?,
18156 "time_series_quantile_value" => assert_fixture::<TimeSeriesQuantileValue>(value)?,
18157 "time_series_value" => assert_fixture::<TimeSeriesValue>(value)?,
18158 "time_series_bucket" => assert_fixture::<TimeSeriesBucket>(value)?,
18159 "relationship_traversal_direction" => assert_fixture::<RelationshipTraversalDirection>(value)?,
18160 "relationship_traversal_filter" => assert_fixture::<RelationshipTraversalFilter>(value)?,
18161 "relationship_traversal_budget" => assert_fixture::<RelationshipTraversalBudget>(value)?,
18162 "traversed_relationship" => assert_fixture::<TraversedRelationship>(value)?,
18163 "profile_query_operation" => assert_fixture::<ProfileQueryOperation>(value)?,
18164 "profile_group_by" => assert_fixture::<ProfileGroupBy>(value)?,
18165 "profile_query_filter" => assert_fixture::<ProfileQueryFilter>(value)?,
18166 "profile_query_budget" => assert_fixture::<ProfileQueryBudget>(value)?,
18167 "profile_query_row" => assert_fixture::<ProfileQueryRow>(value)?,
18168 "temporal_input" => assert_fixture::<TemporalInput>(value)?,
18169 "temporal_pattern" => assert_fixture::<TemporalPattern>(value)?,
18170 "historical_temporal_definition" => assert_fixture::<HistoricalTemporalDefinition>(value)?,
18171 "temporal_evidence_status" => assert_fixture::<TemporalEvidenceStatus>(value)?,
18172 "temporal_source_event" => assert_fixture::<TemporalSourceEvent>(value)?,
18173 "temporal_evidence" => assert_fixture::<TemporalEvidence>(value)?,
18174 "continuous_temporal_start" => assert_fixture::<ContinuousTemporalStart>(value)?,
18175 "continuous_temporal_watermark_policy" => assert_fixture::<ContinuousTemporalWatermarkPolicy>(value)?,
18176 "continuous_temporal_late_data_policy" => assert_fixture::<ContinuousTemporalLateDataPolicy>(value)?,
18177 "continuous_temporal_output" => assert_fixture::<ContinuousTemporalOutput>(value)?,
18178 "continuous_temporal_definition" => assert_fixture::<ContinuousTemporalDefinition>(value)?,
18179 "continuous_temporal_frontier" => assert_fixture::<ContinuousTemporalFrontier>(value)?,
18180 "continuous_temporal_available_frontier" => {
18181 assert_fixture::<ContinuousTemporalAvailableFrontier>(value)?
18182 }
18183 "continuous_temporal_gap_reason" => assert_fixture::<ContinuousTemporalGapReason>(value)?,
18184 "continuous_temporal_gap" => assert_fixture::<ContinuousTemporalGap>(value)?,
18185 "continuous_temporal_evaluation" => assert_fixture::<ContinuousTemporalEvaluation>(value)?,
18186 "composite_order" => assert_fixture::<CompositeOrder>(value)?,
18187 "composite_source" => assert_fixture::<CompositeSource>(value)?,
18188 "aggregation" => assert_fixture::<Aggregation>(value)?,
18189 "nested_search_hit" => assert_fixture::<NestedSearchHit>(value)?,
18190 "named_nested_inner_hits_result" => assert_fixture::<NamedNestedInnerHitsResult>(value)?,
18191 "fragment_boundary" => assert_fixture::<FragmentBoundary>(value)?,
18192 "fragment_offset_encoding" => assert_fixture::<FragmentOffsetEncoding>(value)?,
18193 "fragment_ranker" => assert_fixture::<FragmentRanker>(value)?,
18194 "fragment_request" => assert_fixture::<FragmentRequest>(value)?,
18195 "search_fragment" => assert_fixture::<SearchFragment>(value)?,
18196 "numeric_feature_transform" => assert_fixture::<NumericFeatureTransform>(value)?,
18197 "numeric_result_feature" => assert_fixture::<NumericResultFeature>(value)?,
18198 "result_feature_request" => assert_fixture::<ResultFeatureRequest>(value)?,
18199 "result_diversification" => assert_fixture::<ResultDiversification>(value)?,
18200 "source_projection" => assert_fixture::<SourceProjection>(value)?,
18201 "branch_score_kind" => assert_fixture::<BranchScoreKind>(value)?,
18202 "result_feature" => assert_fixture::<ResultFeature>(value)?,
18203 "search_hit" => assert_fixture::<SearchHit>(value)?,
18204 "aggregation_bucket" => assert_fixture::<AggregationBucket>(value)?,
18205 "aggregation_result" => assert_fixture::<AggregationResult>(value)?,
18206 "shard_counts" => assert_fixture::<ShardCounts>(value)?,
18207 "total_hits_relation" => assert_fixture::<TotalHitsRelation>(value)?,
18208 "search_total" => assert_fixture::<SearchTotal>(value)?,
18209 "search_execution_freshness" => assert_fixture::<SearchExecutionFreshness>(value)?,
18210 "search_freshness" => assert_fixture::<SearchFreshness>(value)?,
18211 "search_degradation_reason" => assert_fixture::<SearchDegradationReason>(value)?,
18212 "search_achievement" => assert_fixture::<SearchAchievement>(value)?,
18213 "search_failure_stage" => assert_fixture::<SearchFailureStage>(value)?,
18214 "search_failure_reason" => assert_fixture::<SearchFailureReason>(value)?,
18215 "collection_shard" => assert_fixture::<CollectionShard>(value)?,
18216 "search_partial_failure" => assert_fixture::<SearchPartialFailure>(value)?,
18217 "artifact" => assert_fixture::<Artifact>(value)?,
18218 "portability_storage_capability" => assert_fixture::<PortabilityStorageCapability>(value)?,
18219 "collection_export_artifact" => assert_fixture::<CollectionExportArtifact>(value)?,
18220 "collection_transfer_sequence" => assert_fixture::<CollectionTransferSequence>(value)?,
18221 "collection_transfer_artifact" => assert_fixture::<CollectionTransferArtifact>(value)?,
18222 "portability_key_capability_reference_state" => {
18223 assert_fixture::<PortabilityKeyCapabilityReferenceState>(value)?
18224 }
18225 "collection_export_retirement" => assert_fixture::<CollectionExportRetirement>(value)?,
18226 "index_transfer_page" => assert_fixture::<IndexTransferPage>(value)?,
18227 "index_transfer_artifact" => assert_fixture::<IndexTransferArtifact>(value)?,
18228 "search_validation_bound" => assert_fixture::<SearchValidationBound>(value)?,
18229 "search_validation_estimates" => assert_fixture::<SearchValidationEstimates>(value)?,
18230 "search_validation_limit" => assert_fixture::<SearchValidationLimit>(value)?,
18231 "operation_kind" => assert_fixture::<OperationKind>(value)?,
18232 "operation_authority" => assert_fixture::<OperationAuthority>(value)?,
18233 "operation_target" => assert_fixture::<OperationTarget>(value)?,
18234 "operation_state" => assert_fixture::<OperationState>(value)?,
18235 "operation_pending_state" => assert_fixture::<OperationPendingState>(value)?,
18236 "operation_progress_unit" => assert_fixture::<OperationProgressUnit>(value)?,
18237 "operation_progress" => assert_fixture::<OperationProgress>(value)?,
18238 "operation_result" => assert_fixture::<OperationResult>(value)?,
18239 "operation_failure" => assert_fixture::<OperationFailure>(value)?,
18240 "operation_cancellation" => assert_fixture::<OperationCancellation>(value)?,
18241 "operation_retention_state" => assert_fixture::<OperationRetentionState>(value)?,
18242 "operation_retention" => assert_fixture::<OperationRetention>(value)?,
18243 "operation" => assert_fixture::<Operation>(value)?,
18244 "write_durability_boundary" => assert_fixture::<WriteDurabilityBoundary>(value)?,
18245 "write_visibility_mode" => assert_fixture::<WriteVisibilityMode>(value)?,
18246 "write_response_stage" => assert_fixture::<WriteResponseStage>(value)?,
18247 "write_achievement" => assert_fixture::<WriteAchievement>(value)?,
18248 "mutation_commit_position" => assert_fixture::<MutationCommitPosition>(value)?,
18249 "mutation_commit_receipt" => assert_fixture::<MutationCommitReceipt>(value)?,
18250 "mutation_resolver" => assert_fixture::<MutationResolver>(value)?,
18251 "mutation_outcome" => assert_fixture::<MutationOutcome>(value)?,
18252 "submission_state" => assert_fixture::<SubmissionState>(value)?,
18253 "expected_binding" => assert_fixture::<ExpectedBinding>(value)?,
18254 "administration_alias_action" => assert_fixture::<AdministrationAliasAction>(value)?,
18255 "administration_mutation" => assert_fixture::<AdministrationMutation>(value)?,
18256 "administration_outcome" => assert_fixture::<AdministrationOutcome>(value)?,
18257 "index_change_apply_receipt" => assert_fixture::<IndexChangeApplyReceipt>(value)?,
18258 "index_change_resolution_state" => assert_fixture::<IndexChangeResolutionState>(value)?,
18259 "bulk_document_item" => assert_fixture::<BulkDocumentItem>(value)?,
18260 "bulk_document_item_outcome" => assert_fixture::<BulkDocumentItemOutcome>(value)?,
18261 "bulk_document_outcome" => assert_fixture::<BulkDocumentOutcome>(value)?,
18262 "metric_attribute_value" => assert_fixture::<MetricAttributeValue>(value)?,
18263 "metric_attribute" => assert_fixture::<MetricAttribute>(value)?,
18264 "metric_number" => assert_fixture::<MetricNumber>(value)?,
18265 "metric_temporality" => assert_fixture::<MetricTemporality>(value)?,
18266 "metric_point_kind" => assert_fixture::<MetricPointKind>(value)?,
18267 "metric_exponential_buckets" => assert_fixture::<MetricExponentialBuckets>(value)?,
18268 "metric_data" => assert_fixture::<MetricData>(value)?,
18269 "metric_instrumentation_scope" => assert_fixture::<MetricInstrumentationScope>(value)?,
18270 "metric_exemplar" => assert_fixture::<MetricExemplar>(value)?,
18271 "metric_point" => assert_fixture::<MetricPoint>(value)?,
18272 "entity_ref" => assert_fixture::<EntityRef>(value)?,
18273 "relationship_evidence_ref" => assert_fixture::<RelationshipEvidenceRef>(value)?,
18274 "relationship_directionality" => assert_fixture::<RelationshipDirectionality>(value)?,
18275 "relationship_record" => assert_fixture::<RelationshipRecord>(value)?,
18276 "profile_label" => assert_fixture::<ProfileLabel>(value)?,
18277 "profile_sample_type" => assert_fixture::<ProfileSampleType>(value)?,
18278 "profile_mapping" => assert_fixture::<ProfileMapping>(value)?,
18279 "profile_function" => assert_fixture::<ProfileFunction>(value)?,
18280 "profile_line" => assert_fixture::<ProfileLine>(value)?,
18281 "profile_location" => assert_fixture::<ProfileLocation>(value)?,
18282 "profile_stack" => assert_fixture::<ProfileStack>(value)?,
18283 "profile_sample" => assert_fixture::<ProfileSample>(value)?,
18284 "profile_instrumentation_scope" => assert_fixture::<ProfileInstrumentationScope>(value)?,
18285 "profile_batch" => assert_fixture::<ProfileBatch>(value)?,
18286 "native_record" => assert_fixture::<NativeRecord>(value)?,
18287 "retained_append_item" => assert_fixture::<RetainedAppendItem>(value)?,
18288 "retained_append_state" => assert_fixture::<RetainedAppendState>(value)?,
18289 "retained_append_retry_safety" => assert_fixture::<RetainedAppendRetrySafety>(value)?,
18290 "retained_append_item_outcome" => assert_fixture::<RetainedAppendItemOutcome>(value)?,
18291 "retained_append_bulk_outcome" => assert_fixture::<RetainedAppendBulkOutcome>(value)?,
18292 "retained_append_observation_state" => assert_fixture::<RetainedAppendObservationState>(value)?,
18293 "retained_append_observation_outcome" => assert_fixture::<RetainedAppendObservationOutcome>(value)?,
18294 "binary_value" => assert_fixture::<BinaryValue>(value)?,
18295 "state_hash_field" => assert_fixture::<StateHashField>(value)?,
18296 "state_set_entry" => assert_fixture::<StateSetEntry>(value)?,
18297 "state_set_condition" => assert_fixture::<StateSetCondition>(value)?,
18298 "state_operation" => assert_fixture::<StateOperation>(value)?,
18299 "state_optional_value" => assert_fixture::<StateOptionalValue>(value)?,
18300 "state_command_result" => assert_fixture::<StateCommandResult>(value)?,
18301 "state_write_resolution" => assert_fixture::<StateWriteResolution>(value)?,
18302 "service_credential_reservation" => assert_fixture::<ServiceCredentialReservation>(value)?,
18303 "subscription_metadata_field" => assert_fixture::<SubscriptionMetadataField>(value)?,
18304 "subscription_field" => assert_fixture::<SubscriptionField>(value)?,
18305 "subscription_filter" => assert_fixture::<SubscriptionFilter>(value)?,
18306 "subscription_cursor_entry" => assert_fixture::<SubscriptionCursorEntry>(value)?,
18307 "subscription_route" => assert_fixture::<SubscriptionRoute>(value)?,
18308 "subscription_start_position" => assert_fixture::<SubscriptionStartPosition>(value)?,
18309 "subscription_start" => assert_fixture::<SubscriptionStart>(value)?,
18310 "subscription_accepted" => assert_fixture::<SubscriptionAccepted>(value)?,
18311 "subscription_writer_fence" => assert_fixture::<SubscriptionWriterFence>(value)?,
18312 "subscription_event" => assert_fixture::<SubscriptionEvent>(value)?,
18313 "subscription_heartbeat" => assert_fixture::<SubscriptionHeartbeat>(value)?,
18314 "subscription_gap" => assert_fixture::<SubscriptionGap>(value)?,
18315 "subscription_terminal_reason" => assert_fixture::<SubscriptionTerminalReason>(value)?,
18316 "subscription_terminal" => assert_fixture::<SubscriptionTerminal>(value)?,
18317 "subscription_frame" => assert_fixture::<SubscriptionFrame>(value)?,
18318 "stream_binding" => assert_fixture::<StreamBinding>(value)?,
18319 "capability_grant" => assert_fixture::<CapabilityGrant>(value)?,
18320 "protocol_limit" => assert_fixture::<ProtocolLimit>(value)?,
18321 "document_mutation_condition" => assert_fixture::<DocumentMutationCondition>(value)?,
18322 "audit_adapter" => assert_fixture::<AuditAdapter>(value)?,
18323 "audit_decision" => assert_fixture::<AuditDecision>(value)?,
18324 "audit_outcome" => assert_fixture::<AuditOutcome>(value)?,
18325 "audit_detail" => assert_fixture::<AuditDetail>(value)?,
18326 "audit_gap_reason" => assert_fixture::<AuditGapReason>(value)?,
18327 "audit_event" => assert_fixture::<AuditEvent>(value)?,
18328 "audit_gap" => assert_fixture::<AuditGap>(value)?,
18329 "audit_stream_state" => assert_fixture::<AuditStreamState>(value)?,
18330 "service_credential_grant" => assert_fixture::<ServiceCredentialGrant>(value)?,
18331 "service_credential_summary" => assert_fixture::<ServiceCredentialSummary>(value)?,
18332 "security_role" => assert_fixture::<SecurityRole>(value)?,
18333 "role_append_scope_change" => assert_fixture::<RoleAppendScopeChange>(value)?,
18334 "role_append_access_preparation" => assert_fixture::<RoleAppendAccessPreparation>(value)?,
18335 "security_action_outcome" => assert_fixture::<SecurityActionOutcome>(value)?,
18336 "maintenance_work_state" => assert_fixture::<MaintenanceWorkState>(value)?,
18337 "maintenance_attempt_state" => assert_fixture::<MaintenanceAttemptState>(value)?,
18338 "maintenance_failure_class" => assert_fixture::<MaintenanceFailureClass>(value)?,
18339 "maintenance_failure_class_count" => assert_fixture::<MaintenanceFailureClassCount>(value)?,
18340 "maintenance_attempt_observation" => assert_fixture::<MaintenanceAttemptObservation>(value)?,
18341 "maintenance_task_scope" => assert_fixture::<MaintenanceTaskScope>(value)?,
18342 "maintenance_task_status" => assert_fixture::<MaintenanceTaskStatus>(value)?,
18343 "maintenance_status_aggregate" => assert_fixture::<MaintenanceStatusAggregate>(value)?,
18344 "runtime_status_detail" => assert_fixture::<RuntimeStatusDetail>(value)?,
18345 "result_cache_status" => assert_fixture::<ResultCacheStatus>(value)?,
18346 "field_promotion_status" => assert_fixture::<FieldPromotionStatus>(value)?,
18347 "overload_shard_status" => assert_fixture::<OverloadShardStatus>(value)?,
18348 "external_key_binding" => assert_fixture::<ExternalKeyBinding>(value)?,
18349 "rollup_measure" => assert_fixture::<RollupMeasure>(value)?,
18350 "aggregate_then_delete_policy" => assert_fixture::<AggregateThenDeletePolicy>(value)?,
18351 "lifecycle_binding_status" => assert_fixture::<LifecycleBindingStatus>(value)?,
18352 "lifecycle_rollup_status" => assert_fixture::<LifecycleRollupStatus>(value)?,
18353 "lifecycle_status" => assert_fixture::<LifecycleStatus>(value)?,
18354 "quota_limit" => assert_fixture::<QuotaLimit>(value)?,
18355 "quota_consumption" => assert_fixture::<QuotaConsumption>(value)?,
18356 "quota_update" => assert_fixture::<QuotaUpdate>(value)?,
18357 "storage_overall_posture" => assert_fixture::<StorageOverallPosture>(value)?,
18358 "storage_profile_role" => assert_fixture::<StorageProfileRole>(value)?,
18359 "storage_provider_posture" => assert_fixture::<StorageProviderPosture>(value)?,
18360 "storage_backend_service_class" => assert_fixture::<StorageBackendServiceClass>(value)?,
18361 "storage_profile_role_binding" => assert_fixture::<StorageProfileRoleBinding>(value)?,
18362 "storage_profile_attestation" => assert_fixture::<StorageProfileAttestation>(value)?,
18363 "storage_profile_expectation" => assert_fixture::<StorageProfileExpectation>(value)?,
18364 "core_binding" => assert_fixture::<CoreBinding>(value)?,
18365 "readiness_observation" => assert_fixture::<ReadinessObservation>(value)?,
18366 "usage_dimension" => assert_fixture::<UsageDimension>(value)?,
18367 "physical_usage_value" => assert_fixture::<PhysicalUsageValue>(value)?,
18368 "core_usage_units" => assert_fixture::<CoreUsageUnits>(value)?,
18369 "core_usage_correction" => assert_fixture::<CoreUsageCorrection>(value)?,
18370 "response_meta" => assert_fixture::<ResponseMeta>(value)?,
18371 "error_disposition" => assert_fixture::<ErrorDisposition>(value)?,
18372 "recovery_action" => assert_fixture::<RecoveryAction>(value)?,
18373 "limit_class" => assert_fixture::<LimitClass>(value)?,
18374 "error_detail" => assert_fixture::<ErrorDetail>(value)?,
18375 "connection_profile" => assert_fixture::<ConnectionProfile>(value)?,
18376 _ => return Err("fixture names an unknown generated type".into()),
18377 }
18378 }
18379 Ok(())
18380 }
18381 #[test]
18382 fn every_aggregation_variant_has_a_canonical_fixture() -> Result<(), Box<dyn std::error::Error>> {
18383 let document: serde_json::Value =
18384 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
18385 let fixtures = document["aggregation_variants"]
18386 .as_object()
18387 .ok_or("aggregation fixtures are not an object")?;
18388 assert_eq!(fixtures.len(), 17);
18389 for value in fixtures.values() {
18390 assert_fixture::<Aggregation>(value)?;
18391 }
18392 Ok(())
18393 }
18394 #[test]
18395 fn every_versioned_union_variant_has_a_canonical_fixture() -> Result<(), Box<dyn std::error::Error>> {
18396 let document: serde_json::Value =
18397 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
18398 let fixtures = document["versioned_union_variants"]
18399 .as_object()
18400 .ok_or("versioned union fixtures are not an object")?;
18401 assert_eq!(fixtures.len(), 6);
18402 for (name, value) in fixtures {
18403 match name.as_str() {
18404 "mapping_field_type.vector" => assert_fixture::<MappingFieldType>(value)?,
18405 "mapping_field_type.sparse_vector" => assert_fixture::<MappingFieldType>(value)?,
18406 "mapping_field_type.vector_set" => assert_fixture::<MappingFieldType>(value)?,
18407 "mapping_record_model.metric_v1" => assert_fixture::<MappingRecordModel>(value)?,
18408 "mapping_record_model.relationship_v1" => assert_fixture::<MappingRecordModel>(value)?,
18409 "mapping_record_model.profile_v1" => assert_fixture::<MappingRecordModel>(value)?,
18410 _ => return Err("fixture names an unknown versioned union variant".into()),
18411 }
18412 }
18413 Ok(())
18414 }
18415 #[test]
18416 fn exact_scalar_canonicality_is_closed() {
18417 assert_eq!(
18418 U64 {
18419 value: u64::MAX.to_string()
18420 }
18421 .validate(),
18422 Ok(())
18423 );
18424 assert_eq!(
18425 I64 {
18426 value: i64::MIN.to_string()
18427 }
18428 .validate(),
18429 Ok(())
18430 );
18431 assert_eq!(U64 { value: "01".to_owned() }.validate(), Err(ScalarError::InvalidU64));
18432 assert_eq!(
18433 ExactDecimal {
18434 coefficient: "12345".to_owned(),
18435 scale: 2
18436 }
18437 .validate(),
18438 Ok(())
18439 );
18440 assert_eq!(
18441 ExactDecimal {
18442 coefficient: "123450".to_owned(),
18443 scale: 3
18444 }
18445 .validate(),
18446 Err(ScalarError::InvalidDecimal)
18447 );
18448 assert_eq!(
18449 ExactDecimal {
18450 coefficient: "1".to_owned(),
18451 scale: 1_025
18452 }
18453 .validate(),
18454 Err(ScalarError::InvalidDecimal)
18455 );
18456 }
18457 #[test]
18458 fn scalar_decoders_refuse_numbers_and_noncanonical_strings() {
18459 assert!(serde_json::from_str::<U64>("9007199254740993").is_err());
18460 assert!(serde_json::from_str::<U64>(r#""01""#).is_err());
18461 assert!(serde_json::from_str::<Identity>(r#""0123456789ABCDEF0123456789ABCDEF""#).is_err());
18462 assert!(serde_json::from_str::<Digest>(r#""0123456789abcdef0123456789abcdef""#).is_err());
18463 assert!(serde_json::from_str::<ExactDecimal>(r#"{"coefficient":"123450","scale":3}"#).is_err());
18464 assert!(serde_json::from_str::<ApproximateNumber>(r#""1.0""#).is_err());
18465 }
18466 #[test]
18467 fn semantic_json_rejects_duplicate_fields() {
18468 let value = JsonValue::Object(vec![
18469 JsonField {
18470 name: "x".to_owned(),
18471 value: JsonValue::Null,
18472 },
18473 JsonField {
18474 name: "x".to_owned(),
18475 value: JsonValue::Bool(true),
18476 },
18477 ]);
18478 assert_eq!(validate_semantic_json(&value), Err(JsonError::DuplicateObjectField));
18479 }
18480 #[test]
18481 fn strict_generated_shapes_refuse_malformed_duplicate_unknown_field_and_tag() {
18482 assert!(serde_json::from_str::<DiscoverRequest>(r#"{"unexpected":true}"#).is_err());
18483 assert!(serde_json::from_str::<Cursor>(r#"{"value":"a","value":"b"}"#).is_err());
18484 assert!(serde_json::from_str::<Query>(r#"{"kind":"future_query"}"#).is_err());
18485 assert!(serde_json::from_str::<Cursor>(r#"{"value":1}"#).is_err());
18486 }
18487 fn admitted_error_detail(code: ErrorCode) -> ErrorDetail {
18488 match code {
18489 ErrorCode::Aborted => ErrorDetail::Aborted {
18490 reason: "test".to_owned(),
18491 },
18492 ErrorCode::DeadlineExceeded => ErrorDetail::DeadlineExceeded,
18493 ErrorCode::InvalidRequest => ErrorDetail::InvalidRequest {
18494 field: None,
18495 reason: "test".to_owned(),
18496 },
18497 ErrorCode::UnsupportedVersion => ErrorDetail::UnsupportedVersion {
18498 observed: 1,
18499 maximum_supported: 1,
18500 },
18501 ErrorCode::Unauthenticated => ErrorDetail::Unauthenticated,
18502 ErrorCode::PermissionDenied => ErrorDetail::PermissionDenied {
18503 action: None,
18504 workload_class: None,
18505 },
18506 ErrorCode::NotFound => ErrorDetail::NotFound { resource: None },
18507 ErrorCode::Conflict => ErrorDetail::Conflict {
18508 expected_revision: None,
18509 observed_revision: None,
18510 },
18511 ErrorCode::StaleCursor => ErrorDetail::StaleCursor { restart_count: 0 },
18512 ErrorCode::RestartBudgetExhausted => ErrorDetail::RestartBudgetExhausted { maximum_restarts: 0 },
18513 ErrorCode::LimitExceeded => ErrorDetail::LimitExceeded {
18514 class: LimitClass::RequestBound,
18515 limit_id: "test".to_owned(),
18516 maximum: U64 { value: "0".to_owned() },
18517 },
18518 ErrorCode::CapabilityUnavailable => ErrorDetail::CapabilityUnavailable { capability: None },
18519 ErrorCode::NotSubmitted => ErrorDetail::NotSubmitted {
18520 retry_after_millis: None,
18521 },
18522 ErrorCode::SubmittedIndeterminate => ErrorDetail::SubmittedIndeterminate { locator: None },
18523 ErrorCode::ExpiredUnknown => ErrorDetail::ExpiredUnknown { locator: None },
18524 ErrorCode::SecretNotEscrowed => ErrorDetail::SecretNotEscrowed,
18525 ErrorCode::RetentionGap => ErrorDetail::RetentionGap {
18526 retired_through: U64 { value: "0".to_owned() },
18527 },
18528 ErrorCode::ArtifactRangeInvalid => ErrorDetail::ArtifactRangeInvalid {
18529 maximum_bytes: U64 { value: "0".to_owned() },
18530 },
18531 ErrorCode::ChecksumMismatch => ErrorDetail::ChecksumMismatch {
18532 expected: Digest { value: "0".repeat(64) },
18533 observed: Digest { value: "0".repeat(64) },
18534 },
18535 ErrorCode::TemporarilyUnavailable => ErrorDetail::TemporarilyUnavailable {
18536 retry_after_millis: None,
18537 },
18538 ErrorCode::Internal => ErrorDetail::Internal,
18539 }
18540 }
18541 #[test]
18542 fn every_admitted_error_outcome_is_constructible_and_invalid_combinations_fail_closed() {
18543 let mut codes = std::collections::BTreeSet::new();
18544 for contract in LODESTONE_API_ERROR_OUTCOMES {
18545 codes.insert(format!("{:?}", contract.code));
18546 assert_eq!(
18547 ErrorBody::try_new(
18548 contract.code,
18549 "test".to_owned(),
18550 contract.disposition,
18551 contract.recovery,
18552 admitted_error_detail(contract.code)
18553 ),
18554 Ok(ErrorBody {
18555 code: contract.code,
18556 message: "test".to_owned(),
18557 disposition: contract.disposition,
18558 recovery: contract.recovery,
18559 details: admitted_error_detail(contract.code)
18560 })
18561 );
18562 }
18563 assert_eq!(codes.len(), 21);
18564 assert_eq!(
18565 ErrorBody::try_new(
18566 ErrorCode::Aborted,
18567 "test".to_owned(),
18568 ErrorDisposition::NotSubmitted,
18569 RecoveryAction::Stop,
18570 admitted_error_detail(ErrorCode::Aborted)
18571 ),
18572 Err(ErrorShapeError::OutcomeMismatch)
18573 );
18574 assert_eq!(
18575 ErrorBody::try_new(
18576 ErrorCode::Aborted,
18577 "test".to_owned(),
18578 ErrorDisposition::NotSubmitted,
18579 RecoveryAction::Retry,
18580 ErrorDetail::Internal
18581 ),
18582 Err(ErrorShapeError::DetailCodeMismatch)
18583 );
18584 assert_eq!(
18585 ErrorBody::try_new(
18586 ErrorCode::TemporarilyUnavailable,
18587 "test".to_owned(),
18588 ErrorDisposition::NotSubmitted,
18589 RecoveryAction::RetryAfter,
18590 ErrorDetail::TemporarilyUnavailable {
18591 retry_after_millis: Some(U64 {
18592 value: "60001".to_owned()
18593 })
18594 }
18595 ),
18596 Err(ErrorShapeError::RetryAfterOutOfRange)
18597 );
18598 }
18599 #[test]
18600 fn registries_match_the_idl() {
18601 assert_eq!(LODESTONE_API_COMMAND_CONTRACTS.len(), 131);
18602 assert_eq!(LODESTONE_API_COMMAND_SEMANTICS.len(), 131);
18603 assert_eq!(LODESTONE_API_COMMAND_OUTCOMES.len(), 131);
18604 assert_eq!(LODESTONE_API_ERROR_CODES.len(), 21);
18605 assert_eq!(LODESTONE_API_ERROR_OUTCOMES.len(), 28);
18606 assert_eq!(LODESTONE_API_TYPE_CONTRACTS.len(), 347);
18607 assert_eq!(LODESTONE_API_STREAM_CONTRACTS.len(), 1);
18608 assert_eq!(LODESTONE_API_LIMITS.len(), 118);
18609 assert_eq!(LODESTONE_API_CLUSTER_CONTROL_ACTIONS.len(), 23);
18610 assert_eq!(LODESTONE_API_CLUSTER_CONTROL_TYPES.len(), 11);
18611 }
18612 #[test]
18613 fn mutation_outcome_metadata_matches_submission_boundaries() {
18614 for (command, outcome) in LODESTONE_API_COMMAND_CONTRACTS
18615 .iter()
18616 .zip(LODESTONE_API_COMMAND_OUTCOMES)
18617 {
18618 assert_eq!(command.command, outcome.command);
18619 let submits = !matches!(command.mutation, "read_only" | "read_only_prepare" | "catalog_prepare");
18620 assert_eq!(outcome.possible_submission_states.contains(&"submitted"), submits);
18621 assert_eq!(outcome.possible_submission_states.contains(&"indeterminate"), submits);
18622 assert_eq!(
18623 outcome.cancellation == "per_call_until_submission_then_resolve",
18624 submits
18625 );
18626 }
18627 for command in [
18628 Command::ReserveServiceCredential,
18629 Command::ReserveServiceCredentialRotation,
18630 ] {
18631 let outcome = LODESTONE_API_COMMAND_OUTCOMES
18632 .iter()
18633 .find(|outcome| outcome.command == command);
18634 assert!(
18635 matches!(outcome, Some(value) if value.identity_requirement == "caller_action_id" && value.resolver_command == Some(Command::ResolveServiceCredentialReservation))
18636 );
18637 }
18638 }
18639}