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 = "b992cfd83293a37a80becfe252f55a511631a671c89cbfc98ebdf59ec05aec32";
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 CollectionStandbyAdmission,
239 CollectionStandbyActivation,
240 IndexExport,
241 IndexImport,
242}
243
244#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
245#[serde(rename_all = "snake_case")]
246pub enum ErrorCode {
247 Aborted,
248 DeadlineExceeded,
249 InvalidRequest,
250 UnsupportedVersion,
251 Unauthenticated,
252 PermissionDenied,
253 NotFound,
254 Conflict,
255 StaleCursor,
256 RestartBudgetExhausted,
257 LimitExceeded,
258 CapabilityUnavailable,
259 NotSubmitted,
260 SubmittedIndeterminate,
261 ExpiredUnknown,
262 SecretNotEscrowed,
263 RetentionGap,
264 ArtifactRangeInvalid,
265 ChecksumMismatch,
266 TemporarilyUnavailable,
267 Internal,
268}
269
270#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
271#[serde(rename_all = "snake_case")]
272pub enum Command {
273 Discover,
274 ListIndexes,
275 GetIndex,
276 ValidateIndexChange,
277 ApplyIndexChange,
278 ResolveIndexChange,
279 ApplyAdministrationMutation,
280 ListAliases,
281 GetAlias,
282 ListDataStreams,
283 GetDataStream,
284 ListComponentTemplates,
285 GetComponentTemplate,
286 ListIndexTemplates,
287 GetIndexTemplate,
288 ListIngestPipelines,
289 GetIngestPipeline,
290 SimulateIngestPipeline,
291 ReprocessByQuery,
292 ListLifecyclePolicies,
293 GetLifecyclePolicy,
294 PrepareCreateIndex,
295 PrepareDeleteIndex,
296 SubmitCatalogAction,
297 ResolveCatalogAction,
298 PrepareReplayableSourceIndex,
299 SubmitReplayableSourceIndex,
300 GetReplayableSource,
301 ControlReplayableSource,
302 CloneIndex,
303 ConfigureHistory,
304 GetHistory,
305 ResolveHistory,
306 PlaceHistoryHold,
307 ReleaseHistoryHold,
308 PrepareDocumentMutation,
309 SubmitDocumentMutation,
310 PrepareDocumentBulk,
311 SubmitDocumentBulk,
312 ResolveDocumentBulk,
313 PrepareAppendBulk,
314 SubmitAppendBulk,
315 ResolveAppendBulk,
316 ObserveAppendCommitted,
317 ResolveDocumentMutation,
318 GetDocument,
319 Search,
320 TraverseRelationships,
321 QueryProfiles,
322 EvaluateTemporalEvidence,
323 CreateContinuousTemporalEvaluation,
324 GetContinuousTemporalEvaluation,
325 PauseContinuousTemporalEvaluation,
326 ResumeContinuousTemporalEvaluation,
327 ReplaceContinuousTemporalEvaluation,
328 RetireContinuousTemporalEvaluation,
329 ReadContinuousTemporalEvidence,
330 ValidateSearch,
331 MaterializeTableSnapshot,
332 ResolveTableSnapshot,
333 ReadTableSnapshot,
334 OpenPit,
335 RenewPit,
336 ClosePit,
337 ListOperations,
338 GetOperation,
339 WaitOperation,
340 CancelOperation,
341 ListAuditEvents,
342 ExportAuditEvents,
343 ReserveServiceCredential,
344 ReserveServiceCredentialRotation,
345 ActivateServiceCredential,
346 ResolveServiceCredentialReservation,
347 PrepareRevokeServiceCredential,
348 RevokeServiceCredential,
349 ResolveSecurityAction,
350 GetSecurityRole,
351 PrepareRoleAppendAccessChange,
352 SubmitRoleAppendAccessChange,
353 PrepareSourceAuthorizationProjection,
354 SubmitSourceAuthorizationProjection,
355 ResolveSourceAuthorizationProjection,
356 ListServiceCredentials,
357 GetRuntimeStatus,
358 GetResultCacheStatus,
359 GetFieldPromotionStatus,
360 GetOverloadStatus,
361 ConfigureExternalKey,
362 RotateExternalKeyBinding,
363 RetireExternalKeyBinding,
364 ResolveExternalKeyBindingRetirement,
365 ConfigureAggregateThenDelete,
366 GetLifecycleStatus,
367 EraseRecord,
368 ResolveRecordErasure,
369 GetRecordErasure,
370 GetQuota,
371 UpdateQuota,
372 GetBinding,
373 GetAdmissionStatus,
374 SetAdmission,
375 GetQuiesceStatus,
376 GetDecommissionReadiness,
377 GetUpgradeReadiness,
378 GetMaintenanceStatus,
379 WarmVectorIndex,
380 EvaluateVectorRecall,
381 CalibrateVectorStrategy,
382 GetVectorDiagnostic,
383 CreateDiagnostic,
384 GetDiagnostic,
385 PrepareCollectionExport,
386 StartCollectionExport,
387 ResolveCollectionExport,
388 VerifyCollectionExport,
389 PrepareCollectionExportRetirement,
390 StartCollectionExportRetirement,
391 ResolveCollectionExportRetirement,
392 PrepareCollectionRestore,
393 StartCollectionRestore,
394 ResolveCollectionRestore,
395 PrepareCollectionTransferExport,
396 StartCollectionTransferExport,
397 ResolveCollectionTransferExport,
398 PrepareCollectionTransferRestore,
399 StartCollectionTransferRestore,
400 ResolveCollectionTransferRestore,
401 PrepareCollectionStandbyAdmission,
402 StartCollectionStandbyAdmission,
403 ResolveCollectionStandbyAdmission,
404 PrepareCollectionStandbyActivation,
405 StartCollectionStandbyActivation,
406 ResolveCollectionStandbyActivation,
407 PrepareIndexExport,
408 StartIndexExport,
409 ResolveIndexExport,
410 VerifyIndexExport,
411 PrepareIndexImport,
412 StartIndexImport,
413 ResolveIndexImport,
414 ReadArtifactChunk,
415 ExportUsage,
416 GetStorageUsage,
417 ReadLogicalOccupancy,
418 ExecuteStateRead,
419 PrepareStateWrite,
420 SubmitStateWrite,
421 ResolveStateWrite,
422}
423
424pub const LODESTONE_API_ERROR_CODES: &[ErrorCode] = &[
425 ErrorCode::Aborted,
426 ErrorCode::DeadlineExceeded,
427 ErrorCode::InvalidRequest,
428 ErrorCode::UnsupportedVersion,
429 ErrorCode::Unauthenticated,
430 ErrorCode::PermissionDenied,
431 ErrorCode::NotFound,
432 ErrorCode::Conflict,
433 ErrorCode::StaleCursor,
434 ErrorCode::RestartBudgetExhausted,
435 ErrorCode::LimitExceeded,
436 ErrorCode::CapabilityUnavailable,
437 ErrorCode::NotSubmitted,
438 ErrorCode::SubmittedIndeterminate,
439 ErrorCode::ExpiredUnknown,
440 ErrorCode::SecretNotEscrowed,
441 ErrorCode::RetentionGap,
442 ErrorCode::ArtifactRangeInvalid,
443 ErrorCode::ChecksumMismatch,
444 ErrorCode::TemporarilyUnavailable,
445 ErrorCode::Internal,
446];
447
448#[derive(Clone, Copy, Debug, Eq, PartialEq)]
449pub struct ActionAuthorizationContract {
450 pub action: Action,
451 pub any_of_permission_ids: &'static [&'static str],
452}
453pub const LODESTONE_API_ACTION_AUTHORIZATION: &[ActionAuthorizationContract] = &[
454 ActionAuthorizationContract {
455 action: Action::IdentityDiscovery,
456 any_of_permission_ids: &["security_read"],
457 },
458 ActionAuthorizationContract {
459 action: Action::DataRead,
460 any_of_permission_ids: &["data_read"],
461 },
462 ActionAuthorizationContract {
463 action: Action::DataWrite,
464 any_of_permission_ids: &["data_write"],
465 },
466 ActionAuthorizationContract {
467 action: Action::Append,
468 any_of_permission_ids: &["append"],
469 },
470 ActionAuthorizationContract {
471 action: Action::ResolveAppend,
472 any_of_permission_ids: &["resolve_append"],
473 },
474 ActionAuthorizationContract {
475 action: Action::IndexAdmin,
476 any_of_permission_ids: &["index_admin"],
477 },
478 ActionAuthorizationContract {
479 action: Action::CatalogRead,
480 any_of_permission_ids: &["catalog_read"],
481 },
482 ActionAuthorizationContract {
483 action: Action::TaskRead,
484 any_of_permission_ids: &["task_read"],
485 },
486 ActionAuthorizationContract {
487 action: Action::SubscriptionRead,
488 any_of_permission_ids: &["subscription_read"],
489 },
490 ActionAuthorizationContract {
491 action: Action::DiagnosticsRead,
492 any_of_permission_ids: &["diagnostics_read"],
493 },
494 ActionAuthorizationContract {
495 action: Action::DiagnosticsCreate,
496 any_of_permission_ids: &["diagnostics_create"],
497 },
498 ActionAuthorizationContract {
499 action: Action::SecurityRead,
500 any_of_permission_ids: &["security_read"],
501 },
502 ActionAuthorizationContract {
503 action: Action::SecurityAdmin,
504 any_of_permission_ids: &["security_admin"],
505 },
506 ActionAuthorizationContract {
507 action: Action::AuditRead,
508 any_of_permission_ids: &["audit_read"],
509 },
510 ActionAuthorizationContract {
511 action: Action::QuotaRead,
512 any_of_permission_ids: &["quota_read"],
513 },
514 ActionAuthorizationContract {
515 action: Action::QuotaAdmin,
516 any_of_permission_ids: &["quota_admin"],
517 },
518 ActionAuthorizationContract {
519 action: Action::BindingRead,
520 any_of_permission_ids: &["binding_read"],
521 },
522 ActionAuthorizationContract {
523 action: Action::LifecycleAdmin,
524 any_of_permission_ids: &["lifecycle_admin"],
525 },
526 ActionAuthorizationContract {
527 action: Action::AdmissionRead,
528 any_of_permission_ids: &["admission_read"],
529 },
530 ActionAuthorizationContract {
531 action: Action::AdmissionAdmin,
532 any_of_permission_ids: &["admission_admin"],
533 },
534 ActionAuthorizationContract {
535 action: Action::UsageRead,
536 any_of_permission_ids: &["usage_read"],
537 },
538 ActionAuthorizationContract {
539 action: Action::OperationRead,
540 any_of_permission_ids: &[
541 "catalog_read",
542 "task_read",
543 "security_read",
544 "diagnostics_read",
545 "collection_export",
546 "collection_restore",
547 "index_export",
548 "index_import",
549 ],
550 },
551 ActionAuthorizationContract {
552 action: Action::OperationCancel,
553 any_of_permission_ids: &[
554 "index_admin",
555 "task_admin",
556 "security_admin",
557 "diagnostics_create",
558 "collection_export",
559 "index_export",
560 ],
561 },
562 ActionAuthorizationContract {
563 action: Action::CollectionExport,
564 any_of_permission_ids: &["collection_export"],
565 },
566 ActionAuthorizationContract {
567 action: Action::CollectionRestore,
568 any_of_permission_ids: &["collection_restore"],
569 },
570 ActionAuthorizationContract {
571 action: Action::CollectionTransferExport,
572 any_of_permission_ids: &["collection_export"],
573 },
574 ActionAuthorizationContract {
575 action: Action::CollectionTransferRestore,
576 any_of_permission_ids: &["collection_restore"],
577 },
578 ActionAuthorizationContract {
579 action: Action::CollectionStandbyAdmission,
580 any_of_permission_ids: &["collection_restore"],
581 },
582 ActionAuthorizationContract {
583 action: Action::CollectionStandbyActivation,
584 any_of_permission_ids: &["collection_restore"],
585 },
586 ActionAuthorizationContract {
587 action: Action::IndexExport,
588 any_of_permission_ids: &["index_export"],
589 },
590 ActionAuthorizationContract {
591 action: Action::IndexImport,
592 any_of_permission_ids: &["index_import"],
593 },
594];
595pub fn action_authorization(action: Action) -> Option<&'static ActionAuthorizationContract> {
596 LODESTONE_API_ACTION_AUTHORIZATION
597 .iter()
598 .find(|contract| contract.action == action)
599}
600
601#[derive(Clone, Copy, Debug, Eq, PartialEq)]
602pub struct RuntimeCapabilityAuthorizationContract {
603 pub capability_id: &'static str,
604 pub required_permission_ids: &'static [&'static str],
605}
606pub const LODESTONE_API_RUNTIME_CAPABILITY_AUTHORIZATION: &[RuntimeCapabilityAuthorizationContract] = &[
607 RuntimeCapabilityAuthorizationContract {
608 capability_id: "search_and_append_log",
609 required_permission_ids: &["data_read", "data_write"],
610 },
611 RuntimeCapabilityAuthorizationContract {
612 capability_id: "native_metric_records_and_time_series",
613 required_permission_ids: &["data_read", "append"],
614 },
615 RuntimeCapabilityAuthorizationContract {
616 capability_id: "historical_temporal_evidence",
617 required_permission_ids: &["data_read"],
618 },
619 RuntimeCapabilityAuthorizationContract {
620 capability_id: "continuous_temporal_evidence",
621 required_permission_ids: &["data_read", "lifecycle_admin"],
622 },
623 RuntimeCapabilityAuthorizationContract {
624 capability_id: "bounded_relationship_traversal",
625 required_permission_ids: &["data_read", "data_write", "append"],
626 },
627 RuntimeCapabilityAuthorizationContract {
628 capability_id: "native_continuous_profiles",
629 required_permission_ids: &["data_read", "append"],
630 },
631 RuntimeCapabilityAuthorizationContract {
632 capability_id: "committed_vector_and_hybrid",
633 required_permission_ids: &["data_read"],
634 },
635 RuntimeCapabilityAuthorizationContract {
636 capability_id: "realtime_or_pit_vector",
637 required_permission_ids: &["data_read"],
638 },
639 RuntimeCapabilityAuthorizationContract {
640 capability_id: "state_standard_express_ephemeral",
641 required_permission_ids: &["data_read", "data_write"],
642 },
643 RuntimeCapabilityAuthorizationContract {
644 capability_id: "state_relaxed",
645 required_permission_ids: &[],
646 },
647 RuntimeCapabilityAuthorizationContract {
648 capability_id: "bounded_resp",
649 required_permission_ids: &["data_read", "data_write"],
650 },
651 RuntimeCapabilityAuthorizationContract {
652 capability_id: "lodestone_rust_client",
653 required_permission_ids: &[],
654 },
655 RuntimeCapabilityAuthorizationContract {
656 capability_id: "replayable_source_indexes",
657 required_permission_ids: &["index_admin"],
658 },
659 RuntimeCapabilityAuthorizationContract {
660 capability_id: "zero_copy_clones",
661 required_permission_ids: &["index_admin"],
662 },
663 RuntimeCapabilityAuthorizationContract {
664 capability_id: "retained_history",
665 required_permission_ids: &["data_read"],
666 },
667 RuntimeCapabilityAuthorizationContract {
668 capability_id: "generation_result_cache",
669 required_permission_ids: &["data_read"],
670 },
671 RuntimeCapabilityAuthorizationContract {
672 capability_id: "adaptive_field_promotion",
673 required_permission_ids: &["index_admin"],
674 },
675 RuntimeCapabilityAuthorizationContract {
676 capability_id: "durable_overload_buffering",
677 required_permission_ids: &["data_read", "data_write"],
678 },
679 RuntimeCapabilityAuthorizationContract {
680 capability_id: "current_table_reader",
681 required_permission_ids: &["data_read"],
682 },
683 RuntimeCapabilityAuthorizationContract {
684 capability_id: "crypto_shred_and_rollup_lifecycle",
685 required_permission_ids: &["lifecycle_admin"],
686 },
687];
688pub fn runtime_capability_authorization(
689 capability_id: &str,
690) -> Option<&'static RuntimeCapabilityAuthorizationContract> {
691 LODESTONE_API_RUNTIME_CAPABILITY_AUTHORIZATION
692 .iter()
693 .find(|contract| contract.capability_id == capability_id)
694}
695
696#[derive(Clone, Copy, Debug, Eq, PartialEq)]
697pub struct ClusterControlActionContract {
698 pub credential_kind: &'static str,
699 pub action: &'static str,
700}
701pub const LODESTONE_API_CLUSTER_CONTROL_FORMAT_VERSION: u16 = 3;
702pub const LODESTONE_API_CLUSTER_CONTROL_TRANSPORT: &str = "isolated_tls_u32_be_length_then_canonical_json";
703pub const LODESTONE_API_CLUSTER_CONTROL_ACTIONS: &[ClusterControlActionContract] = &[
704 ClusterControlActionContract {
705 credential_kind: "collection_provisioner",
706 action: "initialize_collection_authority",
707 },
708 ClusterControlActionContract {
709 credential_kind: "collection_provisioner",
710 action: "activate_collection_authority",
711 },
712 ClusterControlActionContract {
713 credential_kind: "collection_provisioner",
714 action: "resolve_collection_authority",
715 },
716 ClusterControlActionContract {
717 credential_kind: "collection_provisioner",
718 action: "observe_collection_authority",
719 },
720 ClusterControlActionContract {
721 credential_kind: "collection_provisioner",
722 action: "inspect_collection_retirement",
723 },
724 ClusterControlActionContract {
725 credential_kind: "collection_provisioner",
726 action: "retire_collection_authority",
727 },
728 ClusterControlActionContract {
729 credential_kind: "collection_provisioner",
730 action: "reserve_cluster_control_credential_rotation",
731 },
732 ClusterControlActionContract {
733 credential_kind: "collection_provisioner",
734 action: "activate_cluster_control_credential_rotation",
735 },
736 ClusterControlActionContract {
737 credential_kind: "collection_provisioner",
738 action: "revoke_cluster_control_credential",
739 },
740 ClusterControlActionContract {
741 credential_kind: "collection_provisioner",
742 action: "resolve_cluster_control_credential",
743 },
744 ClusterControlActionContract {
745 credential_kind: "capacity_observer",
746 action: "observe_cluster_capacity",
747 },
748 ClusterControlActionContract {
749 credential_kind: "capacity_observer",
750 action: "observe_resource_diagnostics",
751 },
752 ClusterControlActionContract {
753 credential_kind: "recovery_operator",
754 action: "list_cluster_backups",
755 },
756 ClusterControlActionContract {
757 credential_kind: "recovery_operator",
758 action: "get_cluster_backup",
759 },
760 ClusterControlActionContract {
761 credential_kind: "recovery_operator",
762 action: "create_cluster_backup",
763 },
764 ClusterControlActionContract {
765 credential_kind: "recovery_operator",
766 action: "resolve_cluster_backup",
767 },
768 ClusterControlActionContract {
769 credential_kind: "recovery_operator",
770 action: "delete_cluster_backup",
771 },
772 ClusterControlActionContract {
773 credential_kind: "recovery_operator",
774 action: "resolve_cluster_backup_deletion",
775 },
776 ClusterControlActionContract {
777 credential_kind: "recovery_operator",
778 action: "get_cluster_restore_readiness",
779 },
780 ClusterControlActionContract {
781 credential_kind: "recovery_operator",
782 action: "prepare_offline_recovery",
783 },
784 ClusterControlActionContract {
785 credential_kind: "recovery_operator",
786 action: "reserve_cluster_control_credential_rotation",
787 },
788 ClusterControlActionContract {
789 credential_kind: "recovery_operator",
790 action: "activate_cluster_control_credential_rotation",
791 },
792 ClusterControlActionContract {
793 credential_kind: "recovery_operator",
794 action: "revoke_cluster_control_credential",
795 },
796 ClusterControlActionContract {
797 credential_kind: "recovery_operator",
798 action: "resolve_cluster_control_credential",
799 },
800];
801pub const LODESTONE_API_CLUSTER_CONTROL_TYPES: &[&str] = &[
802 "cluster_control_session",
803 "cluster_control_request",
804 "cluster_control_response",
805 "collection_authority_operation",
806 "collection_authority_observation",
807 "collection_retirement_operation",
808 "collection_retirement_blockers",
809 "core_capacity_observation",
810 "core_resource_diagnostic_page",
811 "cluster_control_credential_rotation",
812 "cluster_backup_operation",
813 "cluster_restore_readiness",
814];
815
816pub const LODESTONE_API_CURSOR_FORMAT_VERSION: u16 = 1;
817#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
818#[serde(deny_unknown_fields)]
819pub struct Cursor {
820 pub value: String,
821}
822
823pub const LODESTONE_API_LOCATOR_FORMAT_VERSION: u16 = 1;
824#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
825#[serde(deny_unknown_fields)]
826pub struct Locator {
827 pub authority: String,
828 pub value: String,
829}
830
831pub const LODESTONE_API_RESOURCE_FORMAT_VERSION: u16 = 1;
832#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
833#[serde(deny_unknown_fields)]
834pub struct Resource {
835 pub kind: String,
836 pub name: String,
837 pub incarnation: Identity,
838}
839
840pub const LODESTONE_API_READ_CUT_KIND_FORMAT_VERSION: u16 = 1;
841#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
842#[serde(rename_all = "snake_case")]
843pub enum ReadCutKind {
844 Committed,
845}
846
847pub const LODESTONE_API_READ_CUT_INDEX_EVIDENCE_FORMAT_VERSION: u16 = 1;
848#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
849#[serde(deny_unknown_fields)]
850pub struct ReadCutIndexEvidence {
851 pub index: Resource,
852 pub pinned_schema_generation: U64,
853 pub cut_digest: Digest,
854}
855
856pub const LODESTONE_API_READ_CUT_EVIDENCE_SHAPE_VERSION: u16 = 1;
857pub const LODESTONE_API_READ_CUT_EVIDENCE_FORMAT_VERSION: u16 = 1;
858#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
859#[serde(deny_unknown_fields)]
860pub struct ReadCutEvidence {
861 pub format_version: u32,
862 pub kind: ReadCutKind,
863 pub collection_id: Identity,
864 pub recovery_era: Identity,
865 pub catalog_revision: U64,
866 pub indexes: Vec<ReadCutIndexEvidence>,
867 pub aggregate_digest: Digest,
868}
869
870pub const LODESTONE_API_TABLE_SNAPSHOT_OBJECT_ROLE_FORMAT_VERSION: u16 = 1;
871#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
872#[serde(rename_all = "snake_case")]
873pub enum TableSnapshotObjectRole {
874 ScopedManifest,
875 RootSet,
876 Mapping,
877 SegmentFile,
878 AliveBitset,
879 Hotcache,
880 VectorBundleDirectory,
881 VectorBundlePayload,
882 StateSnapshot,
883 PromotedColumn,
884 RollupOutput,
885 VisibilityOverlay,
886}
887
888pub const LODESTONE_API_TABLE_SNAPSHOT_CODEC_FORMAT_VERSION: u16 = 1;
889#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
890#[serde(rename_all = "snake_case")]
891pub enum TableSnapshotCodec {
892 ScopedManifestV3,
893 RootSetSinglePageV2,
894 RootSetPageV2,
895 Mapping,
896 TantivySegmentV0261,
897 AliveBitsetV1,
898 HotcacheV1,
899 VectorBundleDirectoryV1,
900 VectorBundlePayloadV1,
901 StateSnapshotV2,
902 PromotedColumnV1,
903 RollupOutputV2,
904 VisibilityOverlayV1,
905}
906
907pub const LODESTONE_API_TABLE_SNAPSHOT_OBJECT_FORMAT_VERSION: u16 = 1;
908#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
909#[serde(deny_unknown_fields)]
910pub struct TableSnapshotObject {
911 pub object_id: Digest,
912 pub role: TableSnapshotObjectRole,
913 pub codec: TableSnapshotCodec,
914 pub stored_bytes: U64,
915 pub plaintext_bytes: U64,
916}
917
918pub const LODESTONE_API_TABLE_SNAPSHOT_SHAPE_VERSION: u16 = 1;
919pub const LODESTONE_API_TABLE_SNAPSHOT_FORMAT_VERSION: u16 = 1;
920#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
921#[serde(deny_unknown_fields)]
922pub struct TableSnapshot {
923 pub format_version: u32,
924 pub locator: Locator,
925 pub index: Resource,
926 pub snapshot_digest: Digest,
927 pub root_cut_digest: Digest,
928 pub table_format_digest: Digest,
929 pub expires_at: U64,
930 pub maximum_range_bytes: U64,
931 pub objects: Vec<TableSnapshotObject>,
932}
933
934pub const LODESTONE_API_TABLE_SNAPSHOT_RESOLUTION_STATE_FORMAT_VERSION: u16 = 1;
935#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
936#[serde(rename_all = "snake_case")]
937pub enum TableSnapshotResolutionState {
938 Pending,
939 Succeeded,
940 Failed,
941 ExpiredUnknown,
942}
943
944pub const LODESTONE_API_TABLE_SNAPSHOT_RESOLUTION_FORMAT_VERSION: u16 = 1;
945#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
946#[serde(deny_unknown_fields)]
947pub struct TableSnapshotResolution {
948 pub state: TableSnapshotResolutionState,
949 #[serde(default, skip_serializing_if = "Option::is_none")]
950 pub snapshot: Option<TableSnapshot>,
951 #[serde(default, skip_serializing_if = "Option::is_none")]
952 pub failure: Option<String>,
953}
954
955pub const LODESTONE_API_TABLE_SNAPSHOT_READ_FORMAT_VERSION: u16 = 1;
956#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
957#[serde(deny_unknown_fields)]
958pub struct TableSnapshotRead {
959 pub object_id: Digest,
960 pub offset: U64,
961 pub bytes_base64: String,
962 pub content_digest: Digest,
963 pub complete: bool,
964}
965
966pub const LODESTONE_API_LOGICAL_OCCUPANCY_COUNTS_FORMAT_VERSION: u16 = 1;
967#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
968#[serde(deny_unknown_fields)]
969pub struct LogicalOccupancyCounts {
970 pub live_records: U64,
971 pub indexed_source_bytes: U64,
972 pub dense_vector_values: U64,
973 pub dense_vector_bytes: U64,
974 pub sparse_vector_values: U64,
975 pub sparse_vector_nonzero: U64,
976 pub sparse_vector_bytes: U64,
977 pub vector_set_values: U64,
978 pub vector_set_vectors: U64,
979 pub vector_set_bytes: U64,
980}
981
982pub const LODESTONE_API_LOGICAL_OCCUPANCY_GAP_STATE_FORMAT_VERSION: u16 = 1;
983#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
984#[serde(rename_all = "snake_case")]
985pub enum LogicalOccupancyGapState {
986 None,
987 AuthoritativeLifecycleTransitionsUnavailable,
988}
989
990pub const LODESTONE_API_LOGICAL_OCCUPANCY_SNAPSHOT_EVIDENCE_SHAPE_VERSION: u16 = 1;
991pub const LODESTONE_API_LOGICAL_OCCUPANCY_SNAPSHOT_EVIDENCE_FORMAT_VERSION: u16 = 1;
992#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
993#[serde(deny_unknown_fields)]
994pub struct LogicalOccupancySnapshotEvidence {
995 pub format_version: u32,
996 pub index: Resource,
997 pub mapping_generation: U64,
998 pub read_cut: ReadCutEvidence,
999 pub page_ordinal: u32,
1000 pub page: LogicalOccupancyCounts,
1001 pub cumulative: LogicalOccupancyCounts,
1002 pub record_identity: Digest,
1003 pub source_revision: Digest,
1004 pub completeness_watermark: Digest,
1005 pub complete: bool,
1006 pub gap_state: LogicalOccupancyGapState,
1007 #[serde(default, skip_serializing_if = "Option::is_none")]
1008 pub corrects_record: Option<Digest>,
1009}
1010
1011pub const LODESTONE_API_LOGICAL_OCCUPANCY_WINDOW_GAP_SHAPE_VERSION: u16 = 1;
1012pub const LODESTONE_API_LOGICAL_OCCUPANCY_WINDOW_GAP_FORMAT_VERSION: u16 = 1;
1013#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1014#[serde(deny_unknown_fields)]
1015pub struct LogicalOccupancyWindowGap {
1016 pub format_version: u32,
1017 pub index: Resource,
1018 pub window_start: U64,
1019 pub window_end: U64,
1020 pub gap_state: LogicalOccupancyGapState,
1021}
1022
1023pub const LODESTONE_API_FIELD_PROMOTION_CONFIGURATION_SHAPE_VERSION: u16 = 1;
1024pub const LODESTONE_API_FIELD_PROMOTION_CONFIGURATION_FORMAT_VERSION: u16 = 3;
1025#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1026#[serde(deny_unknown_fields)]
1027pub struct FieldPromotionConfiguration {
1028 pub format_version: u32,
1029 pub enabled: bool,
1030 pub minimum_query_count: u32,
1031 pub maximum_promoted_fields: u32,
1032 pub maximum_cardinality: U64,
1033 pub maximum_extra_bytes: U64,
1034 pub allow_sensitive: bool,
1035}
1036
1037pub const LODESTONE_API_OVERLOAD_CONFIGURATION_SHAPE_VERSION: u16 = 2;
1038pub const LODESTONE_API_OVERLOAD_CONFIGURATION_FORMAT_VERSION: u16 = 3;
1039#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1040#[serde(deny_unknown_fields)]
1041pub struct OverloadConfiguration {
1042 pub format_version: u32,
1043 pub mode: String,
1044 pub maximum_backlog_bytes: U64,
1045 pub maximum_backlog_age_millis: U64,
1046 pub maximum_collection_share_bytes: U64,
1047 pub maximum_recovery_ops_per_pass: u32,
1048 pub maximum_pending_overlay_documents: U64,
1049}
1050
1051pub const LODESTONE_API_INDEX_POLICIES_FORMAT_VERSION: u16 = 1;
1052#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1053#[serde(deny_unknown_fields)]
1054pub struct IndexPolicies {
1055 pub durability: String,
1056 pub storage: String,
1057 pub cache: String,
1058 #[serde(default, skip_serializing_if = "Option::is_none")]
1059 pub default_visibility: Option<String>,
1060 pub field_promotion: FieldPromotionConfiguration,
1061 pub overload: OverloadConfiguration,
1062}
1063
1064pub const LODESTONE_API_MAINTENANCE_BUDGETS_FORMAT_VERSION: u16 = 1;
1065#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1066#[serde(deny_unknown_fields)]
1067pub struct MaintenanceBudgets {
1068 pub memtable_max_bytes: U64,
1069 pub refresh_max_millis: U64,
1070 pub seal_max_bytes: U64,
1071 pub seal_max_millis: U64,
1072 pub merge_max_bytes: U64,
1073 pub delete_resolution_max_bytes: U64,
1074 pub wal_retention_max_bytes: U64,
1075 pub gc_max_keys: u32,
1076 pub fsck_max_objects: u32,
1077 pub deleted_tombstone_retention_millis: U64,
1078}
1079
1080pub const LODESTONE_API_RESOURCE_DURABILITY_CLASS_FORMAT_VERSION: u16 = 1;
1081#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1082#[serde(rename_all = "snake_case")]
1083pub enum ResourceDurabilityClass {
1084 RegionalObject,
1085 ZonalLowLatency,
1086 Relaxed,
1087 Ephemeral,
1088}
1089
1090pub const LODESTONE_API_RESOURCE_STORAGE_CLASS_FORMAT_VERSION: u16 = 1;
1091#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1092#[serde(rename_all = "snake_case")]
1093pub enum ResourceStorageClass {
1094 Standard,
1095 Cold,
1096}
1097
1098pub const LODESTONE_API_VECTOR_QUALITY_OBJECTIVE_FORMAT_VERSION: u16 = 1;
1099#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1100#[serde(rename_all = "snake_case")]
1101pub enum VectorQualityObjective {
1102 Balanced,
1103 HighRecall,
1104 MemoryEfficient,
1105}
1106
1107pub const LODESTONE_API_VECTOR_INDEXING_OBJECTIVE_FORMAT_VERSION: u16 = 1;
1108#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1109#[serde(rename_all = "snake_case")]
1110pub enum VectorIndexingObjective {
1111 FastBuild,
1112 Balanced,
1113 Compact,
1114}
1115
1116pub const LODESTONE_API_VECTOR_RESIDENCY_INTENT_FORMAT_VERSION: u16 = 1;
1117#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1118#[serde(rename_all = "snake_case")]
1119pub enum VectorResidencyIntent {
1120 Automatic,
1121 PreferResident,
1122 RequireResident,
1123}
1124
1125pub const LODESTONE_API_VECTOR_CALIBRATION_BINDING_FORMAT_VERSION: u16 = 1;
1126#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1127#[serde(deny_unknown_fields)]
1128pub struct VectorCalibrationBinding {
1129 pub profile: VectorStrategyProfile,
1130 pub evidence_digest: Digest,
1131}
1132
1133pub const LODESTONE_API_VECTOR_RESOURCE_POLICY_FORMAT_VERSION: u16 = 2;
1134#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1135#[serde(deny_unknown_fields)]
1136pub struct VectorResourcePolicy {
1137 pub quality: VectorQualityObjective,
1138 pub indexing: VectorIndexingObjective,
1139 #[serde(default, skip_serializing_if = "Option::is_none")]
1140 pub residency: Option<VectorResidencyIntent>,
1141 #[serde(default, skip_serializing_if = "Option::is_none")]
1142 pub calibration: Option<VectorCalibrationBinding>,
1143}
1144
1145pub const LODESTONE_API_WORKLOAD_CLASS_FORMAT_VERSION: u16 = 1;
1146#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1147#[serde(rename_all = "snake_case")]
1148pub enum WorkloadClass {
1149 InteractiveSearch,
1150 BatchAnalytics,
1151 StreamingIngest,
1152 BulkBackfill,
1153 InternalMaintenance,
1154}
1155
1156pub const LODESTONE_API_INDEX_RESOURCE_SPEC_SHAPE_VERSION: u16 = 3;
1157pub const LODESTONE_API_INDEX_RESOURCE_SPEC_FORMAT_VERSION: u16 = 3;
1158#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1159#[serde(deny_unknown_fields)]
1160pub struct IndexResourceSpec {
1161 pub format_version: u32,
1162 pub revision: U64,
1163 pub initial_shards: u32,
1164 pub target_shard_bytes: U64,
1165 pub durability: ResourceDurabilityClass,
1166 pub storage_class: ResourceStorageClass,
1167 pub ram_admission_weight: u32,
1168 pub ram_hard_max_bytes: U64,
1169 pub nvme_admission_weight: u32,
1170 pub nvme_hard_max_bytes: U64,
1171 pub refresh_objective_millis: u32,
1172 pub memtable_hard_max_bytes: U64,
1173 pub seal_parallelism: u32,
1174 pub merge_parallelism: u32,
1175 pub vector: VectorResourcePolicy,
1176 #[serde(default, skip_serializing_if = "Option::is_none")]
1177 pub lifecycle_binding: Option<Identity>,
1178 pub encryption_required: bool,
1179 #[serde(default, skip_serializing_if = "Option::is_none")]
1180 pub resolver_capability: Option<Identity>,
1181}
1182
1183pub const LODESTONE_API_INDEX_SUMMARY_FORMAT_VERSION: u16 = 1;
1184#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1185#[serde(deny_unknown_fields)]
1186pub struct IndexSummary {
1187 pub name: String,
1188 pub incarnation: Identity,
1189 pub revision: U64,
1190 pub mode: String,
1191 pub retained_event_identity: bool,
1192 pub state: String,
1193 pub schema_generation: U64,
1194 pub routing_revision: U64,
1195 pub shard_count: u32,
1196 pub policies: IndexPolicies,
1197 pub management_mode: String,
1198}
1199
1200pub const LODESTONE_API_MAPPING_MODE_FORMAT_VERSION: u16 = 1;
1201#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1202#[serde(rename_all = "snake_case")]
1203pub enum MappingMode {
1204 Mutable,
1205 AppendLog,
1206 State,
1207}
1208
1209pub const LODESTONE_API_DYNAMIC_MAPPING_POLICY_FORMAT_VERSION: u16 = 1;
1210#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1211#[serde(rename_all = "snake_case")]
1212pub enum DynamicMappingPolicy {
1213 True,
1214 False,
1215 Strict,
1216}
1217
1218pub const LODESTONE_API_MAPPING_ANALYZER_FORMAT_VERSION: u16 = 1;
1219#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1220#[serde(rename_all = "snake_case")]
1221pub enum MappingAnalyzer {
1222 Keyword,
1223 Simple,
1224 Standard,
1225 Whitespace,
1226}
1227
1228pub const LODESTONE_API_KEYWORD_NORMALIZER_FORMAT_VERSION: u16 = 1;
1229#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1230#[serde(rename_all = "snake_case")]
1231pub enum KeywordNormalizer {
1232 Keyword,
1233 Lowercase,
1234}
1235
1236pub const LODESTONE_API_VECTOR_METRIC_FORMAT_VERSION: u16 = 1;
1237#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1238#[serde(rename_all = "snake_case")]
1239pub enum VectorMetric {
1240 Cosine,
1241 DotProduct,
1242 SquaredL2,
1243}
1244
1245pub const LODESTONE_API_MAPPING_SCALAR_FORMAT_VERSION: u16 = 1;
1246#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1247#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1248pub enum MappingScalar {
1249 Boolean { value: bool },
1250 I64 { value: I64 },
1251 U64 { value: U64 },
1252 F64Bits { value: U64 },
1253 Keyword { value: String },
1254}
1255
1256pub const LODESTONE_API_SPARSE_VECTOR_WEIGHT_TYPE_FORMAT_VERSION: u16 = 1;
1257#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1258#[serde(rename_all = "snake_case")]
1259pub enum SparseVectorWeightType {
1260 F32,
1261 F16,
1262}
1263
1264pub const LODESTONE_API_MAPPING_FIELD_TYPE_SHAPE_VERSION: u16 = 3;
1265pub const LODESTONE_API_MAPPING_FIELD_TYPE_VECTOR_FORMAT_VERSION: u16 = 2;
1266pub const LODESTONE_API_MAPPING_FIELD_TYPE_SPARSE_VECTOR_FORMAT_VERSION: u16 = 1;
1267pub const LODESTONE_API_MAPPING_FIELD_TYPE_VECTOR_SET_FORMAT_VERSION: u16 = 1;
1268#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1269#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1270pub enum MappingFieldType {
1271 Text,
1272 Keyword,
1273 U64,
1274 Date,
1275 I64,
1276 F64,
1277 Bool,
1278 Nested,
1279 Vector {
1280 format_version: u32,
1281 field_id: u32,
1282 dimensions: u32,
1283 metric: VectorMetric,
1284 element_type: DenseVectorElementType,
1285 #[serde(default, skip_serializing_if = "Option::is_none")]
1286 quantization_scale: Option<ApproximateNumber>,
1287 },
1288 SparseVector {
1289 format_version: u32,
1290 field_id: u32,
1291 maximum_dimension: u32,
1292 weight_type: SparseVectorWeightType,
1293 },
1294 VectorSet {
1295 format_version: u32,
1296 field_id: u32,
1297 dimensions: u32,
1298 metric: VectorMetric,
1299 element_type: DenseVectorElementType,
1300 #[serde(default, skip_serializing_if = "Option::is_none")]
1301 quantization_scale: Option<ApproximateNumber>,
1302 maximum_vectors: u32,
1303 },
1304}
1305
1306pub const LODESTONE_API_MAPPING_FIELD_FORMAT_VERSION: u16 = 1;
1307#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1308#[serde(deny_unknown_fields)]
1309pub struct MappingField {
1310 pub path: String,
1311 pub field_type: MappingFieldType,
1312 pub stored: bool,
1313 #[serde(default, skip_serializing_if = "Option::is_none")]
1314 pub null_value: Option<MappingScalar>,
1315}
1316
1317pub const LODESTONE_API_MULTI_FIELD_PROJECTION_FORMAT_VERSION: u16 = 1;
1318#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1319#[serde(deny_unknown_fields)]
1320pub struct MultiFieldProjection {
1321 pub parent: String,
1322 pub child: String,
1323}
1324
1325pub const LODESTONE_API_ANALYZER_IDENTITY_FORMAT_VERSION: u16 = 1;
1326#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1327#[serde(deny_unknown_fields)]
1328pub struct AnalyzerIdentity {
1329 pub field: String,
1330 pub index_analyzer: MappingAnalyzer,
1331 pub search_analyzer: MappingAnalyzer,
1332}
1333
1334pub const LODESTONE_API_KEYWORD_LIMIT_FORMAT_VERSION: u16 = 1;
1335#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1336#[serde(deny_unknown_fields)]
1337pub struct KeywordLimit {
1338 pub field: String,
1339 pub max_bytes: u32,
1340 pub normalizer: KeywordNormalizer,
1341}
1342
1343pub const LODESTONE_API_PROFILE_PRIVACY_ACTION_FORMAT_VERSION: u16 = 1;
1344#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1345#[serde(rename_all = "snake_case")]
1346pub enum ProfilePrivacyAction {
1347 Allow,
1348 Drop,
1349 Redact,
1350 Reject,
1351}
1352
1353pub const LODESTONE_API_PROFILE_PRIVACY_FIELD_FORMAT_VERSION: u16 = 1;
1354#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1355#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1356pub enum ProfilePrivacyField {
1357 ResourceAttribute { key: String },
1358 ScopeAttribute { key: String },
1359 SampleLabel { key: String },
1360 FunctionName,
1361 FunctionSystemName,
1362 FunctionFilename,
1363 MappingFilename,
1364}
1365
1366pub const LODESTONE_API_PROFILE_PRIVACY_RULE_FORMAT_VERSION: u16 = 1;
1367#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1368#[serde(deny_unknown_fields)]
1369pub struct ProfilePrivacyRule {
1370 pub field: ProfilePrivacyField,
1371 pub action: ProfilePrivacyAction,
1372}
1373
1374pub const LODESTONE_API_PROFILE_PRIVACY_POLICY_SHAPE_VERSION: u16 = 1;
1375pub const LODESTONE_API_PROFILE_PRIVACY_POLICY_FORMAT_VERSION: u16 = 1;
1376#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1377#[serde(deny_unknown_fields)]
1378pub struct ProfilePrivacyPolicy {
1379 pub format_version: u32,
1380 pub rules: Vec<ProfilePrivacyRule>,
1381}
1382
1383pub const LODESTONE_API_MAPPING_RECORD_MODEL_SHAPE_VERSION: u16 = 3;
1384pub const LODESTONE_API_MAPPING_RECORD_MODEL_METRIC_V1_FORMAT_VERSION: u16 = 1;
1385pub const LODESTONE_API_MAPPING_RECORD_MODEL_RELATIONSHIP_V1_FORMAT_VERSION: u16 = 1;
1386pub const LODESTONE_API_MAPPING_RECORD_MODEL_PROFILE_V1_FORMAT_VERSION: u16 = 1;
1387#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1388#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1389pub enum MappingRecordModel {
1390 Document,
1391 MetricV1 {
1392 format_version: u32,
1393 grouping_attributes: Vec<String>,
1394 },
1395 RelationshipV1 {
1396 format_version: u32,
1397 },
1398 ProfileV1 {
1399 format_version: u32,
1400 privacy: ProfilePrivacyPolicy,
1401 },
1402}
1403
1404pub const LODESTONE_API_MAPPING_SHAPE_VERSION: u16 = 4;
1405pub const LODESTONE_API_MAPPING_FORMAT_VERSION: u16 = 10;
1406#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1407#[serde(deny_unknown_fields)]
1408pub struct Mapping {
1409 pub format_version: u32,
1410 pub generation: U64,
1411 pub mode: MappingMode,
1412 pub record_model: MappingRecordModel,
1413 pub dynamic_policy: DynamicMappingPolicy,
1414 pub fields: Vec<MappingField>,
1415 pub multi_field_projections: Vec<MultiFieldProjection>,
1416 pub analyzer_identities: Vec<AnalyzerIdentity>,
1417 pub keyword_limits: Vec<KeywordLimit>,
1418 pub nested_paths: Vec<String>,
1419}
1420
1421pub const LODESTONE_API_INDEX_DETAIL_FORMAT_VERSION: u16 = 1;
1422#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1423#[serde(deny_unknown_fields)]
1424pub struct IndexDetail {
1425 pub summary: IndexSummary,
1426 pub current_mapping: Mapping,
1427 pub budgets: MaintenanceBudgets,
1428 pub resource_spec: IndexResourceSpec,
1429 pub aliases: Vec<String>,
1430 pub data_streams: Vec<String>,
1431}
1432
1433pub const LODESTONE_API_SOURCE_PROVIDER_FORMAT_VERSION: u16 = 1;
1434#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1435#[serde(rename_all = "snake_case")]
1436pub enum SourceProvider {
1437 Kafka,
1438 ObjectLog,
1439 HttpReplay,
1440 GrpcReplay,
1441}
1442
1443pub const LODESTONE_API_SOURCE_DECODER_FORMAT_VERSION: u16 = 1;
1444#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1445#[serde(rename_all = "snake_case")]
1446pub enum SourceDecoder {
1447 LodestoneDocumentJson,
1448 DebeziumPostgresJson,
1449}
1450
1451pub const LODESTONE_API_SOURCE_REPLAY_GUARANTEES_FORMAT_VERSION: u16 = 1;
1452#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1453#[serde(deny_unknown_fields)]
1454pub struct SourceReplayGuarantees {
1455 pub durable_replay: bool,
1456 pub stable_partition_identity: bool,
1457 pub stable_operation_identity: bool,
1458 pub ordered_positions: bool,
1459 pub bounded_reads: bool,
1460 pub explicit_retention: bool,
1461 pub explicit_rewind: bool,
1462 pub minimum_replay_window_millis: U64,
1463}
1464
1465pub const LODESTONE_API_SOURCE_PARTITION_CONFIGURATION_FORMAT_VERSION: u16 = 1;
1466#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1467#[serde(deny_unknown_fields)]
1468pub struct SourcePartitionConfiguration {
1469 pub partition_id: u32,
1470 pub partition_incarnation: U64,
1471 pub initial_next_ordinal: U64,
1472 pub initial_resume_token_base64: String,
1473}
1474
1475pub const LODESTONE_API_REPLAYABLE_SOURCE_CONFIGURATION_FORMAT_VERSION: u16 = 1;
1476#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1477#[serde(deny_unknown_fields)]
1478pub struct ReplayableSourceConfiguration {
1479 pub source_incarnation: U64,
1480 pub source_identity_digest: Digest,
1481 pub provider: SourceProvider,
1482 pub decoder: SourceDecoder,
1483 pub partitions: Vec<SourcePartitionConfiguration>,
1484 pub guarantees: SourceReplayGuarantees,
1485}
1486
1487pub const LODESTONE_API_SOURCE_PARTITION_STATUS_FORMAT_VERSION: u16 = 1;
1488#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1489#[serde(deny_unknown_fields)]
1490pub struct SourcePartitionStatus {
1491 pub partition_id: u32,
1492 pub partition_incarnation: U64,
1493 pub indexed_next_ordinal: U64,
1494 #[serde(default, skip_serializing_if = "Option::is_none")]
1495 pub provider_high_watermark_next_ordinal: Option<U64>,
1496 #[serde(default, skip_serializing_if = "Option::is_none")]
1497 pub retention_floor_next_ordinal: Option<U64>,
1498 #[serde(default, skip_serializing_if = "Option::is_none")]
1499 pub lag_records: Option<U64>,
1500}
1501
1502pub const LODESTONE_API_REPLAYABLE_SOURCE_STATUS_FORMAT_VERSION: u16 = 1;
1503#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1504#[serde(deny_unknown_fields)]
1505pub struct ReplayableSourceStatus {
1506 pub index: Resource,
1507 pub provider: SourceProvider,
1508 pub decoder: SourceDecoder,
1509 pub source_incarnation: U64,
1510 pub source_identity_digest: Digest,
1511 pub lifecycle: String,
1512 pub lifecycle_generation: U64,
1513 #[serde(default, skip_serializing_if = "Option::is_none")]
1514 pub pause_reason: Option<String>,
1515 #[serde(default, skip_serializing_if = "Option::is_none")]
1516 pub rebuild_reason: Option<String>,
1517 pub retry_state: String,
1518 pub retention_risk: String,
1519 #[serde(default, skip_serializing_if = "Option::is_none")]
1520 pub last_batch_identity: Option<Identity>,
1521 pub partitions: Vec<SourcePartitionStatus>,
1522}
1523
1524pub const LODESTONE_API_SOURCE_CONTROL_TRANSITION_FORMAT_VERSION: u16 = 1;
1525#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1526#[serde(rename_all = "snake_case")]
1527pub enum SourceControlTransition {
1528 Pause,
1529 Resume,
1530 RequireRebuild,
1531}
1532
1533pub const LODESTONE_API_HISTORY_LEDGER_PRECONDITION_FORMAT_VERSION: u16 = 1;
1534#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1535#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1536pub enum HistoryLedgerPrecondition {
1537 Absent,
1538 Exact { revision: U64 },
1539}
1540
1541pub const LODESTONE_API_HISTORY_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1542#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1543#[serde(deny_unknown_fields)]
1544pub struct HistoryRetentionPolicy {
1545 pub keep_for_millis: U64,
1546 pub capture_interval_millis: U64,
1547 pub maximum_cuts: u32,
1548 pub privacy_overlay_identity_limit: u32,
1549}
1550
1551pub const LODESTONE_API_HISTORY_SELECTOR_FORMAT_VERSION: u16 = 1;
1552#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1553#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1554pub enum HistorySelector {
1555 ExactCut { cut_id: Identity },
1556 AtOrBeforeCommitTime { unix_millis: U64 },
1557}
1558
1559pub const LODESTONE_API_HISTORY_HOLD_FORMAT_VERSION: u16 = 1;
1560#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1561#[serde(deny_unknown_fields)]
1562pub struct HistoryHold {
1563 pub hold_id: Identity,
1564 pub cut_ids: Vec<Identity>,
1565}
1566
1567pub const LODESTONE_API_HISTORY_STATUS_FORMAT_VERSION: u16 = 1;
1568#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1569#[serde(deny_unknown_fields)]
1570pub struct HistoryStatus {
1571 pub index: Resource,
1572 pub revision: U64,
1573 pub policy: HistoryRetentionPolicy,
1574 pub page_count: u32,
1575 pub cut_count: u32,
1576 pub holds: Vec<HistoryHold>,
1577}
1578
1579pub const LODESTONE_API_HISTORY_RESOLUTION_FORMAT_VERSION: u16 = 1;
1580#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1581#[serde(deny_unknown_fields)]
1582pub struct HistoryResolution {
1583 pub index: Resource,
1584 pub selector: HistorySelector,
1585 pub cut_id: Identity,
1586 pub committed_at_unix_millis: U64,
1587 pub uncertainty_millis: U64,
1588 pub shard_count: u32,
1589 pub security_policy_revision: U64,
1590}
1591
1592pub const LODESTONE_API_INDEX_REFERENCE_FORMAT_VERSION: u16 = 1;
1593#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1594#[serde(deny_unknown_fields)]
1595pub struct IndexReference {
1596 pub name: String,
1597 pub incarnation: Identity,
1598}
1599
1600pub const LODESTONE_API_ALIAS_TARGET_FORMAT_VERSION: u16 = 1;
1601#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1602#[serde(deny_unknown_fields)]
1603pub struct AliasTarget {
1604 pub index: IndexReference,
1605 pub write_index: bool,
1606}
1607
1608pub const LODESTONE_API_ALIAS_SUMMARY_FORMAT_VERSION: u16 = 1;
1609#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1610#[serde(deny_unknown_fields)]
1611pub struct AliasSummary {
1612 pub name: String,
1613 pub revision: U64,
1614 pub visible_target_count: u32,
1615}
1616
1617pub const LODESTONE_API_ALIAS_DETAIL_FORMAT_VERSION: u16 = 1;
1618#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1619#[serde(deny_unknown_fields)]
1620pub struct AliasDetail {
1621 pub summary: AliasSummary,
1622 pub visible_targets: Vec<AliasTarget>,
1623 #[serde(default, skip_serializing_if = "Option::is_none")]
1624 pub filter: Option<RawJson>,
1625 #[serde(default, skip_serializing_if = "Option::is_none")]
1626 pub index_routing: Option<String>,
1627 #[serde(default, skip_serializing_if = "Option::is_none")]
1628 pub search_routing: Option<String>,
1629}
1630
1631pub const LODESTONE_API_DATA_STREAM_SUMMARY_FORMAT_VERSION: u16 = 1;
1632#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1633#[serde(deny_unknown_fields)]
1634pub struct DataStreamSummary {
1635 pub name: String,
1636 pub incarnation: Identity,
1637 pub revision: U64,
1638 pub generation: U64,
1639 pub state: String,
1640 pub visible_backing_count: u32,
1641}
1642
1643pub const LODESTONE_API_COMPONENT_TEMPLATE_BINDING_FORMAT_VERSION: u16 = 1;
1644#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1645#[serde(deny_unknown_fields)]
1646pub struct ComponentTemplateBinding {
1647 pub name: String,
1648 pub incarnation: Identity,
1649 pub revision: U64,
1650}
1651
1652pub const LODESTONE_API_INDEX_TEMPLATE_BINDING_FORMAT_VERSION: u16 = 1;
1653#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1654#[serde(deny_unknown_fields)]
1655pub struct IndexTemplateBinding {
1656 pub name: String,
1657 pub incarnation: Identity,
1658 pub revision: U64,
1659}
1660
1661pub const LODESTONE_API_LIFECYCLE_POLICY_BINDING_FORMAT_VERSION: u16 = 1;
1662#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1663#[serde(deny_unknown_fields)]
1664pub struct LifecyclePolicyBinding {
1665 pub name: String,
1666 pub incarnation: Identity,
1667 pub revision: U64,
1668}
1669
1670pub const LODESTONE_API_DATA_STREAM_DETAIL_FORMAT_VERSION: u16 = 1;
1671#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1672#[serde(deny_unknown_fields)]
1673pub struct DataStreamDetail {
1674 pub summary: DataStreamSummary,
1675 pub visible_backing_indices: Vec<IndexReference>,
1676 #[serde(default, skip_serializing_if = "Option::is_none")]
1677 pub write_index: Option<IndexReference>,
1678 pub timestamp_field: String,
1679 pub index_template: IndexTemplateBinding,
1680 #[serde(default, skip_serializing_if = "Option::is_none")]
1681 pub lifecycle_policy: Option<LifecyclePolicyBinding>,
1682}
1683
1684pub const LODESTONE_API_COMPONENT_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1685#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1686#[serde(deny_unknown_fields)]
1687pub struct ComponentTemplateSummary {
1688 pub name: String,
1689 pub incarnation: Identity,
1690 pub revision: U64,
1691}
1692
1693pub const LODESTONE_API_COMPONENT_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1694#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1695#[serde(deny_unknown_fields)]
1696pub struct ComponentTemplateDetail {
1697 pub summary: ComponentTemplateSummary,
1698 pub mapping: Mapping,
1699 pub settings: RawJson,
1700 #[serde(default, skip_serializing_if = "Option::is_none")]
1701 pub resource_spec: Option<IndexResourceSpec>,
1702}
1703
1704pub const LODESTONE_API_INDEX_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1705#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1706#[serde(deny_unknown_fields)]
1707pub struct IndexTemplateSummary {
1708 pub name: String,
1709 pub incarnation: Identity,
1710 pub revision: U64,
1711 pub priority: i32,
1712 pub data_stream: bool,
1713}
1714
1715pub const LODESTONE_API_INDEX_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1716#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1717#[serde(deny_unknown_fields)]
1718pub struct IndexTemplateDetail {
1719 pub summary: IndexTemplateSummary,
1720 pub index_patterns: Vec<String>,
1721 pub components: Vec<ComponentTemplateBinding>,
1722 pub mapping: Mapping,
1723 pub settings: RawJson,
1724 #[serde(default, skip_serializing_if = "Option::is_none")]
1725 pub resource_spec: Option<IndexResourceSpec>,
1726}
1727
1728pub const LODESTONE_API_INGEST_PIPELINE_SUMMARY_FORMAT_VERSION: u16 = 1;
1729#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1730#[serde(deny_unknown_fields)]
1731pub struct IngestPipelineSummary {
1732 pub name: String,
1733 pub incarnation: Identity,
1734 pub revision: U64,
1735 pub digest: Digest,
1736}
1737
1738pub const LODESTONE_API_INGEST_PIPELINE_DETAIL_FORMAT_VERSION: u16 = 1;
1739#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1740#[serde(deny_unknown_fields)]
1741pub struct IngestPipelineDetail {
1742 pub summary: IngestPipelineSummary,
1743 pub definition: RawJson,
1744}
1745
1746pub const LODESTONE_API_INGEST_PIPELINE_SELECTION_FORMAT_VERSION: u16 = 1;
1747#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1748#[serde(deny_unknown_fields)]
1749pub struct IngestPipelineSelection {
1750 pub name: String,
1751 pub expected: ExpectedBinding,
1752}
1753
1754pub const LODESTONE_API_LIFECYCLE_POLICY_SUMMARY_FORMAT_VERSION: u16 = 1;
1755#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1756#[serde(deny_unknown_fields)]
1757pub struct LifecyclePolicySummary {
1758 pub name: String,
1759 pub incarnation: Identity,
1760 pub revision: U64,
1761}
1762
1763pub const LODESTONE_API_ROLLOVER_THRESHOLDS_FORMAT_VERSION: u16 = 1;
1764#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1765#[serde(deny_unknown_fields)]
1766pub struct RolloverThresholds {
1767 #[serde(default, skip_serializing_if = "Option::is_none")]
1768 pub max_primary_docs: Option<U64>,
1769 #[serde(default, skip_serializing_if = "Option::is_none")]
1770 pub max_primary_bytes: Option<U64>,
1771 #[serde(default, skip_serializing_if = "Option::is_none")]
1772 pub max_age_millis: Option<U64>,
1773}
1774
1775pub const LODESTONE_API_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1776#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1777#[serde(deny_unknown_fields)]
1778pub struct RetentionPolicy {
1779 #[serde(default, skip_serializing_if = "Option::is_none")]
1780 pub document_max_age_millis: Option<U64>,
1781 #[serde(default, skip_serializing_if = "Option::is_none")]
1782 pub backing_index_max_age_millis: Option<U64>,
1783}
1784
1785pub const LODESTONE_API_LIFECYCLE_POLICY_DETAIL_FORMAT_VERSION: u16 = 1;
1786#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1787#[serde(deny_unknown_fields)]
1788pub struct LifecyclePolicyDetail {
1789 pub summary: LifecyclePolicySummary,
1790 pub rollover: RolloverThresholds,
1791 pub retention: RetentionPolicy,
1792 pub merge_hint: bool,
1793 pub freeze_hint: bool,
1794 pub delete_expired: bool,
1795}
1796
1797pub const LODESTONE_API_TEXT_QUERY_OPERATOR_FORMAT_VERSION: u16 = 1;
1798#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1799#[serde(rename_all = "snake_case")]
1800pub enum TextQueryOperator {
1801 Or,
1802 And,
1803}
1804
1805pub const LODESTONE_API_TEXT_QUERY_ANALYZER_FORMAT_VERSION: u16 = 1;
1806#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1807#[serde(rename_all = "snake_case")]
1808pub enum TextQueryAnalyzer {
1809 Mapping,
1810 Standard,
1811 Simple,
1812 Whitespace,
1813 Keyword,
1814}
1815
1816pub const LODESTONE_API_ZERO_TERMS_QUERY_FORMAT_VERSION: u16 = 1;
1817#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1818#[serde(rename_all = "snake_case")]
1819pub enum ZeroTermsQuery {
1820 None,
1821 All,
1822}
1823
1824pub const LODESTONE_API_TEXT_QUERY_OPTIONS_FORMAT_VERSION: u16 = 1;
1825#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1826#[serde(deny_unknown_fields)]
1827pub struct TextQueryOptions {
1828 pub operator: TextQueryOperator,
1829 #[serde(default, skip_serializing_if = "Option::is_none")]
1830 pub minimum_should_match: Option<u32>,
1831 pub analyzer: TextQueryAnalyzer,
1832 pub zero_terms_query: ZeroTermsQuery,
1833}
1834
1835pub const LODESTONE_API_MULTI_MATCH_MODE_FORMAT_VERSION: u16 = 1;
1836#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1837#[serde(rename_all = "snake_case")]
1838pub enum MultiMatchMode {
1839 BestFields,
1840 MostFields,
1841 Phrase,
1842 PhrasePrefix,
1843 CrossFields,
1844}
1845
1846pub const LODESTONE_API_MULTI_MATCH_FIELD_FORMAT_VERSION: u16 = 1;
1847#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1848#[serde(deny_unknown_fields)]
1849pub struct MultiMatchField {
1850 pub field: String,
1851 pub boost: ApproximateNumber,
1852}
1853
1854pub const LODESTONE_API_MULTI_MATCH_OPTIONS_FORMAT_VERSION: u16 = 1;
1855#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1856#[serde(deny_unknown_fields)]
1857pub struct MultiMatchOptions {
1858 pub mode: MultiMatchMode,
1859 pub operator: TextQueryOperator,
1860 #[serde(default, skip_serializing_if = "Option::is_none")]
1861 pub minimum_should_match: Option<u32>,
1862 pub analyzer: TextQueryAnalyzer,
1863 pub zero_terms_query: ZeroTermsQuery,
1864 pub slop: u32,
1865}
1866
1867pub const LODESTONE_API_SORT_ORDER_FORMAT_VERSION: u16 = 1;
1868#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1869#[serde(rename_all = "snake_case")]
1870pub enum SortOrder {
1871 Asc,
1872 Desc,
1873}
1874
1875pub const LODESTONE_API_SORT_MODE_FORMAT_VERSION: u16 = 1;
1876#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1877#[serde(rename_all = "snake_case")]
1878pub enum SortMode {
1879 Auto,
1880 Min,
1881 Max,
1882}
1883
1884pub const LODESTONE_API_MISSING_ORDER_FORMAT_VERSION: u16 = 1;
1885#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1886#[serde(rename_all = "snake_case")]
1887pub enum MissingOrder {
1888 First,
1889 Last,
1890}
1891
1892pub const LODESTONE_API_NESTED_SCORE_MODE_FORMAT_VERSION: u16 = 1;
1893#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1894#[serde(rename_all = "snake_case")]
1895pub enum NestedScoreMode {
1896 Avg,
1897 Max,
1898 Min,
1899 None,
1900 Sum,
1901}
1902
1903pub const LODESTONE_API_NESTED_INNER_HITS_FORMAT_VERSION: u16 = 1;
1904#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1905#[serde(deny_unknown_fields)]
1906pub struct NestedInnerHits {
1907 #[serde(default, skip_serializing_if = "Option::is_none")]
1908 pub name: Option<String>,
1909 pub from: u32,
1910 pub size: u32,
1911 pub sort: Vec<SortSpec>,
1912}
1913
1914pub const LODESTONE_API_SORT_SPEC_FORMAT_VERSION: u16 = 1;
1915#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1916#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1917pub enum SortSpec {
1918 Score {
1919 order: SortOrder,
1920 },
1921 Field {
1922 field: String,
1923 order: SortOrder,
1924 #[serde(default, skip_serializing_if = "Option::is_none")]
1925 missing: Option<MissingOrder>,
1926 mode: SortMode,
1927 },
1928 NestedField {
1929 path: String,
1930 field: String,
1931 #[serde(default, skip_serializing_if = "Option::is_none")]
1932 filter: Option<Box<Query>>,
1933 order: SortOrder,
1934 #[serde(default, skip_serializing_if = "Option::is_none")]
1935 missing: Option<MissingOrder>,
1936 mode: SortMode,
1937 },
1938}
1939
1940pub const LODESTONE_API_QUERY_FORMAT_VERSION: u16 = 1;
1941#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1942#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1943pub enum Query {
1944 MatchAll,
1945 Term {
1946 field: String,
1947 value: JsonValue,
1948 },
1949 Terms {
1950 field: String,
1951 values: Vec<JsonValue>,
1952 },
1953 Range {
1954 field: String,
1955 #[serde(default, skip_serializing_if = "Option::is_none")]
1956 lower: Option<JsonValue>,
1957 #[serde(default, skip_serializing_if = "Option::is_none")]
1958 upper: Option<JsonValue>,
1959 include_lower: bool,
1960 include_upper: bool,
1961 },
1962 Text {
1963 field: String,
1964 text: String,
1965 #[serde(default, skip_serializing_if = "Option::is_none")]
1966 options: Option<TextQueryOptions>,
1967 },
1968 MultiMatch {
1969 fields: Vec<MultiMatchField>,
1970 text: String,
1971 #[serde(default, skip_serializing_if = "Option::is_none")]
1972 options: Option<MultiMatchOptions>,
1973 },
1974 Exists {
1975 field: String,
1976 },
1977 Prefix {
1978 field: String,
1979 prefix: String,
1980 #[serde(default, skip_serializing_if = "Option::is_none")]
1981 analyzer: Option<TextQueryAnalyzer>,
1982 analyze_wildcard: bool,
1983 },
1984 Fuzzy {
1985 field: String,
1986 value: String,
1987 distance: u32,
1988 #[serde(default, skip_serializing_if = "Option::is_none")]
1989 analyzer: Option<TextQueryAnalyzer>,
1990 },
1991 Boost {
1992 query: Box<Query>,
1993 boost: ApproximateNumber,
1994 },
1995 Bool {
1996 must: Vec<Query>,
1997 filter: Vec<Query>,
1998 should: Vec<Query>,
1999 must_not: Vec<Query>,
2000 minimum_should_match: u32,
2001 },
2002 Nested {
2003 path: String,
2004 query: Box<Query>,
2005 score_mode: NestedScoreMode,
2006 ignore_unmapped: bool,
2007 #[serde(default, skip_serializing_if = "Option::is_none")]
2008 inner_hits: Option<NestedInnerHits>,
2009 },
2010}
2011
2012pub const LODESTONE_API_DENSE_RETRIEVAL_MODE_FORMAT_VERSION: u16 = 1;
2013#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2014#[serde(rename_all = "snake_case")]
2015pub enum DenseRetrievalMode {
2016 Auto,
2017 Ann,
2018 Exact,
2019}
2020
2021pub const LODESTONE_API_VECTOR_ACHIEVED_MODE_FORMAT_VERSION: u16 = 1;
2022#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2023#[serde(rename_all = "snake_case")]
2024pub enum VectorAchievedMode {
2025 Exact,
2026 Ann,
2027 Mixed,
2028}
2029
2030pub const LODESTONE_API_VECTOR_BRANCH_DIAGNOSTICS_FORMAT_VERSION: u16 = 2;
2031#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2032#[serde(deny_unknown_fields)]
2033pub struct VectorBranchDiagnostics {
2034 pub name: String,
2035 pub requested_mode: DenseRetrievalMode,
2036 pub achieved_mode: VectorAchievedMode,
2037 pub result_count: U64,
2038 pub exact_segments: U64,
2039 pub ann_segments: U64,
2040 pub exact_fallback_segments: U64,
2041 pub distance_evaluations: U64,
2042 pub peak_scratch_bytes: U64,
2043 pub fresh_vectors_scanned: U64,
2044 pub realtime_overlay_queries: U64,
2045 pub realtime_overlay_candidates: U64,
2046 pub bundle_roots: U64,
2047 pub object_read_requests: U64,
2048 pub object_bytes_read: U64,
2049 pub cache_hits: U64,
2050 pub cache_misses: U64,
2051 pub snapshot_digests: Vec<Digest>,
2052}
2053
2054pub const LODESTONE_API_DENSE_VECTOR_ELEMENT_TYPE_FORMAT_VERSION: u16 = 1;
2055#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2056#[serde(rename_all = "snake_case")]
2057pub enum DenseVectorElementType {
2058 F32,
2059 F16,
2060 I8,
2061}
2062
2063pub const LODESTONE_API_DENSE_VECTOR_BYTE_ORDER_FORMAT_VERSION: u16 = 1;
2064#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2065#[serde(rename_all = "snake_case")]
2066pub enum DenseVectorByteOrder {
2067 LittleEndian,
2068}
2069
2070pub const LODESTONE_API_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
2071#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2072#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2073pub enum VectorValue {
2074 Numeric {
2075 values: Vec<ApproximateNumber>,
2076 },
2077 Binary {
2078 element_type: DenseVectorElementType,
2079 byte_order: DenseVectorByteOrder,
2080 data_base64: String,
2081 #[serde(default, skip_serializing_if = "Option::is_none")]
2082 quantization_scale: Option<ApproximateNumber>,
2083 },
2084}
2085
2086pub const LODESTONE_API_SPARSE_VECTOR_ENTRY_FORMAT_VERSION: u16 = 1;
2087#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2088#[serde(deny_unknown_fields)]
2089pub struct SparseVectorEntry {
2090 pub dimension: u32,
2091 pub weight: ApproximateNumber,
2092}
2093
2094pub const LODESTONE_API_SPARSE_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
2095#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2096#[serde(deny_unknown_fields)]
2097pub struct SparseVectorValue {
2098 pub entries: Vec<SparseVectorEntry>,
2099}
2100
2101pub const LODESTONE_API_VECTOR_SET_VALUE_FORMAT_VERSION: u16 = 1;
2102#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2103#[serde(deny_unknown_fields)]
2104pub struct VectorSetValue {
2105 pub vectors: Vec<VectorValue>,
2106}
2107
2108pub const LODESTONE_API_VECTOR_EVALUATION_SNAPSHOT_FORMAT_VERSION: u16 = 1;
2109#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2110#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2111pub enum VectorEvaluationSnapshot {
2112 CommittedCut { digest: Digest },
2113 Pit { pit: Cursor },
2114}
2115
2116pub const LODESTONE_API_VECTOR_EVALUATION_QUERY_SET_FORMAT_VERSION: u16 = 1;
2117#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2118#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2119pub enum VectorEvaluationQuerySet {
2120 Sample { seed: U64, sample_count: u32 },
2121 Supplied { digest: Digest, queries: Vec<VectorValue> },
2122}
2123
2124pub const LODESTONE_API_VECTOR_EVALUATION_BUDGET_FORMAT_VERSION: u16 = 1;
2125#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2126#[serde(deny_unknown_fields)]
2127pub struct VectorEvaluationBudget {
2128 pub maximum_distance_evaluations: U64,
2129 pub maximum_elapsed_work_units: U64,
2130 pub maximum_peak_memory_bytes: U64,
2131 pub maximum_object_reads: U64,
2132 pub maximum_object_bytes: U64,
2133 pub maximum_build_scratch_bytes: U64,
2134 pub maximum_profile_comparisons: u32,
2135}
2136
2137pub const LODESTONE_API_VECTOR_CANDIDATE_POLICY_FORMAT_VERSION: u16 = 1;
2138#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2139#[serde(rename_all = "snake_case")]
2140pub enum VectorCandidatePolicy {
2141 Balanced,
2142 HighRecall,
2143 MemoryEfficient,
2144}
2145
2146pub const LODESTONE_API_VECTOR_CALIBRATION_OBJECTIVE_FORMAT_VERSION: u16 = 1;
2147#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2148#[serde(rename_all = "snake_case")]
2149pub enum VectorCalibrationObjective {
2150 Balanced,
2151 HighRecall,
2152 MemoryEfficient,
2153}
2154
2155pub const LODESTONE_API_VECTOR_STRATEGY_PROFILE_FORMAT_VERSION: u16 = 1;
2156#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2157#[serde(rename_all = "snake_case")]
2158pub enum VectorStrategyProfile {
2159 BalancedV1,
2160 HighRecallV1,
2161 MemoryEfficientV1,
2162}
2163
2164pub const LODESTONE_API_VECTOR_EVALUATION_WORK_FORMAT_VERSION: u16 = 1;
2165#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2166#[serde(deny_unknown_fields)]
2167pub struct VectorEvaluationWork {
2168 pub distance_evaluations: U64,
2169 pub elapsed_work_units: U64,
2170 pub peak_memory_bytes: U64,
2171 pub object_reads: U64,
2172 pub object_bytes: U64,
2173}
2174
2175pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_CODE_FORMAT_VERSION: u16 = 1;
2176#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2177#[serde(rename_all = "snake_case")]
2178pub enum VectorEvaluationErrorCode {
2179 AnnRefused,
2180 ExhaustiveRefused,
2181 TimedOut,
2182 Cancelled,
2183 Internal,
2184}
2185
2186pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_FORMAT_VERSION: u16 = 1;
2187#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2188#[serde(deny_unknown_fields)]
2189pub struct VectorEvaluationError {
2190 pub sample_ordinal: u32,
2191 pub code: VectorEvaluationErrorCode,
2192}
2193
2194pub const LODESTONE_API_VECTOR_RECALL_RESULT_SHAPE_VERSION: u16 = 1;
2195pub const LODESTONE_API_VECTOR_RECALL_RESULT_FORMAT_VERSION: u16 = 1;
2196#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2197#[serde(deny_unknown_fields)]
2198pub struct VectorRecallResult {
2199 pub format_version: u32,
2200 pub index: Resource,
2201 pub field: String,
2202 pub mapping_generation: U64,
2203 pub snapshot_digest: Digest,
2204 pub query_set_digest: Digest,
2205 pub metric: VectorMetric,
2206 pub k: u32,
2207 pub candidate_policy: VectorCandidatePolicy,
2208 pub strategy_identity: String,
2209 pub completed_samples: u32,
2210 pub ann_result_count: U64,
2211 pub exhaustive_result_count: U64,
2212 pub mean_recall_basis_points: u32,
2213 pub minimum_recall_basis_points: u32,
2214 pub p05_recall_basis_points: u32,
2215 pub p50_recall_basis_points: u32,
2216 pub p90_recall_basis_points: u32,
2217 pub p99_recall_basis_points: u32,
2218 pub ann_work: VectorEvaluationWork,
2219 pub exhaustive_work: VectorEvaluationWork,
2220 pub errors: Vec<VectorEvaluationError>,
2221}
2222
2223pub const LODESTONE_API_VECTOR_CALIBRATION_CANDIDATE_FORMAT_VERSION: u16 = 1;
2224#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2225#[serde(deny_unknown_fields)]
2226pub struct VectorCalibrationCandidate {
2227 pub profile: VectorStrategyProfile,
2228 pub recall: VectorRecallResult,
2229 pub build_scratch_bytes: U64,
2230 pub resident_bytes: U64,
2231 pub evidence_digest: Digest,
2232}
2233
2234pub const LODESTONE_API_VECTOR_CALIBRATION_RESULT_SHAPE_VERSION: u16 = 1;
2235pub const LODESTONE_API_VECTOR_CALIBRATION_RESULT_FORMAT_VERSION: u16 = 1;
2236#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2237#[serde(deny_unknown_fields)]
2238pub struct VectorCalibrationResult {
2239 pub format_version: u32,
2240 pub objective: VectorCalibrationObjective,
2241 pub candidates: Vec<VectorCalibrationCandidate>,
2242 pub recommended_profile: VectorStrategyProfile,
2243 pub recommended_evidence_digest: Digest,
2244 pub requires_explicit_resource_revision_and_rebuild: bool,
2245}
2246
2247pub const LODESTONE_API_VECTOR_DIAGNOSTIC_RESULT_FORMAT_VERSION: u16 = 1;
2248#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2249#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2250pub enum VectorDiagnosticResult {
2251 Recall { result: Box<VectorRecallResult> },
2252 Calibration { result: Box<VectorCalibrationResult> },
2253}
2254
2255pub const LODESTONE_API_VECTOR_WARM_COMPONENT_FORMAT_VERSION: u16 = 1;
2256#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2257#[serde(rename_all = "snake_case")]
2258pub enum VectorWarmComponent {
2259 Directory,
2260 Approximate,
2261 Exact,
2262}
2263
2264pub const LODESTONE_API_VECTOR_WARM_STATE_FORMAT_VERSION: u16 = 1;
2265#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2266#[serde(rename_all = "snake_case")]
2267pub enum VectorWarmState {
2268 Warmed,
2269 Partial,
2270 Stale,
2271}
2272
2273pub const LODESTONE_API_VECTOR_WARM_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
2274#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2275#[serde(deny_unknown_fields)]
2276pub struct VectorWarmAchievement {
2277 pub component: VectorWarmComponent,
2278 pub cache_identity: Digest,
2279 pub resident_bytes: U64,
2280}
2281
2282pub const LODESTONE_API_VECTOR_WARM_RESULT_SHAPE_VERSION: u16 = 1;
2283pub const LODESTONE_API_VECTOR_WARM_RESULT_FORMAT_VERSION: u16 = 1;
2284#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2285#[serde(deny_unknown_fields)]
2286pub struct VectorWarmResult {
2287 pub format_version: u32,
2288 pub operation_identity: Digest,
2289 pub index: Resource,
2290 pub root_digest: Digest,
2291 pub state: VectorWarmState,
2292 pub progress: ExactDecimal,
2293 pub achieved: Vec<VectorWarmAchievement>,
2294 pub object_requests: U64,
2295 pub object_bytes: U64,
2296 pub cache_hits: U64,
2297 pub cache_misses: U64,
2298 pub started_at: U64,
2299 pub completed_at: U64,
2300 pub expires_at: U64,
2301 #[serde(default, skip_serializing_if = "Option::is_none")]
2302 pub residency_intent: Option<VectorResidencyIntent>,
2303}
2304
2305pub const LODESTONE_API_DENSE_RETRIEVAL_THRESHOLD_FORMAT_VERSION: u16 = 1;
2306#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2307#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2308pub enum DenseRetrievalThreshold {
2309 MinimumScore { value: ApproximateNumber },
2310 MaximumDistance { value: ApproximateNumber },
2311}
2312
2313pub const LODESTONE_API_RETRIEVAL_BRANCH_FORMAT_VERSION: u16 = 3;
2314#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2315#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2316pub enum RetrievalBranch {
2317 Lexical {
2318 name: String,
2319 query: Box<Query>,
2320 #[serde(default, skip_serializing_if = "Option::is_none")]
2321 filter: Option<Box<Query>>,
2322 window: u32,
2323 weight: ApproximateNumber,
2324 },
2325 Dense {
2326 name: String,
2327 field: String,
2328 query_vector: VectorValue,
2329 #[serde(default, skip_serializing_if = "Option::is_none")]
2330 filter: Option<Box<Query>>,
2331 window: u32,
2332 #[serde(default, skip_serializing_if = "Option::is_none")]
2333 candidates: Option<u32>,
2334 weight: ApproximateNumber,
2335 mode: DenseRetrievalMode,
2336 #[serde(default, skip_serializing_if = "Option::is_none")]
2337 threshold: Option<DenseRetrievalThreshold>,
2338 },
2339 Sparse {
2340 name: String,
2341 field: String,
2342 query_vector: SparseVectorValue,
2343 #[serde(default, skip_serializing_if = "Option::is_none")]
2344 filter: Option<Box<Query>>,
2345 window: u32,
2346 weight: ApproximateNumber,
2347 },
2348 LateInteraction {
2349 name: String,
2350 field: String,
2351 query_vectors: VectorSetValue,
2352 #[serde(default, skip_serializing_if = "Option::is_none")]
2353 filter: Option<Box<Query>>,
2354 window: u32,
2355 candidates: u32,
2356 weight: ApproximateNumber,
2357 },
2358}
2359
2360pub const LODESTONE_API_WEIGHTED_RRF_FUSION_FORMAT_VERSION: u16 = 1;
2361#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2362#[serde(deny_unknown_fields)]
2363pub struct WeightedRrfFusion {
2364 pub rank_constant: u32,
2365}
2366
2367pub const LODESTONE_API_RETRIEVAL_PLAN_SHAPE_VERSION: u16 = 1;
2368pub const LODESTONE_API_RETRIEVAL_PLAN_FORMAT_VERSION: u16 = 1;
2369#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2370#[serde(deny_unknown_fields)]
2371pub struct RetrievalPlan {
2372 pub format_version: u32,
2373 #[serde(default, skip_serializing_if = "Option::is_none")]
2374 pub global_filter: Option<Box<Query>>,
2375 pub branches: Vec<RetrievalBranch>,
2376 pub fusion: WeightedRrfFusion,
2377 pub result_window: u32,
2378}
2379
2380pub const LODESTONE_API_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
2381#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2382#[serde(deny_unknown_fields)]
2383pub struct HistogramBounds {
2384 #[serde(default, skip_serializing_if = "Option::is_none")]
2385 pub min: Option<ApproximateNumber>,
2386 #[serde(default, skip_serializing_if = "Option::is_none")]
2387 pub max: Option<ApproximateNumber>,
2388}
2389
2390pub const LODESTONE_API_DATE_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
2391#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2392#[serde(deny_unknown_fields)]
2393pub struct DateHistogramBounds {
2394 #[serde(default, skip_serializing_if = "Option::is_none")]
2395 pub min: Option<I64>,
2396 #[serde(default, skip_serializing_if = "Option::is_none")]
2397 pub max: Option<I64>,
2398}
2399
2400pub const LODESTONE_API_APPROXIMATION_ALGORITHM_FORMAT_VERSION: u16 = 1;
2401#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2402#[serde(rename_all = "snake_case")]
2403pub enum ApproximationAlgorithm {
2404 HyperloglogV1,
2405 FloatPrefixHistogramV1,
2406}
2407
2408pub const LODESTONE_API_APPROXIMATION_FORMAT_VERSION: u16 = 1;
2409#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2410#[serde(deny_unknown_fields)]
2411pub struct Approximation {
2412 pub algorithm: ApproximationAlgorithm,
2413 pub algorithm_version: u32,
2414 pub precision: u32,
2415 pub state_bytes: U64,
2416 #[serde(default, skip_serializing_if = "Option::is_none")]
2417 pub relative_standard_error: Option<ApproximateNumber>,
2418 #[serde(default, skip_serializing_if = "Option::is_none")]
2419 pub maximum_rank_error: Option<ApproximateNumber>,
2420}
2421
2422pub const LODESTONE_API_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
2423#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2424#[serde(deny_unknown_fields)]
2425pub struct PercentileValue {
2426 pub percent: ApproximateNumber,
2427 #[serde(default, skip_serializing_if = "Option::is_none")]
2428 pub value: Option<ApproximateNumber>,
2429}
2430
2431pub const LODESTONE_API_APPROXIMATE_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
2432#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2433#[serde(deny_unknown_fields)]
2434pub struct ApproximatePercentileValue {
2435 pub percent: ApproximateNumber,
2436 pub value: ApproximateNumber,
2437 pub lower_bound: ApproximateNumber,
2438 pub upper_bound: ApproximateNumber,
2439 pub maximum_rank_error: ApproximateNumber,
2440}
2441
2442pub const LODESTONE_API_TIME_SERIES_OPERATOR_FORMAT_VERSION: u16 = 1;
2443#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2444#[serde(rename_all = "snake_case")]
2445pub enum TimeSeriesOperator {
2446 Raw,
2447 Sum,
2448 Count,
2449 Min,
2450 Max,
2451 Average,
2452 Delta,
2453 Increase,
2454 Rate,
2455 HistogramMerge,
2456 Quantiles,
2457}
2458
2459pub const LODESTONE_API_TIME_SERIES_MISSING_DATA_FORMAT_VERSION: u16 = 1;
2460#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2461#[serde(rename_all = "snake_case")]
2462pub enum TimeSeriesMissingData {
2463 Omit,
2464 ExplicitEmpty,
2465}
2466
2467pub const LODESTONE_API_TIME_SERIES_QUANTILE_MODE_FORMAT_VERSION: u16 = 1;
2468#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2469#[serde(rename_all = "snake_case")]
2470pub enum TimeSeriesQuantileMode {
2471 Exact,
2472 Approximate,
2473}
2474
2475pub const LODESTONE_API_TIME_SERIES_BUCKET_STATE_FORMAT_VERSION: u16 = 1;
2476#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2477#[serde(rename_all = "snake_case")]
2478pub enum TimeSeriesBucketState {
2479 Observed,
2480 ExplicitEmpty,
2481}
2482
2483pub const LODESTONE_API_TIME_SERIES_QUANTILE_VALUE_FORMAT_VERSION: u16 = 1;
2484#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2485#[serde(deny_unknown_fields)]
2486pub struct TimeSeriesQuantileValue {
2487 pub quantile: ApproximateNumber,
2488 #[serde(default, skip_serializing_if = "Option::is_none")]
2489 pub value: Option<MetricNumber>,
2490 #[serde(default, skip_serializing_if = "Option::is_none")]
2491 pub lower_bound: Option<MetricNumber>,
2492 #[serde(default, skip_serializing_if = "Option::is_none")]
2493 pub upper_bound: Option<MetricNumber>,
2494 #[serde(default, skip_serializing_if = "Option::is_none")]
2495 pub maximum_rank_error: Option<ApproximateNumber>,
2496}
2497
2498pub const LODESTONE_API_TIME_SERIES_VALUE_FORMAT_VERSION: u16 = 1;
2499#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2500#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2501pub enum TimeSeriesValue {
2502 Raw {
2503 values: Vec<MetricNumber>,
2504 },
2505 Number {
2506 value: MetricNumber,
2507 algorithm: String,
2508 },
2509 Count {
2510 value: U64,
2511 },
2512 ExplicitHistogram {
2513 count: U64,
2514 #[serde(default, skip_serializing_if = "Option::is_none")]
2515 sum: Option<MetricNumber>,
2516 bounds_f64_bits: Vec<U64>,
2517 bucket_counts: Vec<U64>,
2518 },
2519 ExponentialHistogram {
2520 count: U64,
2521 #[serde(default, skip_serializing_if = "Option::is_none")]
2522 sum: Option<MetricNumber>,
2523 scale: i32,
2524 zero_count: U64,
2525 positive: MetricExponentialBuckets,
2526 negative: MetricExponentialBuckets,
2527 },
2528 Quantiles {
2529 values: Vec<TimeSeriesQuantileValue>,
2530 exact: bool,
2531 algorithm: String,
2532 algorithm_version: u32,
2533 state_bytes: U64,
2534 },
2535}
2536
2537pub const LODESTONE_API_TIME_SERIES_BUCKET_FORMAT_VERSION: u16 = 1;
2538#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2539#[serde(deny_unknown_fields)]
2540pub struct TimeSeriesBucket {
2541 pub start_unix_nanos: U64,
2542 pub end_unix_nanos: U64,
2543 pub group: Vec<MetricAttribute>,
2544 pub state: TimeSeriesBucketState,
2545 pub reset: bool,
2546 #[serde(default, skip_serializing_if = "Option::is_none")]
2547 pub value: Option<TimeSeriesValue>,
2548 pub exemplars: Vec<MetricExemplar>,
2549}
2550
2551pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_DIRECTION_FORMAT_VERSION: u16 = 1;
2552#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2553#[serde(rename_all = "snake_case")]
2554pub enum RelationshipTraversalDirection {
2555 Inbound,
2556 Outbound,
2557 Both,
2558}
2559
2560pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_FILTER_FORMAT_VERSION: u16 = 1;
2561#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2562#[serde(deny_unknown_fields)]
2563pub struct RelationshipTraversalFilter {
2564 pub relationship_types: Vec<String>,
2565 pub assertion_classes: Vec<String>,
2566 pub provenance: Vec<String>,
2567 #[serde(default, skip_serializing_if = "Option::is_none")]
2568 pub valid_from_unix_nanos: Option<U64>,
2569 #[serde(default, skip_serializing_if = "Option::is_none")]
2570 pub valid_through_unix_nanos: Option<U64>,
2571}
2572
2573pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_BUDGET_FORMAT_VERSION: u16 = 1;
2574#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2575#[serde(deny_unknown_fields)]
2576pub struct RelationshipTraversalBudget {
2577 pub maximum_depth: u32,
2578 pub maximum_fan_out: u32,
2579 pub maximum_visited_entities: u32,
2580 pub maximum_visited_relationships: u32,
2581 pub maximum_returned_relationships: u32,
2582 pub maximum_memory_bytes: U64,
2583}
2584
2585pub const LODESTONE_API_TRAVERSED_RELATIONSHIP_FORMAT_VERSION: u16 = 1;
2586#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2587#[serde(deny_unknown_fields)]
2588pub struct TraversedRelationship {
2589 pub depth: u32,
2590 pub from: EntityRef,
2591 pub to: EntityRef,
2592 pub relationship: RelationshipRecord,
2593}
2594
2595pub const LODESTONE_API_PROFILE_QUERY_OPERATION_FORMAT_VERSION: u16 = 1;
2596#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2597#[serde(rename_all = "snake_case")]
2598pub enum ProfileQueryOperation {
2599 Flamegraph,
2600 TopStacks,
2601 TopFunctions,
2602 SampleTable,
2603}
2604
2605pub const LODESTONE_API_PROFILE_GROUP_BY_FORMAT_VERSION: u16 = 1;
2606#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2607#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2608pub enum ProfileGroupBy {
2609 ResourceAttribute { key: String },
2610 SampleLabel { key: String },
2611 BuildId,
2612 ModuleId,
2613}
2614
2615pub const LODESTONE_API_PROFILE_QUERY_FILTER_FORMAT_VERSION: u16 = 1;
2616#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2617#[serde(deny_unknown_fields)]
2618pub struct ProfileQueryFilter {
2619 pub profile_ids: Vec<String>,
2620 pub build_ids: Vec<String>,
2621 pub module_ids: Vec<String>,
2622 pub function_ids: Vec<String>,
2623 pub trace_ids: Vec<String>,
2624 pub span_ids: Vec<String>,
2625}
2626
2627pub const LODESTONE_API_PROFILE_QUERY_BUDGET_FORMAT_VERSION: u16 = 1;
2628#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2629#[serde(deny_unknown_fields)]
2630pub struct ProfileQueryBudget {
2631 pub maximum_batches: u32,
2632 pub maximum_samples: u32,
2633 pub maximum_results: u32,
2634 pub maximum_memory_bytes: U64,
2635}
2636
2637pub const LODESTONE_API_PROFILE_QUERY_ROW_FORMAT_VERSION: u16 = 1;
2638#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2639#[serde(deny_unknown_fields)]
2640pub struct ProfileQueryRow {
2641 pub key: String,
2642 pub stack: Vec<String>,
2643 pub value: MetricNumber,
2644 pub sample_count: U64,
2645}
2646
2647pub const LODESTONE_API_TEMPORAL_INPUT_FORMAT_VERSION: u16 = 1;
2648#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2649#[serde(deny_unknown_fields)]
2650pub struct TemporalInput {
2651 pub index: Resource,
2652 pub schema_generation: U64,
2653}
2654
2655pub const LODESTONE_API_TEMPORAL_PATTERN_FORMAT_VERSION: u16 = 1;
2656#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2657#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2658pub enum TemporalPattern {
2659 Event {
2660 node_id: String,
2661 query: Box<Query>,
2662 },
2663 Sequence {
2664 node_id: String,
2665 branches: Vec<TemporalPattern>,
2666 within_nanos: U64,
2667 },
2668 AllOf {
2669 node_id: String,
2670 branches: Vec<TemporalPattern>,
2671 within_nanos: U64,
2672 },
2673 AnyOf {
2674 node_id: String,
2675 branches: Vec<TemporalPattern>,
2676 },
2677 Count {
2678 node_id: String,
2679 pattern: Box<TemporalPattern>,
2680 minimum: u32,
2681 within_nanos: U64,
2682 },
2683 Repetition {
2684 node_id: String,
2685 pattern: Box<TemporalPattern>,
2686 count: u32,
2687 within_nanos: U64,
2688 },
2689 NotFollowedBy {
2690 node_id: String,
2691 anchor: Box<TemporalPattern>,
2692 forbidden: Box<TemporalPattern>,
2693 within_nanos: U64,
2694 },
2695}
2696
2697pub const LODESTONE_API_HISTORICAL_TEMPORAL_DEFINITION_SHAPE_VERSION: u16 = 1;
2698pub const LODESTONE_API_HISTORICAL_TEMPORAL_DEFINITION_FORMAT_VERSION: u16 = 1;
2699#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2700#[serde(deny_unknown_fields)]
2701pub struct HistoricalTemporalDefinition {
2702 pub format_version: u32,
2703 pub pattern_generation: U64,
2704 pub inputs: Vec<TemporalInput>,
2705 pub event_time_field: String,
2706 pub correlation_fields: Vec<String>,
2707 pub pattern: TemporalPattern,
2708 pub watermark_unix_nanos: U64,
2709 pub maximum_events: u32,
2710 pub maximum_states: u32,
2711 pub maximum_captured_events: u32,
2712 pub maximum_results: u32,
2713 pub maximum_state_bytes: U64,
2714}
2715
2716pub const LODESTONE_API_TEMPORAL_EVIDENCE_STATUS_FORMAT_VERSION: u16 = 2;
2717#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2718#[serde(rename_all = "snake_case")]
2719pub enum TemporalEvidenceStatus {
2720 Provisional,
2721 Final,
2722 Correction,
2723 Retraction,
2724}
2725
2726pub const LODESTONE_API_TEMPORAL_SOURCE_EVENT_FORMAT_VERSION: u16 = 1;
2727#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2728#[serde(deny_unknown_fields)]
2729pub struct TemporalSourceEvent {
2730 pub index: Resource,
2731 pub shard_id: u32,
2732 pub recovery_era: Identity,
2733 pub sequence: U64,
2734 pub document_id: String,
2735}
2736
2737pub const LODESTONE_API_TEMPORAL_EVIDENCE_FORMAT_VERSION: u16 = 2;
2738#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2739#[serde(deny_unknown_fields)]
2740pub struct TemporalEvidence {
2741 pub evidence_id: Digest,
2742 pub pattern_generation: U64,
2743 pub pattern_digest: Digest,
2744 pub correlation_key: Vec<JsonValue>,
2745 pub matched_node_id: String,
2746 pub interval_start_unix_nanos: U64,
2747 pub interval_end_unix_nanos: U64,
2748 pub watermark_unix_nanos: U64,
2749 pub source_events: Vec<TemporalSourceEvent>,
2750 pub input_cut_digest: Digest,
2751 pub status: TemporalEvidenceStatus,
2752 #[serde(default, skip_serializing_if = "Option::is_none")]
2753 pub predecessor_evidence_id: Option<Digest>,
2754}
2755
2756pub const LODESTONE_API_CONTINUOUS_TEMPORAL_START_FORMAT_VERSION: u16 = 1;
2757#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2758#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2759pub enum ContinuousTemporalStart {
2760 FromCurrentHeads,
2761 HistoricalThenFollow { pit: Cursor },
2762}
2763
2764pub const LODESTONE_API_CONTINUOUS_TEMPORAL_WATERMARK_POLICY_FORMAT_VERSION: u16 = 1;
2765#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2766#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2767pub enum ContinuousTemporalWatermarkPolicy {
2768 MaximumObservedMinusOutOfOrder {
2769 allowed_out_of_orderness_nanos: U64,
2770 },
2771 MappingBoundEvent {
2772 allowed_out_of_orderness_nanos: U64,
2773 predicate: Box<Query>,
2774 timestamp_field: String,
2775 },
2776}
2777
2778pub const LODESTONE_API_CONTINUOUS_TEMPORAL_LATE_DATA_POLICY_FORMAT_VERSION: u16 = 1;
2779#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2780#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2781pub enum ContinuousTemporalLateDataPolicy {
2782 RecomputeWithinHorizon { correction_horizon_nanos: U64 },
2783 PauseWithGap,
2784}
2785
2786pub const LODESTONE_API_CONTINUOUS_TEMPORAL_OUTPUT_FORMAT_VERSION: u16 = 1;
2787#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2788#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2789pub enum ContinuousTemporalOutput {
2790 InternalResults {
2791 maximum_retained_records: U64,
2792 maximum_retained_bytes: U64,
2793 maximum_retained_event_age_nanos: U64,
2794 },
2795 MaterializedIndex {
2796 index: Resource,
2797 schema_generation: U64,
2798 },
2799}
2800
2801pub const LODESTONE_API_CONTINUOUS_TEMPORAL_DEFINITION_SHAPE_VERSION: u16 = 1;
2802pub const LODESTONE_API_CONTINUOUS_TEMPORAL_DEFINITION_FORMAT_VERSION: u16 = 1;
2803#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2804#[serde(deny_unknown_fields)]
2805pub struct ContinuousTemporalDefinition {
2806 pub format_version: u32,
2807 pub evaluation_id: Identity,
2808 pub pattern_generation: U64,
2809 pub inputs: Vec<TemporalInput>,
2810 pub event_time_field: String,
2811 pub correlation_fields: Vec<String>,
2812 pub pattern: TemporalPattern,
2813 pub start: ContinuousTemporalStart,
2814 pub watermark_policy: ContinuousTemporalWatermarkPolicy,
2815 pub late_data_policy: ContinuousTemporalLateDataPolicy,
2816 pub maximum_events_per_step: u32,
2817 pub maximum_states: u32,
2818 pub maximum_captured_events: u32,
2819 pub maximum_results: u32,
2820 pub maximum_state_bytes: U64,
2821 pub maximum_lag_bytes: U64,
2822 pub maximum_lag_events: U64,
2823 pub maximum_lag_event_age_nanos: U64,
2824 pub output: ContinuousTemporalOutput,
2825}
2826
2827pub const LODESTONE_API_CONTINUOUS_TEMPORAL_FRONTIER_FORMAT_VERSION: u16 = 1;
2828#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2829#[serde(deny_unknown_fields)]
2830pub struct ContinuousTemporalFrontier {
2831 pub index: Resource,
2832 pub shard_id: u32,
2833 pub recovery_era: Identity,
2834 pub routing_revision: U64,
2835 pub registered_wal_frontier: U64,
2836 #[serde(default, skip_serializing_if = "Option::is_none")]
2837 pub watermark_unix_nanos: Option<U64>,
2838}
2839
2840pub const LODESTONE_API_CONTINUOUS_TEMPORAL_AVAILABLE_FRONTIER_FORMAT_VERSION: u16 = 1;
2841#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2842#[serde(deny_unknown_fields)]
2843pub struct ContinuousTemporalAvailableFrontier {
2844 pub index: Resource,
2845 pub shard_id: u32,
2846 pub sequence: U64,
2847}
2848
2849pub const LODESTONE_API_CONTINUOUS_TEMPORAL_GAP_REASON_FORMAT_VERSION: u16 = 1;
2850#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2851#[serde(rename_all = "snake_case")]
2852pub enum ContinuousTemporalGapReason {
2853 RetentionGap,
2854 LateDataGap,
2855 SchemaGap,
2856 RouteGap,
2857 OutputGap,
2858}
2859
2860pub const LODESTONE_API_CONTINUOUS_TEMPORAL_GAP_FORMAT_VERSION: u16 = 1;
2861#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2862#[serde(deny_unknown_fields)]
2863pub struct ContinuousTemporalGap {
2864 pub reason: ContinuousTemporalGapReason,
2865 pub last_complete_frontiers: Vec<ContinuousTemporalFrontier>,
2866 pub earliest_available_frontiers: Vec<ContinuousTemporalAvailableFrontier>,
2867}
2868
2869pub const LODESTONE_API_CONTINUOUS_TEMPORAL_EVALUATION_SHAPE_VERSION: u16 = 1;
2870pub const LODESTONE_API_CONTINUOUS_TEMPORAL_EVALUATION_FORMAT_VERSION: u16 = 1;
2871#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2872#[serde(deny_unknown_fields)]
2873pub struct ContinuousTemporalEvaluation {
2874 pub format_version: u32,
2875 pub evaluation_id: Identity,
2876 pub generation: U64,
2877 pub revision: U64,
2878 pub definition_digest: Digest,
2879 pub definition: ContinuousTemporalDefinition,
2880 pub lifecycle: String,
2881 pub frontiers: Vec<ContinuousTemporalFrontier>,
2882 #[serde(default, skip_serializing_if = "Option::is_none")]
2883 pub global_watermark_unix_nanos: Option<U64>,
2884 pub state_bytes: U64,
2885 pub active_states: U64,
2886 pub active_timers: U64,
2887 pub retained_results: U64,
2888 pub pending_emissions: U64,
2889 #[serde(default, skip_serializing_if = "Option::is_none")]
2890 pub last_materialized_frontier_digest: Option<Digest>,
2891 pub retry_count: u32,
2892 #[serde(default, skip_serializing_if = "Option::is_none")]
2893 pub gap: Option<ContinuousTemporalGap>,
2894}
2895
2896pub const LODESTONE_API_COMPOSITE_ORDER_FORMAT_VERSION: u16 = 1;
2897#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2898#[serde(rename_all = "snake_case")]
2899pub enum CompositeOrder {
2900 Asc,
2901 Desc,
2902}
2903
2904pub const LODESTONE_API_COMPOSITE_SOURCE_FORMAT_VERSION: u16 = 1;
2905#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2906#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2907pub enum CompositeSource {
2908 Terms {
2909 name: String,
2910 field: String,
2911 order: CompositeOrder,
2912 },
2913 DateHistogram {
2914 name: String,
2915 field: String,
2916 #[serde(default, skip_serializing_if = "Option::is_none")]
2917 fixed_interval_millis: Option<U64>,
2918 #[serde(default, skip_serializing_if = "Option::is_none")]
2919 calendar_interval: Option<String>,
2920 #[serde(default, skip_serializing_if = "Option::is_none")]
2921 time_zone: Option<String>,
2922 offset_millis: I64,
2923 order: CompositeOrder,
2924 },
2925}
2926
2927pub const LODESTONE_API_AGGREGATION_FORMAT_VERSION: u16 = 3;
2928#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2929#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2930pub enum Aggregation {
2931 Terms {
2932 name: String,
2933 field: String,
2934 size: u32,
2935 sub_aggregations: Vec<Aggregation>,
2936 },
2937 Histogram {
2938 name: String,
2939 field: String,
2940 interval: ApproximateNumber,
2941 min_doc_count: U64,
2942 #[serde(default, skip_serializing_if = "Option::is_none")]
2943 extended_bounds: Option<HistogramBounds>,
2944 #[serde(default, skip_serializing_if = "Option::is_none")]
2945 hard_bounds: Option<HistogramBounds>,
2946 offset: ApproximateNumber,
2947 #[serde(default, skip_serializing_if = "Option::is_none")]
2948 missing: Option<ApproximateNumber>,
2949 sub_aggregations: Vec<Aggregation>,
2950 },
2951 Cardinality {
2952 name: String,
2953 field: String,
2954 },
2955 Percentiles {
2956 name: String,
2957 field: String,
2958 percents: Vec<ApproximateNumber>,
2959 },
2960 ApproximateCardinality {
2961 name: String,
2962 field: String,
2963 precision: u32,
2964 },
2965 ApproximatePercentiles {
2966 name: String,
2967 field: String,
2968 percents: Vec<ApproximateNumber>,
2969 precision: u32,
2970 },
2971 Sum {
2972 name: String,
2973 field: String,
2974 },
2975 Avg {
2976 name: String,
2977 field: String,
2978 },
2979 Min {
2980 name: String,
2981 field: String,
2982 },
2983 Max {
2984 name: String,
2985 field: String,
2986 },
2987 Stats {
2988 name: String,
2989 field: String,
2990 },
2991 DateHistogram {
2992 name: String,
2993 field: String,
2994 #[serde(default, skip_serializing_if = "Option::is_none")]
2995 fixed_interval_millis: Option<U64>,
2996 #[serde(default, skip_serializing_if = "Option::is_none")]
2997 calendar_interval: Option<String>,
2998 #[serde(default, skip_serializing_if = "Option::is_none")]
2999 time_zone: Option<String>,
3000 min_doc_count: U64,
3001 #[serde(default, skip_serializing_if = "Option::is_none")]
3002 extended_bounds: Option<DateHistogramBounds>,
3003 #[serde(default, skip_serializing_if = "Option::is_none")]
3004 hard_bounds: Option<DateHistogramBounds>,
3005 offset_millis: I64,
3006 #[serde(default, skip_serializing_if = "Option::is_none")]
3007 missing: Option<I64>,
3008 sub_aggregations: Vec<Aggregation>,
3009 },
3010 Composite {
3011 name: String,
3012 size: u32,
3013 sources: Vec<CompositeSource>,
3014 #[serde(default, skip_serializing_if = "Option::is_none")]
3015 after: Option<Cursor>,
3016 sub_aggregations: Vec<Aggregation>,
3017 },
3018 Filter {
3019 name: String,
3020 query: Box<Query>,
3021 sub_aggregations: Vec<Aggregation>,
3022 },
3023 Nested {
3024 name: String,
3025 path: String,
3026 sub_aggregations: Vec<Aggregation>,
3027 },
3028 ReverseNested {
3029 name: String,
3030 #[serde(default, skip_serializing_if = "Option::is_none")]
3031 path: Option<String>,
3032 sub_aggregations: Vec<Aggregation>,
3033 },
3034 TimeSeriesV1 {
3035 name: String,
3036 metric_name: String,
3037 unit: String,
3038 point_kind: MetricPointKind,
3039 #[serde(default, skip_serializing_if = "Option::is_none")]
3040 temporality: Option<MetricTemporality>,
3041 #[serde(default, skip_serializing_if = "Option::is_none")]
3042 monotonic: Option<bool>,
3043 range_start_unix_nanos: U64,
3044 range_end_unix_nanos: U64,
3045 bucket_width_nanos: U64,
3046 alignment_origin_unix_nanos: U64,
3047 group_by: Vec<String>,
3048 operator: TimeSeriesOperator,
3049 missing_data: TimeSeriesMissingData,
3050 quantiles: Vec<ApproximateNumber>,
3051 quantile_mode: TimeSeriesQuantileMode,
3052 maximum_exemplars: u32,
3053 maximum_points: u32,
3054 maximum_series: u32,
3055 maximum_buckets: u32,
3056 maximum_results: u32,
3057 maximum_state_bytes: U64,
3058 },
3059}
3060
3061pub const LODESTONE_API_NESTED_SEARCH_HIT_FORMAT_VERSION: u16 = 2;
3062#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3063#[serde(deny_unknown_fields)]
3064pub struct NestedSearchHit {
3065 pub path: String,
3066 pub ordinal: u32,
3067 #[serde(default, skip_serializing_if = "Option::is_none")]
3068 pub score: Option<ApproximateNumber>,
3069 #[serde(default, skip_serializing_if = "Option::is_none")]
3070 pub source: Option<RawJson>,
3071 pub sort: Vec<JsonValue>,
3072}
3073
3074pub const LODESTONE_API_NAMED_NESTED_INNER_HITS_RESULT_FORMAT_VERSION: u16 = 1;
3075#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3076#[serde(deny_unknown_fields)]
3077pub struct NamedNestedInnerHitsResult {
3078 pub name: String,
3079 pub total: U64,
3080 pub hits: Vec<NestedSearchHit>,
3081}
3082
3083pub const LODESTONE_API_FRAGMENT_BOUNDARY_FORMAT_VERSION: u16 = 1;
3084#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3085#[serde(rename_all = "snake_case")]
3086pub enum FragmentBoundary {
3087 Word,
3088 Sentence,
3089 Paragraph,
3090 WholeField,
3091}
3092
3093pub const LODESTONE_API_FRAGMENT_OFFSET_ENCODING_FORMAT_VERSION: u16 = 1;
3094#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3095#[serde(rename_all = "snake_case")]
3096pub enum FragmentOffsetEncoding {
3097 Utf8Bytes,
3098 Utf16CodeUnits,
3099 UnicodeCodepoints,
3100}
3101
3102pub const LODESTONE_API_FRAGMENT_RANKER_FORMAT_VERSION: u16 = 1;
3103#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3104#[serde(rename_all = "snake_case")]
3105pub enum FragmentRanker {
3106 LexicalMatchCountV1,
3107}
3108
3109pub const LODESTONE_API_FRAGMENT_REQUEST_FORMAT_VERSION: u16 = 1;
3110#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3111#[serde(deny_unknown_fields)]
3112pub struct FragmentRequest {
3113 pub fields: Vec<String>,
3114 pub max_fragment_bytes: u32,
3115 pub max_fragments: u32,
3116 pub boundary: FragmentBoundary,
3117 pub offset_encoding: FragmentOffsetEncoding,
3118 pub ranker: FragmentRanker,
3119}
3120
3121pub const LODESTONE_API_SEARCH_FRAGMENT_FORMAT_VERSION: u16 = 1;
3122#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3123#[serde(deny_unknown_fields)]
3124pub struct SearchFragment {
3125 pub field: String,
3126 pub text: String,
3127 pub start: u32,
3128 pub end: u32,
3129 pub offset_encoding: FragmentOffsetEncoding,
3130 pub rank: u32,
3131 pub match_count: u32,
3132 pub truncated: bool,
3133 pub partial: bool,
3134}
3135
3136pub const LODESTONE_API_NUMERIC_FEATURE_TRANSFORM_FORMAT_VERSION: u16 = 1;
3137#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3138#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3139pub enum NumericFeatureTransform {
3140 Identity,
3141 Log1p,
3142 Clamp {
3143 minimum: ApproximateNumber,
3144 maximum: ApproximateNumber,
3145 },
3146}
3147
3148pub const LODESTONE_API_NUMERIC_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
3149#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3150#[serde(deny_unknown_fields)]
3151pub struct NumericResultFeature {
3152 pub name: String,
3153 pub field: String,
3154 pub transform: NumericFeatureTransform,
3155}
3156
3157pub const LODESTONE_API_RESULT_FEATURE_REQUEST_FORMAT_VERSION: u16 = 1;
3158#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3159#[serde(deny_unknown_fields)]
3160pub struct ResultFeatureRequest {
3161 pub top_n: u32,
3162 pub include_branch_components: bool,
3163 pub numeric: Vec<NumericResultFeature>,
3164}
3165
3166pub const LODESTONE_API_RESULT_DIVERSIFICATION_FORMAT_VERSION: u16 = 1;
3167#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3168#[serde(deny_unknown_fields)]
3169pub struct ResultDiversification {
3170 pub fields: Vec<String>,
3171 pub max_per_group: u32,
3172}
3173
3174pub const LODESTONE_API_SOURCE_PROJECTION_FORMAT_VERSION: u16 = 1;
3175#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3176#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3177pub enum SourceProjection {
3178 Full,
3179 Omit,
3180 Filter {
3181 includes: Vec<String>,
3182 excludes: Vec<String>,
3183 },
3184}
3185
3186pub const LODESTONE_API_BRANCH_SCORE_KIND_FORMAT_VERSION: u16 = 2;
3187#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3188#[serde(rename_all = "snake_case")]
3189pub enum BranchScoreKind {
3190 LexicalScore,
3191 DenseSimilarity,
3192 SparseDotProduct,
3193 LateInteractionMaxsim,
3194}
3195
3196pub const LODESTONE_API_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
3197#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3198#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3199pub enum ResultFeature {
3200 Branch {
3201 branch: String,
3202 score_kind: BranchScoreKind,
3203 rank: u32,
3204 score: ApproximateNumber,
3205 },
3206 Numeric {
3207 name: String,
3208 field: String,
3209 value: ApproximateNumber,
3210 },
3211}
3212
3213pub const LODESTONE_API_NATIVE_RECORD_LOCATOR_FORMAT_VERSION: u16 = 1;
3214#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3215#[serde(deny_unknown_fields)]
3216pub struct NativeRecordLocator {
3217 pub document_id: String,
3218 pub shard_id: u32,
3219 pub sequence: U64,
3220 pub primary_term: U64,
3221}
3222
3223pub const LODESTONE_API_SEARCH_HIT_FORMAT_VERSION: u16 = 4;
3224#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3225#[serde(deny_unknown_fields)]
3226pub struct SearchHit {
3227 pub index: Resource,
3228 pub document_id: String,
3229 pub record_locator: NativeRecordLocator,
3230 #[serde(default, skip_serializing_if = "Option::is_none")]
3231 pub score: Option<ApproximateNumber>,
3232 #[serde(default, skip_serializing_if = "Option::is_none")]
3233 pub source: Option<RawJson>,
3234 #[serde(default, skip_serializing_if = "Option::is_none")]
3235 pub record: Option<NativeRecord>,
3236 pub sort: Vec<JsonValue>,
3237 pub fragments: Vec<SearchFragment>,
3238 pub features: Vec<ResultFeature>,
3239 pub group_values: Vec<JsonValue>,
3240 pub inner_hits: Vec<NamedNestedInnerHitsResult>,
3241}
3242
3243pub const LODESTONE_API_RECORD_ERASURE_STATE_FORMAT_VERSION: u16 = 1;
3244#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3245#[serde(rename_all = "snake_case")]
3246pub enum RecordErasureState {
3247 Queued,
3248 Rewriting,
3249 LogicallyErased,
3250 Retained,
3251 PhysicallyErased,
3252 Superseded,
3253}
3254
3255pub const LODESTONE_API_RECORD_ERASURE_RECEIPT_FORMAT_VERSION: u16 = 1;
3256#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3257#[serde(deny_unknown_fields)]
3258pub struct RecordErasureReceipt {
3259 pub task_id: Identity,
3260 pub index: Resource,
3261 pub locator: NativeRecordLocator,
3262 pub state: RecordErasureState,
3263 #[serde(default, skip_serializing_if = "Option::is_none")]
3264 pub logical_generation: Option<U64>,
3265 pub retired_objects: u32,
3266 pub remaining_objects: u32,
3267 pub protected_objects: u32,
3268 pub receipt_digest: Digest,
3269}
3270
3271pub const LODESTONE_API_AGGREGATION_BUCKET_FORMAT_VERSION: u16 = 1;
3272#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3273#[serde(deny_unknown_fields)]
3274pub struct AggregationBucket {
3275 pub key: JsonValue,
3276 pub document_count: U64,
3277 pub sub_aggregations: Vec<AggregationResult>,
3278}
3279
3280pub const LODESTONE_API_AGGREGATION_RESULT_FORMAT_VERSION: u16 = 3;
3281#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3282#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3283pub enum AggregationResult {
3284 Terms {
3285 name: String,
3286 buckets: Vec<AggregationBucket>,
3287 partial: bool,
3288 },
3289 Histogram {
3290 name: String,
3291 buckets: Vec<AggregationBucket>,
3292 partial: bool,
3293 },
3294 DateHistogram {
3295 name: String,
3296 buckets: Vec<AggregationBucket>,
3297 partial: bool,
3298 },
3299 Composite {
3300 name: String,
3301 buckets: Vec<AggregationBucket>,
3302 #[serde(default, skip_serializing_if = "Option::is_none")]
3303 after: Option<Cursor>,
3304 partial: bool,
3305 },
3306 Filter {
3307 name: String,
3308 buckets: Vec<AggregationBucket>,
3309 partial: bool,
3310 },
3311 SingleBucket {
3312 name: String,
3313 document_count: U64,
3314 sub_aggregations: Vec<AggregationResult>,
3315 partial: bool,
3316 },
3317 Cardinality {
3318 name: String,
3319 #[serde(default, skip_serializing_if = "Option::is_none")]
3320 value: Option<ApproximateNumber>,
3321 partial: bool,
3322 },
3323 Percentiles {
3324 name: String,
3325 values: Vec<PercentileValue>,
3326 partial: bool,
3327 },
3328 ApproximateCardinality {
3329 name: String,
3330 value: ApproximateNumber,
3331 approximation: Approximation,
3332 partial: bool,
3333 },
3334 ApproximatePercentiles {
3335 name: String,
3336 values: Vec<ApproximatePercentileValue>,
3337 approximation: Approximation,
3338 partial: bool,
3339 },
3340 Sum {
3341 name: String,
3342 #[serde(default, skip_serializing_if = "Option::is_none")]
3343 value: Option<ApproximateNumber>,
3344 partial: bool,
3345 },
3346 Avg {
3347 name: String,
3348 #[serde(default, skip_serializing_if = "Option::is_none")]
3349 value: Option<ApproximateNumber>,
3350 partial: bool,
3351 },
3352 Min {
3353 name: String,
3354 #[serde(default, skip_serializing_if = "Option::is_none")]
3355 value: Option<ApproximateNumber>,
3356 partial: bool,
3357 },
3358 Max {
3359 name: String,
3360 #[serde(default, skip_serializing_if = "Option::is_none")]
3361 value: Option<ApproximateNumber>,
3362 partial: bool,
3363 },
3364 Stats {
3365 name: String,
3366 count: U64,
3367 #[serde(default, skip_serializing_if = "Option::is_none")]
3368 min: Option<ApproximateNumber>,
3369 #[serde(default, skip_serializing_if = "Option::is_none")]
3370 max: Option<ApproximateNumber>,
3371 #[serde(default, skip_serializing_if = "Option::is_none")]
3372 avg: Option<ApproximateNumber>,
3373 sum: ApproximateNumber,
3374 partial: bool,
3375 },
3376 TimeSeriesV1 {
3377 name: String,
3378 buckets: Vec<TimeSeriesBucket>,
3379 partial: bool,
3380 },
3381}
3382
3383pub const LODESTONE_API_SHARD_COUNTS_FORMAT_VERSION: u16 = 1;
3384#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3385#[serde(deny_unknown_fields)]
3386pub struct ShardCounts {
3387 pub total: u32,
3388 pub successful: u32,
3389 pub skipped: u32,
3390 pub failed: u32,
3391}
3392
3393pub const LODESTONE_API_TOTAL_HITS_RELATION_FORMAT_VERSION: u16 = 1;
3394#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3395#[serde(rename_all = "snake_case")]
3396pub enum TotalHitsRelation {
3397 Exact,
3398 LowerBound,
3399 Incomplete,
3400}
3401
3402pub const LODESTONE_API_SEARCH_TOTAL_FORMAT_VERSION: u16 = 1;
3403#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3404#[serde(deny_unknown_fields)]
3405pub struct SearchTotal {
3406 pub value: U64,
3407 pub relation: TotalHitsRelation,
3408 pub partial: bool,
3409}
3410
3411pub const LODESTONE_API_SEARCH_EXECUTION_FRESHNESS_FORMAT_VERSION: u16 = 1;
3412#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3413#[serde(rename_all = "snake_case")]
3414pub enum SearchExecutionFreshness {
3415 Realtime,
3416 Committed,
3417}
3418
3419pub const LODESTONE_API_SEARCH_FRESHNESS_FORMAT_VERSION: u16 = 1;
3420#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3421#[serde(rename_all = "snake_case")]
3422pub enum SearchFreshness {
3423 Auto,
3424 Realtime,
3425 Committed,
3426}
3427
3428pub const LODESTONE_API_SEARCH_DEGRADATION_REASON_FORMAT_VERSION: u16 = 1;
3429#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3430#[serde(rename_all = "snake_case")]
3431pub enum SearchDegradationReason {
3432 WriterUnavailable,
3433}
3434
3435pub const LODESTONE_API_SEARCH_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
3436#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3437#[serde(deny_unknown_fields)]
3438pub struct SearchAchievement {
3439 pub freshness: SearchExecutionFreshness,
3440 pub degradation_reasons: Vec<SearchDegradationReason>,
3441}
3442
3443pub const LODESTONE_API_SEARCH_FAILURE_STAGE_FORMAT_VERSION: u16 = 1;
3444#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3445#[serde(rename_all = "snake_case")]
3446pub enum SearchFailureStage {
3447 Preflight,
3448 Dispatch,
3449}
3450
3451pub const LODESTONE_API_SEARCH_FAILURE_REASON_FORMAT_VERSION: u16 = 1;
3452#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3453#[serde(rename_all = "snake_case")]
3454pub enum SearchFailureReason {
3455 Cancelled,
3456 Overloaded,
3457 ResourceLimit,
3458 DeadlineExceeded,
3459 Unavailable,
3460 InvalidResponse,
3461}
3462
3463pub const LODESTONE_API_COLLECTION_SHARD_FORMAT_VERSION: u16 = 1;
3464#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3465#[serde(deny_unknown_fields)]
3466pub struct CollectionShard {
3467 pub collection_id: Identity,
3468 pub index_id: Identity,
3469 pub shard_id: u32,
3470}
3471
3472pub const LODESTONE_API_SEARCH_PARTIAL_FAILURE_FORMAT_VERSION: u16 = 1;
3473#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3474#[serde(deny_unknown_fields)]
3475pub struct SearchPartialFailure {
3476 pub shard: CollectionShard,
3477 pub stage: SearchFailureStage,
3478 pub reason: SearchFailureReason,
3479 pub recovery: RecoveryAction,
3480}
3481
3482pub const LODESTONE_API_ARTIFACT_FORMAT_VERSION: u16 = 1;
3483#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3484#[serde(deny_unknown_fields)]
3485pub struct Artifact {
3486 pub locator: Locator,
3487 pub bytes: U64,
3488 pub sha256: Digest,
3489 pub expires_at: U64,
3490}
3491
3492pub const LODESTONE_API_PORTABILITY_STORAGE_CAPABILITY_FORMAT_VERSION: u16 = 1;
3493#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3494#[serde(deny_unknown_fields)]
3495pub struct PortabilityStorageCapability {
3496 pub backend_authority: String,
3497 pub object_prefix: String,
3498 pub maximum_bytes: U64,
3499 #[serde(default, skip_serializing_if = "Option::is_none")]
3500 pub key_capability_digest: Option<Digest>,
3501}
3502
3503pub const LODESTONE_API_COLLECTION_EXPORT_ARTIFACT_FORMAT_VERSION: u16 = 1;
3504#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3505#[serde(deny_unknown_fields)]
3506pub struct CollectionExportArtifact {
3507 pub artifact: Artifact,
3508 pub backend_authority: String,
3509 pub object_key: String,
3510 pub source_collection_id: Identity,
3511 pub source_catalog_revision: U64,
3512}
3513
3514pub const LODESTONE_API_COLLECTION_TRANSFER_SEQUENCE_FORMAT_VERSION: u16 = 1;
3515#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3516#[serde(deny_unknown_fields)]
3517pub struct CollectionTransferSequence {
3518 pub source_index_incarnation: Identity,
3519 pub shard_id: u32,
3520 #[serde(default, skip_serializing_if = "Option::is_none")]
3521 pub registered_through: Option<U64>,
3522}
3523
3524pub const LODESTONE_API_COLLECTION_TRANSFER_ARTIFACT_FORMAT_VERSION: u16 = 1;
3525#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3526#[serde(deny_unknown_fields)]
3527pub struct CollectionTransferArtifact {
3528 pub artifact: Artifact,
3529 pub backend_authority: String,
3530 pub object_key: String,
3531 pub source_collection_id: Identity,
3532 pub base_catalog_revision: U64,
3533 pub final_catalog_revision: U64,
3534 pub admitted_security_generation: U64,
3535 pub fenced_security_generation: U64,
3536 pub base_content_digest: Digest,
3537 pub final_content_digest: Digest,
3538 pub final_sequence_digest: Digest,
3539 pub final_sequences: Vec<CollectionTransferSequence>,
3540 pub delta_entries: u32,
3541}
3542
3543pub const LODESTONE_API_COLLECTION_STANDBY_STATE_FORMAT_VERSION: u16 = 1;
3544#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3545#[serde(rename_all = "snake_case")]
3546pub enum CollectionStandbyState {
3547 Admitted,
3548 Activated,
3549}
3550
3551pub const LODESTONE_API_COLLECTION_STANDBY_FORMAT_VERSION: u16 = 1;
3552#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3553#[serde(deny_unknown_fields)]
3554pub struct CollectionStandby {
3555 pub standby_id: Digest,
3556 pub binding_digest: Digest,
3557 pub source_collection_id: Identity,
3558 pub source_recovery_era: Identity,
3559 pub source_catalog_revision: U64,
3560 pub source_security_generation: U64,
3561 pub source_durability_digest: Digest,
3562 pub standby_collection_id: Identity,
3563 pub standby_recovery_era: Identity,
3564 pub standby_catalog_revision: U64,
3565 pub standby_security_generation: U64,
3566 pub standby_content_digest: Digest,
3567 pub standby_durability_digest: Digest,
3568 pub transfer_artifact_digest: Digest,
3569 pub restore_operation_binding_digest: Digest,
3570 pub admission_operation_identity: Digest,
3571 pub admitted_at: U64,
3572 pub state: CollectionStandbyState,
3573 pub activation_generation: U64,
3574 #[serde(default, skip_serializing_if = "Option::is_none")]
3575 pub activation_fence: Option<Digest>,
3576 #[serde(default, skip_serializing_if = "Option::is_none")]
3577 pub activation_operation_identity: Option<Digest>,
3578 #[serde(default, skip_serializing_if = "Option::is_none")]
3579 pub activated_at: Option<U64>,
3580}
3581
3582pub const LODESTONE_API_PORTABILITY_KEY_CAPABILITY_REFERENCE_STATE_FORMAT_VERSION: u16 = 1;
3583#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3584#[serde(rename_all = "snake_case")]
3585pub enum PortabilityKeyCapabilityReferenceState {
3586 NotApplicable,
3587 Released,
3588}
3589
3590pub const LODESTONE_API_COLLECTION_EXPORT_RETIREMENT_FORMAT_VERSION: u16 = 1;
3591#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3592#[serde(deny_unknown_fields)]
3593pub struct CollectionExportRetirement {
3594 pub artifact: CollectionExportArtifact,
3595 pub artifact_absent: bool,
3596 pub key_capability_reference_state: PortabilityKeyCapabilityReferenceState,
3597}
3598
3599pub const LODESTONE_API_INDEX_TRANSFER_PAGE_FORMAT_VERSION: u16 = 1;
3600#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3601#[serde(deny_unknown_fields)]
3602pub struct IndexTransferPage {
3603 pub ordinal: u32,
3604 pub object_key: String,
3605 pub bytes: U64,
3606 pub content_digest: Digest,
3607 pub record_count: u32,
3608}
3609
3610pub const LODESTONE_API_INDEX_TRANSFER_ARTIFACT_FORMAT_VERSION: u16 = 1;
3611#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3612#[serde(deny_unknown_fields)]
3613pub struct IndexTransferArtifact {
3614 pub manifest: Artifact,
3615 pub manifest_object_key: String,
3616 pub transfer_identity: Digest,
3617 pub source_cluster_storage_id: Identity,
3618 pub source_collection_id: Identity,
3619 pub source_index: Resource,
3620 pub source_catalog_revision: U64,
3621 pub source_cut_digest: Digest,
3622 pub pages: Vec<IndexTransferPage>,
3623 pub record_count: u32,
3624}
3625
3626pub const LODESTONE_API_SEARCH_VALIDATION_BOUND_FORMAT_VERSION: u16 = 1;
3627#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3628#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3629pub enum SearchValidationBound {
3630 Exact { value: U64 },
3631 UpperBound { value: U64 },
3632 Unknown { reason: String },
3633}
3634
3635pub const LODESTONE_API_SEARCH_VALIDATION_ESTIMATES_FORMAT_VERSION: u16 = 1;
3636#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3637#[serde(deny_unknown_fields)]
3638pub struct SearchValidationEstimates {
3639 pub shard_fanout: SearchValidationBound,
3640 pub candidate_documents: SearchValidationBound,
3641 pub segments: SearchValidationBound,
3642 pub buckets: SearchValidationBound,
3643 pub memory_bytes: SearchValidationBound,
3644 pub object_reads: SearchValidationBound,
3645 pub object_bytes: SearchValidationBound,
3646 pub response_bytes: SearchValidationBound,
3647 pub planning_work: SearchValidationBound,
3648}
3649
3650pub const LODESTONE_API_SEARCH_VALIDATION_LIMIT_FORMAT_VERSION: u16 = 1;
3651#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3652#[serde(deny_unknown_fields)]
3653pub struct SearchValidationLimit {
3654 pub id: String,
3655 pub applied: U64,
3656 pub unit: String,
3657}
3658
3659pub const LODESTONE_API_OPERATION_KIND_FORMAT_VERSION: u16 = 4;
3660#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3661#[serde(rename_all = "snake_case")]
3662pub enum OperationKind {
3663 Catalog,
3664 MaintenanceTask,
3665 Security,
3666 Diagnostic,
3667 CollectionExport,
3668 CollectionExportRetirement,
3669 CollectionRestore,
3670 CollectionTransferExport,
3671 CollectionTransferRestore,
3672 CollectionStandbyAdmission,
3673 CollectionStandbyActivation,
3674 IndexExport,
3675 IndexImport,
3676 VectorEvaluation,
3677 VectorWarm,
3678 Lifecycle,
3679 Quota,
3680 Admission,
3681}
3682
3683pub const LODESTONE_API_OPERATION_AUTHORITY_FORMAT_VERSION: u16 = 1;
3684#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3685#[serde(rename_all = "snake_case")]
3686pub enum OperationAuthority {
3687 Catalog,
3688 Tasks,
3689 Security,
3690 Diagnostics,
3691 Portability,
3692 Lifecycle,
3693 Quota,
3694 Admission,
3695}
3696
3697pub const LODESTONE_API_OPERATION_TARGET_FORMAT_VERSION: u16 = 1;
3698#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3699#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3700pub enum OperationTarget {
3701 Collection { collection_id: Identity },
3702 Resource { resource: Resource },
3703 Artifact { locator: Locator },
3704 None,
3705}
3706
3707pub const LODESTONE_API_OPERATION_STATE_FORMAT_VERSION: u16 = 1;
3708#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3709#[serde(rename_all = "snake_case")]
3710pub enum OperationState {
3711 Pending,
3712 Succeeded,
3713 Failed,
3714 Cancelled,
3715}
3716
3717pub const LODESTONE_API_OPERATION_PENDING_STATE_FORMAT_VERSION: u16 = 1;
3718#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3719#[serde(rename_all = "snake_case")]
3720pub enum OperationPendingState {
3721 Queued,
3722 Running,
3723 CancelRequested,
3724}
3725
3726pub const LODESTONE_API_OPERATION_PROGRESS_UNIT_FORMAT_VERSION: u16 = 1;
3727#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3728#[serde(rename_all = "snake_case")]
3729pub enum OperationProgressUnit {
3730 BasisPoints,
3731 Items,
3732 Bytes,
3733 WorkUnits,
3734}
3735
3736pub const LODESTONE_API_OPERATION_PROGRESS_FORMAT_VERSION: u16 = 1;
3737#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3738#[serde(deny_unknown_fields)]
3739pub struct OperationProgress {
3740 pub completed: U64,
3741 pub total: U64,
3742 pub unit: OperationProgressUnit,
3743}
3744
3745pub const LODESTONE_API_OPERATION_RESULT_FORMAT_VERSION: u16 = 1;
3746#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3747#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3748pub enum OperationResult {
3749 None,
3750 Artifacts { items: Vec<Artifact> },
3751}
3752
3753pub const LODESTONE_API_OPERATION_FAILURE_FORMAT_VERSION: u16 = 1;
3754#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3755#[serde(deny_unknown_fields)]
3756pub struct OperationFailure {
3757 pub error: ErrorBody,
3758}
3759
3760pub const LODESTONE_API_OPERATION_CANCELLATION_FORMAT_VERSION: u16 = 1;
3761#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3762#[serde(rename_all = "snake_case")]
3763pub enum OperationCancellation {
3764 NotCancellable,
3765 Cancellable,
3766 CancelRequested,
3767 Cancelled,
3768}
3769
3770pub const LODESTONE_API_OPERATION_RETENTION_STATE_FORMAT_VERSION: u16 = 1;
3771#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3772#[serde(rename_all = "snake_case")]
3773pub enum OperationRetentionState {
3774 Active,
3775 Retired,
3776}
3777
3778pub const LODESTONE_API_OPERATION_RETENTION_FORMAT_VERSION: u16 = 1;
3779#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3780#[serde(deny_unknown_fields)]
3781pub struct OperationRetention {
3782 pub state: OperationRetentionState,
3783 #[serde(default, skip_serializing_if = "Option::is_none")]
3784 pub retire_after: Option<U64>,
3785}
3786
3787pub const LODESTONE_API_OPERATION_FORMAT_VERSION: u16 = 2;
3788#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3789#[serde(deny_unknown_fields)]
3790pub struct Operation {
3791 pub locator: Locator,
3792 pub kind: OperationKind,
3793 pub authority: OperationAuthority,
3794 pub target: OperationTarget,
3795 pub authority_revision: U64,
3796 pub current_state: OperationState,
3797 #[serde(default, skip_serializing_if = "Option::is_none")]
3798 pub pending_state: Option<OperationPendingState>,
3799 #[serde(default, skip_serializing_if = "Option::is_none")]
3800 pub progress: Option<OperationProgress>,
3801 #[serde(default, skip_serializing_if = "Option::is_none")]
3802 pub result: Option<OperationResult>,
3803 #[serde(default, skip_serializing_if = "Option::is_none")]
3804 pub failure: Option<OperationFailure>,
3805 pub cancellation: OperationCancellation,
3806 pub retention: OperationRetention,
3807 pub submitted_at: U64,
3808 #[serde(default, skip_serializing_if = "Option::is_none")]
3809 pub terminal_at: Option<U64>,
3810}
3811
3812pub const LODESTONE_API_WRITE_DURABILITY_BOUNDARY_FORMAT_VERSION: u16 = 1;
3813#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3814#[serde(rename_all = "snake_case")]
3815pub enum WriteDurabilityBoundary {
3816 Registered,
3817 IncarnationMemory,
3818}
3819
3820pub const LODESTONE_API_WRITE_VISIBILITY_MODE_FORMAT_VERSION: u16 = 1;
3821#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3822#[serde(rename_all = "snake_case")]
3823pub enum WriteVisibilityMode {
3824 Applied,
3825 WaitFor,
3826}
3827
3828pub const LODESTONE_API_WRITE_RESPONSE_STAGE_FORMAT_VERSION: u16 = 1;
3829#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3830#[serde(rename_all = "snake_case")]
3831pub enum WriteResponseStage {
3832 Validated,
3833 Admitted,
3834 Sequenced,
3835 ObjectPut,
3836 Registered,
3837 AppliedToActiveMemtable,
3838 MicroCommitted,
3839 Sealed,
3840}
3841
3842pub const LODESTONE_API_WRITE_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
3843#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3844#[serde(deny_unknown_fields)]
3845pub struct WriteAchievement {
3846 pub durability_class: ResourceDurabilityClass,
3847 pub durability_boundary: WriteDurabilityBoundary,
3848 pub visibility_mode: WriteVisibilityMode,
3849 pub response_stage: WriteResponseStage,
3850}
3851
3852pub const LODESTONE_API_MUTATION_COMMIT_POSITION_FORMAT_VERSION: u16 = 1;
3853#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3854#[serde(deny_unknown_fields)]
3855pub struct MutationCommitPosition {
3856 pub leader_term: U64,
3857 pub leader_node_id: U64,
3858 pub log_index: U64,
3859}
3860
3861pub const LODESTONE_API_MUTATION_COMMIT_RECEIPT_SHAPE_VERSION: u16 = 1;
3862pub const LODESTONE_API_MUTATION_COMMIT_RECEIPT_FORMAT_VERSION: u16 = 1;
3863#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3864#[serde(deny_unknown_fields)]
3865pub struct MutationCommitReceipt {
3866 pub format_version: u32,
3867 pub registration_position: MutationCommitPosition,
3868 pub sequence: U64,
3869 pub primary_term: U64,
3870 pub mapping_generation: U64,
3871 pub durability_class: ResourceDurabilityClass,
3872 pub durability_boundary: WriteDurabilityBoundary,
3873 pub committed_at_unix_millis: U64,
3874 pub committed_at_uncertainty_millis: U64,
3875}
3876
3877pub const LODESTONE_API_MUTATION_RESOLVER_FORMAT_VERSION: u16 = 2;
3878#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3879#[serde(rename_all = "snake_case")]
3880pub enum MutationResolver {
3881 CloneIndex,
3882 GetHistory,
3883 ResolveAppendBulk,
3884 ResolveCatalogAction,
3885 ResolveDocumentBulk,
3886 ResolveDocumentMutation,
3887 ResolveIndexChange,
3888 ResolveSecurityAction,
3889 ResolveServiceCredentialReservation,
3890 ResolveSourceAuthorizationProjection,
3891 ResolveStateWrite,
3892}
3893
3894pub const LODESTONE_API_MUTATION_OUTCOME_FORMAT_VERSION: u16 = 1;
3895#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3896#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
3897pub enum MutationOutcome {
3898 Terminal,
3899 Pending {
3900 #[serde(default, skip_serializing_if = "Option::is_none")]
3901 resolver: Option<MutationResolver>,
3902 },
3903 Indeterminate {
3904 #[serde(default, skip_serializing_if = "Option::is_none")]
3905 resolver: Option<MutationResolver>,
3906 },
3907 ResolutionRequired {
3908 resolver: MutationResolver,
3909 },
3910}
3911
3912pub const LODESTONE_API_SUBMISSION_STATE_FORMAT_VERSION: u16 = 1;
3913#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3914#[serde(rename_all = "snake_case")]
3915pub enum SubmissionState {
3916 NotSubmitted,
3917 Submitted,
3918 Resolved,
3919 KnownRetired,
3920 Indeterminate,
3921}
3922
3923pub const LODESTONE_API_EXPECTED_BINDING_FORMAT_VERSION: u16 = 1;
3924#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3925#[serde(deny_unknown_fields)]
3926pub struct ExpectedBinding {
3927 pub incarnation: Identity,
3928 pub revision: U64,
3929}
3930
3931pub const LODESTONE_API_ADMINISTRATION_ALIAS_ACTION_FORMAT_VERSION: u16 = 1;
3932#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3933#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3934pub enum AdministrationAliasAction {
3935 Put {
3936 name: String,
3937 #[serde(default, skip_serializing_if = "Option::is_none")]
3938 expected_revision: Option<U64>,
3939 targets: Vec<AliasTarget>,
3940 #[serde(default, skip_serializing_if = "Option::is_none")]
3941 filter: Option<RawJson>,
3942 #[serde(default, skip_serializing_if = "Option::is_none")]
3943 index_routing: Option<String>,
3944 #[serde(default, skip_serializing_if = "Option::is_none")]
3945 search_routing: Option<String>,
3946 },
3947 Delete {
3948 name: String,
3949 expected_revision: U64,
3950 },
3951}
3952
3953pub const LODESTONE_API_ADMINISTRATION_MUTATION_FORMAT_VERSION: u16 = 2;
3954#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3955#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3956pub enum AdministrationMutation {
3957 ApplyAliasActions {
3958 actions: Vec<AdministrationAliasAction>,
3959 },
3960 PutComponentTemplate {
3961 name: String,
3962 #[serde(default, skip_serializing_if = "Option::is_none")]
3963 expected: Option<ExpectedBinding>,
3964 mapping: Mapping,
3965 settings: RawJson,
3966 #[serde(default, skip_serializing_if = "Option::is_none")]
3967 resource_spec: Option<IndexResourceSpec>,
3968 },
3969 DeleteComponentTemplate {
3970 name: String,
3971 expected: ExpectedBinding,
3972 },
3973 PutIndexTemplate {
3974 name: String,
3975 #[serde(default, skip_serializing_if = "Option::is_none")]
3976 expected: Option<ExpectedBinding>,
3977 priority: i32,
3978 data_stream: bool,
3979 index_patterns: Vec<String>,
3980 components: Vec<ExpectedBinding>,
3981 mapping: Mapping,
3982 settings: RawJson,
3983 #[serde(default, skip_serializing_if = "Option::is_none")]
3984 resource_spec: Option<IndexResourceSpec>,
3985 },
3986 DeleteIndexTemplate {
3987 name: String,
3988 expected: ExpectedBinding,
3989 },
3990 PutIngestPipeline {
3991 name: String,
3992 #[serde(default, skip_serializing_if = "Option::is_none")]
3993 expected: Option<ExpectedBinding>,
3994 definition: RawJson,
3995 },
3996 DeleteIngestPipeline {
3997 name: String,
3998 expected: ExpectedBinding,
3999 },
4000 PutLifecyclePolicy {
4001 name: String,
4002 #[serde(default, skip_serializing_if = "Option::is_none")]
4003 expected: Option<ExpectedBinding>,
4004 rollover: RolloverThresholds,
4005 retention: RetentionPolicy,
4006 merge_hint: bool,
4007 freeze_hint: bool,
4008 delete_expired: bool,
4009 },
4010 DeleteLifecyclePolicy {
4011 name: String,
4012 expected: ExpectedBinding,
4013 },
4014 CreateDataStream {
4015 name: String,
4016 timestamp_field: String,
4017 index_template: ExpectedBinding,
4018 #[serde(default, skip_serializing_if = "Option::is_none")]
4019 lifecycle_policy: Option<ExpectedBinding>,
4020 },
4021 UpdateDataStream {
4022 name: String,
4023 expected_revision: U64,
4024 timestamp_field: String,
4025 index_template: ExpectedBinding,
4026 #[serde(default, skip_serializing_if = "Option::is_none")]
4027 lifecycle_policy: Option<ExpectedBinding>,
4028 },
4029 DeleteDataStream {
4030 name: String,
4031 expected_revision: U64,
4032 },
4033 RolloverDataStream {
4034 name: String,
4035 expected_revision: U64,
4036 },
4037}
4038
4039pub const LODESTONE_API_ADMINISTRATION_OUTCOME_FORMAT_VERSION: u16 = 1;
4040#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4041#[serde(deny_unknown_fields)]
4042pub struct AdministrationOutcome {
4043 pub action_id: Digest,
4044 pub authority_revision: U64,
4045 pub state: String,
4046 #[serde(default, skip_serializing_if = "Option::is_none")]
4047 pub resource: Option<Resource>,
4048}
4049
4050pub const LODESTONE_API_INDEX_CHANGE_APPLY_RECEIPT_FORMAT_VERSION: u16 = 1;
4051#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4052#[serde(deny_unknown_fields)]
4053pub struct IndexChangeApplyReceipt {
4054 pub action_id: Digest,
4055 pub semantic_digest: Digest,
4056 pub index: Resource,
4057 pub revision: U64,
4058 pub schema_generation: U64,
4059 pub state: String,
4060}
4061
4062pub const LODESTONE_API_INDEX_CHANGE_RESOLUTION_STATE_FORMAT_VERSION: u16 = 1;
4063#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4064#[serde(rename_all = "snake_case")]
4065pub enum IndexChangeResolutionState {
4066 NotSubmitted,
4067 Prepared,
4068 Pending,
4069 Applied,
4070 Failed,
4071 KnownRetired,
4072 ExpiredUnknown,
4073}
4074
4075pub const LODESTONE_API_BULK_DOCUMENT_ITEM_FORMAT_VERSION: u16 = 2;
4076#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4077#[serde(deny_unknown_fields)]
4078pub struct BulkDocumentItem {
4079 pub item_action_id: Digest,
4080 pub document_id: String,
4081 pub operation: String,
4082 #[serde(default, skip_serializing_if = "Option::is_none")]
4083 pub source: Option<RawJson>,
4084 #[serde(default, skip_serializing_if = "Option::is_none")]
4085 pub record: Option<NativeRecord>,
4086 #[serde(default, skip_serializing_if = "Option::is_none")]
4087 pub routing: Option<String>,
4088 #[serde(default, skip_serializing_if = "Option::is_none")]
4089 pub condition: Option<DocumentMutationCondition>,
4090 #[serde(default, skip_serializing_if = "Option::is_none")]
4091 pub pipeline: Option<IngestPipelineSelection>,
4092 pub semantic_digest: Digest,
4093}
4094
4095pub const LODESTONE_API_BULK_DOCUMENT_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
4096#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4097#[serde(deny_unknown_fields)]
4098pub struct BulkDocumentItemOutcome {
4099 pub item_action_id: Digest,
4100 #[serde(default, skip_serializing_if = "Option::is_none")]
4101 pub locator: Option<Locator>,
4102 pub state: SubmissionState,
4103 #[serde(default, skip_serializing_if = "Option::is_none")]
4104 pub sequence: Option<U64>,
4105 #[serde(default, skip_serializing_if = "Option::is_none")]
4106 pub mapping_generation: Option<U64>,
4107 pub mapping_adopted: bool,
4108 pub no_document_effect: bool,
4109 #[serde(default, skip_serializing_if = "Option::is_none")]
4110 pub error: Option<ErrorBody>,
4111}
4112
4113pub const LODESTONE_API_BULK_DOCUMENT_OUTCOME_FORMAT_VERSION: u16 = 1;
4114#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4115#[serde(deny_unknown_fields)]
4116pub struct BulkDocumentOutcome {
4117 pub batch_id: Digest,
4118 pub index: Resource,
4119 pub items: Vec<BulkDocumentItemOutcome>,
4120 pub complete: bool,
4121 #[serde(default, skip_serializing_if = "Option::is_none")]
4122 pub achievement: Option<WriteAchievement>,
4123}
4124
4125pub const LODESTONE_API_METRIC_ATTRIBUTE_VALUE_FORMAT_VERSION: u16 = 1;
4126#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4127#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4128pub enum MetricAttributeValue {
4129 String { value: String },
4130 Boolean { value: bool },
4131 I64 { value: I64 },
4132 U64 { value: U64 },
4133 F64Bits { value: U64 },
4134}
4135
4136pub const LODESTONE_API_METRIC_ATTRIBUTE_FORMAT_VERSION: u16 = 1;
4137#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4138#[serde(deny_unknown_fields)]
4139pub struct MetricAttribute {
4140 pub key: String,
4141 pub value: MetricAttributeValue,
4142}
4143
4144pub const LODESTONE_API_METRIC_NUMBER_FORMAT_VERSION: u16 = 1;
4145#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4146#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4147pub enum MetricNumber {
4148 I64 { value: I64 },
4149 F64Bits { value: U64 },
4150}
4151
4152pub const LODESTONE_API_METRIC_TEMPORALITY_FORMAT_VERSION: u16 = 1;
4153#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4154#[serde(rename_all = "snake_case")]
4155pub enum MetricTemporality {
4156 Cumulative,
4157 Delta,
4158}
4159
4160pub const LODESTONE_API_METRIC_POINT_KIND_FORMAT_VERSION: u16 = 1;
4161#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4162#[serde(rename_all = "snake_case")]
4163pub enum MetricPointKind {
4164 Gauge,
4165 Sum,
4166 ExplicitHistogram,
4167 ExponentialHistogram,
4168}
4169
4170pub const LODESTONE_API_METRIC_EXPONENTIAL_BUCKETS_FORMAT_VERSION: u16 = 1;
4171#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4172#[serde(deny_unknown_fields)]
4173pub struct MetricExponentialBuckets {
4174 pub offset: i32,
4175 pub counts: Vec<U64>,
4176}
4177
4178pub const LODESTONE_API_METRIC_DATA_FORMAT_VERSION: u16 = 1;
4179#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4180#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4181pub enum MetricData {
4182 Gauge {
4183 value: MetricNumber,
4184 },
4185 Sum {
4186 value: MetricNumber,
4187 temporality: MetricTemporality,
4188 monotonic: bool,
4189 },
4190 ExplicitHistogram {
4191 temporality: MetricTemporality,
4192 count: U64,
4193 #[serde(default, skip_serializing_if = "Option::is_none")]
4194 sum: Option<MetricNumber>,
4195 bounds_f64_bits: Vec<U64>,
4196 bucket_counts: Vec<U64>,
4197 },
4198 ExponentialHistogram {
4199 temporality: MetricTemporality,
4200 count: U64,
4201 #[serde(default, skip_serializing_if = "Option::is_none")]
4202 sum: Option<MetricNumber>,
4203 scale: i32,
4204 zero_count: U64,
4205 positive: MetricExponentialBuckets,
4206 negative: MetricExponentialBuckets,
4207 },
4208}
4209
4210pub const LODESTONE_API_METRIC_INSTRUMENTATION_SCOPE_FORMAT_VERSION: u16 = 1;
4211#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4212#[serde(deny_unknown_fields)]
4213pub struct MetricInstrumentationScope {
4214 pub name: String,
4215 #[serde(default, skip_serializing_if = "Option::is_none")]
4216 pub version: Option<String>,
4217 #[serde(default, skip_serializing_if = "Option::is_none")]
4218 pub schema_url: Option<String>,
4219 pub attributes: Vec<MetricAttribute>,
4220}
4221
4222pub const LODESTONE_API_METRIC_EXEMPLAR_FORMAT_VERSION: u16 = 1;
4223#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4224#[serde(deny_unknown_fields)]
4225pub struct MetricExemplar {
4226 pub timestamp_unix_nanos: U64,
4227 pub value: MetricNumber,
4228 #[serde(default, skip_serializing_if = "Option::is_none")]
4229 pub trace_id: Option<String>,
4230 #[serde(default, skip_serializing_if = "Option::is_none")]
4231 pub span_id: Option<String>,
4232 pub filtered_attributes: Vec<MetricAttribute>,
4233}
4234
4235pub const LODESTONE_API_METRIC_POINT_SHAPE_VERSION: u16 = 1;
4236pub const LODESTONE_API_METRIC_POINT_FORMAT_VERSION: u16 = 1;
4237#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4238#[serde(deny_unknown_fields)]
4239pub struct MetricPoint {
4240 pub format_version: u32,
4241 pub resource_attributes: Vec<MetricAttribute>,
4242 pub instrumentation_scope: MetricInstrumentationScope,
4243 pub metric_name: String,
4244 #[serde(default, skip_serializing_if = "Option::is_none")]
4245 pub description: Option<String>,
4246 pub unit: String,
4247 pub series_attributes: Vec<MetricAttribute>,
4248 pub timestamp_unix_nanos: U64,
4249 #[serde(default, skip_serializing_if = "Option::is_none")]
4250 pub start_timestamp_unix_nanos: Option<U64>,
4251 pub data: MetricData,
4252 pub exemplars: Vec<MetricExemplar>,
4253}
4254
4255pub const LODESTONE_API_ENTITY_REF_FORMAT_VERSION: u16 = 1;
4256#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4257#[serde(deny_unknown_fields)]
4258pub struct EntityRef {
4259 pub entity_kind: String,
4260 pub entity_id: String,
4261}
4262
4263pub const LODESTONE_API_RELATIONSHIP_EVIDENCE_REF_FORMAT_VERSION: u16 = 1;
4264#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4265#[serde(deny_unknown_fields)]
4266pub struct RelationshipEvidenceRef {
4267 pub index: Resource,
4268 pub record_id: String,
4269}
4270
4271pub const LODESTONE_API_RELATIONSHIP_DIRECTIONALITY_FORMAT_VERSION: u16 = 1;
4272#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4273#[serde(rename_all = "snake_case")]
4274pub enum RelationshipDirectionality {
4275 Directed,
4276 Undirected,
4277}
4278
4279pub const LODESTONE_API_RELATIONSHIP_RECORD_SHAPE_VERSION: u16 = 1;
4280pub const LODESTONE_API_RELATIONSHIP_RECORD_FORMAT_VERSION: u16 = 1;
4281#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4282#[serde(deny_unknown_fields)]
4283pub struct RelationshipRecord {
4284 pub format_version: u32,
4285 pub relationship_id: String,
4286 pub source: EntityRef,
4287 pub target: EntityRef,
4288 pub relationship_type: String,
4289 pub directionality: RelationshipDirectionality,
4290 #[serde(default, skip_serializing_if = "Option::is_none")]
4291 pub valid_from_unix_nanos: Option<U64>,
4292 #[serde(default, skip_serializing_if = "Option::is_none")]
4293 pub valid_through_unix_nanos: Option<U64>,
4294 pub provenance: Vec<String>,
4295 pub evidence: Vec<RelationshipEvidenceRef>,
4296 pub assertion_class: String,
4297}
4298
4299pub const LODESTONE_API_PROFILE_LABEL_FORMAT_VERSION: u16 = 1;
4300#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4301#[serde(deny_unknown_fields)]
4302pub struct ProfileLabel {
4303 pub key: String,
4304 pub value: String,
4305}
4306
4307pub const LODESTONE_API_PROFILE_SAMPLE_TYPE_FORMAT_VERSION: u16 = 1;
4308#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4309#[serde(deny_unknown_fields)]
4310pub struct ProfileSampleType {
4311 pub sample_type: String,
4312 pub unit: String,
4313}
4314
4315pub const LODESTONE_API_PROFILE_MAPPING_FORMAT_VERSION: u16 = 1;
4316#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4317#[serde(deny_unknown_fields)]
4318pub struct ProfileMapping {
4319 pub mapping_id: String,
4320 pub build_id: String,
4321 pub module_id: String,
4322 #[serde(default, skip_serializing_if = "Option::is_none")]
4323 pub filename: Option<String>,
4324}
4325
4326pub const LODESTONE_API_PROFILE_FUNCTION_FORMAT_VERSION: u16 = 1;
4327#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4328#[serde(deny_unknown_fields)]
4329pub struct ProfileFunction {
4330 pub function_id: String,
4331 #[serde(default, skip_serializing_if = "Option::is_none")]
4332 pub name: Option<String>,
4333 #[serde(default, skip_serializing_if = "Option::is_none")]
4334 pub system_name: Option<String>,
4335 #[serde(default, skip_serializing_if = "Option::is_none")]
4336 pub filename: Option<String>,
4337 #[serde(default, skip_serializing_if = "Option::is_none")]
4338 pub start_line: Option<U64>,
4339 #[serde(default, skip_serializing_if = "Option::is_none")]
4340 pub symbol_observation_id: Option<String>,
4341}
4342
4343pub const LODESTONE_API_PROFILE_LINE_FORMAT_VERSION: u16 = 1;
4344#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4345#[serde(deny_unknown_fields)]
4346pub struct ProfileLine {
4347 pub function_id: String,
4348 pub line: U64,
4349}
4350
4351pub const LODESTONE_API_PROFILE_LOCATION_FORMAT_VERSION: u16 = 1;
4352#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4353#[serde(deny_unknown_fields)]
4354pub struct ProfileLocation {
4355 pub location_id: String,
4356 #[serde(default, skip_serializing_if = "Option::is_none")]
4357 pub mapping_id: Option<String>,
4358 pub address: U64,
4359 pub lines: Vec<ProfileLine>,
4360}
4361
4362pub const LODESTONE_API_PROFILE_STACK_FORMAT_VERSION: u16 = 1;
4363#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4364#[serde(deny_unknown_fields)]
4365pub struct ProfileStack {
4366 pub stack_id: String,
4367 #[serde(default, skip_serializing_if = "Option::is_none")]
4368 pub parent_stack_id: Option<String>,
4369 pub location_id: String,
4370}
4371
4372pub const LODESTONE_API_PROFILE_SAMPLE_FORMAT_VERSION: u16 = 1;
4373#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4374#[serde(deny_unknown_fields)]
4375pub struct ProfileSample {
4376 pub sample_id: String,
4377 pub stack_id: String,
4378 pub values: Vec<MetricNumber>,
4379 pub labels: Vec<ProfileLabel>,
4380 #[serde(default, skip_serializing_if = "Option::is_none")]
4381 pub trace_id: Option<String>,
4382 #[serde(default, skip_serializing_if = "Option::is_none")]
4383 pub span_id: Option<String>,
4384}
4385
4386pub const LODESTONE_API_PROFILE_INSTRUMENTATION_SCOPE_FORMAT_VERSION: u16 = 1;
4387#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4388#[serde(deny_unknown_fields)]
4389pub struct ProfileInstrumentationScope {
4390 pub name: String,
4391 #[serde(default, skip_serializing_if = "Option::is_none")]
4392 pub version: Option<String>,
4393 pub attributes: Vec<ProfileLabel>,
4394}
4395
4396pub const LODESTONE_API_PROFILE_BATCH_SHAPE_VERSION: u16 = 1;
4397pub const LODESTONE_API_PROFILE_BATCH_FORMAT_VERSION: u16 = 1;
4398#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4399#[serde(deny_unknown_fields)]
4400pub struct ProfileBatch {
4401 pub format_version: u32,
4402 pub profile_id: String,
4403 pub batch_id: String,
4404 pub start_unix_nanos: U64,
4405 pub end_unix_nanos: U64,
4406 pub duration_nanos: U64,
4407 pub period_nanos: U64,
4408 pub sample_types: Vec<ProfileSampleType>,
4409 pub resource_attributes: Vec<ProfileLabel>,
4410 pub instrumentation_scope: ProfileInstrumentationScope,
4411 pub mappings: Vec<ProfileMapping>,
4412 pub functions: Vec<ProfileFunction>,
4413 pub locations: Vec<ProfileLocation>,
4414 pub stacks: Vec<ProfileStack>,
4415 pub samples: Vec<ProfileSample>,
4416}
4417
4418pub const LODESTONE_API_NATIVE_RECORD_FORMAT_VERSION: u16 = 3;
4419#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4420#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4421pub enum NativeRecord {
4422 Document { source: RawJson },
4423 MetricPoint { point: Box<MetricPoint> },
4424 Relationship { relationship: Box<RelationshipRecord> },
4425 ProfileBatch { batch: Box<ProfileBatch> },
4426}
4427
4428pub const LODESTONE_API_RETAINED_APPEND_ITEM_FORMAT_VERSION: u16 = 4;
4429#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4430#[serde(deny_unknown_fields)]
4431pub struct RetainedAppendItem {
4432 pub item_action_id: Digest,
4433 pub document_id: String,
4434 pub record: NativeRecord,
4435}
4436
4437pub const LODESTONE_API_RETAINED_APPEND_STATE_FORMAT_VERSION: u16 = 1;
4438#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4439#[serde(rename_all = "snake_case")]
4440pub enum RetainedAppendState {
4441 Prepared,
4442 Committed,
4443 Replayed,
4444 Conflict,
4445 NotSubmittedRetryable,
4446 NotSubmittedTerminal,
4447 SubmittedIndeterminate,
4448 Retired,
4449}
4450
4451pub const LODESTONE_API_RETAINED_APPEND_RETRY_SAFETY_FORMAT_VERSION: u16 = 1;
4452#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4453#[serde(rename_all = "snake_case")]
4454pub enum RetainedAppendRetrySafety {
4455 Safe,
4456 ResolveOnly,
4457 Terminal,
4458}
4459
4460pub const LODESTONE_API_RETAINED_APPEND_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
4461#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4462#[serde(deny_unknown_fields)]
4463pub struct RetainedAppendItemOutcome {
4464 pub item_action_id: Digest,
4465 #[serde(default, skip_serializing_if = "Option::is_none")]
4466 pub locator: Option<Locator>,
4467 #[serde(default, skip_serializing_if = "Option::is_none")]
4468 pub semantic_digest: Option<Digest>,
4469 pub state: RetainedAppendState,
4470 pub retry_safety: RetainedAppendRetrySafety,
4471 #[serde(default, skip_serializing_if = "Option::is_none")]
4472 pub sequence: Option<U64>,
4473 #[serde(default, skip_serializing_if = "Option::is_none")]
4474 pub primary_term: Option<U64>,
4475 #[serde(default, skip_serializing_if = "Option::is_none")]
4476 pub error: Option<ErrorBody>,
4477}
4478
4479pub const LODESTONE_API_RETAINED_APPEND_BULK_OUTCOME_FORMAT_VERSION: u16 = 1;
4480#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4481#[serde(deny_unknown_fields)]
4482pub struct RetainedAppendBulkOutcome {
4483 pub batch_id: Digest,
4484 pub index: Resource,
4485 pub items: Vec<RetainedAppendItemOutcome>,
4486 pub complete: bool,
4487 #[serde(default, skip_serializing_if = "Option::is_none")]
4488 pub achievement: Option<WriteAchievement>,
4489}
4490
4491pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_STATE_FORMAT_VERSION: u16 = 1;
4492#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4493#[serde(rename_all = "snake_case")]
4494pub enum RetainedAppendObservationState {
4495 Visible,
4496 Pending,
4497 SubmittedIndeterminate,
4498 Conflict,
4499 Retired,
4500}
4501
4502pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_OUTCOME_FORMAT_VERSION: u16 = 1;
4503#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4504#[serde(deny_unknown_fields)]
4505pub struct RetainedAppendObservationOutcome {
4506 pub index: Resource,
4507 pub locator: Locator,
4508 pub state: RetainedAppendObservationState,
4509 #[serde(default, skip_serializing_if = "Option::is_none")]
4510 pub sequence: Option<U64>,
4511 #[serde(default, skip_serializing_if = "Option::is_none")]
4512 pub primary_term: Option<U64>,
4513}
4514
4515pub const LODESTONE_API_BINARY_VALUE_FORMAT_VERSION: u16 = 1;
4516#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4517#[serde(deny_unknown_fields)]
4518pub struct BinaryValue {
4519 pub bytes_base64: String,
4520}
4521
4522pub const LODESTONE_API_STATE_HASH_FIELD_FORMAT_VERSION: u16 = 1;
4523#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4524#[serde(deny_unknown_fields)]
4525pub struct StateHashField {
4526 pub field: BinaryValue,
4527 pub value: BinaryValue,
4528}
4529
4530pub const LODESTONE_API_STATE_SET_ENTRY_FORMAT_VERSION: u16 = 1;
4531#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4532#[serde(deny_unknown_fields)]
4533pub struct StateSetEntry {
4534 pub key: BinaryValue,
4535 pub value: BinaryValue,
4536}
4537
4538pub const LODESTONE_API_STATE_SET_CONDITION_FORMAT_VERSION: u16 = 1;
4539#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4540#[serde(rename_all = "snake_case")]
4541pub enum StateSetCondition {
4542 Always,
4543 IfAbsent,
4544 IfPresent,
4545}
4546
4547pub const LODESTONE_API_STATE_OPERATION_FORMAT_VERSION: u16 = 1;
4548#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4549#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4550pub enum StateOperation {
4551 Get {
4552 key: BinaryValue,
4553 },
4554 Set {
4555 key: BinaryValue,
4556 value: BinaryValue,
4557 condition: StateSetCondition,
4558 #[serde(default, skip_serializing_if = "Option::is_none")]
4559 expires_at_millis: Option<U64>,
4560 },
4561 Delete {
4562 keys: Vec<BinaryValue>,
4563 },
4564 Exists {
4565 keys: Vec<BinaryValue>,
4566 },
4567 ExpireAt {
4568 key: BinaryValue,
4569 absolute_millis: U64,
4570 },
4571 TtlStatus {
4572 key: BinaryValue,
4573 },
4574 Persist {
4575 key: BinaryValue,
4576 },
4577 MultiGet {
4578 keys: Vec<BinaryValue>,
4579 },
4580 MultiSet {
4581 entries: Vec<StateSetEntry>,
4582 },
4583 Increment {
4584 key: BinaryValue,
4585 delta: I64,
4586 },
4587 HashGet {
4588 key: BinaryValue,
4589 field: BinaryValue,
4590 },
4591 HashSet {
4592 key: BinaryValue,
4593 fields: Vec<StateHashField>,
4594 },
4595 HashGetAll {
4596 key: BinaryValue,
4597 },
4598}
4599
4600pub const LODESTONE_API_STATE_OPTIONAL_VALUE_FORMAT_VERSION: u16 = 1;
4601#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4602#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4603pub enum StateOptionalValue {
4604 Missing,
4605 Value { value: BinaryValue },
4606}
4607
4608pub const LODESTONE_API_STATE_COMMAND_RESULT_FORMAT_VERSION: u16 = 1;
4609#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4610#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4611pub enum StateCommandResult {
4612 Get {
4613 value: StateOptionalValue,
4614 },
4615 Set {
4616 applied: bool,
4617 },
4618 Delete {
4619 removed: u32,
4620 },
4621 Exists {
4622 count: u32,
4623 },
4624 Expire {
4625 changed: bool,
4626 },
4627 TtlStatus {
4628 state: String,
4629 #[serde(default, skip_serializing_if = "Option::is_none")]
4630 remaining_millis: Option<U64>,
4631 },
4632 Persist {
4633 changed: bool,
4634 },
4635 MultiGet {
4636 values: Vec<StateOptionalValue>,
4637 },
4638 MultiSet {
4639 written: u32,
4640 },
4641 Increment {
4642 value: I64,
4643 },
4644 HashGet {
4645 value: StateOptionalValue,
4646 },
4647 HashSet {
4648 fields_added: u32,
4649 },
4650 HashGetAll {
4651 fields: Vec<StateHashField>,
4652 },
4653}
4654
4655pub const LODESTONE_API_STATE_WRITE_RESOLUTION_FORMAT_VERSION: u16 = 1;
4656#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4657#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4658pub enum StateWriteResolution {
4659 NotSubmitted,
4660 Resolved {
4661 result: StateCommandResult,
4662 sequence: U64,
4663 },
4664 KnownRetired {
4665 retired_through: U64,
4666 },
4667 StateReset {
4668 submitted_reset_epoch: U64,
4669 current_reset_epoch: U64,
4670 },
4671 Indeterminate {
4672 #[serde(default, skip_serializing_if = "Option::is_none")]
4673 observed_high_water: Option<U64>,
4674 #[serde(default, skip_serializing_if = "Option::is_none")]
4675 current_high_water: Option<U64>,
4676 #[serde(default, skip_serializing_if = "Option::is_none")]
4677 retired_through: Option<U64>,
4678 },
4679}
4680
4681pub const LODESTONE_API_SERVICE_CREDENTIAL_RESERVATION_FORMAT_VERSION: u16 = 1;
4682#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4683#[serde(deny_unknown_fields)]
4684pub struct ServiceCredentialReservation {
4685 pub locator: Locator,
4686 pub reservation_action_id: Digest,
4687 pub activation_action_id: Digest,
4688 pub principal_id: Identity,
4689 pub api_key_id: Identity,
4690 pub generation: U64,
4691 pub reservation_expires_at: U64,
4692 pub credential_expires_at: U64,
4693 pub verifier_algorithm: String,
4694 pub verifier_algorithm_version: u32,
4695 pub required_secret_bytes: u32,
4696}
4697
4698pub const LODESTONE_API_SUBSCRIPTION_METADATA_FIELD_FORMAT_VERSION: u16 = 1;
4699#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4700#[serde(rename_all = "snake_case")]
4701pub enum SubscriptionMetadataField {
4702 Id,
4703 RoutingHash,
4704 Operation,
4705 Shard,
4706 Sequence,
4707}
4708
4709pub const LODESTONE_API_SUBSCRIPTION_FIELD_FORMAT_VERSION: u16 = 1;
4710#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4711#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4712pub enum SubscriptionField {
4713 Source { path: String },
4714 Metadata { field: SubscriptionMetadataField },
4715}
4716
4717pub const LODESTONE_API_SUBSCRIPTION_FILTER_FORMAT_VERSION: u16 = 1;
4718#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4719#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4720pub enum SubscriptionFilter {
4721 All,
4722 Bool {
4723 must: Vec<SubscriptionFilter>,
4724 should: Vec<SubscriptionFilter>,
4725 must_not: Vec<SubscriptionFilter>,
4726 minimum_should_match: u32,
4727 },
4728 Term {
4729 field: SubscriptionField,
4730 value: JsonValue,
4731 },
4732 Terms {
4733 field: SubscriptionField,
4734 values: Vec<JsonValue>,
4735 },
4736 Range {
4737 field: SubscriptionField,
4738 #[serde(default, skip_serializing_if = "Option::is_none")]
4739 gt: Option<JsonValue>,
4740 #[serde(default, skip_serializing_if = "Option::is_none")]
4741 gte: Option<JsonValue>,
4742 #[serde(default, skip_serializing_if = "Option::is_none")]
4743 lt: Option<JsonValue>,
4744 #[serde(default, skip_serializing_if = "Option::is_none")]
4745 lte: Option<JsonValue>,
4746 },
4747 Exists {
4748 field: SubscriptionField,
4749 },
4750 Prefix {
4751 field: SubscriptionField,
4752 value: String,
4753 },
4754}
4755
4756pub const LODESTONE_API_SUBSCRIPTION_CURSOR_ENTRY_FORMAT_VERSION: u16 = 1;
4757#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4758#[serde(deny_unknown_fields)]
4759pub struct SubscriptionCursorEntry {
4760 pub index: Resource,
4761 pub routing_revision: U64,
4762 pub recovery_era: Identity,
4763 pub shard_id: U64,
4764 pub sequence: U64,
4765}
4766
4767pub const LODESTONE_API_SUBSCRIPTION_ROUTE_FORMAT_VERSION: u16 = 1;
4768#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4769#[serde(deny_unknown_fields)]
4770pub struct SubscriptionRoute {
4771 pub index: Resource,
4772 pub routing_revision: U64,
4773 pub shard_ids: Vec<U64>,
4774}
4775
4776pub const LODESTONE_API_SUBSCRIPTION_START_POSITION_FORMAT_VERSION: u16 = 1;
4777#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4778#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4779pub enum SubscriptionStartPosition {
4780 FromNow,
4781 Resume {
4782 routes: Vec<SubscriptionRoute>,
4783 cut: Vec<SubscriptionCursorEntry>,
4784 },
4785}
4786
4787pub const LODESTONE_API_SUBSCRIPTION_START_SHAPE_VERSION: u16 = 1;
4788pub const LODESTONE_API_SUBSCRIPTION_START_FORMAT_VERSION: u16 = 1;
4789#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4790#[serde(deny_unknown_fields)]
4791pub struct SubscriptionStart {
4792 pub format_version: u32,
4793 pub request_id: String,
4794 pub index: Resource,
4795 #[serde(default, skip_serializing_if = "Option::is_none")]
4796 pub filter: Option<SubscriptionFilter>,
4797 pub include_deletes: bool,
4798 pub source_projection: Vec<String>,
4799 pub reconnect_attempt: u32,
4800 pub start: SubscriptionStartPosition,
4801 pub heartbeat_millis: U64,
4802 pub schema_digest: Digest,
4803}
4804
4805pub const LODESTONE_API_SUBSCRIPTION_ACCEPTED_SHAPE_VERSION: u16 = 1;
4806pub const LODESTONE_API_SUBSCRIPTION_ACCEPTED_FORMAT_VERSION: u16 = 1;
4807#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4808#[serde(deny_unknown_fields)]
4809pub struct SubscriptionAccepted {
4810 pub format_version: u32,
4811 pub routes: Vec<SubscriptionRoute>,
4812 pub accepted_cut: Vec<SubscriptionCursorEntry>,
4813 pub schema_digest: Digest,
4814}
4815
4816pub const LODESTONE_API_SUBSCRIPTION_WRITER_FENCE_FORMAT_VERSION: u16 = 1;
4817#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4818#[serde(deny_unknown_fields)]
4819pub struct SubscriptionWriterFence {
4820 pub recovery_era: Identity,
4821 pub epoch: u32,
4822}
4823
4824pub const LODESTONE_API_SUBSCRIPTION_EVENT_SHAPE_VERSION: u16 = 1;
4825pub const LODESTONE_API_SUBSCRIPTION_EVENT_FORMAT_VERSION: u16 = 1;
4826#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4827#[serde(deny_unknown_fields)]
4828pub struct SubscriptionEvent {
4829 pub format_version: u32,
4830 pub event_id: Digest,
4831 pub index: Resource,
4832 pub shard_id: U64,
4833 pub recovery_era: Identity,
4834 pub writer_fence: SubscriptionWriterFence,
4835 pub routing_revision: U64,
4836 pub sequence: U64,
4837 pub operation: String,
4838 pub document_id: String,
4839 pub routing_hash: u32,
4840 #[serde(default, skip_serializing_if = "Option::is_none")]
4841 pub source: Option<RawJson>,
4842}
4843
4844pub const LODESTONE_API_SUBSCRIPTION_HEARTBEAT_SHAPE_VERSION: u16 = 1;
4845pub const LODESTONE_API_SUBSCRIPTION_HEARTBEAT_FORMAT_VERSION: u16 = 1;
4846#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4847#[serde(deny_unknown_fields)]
4848pub struct SubscriptionHeartbeat {
4849 pub format_version: u32,
4850 pub confirmed_cut: Vec<SubscriptionCursorEntry>,
4851 pub route_revision: U64,
4852 pub authorization_revision: U64,
4853 pub authorization_valid_until_millis: U64,
4854}
4855
4856pub const LODESTONE_API_SUBSCRIPTION_GAP_SHAPE_VERSION: u16 = 1;
4857pub const LODESTONE_API_SUBSCRIPTION_GAP_FORMAT_VERSION: u16 = 1;
4858#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4859#[serde(deny_unknown_fields)]
4860pub struct SubscriptionGap {
4861 pub format_version: u32,
4862 pub affected: Vec<SubscriptionCursorEntry>,
4863 pub last_confirmed: Vec<SubscriptionCursorEntry>,
4864 pub earliest_available: Vec<SubscriptionCursorEntry>,
4865 pub reason: String,
4866 pub terminal: bool,
4867}
4868
4869pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_REASON_FORMAT_VERSION: u16 = 1;
4870#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4871#[serde(rename_all = "snake_case")]
4872pub enum SubscriptionTerminalReason {
4873 Completed,
4874 Cancelled,
4875 DeadlineExceeded,
4876 StaleCursor,
4877 RetentionGap,
4878 Unavailable,
4879 Internal,
4880}
4881
4882pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_SHAPE_VERSION: u16 = 2;
4883pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_FORMAT_VERSION: u16 = 2;
4884#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4885#[serde(deny_unknown_fields)]
4886pub struct SubscriptionTerminal {
4887 pub format_version: u32,
4888 pub reason: SubscriptionTerminalReason,
4889 pub recovery: RecoveryAction,
4890}
4891
4892pub const LODESTONE_API_SUBSCRIPTION_FRAME_FORMAT_VERSION: u16 = 1;
4893#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4894#[serde(tag = "frame", rename_all = "snake_case", deny_unknown_fields)]
4895pub enum SubscriptionFrame {
4896 Accepted { body: SubscriptionAccepted },
4897 Event { body: SubscriptionEvent },
4898 Heartbeat { body: SubscriptionHeartbeat },
4899 Gap { body: SubscriptionGap },
4900 Terminal { body: SubscriptionTerminal },
4901}
4902
4903pub const LODESTONE_API_STREAM_BINDING_FORMAT_VERSION: u16 = 1;
4904#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4905#[serde(deny_unknown_fields)]
4906pub struct StreamBinding {
4907 pub name: String,
4908 pub transport: String,
4909 pub service: String,
4910 pub method: String,
4911 pub endpoint: String,
4912 pub auth_metadata: String,
4913 pub auth_scheme: String,
4914 pub semantic_format_version: u32,
4915 pub schema_digest: Digest,
4916}
4917
4918pub const LODESTONE_API_CAPABILITY_GRANT_FORMAT_VERSION: u16 = 1;
4919#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4920#[serde(deny_unknown_fields)]
4921pub struct CapabilityGrant {
4922 pub command: String,
4923 pub action: String,
4924 pub state: String,
4925 pub reason: String,
4926 pub mutation_class: String,
4927 pub cancellable: bool,
4928 pub workload_classes: Vec<WorkloadClass>,
4929 pub possible_submission_states: Vec<String>,
4930 pub capability_family: String,
4931 pub effect_class: String,
4932 pub risk_flags: Vec<String>,
4933 pub admissible_errors: Vec<String>,
4934 pub referenced_limits: Vec<String>,
4935 pub retry_safety: String,
4936 pub identity_requirement: String,
4937 #[serde(default, skip_serializing_if = "Option::is_none")]
4938 pub resolver_command: Option<String>,
4939 pub cancellation: String,
4940 pub side_effects: Vec<String>,
4941 pub recovery: String,
4942 pub index_patterns: Vec<String>,
4943 pub exact_index_incarnations: Vec<Identity>,
4944}
4945
4946pub const LODESTONE_API_PROTOCOL_LIMIT_FORMAT_VERSION: u16 = 1;
4947#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4948#[serde(deny_unknown_fields)]
4949pub struct ProtocolLimit {
4950 pub id: String,
4951 pub default: U64,
4952 pub maximum: U64,
4953 pub unit: String,
4954}
4955
4956pub const LODESTONE_API_DOCUMENT_MUTATION_CONDITION_FORMAT_VERSION: u16 = 1;
4957#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4958#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4959pub enum DocumentMutationCondition {
4960 Any,
4961 MustNotExist,
4962 IfSeqNo { seq_no: U64 },
4963 IfSeqNoAndPrimaryTerm { seq_no: U64, primary_term: U64 },
4964}
4965
4966pub const LODESTONE_API_AUDIT_ADAPTER_FORMAT_VERSION: u16 = 1;
4967#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4968#[serde(rename_all = "snake_case")]
4969pub enum AuditAdapter {
4970 Native,
4971 Elasticsearch,
4972 Otlp,
4973 Jaeger,
4974 Grpc,
4975 WebSocket,
4976 Resp,
4977 InternalRpc,
4978 ControlPlane,
4979}
4980
4981pub const LODESTONE_API_AUDIT_DECISION_FORMAT_VERSION: u16 = 1;
4982#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4983#[serde(rename_all = "snake_case")]
4984pub enum AuditDecision {
4985 Allowed,
4986 DeniedAuthentication,
4987 DeniedAuthorization,
4988 DeniedQuota,
4989 DeniedStalePolicy,
4990}
4991
4992pub const LODESTONE_API_AUDIT_OUTCOME_FORMAT_VERSION: u16 = 1;
4993#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4994#[serde(rename_all = "snake_case")]
4995pub enum AuditOutcome {
4996 AdmissionAccepted,
4997 AuthenticationRefused,
4998 AuthorizationRefused,
4999 QuotaRefused,
5000 PolicyUnavailable,
5001 DecodeFailed,
5002 OperationSucceeded,
5003 OperationFailed,
5004 OperationIndeterminate,
5005 FailedRedacted,
5006}
5007
5008pub const LODESTONE_API_AUDIT_DETAIL_FORMAT_VERSION: u16 = 1;
5009#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5010#[serde(rename_all = "snake_case")]
5011pub enum AuditDetail {
5012 PolicyMutation,
5013 CredentialRotation,
5014 CredentialRevocation,
5015 QuotaAdmission,
5016 RequestAdmission,
5017 ExplicitCrashGap,
5018 BackupLifecycle,
5019 RetentionLifecycle,
5020 FieldPromotion,
5021}
5022
5023pub const LODESTONE_API_AUDIT_GAP_REASON_FORMAT_VERSION: u16 = 1;
5024#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5025#[serde(rename_all = "snake_case")]
5026pub enum AuditGapReason {
5027 ExplicitCrashGap,
5028 Retention,
5029}
5030
5031pub const LODESTONE_API_AUDIT_EVENT_FORMAT_VERSION: u16 = 2;
5032#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5033#[serde(deny_unknown_fields)]
5034pub struct AuditEvent {
5035 pub event_id: Digest,
5036 pub recovery_era: Identity,
5037 pub sequence: U64,
5038 pub server_time: U64,
5039 #[serde(default, skip_serializing_if = "Option::is_none")]
5040 pub principal_id: Option<Identity>,
5041 #[serde(default, skip_serializing_if = "Option::is_none")]
5042 pub api_key_id: Option<Identity>,
5043 pub policy_revision: U64,
5044 pub adapter: AuditAdapter,
5045 pub action: String,
5046 pub resource_digest: Digest,
5047 pub request_digest: Digest,
5048 #[serde(default, skip_serializing_if = "Option::is_none")]
5049 pub correlation_id: Option<Identity>,
5050 #[serde(default, skip_serializing_if = "Option::is_none")]
5051 pub diagnostic_id: Option<Identity>,
5052 pub decision: AuditDecision,
5053 pub outcome: AuditOutcome,
5054 pub detail: AuditDetail,
5055}
5056
5057pub const LODESTONE_API_AUDIT_GAP_FORMAT_VERSION: u16 = 2;
5058#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5059#[serde(deny_unknown_fields)]
5060pub struct AuditGap {
5061 pub recovery_era: Identity,
5062 pub first_sequence: U64,
5063 pub last_sequence: U64,
5064 pub reason: AuditGapReason,
5065}
5066
5067pub const LODESTONE_API_AUDIT_STREAM_STATE_FORMAT_VERSION: u16 = 1;
5068#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5069#[serde(deny_unknown_fields)]
5070pub struct AuditStreamState {
5071 pub recovery_era: Identity,
5072 pub earliest_available_sequence: U64,
5073 pub snapshot_through: U64,
5074}
5075
5076pub const LODESTONE_API_SERVICE_CREDENTIAL_GRANT_FORMAT_VERSION: u16 = 1;
5077#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5078#[serde(deny_unknown_fields)]
5079pub struct ServiceCredentialGrant {
5080 pub role_name: String,
5081 pub role_version: U64,
5082}
5083
5084pub const LODESTONE_API_SERVICE_CREDENTIAL_SUMMARY_FORMAT_VERSION: u16 = 1;
5085#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5086#[serde(deny_unknown_fields)]
5087pub struct ServiceCredentialSummary {
5088 pub principal_id: Identity,
5089 pub api_key_id: Identity,
5090 pub generation: U64,
5091 pub state: String,
5092 #[serde(default, skip_serializing_if = "Option::is_none")]
5093 pub expires_at: Option<U64>,
5094 pub grants: Vec<ServiceCredentialGrant>,
5095}
5096
5097pub const LODESTONE_API_SECURITY_ROLE_FORMAT_VERSION: u16 = 2;
5098#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5099#[serde(deny_unknown_fields)]
5100pub struct SecurityRole {
5101 pub role_name: String,
5102 pub version: U64,
5103 pub permissions: Vec<String>,
5104 pub delegable_permissions: Vec<String>,
5105 pub allowed_workload_classes: Vec<WorkloadClass>,
5106 pub index_patterns: Vec<String>,
5107 pub append_index_incarnations: Vec<Identity>,
5108}
5109
5110pub const LODESTONE_API_ROLE_APPEND_SCOPE_CHANGE_FORMAT_VERSION: u16 = 1;
5111#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5112#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
5113pub enum RoleAppendScopeChange {
5114 Add { index: Resource },
5115 Remove { index_incarnation: Identity },
5116}
5117
5118pub const LODESTONE_API_ROLE_APPEND_ACCESS_PREPARATION_FORMAT_VERSION: u16 = 1;
5119#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5120#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
5121pub enum RoleAppendAccessPreparation {
5122 Prepared {
5123 locator: Locator,
5124 semantic_digest: Digest,
5125 expires_at: U64,
5126 predecessor_role_version: U64,
5127 successor_role_version: U64,
5128 },
5129 AlreadySatisfied {
5130 role: SecurityRole,
5131 },
5132}
5133
5134pub const LODESTONE_API_SOURCE_AUTHORIZATION_SUBJECT_KIND_FORMAT_VERSION: u16 = 1;
5135#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5136#[serde(rename_all = "snake_case")]
5137pub enum SourceAuthorizationSubjectKind {
5138 Principal,
5139 Group,
5140}
5141
5142pub const LODESTONE_API_SOURCE_AUTHORIZATION_SUBJECT_FORMAT_VERSION: u16 = 1;
5143#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5144#[serde(deny_unknown_fields)]
5145pub struct SourceAuthorizationSubject {
5146 pub kind: SourceAuthorizationSubjectKind,
5147 pub id: String,
5148}
5149
5150pub const LODESTONE_API_DELEGATED_QUERY_SOURCE_SUBJECT_FORMAT_VERSION: u16 = 1;
5151#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5152#[serde(deny_unknown_fields)]
5153pub struct DelegatedQuerySourceSubject {
5154 pub owner_subject_namespace: String,
5155 pub subject_id: String,
5156}
5157
5158pub const LODESTONE_API_DELEGATED_QUERY_SUBJECT_CLAIMS_SHAPE_VERSION: u16 = 1;
5159pub const LODESTONE_API_DELEGATED_QUERY_SUBJECT_CLAIMS_FORMAT_VERSION: u16 = 1;
5160#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5161#[serde(deny_unknown_fields)]
5162pub struct DelegatedQuerySubjectClaims {
5163 pub format_version: u32,
5164 pub issuer_id: String,
5165 pub key_id: String,
5166 pub key_generation: U64,
5167 pub query_subject_id: Identity,
5168 pub collection_id: Identity,
5169 pub workload_principal_id: Identity,
5170 pub workload_api_key_id: Identity,
5171 pub audience: String,
5172 pub source_subjects: Vec<DelegatedQuerySourceSubject>,
5173 pub issued_at_unix_millis: U64,
5174 pub expires_at_unix_millis: U64,
5175}
5176
5177pub const LODESTONE_API_SIGNED_DELEGATED_QUERY_SUBJECT_FORMAT_VERSION: u16 = 1;
5178#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5179#[serde(deny_unknown_fields)]
5180pub struct SignedDelegatedQuerySubject {
5181 pub claims: DelegatedQuerySubjectClaims,
5182 pub signature_base64url: String,
5183}
5184
5185pub const LODESTONE_API_SOURCE_AUTHORIZATION_PRINCIPAL_CHANGE_FORMAT_VERSION: u16 = 1;
5186#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5187#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
5188pub enum SourceAuthorizationPrincipalChange {
5189 Upsert {
5190 subject: SourceAuthorizationSubject,
5191 core_principal_id: Identity,
5192 },
5193 Revoke {
5194 subject: SourceAuthorizationSubject,
5195 },
5196 Delete {
5197 subject: SourceAuthorizationSubject,
5198 },
5199}
5200
5201pub const LODESTONE_API_SOURCE_AUTHORIZATION_GROUP_CHANGE_FORMAT_VERSION: u16 = 1;
5202#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5203#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
5204pub enum SourceAuthorizationGroupChange {
5205 Upsert { subject: SourceAuthorizationSubject },
5206 Delete { subject: SourceAuthorizationSubject },
5207}
5208
5209pub const LODESTONE_API_SOURCE_AUTHORIZATION_MEMBERSHIP_REPLACEMENT_FORMAT_VERSION: u16 = 1;
5210#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5211#[serde(deny_unknown_fields)]
5212pub struct SourceAuthorizationMembershipReplacement {
5213 pub principal: SourceAuthorizationSubject,
5214 pub groups: Vec<SourceAuthorizationSubject>,
5215}
5216
5217pub const LODESTONE_API_SOURCE_AUTHORIZATION_DOCUMENT_ACL_REPLACEMENT_FORMAT_VERSION: u16 = 1;
5218#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5219#[serde(deny_unknown_fields)]
5220pub struct SourceAuthorizationDocumentAclReplacement {
5221 pub document_id: String,
5222 pub principals: Vec<SourceAuthorizationSubject>,
5223 pub groups: Vec<SourceAuthorizationSubject>,
5224}
5225
5226pub const LODESTONE_API_SOURCE_AUTHORIZATION_BATCH_SHAPE_VERSION: u16 = 1;
5227pub const LODESTONE_API_SOURCE_AUTHORIZATION_BATCH_FORMAT_VERSION: u16 = 1;
5228#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5229#[serde(deny_unknown_fields)]
5230pub struct SourceAuthorizationBatch {
5231 pub format_version: u32,
5232 pub action_id: Digest,
5233 pub index: Resource,
5234 pub owner_subject_namespace: String,
5235 pub acl_encoding_digest: Digest,
5236 #[serde(default, skip_serializing_if = "Option::is_none")]
5237 pub predecessor_generation: Option<U64>,
5238 pub successor_generation: U64,
5239 pub source_checkpoint_digest: Digest,
5240 pub issued_at: U64,
5241 pub expires_at: U64,
5242 pub maximum_staleness_millis: U64,
5243 pub principal_changes: Vec<SourceAuthorizationPrincipalChange>,
5244 pub group_changes: Vec<SourceAuthorizationGroupChange>,
5245 pub membership_replacements: Vec<SourceAuthorizationMembershipReplacement>,
5246 pub document_acl_replacements: Vec<SourceAuthorizationDocumentAclReplacement>,
5247 pub document_deletions: Vec<String>,
5248}
5249
5250pub const LODESTONE_API_SOURCE_AUTHORIZATION_APPLIED_COUNTS_FORMAT_VERSION: u16 = 1;
5251#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5252#[serde(deny_unknown_fields)]
5253pub struct SourceAuthorizationAppliedCounts {
5254 pub principal_changes: u32,
5255 pub group_changes: u32,
5256 pub membership_replacements: u32,
5257 pub document_acl_replacements: u32,
5258 pub document_deletions: u32,
5259}
5260
5261pub const LODESTONE_API_SOURCE_AUTHORIZATION_RECEIPT_SHAPE_VERSION: u16 = 1;
5262pub const LODESTONE_API_SOURCE_AUTHORIZATION_RECEIPT_FORMAT_VERSION: u16 = 1;
5263#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5264#[serde(deny_unknown_fields)]
5265pub struct SourceAuthorizationReceipt {
5266 pub format_version: u32,
5267 pub action_id: Digest,
5268 pub index: Resource,
5269 #[serde(default, skip_serializing_if = "Option::is_none")]
5270 pub predecessor_generation: Option<U64>,
5271 pub current_generation: U64,
5272 pub batch_digest: Digest,
5273 pub projection_digest: Digest,
5274 pub applied_at: U64,
5275 pub expires_at: U64,
5276 pub counts: SourceAuthorizationAppliedCounts,
5277}
5278
5279pub const LODESTONE_API_SOURCE_AUTHORIZATION_PREPARATION_FORMAT_VERSION: u16 = 1;
5280#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5281#[serde(deny_unknown_fields)]
5282pub struct SourceAuthorizationPreparation {
5283 pub action_id: Digest,
5284 pub semantic_digest: Digest,
5285 pub index: Resource,
5286 #[serde(default, skip_serializing_if = "Option::is_none")]
5287 pub predecessor_generation: Option<U64>,
5288 pub successor_generation: U64,
5289 pub receipt: SourceAuthorizationReceipt,
5290}
5291
5292pub const LODESTONE_API_SOURCE_AUTHORIZATION_RESOLUTION_STATE_FORMAT_VERSION: u16 = 1;
5293#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5294#[serde(rename_all = "snake_case")]
5295pub enum SourceAuthorizationResolutionState {
5296 NotSubmitted,
5297 Pending,
5298 Applied,
5299 ExpiredUnknown,
5300}
5301
5302pub const LODESTONE_API_SOURCE_AUTHORIZATION_RESOLUTION_FORMAT_VERSION: u16 = 1;
5303#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5304#[serde(deny_unknown_fields)]
5305pub struct SourceAuthorizationResolution {
5306 pub action_id: Digest,
5307 pub semantic_digest: Digest,
5308 pub state: SourceAuthorizationResolutionState,
5309 #[serde(default, skip_serializing_if = "Option::is_none")]
5310 pub receipt: Option<SourceAuthorizationReceipt>,
5311}
5312
5313pub const LODESTONE_API_SECURITY_ACTION_OUTCOME_FORMAT_VERSION: u16 = 1;
5314#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5315#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
5316pub enum SecurityActionOutcome {
5317 Reserved {
5318 principal_id: Identity,
5319 api_key_id: Identity,
5320 generation: U64,
5321 },
5322 Activated {
5323 principal_id: Identity,
5324 api_key_id: Identity,
5325 generation: U64,
5326 },
5327 Revoked {
5328 principal_id: Identity,
5329 api_key_id: Identity,
5330 generation: U64,
5331 },
5332 Retired {
5333 principal_id: Identity,
5334 api_key_id: Identity,
5335 generation: U64,
5336 },
5337}
5338
5339pub const LODESTONE_API_MAINTENANCE_WORK_STATE_FORMAT_VERSION: u16 = 1;
5340#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5341#[serde(rename_all = "snake_case")]
5342pub enum MaintenanceWorkState {
5343 ParkedOperatorRequired,
5344 RetryWait,
5345 RetryReady,
5346 Leased,
5347 Deferred,
5348 Runnable,
5349}
5350
5351pub const LODESTONE_API_MAINTENANCE_ATTEMPT_STATE_FORMAT_VERSION: u16 = 1;
5352#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5353#[serde(rename_all = "snake_case")]
5354pub enum MaintenanceAttemptState {
5355 Running,
5356 DeadlineExceededDraining,
5357 DeadlineExceededReclaimPending,
5358 CancellationDraining,
5359 ClaimRecoveryPending,
5360}
5361
5362pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_FORMAT_VERSION: u16 = 1;
5363#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5364#[serde(rename_all = "snake_case")]
5365pub enum MaintenanceFailureClass {
5366 Corruption,
5367 AttemptBudget,
5368 StructuralLimit,
5369 Execution,
5370 Other,
5371}
5372
5373pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_COUNT_FORMAT_VERSION: u16 = 1;
5374#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5375#[serde(deny_unknown_fields)]
5376pub struct MaintenanceFailureClassCount {
5377 pub class: MaintenanceFailureClass,
5378 pub count: U64,
5379}
5380
5381pub const LODESTONE_API_MAINTENANCE_ATTEMPT_OBSERVATION_FORMAT_VERSION: u16 = 1;
5382#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5383#[serde(deny_unknown_fields)]
5384pub struct MaintenanceAttemptObservation {
5385 pub state: MaintenanceAttemptState,
5386 pub lease_epoch: U64,
5387 pub lease_expires_at: U64,
5388 pub observed_at_millis: U64,
5389}
5390
5391pub const LODESTONE_API_MAINTENANCE_TASK_SCOPE_FORMAT_VERSION: u16 = 1;
5392#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5393#[serde(deny_unknown_fields)]
5394pub struct MaintenanceTaskScope {
5395 pub kind: String,
5396 #[serde(default, skip_serializing_if = "Option::is_none")]
5397 pub index: Option<Resource>,
5398 #[serde(default, skip_serializing_if = "Option::is_none")]
5399 pub shard_id: Option<u32>,
5400}
5401
5402pub const LODESTONE_API_MAINTENANCE_TASK_STATUS_FORMAT_VERSION: u16 = 1;
5403#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5404#[serde(deny_unknown_fields)]
5405pub struct MaintenanceTaskStatus {
5406 pub task_id: Identity,
5407 pub kind: String,
5408 pub scope: MaintenanceTaskScope,
5409 pub checkpoint_generation: U64,
5410 pub attempt_count: u32,
5411 pub admitted_at: U64,
5412 pub last_transition_at: U64,
5413 pub last_progress_at: U64,
5414 pub work_state: MaintenanceWorkState,
5415 pub state_since: U64,
5416 #[serde(default, skip_serializing_if = "Option::is_none")]
5417 pub defer_reason: Option<String>,
5418 pub cancellation_requested: bool,
5419 #[serde(default, skip_serializing_if = "Option::is_none")]
5420 pub retry_not_before: Option<U64>,
5421 #[serde(default, skip_serializing_if = "Option::is_none")]
5422 pub failure_at: Option<U64>,
5423 #[serde(default, skip_serializing_if = "Option::is_none")]
5424 pub lease_acquired_at: Option<U64>,
5425 #[serde(default, skip_serializing_if = "Option::is_none")]
5426 pub lease_expires_at: Option<U64>,
5427 #[serde(default, skip_serializing_if = "Option::is_none")]
5428 pub failure_class: Option<MaintenanceFailureClass>,
5429 #[serde(default, skip_serializing_if = "Option::is_none")]
5430 pub failure_code: Option<String>,
5431 pub operator_action_required: bool,
5432 #[serde(default, skip_serializing_if = "Option::is_none")]
5433 pub local_attempt: Option<MaintenanceAttemptObservation>,
5434}
5435
5436pub const LODESTONE_API_MAINTENANCE_STATUS_AGGREGATE_SHAPE_VERSION: u16 = 1;
5437pub const LODESTONE_API_MAINTENANCE_STATUS_AGGREGATE_FORMAT_VERSION: u16 = 2;
5438#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5439#[serde(deny_unknown_fields)]
5440pub struct MaintenanceStatusAggregate {
5441 pub format_version: u32,
5442 pub recovery_era: Identity,
5443 pub source_revision: U64,
5444 pub root_revision: U64,
5445 pub logical_observation_time: U64,
5446 #[serde(default, skip_serializing_if = "Option::is_none")]
5447 pub local_observation_millis: Option<U64>,
5448 pub total_incomplete: U64,
5449 pub parked_operator_required: U64,
5450 pub retry_wait: U64,
5451 pub retry_ready: U64,
5452 pub leased: U64,
5453 pub deferred: U64,
5454 pub runnable: U64,
5455 pub eligible_backlog: U64,
5456 pub cancellation_requested: U64,
5457 #[serde(default, skip_serializing_if = "Option::is_none")]
5458 pub oldest_backlog_age: Option<U64>,
5459 #[serde(default, skip_serializing_if = "Option::is_none")]
5460 pub oldest_runnable_age: Option<U64>,
5461 #[serde(default, skip_serializing_if = "Option::is_none")]
5462 pub oldest_retry_wait_age: Option<U64>,
5463 #[serde(default, skip_serializing_if = "Option::is_none")]
5464 pub oldest_parked_age: Option<U64>,
5465 #[serde(default, skip_serializing_if = "Option::is_none")]
5466 pub oldest_no_progress_age: Option<U64>,
5467 pub current_action_capacity: u32,
5468 pub maximum_action_capacity: u32,
5469 pub active_passes: U64,
5470 pub local_in_flight: U64,
5471 pub deadline_draining: U64,
5472 pub cancellation_draining: U64,
5473 pub claim_recovery_pending: U64,
5474 pub projection_refresh_pending: bool,
5475 #[serde(default, skip_serializing_if = "Option::is_none")]
5476 pub durable_last_progress_at: Option<U64>,
5477 pub tasks_claimed_total: U64,
5478 pub tasks_progressed_total: U64,
5479 pub tasks_completed_total: U64,
5480 pub task_retries_total: U64,
5481 pub task_failures_total: U64,
5482 pub deadline_failures_total: U64,
5483 pub cancellations_total: U64,
5484 pub overlay_capacity_exhaustions_total: U64,
5485 pub failure_classes: Vec<MaintenanceFailureClassCount>,
5486}
5487
5488pub const LODESTONE_API_RUNTIME_STATUS_DETAIL_FORMAT_VERSION: u16 = 1;
5489#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5490#[serde(deny_unknown_fields)]
5491pub struct RuntimeStatusDetail {
5492 pub metastore_revision: U64,
5493 pub root_revision: U64,
5494 pub logical_time: U64,
5495 pub degraded_dependencies: Vec<String>,
5496}
5497
5498pub const LODESTONE_API_RESULT_CACHE_STATUS_SHAPE_VERSION: u16 = 2;
5499pub const LODESTONE_API_RESULT_CACHE_STATUS_FORMAT_VERSION: u16 = 3;
5500#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5501#[serde(deny_unknown_fields)]
5502pub struct ResultCacheStatus {
5503 pub format_version: u32,
5504 pub hits: U64,
5505 pub misses: U64,
5506 pub admissions: U64,
5507 pub bypasses: U64,
5508 pub evictions: U64,
5509 pub collection_bytes: U64,
5510 pub collection_entries: u32,
5511}
5512
5513pub const LODESTONE_API_FIELD_PROMOTION_STATUS_SHAPE_VERSION: u16 = 1;
5514pub const LODESTONE_API_FIELD_PROMOTION_STATUS_FORMAT_VERSION: u16 = 3;
5515#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5516#[serde(deny_unknown_fields)]
5517pub struct FieldPromotionStatus {
5518 pub format_version: u32,
5519 pub index: Resource,
5520 pub mapping_generation: U64,
5521 pub policy_generation: U64,
5522 #[serde(default, skip_serializing_if = "Option::is_none")]
5523 pub last_decision_generation: Option<U64>,
5524 pub heat_records: u32,
5525 pub promoted_fields: u32,
5526 pub extra_bytes: U64,
5527 pub enabled: bool,
5528}
5529
5530pub const LODESTONE_API_OVERLOAD_SHARD_STATUS_SHAPE_VERSION: u16 = 2;
5531pub const LODESTONE_API_OVERLOAD_SHARD_STATUS_FORMAT_VERSION: u16 = 3;
5532#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5533#[serde(deny_unknown_fields)]
5534pub struct OverloadShardStatus {
5535 pub format_version: u32,
5536 pub shard_id: u32,
5537 pub writer_epoch: U64,
5538 pub configured_mode: String,
5539 pub effective_disposition: String,
5540 pub registered_through: U64,
5541 pub indexed_through: U64,
5542 pub lag_operations: U64,
5543 pub backlog_bytes: U64,
5544 pub oldest_age_millis: U64,
5545 pub collection_share_bytes: U64,
5546 pub recovery_ops_this_pass: u32,
5547 pub pending_overlay_documents: U64,
5548 #[serde(default, skip_serializing_if = "Option::is_none")]
5549 pub shed_reason: Option<String>,
5550}
5551
5552pub const LODESTONE_API_EXTERNAL_KEY_BINDING_FORMAT_VERSION: u16 = 1;
5553#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5554#[serde(deny_unknown_fields)]
5555pub struct ExternalKeyBinding {
5556 pub content_key_id: Identity,
5557 pub content_key_generation: U64,
5558 pub binding_id: Identity,
5559 pub binding_generation: U64,
5560 pub access_generation: U64,
5561 pub opaque_binding_base64: String,
5562 pub object_context_digest: Digest,
5563}
5564
5565pub const LODESTONE_API_EXTERNAL_KEY_RETIREMENT_TARGET_FORMAT_VERSION: u16 = 1;
5566#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5567#[serde(deny_unknown_fields)]
5568pub struct ExternalKeyRetirementTarget {
5569 pub content_key_id: Identity,
5570 pub content_key_generation: U64,
5571 pub binding_id: Identity,
5572 pub binding_generation: U64,
5573 pub access_generation: U64,
5574 pub object_context_digest: Digest,
5575}
5576
5577pub const LODESTONE_API_EXTERNAL_KEY_RETIREMENT_OUTCOME_FORMAT_VERSION: u16 = 1;
5578#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5579#[serde(rename_all = "snake_case")]
5580pub enum ExternalKeyRetirementOutcome {
5581 Retired,
5582 AlreadyAbsent,
5583}
5584
5585pub const LODESTONE_API_EXTERNAL_KEY_RETIREMENT_RECEIPT_SHAPE_VERSION: u16 = 1;
5586pub const LODESTONE_API_EXTERNAL_KEY_RETIREMENT_RECEIPT_FORMAT_VERSION: u16 = 1;
5587#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5588#[serde(deny_unknown_fields)]
5589pub struct ExternalKeyRetirementReceipt {
5590 pub format_version: u32,
5591 pub action_id: Digest,
5592 pub index: Resource,
5593 pub target: ExternalKeyRetirementTarget,
5594 pub outcome: ExternalKeyRetirementOutcome,
5595 pub authority_revision: U64,
5596 pub authority_digest: Digest,
5597}
5598
5599pub const LODESTONE_API_EXTERNAL_KEY_RETIREMENT_RESOLUTION_STATE_FORMAT_VERSION: u16 = 1;
5600#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5601#[serde(rename_all = "snake_case")]
5602pub enum ExternalKeyRetirementResolutionState {
5603 NotSubmitted,
5604 Pending,
5605 Retired,
5606 AlreadyAbsent,
5607 KnownRetired,
5608 ExpiredUnknown,
5609}
5610
5611pub const LODESTONE_API_ROLLUP_MEASURE_FORMAT_VERSION: u16 = 1;
5612#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5613#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
5614pub enum RollupMeasure {
5615 Count,
5616 Sum { field_path_digest: Digest },
5617 Min { field_path_digest: Digest },
5618 Max { field_path_digest: Digest },
5619}
5620
5621pub const LODESTONE_API_AGGREGATE_THEN_DELETE_POLICY_FORMAT_VERSION: u16 = 1;
5622#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5623#[serde(deny_unknown_fields)]
5624pub struct AggregateThenDeletePolicy {
5625 pub policy_id: Identity,
5626 pub policy_generation: U64,
5627 pub detail_retirement_acknowledged: bool,
5628 #[serde(default, skip_serializing_if = "Option::is_none")]
5629 pub expected_policy_generation: Option<U64>,
5630 pub timestamp_field_digest: Digest,
5631 pub bucket_width_millis: U64,
5632 pub bucket_alignment_millis: U64,
5633 pub dimensions: Vec<Digest>,
5634 pub measures: Vec<RollupMeasure>,
5635}
5636
5637pub const LODESTONE_API_LIFECYCLE_BINDING_STATUS_FORMAT_VERSION: u16 = 1;
5638#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5639#[serde(deny_unknown_fields)]
5640pub struct LifecycleBindingStatus {
5641 pub content_key_id: Identity,
5642 pub content_key_generation: U64,
5643 pub binding_id: Identity,
5644 pub binding_generation: U64,
5645 pub access_generation: U64,
5646}
5647
5648pub const LODESTONE_API_LIFECYCLE_ROLLUP_STATUS_FORMAT_VERSION: u16 = 1;
5649#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5650#[serde(deny_unknown_fields)]
5651pub struct LifecycleRollupStatus {
5652 pub policy_id: Identity,
5653 pub policy_generation: U64,
5654 pub ledger_revision: U64,
5655 pub coverages: u32,
5656 pub raw_retired_coverages: u32,
5657 pub detail_retirement_acknowledged: bool,
5658 pub query_contract_version: u32,
5659 pub timestamp_field_digest: Digest,
5660 pub bucket_width_millis: U64,
5661 pub bucket_alignment_millis: U64,
5662 pub dimensions: Vec<Digest>,
5663 pub measures: Vec<RollupMeasure>,
5664}
5665
5666pub const LODESTONE_API_LIFECYCLE_STATUS_SHAPE_VERSION: u16 = 2;
5667pub const LODESTONE_API_LIFECYCLE_STATUS_FORMAT_VERSION: u16 = 4;
5668#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5669#[serde(deny_unknown_fields)]
5670pub struct LifecycleStatus {
5671 pub format_version: u32,
5672 pub index: Resource,
5673 pub authority_revision: U64,
5674 pub active_bindings: Vec<LifecycleBindingStatus>,
5675 #[serde(default, skip_serializing_if = "Option::is_none")]
5676 pub rollup: Option<LifecycleRollupStatus>,
5677}
5678
5679pub const LODESTONE_API_QUOTA_LIMIT_FORMAT_VERSION: u16 = 1;
5680#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5681#[serde(deny_unknown_fields)]
5682pub struct QuotaLimit {
5683 pub dimension: String,
5684 pub maximum: U64,
5685 pub window_millis: U64,
5686}
5687
5688pub const LODESTONE_API_QUOTA_CONSUMPTION_FORMAT_VERSION: u16 = 1;
5689#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5690#[serde(deny_unknown_fields)]
5691pub struct QuotaConsumption {
5692 pub dimension: String,
5693 pub consumed: U64,
5694 pub window_millis: U64,
5695}
5696
5697pub const LODESTONE_API_QUOTA_UPDATE_FORMAT_VERSION: u16 = 1;
5698#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5699#[serde(deny_unknown_fields)]
5700pub struct QuotaUpdate {
5701 pub revision: U64,
5702 pub state: String,
5703}
5704
5705pub const LODESTONE_API_STORAGE_OVERALL_POSTURE_FORMAT_VERSION: u16 = 1;
5706#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5707#[serde(rename_all = "snake_case")]
5708pub enum StorageOverallPosture {
5709 FilesystemDevelopment,
5710 ProviderObjectStorage,
5711 S3CompatibleDevelopment,
5712 Mixed,
5713}
5714
5715pub const LODESTONE_API_STORAGE_PROFILE_ROLE_FORMAT_VERSION: u16 = 1;
5716#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5717#[serde(rename_all = "snake_case")]
5718pub enum StorageProfileRole {
5719 Control,
5720 DefaultWal,
5721 DefaultData,
5722}
5723
5724pub const LODESTONE_API_STORAGE_PROVIDER_POSTURE_FORMAT_VERSION: u16 = 1;
5725#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5726#[serde(rename_all = "snake_case")]
5727pub enum StorageProviderPosture {
5728 Aws,
5729 GoogleCloudStorage,
5730 AzureBlob,
5731 S3CompatibleDevelopment,
5732 FilesystemDevelopment,
5733}
5734
5735pub const LODESTONE_API_STORAGE_BACKEND_SERVICE_CLASS_FORMAT_VERSION: u16 = 1;
5736#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5737#[serde(rename_all = "snake_case")]
5738pub enum StorageBackendServiceClass {
5739 RegionalObject,
5740 ZonalLowLatency,
5741}
5742
5743pub const LODESTONE_API_STORAGE_PROFILE_ROLE_BINDING_FORMAT_VERSION: u16 = 1;
5744#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5745#[serde(deny_unknown_fields)]
5746pub struct StorageProfileRoleBinding {
5747 pub role: StorageProfileRole,
5748 pub authority_group: u32,
5749 pub provider: StorageProviderPosture,
5750 pub service_class: StorageBackendServiceClass,
5751}
5752
5753pub const LODESTONE_API_STORAGE_PROFILE_ATTESTATION_SHAPE_VERSION: u16 = 1;
5754pub const LODESTONE_API_STORAGE_PROFILE_ATTESTATION_FORMAT_VERSION: u16 = 1;
5755#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5756#[serde(deny_unknown_fields)]
5757pub struct StorageProfileAttestation {
5758 pub format_version: u32,
5759 pub configuration_generation: U64,
5760 pub overall_posture: StorageOverallPosture,
5761 pub roles: Vec<StorageProfileRoleBinding>,
5762 pub default_durability: ResourceDurabilityClass,
5763 pub default_storage: ResourceStorageClass,
5764 pub default_policy_digest: Digest,
5765 pub storage_profile_digest: Digest,
5766 pub attestation_digest: Digest,
5767}
5768
5769pub const LODESTONE_API_STORAGE_PROFILE_EXPECTATION_SHAPE_VERSION: u16 = 1;
5770pub const LODESTONE_API_STORAGE_PROFILE_EXPECTATION_FORMAT_VERSION: u16 = 1;
5771#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5772#[serde(deny_unknown_fields)]
5773pub struct StorageProfileExpectation {
5774 pub format_version: u32,
5775 #[serde(default, skip_serializing_if = "Option::is_none")]
5776 pub required_posture: Option<StorageOverallPosture>,
5777 #[serde(default, skip_serializing_if = "Option::is_none")]
5778 pub expected_storage_profile_digest: Option<Digest>,
5779}
5780
5781pub const LODESTONE_API_CORE_BINDING_FORMAT_VERSION: u16 = 3;
5782#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5783#[serde(deny_unknown_fields)]
5784pub struct CoreBinding {
5785 pub cluster_id: Identity,
5786 pub collection_id: Identity,
5787 pub configuration_generation: U64,
5788 pub native_endpoints: Vec<String>,
5789 pub selected_stream_endpoint: String,
5790 pub schema_id: String,
5791 pub schema_digest: Digest,
5792 pub storage_profile: StorageProfileAttestation,
5793}
5794
5795pub const LODESTONE_API_READINESS_OBSERVATION_FORMAT_VERSION: u16 = 1;
5796#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5797#[serde(deny_unknown_fields)]
5798pub struct ReadinessObservation {
5799 pub subject: String,
5800 pub state: String,
5801 #[serde(default, skip_serializing_if = "Option::is_none")]
5802 pub reason: Option<String>,
5803 pub revision: U64,
5804 pub observed_cut: U64,
5805}
5806
5807pub const LODESTONE_API_USAGE_DIMENSION_FORMAT_VERSION: u16 = 1;
5808#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5809#[serde(deny_unknown_fields)]
5810pub struct UsageDimension {
5811 pub name: String,
5812 pub value: String,
5813}
5814
5815pub const LODESTONE_API_PHYSICAL_USAGE_VALUE_FORMAT_VERSION: u16 = 2;
5816#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5817#[serde(deny_unknown_fields)]
5818pub struct PhysicalUsageValue {
5819 pub meter: String,
5820 pub unit: String,
5821 pub value: ExactDecimal,
5822}
5823
5824pub const LODESTONE_API_CORE_USAGE_UNITS_FORMAT_VERSION: u16 = 2;
5825#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5826#[serde(deny_unknown_fields)]
5827pub struct CoreUsageUnits {
5828 pub sequence: U64,
5829 pub record_identity: Digest,
5830 pub index_id: Identity,
5831 pub workload_class: WorkloadClass,
5832 pub window_start: U64,
5833 pub window_end: U64,
5834 pub meter_set_version: u32,
5835 pub dimensions: Vec<UsageDimension>,
5836 pub values: Vec<PhysicalUsageValue>,
5837 pub authority_revision: U64,
5838 pub source_digest: Digest,
5839}
5840
5841pub const LODESTONE_API_CORE_USAGE_CORRECTION_FORMAT_VERSION: u16 = 2;
5842#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5843#[serde(deny_unknown_fields)]
5844pub struct CoreUsageCorrection {
5845 pub sequence: U64,
5846 pub correction_sequence: U64,
5847 pub correction_identity: Digest,
5848 pub target_record_identity: Digest,
5849 pub index_id: Identity,
5850 pub workload_class: WorkloadClass,
5851 pub window_start: U64,
5852 pub window_end: U64,
5853 pub meter_set_version: u32,
5854 pub dimensions: Vec<UsageDimension>,
5855 pub values: Vec<PhysicalUsageValue>,
5856 pub reason_digest: Digest,
5857 pub authority_revision: U64,
5858 pub source_digest: Digest,
5859}
5860
5861pub const LODESTONE_API_INDEX_STORAGE_USAGE_FORMAT_VERSION: u16 = 1;
5862#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5863#[serde(deny_unknown_fields)]
5864pub struct IndexStorageUsage {
5865 pub index_id: Identity,
5866 pub logical_bytes: U64,
5867 pub exclusive_bytes: U64,
5868 pub shared_bytes: U64,
5869}
5870
5871pub const LODESTONE_API_COLLECTION_STORAGE_USAGE_SHAPE_VERSION: u16 = 1;
5872pub const LODESTONE_API_COLLECTION_STORAGE_USAGE_FORMAT_VERSION: u16 = 1;
5873#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5874#[serde(deny_unknown_fields)]
5875pub struct CollectionStorageUsage {
5876 pub format_version: u32,
5877 pub catalog_revision: U64,
5878 pub catalog_root_digest: Digest,
5879 pub current_physical_bytes: U64,
5880 pub retained_physical_bytes: U64,
5881 pub retained_unique_bytes: U64,
5882 pub retained_shared_bytes: U64,
5883 pub protected_roots: u32,
5884 pub indexes: Vec<IndexStorageUsage>,
5885 pub observation_digest: Digest,
5886}
5887
5888pub const LODESTONE_API_RESPONSE_META_SHAPE_VERSION: u16 = 1;
5889pub const LODESTONE_API_RESPONSE_META_FORMAT_VERSION: u16 = 1;
5890#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5891#[serde(deny_unknown_fields)]
5892pub struct ResponseMeta {
5893 pub format_version: u32,
5894 pub request_id: String,
5895 pub correlation_id: Identity,
5896 pub diagnostic_id: Identity,
5897}
5898
5899pub const LODESTONE_API_ERROR_DISPOSITION_FORMAT_VERSION: u16 = 1;
5900#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5901#[serde(rename_all = "snake_case")]
5902pub enum ErrorDisposition {
5903 NotSubmitted,
5904 Submitted,
5905 Resolved,
5906 KnownRetired,
5907 Indeterminate,
5908}
5909
5910pub const LODESTONE_API_RECOVERY_ACTION_FORMAT_VERSION: u16 = 1;
5911#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5912#[serde(rename_all = "snake_case")]
5913pub enum RecoveryAction {
5914 Retry,
5915 RetryAfter,
5916 RefreshCredential,
5917 RestartPage,
5918 ReduceRequest,
5919 Resolve,
5920 RefreshPrecondition,
5921 CorrectRange,
5922 Stop,
5923}
5924
5925pub const LODESTONE_API_LIMIT_CLASS_FORMAT_VERSION: u16 = 1;
5926#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5927#[serde(rename_all = "snake_case")]
5928pub enum LimitClass {
5929 RequestBound,
5930 CollectionQuota,
5931 EngineSafety,
5932}
5933
5934pub const LODESTONE_API_ERROR_DETAIL_FORMAT_VERSION: u16 = 3;
5935#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5936#[serde(tag = "code", rename_all = "snake_case", deny_unknown_fields)]
5937pub enum ErrorDetail {
5938 Aborted {
5939 reason: String,
5940 },
5941 DeadlineExceeded,
5942 InvalidRequest {
5943 #[serde(default, skip_serializing_if = "Option::is_none")]
5944 field: Option<String>,
5945 reason: String,
5946 },
5947 UnsupportedVersion {
5948 observed: u32,
5949 maximum_supported: u32,
5950 },
5951 Unauthenticated,
5952 PermissionDenied {
5953 #[serde(default, skip_serializing_if = "Option::is_none")]
5954 action: Option<String>,
5955 #[serde(default, skip_serializing_if = "Option::is_none")]
5956 workload_class: Option<WorkloadClass>,
5957 },
5958 NotFound {
5959 #[serde(default, skip_serializing_if = "Option::is_none")]
5960 resource: Option<String>,
5961 },
5962 Conflict {
5963 #[serde(default, skip_serializing_if = "Option::is_none")]
5964 expected_revision: Option<U64>,
5965 #[serde(default, skip_serializing_if = "Option::is_none")]
5966 observed_revision: Option<U64>,
5967 },
5968 StaleCursor {
5969 restart_count: u32,
5970 },
5971 RestartBudgetExhausted {
5972 maximum_restarts: u32,
5973 },
5974 LimitExceeded {
5975 class: LimitClass,
5976 limit_id: String,
5977 maximum: U64,
5978 },
5979 CapabilityUnavailable {
5980 #[serde(default, skip_serializing_if = "Option::is_none")]
5981 capability: Option<String>,
5982 },
5983 NotSubmitted {
5984 #[serde(default, skip_serializing_if = "Option::is_none")]
5985 retry_after_millis: Option<U64>,
5986 },
5987 SubmittedIndeterminate {
5988 #[serde(default, skip_serializing_if = "Option::is_none")]
5989 locator: Option<Locator>,
5990 },
5991 ExpiredUnknown {
5992 #[serde(default, skip_serializing_if = "Option::is_none")]
5993 locator: Option<Locator>,
5994 },
5995 SecretNotEscrowed,
5996 RetentionGap {
5997 retired_through: U64,
5998 },
5999 ArtifactRangeInvalid {
6000 maximum_bytes: U64,
6001 },
6002 ChecksumMismatch {
6003 expected: Digest,
6004 observed: Digest,
6005 },
6006 TemporarilyUnavailable {
6007 #[serde(default, skip_serializing_if = "Option::is_none")]
6008 retry_after_millis: Option<U64>,
6009 },
6010 Internal,
6011}
6012
6013pub const LODESTONE_API_CONNECTION_PROFILE_SHAPE_VERSION: u16 = 4;
6014pub const LODESTONE_API_CONNECTION_PROFILE_FORMAT_VERSION: u16 = 4;
6015#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6016#[serde(deny_unknown_fields)]
6017pub struct ConnectionProfile {
6018 pub format_version: u32,
6019 pub profile_generation: U64,
6020 pub native_endpoints: Vec<String>,
6021 pub selected_stream_endpoint: String,
6022 pub tls_server_name: String,
6023 pub tls_trust_sha256: Digest,
6024 pub expected_cluster_id: Identity,
6025 pub expected_collection_id: Identity,
6026 pub expected_principal_id: Identity,
6027 pub schema_id: String,
6028 pub schema_digest: Digest,
6029 pub credential_id: Identity,
6030 pub credential_generation: U64,
6031 #[serde(default, skip_serializing_if = "Option::is_none")]
6032 pub credential_expires_at: Option<U64>,
6033 pub secret_reference: String,
6034 #[serde(default, skip_serializing_if = "Option::is_none")]
6035 pub storage_profile_expectation: Option<StorageProfileExpectation>,
6036}
6037
6038#[derive(Clone, Copy, Debug, Eq, PartialEq)]
6039pub enum TypeKind {
6040 Enum,
6041 Struct,
6042 TaggedUnion,
6043}
6044#[derive(Clone, Copy, Debug, Eq, PartialEq)]
6045pub struct TypeContract {
6046 pub name: &'static str,
6047 pub shape_version: u16,
6048 pub instance_format_version: Option<u16>,
6049 pub kind: TypeKind,
6050 pub wire: bool,
6051}
6052pub const LODESTONE_API_TYPE_CONTRACTS: &[TypeContract] = &[
6053 TypeContract {
6054 name: "cursor",
6055 shape_version: 1,
6056 instance_format_version: None,
6057 kind: TypeKind::Struct,
6058 wire: true,
6059 },
6060 TypeContract {
6061 name: "locator",
6062 shape_version: 1,
6063 instance_format_version: None,
6064 kind: TypeKind::Struct,
6065 wire: true,
6066 },
6067 TypeContract {
6068 name: "resource",
6069 shape_version: 1,
6070 instance_format_version: None,
6071 kind: TypeKind::Struct,
6072 wire: true,
6073 },
6074 TypeContract {
6075 name: "read_cut_kind",
6076 shape_version: 1,
6077 instance_format_version: None,
6078 kind: TypeKind::Enum,
6079 wire: true,
6080 },
6081 TypeContract {
6082 name: "read_cut_index_evidence",
6083 shape_version: 1,
6084 instance_format_version: None,
6085 kind: TypeKind::Struct,
6086 wire: true,
6087 },
6088 TypeContract {
6089 name: "read_cut_evidence",
6090 shape_version: 1,
6091 instance_format_version: Some(1),
6092 kind: TypeKind::Struct,
6093 wire: true,
6094 },
6095 TypeContract {
6096 name: "table_snapshot_object_role",
6097 shape_version: 1,
6098 instance_format_version: None,
6099 kind: TypeKind::Enum,
6100 wire: true,
6101 },
6102 TypeContract {
6103 name: "table_snapshot_codec",
6104 shape_version: 1,
6105 instance_format_version: None,
6106 kind: TypeKind::Enum,
6107 wire: true,
6108 },
6109 TypeContract {
6110 name: "table_snapshot_object",
6111 shape_version: 1,
6112 instance_format_version: None,
6113 kind: TypeKind::Struct,
6114 wire: true,
6115 },
6116 TypeContract {
6117 name: "table_snapshot",
6118 shape_version: 1,
6119 instance_format_version: Some(1),
6120 kind: TypeKind::Struct,
6121 wire: true,
6122 },
6123 TypeContract {
6124 name: "table_snapshot_resolution_state",
6125 shape_version: 1,
6126 instance_format_version: None,
6127 kind: TypeKind::Enum,
6128 wire: true,
6129 },
6130 TypeContract {
6131 name: "table_snapshot_resolution",
6132 shape_version: 1,
6133 instance_format_version: None,
6134 kind: TypeKind::Struct,
6135 wire: true,
6136 },
6137 TypeContract {
6138 name: "table_snapshot_read",
6139 shape_version: 1,
6140 instance_format_version: None,
6141 kind: TypeKind::Struct,
6142 wire: true,
6143 },
6144 TypeContract {
6145 name: "logical_occupancy_counts",
6146 shape_version: 1,
6147 instance_format_version: None,
6148 kind: TypeKind::Struct,
6149 wire: true,
6150 },
6151 TypeContract {
6152 name: "logical_occupancy_gap_state",
6153 shape_version: 1,
6154 instance_format_version: None,
6155 kind: TypeKind::Enum,
6156 wire: true,
6157 },
6158 TypeContract {
6159 name: "logical_occupancy_snapshot_evidence",
6160 shape_version: 1,
6161 instance_format_version: Some(1),
6162 kind: TypeKind::Struct,
6163 wire: true,
6164 },
6165 TypeContract {
6166 name: "logical_occupancy_window_gap",
6167 shape_version: 1,
6168 instance_format_version: Some(1),
6169 kind: TypeKind::Struct,
6170 wire: true,
6171 },
6172 TypeContract {
6173 name: "field_promotion_configuration",
6174 shape_version: 1,
6175 instance_format_version: Some(3),
6176 kind: TypeKind::Struct,
6177 wire: true,
6178 },
6179 TypeContract {
6180 name: "overload_configuration",
6181 shape_version: 2,
6182 instance_format_version: Some(3),
6183 kind: TypeKind::Struct,
6184 wire: true,
6185 },
6186 TypeContract {
6187 name: "index_policies",
6188 shape_version: 1,
6189 instance_format_version: None,
6190 kind: TypeKind::Struct,
6191 wire: true,
6192 },
6193 TypeContract {
6194 name: "maintenance_budgets",
6195 shape_version: 1,
6196 instance_format_version: None,
6197 kind: TypeKind::Struct,
6198 wire: true,
6199 },
6200 TypeContract {
6201 name: "resource_durability_class",
6202 shape_version: 1,
6203 instance_format_version: None,
6204 kind: TypeKind::Enum,
6205 wire: true,
6206 },
6207 TypeContract {
6208 name: "resource_storage_class",
6209 shape_version: 1,
6210 instance_format_version: None,
6211 kind: TypeKind::Enum,
6212 wire: true,
6213 },
6214 TypeContract {
6215 name: "vector_quality_objective",
6216 shape_version: 1,
6217 instance_format_version: None,
6218 kind: TypeKind::Enum,
6219 wire: true,
6220 },
6221 TypeContract {
6222 name: "vector_indexing_objective",
6223 shape_version: 1,
6224 instance_format_version: None,
6225 kind: TypeKind::Enum,
6226 wire: true,
6227 },
6228 TypeContract {
6229 name: "vector_residency_intent",
6230 shape_version: 1,
6231 instance_format_version: None,
6232 kind: TypeKind::Enum,
6233 wire: true,
6234 },
6235 TypeContract {
6236 name: "vector_calibration_binding",
6237 shape_version: 1,
6238 instance_format_version: None,
6239 kind: TypeKind::Struct,
6240 wire: true,
6241 },
6242 TypeContract {
6243 name: "vector_resource_policy",
6244 shape_version: 2,
6245 instance_format_version: None,
6246 kind: TypeKind::Struct,
6247 wire: true,
6248 },
6249 TypeContract {
6250 name: "workload_class",
6251 shape_version: 1,
6252 instance_format_version: None,
6253 kind: TypeKind::Enum,
6254 wire: true,
6255 },
6256 TypeContract {
6257 name: "index_resource_spec",
6258 shape_version: 3,
6259 instance_format_version: Some(3),
6260 kind: TypeKind::Struct,
6261 wire: true,
6262 },
6263 TypeContract {
6264 name: "index_summary",
6265 shape_version: 1,
6266 instance_format_version: None,
6267 kind: TypeKind::Struct,
6268 wire: true,
6269 },
6270 TypeContract {
6271 name: "mapping_mode",
6272 shape_version: 1,
6273 instance_format_version: None,
6274 kind: TypeKind::Enum,
6275 wire: true,
6276 },
6277 TypeContract {
6278 name: "dynamic_mapping_policy",
6279 shape_version: 1,
6280 instance_format_version: None,
6281 kind: TypeKind::Enum,
6282 wire: true,
6283 },
6284 TypeContract {
6285 name: "mapping_analyzer",
6286 shape_version: 1,
6287 instance_format_version: None,
6288 kind: TypeKind::Enum,
6289 wire: true,
6290 },
6291 TypeContract {
6292 name: "keyword_normalizer",
6293 shape_version: 1,
6294 instance_format_version: None,
6295 kind: TypeKind::Enum,
6296 wire: true,
6297 },
6298 TypeContract {
6299 name: "vector_metric",
6300 shape_version: 1,
6301 instance_format_version: None,
6302 kind: TypeKind::Enum,
6303 wire: true,
6304 },
6305 TypeContract {
6306 name: "mapping_scalar",
6307 shape_version: 1,
6308 instance_format_version: None,
6309 kind: TypeKind::TaggedUnion,
6310 wire: true,
6311 },
6312 TypeContract {
6313 name: "sparse_vector_weight_type",
6314 shape_version: 1,
6315 instance_format_version: None,
6316 kind: TypeKind::Enum,
6317 wire: true,
6318 },
6319 TypeContract {
6320 name: "mapping_field_type",
6321 shape_version: 3,
6322 instance_format_version: None,
6323 kind: TypeKind::TaggedUnion,
6324 wire: true,
6325 },
6326 TypeContract {
6327 name: "mapping_field",
6328 shape_version: 1,
6329 instance_format_version: None,
6330 kind: TypeKind::Struct,
6331 wire: true,
6332 },
6333 TypeContract {
6334 name: "multi_field_projection",
6335 shape_version: 1,
6336 instance_format_version: None,
6337 kind: TypeKind::Struct,
6338 wire: true,
6339 },
6340 TypeContract {
6341 name: "analyzer_identity",
6342 shape_version: 1,
6343 instance_format_version: None,
6344 kind: TypeKind::Struct,
6345 wire: true,
6346 },
6347 TypeContract {
6348 name: "keyword_limit",
6349 shape_version: 1,
6350 instance_format_version: None,
6351 kind: TypeKind::Struct,
6352 wire: true,
6353 },
6354 TypeContract {
6355 name: "profile_privacy_action",
6356 shape_version: 1,
6357 instance_format_version: None,
6358 kind: TypeKind::Enum,
6359 wire: true,
6360 },
6361 TypeContract {
6362 name: "profile_privacy_field",
6363 shape_version: 1,
6364 instance_format_version: None,
6365 kind: TypeKind::TaggedUnion,
6366 wire: true,
6367 },
6368 TypeContract {
6369 name: "profile_privacy_rule",
6370 shape_version: 1,
6371 instance_format_version: None,
6372 kind: TypeKind::Struct,
6373 wire: true,
6374 },
6375 TypeContract {
6376 name: "profile_privacy_policy",
6377 shape_version: 1,
6378 instance_format_version: Some(1),
6379 kind: TypeKind::Struct,
6380 wire: true,
6381 },
6382 TypeContract {
6383 name: "mapping_record_model",
6384 shape_version: 3,
6385 instance_format_version: None,
6386 kind: TypeKind::TaggedUnion,
6387 wire: true,
6388 },
6389 TypeContract {
6390 name: "mapping",
6391 shape_version: 4,
6392 instance_format_version: Some(10),
6393 kind: TypeKind::Struct,
6394 wire: true,
6395 },
6396 TypeContract {
6397 name: "index_detail",
6398 shape_version: 1,
6399 instance_format_version: None,
6400 kind: TypeKind::Struct,
6401 wire: true,
6402 },
6403 TypeContract {
6404 name: "source_provider",
6405 shape_version: 1,
6406 instance_format_version: None,
6407 kind: TypeKind::Enum,
6408 wire: true,
6409 },
6410 TypeContract {
6411 name: "source_decoder",
6412 shape_version: 1,
6413 instance_format_version: None,
6414 kind: TypeKind::Enum,
6415 wire: true,
6416 },
6417 TypeContract {
6418 name: "source_replay_guarantees",
6419 shape_version: 1,
6420 instance_format_version: None,
6421 kind: TypeKind::Struct,
6422 wire: true,
6423 },
6424 TypeContract {
6425 name: "source_partition_configuration",
6426 shape_version: 1,
6427 instance_format_version: None,
6428 kind: TypeKind::Struct,
6429 wire: true,
6430 },
6431 TypeContract {
6432 name: "replayable_source_configuration",
6433 shape_version: 1,
6434 instance_format_version: None,
6435 kind: TypeKind::Struct,
6436 wire: true,
6437 },
6438 TypeContract {
6439 name: "source_partition_status",
6440 shape_version: 1,
6441 instance_format_version: None,
6442 kind: TypeKind::Struct,
6443 wire: true,
6444 },
6445 TypeContract {
6446 name: "replayable_source_status",
6447 shape_version: 1,
6448 instance_format_version: None,
6449 kind: TypeKind::Struct,
6450 wire: true,
6451 },
6452 TypeContract {
6453 name: "source_control_transition",
6454 shape_version: 1,
6455 instance_format_version: None,
6456 kind: TypeKind::Enum,
6457 wire: true,
6458 },
6459 TypeContract {
6460 name: "history_ledger_precondition",
6461 shape_version: 1,
6462 instance_format_version: None,
6463 kind: TypeKind::TaggedUnion,
6464 wire: true,
6465 },
6466 TypeContract {
6467 name: "history_retention_policy",
6468 shape_version: 1,
6469 instance_format_version: None,
6470 kind: TypeKind::Struct,
6471 wire: true,
6472 },
6473 TypeContract {
6474 name: "history_selector",
6475 shape_version: 1,
6476 instance_format_version: None,
6477 kind: TypeKind::TaggedUnion,
6478 wire: true,
6479 },
6480 TypeContract {
6481 name: "history_hold",
6482 shape_version: 1,
6483 instance_format_version: None,
6484 kind: TypeKind::Struct,
6485 wire: true,
6486 },
6487 TypeContract {
6488 name: "history_status",
6489 shape_version: 1,
6490 instance_format_version: None,
6491 kind: TypeKind::Struct,
6492 wire: true,
6493 },
6494 TypeContract {
6495 name: "history_resolution",
6496 shape_version: 1,
6497 instance_format_version: None,
6498 kind: TypeKind::Struct,
6499 wire: true,
6500 },
6501 TypeContract {
6502 name: "index_reference",
6503 shape_version: 1,
6504 instance_format_version: None,
6505 kind: TypeKind::Struct,
6506 wire: true,
6507 },
6508 TypeContract {
6509 name: "alias_target",
6510 shape_version: 1,
6511 instance_format_version: None,
6512 kind: TypeKind::Struct,
6513 wire: true,
6514 },
6515 TypeContract {
6516 name: "alias_summary",
6517 shape_version: 1,
6518 instance_format_version: None,
6519 kind: TypeKind::Struct,
6520 wire: true,
6521 },
6522 TypeContract {
6523 name: "alias_detail",
6524 shape_version: 1,
6525 instance_format_version: None,
6526 kind: TypeKind::Struct,
6527 wire: true,
6528 },
6529 TypeContract {
6530 name: "data_stream_summary",
6531 shape_version: 1,
6532 instance_format_version: None,
6533 kind: TypeKind::Struct,
6534 wire: true,
6535 },
6536 TypeContract {
6537 name: "component_template_binding",
6538 shape_version: 1,
6539 instance_format_version: None,
6540 kind: TypeKind::Struct,
6541 wire: true,
6542 },
6543 TypeContract {
6544 name: "index_template_binding",
6545 shape_version: 1,
6546 instance_format_version: None,
6547 kind: TypeKind::Struct,
6548 wire: true,
6549 },
6550 TypeContract {
6551 name: "lifecycle_policy_binding",
6552 shape_version: 1,
6553 instance_format_version: None,
6554 kind: TypeKind::Struct,
6555 wire: true,
6556 },
6557 TypeContract {
6558 name: "data_stream_detail",
6559 shape_version: 1,
6560 instance_format_version: None,
6561 kind: TypeKind::Struct,
6562 wire: true,
6563 },
6564 TypeContract {
6565 name: "component_template_summary",
6566 shape_version: 1,
6567 instance_format_version: None,
6568 kind: TypeKind::Struct,
6569 wire: true,
6570 },
6571 TypeContract {
6572 name: "component_template_detail",
6573 shape_version: 1,
6574 instance_format_version: None,
6575 kind: TypeKind::Struct,
6576 wire: true,
6577 },
6578 TypeContract {
6579 name: "index_template_summary",
6580 shape_version: 1,
6581 instance_format_version: None,
6582 kind: TypeKind::Struct,
6583 wire: true,
6584 },
6585 TypeContract {
6586 name: "index_template_detail",
6587 shape_version: 1,
6588 instance_format_version: None,
6589 kind: TypeKind::Struct,
6590 wire: true,
6591 },
6592 TypeContract {
6593 name: "ingest_pipeline_summary",
6594 shape_version: 1,
6595 instance_format_version: None,
6596 kind: TypeKind::Struct,
6597 wire: true,
6598 },
6599 TypeContract {
6600 name: "ingest_pipeline_detail",
6601 shape_version: 1,
6602 instance_format_version: None,
6603 kind: TypeKind::Struct,
6604 wire: true,
6605 },
6606 TypeContract {
6607 name: "ingest_pipeline_selection",
6608 shape_version: 1,
6609 instance_format_version: None,
6610 kind: TypeKind::Struct,
6611 wire: true,
6612 },
6613 TypeContract {
6614 name: "lifecycle_policy_summary",
6615 shape_version: 1,
6616 instance_format_version: None,
6617 kind: TypeKind::Struct,
6618 wire: true,
6619 },
6620 TypeContract {
6621 name: "rollover_thresholds",
6622 shape_version: 1,
6623 instance_format_version: None,
6624 kind: TypeKind::Struct,
6625 wire: true,
6626 },
6627 TypeContract {
6628 name: "retention_policy",
6629 shape_version: 1,
6630 instance_format_version: None,
6631 kind: TypeKind::Struct,
6632 wire: true,
6633 },
6634 TypeContract {
6635 name: "lifecycle_policy_detail",
6636 shape_version: 1,
6637 instance_format_version: None,
6638 kind: TypeKind::Struct,
6639 wire: true,
6640 },
6641 TypeContract {
6642 name: "text_query_operator",
6643 shape_version: 1,
6644 instance_format_version: None,
6645 kind: TypeKind::Enum,
6646 wire: true,
6647 },
6648 TypeContract {
6649 name: "text_query_analyzer",
6650 shape_version: 1,
6651 instance_format_version: None,
6652 kind: TypeKind::Enum,
6653 wire: true,
6654 },
6655 TypeContract {
6656 name: "zero_terms_query",
6657 shape_version: 1,
6658 instance_format_version: None,
6659 kind: TypeKind::Enum,
6660 wire: true,
6661 },
6662 TypeContract {
6663 name: "text_query_options",
6664 shape_version: 1,
6665 instance_format_version: None,
6666 kind: TypeKind::Struct,
6667 wire: true,
6668 },
6669 TypeContract {
6670 name: "multi_match_mode",
6671 shape_version: 1,
6672 instance_format_version: None,
6673 kind: TypeKind::Enum,
6674 wire: true,
6675 },
6676 TypeContract {
6677 name: "multi_match_field",
6678 shape_version: 1,
6679 instance_format_version: None,
6680 kind: TypeKind::Struct,
6681 wire: true,
6682 },
6683 TypeContract {
6684 name: "multi_match_options",
6685 shape_version: 1,
6686 instance_format_version: None,
6687 kind: TypeKind::Struct,
6688 wire: true,
6689 },
6690 TypeContract {
6691 name: "sort_order",
6692 shape_version: 1,
6693 instance_format_version: None,
6694 kind: TypeKind::Enum,
6695 wire: true,
6696 },
6697 TypeContract {
6698 name: "sort_mode",
6699 shape_version: 1,
6700 instance_format_version: None,
6701 kind: TypeKind::Enum,
6702 wire: true,
6703 },
6704 TypeContract {
6705 name: "missing_order",
6706 shape_version: 1,
6707 instance_format_version: None,
6708 kind: TypeKind::Enum,
6709 wire: true,
6710 },
6711 TypeContract {
6712 name: "nested_score_mode",
6713 shape_version: 1,
6714 instance_format_version: None,
6715 kind: TypeKind::Enum,
6716 wire: true,
6717 },
6718 TypeContract {
6719 name: "nested_inner_hits",
6720 shape_version: 1,
6721 instance_format_version: None,
6722 kind: TypeKind::Struct,
6723 wire: true,
6724 },
6725 TypeContract {
6726 name: "sort_spec",
6727 shape_version: 1,
6728 instance_format_version: None,
6729 kind: TypeKind::TaggedUnion,
6730 wire: true,
6731 },
6732 TypeContract {
6733 name: "query",
6734 shape_version: 1,
6735 instance_format_version: None,
6736 kind: TypeKind::TaggedUnion,
6737 wire: true,
6738 },
6739 TypeContract {
6740 name: "dense_retrieval_mode",
6741 shape_version: 1,
6742 instance_format_version: None,
6743 kind: TypeKind::Enum,
6744 wire: true,
6745 },
6746 TypeContract {
6747 name: "vector_achieved_mode",
6748 shape_version: 1,
6749 instance_format_version: None,
6750 kind: TypeKind::Enum,
6751 wire: true,
6752 },
6753 TypeContract {
6754 name: "vector_branch_diagnostics",
6755 shape_version: 2,
6756 instance_format_version: None,
6757 kind: TypeKind::Struct,
6758 wire: true,
6759 },
6760 TypeContract {
6761 name: "dense_vector_element_type",
6762 shape_version: 1,
6763 instance_format_version: None,
6764 kind: TypeKind::Enum,
6765 wire: true,
6766 },
6767 TypeContract {
6768 name: "dense_vector_byte_order",
6769 shape_version: 1,
6770 instance_format_version: None,
6771 kind: TypeKind::Enum,
6772 wire: true,
6773 },
6774 TypeContract {
6775 name: "vector_value",
6776 shape_version: 1,
6777 instance_format_version: None,
6778 kind: TypeKind::TaggedUnion,
6779 wire: true,
6780 },
6781 TypeContract {
6782 name: "sparse_vector_entry",
6783 shape_version: 1,
6784 instance_format_version: None,
6785 kind: TypeKind::Struct,
6786 wire: true,
6787 },
6788 TypeContract {
6789 name: "sparse_vector_value",
6790 shape_version: 1,
6791 instance_format_version: None,
6792 kind: TypeKind::Struct,
6793 wire: true,
6794 },
6795 TypeContract {
6796 name: "vector_set_value",
6797 shape_version: 1,
6798 instance_format_version: None,
6799 kind: TypeKind::Struct,
6800 wire: true,
6801 },
6802 TypeContract {
6803 name: "vector_evaluation_snapshot",
6804 shape_version: 1,
6805 instance_format_version: None,
6806 kind: TypeKind::TaggedUnion,
6807 wire: true,
6808 },
6809 TypeContract {
6810 name: "vector_evaluation_query_set",
6811 shape_version: 1,
6812 instance_format_version: None,
6813 kind: TypeKind::TaggedUnion,
6814 wire: true,
6815 },
6816 TypeContract {
6817 name: "vector_evaluation_budget",
6818 shape_version: 1,
6819 instance_format_version: None,
6820 kind: TypeKind::Struct,
6821 wire: true,
6822 },
6823 TypeContract {
6824 name: "vector_candidate_policy",
6825 shape_version: 1,
6826 instance_format_version: None,
6827 kind: TypeKind::Enum,
6828 wire: true,
6829 },
6830 TypeContract {
6831 name: "vector_calibration_objective",
6832 shape_version: 1,
6833 instance_format_version: None,
6834 kind: TypeKind::Enum,
6835 wire: true,
6836 },
6837 TypeContract {
6838 name: "vector_strategy_profile",
6839 shape_version: 1,
6840 instance_format_version: None,
6841 kind: TypeKind::Enum,
6842 wire: true,
6843 },
6844 TypeContract {
6845 name: "vector_evaluation_work",
6846 shape_version: 1,
6847 instance_format_version: None,
6848 kind: TypeKind::Struct,
6849 wire: true,
6850 },
6851 TypeContract {
6852 name: "vector_evaluation_error_code",
6853 shape_version: 1,
6854 instance_format_version: None,
6855 kind: TypeKind::Enum,
6856 wire: true,
6857 },
6858 TypeContract {
6859 name: "vector_evaluation_error",
6860 shape_version: 1,
6861 instance_format_version: None,
6862 kind: TypeKind::Struct,
6863 wire: true,
6864 },
6865 TypeContract {
6866 name: "vector_recall_result",
6867 shape_version: 1,
6868 instance_format_version: Some(1),
6869 kind: TypeKind::Struct,
6870 wire: true,
6871 },
6872 TypeContract {
6873 name: "vector_calibration_candidate",
6874 shape_version: 1,
6875 instance_format_version: None,
6876 kind: TypeKind::Struct,
6877 wire: true,
6878 },
6879 TypeContract {
6880 name: "vector_calibration_result",
6881 shape_version: 1,
6882 instance_format_version: Some(1),
6883 kind: TypeKind::Struct,
6884 wire: true,
6885 },
6886 TypeContract {
6887 name: "vector_diagnostic_result",
6888 shape_version: 1,
6889 instance_format_version: None,
6890 kind: TypeKind::TaggedUnion,
6891 wire: true,
6892 },
6893 TypeContract {
6894 name: "vector_warm_component",
6895 shape_version: 1,
6896 instance_format_version: None,
6897 kind: TypeKind::Enum,
6898 wire: true,
6899 },
6900 TypeContract {
6901 name: "vector_warm_state",
6902 shape_version: 1,
6903 instance_format_version: None,
6904 kind: TypeKind::Enum,
6905 wire: true,
6906 },
6907 TypeContract {
6908 name: "vector_warm_achievement",
6909 shape_version: 1,
6910 instance_format_version: None,
6911 kind: TypeKind::Struct,
6912 wire: true,
6913 },
6914 TypeContract {
6915 name: "vector_warm_result",
6916 shape_version: 1,
6917 instance_format_version: Some(1),
6918 kind: TypeKind::Struct,
6919 wire: true,
6920 },
6921 TypeContract {
6922 name: "dense_retrieval_threshold",
6923 shape_version: 1,
6924 instance_format_version: None,
6925 kind: TypeKind::TaggedUnion,
6926 wire: true,
6927 },
6928 TypeContract {
6929 name: "retrieval_branch",
6930 shape_version: 3,
6931 instance_format_version: None,
6932 kind: TypeKind::TaggedUnion,
6933 wire: true,
6934 },
6935 TypeContract {
6936 name: "weighted_rrf_fusion",
6937 shape_version: 1,
6938 instance_format_version: None,
6939 kind: TypeKind::Struct,
6940 wire: true,
6941 },
6942 TypeContract {
6943 name: "retrieval_plan",
6944 shape_version: 1,
6945 instance_format_version: Some(1),
6946 kind: TypeKind::Struct,
6947 wire: true,
6948 },
6949 TypeContract {
6950 name: "histogram_bounds",
6951 shape_version: 1,
6952 instance_format_version: None,
6953 kind: TypeKind::Struct,
6954 wire: true,
6955 },
6956 TypeContract {
6957 name: "date_histogram_bounds",
6958 shape_version: 1,
6959 instance_format_version: None,
6960 kind: TypeKind::Struct,
6961 wire: true,
6962 },
6963 TypeContract {
6964 name: "approximation_algorithm",
6965 shape_version: 1,
6966 instance_format_version: None,
6967 kind: TypeKind::Enum,
6968 wire: true,
6969 },
6970 TypeContract {
6971 name: "approximation",
6972 shape_version: 1,
6973 instance_format_version: None,
6974 kind: TypeKind::Struct,
6975 wire: true,
6976 },
6977 TypeContract {
6978 name: "percentile_value",
6979 shape_version: 1,
6980 instance_format_version: None,
6981 kind: TypeKind::Struct,
6982 wire: true,
6983 },
6984 TypeContract {
6985 name: "approximate_percentile_value",
6986 shape_version: 1,
6987 instance_format_version: None,
6988 kind: TypeKind::Struct,
6989 wire: true,
6990 },
6991 TypeContract {
6992 name: "time_series_operator",
6993 shape_version: 1,
6994 instance_format_version: None,
6995 kind: TypeKind::Enum,
6996 wire: true,
6997 },
6998 TypeContract {
6999 name: "time_series_missing_data",
7000 shape_version: 1,
7001 instance_format_version: None,
7002 kind: TypeKind::Enum,
7003 wire: true,
7004 },
7005 TypeContract {
7006 name: "time_series_quantile_mode",
7007 shape_version: 1,
7008 instance_format_version: None,
7009 kind: TypeKind::Enum,
7010 wire: true,
7011 },
7012 TypeContract {
7013 name: "time_series_bucket_state",
7014 shape_version: 1,
7015 instance_format_version: None,
7016 kind: TypeKind::Enum,
7017 wire: true,
7018 },
7019 TypeContract {
7020 name: "time_series_quantile_value",
7021 shape_version: 1,
7022 instance_format_version: None,
7023 kind: TypeKind::Struct,
7024 wire: true,
7025 },
7026 TypeContract {
7027 name: "time_series_value",
7028 shape_version: 1,
7029 instance_format_version: None,
7030 kind: TypeKind::TaggedUnion,
7031 wire: true,
7032 },
7033 TypeContract {
7034 name: "time_series_bucket",
7035 shape_version: 1,
7036 instance_format_version: None,
7037 kind: TypeKind::Struct,
7038 wire: true,
7039 },
7040 TypeContract {
7041 name: "relationship_traversal_direction",
7042 shape_version: 1,
7043 instance_format_version: None,
7044 kind: TypeKind::Enum,
7045 wire: true,
7046 },
7047 TypeContract {
7048 name: "relationship_traversal_filter",
7049 shape_version: 1,
7050 instance_format_version: None,
7051 kind: TypeKind::Struct,
7052 wire: true,
7053 },
7054 TypeContract {
7055 name: "relationship_traversal_budget",
7056 shape_version: 1,
7057 instance_format_version: None,
7058 kind: TypeKind::Struct,
7059 wire: true,
7060 },
7061 TypeContract {
7062 name: "traversed_relationship",
7063 shape_version: 1,
7064 instance_format_version: None,
7065 kind: TypeKind::Struct,
7066 wire: true,
7067 },
7068 TypeContract {
7069 name: "profile_query_operation",
7070 shape_version: 1,
7071 instance_format_version: None,
7072 kind: TypeKind::Enum,
7073 wire: true,
7074 },
7075 TypeContract {
7076 name: "profile_group_by",
7077 shape_version: 1,
7078 instance_format_version: None,
7079 kind: TypeKind::TaggedUnion,
7080 wire: true,
7081 },
7082 TypeContract {
7083 name: "profile_query_filter",
7084 shape_version: 1,
7085 instance_format_version: None,
7086 kind: TypeKind::Struct,
7087 wire: true,
7088 },
7089 TypeContract {
7090 name: "profile_query_budget",
7091 shape_version: 1,
7092 instance_format_version: None,
7093 kind: TypeKind::Struct,
7094 wire: true,
7095 },
7096 TypeContract {
7097 name: "profile_query_row",
7098 shape_version: 1,
7099 instance_format_version: None,
7100 kind: TypeKind::Struct,
7101 wire: true,
7102 },
7103 TypeContract {
7104 name: "temporal_input",
7105 shape_version: 1,
7106 instance_format_version: None,
7107 kind: TypeKind::Struct,
7108 wire: true,
7109 },
7110 TypeContract {
7111 name: "temporal_pattern",
7112 shape_version: 1,
7113 instance_format_version: None,
7114 kind: TypeKind::TaggedUnion,
7115 wire: true,
7116 },
7117 TypeContract {
7118 name: "historical_temporal_definition",
7119 shape_version: 1,
7120 instance_format_version: Some(1),
7121 kind: TypeKind::Struct,
7122 wire: true,
7123 },
7124 TypeContract {
7125 name: "temporal_evidence_status",
7126 shape_version: 2,
7127 instance_format_version: None,
7128 kind: TypeKind::Enum,
7129 wire: true,
7130 },
7131 TypeContract {
7132 name: "temporal_source_event",
7133 shape_version: 1,
7134 instance_format_version: None,
7135 kind: TypeKind::Struct,
7136 wire: true,
7137 },
7138 TypeContract {
7139 name: "temporal_evidence",
7140 shape_version: 2,
7141 instance_format_version: None,
7142 kind: TypeKind::Struct,
7143 wire: true,
7144 },
7145 TypeContract {
7146 name: "continuous_temporal_start",
7147 shape_version: 1,
7148 instance_format_version: None,
7149 kind: TypeKind::TaggedUnion,
7150 wire: true,
7151 },
7152 TypeContract {
7153 name: "continuous_temporal_watermark_policy",
7154 shape_version: 1,
7155 instance_format_version: None,
7156 kind: TypeKind::TaggedUnion,
7157 wire: true,
7158 },
7159 TypeContract {
7160 name: "continuous_temporal_late_data_policy",
7161 shape_version: 1,
7162 instance_format_version: None,
7163 kind: TypeKind::TaggedUnion,
7164 wire: true,
7165 },
7166 TypeContract {
7167 name: "continuous_temporal_output",
7168 shape_version: 1,
7169 instance_format_version: None,
7170 kind: TypeKind::TaggedUnion,
7171 wire: true,
7172 },
7173 TypeContract {
7174 name: "continuous_temporal_definition",
7175 shape_version: 1,
7176 instance_format_version: Some(1),
7177 kind: TypeKind::Struct,
7178 wire: true,
7179 },
7180 TypeContract {
7181 name: "continuous_temporal_frontier",
7182 shape_version: 1,
7183 instance_format_version: None,
7184 kind: TypeKind::Struct,
7185 wire: true,
7186 },
7187 TypeContract {
7188 name: "continuous_temporal_available_frontier",
7189 shape_version: 1,
7190 instance_format_version: None,
7191 kind: TypeKind::Struct,
7192 wire: true,
7193 },
7194 TypeContract {
7195 name: "continuous_temporal_gap_reason",
7196 shape_version: 1,
7197 instance_format_version: None,
7198 kind: TypeKind::Enum,
7199 wire: true,
7200 },
7201 TypeContract {
7202 name: "continuous_temporal_gap",
7203 shape_version: 1,
7204 instance_format_version: None,
7205 kind: TypeKind::Struct,
7206 wire: true,
7207 },
7208 TypeContract {
7209 name: "continuous_temporal_evaluation",
7210 shape_version: 1,
7211 instance_format_version: Some(1),
7212 kind: TypeKind::Struct,
7213 wire: true,
7214 },
7215 TypeContract {
7216 name: "composite_order",
7217 shape_version: 1,
7218 instance_format_version: None,
7219 kind: TypeKind::Enum,
7220 wire: true,
7221 },
7222 TypeContract {
7223 name: "composite_source",
7224 shape_version: 1,
7225 instance_format_version: None,
7226 kind: TypeKind::TaggedUnion,
7227 wire: true,
7228 },
7229 TypeContract {
7230 name: "aggregation",
7231 shape_version: 3,
7232 instance_format_version: None,
7233 kind: TypeKind::TaggedUnion,
7234 wire: true,
7235 },
7236 TypeContract {
7237 name: "nested_search_hit",
7238 shape_version: 2,
7239 instance_format_version: None,
7240 kind: TypeKind::Struct,
7241 wire: true,
7242 },
7243 TypeContract {
7244 name: "named_nested_inner_hits_result",
7245 shape_version: 1,
7246 instance_format_version: None,
7247 kind: TypeKind::Struct,
7248 wire: true,
7249 },
7250 TypeContract {
7251 name: "fragment_boundary",
7252 shape_version: 1,
7253 instance_format_version: None,
7254 kind: TypeKind::Enum,
7255 wire: true,
7256 },
7257 TypeContract {
7258 name: "fragment_offset_encoding",
7259 shape_version: 1,
7260 instance_format_version: None,
7261 kind: TypeKind::Enum,
7262 wire: true,
7263 },
7264 TypeContract {
7265 name: "fragment_ranker",
7266 shape_version: 1,
7267 instance_format_version: None,
7268 kind: TypeKind::Enum,
7269 wire: true,
7270 },
7271 TypeContract {
7272 name: "fragment_request",
7273 shape_version: 1,
7274 instance_format_version: None,
7275 kind: TypeKind::Struct,
7276 wire: true,
7277 },
7278 TypeContract {
7279 name: "search_fragment",
7280 shape_version: 1,
7281 instance_format_version: None,
7282 kind: TypeKind::Struct,
7283 wire: true,
7284 },
7285 TypeContract {
7286 name: "numeric_feature_transform",
7287 shape_version: 1,
7288 instance_format_version: None,
7289 kind: TypeKind::TaggedUnion,
7290 wire: true,
7291 },
7292 TypeContract {
7293 name: "numeric_result_feature",
7294 shape_version: 1,
7295 instance_format_version: None,
7296 kind: TypeKind::Struct,
7297 wire: true,
7298 },
7299 TypeContract {
7300 name: "result_feature_request",
7301 shape_version: 1,
7302 instance_format_version: None,
7303 kind: TypeKind::Struct,
7304 wire: true,
7305 },
7306 TypeContract {
7307 name: "result_diversification",
7308 shape_version: 1,
7309 instance_format_version: None,
7310 kind: TypeKind::Struct,
7311 wire: true,
7312 },
7313 TypeContract {
7314 name: "source_projection",
7315 shape_version: 1,
7316 instance_format_version: None,
7317 kind: TypeKind::TaggedUnion,
7318 wire: true,
7319 },
7320 TypeContract {
7321 name: "branch_score_kind",
7322 shape_version: 2,
7323 instance_format_version: None,
7324 kind: TypeKind::Enum,
7325 wire: true,
7326 },
7327 TypeContract {
7328 name: "result_feature",
7329 shape_version: 1,
7330 instance_format_version: None,
7331 kind: TypeKind::TaggedUnion,
7332 wire: true,
7333 },
7334 TypeContract {
7335 name: "native_record_locator",
7336 shape_version: 1,
7337 instance_format_version: None,
7338 kind: TypeKind::Struct,
7339 wire: true,
7340 },
7341 TypeContract {
7342 name: "search_hit",
7343 shape_version: 4,
7344 instance_format_version: None,
7345 kind: TypeKind::Struct,
7346 wire: true,
7347 },
7348 TypeContract {
7349 name: "record_erasure_state",
7350 shape_version: 1,
7351 instance_format_version: None,
7352 kind: TypeKind::Enum,
7353 wire: true,
7354 },
7355 TypeContract {
7356 name: "record_erasure_receipt",
7357 shape_version: 1,
7358 instance_format_version: None,
7359 kind: TypeKind::Struct,
7360 wire: true,
7361 },
7362 TypeContract {
7363 name: "aggregation_bucket",
7364 shape_version: 1,
7365 instance_format_version: None,
7366 kind: TypeKind::Struct,
7367 wire: true,
7368 },
7369 TypeContract {
7370 name: "aggregation_result",
7371 shape_version: 3,
7372 instance_format_version: None,
7373 kind: TypeKind::TaggedUnion,
7374 wire: true,
7375 },
7376 TypeContract {
7377 name: "shard_counts",
7378 shape_version: 1,
7379 instance_format_version: None,
7380 kind: TypeKind::Struct,
7381 wire: true,
7382 },
7383 TypeContract {
7384 name: "total_hits_relation",
7385 shape_version: 1,
7386 instance_format_version: None,
7387 kind: TypeKind::Enum,
7388 wire: true,
7389 },
7390 TypeContract {
7391 name: "search_total",
7392 shape_version: 1,
7393 instance_format_version: None,
7394 kind: TypeKind::Struct,
7395 wire: true,
7396 },
7397 TypeContract {
7398 name: "search_execution_freshness",
7399 shape_version: 1,
7400 instance_format_version: None,
7401 kind: TypeKind::Enum,
7402 wire: true,
7403 },
7404 TypeContract {
7405 name: "search_freshness",
7406 shape_version: 1,
7407 instance_format_version: None,
7408 kind: TypeKind::Enum,
7409 wire: true,
7410 },
7411 TypeContract {
7412 name: "search_degradation_reason",
7413 shape_version: 1,
7414 instance_format_version: None,
7415 kind: TypeKind::Enum,
7416 wire: true,
7417 },
7418 TypeContract {
7419 name: "search_achievement",
7420 shape_version: 1,
7421 instance_format_version: None,
7422 kind: TypeKind::Struct,
7423 wire: true,
7424 },
7425 TypeContract {
7426 name: "search_failure_stage",
7427 shape_version: 1,
7428 instance_format_version: None,
7429 kind: TypeKind::Enum,
7430 wire: true,
7431 },
7432 TypeContract {
7433 name: "search_failure_reason",
7434 shape_version: 1,
7435 instance_format_version: None,
7436 kind: TypeKind::Enum,
7437 wire: true,
7438 },
7439 TypeContract {
7440 name: "collection_shard",
7441 shape_version: 1,
7442 instance_format_version: None,
7443 kind: TypeKind::Struct,
7444 wire: true,
7445 },
7446 TypeContract {
7447 name: "search_partial_failure",
7448 shape_version: 1,
7449 instance_format_version: None,
7450 kind: TypeKind::Struct,
7451 wire: true,
7452 },
7453 TypeContract {
7454 name: "artifact",
7455 shape_version: 1,
7456 instance_format_version: None,
7457 kind: TypeKind::Struct,
7458 wire: true,
7459 },
7460 TypeContract {
7461 name: "portability_storage_capability",
7462 shape_version: 1,
7463 instance_format_version: None,
7464 kind: TypeKind::Struct,
7465 wire: true,
7466 },
7467 TypeContract {
7468 name: "collection_export_artifact",
7469 shape_version: 1,
7470 instance_format_version: None,
7471 kind: TypeKind::Struct,
7472 wire: true,
7473 },
7474 TypeContract {
7475 name: "collection_transfer_sequence",
7476 shape_version: 1,
7477 instance_format_version: None,
7478 kind: TypeKind::Struct,
7479 wire: true,
7480 },
7481 TypeContract {
7482 name: "collection_transfer_artifact",
7483 shape_version: 1,
7484 instance_format_version: None,
7485 kind: TypeKind::Struct,
7486 wire: true,
7487 },
7488 TypeContract {
7489 name: "collection_standby_state",
7490 shape_version: 1,
7491 instance_format_version: None,
7492 kind: TypeKind::Enum,
7493 wire: true,
7494 },
7495 TypeContract {
7496 name: "collection_standby",
7497 shape_version: 1,
7498 instance_format_version: None,
7499 kind: TypeKind::Struct,
7500 wire: true,
7501 },
7502 TypeContract {
7503 name: "portability_key_capability_reference_state",
7504 shape_version: 1,
7505 instance_format_version: None,
7506 kind: TypeKind::Enum,
7507 wire: true,
7508 },
7509 TypeContract {
7510 name: "collection_export_retirement",
7511 shape_version: 1,
7512 instance_format_version: None,
7513 kind: TypeKind::Struct,
7514 wire: true,
7515 },
7516 TypeContract {
7517 name: "index_transfer_page",
7518 shape_version: 1,
7519 instance_format_version: None,
7520 kind: TypeKind::Struct,
7521 wire: true,
7522 },
7523 TypeContract {
7524 name: "index_transfer_artifact",
7525 shape_version: 1,
7526 instance_format_version: None,
7527 kind: TypeKind::Struct,
7528 wire: true,
7529 },
7530 TypeContract {
7531 name: "search_validation_bound",
7532 shape_version: 1,
7533 instance_format_version: None,
7534 kind: TypeKind::TaggedUnion,
7535 wire: true,
7536 },
7537 TypeContract {
7538 name: "search_validation_estimates",
7539 shape_version: 1,
7540 instance_format_version: None,
7541 kind: TypeKind::Struct,
7542 wire: true,
7543 },
7544 TypeContract {
7545 name: "search_validation_limit",
7546 shape_version: 1,
7547 instance_format_version: None,
7548 kind: TypeKind::Struct,
7549 wire: true,
7550 },
7551 TypeContract {
7552 name: "operation_kind",
7553 shape_version: 4,
7554 instance_format_version: None,
7555 kind: TypeKind::Enum,
7556 wire: true,
7557 },
7558 TypeContract {
7559 name: "operation_authority",
7560 shape_version: 1,
7561 instance_format_version: None,
7562 kind: TypeKind::Enum,
7563 wire: true,
7564 },
7565 TypeContract {
7566 name: "operation_target",
7567 shape_version: 1,
7568 instance_format_version: None,
7569 kind: TypeKind::TaggedUnion,
7570 wire: true,
7571 },
7572 TypeContract {
7573 name: "operation_state",
7574 shape_version: 1,
7575 instance_format_version: None,
7576 kind: TypeKind::Enum,
7577 wire: true,
7578 },
7579 TypeContract {
7580 name: "operation_pending_state",
7581 shape_version: 1,
7582 instance_format_version: None,
7583 kind: TypeKind::Enum,
7584 wire: true,
7585 },
7586 TypeContract {
7587 name: "operation_progress_unit",
7588 shape_version: 1,
7589 instance_format_version: None,
7590 kind: TypeKind::Enum,
7591 wire: true,
7592 },
7593 TypeContract {
7594 name: "operation_progress",
7595 shape_version: 1,
7596 instance_format_version: None,
7597 kind: TypeKind::Struct,
7598 wire: true,
7599 },
7600 TypeContract {
7601 name: "operation_result",
7602 shape_version: 1,
7603 instance_format_version: None,
7604 kind: TypeKind::TaggedUnion,
7605 wire: true,
7606 },
7607 TypeContract {
7608 name: "operation_failure",
7609 shape_version: 1,
7610 instance_format_version: None,
7611 kind: TypeKind::Struct,
7612 wire: true,
7613 },
7614 TypeContract {
7615 name: "operation_cancellation",
7616 shape_version: 1,
7617 instance_format_version: None,
7618 kind: TypeKind::Enum,
7619 wire: true,
7620 },
7621 TypeContract {
7622 name: "operation_retention_state",
7623 shape_version: 1,
7624 instance_format_version: None,
7625 kind: TypeKind::Enum,
7626 wire: true,
7627 },
7628 TypeContract {
7629 name: "operation_retention",
7630 shape_version: 1,
7631 instance_format_version: None,
7632 kind: TypeKind::Struct,
7633 wire: true,
7634 },
7635 TypeContract {
7636 name: "operation",
7637 shape_version: 2,
7638 instance_format_version: None,
7639 kind: TypeKind::Struct,
7640 wire: true,
7641 },
7642 TypeContract {
7643 name: "write_durability_boundary",
7644 shape_version: 1,
7645 instance_format_version: None,
7646 kind: TypeKind::Enum,
7647 wire: true,
7648 },
7649 TypeContract {
7650 name: "write_visibility_mode",
7651 shape_version: 1,
7652 instance_format_version: None,
7653 kind: TypeKind::Enum,
7654 wire: true,
7655 },
7656 TypeContract {
7657 name: "write_response_stage",
7658 shape_version: 1,
7659 instance_format_version: None,
7660 kind: TypeKind::Enum,
7661 wire: true,
7662 },
7663 TypeContract {
7664 name: "write_achievement",
7665 shape_version: 1,
7666 instance_format_version: None,
7667 kind: TypeKind::Struct,
7668 wire: true,
7669 },
7670 TypeContract {
7671 name: "mutation_commit_position",
7672 shape_version: 1,
7673 instance_format_version: None,
7674 kind: TypeKind::Struct,
7675 wire: true,
7676 },
7677 TypeContract {
7678 name: "mutation_commit_receipt",
7679 shape_version: 1,
7680 instance_format_version: Some(1),
7681 kind: TypeKind::Struct,
7682 wire: true,
7683 },
7684 TypeContract {
7685 name: "mutation_resolver",
7686 shape_version: 2,
7687 instance_format_version: None,
7688 kind: TypeKind::Enum,
7689 wire: true,
7690 },
7691 TypeContract {
7692 name: "mutation_outcome",
7693 shape_version: 1,
7694 instance_format_version: None,
7695 kind: TypeKind::TaggedUnion,
7696 wire: true,
7697 },
7698 TypeContract {
7699 name: "submission_state",
7700 shape_version: 1,
7701 instance_format_version: None,
7702 kind: TypeKind::Enum,
7703 wire: true,
7704 },
7705 TypeContract {
7706 name: "expected_binding",
7707 shape_version: 1,
7708 instance_format_version: None,
7709 kind: TypeKind::Struct,
7710 wire: true,
7711 },
7712 TypeContract {
7713 name: "administration_alias_action",
7714 shape_version: 1,
7715 instance_format_version: None,
7716 kind: TypeKind::TaggedUnion,
7717 wire: true,
7718 },
7719 TypeContract {
7720 name: "administration_mutation",
7721 shape_version: 2,
7722 instance_format_version: None,
7723 kind: TypeKind::TaggedUnion,
7724 wire: true,
7725 },
7726 TypeContract {
7727 name: "administration_outcome",
7728 shape_version: 1,
7729 instance_format_version: None,
7730 kind: TypeKind::Struct,
7731 wire: true,
7732 },
7733 TypeContract {
7734 name: "index_change_apply_receipt",
7735 shape_version: 1,
7736 instance_format_version: None,
7737 kind: TypeKind::Struct,
7738 wire: true,
7739 },
7740 TypeContract {
7741 name: "index_change_resolution_state",
7742 shape_version: 1,
7743 instance_format_version: None,
7744 kind: TypeKind::Enum,
7745 wire: true,
7746 },
7747 TypeContract {
7748 name: "bulk_document_item",
7749 shape_version: 2,
7750 instance_format_version: None,
7751 kind: TypeKind::Struct,
7752 wire: true,
7753 },
7754 TypeContract {
7755 name: "bulk_document_item_outcome",
7756 shape_version: 1,
7757 instance_format_version: None,
7758 kind: TypeKind::Struct,
7759 wire: true,
7760 },
7761 TypeContract {
7762 name: "bulk_document_outcome",
7763 shape_version: 1,
7764 instance_format_version: None,
7765 kind: TypeKind::Struct,
7766 wire: true,
7767 },
7768 TypeContract {
7769 name: "metric_attribute_value",
7770 shape_version: 1,
7771 instance_format_version: None,
7772 kind: TypeKind::TaggedUnion,
7773 wire: true,
7774 },
7775 TypeContract {
7776 name: "metric_attribute",
7777 shape_version: 1,
7778 instance_format_version: None,
7779 kind: TypeKind::Struct,
7780 wire: true,
7781 },
7782 TypeContract {
7783 name: "metric_number",
7784 shape_version: 1,
7785 instance_format_version: None,
7786 kind: TypeKind::TaggedUnion,
7787 wire: true,
7788 },
7789 TypeContract {
7790 name: "metric_temporality",
7791 shape_version: 1,
7792 instance_format_version: None,
7793 kind: TypeKind::Enum,
7794 wire: true,
7795 },
7796 TypeContract {
7797 name: "metric_point_kind",
7798 shape_version: 1,
7799 instance_format_version: None,
7800 kind: TypeKind::Enum,
7801 wire: true,
7802 },
7803 TypeContract {
7804 name: "metric_exponential_buckets",
7805 shape_version: 1,
7806 instance_format_version: None,
7807 kind: TypeKind::Struct,
7808 wire: true,
7809 },
7810 TypeContract {
7811 name: "metric_data",
7812 shape_version: 1,
7813 instance_format_version: None,
7814 kind: TypeKind::TaggedUnion,
7815 wire: true,
7816 },
7817 TypeContract {
7818 name: "metric_instrumentation_scope",
7819 shape_version: 1,
7820 instance_format_version: None,
7821 kind: TypeKind::Struct,
7822 wire: true,
7823 },
7824 TypeContract {
7825 name: "metric_exemplar",
7826 shape_version: 1,
7827 instance_format_version: None,
7828 kind: TypeKind::Struct,
7829 wire: true,
7830 },
7831 TypeContract {
7832 name: "metric_point",
7833 shape_version: 1,
7834 instance_format_version: Some(1),
7835 kind: TypeKind::Struct,
7836 wire: true,
7837 },
7838 TypeContract {
7839 name: "entity_ref",
7840 shape_version: 1,
7841 instance_format_version: None,
7842 kind: TypeKind::Struct,
7843 wire: true,
7844 },
7845 TypeContract {
7846 name: "relationship_evidence_ref",
7847 shape_version: 1,
7848 instance_format_version: None,
7849 kind: TypeKind::Struct,
7850 wire: true,
7851 },
7852 TypeContract {
7853 name: "relationship_directionality",
7854 shape_version: 1,
7855 instance_format_version: None,
7856 kind: TypeKind::Enum,
7857 wire: true,
7858 },
7859 TypeContract {
7860 name: "relationship_record",
7861 shape_version: 1,
7862 instance_format_version: Some(1),
7863 kind: TypeKind::Struct,
7864 wire: true,
7865 },
7866 TypeContract {
7867 name: "profile_label",
7868 shape_version: 1,
7869 instance_format_version: None,
7870 kind: TypeKind::Struct,
7871 wire: true,
7872 },
7873 TypeContract {
7874 name: "profile_sample_type",
7875 shape_version: 1,
7876 instance_format_version: None,
7877 kind: TypeKind::Struct,
7878 wire: true,
7879 },
7880 TypeContract {
7881 name: "profile_mapping",
7882 shape_version: 1,
7883 instance_format_version: None,
7884 kind: TypeKind::Struct,
7885 wire: true,
7886 },
7887 TypeContract {
7888 name: "profile_function",
7889 shape_version: 1,
7890 instance_format_version: None,
7891 kind: TypeKind::Struct,
7892 wire: true,
7893 },
7894 TypeContract {
7895 name: "profile_line",
7896 shape_version: 1,
7897 instance_format_version: None,
7898 kind: TypeKind::Struct,
7899 wire: true,
7900 },
7901 TypeContract {
7902 name: "profile_location",
7903 shape_version: 1,
7904 instance_format_version: None,
7905 kind: TypeKind::Struct,
7906 wire: true,
7907 },
7908 TypeContract {
7909 name: "profile_stack",
7910 shape_version: 1,
7911 instance_format_version: None,
7912 kind: TypeKind::Struct,
7913 wire: true,
7914 },
7915 TypeContract {
7916 name: "profile_sample",
7917 shape_version: 1,
7918 instance_format_version: None,
7919 kind: TypeKind::Struct,
7920 wire: true,
7921 },
7922 TypeContract {
7923 name: "profile_instrumentation_scope",
7924 shape_version: 1,
7925 instance_format_version: None,
7926 kind: TypeKind::Struct,
7927 wire: true,
7928 },
7929 TypeContract {
7930 name: "profile_batch",
7931 shape_version: 1,
7932 instance_format_version: Some(1),
7933 kind: TypeKind::Struct,
7934 wire: true,
7935 },
7936 TypeContract {
7937 name: "native_record",
7938 shape_version: 3,
7939 instance_format_version: None,
7940 kind: TypeKind::TaggedUnion,
7941 wire: true,
7942 },
7943 TypeContract {
7944 name: "retained_append_item",
7945 shape_version: 4,
7946 instance_format_version: None,
7947 kind: TypeKind::Struct,
7948 wire: true,
7949 },
7950 TypeContract {
7951 name: "retained_append_state",
7952 shape_version: 1,
7953 instance_format_version: None,
7954 kind: TypeKind::Enum,
7955 wire: true,
7956 },
7957 TypeContract {
7958 name: "retained_append_retry_safety",
7959 shape_version: 1,
7960 instance_format_version: None,
7961 kind: TypeKind::Enum,
7962 wire: true,
7963 },
7964 TypeContract {
7965 name: "retained_append_item_outcome",
7966 shape_version: 1,
7967 instance_format_version: None,
7968 kind: TypeKind::Struct,
7969 wire: true,
7970 },
7971 TypeContract {
7972 name: "retained_append_bulk_outcome",
7973 shape_version: 1,
7974 instance_format_version: None,
7975 kind: TypeKind::Struct,
7976 wire: true,
7977 },
7978 TypeContract {
7979 name: "retained_append_observation_state",
7980 shape_version: 1,
7981 instance_format_version: None,
7982 kind: TypeKind::Enum,
7983 wire: true,
7984 },
7985 TypeContract {
7986 name: "retained_append_observation_outcome",
7987 shape_version: 1,
7988 instance_format_version: None,
7989 kind: TypeKind::Struct,
7990 wire: true,
7991 },
7992 TypeContract {
7993 name: "binary_value",
7994 shape_version: 1,
7995 instance_format_version: None,
7996 kind: TypeKind::Struct,
7997 wire: true,
7998 },
7999 TypeContract {
8000 name: "state_hash_field",
8001 shape_version: 1,
8002 instance_format_version: None,
8003 kind: TypeKind::Struct,
8004 wire: true,
8005 },
8006 TypeContract {
8007 name: "state_set_entry",
8008 shape_version: 1,
8009 instance_format_version: None,
8010 kind: TypeKind::Struct,
8011 wire: true,
8012 },
8013 TypeContract {
8014 name: "state_set_condition",
8015 shape_version: 1,
8016 instance_format_version: None,
8017 kind: TypeKind::Enum,
8018 wire: true,
8019 },
8020 TypeContract {
8021 name: "state_operation",
8022 shape_version: 1,
8023 instance_format_version: None,
8024 kind: TypeKind::TaggedUnion,
8025 wire: true,
8026 },
8027 TypeContract {
8028 name: "state_optional_value",
8029 shape_version: 1,
8030 instance_format_version: None,
8031 kind: TypeKind::TaggedUnion,
8032 wire: true,
8033 },
8034 TypeContract {
8035 name: "state_command_result",
8036 shape_version: 1,
8037 instance_format_version: None,
8038 kind: TypeKind::TaggedUnion,
8039 wire: true,
8040 },
8041 TypeContract {
8042 name: "state_write_resolution",
8043 shape_version: 1,
8044 instance_format_version: None,
8045 kind: TypeKind::TaggedUnion,
8046 wire: true,
8047 },
8048 TypeContract {
8049 name: "service_credential_reservation",
8050 shape_version: 1,
8051 instance_format_version: None,
8052 kind: TypeKind::Struct,
8053 wire: true,
8054 },
8055 TypeContract {
8056 name: "subscription_metadata_field",
8057 shape_version: 1,
8058 instance_format_version: None,
8059 kind: TypeKind::Enum,
8060 wire: true,
8061 },
8062 TypeContract {
8063 name: "subscription_field",
8064 shape_version: 1,
8065 instance_format_version: None,
8066 kind: TypeKind::TaggedUnion,
8067 wire: true,
8068 },
8069 TypeContract {
8070 name: "subscription_filter",
8071 shape_version: 1,
8072 instance_format_version: None,
8073 kind: TypeKind::TaggedUnion,
8074 wire: true,
8075 },
8076 TypeContract {
8077 name: "subscription_cursor_entry",
8078 shape_version: 1,
8079 instance_format_version: None,
8080 kind: TypeKind::Struct,
8081 wire: true,
8082 },
8083 TypeContract {
8084 name: "subscription_route",
8085 shape_version: 1,
8086 instance_format_version: None,
8087 kind: TypeKind::Struct,
8088 wire: true,
8089 },
8090 TypeContract {
8091 name: "subscription_start_position",
8092 shape_version: 1,
8093 instance_format_version: None,
8094 kind: TypeKind::TaggedUnion,
8095 wire: true,
8096 },
8097 TypeContract {
8098 name: "subscription_start",
8099 shape_version: 1,
8100 instance_format_version: Some(1),
8101 kind: TypeKind::Struct,
8102 wire: true,
8103 },
8104 TypeContract {
8105 name: "subscription_accepted",
8106 shape_version: 1,
8107 instance_format_version: Some(1),
8108 kind: TypeKind::Struct,
8109 wire: true,
8110 },
8111 TypeContract {
8112 name: "subscription_writer_fence",
8113 shape_version: 1,
8114 instance_format_version: None,
8115 kind: TypeKind::Struct,
8116 wire: true,
8117 },
8118 TypeContract {
8119 name: "subscription_event",
8120 shape_version: 1,
8121 instance_format_version: Some(1),
8122 kind: TypeKind::Struct,
8123 wire: true,
8124 },
8125 TypeContract {
8126 name: "subscription_heartbeat",
8127 shape_version: 1,
8128 instance_format_version: Some(1),
8129 kind: TypeKind::Struct,
8130 wire: true,
8131 },
8132 TypeContract {
8133 name: "subscription_gap",
8134 shape_version: 1,
8135 instance_format_version: Some(1),
8136 kind: TypeKind::Struct,
8137 wire: true,
8138 },
8139 TypeContract {
8140 name: "subscription_terminal_reason",
8141 shape_version: 1,
8142 instance_format_version: None,
8143 kind: TypeKind::Enum,
8144 wire: true,
8145 },
8146 TypeContract {
8147 name: "subscription_terminal",
8148 shape_version: 2,
8149 instance_format_version: Some(2),
8150 kind: TypeKind::Struct,
8151 wire: true,
8152 },
8153 TypeContract {
8154 name: "subscription_frame",
8155 shape_version: 1,
8156 instance_format_version: None,
8157 kind: TypeKind::TaggedUnion,
8158 wire: true,
8159 },
8160 TypeContract {
8161 name: "stream_binding",
8162 shape_version: 1,
8163 instance_format_version: None,
8164 kind: TypeKind::Struct,
8165 wire: true,
8166 },
8167 TypeContract {
8168 name: "capability_grant",
8169 shape_version: 1,
8170 instance_format_version: None,
8171 kind: TypeKind::Struct,
8172 wire: true,
8173 },
8174 TypeContract {
8175 name: "protocol_limit",
8176 shape_version: 1,
8177 instance_format_version: None,
8178 kind: TypeKind::Struct,
8179 wire: true,
8180 },
8181 TypeContract {
8182 name: "document_mutation_condition",
8183 shape_version: 1,
8184 instance_format_version: None,
8185 kind: TypeKind::TaggedUnion,
8186 wire: true,
8187 },
8188 TypeContract {
8189 name: "audit_adapter",
8190 shape_version: 1,
8191 instance_format_version: None,
8192 kind: TypeKind::Enum,
8193 wire: true,
8194 },
8195 TypeContract {
8196 name: "audit_decision",
8197 shape_version: 1,
8198 instance_format_version: None,
8199 kind: TypeKind::Enum,
8200 wire: true,
8201 },
8202 TypeContract {
8203 name: "audit_outcome",
8204 shape_version: 1,
8205 instance_format_version: None,
8206 kind: TypeKind::Enum,
8207 wire: true,
8208 },
8209 TypeContract {
8210 name: "audit_detail",
8211 shape_version: 1,
8212 instance_format_version: None,
8213 kind: TypeKind::Enum,
8214 wire: true,
8215 },
8216 TypeContract {
8217 name: "audit_gap_reason",
8218 shape_version: 1,
8219 instance_format_version: None,
8220 kind: TypeKind::Enum,
8221 wire: true,
8222 },
8223 TypeContract {
8224 name: "audit_event",
8225 shape_version: 2,
8226 instance_format_version: None,
8227 kind: TypeKind::Struct,
8228 wire: true,
8229 },
8230 TypeContract {
8231 name: "audit_gap",
8232 shape_version: 2,
8233 instance_format_version: None,
8234 kind: TypeKind::Struct,
8235 wire: true,
8236 },
8237 TypeContract {
8238 name: "audit_stream_state",
8239 shape_version: 1,
8240 instance_format_version: None,
8241 kind: TypeKind::Struct,
8242 wire: true,
8243 },
8244 TypeContract {
8245 name: "service_credential_grant",
8246 shape_version: 1,
8247 instance_format_version: None,
8248 kind: TypeKind::Struct,
8249 wire: true,
8250 },
8251 TypeContract {
8252 name: "service_credential_summary",
8253 shape_version: 1,
8254 instance_format_version: None,
8255 kind: TypeKind::Struct,
8256 wire: true,
8257 },
8258 TypeContract {
8259 name: "security_role",
8260 shape_version: 2,
8261 instance_format_version: None,
8262 kind: TypeKind::Struct,
8263 wire: true,
8264 },
8265 TypeContract {
8266 name: "role_append_scope_change",
8267 shape_version: 1,
8268 instance_format_version: None,
8269 kind: TypeKind::TaggedUnion,
8270 wire: true,
8271 },
8272 TypeContract {
8273 name: "role_append_access_preparation",
8274 shape_version: 1,
8275 instance_format_version: None,
8276 kind: TypeKind::TaggedUnion,
8277 wire: true,
8278 },
8279 TypeContract {
8280 name: "source_authorization_subject_kind",
8281 shape_version: 1,
8282 instance_format_version: None,
8283 kind: TypeKind::Enum,
8284 wire: true,
8285 },
8286 TypeContract {
8287 name: "source_authorization_subject",
8288 shape_version: 1,
8289 instance_format_version: None,
8290 kind: TypeKind::Struct,
8291 wire: true,
8292 },
8293 TypeContract {
8294 name: "delegated_query_source_subject",
8295 shape_version: 1,
8296 instance_format_version: None,
8297 kind: TypeKind::Struct,
8298 wire: true,
8299 },
8300 TypeContract {
8301 name: "delegated_query_subject_claims",
8302 shape_version: 1,
8303 instance_format_version: Some(1),
8304 kind: TypeKind::Struct,
8305 wire: true,
8306 },
8307 TypeContract {
8308 name: "signed_delegated_query_subject",
8309 shape_version: 1,
8310 instance_format_version: None,
8311 kind: TypeKind::Struct,
8312 wire: true,
8313 },
8314 TypeContract {
8315 name: "source_authorization_principal_change",
8316 shape_version: 1,
8317 instance_format_version: None,
8318 kind: TypeKind::TaggedUnion,
8319 wire: true,
8320 },
8321 TypeContract {
8322 name: "source_authorization_group_change",
8323 shape_version: 1,
8324 instance_format_version: None,
8325 kind: TypeKind::TaggedUnion,
8326 wire: true,
8327 },
8328 TypeContract {
8329 name: "source_authorization_membership_replacement",
8330 shape_version: 1,
8331 instance_format_version: None,
8332 kind: TypeKind::Struct,
8333 wire: true,
8334 },
8335 TypeContract {
8336 name: "source_authorization_document_acl_replacement",
8337 shape_version: 1,
8338 instance_format_version: None,
8339 kind: TypeKind::Struct,
8340 wire: true,
8341 },
8342 TypeContract {
8343 name: "source_authorization_batch",
8344 shape_version: 1,
8345 instance_format_version: Some(1),
8346 kind: TypeKind::Struct,
8347 wire: true,
8348 },
8349 TypeContract {
8350 name: "source_authorization_applied_counts",
8351 shape_version: 1,
8352 instance_format_version: None,
8353 kind: TypeKind::Struct,
8354 wire: true,
8355 },
8356 TypeContract {
8357 name: "source_authorization_receipt",
8358 shape_version: 1,
8359 instance_format_version: Some(1),
8360 kind: TypeKind::Struct,
8361 wire: true,
8362 },
8363 TypeContract {
8364 name: "source_authorization_preparation",
8365 shape_version: 1,
8366 instance_format_version: None,
8367 kind: TypeKind::Struct,
8368 wire: true,
8369 },
8370 TypeContract {
8371 name: "source_authorization_resolution_state",
8372 shape_version: 1,
8373 instance_format_version: None,
8374 kind: TypeKind::Enum,
8375 wire: true,
8376 },
8377 TypeContract {
8378 name: "source_authorization_resolution",
8379 shape_version: 1,
8380 instance_format_version: None,
8381 kind: TypeKind::Struct,
8382 wire: true,
8383 },
8384 TypeContract {
8385 name: "security_action_outcome",
8386 shape_version: 1,
8387 instance_format_version: None,
8388 kind: TypeKind::TaggedUnion,
8389 wire: true,
8390 },
8391 TypeContract {
8392 name: "maintenance_work_state",
8393 shape_version: 1,
8394 instance_format_version: None,
8395 kind: TypeKind::Enum,
8396 wire: true,
8397 },
8398 TypeContract {
8399 name: "maintenance_attempt_state",
8400 shape_version: 1,
8401 instance_format_version: None,
8402 kind: TypeKind::Enum,
8403 wire: true,
8404 },
8405 TypeContract {
8406 name: "maintenance_failure_class",
8407 shape_version: 1,
8408 instance_format_version: None,
8409 kind: TypeKind::Enum,
8410 wire: true,
8411 },
8412 TypeContract {
8413 name: "maintenance_failure_class_count",
8414 shape_version: 1,
8415 instance_format_version: None,
8416 kind: TypeKind::Struct,
8417 wire: true,
8418 },
8419 TypeContract {
8420 name: "maintenance_attempt_observation",
8421 shape_version: 1,
8422 instance_format_version: None,
8423 kind: TypeKind::Struct,
8424 wire: true,
8425 },
8426 TypeContract {
8427 name: "maintenance_task_scope",
8428 shape_version: 1,
8429 instance_format_version: None,
8430 kind: TypeKind::Struct,
8431 wire: true,
8432 },
8433 TypeContract {
8434 name: "maintenance_task_status",
8435 shape_version: 1,
8436 instance_format_version: None,
8437 kind: TypeKind::Struct,
8438 wire: true,
8439 },
8440 TypeContract {
8441 name: "maintenance_status_aggregate",
8442 shape_version: 1,
8443 instance_format_version: Some(2),
8444 kind: TypeKind::Struct,
8445 wire: true,
8446 },
8447 TypeContract {
8448 name: "runtime_status_detail",
8449 shape_version: 1,
8450 instance_format_version: None,
8451 kind: TypeKind::Struct,
8452 wire: true,
8453 },
8454 TypeContract {
8455 name: "result_cache_status",
8456 shape_version: 2,
8457 instance_format_version: Some(3),
8458 kind: TypeKind::Struct,
8459 wire: true,
8460 },
8461 TypeContract {
8462 name: "field_promotion_status",
8463 shape_version: 1,
8464 instance_format_version: Some(3),
8465 kind: TypeKind::Struct,
8466 wire: true,
8467 },
8468 TypeContract {
8469 name: "overload_shard_status",
8470 shape_version: 2,
8471 instance_format_version: Some(3),
8472 kind: TypeKind::Struct,
8473 wire: true,
8474 },
8475 TypeContract {
8476 name: "external_key_binding",
8477 shape_version: 1,
8478 instance_format_version: None,
8479 kind: TypeKind::Struct,
8480 wire: true,
8481 },
8482 TypeContract {
8483 name: "external_key_retirement_target",
8484 shape_version: 1,
8485 instance_format_version: None,
8486 kind: TypeKind::Struct,
8487 wire: true,
8488 },
8489 TypeContract {
8490 name: "external_key_retirement_outcome",
8491 shape_version: 1,
8492 instance_format_version: None,
8493 kind: TypeKind::Enum,
8494 wire: true,
8495 },
8496 TypeContract {
8497 name: "external_key_retirement_receipt",
8498 shape_version: 1,
8499 instance_format_version: Some(1),
8500 kind: TypeKind::Struct,
8501 wire: true,
8502 },
8503 TypeContract {
8504 name: "external_key_retirement_resolution_state",
8505 shape_version: 1,
8506 instance_format_version: None,
8507 kind: TypeKind::Enum,
8508 wire: true,
8509 },
8510 TypeContract {
8511 name: "rollup_measure",
8512 shape_version: 1,
8513 instance_format_version: None,
8514 kind: TypeKind::TaggedUnion,
8515 wire: true,
8516 },
8517 TypeContract {
8518 name: "aggregate_then_delete_policy",
8519 shape_version: 1,
8520 instance_format_version: None,
8521 kind: TypeKind::Struct,
8522 wire: true,
8523 },
8524 TypeContract {
8525 name: "lifecycle_binding_status",
8526 shape_version: 1,
8527 instance_format_version: None,
8528 kind: TypeKind::Struct,
8529 wire: true,
8530 },
8531 TypeContract {
8532 name: "lifecycle_rollup_status",
8533 shape_version: 1,
8534 instance_format_version: None,
8535 kind: TypeKind::Struct,
8536 wire: true,
8537 },
8538 TypeContract {
8539 name: "lifecycle_status",
8540 shape_version: 2,
8541 instance_format_version: Some(4),
8542 kind: TypeKind::Struct,
8543 wire: true,
8544 },
8545 TypeContract {
8546 name: "quota_limit",
8547 shape_version: 1,
8548 instance_format_version: None,
8549 kind: TypeKind::Struct,
8550 wire: true,
8551 },
8552 TypeContract {
8553 name: "quota_consumption",
8554 shape_version: 1,
8555 instance_format_version: None,
8556 kind: TypeKind::Struct,
8557 wire: true,
8558 },
8559 TypeContract {
8560 name: "quota_update",
8561 shape_version: 1,
8562 instance_format_version: None,
8563 kind: TypeKind::Struct,
8564 wire: true,
8565 },
8566 TypeContract {
8567 name: "storage_overall_posture",
8568 shape_version: 1,
8569 instance_format_version: None,
8570 kind: TypeKind::Enum,
8571 wire: true,
8572 },
8573 TypeContract {
8574 name: "storage_profile_role",
8575 shape_version: 1,
8576 instance_format_version: None,
8577 kind: TypeKind::Enum,
8578 wire: true,
8579 },
8580 TypeContract {
8581 name: "storage_provider_posture",
8582 shape_version: 1,
8583 instance_format_version: None,
8584 kind: TypeKind::Enum,
8585 wire: true,
8586 },
8587 TypeContract {
8588 name: "storage_backend_service_class",
8589 shape_version: 1,
8590 instance_format_version: None,
8591 kind: TypeKind::Enum,
8592 wire: true,
8593 },
8594 TypeContract {
8595 name: "storage_profile_role_binding",
8596 shape_version: 1,
8597 instance_format_version: None,
8598 kind: TypeKind::Struct,
8599 wire: true,
8600 },
8601 TypeContract {
8602 name: "storage_profile_attestation",
8603 shape_version: 1,
8604 instance_format_version: Some(1),
8605 kind: TypeKind::Struct,
8606 wire: true,
8607 },
8608 TypeContract {
8609 name: "storage_profile_expectation",
8610 shape_version: 1,
8611 instance_format_version: Some(1),
8612 kind: TypeKind::Struct,
8613 wire: true,
8614 },
8615 TypeContract {
8616 name: "core_binding",
8617 shape_version: 3,
8618 instance_format_version: None,
8619 kind: TypeKind::Struct,
8620 wire: true,
8621 },
8622 TypeContract {
8623 name: "readiness_observation",
8624 shape_version: 1,
8625 instance_format_version: None,
8626 kind: TypeKind::Struct,
8627 wire: true,
8628 },
8629 TypeContract {
8630 name: "usage_dimension",
8631 shape_version: 1,
8632 instance_format_version: None,
8633 kind: TypeKind::Struct,
8634 wire: true,
8635 },
8636 TypeContract {
8637 name: "physical_usage_value",
8638 shape_version: 2,
8639 instance_format_version: None,
8640 kind: TypeKind::Struct,
8641 wire: true,
8642 },
8643 TypeContract {
8644 name: "core_usage_units",
8645 shape_version: 2,
8646 instance_format_version: None,
8647 kind: TypeKind::Struct,
8648 wire: true,
8649 },
8650 TypeContract {
8651 name: "core_usage_correction",
8652 shape_version: 2,
8653 instance_format_version: None,
8654 kind: TypeKind::Struct,
8655 wire: true,
8656 },
8657 TypeContract {
8658 name: "index_storage_usage",
8659 shape_version: 1,
8660 instance_format_version: None,
8661 kind: TypeKind::Struct,
8662 wire: true,
8663 },
8664 TypeContract {
8665 name: "collection_storage_usage",
8666 shape_version: 1,
8667 instance_format_version: Some(1),
8668 kind: TypeKind::Struct,
8669 wire: true,
8670 },
8671 TypeContract {
8672 name: "response_meta",
8673 shape_version: 1,
8674 instance_format_version: Some(1),
8675 kind: TypeKind::Struct,
8676 wire: true,
8677 },
8678 TypeContract {
8679 name: "error_disposition",
8680 shape_version: 1,
8681 instance_format_version: None,
8682 kind: TypeKind::Enum,
8683 wire: true,
8684 },
8685 TypeContract {
8686 name: "recovery_action",
8687 shape_version: 1,
8688 instance_format_version: None,
8689 kind: TypeKind::Enum,
8690 wire: true,
8691 },
8692 TypeContract {
8693 name: "limit_class",
8694 shape_version: 1,
8695 instance_format_version: None,
8696 kind: TypeKind::Enum,
8697 wire: true,
8698 },
8699 TypeContract {
8700 name: "error_detail",
8701 shape_version: 3,
8702 instance_format_version: None,
8703 kind: TypeKind::TaggedUnion,
8704 wire: true,
8705 },
8706 TypeContract {
8707 name: "connection_profile",
8708 shape_version: 4,
8709 instance_format_version: Some(4),
8710 kind: TypeKind::Struct,
8711 wire: false,
8712 },
8713];
8714#[derive(Clone, Copy, Debug, Eq, PartialEq)]
8715pub struct StreamContract {
8716 pub name: &'static str,
8717 pub action: Action,
8718 pub transport: &'static str,
8719 pub service: &'static str,
8720 pub method: &'static str,
8721 pub auth_metadata: &'static str,
8722 pub auth_scheme: &'static str,
8723 pub semantic_format_version: u16,
8724 pub start_type: &'static str,
8725 pub frame_type: &'static str,
8726}
8727pub const LODESTONE_API_STREAM_CONTRACTS: &[StreamContract] = &[StreamContract {
8728 name: "subscription",
8729 action: Action::SubscriptionRead,
8730 transport: "grpc_tls",
8731 service: "lodestone.api.FilterSubscription",
8732 method: "/lodestone.api.FilterSubscription/Subscribe",
8733 auth_metadata: "authorization",
8734 auth_scheme: "ApiKey",
8735 semantic_format_version: 1,
8736 start_type: "subscription_start",
8737 frame_type: "subscription_frame",
8738}];
8739#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8740#[serde(deny_unknown_fields)]
8741pub struct ErrorBody {
8742 pub code: ErrorCode,
8743 pub message: String,
8744 pub disposition: ErrorDisposition,
8745 pub recovery: RecoveryAction,
8746 pub details: ErrorDetail,
8747}
8748#[derive(Clone, Copy, Debug, Eq, PartialEq)]
8749pub enum ErrorShapeError {
8750 DetailCodeMismatch,
8751 OutcomeMismatch,
8752 RetryAfterOutOfRange,
8753}
8754impl ErrorBody {
8755 pub fn try_new(
8756 code: ErrorCode,
8757 message: String,
8758 disposition: ErrorDisposition,
8759 recovery: RecoveryAction,
8760 details: ErrorDetail,
8761 ) -> Result<Self, ErrorShapeError> {
8762 let body = Self {
8763 code,
8764 message,
8765 disposition,
8766 recovery,
8767 details,
8768 };
8769 validate_error_body(&body)?;
8770 Ok(body)
8771 }
8772 pub fn retry_safe(&self) -> bool {
8773 self.disposition == ErrorDisposition::NotSubmitted
8774 && matches!(
8775 self.recovery,
8776 RecoveryAction::Retry
8777 | RecoveryAction::RetryAfter
8778 | RecoveryAction::RefreshCredential
8779 | RecoveryAction::RestartPage
8780 | RecoveryAction::ReduceRequest
8781 | RecoveryAction::RefreshPrecondition
8782 | RecoveryAction::CorrectRange
8783 )
8784 }
8785 pub fn submitted(&self) -> bool {
8786 self.disposition != ErrorDisposition::NotSubmitted
8787 }
8788}
8789pub fn validate_error_body(body: &ErrorBody) -> Result<(), ErrorShapeError> {
8790 let detail_matches = matches!(
8791 (&body.code, &body.details),
8792 (ErrorCode::Aborted, ErrorDetail::Aborted { .. })
8793 | (ErrorCode::DeadlineExceeded, ErrorDetail::DeadlineExceeded)
8794 | (ErrorCode::InvalidRequest, ErrorDetail::InvalidRequest { .. })
8795 | (ErrorCode::UnsupportedVersion, ErrorDetail::UnsupportedVersion { .. })
8796 | (ErrorCode::Unauthenticated, ErrorDetail::Unauthenticated)
8797 | (ErrorCode::PermissionDenied, ErrorDetail::PermissionDenied { .. })
8798 | (ErrorCode::NotFound, ErrorDetail::NotFound { .. })
8799 | (ErrorCode::Conflict, ErrorDetail::Conflict { .. })
8800 | (ErrorCode::StaleCursor, ErrorDetail::StaleCursor { .. })
8801 | (
8802 ErrorCode::RestartBudgetExhausted,
8803 ErrorDetail::RestartBudgetExhausted { .. }
8804 )
8805 | (ErrorCode::LimitExceeded, ErrorDetail::LimitExceeded { .. })
8806 | (
8807 ErrorCode::CapabilityUnavailable,
8808 ErrorDetail::CapabilityUnavailable { .. }
8809 )
8810 | (ErrorCode::NotSubmitted, ErrorDetail::NotSubmitted { .. })
8811 | (
8812 ErrorCode::SubmittedIndeterminate,
8813 ErrorDetail::SubmittedIndeterminate { .. }
8814 )
8815 | (ErrorCode::ExpiredUnknown, ErrorDetail::ExpiredUnknown { .. })
8816 | (ErrorCode::SecretNotEscrowed, ErrorDetail::SecretNotEscrowed)
8817 | (ErrorCode::RetentionGap, ErrorDetail::RetentionGap { .. })
8818 | (
8819 ErrorCode::ArtifactRangeInvalid,
8820 ErrorDetail::ArtifactRangeInvalid { .. }
8821 )
8822 | (ErrorCode::ChecksumMismatch, ErrorDetail::ChecksumMismatch { .. })
8823 | (
8824 ErrorCode::TemporarilyUnavailable,
8825 ErrorDetail::TemporarilyUnavailable { .. }
8826 )
8827 | (ErrorCode::Internal, ErrorDetail::Internal)
8828 );
8829 if !detail_matches {
8830 return Err(ErrorShapeError::DetailCodeMismatch);
8831 }
8832 if !LODESTONE_API_ERROR_OUTCOMES.iter().any(|contract| {
8833 contract.code == body.code && contract.disposition == body.disposition && contract.recovery == body.recovery
8834 }) {
8835 return Err(ErrorShapeError::OutcomeMismatch);
8836 }
8837 let retry_after = match &body.details {
8838 ErrorDetail::NotSubmitted { retry_after_millis }
8839 | ErrorDetail::TemporarilyUnavailable { retry_after_millis } => retry_after_millis.as_ref(),
8840 _ => None,
8841 };
8842 if retry_after
8843 .and_then(|value| value.value.parse::<u64>().ok())
8844 .is_some_and(|value| value > 60000)
8845 {
8846 return Err(ErrorShapeError::RetryAfterOutOfRange);
8847 }
8848 Ok(())
8849}
8850#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
8851#[serde(deny_unknown_fields)]
8852pub struct RequestMeta {
8853 pub format_version: u16,
8854 pub request_id: String,
8855 pub correlation_id: Identity,
8856 pub absolute_deadline_unix_millis: U64,
8857 pub workload_class: WorkloadClass,
8858}
8859
8860#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8861#[serde(deny_unknown_fields)]
8862pub struct DiscoverRequest {}
8863
8864#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8865#[serde(deny_unknown_fields)]
8866pub struct DiscoverResult {
8867 pub principal_id: Identity,
8868 pub collection_id: Identity,
8869 pub policy_revision: U64,
8870 pub artifact_version: String,
8871 pub schema_id: String,
8872 pub schema_digest: Digest,
8873 pub streams: Vec<StreamBinding>,
8874 pub capabilities: Vec<CapabilityGrant>,
8875 pub limits: Vec<ProtocolLimit>,
8876}
8877
8878#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8879#[serde(deny_unknown_fields)]
8880pub struct ListIndexesRequest {
8881 pub page_size: u32,
8882 #[serde(default, skip_serializing_if = "Option::is_none")]
8883 pub cursor: Option<Cursor>,
8884 #[serde(default, skip_serializing_if = "Option::is_none")]
8885 pub name_prefix: Option<String>,
8886 #[serde(default, skip_serializing_if = "Option::is_none")]
8887 pub mode: Option<String>,
8888 #[serde(default, skip_serializing_if = "Option::is_none")]
8889 pub state: Option<String>,
8890 pub restart_count: u32,
8891}
8892
8893#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8894#[serde(deny_unknown_fields)]
8895pub struct ListIndexesResult {
8896 pub items: Vec<IndexSummary>,
8897 #[serde(default, skip_serializing_if = "Option::is_none")]
8898 pub next_cursor: Option<Cursor>,
8899 pub restart_count: u32,
8900}
8901
8902#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8903#[serde(deny_unknown_fields)]
8904pub struct GetIndexRequest {
8905 pub name: String,
8906 #[serde(default, skip_serializing_if = "Option::is_none")]
8907 pub expected_incarnation: Option<Identity>,
8908}
8909
8910#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8911#[serde(deny_unknown_fields)]
8912pub struct GetIndexResult {
8913 pub resource: IndexDetail,
8914}
8915
8916#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8917#[serde(deny_unknown_fields)]
8918pub struct ValidateIndexChangeRequest {
8919 pub action_kind: String,
8920 pub name: String,
8921 #[serde(default, skip_serializing_if = "Option::is_none")]
8922 pub expected_incarnation: Option<Identity>,
8923 #[serde(default, skip_serializing_if = "Option::is_none")]
8924 pub expected_revision: Option<U64>,
8925 #[serde(default, skip_serializing_if = "Option::is_none")]
8926 pub mode: Option<String>,
8927 #[serde(default, skip_serializing_if = "Option::is_none")]
8928 pub mapping: Option<Mapping>,
8929 #[serde(default, skip_serializing_if = "Option::is_none")]
8930 pub policies: Option<IndexPolicies>,
8931}
8932
8933#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8934#[serde(deny_unknown_fields)]
8935pub struct ValidateIndexChangeResult {
8936 pub change_kind: String,
8937 #[serde(default, skip_serializing_if = "Option::is_none")]
8938 pub action_id: Option<Digest>,
8939 pub fields_added: Vec<String>,
8940 pub policy_axes_changed: Vec<String>,
8941 pub required_capabilities: Vec<String>,
8942 pub catalog_revision: U64,
8943 pub policy_revision: U64,
8944}
8945
8946#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8947#[serde(deny_unknown_fields)]
8948pub struct ApplyIndexChangeRequest {
8949 pub action_id: Digest,
8950 pub index: Resource,
8951 pub expected_revision: U64,
8952 #[serde(default, skip_serializing_if = "Option::is_none")]
8953 pub mapping: Option<Mapping>,
8954 #[serde(default, skip_serializing_if = "Option::is_none")]
8955 pub policies: Option<IndexPolicies>,
8956}
8957
8958#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8959#[serde(deny_unknown_fields)]
8960pub struct ApplyIndexChangeResult {
8961 pub receipt: IndexChangeApplyReceipt,
8962}
8963
8964#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8965#[serde(deny_unknown_fields)]
8966pub struct ResolveIndexChangeRequest {
8967 pub action_id: Digest,
8968 pub index: Resource,
8969 pub expected_revision: U64,
8970 #[serde(default, skip_serializing_if = "Option::is_none")]
8971 pub mapping: Option<Mapping>,
8972 #[serde(default, skip_serializing_if = "Option::is_none")]
8973 pub policies: Option<IndexPolicies>,
8974}
8975
8976#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8977#[serde(deny_unknown_fields)]
8978pub struct ResolveIndexChangeResult {
8979 pub state: IndexChangeResolutionState,
8980 #[serde(default, skip_serializing_if = "Option::is_none")]
8981 pub receipt: Option<IndexChangeApplyReceipt>,
8982 #[serde(default, skip_serializing_if = "Option::is_none")]
8983 pub failure: Option<String>,
8984}
8985
8986#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8987#[serde(deny_unknown_fields)]
8988pub struct ApplyAdministrationMutationRequest {
8989 pub action_id: Digest,
8990 pub expected_revision: U64,
8991 pub mutation: AdministrationMutation,
8992}
8993
8994#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8995#[serde(deny_unknown_fields)]
8996pub struct ApplyAdministrationMutationResult {
8997 pub outcome: AdministrationOutcome,
8998}
8999
9000#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9001#[serde(deny_unknown_fields)]
9002pub struct ListAliasesRequest {
9003 pub page_size: u32,
9004 #[serde(default, skip_serializing_if = "Option::is_none")]
9005 pub cursor: Option<Cursor>,
9006 #[serde(default, skip_serializing_if = "Option::is_none")]
9007 pub name_prefix: Option<String>,
9008 pub restart_count: u32,
9009}
9010
9011#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9012#[serde(deny_unknown_fields)]
9013pub struct ListAliasesResult {
9014 pub items: Vec<AliasSummary>,
9015 #[serde(default, skip_serializing_if = "Option::is_none")]
9016 pub next_cursor: Option<Cursor>,
9017 pub restart_count: u32,
9018}
9019
9020#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9021#[serde(deny_unknown_fields)]
9022pub struct GetAliasRequest {
9023 pub name: String,
9024}
9025
9026#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9027#[serde(deny_unknown_fields)]
9028pub struct GetAliasResult {
9029 pub resource: AliasDetail,
9030}
9031
9032#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9033#[serde(deny_unknown_fields)]
9034pub struct ListDataStreamsRequest {
9035 pub page_size: u32,
9036 #[serde(default, skip_serializing_if = "Option::is_none")]
9037 pub cursor: Option<Cursor>,
9038 #[serde(default, skip_serializing_if = "Option::is_none")]
9039 pub name_prefix: Option<String>,
9040 pub restart_count: u32,
9041}
9042
9043#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9044#[serde(deny_unknown_fields)]
9045pub struct ListDataStreamsResult {
9046 pub items: Vec<DataStreamSummary>,
9047 #[serde(default, skip_serializing_if = "Option::is_none")]
9048 pub next_cursor: Option<Cursor>,
9049 pub restart_count: u32,
9050}
9051
9052#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9053#[serde(deny_unknown_fields)]
9054pub struct GetDataStreamRequest {
9055 pub name: String,
9056}
9057
9058#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9059#[serde(deny_unknown_fields)]
9060pub struct GetDataStreamResult {
9061 pub resource: DataStreamDetail,
9062}
9063
9064#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9065#[serde(deny_unknown_fields)]
9066pub struct ListComponentTemplatesRequest {
9067 pub page_size: u32,
9068 #[serde(default, skip_serializing_if = "Option::is_none")]
9069 pub cursor: Option<Cursor>,
9070 #[serde(default, skip_serializing_if = "Option::is_none")]
9071 pub name_prefix: Option<String>,
9072 pub restart_count: u32,
9073}
9074
9075#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9076#[serde(deny_unknown_fields)]
9077pub struct ListComponentTemplatesResult {
9078 pub items: Vec<ComponentTemplateSummary>,
9079 #[serde(default, skip_serializing_if = "Option::is_none")]
9080 pub next_cursor: Option<Cursor>,
9081 pub restart_count: u32,
9082}
9083
9084#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9085#[serde(deny_unknown_fields)]
9086pub struct GetComponentTemplateRequest {
9087 pub name: String,
9088 #[serde(default, skip_serializing_if = "Option::is_none")]
9089 pub expected_incarnation: Option<Identity>,
9090}
9091
9092#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9093#[serde(deny_unknown_fields)]
9094pub struct GetComponentTemplateResult {
9095 pub resource: ComponentTemplateDetail,
9096}
9097
9098#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9099#[serde(deny_unknown_fields)]
9100pub struct ListIndexTemplatesRequest {
9101 pub page_size: u32,
9102 #[serde(default, skip_serializing_if = "Option::is_none")]
9103 pub cursor: Option<Cursor>,
9104 #[serde(default, skip_serializing_if = "Option::is_none")]
9105 pub name_prefix: Option<String>,
9106 pub restart_count: u32,
9107}
9108
9109#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9110#[serde(deny_unknown_fields)]
9111pub struct ListIndexTemplatesResult {
9112 pub items: Vec<IndexTemplateSummary>,
9113 #[serde(default, skip_serializing_if = "Option::is_none")]
9114 pub next_cursor: Option<Cursor>,
9115 pub restart_count: u32,
9116}
9117
9118#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9119#[serde(deny_unknown_fields)]
9120pub struct GetIndexTemplateRequest {
9121 pub name: String,
9122 #[serde(default, skip_serializing_if = "Option::is_none")]
9123 pub expected_incarnation: Option<Identity>,
9124}
9125
9126#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9127#[serde(deny_unknown_fields)]
9128pub struct GetIndexTemplateResult {
9129 pub resource: IndexTemplateDetail,
9130}
9131
9132#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9133#[serde(deny_unknown_fields)]
9134pub struct ListIngestPipelinesRequest {
9135 pub page_size: u32,
9136 #[serde(default, skip_serializing_if = "Option::is_none")]
9137 pub cursor: Option<Cursor>,
9138 #[serde(default, skip_serializing_if = "Option::is_none")]
9139 pub name_prefix: Option<String>,
9140 pub restart_count: u32,
9141}
9142
9143#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9144#[serde(deny_unknown_fields)]
9145pub struct ListIngestPipelinesResult {
9146 pub items: Vec<IngestPipelineSummary>,
9147 #[serde(default, skip_serializing_if = "Option::is_none")]
9148 pub next_cursor: Option<Cursor>,
9149 pub restart_count: u32,
9150}
9151
9152#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9153#[serde(deny_unknown_fields)]
9154pub struct GetIngestPipelineRequest {
9155 pub name: String,
9156 #[serde(default, skip_serializing_if = "Option::is_none")]
9157 pub expected_incarnation: Option<Identity>,
9158}
9159
9160#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9161#[serde(deny_unknown_fields)]
9162pub struct GetIngestPipelineResult {
9163 pub resource: IngestPipelineDetail,
9164}
9165
9166#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9167#[serde(deny_unknown_fields)]
9168pub struct SimulateIngestPipelineRequest {
9169 #[serde(default, skip_serializing_if = "Option::is_none")]
9170 pub name: Option<String>,
9171 #[serde(default, skip_serializing_if = "Option::is_none")]
9172 pub expected: Option<ExpectedBinding>,
9173 #[serde(default, skip_serializing_if = "Option::is_none")]
9174 pub definition: Option<RawJson>,
9175 pub source: RawJson,
9176}
9177
9178#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9179#[serde(deny_unknown_fields)]
9180pub struct SimulateIngestPipelineResult {
9181 #[serde(default, skip_serializing_if = "Option::is_none")]
9182 pub source: Option<RawJson>,
9183 pub dropped: bool,
9184 pub changed: bool,
9185}
9186
9187#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9188#[serde(deny_unknown_fields)]
9189pub struct ReprocessByQueryRequest {
9190 pub action_id: Digest,
9191 pub index: Resource,
9192 pub query: Query,
9193 #[serde(default, skip_serializing_if = "Option::is_none")]
9194 pub pipeline: Option<IngestPipelineSelection>,
9195 pub batch_size: u32,
9196 pub max_docs: U64,
9197 pub proceed_on_conflict: bool,
9198 pub slices: u32,
9199 pub requests_per_second: u32,
9200 pub wait_for_completion: bool,
9201}
9202
9203#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9204#[serde(deny_unknown_fields)]
9205pub struct ReprocessByQueryResult {
9206 pub task_id: Identity,
9207 pub scanned: U64,
9208 pub updated: U64,
9209 pub noops: U64,
9210 pub version_conflicts: U64,
9211 pub batches: U64,
9212 pub completed: bool,
9213}
9214
9215#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9216#[serde(deny_unknown_fields)]
9217pub struct ListLifecyclePoliciesRequest {
9218 pub page_size: u32,
9219 #[serde(default, skip_serializing_if = "Option::is_none")]
9220 pub cursor: Option<Cursor>,
9221 #[serde(default, skip_serializing_if = "Option::is_none")]
9222 pub name_prefix: Option<String>,
9223 pub restart_count: u32,
9224}
9225
9226#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9227#[serde(deny_unknown_fields)]
9228pub struct ListLifecyclePoliciesResult {
9229 pub items: Vec<LifecyclePolicySummary>,
9230 #[serde(default, skip_serializing_if = "Option::is_none")]
9231 pub next_cursor: Option<Cursor>,
9232 pub restart_count: u32,
9233}
9234
9235#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9236#[serde(deny_unknown_fields)]
9237pub struct GetLifecyclePolicyRequest {
9238 pub name: String,
9239}
9240
9241#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9242#[serde(deny_unknown_fields)]
9243pub struct GetLifecyclePolicyResult {
9244 pub resource: LifecyclePolicyDetail,
9245}
9246
9247#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9248#[serde(deny_unknown_fields)]
9249pub struct PrepareCreateIndexRequest {
9250 pub name: String,
9251 pub mapping: Mapping,
9252 #[serde(default, skip_serializing_if = "Option::is_none")]
9253 pub resource_spec: Option<IndexResourceSpec>,
9254 #[serde(default, skip_serializing_if = "Option::is_none")]
9255 pub retained_event_identity: Option<bool>,
9256}
9257
9258#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9259#[serde(deny_unknown_fields)]
9260pub struct PrepareCreateIndexResult {
9261 pub locator: Locator,
9262 pub expires_at: U64,
9263 pub semantic_digest: Digest,
9264 pub resource_spec: IndexResourceSpec,
9265}
9266
9267#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9268#[serde(deny_unknown_fields)]
9269pub struct PrepareDeleteIndexRequest {
9270 pub name: String,
9271 pub expected_incarnation: Identity,
9272}
9273
9274#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9275#[serde(deny_unknown_fields)]
9276pub struct PrepareDeleteIndexResult {
9277 #[serde(default, skip_serializing_if = "Option::is_none")]
9278 pub locator: Option<Locator>,
9279 #[serde(default, skip_serializing_if = "Option::is_none")]
9280 pub expires_at: Option<U64>,
9281 #[serde(default, skip_serializing_if = "Option::is_none")]
9282 pub semantic_digest: Option<Digest>,
9283 pub impact_digest: Digest,
9284 pub blockers: Vec<String>,
9285 pub scheduled_effects: Vec<String>,
9286 #[serde(default, skip_serializing_if = "Option::is_none")]
9287 pub estimated_documents: Option<U64>,
9288 #[serde(default, skip_serializing_if = "Option::is_none")]
9289 pub estimated_logical_bytes: Option<U64>,
9290}
9291
9292#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9293#[serde(deny_unknown_fields)]
9294pub struct SubmitCatalogActionRequest {
9295 pub locator: Locator,
9296 pub semantic_digest: Digest,
9297 pub action_kind: String,
9298 pub name: String,
9299 #[serde(default, skip_serializing_if = "Option::is_none")]
9300 pub mapping: Option<Mapping>,
9301 #[serde(default, skip_serializing_if = "Option::is_none")]
9302 pub resource_spec: Option<IndexResourceSpec>,
9303 #[serde(default, skip_serializing_if = "Option::is_none")]
9304 pub expected_incarnation: Option<Identity>,
9305}
9306
9307#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9308#[serde(deny_unknown_fields)]
9309pub struct SubmitCatalogActionResult {
9310 pub locator: Locator,
9311 pub state: String,
9312 pub mutation_outcome: MutationOutcome,
9313}
9314
9315#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9316#[serde(deny_unknown_fields)]
9317pub struct ResolveCatalogActionRequest {
9318 pub locator: Locator,
9319}
9320
9321#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9322#[serde(deny_unknown_fields)]
9323pub struct ResolveCatalogActionResult {
9324 pub locator: Locator,
9325 pub state: String,
9326 #[serde(default, skip_serializing_if = "Option::is_none")]
9327 pub resource: Option<Resource>,
9328}
9329
9330#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9331#[serde(deny_unknown_fields)]
9332pub struct PrepareReplayableSourceIndexRequest {
9333 pub name: String,
9334 pub mapping: Mapping,
9335 #[serde(default, skip_serializing_if = "Option::is_none")]
9336 pub resource_spec: Option<IndexResourceSpec>,
9337 pub source: ReplayableSourceConfiguration,
9338}
9339
9340#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9341#[serde(deny_unknown_fields)]
9342pub struct PrepareReplayableSourceIndexResult {
9343 pub locator: Locator,
9344 pub expires_at: U64,
9345 pub semantic_digest: Digest,
9346 pub resource_spec: IndexResourceSpec,
9347}
9348
9349#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9350#[serde(deny_unknown_fields)]
9351pub struct SubmitReplayableSourceIndexRequest {
9352 pub locator: Locator,
9353 pub semantic_digest: Digest,
9354 pub name: String,
9355 pub mapping: Mapping,
9356 pub resource_spec: IndexResourceSpec,
9357 pub source: ReplayableSourceConfiguration,
9358}
9359
9360#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9361#[serde(deny_unknown_fields)]
9362pub struct SubmitReplayableSourceIndexResult {
9363 pub locator: Locator,
9364 pub state: String,
9365 pub mutation_outcome: MutationOutcome,
9366}
9367
9368#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9369#[serde(deny_unknown_fields)]
9370pub struct GetReplayableSourceRequest {
9371 pub index: Resource,
9372}
9373
9374#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9375#[serde(deny_unknown_fields)]
9376pub struct GetReplayableSourceResult {
9377 pub status: ReplayableSourceStatus,
9378}
9379
9380#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9381#[serde(deny_unknown_fields)]
9382pub struct ControlReplayableSourceRequest {
9383 pub index: Resource,
9384 pub expected_generation: U64,
9385 pub transition: SourceControlTransition,
9386}
9387
9388#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9389#[serde(deny_unknown_fields)]
9390pub struct ControlReplayableSourceResult {
9391 pub status: ReplayableSourceStatus,
9392 pub mutation_outcome: MutationOutcome,
9393}
9394
9395#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9396#[serde(deny_unknown_fields)]
9397pub struct CloneIndexRequest {
9398 pub source: Resource,
9399 pub destination_name: String,
9400 pub operation_id: Identity,
9401 pub source_cut_id: Identity,
9402}
9403
9404#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9405#[serde(deny_unknown_fields)]
9406pub struct CloneIndexResult {
9407 pub destination: Resource,
9408 pub source_cut_id: Identity,
9409 pub mutation_outcome: MutationOutcome,
9410}
9411
9412#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9413#[serde(deny_unknown_fields)]
9414pub struct ConfigureHistoryRequest {
9415 pub index: Resource,
9416 pub precondition: HistoryLedgerPrecondition,
9417 pub policy: HistoryRetentionPolicy,
9418}
9419
9420#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9421#[serde(deny_unknown_fields)]
9422pub struct ConfigureHistoryResult {
9423 pub status: HistoryStatus,
9424 pub mutation_outcome: MutationOutcome,
9425}
9426
9427#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9428#[serde(deny_unknown_fields)]
9429pub struct GetHistoryRequest {
9430 pub index: Resource,
9431}
9432
9433#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9434#[serde(deny_unknown_fields)]
9435pub struct GetHistoryResult {
9436 pub status: HistoryStatus,
9437}
9438
9439#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9440#[serde(deny_unknown_fields)]
9441pub struct ResolveHistoryRequest {
9442 pub index: Resource,
9443 pub selector: HistorySelector,
9444}
9445
9446#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9447#[serde(deny_unknown_fields)]
9448pub struct ResolveHistoryResult {
9449 pub resolution: HistoryResolution,
9450}
9451
9452#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9453#[serde(deny_unknown_fields)]
9454pub struct PlaceHistoryHoldRequest {
9455 pub index: Resource,
9456 pub expected_ledger_revision: U64,
9457 pub hold: HistoryHold,
9458}
9459
9460#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9461#[serde(deny_unknown_fields)]
9462pub struct PlaceHistoryHoldResult {
9463 pub status: HistoryStatus,
9464 pub mutation_outcome: MutationOutcome,
9465}
9466
9467#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9468#[serde(deny_unknown_fields)]
9469pub struct ReleaseHistoryHoldRequest {
9470 pub index: Resource,
9471 pub expected_ledger_revision: U64,
9472 pub hold_id: Identity,
9473}
9474
9475#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9476#[serde(deny_unknown_fields)]
9477pub struct ReleaseHistoryHoldResult {
9478 pub status: HistoryStatus,
9479 pub mutation_outcome: MutationOutcome,
9480}
9481
9482#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9483#[serde(deny_unknown_fields)]
9484pub struct PrepareDocumentMutationRequest {
9485 pub index: Resource,
9486 pub document_id: String,
9487 pub operation: String,
9488 #[serde(default, skip_serializing_if = "Option::is_none")]
9489 pub source: Option<RawJson>,
9490 #[serde(default, skip_serializing_if = "Option::is_none")]
9491 pub record: Option<NativeRecord>,
9492 #[serde(default, skip_serializing_if = "Option::is_none")]
9493 pub routing: Option<String>,
9494 #[serde(default, skip_serializing_if = "Option::is_none")]
9495 pub condition: Option<DocumentMutationCondition>,
9496 #[serde(default, skip_serializing_if = "Option::is_none")]
9497 pub pipeline: Option<IngestPipelineSelection>,
9498}
9499
9500#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9501#[serde(deny_unknown_fields)]
9502pub struct PrepareDocumentMutationResult {
9503 pub locator: Locator,
9504 pub semantic_digest: Digest,
9505 pub retention_max_entries: U64,
9506 pub retention_sequence_window: U64,
9507}
9508
9509#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9510#[serde(deny_unknown_fields)]
9511pub struct SubmitDocumentMutationRequest {
9512 pub locator: Locator,
9513 pub semantic_digest: Digest,
9514 pub index: Resource,
9515 pub document_id: String,
9516 pub operation: String,
9517 #[serde(default, skip_serializing_if = "Option::is_none")]
9518 pub source: Option<RawJson>,
9519 #[serde(default, skip_serializing_if = "Option::is_none")]
9520 pub record: Option<NativeRecord>,
9521 #[serde(default, skip_serializing_if = "Option::is_none")]
9522 pub routing: Option<String>,
9523 #[serde(default, skip_serializing_if = "Option::is_none")]
9524 pub condition: Option<DocumentMutationCondition>,
9525 #[serde(default, skip_serializing_if = "Option::is_none")]
9526 pub pipeline: Option<IngestPipelineSelection>,
9527}
9528
9529#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9530#[serde(deny_unknown_fields)]
9531pub struct SubmitDocumentMutationResult {
9532 pub locator: Locator,
9533 pub state: String,
9534 pub mutation_outcome: MutationOutcome,
9535 #[serde(default, skip_serializing_if = "Option::is_none")]
9536 pub achievement: Option<WriteAchievement>,
9537 #[serde(default, skip_serializing_if = "Option::is_none")]
9538 pub sequence: Option<U64>,
9539 #[serde(default, skip_serializing_if = "Option::is_none")]
9540 pub mapping_generation: Option<U64>,
9541 pub mapping_adopted: bool,
9542 #[serde(default, skip_serializing_if = "Option::is_none")]
9543 pub commit_receipt: Option<MutationCommitReceipt>,
9544}
9545
9546#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9547#[serde(deny_unknown_fields)]
9548pub struct PrepareDocumentBulkRequest {
9549 pub batch_id: Digest,
9550 pub index: Resource,
9551 pub items: Vec<BulkDocumentItem>,
9552}
9553
9554#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9555#[serde(deny_unknown_fields)]
9556pub struct PrepareDocumentBulkResult {
9557 pub outcome: BulkDocumentOutcome,
9558}
9559
9560#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9561#[serde(deny_unknown_fields)]
9562pub struct SubmitDocumentBulkRequest {
9563 pub batch_id: Digest,
9564 pub index: Resource,
9565 pub items: Vec<BulkDocumentItem>,
9566 pub preparations: Vec<BulkDocumentItemOutcome>,
9567}
9568
9569#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9570#[serde(deny_unknown_fields)]
9571pub struct SubmitDocumentBulkResult {
9572 pub outcome: BulkDocumentOutcome,
9573}
9574
9575#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9576#[serde(deny_unknown_fields)]
9577pub struct ResolveDocumentBulkRequest {
9578 pub batch_id: Digest,
9579 pub index: Resource,
9580 pub items: Vec<BulkDocumentItemOutcome>,
9581}
9582
9583#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9584#[serde(deny_unknown_fields)]
9585pub struct ResolveDocumentBulkResult {
9586 pub outcome: BulkDocumentOutcome,
9587}
9588
9589#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9590#[serde(deny_unknown_fields)]
9591pub struct PrepareAppendBulkRequest {
9592 pub batch_id: Digest,
9593 pub index: Resource,
9594 pub items: Vec<RetainedAppendItem>,
9595}
9596
9597#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9598#[serde(deny_unknown_fields)]
9599pub struct PrepareAppendBulkResult {
9600 pub outcome: RetainedAppendBulkOutcome,
9601}
9602
9603#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9604#[serde(deny_unknown_fields)]
9605pub struct SubmitAppendBulkRequest {
9606 pub batch_id: Digest,
9607 pub index: Resource,
9608 pub items: Vec<RetainedAppendItem>,
9609 pub preparations: Vec<RetainedAppendItemOutcome>,
9610}
9611
9612#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9613#[serde(deny_unknown_fields)]
9614pub struct SubmitAppendBulkResult {
9615 pub outcome: RetainedAppendBulkOutcome,
9616}
9617
9618#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9619#[serde(deny_unknown_fields)]
9620pub struct ResolveAppendBulkRequest {
9621 pub batch_id: Digest,
9622 pub index: Resource,
9623 pub items: Vec<RetainedAppendItemOutcome>,
9624}
9625
9626#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9627#[serde(deny_unknown_fields)]
9628pub struct ResolveAppendBulkResult {
9629 pub outcome: RetainedAppendBulkOutcome,
9630}
9631
9632#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9633#[serde(deny_unknown_fields)]
9634pub struct ObserveAppendCommittedRequest {
9635 pub index: Resource,
9636 pub locator: Locator,
9637}
9638
9639#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9640#[serde(deny_unknown_fields)]
9641pub struct ObserveAppendCommittedResult {
9642 pub outcome: RetainedAppendObservationOutcome,
9643}
9644
9645#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9646#[serde(deny_unknown_fields)]
9647pub struct ResolveDocumentMutationRequest {
9648 pub locator: Locator,
9649}
9650
9651#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9652#[serde(deny_unknown_fields)]
9653pub struct ResolveDocumentMutationResult {
9654 pub locator: Locator,
9655 pub state: String,
9656 #[serde(default, skip_serializing_if = "Option::is_none")]
9657 pub sequence: Option<U64>,
9658 #[serde(default, skip_serializing_if = "Option::is_none")]
9659 pub mapping_generation: Option<U64>,
9660 pub mapping_adopted: bool,
9661 #[serde(default, skip_serializing_if = "Option::is_none")]
9662 pub source: Option<RawJson>,
9663 #[serde(default, skip_serializing_if = "Option::is_none")]
9664 pub commit_receipt: Option<MutationCommitReceipt>,
9665}
9666
9667#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9668#[serde(deny_unknown_fields)]
9669pub struct GetDocumentRequest {
9670 pub index: Resource,
9671 pub document_id: String,
9672 #[serde(default, skip_serializing_if = "Option::is_none")]
9673 pub routing: Option<String>,
9674}
9675
9676#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9677#[serde(deny_unknown_fields)]
9678pub struct GetDocumentResult {
9679 pub found: bool,
9680 #[serde(default, skip_serializing_if = "Option::is_none")]
9681 pub source: Option<RawJson>,
9682 #[serde(default, skip_serializing_if = "Option::is_none")]
9683 pub sequence: Option<U64>,
9684 #[serde(default, skip_serializing_if = "Option::is_none")]
9685 pub primary_term: Option<U64>,
9686}
9687
9688#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9689#[serde(deny_unknown_fields)]
9690pub struct SearchRequest {
9691 #[serde(default, skip_serializing_if = "Option::is_none")]
9692 pub indexes: Option<Vec<Resource>>,
9693 #[serde(default, skip_serializing_if = "Option::is_none")]
9694 pub query: Option<Query>,
9695 #[serde(default, skip_serializing_if = "Option::is_none")]
9696 pub retrieval: Option<RetrievalPlan>,
9697 #[serde(default, skip_serializing_if = "Option::is_none")]
9698 pub aggregations: Option<Vec<Aggregation>>,
9699 pub sort: Vec<SortSpec>,
9700 #[serde(default, skip_serializing_if = "Option::is_none")]
9701 pub routing: Option<Vec<String>>,
9702 pub freshness: SearchFreshness,
9703 pub page_size: u32,
9704 #[serde(default, skip_serializing_if = "Option::is_none")]
9705 pub cursor: Option<Cursor>,
9706 #[serde(default, skip_serializing_if = "Option::is_none")]
9707 pub pit: Option<Cursor>,
9708 pub allow_partial: bool,
9709 #[serde(default, skip_serializing_if = "Option::is_none")]
9710 pub total_hits_threshold: Option<U64>,
9711 pub diagnostics: bool,
9712 #[serde(default, skip_serializing_if = "Option::is_none")]
9713 pub fragments: Option<FragmentRequest>,
9714 #[serde(default, skip_serializing_if = "Option::is_none")]
9715 pub features: Option<ResultFeatureRequest>,
9716 #[serde(default, skip_serializing_if = "Option::is_none")]
9717 pub diversification: Option<ResultDiversification>,
9718 #[serde(default, skip_serializing_if = "Option::is_none")]
9719 pub source_projection: Option<SourceProjection>,
9720 #[serde(default, skip_serializing_if = "Option::is_none")]
9721 pub delegated_query_subject: Option<SignedDelegatedQuerySubject>,
9722}
9723
9724#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9725#[serde(deny_unknown_fields)]
9726pub struct SearchResult {
9727 pub hits: Vec<SearchHit>,
9728 pub aggregations: Vec<AggregationResult>,
9729 #[serde(default, skip_serializing_if = "Option::is_none")]
9730 pub next_cursor: Option<Cursor>,
9731 pub timed_out: bool,
9732 pub partial: bool,
9733 pub achieved: SearchAchievement,
9734 pub shards: ShardCounts,
9735 pub total: SearchTotal,
9736 pub failures: Vec<SearchPartialFailure>,
9737 pub vector_diagnostics: Vec<VectorBranchDiagnostics>,
9738 #[serde(default, skip_serializing_if = "Option::is_none")]
9739 pub read_cut: Option<ReadCutEvidence>,
9740}
9741
9742#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9743#[serde(deny_unknown_fields)]
9744pub struct TraverseRelationshipsRequest {
9745 pub pit: Cursor,
9746 pub indexes: Vec<Resource>,
9747 pub seeds: Vec<EntityRef>,
9748 pub direction: RelationshipTraversalDirection,
9749 pub filter: RelationshipTraversalFilter,
9750 pub budget: RelationshipTraversalBudget,
9751 pub allow_partial: bool,
9752}
9753
9754#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9755#[serde(deny_unknown_fields)]
9756pub struct TraverseRelationshipsResult {
9757 pub relationships: Vec<TraversedRelationship>,
9758 pub visited_entities: Vec<EntityRef>,
9759 pub input_cut_digest: Digest,
9760 pub partial: bool,
9761 pub incomplete_frontier: Vec<EntityRef>,
9762 pub failures: Vec<SearchPartialFailure>,
9763}
9764
9765#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9766#[serde(deny_unknown_fields)]
9767pub struct QueryProfilesRequest {
9768 pub pit: Cursor,
9769 pub indexes: Vec<Resource>,
9770 pub operation: ProfileQueryOperation,
9771 pub start_unix_nanos: U64,
9772 pub end_unix_nanos: U64,
9773 pub sample_type: String,
9774 pub unit: String,
9775 pub filter: ProfileQueryFilter,
9776 #[serde(default, skip_serializing_if = "Option::is_none")]
9777 pub group_by: Option<ProfileGroupBy>,
9778 pub budget: ProfileQueryBudget,
9779 pub allow_partial: bool,
9780}
9781
9782#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9783#[serde(deny_unknown_fields)]
9784pub struct QueryProfilesResult {
9785 pub rows: Vec<ProfileQueryRow>,
9786 pub evaluated_batches: u32,
9787 pub evaluated_samples: u32,
9788 pub input_cut_digest: Digest,
9789 pub partial: bool,
9790 pub approximate: bool,
9791 pub failures: Vec<SearchPartialFailure>,
9792}
9793
9794#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9795#[serde(deny_unknown_fields)]
9796pub struct EvaluateTemporalEvidenceRequest {
9797 pub pit: Cursor,
9798 pub definition: HistoricalTemporalDefinition,
9799}
9800
9801#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9802#[serde(deny_unknown_fields)]
9803pub struct EvaluateTemporalEvidenceResult {
9804 pub evidence: Vec<TemporalEvidence>,
9805 pub input_cut_digest: Digest,
9806 pub pattern_digest: Digest,
9807 pub evaluated_events: u32,
9808}
9809
9810#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9811#[serde(deny_unknown_fields)]
9812pub struct CreateContinuousTemporalEvaluationRequest {
9813 pub action_id: Digest,
9814 pub definition: ContinuousTemporalDefinition,
9815}
9816
9817#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9818#[serde(deny_unknown_fields)]
9819pub struct CreateContinuousTemporalEvaluationResult {
9820 pub evaluation: ContinuousTemporalEvaluation,
9821 pub mutation_outcome: MutationOutcome,
9822}
9823
9824#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9825#[serde(deny_unknown_fields)]
9826pub struct GetContinuousTemporalEvaluationRequest {
9827 pub evaluation_id: Identity,
9828}
9829
9830#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9831#[serde(deny_unknown_fields)]
9832pub struct GetContinuousTemporalEvaluationResult {
9833 pub evaluation: ContinuousTemporalEvaluation,
9834}
9835
9836#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9837#[serde(deny_unknown_fields)]
9838pub struct PauseContinuousTemporalEvaluationRequest {
9839 pub action_id: Digest,
9840 pub evaluation_id: Identity,
9841 pub expected_revision: U64,
9842}
9843
9844#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9845#[serde(deny_unknown_fields)]
9846pub struct PauseContinuousTemporalEvaluationResult {
9847 pub evaluation: ContinuousTemporalEvaluation,
9848 pub mutation_outcome: MutationOutcome,
9849}
9850
9851#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9852#[serde(deny_unknown_fields)]
9853pub struct ResumeContinuousTemporalEvaluationRequest {
9854 pub action_id: Digest,
9855 pub evaluation_id: Identity,
9856 pub expected_revision: U64,
9857}
9858
9859#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9860#[serde(deny_unknown_fields)]
9861pub struct ResumeContinuousTemporalEvaluationResult {
9862 pub evaluation: ContinuousTemporalEvaluation,
9863 pub mutation_outcome: MutationOutcome,
9864}
9865
9866#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9867#[serde(deny_unknown_fields)]
9868pub struct ReplaceContinuousTemporalEvaluationRequest {
9869 pub action_id: Digest,
9870 pub expected_revision: U64,
9871 pub definition: ContinuousTemporalDefinition,
9872}
9873
9874#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9875#[serde(deny_unknown_fields)]
9876pub struct ReplaceContinuousTemporalEvaluationResult {
9877 pub evaluation: ContinuousTemporalEvaluation,
9878 pub mutation_outcome: MutationOutcome,
9879}
9880
9881#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9882#[serde(deny_unknown_fields)]
9883pub struct RetireContinuousTemporalEvaluationRequest {
9884 pub action_id: Digest,
9885 pub evaluation_id: Identity,
9886 pub expected_revision: U64,
9887}
9888
9889#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9890#[serde(deny_unknown_fields)]
9891pub struct RetireContinuousTemporalEvaluationResult {
9892 #[serde(default, skip_serializing_if = "Option::is_none")]
9893 pub evaluation: Option<ContinuousTemporalEvaluation>,
9894 pub mutation_outcome: MutationOutcome,
9895}
9896
9897#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9898#[serde(deny_unknown_fields)]
9899pub struct ReadContinuousTemporalEvidenceRequest {
9900 pub evaluation_id: Identity,
9901 pub expected_revision: U64,
9902 pub minimum_event_time_unix_nanos: U64,
9903 pub page_size: u32,
9904 #[serde(default, skip_serializing_if = "Option::is_none")]
9905 pub cursor: Option<Cursor>,
9906}
9907
9908#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9909#[serde(deny_unknown_fields)]
9910pub struct ReadContinuousTemporalEvidenceResult {
9911 pub evidence: Vec<TemporalEvidence>,
9912 #[serde(default, skip_serializing_if = "Option::is_none")]
9913 pub next_cursor: Option<Cursor>,
9914 pub retained_floor_unix_nanos: U64,
9915 pub evaluation_revision: U64,
9916}
9917
9918#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9919#[serde(deny_unknown_fields)]
9920pub struct ValidateSearchRequest {
9921 pub indexes: Vec<Resource>,
9922 #[serde(default, skip_serializing_if = "Option::is_none")]
9923 pub query: Option<Query>,
9924 #[serde(default, skip_serializing_if = "Option::is_none")]
9925 pub retrieval: Option<RetrievalPlan>,
9926 #[serde(default, skip_serializing_if = "Option::is_none")]
9927 pub aggregations: Option<Vec<Aggregation>>,
9928 pub sort: Vec<SortSpec>,
9929 #[serde(default, skip_serializing_if = "Option::is_none")]
9930 pub routing: Option<Vec<String>>,
9931 pub freshness: SearchFreshness,
9932 pub page_size: u32,
9933 pub allow_partial: bool,
9934 #[serde(default, skip_serializing_if = "Option::is_none")]
9935 pub total_hits_threshold: Option<U64>,
9936 #[serde(default, skip_serializing_if = "Option::is_none")]
9937 pub fragments: Option<FragmentRequest>,
9938 #[serde(default, skip_serializing_if = "Option::is_none")]
9939 pub features: Option<ResultFeatureRequest>,
9940 #[serde(default, skip_serializing_if = "Option::is_none")]
9941 pub diversification: Option<ResultDiversification>,
9942 #[serde(default, skip_serializing_if = "Option::is_none")]
9943 pub source_projection: Option<SourceProjection>,
9944}
9945
9946#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9947#[serde(deny_unknown_fields)]
9948pub struct ValidateSearchResult {
9949 pub catalog_revision: U64,
9950 pub resolved_indexes: Vec<Resource>,
9951 pub authorized: bool,
9952 pub capabilities: Vec<String>,
9953 pub shape_digest: Digest,
9954 pub warnings: Vec<String>,
9955 pub refusals: Vec<String>,
9956 pub limits: Vec<SearchValidationLimit>,
9957 pub estimates: SearchValidationEstimates,
9958}
9959
9960#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9961#[serde(deny_unknown_fields)]
9962pub struct MaterializeTableSnapshotRequest {
9963 pub action_id: Digest,
9964 pub semantic_digest: Digest,
9965 pub index: Resource,
9966 pub keep_alive_millis: U64,
9967 pub maximum_objects: u32,
9968 pub maximum_range_bytes: U64,
9969}
9970
9971#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9972#[serde(deny_unknown_fields)]
9973pub struct MaterializeTableSnapshotResult {
9974 pub resolution: TableSnapshotResolution,
9975}
9976
9977#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9978#[serde(deny_unknown_fields)]
9979pub struct ResolveTableSnapshotRequest {
9980 pub action_id: Digest,
9981 pub semantic_digest: Digest,
9982 pub index: Resource,
9983 pub keep_alive_millis: U64,
9984 pub maximum_objects: u32,
9985 pub maximum_range_bytes: U64,
9986}
9987
9988#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9989#[serde(deny_unknown_fields)]
9990pub struct ResolveTableSnapshotResult {
9991 pub resolution: TableSnapshotResolution,
9992}
9993
9994#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9995#[serde(deny_unknown_fields)]
9996pub struct ReadTableSnapshotRequest {
9997 pub snapshot: Locator,
9998 pub index: Resource,
9999 pub object_id: Digest,
10000 pub offset: U64,
10001 pub length: u32,
10002}
10003
10004#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10005#[serde(deny_unknown_fields)]
10006pub struct ReadTableSnapshotResult {
10007 pub read: TableSnapshotRead,
10008}
10009
10010#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10011#[serde(deny_unknown_fields)]
10012pub struct OpenPitRequest {
10013 pub indexes: Vec<Resource>,
10014 pub keep_alive_millis: U64,
10015}
10016
10017#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10018#[serde(deny_unknown_fields)]
10019pub struct OpenPitResult {
10020 pub pit: Cursor,
10021 pub expires_at: U64,
10022 pub shard_count: u32,
10023 pub read_cut: ReadCutEvidence,
10024}
10025
10026#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10027#[serde(deny_unknown_fields)]
10028pub struct RenewPitRequest {
10029 pub pit: Cursor,
10030 pub keep_alive_millis: U64,
10031}
10032
10033#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10034#[serde(deny_unknown_fields)]
10035pub struct RenewPitResult {
10036 pub pit: Cursor,
10037 pub expires_at: U64,
10038 pub shard_count: u32,
10039 pub read_cut: ReadCutEvidence,
10040}
10041
10042#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10043#[serde(deny_unknown_fields)]
10044pub struct ClosePitRequest {
10045 pub pit: Cursor,
10046}
10047
10048#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10049#[serde(deny_unknown_fields)]
10050pub struct ClosePitResult {
10051 pub removed: bool,
10052}
10053
10054#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10055#[serde(deny_unknown_fields)]
10056pub struct ListOperationsRequest {
10057 pub page_size: u32,
10058 #[serde(default, skip_serializing_if = "Option::is_none")]
10059 pub cursor: Option<Cursor>,
10060}
10061
10062#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10063#[serde(deny_unknown_fields)]
10064pub struct ListOperationsResult {
10065 pub items: Vec<Operation>,
10066 #[serde(default, skip_serializing_if = "Option::is_none")]
10067 pub next_cursor: Option<Cursor>,
10068}
10069
10070#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10071#[serde(deny_unknown_fields)]
10072pub struct GetOperationRequest {
10073 pub locator: Locator,
10074}
10075
10076#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10077#[serde(deny_unknown_fields)]
10078pub struct GetOperationResult {
10079 pub operation: Operation,
10080}
10081
10082#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10083#[serde(deny_unknown_fields)]
10084pub struct WaitOperationRequest {
10085 pub locator: Locator,
10086 pub after_authority_revision: U64,
10087 pub maximum_attempts: u32,
10088 pub interval_millis: U64,
10089}
10090
10091#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10092#[serde(deny_unknown_fields)]
10093pub struct WaitOperationResult {
10094 pub operation: Operation,
10095 pub attempts: u32,
10096}
10097
10098#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10099#[serde(deny_unknown_fields)]
10100pub struct CancelOperationRequest {
10101 pub locator: Locator,
10102 pub expected_authority_revision: U64,
10103 pub cancel_action: Identity,
10104}
10105
10106#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10107#[serde(deny_unknown_fields)]
10108pub struct CancelOperationResult {
10109 pub locator: Locator,
10110 pub cancel_generation: U64,
10111 pub mutation_outcome: MutationOutcome,
10112}
10113
10114#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10115#[serde(deny_unknown_fields)]
10116pub struct ListAuditEventsRequest {
10117 pub start_time: U64,
10118 pub end_time: U64,
10119 pub actions: Vec<String>,
10120 pub page_size: u32,
10121 #[serde(default, skip_serializing_if = "Option::is_none")]
10122 pub cursor: Option<Cursor>,
10123}
10124
10125#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10126#[serde(deny_unknown_fields)]
10127pub struct ListAuditEventsResult {
10128 pub stream: AuditStreamState,
10129 pub events: Vec<AuditEvent>,
10130 #[serde(default, skip_serializing_if = "Option::is_none")]
10131 pub next_cursor: Option<Cursor>,
10132 pub gaps: Vec<AuditGap>,
10133 pub object_reads: u32,
10134}
10135
10136#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10137#[serde(deny_unknown_fields)]
10138pub struct ExportAuditEventsRequest {
10139 pub start_time: U64,
10140 pub end_time: U64,
10141 pub actions: Vec<String>,
10142 pub page_size: u32,
10143 #[serde(default, skip_serializing_if = "Option::is_none")]
10144 pub cursor: Option<Cursor>,
10145}
10146
10147#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10148#[serde(deny_unknown_fields)]
10149pub struct ExportAuditEventsResult {
10150 pub stream: AuditStreamState,
10151 pub events: Vec<AuditEvent>,
10152 #[serde(default, skip_serializing_if = "Option::is_none")]
10153 pub next_cursor: Option<Cursor>,
10154 pub gaps: Vec<AuditGap>,
10155 pub object_reads: u32,
10156}
10157
10158#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10159#[serde(deny_unknown_fields)]
10160pub struct ReserveServiceCredentialRequest {
10161 pub reservation_action_id: Digest,
10162 pub activation_action_id: Digest,
10163 pub role_grants: Vec<ServiceCredentialGrant>,
10164 pub credential_expires_at: U64,
10165 pub reservation_expires_at: U64,
10166}
10167
10168#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10169#[serde(deny_unknown_fields)]
10170pub struct ReserveServiceCredentialResult {
10171 pub reservation: ServiceCredentialReservation,
10172}
10173
10174#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10175#[serde(deny_unknown_fields)]
10176pub struct ReserveServiceCredentialRotationRequest {
10177 pub reservation_action_id: Digest,
10178 pub activation_action_id: Digest,
10179 pub current_api_key_id: Identity,
10180 pub expected_generation: U64,
10181 pub credential_expires_at: U64,
10182 pub overlap_until: U64,
10183 pub reservation_expires_at: U64,
10184}
10185
10186#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10187#[serde(deny_unknown_fields)]
10188pub struct ReserveServiceCredentialRotationResult {
10189 pub reservation: ServiceCredentialReservation,
10190}
10191
10192#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10193#[serde(deny_unknown_fields)]
10194pub struct ActivateServiceCredentialRequest {
10195 pub reservation: ServiceCredentialReservation,
10196 pub verifier: Digest,
10197}
10198
10199#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10200#[serde(deny_unknown_fields)]
10201pub struct ActivateServiceCredentialResult {
10202 pub locator: Locator,
10203 pub outcome: SecurityActionOutcome,
10204 pub secret_escrowed: bool,
10205}
10206
10207#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10208#[serde(deny_unknown_fields)]
10209pub struct ResolveServiceCredentialReservationRequest {
10210 pub reservation_action_id: Digest,
10211}
10212
10213#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10214#[serde(deny_unknown_fields)]
10215pub struct ResolveServiceCredentialReservationResult {
10216 pub state: String,
10217 #[serde(default, skip_serializing_if = "Option::is_none")]
10218 pub reservation: Option<ServiceCredentialReservation>,
10219 #[serde(default, skip_serializing_if = "Option::is_none")]
10220 pub outcome: Option<SecurityActionOutcome>,
10221}
10222
10223#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10224#[serde(deny_unknown_fields)]
10225pub struct PrepareRevokeServiceCredentialRequest {
10226 pub api_key_id: Identity,
10227 pub expected_generation: U64,
10228}
10229
10230#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10231#[serde(deny_unknown_fields)]
10232pub struct PrepareRevokeServiceCredentialResult {
10233 pub locator: Locator,
10234 pub semantic_digest: Digest,
10235 pub expires_at: U64,
10236}
10237
10238#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10239#[serde(deny_unknown_fields)]
10240pub struct RevokeServiceCredentialRequest {
10241 pub locator: Locator,
10242 pub api_key_id: Identity,
10243 pub expected_generation: U64,
10244}
10245
10246#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10247#[serde(deny_unknown_fields)]
10248pub struct RevokeServiceCredentialResult {
10249 pub locator: Locator,
10250 pub principal_id: Identity,
10251 pub api_key_id: Identity,
10252 pub state: String,
10253}
10254
10255#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10256#[serde(deny_unknown_fields)]
10257pub struct ResolveSecurityActionRequest {
10258 pub locator: Locator,
10259}
10260
10261#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10262#[serde(deny_unknown_fields)]
10263pub struct ResolveSecurityActionResult {
10264 pub locator: Locator,
10265 pub state: String,
10266 #[serde(default, skip_serializing_if = "Option::is_none")]
10267 pub result: Option<SecurityActionOutcome>,
10268 pub secret_escrowed: bool,
10269}
10270
10271#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10272#[serde(deny_unknown_fields)]
10273pub struct GetSecurityRoleRequest {
10274 pub role_name: String,
10275}
10276
10277#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10278#[serde(deny_unknown_fields)]
10279pub struct GetSecurityRoleResult {
10280 pub role: SecurityRole,
10281}
10282
10283#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10284#[serde(deny_unknown_fields)]
10285pub struct PrepareRoleAppendAccessChangeRequest {
10286 pub role_name: String,
10287 pub expected_role_version: U64,
10288 pub changes: Vec<RoleAppendScopeChange>,
10289}
10290
10291#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10292#[serde(deny_unknown_fields)]
10293pub struct PrepareRoleAppendAccessChangeResult {
10294 pub preparation: RoleAppendAccessPreparation,
10295}
10296
10297#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10298#[serde(deny_unknown_fields)]
10299pub struct SubmitRoleAppendAccessChangeRequest {
10300 pub locator: Locator,
10301 pub semantic_digest: Digest,
10302 pub role_name: String,
10303 pub expected_role_version: U64,
10304 pub changes: Vec<RoleAppendScopeChange>,
10305}
10306
10307#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10308#[serde(deny_unknown_fields)]
10309pub struct SubmitRoleAppendAccessChangeResult {
10310 pub locator: Locator,
10311 pub state: String,
10312 pub target_policy_revision: U64,
10313 pub role: SecurityRole,
10314}
10315
10316#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10317#[serde(deny_unknown_fields)]
10318pub struct PrepareSourceAuthorizationProjectionRequest {
10319 pub index: Resource,
10320 pub batch: SourceAuthorizationBatch,
10321}
10322
10323#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10324#[serde(deny_unknown_fields)]
10325pub struct PrepareSourceAuthorizationProjectionResult {
10326 pub preparation: SourceAuthorizationPreparation,
10327}
10328
10329#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10330#[serde(deny_unknown_fields)]
10331pub struct SubmitSourceAuthorizationProjectionRequest {
10332 pub index: Resource,
10333 pub action_id: Digest,
10334 pub semantic_digest: Digest,
10335 pub successor_generation: U64,
10336}
10337
10338#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10339#[serde(deny_unknown_fields)]
10340pub struct SubmitSourceAuthorizationProjectionResult {
10341 pub receipt: SourceAuthorizationReceipt,
10342 pub resolution: SourceAuthorizationResolution,
10343 pub mutation_outcome: MutationOutcome,
10344}
10345
10346#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10347#[serde(deny_unknown_fields)]
10348pub struct ResolveSourceAuthorizationProjectionRequest {
10349 pub index: Resource,
10350 pub action_id: Digest,
10351 pub semantic_digest: Digest,
10352 pub successor_generation: U64,
10353}
10354
10355#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10356#[serde(deny_unknown_fields)]
10357pub struct ResolveSourceAuthorizationProjectionResult {
10358 pub resolution: SourceAuthorizationResolution,
10359}
10360
10361#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10362#[serde(deny_unknown_fields)]
10363pub struct ListServiceCredentialsRequest {
10364 pub page_size: u32,
10365 #[serde(default, skip_serializing_if = "Option::is_none")]
10366 pub cursor: Option<Cursor>,
10367}
10368
10369#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10370#[serde(deny_unknown_fields)]
10371pub struct ListServiceCredentialsResult {
10372 pub items: Vec<ServiceCredentialSummary>,
10373 #[serde(default, skip_serializing_if = "Option::is_none")]
10374 pub next_cursor: Option<Cursor>,
10375}
10376
10377#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10378#[serde(deny_unknown_fields)]
10379pub struct GetRuntimeStatusRequest {}
10380
10381#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10382#[serde(deny_unknown_fields)]
10383pub struct GetRuntimeStatusResult {
10384 pub ready: bool,
10385 pub recovery_era: Identity,
10386 pub catalog_revision: U64,
10387 pub policy_revision: U64,
10388 pub redacted: RuntimeStatusDetail,
10389}
10390
10391#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10392#[serde(deny_unknown_fields)]
10393pub struct GetResultCacheStatusRequest {}
10394
10395#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10396#[serde(deny_unknown_fields)]
10397pub struct GetResultCacheStatusResult {
10398 pub status: ResultCacheStatus,
10399}
10400
10401#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10402#[serde(deny_unknown_fields)]
10403pub struct GetFieldPromotionStatusRequest {
10404 pub index: Resource,
10405}
10406
10407#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10408#[serde(deny_unknown_fields)]
10409pub struct GetFieldPromotionStatusResult {
10410 pub status: FieldPromotionStatus,
10411}
10412
10413#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10414#[serde(deny_unknown_fields)]
10415pub struct GetOverloadStatusRequest {
10416 pub index: Resource,
10417}
10418
10419#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10420#[serde(deny_unknown_fields)]
10421pub struct GetOverloadStatusResult {
10422 pub runtime_observed: bool,
10423 pub shards: Vec<OverloadShardStatus>,
10424}
10425
10426#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10427#[serde(deny_unknown_fields)]
10428pub struct ConfigureExternalKeyRequest {
10429 pub index: Resource,
10430 pub expected_authority_revision: U64,
10431 pub binding: ExternalKeyBinding,
10432}
10433
10434#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10435#[serde(deny_unknown_fields)]
10436pub struct ConfigureExternalKeyResult {
10437 pub status: LifecycleStatus,
10438 pub mutation_outcome: MutationOutcome,
10439}
10440
10441#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10442#[serde(deny_unknown_fields)]
10443pub struct RotateExternalKeyBindingRequest {
10444 pub index: Resource,
10445 pub expected_authority_revision: U64,
10446 pub predecessor_binding_id: Identity,
10447 pub binding: ExternalKeyBinding,
10448}
10449
10450#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10451#[serde(deny_unknown_fields)]
10452pub struct RotateExternalKeyBindingResult {
10453 pub status: LifecycleStatus,
10454 pub mutation_outcome: MutationOutcome,
10455}
10456
10457#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10458#[serde(deny_unknown_fields)]
10459pub struct RetireExternalKeyBindingRequest {
10460 pub action_id: Digest,
10461 pub index: Resource,
10462 pub expected_authority_revision: U64,
10463 pub target: ExternalKeyRetirementTarget,
10464}
10465
10466#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10467#[serde(deny_unknown_fields)]
10468pub struct RetireExternalKeyBindingResult {
10469 pub receipt: ExternalKeyRetirementReceipt,
10470}
10471
10472#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10473#[serde(deny_unknown_fields)]
10474pub struct ResolveExternalKeyBindingRetirementRequest {
10475 pub action_id: Digest,
10476 pub index: Resource,
10477 pub target: ExternalKeyRetirementTarget,
10478}
10479
10480#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10481#[serde(deny_unknown_fields)]
10482pub struct ResolveExternalKeyBindingRetirementResult {
10483 pub state: ExternalKeyRetirementResolutionState,
10484 #[serde(default, skip_serializing_if = "Option::is_none")]
10485 pub receipt: Option<ExternalKeyRetirementReceipt>,
10486 #[serde(default, skip_serializing_if = "Option::is_none")]
10487 pub current_authority_revision: Option<U64>,
10488 #[serde(default, skip_serializing_if = "Option::is_none")]
10489 pub current_authority_digest: Option<Digest>,
10490}
10491
10492#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10493#[serde(deny_unknown_fields)]
10494pub struct ConfigureAggregateThenDeleteRequest {
10495 pub index: Resource,
10496 pub expected_authority_revision: U64,
10497 pub policy: AggregateThenDeletePolicy,
10498}
10499
10500#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10501#[serde(deny_unknown_fields)]
10502pub struct ConfigureAggregateThenDeleteResult {
10503 pub status: LifecycleStatus,
10504 pub mutation_outcome: MutationOutcome,
10505}
10506
10507#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10508#[serde(deny_unknown_fields)]
10509pub struct GetLifecycleStatusRequest {
10510 pub index: Resource,
10511}
10512
10513#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10514#[serde(deny_unknown_fields)]
10515pub struct GetLifecycleStatusResult {
10516 pub status: LifecycleStatus,
10517}
10518
10519#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10520#[serde(deny_unknown_fields)]
10521pub struct EraseRecordRequest {
10522 pub action_id: Digest,
10523 pub index: Resource,
10524 pub locator: NativeRecordLocator,
10525 pub maximum_scan_bytes: U64,
10526 pub maximum_rewrite_bytes: U64,
10527 pub wait_for_completion: bool,
10528}
10529
10530#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10531#[serde(deny_unknown_fields)]
10532pub struct EraseRecordResult {
10533 pub receipt: RecordErasureReceipt,
10534}
10535
10536#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10537#[serde(deny_unknown_fields)]
10538pub struct ResolveRecordErasureRequest {
10539 pub action_id: Digest,
10540 pub index: Resource,
10541 pub locator: NativeRecordLocator,
10542 pub maximum_scan_bytes: U64,
10543 pub maximum_rewrite_bytes: U64,
10544 pub wait_for_completion: bool,
10545}
10546
10547#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10548#[serde(deny_unknown_fields)]
10549pub struct ResolveRecordErasureResult {
10550 #[serde(default, skip_serializing_if = "Option::is_none")]
10551 pub receipt: Option<RecordErasureReceipt>,
10552 pub expired_unknown: bool,
10553}
10554
10555#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10556#[serde(deny_unknown_fields)]
10557pub struct GetRecordErasureRequest {
10558 pub index: Resource,
10559 pub task_id: Identity,
10560}
10561
10562#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10563#[serde(deny_unknown_fields)]
10564pub struct GetRecordErasureResult {
10565 pub receipt: RecordErasureReceipt,
10566}
10567
10568#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10569#[serde(deny_unknown_fields)]
10570pub struct GetQuotaRequest {}
10571
10572#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10573#[serde(deny_unknown_fields)]
10574pub struct GetQuotaResult {
10575 pub revision: U64,
10576 pub limits: Vec<QuotaLimit>,
10577 pub usage: Vec<QuotaConsumption>,
10578}
10579
10580#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10581#[serde(deny_unknown_fields)]
10582pub struct UpdateQuotaRequest {
10583 pub expected_revision: U64,
10584 pub limits: Vec<QuotaLimit>,
10585}
10586
10587#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10588#[serde(deny_unknown_fields)]
10589pub struct UpdateQuotaResult {
10590 pub update: QuotaUpdate,
10591}
10592
10593#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10594#[serde(deny_unknown_fields)]
10595pub struct GetBindingRequest {}
10596
10597#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10598#[serde(deny_unknown_fields)]
10599pub struct GetBindingResult {
10600 pub binding: CoreBinding,
10601 pub derived: bool,
10602 pub revision: U64,
10603}
10604
10605#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10606#[serde(deny_unknown_fields)]
10607pub struct GetAdmissionStatusRequest {}
10608
10609#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10610#[serde(deny_unknown_fields)]
10611pub struct GetAdmissionStatusResult {
10612 pub state: String,
10613 pub revision: U64,
10614 pub converged: bool,
10615}
10616
10617#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10618#[serde(deny_unknown_fields)]
10619pub struct SetAdmissionRequest {
10620 pub expected_revision: U64,
10621 pub state: String,
10622}
10623
10624#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10625#[serde(deny_unknown_fields)]
10626pub struct SetAdmissionResult {
10627 pub state: String,
10628 pub revision: U64,
10629 pub converged: bool,
10630}
10631
10632#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10633#[serde(deny_unknown_fields)]
10634pub struct GetQuiesceStatusRequest {}
10635
10636#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10637#[serde(deny_unknown_fields)]
10638pub struct GetQuiesceStatusResult {
10639 pub ready: bool,
10640 pub blockers: Vec<String>,
10641 pub observations: Vec<ReadinessObservation>,
10642 pub recovery_era: Identity,
10643 pub observed_at: U64,
10644 pub expires_at: U64,
10645}
10646
10647#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10648#[serde(deny_unknown_fields)]
10649pub struct GetDecommissionReadinessRequest {}
10650
10651#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10652#[serde(deny_unknown_fields)]
10653pub struct GetDecommissionReadinessResult {
10654 pub ready: bool,
10655 pub blockers: Vec<String>,
10656 pub observations: Vec<ReadinessObservation>,
10657 pub recovery_era: Identity,
10658 pub observed_at: U64,
10659 pub expires_at: U64,
10660}
10661
10662#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10663#[serde(deny_unknown_fields)]
10664pub struct GetUpgradeReadinessRequest {}
10665
10666#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10667#[serde(deny_unknown_fields)]
10668pub struct GetUpgradeReadinessResult {
10669 pub ready: bool,
10670 pub blockers: Vec<String>,
10671 pub observations: Vec<ReadinessObservation>,
10672 pub recovery_era: Identity,
10673 pub observed_at: U64,
10674 pub expires_at: U64,
10675}
10676
10677#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10678#[serde(deny_unknown_fields)]
10679pub struct GetMaintenanceStatusRequest {
10680 pub page_size: u32,
10681 #[serde(default, skip_serializing_if = "Option::is_none")]
10682 pub cursor: Option<Cursor>,
10683 #[serde(default, skip_serializing_if = "Option::is_none")]
10684 pub index: Option<Resource>,
10685}
10686
10687#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10688#[serde(deny_unknown_fields)]
10689pub struct GetMaintenanceStatusResult {
10690 pub aggregate: MaintenanceStatusAggregate,
10691 pub items: Vec<MaintenanceTaskStatus>,
10692 #[serde(default, skip_serializing_if = "Option::is_none")]
10693 pub next_cursor: Option<Cursor>,
10694}
10695
10696#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10697#[serde(deny_unknown_fields)]
10698pub struct WarmVectorIndexRequest {
10699 pub index: Resource,
10700 #[serde(default, skip_serializing_if = "Option::is_none")]
10701 pub expected_root_digest: Option<Digest>,
10702 pub components: Vec<VectorWarmComponent>,
10703 pub maximum_requests: u32,
10704 pub maximum_bytes: U64,
10705 pub maximum_achievements: u32,
10706 pub expires_at: U64,
10707}
10708
10709#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10710#[serde(deny_unknown_fields)]
10711pub struct WarmVectorIndexResult {
10712 pub result: VectorWarmResult,
10713}
10714
10715#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10716#[serde(deny_unknown_fields)]
10717pub struct EvaluateVectorRecallRequest {
10718 pub action_id: Digest,
10719 pub index: Resource,
10720 pub field: String,
10721 pub mapping_generation: U64,
10722 pub snapshot: VectorEvaluationSnapshot,
10723 pub query_set: VectorEvaluationQuerySet,
10724 #[serde(default, skip_serializing_if = "Option::is_none")]
10725 pub filter: Option<Query>,
10726 pub metric: VectorMetric,
10727 pub k: u32,
10728 pub candidate_policy: VectorCandidatePolicy,
10729 pub budget: VectorEvaluationBudget,
10730 pub maximum_bytes: U64,
10731}
10732
10733#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10734#[serde(deny_unknown_fields)]
10735pub struct EvaluateVectorRecallResult {
10736 pub operation: Operation,
10737}
10738
10739#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10740#[serde(deny_unknown_fields)]
10741pub struct CalibrateVectorStrategyRequest {
10742 pub action_id: Digest,
10743 pub index: Resource,
10744 pub field: String,
10745 pub mapping_generation: U64,
10746 pub snapshot: VectorEvaluationSnapshot,
10747 pub query_set: VectorEvaluationQuerySet,
10748 #[serde(default, skip_serializing_if = "Option::is_none")]
10749 pub filter: Option<Query>,
10750 pub metric: VectorMetric,
10751 pub k: u32,
10752 pub objective: VectorCalibrationObjective,
10753 pub minimum_recall_basis_points: u32,
10754 pub budget: VectorEvaluationBudget,
10755 pub maximum_bytes: U64,
10756}
10757
10758#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10759#[serde(deny_unknown_fields)]
10760pub struct CalibrateVectorStrategyResult {
10761 pub operation: Operation,
10762}
10763
10764#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10765#[serde(deny_unknown_fields)]
10766pub struct GetVectorDiagnosticRequest {
10767 pub locator: Locator,
10768}
10769
10770#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10771#[serde(deny_unknown_fields)]
10772pub struct GetVectorDiagnosticResult {
10773 pub operation: Operation,
10774 pub artifacts: Vec<Artifact>,
10775 #[serde(default, skip_serializing_if = "Option::is_none")]
10776 pub result: Option<VectorDiagnosticResult>,
10777}
10778
10779#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10780#[serde(deny_unknown_fields)]
10781pub struct CreateDiagnosticRequest {
10782 pub scope: String,
10783 pub maximum_bytes: U64,
10784}
10785
10786#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10787#[serde(deny_unknown_fields)]
10788pub struct CreateDiagnosticResult {
10789 pub operation: Operation,
10790}
10791
10792#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10793#[serde(deny_unknown_fields)]
10794pub struct GetDiagnosticRequest {
10795 pub locator: Locator,
10796}
10797
10798#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10799#[serde(deny_unknown_fields)]
10800pub struct GetDiagnosticResult {
10801 pub operation: Operation,
10802 pub artifacts: Vec<Artifact>,
10803}
10804
10805#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10806#[serde(deny_unknown_fields)]
10807pub struct PrepareCollectionExportRequest {
10808 pub action_id: Digest,
10809 pub storage: PortabilityStorageCapability,
10810}
10811
10812#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10813#[serde(deny_unknown_fields)]
10814pub struct PrepareCollectionExportResult {
10815 pub semantic_digest: Digest,
10816 pub maximum_bytes: U64,
10817}
10818
10819#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10820#[serde(deny_unknown_fields)]
10821pub struct StartCollectionExportRequest {
10822 pub action_id: Digest,
10823 pub semantic_digest: Digest,
10824 pub storage: PortabilityStorageCapability,
10825}
10826
10827#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10828#[serde(deny_unknown_fields)]
10829pub struct StartCollectionExportResult {
10830 pub operation: Operation,
10831}
10832
10833#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10834#[serde(deny_unknown_fields)]
10835pub struct ResolveCollectionExportRequest {
10836 pub action_id: Digest,
10837 pub semantic_digest: Digest,
10838 pub storage: PortabilityStorageCapability,
10839}
10840
10841#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10842#[serde(deny_unknown_fields)]
10843pub struct ResolveCollectionExportResult {
10844 #[serde(default, skip_serializing_if = "Option::is_none")]
10845 pub operation: Option<Operation>,
10846 #[serde(default, skip_serializing_if = "Option::is_none")]
10847 pub artifact: Option<CollectionExportArtifact>,
10848 pub expired_unknown: bool,
10849}
10850
10851#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10852#[serde(deny_unknown_fields)]
10853pub struct VerifyCollectionExportRequest {
10854 pub artifact: CollectionExportArtifact,
10855 pub storage: PortabilityStorageCapability,
10856}
10857
10858#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10859#[serde(deny_unknown_fields)]
10860pub struct VerifyCollectionExportResult {
10861 pub verified: bool,
10862 pub source_collection_id: Identity,
10863 pub source_catalog_revision: U64,
10864 pub index_count: u32,
10865 pub document_count: U64,
10866}
10867
10868#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10869#[serde(deny_unknown_fields)]
10870pub struct PrepareCollectionExportRetirementRequest {
10871 pub action_id: Digest,
10872 pub artifact: CollectionExportArtifact,
10873 pub storage: PortabilityStorageCapability,
10874}
10875
10876#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10877#[serde(deny_unknown_fields)]
10878pub struct PrepareCollectionExportRetirementResult {
10879 pub semantic_digest: Digest,
10880 pub maximum_bytes: U64,
10881}
10882
10883#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10884#[serde(deny_unknown_fields)]
10885pub struct StartCollectionExportRetirementRequest {
10886 pub action_id: Digest,
10887 pub semantic_digest: Digest,
10888 pub artifact: CollectionExportArtifact,
10889 pub storage: PortabilityStorageCapability,
10890}
10891
10892#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10893#[serde(deny_unknown_fields)]
10894pub struct StartCollectionExportRetirementResult {
10895 pub operation: Operation,
10896}
10897
10898#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10899#[serde(deny_unknown_fields)]
10900pub struct ResolveCollectionExportRetirementRequest {
10901 pub action_id: Digest,
10902 pub semantic_digest: Digest,
10903 pub artifact: CollectionExportArtifact,
10904 pub storage: PortabilityStorageCapability,
10905}
10906
10907#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10908#[serde(deny_unknown_fields)]
10909pub struct ResolveCollectionExportRetirementResult {
10910 #[serde(default, skip_serializing_if = "Option::is_none")]
10911 pub operation: Option<Operation>,
10912 #[serde(default, skip_serializing_if = "Option::is_none")]
10913 pub retirement: Option<CollectionExportRetirement>,
10914 pub expired_unknown: bool,
10915}
10916
10917#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10918#[serde(deny_unknown_fields)]
10919pub struct PrepareCollectionRestoreRequest {
10920 pub action_id: Digest,
10921 pub artifact: CollectionExportArtifact,
10922 pub storage: PortabilityStorageCapability,
10923}
10924
10925#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10926#[serde(deny_unknown_fields)]
10927pub struct PrepareCollectionRestoreResult {
10928 pub semantic_digest: Digest,
10929 pub source_collection_id: Identity,
10930 pub maximum_bytes: U64,
10931}
10932
10933#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10934#[serde(deny_unknown_fields)]
10935pub struct StartCollectionRestoreRequest {
10936 pub action_id: Digest,
10937 pub semantic_digest: Digest,
10938 pub artifact: CollectionExportArtifact,
10939 pub storage: PortabilityStorageCapability,
10940}
10941
10942#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10943#[serde(deny_unknown_fields)]
10944pub struct StartCollectionRestoreResult {
10945 pub operation: Operation,
10946}
10947
10948#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10949#[serde(deny_unknown_fields)]
10950pub struct ResolveCollectionRestoreRequest {
10951 pub action_id: Digest,
10952 pub semantic_digest: Digest,
10953 pub artifact: CollectionExportArtifact,
10954 pub storage: PortabilityStorageCapability,
10955}
10956
10957#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10958#[serde(deny_unknown_fields)]
10959pub struct ResolveCollectionRestoreResult {
10960 #[serde(default, skip_serializing_if = "Option::is_none")]
10961 pub operation: Option<Operation>,
10962 pub expired_unknown: bool,
10963}
10964
10965#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10966#[serde(deny_unknown_fields)]
10967pub struct PrepareCollectionTransferExportRequest {
10968 pub action_id: Digest,
10969 pub expected_security_generation: U64,
10970 pub storage: PortabilityStorageCapability,
10971}
10972
10973#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10974#[serde(deny_unknown_fields)]
10975pub struct PrepareCollectionTransferExportResult {
10976 pub semantic_digest: Digest,
10977 pub maximum_bytes: U64,
10978}
10979
10980#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10981#[serde(deny_unknown_fields)]
10982pub struct StartCollectionTransferExportRequest {
10983 pub action_id: Digest,
10984 pub semantic_digest: Digest,
10985 pub expected_security_generation: U64,
10986 pub storage: PortabilityStorageCapability,
10987}
10988
10989#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10990#[serde(deny_unknown_fields)]
10991pub struct StartCollectionTransferExportResult {
10992 pub operation: Operation,
10993}
10994
10995#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10996#[serde(deny_unknown_fields)]
10997pub struct ResolveCollectionTransferExportRequest {
10998 pub action_id: Digest,
10999 pub semantic_digest: Digest,
11000 pub expected_security_generation: U64,
11001 pub storage: PortabilityStorageCapability,
11002}
11003
11004#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11005#[serde(deny_unknown_fields)]
11006pub struct ResolveCollectionTransferExportResult {
11007 #[serde(default, skip_serializing_if = "Option::is_none")]
11008 pub operation: Option<Operation>,
11009 #[serde(default, skip_serializing_if = "Option::is_none")]
11010 pub artifact: Option<CollectionTransferArtifact>,
11011 pub expired_unknown: bool,
11012}
11013
11014#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11015#[serde(deny_unknown_fields)]
11016pub struct PrepareCollectionTransferRestoreRequest {
11017 pub action_id: Digest,
11018 pub artifact: CollectionTransferArtifact,
11019 pub storage: PortabilityStorageCapability,
11020}
11021
11022#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11023#[serde(deny_unknown_fields)]
11024pub struct PrepareCollectionTransferRestoreResult {
11025 pub semantic_digest: Digest,
11026 pub source_collection_id: Identity,
11027 pub final_content_digest: Digest,
11028 pub maximum_bytes: U64,
11029}
11030
11031#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11032#[serde(deny_unknown_fields)]
11033pub struct StartCollectionTransferRestoreRequest {
11034 pub action_id: Digest,
11035 pub semantic_digest: Digest,
11036 pub artifact: CollectionTransferArtifact,
11037 pub storage: PortabilityStorageCapability,
11038}
11039
11040#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11041#[serde(deny_unknown_fields)]
11042pub struct StartCollectionTransferRestoreResult {
11043 pub operation: Operation,
11044}
11045
11046#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11047#[serde(deny_unknown_fields)]
11048pub struct ResolveCollectionTransferRestoreRequest {
11049 pub action_id: Digest,
11050 pub semantic_digest: Digest,
11051 pub artifact: CollectionTransferArtifact,
11052 pub storage: PortabilityStorageCapability,
11053}
11054
11055#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11056#[serde(deny_unknown_fields)]
11057pub struct ResolveCollectionTransferRestoreResult {
11058 #[serde(default, skip_serializing_if = "Option::is_none")]
11059 pub operation: Option<Operation>,
11060 #[serde(default, skip_serializing_if = "Option::is_none")]
11061 pub verified_content_digest: Option<Digest>,
11062 pub expired_unknown: bool,
11063}
11064
11065#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11066#[serde(deny_unknown_fields)]
11067pub struct PrepareCollectionStandbyAdmissionRequest {
11068 pub action_id: Digest,
11069 pub standby_id: Digest,
11070 pub restore_action_id: Digest,
11071 pub restore_semantic_digest: Digest,
11072 pub artifact: CollectionTransferArtifact,
11073 pub storage: PortabilityStorageCapability,
11074 pub expected_standby_catalog_revision: U64,
11075 pub expected_standby_security_generation: U64,
11076}
11077
11078#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11079#[serde(deny_unknown_fields)]
11080pub struct PrepareCollectionStandbyAdmissionResult {
11081 pub semantic_digest: Digest,
11082 pub binding_digest: Digest,
11083 pub source_durability_digest: Digest,
11084 pub standby_durability_digest: Digest,
11085}
11086
11087#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11088#[serde(deny_unknown_fields)]
11089pub struct StartCollectionStandbyAdmissionRequest {
11090 pub action_id: Digest,
11091 pub semantic_digest: Digest,
11092 pub standby_id: Digest,
11093 pub restore_action_id: Digest,
11094 pub restore_semantic_digest: Digest,
11095 pub artifact: CollectionTransferArtifact,
11096 pub storage: PortabilityStorageCapability,
11097 pub expected_standby_catalog_revision: U64,
11098 pub expected_standby_security_generation: U64,
11099}
11100
11101#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11102#[serde(deny_unknown_fields)]
11103pub struct StartCollectionStandbyAdmissionResult {
11104 pub operation: Operation,
11105}
11106
11107#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11108#[serde(deny_unknown_fields)]
11109pub struct ResolveCollectionStandbyAdmissionRequest {
11110 pub action_id: Digest,
11111 pub semantic_digest: Digest,
11112 pub standby_id: Digest,
11113 pub restore_action_id: Digest,
11114 pub restore_semantic_digest: Digest,
11115 pub artifact: CollectionTransferArtifact,
11116 pub storage: PortabilityStorageCapability,
11117 pub expected_standby_catalog_revision: U64,
11118 pub expected_standby_security_generation: U64,
11119}
11120
11121#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11122#[serde(deny_unknown_fields)]
11123pub struct ResolveCollectionStandbyAdmissionResult {
11124 #[serde(default, skip_serializing_if = "Option::is_none")]
11125 pub operation: Option<Operation>,
11126 #[serde(default, skip_serializing_if = "Option::is_none")]
11127 pub standby: Option<CollectionStandby>,
11128 pub expired_unknown: bool,
11129}
11130
11131#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11132#[serde(deny_unknown_fields)]
11133pub struct PrepareCollectionStandbyActivationRequest {
11134 pub action_id: Digest,
11135 pub standby_id: Digest,
11136 pub binding_digest: Digest,
11137 pub expected_activation_generation: U64,
11138 pub expected_standby_catalog_revision: U64,
11139 pub expected_standby_security_generation: U64,
11140 pub expected_standby_content_digest: Digest,
11141 pub expected_standby_durability_digest: Digest,
11142}
11143
11144#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11145#[serde(deny_unknown_fields)]
11146pub struct PrepareCollectionStandbyActivationResult {
11147 pub semantic_digest: Digest,
11148 pub activation_generation: U64,
11149 pub activation_fence: Digest,
11150}
11151
11152#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11153#[serde(deny_unknown_fields)]
11154pub struct StartCollectionStandbyActivationRequest {
11155 pub action_id: Digest,
11156 pub semantic_digest: Digest,
11157 pub standby_id: Digest,
11158 pub binding_digest: Digest,
11159 pub expected_activation_generation: U64,
11160 pub expected_standby_catalog_revision: U64,
11161 pub expected_standby_security_generation: U64,
11162 pub expected_standby_content_digest: Digest,
11163 pub expected_standby_durability_digest: Digest,
11164}
11165
11166#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11167#[serde(deny_unknown_fields)]
11168pub struct StartCollectionStandbyActivationResult {
11169 pub operation: Operation,
11170}
11171
11172#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11173#[serde(deny_unknown_fields)]
11174pub struct ResolveCollectionStandbyActivationRequest {
11175 pub action_id: Digest,
11176 pub semantic_digest: Digest,
11177 pub standby_id: Digest,
11178 pub binding_digest: Digest,
11179 pub expected_activation_generation: U64,
11180 pub expected_standby_catalog_revision: U64,
11181 pub expected_standby_security_generation: U64,
11182 pub expected_standby_content_digest: Digest,
11183 pub expected_standby_durability_digest: Digest,
11184}
11185
11186#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11187#[serde(deny_unknown_fields)]
11188pub struct ResolveCollectionStandbyActivationResult {
11189 #[serde(default, skip_serializing_if = "Option::is_none")]
11190 pub operation: Option<Operation>,
11191 #[serde(default, skip_serializing_if = "Option::is_none")]
11192 pub standby: Option<CollectionStandby>,
11193 pub expired_unknown: bool,
11194}
11195
11196#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11197#[serde(deny_unknown_fields)]
11198pub struct PrepareIndexExportRequest {
11199 pub action_id: Digest,
11200 pub index: Resource,
11201 pub storage: PortabilityStorageCapability,
11202 pub maximum_records: u32,
11203 pub maximum_pages: u32,
11204 pub maximum_page_bytes: U64,
11205}
11206
11207#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11208#[serde(deny_unknown_fields)]
11209pub struct PrepareIndexExportResult {
11210 pub semantic_digest: Digest,
11211 pub maximum_bytes: U64,
11212}
11213
11214#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11215#[serde(deny_unknown_fields)]
11216pub struct StartIndexExportRequest {
11217 pub action_id: Digest,
11218 pub semantic_digest: Digest,
11219 pub index: Resource,
11220 pub storage: PortabilityStorageCapability,
11221 pub maximum_records: u32,
11222 pub maximum_pages: u32,
11223 pub maximum_page_bytes: U64,
11224}
11225
11226#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11227#[serde(deny_unknown_fields)]
11228pub struct StartIndexExportResult {
11229 pub operation: Operation,
11230}
11231
11232#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11233#[serde(deny_unknown_fields)]
11234pub struct ResolveIndexExportRequest {
11235 pub action_id: Digest,
11236 pub semantic_digest: Digest,
11237 pub index: Resource,
11238 pub storage: PortabilityStorageCapability,
11239 pub maximum_records: u32,
11240 pub maximum_pages: u32,
11241 pub maximum_page_bytes: U64,
11242}
11243
11244#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11245#[serde(deny_unknown_fields)]
11246pub struct ResolveIndexExportResult {
11247 #[serde(default, skip_serializing_if = "Option::is_none")]
11248 pub operation: Option<Operation>,
11249 #[serde(default, skip_serializing_if = "Option::is_none")]
11250 pub artifact: Option<IndexTransferArtifact>,
11251 pub expired_unknown: bool,
11252}
11253
11254#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11255#[serde(deny_unknown_fields)]
11256pub struct VerifyIndexExportRequest {
11257 pub artifact: IndexTransferArtifact,
11258 pub storage: PortabilityStorageCapability,
11259}
11260
11261#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11262#[serde(deny_unknown_fields)]
11263pub struct VerifyIndexExportResult {
11264 pub verified: bool,
11265 pub source_cluster_storage_id: Identity,
11266 pub source_collection_id: Identity,
11267 pub source_index: Resource,
11268 pub source_catalog_revision: U64,
11269 pub source_cut_digest: Digest,
11270 pub page_count: u32,
11271 pub record_count: u32,
11272}
11273
11274#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11275#[serde(deny_unknown_fields)]
11276pub struct PrepareIndexImportRequest {
11277 pub action_id: Digest,
11278 pub artifact: IndexTransferArtifact,
11279 pub storage: PortabilityStorageCapability,
11280 pub destination_name: String,
11281 pub expected_name_absent: bool,
11282 pub destination_policies: IndexPolicies,
11283 pub destination_resource_spec: IndexResourceSpec,
11284}
11285
11286#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11287#[serde(deny_unknown_fields)]
11288pub struct PrepareIndexImportResult {
11289 pub semantic_digest: Digest,
11290 pub source_cluster_storage_id: Identity,
11291 pub source_collection_id: Identity,
11292 pub source_index: Resource,
11293 pub maximum_bytes: U64,
11294}
11295
11296#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11297#[serde(deny_unknown_fields)]
11298pub struct StartIndexImportRequest {
11299 pub action_id: Digest,
11300 pub semantic_digest: Digest,
11301 pub artifact: IndexTransferArtifact,
11302 pub storage: PortabilityStorageCapability,
11303 pub destination_name: String,
11304 pub expected_name_absent: bool,
11305 pub destination_policies: IndexPolicies,
11306 pub destination_resource_spec: IndexResourceSpec,
11307}
11308
11309#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11310#[serde(deny_unknown_fields)]
11311pub struct StartIndexImportResult {
11312 pub operation: Operation,
11313}
11314
11315#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11316#[serde(deny_unknown_fields)]
11317pub struct ResolveIndexImportRequest {
11318 pub action_id: Digest,
11319 pub semantic_digest: Digest,
11320 pub artifact: IndexTransferArtifact,
11321 pub storage: PortabilityStorageCapability,
11322 pub destination_name: String,
11323 pub expected_name_absent: bool,
11324 pub destination_policies: IndexPolicies,
11325 pub destination_resource_spec: IndexResourceSpec,
11326}
11327
11328#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11329#[serde(deny_unknown_fields)]
11330pub struct ResolveIndexImportResult {
11331 #[serde(default, skip_serializing_if = "Option::is_none")]
11332 pub operation: Option<Operation>,
11333 #[serde(default, skip_serializing_if = "Option::is_none")]
11334 pub destination: Option<Resource>,
11335 pub expired_unknown: bool,
11336}
11337
11338#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11339#[serde(deny_unknown_fields)]
11340pub struct ReadArtifactChunkRequest {
11341 pub artifact: Artifact,
11342 pub offset: U64,
11343 pub length: u32,
11344}
11345
11346#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11347#[serde(deny_unknown_fields)]
11348pub struct ReadArtifactChunkResult {
11349 pub offset: U64,
11350 pub bytes_base64: String,
11351 pub chunk_sha256: String,
11352 pub artifact_sha256: String,
11353 pub complete: bool,
11354}
11355
11356#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11357#[serde(deny_unknown_fields)]
11358pub struct ExportUsageRequest {
11359 pub window_start: U64,
11360 pub window_end: U64,
11361 pub page_size: u32,
11362 #[serde(default, skip_serializing_if = "Option::is_none")]
11363 pub cursor: Option<Cursor>,
11364}
11365
11366#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11367#[serde(deny_unknown_fields)]
11368pub struct ExportUsageResult {
11369 pub units: Vec<CoreUsageUnits>,
11370 pub corrections: Vec<CoreUsageCorrection>,
11371 #[serde(default, skip_serializing_if = "Option::is_none")]
11372 pub next_cursor: Option<Cursor>,
11373 pub cumulative_through: U64,
11374}
11375
11376#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11377#[serde(deny_unknown_fields)]
11378pub struct GetStorageUsageRequest {}
11379
11380#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11381#[serde(deny_unknown_fields)]
11382pub struct GetStorageUsageResult {
11383 pub usage: CollectionStorageUsage,
11384}
11385
11386#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11387#[serde(deny_unknown_fields)]
11388pub struct ReadLogicalOccupancyRequest {
11389 pub index: Resource,
11390 #[serde(default, skip_serializing_if = "Option::is_none")]
11391 pub pit: Option<Cursor>,
11392 #[serde(default, skip_serializing_if = "Option::is_none")]
11393 pub window_start: Option<U64>,
11394 #[serde(default, skip_serializing_if = "Option::is_none")]
11395 pub window_end: Option<U64>,
11396 pub page_size: u32,
11397 #[serde(default, skip_serializing_if = "Option::is_none")]
11398 pub cursor: Option<Cursor>,
11399}
11400
11401#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11402#[serde(deny_unknown_fields)]
11403pub struct ReadLogicalOccupancyResult {
11404 #[serde(default, skip_serializing_if = "Option::is_none")]
11405 pub evidence: Option<LogicalOccupancySnapshotEvidence>,
11406 #[serde(default, skip_serializing_if = "Option::is_none")]
11407 pub window_gap: Option<LogicalOccupancyWindowGap>,
11408 #[serde(default, skip_serializing_if = "Option::is_none")]
11409 pub next_cursor: Option<Cursor>,
11410}
11411
11412#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11413#[serde(deny_unknown_fields)]
11414pub struct ExecuteStateReadRequest {
11415 pub index: Resource,
11416 pub operation: StateOperation,
11417}
11418
11419#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11420#[serde(deny_unknown_fields)]
11421pub struct ExecuteStateReadResult {
11422 pub result: StateCommandResult,
11423}
11424
11425#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11426#[serde(deny_unknown_fields)]
11427pub struct PrepareStateWriteRequest {
11428 pub index: Resource,
11429 pub action_id: Digest,
11430 pub operation: StateOperation,
11431}
11432
11433#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11434#[serde(deny_unknown_fields)]
11435pub struct PrepareStateWriteResult {
11436 pub locator: Locator,
11437 pub semantic_digest: Digest,
11438 pub retention_max_entries: U64,
11439 pub retention_sequence_window: U64,
11440}
11441
11442#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11443#[serde(deny_unknown_fields)]
11444pub struct SubmitStateWriteRequest {
11445 pub index: Resource,
11446 pub action_id: Digest,
11447 pub operation: StateOperation,
11448 pub locator: Locator,
11449 pub semantic_digest: Digest,
11450}
11451
11452#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11453#[serde(deny_unknown_fields)]
11454pub struct SubmitStateWriteResult {
11455 #[serde(default, skip_serializing_if = "Option::is_none")]
11456 pub result: Option<StateCommandResult>,
11457 #[serde(default, skip_serializing_if = "Option::is_none")]
11458 pub resolution: Option<StateWriteResolution>,
11459 pub mutation_outcome: MutationOutcome,
11460 #[serde(default, skip_serializing_if = "Option::is_none")]
11461 pub achievement: Option<WriteAchievement>,
11462}
11463
11464#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11465#[serde(deny_unknown_fields)]
11466pub struct ResolveStateWriteRequest {
11467 pub index: Resource,
11468 pub action_id: Digest,
11469 pub operation: StateOperation,
11470 pub locator: Locator,
11471 pub semantic_digest: Digest,
11472}
11473
11474#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11475#[serde(deny_unknown_fields)]
11476pub struct ResolveStateWriteResult {
11477 pub resolution: StateWriteResolution,
11478}
11479
11480#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11481#[serde(tag = "command", content = "body", rename_all = "snake_case")]
11482pub enum RequestBody {
11483 Discover(DiscoverRequest),
11484 ListIndexes(ListIndexesRequest),
11485 GetIndex(GetIndexRequest),
11486 ValidateIndexChange(ValidateIndexChangeRequest),
11487 ApplyIndexChange(ApplyIndexChangeRequest),
11488 ResolveIndexChange(ResolveIndexChangeRequest),
11489 ApplyAdministrationMutation(ApplyAdministrationMutationRequest),
11490 ListAliases(ListAliasesRequest),
11491 GetAlias(GetAliasRequest),
11492 ListDataStreams(ListDataStreamsRequest),
11493 GetDataStream(GetDataStreamRequest),
11494 ListComponentTemplates(ListComponentTemplatesRequest),
11495 GetComponentTemplate(GetComponentTemplateRequest),
11496 ListIndexTemplates(ListIndexTemplatesRequest),
11497 GetIndexTemplate(GetIndexTemplateRequest),
11498 ListIngestPipelines(ListIngestPipelinesRequest),
11499 GetIngestPipeline(GetIngestPipelineRequest),
11500 SimulateIngestPipeline(SimulateIngestPipelineRequest),
11501 ReprocessByQuery(ReprocessByQueryRequest),
11502 ListLifecyclePolicies(ListLifecyclePoliciesRequest),
11503 GetLifecyclePolicy(GetLifecyclePolicyRequest),
11504 PrepareCreateIndex(PrepareCreateIndexRequest),
11505 PrepareDeleteIndex(PrepareDeleteIndexRequest),
11506 SubmitCatalogAction(SubmitCatalogActionRequest),
11507 ResolveCatalogAction(ResolveCatalogActionRequest),
11508 PrepareReplayableSourceIndex(PrepareReplayableSourceIndexRequest),
11509 SubmitReplayableSourceIndex(SubmitReplayableSourceIndexRequest),
11510 GetReplayableSource(GetReplayableSourceRequest),
11511 ControlReplayableSource(ControlReplayableSourceRequest),
11512 CloneIndex(CloneIndexRequest),
11513 ConfigureHistory(ConfigureHistoryRequest),
11514 GetHistory(GetHistoryRequest),
11515 ResolveHistory(ResolveHistoryRequest),
11516 PlaceHistoryHold(PlaceHistoryHoldRequest),
11517 ReleaseHistoryHold(ReleaseHistoryHoldRequest),
11518 PrepareDocumentMutation(PrepareDocumentMutationRequest),
11519 SubmitDocumentMutation(SubmitDocumentMutationRequest),
11520 PrepareDocumentBulk(PrepareDocumentBulkRequest),
11521 SubmitDocumentBulk(SubmitDocumentBulkRequest),
11522 ResolveDocumentBulk(ResolveDocumentBulkRequest),
11523 PrepareAppendBulk(PrepareAppendBulkRequest),
11524 SubmitAppendBulk(SubmitAppendBulkRequest),
11525 ResolveAppendBulk(ResolveAppendBulkRequest),
11526 ObserveAppendCommitted(ObserveAppendCommittedRequest),
11527 ResolveDocumentMutation(ResolveDocumentMutationRequest),
11528 GetDocument(GetDocumentRequest),
11529 Search(SearchRequest),
11530 TraverseRelationships(TraverseRelationshipsRequest),
11531 QueryProfiles(QueryProfilesRequest),
11532 EvaluateTemporalEvidence(EvaluateTemporalEvidenceRequest),
11533 CreateContinuousTemporalEvaluation(CreateContinuousTemporalEvaluationRequest),
11534 GetContinuousTemporalEvaluation(GetContinuousTemporalEvaluationRequest),
11535 PauseContinuousTemporalEvaluation(PauseContinuousTemporalEvaluationRequest),
11536 ResumeContinuousTemporalEvaluation(ResumeContinuousTemporalEvaluationRequest),
11537 ReplaceContinuousTemporalEvaluation(ReplaceContinuousTemporalEvaluationRequest),
11538 RetireContinuousTemporalEvaluation(RetireContinuousTemporalEvaluationRequest),
11539 ReadContinuousTemporalEvidence(ReadContinuousTemporalEvidenceRequest),
11540 ValidateSearch(ValidateSearchRequest),
11541 MaterializeTableSnapshot(MaterializeTableSnapshotRequest),
11542 ResolveTableSnapshot(ResolveTableSnapshotRequest),
11543 ReadTableSnapshot(ReadTableSnapshotRequest),
11544 OpenPit(OpenPitRequest),
11545 RenewPit(RenewPitRequest),
11546 ClosePit(ClosePitRequest),
11547 ListOperations(ListOperationsRequest),
11548 GetOperation(GetOperationRequest),
11549 WaitOperation(WaitOperationRequest),
11550 CancelOperation(CancelOperationRequest),
11551 ListAuditEvents(ListAuditEventsRequest),
11552 ExportAuditEvents(ExportAuditEventsRequest),
11553 ReserveServiceCredential(ReserveServiceCredentialRequest),
11554 ReserveServiceCredentialRotation(ReserveServiceCredentialRotationRequest),
11555 ActivateServiceCredential(ActivateServiceCredentialRequest),
11556 ResolveServiceCredentialReservation(ResolveServiceCredentialReservationRequest),
11557 PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialRequest),
11558 RevokeServiceCredential(RevokeServiceCredentialRequest),
11559 ResolveSecurityAction(ResolveSecurityActionRequest),
11560 GetSecurityRole(GetSecurityRoleRequest),
11561 PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeRequest),
11562 SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeRequest),
11563 PrepareSourceAuthorizationProjection(PrepareSourceAuthorizationProjectionRequest),
11564 SubmitSourceAuthorizationProjection(SubmitSourceAuthorizationProjectionRequest),
11565 ResolveSourceAuthorizationProjection(ResolveSourceAuthorizationProjectionRequest),
11566 ListServiceCredentials(ListServiceCredentialsRequest),
11567 GetRuntimeStatus(GetRuntimeStatusRequest),
11568 GetResultCacheStatus(GetResultCacheStatusRequest),
11569 GetFieldPromotionStatus(GetFieldPromotionStatusRequest),
11570 GetOverloadStatus(GetOverloadStatusRequest),
11571 ConfigureExternalKey(ConfigureExternalKeyRequest),
11572 RotateExternalKeyBinding(RotateExternalKeyBindingRequest),
11573 RetireExternalKeyBinding(RetireExternalKeyBindingRequest),
11574 ResolveExternalKeyBindingRetirement(ResolveExternalKeyBindingRetirementRequest),
11575 ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteRequest),
11576 GetLifecycleStatus(GetLifecycleStatusRequest),
11577 EraseRecord(EraseRecordRequest),
11578 ResolveRecordErasure(ResolveRecordErasureRequest),
11579 GetRecordErasure(GetRecordErasureRequest),
11580 GetQuota(GetQuotaRequest),
11581 UpdateQuota(UpdateQuotaRequest),
11582 GetBinding(GetBindingRequest),
11583 GetAdmissionStatus(GetAdmissionStatusRequest),
11584 SetAdmission(SetAdmissionRequest),
11585 GetQuiesceStatus(GetQuiesceStatusRequest),
11586 GetDecommissionReadiness(GetDecommissionReadinessRequest),
11587 GetUpgradeReadiness(GetUpgradeReadinessRequest),
11588 GetMaintenanceStatus(GetMaintenanceStatusRequest),
11589 WarmVectorIndex(WarmVectorIndexRequest),
11590 EvaluateVectorRecall(EvaluateVectorRecallRequest),
11591 CalibrateVectorStrategy(CalibrateVectorStrategyRequest),
11592 GetVectorDiagnostic(GetVectorDiagnosticRequest),
11593 CreateDiagnostic(CreateDiagnosticRequest),
11594 GetDiagnostic(GetDiagnosticRequest),
11595 PrepareCollectionExport(PrepareCollectionExportRequest),
11596 StartCollectionExport(StartCollectionExportRequest),
11597 ResolveCollectionExport(ResolveCollectionExportRequest),
11598 VerifyCollectionExport(VerifyCollectionExportRequest),
11599 PrepareCollectionExportRetirement(PrepareCollectionExportRetirementRequest),
11600 StartCollectionExportRetirement(StartCollectionExportRetirementRequest),
11601 ResolveCollectionExportRetirement(ResolveCollectionExportRetirementRequest),
11602 PrepareCollectionRestore(PrepareCollectionRestoreRequest),
11603 StartCollectionRestore(StartCollectionRestoreRequest),
11604 ResolveCollectionRestore(ResolveCollectionRestoreRequest),
11605 PrepareCollectionTransferExport(PrepareCollectionTransferExportRequest),
11606 StartCollectionTransferExport(StartCollectionTransferExportRequest),
11607 ResolveCollectionTransferExport(ResolveCollectionTransferExportRequest),
11608 PrepareCollectionTransferRestore(PrepareCollectionTransferRestoreRequest),
11609 StartCollectionTransferRestore(StartCollectionTransferRestoreRequest),
11610 ResolveCollectionTransferRestore(ResolveCollectionTransferRestoreRequest),
11611 PrepareCollectionStandbyAdmission(PrepareCollectionStandbyAdmissionRequest),
11612 StartCollectionStandbyAdmission(StartCollectionStandbyAdmissionRequest),
11613 ResolveCollectionStandbyAdmission(ResolveCollectionStandbyAdmissionRequest),
11614 PrepareCollectionStandbyActivation(PrepareCollectionStandbyActivationRequest),
11615 StartCollectionStandbyActivation(StartCollectionStandbyActivationRequest),
11616 ResolveCollectionStandbyActivation(ResolveCollectionStandbyActivationRequest),
11617 PrepareIndexExport(PrepareIndexExportRequest),
11618 StartIndexExport(StartIndexExportRequest),
11619 ResolveIndexExport(ResolveIndexExportRequest),
11620 VerifyIndexExport(VerifyIndexExportRequest),
11621 PrepareIndexImport(PrepareIndexImportRequest),
11622 StartIndexImport(StartIndexImportRequest),
11623 ResolveIndexImport(ResolveIndexImportRequest),
11624 ReadArtifactChunk(ReadArtifactChunkRequest),
11625 ExportUsage(ExportUsageRequest),
11626 GetStorageUsage(GetStorageUsageRequest),
11627 ReadLogicalOccupancy(ReadLogicalOccupancyRequest),
11628 ExecuteStateRead(ExecuteStateReadRequest),
11629 PrepareStateWrite(PrepareStateWriteRequest),
11630 SubmitStateWrite(SubmitStateWriteRequest),
11631 ResolveStateWrite(ResolveStateWriteRequest),
11632}
11633
11634#[allow(clippy::large_enum_variant)]
11637#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11638#[serde(tag = "command", content = "body", rename_all = "snake_case")]
11639pub enum ResultBody {
11640 Discover(DiscoverResult),
11641 ListIndexes(ListIndexesResult),
11642 GetIndex(GetIndexResult),
11643 ValidateIndexChange(ValidateIndexChangeResult),
11644 ApplyIndexChange(ApplyIndexChangeResult),
11645 ResolveIndexChange(ResolveIndexChangeResult),
11646 ApplyAdministrationMutation(ApplyAdministrationMutationResult),
11647 ListAliases(ListAliasesResult),
11648 GetAlias(GetAliasResult),
11649 ListDataStreams(ListDataStreamsResult),
11650 GetDataStream(GetDataStreamResult),
11651 ListComponentTemplates(ListComponentTemplatesResult),
11652 GetComponentTemplate(GetComponentTemplateResult),
11653 ListIndexTemplates(ListIndexTemplatesResult),
11654 GetIndexTemplate(GetIndexTemplateResult),
11655 ListIngestPipelines(ListIngestPipelinesResult),
11656 GetIngestPipeline(GetIngestPipelineResult),
11657 SimulateIngestPipeline(SimulateIngestPipelineResult),
11658 ReprocessByQuery(ReprocessByQueryResult),
11659 ListLifecyclePolicies(ListLifecyclePoliciesResult),
11660 GetLifecyclePolicy(GetLifecyclePolicyResult),
11661 PrepareCreateIndex(PrepareCreateIndexResult),
11662 PrepareDeleteIndex(PrepareDeleteIndexResult),
11663 SubmitCatalogAction(SubmitCatalogActionResult),
11664 ResolveCatalogAction(ResolveCatalogActionResult),
11665 PrepareReplayableSourceIndex(PrepareReplayableSourceIndexResult),
11666 SubmitReplayableSourceIndex(SubmitReplayableSourceIndexResult),
11667 GetReplayableSource(GetReplayableSourceResult),
11668 ControlReplayableSource(ControlReplayableSourceResult),
11669 CloneIndex(CloneIndexResult),
11670 ConfigureHistory(ConfigureHistoryResult),
11671 GetHistory(GetHistoryResult),
11672 ResolveHistory(ResolveHistoryResult),
11673 PlaceHistoryHold(PlaceHistoryHoldResult),
11674 ReleaseHistoryHold(ReleaseHistoryHoldResult),
11675 PrepareDocumentMutation(PrepareDocumentMutationResult),
11676 SubmitDocumentMutation(SubmitDocumentMutationResult),
11677 PrepareDocumentBulk(PrepareDocumentBulkResult),
11678 SubmitDocumentBulk(SubmitDocumentBulkResult),
11679 ResolveDocumentBulk(ResolveDocumentBulkResult),
11680 PrepareAppendBulk(PrepareAppendBulkResult),
11681 SubmitAppendBulk(SubmitAppendBulkResult),
11682 ResolveAppendBulk(ResolveAppendBulkResult),
11683 ObserveAppendCommitted(ObserveAppendCommittedResult),
11684 ResolveDocumentMutation(ResolveDocumentMutationResult),
11685 GetDocument(GetDocumentResult),
11686 Search(SearchResult),
11687 TraverseRelationships(TraverseRelationshipsResult),
11688 QueryProfiles(QueryProfilesResult),
11689 EvaluateTemporalEvidence(EvaluateTemporalEvidenceResult),
11690 CreateContinuousTemporalEvaluation(CreateContinuousTemporalEvaluationResult),
11691 GetContinuousTemporalEvaluation(GetContinuousTemporalEvaluationResult),
11692 PauseContinuousTemporalEvaluation(PauseContinuousTemporalEvaluationResult),
11693 ResumeContinuousTemporalEvaluation(ResumeContinuousTemporalEvaluationResult),
11694 ReplaceContinuousTemporalEvaluation(ReplaceContinuousTemporalEvaluationResult),
11695 RetireContinuousTemporalEvaluation(RetireContinuousTemporalEvaluationResult),
11696 ReadContinuousTemporalEvidence(ReadContinuousTemporalEvidenceResult),
11697 ValidateSearch(ValidateSearchResult),
11698 MaterializeTableSnapshot(MaterializeTableSnapshotResult),
11699 ResolveTableSnapshot(ResolveTableSnapshotResult),
11700 ReadTableSnapshot(ReadTableSnapshotResult),
11701 OpenPit(OpenPitResult),
11702 RenewPit(RenewPitResult),
11703 ClosePit(ClosePitResult),
11704 ListOperations(ListOperationsResult),
11705 GetOperation(GetOperationResult),
11706 WaitOperation(WaitOperationResult),
11707 CancelOperation(CancelOperationResult),
11708 ListAuditEvents(ListAuditEventsResult),
11709 ExportAuditEvents(ExportAuditEventsResult),
11710 ReserveServiceCredential(ReserveServiceCredentialResult),
11711 ReserveServiceCredentialRotation(ReserveServiceCredentialRotationResult),
11712 ActivateServiceCredential(ActivateServiceCredentialResult),
11713 ResolveServiceCredentialReservation(ResolveServiceCredentialReservationResult),
11714 PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialResult),
11715 RevokeServiceCredential(RevokeServiceCredentialResult),
11716 ResolveSecurityAction(ResolveSecurityActionResult),
11717 GetSecurityRole(GetSecurityRoleResult),
11718 PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeResult),
11719 SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeResult),
11720 PrepareSourceAuthorizationProjection(PrepareSourceAuthorizationProjectionResult),
11721 SubmitSourceAuthorizationProjection(SubmitSourceAuthorizationProjectionResult),
11722 ResolveSourceAuthorizationProjection(ResolveSourceAuthorizationProjectionResult),
11723 ListServiceCredentials(ListServiceCredentialsResult),
11724 GetRuntimeStatus(GetRuntimeStatusResult),
11725 GetResultCacheStatus(GetResultCacheStatusResult),
11726 GetFieldPromotionStatus(GetFieldPromotionStatusResult),
11727 GetOverloadStatus(GetOverloadStatusResult),
11728 ConfigureExternalKey(ConfigureExternalKeyResult),
11729 RotateExternalKeyBinding(RotateExternalKeyBindingResult),
11730 RetireExternalKeyBinding(RetireExternalKeyBindingResult),
11731 ResolveExternalKeyBindingRetirement(ResolveExternalKeyBindingRetirementResult),
11732 ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteResult),
11733 GetLifecycleStatus(GetLifecycleStatusResult),
11734 EraseRecord(EraseRecordResult),
11735 ResolveRecordErasure(ResolveRecordErasureResult),
11736 GetRecordErasure(GetRecordErasureResult),
11737 GetQuota(GetQuotaResult),
11738 UpdateQuota(UpdateQuotaResult),
11739 GetBinding(GetBindingResult),
11740 GetAdmissionStatus(GetAdmissionStatusResult),
11741 SetAdmission(SetAdmissionResult),
11742 GetQuiesceStatus(GetQuiesceStatusResult),
11743 GetDecommissionReadiness(GetDecommissionReadinessResult),
11744 GetUpgradeReadiness(GetUpgradeReadinessResult),
11745 GetMaintenanceStatus(GetMaintenanceStatusResult),
11746 WarmVectorIndex(WarmVectorIndexResult),
11747 EvaluateVectorRecall(EvaluateVectorRecallResult),
11748 CalibrateVectorStrategy(CalibrateVectorStrategyResult),
11749 GetVectorDiagnostic(GetVectorDiagnosticResult),
11750 CreateDiagnostic(CreateDiagnosticResult),
11751 GetDiagnostic(GetDiagnosticResult),
11752 PrepareCollectionExport(PrepareCollectionExportResult),
11753 StartCollectionExport(StartCollectionExportResult),
11754 ResolveCollectionExport(ResolveCollectionExportResult),
11755 VerifyCollectionExport(VerifyCollectionExportResult),
11756 PrepareCollectionExportRetirement(PrepareCollectionExportRetirementResult),
11757 StartCollectionExportRetirement(StartCollectionExportRetirementResult),
11758 ResolveCollectionExportRetirement(ResolveCollectionExportRetirementResult),
11759 PrepareCollectionRestore(PrepareCollectionRestoreResult),
11760 StartCollectionRestore(StartCollectionRestoreResult),
11761 ResolveCollectionRestore(ResolveCollectionRestoreResult),
11762 PrepareCollectionTransferExport(PrepareCollectionTransferExportResult),
11763 StartCollectionTransferExport(StartCollectionTransferExportResult),
11764 ResolveCollectionTransferExport(ResolveCollectionTransferExportResult),
11765 PrepareCollectionTransferRestore(PrepareCollectionTransferRestoreResult),
11766 StartCollectionTransferRestore(StartCollectionTransferRestoreResult),
11767 ResolveCollectionTransferRestore(ResolveCollectionTransferRestoreResult),
11768 PrepareCollectionStandbyAdmission(PrepareCollectionStandbyAdmissionResult),
11769 StartCollectionStandbyAdmission(StartCollectionStandbyAdmissionResult),
11770 ResolveCollectionStandbyAdmission(ResolveCollectionStandbyAdmissionResult),
11771 PrepareCollectionStandbyActivation(PrepareCollectionStandbyActivationResult),
11772 StartCollectionStandbyActivation(StartCollectionStandbyActivationResult),
11773 ResolveCollectionStandbyActivation(ResolveCollectionStandbyActivationResult),
11774 PrepareIndexExport(PrepareIndexExportResult),
11775 StartIndexExport(StartIndexExportResult),
11776 ResolveIndexExport(ResolveIndexExportResult),
11777 VerifyIndexExport(VerifyIndexExportResult),
11778 PrepareIndexImport(PrepareIndexImportResult),
11779 StartIndexImport(StartIndexImportResult),
11780 ResolveIndexImport(ResolveIndexImportResult),
11781 ReadArtifactChunk(ReadArtifactChunkResult),
11782 ExportUsage(ExportUsageResult),
11783 GetStorageUsage(GetStorageUsageResult),
11784 ReadLogicalOccupancy(ReadLogicalOccupancyResult),
11785 ExecuteStateRead(ExecuteStateReadResult),
11786 PrepareStateWrite(PrepareStateWriteResult),
11787 SubmitStateWrite(SubmitStateWriteResult),
11788 ResolveStateWrite(ResolveStateWriteResult),
11789}
11790
11791pub const fn command_for_request(value: &RequestBody) -> Command {
11792 match value {
11793 RequestBody::Discover(_) => Command::Discover,
11794 RequestBody::ListIndexes(_) => Command::ListIndexes,
11795 RequestBody::GetIndex(_) => Command::GetIndex,
11796 RequestBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
11797 RequestBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
11798 RequestBody::ResolveIndexChange(_) => Command::ResolveIndexChange,
11799 RequestBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
11800 RequestBody::ListAliases(_) => Command::ListAliases,
11801 RequestBody::GetAlias(_) => Command::GetAlias,
11802 RequestBody::ListDataStreams(_) => Command::ListDataStreams,
11803 RequestBody::GetDataStream(_) => Command::GetDataStream,
11804 RequestBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
11805 RequestBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
11806 RequestBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
11807 RequestBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
11808 RequestBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
11809 RequestBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
11810 RequestBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
11811 RequestBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
11812 RequestBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
11813 RequestBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
11814 RequestBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
11815 RequestBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
11816 RequestBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
11817 RequestBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
11818 RequestBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
11819 RequestBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
11820 RequestBody::GetReplayableSource(_) => Command::GetReplayableSource,
11821 RequestBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
11822 RequestBody::CloneIndex(_) => Command::CloneIndex,
11823 RequestBody::ConfigureHistory(_) => Command::ConfigureHistory,
11824 RequestBody::GetHistory(_) => Command::GetHistory,
11825 RequestBody::ResolveHistory(_) => Command::ResolveHistory,
11826 RequestBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
11827 RequestBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
11828 RequestBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
11829 RequestBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
11830 RequestBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
11831 RequestBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
11832 RequestBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
11833 RequestBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
11834 RequestBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
11835 RequestBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
11836 RequestBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
11837 RequestBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
11838 RequestBody::GetDocument(_) => Command::GetDocument,
11839 RequestBody::Search(_) => Command::Search,
11840 RequestBody::TraverseRelationships(_) => Command::TraverseRelationships,
11841 RequestBody::QueryProfiles(_) => Command::QueryProfiles,
11842 RequestBody::EvaluateTemporalEvidence(_) => Command::EvaluateTemporalEvidence,
11843 RequestBody::CreateContinuousTemporalEvaluation(_) => Command::CreateContinuousTemporalEvaluation,
11844 RequestBody::GetContinuousTemporalEvaluation(_) => Command::GetContinuousTemporalEvaluation,
11845 RequestBody::PauseContinuousTemporalEvaluation(_) => Command::PauseContinuousTemporalEvaluation,
11846 RequestBody::ResumeContinuousTemporalEvaluation(_) => Command::ResumeContinuousTemporalEvaluation,
11847 RequestBody::ReplaceContinuousTemporalEvaluation(_) => Command::ReplaceContinuousTemporalEvaluation,
11848 RequestBody::RetireContinuousTemporalEvaluation(_) => Command::RetireContinuousTemporalEvaluation,
11849 RequestBody::ReadContinuousTemporalEvidence(_) => Command::ReadContinuousTemporalEvidence,
11850 RequestBody::ValidateSearch(_) => Command::ValidateSearch,
11851 RequestBody::MaterializeTableSnapshot(_) => Command::MaterializeTableSnapshot,
11852 RequestBody::ResolveTableSnapshot(_) => Command::ResolveTableSnapshot,
11853 RequestBody::ReadTableSnapshot(_) => Command::ReadTableSnapshot,
11854 RequestBody::OpenPit(_) => Command::OpenPit,
11855 RequestBody::RenewPit(_) => Command::RenewPit,
11856 RequestBody::ClosePit(_) => Command::ClosePit,
11857 RequestBody::ListOperations(_) => Command::ListOperations,
11858 RequestBody::GetOperation(_) => Command::GetOperation,
11859 RequestBody::WaitOperation(_) => Command::WaitOperation,
11860 RequestBody::CancelOperation(_) => Command::CancelOperation,
11861 RequestBody::ListAuditEvents(_) => Command::ListAuditEvents,
11862 RequestBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
11863 RequestBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
11864 RequestBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
11865 RequestBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
11866 RequestBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
11867 RequestBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
11868 RequestBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
11869 RequestBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
11870 RequestBody::GetSecurityRole(_) => Command::GetSecurityRole,
11871 RequestBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
11872 RequestBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
11873 RequestBody::PrepareSourceAuthorizationProjection(_) => Command::PrepareSourceAuthorizationProjection,
11874 RequestBody::SubmitSourceAuthorizationProjection(_) => Command::SubmitSourceAuthorizationProjection,
11875 RequestBody::ResolveSourceAuthorizationProjection(_) => Command::ResolveSourceAuthorizationProjection,
11876 RequestBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
11877 RequestBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
11878 RequestBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
11879 RequestBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
11880 RequestBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
11881 RequestBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
11882 RequestBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
11883 RequestBody::RetireExternalKeyBinding(_) => Command::RetireExternalKeyBinding,
11884 RequestBody::ResolveExternalKeyBindingRetirement(_) => Command::ResolveExternalKeyBindingRetirement,
11885 RequestBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
11886 RequestBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
11887 RequestBody::EraseRecord(_) => Command::EraseRecord,
11888 RequestBody::ResolveRecordErasure(_) => Command::ResolveRecordErasure,
11889 RequestBody::GetRecordErasure(_) => Command::GetRecordErasure,
11890 RequestBody::GetQuota(_) => Command::GetQuota,
11891 RequestBody::UpdateQuota(_) => Command::UpdateQuota,
11892 RequestBody::GetBinding(_) => Command::GetBinding,
11893 RequestBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
11894 RequestBody::SetAdmission(_) => Command::SetAdmission,
11895 RequestBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
11896 RequestBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
11897 RequestBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
11898 RequestBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
11899 RequestBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
11900 RequestBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
11901 RequestBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
11902 RequestBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
11903 RequestBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
11904 RequestBody::GetDiagnostic(_) => Command::GetDiagnostic,
11905 RequestBody::PrepareCollectionExport(_) => Command::PrepareCollectionExport,
11906 RequestBody::StartCollectionExport(_) => Command::StartCollectionExport,
11907 RequestBody::ResolveCollectionExport(_) => Command::ResolveCollectionExport,
11908 RequestBody::VerifyCollectionExport(_) => Command::VerifyCollectionExport,
11909 RequestBody::PrepareCollectionExportRetirement(_) => Command::PrepareCollectionExportRetirement,
11910 RequestBody::StartCollectionExportRetirement(_) => Command::StartCollectionExportRetirement,
11911 RequestBody::ResolveCollectionExportRetirement(_) => Command::ResolveCollectionExportRetirement,
11912 RequestBody::PrepareCollectionRestore(_) => Command::PrepareCollectionRestore,
11913 RequestBody::StartCollectionRestore(_) => Command::StartCollectionRestore,
11914 RequestBody::ResolveCollectionRestore(_) => Command::ResolveCollectionRestore,
11915 RequestBody::PrepareCollectionTransferExport(_) => Command::PrepareCollectionTransferExport,
11916 RequestBody::StartCollectionTransferExport(_) => Command::StartCollectionTransferExport,
11917 RequestBody::ResolveCollectionTransferExport(_) => Command::ResolveCollectionTransferExport,
11918 RequestBody::PrepareCollectionTransferRestore(_) => Command::PrepareCollectionTransferRestore,
11919 RequestBody::StartCollectionTransferRestore(_) => Command::StartCollectionTransferRestore,
11920 RequestBody::ResolveCollectionTransferRestore(_) => Command::ResolveCollectionTransferRestore,
11921 RequestBody::PrepareCollectionStandbyAdmission(_) => Command::PrepareCollectionStandbyAdmission,
11922 RequestBody::StartCollectionStandbyAdmission(_) => Command::StartCollectionStandbyAdmission,
11923 RequestBody::ResolveCollectionStandbyAdmission(_) => Command::ResolveCollectionStandbyAdmission,
11924 RequestBody::PrepareCollectionStandbyActivation(_) => Command::PrepareCollectionStandbyActivation,
11925 RequestBody::StartCollectionStandbyActivation(_) => Command::StartCollectionStandbyActivation,
11926 RequestBody::ResolveCollectionStandbyActivation(_) => Command::ResolveCollectionStandbyActivation,
11927 RequestBody::PrepareIndexExport(_) => Command::PrepareIndexExport,
11928 RequestBody::StartIndexExport(_) => Command::StartIndexExport,
11929 RequestBody::ResolveIndexExport(_) => Command::ResolveIndexExport,
11930 RequestBody::VerifyIndexExport(_) => Command::VerifyIndexExport,
11931 RequestBody::PrepareIndexImport(_) => Command::PrepareIndexImport,
11932 RequestBody::StartIndexImport(_) => Command::StartIndexImport,
11933 RequestBody::ResolveIndexImport(_) => Command::ResolveIndexImport,
11934 RequestBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
11935 RequestBody::ExportUsage(_) => Command::ExportUsage,
11936 RequestBody::GetStorageUsage(_) => Command::GetStorageUsage,
11937 RequestBody::ReadLogicalOccupancy(_) => Command::ReadLogicalOccupancy,
11938 RequestBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
11939 RequestBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
11940 RequestBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
11941 RequestBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
11942 }
11943}
11944
11945pub const fn command_for_result(value: &ResultBody) -> Command {
11946 match value {
11947 ResultBody::Discover(_) => Command::Discover,
11948 ResultBody::ListIndexes(_) => Command::ListIndexes,
11949 ResultBody::GetIndex(_) => Command::GetIndex,
11950 ResultBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
11951 ResultBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
11952 ResultBody::ResolveIndexChange(_) => Command::ResolveIndexChange,
11953 ResultBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
11954 ResultBody::ListAliases(_) => Command::ListAliases,
11955 ResultBody::GetAlias(_) => Command::GetAlias,
11956 ResultBody::ListDataStreams(_) => Command::ListDataStreams,
11957 ResultBody::GetDataStream(_) => Command::GetDataStream,
11958 ResultBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
11959 ResultBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
11960 ResultBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
11961 ResultBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
11962 ResultBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
11963 ResultBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
11964 ResultBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
11965 ResultBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
11966 ResultBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
11967 ResultBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
11968 ResultBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
11969 ResultBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
11970 ResultBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
11971 ResultBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
11972 ResultBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
11973 ResultBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
11974 ResultBody::GetReplayableSource(_) => Command::GetReplayableSource,
11975 ResultBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
11976 ResultBody::CloneIndex(_) => Command::CloneIndex,
11977 ResultBody::ConfigureHistory(_) => Command::ConfigureHistory,
11978 ResultBody::GetHistory(_) => Command::GetHistory,
11979 ResultBody::ResolveHistory(_) => Command::ResolveHistory,
11980 ResultBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
11981 ResultBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
11982 ResultBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
11983 ResultBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
11984 ResultBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
11985 ResultBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
11986 ResultBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
11987 ResultBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
11988 ResultBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
11989 ResultBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
11990 ResultBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
11991 ResultBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
11992 ResultBody::GetDocument(_) => Command::GetDocument,
11993 ResultBody::Search(_) => Command::Search,
11994 ResultBody::TraverseRelationships(_) => Command::TraverseRelationships,
11995 ResultBody::QueryProfiles(_) => Command::QueryProfiles,
11996 ResultBody::EvaluateTemporalEvidence(_) => Command::EvaluateTemporalEvidence,
11997 ResultBody::CreateContinuousTemporalEvaluation(_) => Command::CreateContinuousTemporalEvaluation,
11998 ResultBody::GetContinuousTemporalEvaluation(_) => Command::GetContinuousTemporalEvaluation,
11999 ResultBody::PauseContinuousTemporalEvaluation(_) => Command::PauseContinuousTemporalEvaluation,
12000 ResultBody::ResumeContinuousTemporalEvaluation(_) => Command::ResumeContinuousTemporalEvaluation,
12001 ResultBody::ReplaceContinuousTemporalEvaluation(_) => Command::ReplaceContinuousTemporalEvaluation,
12002 ResultBody::RetireContinuousTemporalEvaluation(_) => Command::RetireContinuousTemporalEvaluation,
12003 ResultBody::ReadContinuousTemporalEvidence(_) => Command::ReadContinuousTemporalEvidence,
12004 ResultBody::ValidateSearch(_) => Command::ValidateSearch,
12005 ResultBody::MaterializeTableSnapshot(_) => Command::MaterializeTableSnapshot,
12006 ResultBody::ResolveTableSnapshot(_) => Command::ResolveTableSnapshot,
12007 ResultBody::ReadTableSnapshot(_) => Command::ReadTableSnapshot,
12008 ResultBody::OpenPit(_) => Command::OpenPit,
12009 ResultBody::RenewPit(_) => Command::RenewPit,
12010 ResultBody::ClosePit(_) => Command::ClosePit,
12011 ResultBody::ListOperations(_) => Command::ListOperations,
12012 ResultBody::GetOperation(_) => Command::GetOperation,
12013 ResultBody::WaitOperation(_) => Command::WaitOperation,
12014 ResultBody::CancelOperation(_) => Command::CancelOperation,
12015 ResultBody::ListAuditEvents(_) => Command::ListAuditEvents,
12016 ResultBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
12017 ResultBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
12018 ResultBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
12019 ResultBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
12020 ResultBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
12021 ResultBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
12022 ResultBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
12023 ResultBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
12024 ResultBody::GetSecurityRole(_) => Command::GetSecurityRole,
12025 ResultBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
12026 ResultBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
12027 ResultBody::PrepareSourceAuthorizationProjection(_) => Command::PrepareSourceAuthorizationProjection,
12028 ResultBody::SubmitSourceAuthorizationProjection(_) => Command::SubmitSourceAuthorizationProjection,
12029 ResultBody::ResolveSourceAuthorizationProjection(_) => Command::ResolveSourceAuthorizationProjection,
12030 ResultBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
12031 ResultBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
12032 ResultBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
12033 ResultBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
12034 ResultBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
12035 ResultBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
12036 ResultBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
12037 ResultBody::RetireExternalKeyBinding(_) => Command::RetireExternalKeyBinding,
12038 ResultBody::ResolveExternalKeyBindingRetirement(_) => Command::ResolveExternalKeyBindingRetirement,
12039 ResultBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
12040 ResultBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
12041 ResultBody::EraseRecord(_) => Command::EraseRecord,
12042 ResultBody::ResolveRecordErasure(_) => Command::ResolveRecordErasure,
12043 ResultBody::GetRecordErasure(_) => Command::GetRecordErasure,
12044 ResultBody::GetQuota(_) => Command::GetQuota,
12045 ResultBody::UpdateQuota(_) => Command::UpdateQuota,
12046 ResultBody::GetBinding(_) => Command::GetBinding,
12047 ResultBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
12048 ResultBody::SetAdmission(_) => Command::SetAdmission,
12049 ResultBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
12050 ResultBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
12051 ResultBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
12052 ResultBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
12053 ResultBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
12054 ResultBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
12055 ResultBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
12056 ResultBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
12057 ResultBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
12058 ResultBody::GetDiagnostic(_) => Command::GetDiagnostic,
12059 ResultBody::PrepareCollectionExport(_) => Command::PrepareCollectionExport,
12060 ResultBody::StartCollectionExport(_) => Command::StartCollectionExport,
12061 ResultBody::ResolveCollectionExport(_) => Command::ResolveCollectionExport,
12062 ResultBody::VerifyCollectionExport(_) => Command::VerifyCollectionExport,
12063 ResultBody::PrepareCollectionExportRetirement(_) => Command::PrepareCollectionExportRetirement,
12064 ResultBody::StartCollectionExportRetirement(_) => Command::StartCollectionExportRetirement,
12065 ResultBody::ResolveCollectionExportRetirement(_) => Command::ResolveCollectionExportRetirement,
12066 ResultBody::PrepareCollectionRestore(_) => Command::PrepareCollectionRestore,
12067 ResultBody::StartCollectionRestore(_) => Command::StartCollectionRestore,
12068 ResultBody::ResolveCollectionRestore(_) => Command::ResolveCollectionRestore,
12069 ResultBody::PrepareCollectionTransferExport(_) => Command::PrepareCollectionTransferExport,
12070 ResultBody::StartCollectionTransferExport(_) => Command::StartCollectionTransferExport,
12071 ResultBody::ResolveCollectionTransferExport(_) => Command::ResolveCollectionTransferExport,
12072 ResultBody::PrepareCollectionTransferRestore(_) => Command::PrepareCollectionTransferRestore,
12073 ResultBody::StartCollectionTransferRestore(_) => Command::StartCollectionTransferRestore,
12074 ResultBody::ResolveCollectionTransferRestore(_) => Command::ResolveCollectionTransferRestore,
12075 ResultBody::PrepareCollectionStandbyAdmission(_) => Command::PrepareCollectionStandbyAdmission,
12076 ResultBody::StartCollectionStandbyAdmission(_) => Command::StartCollectionStandbyAdmission,
12077 ResultBody::ResolveCollectionStandbyAdmission(_) => Command::ResolveCollectionStandbyAdmission,
12078 ResultBody::PrepareCollectionStandbyActivation(_) => Command::PrepareCollectionStandbyActivation,
12079 ResultBody::StartCollectionStandbyActivation(_) => Command::StartCollectionStandbyActivation,
12080 ResultBody::ResolveCollectionStandbyActivation(_) => Command::ResolveCollectionStandbyActivation,
12081 ResultBody::PrepareIndexExport(_) => Command::PrepareIndexExport,
12082 ResultBody::StartIndexExport(_) => Command::StartIndexExport,
12083 ResultBody::ResolveIndexExport(_) => Command::ResolveIndexExport,
12084 ResultBody::VerifyIndexExport(_) => Command::VerifyIndexExport,
12085 ResultBody::PrepareIndexImport(_) => Command::PrepareIndexImport,
12086 ResultBody::StartIndexImport(_) => Command::StartIndexImport,
12087 ResultBody::ResolveIndexImport(_) => Command::ResolveIndexImport,
12088 ResultBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
12089 ResultBody::ExportUsage(_) => Command::ExportUsage,
12090 ResultBody::GetStorageUsage(_) => Command::GetStorageUsage,
12091 ResultBody::ReadLogicalOccupancy(_) => Command::ReadLogicalOccupancy,
12092 ResultBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
12093 ResultBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
12094 ResultBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
12095 ResultBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
12096 }
12097}
12098
12099#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
12100#[serde(deny_unknown_fields)]
12101pub struct RequestEnvelope {
12102 pub meta: RequestMeta,
12103 pub request: RequestBody,
12104}
12105#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
12106#[serde(tag = "outcome", rename_all = "snake_case")]
12107pub enum ResponseEnvelope {
12108 Success {
12109 meta: ResponseMeta,
12110 result: Box<ResultBody>,
12111 },
12112 Error {
12113 meta: ResponseMeta,
12114 error: ErrorBody,
12115 },
12116}
12117
12118#[derive(Clone, Copy, Debug, Eq, PartialEq)]
12119pub struct CommandContract {
12120 pub command: Command,
12121 pub action: Action,
12122 pub cancellable: bool,
12123 pub mutation: &'static str,
12124}
12125pub const LODESTONE_API_COMMAND_CONTRACTS: &[CommandContract] = &[
12126 CommandContract {
12127 command: Command::Discover,
12128 action: Action::IdentityDiscovery,
12129 cancellable: true,
12130 mutation: "read_only",
12131 },
12132 CommandContract {
12133 command: Command::ListIndexes,
12134 action: Action::CatalogRead,
12135 cancellable: true,
12136 mutation: "read_only",
12137 },
12138 CommandContract {
12139 command: Command::GetIndex,
12140 action: Action::CatalogRead,
12141 cancellable: true,
12142 mutation: "read_only",
12143 },
12144 CommandContract {
12145 command: Command::ValidateIndexChange,
12146 action: Action::IndexAdmin,
12147 cancellable: true,
12148 mutation: "read_only",
12149 },
12150 CommandContract {
12151 command: Command::ApplyIndexChange,
12152 action: Action::IndexAdmin,
12153 cancellable: true,
12154 mutation: "catalog_submit",
12155 },
12156 CommandContract {
12157 command: Command::ResolveIndexChange,
12158 action: Action::IndexAdmin,
12159 cancellable: true,
12160 mutation: "read_only",
12161 },
12162 CommandContract {
12163 command: Command::ApplyAdministrationMutation,
12164 action: Action::LifecycleAdmin,
12165 cancellable: true,
12166 mutation: "administration_submit",
12167 },
12168 CommandContract {
12169 command: Command::ListAliases,
12170 action: Action::CatalogRead,
12171 cancellable: true,
12172 mutation: "read_only",
12173 },
12174 CommandContract {
12175 command: Command::GetAlias,
12176 action: Action::CatalogRead,
12177 cancellable: true,
12178 mutation: "read_only",
12179 },
12180 CommandContract {
12181 command: Command::ListDataStreams,
12182 action: Action::CatalogRead,
12183 cancellable: true,
12184 mutation: "read_only",
12185 },
12186 CommandContract {
12187 command: Command::GetDataStream,
12188 action: Action::CatalogRead,
12189 cancellable: true,
12190 mutation: "read_only",
12191 },
12192 CommandContract {
12193 command: Command::ListComponentTemplates,
12194 action: Action::CatalogRead,
12195 cancellable: true,
12196 mutation: "read_only",
12197 },
12198 CommandContract {
12199 command: Command::GetComponentTemplate,
12200 action: Action::CatalogRead,
12201 cancellable: true,
12202 mutation: "read_only",
12203 },
12204 CommandContract {
12205 command: Command::ListIndexTemplates,
12206 action: Action::CatalogRead,
12207 cancellable: true,
12208 mutation: "read_only",
12209 },
12210 CommandContract {
12211 command: Command::GetIndexTemplate,
12212 action: Action::CatalogRead,
12213 cancellable: true,
12214 mutation: "read_only",
12215 },
12216 CommandContract {
12217 command: Command::ListIngestPipelines,
12218 action: Action::LifecycleAdmin,
12219 cancellable: true,
12220 mutation: "read_only",
12221 },
12222 CommandContract {
12223 command: Command::GetIngestPipeline,
12224 action: Action::LifecycleAdmin,
12225 cancellable: true,
12226 mutation: "read_only",
12227 },
12228 CommandContract {
12229 command: Command::SimulateIngestPipeline,
12230 action: Action::LifecycleAdmin,
12231 cancellable: true,
12232 mutation: "read_only",
12233 },
12234 CommandContract {
12235 command: Command::ReprocessByQuery,
12236 action: Action::DataWrite,
12237 cancellable: true,
12238 mutation: "authority_submit",
12239 },
12240 CommandContract {
12241 command: Command::ListLifecyclePolicies,
12242 action: Action::CatalogRead,
12243 cancellable: true,
12244 mutation: "read_only",
12245 },
12246 CommandContract {
12247 command: Command::GetLifecyclePolicy,
12248 action: Action::CatalogRead,
12249 cancellable: true,
12250 mutation: "read_only",
12251 },
12252 CommandContract {
12253 command: Command::PrepareCreateIndex,
12254 action: Action::IndexAdmin,
12255 cancellable: true,
12256 mutation: "catalog_prepare",
12257 },
12258 CommandContract {
12259 command: Command::PrepareDeleteIndex,
12260 action: Action::IndexAdmin,
12261 cancellable: true,
12262 mutation: "catalog_prepare",
12263 },
12264 CommandContract {
12265 command: Command::SubmitCatalogAction,
12266 action: Action::IndexAdmin,
12267 cancellable: true,
12268 mutation: "catalog_submit",
12269 },
12270 CommandContract {
12271 command: Command::ResolveCatalogAction,
12272 action: Action::IndexAdmin,
12273 cancellable: true,
12274 mutation: "read_only",
12275 },
12276 CommandContract {
12277 command: Command::PrepareReplayableSourceIndex,
12278 action: Action::IndexAdmin,
12279 cancellable: true,
12280 mutation: "catalog_prepare",
12281 },
12282 CommandContract {
12283 command: Command::SubmitReplayableSourceIndex,
12284 action: Action::IndexAdmin,
12285 cancellable: true,
12286 mutation: "catalog_submit",
12287 },
12288 CommandContract {
12289 command: Command::GetReplayableSource,
12290 action: Action::CatalogRead,
12291 cancellable: true,
12292 mutation: "read_only",
12293 },
12294 CommandContract {
12295 command: Command::ControlReplayableSource,
12296 action: Action::IndexAdmin,
12297 cancellable: true,
12298 mutation: "catalog_submit",
12299 },
12300 CommandContract {
12301 command: Command::CloneIndex,
12302 action: Action::IndexAdmin,
12303 cancellable: true,
12304 mutation: "catalog_submit",
12305 },
12306 CommandContract {
12307 command: Command::ConfigureHistory,
12308 action: Action::IndexAdmin,
12309 cancellable: true,
12310 mutation: "catalog_submit",
12311 },
12312 CommandContract {
12313 command: Command::GetHistory,
12314 action: Action::CatalogRead,
12315 cancellable: true,
12316 mutation: "read_only",
12317 },
12318 CommandContract {
12319 command: Command::ResolveHistory,
12320 action: Action::DataRead,
12321 cancellable: true,
12322 mutation: "read_only",
12323 },
12324 CommandContract {
12325 command: Command::PlaceHistoryHold,
12326 action: Action::IndexAdmin,
12327 cancellable: true,
12328 mutation: "catalog_submit",
12329 },
12330 CommandContract {
12331 command: Command::ReleaseHistoryHold,
12332 action: Action::IndexAdmin,
12333 cancellable: true,
12334 mutation: "catalog_submit",
12335 },
12336 CommandContract {
12337 command: Command::PrepareDocumentMutation,
12338 action: Action::DataWrite,
12339 cancellable: true,
12340 mutation: "read_only_prepare",
12341 },
12342 CommandContract {
12343 command: Command::SubmitDocumentMutation,
12344 action: Action::DataWrite,
12345 cancellable: true,
12346 mutation: "wal_submit",
12347 },
12348 CommandContract {
12349 command: Command::PrepareDocumentBulk,
12350 action: Action::DataWrite,
12351 cancellable: true,
12352 mutation: "read_only_prepare",
12353 },
12354 CommandContract {
12355 command: Command::SubmitDocumentBulk,
12356 action: Action::DataWrite,
12357 cancellable: true,
12358 mutation: "wal_submit",
12359 },
12360 CommandContract {
12361 command: Command::ResolveDocumentBulk,
12362 action: Action::DataRead,
12363 cancellable: true,
12364 mutation: "read_only",
12365 },
12366 CommandContract {
12367 command: Command::PrepareAppendBulk,
12368 action: Action::Append,
12369 cancellable: true,
12370 mutation: "read_only_prepare",
12371 },
12372 CommandContract {
12373 command: Command::SubmitAppendBulk,
12374 action: Action::Append,
12375 cancellable: true,
12376 mutation: "wal_submit",
12377 },
12378 CommandContract {
12379 command: Command::ResolveAppendBulk,
12380 action: Action::ResolveAppend,
12381 cancellable: true,
12382 mutation: "read_only",
12383 },
12384 CommandContract {
12385 command: Command::ObserveAppendCommitted,
12386 action: Action::ResolveAppend,
12387 cancellable: true,
12388 mutation: "read_only",
12389 },
12390 CommandContract {
12391 command: Command::ResolveDocumentMutation,
12392 action: Action::DataRead,
12393 cancellable: true,
12394 mutation: "read_only",
12395 },
12396 CommandContract {
12397 command: Command::GetDocument,
12398 action: Action::DataRead,
12399 cancellable: true,
12400 mutation: "read_only",
12401 },
12402 CommandContract {
12403 command: Command::Search,
12404 action: Action::DataRead,
12405 cancellable: true,
12406 mutation: "read_only",
12407 },
12408 CommandContract {
12409 command: Command::TraverseRelationships,
12410 action: Action::DataRead,
12411 cancellable: true,
12412 mutation: "read_only",
12413 },
12414 CommandContract {
12415 command: Command::QueryProfiles,
12416 action: Action::DataRead,
12417 cancellable: true,
12418 mutation: "read_only",
12419 },
12420 CommandContract {
12421 command: Command::EvaluateTemporalEvidence,
12422 action: Action::DataRead,
12423 cancellable: true,
12424 mutation: "read_only",
12425 },
12426 CommandContract {
12427 command: Command::CreateContinuousTemporalEvaluation,
12428 action: Action::LifecycleAdmin,
12429 cancellable: true,
12430 mutation: "catalog_submit",
12431 },
12432 CommandContract {
12433 command: Command::GetContinuousTemporalEvaluation,
12434 action: Action::CatalogRead,
12435 cancellable: true,
12436 mutation: "read_only",
12437 },
12438 CommandContract {
12439 command: Command::PauseContinuousTemporalEvaluation,
12440 action: Action::LifecycleAdmin,
12441 cancellable: true,
12442 mutation: "catalog_submit",
12443 },
12444 CommandContract {
12445 command: Command::ResumeContinuousTemporalEvaluation,
12446 action: Action::LifecycleAdmin,
12447 cancellable: true,
12448 mutation: "catalog_submit",
12449 },
12450 CommandContract {
12451 command: Command::ReplaceContinuousTemporalEvaluation,
12452 action: Action::LifecycleAdmin,
12453 cancellable: true,
12454 mutation: "catalog_submit",
12455 },
12456 CommandContract {
12457 command: Command::RetireContinuousTemporalEvaluation,
12458 action: Action::LifecycleAdmin,
12459 cancellable: true,
12460 mutation: "catalog_submit",
12461 },
12462 CommandContract {
12463 command: Command::ReadContinuousTemporalEvidence,
12464 action: Action::DataRead,
12465 cancellable: true,
12466 mutation: "read_only",
12467 },
12468 CommandContract {
12469 command: Command::ValidateSearch,
12470 action: Action::DataRead,
12471 cancellable: true,
12472 mutation: "read_only",
12473 },
12474 CommandContract {
12475 command: Command::MaterializeTableSnapshot,
12476 action: Action::DataRead,
12477 cancellable: true,
12478 mutation: "catalog_submit",
12479 },
12480 CommandContract {
12481 command: Command::ResolveTableSnapshot,
12482 action: Action::DataRead,
12483 cancellable: true,
12484 mutation: "read_only",
12485 },
12486 CommandContract {
12487 command: Command::ReadTableSnapshot,
12488 action: Action::DataRead,
12489 cancellable: true,
12490 mutation: "read_only",
12491 },
12492 CommandContract {
12493 command: Command::OpenPit,
12494 action: Action::DataRead,
12495 cancellable: true,
12496 mutation: "authority_submit",
12497 },
12498 CommandContract {
12499 command: Command::RenewPit,
12500 action: Action::DataRead,
12501 cancellable: true,
12502 mutation: "authority_submit",
12503 },
12504 CommandContract {
12505 command: Command::ClosePit,
12506 action: Action::DataRead,
12507 cancellable: true,
12508 mutation: "authority_submit",
12509 },
12510 CommandContract {
12511 command: Command::ListOperations,
12512 action: Action::OperationRead,
12513 cancellable: true,
12514 mutation: "read_only",
12515 },
12516 CommandContract {
12517 command: Command::GetOperation,
12518 action: Action::OperationRead,
12519 cancellable: true,
12520 mutation: "read_only",
12521 },
12522 CommandContract {
12523 command: Command::WaitOperation,
12524 action: Action::OperationRead,
12525 cancellable: true,
12526 mutation: "read_only",
12527 },
12528 CommandContract {
12529 command: Command::CancelOperation,
12530 action: Action::OperationCancel,
12531 cancellable: true,
12532 mutation: "authority_submit",
12533 },
12534 CommandContract {
12535 command: Command::ListAuditEvents,
12536 action: Action::AuditRead,
12537 cancellable: true,
12538 mutation: "read_only",
12539 },
12540 CommandContract {
12541 command: Command::ExportAuditEvents,
12542 action: Action::AuditRead,
12543 cancellable: true,
12544 mutation: "read_only",
12545 },
12546 CommandContract {
12547 command: Command::ReserveServiceCredential,
12548 action: Action::SecurityAdmin,
12549 cancellable: true,
12550 mutation: "security_reserve",
12551 },
12552 CommandContract {
12553 command: Command::ReserveServiceCredentialRotation,
12554 action: Action::SecurityAdmin,
12555 cancellable: true,
12556 mutation: "security_reserve",
12557 },
12558 CommandContract {
12559 command: Command::ActivateServiceCredential,
12560 action: Action::SecurityAdmin,
12561 cancellable: true,
12562 mutation: "security_submit",
12563 },
12564 CommandContract {
12565 command: Command::ResolveServiceCredentialReservation,
12566 action: Action::SecurityRead,
12567 cancellable: true,
12568 mutation: "read_only",
12569 },
12570 CommandContract {
12571 command: Command::PrepareRevokeServiceCredential,
12572 action: Action::SecurityAdmin,
12573 cancellable: true,
12574 mutation: "read_only_prepare",
12575 },
12576 CommandContract {
12577 command: Command::RevokeServiceCredential,
12578 action: Action::SecurityAdmin,
12579 cancellable: true,
12580 mutation: "security_submit",
12581 },
12582 CommandContract {
12583 command: Command::ResolveSecurityAction,
12584 action: Action::SecurityRead,
12585 cancellable: true,
12586 mutation: "read_only",
12587 },
12588 CommandContract {
12589 command: Command::GetSecurityRole,
12590 action: Action::SecurityRead,
12591 cancellable: true,
12592 mutation: "read_only",
12593 },
12594 CommandContract {
12595 command: Command::PrepareRoleAppendAccessChange,
12596 action: Action::SecurityAdmin,
12597 cancellable: true,
12598 mutation: "read_only_prepare",
12599 },
12600 CommandContract {
12601 command: Command::SubmitRoleAppendAccessChange,
12602 action: Action::SecurityAdmin,
12603 cancellable: true,
12604 mutation: "security_submit",
12605 },
12606 CommandContract {
12607 command: Command::PrepareSourceAuthorizationProjection,
12608 action: Action::IndexAdmin,
12609 cancellable: true,
12610 mutation: "read_only_prepare",
12611 },
12612 CommandContract {
12613 command: Command::SubmitSourceAuthorizationProjection,
12614 action: Action::IndexAdmin,
12615 cancellable: true,
12616 mutation: "security_submit",
12617 },
12618 CommandContract {
12619 command: Command::ResolveSourceAuthorizationProjection,
12620 action: Action::IndexAdmin,
12621 cancellable: true,
12622 mutation: "read_only",
12623 },
12624 CommandContract {
12625 command: Command::ListServiceCredentials,
12626 action: Action::SecurityRead,
12627 cancellable: true,
12628 mutation: "read_only",
12629 },
12630 CommandContract {
12631 command: Command::GetRuntimeStatus,
12632 action: Action::CatalogRead,
12633 cancellable: true,
12634 mutation: "read_only",
12635 },
12636 CommandContract {
12637 command: Command::GetResultCacheStatus,
12638 action: Action::CatalogRead,
12639 cancellable: true,
12640 mutation: "read_only",
12641 },
12642 CommandContract {
12643 command: Command::GetFieldPromotionStatus,
12644 action: Action::CatalogRead,
12645 cancellable: true,
12646 mutation: "read_only",
12647 },
12648 CommandContract {
12649 command: Command::GetOverloadStatus,
12650 action: Action::CatalogRead,
12651 cancellable: true,
12652 mutation: "read_only",
12653 },
12654 CommandContract {
12655 command: Command::ConfigureExternalKey,
12656 action: Action::LifecycleAdmin,
12657 cancellable: true,
12658 mutation: "authority_submit",
12659 },
12660 CommandContract {
12661 command: Command::RotateExternalKeyBinding,
12662 action: Action::LifecycleAdmin,
12663 cancellable: true,
12664 mutation: "authority_submit",
12665 },
12666 CommandContract {
12667 command: Command::RetireExternalKeyBinding,
12668 action: Action::LifecycleAdmin,
12669 cancellable: true,
12670 mutation: "authority_submit",
12671 },
12672 CommandContract {
12673 command: Command::ResolveExternalKeyBindingRetirement,
12674 action: Action::LifecycleAdmin,
12675 cancellable: true,
12676 mutation: "read_only",
12677 },
12678 CommandContract {
12679 command: Command::ConfigureAggregateThenDelete,
12680 action: Action::LifecycleAdmin,
12681 cancellable: true,
12682 mutation: "authority_submit",
12683 },
12684 CommandContract {
12685 command: Command::GetLifecycleStatus,
12686 action: Action::CatalogRead,
12687 cancellable: true,
12688 mutation: "read_only",
12689 },
12690 CommandContract {
12691 command: Command::EraseRecord,
12692 action: Action::LifecycleAdmin,
12693 cancellable: true,
12694 mutation: "authority_submit",
12695 },
12696 CommandContract {
12697 command: Command::ResolveRecordErasure,
12698 action: Action::LifecycleAdmin,
12699 cancellable: true,
12700 mutation: "read_only",
12701 },
12702 CommandContract {
12703 command: Command::GetRecordErasure,
12704 action: Action::LifecycleAdmin,
12705 cancellable: true,
12706 mutation: "read_only",
12707 },
12708 CommandContract {
12709 command: Command::GetQuota,
12710 action: Action::QuotaRead,
12711 cancellable: true,
12712 mutation: "read_only",
12713 },
12714 CommandContract {
12715 command: Command::UpdateQuota,
12716 action: Action::QuotaAdmin,
12717 cancellable: true,
12718 mutation: "quota_submit",
12719 },
12720 CommandContract {
12721 command: Command::GetBinding,
12722 action: Action::BindingRead,
12723 cancellable: true,
12724 mutation: "read_only",
12725 },
12726 CommandContract {
12727 command: Command::GetAdmissionStatus,
12728 action: Action::AdmissionRead,
12729 cancellable: true,
12730 mutation: "read_only",
12731 },
12732 CommandContract {
12733 command: Command::SetAdmission,
12734 action: Action::AdmissionAdmin,
12735 cancellable: true,
12736 mutation: "admission_submit",
12737 },
12738 CommandContract {
12739 command: Command::GetQuiesceStatus,
12740 action: Action::AdmissionRead,
12741 cancellable: true,
12742 mutation: "read_only",
12743 },
12744 CommandContract {
12745 command: Command::GetDecommissionReadiness,
12746 action: Action::AdmissionRead,
12747 cancellable: true,
12748 mutation: "read_only",
12749 },
12750 CommandContract {
12751 command: Command::GetUpgradeReadiness,
12752 action: Action::TaskRead,
12753 cancellable: true,
12754 mutation: "read_only",
12755 },
12756 CommandContract {
12757 command: Command::GetMaintenanceStatus,
12758 action: Action::TaskRead,
12759 cancellable: true,
12760 mutation: "read_only",
12761 },
12762 CommandContract {
12763 command: Command::WarmVectorIndex,
12764 action: Action::DataRead,
12765 cancellable: true,
12766 mutation: "read_only",
12767 },
12768 CommandContract {
12769 command: Command::EvaluateVectorRecall,
12770 action: Action::DiagnosticsCreate,
12771 cancellable: true,
12772 mutation: "diagnostic_submit",
12773 },
12774 CommandContract {
12775 command: Command::CalibrateVectorStrategy,
12776 action: Action::DiagnosticsCreate,
12777 cancellable: true,
12778 mutation: "diagnostic_submit",
12779 },
12780 CommandContract {
12781 command: Command::GetVectorDiagnostic,
12782 action: Action::DiagnosticsRead,
12783 cancellable: true,
12784 mutation: "read_only",
12785 },
12786 CommandContract {
12787 command: Command::CreateDiagnostic,
12788 action: Action::DiagnosticsCreate,
12789 cancellable: true,
12790 mutation: "diagnostic_submit",
12791 },
12792 CommandContract {
12793 command: Command::GetDiagnostic,
12794 action: Action::DiagnosticsRead,
12795 cancellable: true,
12796 mutation: "read_only",
12797 },
12798 CommandContract {
12799 command: Command::PrepareCollectionExport,
12800 action: Action::CollectionExport,
12801 cancellable: true,
12802 mutation: "read_only_prepare",
12803 },
12804 CommandContract {
12805 command: Command::StartCollectionExport,
12806 action: Action::CollectionExport,
12807 cancellable: true,
12808 mutation: "portability_submit",
12809 },
12810 CommandContract {
12811 command: Command::ResolveCollectionExport,
12812 action: Action::CollectionExport,
12813 cancellable: true,
12814 mutation: "read_only",
12815 },
12816 CommandContract {
12817 command: Command::VerifyCollectionExport,
12818 action: Action::CollectionExport,
12819 cancellable: true,
12820 mutation: "read_only",
12821 },
12822 CommandContract {
12823 command: Command::PrepareCollectionExportRetirement,
12824 action: Action::CollectionExport,
12825 cancellable: true,
12826 mutation: "read_only_prepare",
12827 },
12828 CommandContract {
12829 command: Command::StartCollectionExportRetirement,
12830 action: Action::CollectionExport,
12831 cancellable: true,
12832 mutation: "portability_submit",
12833 },
12834 CommandContract {
12835 command: Command::ResolveCollectionExportRetirement,
12836 action: Action::CollectionExport,
12837 cancellable: true,
12838 mutation: "read_only",
12839 },
12840 CommandContract {
12841 command: Command::PrepareCollectionRestore,
12842 action: Action::CollectionRestore,
12843 cancellable: true,
12844 mutation: "read_only_prepare",
12845 },
12846 CommandContract {
12847 command: Command::StartCollectionRestore,
12848 action: Action::CollectionRestore,
12849 cancellable: true,
12850 mutation: "portability_submit",
12851 },
12852 CommandContract {
12853 command: Command::ResolveCollectionRestore,
12854 action: Action::CollectionRestore,
12855 cancellable: true,
12856 mutation: "read_only",
12857 },
12858 CommandContract {
12859 command: Command::PrepareCollectionTransferExport,
12860 action: Action::CollectionTransferExport,
12861 cancellable: true,
12862 mutation: "read_only_prepare",
12863 },
12864 CommandContract {
12865 command: Command::StartCollectionTransferExport,
12866 action: Action::CollectionTransferExport,
12867 cancellable: true,
12868 mutation: "portability_submit",
12869 },
12870 CommandContract {
12871 command: Command::ResolveCollectionTransferExport,
12872 action: Action::CollectionTransferExport,
12873 cancellable: true,
12874 mutation: "read_only",
12875 },
12876 CommandContract {
12877 command: Command::PrepareCollectionTransferRestore,
12878 action: Action::CollectionTransferRestore,
12879 cancellable: true,
12880 mutation: "read_only_prepare",
12881 },
12882 CommandContract {
12883 command: Command::StartCollectionTransferRestore,
12884 action: Action::CollectionTransferRestore,
12885 cancellable: true,
12886 mutation: "portability_submit",
12887 },
12888 CommandContract {
12889 command: Command::ResolveCollectionTransferRestore,
12890 action: Action::CollectionTransferRestore,
12891 cancellable: true,
12892 mutation: "read_only",
12893 },
12894 CommandContract {
12895 command: Command::PrepareCollectionStandbyAdmission,
12896 action: Action::CollectionStandbyAdmission,
12897 cancellable: true,
12898 mutation: "read_only_prepare",
12899 },
12900 CommandContract {
12901 command: Command::StartCollectionStandbyAdmission,
12902 action: Action::CollectionStandbyAdmission,
12903 cancellable: true,
12904 mutation: "portability_submit",
12905 },
12906 CommandContract {
12907 command: Command::ResolveCollectionStandbyAdmission,
12908 action: Action::CollectionStandbyAdmission,
12909 cancellable: true,
12910 mutation: "read_only",
12911 },
12912 CommandContract {
12913 command: Command::PrepareCollectionStandbyActivation,
12914 action: Action::CollectionStandbyActivation,
12915 cancellable: true,
12916 mutation: "read_only_prepare",
12917 },
12918 CommandContract {
12919 command: Command::StartCollectionStandbyActivation,
12920 action: Action::CollectionStandbyActivation,
12921 cancellable: true,
12922 mutation: "portability_submit",
12923 },
12924 CommandContract {
12925 command: Command::ResolveCollectionStandbyActivation,
12926 action: Action::CollectionStandbyActivation,
12927 cancellable: true,
12928 mutation: "read_only",
12929 },
12930 CommandContract {
12931 command: Command::PrepareIndexExport,
12932 action: Action::IndexExport,
12933 cancellable: true,
12934 mutation: "read_only_prepare",
12935 },
12936 CommandContract {
12937 command: Command::StartIndexExport,
12938 action: Action::IndexExport,
12939 cancellable: true,
12940 mutation: "portability_submit",
12941 },
12942 CommandContract {
12943 command: Command::ResolveIndexExport,
12944 action: Action::IndexExport,
12945 cancellable: true,
12946 mutation: "read_only",
12947 },
12948 CommandContract {
12949 command: Command::VerifyIndexExport,
12950 action: Action::IndexExport,
12951 cancellable: true,
12952 mutation: "read_only",
12953 },
12954 CommandContract {
12955 command: Command::PrepareIndexImport,
12956 action: Action::IndexImport,
12957 cancellable: true,
12958 mutation: "read_only_prepare",
12959 },
12960 CommandContract {
12961 command: Command::StartIndexImport,
12962 action: Action::IndexImport,
12963 cancellable: true,
12964 mutation: "portability_submit",
12965 },
12966 CommandContract {
12967 command: Command::ResolveIndexImport,
12968 action: Action::IndexImport,
12969 cancellable: true,
12970 mutation: "read_only",
12971 },
12972 CommandContract {
12973 command: Command::ReadArtifactChunk,
12974 action: Action::OperationRead,
12975 cancellable: true,
12976 mutation: "read_only",
12977 },
12978 CommandContract {
12979 command: Command::ExportUsage,
12980 action: Action::UsageRead,
12981 cancellable: true,
12982 mutation: "read_only",
12983 },
12984 CommandContract {
12985 command: Command::GetStorageUsage,
12986 action: Action::UsageRead,
12987 cancellable: true,
12988 mutation: "read_only",
12989 },
12990 CommandContract {
12991 command: Command::ReadLogicalOccupancy,
12992 action: Action::UsageRead,
12993 cancellable: true,
12994 mutation: "read_only",
12995 },
12996 CommandContract {
12997 command: Command::ExecuteStateRead,
12998 action: Action::DataRead,
12999 cancellable: true,
13000 mutation: "read_only",
13001 },
13002 CommandContract {
13003 command: Command::PrepareStateWrite,
13004 action: Action::DataWrite,
13005 cancellable: true,
13006 mutation: "read_only_prepare",
13007 },
13008 CommandContract {
13009 command: Command::SubmitStateWrite,
13010 action: Action::DataWrite,
13011 cancellable: true,
13012 mutation: "state_submit",
13013 },
13014 CommandContract {
13015 command: Command::ResolveStateWrite,
13016 action: Action::DataRead,
13017 cancellable: true,
13018 mutation: "read_only",
13019 },
13020];
13021#[derive(Clone, Copy, Debug, Eq, PartialEq)]
13022pub struct CommandSemanticContract {
13023 pub command: Command,
13024 pub admissible_errors: &'static [ErrorCode],
13025 pub limit_ids: &'static [&'static str],
13026 pub effect_class: &'static str,
13027 pub risk_flags: &'static [&'static str],
13028 pub capability_family: &'static str,
13029 pub retry_safety: &'static str,
13030 pub identity_requirement: &'static str,
13031 pub resolver: Option<Command>,
13032 pub cancellation: &'static str,
13033 pub side_effects: &'static [&'static str],
13034 pub recovery: &'static str,
13035 pub collection_index_ref: &'static str,
13036}
13037pub const LODESTONE_API_COMMAND_SEMANTICS: &[CommandSemanticContract] = &[
13038 CommandSemanticContract {
13039 command: Command::Discover,
13040 admissible_errors: &[
13041 ErrorCode::Aborted,
13042 ErrorCode::DeadlineExceeded,
13043 ErrorCode::InvalidRequest,
13044 ErrorCode::UnsupportedVersion,
13045 ErrorCode::Unauthenticated,
13046 ErrorCode::PermissionDenied,
13047 ErrorCode::NotFound,
13048 ErrorCode::LimitExceeded,
13049 ErrorCode::CapabilityUnavailable,
13050 ErrorCode::TemporarilyUnavailable,
13051 ErrorCode::Internal,
13052 ],
13053 limit_ids: &["request_bytes", "response_bytes"],
13054 effect_class: "read_only",
13055 risk_flags: &[],
13056 capability_family: "discovery",
13057 retry_safety: "safe",
13058 identity_requirement: "none",
13059 resolver: None,
13060 cancellation: "per_call",
13061 side_effects: &[],
13062 recovery: "retry",
13063 collection_index_ref: "none",
13064 },
13065 CommandSemanticContract {
13066 command: Command::ListIndexes,
13067 admissible_errors: &[
13068 ErrorCode::Aborted,
13069 ErrorCode::DeadlineExceeded,
13070 ErrorCode::InvalidRequest,
13071 ErrorCode::UnsupportedVersion,
13072 ErrorCode::Unauthenticated,
13073 ErrorCode::PermissionDenied,
13074 ErrorCode::NotFound,
13075 ErrorCode::StaleCursor,
13076 ErrorCode::RestartBudgetExhausted,
13077 ErrorCode::LimitExceeded,
13078 ErrorCode::CapabilityUnavailable,
13079 ErrorCode::TemporarilyUnavailable,
13080 ErrorCode::Internal,
13081 ],
13082 limit_ids: &[
13083 "request_bytes",
13084 "response_bytes",
13085 "page_size",
13086 "catalog_page_size",
13087 "catalog_restart_budget",
13088 ],
13089 effect_class: "read_only",
13090 risk_flags: &[],
13091 capability_family: "catalog",
13092 retry_safety: "safe",
13093 identity_requirement: "none",
13094 resolver: None,
13095 cancellation: "per_call",
13096 side_effects: &[],
13097 recovery: "retry",
13098 collection_index_ref: "none",
13099 },
13100 CommandSemanticContract {
13101 command: Command::GetIndex,
13102 admissible_errors: &[
13103 ErrorCode::Aborted,
13104 ErrorCode::DeadlineExceeded,
13105 ErrorCode::InvalidRequest,
13106 ErrorCode::UnsupportedVersion,
13107 ErrorCode::Unauthenticated,
13108 ErrorCode::PermissionDenied,
13109 ErrorCode::NotFound,
13110 ErrorCode::LimitExceeded,
13111 ErrorCode::CapabilityUnavailable,
13112 ErrorCode::TemporarilyUnavailable,
13113 ErrorCode::Internal,
13114 ],
13115 limit_ids: &["request_bytes", "response_bytes"],
13116 effect_class: "read_only",
13117 risk_flags: &[],
13118 capability_family: "catalog",
13119 retry_safety: "safe",
13120 identity_requirement: "none",
13121 resolver: None,
13122 cancellation: "per_call",
13123 side_effects: &[],
13124 recovery: "retry",
13125 collection_index_ref: "none",
13126 },
13127 CommandSemanticContract {
13128 command: Command::ValidateIndexChange,
13129 admissible_errors: &[
13130 ErrorCode::Aborted,
13131 ErrorCode::DeadlineExceeded,
13132 ErrorCode::InvalidRequest,
13133 ErrorCode::UnsupportedVersion,
13134 ErrorCode::Unauthenticated,
13135 ErrorCode::PermissionDenied,
13136 ErrorCode::NotFound,
13137 ErrorCode::LimitExceeded,
13138 ErrorCode::CapabilityUnavailable,
13139 ErrorCode::TemporarilyUnavailable,
13140 ErrorCode::Internal,
13141 ],
13142 limit_ids: &["request_bytes", "response_bytes"],
13143 effect_class: "read_only",
13144 risk_flags: &[],
13145 capability_family: "catalog",
13146 retry_safety: "safe",
13147 identity_requirement: "none",
13148 resolver: None,
13149 cancellation: "per_call",
13150 side_effects: &[],
13151 recovery: "retry",
13152 collection_index_ref: "request_name",
13153 },
13154 CommandSemanticContract {
13155 command: Command::ApplyIndexChange,
13156 admissible_errors: &[
13157 ErrorCode::Aborted,
13158 ErrorCode::DeadlineExceeded,
13159 ErrorCode::InvalidRequest,
13160 ErrorCode::UnsupportedVersion,
13161 ErrorCode::Unauthenticated,
13162 ErrorCode::PermissionDenied,
13163 ErrorCode::NotFound,
13164 ErrorCode::Conflict,
13165 ErrorCode::LimitExceeded,
13166 ErrorCode::CapabilityUnavailable,
13167 ErrorCode::NotSubmitted,
13168 ErrorCode::SubmittedIndeterminate,
13169 ErrorCode::ExpiredUnknown,
13170 ErrorCode::TemporarilyUnavailable,
13171 ErrorCode::Internal,
13172 ],
13173 limit_ids: &["request_bytes", "response_bytes"],
13174 effect_class: "durable_submit",
13175 risk_flags: &[],
13176 capability_family: "catalog",
13177 retry_safety: "safe",
13178 identity_requirement: "caller_action_id",
13179 resolver: Some(Command::ResolveIndexChange),
13180 cancellation: "per_call_until_submission_then_resolve",
13181 side_effects: &["commits_authoritative_state"],
13182 recovery: "resolve_with_resolve_index_change",
13183 collection_index_ref: "request_index",
13184 },
13185 CommandSemanticContract {
13186 command: Command::ResolveIndexChange,
13187 admissible_errors: &[
13188 ErrorCode::Aborted,
13189 ErrorCode::DeadlineExceeded,
13190 ErrorCode::InvalidRequest,
13191 ErrorCode::UnsupportedVersion,
13192 ErrorCode::Unauthenticated,
13193 ErrorCode::PermissionDenied,
13194 ErrorCode::NotFound,
13195 ErrorCode::LimitExceeded,
13196 ErrorCode::CapabilityUnavailable,
13197 ErrorCode::TemporarilyUnavailable,
13198 ErrorCode::Internal,
13199 ],
13200 limit_ids: &["request_bytes", "response_bytes"],
13201 effect_class: "read_only",
13202 risk_flags: &[],
13203 capability_family: "catalog",
13204 retry_safety: "safe",
13205 identity_requirement: "caller_action_id",
13206 resolver: None,
13207 cancellation: "per_call",
13208 side_effects: &[],
13209 recovery: "retry",
13210 collection_index_ref: "request_index",
13211 },
13212 CommandSemanticContract {
13213 command: Command::ApplyAdministrationMutation,
13214 admissible_errors: &[
13215 ErrorCode::Aborted,
13216 ErrorCode::DeadlineExceeded,
13217 ErrorCode::InvalidRequest,
13218 ErrorCode::UnsupportedVersion,
13219 ErrorCode::Unauthenticated,
13220 ErrorCode::PermissionDenied,
13221 ErrorCode::NotFound,
13222 ErrorCode::Conflict,
13223 ErrorCode::LimitExceeded,
13224 ErrorCode::CapabilityUnavailable,
13225 ErrorCode::NotSubmitted,
13226 ErrorCode::SubmittedIndeterminate,
13227 ErrorCode::ExpiredUnknown,
13228 ErrorCode::TemporarilyUnavailable,
13229 ErrorCode::Internal,
13230 ],
13231 limit_ids: &["request_bytes", "response_bytes"],
13232 effect_class: "control_write",
13233 risk_flags: &[],
13234 capability_family: "lifecycle",
13235 retry_safety: "pre_submit_only",
13236 identity_requirement: "caller_action_id",
13237 resolver: None,
13238 cancellation: "per_call_until_submission_then_resolve",
13239 side_effects: &["commits_authoritative_state"],
13240 recovery: "retry_if_not_submitted",
13241 collection_index_ref: "none",
13242 },
13243 CommandSemanticContract {
13244 command: Command::ListAliases,
13245 admissible_errors: &[
13246 ErrorCode::Aborted,
13247 ErrorCode::DeadlineExceeded,
13248 ErrorCode::InvalidRequest,
13249 ErrorCode::UnsupportedVersion,
13250 ErrorCode::Unauthenticated,
13251 ErrorCode::PermissionDenied,
13252 ErrorCode::NotFound,
13253 ErrorCode::StaleCursor,
13254 ErrorCode::RestartBudgetExhausted,
13255 ErrorCode::LimitExceeded,
13256 ErrorCode::CapabilityUnavailable,
13257 ErrorCode::TemporarilyUnavailable,
13258 ErrorCode::Internal,
13259 ],
13260 limit_ids: &[
13261 "request_bytes",
13262 "response_bytes",
13263 "page_size",
13264 "catalog_page_size",
13265 "catalog_restart_budget",
13266 ],
13267 effect_class: "read_only",
13268 risk_flags: &[],
13269 capability_family: "catalog",
13270 retry_safety: "safe",
13271 identity_requirement: "none",
13272 resolver: None,
13273 cancellation: "per_call",
13274 side_effects: &[],
13275 recovery: "retry",
13276 collection_index_ref: "none",
13277 },
13278 CommandSemanticContract {
13279 command: Command::GetAlias,
13280 admissible_errors: &[
13281 ErrorCode::Aborted,
13282 ErrorCode::DeadlineExceeded,
13283 ErrorCode::InvalidRequest,
13284 ErrorCode::UnsupportedVersion,
13285 ErrorCode::Unauthenticated,
13286 ErrorCode::PermissionDenied,
13287 ErrorCode::NotFound,
13288 ErrorCode::LimitExceeded,
13289 ErrorCode::CapabilityUnavailable,
13290 ErrorCode::TemporarilyUnavailable,
13291 ErrorCode::Internal,
13292 ],
13293 limit_ids: &["request_bytes", "response_bytes"],
13294 effect_class: "read_only",
13295 risk_flags: &[],
13296 capability_family: "catalog",
13297 retry_safety: "safe",
13298 identity_requirement: "none",
13299 resolver: None,
13300 cancellation: "per_call",
13301 side_effects: &[],
13302 recovery: "retry",
13303 collection_index_ref: "none",
13304 },
13305 CommandSemanticContract {
13306 command: Command::ListDataStreams,
13307 admissible_errors: &[
13308 ErrorCode::Aborted,
13309 ErrorCode::DeadlineExceeded,
13310 ErrorCode::InvalidRequest,
13311 ErrorCode::UnsupportedVersion,
13312 ErrorCode::Unauthenticated,
13313 ErrorCode::PermissionDenied,
13314 ErrorCode::NotFound,
13315 ErrorCode::StaleCursor,
13316 ErrorCode::RestartBudgetExhausted,
13317 ErrorCode::LimitExceeded,
13318 ErrorCode::CapabilityUnavailable,
13319 ErrorCode::TemporarilyUnavailable,
13320 ErrorCode::Internal,
13321 ],
13322 limit_ids: &[
13323 "request_bytes",
13324 "response_bytes",
13325 "page_size",
13326 "catalog_page_size",
13327 "catalog_restart_budget",
13328 ],
13329 effect_class: "read_only",
13330 risk_flags: &[],
13331 capability_family: "catalog",
13332 retry_safety: "safe",
13333 identity_requirement: "none",
13334 resolver: None,
13335 cancellation: "per_call",
13336 side_effects: &[],
13337 recovery: "retry",
13338 collection_index_ref: "none",
13339 },
13340 CommandSemanticContract {
13341 command: Command::GetDataStream,
13342 admissible_errors: &[
13343 ErrorCode::Aborted,
13344 ErrorCode::DeadlineExceeded,
13345 ErrorCode::InvalidRequest,
13346 ErrorCode::UnsupportedVersion,
13347 ErrorCode::Unauthenticated,
13348 ErrorCode::PermissionDenied,
13349 ErrorCode::NotFound,
13350 ErrorCode::LimitExceeded,
13351 ErrorCode::CapabilityUnavailable,
13352 ErrorCode::TemporarilyUnavailable,
13353 ErrorCode::Internal,
13354 ],
13355 limit_ids: &["request_bytes", "response_bytes"],
13356 effect_class: "read_only",
13357 risk_flags: &[],
13358 capability_family: "catalog",
13359 retry_safety: "safe",
13360 identity_requirement: "none",
13361 resolver: None,
13362 cancellation: "per_call",
13363 side_effects: &[],
13364 recovery: "retry",
13365 collection_index_ref: "none",
13366 },
13367 CommandSemanticContract {
13368 command: Command::ListComponentTemplates,
13369 admissible_errors: &[
13370 ErrorCode::Aborted,
13371 ErrorCode::DeadlineExceeded,
13372 ErrorCode::InvalidRequest,
13373 ErrorCode::UnsupportedVersion,
13374 ErrorCode::Unauthenticated,
13375 ErrorCode::PermissionDenied,
13376 ErrorCode::NotFound,
13377 ErrorCode::StaleCursor,
13378 ErrorCode::RestartBudgetExhausted,
13379 ErrorCode::LimitExceeded,
13380 ErrorCode::CapabilityUnavailable,
13381 ErrorCode::TemporarilyUnavailable,
13382 ErrorCode::Internal,
13383 ],
13384 limit_ids: &[
13385 "request_bytes",
13386 "response_bytes",
13387 "page_size",
13388 "catalog_page_size",
13389 "catalog_restart_budget",
13390 ],
13391 effect_class: "read_only",
13392 risk_flags: &[],
13393 capability_family: "catalog",
13394 retry_safety: "safe",
13395 identity_requirement: "none",
13396 resolver: None,
13397 cancellation: "per_call",
13398 side_effects: &[],
13399 recovery: "retry",
13400 collection_index_ref: "none",
13401 },
13402 CommandSemanticContract {
13403 command: Command::GetComponentTemplate,
13404 admissible_errors: &[
13405 ErrorCode::Aborted,
13406 ErrorCode::DeadlineExceeded,
13407 ErrorCode::InvalidRequest,
13408 ErrorCode::UnsupportedVersion,
13409 ErrorCode::Unauthenticated,
13410 ErrorCode::PermissionDenied,
13411 ErrorCode::NotFound,
13412 ErrorCode::LimitExceeded,
13413 ErrorCode::CapabilityUnavailable,
13414 ErrorCode::TemporarilyUnavailable,
13415 ErrorCode::Internal,
13416 ],
13417 limit_ids: &["request_bytes", "response_bytes"],
13418 effect_class: "read_only",
13419 risk_flags: &[],
13420 capability_family: "catalog",
13421 retry_safety: "safe",
13422 identity_requirement: "none",
13423 resolver: None,
13424 cancellation: "per_call",
13425 side_effects: &[],
13426 recovery: "retry",
13427 collection_index_ref: "none",
13428 },
13429 CommandSemanticContract {
13430 command: Command::ListIndexTemplates,
13431 admissible_errors: &[
13432 ErrorCode::Aborted,
13433 ErrorCode::DeadlineExceeded,
13434 ErrorCode::InvalidRequest,
13435 ErrorCode::UnsupportedVersion,
13436 ErrorCode::Unauthenticated,
13437 ErrorCode::PermissionDenied,
13438 ErrorCode::NotFound,
13439 ErrorCode::StaleCursor,
13440 ErrorCode::RestartBudgetExhausted,
13441 ErrorCode::LimitExceeded,
13442 ErrorCode::CapabilityUnavailable,
13443 ErrorCode::TemporarilyUnavailable,
13444 ErrorCode::Internal,
13445 ],
13446 limit_ids: &[
13447 "request_bytes",
13448 "response_bytes",
13449 "page_size",
13450 "catalog_page_size",
13451 "catalog_restart_budget",
13452 ],
13453 effect_class: "read_only",
13454 risk_flags: &[],
13455 capability_family: "catalog",
13456 retry_safety: "safe",
13457 identity_requirement: "none",
13458 resolver: None,
13459 cancellation: "per_call",
13460 side_effects: &[],
13461 recovery: "retry",
13462 collection_index_ref: "none",
13463 },
13464 CommandSemanticContract {
13465 command: Command::GetIndexTemplate,
13466 admissible_errors: &[
13467 ErrorCode::Aborted,
13468 ErrorCode::DeadlineExceeded,
13469 ErrorCode::InvalidRequest,
13470 ErrorCode::UnsupportedVersion,
13471 ErrorCode::Unauthenticated,
13472 ErrorCode::PermissionDenied,
13473 ErrorCode::NotFound,
13474 ErrorCode::LimitExceeded,
13475 ErrorCode::CapabilityUnavailable,
13476 ErrorCode::TemporarilyUnavailable,
13477 ErrorCode::Internal,
13478 ],
13479 limit_ids: &["request_bytes", "response_bytes"],
13480 effect_class: "read_only",
13481 risk_flags: &[],
13482 capability_family: "catalog",
13483 retry_safety: "safe",
13484 identity_requirement: "none",
13485 resolver: None,
13486 cancellation: "per_call",
13487 side_effects: &[],
13488 recovery: "retry",
13489 collection_index_ref: "none",
13490 },
13491 CommandSemanticContract {
13492 command: Command::ListIngestPipelines,
13493 admissible_errors: &[
13494 ErrorCode::Aborted,
13495 ErrorCode::DeadlineExceeded,
13496 ErrorCode::InvalidRequest,
13497 ErrorCode::UnsupportedVersion,
13498 ErrorCode::Unauthenticated,
13499 ErrorCode::PermissionDenied,
13500 ErrorCode::NotFound,
13501 ErrorCode::StaleCursor,
13502 ErrorCode::RestartBudgetExhausted,
13503 ErrorCode::LimitExceeded,
13504 ErrorCode::CapabilityUnavailable,
13505 ErrorCode::TemporarilyUnavailable,
13506 ErrorCode::Internal,
13507 ],
13508 limit_ids: &[
13509 "request_bytes",
13510 "response_bytes",
13511 "page_size",
13512 "catalog_page_size",
13513 "catalog_restart_budget",
13514 ],
13515 effect_class: "read_only",
13516 risk_flags: &[],
13517 capability_family: "lifecycle",
13518 retry_safety: "safe",
13519 identity_requirement: "none",
13520 resolver: None,
13521 cancellation: "per_call",
13522 side_effects: &[],
13523 recovery: "retry",
13524 collection_index_ref: "none",
13525 },
13526 CommandSemanticContract {
13527 command: Command::GetIngestPipeline,
13528 admissible_errors: &[
13529 ErrorCode::Aborted,
13530 ErrorCode::DeadlineExceeded,
13531 ErrorCode::InvalidRequest,
13532 ErrorCode::UnsupportedVersion,
13533 ErrorCode::Unauthenticated,
13534 ErrorCode::PermissionDenied,
13535 ErrorCode::NotFound,
13536 ErrorCode::LimitExceeded,
13537 ErrorCode::CapabilityUnavailable,
13538 ErrorCode::TemporarilyUnavailable,
13539 ErrorCode::Internal,
13540 ],
13541 limit_ids: &["request_bytes", "response_bytes"],
13542 effect_class: "read_only",
13543 risk_flags: &[],
13544 capability_family: "lifecycle",
13545 retry_safety: "safe",
13546 identity_requirement: "none",
13547 resolver: None,
13548 cancellation: "per_call",
13549 side_effects: &[],
13550 recovery: "retry",
13551 collection_index_ref: "none",
13552 },
13553 CommandSemanticContract {
13554 command: Command::SimulateIngestPipeline,
13555 admissible_errors: &[
13556 ErrorCode::Aborted,
13557 ErrorCode::DeadlineExceeded,
13558 ErrorCode::InvalidRequest,
13559 ErrorCode::UnsupportedVersion,
13560 ErrorCode::Unauthenticated,
13561 ErrorCode::PermissionDenied,
13562 ErrorCode::NotFound,
13563 ErrorCode::LimitExceeded,
13564 ErrorCode::CapabilityUnavailable,
13565 ErrorCode::TemporarilyUnavailable,
13566 ErrorCode::Internal,
13567 ],
13568 limit_ids: &["request_bytes", "response_bytes"],
13569 effect_class: "read_only",
13570 risk_flags: &[],
13571 capability_family: "lifecycle",
13572 retry_safety: "safe",
13573 identity_requirement: "none",
13574 resolver: None,
13575 cancellation: "per_call",
13576 side_effects: &[],
13577 recovery: "retry",
13578 collection_index_ref: "none",
13579 },
13580 CommandSemanticContract {
13581 command: Command::ReprocessByQuery,
13582 admissible_errors: &[
13583 ErrorCode::Aborted,
13584 ErrorCode::DeadlineExceeded,
13585 ErrorCode::InvalidRequest,
13586 ErrorCode::UnsupportedVersion,
13587 ErrorCode::Unauthenticated,
13588 ErrorCode::PermissionDenied,
13589 ErrorCode::NotFound,
13590 ErrorCode::Conflict,
13591 ErrorCode::LimitExceeded,
13592 ErrorCode::CapabilityUnavailable,
13593 ErrorCode::NotSubmitted,
13594 ErrorCode::SubmittedIndeterminate,
13595 ErrorCode::ExpiredUnknown,
13596 ErrorCode::TemporarilyUnavailable,
13597 ErrorCode::Internal,
13598 ],
13599 limit_ids: &["request_bytes", "response_bytes"],
13600 effect_class: "durable_submit",
13601 risk_flags: &[],
13602 capability_family: "data",
13603 retry_safety: "safe",
13604 identity_requirement: "caller_action_id",
13605 resolver: None,
13606 cancellation: "per_call_until_submission_then_resolve",
13607 side_effects: &["commits_authoritative_state"],
13608 recovery: "retry",
13609 collection_index_ref: "request_index",
13610 },
13611 CommandSemanticContract {
13612 command: Command::ListLifecyclePolicies,
13613 admissible_errors: &[
13614 ErrorCode::Aborted,
13615 ErrorCode::DeadlineExceeded,
13616 ErrorCode::InvalidRequest,
13617 ErrorCode::UnsupportedVersion,
13618 ErrorCode::Unauthenticated,
13619 ErrorCode::PermissionDenied,
13620 ErrorCode::NotFound,
13621 ErrorCode::StaleCursor,
13622 ErrorCode::RestartBudgetExhausted,
13623 ErrorCode::LimitExceeded,
13624 ErrorCode::CapabilityUnavailable,
13625 ErrorCode::TemporarilyUnavailable,
13626 ErrorCode::Internal,
13627 ],
13628 limit_ids: &[
13629 "request_bytes",
13630 "response_bytes",
13631 "page_size",
13632 "catalog_page_size",
13633 "catalog_restart_budget",
13634 ],
13635 effect_class: "read_only",
13636 risk_flags: &[],
13637 capability_family: "catalog",
13638 retry_safety: "safe",
13639 identity_requirement: "none",
13640 resolver: None,
13641 cancellation: "per_call",
13642 side_effects: &[],
13643 recovery: "retry",
13644 collection_index_ref: "none",
13645 },
13646 CommandSemanticContract {
13647 command: Command::GetLifecyclePolicy,
13648 admissible_errors: &[
13649 ErrorCode::Aborted,
13650 ErrorCode::DeadlineExceeded,
13651 ErrorCode::InvalidRequest,
13652 ErrorCode::UnsupportedVersion,
13653 ErrorCode::Unauthenticated,
13654 ErrorCode::PermissionDenied,
13655 ErrorCode::NotFound,
13656 ErrorCode::LimitExceeded,
13657 ErrorCode::CapabilityUnavailable,
13658 ErrorCode::TemporarilyUnavailable,
13659 ErrorCode::Internal,
13660 ],
13661 limit_ids: &["request_bytes", "response_bytes"],
13662 effect_class: "read_only",
13663 risk_flags: &[],
13664 capability_family: "catalog",
13665 retry_safety: "safe",
13666 identity_requirement: "none",
13667 resolver: None,
13668 cancellation: "per_call",
13669 side_effects: &[],
13670 recovery: "retry",
13671 collection_index_ref: "none",
13672 },
13673 CommandSemanticContract {
13674 command: Command::PrepareCreateIndex,
13675 admissible_errors: &[
13676 ErrorCode::Aborted,
13677 ErrorCode::DeadlineExceeded,
13678 ErrorCode::InvalidRequest,
13679 ErrorCode::UnsupportedVersion,
13680 ErrorCode::Unauthenticated,
13681 ErrorCode::PermissionDenied,
13682 ErrorCode::NotFound,
13683 ErrorCode::LimitExceeded,
13684 ErrorCode::CapabilityUnavailable,
13685 ErrorCode::TemporarilyUnavailable,
13686 ErrorCode::Internal,
13687 ],
13688 limit_ids: &[
13689 "request_bytes",
13690 "response_bytes",
13691 "resource_initial_shards",
13692 "resource_target_shard_bytes",
13693 "resource_admission_weight",
13694 "resource_ram_bytes",
13695 "resource_nvme_bytes",
13696 "resource_refresh_millis",
13697 "resource_memtable_bytes",
13698 "resource_parallelism",
13699 ],
13700 effect_class: "prepare",
13701 risk_flags: &[],
13702 capability_family: "catalog",
13703 retry_safety: "safe",
13704 identity_requirement: "server_locator",
13705 resolver: None,
13706 cancellation: "per_call",
13707 side_effects: &["creates_bounded_preparation"],
13708 recovery: "retry",
13709 collection_index_ref: "request_name",
13710 },
13711 CommandSemanticContract {
13712 command: Command::PrepareDeleteIndex,
13713 admissible_errors: &[
13714 ErrorCode::Aborted,
13715 ErrorCode::DeadlineExceeded,
13716 ErrorCode::InvalidRequest,
13717 ErrorCode::UnsupportedVersion,
13718 ErrorCode::Unauthenticated,
13719 ErrorCode::PermissionDenied,
13720 ErrorCode::NotFound,
13721 ErrorCode::LimitExceeded,
13722 ErrorCode::CapabilityUnavailable,
13723 ErrorCode::TemporarilyUnavailable,
13724 ErrorCode::Internal,
13725 ],
13726 limit_ids: &["request_bytes", "response_bytes"],
13727 effect_class: "prepare",
13728 risk_flags: &["destructive"],
13729 capability_family: "catalog",
13730 retry_safety: "safe",
13731 identity_requirement: "server_locator",
13732 resolver: None,
13733 cancellation: "per_call",
13734 side_effects: &["creates_bounded_preparation"],
13735 recovery: "retry",
13736 collection_index_ref: "request_name",
13737 },
13738 CommandSemanticContract {
13739 command: Command::SubmitCatalogAction,
13740 admissible_errors: &[
13741 ErrorCode::Aborted,
13742 ErrorCode::DeadlineExceeded,
13743 ErrorCode::InvalidRequest,
13744 ErrorCode::UnsupportedVersion,
13745 ErrorCode::Unauthenticated,
13746 ErrorCode::PermissionDenied,
13747 ErrorCode::NotFound,
13748 ErrorCode::Conflict,
13749 ErrorCode::LimitExceeded,
13750 ErrorCode::CapabilityUnavailable,
13751 ErrorCode::NotSubmitted,
13752 ErrorCode::SubmittedIndeterminate,
13753 ErrorCode::ExpiredUnknown,
13754 ErrorCode::TemporarilyUnavailable,
13755 ErrorCode::Internal,
13756 ],
13757 limit_ids: &[
13758 "request_bytes",
13759 "response_bytes",
13760 "resource_initial_shards",
13761 "resource_target_shard_bytes",
13762 "resource_admission_weight",
13763 "resource_ram_bytes",
13764 "resource_nvme_bytes",
13765 "resource_refresh_millis",
13766 "resource_memtable_bytes",
13767 "resource_parallelism",
13768 ],
13769 effect_class: "durable_submit",
13770 risk_flags: &[],
13771 capability_family: "catalog",
13772 retry_safety: "pre_submit_only",
13773 identity_requirement: "request_locator",
13774 resolver: Some(Command::ResolveCatalogAction),
13775 cancellation: "per_call_until_submission_then_resolve",
13776 side_effects: &["commits_authoritative_state"],
13777 recovery: "resolve_with_resolve_catalog_action",
13778 collection_index_ref: "request_name",
13779 },
13780 CommandSemanticContract {
13781 command: Command::ResolveCatalogAction,
13782 admissible_errors: &[
13783 ErrorCode::Aborted,
13784 ErrorCode::DeadlineExceeded,
13785 ErrorCode::InvalidRequest,
13786 ErrorCode::UnsupportedVersion,
13787 ErrorCode::Unauthenticated,
13788 ErrorCode::PermissionDenied,
13789 ErrorCode::NotFound,
13790 ErrorCode::LimitExceeded,
13791 ErrorCode::CapabilityUnavailable,
13792 ErrorCode::TemporarilyUnavailable,
13793 ErrorCode::Internal,
13794 ],
13795 limit_ids: &["request_bytes", "response_bytes"],
13796 effect_class: "read_only",
13797 risk_flags: &[],
13798 capability_family: "catalog",
13799 retry_safety: "safe",
13800 identity_requirement: "request_locator",
13801 resolver: None,
13802 cancellation: "per_call",
13803 side_effects: &[],
13804 recovery: "retry",
13805 collection_index_ref: "caller",
13806 },
13807 CommandSemanticContract {
13808 command: Command::PrepareReplayableSourceIndex,
13809 admissible_errors: &[
13810 ErrorCode::Aborted,
13811 ErrorCode::DeadlineExceeded,
13812 ErrorCode::InvalidRequest,
13813 ErrorCode::UnsupportedVersion,
13814 ErrorCode::Unauthenticated,
13815 ErrorCode::PermissionDenied,
13816 ErrorCode::NotFound,
13817 ErrorCode::LimitExceeded,
13818 ErrorCode::CapabilityUnavailable,
13819 ErrorCode::RetentionGap,
13820 ErrorCode::TemporarilyUnavailable,
13821 ErrorCode::Internal,
13822 ],
13823 limit_ids: &[
13824 "request_bytes",
13825 "response_bytes",
13826 "resource_initial_shards",
13827 "resource_target_shard_bytes",
13828 "resource_admission_weight",
13829 "resource_ram_bytes",
13830 "resource_nvme_bytes",
13831 "resource_refresh_millis",
13832 "resource_memtable_bytes",
13833 "resource_parallelism",
13834 ],
13835 effect_class: "prepare",
13836 risk_flags: &[],
13837 capability_family: "catalog",
13838 retry_safety: "safe",
13839 identity_requirement: "server_locator",
13840 resolver: None,
13841 cancellation: "per_call",
13842 side_effects: &["creates_bounded_preparation"],
13843 recovery: "retry",
13844 collection_index_ref: "request_name",
13845 },
13846 CommandSemanticContract {
13847 command: Command::SubmitReplayableSourceIndex,
13848 admissible_errors: &[
13849 ErrorCode::Aborted,
13850 ErrorCode::DeadlineExceeded,
13851 ErrorCode::InvalidRequest,
13852 ErrorCode::UnsupportedVersion,
13853 ErrorCode::Unauthenticated,
13854 ErrorCode::PermissionDenied,
13855 ErrorCode::NotFound,
13856 ErrorCode::Conflict,
13857 ErrorCode::LimitExceeded,
13858 ErrorCode::CapabilityUnavailable,
13859 ErrorCode::NotSubmitted,
13860 ErrorCode::SubmittedIndeterminate,
13861 ErrorCode::ExpiredUnknown,
13862 ErrorCode::RetentionGap,
13863 ErrorCode::TemporarilyUnavailable,
13864 ErrorCode::Internal,
13865 ],
13866 limit_ids: &[
13867 "request_bytes",
13868 "response_bytes",
13869 "resource_initial_shards",
13870 "resource_target_shard_bytes",
13871 "resource_admission_weight",
13872 "resource_ram_bytes",
13873 "resource_nvme_bytes",
13874 "resource_refresh_millis",
13875 "resource_memtable_bytes",
13876 "resource_parallelism",
13877 ],
13878 effect_class: "durable_submit",
13879 risk_flags: &[],
13880 capability_family: "catalog",
13881 retry_safety: "pre_submit_only",
13882 identity_requirement: "request_locator",
13883 resolver: Some(Command::ResolveCatalogAction),
13884 cancellation: "per_call_until_submission_then_resolve",
13885 side_effects: &["commits_authoritative_state"],
13886 recovery: "resolve_with_resolve_catalog_action",
13887 collection_index_ref: "request_name",
13888 },
13889 CommandSemanticContract {
13890 command: Command::GetReplayableSource,
13891 admissible_errors: &[
13892 ErrorCode::Aborted,
13893 ErrorCode::DeadlineExceeded,
13894 ErrorCode::InvalidRequest,
13895 ErrorCode::UnsupportedVersion,
13896 ErrorCode::Unauthenticated,
13897 ErrorCode::PermissionDenied,
13898 ErrorCode::NotFound,
13899 ErrorCode::LimitExceeded,
13900 ErrorCode::CapabilityUnavailable,
13901 ErrorCode::RetentionGap,
13902 ErrorCode::TemporarilyUnavailable,
13903 ErrorCode::Internal,
13904 ],
13905 limit_ids: &["request_bytes", "response_bytes"],
13906 effect_class: "read_only",
13907 risk_flags: &[],
13908 capability_family: "catalog",
13909 retry_safety: "safe",
13910 identity_requirement: "none",
13911 resolver: None,
13912 cancellation: "per_call",
13913 side_effects: &[],
13914 recovery: "retry",
13915 collection_index_ref: "none",
13916 },
13917 CommandSemanticContract {
13918 command: Command::ControlReplayableSource,
13919 admissible_errors: &[
13920 ErrorCode::Aborted,
13921 ErrorCode::DeadlineExceeded,
13922 ErrorCode::InvalidRequest,
13923 ErrorCode::UnsupportedVersion,
13924 ErrorCode::Unauthenticated,
13925 ErrorCode::PermissionDenied,
13926 ErrorCode::NotFound,
13927 ErrorCode::Conflict,
13928 ErrorCode::LimitExceeded,
13929 ErrorCode::CapabilityUnavailable,
13930 ErrorCode::NotSubmitted,
13931 ErrorCode::SubmittedIndeterminate,
13932 ErrorCode::ExpiredUnknown,
13933 ErrorCode::RetentionGap,
13934 ErrorCode::TemporarilyUnavailable,
13935 ErrorCode::Internal,
13936 ],
13937 limit_ids: &["request_bytes", "response_bytes"],
13938 effect_class: "durable_submit",
13939 risk_flags: &[],
13940 capability_family: "catalog",
13941 retry_safety: "pre_submit_only",
13942 identity_requirement: "none",
13943 resolver: None,
13944 cancellation: "per_call_until_submission_then_resolve",
13945 side_effects: &["commits_authoritative_state"],
13946 recovery: "retry_if_not_submitted",
13947 collection_index_ref: "request_index",
13948 },
13949 CommandSemanticContract {
13950 command: Command::CloneIndex,
13951 admissible_errors: &[
13952 ErrorCode::Aborted,
13953 ErrorCode::DeadlineExceeded,
13954 ErrorCode::InvalidRequest,
13955 ErrorCode::UnsupportedVersion,
13956 ErrorCode::Unauthenticated,
13957 ErrorCode::PermissionDenied,
13958 ErrorCode::NotFound,
13959 ErrorCode::Conflict,
13960 ErrorCode::LimitExceeded,
13961 ErrorCode::CapabilityUnavailable,
13962 ErrorCode::NotSubmitted,
13963 ErrorCode::SubmittedIndeterminate,
13964 ErrorCode::ExpiredUnknown,
13965 ErrorCode::TemporarilyUnavailable,
13966 ErrorCode::Internal,
13967 ],
13968 limit_ids: &["request_bytes", "response_bytes"],
13969 effect_class: "durable_submit",
13970 risk_flags: &[],
13971 capability_family: "catalog",
13972 retry_safety: "pre_submit_only",
13973 identity_requirement: "caller_action_id",
13974 resolver: Some(Command::CloneIndex),
13975 cancellation: "per_call_until_submission_then_resolve",
13976 side_effects: &["commits_authoritative_state"],
13977 recovery: "resolve_with_clone_index",
13978 collection_index_ref: "caller",
13979 },
13980 CommandSemanticContract {
13981 command: Command::ConfigureHistory,
13982 admissible_errors: &[
13983 ErrorCode::Aborted,
13984 ErrorCode::DeadlineExceeded,
13985 ErrorCode::InvalidRequest,
13986 ErrorCode::UnsupportedVersion,
13987 ErrorCode::Unauthenticated,
13988 ErrorCode::PermissionDenied,
13989 ErrorCode::NotFound,
13990 ErrorCode::Conflict,
13991 ErrorCode::LimitExceeded,
13992 ErrorCode::CapabilityUnavailable,
13993 ErrorCode::NotSubmitted,
13994 ErrorCode::SubmittedIndeterminate,
13995 ErrorCode::ExpiredUnknown,
13996 ErrorCode::TemporarilyUnavailable,
13997 ErrorCode::Internal,
13998 ],
13999 limit_ids: &["request_bytes", "response_bytes"],
14000 effect_class: "durable_submit",
14001 risk_flags: &[],
14002 capability_family: "catalog",
14003 retry_safety: "pre_submit_only",
14004 identity_requirement: "none",
14005 resolver: Some(Command::GetHistory),
14006 cancellation: "per_call_until_submission_then_resolve",
14007 side_effects: &["commits_authoritative_state"],
14008 recovery: "resolve_with_get_history",
14009 collection_index_ref: "request_index",
14010 },
14011 CommandSemanticContract {
14012 command: Command::GetHistory,
14013 admissible_errors: &[
14014 ErrorCode::Aborted,
14015 ErrorCode::DeadlineExceeded,
14016 ErrorCode::InvalidRequest,
14017 ErrorCode::UnsupportedVersion,
14018 ErrorCode::Unauthenticated,
14019 ErrorCode::PermissionDenied,
14020 ErrorCode::NotFound,
14021 ErrorCode::LimitExceeded,
14022 ErrorCode::CapabilityUnavailable,
14023 ErrorCode::TemporarilyUnavailable,
14024 ErrorCode::Internal,
14025 ],
14026 limit_ids: &["request_bytes", "response_bytes"],
14027 effect_class: "read_only",
14028 risk_flags: &[],
14029 capability_family: "catalog",
14030 retry_safety: "safe",
14031 identity_requirement: "none",
14032 resolver: None,
14033 cancellation: "per_call",
14034 side_effects: &[],
14035 recovery: "retry",
14036 collection_index_ref: "none",
14037 },
14038 CommandSemanticContract {
14039 command: Command::ResolveHistory,
14040 admissible_errors: &[
14041 ErrorCode::Aborted,
14042 ErrorCode::DeadlineExceeded,
14043 ErrorCode::InvalidRequest,
14044 ErrorCode::UnsupportedVersion,
14045 ErrorCode::Unauthenticated,
14046 ErrorCode::PermissionDenied,
14047 ErrorCode::NotFound,
14048 ErrorCode::LimitExceeded,
14049 ErrorCode::CapabilityUnavailable,
14050 ErrorCode::RetentionGap,
14051 ErrorCode::TemporarilyUnavailable,
14052 ErrorCode::Internal,
14053 ],
14054 limit_ids: &["request_bytes", "response_bytes"],
14055 effect_class: "read_only",
14056 risk_flags: &[],
14057 capability_family: "data",
14058 retry_safety: "safe",
14059 identity_requirement: "none",
14060 resolver: None,
14061 cancellation: "per_call",
14062 side_effects: &[],
14063 recovery: "retry",
14064 collection_index_ref: "request_index",
14065 },
14066 CommandSemanticContract {
14067 command: Command::PlaceHistoryHold,
14068 admissible_errors: &[
14069 ErrorCode::Aborted,
14070 ErrorCode::DeadlineExceeded,
14071 ErrorCode::InvalidRequest,
14072 ErrorCode::UnsupportedVersion,
14073 ErrorCode::Unauthenticated,
14074 ErrorCode::PermissionDenied,
14075 ErrorCode::NotFound,
14076 ErrorCode::Conflict,
14077 ErrorCode::LimitExceeded,
14078 ErrorCode::CapabilityUnavailable,
14079 ErrorCode::NotSubmitted,
14080 ErrorCode::SubmittedIndeterminate,
14081 ErrorCode::ExpiredUnknown,
14082 ErrorCode::TemporarilyUnavailable,
14083 ErrorCode::Internal,
14084 ],
14085 limit_ids: &["request_bytes", "response_bytes"],
14086 effect_class: "durable_submit",
14087 risk_flags: &[],
14088 capability_family: "catalog",
14089 retry_safety: "pre_submit_only",
14090 identity_requirement: "none",
14091 resolver: Some(Command::GetHistory),
14092 cancellation: "per_call_until_submission_then_resolve",
14093 side_effects: &["commits_authoritative_state"],
14094 recovery: "resolve_with_get_history",
14095 collection_index_ref: "request_index",
14096 },
14097 CommandSemanticContract {
14098 command: Command::ReleaseHistoryHold,
14099 admissible_errors: &[
14100 ErrorCode::Aborted,
14101 ErrorCode::DeadlineExceeded,
14102 ErrorCode::InvalidRequest,
14103 ErrorCode::UnsupportedVersion,
14104 ErrorCode::Unauthenticated,
14105 ErrorCode::PermissionDenied,
14106 ErrorCode::NotFound,
14107 ErrorCode::Conflict,
14108 ErrorCode::LimitExceeded,
14109 ErrorCode::CapabilityUnavailable,
14110 ErrorCode::NotSubmitted,
14111 ErrorCode::SubmittedIndeterminate,
14112 ErrorCode::ExpiredUnknown,
14113 ErrorCode::TemporarilyUnavailable,
14114 ErrorCode::Internal,
14115 ],
14116 limit_ids: &["request_bytes", "response_bytes"],
14117 effect_class: "durable_submit",
14118 risk_flags: &[],
14119 capability_family: "catalog",
14120 retry_safety: "pre_submit_only",
14121 identity_requirement: "none",
14122 resolver: Some(Command::GetHistory),
14123 cancellation: "per_call_until_submission_then_resolve",
14124 side_effects: &["commits_authoritative_state"],
14125 recovery: "resolve_with_get_history",
14126 collection_index_ref: "request_index",
14127 },
14128 CommandSemanticContract {
14129 command: Command::PrepareDocumentMutation,
14130 admissible_errors: &[
14131 ErrorCode::Aborted,
14132 ErrorCode::DeadlineExceeded,
14133 ErrorCode::InvalidRequest,
14134 ErrorCode::UnsupportedVersion,
14135 ErrorCode::Unauthenticated,
14136 ErrorCode::PermissionDenied,
14137 ErrorCode::NotFound,
14138 ErrorCode::LimitExceeded,
14139 ErrorCode::CapabilityUnavailable,
14140 ErrorCode::TemporarilyUnavailable,
14141 ErrorCode::Internal,
14142 ],
14143 limit_ids: &["request_bytes", "response_bytes"],
14144 effect_class: "prepare",
14145 risk_flags: &[],
14146 capability_family: "data",
14147 retry_safety: "safe",
14148 identity_requirement: "server_locator",
14149 resolver: None,
14150 cancellation: "per_call",
14151 side_effects: &["creates_bounded_preparation"],
14152 recovery: "retry",
14153 collection_index_ref: "request_index",
14154 },
14155 CommandSemanticContract {
14156 command: Command::SubmitDocumentMutation,
14157 admissible_errors: &[
14158 ErrorCode::Aborted,
14159 ErrorCode::DeadlineExceeded,
14160 ErrorCode::InvalidRequest,
14161 ErrorCode::UnsupportedVersion,
14162 ErrorCode::Unauthenticated,
14163 ErrorCode::PermissionDenied,
14164 ErrorCode::NotFound,
14165 ErrorCode::Conflict,
14166 ErrorCode::LimitExceeded,
14167 ErrorCode::CapabilityUnavailable,
14168 ErrorCode::NotSubmitted,
14169 ErrorCode::SubmittedIndeterminate,
14170 ErrorCode::ExpiredUnknown,
14171 ErrorCode::TemporarilyUnavailable,
14172 ErrorCode::Internal,
14173 ],
14174 limit_ids: &["request_bytes", "response_bytes"],
14175 effect_class: "durable_submit",
14176 risk_flags: &[],
14177 capability_family: "data",
14178 retry_safety: "pre_submit_only",
14179 identity_requirement: "request_locator",
14180 resolver: Some(Command::ResolveDocumentMutation),
14181 cancellation: "per_call_until_submission_then_resolve",
14182 side_effects: &["commits_authoritative_state"],
14183 recovery: "resolve_with_resolve_document_mutation",
14184 collection_index_ref: "request_index",
14185 },
14186 CommandSemanticContract {
14187 command: Command::PrepareDocumentBulk,
14188 admissible_errors: &[
14189 ErrorCode::Aborted,
14190 ErrorCode::DeadlineExceeded,
14191 ErrorCode::InvalidRequest,
14192 ErrorCode::UnsupportedVersion,
14193 ErrorCode::Unauthenticated,
14194 ErrorCode::PermissionDenied,
14195 ErrorCode::NotFound,
14196 ErrorCode::LimitExceeded,
14197 ErrorCode::CapabilityUnavailable,
14198 ErrorCode::TemporarilyUnavailable,
14199 ErrorCode::Internal,
14200 ],
14201 limit_ids: &[
14202 "request_bytes",
14203 "response_bytes",
14204 "bulk_document_items",
14205 "bulk_document_bytes",
14206 ],
14207 effect_class: "prepare",
14208 risk_flags: &[],
14209 capability_family: "data",
14210 retry_safety: "safe",
14211 identity_requirement: "caller_action_id",
14212 resolver: None,
14213 cancellation: "per_call",
14214 side_effects: &["creates_bounded_preparation"],
14215 recovery: "retry",
14216 collection_index_ref: "request_index",
14217 },
14218 CommandSemanticContract {
14219 command: Command::SubmitDocumentBulk,
14220 admissible_errors: &[
14221 ErrorCode::Aborted,
14222 ErrorCode::DeadlineExceeded,
14223 ErrorCode::InvalidRequest,
14224 ErrorCode::UnsupportedVersion,
14225 ErrorCode::Unauthenticated,
14226 ErrorCode::PermissionDenied,
14227 ErrorCode::NotFound,
14228 ErrorCode::Conflict,
14229 ErrorCode::LimitExceeded,
14230 ErrorCode::CapabilityUnavailable,
14231 ErrorCode::NotSubmitted,
14232 ErrorCode::SubmittedIndeterminate,
14233 ErrorCode::ExpiredUnknown,
14234 ErrorCode::TemporarilyUnavailable,
14235 ErrorCode::Internal,
14236 ],
14237 limit_ids: &[
14238 "request_bytes",
14239 "response_bytes",
14240 "bulk_document_items",
14241 "bulk_document_bytes",
14242 ],
14243 effect_class: "durable_submit",
14244 risk_flags: &[],
14245 capability_family: "data",
14246 retry_safety: "pre_submit_only",
14247 identity_requirement: "caller_action_id",
14248 resolver: Some(Command::ResolveDocumentBulk),
14249 cancellation: "per_call_until_submission_then_resolve",
14250 side_effects: &["commits_authoritative_state"],
14251 recovery: "resolve_with_resolve_document_bulk",
14252 collection_index_ref: "request_index",
14253 },
14254 CommandSemanticContract {
14255 command: Command::ResolveDocumentBulk,
14256 admissible_errors: &[
14257 ErrorCode::Aborted,
14258 ErrorCode::DeadlineExceeded,
14259 ErrorCode::InvalidRequest,
14260 ErrorCode::UnsupportedVersion,
14261 ErrorCode::Unauthenticated,
14262 ErrorCode::PermissionDenied,
14263 ErrorCode::NotFound,
14264 ErrorCode::LimitExceeded,
14265 ErrorCode::CapabilityUnavailable,
14266 ErrorCode::TemporarilyUnavailable,
14267 ErrorCode::Internal,
14268 ],
14269 limit_ids: &[
14270 "request_bytes",
14271 "response_bytes",
14272 "bulk_document_items",
14273 "bulk_document_bytes",
14274 ],
14275 effect_class: "read_only",
14276 risk_flags: &[],
14277 capability_family: "data",
14278 retry_safety: "safe",
14279 identity_requirement: "caller_action_id",
14280 resolver: None,
14281 cancellation: "per_call",
14282 side_effects: &[],
14283 recovery: "retry",
14284 collection_index_ref: "request_index",
14285 },
14286 CommandSemanticContract {
14287 command: Command::PrepareAppendBulk,
14288 admissible_errors: &[
14289 ErrorCode::Aborted,
14290 ErrorCode::DeadlineExceeded,
14291 ErrorCode::InvalidRequest,
14292 ErrorCode::UnsupportedVersion,
14293 ErrorCode::Unauthenticated,
14294 ErrorCode::PermissionDenied,
14295 ErrorCode::NotFound,
14296 ErrorCode::LimitExceeded,
14297 ErrorCode::CapabilityUnavailable,
14298 ErrorCode::TemporarilyUnavailable,
14299 ErrorCode::Internal,
14300 ],
14301 limit_ids: &[
14302 "request_bytes",
14303 "response_bytes",
14304 "bulk_document_items",
14305 "bulk_document_bytes",
14306 ],
14307 effect_class: "prepare",
14308 risk_flags: &[],
14309 capability_family: "data",
14310 retry_safety: "safe",
14311 identity_requirement: "caller_action_id",
14312 resolver: None,
14313 cancellation: "per_call",
14314 side_effects: &[],
14315 recovery: "retry",
14316 collection_index_ref: "request_index",
14317 },
14318 CommandSemanticContract {
14319 command: Command::SubmitAppendBulk,
14320 admissible_errors: &[
14321 ErrorCode::Aborted,
14322 ErrorCode::DeadlineExceeded,
14323 ErrorCode::InvalidRequest,
14324 ErrorCode::UnsupportedVersion,
14325 ErrorCode::Unauthenticated,
14326 ErrorCode::PermissionDenied,
14327 ErrorCode::NotFound,
14328 ErrorCode::Conflict,
14329 ErrorCode::LimitExceeded,
14330 ErrorCode::CapabilityUnavailable,
14331 ErrorCode::NotSubmitted,
14332 ErrorCode::SubmittedIndeterminate,
14333 ErrorCode::TemporarilyUnavailable,
14334 ErrorCode::Internal,
14335 ],
14336 limit_ids: &[
14337 "request_bytes",
14338 "response_bytes",
14339 "bulk_document_items",
14340 "bulk_document_bytes",
14341 ],
14342 effect_class: "durable_submit",
14343 risk_flags: &[],
14344 capability_family: "data",
14345 retry_safety: "pre_submit_only",
14346 identity_requirement: "request_locator",
14347 resolver: Some(Command::ResolveAppendBulk),
14348 cancellation: "per_call_until_submission_then_resolve",
14349 side_effects: &["commits_authoritative_state"],
14350 recovery: "resolve_with_resolve_append_bulk",
14351 collection_index_ref: "request_index",
14352 },
14353 CommandSemanticContract {
14354 command: Command::ResolveAppendBulk,
14355 admissible_errors: &[
14356 ErrorCode::Aborted,
14357 ErrorCode::DeadlineExceeded,
14358 ErrorCode::InvalidRequest,
14359 ErrorCode::UnsupportedVersion,
14360 ErrorCode::Unauthenticated,
14361 ErrorCode::PermissionDenied,
14362 ErrorCode::NotFound,
14363 ErrorCode::Conflict,
14364 ErrorCode::LimitExceeded,
14365 ErrorCode::CapabilityUnavailable,
14366 ErrorCode::TemporarilyUnavailable,
14367 ErrorCode::Internal,
14368 ],
14369 limit_ids: &[
14370 "request_bytes",
14371 "response_bytes",
14372 "bulk_document_items",
14373 "bulk_document_bytes",
14374 ],
14375 effect_class: "read_only",
14376 risk_flags: &[],
14377 capability_family: "data",
14378 retry_safety: "safe",
14379 identity_requirement: "request_locator",
14380 resolver: None,
14381 cancellation: "per_call",
14382 side_effects: &[],
14383 recovery: "retry",
14384 collection_index_ref: "request_index",
14385 },
14386 CommandSemanticContract {
14387 command: Command::ObserveAppendCommitted,
14388 admissible_errors: &[
14389 ErrorCode::Aborted,
14390 ErrorCode::DeadlineExceeded,
14391 ErrorCode::InvalidRequest,
14392 ErrorCode::UnsupportedVersion,
14393 ErrorCode::Unauthenticated,
14394 ErrorCode::PermissionDenied,
14395 ErrorCode::NotFound,
14396 ErrorCode::Conflict,
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: "data",
14406 retry_safety: "safe",
14407 identity_requirement: "request_locator",
14408 resolver: None,
14409 cancellation: "per_call",
14410 side_effects: &[],
14411 recovery: "retry",
14412 collection_index_ref: "request_index",
14413 },
14414 CommandSemanticContract {
14415 command: Command::ResolveDocumentMutation,
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: "data",
14433 retry_safety: "safe",
14434 identity_requirement: "request_locator",
14435 resolver: None,
14436 cancellation: "per_call",
14437 side_effects: &[],
14438 recovery: "retry",
14439 collection_index_ref: "caller",
14440 },
14441 CommandSemanticContract {
14442 command: Command::GetDocument,
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::LimitExceeded,
14452 ErrorCode::CapabilityUnavailable,
14453 ErrorCode::TemporarilyUnavailable,
14454 ErrorCode::Internal,
14455 ],
14456 limit_ids: &["request_bytes", "response_bytes"],
14457 effect_class: "read_only",
14458 risk_flags: &[],
14459 capability_family: "data",
14460 retry_safety: "safe",
14461 identity_requirement: "none",
14462 resolver: None,
14463 cancellation: "per_call",
14464 side_effects: &[],
14465 recovery: "retry",
14466 collection_index_ref: "request_index",
14467 },
14468 CommandSemanticContract {
14469 command: Command::Search,
14470 admissible_errors: &[
14471 ErrorCode::Aborted,
14472 ErrorCode::DeadlineExceeded,
14473 ErrorCode::InvalidRequest,
14474 ErrorCode::UnsupportedVersion,
14475 ErrorCode::Unauthenticated,
14476 ErrorCode::PermissionDenied,
14477 ErrorCode::NotFound,
14478 ErrorCode::StaleCursor,
14479 ErrorCode::RestartBudgetExhausted,
14480 ErrorCode::LimitExceeded,
14481 ErrorCode::CapabilityUnavailable,
14482 ErrorCode::TemporarilyUnavailable,
14483 ErrorCode::Internal,
14484 ],
14485 limit_ids: &[
14486 "request_bytes",
14487 "response_bytes",
14488 "page_size",
14489 "query_clauses",
14490 "aggregation_nodes",
14491 "aggregation_buckets",
14492 "routing_values",
14493 "routing_value_bytes",
14494 "query_recursion_depth",
14495 "text_query_bytes",
14496 "text_query_fields",
14497 "text_query_slop",
14498 "text_query_boost",
14499 "text_query_fuzzy_expansions",
14500 "text_query_fuzzy_distance",
14501 "text_query_dictionary_scan_terms",
14502 "text_query_dictionary_scan_bytes",
14503 "text_query_fuzzy_work_units",
14504 "vector_dimensions",
14505 "vector_query_bytes",
14506 "vector_request_bytes",
14507 "vector_candidates",
14508 "vector_set_query_vectors",
14509 "vector_set_query_bytes",
14510 "retrieval_branches",
14511 "retrieval_branch_name_bytes",
14512 "retrieval_window",
14513 "fragment_fields",
14514 "fragments_per_field",
14515 "fragment_bytes",
14516 "fragment_total_bytes",
14517 "result_feature_hits",
14518 "result_features",
14519 "diversification_fields",
14520 "diversification_per_group",
14521 "source_projection_patterns",
14522 "source_projection_pattern_bytes",
14523 "search_result_window",
14524 ],
14525 effect_class: "read_only",
14526 risk_flags: &[],
14527 capability_family: "data",
14528 retry_safety: "safe",
14529 identity_requirement: "none",
14530 resolver: None,
14531 cancellation: "per_call",
14532 side_effects: &[],
14533 recovery: "retry",
14534 collection_index_ref: "request_indexes_or_pit_authority",
14535 },
14536 CommandSemanticContract {
14537 command: Command::TraverseRelationships,
14538 admissible_errors: &[
14539 ErrorCode::Aborted,
14540 ErrorCode::DeadlineExceeded,
14541 ErrorCode::InvalidRequest,
14542 ErrorCode::UnsupportedVersion,
14543 ErrorCode::Unauthenticated,
14544 ErrorCode::PermissionDenied,
14545 ErrorCode::NotFound,
14546 ErrorCode::LimitExceeded,
14547 ErrorCode::CapabilityUnavailable,
14548 ErrorCode::TemporarilyUnavailable,
14549 ErrorCode::Internal,
14550 ],
14551 limit_ids: &[
14552 "request_bytes",
14553 "response_bytes",
14554 "relationship_indexes",
14555 "relationship_seeds",
14556 "relationship_filter_values",
14557 "relationship_depth",
14558 "relationship_fan_out",
14559 "relationship_visited_entities",
14560 "relationship_visited_records",
14561 "relationship_returned_records",
14562 "relationship_memory_bytes",
14563 "search_result_window",
14564 ],
14565 effect_class: "read_only",
14566 risk_flags: &[],
14567 capability_family: "data",
14568 retry_safety: "safe",
14569 identity_requirement: "none",
14570 resolver: None,
14571 cancellation: "per_call",
14572 side_effects: &[],
14573 recovery: "retry",
14574 collection_index_ref: "pit_authority",
14575 },
14576 CommandSemanticContract {
14577 command: Command::QueryProfiles,
14578 admissible_errors: &[
14579 ErrorCode::Aborted,
14580 ErrorCode::DeadlineExceeded,
14581 ErrorCode::InvalidRequest,
14582 ErrorCode::UnsupportedVersion,
14583 ErrorCode::Unauthenticated,
14584 ErrorCode::PermissionDenied,
14585 ErrorCode::NotFound,
14586 ErrorCode::LimitExceeded,
14587 ErrorCode::CapabilityUnavailable,
14588 ErrorCode::TemporarilyUnavailable,
14589 ErrorCode::Internal,
14590 ],
14591 limit_ids: &[
14592 "request_bytes",
14593 "response_bytes",
14594 "profile_indexes",
14595 "profile_filter_values",
14596 "profile_batches",
14597 "profile_samples",
14598 "profile_results",
14599 "profile_memory_bytes",
14600 "search_result_window",
14601 ],
14602 effect_class: "read_only",
14603 risk_flags: &[],
14604 capability_family: "data",
14605 retry_safety: "safe",
14606 identity_requirement: "none",
14607 resolver: None,
14608 cancellation: "per_call",
14609 side_effects: &[],
14610 recovery: "retry",
14611 collection_index_ref: "pit_authority",
14612 },
14613 CommandSemanticContract {
14614 command: Command::EvaluateTemporalEvidence,
14615 admissible_errors: &[
14616 ErrorCode::Aborted,
14617 ErrorCode::DeadlineExceeded,
14618 ErrorCode::InvalidRequest,
14619 ErrorCode::UnsupportedVersion,
14620 ErrorCode::Unauthenticated,
14621 ErrorCode::PermissionDenied,
14622 ErrorCode::NotFound,
14623 ErrorCode::LimitExceeded,
14624 ErrorCode::CapabilityUnavailable,
14625 ErrorCode::TemporarilyUnavailable,
14626 ErrorCode::Internal,
14627 ],
14628 limit_ids: &[
14629 "request_bytes",
14630 "response_bytes",
14631 "query_clauses",
14632 "query_recursion_depth",
14633 "search_result_window",
14634 "temporal_inputs",
14635 "temporal_pattern_nodes",
14636 "temporal_pattern_depth",
14637 "temporal_pattern_branches",
14638 "temporal_correlation_keys",
14639 "temporal_events",
14640 "temporal_states",
14641 "temporal_captured_events",
14642 "temporal_results",
14643 "temporal_state_bytes",
14644 "temporal_interval_nanos",
14645 ],
14646 effect_class: "read_only",
14647 risk_flags: &[],
14648 capability_family: "data",
14649 retry_safety: "safe",
14650 identity_requirement: "none",
14651 resolver: None,
14652 cancellation: "per_call",
14653 side_effects: &[],
14654 recovery: "retry",
14655 collection_index_ref: "pit_authority",
14656 },
14657 CommandSemanticContract {
14658 command: Command::CreateContinuousTemporalEvaluation,
14659 admissible_errors: &[
14660 ErrorCode::Aborted,
14661 ErrorCode::DeadlineExceeded,
14662 ErrorCode::InvalidRequest,
14663 ErrorCode::UnsupportedVersion,
14664 ErrorCode::Unauthenticated,
14665 ErrorCode::PermissionDenied,
14666 ErrorCode::NotFound,
14667 ErrorCode::Conflict,
14668 ErrorCode::LimitExceeded,
14669 ErrorCode::CapabilityUnavailable,
14670 ErrorCode::NotSubmitted,
14671 ErrorCode::SubmittedIndeterminate,
14672 ErrorCode::TemporarilyUnavailable,
14673 ErrorCode::Internal,
14674 ],
14675 limit_ids: &[
14676 "request_bytes",
14677 "response_bytes",
14678 "temporal_inputs",
14679 "temporal_pattern_nodes",
14680 "temporal_pattern_depth",
14681 "temporal_pattern_branches",
14682 "temporal_correlation_keys",
14683 "temporal_events",
14684 "temporal_states",
14685 "temporal_captured_events",
14686 "temporal_results",
14687 "temporal_state_bytes",
14688 "temporal_interval_nanos",
14689 ],
14690 effect_class: "durable_submit",
14691 risk_flags: &[],
14692 capability_family: "lifecycle",
14693 retry_safety: "pre_submit_only",
14694 identity_requirement: "caller_action_id",
14695 resolver: Some(Command::GetContinuousTemporalEvaluation),
14696 cancellation: "per_call_until_submission_then_resolve",
14697 side_effects: &["commits_authoritative_state"],
14698 recovery: "resolve_with_get_continuous_temporal_evaluation",
14699 collection_index_ref: "request_temporal_inputs",
14700 },
14701 CommandSemanticContract {
14702 command: Command::GetContinuousTemporalEvaluation,
14703 admissible_errors: &[
14704 ErrorCode::Aborted,
14705 ErrorCode::DeadlineExceeded,
14706 ErrorCode::InvalidRequest,
14707 ErrorCode::UnsupportedVersion,
14708 ErrorCode::Unauthenticated,
14709 ErrorCode::PermissionDenied,
14710 ErrorCode::NotFound,
14711 ErrorCode::LimitExceeded,
14712 ErrorCode::CapabilityUnavailable,
14713 ErrorCode::TemporarilyUnavailable,
14714 ErrorCode::Internal,
14715 ],
14716 limit_ids: &["request_bytes", "response_bytes"],
14717 effect_class: "read_only",
14718 risk_flags: &[],
14719 capability_family: "lifecycle",
14720 retry_safety: "safe",
14721 identity_requirement: "none",
14722 resolver: None,
14723 cancellation: "per_call",
14724 side_effects: &[],
14725 recovery: "retry",
14726 collection_index_ref: "request_evaluation",
14727 },
14728 CommandSemanticContract {
14729 command: Command::PauseContinuousTemporalEvaluation,
14730 admissible_errors: &[
14731 ErrorCode::Aborted,
14732 ErrorCode::DeadlineExceeded,
14733 ErrorCode::InvalidRequest,
14734 ErrorCode::UnsupportedVersion,
14735 ErrorCode::Unauthenticated,
14736 ErrorCode::PermissionDenied,
14737 ErrorCode::NotFound,
14738 ErrorCode::Conflict,
14739 ErrorCode::LimitExceeded,
14740 ErrorCode::CapabilityUnavailable,
14741 ErrorCode::NotSubmitted,
14742 ErrorCode::SubmittedIndeterminate,
14743 ErrorCode::TemporarilyUnavailable,
14744 ErrorCode::Internal,
14745 ],
14746 limit_ids: &["request_bytes", "response_bytes"],
14747 effect_class: "durable_submit",
14748 risk_flags: &[],
14749 capability_family: "lifecycle",
14750 retry_safety: "pre_submit_only",
14751 identity_requirement: "caller_action_id",
14752 resolver: Some(Command::GetContinuousTemporalEvaluation),
14753 cancellation: "per_call_until_submission_then_resolve",
14754 side_effects: &["commits_authoritative_state"],
14755 recovery: "resolve_with_get_continuous_temporal_evaluation",
14756 collection_index_ref: "request_evaluation",
14757 },
14758 CommandSemanticContract {
14759 command: Command::ResumeContinuousTemporalEvaluation,
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::Conflict,
14769 ErrorCode::LimitExceeded,
14770 ErrorCode::CapabilityUnavailable,
14771 ErrorCode::NotSubmitted,
14772 ErrorCode::SubmittedIndeterminate,
14773 ErrorCode::TemporarilyUnavailable,
14774 ErrorCode::Internal,
14775 ],
14776 limit_ids: &["request_bytes", "response_bytes"],
14777 effect_class: "durable_submit",
14778 risk_flags: &[],
14779 capability_family: "lifecycle",
14780 retry_safety: "pre_submit_only",
14781 identity_requirement: "caller_action_id",
14782 resolver: Some(Command::GetContinuousTemporalEvaluation),
14783 cancellation: "per_call_until_submission_then_resolve",
14784 side_effects: &["commits_authoritative_state"],
14785 recovery: "resolve_with_get_continuous_temporal_evaluation",
14786 collection_index_ref: "request_evaluation",
14787 },
14788 CommandSemanticContract {
14789 command: Command::ReplaceContinuousTemporalEvaluation,
14790 admissible_errors: &[
14791 ErrorCode::Aborted,
14792 ErrorCode::DeadlineExceeded,
14793 ErrorCode::InvalidRequest,
14794 ErrorCode::UnsupportedVersion,
14795 ErrorCode::Unauthenticated,
14796 ErrorCode::PermissionDenied,
14797 ErrorCode::NotFound,
14798 ErrorCode::Conflict,
14799 ErrorCode::LimitExceeded,
14800 ErrorCode::CapabilityUnavailable,
14801 ErrorCode::NotSubmitted,
14802 ErrorCode::SubmittedIndeterminate,
14803 ErrorCode::TemporarilyUnavailable,
14804 ErrorCode::Internal,
14805 ],
14806 limit_ids: &[
14807 "request_bytes",
14808 "response_bytes",
14809 "temporal_inputs",
14810 "temporal_pattern_nodes",
14811 "temporal_pattern_depth",
14812 "temporal_pattern_branches",
14813 "temporal_correlation_keys",
14814 "temporal_events",
14815 "temporal_states",
14816 "temporal_captured_events",
14817 "temporal_results",
14818 "temporal_state_bytes",
14819 "temporal_interval_nanos",
14820 ],
14821 effect_class: "durable_submit",
14822 risk_flags: &[],
14823 capability_family: "lifecycle",
14824 retry_safety: "pre_submit_only",
14825 identity_requirement: "caller_action_id",
14826 resolver: Some(Command::GetContinuousTemporalEvaluation),
14827 cancellation: "per_call_until_submission_then_resolve",
14828 side_effects: &["commits_authoritative_state"],
14829 recovery: "resolve_with_get_continuous_temporal_evaluation",
14830 collection_index_ref: "request_temporal_inputs",
14831 },
14832 CommandSemanticContract {
14833 command: Command::RetireContinuousTemporalEvaluation,
14834 admissible_errors: &[
14835 ErrorCode::Aborted,
14836 ErrorCode::DeadlineExceeded,
14837 ErrorCode::InvalidRequest,
14838 ErrorCode::UnsupportedVersion,
14839 ErrorCode::Unauthenticated,
14840 ErrorCode::PermissionDenied,
14841 ErrorCode::NotFound,
14842 ErrorCode::Conflict,
14843 ErrorCode::LimitExceeded,
14844 ErrorCode::CapabilityUnavailable,
14845 ErrorCode::NotSubmitted,
14846 ErrorCode::SubmittedIndeterminate,
14847 ErrorCode::TemporarilyUnavailable,
14848 ErrorCode::Internal,
14849 ],
14850 limit_ids: &["request_bytes", "response_bytes"],
14851 effect_class: "durable_submit",
14852 risk_flags: &["destructive"],
14853 capability_family: "lifecycle",
14854 retry_safety: "pre_submit_only",
14855 identity_requirement: "caller_action_id",
14856 resolver: Some(Command::GetContinuousTemporalEvaluation),
14857 cancellation: "per_call_until_submission_then_resolve",
14858 side_effects: &["commits_authoritative_state"],
14859 recovery: "resolve_with_get_continuous_temporal_evaluation",
14860 collection_index_ref: "request_evaluation",
14861 },
14862 CommandSemanticContract {
14863 command: Command::ReadContinuousTemporalEvidence,
14864 admissible_errors: &[
14865 ErrorCode::Aborted,
14866 ErrorCode::DeadlineExceeded,
14867 ErrorCode::InvalidRequest,
14868 ErrorCode::UnsupportedVersion,
14869 ErrorCode::Unauthenticated,
14870 ErrorCode::PermissionDenied,
14871 ErrorCode::NotFound,
14872 ErrorCode::Conflict,
14873 ErrorCode::RetentionGap,
14874 ErrorCode::LimitExceeded,
14875 ErrorCode::CapabilityUnavailable,
14876 ErrorCode::TemporarilyUnavailable,
14877 ErrorCode::Internal,
14878 ],
14879 limit_ids: &["request_bytes", "response_bytes", "page_size", "temporal_results"],
14880 effect_class: "read_only",
14881 risk_flags: &[],
14882 capability_family: "data",
14883 retry_safety: "safe",
14884 identity_requirement: "none",
14885 resolver: None,
14886 cancellation: "per_call",
14887 side_effects: &[],
14888 recovery: "retry",
14889 collection_index_ref: "request_evaluation",
14890 },
14891 CommandSemanticContract {
14892 command: Command::ValidateSearch,
14893 admissible_errors: &[
14894 ErrorCode::Aborted,
14895 ErrorCode::DeadlineExceeded,
14896 ErrorCode::InvalidRequest,
14897 ErrorCode::UnsupportedVersion,
14898 ErrorCode::Unauthenticated,
14899 ErrorCode::PermissionDenied,
14900 ErrorCode::NotFound,
14901 ErrorCode::LimitExceeded,
14902 ErrorCode::CapabilityUnavailable,
14903 ErrorCode::TemporarilyUnavailable,
14904 ErrorCode::Internal,
14905 ],
14906 limit_ids: &[
14907 "request_bytes",
14908 "response_bytes",
14909 "page_size",
14910 "query_clauses",
14911 "aggregation_nodes",
14912 "aggregation_buckets",
14913 "routing_values",
14914 "routing_value_bytes",
14915 "query_recursion_depth",
14916 "source_projection_patterns",
14917 "source_projection_pattern_bytes",
14918 "search_result_window",
14919 ],
14920 effect_class: "read_only",
14921 risk_flags: &[],
14922 capability_family: "data",
14923 retry_safety: "safe",
14924 identity_requirement: "none",
14925 resolver: None,
14926 cancellation: "per_call",
14927 side_effects: &[],
14928 recovery: "retry",
14929 collection_index_ref: "request_indexes_uniform",
14930 },
14931 CommandSemanticContract {
14932 command: Command::MaterializeTableSnapshot,
14933 admissible_errors: &[
14934 ErrorCode::Aborted,
14935 ErrorCode::DeadlineExceeded,
14936 ErrorCode::InvalidRequest,
14937 ErrorCode::UnsupportedVersion,
14938 ErrorCode::Unauthenticated,
14939 ErrorCode::PermissionDenied,
14940 ErrorCode::NotFound,
14941 ErrorCode::Conflict,
14942 ErrorCode::LimitExceeded,
14943 ErrorCode::CapabilityUnavailable,
14944 ErrorCode::NotSubmitted,
14945 ErrorCode::SubmittedIndeterminate,
14946 ErrorCode::ExpiredUnknown,
14947 ErrorCode::ChecksumMismatch,
14948 ErrorCode::TemporarilyUnavailable,
14949 ErrorCode::Internal,
14950 ],
14951 limit_ids: &[
14952 "request_bytes",
14953 "response_bytes",
14954 "table_snapshot_objects",
14955 "table_snapshot_ttl_millis",
14956 "table_snapshot_read_bytes",
14957 ],
14958 effect_class: "durable_submit",
14959 risk_flags: &[],
14960 capability_family: "data",
14961 retry_safety: "pre_submit_only",
14962 identity_requirement: "caller_action_id",
14963 resolver: Some(Command::ResolveTableSnapshot),
14964 cancellation: "per_call_until_submission_then_resolve",
14965 side_effects: &["creates_bounded_preparation", "commits_authoritative_state"],
14966 recovery: "resolve_with_resolve_table_snapshot",
14967 collection_index_ref: "request_index",
14968 },
14969 CommandSemanticContract {
14970 command: Command::ResolveTableSnapshot,
14971 admissible_errors: &[
14972 ErrorCode::Aborted,
14973 ErrorCode::DeadlineExceeded,
14974 ErrorCode::InvalidRequest,
14975 ErrorCode::UnsupportedVersion,
14976 ErrorCode::Unauthenticated,
14977 ErrorCode::PermissionDenied,
14978 ErrorCode::NotFound,
14979 ErrorCode::Conflict,
14980 ErrorCode::LimitExceeded,
14981 ErrorCode::CapabilityUnavailable,
14982 ErrorCode::ExpiredUnknown,
14983 ErrorCode::ChecksumMismatch,
14984 ErrorCode::TemporarilyUnavailable,
14985 ErrorCode::Internal,
14986 ],
14987 limit_ids: &[
14988 "request_bytes",
14989 "response_bytes",
14990 "table_snapshot_objects",
14991 "table_snapshot_ttl_millis",
14992 "table_snapshot_read_bytes",
14993 ],
14994 effect_class: "read_only",
14995 risk_flags: &[],
14996 capability_family: "data",
14997 retry_safety: "safe",
14998 identity_requirement: "caller_action_id",
14999 resolver: None,
15000 cancellation: "per_call",
15001 side_effects: &[],
15002 recovery: "retry",
15003 collection_index_ref: "request_index",
15004 },
15005 CommandSemanticContract {
15006 command: Command::ReadTableSnapshot,
15007 admissible_errors: &[
15008 ErrorCode::Aborted,
15009 ErrorCode::DeadlineExceeded,
15010 ErrorCode::InvalidRequest,
15011 ErrorCode::UnsupportedVersion,
15012 ErrorCode::Unauthenticated,
15013 ErrorCode::PermissionDenied,
15014 ErrorCode::NotFound,
15015 ErrorCode::Conflict,
15016 ErrorCode::LimitExceeded,
15017 ErrorCode::CapabilityUnavailable,
15018 ErrorCode::ArtifactRangeInvalid,
15019 ErrorCode::ChecksumMismatch,
15020 ErrorCode::TemporarilyUnavailable,
15021 ErrorCode::Internal,
15022 ],
15023 limit_ids: &["request_bytes", "response_bytes", "table_snapshot_read_bytes"],
15024 effect_class: "read_only",
15025 risk_flags: &[],
15026 capability_family: "data",
15027 retry_safety: "safe",
15028 identity_requirement: "request_locator",
15029 resolver: None,
15030 cancellation: "per_call",
15031 side_effects: &[],
15032 recovery: "retry",
15033 collection_index_ref: "request_index",
15034 },
15035 CommandSemanticContract {
15036 command: Command::OpenPit,
15037 admissible_errors: &[
15038 ErrorCode::Aborted,
15039 ErrorCode::DeadlineExceeded,
15040 ErrorCode::InvalidRequest,
15041 ErrorCode::UnsupportedVersion,
15042 ErrorCode::Unauthenticated,
15043 ErrorCode::PermissionDenied,
15044 ErrorCode::NotFound,
15045 ErrorCode::Conflict,
15046 ErrorCode::LimitExceeded,
15047 ErrorCode::CapabilityUnavailable,
15048 ErrorCode::NotSubmitted,
15049 ErrorCode::SubmittedIndeterminate,
15050 ErrorCode::ExpiredUnknown,
15051 ErrorCode::TemporarilyUnavailable,
15052 ErrorCode::Internal,
15053 ],
15054 limit_ids: &["request_bytes", "response_bytes"],
15055 effect_class: "lease_renewing_read",
15056 risk_flags: &[],
15057 capability_family: "data",
15058 retry_safety: "pre_submit_only",
15059 identity_requirement: "none",
15060 resolver: None,
15061 cancellation: "per_call_until_submission_then_resolve",
15062 side_effects: &["renews_or_closes_existing_lease"],
15063 recovery: "retry_if_not_submitted",
15064 collection_index_ref: "request_indexes_uniform",
15065 },
15066 CommandSemanticContract {
15067 command: Command::RenewPit,
15068 admissible_errors: &[
15069 ErrorCode::Aborted,
15070 ErrorCode::DeadlineExceeded,
15071 ErrorCode::InvalidRequest,
15072 ErrorCode::UnsupportedVersion,
15073 ErrorCode::Unauthenticated,
15074 ErrorCode::PermissionDenied,
15075 ErrorCode::NotFound,
15076 ErrorCode::Conflict,
15077 ErrorCode::LimitExceeded,
15078 ErrorCode::CapabilityUnavailable,
15079 ErrorCode::NotSubmitted,
15080 ErrorCode::SubmittedIndeterminate,
15081 ErrorCode::ExpiredUnknown,
15082 ErrorCode::TemporarilyUnavailable,
15083 ErrorCode::Internal,
15084 ],
15085 limit_ids: &["request_bytes", "response_bytes"],
15086 effect_class: "lease_renewing_read",
15087 risk_flags: &[],
15088 capability_family: "data",
15089 retry_safety: "pre_submit_only",
15090 identity_requirement: "none",
15091 resolver: None,
15092 cancellation: "per_call_until_submission_then_resolve",
15093 side_effects: &["renews_or_closes_existing_lease"],
15094 recovery: "retry_if_not_submitted",
15095 collection_index_ref: "pit_authority",
15096 },
15097 CommandSemanticContract {
15098 command: Command::ClosePit,
15099 admissible_errors: &[
15100 ErrorCode::Aborted,
15101 ErrorCode::DeadlineExceeded,
15102 ErrorCode::InvalidRequest,
15103 ErrorCode::UnsupportedVersion,
15104 ErrorCode::Unauthenticated,
15105 ErrorCode::PermissionDenied,
15106 ErrorCode::NotFound,
15107 ErrorCode::Conflict,
15108 ErrorCode::LimitExceeded,
15109 ErrorCode::CapabilityUnavailable,
15110 ErrorCode::NotSubmitted,
15111 ErrorCode::SubmittedIndeterminate,
15112 ErrorCode::ExpiredUnknown,
15113 ErrorCode::TemporarilyUnavailable,
15114 ErrorCode::Internal,
15115 ],
15116 limit_ids: &["request_bytes", "response_bytes"],
15117 effect_class: "lease_renewing_read",
15118 risk_flags: &[],
15119 capability_family: "data",
15120 retry_safety: "pre_submit_only",
15121 identity_requirement: "none",
15122 resolver: None,
15123 cancellation: "per_call_until_submission_then_resolve",
15124 side_effects: &["renews_or_closes_existing_lease"],
15125 recovery: "retry_if_not_submitted",
15126 collection_index_ref: "pit_authority",
15127 },
15128 CommandSemanticContract {
15129 command: Command::ListOperations,
15130 admissible_errors: &[
15131 ErrorCode::Aborted,
15132 ErrorCode::DeadlineExceeded,
15133 ErrorCode::InvalidRequest,
15134 ErrorCode::UnsupportedVersion,
15135 ErrorCode::Unauthenticated,
15136 ErrorCode::PermissionDenied,
15137 ErrorCode::NotFound,
15138 ErrorCode::StaleCursor,
15139 ErrorCode::RestartBudgetExhausted,
15140 ErrorCode::LimitExceeded,
15141 ErrorCode::CapabilityUnavailable,
15142 ErrorCode::TemporarilyUnavailable,
15143 ErrorCode::Internal,
15144 ],
15145 limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
15146 effect_class: "read_only",
15147 risk_flags: &[],
15148 capability_family: "operations",
15149 retry_safety: "safe",
15150 identity_requirement: "none",
15151 resolver: None,
15152 cancellation: "per_call",
15153 side_effects: &[],
15154 recovery: "retry",
15155 collection_index_ref: "none",
15156 },
15157 CommandSemanticContract {
15158 command: Command::GetOperation,
15159 admissible_errors: &[
15160 ErrorCode::Aborted,
15161 ErrorCode::DeadlineExceeded,
15162 ErrorCode::InvalidRequest,
15163 ErrorCode::UnsupportedVersion,
15164 ErrorCode::Unauthenticated,
15165 ErrorCode::PermissionDenied,
15166 ErrorCode::NotFound,
15167 ErrorCode::LimitExceeded,
15168 ErrorCode::CapabilityUnavailable,
15169 ErrorCode::TemporarilyUnavailable,
15170 ErrorCode::Internal,
15171 ],
15172 limit_ids: &["request_bytes", "response_bytes"],
15173 effect_class: "read_only",
15174 risk_flags: &[],
15175 capability_family: "operations",
15176 retry_safety: "safe",
15177 identity_requirement: "request_locator",
15178 resolver: None,
15179 cancellation: "per_call",
15180 side_effects: &[],
15181 recovery: "retry",
15182 collection_index_ref: "none",
15183 },
15184 CommandSemanticContract {
15185 command: Command::WaitOperation,
15186 admissible_errors: &[
15187 ErrorCode::Aborted,
15188 ErrorCode::DeadlineExceeded,
15189 ErrorCode::InvalidRequest,
15190 ErrorCode::UnsupportedVersion,
15191 ErrorCode::Unauthenticated,
15192 ErrorCode::PermissionDenied,
15193 ErrorCode::NotFound,
15194 ErrorCode::Conflict,
15195 ErrorCode::LimitExceeded,
15196 ErrorCode::CapabilityUnavailable,
15197 ErrorCode::TemporarilyUnavailable,
15198 ErrorCode::Internal,
15199 ],
15200 limit_ids: &[
15201 "request_bytes",
15202 "response_bytes",
15203 "operation_wait_attempts",
15204 "operation_wait_interval_millis",
15205 ],
15206 effect_class: "read_only",
15207 risk_flags: &[],
15208 capability_family: "operations",
15209 retry_safety: "safe",
15210 identity_requirement: "request_locator",
15211 resolver: None,
15212 cancellation: "per_call",
15213 side_effects: &[],
15214 recovery: "retry",
15215 collection_index_ref: "none",
15216 },
15217 CommandSemanticContract {
15218 command: Command::CancelOperation,
15219 admissible_errors: &[
15220 ErrorCode::Aborted,
15221 ErrorCode::DeadlineExceeded,
15222 ErrorCode::InvalidRequest,
15223 ErrorCode::UnsupportedVersion,
15224 ErrorCode::Unauthenticated,
15225 ErrorCode::PermissionDenied,
15226 ErrorCode::NotFound,
15227 ErrorCode::Conflict,
15228 ErrorCode::LimitExceeded,
15229 ErrorCode::CapabilityUnavailable,
15230 ErrorCode::NotSubmitted,
15231 ErrorCode::SubmittedIndeterminate,
15232 ErrorCode::ExpiredUnknown,
15233 ErrorCode::TemporarilyUnavailable,
15234 ErrorCode::Internal,
15235 ],
15236 limit_ids: &["request_bytes", "response_bytes"],
15237 effect_class: "control_write",
15238 risk_flags: &[],
15239 capability_family: "operations",
15240 retry_safety: "pre_submit_only",
15241 identity_requirement: "request_locator",
15242 resolver: None,
15243 cancellation: "per_call_until_submission_then_resolve",
15244 side_effects: &["commits_authoritative_state"],
15245 recovery: "retry_if_not_submitted",
15246 collection_index_ref: "none",
15247 },
15248 CommandSemanticContract {
15249 command: Command::ListAuditEvents,
15250 admissible_errors: &[
15251 ErrorCode::Aborted,
15252 ErrorCode::DeadlineExceeded,
15253 ErrorCode::InvalidRequest,
15254 ErrorCode::UnsupportedVersion,
15255 ErrorCode::Unauthenticated,
15256 ErrorCode::PermissionDenied,
15257 ErrorCode::NotFound,
15258 ErrorCode::StaleCursor,
15259 ErrorCode::RestartBudgetExhausted,
15260 ErrorCode::LimitExceeded,
15261 ErrorCode::CapabilityUnavailable,
15262 ErrorCode::TemporarilyUnavailable,
15263 ErrorCode::Internal,
15264 ],
15265 limit_ids: &["request_bytes", "response_bytes", "page_size"],
15266 effect_class: "read_only",
15267 risk_flags: &[],
15268 capability_family: "audit",
15269 retry_safety: "safe",
15270 identity_requirement: "none",
15271 resolver: None,
15272 cancellation: "per_call",
15273 side_effects: &[],
15274 recovery: "retry",
15275 collection_index_ref: "none",
15276 },
15277 CommandSemanticContract {
15278 command: Command::ExportAuditEvents,
15279 admissible_errors: &[
15280 ErrorCode::Aborted,
15281 ErrorCode::DeadlineExceeded,
15282 ErrorCode::InvalidRequest,
15283 ErrorCode::UnsupportedVersion,
15284 ErrorCode::Unauthenticated,
15285 ErrorCode::PermissionDenied,
15286 ErrorCode::NotFound,
15287 ErrorCode::StaleCursor,
15288 ErrorCode::RestartBudgetExhausted,
15289 ErrorCode::LimitExceeded,
15290 ErrorCode::CapabilityUnavailable,
15291 ErrorCode::TemporarilyUnavailable,
15292 ErrorCode::Internal,
15293 ],
15294 limit_ids: &["request_bytes", "response_bytes", "page_size"],
15295 effect_class: "read_only",
15296 risk_flags: &[],
15297 capability_family: "audit",
15298 retry_safety: "safe",
15299 identity_requirement: "none",
15300 resolver: None,
15301 cancellation: "per_call",
15302 side_effects: &[],
15303 recovery: "retry",
15304 collection_index_ref: "none",
15305 },
15306 CommandSemanticContract {
15307 command: Command::ReserveServiceCredential,
15308 admissible_errors: &[
15309 ErrorCode::Aborted,
15310 ErrorCode::DeadlineExceeded,
15311 ErrorCode::InvalidRequest,
15312 ErrorCode::UnsupportedVersion,
15313 ErrorCode::Unauthenticated,
15314 ErrorCode::PermissionDenied,
15315 ErrorCode::NotFound,
15316 ErrorCode::Conflict,
15317 ErrorCode::LimitExceeded,
15318 ErrorCode::CapabilityUnavailable,
15319 ErrorCode::NotSubmitted,
15320 ErrorCode::SubmittedIndeterminate,
15321 ErrorCode::ExpiredUnknown,
15322 ErrorCode::SecretNotEscrowed,
15323 ErrorCode::TemporarilyUnavailable,
15324 ErrorCode::Internal,
15325 ],
15326 limit_ids: &["request_bytes", "response_bytes"],
15327 effect_class: "durable_submit",
15328 risk_flags: &["credential_sensitive"],
15329 capability_family: "security",
15330 retry_safety: "pre_submit_only",
15331 identity_requirement: "caller_action_id",
15332 resolver: Some(Command::ResolveServiceCredentialReservation),
15333 cancellation: "per_call_until_submission_then_resolve",
15334 side_effects: &["commits_authoritative_state"],
15335 recovery: "resolve_with_resolve_service_credential_reservation",
15336 collection_index_ref: "none",
15337 },
15338 CommandSemanticContract {
15339 command: Command::ReserveServiceCredentialRotation,
15340 admissible_errors: &[
15341 ErrorCode::Aborted,
15342 ErrorCode::DeadlineExceeded,
15343 ErrorCode::InvalidRequest,
15344 ErrorCode::UnsupportedVersion,
15345 ErrorCode::Unauthenticated,
15346 ErrorCode::PermissionDenied,
15347 ErrorCode::NotFound,
15348 ErrorCode::Conflict,
15349 ErrorCode::LimitExceeded,
15350 ErrorCode::CapabilityUnavailable,
15351 ErrorCode::NotSubmitted,
15352 ErrorCode::SubmittedIndeterminate,
15353 ErrorCode::ExpiredUnknown,
15354 ErrorCode::SecretNotEscrowed,
15355 ErrorCode::TemporarilyUnavailable,
15356 ErrorCode::Internal,
15357 ],
15358 limit_ids: &["request_bytes", "response_bytes"],
15359 effect_class: "durable_submit",
15360 risk_flags: &["credential_sensitive"],
15361 capability_family: "security",
15362 retry_safety: "pre_submit_only",
15363 identity_requirement: "caller_action_id",
15364 resolver: Some(Command::ResolveServiceCredentialReservation),
15365 cancellation: "per_call_until_submission_then_resolve",
15366 side_effects: &["commits_authoritative_state"],
15367 recovery: "resolve_with_resolve_service_credential_reservation",
15368 collection_index_ref: "none",
15369 },
15370 CommandSemanticContract {
15371 command: Command::ActivateServiceCredential,
15372 admissible_errors: &[
15373 ErrorCode::Aborted,
15374 ErrorCode::DeadlineExceeded,
15375 ErrorCode::InvalidRequest,
15376 ErrorCode::UnsupportedVersion,
15377 ErrorCode::Unauthenticated,
15378 ErrorCode::PermissionDenied,
15379 ErrorCode::NotFound,
15380 ErrorCode::Conflict,
15381 ErrorCode::LimitExceeded,
15382 ErrorCode::CapabilityUnavailable,
15383 ErrorCode::NotSubmitted,
15384 ErrorCode::SubmittedIndeterminate,
15385 ErrorCode::ExpiredUnknown,
15386 ErrorCode::SecretNotEscrowed,
15387 ErrorCode::TemporarilyUnavailable,
15388 ErrorCode::Internal,
15389 ],
15390 limit_ids: &["request_bytes", "response_bytes"],
15391 effect_class: "durable_submit",
15392 risk_flags: &["credential_sensitive"],
15393 capability_family: "security",
15394 retry_safety: "pre_submit_only",
15395 identity_requirement: "server_locator",
15396 resolver: Some(Command::ResolveServiceCredentialReservation),
15397 cancellation: "per_call_until_submission_then_resolve",
15398 side_effects: &["commits_authoritative_state"],
15399 recovery: "resolve_with_resolve_service_credential_reservation",
15400 collection_index_ref: "none",
15401 },
15402 CommandSemanticContract {
15403 command: Command::ResolveServiceCredentialReservation,
15404 admissible_errors: &[
15405 ErrorCode::Aborted,
15406 ErrorCode::DeadlineExceeded,
15407 ErrorCode::InvalidRequest,
15408 ErrorCode::UnsupportedVersion,
15409 ErrorCode::Unauthenticated,
15410 ErrorCode::PermissionDenied,
15411 ErrorCode::NotFound,
15412 ErrorCode::LimitExceeded,
15413 ErrorCode::CapabilityUnavailable,
15414 ErrorCode::SecretNotEscrowed,
15415 ErrorCode::TemporarilyUnavailable,
15416 ErrorCode::Internal,
15417 ],
15418 limit_ids: &["request_bytes", "response_bytes"],
15419 effect_class: "read_only",
15420 risk_flags: &["credential_sensitive"],
15421 capability_family: "security",
15422 retry_safety: "safe",
15423 identity_requirement: "caller_action_id",
15424 resolver: None,
15425 cancellation: "per_call",
15426 side_effects: &[],
15427 recovery: "retry",
15428 collection_index_ref: "none",
15429 },
15430 CommandSemanticContract {
15431 command: Command::PrepareRevokeServiceCredential,
15432 admissible_errors: &[
15433 ErrorCode::Aborted,
15434 ErrorCode::DeadlineExceeded,
15435 ErrorCode::InvalidRequest,
15436 ErrorCode::UnsupportedVersion,
15437 ErrorCode::Unauthenticated,
15438 ErrorCode::PermissionDenied,
15439 ErrorCode::NotFound,
15440 ErrorCode::LimitExceeded,
15441 ErrorCode::CapabilityUnavailable,
15442 ErrorCode::SecretNotEscrowed,
15443 ErrorCode::TemporarilyUnavailable,
15444 ErrorCode::Internal,
15445 ],
15446 limit_ids: &["request_bytes", "response_bytes"],
15447 effect_class: "prepare",
15448 risk_flags: &["destructive", "credential_sensitive"],
15449 capability_family: "security",
15450 retry_safety: "safe",
15451 identity_requirement: "server_locator",
15452 resolver: None,
15453 cancellation: "per_call",
15454 side_effects: &["creates_bounded_preparation"],
15455 recovery: "retry",
15456 collection_index_ref: "none",
15457 },
15458 CommandSemanticContract {
15459 command: Command::RevokeServiceCredential,
15460 admissible_errors: &[
15461 ErrorCode::Aborted,
15462 ErrorCode::DeadlineExceeded,
15463 ErrorCode::InvalidRequest,
15464 ErrorCode::UnsupportedVersion,
15465 ErrorCode::Unauthenticated,
15466 ErrorCode::PermissionDenied,
15467 ErrorCode::NotFound,
15468 ErrorCode::Conflict,
15469 ErrorCode::LimitExceeded,
15470 ErrorCode::CapabilityUnavailable,
15471 ErrorCode::NotSubmitted,
15472 ErrorCode::SubmittedIndeterminate,
15473 ErrorCode::ExpiredUnknown,
15474 ErrorCode::SecretNotEscrowed,
15475 ErrorCode::TemporarilyUnavailable,
15476 ErrorCode::Internal,
15477 ],
15478 limit_ids: &["request_bytes", "response_bytes"],
15479 effect_class: "durable_submit",
15480 risk_flags: &["destructive", "credential_sensitive"],
15481 capability_family: "security",
15482 retry_safety: "pre_submit_only",
15483 identity_requirement: "request_locator",
15484 resolver: Some(Command::ResolveSecurityAction),
15485 cancellation: "per_call_until_submission_then_resolve",
15486 side_effects: &["commits_authoritative_state"],
15487 recovery: "resolve_with_resolve_security_action",
15488 collection_index_ref: "none",
15489 },
15490 CommandSemanticContract {
15491 command: Command::ResolveSecurityAction,
15492 admissible_errors: &[
15493 ErrorCode::Aborted,
15494 ErrorCode::DeadlineExceeded,
15495 ErrorCode::InvalidRequest,
15496 ErrorCode::UnsupportedVersion,
15497 ErrorCode::Unauthenticated,
15498 ErrorCode::PermissionDenied,
15499 ErrorCode::NotFound,
15500 ErrorCode::LimitExceeded,
15501 ErrorCode::CapabilityUnavailable,
15502 ErrorCode::SecretNotEscrowed,
15503 ErrorCode::TemporarilyUnavailable,
15504 ErrorCode::Internal,
15505 ],
15506 limit_ids: &["request_bytes", "response_bytes"],
15507 effect_class: "read_only",
15508 risk_flags: &[],
15509 capability_family: "security",
15510 retry_safety: "safe",
15511 identity_requirement: "request_locator",
15512 resolver: None,
15513 cancellation: "per_call",
15514 side_effects: &[],
15515 recovery: "retry",
15516 collection_index_ref: "none",
15517 },
15518 CommandSemanticContract {
15519 command: Command::GetSecurityRole,
15520 admissible_errors: &[
15521 ErrorCode::Aborted,
15522 ErrorCode::DeadlineExceeded,
15523 ErrorCode::InvalidRequest,
15524 ErrorCode::UnsupportedVersion,
15525 ErrorCode::Unauthenticated,
15526 ErrorCode::PermissionDenied,
15527 ErrorCode::NotFound,
15528 ErrorCode::LimitExceeded,
15529 ErrorCode::CapabilityUnavailable,
15530 ErrorCode::TemporarilyUnavailable,
15531 ErrorCode::Internal,
15532 ],
15533 limit_ids: &["request_bytes", "response_bytes"],
15534 effect_class: "read_only",
15535 risk_flags: &[],
15536 capability_family: "security",
15537 retry_safety: "safe",
15538 identity_requirement: "none",
15539 resolver: None,
15540 cancellation: "per_call",
15541 side_effects: &[],
15542 recovery: "retry",
15543 collection_index_ref: "none",
15544 },
15545 CommandSemanticContract {
15546 command: Command::PrepareRoleAppendAccessChange,
15547 admissible_errors: &[
15548 ErrorCode::Aborted,
15549 ErrorCode::DeadlineExceeded,
15550 ErrorCode::InvalidRequest,
15551 ErrorCode::UnsupportedVersion,
15552 ErrorCode::Unauthenticated,
15553 ErrorCode::PermissionDenied,
15554 ErrorCode::NotFound,
15555 ErrorCode::Conflict,
15556 ErrorCode::LimitExceeded,
15557 ErrorCode::CapabilityUnavailable,
15558 ErrorCode::TemporarilyUnavailable,
15559 ErrorCode::Internal,
15560 ],
15561 limit_ids: &["request_bytes", "response_bytes"],
15562 effect_class: "prepare",
15563 risk_flags: &["destructive"],
15564 capability_family: "security",
15565 retry_safety: "safe",
15566 identity_requirement: "server_locator",
15567 resolver: None,
15568 cancellation: "per_call",
15569 side_effects: &["creates_bounded_preparation"],
15570 recovery: "retry",
15571 collection_index_ref: "none",
15572 },
15573 CommandSemanticContract {
15574 command: Command::SubmitRoleAppendAccessChange,
15575 admissible_errors: &[
15576 ErrorCode::Aborted,
15577 ErrorCode::DeadlineExceeded,
15578 ErrorCode::InvalidRequest,
15579 ErrorCode::UnsupportedVersion,
15580 ErrorCode::Unauthenticated,
15581 ErrorCode::PermissionDenied,
15582 ErrorCode::NotFound,
15583 ErrorCode::Conflict,
15584 ErrorCode::LimitExceeded,
15585 ErrorCode::CapabilityUnavailable,
15586 ErrorCode::NotSubmitted,
15587 ErrorCode::SubmittedIndeterminate,
15588 ErrorCode::ExpiredUnknown,
15589 ErrorCode::TemporarilyUnavailable,
15590 ErrorCode::Internal,
15591 ],
15592 limit_ids: &["request_bytes", "response_bytes"],
15593 effect_class: "durable_submit",
15594 risk_flags: &["destructive"],
15595 capability_family: "security",
15596 retry_safety: "pre_submit_only",
15597 identity_requirement: "request_locator",
15598 resolver: Some(Command::ResolveSecurityAction),
15599 cancellation: "per_call_until_submission_then_resolve",
15600 side_effects: &["commits_authoritative_state"],
15601 recovery: "resolve_with_resolve_security_action",
15602 collection_index_ref: "none",
15603 },
15604 CommandSemanticContract {
15605 command: Command::PrepareSourceAuthorizationProjection,
15606 admissible_errors: &[
15607 ErrorCode::Aborted,
15608 ErrorCode::DeadlineExceeded,
15609 ErrorCode::InvalidRequest,
15610 ErrorCode::UnsupportedVersion,
15611 ErrorCode::Unauthenticated,
15612 ErrorCode::PermissionDenied,
15613 ErrorCode::NotFound,
15614 ErrorCode::Conflict,
15615 ErrorCode::LimitExceeded,
15616 ErrorCode::CapabilityUnavailable,
15617 ErrorCode::TemporarilyUnavailable,
15618 ErrorCode::Internal,
15619 ],
15620 limit_ids: &["request_bytes", "response_bytes"],
15621 effect_class: "prepare",
15622 risk_flags: &["destructive"],
15623 capability_family: "security",
15624 retry_safety: "safe",
15625 identity_requirement: "caller_action_id",
15626 resolver: None,
15627 cancellation: "per_call",
15628 side_effects: &["creates_bounded_preparation"],
15629 recovery: "retry",
15630 collection_index_ref: "request_index",
15631 },
15632 CommandSemanticContract {
15633 command: Command::SubmitSourceAuthorizationProjection,
15634 admissible_errors: &[
15635 ErrorCode::Aborted,
15636 ErrorCode::DeadlineExceeded,
15637 ErrorCode::InvalidRequest,
15638 ErrorCode::UnsupportedVersion,
15639 ErrorCode::Unauthenticated,
15640 ErrorCode::PermissionDenied,
15641 ErrorCode::NotFound,
15642 ErrorCode::Conflict,
15643 ErrorCode::LimitExceeded,
15644 ErrorCode::CapabilityUnavailable,
15645 ErrorCode::NotSubmitted,
15646 ErrorCode::SubmittedIndeterminate,
15647 ErrorCode::ExpiredUnknown,
15648 ErrorCode::TemporarilyUnavailable,
15649 ErrorCode::Internal,
15650 ],
15651 limit_ids: &["request_bytes", "response_bytes"],
15652 effect_class: "durable_submit",
15653 risk_flags: &["destructive"],
15654 capability_family: "security",
15655 retry_safety: "pre_submit_only",
15656 identity_requirement: "caller_action_id",
15657 resolver: Some(Command::ResolveSourceAuthorizationProjection),
15658 cancellation: "per_call_until_submission_then_resolve",
15659 side_effects: &["commits_authoritative_state"],
15660 recovery: "resolve_with_resolve_source_authorization_projection",
15661 collection_index_ref: "request_index",
15662 },
15663 CommandSemanticContract {
15664 command: Command::ResolveSourceAuthorizationProjection,
15665 admissible_errors: &[
15666 ErrorCode::Aborted,
15667 ErrorCode::DeadlineExceeded,
15668 ErrorCode::InvalidRequest,
15669 ErrorCode::UnsupportedVersion,
15670 ErrorCode::Unauthenticated,
15671 ErrorCode::PermissionDenied,
15672 ErrorCode::NotFound,
15673 ErrorCode::Conflict,
15674 ErrorCode::LimitExceeded,
15675 ErrorCode::CapabilityUnavailable,
15676 ErrorCode::TemporarilyUnavailable,
15677 ErrorCode::Internal,
15678 ],
15679 limit_ids: &["request_bytes", "response_bytes"],
15680 effect_class: "read_only",
15681 risk_flags: &[],
15682 capability_family: "security",
15683 retry_safety: "safe",
15684 identity_requirement: "caller_action_id",
15685 resolver: None,
15686 cancellation: "per_call",
15687 side_effects: &[],
15688 recovery: "retry",
15689 collection_index_ref: "request_index",
15690 },
15691 CommandSemanticContract {
15692 command: Command::ListServiceCredentials,
15693 admissible_errors: &[
15694 ErrorCode::Aborted,
15695 ErrorCode::DeadlineExceeded,
15696 ErrorCode::InvalidRequest,
15697 ErrorCode::UnsupportedVersion,
15698 ErrorCode::Unauthenticated,
15699 ErrorCode::PermissionDenied,
15700 ErrorCode::NotFound,
15701 ErrorCode::StaleCursor,
15702 ErrorCode::RestartBudgetExhausted,
15703 ErrorCode::LimitExceeded,
15704 ErrorCode::CapabilityUnavailable,
15705 ErrorCode::SecretNotEscrowed,
15706 ErrorCode::TemporarilyUnavailable,
15707 ErrorCode::Internal,
15708 ],
15709 limit_ids: &["request_bytes", "response_bytes", "page_size"],
15710 effect_class: "read_only",
15711 risk_flags: &["credential_sensitive"],
15712 capability_family: "security",
15713 retry_safety: "safe",
15714 identity_requirement: "none",
15715 resolver: None,
15716 cancellation: "per_call",
15717 side_effects: &[],
15718 recovery: "retry",
15719 collection_index_ref: "none",
15720 },
15721 CommandSemanticContract {
15722 command: Command::GetRuntimeStatus,
15723 admissible_errors: &[
15724 ErrorCode::Aborted,
15725 ErrorCode::DeadlineExceeded,
15726 ErrorCode::InvalidRequest,
15727 ErrorCode::UnsupportedVersion,
15728 ErrorCode::Unauthenticated,
15729 ErrorCode::PermissionDenied,
15730 ErrorCode::NotFound,
15731 ErrorCode::LimitExceeded,
15732 ErrorCode::CapabilityUnavailable,
15733 ErrorCode::TemporarilyUnavailable,
15734 ErrorCode::Internal,
15735 ],
15736 limit_ids: &["request_bytes", "response_bytes"],
15737 effect_class: "read_only",
15738 risk_flags: &[],
15739 capability_family: "catalog",
15740 retry_safety: "safe",
15741 identity_requirement: "none",
15742 resolver: None,
15743 cancellation: "per_call",
15744 side_effects: &[],
15745 recovery: "retry",
15746 collection_index_ref: "none",
15747 },
15748 CommandSemanticContract {
15749 command: Command::GetResultCacheStatus,
15750 admissible_errors: &[
15751 ErrorCode::Aborted,
15752 ErrorCode::DeadlineExceeded,
15753 ErrorCode::InvalidRequest,
15754 ErrorCode::UnsupportedVersion,
15755 ErrorCode::Unauthenticated,
15756 ErrorCode::PermissionDenied,
15757 ErrorCode::NotFound,
15758 ErrorCode::LimitExceeded,
15759 ErrorCode::CapabilityUnavailable,
15760 ErrorCode::TemporarilyUnavailable,
15761 ErrorCode::Internal,
15762 ],
15763 limit_ids: &["request_bytes", "response_bytes"],
15764 effect_class: "read_only",
15765 risk_flags: &[],
15766 capability_family: "catalog",
15767 retry_safety: "safe",
15768 identity_requirement: "none",
15769 resolver: None,
15770 cancellation: "per_call",
15771 side_effects: &[],
15772 recovery: "retry",
15773 collection_index_ref: "none",
15774 },
15775 CommandSemanticContract {
15776 command: Command::GetFieldPromotionStatus,
15777 admissible_errors: &[
15778 ErrorCode::Aborted,
15779 ErrorCode::DeadlineExceeded,
15780 ErrorCode::InvalidRequest,
15781 ErrorCode::UnsupportedVersion,
15782 ErrorCode::Unauthenticated,
15783 ErrorCode::PermissionDenied,
15784 ErrorCode::NotFound,
15785 ErrorCode::LimitExceeded,
15786 ErrorCode::CapabilityUnavailable,
15787 ErrorCode::TemporarilyUnavailable,
15788 ErrorCode::Internal,
15789 ],
15790 limit_ids: &["request_bytes", "response_bytes"],
15791 effect_class: "read_only",
15792 risk_flags: &[],
15793 capability_family: "catalog",
15794 retry_safety: "safe",
15795 identity_requirement: "none",
15796 resolver: None,
15797 cancellation: "per_call",
15798 side_effects: &[],
15799 recovery: "retry",
15800 collection_index_ref: "none",
15801 },
15802 CommandSemanticContract {
15803 command: Command::GetOverloadStatus,
15804 admissible_errors: &[
15805 ErrorCode::Aborted,
15806 ErrorCode::DeadlineExceeded,
15807 ErrorCode::InvalidRequest,
15808 ErrorCode::UnsupportedVersion,
15809 ErrorCode::Unauthenticated,
15810 ErrorCode::PermissionDenied,
15811 ErrorCode::NotFound,
15812 ErrorCode::LimitExceeded,
15813 ErrorCode::CapabilityUnavailable,
15814 ErrorCode::TemporarilyUnavailable,
15815 ErrorCode::Internal,
15816 ],
15817 limit_ids: &["request_bytes", "response_bytes"],
15818 effect_class: "read_only",
15819 risk_flags: &[],
15820 capability_family: "catalog",
15821 retry_safety: "safe",
15822 identity_requirement: "none",
15823 resolver: None,
15824 cancellation: "per_call",
15825 side_effects: &[],
15826 recovery: "retry",
15827 collection_index_ref: "none",
15828 },
15829 CommandSemanticContract {
15830 command: Command::ConfigureExternalKey,
15831 admissible_errors: &[
15832 ErrorCode::Aborted,
15833 ErrorCode::DeadlineExceeded,
15834 ErrorCode::InvalidRequest,
15835 ErrorCode::UnsupportedVersion,
15836 ErrorCode::Unauthenticated,
15837 ErrorCode::PermissionDenied,
15838 ErrorCode::NotFound,
15839 ErrorCode::Conflict,
15840 ErrorCode::LimitExceeded,
15841 ErrorCode::CapabilityUnavailable,
15842 ErrorCode::NotSubmitted,
15843 ErrorCode::SubmittedIndeterminate,
15844 ErrorCode::ExpiredUnknown,
15845 ErrorCode::TemporarilyUnavailable,
15846 ErrorCode::Internal,
15847 ],
15848 limit_ids: &["request_bytes", "response_bytes"],
15849 effect_class: "control_write",
15850 risk_flags: &[],
15851 capability_family: "lifecycle",
15852 retry_safety: "pre_submit_only",
15853 identity_requirement: "none",
15854 resolver: None,
15855 cancellation: "per_call_until_submission_then_resolve",
15856 side_effects: &["commits_authoritative_state"],
15857 recovery: "retry_if_not_submitted",
15858 collection_index_ref: "request_index",
15859 },
15860 CommandSemanticContract {
15861 command: Command::RotateExternalKeyBinding,
15862 admissible_errors: &[
15863 ErrorCode::Aborted,
15864 ErrorCode::DeadlineExceeded,
15865 ErrorCode::InvalidRequest,
15866 ErrorCode::UnsupportedVersion,
15867 ErrorCode::Unauthenticated,
15868 ErrorCode::PermissionDenied,
15869 ErrorCode::NotFound,
15870 ErrorCode::Conflict,
15871 ErrorCode::LimitExceeded,
15872 ErrorCode::CapabilityUnavailable,
15873 ErrorCode::NotSubmitted,
15874 ErrorCode::SubmittedIndeterminate,
15875 ErrorCode::ExpiredUnknown,
15876 ErrorCode::TemporarilyUnavailable,
15877 ErrorCode::Internal,
15878 ],
15879 limit_ids: &["request_bytes", "response_bytes"],
15880 effect_class: "control_write",
15881 risk_flags: &[],
15882 capability_family: "lifecycle",
15883 retry_safety: "pre_submit_only",
15884 identity_requirement: "none",
15885 resolver: None,
15886 cancellation: "per_call_until_submission_then_resolve",
15887 side_effects: &["commits_authoritative_state"],
15888 recovery: "retry_if_not_submitted",
15889 collection_index_ref: "request_index",
15890 },
15891 CommandSemanticContract {
15892 command: Command::RetireExternalKeyBinding,
15893 admissible_errors: &[
15894 ErrorCode::Aborted,
15895 ErrorCode::DeadlineExceeded,
15896 ErrorCode::InvalidRequest,
15897 ErrorCode::UnsupportedVersion,
15898 ErrorCode::Unauthenticated,
15899 ErrorCode::PermissionDenied,
15900 ErrorCode::NotFound,
15901 ErrorCode::Conflict,
15902 ErrorCode::LimitExceeded,
15903 ErrorCode::CapabilityUnavailable,
15904 ErrorCode::NotSubmitted,
15905 ErrorCode::SubmittedIndeterminate,
15906 ErrorCode::ExpiredUnknown,
15907 ErrorCode::TemporarilyUnavailable,
15908 ErrorCode::Internal,
15909 ],
15910 limit_ids: &["request_bytes", "response_bytes"],
15911 effect_class: "durable_submit",
15912 risk_flags: &["destructive"],
15913 capability_family: "lifecycle",
15914 retry_safety: "pre_submit_only",
15915 identity_requirement: "caller_action_id",
15916 resolver: Some(Command::ResolveExternalKeyBindingRetirement),
15917 cancellation: "per_call_until_submission_then_resolve",
15918 side_effects: &["commits_authoritative_state"],
15919 recovery: "resolve_with_resolve_external_key_binding_retirement",
15920 collection_index_ref: "request_index",
15921 },
15922 CommandSemanticContract {
15923 command: Command::ResolveExternalKeyBindingRetirement,
15924 admissible_errors: &[
15925 ErrorCode::Aborted,
15926 ErrorCode::DeadlineExceeded,
15927 ErrorCode::InvalidRequest,
15928 ErrorCode::UnsupportedVersion,
15929 ErrorCode::Unauthenticated,
15930 ErrorCode::PermissionDenied,
15931 ErrorCode::NotFound,
15932 ErrorCode::LimitExceeded,
15933 ErrorCode::CapabilityUnavailable,
15934 ErrorCode::TemporarilyUnavailable,
15935 ErrorCode::Internal,
15936 ],
15937 limit_ids: &["request_bytes", "response_bytes"],
15938 effect_class: "read_only",
15939 risk_flags: &[],
15940 capability_family: "lifecycle",
15941 retry_safety: "safe",
15942 identity_requirement: "caller_action_id",
15943 resolver: None,
15944 cancellation: "per_call",
15945 side_effects: &[],
15946 recovery: "retry",
15947 collection_index_ref: "request_index",
15948 },
15949 CommandSemanticContract {
15950 command: Command::ConfigureAggregateThenDelete,
15951 admissible_errors: &[
15952 ErrorCode::Aborted,
15953 ErrorCode::DeadlineExceeded,
15954 ErrorCode::InvalidRequest,
15955 ErrorCode::UnsupportedVersion,
15956 ErrorCode::Unauthenticated,
15957 ErrorCode::PermissionDenied,
15958 ErrorCode::NotFound,
15959 ErrorCode::Conflict,
15960 ErrorCode::LimitExceeded,
15961 ErrorCode::CapabilityUnavailable,
15962 ErrorCode::NotSubmitted,
15963 ErrorCode::SubmittedIndeterminate,
15964 ErrorCode::ExpiredUnknown,
15965 ErrorCode::TemporarilyUnavailable,
15966 ErrorCode::Internal,
15967 ],
15968 limit_ids: &["request_bytes", "response_bytes"],
15969 effect_class: "control_write",
15970 risk_flags: &["destructive"],
15971 capability_family: "lifecycle",
15972 retry_safety: "pre_submit_only",
15973 identity_requirement: "none",
15974 resolver: None,
15975 cancellation: "per_call_until_submission_then_resolve",
15976 side_effects: &["commits_authoritative_state"],
15977 recovery: "retry_if_not_submitted",
15978 collection_index_ref: "request_index",
15979 },
15980 CommandSemanticContract {
15981 command: Command::GetLifecycleStatus,
15982 admissible_errors: &[
15983 ErrorCode::Aborted,
15984 ErrorCode::DeadlineExceeded,
15985 ErrorCode::InvalidRequest,
15986 ErrorCode::UnsupportedVersion,
15987 ErrorCode::Unauthenticated,
15988 ErrorCode::PermissionDenied,
15989 ErrorCode::NotFound,
15990 ErrorCode::LimitExceeded,
15991 ErrorCode::CapabilityUnavailable,
15992 ErrorCode::TemporarilyUnavailable,
15993 ErrorCode::Internal,
15994 ],
15995 limit_ids: &["request_bytes", "response_bytes"],
15996 effect_class: "read_only",
15997 risk_flags: &[],
15998 capability_family: "catalog",
15999 retry_safety: "safe",
16000 identity_requirement: "none",
16001 resolver: None,
16002 cancellation: "per_call",
16003 side_effects: &[],
16004 recovery: "retry",
16005 collection_index_ref: "none",
16006 },
16007 CommandSemanticContract {
16008 command: Command::EraseRecord,
16009 admissible_errors: &[
16010 ErrorCode::Aborted,
16011 ErrorCode::DeadlineExceeded,
16012 ErrorCode::InvalidRequest,
16013 ErrorCode::UnsupportedVersion,
16014 ErrorCode::Unauthenticated,
16015 ErrorCode::PermissionDenied,
16016 ErrorCode::NotFound,
16017 ErrorCode::Conflict,
16018 ErrorCode::LimitExceeded,
16019 ErrorCode::CapabilityUnavailable,
16020 ErrorCode::NotSubmitted,
16021 ErrorCode::SubmittedIndeterminate,
16022 ErrorCode::ExpiredUnknown,
16023 ErrorCode::TemporarilyUnavailable,
16024 ErrorCode::Internal,
16025 ],
16026 limit_ids: &[
16027 "request_bytes",
16028 "response_bytes",
16029 "record_erasure_scan_bytes",
16030 "record_erasure_rewrite_bytes",
16031 ],
16032 effect_class: "durable_submit",
16033 risk_flags: &["destructive"],
16034 capability_family: "lifecycle",
16035 retry_safety: "pre_submit_only",
16036 identity_requirement: "caller_action_id",
16037 resolver: Some(Command::ResolveRecordErasure),
16038 cancellation: "per_call_until_submission_then_resolve",
16039 side_effects: &["commits_authoritative_state"],
16040 recovery: "resolve_with_resolve_record_erasure",
16041 collection_index_ref: "request_index",
16042 },
16043 CommandSemanticContract {
16044 command: Command::ResolveRecordErasure,
16045 admissible_errors: &[
16046 ErrorCode::Aborted,
16047 ErrorCode::DeadlineExceeded,
16048 ErrorCode::InvalidRequest,
16049 ErrorCode::UnsupportedVersion,
16050 ErrorCode::Unauthenticated,
16051 ErrorCode::PermissionDenied,
16052 ErrorCode::NotFound,
16053 ErrorCode::Conflict,
16054 ErrorCode::LimitExceeded,
16055 ErrorCode::CapabilityUnavailable,
16056 ErrorCode::TemporarilyUnavailable,
16057 ErrorCode::Internal,
16058 ],
16059 limit_ids: &[
16060 "request_bytes",
16061 "response_bytes",
16062 "record_erasure_scan_bytes",
16063 "record_erasure_rewrite_bytes",
16064 ],
16065 effect_class: "read_only",
16066 risk_flags: &[],
16067 capability_family: "lifecycle",
16068 retry_safety: "safe",
16069 identity_requirement: "caller_action_id",
16070 resolver: None,
16071 cancellation: "per_call",
16072 side_effects: &[],
16073 recovery: "retry",
16074 collection_index_ref: "request_index",
16075 },
16076 CommandSemanticContract {
16077 command: Command::GetRecordErasure,
16078 admissible_errors: &[
16079 ErrorCode::Aborted,
16080 ErrorCode::DeadlineExceeded,
16081 ErrorCode::InvalidRequest,
16082 ErrorCode::UnsupportedVersion,
16083 ErrorCode::Unauthenticated,
16084 ErrorCode::PermissionDenied,
16085 ErrorCode::NotFound,
16086 ErrorCode::LimitExceeded,
16087 ErrorCode::CapabilityUnavailable,
16088 ErrorCode::TemporarilyUnavailable,
16089 ErrorCode::Internal,
16090 ],
16091 limit_ids: &["request_bytes", "response_bytes"],
16092 effect_class: "read_only",
16093 risk_flags: &[],
16094 capability_family: "lifecycle",
16095 retry_safety: "safe",
16096 identity_requirement: "request_identity",
16097 resolver: None,
16098 cancellation: "per_call",
16099 side_effects: &[],
16100 recovery: "retry",
16101 collection_index_ref: "request_index",
16102 },
16103 CommandSemanticContract {
16104 command: Command::GetQuota,
16105 admissible_errors: &[
16106 ErrorCode::Aborted,
16107 ErrorCode::DeadlineExceeded,
16108 ErrorCode::InvalidRequest,
16109 ErrorCode::UnsupportedVersion,
16110 ErrorCode::Unauthenticated,
16111 ErrorCode::PermissionDenied,
16112 ErrorCode::NotFound,
16113 ErrorCode::LimitExceeded,
16114 ErrorCode::CapabilityUnavailable,
16115 ErrorCode::TemporarilyUnavailable,
16116 ErrorCode::Internal,
16117 ],
16118 limit_ids: &["request_bytes", "response_bytes"],
16119 effect_class: "read_only",
16120 risk_flags: &[],
16121 capability_family: "quota",
16122 retry_safety: "safe",
16123 identity_requirement: "none",
16124 resolver: None,
16125 cancellation: "per_call",
16126 side_effects: &[],
16127 recovery: "retry",
16128 collection_index_ref: "none",
16129 },
16130 CommandSemanticContract {
16131 command: Command::UpdateQuota,
16132 admissible_errors: &[
16133 ErrorCode::Aborted,
16134 ErrorCode::DeadlineExceeded,
16135 ErrorCode::InvalidRequest,
16136 ErrorCode::UnsupportedVersion,
16137 ErrorCode::Unauthenticated,
16138 ErrorCode::PermissionDenied,
16139 ErrorCode::NotFound,
16140 ErrorCode::Conflict,
16141 ErrorCode::LimitExceeded,
16142 ErrorCode::CapabilityUnavailable,
16143 ErrorCode::NotSubmitted,
16144 ErrorCode::SubmittedIndeterminate,
16145 ErrorCode::ExpiredUnknown,
16146 ErrorCode::TemporarilyUnavailable,
16147 ErrorCode::Internal,
16148 ],
16149 limit_ids: &["request_bytes", "response_bytes"],
16150 effect_class: "control_write",
16151 risk_flags: &[],
16152 capability_family: "quota",
16153 retry_safety: "pre_submit_only",
16154 identity_requirement: "none",
16155 resolver: None,
16156 cancellation: "per_call_until_submission_then_resolve",
16157 side_effects: &["commits_authoritative_state"],
16158 recovery: "retry_if_not_submitted",
16159 collection_index_ref: "none",
16160 },
16161 CommandSemanticContract {
16162 command: Command::GetBinding,
16163 admissible_errors: &[
16164 ErrorCode::Aborted,
16165 ErrorCode::DeadlineExceeded,
16166 ErrorCode::InvalidRequest,
16167 ErrorCode::UnsupportedVersion,
16168 ErrorCode::Unauthenticated,
16169 ErrorCode::PermissionDenied,
16170 ErrorCode::NotFound,
16171 ErrorCode::LimitExceeded,
16172 ErrorCode::CapabilityUnavailable,
16173 ErrorCode::TemporarilyUnavailable,
16174 ErrorCode::Internal,
16175 ],
16176 limit_ids: &["request_bytes", "response_bytes"],
16177 effect_class: "read_only",
16178 risk_flags: &[],
16179 capability_family: "runtime_control",
16180 retry_safety: "safe",
16181 identity_requirement: "none",
16182 resolver: None,
16183 cancellation: "per_call",
16184 side_effects: &[],
16185 recovery: "retry",
16186 collection_index_ref: "none",
16187 },
16188 CommandSemanticContract {
16189 command: Command::GetAdmissionStatus,
16190 admissible_errors: &[
16191 ErrorCode::Aborted,
16192 ErrorCode::DeadlineExceeded,
16193 ErrorCode::InvalidRequest,
16194 ErrorCode::UnsupportedVersion,
16195 ErrorCode::Unauthenticated,
16196 ErrorCode::PermissionDenied,
16197 ErrorCode::NotFound,
16198 ErrorCode::LimitExceeded,
16199 ErrorCode::CapabilityUnavailable,
16200 ErrorCode::TemporarilyUnavailable,
16201 ErrorCode::Internal,
16202 ],
16203 limit_ids: &["request_bytes", "response_bytes"],
16204 effect_class: "read_only",
16205 risk_flags: &[],
16206 capability_family: "runtime_control",
16207 retry_safety: "safe",
16208 identity_requirement: "none",
16209 resolver: None,
16210 cancellation: "per_call",
16211 side_effects: &[],
16212 recovery: "retry",
16213 collection_index_ref: "none",
16214 },
16215 CommandSemanticContract {
16216 command: Command::SetAdmission,
16217 admissible_errors: &[
16218 ErrorCode::Aborted,
16219 ErrorCode::DeadlineExceeded,
16220 ErrorCode::InvalidRequest,
16221 ErrorCode::UnsupportedVersion,
16222 ErrorCode::Unauthenticated,
16223 ErrorCode::PermissionDenied,
16224 ErrorCode::NotFound,
16225 ErrorCode::Conflict,
16226 ErrorCode::LimitExceeded,
16227 ErrorCode::CapabilityUnavailable,
16228 ErrorCode::NotSubmitted,
16229 ErrorCode::SubmittedIndeterminate,
16230 ErrorCode::ExpiredUnknown,
16231 ErrorCode::TemporarilyUnavailable,
16232 ErrorCode::Internal,
16233 ],
16234 limit_ids: &["request_bytes", "response_bytes"],
16235 effect_class: "control_write",
16236 risk_flags: &[],
16237 capability_family: "runtime_control",
16238 retry_safety: "pre_submit_only",
16239 identity_requirement: "none",
16240 resolver: None,
16241 cancellation: "per_call_until_submission_then_resolve",
16242 side_effects: &["commits_authoritative_state"],
16243 recovery: "retry_if_not_submitted",
16244 collection_index_ref: "none",
16245 },
16246 CommandSemanticContract {
16247 command: Command::GetQuiesceStatus,
16248 admissible_errors: &[
16249 ErrorCode::Aborted,
16250 ErrorCode::DeadlineExceeded,
16251 ErrorCode::InvalidRequest,
16252 ErrorCode::UnsupportedVersion,
16253 ErrorCode::Unauthenticated,
16254 ErrorCode::PermissionDenied,
16255 ErrorCode::NotFound,
16256 ErrorCode::LimitExceeded,
16257 ErrorCode::CapabilityUnavailable,
16258 ErrorCode::TemporarilyUnavailable,
16259 ErrorCode::Internal,
16260 ],
16261 limit_ids: &["request_bytes", "response_bytes"],
16262 effect_class: "read_only",
16263 risk_flags: &[],
16264 capability_family: "runtime_control",
16265 retry_safety: "safe",
16266 identity_requirement: "none",
16267 resolver: None,
16268 cancellation: "per_call",
16269 side_effects: &[],
16270 recovery: "retry",
16271 collection_index_ref: "none",
16272 },
16273 CommandSemanticContract {
16274 command: Command::GetDecommissionReadiness,
16275 admissible_errors: &[
16276 ErrorCode::Aborted,
16277 ErrorCode::DeadlineExceeded,
16278 ErrorCode::InvalidRequest,
16279 ErrorCode::UnsupportedVersion,
16280 ErrorCode::Unauthenticated,
16281 ErrorCode::PermissionDenied,
16282 ErrorCode::NotFound,
16283 ErrorCode::LimitExceeded,
16284 ErrorCode::CapabilityUnavailable,
16285 ErrorCode::TemporarilyUnavailable,
16286 ErrorCode::Internal,
16287 ],
16288 limit_ids: &["request_bytes", "response_bytes"],
16289 effect_class: "read_only",
16290 risk_flags: &[],
16291 capability_family: "runtime_control",
16292 retry_safety: "safe",
16293 identity_requirement: "none",
16294 resolver: None,
16295 cancellation: "per_call",
16296 side_effects: &[],
16297 recovery: "retry",
16298 collection_index_ref: "none",
16299 },
16300 CommandSemanticContract {
16301 command: Command::GetUpgradeReadiness,
16302 admissible_errors: &[
16303 ErrorCode::Aborted,
16304 ErrorCode::DeadlineExceeded,
16305 ErrorCode::InvalidRequest,
16306 ErrorCode::UnsupportedVersion,
16307 ErrorCode::Unauthenticated,
16308 ErrorCode::PermissionDenied,
16309 ErrorCode::NotFound,
16310 ErrorCode::LimitExceeded,
16311 ErrorCode::CapabilityUnavailable,
16312 ErrorCode::TemporarilyUnavailable,
16313 ErrorCode::Internal,
16314 ],
16315 limit_ids: &["request_bytes", "response_bytes"],
16316 effect_class: "read_only",
16317 risk_flags: &[],
16318 capability_family: "operations",
16319 retry_safety: "safe",
16320 identity_requirement: "none",
16321 resolver: None,
16322 cancellation: "per_call",
16323 side_effects: &[],
16324 recovery: "retry",
16325 collection_index_ref: "none",
16326 },
16327 CommandSemanticContract {
16328 command: Command::GetMaintenanceStatus,
16329 admissible_errors: &[
16330 ErrorCode::Aborted,
16331 ErrorCode::DeadlineExceeded,
16332 ErrorCode::InvalidRequest,
16333 ErrorCode::UnsupportedVersion,
16334 ErrorCode::Unauthenticated,
16335 ErrorCode::PermissionDenied,
16336 ErrorCode::NotFound,
16337 ErrorCode::StaleCursor,
16338 ErrorCode::LimitExceeded,
16339 ErrorCode::CapabilityUnavailable,
16340 ErrorCode::TemporarilyUnavailable,
16341 ErrorCode::Internal,
16342 ],
16343 limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
16344 effect_class: "read_only",
16345 risk_flags: &[],
16346 capability_family: "operations",
16347 retry_safety: "safe",
16348 identity_requirement: "none",
16349 resolver: None,
16350 cancellation: "per_call",
16351 side_effects: &[],
16352 recovery: "retry",
16353 collection_index_ref: "optional_request_index",
16354 },
16355 CommandSemanticContract {
16356 command: Command::WarmVectorIndex,
16357 admissible_errors: &[
16358 ErrorCode::Aborted,
16359 ErrorCode::DeadlineExceeded,
16360 ErrorCode::InvalidRequest,
16361 ErrorCode::UnsupportedVersion,
16362 ErrorCode::Unauthenticated,
16363 ErrorCode::PermissionDenied,
16364 ErrorCode::NotFound,
16365 ErrorCode::Conflict,
16366 ErrorCode::LimitExceeded,
16367 ErrorCode::CapabilityUnavailable,
16368 ErrorCode::TemporarilyUnavailable,
16369 ErrorCode::Internal,
16370 ],
16371 limit_ids: &[
16372 "request_bytes",
16373 "response_bytes",
16374 "vector_warm_components",
16375 "vector_warm_requests",
16376 "vector_warm_bytes",
16377 "vector_warm_achievements",
16378 "vector_warm_ttl_millis",
16379 ],
16380 effect_class: "read_only",
16381 risk_flags: &[],
16382 capability_family: "data",
16383 retry_safety: "safe",
16384 identity_requirement: "exact_root",
16385 resolver: None,
16386 cancellation: "per_call",
16387 side_effects: &["populates_reconstructible_cache"],
16388 recovery: "retry",
16389 collection_index_ref: "request_index",
16390 },
16391 CommandSemanticContract {
16392 command: Command::EvaluateVectorRecall,
16393 admissible_errors: &[
16394 ErrorCode::Aborted,
16395 ErrorCode::DeadlineExceeded,
16396 ErrorCode::InvalidRequest,
16397 ErrorCode::UnsupportedVersion,
16398 ErrorCode::Unauthenticated,
16399 ErrorCode::PermissionDenied,
16400 ErrorCode::NotFound,
16401 ErrorCode::Conflict,
16402 ErrorCode::LimitExceeded,
16403 ErrorCode::CapabilityUnavailable,
16404 ErrorCode::NotSubmitted,
16405 ErrorCode::SubmittedIndeterminate,
16406 ErrorCode::ExpiredUnknown,
16407 ErrorCode::TemporarilyUnavailable,
16408 ErrorCode::Internal,
16409 ],
16410 limit_ids: &[
16411 "request_bytes",
16412 "response_bytes",
16413 "vector_dimensions",
16414 "vector_query_bytes",
16415 "vector_request_bytes",
16416 "vector_candidates",
16417 "vector_evaluation_queries",
16418 "vector_evaluation_k",
16419 "vector_evaluation_artifact_bytes",
16420 ],
16421 effect_class: "durable_submit",
16422 risk_flags: &[],
16423 capability_family: "diagnostics",
16424 retry_safety: "pre_submit_only",
16425 identity_requirement: "caller_action_id",
16426 resolver: None,
16427 cancellation: "per_call_until_submission_then_resolve",
16428 side_effects: &["commits_authoritative_state"],
16429 recovery: "retry_if_not_submitted",
16430 collection_index_ref: "request_index",
16431 },
16432 CommandSemanticContract {
16433 command: Command::CalibrateVectorStrategy,
16434 admissible_errors: &[
16435 ErrorCode::Aborted,
16436 ErrorCode::DeadlineExceeded,
16437 ErrorCode::InvalidRequest,
16438 ErrorCode::UnsupportedVersion,
16439 ErrorCode::Unauthenticated,
16440 ErrorCode::PermissionDenied,
16441 ErrorCode::NotFound,
16442 ErrorCode::Conflict,
16443 ErrorCode::LimitExceeded,
16444 ErrorCode::CapabilityUnavailable,
16445 ErrorCode::NotSubmitted,
16446 ErrorCode::SubmittedIndeterminate,
16447 ErrorCode::ExpiredUnknown,
16448 ErrorCode::TemporarilyUnavailable,
16449 ErrorCode::Internal,
16450 ],
16451 limit_ids: &[
16452 "request_bytes",
16453 "response_bytes",
16454 "vector_dimensions",
16455 "vector_query_bytes",
16456 "vector_request_bytes",
16457 "vector_candidates",
16458 "vector_evaluation_queries",
16459 "vector_evaluation_k",
16460 "vector_evaluation_profiles",
16461 "vector_evaluation_artifact_bytes",
16462 ],
16463 effect_class: "durable_submit",
16464 risk_flags: &[],
16465 capability_family: "diagnostics",
16466 retry_safety: "pre_submit_only",
16467 identity_requirement: "caller_action_id",
16468 resolver: None,
16469 cancellation: "per_call_until_submission_then_resolve",
16470 side_effects: &["commits_authoritative_state"],
16471 recovery: "retry_if_not_submitted",
16472 collection_index_ref: "request_index",
16473 },
16474 CommandSemanticContract {
16475 command: Command::GetVectorDiagnostic,
16476 admissible_errors: &[
16477 ErrorCode::Aborted,
16478 ErrorCode::DeadlineExceeded,
16479 ErrorCode::InvalidRequest,
16480 ErrorCode::UnsupportedVersion,
16481 ErrorCode::Unauthenticated,
16482 ErrorCode::PermissionDenied,
16483 ErrorCode::NotFound,
16484 ErrorCode::LimitExceeded,
16485 ErrorCode::CapabilityUnavailable,
16486 ErrorCode::TemporarilyUnavailable,
16487 ErrorCode::Internal,
16488 ],
16489 limit_ids: &["request_bytes", "response_bytes"],
16490 effect_class: "read_only",
16491 risk_flags: &[],
16492 capability_family: "diagnostics",
16493 retry_safety: "safe",
16494 identity_requirement: "request_locator",
16495 resolver: None,
16496 cancellation: "per_call",
16497 side_effects: &[],
16498 recovery: "retry",
16499 collection_index_ref: "none",
16500 },
16501 CommandSemanticContract {
16502 command: Command::CreateDiagnostic,
16503 admissible_errors: &[
16504 ErrorCode::Aborted,
16505 ErrorCode::DeadlineExceeded,
16506 ErrorCode::InvalidRequest,
16507 ErrorCode::UnsupportedVersion,
16508 ErrorCode::Unauthenticated,
16509 ErrorCode::PermissionDenied,
16510 ErrorCode::NotFound,
16511 ErrorCode::Conflict,
16512 ErrorCode::LimitExceeded,
16513 ErrorCode::CapabilityUnavailable,
16514 ErrorCode::NotSubmitted,
16515 ErrorCode::SubmittedIndeterminate,
16516 ErrorCode::ExpiredUnknown,
16517 ErrorCode::TemporarilyUnavailable,
16518 ErrorCode::Internal,
16519 ],
16520 limit_ids: &["request_bytes", "response_bytes"],
16521 effect_class: "durable_submit",
16522 risk_flags: &[],
16523 capability_family: "diagnostics",
16524 retry_safety: "pre_submit_only",
16525 identity_requirement: "none",
16526 resolver: None,
16527 cancellation: "per_call_until_submission_then_resolve",
16528 side_effects: &["commits_authoritative_state"],
16529 recovery: "retry_if_not_submitted",
16530 collection_index_ref: "none",
16531 },
16532 CommandSemanticContract {
16533 command: Command::GetDiagnostic,
16534 admissible_errors: &[
16535 ErrorCode::Aborted,
16536 ErrorCode::DeadlineExceeded,
16537 ErrorCode::InvalidRequest,
16538 ErrorCode::UnsupportedVersion,
16539 ErrorCode::Unauthenticated,
16540 ErrorCode::PermissionDenied,
16541 ErrorCode::NotFound,
16542 ErrorCode::LimitExceeded,
16543 ErrorCode::CapabilityUnavailable,
16544 ErrorCode::TemporarilyUnavailable,
16545 ErrorCode::Internal,
16546 ],
16547 limit_ids: &["request_bytes", "response_bytes"],
16548 effect_class: "read_only",
16549 risk_flags: &[],
16550 capability_family: "diagnostics",
16551 retry_safety: "safe",
16552 identity_requirement: "request_locator",
16553 resolver: None,
16554 cancellation: "per_call",
16555 side_effects: &[],
16556 recovery: "retry",
16557 collection_index_ref: "none",
16558 },
16559 CommandSemanticContract {
16560 command: Command::PrepareCollectionExport,
16561 admissible_errors: &[
16562 ErrorCode::Aborted,
16563 ErrorCode::DeadlineExceeded,
16564 ErrorCode::InvalidRequest,
16565 ErrorCode::UnsupportedVersion,
16566 ErrorCode::Unauthenticated,
16567 ErrorCode::PermissionDenied,
16568 ErrorCode::NotFound,
16569 ErrorCode::LimitExceeded,
16570 ErrorCode::CapabilityUnavailable,
16571 ErrorCode::TemporarilyUnavailable,
16572 ErrorCode::Internal,
16573 ],
16574 limit_ids: &[
16575 "request_bytes",
16576 "response_bytes",
16577 "collection_export_bytes",
16578 "portability_prefix_bytes",
16579 ],
16580 effect_class: "prepare",
16581 risk_flags: &[],
16582 capability_family: "portability",
16583 retry_safety: "safe",
16584 identity_requirement: "caller_action_id",
16585 resolver: None,
16586 cancellation: "per_call",
16587 side_effects: &[],
16588 recovery: "retry",
16589 collection_index_ref: "none",
16590 },
16591 CommandSemanticContract {
16592 command: Command::StartCollectionExport,
16593 admissible_errors: &[
16594 ErrorCode::Aborted,
16595 ErrorCode::DeadlineExceeded,
16596 ErrorCode::InvalidRequest,
16597 ErrorCode::UnsupportedVersion,
16598 ErrorCode::Unauthenticated,
16599 ErrorCode::PermissionDenied,
16600 ErrorCode::NotFound,
16601 ErrorCode::Conflict,
16602 ErrorCode::LimitExceeded,
16603 ErrorCode::CapabilityUnavailable,
16604 ErrorCode::NotSubmitted,
16605 ErrorCode::SubmittedIndeterminate,
16606 ErrorCode::ExpiredUnknown,
16607 ErrorCode::TemporarilyUnavailable,
16608 ErrorCode::Internal,
16609 ],
16610 limit_ids: &[
16611 "request_bytes",
16612 "response_bytes",
16613 "collection_export_bytes",
16614 "collection_export_documents",
16615 "portability_prefix_bytes",
16616 ],
16617 effect_class: "durable_submit",
16618 risk_flags: &[],
16619 capability_family: "portability",
16620 retry_safety: "pre_submit_only",
16621 identity_requirement: "caller_action_id",
16622 resolver: Some(Command::ResolveCollectionExport),
16623 cancellation: "per_call_until_submission_then_resolve",
16624 side_effects: &["commits_authoritative_state", "writes_external_artifact"],
16625 recovery: "resolve_with_resolve_collection_export",
16626 collection_index_ref: "none",
16627 },
16628 CommandSemanticContract {
16629 command: Command::ResolveCollectionExport,
16630 admissible_errors: &[
16631 ErrorCode::Aborted,
16632 ErrorCode::DeadlineExceeded,
16633 ErrorCode::InvalidRequest,
16634 ErrorCode::UnsupportedVersion,
16635 ErrorCode::Unauthenticated,
16636 ErrorCode::PermissionDenied,
16637 ErrorCode::NotFound,
16638 ErrorCode::LimitExceeded,
16639 ErrorCode::CapabilityUnavailable,
16640 ErrorCode::TemporarilyUnavailable,
16641 ErrorCode::Internal,
16642 ],
16643 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
16644 effect_class: "read_only",
16645 risk_flags: &[],
16646 capability_family: "portability",
16647 retry_safety: "safe",
16648 identity_requirement: "caller_action_id",
16649 resolver: None,
16650 cancellation: "per_call",
16651 side_effects: &[],
16652 recovery: "retry",
16653 collection_index_ref: "none",
16654 },
16655 CommandSemanticContract {
16656 command: Command::VerifyCollectionExport,
16657 admissible_errors: &[
16658 ErrorCode::Aborted,
16659 ErrorCode::DeadlineExceeded,
16660 ErrorCode::InvalidRequest,
16661 ErrorCode::UnsupportedVersion,
16662 ErrorCode::Unauthenticated,
16663 ErrorCode::PermissionDenied,
16664 ErrorCode::NotFound,
16665 ErrorCode::LimitExceeded,
16666 ErrorCode::CapabilityUnavailable,
16667 ErrorCode::ChecksumMismatch,
16668 ErrorCode::TemporarilyUnavailable,
16669 ErrorCode::Internal,
16670 ],
16671 limit_ids: &[
16672 "request_bytes",
16673 "response_bytes",
16674 "collection_export_bytes",
16675 "portability_prefix_bytes",
16676 ],
16677 effect_class: "read_only",
16678 risk_flags: &[],
16679 capability_family: "portability",
16680 retry_safety: "safe",
16681 identity_requirement: "request_locator",
16682 resolver: None,
16683 cancellation: "per_call",
16684 side_effects: &[],
16685 recovery: "retry",
16686 collection_index_ref: "none",
16687 },
16688 CommandSemanticContract {
16689 command: Command::PrepareCollectionExportRetirement,
16690 admissible_errors: &[
16691 ErrorCode::Aborted,
16692 ErrorCode::DeadlineExceeded,
16693 ErrorCode::InvalidRequest,
16694 ErrorCode::UnsupportedVersion,
16695 ErrorCode::Unauthenticated,
16696 ErrorCode::PermissionDenied,
16697 ErrorCode::NotFound,
16698 ErrorCode::Conflict,
16699 ErrorCode::LimitExceeded,
16700 ErrorCode::CapabilityUnavailable,
16701 ErrorCode::ChecksumMismatch,
16702 ErrorCode::TemporarilyUnavailable,
16703 ErrorCode::Internal,
16704 ],
16705 limit_ids: &[
16706 "request_bytes",
16707 "response_bytes",
16708 "collection_export_bytes",
16709 "portability_prefix_bytes",
16710 ],
16711 effect_class: "prepare",
16712 risk_flags: &["destructive"],
16713 capability_family: "portability",
16714 retry_safety: "safe",
16715 identity_requirement: "caller_action_id",
16716 resolver: None,
16717 cancellation: "per_call",
16718 side_effects: &[],
16719 recovery: "retry",
16720 collection_index_ref: "none",
16721 },
16722 CommandSemanticContract {
16723 command: Command::StartCollectionExportRetirement,
16724 admissible_errors: &[
16725 ErrorCode::Aborted,
16726 ErrorCode::DeadlineExceeded,
16727 ErrorCode::InvalidRequest,
16728 ErrorCode::UnsupportedVersion,
16729 ErrorCode::Unauthenticated,
16730 ErrorCode::PermissionDenied,
16731 ErrorCode::NotFound,
16732 ErrorCode::Conflict,
16733 ErrorCode::LimitExceeded,
16734 ErrorCode::CapabilityUnavailable,
16735 ErrorCode::NotSubmitted,
16736 ErrorCode::SubmittedIndeterminate,
16737 ErrorCode::ExpiredUnknown,
16738 ErrorCode::ChecksumMismatch,
16739 ErrorCode::TemporarilyUnavailable,
16740 ErrorCode::Internal,
16741 ],
16742 limit_ids: &[
16743 "request_bytes",
16744 "response_bytes",
16745 "collection_export_bytes",
16746 "portability_prefix_bytes",
16747 ],
16748 effect_class: "durable_submit",
16749 risk_flags: &["destructive"],
16750 capability_family: "portability",
16751 retry_safety: "pre_submit_only",
16752 identity_requirement: "caller_action_id",
16753 resolver: Some(Command::ResolveCollectionExportRetirement),
16754 cancellation: "per_call_until_submission_then_resolve",
16755 side_effects: &[
16756 "commits_authoritative_state",
16757 "deletes_external_artifact",
16758 "releases_key_capability_reference",
16759 ],
16760 recovery: "resolve_with_resolve_collection_export_retirement",
16761 collection_index_ref: "none",
16762 },
16763 CommandSemanticContract {
16764 command: Command::ResolveCollectionExportRetirement,
16765 admissible_errors: &[
16766 ErrorCode::Aborted,
16767 ErrorCode::DeadlineExceeded,
16768 ErrorCode::InvalidRequest,
16769 ErrorCode::UnsupportedVersion,
16770 ErrorCode::Unauthenticated,
16771 ErrorCode::PermissionDenied,
16772 ErrorCode::NotFound,
16773 ErrorCode::Conflict,
16774 ErrorCode::LimitExceeded,
16775 ErrorCode::CapabilityUnavailable,
16776 ErrorCode::TemporarilyUnavailable,
16777 ErrorCode::Internal,
16778 ],
16779 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
16780 effect_class: "read_only",
16781 risk_flags: &[],
16782 capability_family: "portability",
16783 retry_safety: "safe",
16784 identity_requirement: "caller_action_id",
16785 resolver: None,
16786 cancellation: "per_call",
16787 side_effects: &[],
16788 recovery: "retry",
16789 collection_index_ref: "none",
16790 },
16791 CommandSemanticContract {
16792 command: Command::PrepareCollectionRestore,
16793 admissible_errors: &[
16794 ErrorCode::Aborted,
16795 ErrorCode::DeadlineExceeded,
16796 ErrorCode::InvalidRequest,
16797 ErrorCode::UnsupportedVersion,
16798 ErrorCode::Unauthenticated,
16799 ErrorCode::PermissionDenied,
16800 ErrorCode::NotFound,
16801 ErrorCode::Conflict,
16802 ErrorCode::LimitExceeded,
16803 ErrorCode::CapabilityUnavailable,
16804 ErrorCode::ChecksumMismatch,
16805 ErrorCode::TemporarilyUnavailable,
16806 ErrorCode::Internal,
16807 ],
16808 limit_ids: &[
16809 "request_bytes",
16810 "response_bytes",
16811 "collection_export_bytes",
16812 "portability_prefix_bytes",
16813 ],
16814 effect_class: "prepare",
16815 risk_flags: &[],
16816 capability_family: "portability",
16817 retry_safety: "safe",
16818 identity_requirement: "caller_action_id",
16819 resolver: None,
16820 cancellation: "per_call",
16821 side_effects: &[],
16822 recovery: "retry",
16823 collection_index_ref: "none",
16824 },
16825 CommandSemanticContract {
16826 command: Command::StartCollectionRestore,
16827 admissible_errors: &[
16828 ErrorCode::Aborted,
16829 ErrorCode::DeadlineExceeded,
16830 ErrorCode::InvalidRequest,
16831 ErrorCode::UnsupportedVersion,
16832 ErrorCode::Unauthenticated,
16833 ErrorCode::PermissionDenied,
16834 ErrorCode::NotFound,
16835 ErrorCode::Conflict,
16836 ErrorCode::LimitExceeded,
16837 ErrorCode::CapabilityUnavailable,
16838 ErrorCode::NotSubmitted,
16839 ErrorCode::SubmittedIndeterminate,
16840 ErrorCode::ExpiredUnknown,
16841 ErrorCode::ChecksumMismatch,
16842 ErrorCode::TemporarilyUnavailable,
16843 ErrorCode::Internal,
16844 ],
16845 limit_ids: &[
16846 "request_bytes",
16847 "response_bytes",
16848 "collection_export_bytes",
16849 "collection_export_documents",
16850 "portability_prefix_bytes",
16851 ],
16852 effect_class: "durable_submit",
16853 risk_flags: &[],
16854 capability_family: "portability",
16855 retry_safety: "pre_submit_only",
16856 identity_requirement: "caller_action_id",
16857 resolver: Some(Command::ResolveCollectionRestore),
16858 cancellation: "per_call_until_submission_then_resolve",
16859 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
16860 recovery: "resolve_with_resolve_collection_restore",
16861 collection_index_ref: "none",
16862 },
16863 CommandSemanticContract {
16864 command: Command::ResolveCollectionRestore,
16865 admissible_errors: &[
16866 ErrorCode::Aborted,
16867 ErrorCode::DeadlineExceeded,
16868 ErrorCode::InvalidRequest,
16869 ErrorCode::UnsupportedVersion,
16870 ErrorCode::Unauthenticated,
16871 ErrorCode::PermissionDenied,
16872 ErrorCode::NotFound,
16873 ErrorCode::LimitExceeded,
16874 ErrorCode::CapabilityUnavailable,
16875 ErrorCode::TemporarilyUnavailable,
16876 ErrorCode::Internal,
16877 ],
16878 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
16879 effect_class: "read_only",
16880 risk_flags: &[],
16881 capability_family: "portability",
16882 retry_safety: "safe",
16883 identity_requirement: "caller_action_id",
16884 resolver: None,
16885 cancellation: "per_call",
16886 side_effects: &[],
16887 recovery: "retry",
16888 collection_index_ref: "none",
16889 },
16890 CommandSemanticContract {
16891 command: Command::PrepareCollectionTransferExport,
16892 admissible_errors: &[
16893 ErrorCode::Aborted,
16894 ErrorCode::DeadlineExceeded,
16895 ErrorCode::InvalidRequest,
16896 ErrorCode::UnsupportedVersion,
16897 ErrorCode::Unauthenticated,
16898 ErrorCode::PermissionDenied,
16899 ErrorCode::NotFound,
16900 ErrorCode::Conflict,
16901 ErrorCode::LimitExceeded,
16902 ErrorCode::CapabilityUnavailable,
16903 ErrorCode::TemporarilyUnavailable,
16904 ErrorCode::Internal,
16905 ],
16906 limit_ids: &[
16907 "request_bytes",
16908 "response_bytes",
16909 "collection_export_bytes",
16910 "portability_prefix_bytes",
16911 ],
16912 effect_class: "prepare",
16913 risk_flags: &[],
16914 capability_family: "portability",
16915 retry_safety: "safe",
16916 identity_requirement: "caller_action_id",
16917 resolver: None,
16918 cancellation: "per_call",
16919 side_effects: &[],
16920 recovery: "retry",
16921 collection_index_ref: "none",
16922 },
16923 CommandSemanticContract {
16924 command: Command::StartCollectionTransferExport,
16925 admissible_errors: &[
16926 ErrorCode::Aborted,
16927 ErrorCode::DeadlineExceeded,
16928 ErrorCode::InvalidRequest,
16929 ErrorCode::UnsupportedVersion,
16930 ErrorCode::Unauthenticated,
16931 ErrorCode::PermissionDenied,
16932 ErrorCode::NotFound,
16933 ErrorCode::Conflict,
16934 ErrorCode::LimitExceeded,
16935 ErrorCode::CapabilityUnavailable,
16936 ErrorCode::NotSubmitted,
16937 ErrorCode::SubmittedIndeterminate,
16938 ErrorCode::ExpiredUnknown,
16939 ErrorCode::TemporarilyUnavailable,
16940 ErrorCode::Internal,
16941 ],
16942 limit_ids: &[
16943 "request_bytes",
16944 "response_bytes",
16945 "collection_export_bytes",
16946 "collection_export_documents",
16947 "portability_prefix_bytes",
16948 ],
16949 effect_class: "durable_submit",
16950 risk_flags: &[],
16951 capability_family: "portability",
16952 retry_safety: "pre_submit_only",
16953 identity_requirement: "caller_action_id",
16954 resolver: Some(Command::ResolveCollectionTransferExport),
16955 cancellation: "per_call_until_submission_then_resolve",
16956 side_effects: &[
16957 "commits_authoritative_state",
16958 "closes_collection_admission",
16959 "writes_external_artifact",
16960 ],
16961 recovery: "resolve_with_resolve_collection_transfer_export",
16962 collection_index_ref: "none",
16963 },
16964 CommandSemanticContract {
16965 command: Command::ResolveCollectionTransferExport,
16966 admissible_errors: &[
16967 ErrorCode::Aborted,
16968 ErrorCode::DeadlineExceeded,
16969 ErrorCode::InvalidRequest,
16970 ErrorCode::UnsupportedVersion,
16971 ErrorCode::Unauthenticated,
16972 ErrorCode::PermissionDenied,
16973 ErrorCode::NotFound,
16974 ErrorCode::LimitExceeded,
16975 ErrorCode::CapabilityUnavailable,
16976 ErrorCode::ChecksumMismatch,
16977 ErrorCode::TemporarilyUnavailable,
16978 ErrorCode::Internal,
16979 ],
16980 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
16981 effect_class: "read_only",
16982 risk_flags: &[],
16983 capability_family: "portability",
16984 retry_safety: "safe",
16985 identity_requirement: "caller_action_id",
16986 resolver: None,
16987 cancellation: "per_call",
16988 side_effects: &[],
16989 recovery: "retry",
16990 collection_index_ref: "none",
16991 },
16992 CommandSemanticContract {
16993 command: Command::PrepareCollectionTransferRestore,
16994 admissible_errors: &[
16995 ErrorCode::Aborted,
16996 ErrorCode::DeadlineExceeded,
16997 ErrorCode::InvalidRequest,
16998 ErrorCode::UnsupportedVersion,
16999 ErrorCode::Unauthenticated,
17000 ErrorCode::PermissionDenied,
17001 ErrorCode::NotFound,
17002 ErrorCode::Conflict,
17003 ErrorCode::LimitExceeded,
17004 ErrorCode::CapabilityUnavailable,
17005 ErrorCode::ChecksumMismatch,
17006 ErrorCode::TemporarilyUnavailable,
17007 ErrorCode::Internal,
17008 ],
17009 limit_ids: &[
17010 "request_bytes",
17011 "response_bytes",
17012 "collection_export_bytes",
17013 "portability_prefix_bytes",
17014 ],
17015 effect_class: "prepare",
17016 risk_flags: &[],
17017 capability_family: "portability",
17018 retry_safety: "safe",
17019 identity_requirement: "caller_action_id",
17020 resolver: None,
17021 cancellation: "per_call",
17022 side_effects: &[],
17023 recovery: "retry",
17024 collection_index_ref: "none",
17025 },
17026 CommandSemanticContract {
17027 command: Command::StartCollectionTransferRestore,
17028 admissible_errors: &[
17029 ErrorCode::Aborted,
17030 ErrorCode::DeadlineExceeded,
17031 ErrorCode::InvalidRequest,
17032 ErrorCode::UnsupportedVersion,
17033 ErrorCode::Unauthenticated,
17034 ErrorCode::PermissionDenied,
17035 ErrorCode::NotFound,
17036 ErrorCode::Conflict,
17037 ErrorCode::LimitExceeded,
17038 ErrorCode::CapabilityUnavailable,
17039 ErrorCode::NotSubmitted,
17040 ErrorCode::SubmittedIndeterminate,
17041 ErrorCode::ExpiredUnknown,
17042 ErrorCode::ChecksumMismatch,
17043 ErrorCode::TemporarilyUnavailable,
17044 ErrorCode::Internal,
17045 ],
17046 limit_ids: &[
17047 "request_bytes",
17048 "response_bytes",
17049 "collection_export_bytes",
17050 "collection_export_documents",
17051 "portability_prefix_bytes",
17052 ],
17053 effect_class: "durable_submit",
17054 risk_flags: &[],
17055 capability_family: "portability",
17056 retry_safety: "pre_submit_only",
17057 identity_requirement: "caller_action_id",
17058 resolver: Some(Command::ResolveCollectionTransferRestore),
17059 cancellation: "per_call_until_submission_then_resolve",
17060 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
17061 recovery: "resolve_with_resolve_collection_transfer_restore",
17062 collection_index_ref: "none",
17063 },
17064 CommandSemanticContract {
17065 command: Command::ResolveCollectionTransferRestore,
17066 admissible_errors: &[
17067 ErrorCode::Aborted,
17068 ErrorCode::DeadlineExceeded,
17069 ErrorCode::InvalidRequest,
17070 ErrorCode::UnsupportedVersion,
17071 ErrorCode::Unauthenticated,
17072 ErrorCode::PermissionDenied,
17073 ErrorCode::NotFound,
17074 ErrorCode::LimitExceeded,
17075 ErrorCode::CapabilityUnavailable,
17076 ErrorCode::ChecksumMismatch,
17077 ErrorCode::TemporarilyUnavailable,
17078 ErrorCode::Internal,
17079 ],
17080 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
17081 effect_class: "read_only",
17082 risk_flags: &[],
17083 capability_family: "portability",
17084 retry_safety: "safe",
17085 identity_requirement: "caller_action_id",
17086 resolver: None,
17087 cancellation: "per_call",
17088 side_effects: &[],
17089 recovery: "retry",
17090 collection_index_ref: "none",
17091 },
17092 CommandSemanticContract {
17093 command: Command::PrepareCollectionStandbyAdmission,
17094 admissible_errors: &[
17095 ErrorCode::Aborted,
17096 ErrorCode::DeadlineExceeded,
17097 ErrorCode::InvalidRequest,
17098 ErrorCode::UnsupportedVersion,
17099 ErrorCode::Unauthenticated,
17100 ErrorCode::PermissionDenied,
17101 ErrorCode::NotFound,
17102 ErrorCode::Conflict,
17103 ErrorCode::LimitExceeded,
17104 ErrorCode::CapabilityUnavailable,
17105 ErrorCode::ChecksumMismatch,
17106 ErrorCode::TemporarilyUnavailable,
17107 ErrorCode::Internal,
17108 ],
17109 limit_ids: &[
17110 "request_bytes",
17111 "response_bytes",
17112 "collection_export_bytes",
17113 "portability_prefix_bytes",
17114 ],
17115 effect_class: "prepare",
17116 risk_flags: &[],
17117 capability_family: "portability",
17118 retry_safety: "safe",
17119 identity_requirement: "caller_action_id",
17120 resolver: None,
17121 cancellation: "per_call",
17122 side_effects: &[],
17123 recovery: "retry",
17124 collection_index_ref: "none",
17125 },
17126 CommandSemanticContract {
17127 command: Command::StartCollectionStandbyAdmission,
17128 admissible_errors: &[
17129 ErrorCode::Aborted,
17130 ErrorCode::DeadlineExceeded,
17131 ErrorCode::InvalidRequest,
17132 ErrorCode::UnsupportedVersion,
17133 ErrorCode::Unauthenticated,
17134 ErrorCode::PermissionDenied,
17135 ErrorCode::NotFound,
17136 ErrorCode::Conflict,
17137 ErrorCode::LimitExceeded,
17138 ErrorCode::CapabilityUnavailable,
17139 ErrorCode::NotSubmitted,
17140 ErrorCode::SubmittedIndeterminate,
17141 ErrorCode::ExpiredUnknown,
17142 ErrorCode::ChecksumMismatch,
17143 ErrorCode::TemporarilyUnavailable,
17144 ErrorCode::Internal,
17145 ],
17146 limit_ids: &[
17147 "request_bytes",
17148 "response_bytes",
17149 "collection_export_bytes",
17150 "portability_prefix_bytes",
17151 ],
17152 effect_class: "durable_submit",
17153 risk_flags: &[],
17154 capability_family: "portability",
17155 retry_safety: "pre_submit_only",
17156 identity_requirement: "caller_action_id",
17157 resolver: Some(Command::ResolveCollectionStandbyAdmission),
17158 cancellation: "per_call_until_submission_then_resolve",
17159 side_effects: &["commits_authoritative_state"],
17160 recovery: "resolve_with_resolve_collection_standby_admission",
17161 collection_index_ref: "none",
17162 },
17163 CommandSemanticContract {
17164 command: Command::ResolveCollectionStandbyAdmission,
17165 admissible_errors: &[
17166 ErrorCode::Aborted,
17167 ErrorCode::DeadlineExceeded,
17168 ErrorCode::InvalidRequest,
17169 ErrorCode::UnsupportedVersion,
17170 ErrorCode::Unauthenticated,
17171 ErrorCode::PermissionDenied,
17172 ErrorCode::NotFound,
17173 ErrorCode::Conflict,
17174 ErrorCode::LimitExceeded,
17175 ErrorCode::CapabilityUnavailable,
17176 ErrorCode::ChecksumMismatch,
17177 ErrorCode::TemporarilyUnavailable,
17178 ErrorCode::Internal,
17179 ],
17180 limit_ids: &[
17181 "request_bytes",
17182 "response_bytes",
17183 "collection_export_bytes",
17184 "portability_prefix_bytes",
17185 ],
17186 effect_class: "read_only",
17187 risk_flags: &[],
17188 capability_family: "portability",
17189 retry_safety: "safe",
17190 identity_requirement: "caller_action_id",
17191 resolver: None,
17192 cancellation: "per_call",
17193 side_effects: &[],
17194 recovery: "retry",
17195 collection_index_ref: "none",
17196 },
17197 CommandSemanticContract {
17198 command: Command::PrepareCollectionStandbyActivation,
17199 admissible_errors: &[
17200 ErrorCode::Aborted,
17201 ErrorCode::DeadlineExceeded,
17202 ErrorCode::InvalidRequest,
17203 ErrorCode::UnsupportedVersion,
17204 ErrorCode::Unauthenticated,
17205 ErrorCode::PermissionDenied,
17206 ErrorCode::NotFound,
17207 ErrorCode::Conflict,
17208 ErrorCode::LimitExceeded,
17209 ErrorCode::CapabilityUnavailable,
17210 ErrorCode::TemporarilyUnavailable,
17211 ErrorCode::Internal,
17212 ],
17213 limit_ids: &["request_bytes", "response_bytes"],
17214 effect_class: "prepare",
17215 risk_flags: &[],
17216 capability_family: "portability",
17217 retry_safety: "safe",
17218 identity_requirement: "caller_action_id",
17219 resolver: None,
17220 cancellation: "per_call",
17221 side_effects: &[],
17222 recovery: "retry",
17223 collection_index_ref: "none",
17224 },
17225 CommandSemanticContract {
17226 command: Command::StartCollectionStandbyActivation,
17227 admissible_errors: &[
17228 ErrorCode::Aborted,
17229 ErrorCode::DeadlineExceeded,
17230 ErrorCode::InvalidRequest,
17231 ErrorCode::UnsupportedVersion,
17232 ErrorCode::Unauthenticated,
17233 ErrorCode::PermissionDenied,
17234 ErrorCode::NotFound,
17235 ErrorCode::Conflict,
17236 ErrorCode::LimitExceeded,
17237 ErrorCode::CapabilityUnavailable,
17238 ErrorCode::NotSubmitted,
17239 ErrorCode::SubmittedIndeterminate,
17240 ErrorCode::ExpiredUnknown,
17241 ErrorCode::TemporarilyUnavailable,
17242 ErrorCode::Internal,
17243 ],
17244 limit_ids: &["request_bytes", "response_bytes"],
17245 effect_class: "durable_submit",
17246 risk_flags: &[],
17247 capability_family: "portability",
17248 retry_safety: "pre_submit_only",
17249 identity_requirement: "caller_action_id",
17250 resolver: Some(Command::ResolveCollectionStandbyActivation),
17251 cancellation: "per_call_until_submission_then_resolve",
17252 side_effects: &["commits_authoritative_state"],
17253 recovery: "resolve_with_resolve_collection_standby_activation",
17254 collection_index_ref: "none",
17255 },
17256 CommandSemanticContract {
17257 command: Command::ResolveCollectionStandbyActivation,
17258 admissible_errors: &[
17259 ErrorCode::Aborted,
17260 ErrorCode::DeadlineExceeded,
17261 ErrorCode::InvalidRequest,
17262 ErrorCode::UnsupportedVersion,
17263 ErrorCode::Unauthenticated,
17264 ErrorCode::PermissionDenied,
17265 ErrorCode::NotFound,
17266 ErrorCode::Conflict,
17267 ErrorCode::LimitExceeded,
17268 ErrorCode::CapabilityUnavailable,
17269 ErrorCode::TemporarilyUnavailable,
17270 ErrorCode::Internal,
17271 ],
17272 limit_ids: &["request_bytes", "response_bytes"],
17273 effect_class: "read_only",
17274 risk_flags: &[],
17275 capability_family: "portability",
17276 retry_safety: "safe",
17277 identity_requirement: "caller_action_id",
17278 resolver: None,
17279 cancellation: "per_call",
17280 side_effects: &[],
17281 recovery: "retry",
17282 collection_index_ref: "none",
17283 },
17284 CommandSemanticContract {
17285 command: Command::PrepareIndexExport,
17286 admissible_errors: &[
17287 ErrorCode::Aborted,
17288 ErrorCode::DeadlineExceeded,
17289 ErrorCode::InvalidRequest,
17290 ErrorCode::UnsupportedVersion,
17291 ErrorCode::Unauthenticated,
17292 ErrorCode::PermissionDenied,
17293 ErrorCode::NotFound,
17294 ErrorCode::LimitExceeded,
17295 ErrorCode::CapabilityUnavailable,
17296 ErrorCode::TemporarilyUnavailable,
17297 ErrorCode::Internal,
17298 ],
17299 limit_ids: &[
17300 "request_bytes",
17301 "response_bytes",
17302 "index_transfer_bytes",
17303 "index_transfer_records",
17304 "index_transfer_pages",
17305 "portability_prefix_bytes",
17306 ],
17307 effect_class: "prepare",
17308 risk_flags: &[],
17309 capability_family: "portability",
17310 retry_safety: "safe",
17311 identity_requirement: "caller_action_id",
17312 resolver: None,
17313 cancellation: "per_call",
17314 side_effects: &[],
17315 recovery: "retry",
17316 collection_index_ref: "request_index",
17317 },
17318 CommandSemanticContract {
17319 command: Command::StartIndexExport,
17320 admissible_errors: &[
17321 ErrorCode::Aborted,
17322 ErrorCode::DeadlineExceeded,
17323 ErrorCode::InvalidRequest,
17324 ErrorCode::UnsupportedVersion,
17325 ErrorCode::Unauthenticated,
17326 ErrorCode::PermissionDenied,
17327 ErrorCode::NotFound,
17328 ErrorCode::Conflict,
17329 ErrorCode::LimitExceeded,
17330 ErrorCode::CapabilityUnavailable,
17331 ErrorCode::NotSubmitted,
17332 ErrorCode::SubmittedIndeterminate,
17333 ErrorCode::ExpiredUnknown,
17334 ErrorCode::TemporarilyUnavailable,
17335 ErrorCode::Internal,
17336 ],
17337 limit_ids: &[
17338 "request_bytes",
17339 "response_bytes",
17340 "index_transfer_bytes",
17341 "index_transfer_records",
17342 "index_transfer_pages",
17343 "portability_prefix_bytes",
17344 ],
17345 effect_class: "durable_submit",
17346 risk_flags: &[],
17347 capability_family: "portability",
17348 retry_safety: "pre_submit_only",
17349 identity_requirement: "caller_action_id",
17350 resolver: Some(Command::ResolveIndexExport),
17351 cancellation: "per_call_until_submission_then_resolve",
17352 side_effects: &["commits_authoritative_state", "writes_external_artifact"],
17353 recovery: "resolve_with_resolve_index_export",
17354 collection_index_ref: "request_index",
17355 },
17356 CommandSemanticContract {
17357 command: Command::ResolveIndexExport,
17358 admissible_errors: &[
17359 ErrorCode::Aborted,
17360 ErrorCode::DeadlineExceeded,
17361 ErrorCode::InvalidRequest,
17362 ErrorCode::UnsupportedVersion,
17363 ErrorCode::Unauthenticated,
17364 ErrorCode::PermissionDenied,
17365 ErrorCode::NotFound,
17366 ErrorCode::LimitExceeded,
17367 ErrorCode::CapabilityUnavailable,
17368 ErrorCode::ChecksumMismatch,
17369 ErrorCode::TemporarilyUnavailable,
17370 ErrorCode::Internal,
17371 ],
17372 limit_ids: &[
17373 "request_bytes",
17374 "response_bytes",
17375 "index_transfer_bytes",
17376 "index_transfer_pages",
17377 "portability_prefix_bytes",
17378 ],
17379 effect_class: "read_only",
17380 risk_flags: &[],
17381 capability_family: "portability",
17382 retry_safety: "safe",
17383 identity_requirement: "caller_action_id",
17384 resolver: None,
17385 cancellation: "per_call",
17386 side_effects: &[],
17387 recovery: "retry",
17388 collection_index_ref: "request_index",
17389 },
17390 CommandSemanticContract {
17391 command: Command::VerifyIndexExport,
17392 admissible_errors: &[
17393 ErrorCode::Aborted,
17394 ErrorCode::DeadlineExceeded,
17395 ErrorCode::InvalidRequest,
17396 ErrorCode::UnsupportedVersion,
17397 ErrorCode::Unauthenticated,
17398 ErrorCode::PermissionDenied,
17399 ErrorCode::NotFound,
17400 ErrorCode::LimitExceeded,
17401 ErrorCode::CapabilityUnavailable,
17402 ErrorCode::ChecksumMismatch,
17403 ErrorCode::TemporarilyUnavailable,
17404 ErrorCode::Internal,
17405 ],
17406 limit_ids: &[
17407 "request_bytes",
17408 "response_bytes",
17409 "index_transfer_bytes",
17410 "index_transfer_pages",
17411 "portability_prefix_bytes",
17412 ],
17413 effect_class: "read_only",
17414 risk_flags: &[],
17415 capability_family: "portability",
17416 retry_safety: "safe",
17417 identity_requirement: "request_locator",
17418 resolver: None,
17419 cancellation: "per_call",
17420 side_effects: &[],
17421 recovery: "retry",
17422 collection_index_ref: "request_artifact_source_index",
17423 },
17424 CommandSemanticContract {
17425 command: Command::PrepareIndexImport,
17426 admissible_errors: &[
17427 ErrorCode::Aborted,
17428 ErrorCode::DeadlineExceeded,
17429 ErrorCode::InvalidRequest,
17430 ErrorCode::UnsupportedVersion,
17431 ErrorCode::Unauthenticated,
17432 ErrorCode::PermissionDenied,
17433 ErrorCode::NotFound,
17434 ErrorCode::Conflict,
17435 ErrorCode::LimitExceeded,
17436 ErrorCode::CapabilityUnavailable,
17437 ErrorCode::ChecksumMismatch,
17438 ErrorCode::TemporarilyUnavailable,
17439 ErrorCode::Internal,
17440 ],
17441 limit_ids: &[
17442 "request_bytes",
17443 "response_bytes",
17444 "index_transfer_bytes",
17445 "index_transfer_pages",
17446 "portability_prefix_bytes",
17447 "resource_initial_shards",
17448 "resource_target_shard_bytes",
17449 "resource_admission_weight",
17450 "resource_ram_bytes",
17451 "resource_nvme_bytes",
17452 "resource_refresh_millis",
17453 "resource_memtable_bytes",
17454 "resource_parallelism",
17455 ],
17456 effect_class: "prepare",
17457 risk_flags: &[],
17458 capability_family: "portability",
17459 retry_safety: "safe",
17460 identity_requirement: "caller_action_id",
17461 resolver: None,
17462 cancellation: "per_call",
17463 side_effects: &[],
17464 recovery: "retry",
17465 collection_index_ref: "request_destination_name",
17466 },
17467 CommandSemanticContract {
17468 command: Command::StartIndexImport,
17469 admissible_errors: &[
17470 ErrorCode::Aborted,
17471 ErrorCode::DeadlineExceeded,
17472 ErrorCode::InvalidRequest,
17473 ErrorCode::UnsupportedVersion,
17474 ErrorCode::Unauthenticated,
17475 ErrorCode::PermissionDenied,
17476 ErrorCode::NotFound,
17477 ErrorCode::Conflict,
17478 ErrorCode::LimitExceeded,
17479 ErrorCode::CapabilityUnavailable,
17480 ErrorCode::NotSubmitted,
17481 ErrorCode::SubmittedIndeterminate,
17482 ErrorCode::ExpiredUnknown,
17483 ErrorCode::ChecksumMismatch,
17484 ErrorCode::TemporarilyUnavailable,
17485 ErrorCode::Internal,
17486 ],
17487 limit_ids: &[
17488 "request_bytes",
17489 "response_bytes",
17490 "index_transfer_bytes",
17491 "index_transfer_pages",
17492 "portability_prefix_bytes",
17493 "resource_initial_shards",
17494 "resource_target_shard_bytes",
17495 "resource_admission_weight",
17496 "resource_ram_bytes",
17497 "resource_nvme_bytes",
17498 "resource_refresh_millis",
17499 "resource_memtable_bytes",
17500 "resource_parallelism",
17501 ],
17502 effect_class: "durable_submit",
17503 risk_flags: &[],
17504 capability_family: "portability",
17505 retry_safety: "pre_submit_only",
17506 identity_requirement: "caller_action_id",
17507 resolver: Some(Command::ResolveIndexImport),
17508 cancellation: "per_call_until_submission_then_resolve",
17509 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
17510 recovery: "resolve_with_resolve_index_import",
17511 collection_index_ref: "request_destination_name",
17512 },
17513 CommandSemanticContract {
17514 command: Command::ResolveIndexImport,
17515 admissible_errors: &[
17516 ErrorCode::Aborted,
17517 ErrorCode::DeadlineExceeded,
17518 ErrorCode::InvalidRequest,
17519 ErrorCode::UnsupportedVersion,
17520 ErrorCode::Unauthenticated,
17521 ErrorCode::PermissionDenied,
17522 ErrorCode::NotFound,
17523 ErrorCode::LimitExceeded,
17524 ErrorCode::CapabilityUnavailable,
17525 ErrorCode::ChecksumMismatch,
17526 ErrorCode::TemporarilyUnavailable,
17527 ErrorCode::Internal,
17528 ],
17529 limit_ids: &[
17530 "request_bytes",
17531 "response_bytes",
17532 "index_transfer_bytes",
17533 "index_transfer_pages",
17534 "portability_prefix_bytes",
17535 ],
17536 effect_class: "read_only",
17537 risk_flags: &[],
17538 capability_family: "portability",
17539 retry_safety: "safe",
17540 identity_requirement: "caller_action_id",
17541 resolver: None,
17542 cancellation: "per_call",
17543 side_effects: &[],
17544 recovery: "retry",
17545 collection_index_ref: "request_destination_name",
17546 },
17547 CommandSemanticContract {
17548 command: Command::ReadArtifactChunk,
17549 admissible_errors: &[
17550 ErrorCode::Aborted,
17551 ErrorCode::DeadlineExceeded,
17552 ErrorCode::InvalidRequest,
17553 ErrorCode::UnsupportedVersion,
17554 ErrorCode::Unauthenticated,
17555 ErrorCode::PermissionDenied,
17556 ErrorCode::NotFound,
17557 ErrorCode::LimitExceeded,
17558 ErrorCode::CapabilityUnavailable,
17559 ErrorCode::ArtifactRangeInvalid,
17560 ErrorCode::ChecksumMismatch,
17561 ErrorCode::TemporarilyUnavailable,
17562 ErrorCode::Internal,
17563 ],
17564 limit_ids: &["request_bytes", "response_bytes", "artifact_chunk_bytes"],
17565 effect_class: "read_only",
17566 risk_flags: &[],
17567 capability_family: "operations",
17568 retry_safety: "safe",
17569 identity_requirement: "none",
17570 resolver: None,
17571 cancellation: "per_call",
17572 side_effects: &[],
17573 recovery: "retry",
17574 collection_index_ref: "none",
17575 },
17576 CommandSemanticContract {
17577 command: Command::ExportUsage,
17578 admissible_errors: &[
17579 ErrorCode::Aborted,
17580 ErrorCode::DeadlineExceeded,
17581 ErrorCode::InvalidRequest,
17582 ErrorCode::UnsupportedVersion,
17583 ErrorCode::Unauthenticated,
17584 ErrorCode::PermissionDenied,
17585 ErrorCode::NotFound,
17586 ErrorCode::StaleCursor,
17587 ErrorCode::RestartBudgetExhausted,
17588 ErrorCode::LimitExceeded,
17589 ErrorCode::CapabilityUnavailable,
17590 ErrorCode::TemporarilyUnavailable,
17591 ErrorCode::Internal,
17592 ],
17593 limit_ids: &["request_bytes", "response_bytes", "page_size"],
17594 effect_class: "read_only",
17595 risk_flags: &[],
17596 capability_family: "usage",
17597 retry_safety: "safe",
17598 identity_requirement: "none",
17599 resolver: None,
17600 cancellation: "per_call",
17601 side_effects: &[],
17602 recovery: "retry",
17603 collection_index_ref: "none",
17604 },
17605 CommandSemanticContract {
17606 command: Command::GetStorageUsage,
17607 admissible_errors: &[
17608 ErrorCode::Aborted,
17609 ErrorCode::DeadlineExceeded,
17610 ErrorCode::Unauthenticated,
17611 ErrorCode::PermissionDenied,
17612 ErrorCode::NotFound,
17613 ErrorCode::LimitExceeded,
17614 ErrorCode::CapabilityUnavailable,
17615 ErrorCode::TemporarilyUnavailable,
17616 ErrorCode::Internal,
17617 ],
17618 limit_ids: &["request_bytes", "response_bytes"],
17619 effect_class: "read_only",
17620 risk_flags: &[],
17621 capability_family: "usage",
17622 retry_safety: "safe",
17623 identity_requirement: "none",
17624 resolver: None,
17625 cancellation: "per_call",
17626 side_effects: &[],
17627 recovery: "retry",
17628 collection_index_ref: "none",
17629 },
17630 CommandSemanticContract {
17631 command: Command::ReadLogicalOccupancy,
17632 admissible_errors: &[
17633 ErrorCode::Aborted,
17634 ErrorCode::DeadlineExceeded,
17635 ErrorCode::InvalidRequest,
17636 ErrorCode::UnsupportedVersion,
17637 ErrorCode::Unauthenticated,
17638 ErrorCode::PermissionDenied,
17639 ErrorCode::NotFound,
17640 ErrorCode::StaleCursor,
17641 ErrorCode::LimitExceeded,
17642 ErrorCode::CapabilityUnavailable,
17643 ErrorCode::TemporarilyUnavailable,
17644 ErrorCode::Internal,
17645 ],
17646 limit_ids: &["request_bytes", "response_bytes", "page_size", "search_result_window"],
17647 effect_class: "read_only",
17648 risk_flags: &[],
17649 capability_family: "usage",
17650 retry_safety: "safe",
17651 identity_requirement: "none",
17652 resolver: None,
17653 cancellation: "per_call",
17654 side_effects: &[],
17655 recovery: "retry",
17656 collection_index_ref: "request_index",
17657 },
17658 CommandSemanticContract {
17659 command: Command::ExecuteStateRead,
17660 admissible_errors: &[
17661 ErrorCode::Aborted,
17662 ErrorCode::DeadlineExceeded,
17663 ErrorCode::InvalidRequest,
17664 ErrorCode::UnsupportedVersion,
17665 ErrorCode::Unauthenticated,
17666 ErrorCode::PermissionDenied,
17667 ErrorCode::NotFound,
17668 ErrorCode::LimitExceeded,
17669 ErrorCode::CapabilityUnavailable,
17670 ErrorCode::TemporarilyUnavailable,
17671 ErrorCode::Internal,
17672 ],
17673 limit_ids: &[
17674 "request_bytes",
17675 "response_bytes",
17676 "state_command_keys",
17677 "state_command_value_bytes",
17678 ],
17679 effect_class: "read_only",
17680 risk_flags: &[],
17681 capability_family: "data",
17682 retry_safety: "safe",
17683 identity_requirement: "none",
17684 resolver: None,
17685 cancellation: "per_call",
17686 side_effects: &[],
17687 recovery: "retry",
17688 collection_index_ref: "request_index",
17689 },
17690 CommandSemanticContract {
17691 command: Command::PrepareStateWrite,
17692 admissible_errors: &[
17693 ErrorCode::Aborted,
17694 ErrorCode::DeadlineExceeded,
17695 ErrorCode::InvalidRequest,
17696 ErrorCode::UnsupportedVersion,
17697 ErrorCode::Unauthenticated,
17698 ErrorCode::PermissionDenied,
17699 ErrorCode::NotFound,
17700 ErrorCode::LimitExceeded,
17701 ErrorCode::CapabilityUnavailable,
17702 ErrorCode::TemporarilyUnavailable,
17703 ErrorCode::Internal,
17704 ],
17705 limit_ids: &[
17706 "request_bytes",
17707 "response_bytes",
17708 "state_command_keys",
17709 "state_command_value_bytes",
17710 ],
17711 effect_class: "prepare",
17712 risk_flags: &[],
17713 capability_family: "data",
17714 retry_safety: "safe",
17715 identity_requirement: "caller_action_id",
17716 resolver: None,
17717 cancellation: "per_call",
17718 side_effects: &["creates_bounded_preparation"],
17719 recovery: "retry",
17720 collection_index_ref: "request_index",
17721 },
17722 CommandSemanticContract {
17723 command: Command::SubmitStateWrite,
17724 admissible_errors: &[
17725 ErrorCode::Aborted,
17726 ErrorCode::DeadlineExceeded,
17727 ErrorCode::InvalidRequest,
17728 ErrorCode::UnsupportedVersion,
17729 ErrorCode::Unauthenticated,
17730 ErrorCode::PermissionDenied,
17731 ErrorCode::NotFound,
17732 ErrorCode::Conflict,
17733 ErrorCode::LimitExceeded,
17734 ErrorCode::CapabilityUnavailable,
17735 ErrorCode::NotSubmitted,
17736 ErrorCode::SubmittedIndeterminate,
17737 ErrorCode::ExpiredUnknown,
17738 ErrorCode::TemporarilyUnavailable,
17739 ErrorCode::Internal,
17740 ],
17741 limit_ids: &[
17742 "request_bytes",
17743 "response_bytes",
17744 "state_command_keys",
17745 "state_command_value_bytes",
17746 ],
17747 effect_class: "durable_submit",
17748 risk_flags: &[],
17749 capability_family: "data",
17750 retry_safety: "pre_submit_only",
17751 identity_requirement: "request_locator",
17752 resolver: Some(Command::ResolveStateWrite),
17753 cancellation: "per_call_until_submission_then_resolve",
17754 side_effects: &["commits_authoritative_state"],
17755 recovery: "resolve_with_resolve_state_write",
17756 collection_index_ref: "request_index",
17757 },
17758 CommandSemanticContract {
17759 command: Command::ResolveStateWrite,
17760 admissible_errors: &[
17761 ErrorCode::Aborted,
17762 ErrorCode::DeadlineExceeded,
17763 ErrorCode::InvalidRequest,
17764 ErrorCode::UnsupportedVersion,
17765 ErrorCode::Unauthenticated,
17766 ErrorCode::PermissionDenied,
17767 ErrorCode::NotFound,
17768 ErrorCode::LimitExceeded,
17769 ErrorCode::CapabilityUnavailable,
17770 ErrorCode::TemporarilyUnavailable,
17771 ErrorCode::Internal,
17772 ],
17773 limit_ids: &[
17774 "request_bytes",
17775 "response_bytes",
17776 "state_command_keys",
17777 "state_command_value_bytes",
17778 ],
17779 effect_class: "read_only",
17780 risk_flags: &[],
17781 capability_family: "data",
17782 retry_safety: "safe",
17783 identity_requirement: "request_locator",
17784 resolver: None,
17785 cancellation: "per_call",
17786 side_effects: &[],
17787 recovery: "retry",
17788 collection_index_ref: "request_index",
17789 },
17790];
17791#[derive(Clone, Copy, Debug, Eq, PartialEq)]
17792pub struct CommandOutcomeContract {
17793 pub command: Command,
17794 pub possible_submission_states: &'static [&'static str],
17795 pub identity_requirement: &'static str,
17796 pub resolver_command: Option<Command>,
17797 pub cancellation: &'static str,
17798}
17799pub const LODESTONE_API_COMMAND_OUTCOMES: &[CommandOutcomeContract] = &[
17800 CommandOutcomeContract {
17801 command: Command::Discover,
17802 possible_submission_states: &["not_submitted", "resolved"],
17803 identity_requirement: "none",
17804 resolver_command: None,
17805 cancellation: "per_call",
17806 },
17807 CommandOutcomeContract {
17808 command: Command::ListIndexes,
17809 possible_submission_states: &["not_submitted", "resolved"],
17810 identity_requirement: "none",
17811 resolver_command: None,
17812 cancellation: "per_call",
17813 },
17814 CommandOutcomeContract {
17815 command: Command::GetIndex,
17816 possible_submission_states: &["not_submitted", "resolved"],
17817 identity_requirement: "none",
17818 resolver_command: None,
17819 cancellation: "per_call",
17820 },
17821 CommandOutcomeContract {
17822 command: Command::ValidateIndexChange,
17823 possible_submission_states: &["not_submitted", "resolved"],
17824 identity_requirement: "none",
17825 resolver_command: None,
17826 cancellation: "per_call",
17827 },
17828 CommandOutcomeContract {
17829 command: Command::ApplyIndexChange,
17830 possible_submission_states: &[
17831 "not_submitted",
17832 "submitted",
17833 "known_retired",
17834 "indeterminate",
17835 "resolved",
17836 ],
17837 identity_requirement: "caller_action_id",
17838 resolver_command: Some(Command::ResolveIndexChange),
17839 cancellation: "per_call_until_submission_then_resolve",
17840 },
17841 CommandOutcomeContract {
17842 command: Command::ResolveIndexChange,
17843 possible_submission_states: &["not_submitted", "resolved"],
17844 identity_requirement: "caller_action_id",
17845 resolver_command: None,
17846 cancellation: "per_call",
17847 },
17848 CommandOutcomeContract {
17849 command: Command::ApplyAdministrationMutation,
17850 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
17851 identity_requirement: "caller_action_id",
17852 resolver_command: None,
17853 cancellation: "per_call_until_submission_then_resolve",
17854 },
17855 CommandOutcomeContract {
17856 command: Command::ListAliases,
17857 possible_submission_states: &["not_submitted", "resolved"],
17858 identity_requirement: "none",
17859 resolver_command: None,
17860 cancellation: "per_call",
17861 },
17862 CommandOutcomeContract {
17863 command: Command::GetAlias,
17864 possible_submission_states: &["not_submitted", "resolved"],
17865 identity_requirement: "none",
17866 resolver_command: None,
17867 cancellation: "per_call",
17868 },
17869 CommandOutcomeContract {
17870 command: Command::ListDataStreams,
17871 possible_submission_states: &["not_submitted", "resolved"],
17872 identity_requirement: "none",
17873 resolver_command: None,
17874 cancellation: "per_call",
17875 },
17876 CommandOutcomeContract {
17877 command: Command::GetDataStream,
17878 possible_submission_states: &["not_submitted", "resolved"],
17879 identity_requirement: "none",
17880 resolver_command: None,
17881 cancellation: "per_call",
17882 },
17883 CommandOutcomeContract {
17884 command: Command::ListComponentTemplates,
17885 possible_submission_states: &["not_submitted", "resolved"],
17886 identity_requirement: "none",
17887 resolver_command: None,
17888 cancellation: "per_call",
17889 },
17890 CommandOutcomeContract {
17891 command: Command::GetComponentTemplate,
17892 possible_submission_states: &["not_submitted", "resolved"],
17893 identity_requirement: "none",
17894 resolver_command: None,
17895 cancellation: "per_call",
17896 },
17897 CommandOutcomeContract {
17898 command: Command::ListIndexTemplates,
17899 possible_submission_states: &["not_submitted", "resolved"],
17900 identity_requirement: "none",
17901 resolver_command: None,
17902 cancellation: "per_call",
17903 },
17904 CommandOutcomeContract {
17905 command: Command::GetIndexTemplate,
17906 possible_submission_states: &["not_submitted", "resolved"],
17907 identity_requirement: "none",
17908 resolver_command: None,
17909 cancellation: "per_call",
17910 },
17911 CommandOutcomeContract {
17912 command: Command::ListIngestPipelines,
17913 possible_submission_states: &["not_submitted", "resolved"],
17914 identity_requirement: "none",
17915 resolver_command: None,
17916 cancellation: "per_call",
17917 },
17918 CommandOutcomeContract {
17919 command: Command::GetIngestPipeline,
17920 possible_submission_states: &["not_submitted", "resolved"],
17921 identity_requirement: "none",
17922 resolver_command: None,
17923 cancellation: "per_call",
17924 },
17925 CommandOutcomeContract {
17926 command: Command::SimulateIngestPipeline,
17927 possible_submission_states: &["not_submitted", "resolved"],
17928 identity_requirement: "none",
17929 resolver_command: None,
17930 cancellation: "per_call",
17931 },
17932 CommandOutcomeContract {
17933 command: Command::ReprocessByQuery,
17934 possible_submission_states: &[
17935 "not_submitted",
17936 "submitted",
17937 "known_retired",
17938 "indeterminate",
17939 "resolved",
17940 ],
17941 identity_requirement: "caller_action_id",
17942 resolver_command: None,
17943 cancellation: "per_call_until_submission_then_resolve",
17944 },
17945 CommandOutcomeContract {
17946 command: Command::ListLifecyclePolicies,
17947 possible_submission_states: &["not_submitted", "resolved"],
17948 identity_requirement: "none",
17949 resolver_command: None,
17950 cancellation: "per_call",
17951 },
17952 CommandOutcomeContract {
17953 command: Command::GetLifecyclePolicy,
17954 possible_submission_states: &["not_submitted", "resolved"],
17955 identity_requirement: "none",
17956 resolver_command: None,
17957 cancellation: "per_call",
17958 },
17959 CommandOutcomeContract {
17960 command: Command::PrepareCreateIndex,
17961 possible_submission_states: &["not_submitted", "resolved"],
17962 identity_requirement: "server_locator",
17963 resolver_command: None,
17964 cancellation: "per_call",
17965 },
17966 CommandOutcomeContract {
17967 command: Command::PrepareDeleteIndex,
17968 possible_submission_states: &["not_submitted", "resolved"],
17969 identity_requirement: "server_locator",
17970 resolver_command: None,
17971 cancellation: "per_call",
17972 },
17973 CommandOutcomeContract {
17974 command: Command::SubmitCatalogAction,
17975 possible_submission_states: &[
17976 "not_submitted",
17977 "submitted",
17978 "known_retired",
17979 "indeterminate",
17980 "resolved",
17981 ],
17982 identity_requirement: "request_locator",
17983 resolver_command: Some(Command::ResolveCatalogAction),
17984 cancellation: "per_call_until_submission_then_resolve",
17985 },
17986 CommandOutcomeContract {
17987 command: Command::ResolveCatalogAction,
17988 possible_submission_states: &["not_submitted", "resolved"],
17989 identity_requirement: "request_locator",
17990 resolver_command: None,
17991 cancellation: "per_call",
17992 },
17993 CommandOutcomeContract {
17994 command: Command::PrepareReplayableSourceIndex,
17995 possible_submission_states: &["not_submitted", "resolved"],
17996 identity_requirement: "server_locator",
17997 resolver_command: None,
17998 cancellation: "per_call",
17999 },
18000 CommandOutcomeContract {
18001 command: Command::SubmitReplayableSourceIndex,
18002 possible_submission_states: &[
18003 "not_submitted",
18004 "submitted",
18005 "known_retired",
18006 "indeterminate",
18007 "resolved",
18008 ],
18009 identity_requirement: "request_locator",
18010 resolver_command: Some(Command::ResolveCatalogAction),
18011 cancellation: "per_call_until_submission_then_resolve",
18012 },
18013 CommandOutcomeContract {
18014 command: Command::GetReplayableSource,
18015 possible_submission_states: &["not_submitted", "resolved"],
18016 identity_requirement: "none",
18017 resolver_command: None,
18018 cancellation: "per_call",
18019 },
18020 CommandOutcomeContract {
18021 command: Command::ControlReplayableSource,
18022 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18023 identity_requirement: "none",
18024 resolver_command: None,
18025 cancellation: "per_call_until_submission_then_resolve",
18026 },
18027 CommandOutcomeContract {
18028 command: Command::CloneIndex,
18029 possible_submission_states: &[
18030 "not_submitted",
18031 "submitted",
18032 "known_retired",
18033 "indeterminate",
18034 "resolved",
18035 ],
18036 identity_requirement: "caller_action_id",
18037 resolver_command: Some(Command::CloneIndex),
18038 cancellation: "per_call_until_submission_then_resolve",
18039 },
18040 CommandOutcomeContract {
18041 command: Command::ConfigureHistory,
18042 possible_submission_states: &[
18043 "not_submitted",
18044 "submitted",
18045 "known_retired",
18046 "indeterminate",
18047 "resolved",
18048 ],
18049 identity_requirement: "none",
18050 resolver_command: Some(Command::GetHistory),
18051 cancellation: "per_call_until_submission_then_resolve",
18052 },
18053 CommandOutcomeContract {
18054 command: Command::GetHistory,
18055 possible_submission_states: &["not_submitted", "resolved"],
18056 identity_requirement: "none",
18057 resolver_command: None,
18058 cancellation: "per_call",
18059 },
18060 CommandOutcomeContract {
18061 command: Command::ResolveHistory,
18062 possible_submission_states: &["not_submitted", "resolved"],
18063 identity_requirement: "none",
18064 resolver_command: None,
18065 cancellation: "per_call",
18066 },
18067 CommandOutcomeContract {
18068 command: Command::PlaceHistoryHold,
18069 possible_submission_states: &[
18070 "not_submitted",
18071 "submitted",
18072 "known_retired",
18073 "indeterminate",
18074 "resolved",
18075 ],
18076 identity_requirement: "none",
18077 resolver_command: Some(Command::GetHistory),
18078 cancellation: "per_call_until_submission_then_resolve",
18079 },
18080 CommandOutcomeContract {
18081 command: Command::ReleaseHistoryHold,
18082 possible_submission_states: &[
18083 "not_submitted",
18084 "submitted",
18085 "known_retired",
18086 "indeterminate",
18087 "resolved",
18088 ],
18089 identity_requirement: "none",
18090 resolver_command: Some(Command::GetHistory),
18091 cancellation: "per_call_until_submission_then_resolve",
18092 },
18093 CommandOutcomeContract {
18094 command: Command::PrepareDocumentMutation,
18095 possible_submission_states: &["not_submitted", "resolved"],
18096 identity_requirement: "server_locator",
18097 resolver_command: None,
18098 cancellation: "per_call",
18099 },
18100 CommandOutcomeContract {
18101 command: Command::SubmitDocumentMutation,
18102 possible_submission_states: &[
18103 "not_submitted",
18104 "submitted",
18105 "known_retired",
18106 "indeterminate",
18107 "resolved",
18108 ],
18109 identity_requirement: "request_locator",
18110 resolver_command: Some(Command::ResolveDocumentMutation),
18111 cancellation: "per_call_until_submission_then_resolve",
18112 },
18113 CommandOutcomeContract {
18114 command: Command::PrepareDocumentBulk,
18115 possible_submission_states: &["not_submitted", "resolved"],
18116 identity_requirement: "caller_action_id",
18117 resolver_command: None,
18118 cancellation: "per_call",
18119 },
18120 CommandOutcomeContract {
18121 command: Command::SubmitDocumentBulk,
18122 possible_submission_states: &[
18123 "not_submitted",
18124 "submitted",
18125 "known_retired",
18126 "indeterminate",
18127 "resolved",
18128 ],
18129 identity_requirement: "caller_action_id",
18130 resolver_command: Some(Command::ResolveDocumentBulk),
18131 cancellation: "per_call_until_submission_then_resolve",
18132 },
18133 CommandOutcomeContract {
18134 command: Command::ResolveDocumentBulk,
18135 possible_submission_states: &["not_submitted", "resolved"],
18136 identity_requirement: "caller_action_id",
18137 resolver_command: None,
18138 cancellation: "per_call",
18139 },
18140 CommandOutcomeContract {
18141 command: Command::PrepareAppendBulk,
18142 possible_submission_states: &["not_submitted", "resolved"],
18143 identity_requirement: "caller_action_id",
18144 resolver_command: None,
18145 cancellation: "per_call",
18146 },
18147 CommandOutcomeContract {
18148 command: Command::SubmitAppendBulk,
18149 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18150 identity_requirement: "request_locator",
18151 resolver_command: Some(Command::ResolveAppendBulk),
18152 cancellation: "per_call_until_submission_then_resolve",
18153 },
18154 CommandOutcomeContract {
18155 command: Command::ResolveAppendBulk,
18156 possible_submission_states: &["not_submitted", "resolved"],
18157 identity_requirement: "request_locator",
18158 resolver_command: None,
18159 cancellation: "per_call",
18160 },
18161 CommandOutcomeContract {
18162 command: Command::ObserveAppendCommitted,
18163 possible_submission_states: &["not_submitted", "resolved"],
18164 identity_requirement: "request_locator",
18165 resolver_command: None,
18166 cancellation: "per_call",
18167 },
18168 CommandOutcomeContract {
18169 command: Command::ResolveDocumentMutation,
18170 possible_submission_states: &["not_submitted", "resolved"],
18171 identity_requirement: "request_locator",
18172 resolver_command: None,
18173 cancellation: "per_call",
18174 },
18175 CommandOutcomeContract {
18176 command: Command::GetDocument,
18177 possible_submission_states: &["not_submitted", "resolved"],
18178 identity_requirement: "none",
18179 resolver_command: None,
18180 cancellation: "per_call",
18181 },
18182 CommandOutcomeContract {
18183 command: Command::Search,
18184 possible_submission_states: &["not_submitted", "resolved"],
18185 identity_requirement: "none",
18186 resolver_command: None,
18187 cancellation: "per_call",
18188 },
18189 CommandOutcomeContract {
18190 command: Command::TraverseRelationships,
18191 possible_submission_states: &["not_submitted", "resolved"],
18192 identity_requirement: "none",
18193 resolver_command: None,
18194 cancellation: "per_call",
18195 },
18196 CommandOutcomeContract {
18197 command: Command::QueryProfiles,
18198 possible_submission_states: &["not_submitted", "resolved"],
18199 identity_requirement: "none",
18200 resolver_command: None,
18201 cancellation: "per_call",
18202 },
18203 CommandOutcomeContract {
18204 command: Command::EvaluateTemporalEvidence,
18205 possible_submission_states: &["not_submitted", "resolved"],
18206 identity_requirement: "none",
18207 resolver_command: None,
18208 cancellation: "per_call",
18209 },
18210 CommandOutcomeContract {
18211 command: Command::CreateContinuousTemporalEvaluation,
18212 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18213 identity_requirement: "caller_action_id",
18214 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
18215 cancellation: "per_call_until_submission_then_resolve",
18216 },
18217 CommandOutcomeContract {
18218 command: Command::GetContinuousTemporalEvaluation,
18219 possible_submission_states: &["not_submitted", "resolved"],
18220 identity_requirement: "none",
18221 resolver_command: None,
18222 cancellation: "per_call",
18223 },
18224 CommandOutcomeContract {
18225 command: Command::PauseContinuousTemporalEvaluation,
18226 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18227 identity_requirement: "caller_action_id",
18228 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
18229 cancellation: "per_call_until_submission_then_resolve",
18230 },
18231 CommandOutcomeContract {
18232 command: Command::ResumeContinuousTemporalEvaluation,
18233 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18234 identity_requirement: "caller_action_id",
18235 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
18236 cancellation: "per_call_until_submission_then_resolve",
18237 },
18238 CommandOutcomeContract {
18239 command: Command::ReplaceContinuousTemporalEvaluation,
18240 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18241 identity_requirement: "caller_action_id",
18242 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
18243 cancellation: "per_call_until_submission_then_resolve",
18244 },
18245 CommandOutcomeContract {
18246 command: Command::RetireContinuousTemporalEvaluation,
18247 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18248 identity_requirement: "caller_action_id",
18249 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
18250 cancellation: "per_call_until_submission_then_resolve",
18251 },
18252 CommandOutcomeContract {
18253 command: Command::ReadContinuousTemporalEvidence,
18254 possible_submission_states: &["not_submitted", "resolved"],
18255 identity_requirement: "none",
18256 resolver_command: None,
18257 cancellation: "per_call",
18258 },
18259 CommandOutcomeContract {
18260 command: Command::ValidateSearch,
18261 possible_submission_states: &["not_submitted", "resolved"],
18262 identity_requirement: "none",
18263 resolver_command: None,
18264 cancellation: "per_call",
18265 },
18266 CommandOutcomeContract {
18267 command: Command::MaterializeTableSnapshot,
18268 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18269 identity_requirement: "caller_action_id",
18270 resolver_command: Some(Command::ResolveTableSnapshot),
18271 cancellation: "per_call_until_submission_then_resolve",
18272 },
18273 CommandOutcomeContract {
18274 command: Command::ResolveTableSnapshot,
18275 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18276 identity_requirement: "caller_action_id",
18277 resolver_command: None,
18278 cancellation: "per_call",
18279 },
18280 CommandOutcomeContract {
18281 command: Command::ReadTableSnapshot,
18282 possible_submission_states: &["not_submitted", "resolved"],
18283 identity_requirement: "request_locator",
18284 resolver_command: None,
18285 cancellation: "per_call",
18286 },
18287 CommandOutcomeContract {
18288 command: Command::OpenPit,
18289 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18290 identity_requirement: "none",
18291 resolver_command: None,
18292 cancellation: "per_call_until_submission_then_resolve",
18293 },
18294 CommandOutcomeContract {
18295 command: Command::RenewPit,
18296 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18297 identity_requirement: "none",
18298 resolver_command: None,
18299 cancellation: "per_call_until_submission_then_resolve",
18300 },
18301 CommandOutcomeContract {
18302 command: Command::ClosePit,
18303 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18304 identity_requirement: "none",
18305 resolver_command: None,
18306 cancellation: "per_call_until_submission_then_resolve",
18307 },
18308 CommandOutcomeContract {
18309 command: Command::ListOperations,
18310 possible_submission_states: &["not_submitted", "resolved"],
18311 identity_requirement: "none",
18312 resolver_command: None,
18313 cancellation: "per_call",
18314 },
18315 CommandOutcomeContract {
18316 command: Command::GetOperation,
18317 possible_submission_states: &["not_submitted", "resolved"],
18318 identity_requirement: "request_locator",
18319 resolver_command: None,
18320 cancellation: "per_call",
18321 },
18322 CommandOutcomeContract {
18323 command: Command::WaitOperation,
18324 possible_submission_states: &["not_submitted", "resolved"],
18325 identity_requirement: "request_locator",
18326 resolver_command: None,
18327 cancellation: "per_call",
18328 },
18329 CommandOutcomeContract {
18330 command: Command::CancelOperation,
18331 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18332 identity_requirement: "request_locator",
18333 resolver_command: None,
18334 cancellation: "per_call_until_submission_then_resolve",
18335 },
18336 CommandOutcomeContract {
18337 command: Command::ListAuditEvents,
18338 possible_submission_states: &["not_submitted", "resolved"],
18339 identity_requirement: "none",
18340 resolver_command: None,
18341 cancellation: "per_call",
18342 },
18343 CommandOutcomeContract {
18344 command: Command::ExportAuditEvents,
18345 possible_submission_states: &["not_submitted", "resolved"],
18346 identity_requirement: "none",
18347 resolver_command: None,
18348 cancellation: "per_call",
18349 },
18350 CommandOutcomeContract {
18351 command: Command::ReserveServiceCredential,
18352 possible_submission_states: &[
18353 "not_submitted",
18354 "submitted",
18355 "known_retired",
18356 "indeterminate",
18357 "resolved",
18358 ],
18359 identity_requirement: "caller_action_id",
18360 resolver_command: Some(Command::ResolveServiceCredentialReservation),
18361 cancellation: "per_call_until_submission_then_resolve",
18362 },
18363 CommandOutcomeContract {
18364 command: Command::ReserveServiceCredentialRotation,
18365 possible_submission_states: &[
18366 "not_submitted",
18367 "submitted",
18368 "known_retired",
18369 "indeterminate",
18370 "resolved",
18371 ],
18372 identity_requirement: "caller_action_id",
18373 resolver_command: Some(Command::ResolveServiceCredentialReservation),
18374 cancellation: "per_call_until_submission_then_resolve",
18375 },
18376 CommandOutcomeContract {
18377 command: Command::ActivateServiceCredential,
18378 possible_submission_states: &[
18379 "not_submitted",
18380 "submitted",
18381 "known_retired",
18382 "indeterminate",
18383 "resolved",
18384 ],
18385 identity_requirement: "server_locator",
18386 resolver_command: Some(Command::ResolveServiceCredentialReservation),
18387 cancellation: "per_call_until_submission_then_resolve",
18388 },
18389 CommandOutcomeContract {
18390 command: Command::ResolveServiceCredentialReservation,
18391 possible_submission_states: &["not_submitted", "resolved"],
18392 identity_requirement: "caller_action_id",
18393 resolver_command: None,
18394 cancellation: "per_call",
18395 },
18396 CommandOutcomeContract {
18397 command: Command::PrepareRevokeServiceCredential,
18398 possible_submission_states: &["not_submitted", "resolved"],
18399 identity_requirement: "server_locator",
18400 resolver_command: None,
18401 cancellation: "per_call",
18402 },
18403 CommandOutcomeContract {
18404 command: Command::RevokeServiceCredential,
18405 possible_submission_states: &[
18406 "not_submitted",
18407 "submitted",
18408 "known_retired",
18409 "indeterminate",
18410 "resolved",
18411 ],
18412 identity_requirement: "request_locator",
18413 resolver_command: Some(Command::ResolveSecurityAction),
18414 cancellation: "per_call_until_submission_then_resolve",
18415 },
18416 CommandOutcomeContract {
18417 command: Command::ResolveSecurityAction,
18418 possible_submission_states: &["not_submitted", "resolved"],
18419 identity_requirement: "request_locator",
18420 resolver_command: None,
18421 cancellation: "per_call",
18422 },
18423 CommandOutcomeContract {
18424 command: Command::GetSecurityRole,
18425 possible_submission_states: &["not_submitted", "resolved"],
18426 identity_requirement: "none",
18427 resolver_command: None,
18428 cancellation: "per_call",
18429 },
18430 CommandOutcomeContract {
18431 command: Command::PrepareRoleAppendAccessChange,
18432 possible_submission_states: &["not_submitted", "resolved"],
18433 identity_requirement: "server_locator",
18434 resolver_command: None,
18435 cancellation: "per_call",
18436 },
18437 CommandOutcomeContract {
18438 command: Command::SubmitRoleAppendAccessChange,
18439 possible_submission_states: &[
18440 "not_submitted",
18441 "submitted",
18442 "known_retired",
18443 "indeterminate",
18444 "resolved",
18445 ],
18446 identity_requirement: "request_locator",
18447 resolver_command: Some(Command::ResolveSecurityAction),
18448 cancellation: "per_call_until_submission_then_resolve",
18449 },
18450 CommandOutcomeContract {
18451 command: Command::PrepareSourceAuthorizationProjection,
18452 possible_submission_states: &["not_submitted", "resolved"],
18453 identity_requirement: "caller_action_id",
18454 resolver_command: None,
18455 cancellation: "per_call",
18456 },
18457 CommandOutcomeContract {
18458 command: Command::SubmitSourceAuthorizationProjection,
18459 possible_submission_states: &[
18460 "not_submitted",
18461 "submitted",
18462 "known_retired",
18463 "indeterminate",
18464 "resolved",
18465 ],
18466 identity_requirement: "caller_action_id",
18467 resolver_command: Some(Command::ResolveSourceAuthorizationProjection),
18468 cancellation: "per_call_until_submission_then_resolve",
18469 },
18470 CommandOutcomeContract {
18471 command: Command::ResolveSourceAuthorizationProjection,
18472 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18473 identity_requirement: "caller_action_id",
18474 resolver_command: None,
18475 cancellation: "per_call",
18476 },
18477 CommandOutcomeContract {
18478 command: Command::ListServiceCredentials,
18479 possible_submission_states: &["not_submitted", "resolved"],
18480 identity_requirement: "none",
18481 resolver_command: None,
18482 cancellation: "per_call",
18483 },
18484 CommandOutcomeContract {
18485 command: Command::GetRuntimeStatus,
18486 possible_submission_states: &["not_submitted", "resolved"],
18487 identity_requirement: "none",
18488 resolver_command: None,
18489 cancellation: "per_call",
18490 },
18491 CommandOutcomeContract {
18492 command: Command::GetResultCacheStatus,
18493 possible_submission_states: &["not_submitted", "resolved"],
18494 identity_requirement: "none",
18495 resolver_command: None,
18496 cancellation: "per_call",
18497 },
18498 CommandOutcomeContract {
18499 command: Command::GetFieldPromotionStatus,
18500 possible_submission_states: &["not_submitted", "resolved"],
18501 identity_requirement: "none",
18502 resolver_command: None,
18503 cancellation: "per_call",
18504 },
18505 CommandOutcomeContract {
18506 command: Command::GetOverloadStatus,
18507 possible_submission_states: &["not_submitted", "resolved"],
18508 identity_requirement: "none",
18509 resolver_command: None,
18510 cancellation: "per_call",
18511 },
18512 CommandOutcomeContract {
18513 command: Command::ConfigureExternalKey,
18514 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18515 identity_requirement: "none",
18516 resolver_command: None,
18517 cancellation: "per_call_until_submission_then_resolve",
18518 },
18519 CommandOutcomeContract {
18520 command: Command::RotateExternalKeyBinding,
18521 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18522 identity_requirement: "none",
18523 resolver_command: None,
18524 cancellation: "per_call_until_submission_then_resolve",
18525 },
18526 CommandOutcomeContract {
18527 command: Command::RetireExternalKeyBinding,
18528 possible_submission_states: &[
18529 "not_submitted",
18530 "submitted",
18531 "known_retired",
18532 "indeterminate",
18533 "resolved",
18534 ],
18535 identity_requirement: "caller_action_id",
18536 resolver_command: Some(Command::ResolveExternalKeyBindingRetirement),
18537 cancellation: "per_call_until_submission_then_resolve",
18538 },
18539 CommandOutcomeContract {
18540 command: Command::ResolveExternalKeyBindingRetirement,
18541 possible_submission_states: &["not_submitted", "resolved"],
18542 identity_requirement: "caller_action_id",
18543 resolver_command: None,
18544 cancellation: "per_call",
18545 },
18546 CommandOutcomeContract {
18547 command: Command::ConfigureAggregateThenDelete,
18548 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18549 identity_requirement: "none",
18550 resolver_command: None,
18551 cancellation: "per_call_until_submission_then_resolve",
18552 },
18553 CommandOutcomeContract {
18554 command: Command::GetLifecycleStatus,
18555 possible_submission_states: &["not_submitted", "resolved"],
18556 identity_requirement: "none",
18557 resolver_command: None,
18558 cancellation: "per_call",
18559 },
18560 CommandOutcomeContract {
18561 command: Command::EraseRecord,
18562 possible_submission_states: &[
18563 "not_submitted",
18564 "submitted",
18565 "known_retired",
18566 "indeterminate",
18567 "resolved",
18568 ],
18569 identity_requirement: "caller_action_id",
18570 resolver_command: Some(Command::ResolveRecordErasure),
18571 cancellation: "per_call_until_submission_then_resolve",
18572 },
18573 CommandOutcomeContract {
18574 command: Command::ResolveRecordErasure,
18575 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18576 identity_requirement: "caller_action_id",
18577 resolver_command: None,
18578 cancellation: "per_call",
18579 },
18580 CommandOutcomeContract {
18581 command: Command::GetRecordErasure,
18582 possible_submission_states: &["not_submitted", "resolved"],
18583 identity_requirement: "request_identity",
18584 resolver_command: None,
18585 cancellation: "per_call",
18586 },
18587 CommandOutcomeContract {
18588 command: Command::GetQuota,
18589 possible_submission_states: &["not_submitted", "resolved"],
18590 identity_requirement: "none",
18591 resolver_command: None,
18592 cancellation: "per_call",
18593 },
18594 CommandOutcomeContract {
18595 command: Command::UpdateQuota,
18596 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18597 identity_requirement: "none",
18598 resolver_command: None,
18599 cancellation: "per_call_until_submission_then_resolve",
18600 },
18601 CommandOutcomeContract {
18602 command: Command::GetBinding,
18603 possible_submission_states: &["not_submitted", "resolved"],
18604 identity_requirement: "none",
18605 resolver_command: None,
18606 cancellation: "per_call",
18607 },
18608 CommandOutcomeContract {
18609 command: Command::GetAdmissionStatus,
18610 possible_submission_states: &["not_submitted", "resolved"],
18611 identity_requirement: "none",
18612 resolver_command: None,
18613 cancellation: "per_call",
18614 },
18615 CommandOutcomeContract {
18616 command: Command::SetAdmission,
18617 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18618 identity_requirement: "none",
18619 resolver_command: None,
18620 cancellation: "per_call_until_submission_then_resolve",
18621 },
18622 CommandOutcomeContract {
18623 command: Command::GetQuiesceStatus,
18624 possible_submission_states: &["not_submitted", "resolved"],
18625 identity_requirement: "none",
18626 resolver_command: None,
18627 cancellation: "per_call",
18628 },
18629 CommandOutcomeContract {
18630 command: Command::GetDecommissionReadiness,
18631 possible_submission_states: &["not_submitted", "resolved"],
18632 identity_requirement: "none",
18633 resolver_command: None,
18634 cancellation: "per_call",
18635 },
18636 CommandOutcomeContract {
18637 command: Command::GetUpgradeReadiness,
18638 possible_submission_states: &["not_submitted", "resolved"],
18639 identity_requirement: "none",
18640 resolver_command: None,
18641 cancellation: "per_call",
18642 },
18643 CommandOutcomeContract {
18644 command: Command::GetMaintenanceStatus,
18645 possible_submission_states: &["not_submitted", "resolved"],
18646 identity_requirement: "none",
18647 resolver_command: None,
18648 cancellation: "per_call",
18649 },
18650 CommandOutcomeContract {
18651 command: Command::WarmVectorIndex,
18652 possible_submission_states: &["not_submitted", "resolved"],
18653 identity_requirement: "exact_root",
18654 resolver_command: None,
18655 cancellation: "per_call",
18656 },
18657 CommandOutcomeContract {
18658 command: Command::EvaluateVectorRecall,
18659 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18660 identity_requirement: "caller_action_id",
18661 resolver_command: None,
18662 cancellation: "per_call_until_submission_then_resolve",
18663 },
18664 CommandOutcomeContract {
18665 command: Command::CalibrateVectorStrategy,
18666 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18667 identity_requirement: "caller_action_id",
18668 resolver_command: None,
18669 cancellation: "per_call_until_submission_then_resolve",
18670 },
18671 CommandOutcomeContract {
18672 command: Command::GetVectorDiagnostic,
18673 possible_submission_states: &["not_submitted", "resolved"],
18674 identity_requirement: "request_locator",
18675 resolver_command: None,
18676 cancellation: "per_call",
18677 },
18678 CommandOutcomeContract {
18679 command: Command::CreateDiagnostic,
18680 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18681 identity_requirement: "none",
18682 resolver_command: None,
18683 cancellation: "per_call_until_submission_then_resolve",
18684 },
18685 CommandOutcomeContract {
18686 command: Command::GetDiagnostic,
18687 possible_submission_states: &["not_submitted", "resolved"],
18688 identity_requirement: "request_locator",
18689 resolver_command: None,
18690 cancellation: "per_call",
18691 },
18692 CommandOutcomeContract {
18693 command: Command::PrepareCollectionExport,
18694 possible_submission_states: &["not_submitted", "resolved"],
18695 identity_requirement: "caller_action_id",
18696 resolver_command: None,
18697 cancellation: "per_call",
18698 },
18699 CommandOutcomeContract {
18700 command: Command::StartCollectionExport,
18701 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18702 identity_requirement: "caller_action_id",
18703 resolver_command: Some(Command::ResolveCollectionExport),
18704 cancellation: "per_call_until_submission_then_resolve",
18705 },
18706 CommandOutcomeContract {
18707 command: Command::ResolveCollectionExport,
18708 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18709 identity_requirement: "caller_action_id",
18710 resolver_command: None,
18711 cancellation: "per_call",
18712 },
18713 CommandOutcomeContract {
18714 command: Command::VerifyCollectionExport,
18715 possible_submission_states: &["not_submitted", "resolved"],
18716 identity_requirement: "request_locator",
18717 resolver_command: None,
18718 cancellation: "per_call",
18719 },
18720 CommandOutcomeContract {
18721 command: Command::PrepareCollectionExportRetirement,
18722 possible_submission_states: &["not_submitted", "resolved"],
18723 identity_requirement: "caller_action_id",
18724 resolver_command: None,
18725 cancellation: "per_call",
18726 },
18727 CommandOutcomeContract {
18728 command: Command::StartCollectionExportRetirement,
18729 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18730 identity_requirement: "caller_action_id",
18731 resolver_command: Some(Command::ResolveCollectionExportRetirement),
18732 cancellation: "per_call_until_submission_then_resolve",
18733 },
18734 CommandOutcomeContract {
18735 command: Command::ResolveCollectionExportRetirement,
18736 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18737 identity_requirement: "caller_action_id",
18738 resolver_command: None,
18739 cancellation: "per_call",
18740 },
18741 CommandOutcomeContract {
18742 command: Command::PrepareCollectionRestore,
18743 possible_submission_states: &["not_submitted", "resolved"],
18744 identity_requirement: "caller_action_id",
18745 resolver_command: None,
18746 cancellation: "per_call",
18747 },
18748 CommandOutcomeContract {
18749 command: Command::StartCollectionRestore,
18750 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18751 identity_requirement: "caller_action_id",
18752 resolver_command: Some(Command::ResolveCollectionRestore),
18753 cancellation: "per_call_until_submission_then_resolve",
18754 },
18755 CommandOutcomeContract {
18756 command: Command::ResolveCollectionRestore,
18757 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18758 identity_requirement: "caller_action_id",
18759 resolver_command: None,
18760 cancellation: "per_call",
18761 },
18762 CommandOutcomeContract {
18763 command: Command::PrepareCollectionTransferExport,
18764 possible_submission_states: &["not_submitted", "resolved"],
18765 identity_requirement: "caller_action_id",
18766 resolver_command: None,
18767 cancellation: "per_call",
18768 },
18769 CommandOutcomeContract {
18770 command: Command::StartCollectionTransferExport,
18771 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18772 identity_requirement: "caller_action_id",
18773 resolver_command: Some(Command::ResolveCollectionTransferExport),
18774 cancellation: "per_call_until_submission_then_resolve",
18775 },
18776 CommandOutcomeContract {
18777 command: Command::ResolveCollectionTransferExport,
18778 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18779 identity_requirement: "caller_action_id",
18780 resolver_command: None,
18781 cancellation: "per_call",
18782 },
18783 CommandOutcomeContract {
18784 command: Command::PrepareCollectionTransferRestore,
18785 possible_submission_states: &["not_submitted", "resolved"],
18786 identity_requirement: "caller_action_id",
18787 resolver_command: None,
18788 cancellation: "per_call",
18789 },
18790 CommandOutcomeContract {
18791 command: Command::StartCollectionTransferRestore,
18792 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18793 identity_requirement: "caller_action_id",
18794 resolver_command: Some(Command::ResolveCollectionTransferRestore),
18795 cancellation: "per_call_until_submission_then_resolve",
18796 },
18797 CommandOutcomeContract {
18798 command: Command::ResolveCollectionTransferRestore,
18799 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18800 identity_requirement: "caller_action_id",
18801 resolver_command: None,
18802 cancellation: "per_call",
18803 },
18804 CommandOutcomeContract {
18805 command: Command::PrepareCollectionStandbyAdmission,
18806 possible_submission_states: &["not_submitted", "resolved"],
18807 identity_requirement: "caller_action_id",
18808 resolver_command: None,
18809 cancellation: "per_call",
18810 },
18811 CommandOutcomeContract {
18812 command: Command::StartCollectionStandbyAdmission,
18813 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18814 identity_requirement: "caller_action_id",
18815 resolver_command: Some(Command::ResolveCollectionStandbyAdmission),
18816 cancellation: "per_call_until_submission_then_resolve",
18817 },
18818 CommandOutcomeContract {
18819 command: Command::ResolveCollectionStandbyAdmission,
18820 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18821 identity_requirement: "caller_action_id",
18822 resolver_command: None,
18823 cancellation: "per_call",
18824 },
18825 CommandOutcomeContract {
18826 command: Command::PrepareCollectionStandbyActivation,
18827 possible_submission_states: &["not_submitted", "resolved"],
18828 identity_requirement: "caller_action_id",
18829 resolver_command: None,
18830 cancellation: "per_call",
18831 },
18832 CommandOutcomeContract {
18833 command: Command::StartCollectionStandbyActivation,
18834 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18835 identity_requirement: "caller_action_id",
18836 resolver_command: Some(Command::ResolveCollectionStandbyActivation),
18837 cancellation: "per_call_until_submission_then_resolve",
18838 },
18839 CommandOutcomeContract {
18840 command: Command::ResolveCollectionStandbyActivation,
18841 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18842 identity_requirement: "caller_action_id",
18843 resolver_command: None,
18844 cancellation: "per_call",
18845 },
18846 CommandOutcomeContract {
18847 command: Command::PrepareIndexExport,
18848 possible_submission_states: &["not_submitted", "resolved"],
18849 identity_requirement: "caller_action_id",
18850 resolver_command: None,
18851 cancellation: "per_call",
18852 },
18853 CommandOutcomeContract {
18854 command: Command::StartIndexExport,
18855 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18856 identity_requirement: "caller_action_id",
18857 resolver_command: Some(Command::ResolveIndexExport),
18858 cancellation: "per_call_until_submission_then_resolve",
18859 },
18860 CommandOutcomeContract {
18861 command: Command::ResolveIndexExport,
18862 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18863 identity_requirement: "caller_action_id",
18864 resolver_command: None,
18865 cancellation: "per_call",
18866 },
18867 CommandOutcomeContract {
18868 command: Command::VerifyIndexExport,
18869 possible_submission_states: &["not_submitted", "resolved"],
18870 identity_requirement: "request_locator",
18871 resolver_command: None,
18872 cancellation: "per_call",
18873 },
18874 CommandOutcomeContract {
18875 command: Command::PrepareIndexImport,
18876 possible_submission_states: &["not_submitted", "resolved"],
18877 identity_requirement: "caller_action_id",
18878 resolver_command: None,
18879 cancellation: "per_call",
18880 },
18881 CommandOutcomeContract {
18882 command: Command::StartIndexImport,
18883 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18884 identity_requirement: "caller_action_id",
18885 resolver_command: Some(Command::ResolveIndexImport),
18886 cancellation: "per_call_until_submission_then_resolve",
18887 },
18888 CommandOutcomeContract {
18889 command: Command::ResolveIndexImport,
18890 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18891 identity_requirement: "caller_action_id",
18892 resolver_command: None,
18893 cancellation: "per_call",
18894 },
18895 CommandOutcomeContract {
18896 command: Command::ReadArtifactChunk,
18897 possible_submission_states: &["not_submitted", "resolved"],
18898 identity_requirement: "none",
18899 resolver_command: None,
18900 cancellation: "per_call",
18901 },
18902 CommandOutcomeContract {
18903 command: Command::ExportUsage,
18904 possible_submission_states: &["not_submitted", "resolved"],
18905 identity_requirement: "none",
18906 resolver_command: None,
18907 cancellation: "per_call",
18908 },
18909 CommandOutcomeContract {
18910 command: Command::GetStorageUsage,
18911 possible_submission_states: &["not_submitted", "resolved"],
18912 identity_requirement: "none",
18913 resolver_command: None,
18914 cancellation: "per_call",
18915 },
18916 CommandOutcomeContract {
18917 command: Command::ReadLogicalOccupancy,
18918 possible_submission_states: &["not_submitted", "resolved"],
18919 identity_requirement: "none",
18920 resolver_command: None,
18921 cancellation: "per_call",
18922 },
18923 CommandOutcomeContract {
18924 command: Command::ExecuteStateRead,
18925 possible_submission_states: &["not_submitted", "resolved"],
18926 identity_requirement: "none",
18927 resolver_command: None,
18928 cancellation: "per_call",
18929 },
18930 CommandOutcomeContract {
18931 command: Command::PrepareStateWrite,
18932 possible_submission_states: &["not_submitted", "resolved"],
18933 identity_requirement: "caller_action_id",
18934 resolver_command: None,
18935 cancellation: "per_call",
18936 },
18937 CommandOutcomeContract {
18938 command: Command::SubmitStateWrite,
18939 possible_submission_states: &[
18940 "not_submitted",
18941 "submitted",
18942 "known_retired",
18943 "indeterminate",
18944 "resolved",
18945 ],
18946 identity_requirement: "request_locator",
18947 resolver_command: Some(Command::ResolveStateWrite),
18948 cancellation: "per_call_until_submission_then_resolve",
18949 },
18950 CommandOutcomeContract {
18951 command: Command::ResolveStateWrite,
18952 possible_submission_states: &["not_submitted", "resolved"],
18953 identity_requirement: "request_locator",
18954 resolver_command: None,
18955 cancellation: "per_call",
18956 },
18957];
18958#[derive(Clone, Copy, Debug, Eq, PartialEq)]
18959pub struct ErrorOutcomeContract {
18960 pub code: ErrorCode,
18961 pub disposition: ErrorDisposition,
18962 pub recovery: RecoveryAction,
18963 pub retry_after_limit_id: Option<&'static str>,
18964 pub recovery_identity: &'static str,
18965}
18966pub const LODESTONE_API_ERROR_OUTCOMES: &[ErrorOutcomeContract] = &[
18967 ErrorOutcomeContract {
18968 code: ErrorCode::Aborted,
18969 disposition: ErrorDisposition::NotSubmitted,
18970 recovery: RecoveryAction::Retry,
18971 retry_after_limit_id: None,
18972 recovery_identity: "request_identity",
18973 },
18974 ErrorOutcomeContract {
18975 code: ErrorCode::Aborted,
18976 disposition: ErrorDisposition::Indeterminate,
18977 recovery: RecoveryAction::Resolve,
18978 retry_after_limit_id: None,
18979 recovery_identity: "request_identity",
18980 },
18981 ErrorOutcomeContract {
18982 code: ErrorCode::DeadlineExceeded,
18983 disposition: ErrorDisposition::NotSubmitted,
18984 recovery: RecoveryAction::Retry,
18985 retry_after_limit_id: None,
18986 recovery_identity: "request_identity",
18987 },
18988 ErrorOutcomeContract {
18989 code: ErrorCode::DeadlineExceeded,
18990 disposition: ErrorDisposition::Indeterminate,
18991 recovery: RecoveryAction::Resolve,
18992 retry_after_limit_id: None,
18993 recovery_identity: "request_identity",
18994 },
18995 ErrorOutcomeContract {
18996 code: ErrorCode::InvalidRequest,
18997 disposition: ErrorDisposition::NotSubmitted,
18998 recovery: RecoveryAction::Stop,
18999 retry_after_limit_id: None,
19000 recovery_identity: "none",
19001 },
19002 ErrorOutcomeContract {
19003 code: ErrorCode::UnsupportedVersion,
19004 disposition: ErrorDisposition::NotSubmitted,
19005 recovery: RecoveryAction::Stop,
19006 retry_after_limit_id: None,
19007 recovery_identity: "none",
19008 },
19009 ErrorOutcomeContract {
19010 code: ErrorCode::Unauthenticated,
19011 disposition: ErrorDisposition::NotSubmitted,
19012 recovery: RecoveryAction::RefreshCredential,
19013 retry_after_limit_id: None,
19014 recovery_identity: "none",
19015 },
19016 ErrorOutcomeContract {
19017 code: ErrorCode::PermissionDenied,
19018 disposition: ErrorDisposition::NotSubmitted,
19019 recovery: RecoveryAction::Stop,
19020 retry_after_limit_id: None,
19021 recovery_identity: "none",
19022 },
19023 ErrorOutcomeContract {
19024 code: ErrorCode::NotFound,
19025 disposition: ErrorDisposition::NotSubmitted,
19026 recovery: RecoveryAction::Stop,
19027 retry_after_limit_id: None,
19028 recovery_identity: "request_identity",
19029 },
19030 ErrorOutcomeContract {
19031 code: ErrorCode::NotFound,
19032 disposition: ErrorDisposition::Resolved,
19033 recovery: RecoveryAction::Stop,
19034 retry_after_limit_id: None,
19035 recovery_identity: "request_identity",
19036 },
19037 ErrorOutcomeContract {
19038 code: ErrorCode::Conflict,
19039 disposition: ErrorDisposition::NotSubmitted,
19040 recovery: RecoveryAction::RefreshPrecondition,
19041 retry_after_limit_id: None,
19042 recovery_identity: "request_identity",
19043 },
19044 ErrorOutcomeContract {
19045 code: ErrorCode::Conflict,
19046 disposition: ErrorDisposition::Resolved,
19047 recovery: RecoveryAction::Stop,
19048 retry_after_limit_id: None,
19049 recovery_identity: "request_identity",
19050 },
19051 ErrorOutcomeContract {
19052 code: ErrorCode::StaleCursor,
19053 disposition: ErrorDisposition::NotSubmitted,
19054 recovery: RecoveryAction::RestartPage,
19055 retry_after_limit_id: None,
19056 recovery_identity: "cursor",
19057 },
19058 ErrorOutcomeContract {
19059 code: ErrorCode::RestartBudgetExhausted,
19060 disposition: ErrorDisposition::NotSubmitted,
19061 recovery: RecoveryAction::Stop,
19062 retry_after_limit_id: None,
19063 recovery_identity: "cursor",
19064 },
19065 ErrorOutcomeContract {
19066 code: ErrorCode::LimitExceeded,
19067 disposition: ErrorDisposition::NotSubmitted,
19068 recovery: RecoveryAction::ReduceRequest,
19069 retry_after_limit_id: None,
19070 recovery_identity: "none",
19071 },
19072 ErrorOutcomeContract {
19073 code: ErrorCode::CapabilityUnavailable,
19074 disposition: ErrorDisposition::NotSubmitted,
19075 recovery: RecoveryAction::Stop,
19076 retry_after_limit_id: None,
19077 recovery_identity: "none",
19078 },
19079 ErrorOutcomeContract {
19080 code: ErrorCode::NotSubmitted,
19081 disposition: ErrorDisposition::NotSubmitted,
19082 recovery: RecoveryAction::RetryAfter,
19083 retry_after_limit_id: Some("retry_after_millis"),
19084 recovery_identity: "request_identity",
19085 },
19086 ErrorOutcomeContract {
19087 code: ErrorCode::SubmittedIndeterminate,
19088 disposition: ErrorDisposition::Indeterminate,
19089 recovery: RecoveryAction::Resolve,
19090 retry_after_limit_id: None,
19091 recovery_identity: "locator_or_caller_action_id",
19092 },
19093 ErrorOutcomeContract {
19094 code: ErrorCode::ExpiredUnknown,
19095 disposition: ErrorDisposition::KnownRetired,
19096 recovery: RecoveryAction::Stop,
19097 retry_after_limit_id: None,
19098 recovery_identity: "locator_or_caller_action_id",
19099 },
19100 ErrorOutcomeContract {
19101 code: ErrorCode::SecretNotEscrowed,
19102 disposition: ErrorDisposition::Resolved,
19103 recovery: RecoveryAction::Resolve,
19104 retry_after_limit_id: None,
19105 recovery_identity: "reservation_action_id",
19106 },
19107 ErrorOutcomeContract {
19108 code: ErrorCode::RetentionGap,
19109 disposition: ErrorDisposition::KnownRetired,
19110 recovery: RecoveryAction::Stop,
19111 retry_after_limit_id: None,
19112 recovery_identity: "cursor_or_locator",
19113 },
19114 ErrorOutcomeContract {
19115 code: ErrorCode::ArtifactRangeInvalid,
19116 disposition: ErrorDisposition::NotSubmitted,
19117 recovery: RecoveryAction::CorrectRange,
19118 retry_after_limit_id: None,
19119 recovery_identity: "artifact_identity",
19120 },
19121 ErrorOutcomeContract {
19122 code: ErrorCode::ChecksumMismatch,
19123 disposition: ErrorDisposition::Resolved,
19124 recovery: RecoveryAction::Stop,
19125 retry_after_limit_id: None,
19126 recovery_identity: "artifact_identity",
19127 },
19128 ErrorOutcomeContract {
19129 code: ErrorCode::TemporarilyUnavailable,
19130 disposition: ErrorDisposition::NotSubmitted,
19131 recovery: RecoveryAction::RetryAfter,
19132 retry_after_limit_id: Some("retry_after_millis"),
19133 recovery_identity: "request_identity",
19134 },
19135 ErrorOutcomeContract {
19136 code: ErrorCode::TemporarilyUnavailable,
19137 disposition: ErrorDisposition::Indeterminate,
19138 recovery: RecoveryAction::Resolve,
19139 retry_after_limit_id: Some("retry_after_millis"),
19140 recovery_identity: "request_identity",
19141 },
19142 ErrorOutcomeContract {
19143 code: ErrorCode::Internal,
19144 disposition: ErrorDisposition::NotSubmitted,
19145 recovery: RecoveryAction::Stop,
19146 retry_after_limit_id: None,
19147 recovery_identity: "request_identity",
19148 },
19149 ErrorOutcomeContract {
19150 code: ErrorCode::Internal,
19151 disposition: ErrorDisposition::Resolved,
19152 recovery: RecoveryAction::Stop,
19153 retry_after_limit_id: None,
19154 recovery_identity: "request_identity",
19155 },
19156 ErrorOutcomeContract {
19157 code: ErrorCode::Internal,
19158 disposition: ErrorDisposition::Indeterminate,
19159 recovery: RecoveryAction::Resolve,
19160 retry_after_limit_id: None,
19161 recovery_identity: "request_identity",
19162 },
19163];
19164#[derive(Clone, Copy, Debug, Eq, PartialEq)]
19165pub struct Limit {
19166 pub id: &'static str,
19167 pub default: u64,
19168 pub maximum: u64,
19169 pub unit: &'static str,
19170}
19171pub const LODESTONE_API_LIMITS: &[Limit] = &[
19172 Limit {
19173 id: "request_bytes",
19174 default: 2097152,
19175 maximum: 2097152,
19176 unit: "bytes",
19177 },
19178 Limit {
19179 id: "response_bytes",
19180 default: 2097152,
19181 maximum: 2097152,
19182 unit: "bytes",
19183 },
19184 Limit {
19185 id: "record_erasure_scan_bytes",
19186 default: 68719476736,
19187 maximum: 68719476736,
19188 unit: "bytes",
19189 },
19190 Limit {
19191 id: "record_erasure_rewrite_bytes",
19192 default: 68719476736,
19193 maximum: 68719476736,
19194 unit: "bytes",
19195 },
19196 Limit {
19197 id: "page_size",
19198 default: 100,
19199 maximum: 1000,
19200 unit: "items",
19201 },
19202 Limit {
19203 id: "catalog_page_size",
19204 default: 100,
19205 maximum: 100,
19206 unit: "items",
19207 },
19208 Limit {
19209 id: "catalog_restart_budget",
19210 default: 8,
19211 maximum: 8,
19212 unit: "restarts",
19213 },
19214 Limit {
19215 id: "query_clauses",
19216 default: 256,
19217 maximum: 1024,
19218 unit: "clauses",
19219 },
19220 Limit {
19221 id: "text_query_bytes",
19222 default: 16384,
19223 maximum: 16384,
19224 unit: "bytes",
19225 },
19226 Limit {
19227 id: "text_query_fields",
19228 default: 64,
19229 maximum: 64,
19230 unit: "fields",
19231 },
19232 Limit {
19233 id: "text_query_slop",
19234 default: 64,
19235 maximum: 64,
19236 unit: "positions",
19237 },
19238 Limit {
19239 id: "text_query_boost",
19240 default: 1024,
19241 maximum: 1024,
19242 unit: "multiplier",
19243 },
19244 Limit {
19245 id: "text_query_fuzzy_expansions",
19246 default: 1024,
19247 maximum: 1024,
19248 unit: "terms",
19249 },
19250 Limit {
19251 id: "text_query_fuzzy_distance",
19252 default: 2,
19253 maximum: 2,
19254 unit: "edits",
19255 },
19256 Limit {
19257 id: "text_query_dictionary_scan_terms",
19258 default: 65536,
19259 maximum: 65536,
19260 unit: "terms",
19261 },
19262 Limit {
19263 id: "text_query_dictionary_scan_bytes",
19264 default: 16777216,
19265 maximum: 16777216,
19266 unit: "bytes",
19267 },
19268 Limit {
19269 id: "text_query_fuzzy_work_units",
19270 default: 2000000,
19271 maximum: 2000000,
19272 unit: "distance_cells",
19273 },
19274 Limit {
19275 id: "aggregation_nodes",
19276 default: 64,
19277 maximum: 256,
19278 unit: "nodes",
19279 },
19280 Limit {
19281 id: "aggregation_buckets",
19282 default: 65536,
19283 maximum: 65536,
19284 unit: "buckets",
19285 },
19286 Limit {
19287 id: "metric_point_bytes",
19288 default: 1048576,
19289 maximum: 1048576,
19290 unit: "bytes",
19291 },
19292 Limit {
19293 id: "metric_attributes",
19294 default: 128,
19295 maximum: 128,
19296 unit: "items",
19297 },
19298 Limit {
19299 id: "metric_attribute_bytes",
19300 default: 65536,
19301 maximum: 65536,
19302 unit: "bytes",
19303 },
19304 Limit {
19305 id: "metric_exemplars",
19306 default: 8,
19307 maximum: 8,
19308 unit: "items",
19309 },
19310 Limit {
19311 id: "metric_histogram_buckets",
19312 default: 4097,
19313 maximum: 4097,
19314 unit: "buckets",
19315 },
19316 Limit {
19317 id: "time_series_grouping_keys",
19318 default: 4,
19319 maximum: 16,
19320 unit: "keys",
19321 },
19322 Limit {
19323 id: "time_series_points",
19324 default: 100000,
19325 maximum: 100000,
19326 unit: "points",
19327 },
19328 Limit {
19329 id: "time_series_series",
19330 default: 10000,
19331 maximum: 10000,
19332 unit: "series",
19333 },
19334 Limit {
19335 id: "time_series_buckets",
19336 default: 65536,
19337 maximum: 65536,
19338 unit: "buckets",
19339 },
19340 Limit {
19341 id: "time_series_results",
19342 default: 65536,
19343 maximum: 65536,
19344 unit: "results",
19345 },
19346 Limit {
19347 id: "time_series_quantiles",
19348 default: 10,
19349 maximum: 100,
19350 unit: "quantiles",
19351 },
19352 Limit {
19353 id: "time_series_state_bytes",
19354 default: 67108864,
19355 maximum: 67108864,
19356 unit: "bytes",
19357 },
19358 Limit {
19359 id: "temporal_inputs",
19360 default: 16,
19361 maximum: 16,
19362 unit: "indexes",
19363 },
19364 Limit {
19365 id: "temporal_pattern_nodes",
19366 default: 64,
19367 maximum: 64,
19368 unit: "nodes",
19369 },
19370 Limit {
19371 id: "temporal_pattern_depth",
19372 default: 16,
19373 maximum: 16,
19374 unit: "levels",
19375 },
19376 Limit {
19377 id: "temporal_pattern_branches",
19378 default: 16,
19379 maximum: 16,
19380 unit: "branches",
19381 },
19382 Limit {
19383 id: "temporal_correlation_keys",
19384 default: 4,
19385 maximum: 4,
19386 unit: "fields",
19387 },
19388 Limit {
19389 id: "temporal_events",
19390 default: 4096,
19391 maximum: 4096,
19392 unit: "events",
19393 },
19394 Limit {
19395 id: "temporal_states",
19396 default: 65536,
19397 maximum: 65536,
19398 unit: "states",
19399 },
19400 Limit {
19401 id: "temporal_captured_events",
19402 default: 256,
19403 maximum: 256,
19404 unit: "events",
19405 },
19406 Limit {
19407 id: "temporal_results",
19408 default: 4096,
19409 maximum: 4096,
19410 unit: "results",
19411 },
19412 Limit {
19413 id: "temporal_state_bytes",
19414 default: 67108864,
19415 maximum: 67108864,
19416 unit: "bytes",
19417 },
19418 Limit {
19419 id: "temporal_interval_nanos",
19420 default: 2678400000000000,
19421 maximum: 2678400000000000,
19422 unit: "nanoseconds",
19423 },
19424 Limit {
19425 id: "relationship_indexes",
19426 default: 4,
19427 maximum: 16,
19428 unit: "indexes",
19429 },
19430 Limit {
19431 id: "relationship_seeds",
19432 default: 16,
19433 maximum: 128,
19434 unit: "entities",
19435 },
19436 Limit {
19437 id: "relationship_filter_values",
19438 default: 16,
19439 maximum: 128,
19440 unit: "values",
19441 },
19442 Limit {
19443 id: "relationship_depth",
19444 default: 4,
19445 maximum: 16,
19446 unit: "levels",
19447 },
19448 Limit {
19449 id: "relationship_fan_out",
19450 default: 256,
19451 maximum: 4096,
19452 unit: "relationships",
19453 },
19454 Limit {
19455 id: "relationship_visited_entities",
19456 default: 10000,
19457 maximum: 65536,
19458 unit: "entities",
19459 },
19460 Limit {
19461 id: "relationship_visited_records",
19462 default: 10000,
19463 maximum: 10000,
19464 unit: "records",
19465 },
19466 Limit {
19467 id: "relationship_returned_records",
19468 default: 10000,
19469 maximum: 10000,
19470 unit: "records",
19471 },
19472 Limit {
19473 id: "relationship_memory_bytes",
19474 default: 67108864,
19475 maximum: 268435456,
19476 unit: "bytes",
19477 },
19478 Limit {
19479 id: "profile_indexes",
19480 default: 4,
19481 maximum: 16,
19482 unit: "indexes",
19483 },
19484 Limit {
19485 id: "profile_filter_values",
19486 default: 16,
19487 maximum: 128,
19488 unit: "values",
19489 },
19490 Limit {
19491 id: "profile_batches",
19492 default: 10000,
19493 maximum: 10000,
19494 unit: "batches",
19495 },
19496 Limit {
19497 id: "profile_samples",
19498 default: 100000,
19499 maximum: 100000,
19500 unit: "samples",
19501 },
19502 Limit {
19503 id: "profile_results",
19504 default: 10000,
19505 maximum: 10000,
19506 unit: "results",
19507 },
19508 Limit {
19509 id: "profile_memory_bytes",
19510 default: 67108864,
19511 maximum: 268435456,
19512 unit: "bytes",
19513 },
19514 Limit {
19515 id: "approximate_cardinality_precision",
19516 default: 12,
19517 maximum: 16,
19518 unit: "index_bits",
19519 },
19520 Limit {
19521 id: "approximate_percentile_precision",
19522 default: 10,
19523 maximum: 12,
19524 unit: "index_bits",
19525 },
19526 Limit {
19527 id: "operation_page_authorities",
19528 default: 7,
19529 maximum: 7,
19530 unit: "authorities",
19531 },
19532 Limit {
19533 id: "artifact_chunk_bytes",
19534 default: 262144,
19535 maximum: 1048576,
19536 unit: "bytes",
19537 },
19538 Limit {
19539 id: "table_snapshot_objects",
19540 default: 1024,
19541 maximum: 4096,
19542 unit: "objects",
19543 },
19544 Limit {
19545 id: "table_snapshot_ttl_millis",
19546 default: 3600000,
19547 maximum: 604800000,
19548 unit: "milliseconds",
19549 },
19550 Limit {
19551 id: "table_snapshot_read_bytes",
19552 default: 262144,
19553 maximum: 1048576,
19554 unit: "bytes",
19555 },
19556 Limit {
19557 id: "bulk_document_items",
19558 default: 128,
19559 maximum: 1024,
19560 unit: "items",
19561 },
19562 Limit {
19563 id: "bulk_document_bytes",
19564 default: 2097152,
19565 maximum: 2097152,
19566 unit: "bytes",
19567 },
19568 Limit {
19569 id: "state_command_keys",
19570 default: 128,
19571 maximum: 128,
19572 unit: "keys",
19573 },
19574 Limit {
19575 id: "state_command_value_bytes",
19576 default: 1048576,
19577 maximum: 1048576,
19578 unit: "bytes",
19579 },
19580 Limit {
19581 id: "state_write_outcomes",
19582 default: 4096,
19583 maximum: 4096,
19584 unit: "entries",
19585 },
19586 Limit {
19587 id: "exact_decimal_scale",
19588 default: 18,
19589 maximum: 1024,
19590 unit: "decimal_places",
19591 },
19592 Limit {
19593 id: "retry_after_millis",
19594 default: 1000,
19595 maximum: 60000,
19596 unit: "milliseconds",
19597 },
19598 Limit {
19599 id: "mapping_fields",
19600 default: 16384,
19601 maximum: 16384,
19602 unit: "fields",
19603 },
19604 Limit {
19605 id: "search_result_window",
19606 default: 10000,
19607 maximum: 10000,
19608 unit: "items",
19609 },
19610 Limit {
19611 id: "routing_values",
19612 default: 1024,
19613 maximum: 1024,
19614 unit: "items",
19615 },
19616 Limit {
19617 id: "routing_value_bytes",
19618 default: 4096,
19619 maximum: 4096,
19620 unit: "bytes",
19621 },
19622 Limit {
19623 id: "query_recursion_depth",
19624 default: 64,
19625 maximum: 64,
19626 unit: "levels",
19627 },
19628 Limit {
19629 id: "vector_dimensions",
19630 default: 16384,
19631 maximum: 16384,
19632 unit: "dimensions",
19633 },
19634 Limit {
19635 id: "vector_query_bytes",
19636 default: 65536,
19637 maximum: 65536,
19638 unit: "bytes",
19639 },
19640 Limit {
19641 id: "vector_request_bytes",
19642 default: 1048576,
19643 maximum: 1048576,
19644 unit: "bytes",
19645 },
19646 Limit {
19647 id: "vector_candidates",
19648 default: 10000,
19649 maximum: 10000,
19650 unit: "items",
19651 },
19652 Limit {
19653 id: "vector_set_document_vectors",
19654 default: 128,
19655 maximum: 128,
19656 unit: "vectors",
19657 },
19658 Limit {
19659 id: "vector_set_document_bytes",
19660 default: 65536,
19661 maximum: 65536,
19662 unit: "bytes",
19663 },
19664 Limit {
19665 id: "vector_set_query_vectors",
19666 default: 32,
19667 maximum: 32,
19668 unit: "vectors",
19669 },
19670 Limit {
19671 id: "vector_set_query_bytes",
19672 default: 65536,
19673 maximum: 65536,
19674 unit: "bytes",
19675 },
19676 Limit {
19677 id: "retrieval_branches",
19678 default: 16,
19679 maximum: 16,
19680 unit: "branches",
19681 },
19682 Limit {
19683 id: "retrieval_branch_name_bytes",
19684 default: 64,
19685 maximum: 64,
19686 unit: "bytes",
19687 },
19688 Limit {
19689 id: "retrieval_window",
19690 default: 10000,
19691 maximum: 10000,
19692 unit: "items",
19693 },
19694 Limit {
19695 id: "fragment_fields",
19696 default: 4,
19697 maximum: 16,
19698 unit: "fields",
19699 },
19700 Limit {
19701 id: "fragments_per_field",
19702 default: 1,
19703 maximum: 8,
19704 unit: "items",
19705 },
19706 Limit {
19707 id: "fragment_bytes",
19708 default: 150,
19709 maximum: 8192,
19710 unit: "bytes",
19711 },
19712 Limit {
19713 id: "fragment_total_bytes",
19714 default: 65536,
19715 maximum: 65536,
19716 unit: "bytes",
19717 },
19718 Limit {
19719 id: "result_feature_hits",
19720 default: 10,
19721 maximum: 100,
19722 unit: "items",
19723 },
19724 Limit {
19725 id: "result_features",
19726 default: 4,
19727 maximum: 16,
19728 unit: "features",
19729 },
19730 Limit {
19731 id: "diversification_fields",
19732 default: 1,
19733 maximum: 4,
19734 unit: "fields",
19735 },
19736 Limit {
19737 id: "diversification_per_group",
19738 default: 1,
19739 maximum: 64,
19740 unit: "items",
19741 },
19742 Limit {
19743 id: "source_projection_patterns",
19744 default: 128,
19745 maximum: 128,
19746 unit: "patterns",
19747 },
19748 Limit {
19749 id: "source_projection_pattern_bytes",
19750 default: 512,
19751 maximum: 512,
19752 unit: "bytes",
19753 },
19754 Limit {
19755 id: "vector_evaluation_queries",
19756 default: 64,
19757 maximum: 256,
19758 unit: "queries",
19759 },
19760 Limit {
19761 id: "vector_evaluation_k",
19762 default: 10,
19763 maximum: 1000,
19764 unit: "items",
19765 },
19766 Limit {
19767 id: "vector_evaluation_profiles",
19768 default: 3,
19769 maximum: 3,
19770 unit: "profiles",
19771 },
19772 Limit {
19773 id: "vector_evaluation_artifact_bytes",
19774 default: 1048576,
19775 maximum: 1048576,
19776 unit: "bytes",
19777 },
19778 Limit {
19779 id: "vector_warm_components",
19780 default: 2,
19781 maximum: 3,
19782 unit: "components",
19783 },
19784 Limit {
19785 id: "vector_warm_requests",
19786 default: 1024,
19787 maximum: 65536,
19788 unit: "requests",
19789 },
19790 Limit {
19791 id: "vector_warm_bytes",
19792 default: 268435456,
19793 maximum: 1073741824,
19794 unit: "bytes",
19795 },
19796 Limit {
19797 id: "vector_warm_achievements",
19798 default: 1024,
19799 maximum: 10000,
19800 unit: "items",
19801 },
19802 Limit {
19803 id: "vector_warm_ttl_millis",
19804 default: 300000,
19805 maximum: 900000,
19806 unit: "milliseconds",
19807 },
19808 Limit {
19809 id: "operation_page_size",
19810 default: 100,
19811 maximum: 100,
19812 unit: "items",
19813 },
19814 Limit {
19815 id: "operation_wait_attempts",
19816 default: 20,
19817 maximum: 100,
19818 unit: "attempts",
19819 },
19820 Limit {
19821 id: "operation_wait_interval_millis",
19822 default: 100,
19823 maximum: 60000,
19824 unit: "milliseconds",
19825 },
19826 Limit {
19827 id: "resource_initial_shards",
19828 default: 1,
19829 maximum: 4096,
19830 unit: "shards",
19831 },
19832 Limit {
19833 id: "resource_target_shard_bytes",
19834 default: 536870912,
19835 maximum: 1125899906842624,
19836 unit: "bytes",
19837 },
19838 Limit {
19839 id: "resource_admission_weight",
19840 default: 1,
19841 maximum: 1000000,
19842 unit: "weight",
19843 },
19844 Limit {
19845 id: "resource_ram_bytes",
19846 default: 1073741824,
19847 maximum: 1125899906842624,
19848 unit: "bytes",
19849 },
19850 Limit {
19851 id: "resource_nvme_bytes",
19852 default: 2147483648,
19853 maximum: 1125899906842624,
19854 unit: "bytes",
19855 },
19856 Limit {
19857 id: "resource_refresh_millis",
19858 default: 200,
19859 maximum: 604800000,
19860 unit: "milliseconds",
19861 },
19862 Limit {
19863 id: "resource_memtable_bytes",
19864 default: 268435456,
19865 maximum: 1125899906842624,
19866 unit: "bytes",
19867 },
19868 Limit {
19869 id: "resource_parallelism",
19870 default: 1,
19871 maximum: 4096,
19872 unit: "workers",
19873 },
19874 Limit {
19875 id: "collection_export_bytes",
19876 default: 268435456,
19877 maximum: 268435456,
19878 unit: "bytes",
19879 },
19880 Limit {
19881 id: "collection_export_documents",
19882 default: 10000,
19883 maximum: 10000,
19884 unit: "documents",
19885 },
19886 Limit {
19887 id: "index_transfer_bytes",
19888 default: 268435456,
19889 maximum: 268435456,
19890 unit: "bytes",
19891 },
19892 Limit {
19893 id: "index_transfer_records",
19894 default: 10000,
19895 maximum: 10000,
19896 unit: "records",
19897 },
19898 Limit {
19899 id: "index_transfer_pages",
19900 default: 7,
19901 maximum: 7,
19902 unit: "pages",
19903 },
19904 Limit {
19905 id: "portability_prefix_bytes",
19906 default: 512,
19907 maximum: 512,
19908 unit: "bytes",
19909 },
19910];
19911#[derive(Clone, Copy, Debug, Eq, PartialEq)]
19912pub enum JsonError {
19913 DuplicateObjectField,
19914 InvalidScalar,
19915}
19916pub fn validate_semantic_json(value: &JsonValue) -> Result<(), JsonError> {
19917 match value {
19918 JsonValue::I64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
19919 JsonValue::U64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
19920 JsonValue::ExactDecimal(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
19921 JsonValue::Approximate(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
19922 JsonValue::Array(items) => items.iter().try_for_each(validate_semantic_json),
19923 JsonValue::Object(fields) => {
19924 let mut names = std::collections::BTreeSet::new();
19925 for field in fields {
19926 if !names.insert(field.name.as_str()) {
19927 return Err(JsonError::DuplicateObjectField);
19928 }
19929 validate_semantic_json(&field.value)?;
19930 }
19931 Ok(())
19932 }
19933 JsonValue::Null | JsonValue::Bool(_) | JsonValue::String(_) => Ok(()),
19934 }
19935}
19936#[cfg(test)]
19937mod tests {
19938 use super::*;
19939 fn assert_fixture<T>(value: &serde_json::Value) -> Result<(), Box<dyn std::error::Error>>
19940 where
19941 T: serde::de::DeserializeOwned + Serialize,
19942 {
19943 let decoded: T = serde_json::from_value(value.clone())?;
19944 assert_eq!(serde_json::to_value(decoded)?, *value);
19945 Ok(())
19946 }
19947 #[test]
19948 fn every_named_type_has_a_canonical_round_trip_fixture() -> Result<(), Box<dyn std::error::Error>> {
19949 let document: serde_json::Value =
19950 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
19951 assert_eq!(document["spec_sha256"], LODESTONE_API_SPEC_SHA256);
19952 let fixtures = document["named_types"]
19953 .as_object()
19954 .ok_or("named type fixtures are not an object")?;
19955 assert_eq!(fixtures.len(), LODESTONE_API_TYPE_CONTRACTS.len());
19956 for (name, value) in fixtures {
19957 match name.as_str() {
19958 "cursor" => assert_fixture::<Cursor>(value)?,
19959 "locator" => assert_fixture::<Locator>(value)?,
19960 "resource" => assert_fixture::<Resource>(value)?,
19961 "read_cut_kind" => assert_fixture::<ReadCutKind>(value)?,
19962 "read_cut_index_evidence" => assert_fixture::<ReadCutIndexEvidence>(value)?,
19963 "read_cut_evidence" => assert_fixture::<ReadCutEvidence>(value)?,
19964 "table_snapshot_object_role" => assert_fixture::<TableSnapshotObjectRole>(value)?,
19965 "table_snapshot_codec" => assert_fixture::<TableSnapshotCodec>(value)?,
19966 "table_snapshot_object" => assert_fixture::<TableSnapshotObject>(value)?,
19967 "table_snapshot" => assert_fixture::<TableSnapshot>(value)?,
19968 "table_snapshot_resolution_state" => assert_fixture::<TableSnapshotResolutionState>(value)?,
19969 "table_snapshot_resolution" => assert_fixture::<TableSnapshotResolution>(value)?,
19970 "table_snapshot_read" => assert_fixture::<TableSnapshotRead>(value)?,
19971 "logical_occupancy_counts" => assert_fixture::<LogicalOccupancyCounts>(value)?,
19972 "logical_occupancy_gap_state" => assert_fixture::<LogicalOccupancyGapState>(value)?,
19973 "logical_occupancy_snapshot_evidence" => assert_fixture::<LogicalOccupancySnapshotEvidence>(value)?,
19974 "logical_occupancy_window_gap" => assert_fixture::<LogicalOccupancyWindowGap>(value)?,
19975 "field_promotion_configuration" => assert_fixture::<FieldPromotionConfiguration>(value)?,
19976 "overload_configuration" => assert_fixture::<OverloadConfiguration>(value)?,
19977 "index_policies" => assert_fixture::<IndexPolicies>(value)?,
19978 "maintenance_budgets" => assert_fixture::<MaintenanceBudgets>(value)?,
19979 "resource_durability_class" => assert_fixture::<ResourceDurabilityClass>(value)?,
19980 "resource_storage_class" => assert_fixture::<ResourceStorageClass>(value)?,
19981 "vector_quality_objective" => assert_fixture::<VectorQualityObjective>(value)?,
19982 "vector_indexing_objective" => assert_fixture::<VectorIndexingObjective>(value)?,
19983 "vector_residency_intent" => assert_fixture::<VectorResidencyIntent>(value)?,
19984 "vector_calibration_binding" => assert_fixture::<VectorCalibrationBinding>(value)?,
19985 "vector_resource_policy" => assert_fixture::<VectorResourcePolicy>(value)?,
19986 "workload_class" => assert_fixture::<WorkloadClass>(value)?,
19987 "index_resource_spec" => assert_fixture::<IndexResourceSpec>(value)?,
19988 "index_summary" => assert_fixture::<IndexSummary>(value)?,
19989 "mapping_mode" => assert_fixture::<MappingMode>(value)?,
19990 "dynamic_mapping_policy" => assert_fixture::<DynamicMappingPolicy>(value)?,
19991 "mapping_analyzer" => assert_fixture::<MappingAnalyzer>(value)?,
19992 "keyword_normalizer" => assert_fixture::<KeywordNormalizer>(value)?,
19993 "vector_metric" => assert_fixture::<VectorMetric>(value)?,
19994 "mapping_scalar" => assert_fixture::<MappingScalar>(value)?,
19995 "sparse_vector_weight_type" => assert_fixture::<SparseVectorWeightType>(value)?,
19996 "mapping_field_type" => assert_fixture::<MappingFieldType>(value)?,
19997 "mapping_field" => assert_fixture::<MappingField>(value)?,
19998 "multi_field_projection" => assert_fixture::<MultiFieldProjection>(value)?,
19999 "analyzer_identity" => assert_fixture::<AnalyzerIdentity>(value)?,
20000 "keyword_limit" => assert_fixture::<KeywordLimit>(value)?,
20001 "profile_privacy_action" => assert_fixture::<ProfilePrivacyAction>(value)?,
20002 "profile_privacy_field" => assert_fixture::<ProfilePrivacyField>(value)?,
20003 "profile_privacy_rule" => assert_fixture::<ProfilePrivacyRule>(value)?,
20004 "profile_privacy_policy" => assert_fixture::<ProfilePrivacyPolicy>(value)?,
20005 "mapping_record_model" => assert_fixture::<MappingRecordModel>(value)?,
20006 "mapping" => assert_fixture::<Mapping>(value)?,
20007 "index_detail" => assert_fixture::<IndexDetail>(value)?,
20008 "source_provider" => assert_fixture::<SourceProvider>(value)?,
20009 "source_decoder" => assert_fixture::<SourceDecoder>(value)?,
20010 "source_replay_guarantees" => assert_fixture::<SourceReplayGuarantees>(value)?,
20011 "source_partition_configuration" => assert_fixture::<SourcePartitionConfiguration>(value)?,
20012 "replayable_source_configuration" => assert_fixture::<ReplayableSourceConfiguration>(value)?,
20013 "source_partition_status" => assert_fixture::<SourcePartitionStatus>(value)?,
20014 "replayable_source_status" => assert_fixture::<ReplayableSourceStatus>(value)?,
20015 "source_control_transition" => assert_fixture::<SourceControlTransition>(value)?,
20016 "history_ledger_precondition" => assert_fixture::<HistoryLedgerPrecondition>(value)?,
20017 "history_retention_policy" => assert_fixture::<HistoryRetentionPolicy>(value)?,
20018 "history_selector" => assert_fixture::<HistorySelector>(value)?,
20019 "history_hold" => assert_fixture::<HistoryHold>(value)?,
20020 "history_status" => assert_fixture::<HistoryStatus>(value)?,
20021 "history_resolution" => assert_fixture::<HistoryResolution>(value)?,
20022 "index_reference" => assert_fixture::<IndexReference>(value)?,
20023 "alias_target" => assert_fixture::<AliasTarget>(value)?,
20024 "alias_summary" => assert_fixture::<AliasSummary>(value)?,
20025 "alias_detail" => assert_fixture::<AliasDetail>(value)?,
20026 "data_stream_summary" => assert_fixture::<DataStreamSummary>(value)?,
20027 "component_template_binding" => assert_fixture::<ComponentTemplateBinding>(value)?,
20028 "index_template_binding" => assert_fixture::<IndexTemplateBinding>(value)?,
20029 "lifecycle_policy_binding" => assert_fixture::<LifecyclePolicyBinding>(value)?,
20030 "data_stream_detail" => assert_fixture::<DataStreamDetail>(value)?,
20031 "component_template_summary" => assert_fixture::<ComponentTemplateSummary>(value)?,
20032 "component_template_detail" => assert_fixture::<ComponentTemplateDetail>(value)?,
20033 "index_template_summary" => assert_fixture::<IndexTemplateSummary>(value)?,
20034 "index_template_detail" => assert_fixture::<IndexTemplateDetail>(value)?,
20035 "ingest_pipeline_summary" => assert_fixture::<IngestPipelineSummary>(value)?,
20036 "ingest_pipeline_detail" => assert_fixture::<IngestPipelineDetail>(value)?,
20037 "ingest_pipeline_selection" => assert_fixture::<IngestPipelineSelection>(value)?,
20038 "lifecycle_policy_summary" => assert_fixture::<LifecyclePolicySummary>(value)?,
20039 "rollover_thresholds" => assert_fixture::<RolloverThresholds>(value)?,
20040 "retention_policy" => assert_fixture::<RetentionPolicy>(value)?,
20041 "lifecycle_policy_detail" => assert_fixture::<LifecyclePolicyDetail>(value)?,
20042 "text_query_operator" => assert_fixture::<TextQueryOperator>(value)?,
20043 "text_query_analyzer" => assert_fixture::<TextQueryAnalyzer>(value)?,
20044 "zero_terms_query" => assert_fixture::<ZeroTermsQuery>(value)?,
20045 "text_query_options" => assert_fixture::<TextQueryOptions>(value)?,
20046 "multi_match_mode" => assert_fixture::<MultiMatchMode>(value)?,
20047 "multi_match_field" => assert_fixture::<MultiMatchField>(value)?,
20048 "multi_match_options" => assert_fixture::<MultiMatchOptions>(value)?,
20049 "sort_order" => assert_fixture::<SortOrder>(value)?,
20050 "sort_mode" => assert_fixture::<SortMode>(value)?,
20051 "missing_order" => assert_fixture::<MissingOrder>(value)?,
20052 "nested_score_mode" => assert_fixture::<NestedScoreMode>(value)?,
20053 "nested_inner_hits" => assert_fixture::<NestedInnerHits>(value)?,
20054 "sort_spec" => assert_fixture::<SortSpec>(value)?,
20055 "query" => assert_fixture::<Query>(value)?,
20056 "dense_retrieval_mode" => assert_fixture::<DenseRetrievalMode>(value)?,
20057 "vector_achieved_mode" => assert_fixture::<VectorAchievedMode>(value)?,
20058 "vector_branch_diagnostics" => assert_fixture::<VectorBranchDiagnostics>(value)?,
20059 "dense_vector_element_type" => assert_fixture::<DenseVectorElementType>(value)?,
20060 "dense_vector_byte_order" => assert_fixture::<DenseVectorByteOrder>(value)?,
20061 "vector_value" => assert_fixture::<VectorValue>(value)?,
20062 "sparse_vector_entry" => assert_fixture::<SparseVectorEntry>(value)?,
20063 "sparse_vector_value" => assert_fixture::<SparseVectorValue>(value)?,
20064 "vector_set_value" => assert_fixture::<VectorSetValue>(value)?,
20065 "vector_evaluation_snapshot" => assert_fixture::<VectorEvaluationSnapshot>(value)?,
20066 "vector_evaluation_query_set" => assert_fixture::<VectorEvaluationQuerySet>(value)?,
20067 "vector_evaluation_budget" => assert_fixture::<VectorEvaluationBudget>(value)?,
20068 "vector_candidate_policy" => assert_fixture::<VectorCandidatePolicy>(value)?,
20069 "vector_calibration_objective" => assert_fixture::<VectorCalibrationObjective>(value)?,
20070 "vector_strategy_profile" => assert_fixture::<VectorStrategyProfile>(value)?,
20071 "vector_evaluation_work" => assert_fixture::<VectorEvaluationWork>(value)?,
20072 "vector_evaluation_error_code" => assert_fixture::<VectorEvaluationErrorCode>(value)?,
20073 "vector_evaluation_error" => assert_fixture::<VectorEvaluationError>(value)?,
20074 "vector_recall_result" => assert_fixture::<VectorRecallResult>(value)?,
20075 "vector_calibration_candidate" => assert_fixture::<VectorCalibrationCandidate>(value)?,
20076 "vector_calibration_result" => assert_fixture::<VectorCalibrationResult>(value)?,
20077 "vector_diagnostic_result" => assert_fixture::<VectorDiagnosticResult>(value)?,
20078 "vector_warm_component" => assert_fixture::<VectorWarmComponent>(value)?,
20079 "vector_warm_state" => assert_fixture::<VectorWarmState>(value)?,
20080 "vector_warm_achievement" => assert_fixture::<VectorWarmAchievement>(value)?,
20081 "vector_warm_result" => assert_fixture::<VectorWarmResult>(value)?,
20082 "dense_retrieval_threshold" => assert_fixture::<DenseRetrievalThreshold>(value)?,
20083 "retrieval_branch" => assert_fixture::<RetrievalBranch>(value)?,
20084 "weighted_rrf_fusion" => assert_fixture::<WeightedRrfFusion>(value)?,
20085 "retrieval_plan" => assert_fixture::<RetrievalPlan>(value)?,
20086 "histogram_bounds" => assert_fixture::<HistogramBounds>(value)?,
20087 "date_histogram_bounds" => assert_fixture::<DateHistogramBounds>(value)?,
20088 "approximation_algorithm" => assert_fixture::<ApproximationAlgorithm>(value)?,
20089 "approximation" => assert_fixture::<Approximation>(value)?,
20090 "percentile_value" => assert_fixture::<PercentileValue>(value)?,
20091 "approximate_percentile_value" => assert_fixture::<ApproximatePercentileValue>(value)?,
20092 "time_series_operator" => assert_fixture::<TimeSeriesOperator>(value)?,
20093 "time_series_missing_data" => assert_fixture::<TimeSeriesMissingData>(value)?,
20094 "time_series_quantile_mode" => assert_fixture::<TimeSeriesQuantileMode>(value)?,
20095 "time_series_bucket_state" => assert_fixture::<TimeSeriesBucketState>(value)?,
20096 "time_series_quantile_value" => assert_fixture::<TimeSeriesQuantileValue>(value)?,
20097 "time_series_value" => assert_fixture::<TimeSeriesValue>(value)?,
20098 "time_series_bucket" => assert_fixture::<TimeSeriesBucket>(value)?,
20099 "relationship_traversal_direction" => assert_fixture::<RelationshipTraversalDirection>(value)?,
20100 "relationship_traversal_filter" => assert_fixture::<RelationshipTraversalFilter>(value)?,
20101 "relationship_traversal_budget" => assert_fixture::<RelationshipTraversalBudget>(value)?,
20102 "traversed_relationship" => assert_fixture::<TraversedRelationship>(value)?,
20103 "profile_query_operation" => assert_fixture::<ProfileQueryOperation>(value)?,
20104 "profile_group_by" => assert_fixture::<ProfileGroupBy>(value)?,
20105 "profile_query_filter" => assert_fixture::<ProfileQueryFilter>(value)?,
20106 "profile_query_budget" => assert_fixture::<ProfileQueryBudget>(value)?,
20107 "profile_query_row" => assert_fixture::<ProfileQueryRow>(value)?,
20108 "temporal_input" => assert_fixture::<TemporalInput>(value)?,
20109 "temporal_pattern" => assert_fixture::<TemporalPattern>(value)?,
20110 "historical_temporal_definition" => assert_fixture::<HistoricalTemporalDefinition>(value)?,
20111 "temporal_evidence_status" => assert_fixture::<TemporalEvidenceStatus>(value)?,
20112 "temporal_source_event" => assert_fixture::<TemporalSourceEvent>(value)?,
20113 "temporal_evidence" => assert_fixture::<TemporalEvidence>(value)?,
20114 "continuous_temporal_start" => assert_fixture::<ContinuousTemporalStart>(value)?,
20115 "continuous_temporal_watermark_policy" => assert_fixture::<ContinuousTemporalWatermarkPolicy>(value)?,
20116 "continuous_temporal_late_data_policy" => assert_fixture::<ContinuousTemporalLateDataPolicy>(value)?,
20117 "continuous_temporal_output" => assert_fixture::<ContinuousTemporalOutput>(value)?,
20118 "continuous_temporal_definition" => assert_fixture::<ContinuousTemporalDefinition>(value)?,
20119 "continuous_temporal_frontier" => assert_fixture::<ContinuousTemporalFrontier>(value)?,
20120 "continuous_temporal_available_frontier" => {
20121 assert_fixture::<ContinuousTemporalAvailableFrontier>(value)?
20122 }
20123 "continuous_temporal_gap_reason" => assert_fixture::<ContinuousTemporalGapReason>(value)?,
20124 "continuous_temporal_gap" => assert_fixture::<ContinuousTemporalGap>(value)?,
20125 "continuous_temporal_evaluation" => assert_fixture::<ContinuousTemporalEvaluation>(value)?,
20126 "composite_order" => assert_fixture::<CompositeOrder>(value)?,
20127 "composite_source" => assert_fixture::<CompositeSource>(value)?,
20128 "aggregation" => assert_fixture::<Aggregation>(value)?,
20129 "nested_search_hit" => assert_fixture::<NestedSearchHit>(value)?,
20130 "named_nested_inner_hits_result" => assert_fixture::<NamedNestedInnerHitsResult>(value)?,
20131 "fragment_boundary" => assert_fixture::<FragmentBoundary>(value)?,
20132 "fragment_offset_encoding" => assert_fixture::<FragmentOffsetEncoding>(value)?,
20133 "fragment_ranker" => assert_fixture::<FragmentRanker>(value)?,
20134 "fragment_request" => assert_fixture::<FragmentRequest>(value)?,
20135 "search_fragment" => assert_fixture::<SearchFragment>(value)?,
20136 "numeric_feature_transform" => assert_fixture::<NumericFeatureTransform>(value)?,
20137 "numeric_result_feature" => assert_fixture::<NumericResultFeature>(value)?,
20138 "result_feature_request" => assert_fixture::<ResultFeatureRequest>(value)?,
20139 "result_diversification" => assert_fixture::<ResultDiversification>(value)?,
20140 "source_projection" => assert_fixture::<SourceProjection>(value)?,
20141 "branch_score_kind" => assert_fixture::<BranchScoreKind>(value)?,
20142 "result_feature" => assert_fixture::<ResultFeature>(value)?,
20143 "native_record_locator" => assert_fixture::<NativeRecordLocator>(value)?,
20144 "search_hit" => assert_fixture::<SearchHit>(value)?,
20145 "record_erasure_state" => assert_fixture::<RecordErasureState>(value)?,
20146 "record_erasure_receipt" => assert_fixture::<RecordErasureReceipt>(value)?,
20147 "aggregation_bucket" => assert_fixture::<AggregationBucket>(value)?,
20148 "aggregation_result" => assert_fixture::<AggregationResult>(value)?,
20149 "shard_counts" => assert_fixture::<ShardCounts>(value)?,
20150 "total_hits_relation" => assert_fixture::<TotalHitsRelation>(value)?,
20151 "search_total" => assert_fixture::<SearchTotal>(value)?,
20152 "search_execution_freshness" => assert_fixture::<SearchExecutionFreshness>(value)?,
20153 "search_freshness" => assert_fixture::<SearchFreshness>(value)?,
20154 "search_degradation_reason" => assert_fixture::<SearchDegradationReason>(value)?,
20155 "search_achievement" => assert_fixture::<SearchAchievement>(value)?,
20156 "search_failure_stage" => assert_fixture::<SearchFailureStage>(value)?,
20157 "search_failure_reason" => assert_fixture::<SearchFailureReason>(value)?,
20158 "collection_shard" => assert_fixture::<CollectionShard>(value)?,
20159 "search_partial_failure" => assert_fixture::<SearchPartialFailure>(value)?,
20160 "artifact" => assert_fixture::<Artifact>(value)?,
20161 "portability_storage_capability" => assert_fixture::<PortabilityStorageCapability>(value)?,
20162 "collection_export_artifact" => assert_fixture::<CollectionExportArtifact>(value)?,
20163 "collection_transfer_sequence" => assert_fixture::<CollectionTransferSequence>(value)?,
20164 "collection_transfer_artifact" => assert_fixture::<CollectionTransferArtifact>(value)?,
20165 "collection_standby_state" => assert_fixture::<CollectionStandbyState>(value)?,
20166 "collection_standby" => assert_fixture::<CollectionStandby>(value)?,
20167 "portability_key_capability_reference_state" => {
20168 assert_fixture::<PortabilityKeyCapabilityReferenceState>(value)?
20169 }
20170 "collection_export_retirement" => assert_fixture::<CollectionExportRetirement>(value)?,
20171 "index_transfer_page" => assert_fixture::<IndexTransferPage>(value)?,
20172 "index_transfer_artifact" => assert_fixture::<IndexTransferArtifact>(value)?,
20173 "search_validation_bound" => assert_fixture::<SearchValidationBound>(value)?,
20174 "search_validation_estimates" => assert_fixture::<SearchValidationEstimates>(value)?,
20175 "search_validation_limit" => assert_fixture::<SearchValidationLimit>(value)?,
20176 "operation_kind" => assert_fixture::<OperationKind>(value)?,
20177 "operation_authority" => assert_fixture::<OperationAuthority>(value)?,
20178 "operation_target" => assert_fixture::<OperationTarget>(value)?,
20179 "operation_state" => assert_fixture::<OperationState>(value)?,
20180 "operation_pending_state" => assert_fixture::<OperationPendingState>(value)?,
20181 "operation_progress_unit" => assert_fixture::<OperationProgressUnit>(value)?,
20182 "operation_progress" => assert_fixture::<OperationProgress>(value)?,
20183 "operation_result" => assert_fixture::<OperationResult>(value)?,
20184 "operation_failure" => assert_fixture::<OperationFailure>(value)?,
20185 "operation_cancellation" => assert_fixture::<OperationCancellation>(value)?,
20186 "operation_retention_state" => assert_fixture::<OperationRetentionState>(value)?,
20187 "operation_retention" => assert_fixture::<OperationRetention>(value)?,
20188 "operation" => assert_fixture::<Operation>(value)?,
20189 "write_durability_boundary" => assert_fixture::<WriteDurabilityBoundary>(value)?,
20190 "write_visibility_mode" => assert_fixture::<WriteVisibilityMode>(value)?,
20191 "write_response_stage" => assert_fixture::<WriteResponseStage>(value)?,
20192 "write_achievement" => assert_fixture::<WriteAchievement>(value)?,
20193 "mutation_commit_position" => assert_fixture::<MutationCommitPosition>(value)?,
20194 "mutation_commit_receipt" => assert_fixture::<MutationCommitReceipt>(value)?,
20195 "mutation_resolver" => assert_fixture::<MutationResolver>(value)?,
20196 "mutation_outcome" => assert_fixture::<MutationOutcome>(value)?,
20197 "submission_state" => assert_fixture::<SubmissionState>(value)?,
20198 "expected_binding" => assert_fixture::<ExpectedBinding>(value)?,
20199 "administration_alias_action" => assert_fixture::<AdministrationAliasAction>(value)?,
20200 "administration_mutation" => assert_fixture::<AdministrationMutation>(value)?,
20201 "administration_outcome" => assert_fixture::<AdministrationOutcome>(value)?,
20202 "index_change_apply_receipt" => assert_fixture::<IndexChangeApplyReceipt>(value)?,
20203 "index_change_resolution_state" => assert_fixture::<IndexChangeResolutionState>(value)?,
20204 "bulk_document_item" => assert_fixture::<BulkDocumentItem>(value)?,
20205 "bulk_document_item_outcome" => assert_fixture::<BulkDocumentItemOutcome>(value)?,
20206 "bulk_document_outcome" => assert_fixture::<BulkDocumentOutcome>(value)?,
20207 "metric_attribute_value" => assert_fixture::<MetricAttributeValue>(value)?,
20208 "metric_attribute" => assert_fixture::<MetricAttribute>(value)?,
20209 "metric_number" => assert_fixture::<MetricNumber>(value)?,
20210 "metric_temporality" => assert_fixture::<MetricTemporality>(value)?,
20211 "metric_point_kind" => assert_fixture::<MetricPointKind>(value)?,
20212 "metric_exponential_buckets" => assert_fixture::<MetricExponentialBuckets>(value)?,
20213 "metric_data" => assert_fixture::<MetricData>(value)?,
20214 "metric_instrumentation_scope" => assert_fixture::<MetricInstrumentationScope>(value)?,
20215 "metric_exemplar" => assert_fixture::<MetricExemplar>(value)?,
20216 "metric_point" => assert_fixture::<MetricPoint>(value)?,
20217 "entity_ref" => assert_fixture::<EntityRef>(value)?,
20218 "relationship_evidence_ref" => assert_fixture::<RelationshipEvidenceRef>(value)?,
20219 "relationship_directionality" => assert_fixture::<RelationshipDirectionality>(value)?,
20220 "relationship_record" => assert_fixture::<RelationshipRecord>(value)?,
20221 "profile_label" => assert_fixture::<ProfileLabel>(value)?,
20222 "profile_sample_type" => assert_fixture::<ProfileSampleType>(value)?,
20223 "profile_mapping" => assert_fixture::<ProfileMapping>(value)?,
20224 "profile_function" => assert_fixture::<ProfileFunction>(value)?,
20225 "profile_line" => assert_fixture::<ProfileLine>(value)?,
20226 "profile_location" => assert_fixture::<ProfileLocation>(value)?,
20227 "profile_stack" => assert_fixture::<ProfileStack>(value)?,
20228 "profile_sample" => assert_fixture::<ProfileSample>(value)?,
20229 "profile_instrumentation_scope" => assert_fixture::<ProfileInstrumentationScope>(value)?,
20230 "profile_batch" => assert_fixture::<ProfileBatch>(value)?,
20231 "native_record" => assert_fixture::<NativeRecord>(value)?,
20232 "retained_append_item" => assert_fixture::<RetainedAppendItem>(value)?,
20233 "retained_append_state" => assert_fixture::<RetainedAppendState>(value)?,
20234 "retained_append_retry_safety" => assert_fixture::<RetainedAppendRetrySafety>(value)?,
20235 "retained_append_item_outcome" => assert_fixture::<RetainedAppendItemOutcome>(value)?,
20236 "retained_append_bulk_outcome" => assert_fixture::<RetainedAppendBulkOutcome>(value)?,
20237 "retained_append_observation_state" => assert_fixture::<RetainedAppendObservationState>(value)?,
20238 "retained_append_observation_outcome" => assert_fixture::<RetainedAppendObservationOutcome>(value)?,
20239 "binary_value" => assert_fixture::<BinaryValue>(value)?,
20240 "state_hash_field" => assert_fixture::<StateHashField>(value)?,
20241 "state_set_entry" => assert_fixture::<StateSetEntry>(value)?,
20242 "state_set_condition" => assert_fixture::<StateSetCondition>(value)?,
20243 "state_operation" => assert_fixture::<StateOperation>(value)?,
20244 "state_optional_value" => assert_fixture::<StateOptionalValue>(value)?,
20245 "state_command_result" => assert_fixture::<StateCommandResult>(value)?,
20246 "state_write_resolution" => assert_fixture::<StateWriteResolution>(value)?,
20247 "service_credential_reservation" => assert_fixture::<ServiceCredentialReservation>(value)?,
20248 "subscription_metadata_field" => assert_fixture::<SubscriptionMetadataField>(value)?,
20249 "subscription_field" => assert_fixture::<SubscriptionField>(value)?,
20250 "subscription_filter" => assert_fixture::<SubscriptionFilter>(value)?,
20251 "subscription_cursor_entry" => assert_fixture::<SubscriptionCursorEntry>(value)?,
20252 "subscription_route" => assert_fixture::<SubscriptionRoute>(value)?,
20253 "subscription_start_position" => assert_fixture::<SubscriptionStartPosition>(value)?,
20254 "subscription_start" => assert_fixture::<SubscriptionStart>(value)?,
20255 "subscription_accepted" => assert_fixture::<SubscriptionAccepted>(value)?,
20256 "subscription_writer_fence" => assert_fixture::<SubscriptionWriterFence>(value)?,
20257 "subscription_event" => assert_fixture::<SubscriptionEvent>(value)?,
20258 "subscription_heartbeat" => assert_fixture::<SubscriptionHeartbeat>(value)?,
20259 "subscription_gap" => assert_fixture::<SubscriptionGap>(value)?,
20260 "subscription_terminal_reason" => assert_fixture::<SubscriptionTerminalReason>(value)?,
20261 "subscription_terminal" => assert_fixture::<SubscriptionTerminal>(value)?,
20262 "subscription_frame" => assert_fixture::<SubscriptionFrame>(value)?,
20263 "stream_binding" => assert_fixture::<StreamBinding>(value)?,
20264 "capability_grant" => assert_fixture::<CapabilityGrant>(value)?,
20265 "protocol_limit" => assert_fixture::<ProtocolLimit>(value)?,
20266 "document_mutation_condition" => assert_fixture::<DocumentMutationCondition>(value)?,
20267 "audit_adapter" => assert_fixture::<AuditAdapter>(value)?,
20268 "audit_decision" => assert_fixture::<AuditDecision>(value)?,
20269 "audit_outcome" => assert_fixture::<AuditOutcome>(value)?,
20270 "audit_detail" => assert_fixture::<AuditDetail>(value)?,
20271 "audit_gap_reason" => assert_fixture::<AuditGapReason>(value)?,
20272 "audit_event" => assert_fixture::<AuditEvent>(value)?,
20273 "audit_gap" => assert_fixture::<AuditGap>(value)?,
20274 "audit_stream_state" => assert_fixture::<AuditStreamState>(value)?,
20275 "service_credential_grant" => assert_fixture::<ServiceCredentialGrant>(value)?,
20276 "service_credential_summary" => assert_fixture::<ServiceCredentialSummary>(value)?,
20277 "security_role" => assert_fixture::<SecurityRole>(value)?,
20278 "role_append_scope_change" => assert_fixture::<RoleAppendScopeChange>(value)?,
20279 "role_append_access_preparation" => assert_fixture::<RoleAppendAccessPreparation>(value)?,
20280 "source_authorization_subject_kind" => assert_fixture::<SourceAuthorizationSubjectKind>(value)?,
20281 "source_authorization_subject" => assert_fixture::<SourceAuthorizationSubject>(value)?,
20282 "delegated_query_source_subject" => assert_fixture::<DelegatedQuerySourceSubject>(value)?,
20283 "delegated_query_subject_claims" => assert_fixture::<DelegatedQuerySubjectClaims>(value)?,
20284 "signed_delegated_query_subject" => assert_fixture::<SignedDelegatedQuerySubject>(value)?,
20285 "source_authorization_principal_change" => assert_fixture::<SourceAuthorizationPrincipalChange>(value)?,
20286 "source_authorization_group_change" => assert_fixture::<SourceAuthorizationGroupChange>(value)?,
20287 "source_authorization_membership_replacement" => {
20288 assert_fixture::<SourceAuthorizationMembershipReplacement>(value)?
20289 }
20290 "source_authorization_document_acl_replacement" => {
20291 assert_fixture::<SourceAuthorizationDocumentAclReplacement>(value)?
20292 }
20293 "source_authorization_batch" => assert_fixture::<SourceAuthorizationBatch>(value)?,
20294 "source_authorization_applied_counts" => assert_fixture::<SourceAuthorizationAppliedCounts>(value)?,
20295 "source_authorization_receipt" => assert_fixture::<SourceAuthorizationReceipt>(value)?,
20296 "source_authorization_preparation" => assert_fixture::<SourceAuthorizationPreparation>(value)?,
20297 "source_authorization_resolution_state" => assert_fixture::<SourceAuthorizationResolutionState>(value)?,
20298 "source_authorization_resolution" => assert_fixture::<SourceAuthorizationResolution>(value)?,
20299 "security_action_outcome" => assert_fixture::<SecurityActionOutcome>(value)?,
20300 "maintenance_work_state" => assert_fixture::<MaintenanceWorkState>(value)?,
20301 "maintenance_attempt_state" => assert_fixture::<MaintenanceAttemptState>(value)?,
20302 "maintenance_failure_class" => assert_fixture::<MaintenanceFailureClass>(value)?,
20303 "maintenance_failure_class_count" => assert_fixture::<MaintenanceFailureClassCount>(value)?,
20304 "maintenance_attempt_observation" => assert_fixture::<MaintenanceAttemptObservation>(value)?,
20305 "maintenance_task_scope" => assert_fixture::<MaintenanceTaskScope>(value)?,
20306 "maintenance_task_status" => assert_fixture::<MaintenanceTaskStatus>(value)?,
20307 "maintenance_status_aggregate" => assert_fixture::<MaintenanceStatusAggregate>(value)?,
20308 "runtime_status_detail" => assert_fixture::<RuntimeStatusDetail>(value)?,
20309 "result_cache_status" => assert_fixture::<ResultCacheStatus>(value)?,
20310 "field_promotion_status" => assert_fixture::<FieldPromotionStatus>(value)?,
20311 "overload_shard_status" => assert_fixture::<OverloadShardStatus>(value)?,
20312 "external_key_binding" => assert_fixture::<ExternalKeyBinding>(value)?,
20313 "external_key_retirement_target" => assert_fixture::<ExternalKeyRetirementTarget>(value)?,
20314 "external_key_retirement_outcome" => assert_fixture::<ExternalKeyRetirementOutcome>(value)?,
20315 "external_key_retirement_receipt" => assert_fixture::<ExternalKeyRetirementReceipt>(value)?,
20316 "external_key_retirement_resolution_state" => {
20317 assert_fixture::<ExternalKeyRetirementResolutionState>(value)?
20318 }
20319 "rollup_measure" => assert_fixture::<RollupMeasure>(value)?,
20320 "aggregate_then_delete_policy" => assert_fixture::<AggregateThenDeletePolicy>(value)?,
20321 "lifecycle_binding_status" => assert_fixture::<LifecycleBindingStatus>(value)?,
20322 "lifecycle_rollup_status" => assert_fixture::<LifecycleRollupStatus>(value)?,
20323 "lifecycle_status" => assert_fixture::<LifecycleStatus>(value)?,
20324 "quota_limit" => assert_fixture::<QuotaLimit>(value)?,
20325 "quota_consumption" => assert_fixture::<QuotaConsumption>(value)?,
20326 "quota_update" => assert_fixture::<QuotaUpdate>(value)?,
20327 "storage_overall_posture" => assert_fixture::<StorageOverallPosture>(value)?,
20328 "storage_profile_role" => assert_fixture::<StorageProfileRole>(value)?,
20329 "storage_provider_posture" => assert_fixture::<StorageProviderPosture>(value)?,
20330 "storage_backend_service_class" => assert_fixture::<StorageBackendServiceClass>(value)?,
20331 "storage_profile_role_binding" => assert_fixture::<StorageProfileRoleBinding>(value)?,
20332 "storage_profile_attestation" => assert_fixture::<StorageProfileAttestation>(value)?,
20333 "storage_profile_expectation" => assert_fixture::<StorageProfileExpectation>(value)?,
20334 "core_binding" => assert_fixture::<CoreBinding>(value)?,
20335 "readiness_observation" => assert_fixture::<ReadinessObservation>(value)?,
20336 "usage_dimension" => assert_fixture::<UsageDimension>(value)?,
20337 "physical_usage_value" => assert_fixture::<PhysicalUsageValue>(value)?,
20338 "core_usage_units" => assert_fixture::<CoreUsageUnits>(value)?,
20339 "core_usage_correction" => assert_fixture::<CoreUsageCorrection>(value)?,
20340 "index_storage_usage" => assert_fixture::<IndexStorageUsage>(value)?,
20341 "collection_storage_usage" => assert_fixture::<CollectionStorageUsage>(value)?,
20342 "response_meta" => assert_fixture::<ResponseMeta>(value)?,
20343 "error_disposition" => assert_fixture::<ErrorDisposition>(value)?,
20344 "recovery_action" => assert_fixture::<RecoveryAction>(value)?,
20345 "limit_class" => assert_fixture::<LimitClass>(value)?,
20346 "error_detail" => assert_fixture::<ErrorDetail>(value)?,
20347 "connection_profile" => assert_fixture::<ConnectionProfile>(value)?,
20348 _ => return Err("fixture names an unknown generated type".into()),
20349 }
20350 }
20351 Ok(())
20352 }
20353 #[test]
20354 fn every_aggregation_variant_has_a_canonical_fixture() -> Result<(), Box<dyn std::error::Error>> {
20355 let document: serde_json::Value =
20356 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
20357 let fixtures = document["aggregation_variants"]
20358 .as_object()
20359 .ok_or("aggregation fixtures are not an object")?;
20360 assert_eq!(fixtures.len(), 17);
20361 for value in fixtures.values() {
20362 assert_fixture::<Aggregation>(value)?;
20363 }
20364 Ok(())
20365 }
20366 #[test]
20367 fn every_versioned_union_variant_has_a_canonical_fixture() -> Result<(), Box<dyn std::error::Error>> {
20368 let document: serde_json::Value =
20369 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
20370 let fixtures = document["versioned_union_variants"]
20371 .as_object()
20372 .ok_or("versioned union fixtures are not an object")?;
20373 assert_eq!(fixtures.len(), 6);
20374 for (name, value) in fixtures {
20375 match name.as_str() {
20376 "mapping_field_type.vector" => assert_fixture::<MappingFieldType>(value)?,
20377 "mapping_field_type.sparse_vector" => assert_fixture::<MappingFieldType>(value)?,
20378 "mapping_field_type.vector_set" => assert_fixture::<MappingFieldType>(value)?,
20379 "mapping_record_model.metric_v1" => assert_fixture::<MappingRecordModel>(value)?,
20380 "mapping_record_model.relationship_v1" => assert_fixture::<MappingRecordModel>(value)?,
20381 "mapping_record_model.profile_v1" => assert_fixture::<MappingRecordModel>(value)?,
20382 _ => return Err("fixture names an unknown versioned union variant".into()),
20383 }
20384 }
20385 Ok(())
20386 }
20387 #[test]
20388 fn exact_scalar_canonicality_is_closed() {
20389 assert_eq!(
20390 U64 {
20391 value: u64::MAX.to_string()
20392 }
20393 .validate(),
20394 Ok(())
20395 );
20396 assert_eq!(
20397 I64 {
20398 value: i64::MIN.to_string()
20399 }
20400 .validate(),
20401 Ok(())
20402 );
20403 assert_eq!(U64 { value: "01".to_owned() }.validate(), Err(ScalarError::InvalidU64));
20404 assert_eq!(
20405 ExactDecimal {
20406 coefficient: "12345".to_owned(),
20407 scale: 2
20408 }
20409 .validate(),
20410 Ok(())
20411 );
20412 assert_eq!(
20413 ExactDecimal {
20414 coefficient: "123450".to_owned(),
20415 scale: 3
20416 }
20417 .validate(),
20418 Err(ScalarError::InvalidDecimal)
20419 );
20420 assert_eq!(
20421 ExactDecimal {
20422 coefficient: "1".to_owned(),
20423 scale: 1_025
20424 }
20425 .validate(),
20426 Err(ScalarError::InvalidDecimal)
20427 );
20428 }
20429 #[test]
20430 fn scalar_decoders_refuse_numbers_and_noncanonical_strings() {
20431 assert!(serde_json::from_str::<U64>("9007199254740993").is_err());
20432 assert!(serde_json::from_str::<U64>(r#""01""#).is_err());
20433 assert!(serde_json::from_str::<Identity>(r#""0123456789ABCDEF0123456789ABCDEF""#).is_err());
20434 assert!(serde_json::from_str::<Digest>(r#""0123456789abcdef0123456789abcdef""#).is_err());
20435 assert!(serde_json::from_str::<ExactDecimal>(r#"{"coefficient":"123450","scale":3}"#).is_err());
20436 assert!(serde_json::from_str::<ApproximateNumber>(r#""1.0""#).is_err());
20437 }
20438 #[test]
20439 fn semantic_json_rejects_duplicate_fields() {
20440 let value = JsonValue::Object(vec![
20441 JsonField {
20442 name: "x".to_owned(),
20443 value: JsonValue::Null,
20444 },
20445 JsonField {
20446 name: "x".to_owned(),
20447 value: JsonValue::Bool(true),
20448 },
20449 ]);
20450 assert_eq!(validate_semantic_json(&value), Err(JsonError::DuplicateObjectField));
20451 }
20452 #[test]
20453 fn strict_generated_shapes_refuse_malformed_duplicate_unknown_field_and_tag() {
20454 assert!(serde_json::from_str::<DiscoverRequest>(r#"{"unexpected":true}"#).is_err());
20455 assert!(serde_json::from_str::<Cursor>(r#"{"value":"a","value":"b"}"#).is_err());
20456 assert!(serde_json::from_str::<Query>(r#"{"kind":"future_query"}"#).is_err());
20457 assert!(serde_json::from_str::<Cursor>(r#"{"value":1}"#).is_err());
20458 }
20459 fn admitted_error_detail(code: ErrorCode) -> ErrorDetail {
20460 match code {
20461 ErrorCode::Aborted => ErrorDetail::Aborted {
20462 reason: "test".to_owned(),
20463 },
20464 ErrorCode::DeadlineExceeded => ErrorDetail::DeadlineExceeded,
20465 ErrorCode::InvalidRequest => ErrorDetail::InvalidRequest {
20466 field: None,
20467 reason: "test".to_owned(),
20468 },
20469 ErrorCode::UnsupportedVersion => ErrorDetail::UnsupportedVersion {
20470 observed: 1,
20471 maximum_supported: 1,
20472 },
20473 ErrorCode::Unauthenticated => ErrorDetail::Unauthenticated,
20474 ErrorCode::PermissionDenied => ErrorDetail::PermissionDenied {
20475 action: None,
20476 workload_class: None,
20477 },
20478 ErrorCode::NotFound => ErrorDetail::NotFound { resource: None },
20479 ErrorCode::Conflict => ErrorDetail::Conflict {
20480 expected_revision: None,
20481 observed_revision: None,
20482 },
20483 ErrorCode::StaleCursor => ErrorDetail::StaleCursor { restart_count: 0 },
20484 ErrorCode::RestartBudgetExhausted => ErrorDetail::RestartBudgetExhausted { maximum_restarts: 0 },
20485 ErrorCode::LimitExceeded => ErrorDetail::LimitExceeded {
20486 class: LimitClass::RequestBound,
20487 limit_id: "test".to_owned(),
20488 maximum: U64 { value: "0".to_owned() },
20489 },
20490 ErrorCode::CapabilityUnavailable => ErrorDetail::CapabilityUnavailable { capability: None },
20491 ErrorCode::NotSubmitted => ErrorDetail::NotSubmitted {
20492 retry_after_millis: None,
20493 },
20494 ErrorCode::SubmittedIndeterminate => ErrorDetail::SubmittedIndeterminate { locator: None },
20495 ErrorCode::ExpiredUnknown => ErrorDetail::ExpiredUnknown { locator: None },
20496 ErrorCode::SecretNotEscrowed => ErrorDetail::SecretNotEscrowed,
20497 ErrorCode::RetentionGap => ErrorDetail::RetentionGap {
20498 retired_through: U64 { value: "0".to_owned() },
20499 },
20500 ErrorCode::ArtifactRangeInvalid => ErrorDetail::ArtifactRangeInvalid {
20501 maximum_bytes: U64 { value: "0".to_owned() },
20502 },
20503 ErrorCode::ChecksumMismatch => ErrorDetail::ChecksumMismatch {
20504 expected: Digest { value: "0".repeat(64) },
20505 observed: Digest { value: "0".repeat(64) },
20506 },
20507 ErrorCode::TemporarilyUnavailable => ErrorDetail::TemporarilyUnavailable {
20508 retry_after_millis: None,
20509 },
20510 ErrorCode::Internal => ErrorDetail::Internal,
20511 }
20512 }
20513 #[test]
20514 fn every_admitted_error_outcome_is_constructible_and_invalid_combinations_fail_closed() {
20515 let mut codes = std::collections::BTreeSet::new();
20516 for contract in LODESTONE_API_ERROR_OUTCOMES {
20517 codes.insert(format!("{:?}", contract.code));
20518 assert_eq!(
20519 ErrorBody::try_new(
20520 contract.code,
20521 "test".to_owned(),
20522 contract.disposition,
20523 contract.recovery,
20524 admitted_error_detail(contract.code)
20525 ),
20526 Ok(ErrorBody {
20527 code: contract.code,
20528 message: "test".to_owned(),
20529 disposition: contract.disposition,
20530 recovery: contract.recovery,
20531 details: admitted_error_detail(contract.code)
20532 })
20533 );
20534 }
20535 assert_eq!(codes.len(), 21);
20536 assert_eq!(
20537 ErrorBody::try_new(
20538 ErrorCode::Aborted,
20539 "test".to_owned(),
20540 ErrorDisposition::NotSubmitted,
20541 RecoveryAction::Stop,
20542 admitted_error_detail(ErrorCode::Aborted)
20543 ),
20544 Err(ErrorShapeError::OutcomeMismatch)
20545 );
20546 assert_eq!(
20547 ErrorBody::try_new(
20548 ErrorCode::Aborted,
20549 "test".to_owned(),
20550 ErrorDisposition::NotSubmitted,
20551 RecoveryAction::Retry,
20552 ErrorDetail::Internal
20553 ),
20554 Err(ErrorShapeError::DetailCodeMismatch)
20555 );
20556 assert_eq!(
20557 ErrorBody::try_new(
20558 ErrorCode::TemporarilyUnavailable,
20559 "test".to_owned(),
20560 ErrorDisposition::NotSubmitted,
20561 RecoveryAction::RetryAfter,
20562 ErrorDetail::TemporarilyUnavailable {
20563 retry_after_millis: Some(U64 {
20564 value: "60001".to_owned()
20565 })
20566 }
20567 ),
20568 Err(ErrorShapeError::RetryAfterOutOfRange)
20569 );
20570 }
20571 #[test]
20572 fn registries_match_the_idl() {
20573 assert_eq!(LODESTONE_API_COMMAND_CONTRACTS.len(), 149);
20574 assert_eq!(LODESTONE_API_COMMAND_SEMANTICS.len(), 149);
20575 assert_eq!(LODESTONE_API_COMMAND_OUTCOMES.len(), 149);
20576 assert_eq!(LODESTONE_API_ERROR_CODES.len(), 21);
20577 assert_eq!(LODESTONE_API_ERROR_OUTCOMES.len(), 28);
20578 assert_eq!(LODESTONE_API_TYPE_CONTRACTS.len(), 380);
20579 assert_eq!(LODESTONE_API_STREAM_CONTRACTS.len(), 1);
20580 assert_eq!(LODESTONE_API_LIMITS.len(), 123);
20581 assert_eq!(LODESTONE_API_CLUSTER_CONTROL_ACTIONS.len(), 24);
20582 assert_eq!(LODESTONE_API_CLUSTER_CONTROL_TYPES.len(), 12);
20583 }
20584 #[test]
20585 fn mutation_outcome_metadata_matches_submission_boundaries() {
20586 for (command, outcome) in LODESTONE_API_COMMAND_CONTRACTS
20587 .iter()
20588 .zip(LODESTONE_API_COMMAND_OUTCOMES)
20589 {
20590 assert_eq!(command.command, outcome.command);
20591 let submits = !matches!(command.mutation, "read_only" | "read_only_prepare" | "catalog_prepare");
20592 assert_eq!(outcome.possible_submission_states.contains(&"submitted"), submits);
20593 assert_eq!(outcome.possible_submission_states.contains(&"indeterminate"), submits);
20594 assert_eq!(
20595 outcome.cancellation == "per_call_until_submission_then_resolve",
20596 submits
20597 );
20598 }
20599 for command in [
20600 Command::ReserveServiceCredential,
20601 Command::ReserveServiceCredentialRotation,
20602 ] {
20603 let outcome = LODESTONE_API_COMMAND_OUTCOMES
20604 .iter()
20605 .find(|outcome| outcome.command == command);
20606 assert!(
20607 matches!(outcome, Some(value) if value.identity_requirement == "caller_action_id" && value.resolver_command == Some(Command::ResolveServiceCredentialReservation))
20608 );
20609 }
20610 }
20611}