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 = "506e5e96a50230062ac3e1861908f15baf406b664a84f3103943848ff6aa9907";
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 = 2;
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 #[serde(default, skip_serializing_if = "Option::is_none")]
1683 pub pending_archive_restore: Option<IndexReference>,
1684}
1685
1686pub const LODESTONE_API_COMPONENT_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1687#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1688#[serde(deny_unknown_fields)]
1689pub struct ComponentTemplateSummary {
1690 pub name: String,
1691 pub incarnation: Identity,
1692 pub revision: U64,
1693}
1694
1695pub const LODESTONE_API_COMPONENT_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1696#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1697#[serde(deny_unknown_fields)]
1698pub struct ComponentTemplateDetail {
1699 pub summary: ComponentTemplateSummary,
1700 pub mapping: Mapping,
1701 pub settings: RawJson,
1702 #[serde(default, skip_serializing_if = "Option::is_none")]
1703 pub resource_spec: Option<IndexResourceSpec>,
1704}
1705
1706pub const LODESTONE_API_INDEX_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1707#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1708#[serde(deny_unknown_fields)]
1709pub struct IndexTemplateSummary {
1710 pub name: String,
1711 pub incarnation: Identity,
1712 pub revision: U64,
1713 pub priority: i32,
1714 pub data_stream: bool,
1715}
1716
1717pub const LODESTONE_API_INDEX_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1718#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1719#[serde(deny_unknown_fields)]
1720pub struct IndexTemplateDetail {
1721 pub summary: IndexTemplateSummary,
1722 pub index_patterns: Vec<String>,
1723 pub components: Vec<ComponentTemplateBinding>,
1724 pub mapping: Mapping,
1725 pub settings: RawJson,
1726 #[serde(default, skip_serializing_if = "Option::is_none")]
1727 pub resource_spec: Option<IndexResourceSpec>,
1728}
1729
1730pub const LODESTONE_API_INGEST_PIPELINE_SUMMARY_FORMAT_VERSION: u16 = 1;
1731#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1732#[serde(deny_unknown_fields)]
1733pub struct IngestPipelineSummary {
1734 pub name: String,
1735 pub incarnation: Identity,
1736 pub revision: U64,
1737 pub digest: Digest,
1738}
1739
1740pub const LODESTONE_API_INGEST_PIPELINE_DETAIL_FORMAT_VERSION: u16 = 1;
1741#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1742#[serde(deny_unknown_fields)]
1743pub struct IngestPipelineDetail {
1744 pub summary: IngestPipelineSummary,
1745 pub definition: RawJson,
1746}
1747
1748pub const LODESTONE_API_INGEST_PIPELINE_SELECTION_FORMAT_VERSION: u16 = 1;
1749#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1750#[serde(deny_unknown_fields)]
1751pub struct IngestPipelineSelection {
1752 pub name: String,
1753 pub expected: ExpectedBinding,
1754}
1755
1756pub const LODESTONE_API_LIFECYCLE_POLICY_SUMMARY_FORMAT_VERSION: u16 = 1;
1757#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1758#[serde(deny_unknown_fields)]
1759pub struct LifecyclePolicySummary {
1760 pub name: String,
1761 pub incarnation: Identity,
1762 pub revision: U64,
1763}
1764
1765pub const LODESTONE_API_ROLLOVER_THRESHOLDS_FORMAT_VERSION: u16 = 1;
1766#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1767#[serde(deny_unknown_fields)]
1768pub struct RolloverThresholds {
1769 #[serde(default, skip_serializing_if = "Option::is_none")]
1770 pub max_primary_docs: Option<U64>,
1771 #[serde(default, skip_serializing_if = "Option::is_none")]
1772 pub max_primary_bytes: Option<U64>,
1773 #[serde(default, skip_serializing_if = "Option::is_none")]
1774 pub max_age_millis: Option<U64>,
1775}
1776
1777pub const LODESTONE_API_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1778#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1779#[serde(deny_unknown_fields)]
1780pub struct RetentionPolicy {
1781 #[serde(default, skip_serializing_if = "Option::is_none")]
1782 pub document_max_age_millis: Option<U64>,
1783 #[serde(default, skip_serializing_if = "Option::is_none")]
1784 pub backing_index_max_age_millis: Option<U64>,
1785}
1786
1787pub const LODESTONE_API_LIFECYCLE_POLICY_DETAIL_FORMAT_VERSION: u16 = 2;
1788#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1789#[serde(deny_unknown_fields)]
1790pub struct LifecyclePolicyDetail {
1791 pub summary: LifecyclePolicySummary,
1792 pub rollover: RolloverThresholds,
1793 pub retention: RetentionPolicy,
1794 pub merge_hint: bool,
1795 pub freeze_hint: bool,
1796 #[serde(default, skip_serializing_if = "Option::is_none")]
1797 pub archive_after_millis: Option<U64>,
1798 pub delete_expired: bool,
1799}
1800
1801pub const LODESTONE_API_TEXT_QUERY_OPERATOR_FORMAT_VERSION: u16 = 1;
1802#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1803#[serde(rename_all = "snake_case")]
1804pub enum TextQueryOperator {
1805 Or,
1806 And,
1807}
1808
1809pub const LODESTONE_API_TEXT_QUERY_ANALYZER_FORMAT_VERSION: u16 = 1;
1810#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1811#[serde(rename_all = "snake_case")]
1812pub enum TextQueryAnalyzer {
1813 Mapping,
1814 Standard,
1815 Simple,
1816 Whitespace,
1817 Keyword,
1818}
1819
1820pub const LODESTONE_API_ZERO_TERMS_QUERY_FORMAT_VERSION: u16 = 1;
1821#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1822#[serde(rename_all = "snake_case")]
1823pub enum ZeroTermsQuery {
1824 None,
1825 All,
1826}
1827
1828pub const LODESTONE_API_TEXT_QUERY_OPTIONS_FORMAT_VERSION: u16 = 1;
1829#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1830#[serde(deny_unknown_fields)]
1831pub struct TextQueryOptions {
1832 pub operator: TextQueryOperator,
1833 #[serde(default, skip_serializing_if = "Option::is_none")]
1834 pub minimum_should_match: Option<u32>,
1835 pub analyzer: TextQueryAnalyzer,
1836 pub zero_terms_query: ZeroTermsQuery,
1837}
1838
1839pub const LODESTONE_API_MULTI_MATCH_MODE_FORMAT_VERSION: u16 = 1;
1840#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1841#[serde(rename_all = "snake_case")]
1842pub enum MultiMatchMode {
1843 BestFields,
1844 MostFields,
1845 Phrase,
1846 PhrasePrefix,
1847 CrossFields,
1848}
1849
1850pub const LODESTONE_API_MULTI_MATCH_FIELD_FORMAT_VERSION: u16 = 1;
1851#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1852#[serde(deny_unknown_fields)]
1853pub struct MultiMatchField {
1854 pub field: String,
1855 pub boost: ApproximateNumber,
1856}
1857
1858pub const LODESTONE_API_MULTI_MATCH_OPTIONS_FORMAT_VERSION: u16 = 1;
1859#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1860#[serde(deny_unknown_fields)]
1861pub struct MultiMatchOptions {
1862 pub mode: MultiMatchMode,
1863 pub operator: TextQueryOperator,
1864 #[serde(default, skip_serializing_if = "Option::is_none")]
1865 pub minimum_should_match: Option<u32>,
1866 pub analyzer: TextQueryAnalyzer,
1867 pub zero_terms_query: ZeroTermsQuery,
1868 pub slop: u32,
1869}
1870
1871pub const LODESTONE_API_SORT_ORDER_FORMAT_VERSION: u16 = 1;
1872#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1873#[serde(rename_all = "snake_case")]
1874pub enum SortOrder {
1875 Asc,
1876 Desc,
1877}
1878
1879pub const LODESTONE_API_SORT_MODE_FORMAT_VERSION: u16 = 1;
1880#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1881#[serde(rename_all = "snake_case")]
1882pub enum SortMode {
1883 Auto,
1884 Min,
1885 Max,
1886}
1887
1888pub const LODESTONE_API_MISSING_ORDER_FORMAT_VERSION: u16 = 1;
1889#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1890#[serde(rename_all = "snake_case")]
1891pub enum MissingOrder {
1892 First,
1893 Last,
1894}
1895
1896pub const LODESTONE_API_NESTED_SCORE_MODE_FORMAT_VERSION: u16 = 1;
1897#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1898#[serde(rename_all = "snake_case")]
1899pub enum NestedScoreMode {
1900 Avg,
1901 Max,
1902 Min,
1903 None,
1904 Sum,
1905}
1906
1907pub const LODESTONE_API_NESTED_INNER_HITS_FORMAT_VERSION: u16 = 1;
1908#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1909#[serde(deny_unknown_fields)]
1910pub struct NestedInnerHits {
1911 #[serde(default, skip_serializing_if = "Option::is_none")]
1912 pub name: Option<String>,
1913 pub from: u32,
1914 pub size: u32,
1915 pub sort: Vec<SortSpec>,
1916}
1917
1918pub const LODESTONE_API_SORT_SPEC_FORMAT_VERSION: u16 = 1;
1919#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1920#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1921pub enum SortSpec {
1922 Score {
1923 order: SortOrder,
1924 },
1925 Field {
1926 field: String,
1927 order: SortOrder,
1928 #[serde(default, skip_serializing_if = "Option::is_none")]
1929 missing: Option<MissingOrder>,
1930 mode: SortMode,
1931 },
1932 NestedField {
1933 path: String,
1934 field: String,
1935 #[serde(default, skip_serializing_if = "Option::is_none")]
1936 filter: Option<Box<Query>>,
1937 order: SortOrder,
1938 #[serde(default, skip_serializing_if = "Option::is_none")]
1939 missing: Option<MissingOrder>,
1940 mode: SortMode,
1941 },
1942}
1943
1944pub const LODESTONE_API_QUERY_FORMAT_VERSION: u16 = 1;
1945#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1946#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1947pub enum Query {
1948 MatchAll,
1949 Term {
1950 field: String,
1951 value: JsonValue,
1952 },
1953 Terms {
1954 field: String,
1955 values: Vec<JsonValue>,
1956 },
1957 Range {
1958 field: String,
1959 #[serde(default, skip_serializing_if = "Option::is_none")]
1960 lower: Option<JsonValue>,
1961 #[serde(default, skip_serializing_if = "Option::is_none")]
1962 upper: Option<JsonValue>,
1963 include_lower: bool,
1964 include_upper: bool,
1965 },
1966 Text {
1967 field: String,
1968 text: String,
1969 #[serde(default, skip_serializing_if = "Option::is_none")]
1970 options: Option<TextQueryOptions>,
1971 },
1972 MultiMatch {
1973 fields: Vec<MultiMatchField>,
1974 text: String,
1975 #[serde(default, skip_serializing_if = "Option::is_none")]
1976 options: Option<MultiMatchOptions>,
1977 },
1978 Exists {
1979 field: String,
1980 },
1981 Prefix {
1982 field: String,
1983 prefix: String,
1984 #[serde(default, skip_serializing_if = "Option::is_none")]
1985 analyzer: Option<TextQueryAnalyzer>,
1986 analyze_wildcard: bool,
1987 },
1988 Fuzzy {
1989 field: String,
1990 value: String,
1991 distance: u32,
1992 #[serde(default, skip_serializing_if = "Option::is_none")]
1993 analyzer: Option<TextQueryAnalyzer>,
1994 },
1995 Boost {
1996 query: Box<Query>,
1997 boost: ApproximateNumber,
1998 },
1999 Bool {
2000 must: Vec<Query>,
2001 filter: Vec<Query>,
2002 should: Vec<Query>,
2003 must_not: Vec<Query>,
2004 minimum_should_match: u32,
2005 },
2006 Nested {
2007 path: String,
2008 query: Box<Query>,
2009 score_mode: NestedScoreMode,
2010 ignore_unmapped: bool,
2011 #[serde(default, skip_serializing_if = "Option::is_none")]
2012 inner_hits: Option<NestedInnerHits>,
2013 },
2014}
2015
2016pub const LODESTONE_API_DENSE_RETRIEVAL_MODE_FORMAT_VERSION: u16 = 1;
2017#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2018#[serde(rename_all = "snake_case")]
2019pub enum DenseRetrievalMode {
2020 Auto,
2021 Ann,
2022 Exact,
2023}
2024
2025pub const LODESTONE_API_VECTOR_ACHIEVED_MODE_FORMAT_VERSION: u16 = 1;
2026#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2027#[serde(rename_all = "snake_case")]
2028pub enum VectorAchievedMode {
2029 Exact,
2030 Ann,
2031 Mixed,
2032}
2033
2034pub const LODESTONE_API_VECTOR_BRANCH_DIAGNOSTICS_FORMAT_VERSION: u16 = 2;
2035#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2036#[serde(deny_unknown_fields)]
2037pub struct VectorBranchDiagnostics {
2038 pub name: String,
2039 pub requested_mode: DenseRetrievalMode,
2040 pub achieved_mode: VectorAchievedMode,
2041 pub result_count: U64,
2042 pub exact_segments: U64,
2043 pub ann_segments: U64,
2044 pub exact_fallback_segments: U64,
2045 pub distance_evaluations: U64,
2046 pub peak_scratch_bytes: U64,
2047 pub fresh_vectors_scanned: U64,
2048 pub realtime_overlay_queries: U64,
2049 pub realtime_overlay_candidates: U64,
2050 pub bundle_roots: U64,
2051 pub object_read_requests: U64,
2052 pub object_bytes_read: U64,
2053 pub cache_hits: U64,
2054 pub cache_misses: U64,
2055 pub snapshot_digests: Vec<Digest>,
2056}
2057
2058pub const LODESTONE_API_DENSE_VECTOR_ELEMENT_TYPE_FORMAT_VERSION: u16 = 1;
2059#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2060#[serde(rename_all = "snake_case")]
2061pub enum DenseVectorElementType {
2062 F32,
2063 F16,
2064 I8,
2065}
2066
2067pub const LODESTONE_API_DENSE_VECTOR_BYTE_ORDER_FORMAT_VERSION: u16 = 1;
2068#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2069#[serde(rename_all = "snake_case")]
2070pub enum DenseVectorByteOrder {
2071 LittleEndian,
2072}
2073
2074pub const LODESTONE_API_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
2075#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2076#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2077pub enum VectorValue {
2078 Numeric {
2079 values: Vec<ApproximateNumber>,
2080 },
2081 Binary {
2082 element_type: DenseVectorElementType,
2083 byte_order: DenseVectorByteOrder,
2084 data_base64: String,
2085 #[serde(default, skip_serializing_if = "Option::is_none")]
2086 quantization_scale: Option<ApproximateNumber>,
2087 },
2088}
2089
2090pub const LODESTONE_API_SPARSE_VECTOR_ENTRY_FORMAT_VERSION: u16 = 1;
2091#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2092#[serde(deny_unknown_fields)]
2093pub struct SparseVectorEntry {
2094 pub dimension: u32,
2095 pub weight: ApproximateNumber,
2096}
2097
2098pub const LODESTONE_API_SPARSE_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
2099#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2100#[serde(deny_unknown_fields)]
2101pub struct SparseVectorValue {
2102 pub entries: Vec<SparseVectorEntry>,
2103}
2104
2105pub const LODESTONE_API_VECTOR_SET_VALUE_FORMAT_VERSION: u16 = 1;
2106#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2107#[serde(deny_unknown_fields)]
2108pub struct VectorSetValue {
2109 pub vectors: Vec<VectorValue>,
2110}
2111
2112pub const LODESTONE_API_VECTOR_EVALUATION_SNAPSHOT_FORMAT_VERSION: u16 = 1;
2113#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2114#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2115pub enum VectorEvaluationSnapshot {
2116 CommittedCut { digest: Digest },
2117 Pit { pit: Cursor },
2118}
2119
2120pub const LODESTONE_API_VECTOR_EVALUATION_QUERY_SET_FORMAT_VERSION: u16 = 1;
2121#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2122#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2123pub enum VectorEvaluationQuerySet {
2124 Sample { seed: U64, sample_count: u32 },
2125 Supplied { digest: Digest, queries: Vec<VectorValue> },
2126}
2127
2128pub const LODESTONE_API_VECTOR_EVALUATION_BUDGET_FORMAT_VERSION: u16 = 1;
2129#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2130#[serde(deny_unknown_fields)]
2131pub struct VectorEvaluationBudget {
2132 pub maximum_distance_evaluations: U64,
2133 pub maximum_elapsed_work_units: U64,
2134 pub maximum_peak_memory_bytes: U64,
2135 pub maximum_object_reads: U64,
2136 pub maximum_object_bytes: U64,
2137 pub maximum_build_scratch_bytes: U64,
2138 pub maximum_profile_comparisons: u32,
2139}
2140
2141pub const LODESTONE_API_VECTOR_CANDIDATE_POLICY_FORMAT_VERSION: u16 = 1;
2142#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2143#[serde(rename_all = "snake_case")]
2144pub enum VectorCandidatePolicy {
2145 Balanced,
2146 HighRecall,
2147 MemoryEfficient,
2148}
2149
2150pub const LODESTONE_API_VECTOR_CALIBRATION_OBJECTIVE_FORMAT_VERSION: u16 = 1;
2151#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2152#[serde(rename_all = "snake_case")]
2153pub enum VectorCalibrationObjective {
2154 Balanced,
2155 HighRecall,
2156 MemoryEfficient,
2157}
2158
2159pub const LODESTONE_API_VECTOR_STRATEGY_PROFILE_FORMAT_VERSION: u16 = 1;
2160#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2161#[serde(rename_all = "snake_case")]
2162pub enum VectorStrategyProfile {
2163 BalancedV1,
2164 HighRecallV1,
2165 MemoryEfficientV1,
2166}
2167
2168pub const LODESTONE_API_VECTOR_EVALUATION_WORK_FORMAT_VERSION: u16 = 1;
2169#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2170#[serde(deny_unknown_fields)]
2171pub struct VectorEvaluationWork {
2172 pub distance_evaluations: U64,
2173 pub elapsed_work_units: U64,
2174 pub peak_memory_bytes: U64,
2175 pub object_reads: U64,
2176 pub object_bytes: U64,
2177}
2178
2179pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_CODE_FORMAT_VERSION: u16 = 1;
2180#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2181#[serde(rename_all = "snake_case")]
2182pub enum VectorEvaluationErrorCode {
2183 AnnRefused,
2184 ExhaustiveRefused,
2185 TimedOut,
2186 Cancelled,
2187 Internal,
2188}
2189
2190pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_FORMAT_VERSION: u16 = 1;
2191#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2192#[serde(deny_unknown_fields)]
2193pub struct VectorEvaluationError {
2194 pub sample_ordinal: u32,
2195 pub code: VectorEvaluationErrorCode,
2196}
2197
2198pub const LODESTONE_API_VECTOR_RECALL_RESULT_SHAPE_VERSION: u16 = 1;
2199pub const LODESTONE_API_VECTOR_RECALL_RESULT_FORMAT_VERSION: u16 = 1;
2200#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2201#[serde(deny_unknown_fields)]
2202pub struct VectorRecallResult {
2203 pub format_version: u32,
2204 pub index: Resource,
2205 pub field: String,
2206 pub mapping_generation: U64,
2207 pub snapshot_digest: Digest,
2208 pub query_set_digest: Digest,
2209 pub metric: VectorMetric,
2210 pub k: u32,
2211 pub candidate_policy: VectorCandidatePolicy,
2212 pub strategy_identity: String,
2213 pub completed_samples: u32,
2214 pub ann_result_count: U64,
2215 pub exhaustive_result_count: U64,
2216 pub mean_recall_basis_points: u32,
2217 pub minimum_recall_basis_points: u32,
2218 pub p05_recall_basis_points: u32,
2219 pub p50_recall_basis_points: u32,
2220 pub p90_recall_basis_points: u32,
2221 pub p99_recall_basis_points: u32,
2222 pub ann_work: VectorEvaluationWork,
2223 pub exhaustive_work: VectorEvaluationWork,
2224 pub errors: Vec<VectorEvaluationError>,
2225}
2226
2227pub const LODESTONE_API_VECTOR_CALIBRATION_CANDIDATE_FORMAT_VERSION: u16 = 1;
2228#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2229#[serde(deny_unknown_fields)]
2230pub struct VectorCalibrationCandidate {
2231 pub profile: VectorStrategyProfile,
2232 pub recall: VectorRecallResult,
2233 pub build_scratch_bytes: U64,
2234 pub resident_bytes: U64,
2235 pub evidence_digest: Digest,
2236}
2237
2238pub const LODESTONE_API_VECTOR_CALIBRATION_RESULT_SHAPE_VERSION: u16 = 1;
2239pub const LODESTONE_API_VECTOR_CALIBRATION_RESULT_FORMAT_VERSION: u16 = 1;
2240#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2241#[serde(deny_unknown_fields)]
2242pub struct VectorCalibrationResult {
2243 pub format_version: u32,
2244 pub objective: VectorCalibrationObjective,
2245 pub candidates: Vec<VectorCalibrationCandidate>,
2246 pub recommended_profile: VectorStrategyProfile,
2247 pub recommended_evidence_digest: Digest,
2248 pub requires_explicit_resource_revision_and_rebuild: bool,
2249}
2250
2251pub const LODESTONE_API_VECTOR_DIAGNOSTIC_RESULT_FORMAT_VERSION: u16 = 1;
2252#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2253#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2254pub enum VectorDiagnosticResult {
2255 Recall { result: Box<VectorRecallResult> },
2256 Calibration { result: Box<VectorCalibrationResult> },
2257}
2258
2259pub const LODESTONE_API_VECTOR_WARM_COMPONENT_FORMAT_VERSION: u16 = 1;
2260#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2261#[serde(rename_all = "snake_case")]
2262pub enum VectorWarmComponent {
2263 Directory,
2264 Approximate,
2265 Exact,
2266}
2267
2268pub const LODESTONE_API_VECTOR_WARM_STATE_FORMAT_VERSION: u16 = 1;
2269#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2270#[serde(rename_all = "snake_case")]
2271pub enum VectorWarmState {
2272 Warmed,
2273 Partial,
2274 Stale,
2275}
2276
2277pub const LODESTONE_API_VECTOR_WARM_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
2278#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2279#[serde(deny_unknown_fields)]
2280pub struct VectorWarmAchievement {
2281 pub component: VectorWarmComponent,
2282 pub cache_identity: Digest,
2283 pub resident_bytes: U64,
2284}
2285
2286pub const LODESTONE_API_VECTOR_WARM_RESULT_SHAPE_VERSION: u16 = 1;
2287pub const LODESTONE_API_VECTOR_WARM_RESULT_FORMAT_VERSION: u16 = 1;
2288#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2289#[serde(deny_unknown_fields)]
2290pub struct VectorWarmResult {
2291 pub format_version: u32,
2292 pub operation_identity: Digest,
2293 pub index: Resource,
2294 pub root_digest: Digest,
2295 pub state: VectorWarmState,
2296 pub progress: ExactDecimal,
2297 pub achieved: Vec<VectorWarmAchievement>,
2298 pub object_requests: U64,
2299 pub object_bytes: U64,
2300 pub cache_hits: U64,
2301 pub cache_misses: U64,
2302 pub started_at: U64,
2303 pub completed_at: U64,
2304 pub expires_at: U64,
2305 #[serde(default, skip_serializing_if = "Option::is_none")]
2306 pub residency_intent: Option<VectorResidencyIntent>,
2307}
2308
2309pub const LODESTONE_API_DENSE_RETRIEVAL_THRESHOLD_FORMAT_VERSION: u16 = 1;
2310#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2311#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2312pub enum DenseRetrievalThreshold {
2313 MinimumScore { value: ApproximateNumber },
2314 MaximumDistance { value: ApproximateNumber },
2315}
2316
2317pub const LODESTONE_API_RETRIEVAL_BRANCH_FORMAT_VERSION: u16 = 3;
2318#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2319#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2320pub enum RetrievalBranch {
2321 Lexical {
2322 name: String,
2323 query: Box<Query>,
2324 #[serde(default, skip_serializing_if = "Option::is_none")]
2325 filter: Option<Box<Query>>,
2326 window: u32,
2327 weight: ApproximateNumber,
2328 },
2329 Dense {
2330 name: String,
2331 field: String,
2332 query_vector: VectorValue,
2333 #[serde(default, skip_serializing_if = "Option::is_none")]
2334 filter: Option<Box<Query>>,
2335 window: u32,
2336 #[serde(default, skip_serializing_if = "Option::is_none")]
2337 candidates: Option<u32>,
2338 weight: ApproximateNumber,
2339 mode: DenseRetrievalMode,
2340 #[serde(default, skip_serializing_if = "Option::is_none")]
2341 threshold: Option<DenseRetrievalThreshold>,
2342 },
2343 Sparse {
2344 name: String,
2345 field: String,
2346 query_vector: SparseVectorValue,
2347 #[serde(default, skip_serializing_if = "Option::is_none")]
2348 filter: Option<Box<Query>>,
2349 window: u32,
2350 weight: ApproximateNumber,
2351 },
2352 LateInteraction {
2353 name: String,
2354 field: String,
2355 query_vectors: VectorSetValue,
2356 #[serde(default, skip_serializing_if = "Option::is_none")]
2357 filter: Option<Box<Query>>,
2358 window: u32,
2359 candidates: u32,
2360 weight: ApproximateNumber,
2361 },
2362}
2363
2364pub const LODESTONE_API_WEIGHTED_RRF_FUSION_FORMAT_VERSION: u16 = 1;
2365#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2366#[serde(deny_unknown_fields)]
2367pub struct WeightedRrfFusion {
2368 pub rank_constant: u32,
2369}
2370
2371pub const LODESTONE_API_RETRIEVAL_PLAN_SHAPE_VERSION: u16 = 1;
2372pub const LODESTONE_API_RETRIEVAL_PLAN_FORMAT_VERSION: u16 = 1;
2373#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2374#[serde(deny_unknown_fields)]
2375pub struct RetrievalPlan {
2376 pub format_version: u32,
2377 #[serde(default, skip_serializing_if = "Option::is_none")]
2378 pub global_filter: Option<Box<Query>>,
2379 pub branches: Vec<RetrievalBranch>,
2380 pub fusion: WeightedRrfFusion,
2381 pub result_window: u32,
2382}
2383
2384pub const LODESTONE_API_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
2385#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2386#[serde(deny_unknown_fields)]
2387pub struct HistogramBounds {
2388 #[serde(default, skip_serializing_if = "Option::is_none")]
2389 pub min: Option<ApproximateNumber>,
2390 #[serde(default, skip_serializing_if = "Option::is_none")]
2391 pub max: Option<ApproximateNumber>,
2392}
2393
2394pub const LODESTONE_API_DATE_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
2395#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2396#[serde(deny_unknown_fields)]
2397pub struct DateHistogramBounds {
2398 #[serde(default, skip_serializing_if = "Option::is_none")]
2399 pub min: Option<I64>,
2400 #[serde(default, skip_serializing_if = "Option::is_none")]
2401 pub max: Option<I64>,
2402}
2403
2404pub const LODESTONE_API_APPROXIMATION_ALGORITHM_FORMAT_VERSION: u16 = 1;
2405#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2406#[serde(rename_all = "snake_case")]
2407pub enum ApproximationAlgorithm {
2408 HyperloglogV1,
2409 FloatPrefixHistogramV1,
2410}
2411
2412pub const LODESTONE_API_APPROXIMATION_FORMAT_VERSION: u16 = 1;
2413#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2414#[serde(deny_unknown_fields)]
2415pub struct Approximation {
2416 pub algorithm: ApproximationAlgorithm,
2417 pub algorithm_version: u32,
2418 pub precision: u32,
2419 pub state_bytes: U64,
2420 #[serde(default, skip_serializing_if = "Option::is_none")]
2421 pub relative_standard_error: Option<ApproximateNumber>,
2422 #[serde(default, skip_serializing_if = "Option::is_none")]
2423 pub maximum_rank_error: Option<ApproximateNumber>,
2424}
2425
2426pub const LODESTONE_API_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
2427#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2428#[serde(deny_unknown_fields)]
2429pub struct PercentileValue {
2430 pub percent: ApproximateNumber,
2431 #[serde(default, skip_serializing_if = "Option::is_none")]
2432 pub value: Option<ApproximateNumber>,
2433}
2434
2435pub const LODESTONE_API_APPROXIMATE_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
2436#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2437#[serde(deny_unknown_fields)]
2438pub struct ApproximatePercentileValue {
2439 pub percent: ApproximateNumber,
2440 pub value: ApproximateNumber,
2441 pub lower_bound: ApproximateNumber,
2442 pub upper_bound: ApproximateNumber,
2443 pub maximum_rank_error: ApproximateNumber,
2444}
2445
2446pub const LODESTONE_API_TIME_SERIES_OPERATOR_FORMAT_VERSION: u16 = 1;
2447#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2448#[serde(rename_all = "snake_case")]
2449pub enum TimeSeriesOperator {
2450 Raw,
2451 Sum,
2452 Count,
2453 Min,
2454 Max,
2455 Average,
2456 Delta,
2457 Increase,
2458 Rate,
2459 HistogramMerge,
2460 Quantiles,
2461}
2462
2463pub const LODESTONE_API_TIME_SERIES_MISSING_DATA_FORMAT_VERSION: u16 = 1;
2464#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2465#[serde(rename_all = "snake_case")]
2466pub enum TimeSeriesMissingData {
2467 Omit,
2468 ExplicitEmpty,
2469}
2470
2471pub const LODESTONE_API_TIME_SERIES_QUANTILE_MODE_FORMAT_VERSION: u16 = 1;
2472#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2473#[serde(rename_all = "snake_case")]
2474pub enum TimeSeriesQuantileMode {
2475 Exact,
2476 Approximate,
2477}
2478
2479pub const LODESTONE_API_TIME_SERIES_BUCKET_STATE_FORMAT_VERSION: u16 = 1;
2480#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2481#[serde(rename_all = "snake_case")]
2482pub enum TimeSeriesBucketState {
2483 Observed,
2484 ExplicitEmpty,
2485}
2486
2487pub const LODESTONE_API_TIME_SERIES_QUANTILE_VALUE_FORMAT_VERSION: u16 = 1;
2488#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2489#[serde(deny_unknown_fields)]
2490pub struct TimeSeriesQuantileValue {
2491 pub quantile: ApproximateNumber,
2492 #[serde(default, skip_serializing_if = "Option::is_none")]
2493 pub value: Option<MetricNumber>,
2494 #[serde(default, skip_serializing_if = "Option::is_none")]
2495 pub lower_bound: Option<MetricNumber>,
2496 #[serde(default, skip_serializing_if = "Option::is_none")]
2497 pub upper_bound: Option<MetricNumber>,
2498 #[serde(default, skip_serializing_if = "Option::is_none")]
2499 pub maximum_rank_error: Option<ApproximateNumber>,
2500}
2501
2502pub const LODESTONE_API_TIME_SERIES_VALUE_FORMAT_VERSION: u16 = 1;
2503#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2504#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2505pub enum TimeSeriesValue {
2506 Raw {
2507 values: Vec<MetricNumber>,
2508 },
2509 Number {
2510 value: MetricNumber,
2511 algorithm: String,
2512 },
2513 Count {
2514 value: U64,
2515 },
2516 ExplicitHistogram {
2517 count: U64,
2518 #[serde(default, skip_serializing_if = "Option::is_none")]
2519 sum: Option<MetricNumber>,
2520 bounds_f64_bits: Vec<U64>,
2521 bucket_counts: Vec<U64>,
2522 },
2523 ExponentialHistogram {
2524 count: U64,
2525 #[serde(default, skip_serializing_if = "Option::is_none")]
2526 sum: Option<MetricNumber>,
2527 scale: i32,
2528 zero_count: U64,
2529 positive: MetricExponentialBuckets,
2530 negative: MetricExponentialBuckets,
2531 },
2532 Quantiles {
2533 values: Vec<TimeSeriesQuantileValue>,
2534 exact: bool,
2535 algorithm: String,
2536 algorithm_version: u32,
2537 state_bytes: U64,
2538 },
2539}
2540
2541pub const LODESTONE_API_TIME_SERIES_BUCKET_FORMAT_VERSION: u16 = 1;
2542#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2543#[serde(deny_unknown_fields)]
2544pub struct TimeSeriesBucket {
2545 pub start_unix_nanos: U64,
2546 pub end_unix_nanos: U64,
2547 pub group: Vec<MetricAttribute>,
2548 pub state: TimeSeriesBucketState,
2549 pub reset: bool,
2550 #[serde(default, skip_serializing_if = "Option::is_none")]
2551 pub value: Option<TimeSeriesValue>,
2552 pub exemplars: Vec<MetricExemplar>,
2553}
2554
2555pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_DIRECTION_FORMAT_VERSION: u16 = 1;
2556#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2557#[serde(rename_all = "snake_case")]
2558pub enum RelationshipTraversalDirection {
2559 Inbound,
2560 Outbound,
2561 Both,
2562}
2563
2564pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_FILTER_FORMAT_VERSION: u16 = 1;
2565#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2566#[serde(deny_unknown_fields)]
2567pub struct RelationshipTraversalFilter {
2568 pub relationship_types: Vec<String>,
2569 pub assertion_classes: Vec<String>,
2570 pub provenance: Vec<String>,
2571 #[serde(default, skip_serializing_if = "Option::is_none")]
2572 pub valid_from_unix_nanos: Option<U64>,
2573 #[serde(default, skip_serializing_if = "Option::is_none")]
2574 pub valid_through_unix_nanos: Option<U64>,
2575}
2576
2577pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_BUDGET_FORMAT_VERSION: u16 = 1;
2578#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2579#[serde(deny_unknown_fields)]
2580pub struct RelationshipTraversalBudget {
2581 pub maximum_depth: u32,
2582 pub maximum_fan_out: u32,
2583 pub maximum_visited_entities: u32,
2584 pub maximum_visited_relationships: u32,
2585 pub maximum_returned_relationships: u32,
2586 pub maximum_memory_bytes: U64,
2587}
2588
2589pub const LODESTONE_API_TRAVERSED_RELATIONSHIP_FORMAT_VERSION: u16 = 1;
2590#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2591#[serde(deny_unknown_fields)]
2592pub struct TraversedRelationship {
2593 pub depth: u32,
2594 pub from: EntityRef,
2595 pub to: EntityRef,
2596 pub relationship: RelationshipRecord,
2597}
2598
2599pub const LODESTONE_API_PROFILE_QUERY_OPERATION_FORMAT_VERSION: u16 = 1;
2600#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2601#[serde(rename_all = "snake_case")]
2602pub enum ProfileQueryOperation {
2603 Flamegraph,
2604 TopStacks,
2605 TopFunctions,
2606 SampleTable,
2607}
2608
2609pub const LODESTONE_API_PROFILE_GROUP_BY_FORMAT_VERSION: u16 = 1;
2610#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2611#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2612pub enum ProfileGroupBy {
2613 ResourceAttribute { key: String },
2614 SampleLabel { key: String },
2615 BuildId,
2616 ModuleId,
2617}
2618
2619pub const LODESTONE_API_PROFILE_QUERY_FILTER_FORMAT_VERSION: u16 = 1;
2620#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2621#[serde(deny_unknown_fields)]
2622pub struct ProfileQueryFilter {
2623 pub profile_ids: Vec<String>,
2624 pub build_ids: Vec<String>,
2625 pub module_ids: Vec<String>,
2626 pub function_ids: Vec<String>,
2627 pub trace_ids: Vec<String>,
2628 pub span_ids: Vec<String>,
2629}
2630
2631pub const LODESTONE_API_PROFILE_QUERY_BUDGET_FORMAT_VERSION: u16 = 1;
2632#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2633#[serde(deny_unknown_fields)]
2634pub struct ProfileQueryBudget {
2635 pub maximum_batches: u32,
2636 pub maximum_samples: u32,
2637 pub maximum_results: u32,
2638 pub maximum_memory_bytes: U64,
2639}
2640
2641pub const LODESTONE_API_PROFILE_QUERY_ROW_FORMAT_VERSION: u16 = 1;
2642#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2643#[serde(deny_unknown_fields)]
2644pub struct ProfileQueryRow {
2645 pub key: String,
2646 pub stack: Vec<String>,
2647 pub value: MetricNumber,
2648 pub sample_count: U64,
2649}
2650
2651pub const LODESTONE_API_TEMPORAL_INPUT_FORMAT_VERSION: u16 = 1;
2652#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2653#[serde(deny_unknown_fields)]
2654pub struct TemporalInput {
2655 pub index: Resource,
2656 pub schema_generation: U64,
2657}
2658
2659pub const LODESTONE_API_TEMPORAL_PATTERN_FORMAT_VERSION: u16 = 1;
2660#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2661#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2662pub enum TemporalPattern {
2663 Event {
2664 node_id: String,
2665 query: Box<Query>,
2666 },
2667 Sequence {
2668 node_id: String,
2669 branches: Vec<TemporalPattern>,
2670 within_nanos: U64,
2671 },
2672 AllOf {
2673 node_id: String,
2674 branches: Vec<TemporalPattern>,
2675 within_nanos: U64,
2676 },
2677 AnyOf {
2678 node_id: String,
2679 branches: Vec<TemporalPattern>,
2680 },
2681 Count {
2682 node_id: String,
2683 pattern: Box<TemporalPattern>,
2684 minimum: u32,
2685 within_nanos: U64,
2686 },
2687 Repetition {
2688 node_id: String,
2689 pattern: Box<TemporalPattern>,
2690 count: u32,
2691 within_nanos: U64,
2692 },
2693 NotFollowedBy {
2694 node_id: String,
2695 anchor: Box<TemporalPattern>,
2696 forbidden: Box<TemporalPattern>,
2697 within_nanos: U64,
2698 },
2699}
2700
2701pub const LODESTONE_API_HISTORICAL_TEMPORAL_DEFINITION_SHAPE_VERSION: u16 = 1;
2702pub const LODESTONE_API_HISTORICAL_TEMPORAL_DEFINITION_FORMAT_VERSION: u16 = 1;
2703#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2704#[serde(deny_unknown_fields)]
2705pub struct HistoricalTemporalDefinition {
2706 pub format_version: u32,
2707 pub pattern_generation: U64,
2708 pub inputs: Vec<TemporalInput>,
2709 pub event_time_field: String,
2710 pub correlation_fields: Vec<String>,
2711 pub pattern: TemporalPattern,
2712 pub watermark_unix_nanos: U64,
2713 pub maximum_events: u32,
2714 pub maximum_states: u32,
2715 pub maximum_captured_events: u32,
2716 pub maximum_results: u32,
2717 pub maximum_state_bytes: U64,
2718}
2719
2720pub const LODESTONE_API_TEMPORAL_EVIDENCE_STATUS_FORMAT_VERSION: u16 = 2;
2721#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2722#[serde(rename_all = "snake_case")]
2723pub enum TemporalEvidenceStatus {
2724 Provisional,
2725 Final,
2726 Correction,
2727 Retraction,
2728}
2729
2730pub const LODESTONE_API_TEMPORAL_SOURCE_EVENT_FORMAT_VERSION: u16 = 1;
2731#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2732#[serde(deny_unknown_fields)]
2733pub struct TemporalSourceEvent {
2734 pub index: Resource,
2735 pub shard_id: u32,
2736 pub recovery_era: Identity,
2737 pub sequence: U64,
2738 pub document_id: String,
2739}
2740
2741pub const LODESTONE_API_TEMPORAL_EVIDENCE_FORMAT_VERSION: u16 = 2;
2742#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2743#[serde(deny_unknown_fields)]
2744pub struct TemporalEvidence {
2745 pub evidence_id: Digest,
2746 pub pattern_generation: U64,
2747 pub pattern_digest: Digest,
2748 pub correlation_key: Vec<JsonValue>,
2749 pub matched_node_id: String,
2750 pub interval_start_unix_nanos: U64,
2751 pub interval_end_unix_nanos: U64,
2752 pub watermark_unix_nanos: U64,
2753 pub source_events: Vec<TemporalSourceEvent>,
2754 pub input_cut_digest: Digest,
2755 pub status: TemporalEvidenceStatus,
2756 #[serde(default, skip_serializing_if = "Option::is_none")]
2757 pub predecessor_evidence_id: Option<Digest>,
2758}
2759
2760pub const LODESTONE_API_CONTINUOUS_TEMPORAL_START_FORMAT_VERSION: u16 = 1;
2761#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2762#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2763pub enum ContinuousTemporalStart {
2764 FromCurrentHeads,
2765 HistoricalThenFollow { pit: Cursor },
2766}
2767
2768pub const LODESTONE_API_CONTINUOUS_TEMPORAL_WATERMARK_POLICY_FORMAT_VERSION: u16 = 1;
2769#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2770#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2771pub enum ContinuousTemporalWatermarkPolicy {
2772 MaximumObservedMinusOutOfOrder {
2773 allowed_out_of_orderness_nanos: U64,
2774 },
2775 MappingBoundEvent {
2776 allowed_out_of_orderness_nanos: U64,
2777 predicate: Box<Query>,
2778 timestamp_field: String,
2779 },
2780}
2781
2782pub const LODESTONE_API_CONTINUOUS_TEMPORAL_LATE_DATA_POLICY_FORMAT_VERSION: u16 = 1;
2783#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2784#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2785pub enum ContinuousTemporalLateDataPolicy {
2786 RecomputeWithinHorizon { correction_horizon_nanos: U64 },
2787 PauseWithGap,
2788}
2789
2790pub const LODESTONE_API_CONTINUOUS_TEMPORAL_OUTPUT_FORMAT_VERSION: u16 = 1;
2791#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2792#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2793pub enum ContinuousTemporalOutput {
2794 InternalResults {
2795 maximum_retained_records: U64,
2796 maximum_retained_bytes: U64,
2797 maximum_retained_event_age_nanos: U64,
2798 },
2799 MaterializedIndex {
2800 index: Resource,
2801 schema_generation: U64,
2802 },
2803}
2804
2805pub const LODESTONE_API_CONTINUOUS_TEMPORAL_DEFINITION_SHAPE_VERSION: u16 = 1;
2806pub const LODESTONE_API_CONTINUOUS_TEMPORAL_DEFINITION_FORMAT_VERSION: u16 = 1;
2807#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2808#[serde(deny_unknown_fields)]
2809pub struct ContinuousTemporalDefinition {
2810 pub format_version: u32,
2811 pub evaluation_id: Identity,
2812 pub pattern_generation: U64,
2813 pub inputs: Vec<TemporalInput>,
2814 pub event_time_field: String,
2815 pub correlation_fields: Vec<String>,
2816 pub pattern: TemporalPattern,
2817 pub start: ContinuousTemporalStart,
2818 pub watermark_policy: ContinuousTemporalWatermarkPolicy,
2819 pub late_data_policy: ContinuousTemporalLateDataPolicy,
2820 pub maximum_events_per_step: u32,
2821 pub maximum_states: u32,
2822 pub maximum_captured_events: u32,
2823 pub maximum_results: u32,
2824 pub maximum_state_bytes: U64,
2825 pub maximum_lag_bytes: U64,
2826 pub maximum_lag_events: U64,
2827 pub maximum_lag_event_age_nanos: U64,
2828 pub output: ContinuousTemporalOutput,
2829}
2830
2831pub const LODESTONE_API_CONTINUOUS_TEMPORAL_FRONTIER_FORMAT_VERSION: u16 = 1;
2832#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2833#[serde(deny_unknown_fields)]
2834pub struct ContinuousTemporalFrontier {
2835 pub index: Resource,
2836 pub shard_id: u32,
2837 pub recovery_era: Identity,
2838 pub routing_revision: U64,
2839 pub registered_wal_frontier: U64,
2840 #[serde(default, skip_serializing_if = "Option::is_none")]
2841 pub watermark_unix_nanos: Option<U64>,
2842}
2843
2844pub const LODESTONE_API_CONTINUOUS_TEMPORAL_AVAILABLE_FRONTIER_FORMAT_VERSION: u16 = 1;
2845#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2846#[serde(deny_unknown_fields)]
2847pub struct ContinuousTemporalAvailableFrontier {
2848 pub index: Resource,
2849 pub shard_id: u32,
2850 pub sequence: U64,
2851}
2852
2853pub const LODESTONE_API_CONTINUOUS_TEMPORAL_GAP_REASON_FORMAT_VERSION: u16 = 1;
2854#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2855#[serde(rename_all = "snake_case")]
2856pub enum ContinuousTemporalGapReason {
2857 RetentionGap,
2858 LateDataGap,
2859 SchemaGap,
2860 RouteGap,
2861 OutputGap,
2862}
2863
2864pub const LODESTONE_API_CONTINUOUS_TEMPORAL_GAP_FORMAT_VERSION: u16 = 1;
2865#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2866#[serde(deny_unknown_fields)]
2867pub struct ContinuousTemporalGap {
2868 pub reason: ContinuousTemporalGapReason,
2869 pub last_complete_frontiers: Vec<ContinuousTemporalFrontier>,
2870 pub earliest_available_frontiers: Vec<ContinuousTemporalAvailableFrontier>,
2871}
2872
2873pub const LODESTONE_API_CONTINUOUS_TEMPORAL_EVALUATION_SHAPE_VERSION: u16 = 1;
2874pub const LODESTONE_API_CONTINUOUS_TEMPORAL_EVALUATION_FORMAT_VERSION: u16 = 1;
2875#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2876#[serde(deny_unknown_fields)]
2877pub struct ContinuousTemporalEvaluation {
2878 pub format_version: u32,
2879 pub evaluation_id: Identity,
2880 pub generation: U64,
2881 pub revision: U64,
2882 pub definition_digest: Digest,
2883 pub definition: ContinuousTemporalDefinition,
2884 pub lifecycle: String,
2885 pub frontiers: Vec<ContinuousTemporalFrontier>,
2886 #[serde(default, skip_serializing_if = "Option::is_none")]
2887 pub global_watermark_unix_nanos: Option<U64>,
2888 pub state_bytes: U64,
2889 pub active_states: U64,
2890 pub active_timers: U64,
2891 pub retained_results: U64,
2892 pub pending_emissions: U64,
2893 #[serde(default, skip_serializing_if = "Option::is_none")]
2894 pub last_materialized_frontier_digest: Option<Digest>,
2895 pub retry_count: u32,
2896 #[serde(default, skip_serializing_if = "Option::is_none")]
2897 pub gap: Option<ContinuousTemporalGap>,
2898}
2899
2900pub const LODESTONE_API_COMPOSITE_ORDER_FORMAT_VERSION: u16 = 1;
2901#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2902#[serde(rename_all = "snake_case")]
2903pub enum CompositeOrder {
2904 Asc,
2905 Desc,
2906}
2907
2908pub const LODESTONE_API_COMPOSITE_SOURCE_FORMAT_VERSION: u16 = 1;
2909#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2910#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2911pub enum CompositeSource {
2912 Terms {
2913 name: String,
2914 field: String,
2915 order: CompositeOrder,
2916 },
2917 DateHistogram {
2918 name: String,
2919 field: String,
2920 #[serde(default, skip_serializing_if = "Option::is_none")]
2921 fixed_interval_millis: Option<U64>,
2922 #[serde(default, skip_serializing_if = "Option::is_none")]
2923 calendar_interval: Option<String>,
2924 #[serde(default, skip_serializing_if = "Option::is_none")]
2925 time_zone: Option<String>,
2926 offset_millis: I64,
2927 order: CompositeOrder,
2928 },
2929}
2930
2931pub const LODESTONE_API_AGGREGATION_FORMAT_VERSION: u16 = 3;
2932#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2933#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2934pub enum Aggregation {
2935 Terms {
2936 name: String,
2937 field: String,
2938 size: u32,
2939 sub_aggregations: Vec<Aggregation>,
2940 },
2941 Histogram {
2942 name: String,
2943 field: String,
2944 interval: ApproximateNumber,
2945 min_doc_count: U64,
2946 #[serde(default, skip_serializing_if = "Option::is_none")]
2947 extended_bounds: Option<HistogramBounds>,
2948 #[serde(default, skip_serializing_if = "Option::is_none")]
2949 hard_bounds: Option<HistogramBounds>,
2950 offset: ApproximateNumber,
2951 #[serde(default, skip_serializing_if = "Option::is_none")]
2952 missing: Option<ApproximateNumber>,
2953 sub_aggregations: Vec<Aggregation>,
2954 },
2955 Cardinality {
2956 name: String,
2957 field: String,
2958 },
2959 Percentiles {
2960 name: String,
2961 field: String,
2962 percents: Vec<ApproximateNumber>,
2963 },
2964 ApproximateCardinality {
2965 name: String,
2966 field: String,
2967 precision: u32,
2968 },
2969 ApproximatePercentiles {
2970 name: String,
2971 field: String,
2972 percents: Vec<ApproximateNumber>,
2973 precision: u32,
2974 },
2975 Sum {
2976 name: String,
2977 field: String,
2978 },
2979 Avg {
2980 name: String,
2981 field: String,
2982 },
2983 Min {
2984 name: String,
2985 field: String,
2986 },
2987 Max {
2988 name: String,
2989 field: String,
2990 },
2991 Stats {
2992 name: String,
2993 field: String,
2994 },
2995 DateHistogram {
2996 name: String,
2997 field: String,
2998 #[serde(default, skip_serializing_if = "Option::is_none")]
2999 fixed_interval_millis: Option<U64>,
3000 #[serde(default, skip_serializing_if = "Option::is_none")]
3001 calendar_interval: Option<String>,
3002 #[serde(default, skip_serializing_if = "Option::is_none")]
3003 time_zone: Option<String>,
3004 min_doc_count: U64,
3005 #[serde(default, skip_serializing_if = "Option::is_none")]
3006 extended_bounds: Option<DateHistogramBounds>,
3007 #[serde(default, skip_serializing_if = "Option::is_none")]
3008 hard_bounds: Option<DateHistogramBounds>,
3009 offset_millis: I64,
3010 #[serde(default, skip_serializing_if = "Option::is_none")]
3011 missing: Option<I64>,
3012 sub_aggregations: Vec<Aggregation>,
3013 },
3014 Composite {
3015 name: String,
3016 size: u32,
3017 sources: Vec<CompositeSource>,
3018 #[serde(default, skip_serializing_if = "Option::is_none")]
3019 after: Option<Cursor>,
3020 sub_aggregations: Vec<Aggregation>,
3021 },
3022 Filter {
3023 name: String,
3024 query: Box<Query>,
3025 sub_aggregations: Vec<Aggregation>,
3026 },
3027 Nested {
3028 name: String,
3029 path: String,
3030 sub_aggregations: Vec<Aggregation>,
3031 },
3032 ReverseNested {
3033 name: String,
3034 #[serde(default, skip_serializing_if = "Option::is_none")]
3035 path: Option<String>,
3036 sub_aggregations: Vec<Aggregation>,
3037 },
3038 TimeSeriesV1 {
3039 name: String,
3040 metric_name: String,
3041 unit: String,
3042 point_kind: MetricPointKind,
3043 #[serde(default, skip_serializing_if = "Option::is_none")]
3044 temporality: Option<MetricTemporality>,
3045 #[serde(default, skip_serializing_if = "Option::is_none")]
3046 monotonic: Option<bool>,
3047 range_start_unix_nanos: U64,
3048 range_end_unix_nanos: U64,
3049 bucket_width_nanos: U64,
3050 alignment_origin_unix_nanos: U64,
3051 group_by: Vec<String>,
3052 operator: TimeSeriesOperator,
3053 missing_data: TimeSeriesMissingData,
3054 quantiles: Vec<ApproximateNumber>,
3055 quantile_mode: TimeSeriesQuantileMode,
3056 maximum_exemplars: u32,
3057 maximum_points: u32,
3058 maximum_series: u32,
3059 maximum_buckets: u32,
3060 maximum_results: u32,
3061 maximum_state_bytes: U64,
3062 },
3063}
3064
3065pub const LODESTONE_API_NESTED_SEARCH_HIT_FORMAT_VERSION: u16 = 2;
3066#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3067#[serde(deny_unknown_fields)]
3068pub struct NestedSearchHit {
3069 pub path: String,
3070 pub ordinal: u32,
3071 #[serde(default, skip_serializing_if = "Option::is_none")]
3072 pub score: Option<ApproximateNumber>,
3073 #[serde(default, skip_serializing_if = "Option::is_none")]
3074 pub source: Option<RawJson>,
3075 pub sort: Vec<JsonValue>,
3076}
3077
3078pub const LODESTONE_API_NAMED_NESTED_INNER_HITS_RESULT_FORMAT_VERSION: u16 = 1;
3079#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3080#[serde(deny_unknown_fields)]
3081pub struct NamedNestedInnerHitsResult {
3082 pub name: String,
3083 pub total: U64,
3084 pub hits: Vec<NestedSearchHit>,
3085}
3086
3087pub const LODESTONE_API_FRAGMENT_BOUNDARY_FORMAT_VERSION: u16 = 1;
3088#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3089#[serde(rename_all = "snake_case")]
3090pub enum FragmentBoundary {
3091 Word,
3092 Sentence,
3093 Paragraph,
3094 WholeField,
3095}
3096
3097pub const LODESTONE_API_FRAGMENT_OFFSET_ENCODING_FORMAT_VERSION: u16 = 1;
3098#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3099#[serde(rename_all = "snake_case")]
3100pub enum FragmentOffsetEncoding {
3101 Utf8Bytes,
3102 Utf16CodeUnits,
3103 UnicodeCodepoints,
3104}
3105
3106pub const LODESTONE_API_FRAGMENT_RANKER_FORMAT_VERSION: u16 = 1;
3107#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3108#[serde(rename_all = "snake_case")]
3109pub enum FragmentRanker {
3110 LexicalMatchCountV1,
3111}
3112
3113pub const LODESTONE_API_FRAGMENT_REQUEST_FORMAT_VERSION: u16 = 1;
3114#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3115#[serde(deny_unknown_fields)]
3116pub struct FragmentRequest {
3117 pub fields: Vec<String>,
3118 pub max_fragment_bytes: u32,
3119 pub max_fragments: u32,
3120 pub boundary: FragmentBoundary,
3121 pub offset_encoding: FragmentOffsetEncoding,
3122 pub ranker: FragmentRanker,
3123}
3124
3125pub const LODESTONE_API_SEARCH_FRAGMENT_FORMAT_VERSION: u16 = 1;
3126#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3127#[serde(deny_unknown_fields)]
3128pub struct SearchFragment {
3129 pub field: String,
3130 pub text: String,
3131 pub start: u32,
3132 pub end: u32,
3133 pub offset_encoding: FragmentOffsetEncoding,
3134 pub rank: u32,
3135 pub match_count: u32,
3136 pub truncated: bool,
3137 pub partial: bool,
3138}
3139
3140pub const LODESTONE_API_NUMERIC_FEATURE_TRANSFORM_FORMAT_VERSION: u16 = 1;
3141#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3142#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3143pub enum NumericFeatureTransform {
3144 Identity,
3145 Log1p,
3146 Clamp {
3147 minimum: ApproximateNumber,
3148 maximum: ApproximateNumber,
3149 },
3150}
3151
3152pub const LODESTONE_API_NUMERIC_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
3153#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3154#[serde(deny_unknown_fields)]
3155pub struct NumericResultFeature {
3156 pub name: String,
3157 pub field: String,
3158 pub transform: NumericFeatureTransform,
3159}
3160
3161pub const LODESTONE_API_RESULT_FEATURE_REQUEST_FORMAT_VERSION: u16 = 1;
3162#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3163#[serde(deny_unknown_fields)]
3164pub struct ResultFeatureRequest {
3165 pub top_n: u32,
3166 pub include_branch_components: bool,
3167 pub numeric: Vec<NumericResultFeature>,
3168}
3169
3170pub const LODESTONE_API_RESULT_DIVERSIFICATION_FORMAT_VERSION: u16 = 1;
3171#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3172#[serde(deny_unknown_fields)]
3173pub struct ResultDiversification {
3174 pub fields: Vec<String>,
3175 pub max_per_group: u32,
3176}
3177
3178pub const LODESTONE_API_SOURCE_PROJECTION_FORMAT_VERSION: u16 = 1;
3179#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3180#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3181pub enum SourceProjection {
3182 Full,
3183 Omit,
3184 Filter {
3185 includes: Vec<String>,
3186 excludes: Vec<String>,
3187 },
3188}
3189
3190pub const LODESTONE_API_BRANCH_SCORE_KIND_FORMAT_VERSION: u16 = 2;
3191#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3192#[serde(rename_all = "snake_case")]
3193pub enum BranchScoreKind {
3194 LexicalScore,
3195 DenseSimilarity,
3196 SparseDotProduct,
3197 LateInteractionMaxsim,
3198}
3199
3200pub const LODESTONE_API_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
3201#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3202#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3203pub enum ResultFeature {
3204 Branch {
3205 branch: String,
3206 score_kind: BranchScoreKind,
3207 rank: u32,
3208 score: ApproximateNumber,
3209 },
3210 Numeric {
3211 name: String,
3212 field: String,
3213 value: ApproximateNumber,
3214 },
3215}
3216
3217pub const LODESTONE_API_NATIVE_RECORD_LOCATOR_FORMAT_VERSION: u16 = 1;
3218#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3219#[serde(deny_unknown_fields)]
3220pub struct NativeRecordLocator {
3221 pub document_id: String,
3222 pub shard_id: u32,
3223 pub sequence: U64,
3224 pub primary_term: U64,
3225}
3226
3227pub const LODESTONE_API_SEARCH_HIT_FORMAT_VERSION: u16 = 4;
3228#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3229#[serde(deny_unknown_fields)]
3230pub struct SearchHit {
3231 pub index: Resource,
3232 pub document_id: String,
3233 pub record_locator: NativeRecordLocator,
3234 #[serde(default, skip_serializing_if = "Option::is_none")]
3235 pub score: Option<ApproximateNumber>,
3236 #[serde(default, skip_serializing_if = "Option::is_none")]
3237 pub source: Option<RawJson>,
3238 #[serde(default, skip_serializing_if = "Option::is_none")]
3239 pub record: Option<NativeRecord>,
3240 pub sort: Vec<JsonValue>,
3241 pub fragments: Vec<SearchFragment>,
3242 pub features: Vec<ResultFeature>,
3243 pub group_values: Vec<JsonValue>,
3244 pub inner_hits: Vec<NamedNestedInnerHitsResult>,
3245}
3246
3247pub const LODESTONE_API_RECORD_ERASURE_STATE_FORMAT_VERSION: u16 = 1;
3248#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3249#[serde(rename_all = "snake_case")]
3250pub enum RecordErasureState {
3251 Queued,
3252 Rewriting,
3253 LogicallyErased,
3254 Retained,
3255 PhysicallyErased,
3256 Superseded,
3257}
3258
3259pub const LODESTONE_API_RECORD_ERASURE_RECEIPT_FORMAT_VERSION: u16 = 1;
3260#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3261#[serde(deny_unknown_fields)]
3262pub struct RecordErasureReceipt {
3263 pub task_id: Identity,
3264 pub index: Resource,
3265 pub locator: NativeRecordLocator,
3266 pub state: RecordErasureState,
3267 #[serde(default, skip_serializing_if = "Option::is_none")]
3268 pub logical_generation: Option<U64>,
3269 pub retired_objects: u32,
3270 pub remaining_objects: u32,
3271 pub protected_objects: u32,
3272 pub receipt_digest: Digest,
3273}
3274
3275pub const LODESTONE_API_AGGREGATION_BUCKET_FORMAT_VERSION: u16 = 1;
3276#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3277#[serde(deny_unknown_fields)]
3278pub struct AggregationBucket {
3279 pub key: JsonValue,
3280 pub document_count: U64,
3281 pub sub_aggregations: Vec<AggregationResult>,
3282}
3283
3284pub const LODESTONE_API_AGGREGATION_RESULT_FORMAT_VERSION: u16 = 3;
3285#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3286#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3287pub enum AggregationResult {
3288 Terms {
3289 name: String,
3290 buckets: Vec<AggregationBucket>,
3291 partial: bool,
3292 },
3293 Histogram {
3294 name: String,
3295 buckets: Vec<AggregationBucket>,
3296 partial: bool,
3297 },
3298 DateHistogram {
3299 name: String,
3300 buckets: Vec<AggregationBucket>,
3301 partial: bool,
3302 },
3303 Composite {
3304 name: String,
3305 buckets: Vec<AggregationBucket>,
3306 #[serde(default, skip_serializing_if = "Option::is_none")]
3307 after: Option<Cursor>,
3308 partial: bool,
3309 },
3310 Filter {
3311 name: String,
3312 buckets: Vec<AggregationBucket>,
3313 partial: bool,
3314 },
3315 SingleBucket {
3316 name: String,
3317 document_count: U64,
3318 sub_aggregations: Vec<AggregationResult>,
3319 partial: bool,
3320 },
3321 Cardinality {
3322 name: String,
3323 #[serde(default, skip_serializing_if = "Option::is_none")]
3324 value: Option<ApproximateNumber>,
3325 partial: bool,
3326 },
3327 Percentiles {
3328 name: String,
3329 values: Vec<PercentileValue>,
3330 partial: bool,
3331 },
3332 ApproximateCardinality {
3333 name: String,
3334 value: ApproximateNumber,
3335 approximation: Approximation,
3336 partial: bool,
3337 },
3338 ApproximatePercentiles {
3339 name: String,
3340 values: Vec<ApproximatePercentileValue>,
3341 approximation: Approximation,
3342 partial: bool,
3343 },
3344 Sum {
3345 name: String,
3346 #[serde(default, skip_serializing_if = "Option::is_none")]
3347 value: Option<ApproximateNumber>,
3348 partial: bool,
3349 },
3350 Avg {
3351 name: String,
3352 #[serde(default, skip_serializing_if = "Option::is_none")]
3353 value: Option<ApproximateNumber>,
3354 partial: bool,
3355 },
3356 Min {
3357 name: String,
3358 #[serde(default, skip_serializing_if = "Option::is_none")]
3359 value: Option<ApproximateNumber>,
3360 partial: bool,
3361 },
3362 Max {
3363 name: String,
3364 #[serde(default, skip_serializing_if = "Option::is_none")]
3365 value: Option<ApproximateNumber>,
3366 partial: bool,
3367 },
3368 Stats {
3369 name: String,
3370 count: U64,
3371 #[serde(default, skip_serializing_if = "Option::is_none")]
3372 min: Option<ApproximateNumber>,
3373 #[serde(default, skip_serializing_if = "Option::is_none")]
3374 max: Option<ApproximateNumber>,
3375 #[serde(default, skip_serializing_if = "Option::is_none")]
3376 avg: Option<ApproximateNumber>,
3377 sum: ApproximateNumber,
3378 partial: bool,
3379 },
3380 TimeSeriesV1 {
3381 name: String,
3382 buckets: Vec<TimeSeriesBucket>,
3383 partial: bool,
3384 },
3385}
3386
3387pub const LODESTONE_API_SHARD_COUNTS_FORMAT_VERSION: u16 = 1;
3388#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3389#[serde(deny_unknown_fields)]
3390pub struct ShardCounts {
3391 pub total: u32,
3392 pub successful: u32,
3393 pub skipped: u32,
3394 pub failed: u32,
3395}
3396
3397pub const LODESTONE_API_TOTAL_HITS_RELATION_FORMAT_VERSION: u16 = 1;
3398#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3399#[serde(rename_all = "snake_case")]
3400pub enum TotalHitsRelation {
3401 Exact,
3402 LowerBound,
3403 Incomplete,
3404}
3405
3406pub const LODESTONE_API_SEARCH_TOTAL_FORMAT_VERSION: u16 = 1;
3407#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3408#[serde(deny_unknown_fields)]
3409pub struct SearchTotal {
3410 pub value: U64,
3411 pub relation: TotalHitsRelation,
3412 pub partial: bool,
3413}
3414
3415pub const LODESTONE_API_SEARCH_EXECUTION_FRESHNESS_FORMAT_VERSION: u16 = 1;
3416#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3417#[serde(rename_all = "snake_case")]
3418pub enum SearchExecutionFreshness {
3419 Realtime,
3420 Committed,
3421}
3422
3423pub const LODESTONE_API_SEARCH_FRESHNESS_FORMAT_VERSION: u16 = 1;
3424#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3425#[serde(rename_all = "snake_case")]
3426pub enum SearchFreshness {
3427 Auto,
3428 Realtime,
3429 Committed,
3430}
3431
3432pub const LODESTONE_API_SEARCH_DEGRADATION_REASON_FORMAT_VERSION: u16 = 1;
3433#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3434#[serde(rename_all = "snake_case")]
3435pub enum SearchDegradationReason {
3436 WriterUnavailable,
3437}
3438
3439pub const LODESTONE_API_SEARCH_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
3440#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3441#[serde(deny_unknown_fields)]
3442pub struct SearchAchievement {
3443 pub freshness: SearchExecutionFreshness,
3444 pub degradation_reasons: Vec<SearchDegradationReason>,
3445}
3446
3447pub const LODESTONE_API_SEARCH_FAILURE_STAGE_FORMAT_VERSION: u16 = 1;
3448#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3449#[serde(rename_all = "snake_case")]
3450pub enum SearchFailureStage {
3451 Preflight,
3452 Dispatch,
3453}
3454
3455pub const LODESTONE_API_SEARCH_FAILURE_REASON_FORMAT_VERSION: u16 = 1;
3456#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3457#[serde(rename_all = "snake_case")]
3458pub enum SearchFailureReason {
3459 Cancelled,
3460 Overloaded,
3461 ResourceLimit,
3462 DeadlineExceeded,
3463 Unavailable,
3464 InvalidResponse,
3465}
3466
3467pub const LODESTONE_API_COLLECTION_SHARD_FORMAT_VERSION: u16 = 1;
3468#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3469#[serde(deny_unknown_fields)]
3470pub struct CollectionShard {
3471 pub collection_id: Identity,
3472 pub index_id: Identity,
3473 pub shard_id: u32,
3474}
3475
3476pub const LODESTONE_API_SEARCH_PARTIAL_FAILURE_FORMAT_VERSION: u16 = 1;
3477#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3478#[serde(deny_unknown_fields)]
3479pub struct SearchPartialFailure {
3480 pub shard: CollectionShard,
3481 pub stage: SearchFailureStage,
3482 pub reason: SearchFailureReason,
3483 pub recovery: RecoveryAction,
3484}
3485
3486pub const LODESTONE_API_ARTIFACT_FORMAT_VERSION: u16 = 1;
3487#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3488#[serde(deny_unknown_fields)]
3489pub struct Artifact {
3490 pub locator: Locator,
3491 pub bytes: U64,
3492 pub sha256: Digest,
3493 pub expires_at: U64,
3494}
3495
3496pub const LODESTONE_API_PORTABILITY_STORAGE_CAPABILITY_FORMAT_VERSION: u16 = 1;
3497#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3498#[serde(deny_unknown_fields)]
3499pub struct PortabilityStorageCapability {
3500 pub backend_authority: String,
3501 pub object_prefix: String,
3502 pub maximum_bytes: U64,
3503 #[serde(default, skip_serializing_if = "Option::is_none")]
3504 pub key_capability_digest: Option<Digest>,
3505}
3506
3507pub const LODESTONE_API_COLLECTION_EXPORT_ARTIFACT_FORMAT_VERSION: u16 = 1;
3508#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3509#[serde(deny_unknown_fields)]
3510pub struct CollectionExportArtifact {
3511 pub artifact: Artifact,
3512 pub backend_authority: String,
3513 pub object_key: String,
3514 pub source_collection_id: Identity,
3515 pub source_catalog_revision: U64,
3516}
3517
3518pub const LODESTONE_API_COLLECTION_TRANSFER_SEQUENCE_FORMAT_VERSION: u16 = 1;
3519#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3520#[serde(deny_unknown_fields)]
3521pub struct CollectionTransferSequence {
3522 pub source_index_incarnation: Identity,
3523 pub shard_id: u32,
3524 #[serde(default, skip_serializing_if = "Option::is_none")]
3525 pub registered_through: Option<U64>,
3526}
3527
3528pub const LODESTONE_API_COLLECTION_TRANSFER_ARTIFACT_FORMAT_VERSION: u16 = 1;
3529#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3530#[serde(deny_unknown_fields)]
3531pub struct CollectionTransferArtifact {
3532 pub artifact: Artifact,
3533 pub backend_authority: String,
3534 pub object_key: String,
3535 pub source_collection_id: Identity,
3536 pub base_catalog_revision: U64,
3537 pub final_catalog_revision: U64,
3538 pub admitted_security_generation: U64,
3539 pub fenced_security_generation: U64,
3540 pub base_content_digest: Digest,
3541 pub final_content_digest: Digest,
3542 pub final_sequence_digest: Digest,
3543 pub final_sequences: Vec<CollectionTransferSequence>,
3544 pub delta_entries: u32,
3545}
3546
3547pub const LODESTONE_API_COLLECTION_STANDBY_STATE_FORMAT_VERSION: u16 = 1;
3548#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3549#[serde(rename_all = "snake_case")]
3550pub enum CollectionStandbyState {
3551 Admitted,
3552 Activated,
3553}
3554
3555pub const LODESTONE_API_COLLECTION_STANDBY_FORMAT_VERSION: u16 = 1;
3556#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3557#[serde(deny_unknown_fields)]
3558pub struct CollectionStandby {
3559 pub standby_id: Digest,
3560 pub binding_digest: Digest,
3561 pub source_collection_id: Identity,
3562 pub source_recovery_era: Identity,
3563 pub source_catalog_revision: U64,
3564 pub source_security_generation: U64,
3565 pub source_durability_digest: Digest,
3566 pub standby_collection_id: Identity,
3567 pub standby_recovery_era: Identity,
3568 pub standby_catalog_revision: U64,
3569 pub standby_security_generation: U64,
3570 pub standby_content_digest: Digest,
3571 pub standby_durability_digest: Digest,
3572 pub transfer_artifact_digest: Digest,
3573 pub restore_operation_binding_digest: Digest,
3574 pub admission_operation_identity: Digest,
3575 pub admitted_at: U64,
3576 pub state: CollectionStandbyState,
3577 pub activation_generation: U64,
3578 #[serde(default, skip_serializing_if = "Option::is_none")]
3579 pub activation_fence: Option<Digest>,
3580 #[serde(default, skip_serializing_if = "Option::is_none")]
3581 pub activation_operation_identity: Option<Digest>,
3582 #[serde(default, skip_serializing_if = "Option::is_none")]
3583 pub activated_at: Option<U64>,
3584}
3585
3586pub const LODESTONE_API_PORTABILITY_KEY_CAPABILITY_REFERENCE_STATE_FORMAT_VERSION: u16 = 1;
3587#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3588#[serde(rename_all = "snake_case")]
3589pub enum PortabilityKeyCapabilityReferenceState {
3590 NotApplicable,
3591 Released,
3592}
3593
3594pub const LODESTONE_API_COLLECTION_EXPORT_RETIREMENT_FORMAT_VERSION: u16 = 1;
3595#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3596#[serde(deny_unknown_fields)]
3597pub struct CollectionExportRetirement {
3598 pub artifact: CollectionExportArtifact,
3599 pub artifact_absent: bool,
3600 pub key_capability_reference_state: PortabilityKeyCapabilityReferenceState,
3601}
3602
3603pub const LODESTONE_API_INDEX_TRANSFER_PAGE_FORMAT_VERSION: u16 = 1;
3604#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3605#[serde(deny_unknown_fields)]
3606pub struct IndexTransferPage {
3607 pub ordinal: u32,
3608 pub object_key: String,
3609 pub bytes: U64,
3610 pub content_digest: Digest,
3611 pub record_count: u32,
3612}
3613
3614pub const LODESTONE_API_INDEX_TRANSFER_ARTIFACT_FORMAT_VERSION: u16 = 1;
3615#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3616#[serde(deny_unknown_fields)]
3617pub struct IndexTransferArtifact {
3618 pub manifest: Artifact,
3619 pub manifest_object_key: String,
3620 pub transfer_identity: Digest,
3621 pub source_cluster_storage_id: Identity,
3622 pub source_collection_id: Identity,
3623 pub source_index: Resource,
3624 pub source_catalog_revision: U64,
3625 pub source_cut_digest: Digest,
3626 pub pages: Vec<IndexTransferPage>,
3627 pub record_count: u32,
3628}
3629
3630pub const LODESTONE_API_SEARCH_VALIDATION_BOUND_FORMAT_VERSION: u16 = 1;
3631#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3632#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3633pub enum SearchValidationBound {
3634 Exact { value: U64 },
3635 UpperBound { value: U64 },
3636 Unknown { reason: String },
3637}
3638
3639pub const LODESTONE_API_SEARCH_VALIDATION_ESTIMATES_FORMAT_VERSION: u16 = 1;
3640#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3641#[serde(deny_unknown_fields)]
3642pub struct SearchValidationEstimates {
3643 pub shard_fanout: SearchValidationBound,
3644 pub candidate_documents: SearchValidationBound,
3645 pub segments: SearchValidationBound,
3646 pub buckets: SearchValidationBound,
3647 pub memory_bytes: SearchValidationBound,
3648 pub object_reads: SearchValidationBound,
3649 pub object_bytes: SearchValidationBound,
3650 pub response_bytes: SearchValidationBound,
3651 pub planning_work: SearchValidationBound,
3652}
3653
3654pub const LODESTONE_API_SEARCH_VALIDATION_LIMIT_FORMAT_VERSION: u16 = 1;
3655#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3656#[serde(deny_unknown_fields)]
3657pub struct SearchValidationLimit {
3658 pub id: String,
3659 pub applied: U64,
3660 pub unit: String,
3661}
3662
3663pub const LODESTONE_API_OPERATION_KIND_FORMAT_VERSION: u16 = 4;
3664#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3665#[serde(rename_all = "snake_case")]
3666pub enum OperationKind {
3667 Catalog,
3668 MaintenanceTask,
3669 Security,
3670 Diagnostic,
3671 CollectionExport,
3672 CollectionExportRetirement,
3673 CollectionRestore,
3674 CollectionTransferExport,
3675 CollectionTransferRestore,
3676 CollectionStandbyAdmission,
3677 CollectionStandbyActivation,
3678 IndexExport,
3679 IndexImport,
3680 VectorEvaluation,
3681 VectorWarm,
3682 Lifecycle,
3683 Quota,
3684 Admission,
3685}
3686
3687pub const LODESTONE_API_OPERATION_AUTHORITY_FORMAT_VERSION: u16 = 1;
3688#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3689#[serde(rename_all = "snake_case")]
3690pub enum OperationAuthority {
3691 Catalog,
3692 Tasks,
3693 Security,
3694 Diagnostics,
3695 Portability,
3696 Lifecycle,
3697 Quota,
3698 Admission,
3699}
3700
3701pub const LODESTONE_API_OPERATION_TARGET_FORMAT_VERSION: u16 = 1;
3702#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3703#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3704pub enum OperationTarget {
3705 Collection { collection_id: Identity },
3706 Resource { resource: Resource },
3707 Artifact { locator: Locator },
3708 None,
3709}
3710
3711pub const LODESTONE_API_OPERATION_STATE_FORMAT_VERSION: u16 = 1;
3712#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3713#[serde(rename_all = "snake_case")]
3714pub enum OperationState {
3715 Pending,
3716 Succeeded,
3717 Failed,
3718 Cancelled,
3719}
3720
3721pub const LODESTONE_API_OPERATION_PENDING_STATE_FORMAT_VERSION: u16 = 1;
3722#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3723#[serde(rename_all = "snake_case")]
3724pub enum OperationPendingState {
3725 Queued,
3726 Running,
3727 CancelRequested,
3728}
3729
3730pub const LODESTONE_API_OPERATION_PROGRESS_UNIT_FORMAT_VERSION: u16 = 1;
3731#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3732#[serde(rename_all = "snake_case")]
3733pub enum OperationProgressUnit {
3734 BasisPoints,
3735 Items,
3736 Bytes,
3737 WorkUnits,
3738}
3739
3740pub const LODESTONE_API_OPERATION_PROGRESS_FORMAT_VERSION: u16 = 1;
3741#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3742#[serde(deny_unknown_fields)]
3743pub struct OperationProgress {
3744 pub completed: U64,
3745 pub total: U64,
3746 pub unit: OperationProgressUnit,
3747}
3748
3749pub const LODESTONE_API_OPERATION_RESULT_FORMAT_VERSION: u16 = 1;
3750#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3751#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3752pub enum OperationResult {
3753 None,
3754 Artifacts { items: Vec<Artifact> },
3755}
3756
3757pub const LODESTONE_API_OPERATION_FAILURE_FORMAT_VERSION: u16 = 1;
3758#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3759#[serde(deny_unknown_fields)]
3760pub struct OperationFailure {
3761 pub error: ErrorBody,
3762}
3763
3764pub const LODESTONE_API_OPERATION_CANCELLATION_FORMAT_VERSION: u16 = 1;
3765#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3766#[serde(rename_all = "snake_case")]
3767pub enum OperationCancellation {
3768 NotCancellable,
3769 Cancellable,
3770 CancelRequested,
3771 Cancelled,
3772}
3773
3774pub const LODESTONE_API_OPERATION_RETENTION_STATE_FORMAT_VERSION: u16 = 1;
3775#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3776#[serde(rename_all = "snake_case")]
3777pub enum OperationRetentionState {
3778 Active,
3779 Retired,
3780}
3781
3782pub const LODESTONE_API_OPERATION_RETENTION_FORMAT_VERSION: u16 = 1;
3783#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3784#[serde(deny_unknown_fields)]
3785pub struct OperationRetention {
3786 pub state: OperationRetentionState,
3787 #[serde(default, skip_serializing_if = "Option::is_none")]
3788 pub retire_after: Option<U64>,
3789}
3790
3791pub const LODESTONE_API_OPERATION_FORMAT_VERSION: u16 = 2;
3792#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3793#[serde(deny_unknown_fields)]
3794pub struct Operation {
3795 pub locator: Locator,
3796 pub kind: OperationKind,
3797 pub authority: OperationAuthority,
3798 pub target: OperationTarget,
3799 pub authority_revision: U64,
3800 pub current_state: OperationState,
3801 #[serde(default, skip_serializing_if = "Option::is_none")]
3802 pub pending_state: Option<OperationPendingState>,
3803 #[serde(default, skip_serializing_if = "Option::is_none")]
3804 pub progress: Option<OperationProgress>,
3805 #[serde(default, skip_serializing_if = "Option::is_none")]
3806 pub result: Option<OperationResult>,
3807 #[serde(default, skip_serializing_if = "Option::is_none")]
3808 pub failure: Option<OperationFailure>,
3809 pub cancellation: OperationCancellation,
3810 pub retention: OperationRetention,
3811 pub submitted_at: U64,
3812 #[serde(default, skip_serializing_if = "Option::is_none")]
3813 pub terminal_at: Option<U64>,
3814}
3815
3816pub const LODESTONE_API_WRITE_DURABILITY_BOUNDARY_FORMAT_VERSION: u16 = 1;
3817#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3818#[serde(rename_all = "snake_case")]
3819pub enum WriteDurabilityBoundary {
3820 Registered,
3821 IncarnationMemory,
3822}
3823
3824pub const LODESTONE_API_WRITE_VISIBILITY_MODE_FORMAT_VERSION: u16 = 1;
3825#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3826#[serde(rename_all = "snake_case")]
3827pub enum WriteVisibilityMode {
3828 Applied,
3829 WaitFor,
3830}
3831
3832pub const LODESTONE_API_WRITE_RESPONSE_STAGE_FORMAT_VERSION: u16 = 1;
3833#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3834#[serde(rename_all = "snake_case")]
3835pub enum WriteResponseStage {
3836 Validated,
3837 Admitted,
3838 Sequenced,
3839 ObjectPut,
3840 Registered,
3841 AppliedToActiveMemtable,
3842 MicroCommitted,
3843 Sealed,
3844}
3845
3846pub const LODESTONE_API_WRITE_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
3847#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3848#[serde(deny_unknown_fields)]
3849pub struct WriteAchievement {
3850 pub durability_class: ResourceDurabilityClass,
3851 pub durability_boundary: WriteDurabilityBoundary,
3852 pub visibility_mode: WriteVisibilityMode,
3853 pub response_stage: WriteResponseStage,
3854}
3855
3856pub const LODESTONE_API_MUTATION_COMMIT_POSITION_FORMAT_VERSION: u16 = 1;
3857#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3858#[serde(deny_unknown_fields)]
3859pub struct MutationCommitPosition {
3860 pub leader_term: U64,
3861 pub leader_node_id: U64,
3862 pub log_index: U64,
3863}
3864
3865pub const LODESTONE_API_MUTATION_COMMIT_RECEIPT_SHAPE_VERSION: u16 = 1;
3866pub const LODESTONE_API_MUTATION_COMMIT_RECEIPT_FORMAT_VERSION: u16 = 1;
3867#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3868#[serde(deny_unknown_fields)]
3869pub struct MutationCommitReceipt {
3870 pub format_version: u32,
3871 pub registration_position: MutationCommitPosition,
3872 pub sequence: U64,
3873 pub primary_term: U64,
3874 pub mapping_generation: U64,
3875 pub durability_class: ResourceDurabilityClass,
3876 pub durability_boundary: WriteDurabilityBoundary,
3877 pub committed_at_unix_millis: U64,
3878 pub committed_at_uncertainty_millis: U64,
3879}
3880
3881pub const LODESTONE_API_MUTATION_RESOLVER_FORMAT_VERSION: u16 = 2;
3882#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3883#[serde(rename_all = "snake_case")]
3884pub enum MutationResolver {
3885 CloneIndex,
3886 GetHistory,
3887 ResolveAppendBulk,
3888 ResolveCatalogAction,
3889 ResolveDocumentBulk,
3890 ResolveDocumentMutation,
3891 ResolveIndexChange,
3892 ResolveSecurityAction,
3893 ResolveServiceCredentialReservation,
3894 ResolveSourceAuthorizationProjection,
3895 ResolveStateWrite,
3896}
3897
3898pub const LODESTONE_API_MUTATION_OUTCOME_FORMAT_VERSION: u16 = 1;
3899#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3900#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
3901pub enum MutationOutcome {
3902 Terminal,
3903 Pending {
3904 #[serde(default, skip_serializing_if = "Option::is_none")]
3905 resolver: Option<MutationResolver>,
3906 },
3907 Indeterminate {
3908 #[serde(default, skip_serializing_if = "Option::is_none")]
3909 resolver: Option<MutationResolver>,
3910 },
3911 ResolutionRequired {
3912 resolver: MutationResolver,
3913 },
3914}
3915
3916pub const LODESTONE_API_SUBMISSION_STATE_FORMAT_VERSION: u16 = 1;
3917#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3918#[serde(rename_all = "snake_case")]
3919pub enum SubmissionState {
3920 NotSubmitted,
3921 Submitted,
3922 Resolved,
3923 KnownRetired,
3924 Indeterminate,
3925}
3926
3927pub const LODESTONE_API_EXPECTED_BINDING_FORMAT_VERSION: u16 = 1;
3928#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3929#[serde(deny_unknown_fields)]
3930pub struct ExpectedBinding {
3931 pub incarnation: Identity,
3932 pub revision: U64,
3933}
3934
3935pub const LODESTONE_API_ADMINISTRATION_ALIAS_ACTION_FORMAT_VERSION: u16 = 1;
3936#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3937#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3938pub enum AdministrationAliasAction {
3939 Put {
3940 name: String,
3941 #[serde(default, skip_serializing_if = "Option::is_none")]
3942 expected_revision: Option<U64>,
3943 targets: Vec<AliasTarget>,
3944 #[serde(default, skip_serializing_if = "Option::is_none")]
3945 filter: Option<RawJson>,
3946 #[serde(default, skip_serializing_if = "Option::is_none")]
3947 index_routing: Option<String>,
3948 #[serde(default, skip_serializing_if = "Option::is_none")]
3949 search_routing: Option<String>,
3950 },
3951 Delete {
3952 name: String,
3953 expected_revision: U64,
3954 },
3955}
3956
3957pub const LODESTONE_API_ADMINISTRATION_MUTATION_FORMAT_VERSION: u16 = 3;
3958#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3959#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3960pub enum AdministrationMutation {
3961 ApplyAliasActions {
3962 actions: Vec<AdministrationAliasAction>,
3963 },
3964 PutComponentTemplate {
3965 name: String,
3966 #[serde(default, skip_serializing_if = "Option::is_none")]
3967 expected: Option<ExpectedBinding>,
3968 mapping: Mapping,
3969 settings: RawJson,
3970 #[serde(default, skip_serializing_if = "Option::is_none")]
3971 resource_spec: Option<IndexResourceSpec>,
3972 },
3973 DeleteComponentTemplate {
3974 name: String,
3975 expected: ExpectedBinding,
3976 },
3977 PutIndexTemplate {
3978 name: String,
3979 #[serde(default, skip_serializing_if = "Option::is_none")]
3980 expected: Option<ExpectedBinding>,
3981 priority: i32,
3982 data_stream: bool,
3983 index_patterns: Vec<String>,
3984 components: Vec<ExpectedBinding>,
3985 mapping: Mapping,
3986 settings: RawJson,
3987 #[serde(default, skip_serializing_if = "Option::is_none")]
3988 resource_spec: Option<IndexResourceSpec>,
3989 },
3990 DeleteIndexTemplate {
3991 name: String,
3992 expected: ExpectedBinding,
3993 },
3994 PutIngestPipeline {
3995 name: String,
3996 #[serde(default, skip_serializing_if = "Option::is_none")]
3997 expected: Option<ExpectedBinding>,
3998 definition: RawJson,
3999 },
4000 DeleteIngestPipeline {
4001 name: String,
4002 expected: ExpectedBinding,
4003 },
4004 PutLifecyclePolicy {
4005 name: String,
4006 #[serde(default, skip_serializing_if = "Option::is_none")]
4007 expected: Option<ExpectedBinding>,
4008 rollover: RolloverThresholds,
4009 retention: RetentionPolicy,
4010 merge_hint: bool,
4011 freeze_hint: bool,
4012 #[serde(default, skip_serializing_if = "Option::is_none")]
4013 archive_after_millis: Option<U64>,
4014 delete_expired: bool,
4015 },
4016 DeleteLifecyclePolicy {
4017 name: String,
4018 expected: ExpectedBinding,
4019 },
4020 CreateDataStream {
4021 name: String,
4022 timestamp_field: String,
4023 index_template: ExpectedBinding,
4024 #[serde(default, skip_serializing_if = "Option::is_none")]
4025 lifecycle_policy: Option<ExpectedBinding>,
4026 },
4027 UpdateDataStream {
4028 name: String,
4029 expected_revision: U64,
4030 timestamp_field: String,
4031 index_template: ExpectedBinding,
4032 #[serde(default, skip_serializing_if = "Option::is_none")]
4033 lifecycle_policy: Option<ExpectedBinding>,
4034 },
4035 DeleteDataStream {
4036 name: String,
4037 expected_revision: U64,
4038 },
4039 RolloverDataStream {
4040 name: String,
4041 expected_revision: U64,
4042 },
4043 RequestArchiveRestore {
4044 name: String,
4045 expected_revision: U64,
4046 backing_index: IndexReference,
4047 },
4048}
4049
4050pub const LODESTONE_API_ADMINISTRATION_OUTCOME_FORMAT_VERSION: u16 = 1;
4051#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4052#[serde(deny_unknown_fields)]
4053pub struct AdministrationOutcome {
4054 pub action_id: Digest,
4055 pub authority_revision: U64,
4056 pub state: String,
4057 #[serde(default, skip_serializing_if = "Option::is_none")]
4058 pub resource: Option<Resource>,
4059}
4060
4061pub const LODESTONE_API_INDEX_CHANGE_APPLY_RECEIPT_FORMAT_VERSION: u16 = 1;
4062#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4063#[serde(deny_unknown_fields)]
4064pub struct IndexChangeApplyReceipt {
4065 pub action_id: Digest,
4066 pub semantic_digest: Digest,
4067 pub index: Resource,
4068 pub revision: U64,
4069 pub schema_generation: U64,
4070 pub state: String,
4071}
4072
4073pub const LODESTONE_API_INDEX_CHANGE_RESOLUTION_STATE_FORMAT_VERSION: u16 = 1;
4074#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4075#[serde(rename_all = "snake_case")]
4076pub enum IndexChangeResolutionState {
4077 NotSubmitted,
4078 Prepared,
4079 Pending,
4080 Applied,
4081 Failed,
4082 KnownRetired,
4083 ExpiredUnknown,
4084}
4085
4086pub const LODESTONE_API_BULK_DOCUMENT_ITEM_FORMAT_VERSION: u16 = 2;
4087#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4088#[serde(deny_unknown_fields)]
4089pub struct BulkDocumentItem {
4090 pub item_action_id: Digest,
4091 pub document_id: String,
4092 pub operation: String,
4093 #[serde(default, skip_serializing_if = "Option::is_none")]
4094 pub source: Option<RawJson>,
4095 #[serde(default, skip_serializing_if = "Option::is_none")]
4096 pub record: Option<NativeRecord>,
4097 #[serde(default, skip_serializing_if = "Option::is_none")]
4098 pub routing: Option<String>,
4099 #[serde(default, skip_serializing_if = "Option::is_none")]
4100 pub condition: Option<DocumentMutationCondition>,
4101 #[serde(default, skip_serializing_if = "Option::is_none")]
4102 pub pipeline: Option<IngestPipelineSelection>,
4103 pub semantic_digest: Digest,
4104}
4105
4106pub const LODESTONE_API_BULK_DOCUMENT_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
4107#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4108#[serde(deny_unknown_fields)]
4109pub struct BulkDocumentItemOutcome {
4110 pub item_action_id: Digest,
4111 #[serde(default, skip_serializing_if = "Option::is_none")]
4112 pub locator: Option<Locator>,
4113 pub state: SubmissionState,
4114 #[serde(default, skip_serializing_if = "Option::is_none")]
4115 pub sequence: Option<U64>,
4116 #[serde(default, skip_serializing_if = "Option::is_none")]
4117 pub mapping_generation: Option<U64>,
4118 pub mapping_adopted: bool,
4119 pub no_document_effect: bool,
4120 #[serde(default, skip_serializing_if = "Option::is_none")]
4121 pub error: Option<ErrorBody>,
4122}
4123
4124pub const LODESTONE_API_BULK_DOCUMENT_OUTCOME_FORMAT_VERSION: u16 = 1;
4125#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4126#[serde(deny_unknown_fields)]
4127pub struct BulkDocumentOutcome {
4128 pub batch_id: Digest,
4129 pub index: Resource,
4130 pub items: Vec<BulkDocumentItemOutcome>,
4131 pub complete: bool,
4132 #[serde(default, skip_serializing_if = "Option::is_none")]
4133 pub achievement: Option<WriteAchievement>,
4134}
4135
4136pub const LODESTONE_API_METRIC_ATTRIBUTE_VALUE_FORMAT_VERSION: u16 = 1;
4137#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4138#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4139pub enum MetricAttributeValue {
4140 String { value: String },
4141 Boolean { value: bool },
4142 I64 { value: I64 },
4143 U64 { value: U64 },
4144 F64Bits { value: U64 },
4145}
4146
4147pub const LODESTONE_API_METRIC_ATTRIBUTE_FORMAT_VERSION: u16 = 1;
4148#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4149#[serde(deny_unknown_fields)]
4150pub struct MetricAttribute {
4151 pub key: String,
4152 pub value: MetricAttributeValue,
4153}
4154
4155pub const LODESTONE_API_METRIC_NUMBER_FORMAT_VERSION: u16 = 1;
4156#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4157#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4158pub enum MetricNumber {
4159 I64 { value: I64 },
4160 F64Bits { value: U64 },
4161}
4162
4163pub const LODESTONE_API_METRIC_TEMPORALITY_FORMAT_VERSION: u16 = 1;
4164#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4165#[serde(rename_all = "snake_case")]
4166pub enum MetricTemporality {
4167 Cumulative,
4168 Delta,
4169}
4170
4171pub const LODESTONE_API_METRIC_POINT_KIND_FORMAT_VERSION: u16 = 1;
4172#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4173#[serde(rename_all = "snake_case")]
4174pub enum MetricPointKind {
4175 Gauge,
4176 Sum,
4177 ExplicitHistogram,
4178 ExponentialHistogram,
4179}
4180
4181pub const LODESTONE_API_METRIC_EXPONENTIAL_BUCKETS_FORMAT_VERSION: u16 = 1;
4182#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4183#[serde(deny_unknown_fields)]
4184pub struct MetricExponentialBuckets {
4185 pub offset: i32,
4186 pub counts: Vec<U64>,
4187}
4188
4189pub const LODESTONE_API_METRIC_DATA_FORMAT_VERSION: u16 = 1;
4190#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4191#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4192pub enum MetricData {
4193 Gauge {
4194 value: MetricNumber,
4195 },
4196 Sum {
4197 value: MetricNumber,
4198 temporality: MetricTemporality,
4199 monotonic: bool,
4200 },
4201 ExplicitHistogram {
4202 temporality: MetricTemporality,
4203 count: U64,
4204 #[serde(default, skip_serializing_if = "Option::is_none")]
4205 sum: Option<MetricNumber>,
4206 bounds_f64_bits: Vec<U64>,
4207 bucket_counts: Vec<U64>,
4208 },
4209 ExponentialHistogram {
4210 temporality: MetricTemporality,
4211 count: U64,
4212 #[serde(default, skip_serializing_if = "Option::is_none")]
4213 sum: Option<MetricNumber>,
4214 scale: i32,
4215 zero_count: U64,
4216 positive: MetricExponentialBuckets,
4217 negative: MetricExponentialBuckets,
4218 },
4219}
4220
4221pub const LODESTONE_API_METRIC_INSTRUMENTATION_SCOPE_FORMAT_VERSION: u16 = 1;
4222#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4223#[serde(deny_unknown_fields)]
4224pub struct MetricInstrumentationScope {
4225 pub name: String,
4226 #[serde(default, skip_serializing_if = "Option::is_none")]
4227 pub version: Option<String>,
4228 #[serde(default, skip_serializing_if = "Option::is_none")]
4229 pub schema_url: Option<String>,
4230 pub attributes: Vec<MetricAttribute>,
4231}
4232
4233pub const LODESTONE_API_METRIC_EXEMPLAR_FORMAT_VERSION: u16 = 1;
4234#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4235#[serde(deny_unknown_fields)]
4236pub struct MetricExemplar {
4237 pub timestamp_unix_nanos: U64,
4238 pub value: MetricNumber,
4239 #[serde(default, skip_serializing_if = "Option::is_none")]
4240 pub trace_id: Option<String>,
4241 #[serde(default, skip_serializing_if = "Option::is_none")]
4242 pub span_id: Option<String>,
4243 pub filtered_attributes: Vec<MetricAttribute>,
4244}
4245
4246pub const LODESTONE_API_METRIC_POINT_SHAPE_VERSION: u16 = 1;
4247pub const LODESTONE_API_METRIC_POINT_FORMAT_VERSION: u16 = 1;
4248#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4249#[serde(deny_unknown_fields)]
4250pub struct MetricPoint {
4251 pub format_version: u32,
4252 pub resource_attributes: Vec<MetricAttribute>,
4253 pub instrumentation_scope: MetricInstrumentationScope,
4254 pub metric_name: String,
4255 #[serde(default, skip_serializing_if = "Option::is_none")]
4256 pub description: Option<String>,
4257 pub unit: String,
4258 pub series_attributes: Vec<MetricAttribute>,
4259 pub timestamp_unix_nanos: U64,
4260 #[serde(default, skip_serializing_if = "Option::is_none")]
4261 pub start_timestamp_unix_nanos: Option<U64>,
4262 pub data: MetricData,
4263 pub exemplars: Vec<MetricExemplar>,
4264}
4265
4266pub const LODESTONE_API_ENTITY_REF_FORMAT_VERSION: u16 = 1;
4267#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4268#[serde(deny_unknown_fields)]
4269pub struct EntityRef {
4270 pub entity_kind: String,
4271 pub entity_id: String,
4272}
4273
4274pub const LODESTONE_API_RELATIONSHIP_EVIDENCE_REF_FORMAT_VERSION: u16 = 1;
4275#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4276#[serde(deny_unknown_fields)]
4277pub struct RelationshipEvidenceRef {
4278 pub index: Resource,
4279 pub record_id: String,
4280}
4281
4282pub const LODESTONE_API_RELATIONSHIP_DIRECTIONALITY_FORMAT_VERSION: u16 = 1;
4283#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4284#[serde(rename_all = "snake_case")]
4285pub enum RelationshipDirectionality {
4286 Directed,
4287 Undirected,
4288}
4289
4290pub const LODESTONE_API_RELATIONSHIP_RECORD_SHAPE_VERSION: u16 = 1;
4291pub const LODESTONE_API_RELATIONSHIP_RECORD_FORMAT_VERSION: u16 = 1;
4292#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4293#[serde(deny_unknown_fields)]
4294pub struct RelationshipRecord {
4295 pub format_version: u32,
4296 pub relationship_id: String,
4297 pub source: EntityRef,
4298 pub target: EntityRef,
4299 pub relationship_type: String,
4300 pub directionality: RelationshipDirectionality,
4301 #[serde(default, skip_serializing_if = "Option::is_none")]
4302 pub valid_from_unix_nanos: Option<U64>,
4303 #[serde(default, skip_serializing_if = "Option::is_none")]
4304 pub valid_through_unix_nanos: Option<U64>,
4305 pub provenance: Vec<String>,
4306 pub evidence: Vec<RelationshipEvidenceRef>,
4307 pub assertion_class: String,
4308}
4309
4310pub const LODESTONE_API_PROFILE_LABEL_FORMAT_VERSION: u16 = 1;
4311#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4312#[serde(deny_unknown_fields)]
4313pub struct ProfileLabel {
4314 pub key: String,
4315 pub value: String,
4316}
4317
4318pub const LODESTONE_API_PROFILE_SAMPLE_TYPE_FORMAT_VERSION: u16 = 1;
4319#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4320#[serde(deny_unknown_fields)]
4321pub struct ProfileSampleType {
4322 pub sample_type: String,
4323 pub unit: String,
4324}
4325
4326pub const LODESTONE_API_PROFILE_MAPPING_FORMAT_VERSION: u16 = 1;
4327#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4328#[serde(deny_unknown_fields)]
4329pub struct ProfileMapping {
4330 pub mapping_id: String,
4331 pub build_id: String,
4332 pub module_id: String,
4333 #[serde(default, skip_serializing_if = "Option::is_none")]
4334 pub filename: Option<String>,
4335}
4336
4337pub const LODESTONE_API_PROFILE_FUNCTION_FORMAT_VERSION: u16 = 1;
4338#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4339#[serde(deny_unknown_fields)]
4340pub struct ProfileFunction {
4341 pub function_id: String,
4342 #[serde(default, skip_serializing_if = "Option::is_none")]
4343 pub name: Option<String>,
4344 #[serde(default, skip_serializing_if = "Option::is_none")]
4345 pub system_name: Option<String>,
4346 #[serde(default, skip_serializing_if = "Option::is_none")]
4347 pub filename: Option<String>,
4348 #[serde(default, skip_serializing_if = "Option::is_none")]
4349 pub start_line: Option<U64>,
4350 #[serde(default, skip_serializing_if = "Option::is_none")]
4351 pub symbol_observation_id: Option<String>,
4352}
4353
4354pub const LODESTONE_API_PROFILE_LINE_FORMAT_VERSION: u16 = 1;
4355#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4356#[serde(deny_unknown_fields)]
4357pub struct ProfileLine {
4358 pub function_id: String,
4359 pub line: U64,
4360}
4361
4362pub const LODESTONE_API_PROFILE_LOCATION_FORMAT_VERSION: u16 = 1;
4363#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4364#[serde(deny_unknown_fields)]
4365pub struct ProfileLocation {
4366 pub location_id: String,
4367 #[serde(default, skip_serializing_if = "Option::is_none")]
4368 pub mapping_id: Option<String>,
4369 pub address: U64,
4370 pub lines: Vec<ProfileLine>,
4371}
4372
4373pub const LODESTONE_API_PROFILE_STACK_FORMAT_VERSION: u16 = 1;
4374#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4375#[serde(deny_unknown_fields)]
4376pub struct ProfileStack {
4377 pub stack_id: String,
4378 #[serde(default, skip_serializing_if = "Option::is_none")]
4379 pub parent_stack_id: Option<String>,
4380 pub location_id: String,
4381}
4382
4383pub const LODESTONE_API_PROFILE_SAMPLE_FORMAT_VERSION: u16 = 1;
4384#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4385#[serde(deny_unknown_fields)]
4386pub struct ProfileSample {
4387 pub sample_id: String,
4388 pub stack_id: String,
4389 pub values: Vec<MetricNumber>,
4390 pub labels: Vec<ProfileLabel>,
4391 #[serde(default, skip_serializing_if = "Option::is_none")]
4392 pub trace_id: Option<String>,
4393 #[serde(default, skip_serializing_if = "Option::is_none")]
4394 pub span_id: Option<String>,
4395}
4396
4397pub const LODESTONE_API_PROFILE_INSTRUMENTATION_SCOPE_FORMAT_VERSION: u16 = 1;
4398#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4399#[serde(deny_unknown_fields)]
4400pub struct ProfileInstrumentationScope {
4401 pub name: String,
4402 #[serde(default, skip_serializing_if = "Option::is_none")]
4403 pub version: Option<String>,
4404 pub attributes: Vec<ProfileLabel>,
4405}
4406
4407pub const LODESTONE_API_PROFILE_BATCH_SHAPE_VERSION: u16 = 1;
4408pub const LODESTONE_API_PROFILE_BATCH_FORMAT_VERSION: u16 = 1;
4409#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4410#[serde(deny_unknown_fields)]
4411pub struct ProfileBatch {
4412 pub format_version: u32,
4413 pub profile_id: String,
4414 pub batch_id: String,
4415 pub start_unix_nanos: U64,
4416 pub end_unix_nanos: U64,
4417 pub duration_nanos: U64,
4418 pub period_nanos: U64,
4419 pub sample_types: Vec<ProfileSampleType>,
4420 pub resource_attributes: Vec<ProfileLabel>,
4421 pub instrumentation_scope: ProfileInstrumentationScope,
4422 pub mappings: Vec<ProfileMapping>,
4423 pub functions: Vec<ProfileFunction>,
4424 pub locations: Vec<ProfileLocation>,
4425 pub stacks: Vec<ProfileStack>,
4426 pub samples: Vec<ProfileSample>,
4427}
4428
4429pub const LODESTONE_API_NATIVE_RECORD_FORMAT_VERSION: u16 = 3;
4430#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4431#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4432pub enum NativeRecord {
4433 Document { source: RawJson },
4434 MetricPoint { point: Box<MetricPoint> },
4435 Relationship { relationship: Box<RelationshipRecord> },
4436 ProfileBatch { batch: Box<ProfileBatch> },
4437}
4438
4439pub const LODESTONE_API_RETAINED_APPEND_ITEM_FORMAT_VERSION: u16 = 4;
4440#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4441#[serde(deny_unknown_fields)]
4442pub struct RetainedAppendItem {
4443 pub item_action_id: Digest,
4444 pub document_id: String,
4445 pub record: NativeRecord,
4446}
4447
4448pub const LODESTONE_API_RETAINED_APPEND_STATE_FORMAT_VERSION: u16 = 1;
4449#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4450#[serde(rename_all = "snake_case")]
4451pub enum RetainedAppendState {
4452 Prepared,
4453 Committed,
4454 Replayed,
4455 Conflict,
4456 NotSubmittedRetryable,
4457 NotSubmittedTerminal,
4458 SubmittedIndeterminate,
4459 Retired,
4460}
4461
4462pub const LODESTONE_API_RETAINED_APPEND_RETRY_SAFETY_FORMAT_VERSION: u16 = 1;
4463#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4464#[serde(rename_all = "snake_case")]
4465pub enum RetainedAppendRetrySafety {
4466 Safe,
4467 ResolveOnly,
4468 Terminal,
4469}
4470
4471pub const LODESTONE_API_RETAINED_APPEND_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
4472#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4473#[serde(deny_unknown_fields)]
4474pub struct RetainedAppendItemOutcome {
4475 pub item_action_id: Digest,
4476 #[serde(default, skip_serializing_if = "Option::is_none")]
4477 pub locator: Option<Locator>,
4478 #[serde(default, skip_serializing_if = "Option::is_none")]
4479 pub semantic_digest: Option<Digest>,
4480 pub state: RetainedAppendState,
4481 pub retry_safety: RetainedAppendRetrySafety,
4482 #[serde(default, skip_serializing_if = "Option::is_none")]
4483 pub sequence: Option<U64>,
4484 #[serde(default, skip_serializing_if = "Option::is_none")]
4485 pub primary_term: Option<U64>,
4486 #[serde(default, skip_serializing_if = "Option::is_none")]
4487 pub error: Option<ErrorBody>,
4488}
4489
4490pub const LODESTONE_API_RETAINED_APPEND_BULK_OUTCOME_FORMAT_VERSION: u16 = 1;
4491#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4492#[serde(deny_unknown_fields)]
4493pub struct RetainedAppendBulkOutcome {
4494 pub batch_id: Digest,
4495 pub index: Resource,
4496 pub items: Vec<RetainedAppendItemOutcome>,
4497 pub complete: bool,
4498 #[serde(default, skip_serializing_if = "Option::is_none")]
4499 pub achievement: Option<WriteAchievement>,
4500}
4501
4502pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_STATE_FORMAT_VERSION: u16 = 1;
4503#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4504#[serde(rename_all = "snake_case")]
4505pub enum RetainedAppendObservationState {
4506 Visible,
4507 Pending,
4508 SubmittedIndeterminate,
4509 Conflict,
4510 Retired,
4511}
4512
4513pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_OUTCOME_FORMAT_VERSION: u16 = 1;
4514#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4515#[serde(deny_unknown_fields)]
4516pub struct RetainedAppendObservationOutcome {
4517 pub index: Resource,
4518 pub locator: Locator,
4519 pub state: RetainedAppendObservationState,
4520 #[serde(default, skip_serializing_if = "Option::is_none")]
4521 pub sequence: Option<U64>,
4522 #[serde(default, skip_serializing_if = "Option::is_none")]
4523 pub primary_term: Option<U64>,
4524}
4525
4526pub const LODESTONE_API_BINARY_VALUE_FORMAT_VERSION: u16 = 1;
4527#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4528#[serde(deny_unknown_fields)]
4529pub struct BinaryValue {
4530 pub bytes_base64: String,
4531}
4532
4533pub const LODESTONE_API_STATE_HASH_FIELD_FORMAT_VERSION: u16 = 1;
4534#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4535#[serde(deny_unknown_fields)]
4536pub struct StateHashField {
4537 pub field: BinaryValue,
4538 pub value: BinaryValue,
4539}
4540
4541pub const LODESTONE_API_STATE_SET_ENTRY_FORMAT_VERSION: u16 = 1;
4542#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4543#[serde(deny_unknown_fields)]
4544pub struct StateSetEntry {
4545 pub key: BinaryValue,
4546 pub value: BinaryValue,
4547}
4548
4549pub const LODESTONE_API_STATE_SET_CONDITION_FORMAT_VERSION: u16 = 1;
4550#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4551#[serde(rename_all = "snake_case")]
4552pub enum StateSetCondition {
4553 Always,
4554 IfAbsent,
4555 IfPresent,
4556}
4557
4558pub const LODESTONE_API_STATE_OPERATION_FORMAT_VERSION: u16 = 1;
4559#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4560#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4561pub enum StateOperation {
4562 Get {
4563 key: BinaryValue,
4564 },
4565 Set {
4566 key: BinaryValue,
4567 value: BinaryValue,
4568 condition: StateSetCondition,
4569 #[serde(default, skip_serializing_if = "Option::is_none")]
4570 expires_at_millis: Option<U64>,
4571 },
4572 Delete {
4573 keys: Vec<BinaryValue>,
4574 },
4575 Exists {
4576 keys: Vec<BinaryValue>,
4577 },
4578 ExpireAt {
4579 key: BinaryValue,
4580 absolute_millis: U64,
4581 },
4582 TtlStatus {
4583 key: BinaryValue,
4584 },
4585 Persist {
4586 key: BinaryValue,
4587 },
4588 MultiGet {
4589 keys: Vec<BinaryValue>,
4590 },
4591 MultiSet {
4592 entries: Vec<StateSetEntry>,
4593 },
4594 Increment {
4595 key: BinaryValue,
4596 delta: I64,
4597 },
4598 HashGet {
4599 key: BinaryValue,
4600 field: BinaryValue,
4601 },
4602 HashSet {
4603 key: BinaryValue,
4604 fields: Vec<StateHashField>,
4605 },
4606 HashGetAll {
4607 key: BinaryValue,
4608 },
4609}
4610
4611pub const LODESTONE_API_STATE_OPTIONAL_VALUE_FORMAT_VERSION: u16 = 1;
4612#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4613#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4614pub enum StateOptionalValue {
4615 Missing,
4616 Value { value: BinaryValue },
4617}
4618
4619pub const LODESTONE_API_STATE_COMMAND_RESULT_FORMAT_VERSION: u16 = 1;
4620#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4621#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4622pub enum StateCommandResult {
4623 Get {
4624 value: StateOptionalValue,
4625 },
4626 Set {
4627 applied: bool,
4628 },
4629 Delete {
4630 removed: u32,
4631 },
4632 Exists {
4633 count: u32,
4634 },
4635 Expire {
4636 changed: bool,
4637 },
4638 TtlStatus {
4639 state: String,
4640 #[serde(default, skip_serializing_if = "Option::is_none")]
4641 remaining_millis: Option<U64>,
4642 },
4643 Persist {
4644 changed: bool,
4645 },
4646 MultiGet {
4647 values: Vec<StateOptionalValue>,
4648 },
4649 MultiSet {
4650 written: u32,
4651 },
4652 Increment {
4653 value: I64,
4654 },
4655 HashGet {
4656 value: StateOptionalValue,
4657 },
4658 HashSet {
4659 fields_added: u32,
4660 },
4661 HashGetAll {
4662 fields: Vec<StateHashField>,
4663 },
4664}
4665
4666pub const LODESTONE_API_STATE_WRITE_RESOLUTION_FORMAT_VERSION: u16 = 1;
4667#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4668#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4669pub enum StateWriteResolution {
4670 NotSubmitted,
4671 Resolved {
4672 result: StateCommandResult,
4673 sequence: U64,
4674 },
4675 KnownRetired {
4676 retired_through: U64,
4677 },
4678 StateReset {
4679 submitted_reset_epoch: U64,
4680 current_reset_epoch: U64,
4681 },
4682 Indeterminate {
4683 #[serde(default, skip_serializing_if = "Option::is_none")]
4684 observed_high_water: Option<U64>,
4685 #[serde(default, skip_serializing_if = "Option::is_none")]
4686 current_high_water: Option<U64>,
4687 #[serde(default, skip_serializing_if = "Option::is_none")]
4688 retired_through: Option<U64>,
4689 },
4690}
4691
4692pub const LODESTONE_API_SERVICE_CREDENTIAL_RESERVATION_FORMAT_VERSION: u16 = 1;
4693#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4694#[serde(deny_unknown_fields)]
4695pub struct ServiceCredentialReservation {
4696 pub locator: Locator,
4697 pub reservation_action_id: Digest,
4698 pub activation_action_id: Digest,
4699 pub principal_id: Identity,
4700 pub api_key_id: Identity,
4701 pub generation: U64,
4702 pub reservation_expires_at: U64,
4703 pub credential_expires_at: U64,
4704 pub verifier_algorithm: String,
4705 pub verifier_algorithm_version: u32,
4706 pub required_secret_bytes: u32,
4707}
4708
4709pub const LODESTONE_API_SUBSCRIPTION_METADATA_FIELD_FORMAT_VERSION: u16 = 1;
4710#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4711#[serde(rename_all = "snake_case")]
4712pub enum SubscriptionMetadataField {
4713 Id,
4714 RoutingHash,
4715 Operation,
4716 Shard,
4717 Sequence,
4718}
4719
4720pub const LODESTONE_API_SUBSCRIPTION_FIELD_FORMAT_VERSION: u16 = 1;
4721#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4722#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4723pub enum SubscriptionField {
4724 Source { path: String },
4725 Metadata { field: SubscriptionMetadataField },
4726}
4727
4728pub const LODESTONE_API_SUBSCRIPTION_FILTER_FORMAT_VERSION: u16 = 1;
4729#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4730#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4731pub enum SubscriptionFilter {
4732 All,
4733 Bool {
4734 must: Vec<SubscriptionFilter>,
4735 should: Vec<SubscriptionFilter>,
4736 must_not: Vec<SubscriptionFilter>,
4737 minimum_should_match: u32,
4738 },
4739 Term {
4740 field: SubscriptionField,
4741 value: JsonValue,
4742 },
4743 Terms {
4744 field: SubscriptionField,
4745 values: Vec<JsonValue>,
4746 },
4747 Range {
4748 field: SubscriptionField,
4749 #[serde(default, skip_serializing_if = "Option::is_none")]
4750 gt: Option<JsonValue>,
4751 #[serde(default, skip_serializing_if = "Option::is_none")]
4752 gte: Option<JsonValue>,
4753 #[serde(default, skip_serializing_if = "Option::is_none")]
4754 lt: Option<JsonValue>,
4755 #[serde(default, skip_serializing_if = "Option::is_none")]
4756 lte: Option<JsonValue>,
4757 },
4758 Exists {
4759 field: SubscriptionField,
4760 },
4761 Prefix {
4762 field: SubscriptionField,
4763 value: String,
4764 },
4765}
4766
4767pub const LODESTONE_API_SUBSCRIPTION_CURSOR_ENTRY_FORMAT_VERSION: u16 = 1;
4768#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4769#[serde(deny_unknown_fields)]
4770pub struct SubscriptionCursorEntry {
4771 pub index: Resource,
4772 pub routing_revision: U64,
4773 pub recovery_era: Identity,
4774 pub shard_id: U64,
4775 pub sequence: U64,
4776}
4777
4778pub const LODESTONE_API_SUBSCRIPTION_ROUTE_FORMAT_VERSION: u16 = 1;
4779#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4780#[serde(deny_unknown_fields)]
4781pub struct SubscriptionRoute {
4782 pub index: Resource,
4783 pub routing_revision: U64,
4784 pub shard_ids: Vec<U64>,
4785}
4786
4787pub const LODESTONE_API_SUBSCRIPTION_START_POSITION_FORMAT_VERSION: u16 = 1;
4788#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4789#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4790pub enum SubscriptionStartPosition {
4791 FromNow,
4792 Resume {
4793 routes: Vec<SubscriptionRoute>,
4794 cut: Vec<SubscriptionCursorEntry>,
4795 },
4796}
4797
4798pub const LODESTONE_API_SUBSCRIPTION_START_SHAPE_VERSION: u16 = 1;
4799pub const LODESTONE_API_SUBSCRIPTION_START_FORMAT_VERSION: u16 = 1;
4800#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4801#[serde(deny_unknown_fields)]
4802pub struct SubscriptionStart {
4803 pub format_version: u32,
4804 pub request_id: String,
4805 pub index: Resource,
4806 #[serde(default, skip_serializing_if = "Option::is_none")]
4807 pub filter: Option<SubscriptionFilter>,
4808 pub include_deletes: bool,
4809 pub source_projection: Vec<String>,
4810 pub reconnect_attempt: u32,
4811 pub start: SubscriptionStartPosition,
4812 pub heartbeat_millis: U64,
4813 pub schema_digest: Digest,
4814}
4815
4816pub const LODESTONE_API_SUBSCRIPTION_ACCEPTED_SHAPE_VERSION: u16 = 1;
4817pub const LODESTONE_API_SUBSCRIPTION_ACCEPTED_FORMAT_VERSION: u16 = 1;
4818#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4819#[serde(deny_unknown_fields)]
4820pub struct SubscriptionAccepted {
4821 pub format_version: u32,
4822 pub routes: Vec<SubscriptionRoute>,
4823 pub accepted_cut: Vec<SubscriptionCursorEntry>,
4824 pub schema_digest: Digest,
4825}
4826
4827pub const LODESTONE_API_SUBSCRIPTION_WRITER_FENCE_FORMAT_VERSION: u16 = 1;
4828#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4829#[serde(deny_unknown_fields)]
4830pub struct SubscriptionWriterFence {
4831 pub recovery_era: Identity,
4832 pub epoch: u32,
4833}
4834
4835pub const LODESTONE_API_SUBSCRIPTION_EVENT_SHAPE_VERSION: u16 = 1;
4836pub const LODESTONE_API_SUBSCRIPTION_EVENT_FORMAT_VERSION: u16 = 1;
4837#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4838#[serde(deny_unknown_fields)]
4839pub struct SubscriptionEvent {
4840 pub format_version: u32,
4841 pub event_id: Digest,
4842 pub index: Resource,
4843 pub shard_id: U64,
4844 pub recovery_era: Identity,
4845 pub writer_fence: SubscriptionWriterFence,
4846 pub routing_revision: U64,
4847 pub sequence: U64,
4848 pub operation: String,
4849 pub document_id: String,
4850 pub routing_hash: u32,
4851 #[serde(default, skip_serializing_if = "Option::is_none")]
4852 pub source: Option<RawJson>,
4853}
4854
4855pub const LODESTONE_API_SUBSCRIPTION_HEARTBEAT_SHAPE_VERSION: u16 = 1;
4856pub const LODESTONE_API_SUBSCRIPTION_HEARTBEAT_FORMAT_VERSION: u16 = 1;
4857#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4858#[serde(deny_unknown_fields)]
4859pub struct SubscriptionHeartbeat {
4860 pub format_version: u32,
4861 pub confirmed_cut: Vec<SubscriptionCursorEntry>,
4862 pub route_revision: U64,
4863 pub authorization_revision: U64,
4864 pub authorization_valid_until_millis: U64,
4865}
4866
4867pub const LODESTONE_API_SUBSCRIPTION_GAP_SHAPE_VERSION: u16 = 1;
4868pub const LODESTONE_API_SUBSCRIPTION_GAP_FORMAT_VERSION: u16 = 1;
4869#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4870#[serde(deny_unknown_fields)]
4871pub struct SubscriptionGap {
4872 pub format_version: u32,
4873 pub affected: Vec<SubscriptionCursorEntry>,
4874 pub last_confirmed: Vec<SubscriptionCursorEntry>,
4875 pub earliest_available: Vec<SubscriptionCursorEntry>,
4876 pub reason: String,
4877 pub terminal: bool,
4878}
4879
4880pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_REASON_FORMAT_VERSION: u16 = 1;
4881#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4882#[serde(rename_all = "snake_case")]
4883pub enum SubscriptionTerminalReason {
4884 Completed,
4885 Cancelled,
4886 DeadlineExceeded,
4887 StaleCursor,
4888 RetentionGap,
4889 Unavailable,
4890 Internal,
4891}
4892
4893pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_SHAPE_VERSION: u16 = 2;
4894pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_FORMAT_VERSION: u16 = 2;
4895#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4896#[serde(deny_unknown_fields)]
4897pub struct SubscriptionTerminal {
4898 pub format_version: u32,
4899 pub reason: SubscriptionTerminalReason,
4900 pub recovery: RecoveryAction,
4901}
4902
4903pub const LODESTONE_API_SUBSCRIPTION_FRAME_FORMAT_VERSION: u16 = 1;
4904#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4905#[serde(tag = "frame", rename_all = "snake_case", deny_unknown_fields)]
4906pub enum SubscriptionFrame {
4907 Accepted { body: SubscriptionAccepted },
4908 Event { body: SubscriptionEvent },
4909 Heartbeat { body: SubscriptionHeartbeat },
4910 Gap { body: SubscriptionGap },
4911 Terminal { body: SubscriptionTerminal },
4912}
4913
4914pub const LODESTONE_API_STREAM_BINDING_FORMAT_VERSION: u16 = 1;
4915#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4916#[serde(deny_unknown_fields)]
4917pub struct StreamBinding {
4918 pub name: String,
4919 pub transport: String,
4920 pub service: String,
4921 pub method: String,
4922 pub endpoint: String,
4923 pub auth_metadata: String,
4924 pub auth_scheme: String,
4925 pub semantic_format_version: u32,
4926 pub schema_digest: Digest,
4927}
4928
4929pub const LODESTONE_API_CAPABILITY_GRANT_FORMAT_VERSION: u16 = 1;
4930#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4931#[serde(deny_unknown_fields)]
4932pub struct CapabilityGrant {
4933 pub command: String,
4934 pub action: String,
4935 pub state: String,
4936 pub reason: String,
4937 pub mutation_class: String,
4938 pub cancellable: bool,
4939 pub workload_classes: Vec<WorkloadClass>,
4940 pub possible_submission_states: Vec<String>,
4941 pub capability_family: String,
4942 pub effect_class: String,
4943 pub risk_flags: Vec<String>,
4944 pub admissible_errors: Vec<String>,
4945 pub referenced_limits: Vec<String>,
4946 pub retry_safety: String,
4947 pub identity_requirement: String,
4948 #[serde(default, skip_serializing_if = "Option::is_none")]
4949 pub resolver_command: Option<String>,
4950 pub cancellation: String,
4951 pub side_effects: Vec<String>,
4952 pub recovery: String,
4953 pub index_patterns: Vec<String>,
4954 pub exact_index_incarnations: Vec<Identity>,
4955}
4956
4957pub const LODESTONE_API_PROTOCOL_LIMIT_FORMAT_VERSION: u16 = 1;
4958#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4959#[serde(deny_unknown_fields)]
4960pub struct ProtocolLimit {
4961 pub id: String,
4962 pub default: U64,
4963 pub maximum: U64,
4964 pub unit: String,
4965}
4966
4967pub const LODESTONE_API_DOCUMENT_MUTATION_CONDITION_FORMAT_VERSION: u16 = 1;
4968#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4969#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4970pub enum DocumentMutationCondition {
4971 Any,
4972 MustNotExist,
4973 IfSeqNo { seq_no: U64 },
4974 IfSeqNoAndPrimaryTerm { seq_no: U64, primary_term: U64 },
4975}
4976
4977pub const LODESTONE_API_AUDIT_ADAPTER_FORMAT_VERSION: u16 = 1;
4978#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4979#[serde(rename_all = "snake_case")]
4980pub enum AuditAdapter {
4981 Native,
4982 Elasticsearch,
4983 Otlp,
4984 Jaeger,
4985 Grpc,
4986 WebSocket,
4987 Resp,
4988 InternalRpc,
4989 ControlPlane,
4990}
4991
4992pub const LODESTONE_API_AUDIT_DECISION_FORMAT_VERSION: u16 = 1;
4993#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4994#[serde(rename_all = "snake_case")]
4995pub enum AuditDecision {
4996 Allowed,
4997 DeniedAuthentication,
4998 DeniedAuthorization,
4999 DeniedQuota,
5000 DeniedStalePolicy,
5001}
5002
5003pub const LODESTONE_API_AUDIT_OUTCOME_FORMAT_VERSION: u16 = 1;
5004#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5005#[serde(rename_all = "snake_case")]
5006pub enum AuditOutcome {
5007 AdmissionAccepted,
5008 AuthenticationRefused,
5009 AuthorizationRefused,
5010 QuotaRefused,
5011 PolicyUnavailable,
5012 DecodeFailed,
5013 OperationSucceeded,
5014 OperationFailed,
5015 OperationIndeterminate,
5016 FailedRedacted,
5017}
5018
5019pub const LODESTONE_API_AUDIT_DETAIL_FORMAT_VERSION: u16 = 1;
5020#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5021#[serde(rename_all = "snake_case")]
5022pub enum AuditDetail {
5023 PolicyMutation,
5024 CredentialRotation,
5025 CredentialRevocation,
5026 QuotaAdmission,
5027 RequestAdmission,
5028 ExplicitCrashGap,
5029 BackupLifecycle,
5030 RetentionLifecycle,
5031 FieldPromotion,
5032}
5033
5034pub const LODESTONE_API_AUDIT_GAP_REASON_FORMAT_VERSION: u16 = 1;
5035#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5036#[serde(rename_all = "snake_case")]
5037pub enum AuditGapReason {
5038 ExplicitCrashGap,
5039 Retention,
5040}
5041
5042pub const LODESTONE_API_AUDIT_EVENT_FORMAT_VERSION: u16 = 2;
5043#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5044#[serde(deny_unknown_fields)]
5045pub struct AuditEvent {
5046 pub event_id: Digest,
5047 pub recovery_era: Identity,
5048 pub sequence: U64,
5049 pub server_time: U64,
5050 #[serde(default, skip_serializing_if = "Option::is_none")]
5051 pub principal_id: Option<Identity>,
5052 #[serde(default, skip_serializing_if = "Option::is_none")]
5053 pub api_key_id: Option<Identity>,
5054 pub policy_revision: U64,
5055 pub adapter: AuditAdapter,
5056 pub action: String,
5057 pub resource_digest: Digest,
5058 pub request_digest: Digest,
5059 #[serde(default, skip_serializing_if = "Option::is_none")]
5060 pub correlation_id: Option<Identity>,
5061 #[serde(default, skip_serializing_if = "Option::is_none")]
5062 pub diagnostic_id: Option<Identity>,
5063 pub decision: AuditDecision,
5064 pub outcome: AuditOutcome,
5065 pub detail: AuditDetail,
5066}
5067
5068pub const LODESTONE_API_AUDIT_GAP_FORMAT_VERSION: u16 = 2;
5069#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5070#[serde(deny_unknown_fields)]
5071pub struct AuditGap {
5072 pub recovery_era: Identity,
5073 pub first_sequence: U64,
5074 pub last_sequence: U64,
5075 pub reason: AuditGapReason,
5076}
5077
5078pub const LODESTONE_API_AUDIT_STREAM_STATE_FORMAT_VERSION: u16 = 1;
5079#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5080#[serde(deny_unknown_fields)]
5081pub struct AuditStreamState {
5082 pub recovery_era: Identity,
5083 pub earliest_available_sequence: U64,
5084 pub snapshot_through: U64,
5085}
5086
5087pub const LODESTONE_API_SERVICE_CREDENTIAL_GRANT_FORMAT_VERSION: u16 = 1;
5088#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5089#[serde(deny_unknown_fields)]
5090pub struct ServiceCredentialGrant {
5091 pub role_name: String,
5092 pub role_version: U64,
5093}
5094
5095pub const LODESTONE_API_SERVICE_CREDENTIAL_SUMMARY_FORMAT_VERSION: u16 = 1;
5096#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5097#[serde(deny_unknown_fields)]
5098pub struct ServiceCredentialSummary {
5099 pub principal_id: Identity,
5100 pub api_key_id: Identity,
5101 pub generation: U64,
5102 pub state: String,
5103 #[serde(default, skip_serializing_if = "Option::is_none")]
5104 pub expires_at: Option<U64>,
5105 pub grants: Vec<ServiceCredentialGrant>,
5106}
5107
5108pub const LODESTONE_API_SECURITY_ROLE_FORMAT_VERSION: u16 = 2;
5109#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5110#[serde(deny_unknown_fields)]
5111pub struct SecurityRole {
5112 pub role_name: String,
5113 pub version: U64,
5114 pub permissions: Vec<String>,
5115 pub delegable_permissions: Vec<String>,
5116 pub allowed_workload_classes: Vec<WorkloadClass>,
5117 pub index_patterns: Vec<String>,
5118 pub append_index_incarnations: Vec<Identity>,
5119}
5120
5121pub const LODESTONE_API_ROLE_APPEND_SCOPE_CHANGE_FORMAT_VERSION: u16 = 1;
5122#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5123#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
5124pub enum RoleAppendScopeChange {
5125 Add { index: Resource },
5126 Remove { index_incarnation: Identity },
5127}
5128
5129pub const LODESTONE_API_ROLE_APPEND_ACCESS_PREPARATION_FORMAT_VERSION: u16 = 1;
5130#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5131#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
5132pub enum RoleAppendAccessPreparation {
5133 Prepared {
5134 locator: Locator,
5135 semantic_digest: Digest,
5136 expires_at: U64,
5137 predecessor_role_version: U64,
5138 successor_role_version: U64,
5139 },
5140 AlreadySatisfied {
5141 role: SecurityRole,
5142 },
5143}
5144
5145pub const LODESTONE_API_SOURCE_AUTHORIZATION_SUBJECT_KIND_FORMAT_VERSION: u16 = 1;
5146#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5147#[serde(rename_all = "snake_case")]
5148pub enum SourceAuthorizationSubjectKind {
5149 Principal,
5150 Group,
5151}
5152
5153pub const LODESTONE_API_SOURCE_AUTHORIZATION_SUBJECT_FORMAT_VERSION: u16 = 1;
5154#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5155#[serde(deny_unknown_fields)]
5156pub struct SourceAuthorizationSubject {
5157 pub kind: SourceAuthorizationSubjectKind,
5158 pub id: String,
5159}
5160
5161pub const LODESTONE_API_DELEGATED_QUERY_SOURCE_SUBJECT_FORMAT_VERSION: u16 = 1;
5162#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5163#[serde(deny_unknown_fields)]
5164pub struct DelegatedQuerySourceSubject {
5165 pub owner_subject_namespace: String,
5166 pub subject_id: String,
5167}
5168
5169pub const LODESTONE_API_DELEGATED_QUERY_SUBJECT_CLAIMS_SHAPE_VERSION: u16 = 1;
5170pub const LODESTONE_API_DELEGATED_QUERY_SUBJECT_CLAIMS_FORMAT_VERSION: u16 = 1;
5171#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5172#[serde(deny_unknown_fields)]
5173pub struct DelegatedQuerySubjectClaims {
5174 pub format_version: u32,
5175 pub issuer_id: String,
5176 pub key_id: String,
5177 pub key_generation: U64,
5178 pub query_subject_id: Identity,
5179 pub collection_id: Identity,
5180 pub workload_principal_id: Identity,
5181 pub workload_api_key_id: Identity,
5182 pub audience: String,
5183 pub source_subjects: Vec<DelegatedQuerySourceSubject>,
5184 pub issued_at_unix_millis: U64,
5185 pub expires_at_unix_millis: U64,
5186}
5187
5188pub const LODESTONE_API_SIGNED_DELEGATED_QUERY_SUBJECT_FORMAT_VERSION: u16 = 1;
5189#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5190#[serde(deny_unknown_fields)]
5191pub struct SignedDelegatedQuerySubject {
5192 pub claims: DelegatedQuerySubjectClaims,
5193 pub signature_base64url: String,
5194}
5195
5196pub const LODESTONE_API_SOURCE_AUTHORIZATION_PRINCIPAL_CHANGE_FORMAT_VERSION: u16 = 1;
5197#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5198#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
5199pub enum SourceAuthorizationPrincipalChange {
5200 Upsert {
5201 subject: SourceAuthorizationSubject,
5202 core_principal_id: Identity,
5203 },
5204 Revoke {
5205 subject: SourceAuthorizationSubject,
5206 },
5207 Delete {
5208 subject: SourceAuthorizationSubject,
5209 },
5210}
5211
5212pub const LODESTONE_API_SOURCE_AUTHORIZATION_GROUP_CHANGE_FORMAT_VERSION: u16 = 1;
5213#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5214#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
5215pub enum SourceAuthorizationGroupChange {
5216 Upsert { subject: SourceAuthorizationSubject },
5217 Delete { subject: SourceAuthorizationSubject },
5218}
5219
5220pub const LODESTONE_API_SOURCE_AUTHORIZATION_MEMBERSHIP_REPLACEMENT_FORMAT_VERSION: u16 = 1;
5221#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5222#[serde(deny_unknown_fields)]
5223pub struct SourceAuthorizationMembershipReplacement {
5224 pub principal: SourceAuthorizationSubject,
5225 pub groups: Vec<SourceAuthorizationSubject>,
5226}
5227
5228pub const LODESTONE_API_SOURCE_AUTHORIZATION_DOCUMENT_ACL_REPLACEMENT_FORMAT_VERSION: u16 = 1;
5229#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5230#[serde(deny_unknown_fields)]
5231pub struct SourceAuthorizationDocumentAclReplacement {
5232 pub document_id: String,
5233 pub principals: Vec<SourceAuthorizationSubject>,
5234 pub groups: Vec<SourceAuthorizationSubject>,
5235}
5236
5237pub const LODESTONE_API_SOURCE_AUTHORIZATION_BATCH_SHAPE_VERSION: u16 = 1;
5238pub const LODESTONE_API_SOURCE_AUTHORIZATION_BATCH_FORMAT_VERSION: u16 = 1;
5239#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5240#[serde(deny_unknown_fields)]
5241pub struct SourceAuthorizationBatch {
5242 pub format_version: u32,
5243 pub action_id: Digest,
5244 pub index: Resource,
5245 pub owner_subject_namespace: String,
5246 pub acl_encoding_digest: Digest,
5247 #[serde(default, skip_serializing_if = "Option::is_none")]
5248 pub predecessor_generation: Option<U64>,
5249 pub successor_generation: U64,
5250 pub source_checkpoint_digest: Digest,
5251 pub issued_at: U64,
5252 pub expires_at: U64,
5253 pub maximum_staleness_millis: U64,
5254 pub principal_changes: Vec<SourceAuthorizationPrincipalChange>,
5255 pub group_changes: Vec<SourceAuthorizationGroupChange>,
5256 pub membership_replacements: Vec<SourceAuthorizationMembershipReplacement>,
5257 pub document_acl_replacements: Vec<SourceAuthorizationDocumentAclReplacement>,
5258 pub document_deletions: Vec<String>,
5259}
5260
5261pub const LODESTONE_API_SOURCE_AUTHORIZATION_APPLIED_COUNTS_FORMAT_VERSION: u16 = 1;
5262#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5263#[serde(deny_unknown_fields)]
5264pub struct SourceAuthorizationAppliedCounts {
5265 pub principal_changes: u32,
5266 pub group_changes: u32,
5267 pub membership_replacements: u32,
5268 pub document_acl_replacements: u32,
5269 pub document_deletions: u32,
5270}
5271
5272pub const LODESTONE_API_SOURCE_AUTHORIZATION_RECEIPT_SHAPE_VERSION: u16 = 1;
5273pub const LODESTONE_API_SOURCE_AUTHORIZATION_RECEIPT_FORMAT_VERSION: u16 = 1;
5274#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5275#[serde(deny_unknown_fields)]
5276pub struct SourceAuthorizationReceipt {
5277 pub format_version: u32,
5278 pub action_id: Digest,
5279 pub index: Resource,
5280 #[serde(default, skip_serializing_if = "Option::is_none")]
5281 pub predecessor_generation: Option<U64>,
5282 pub current_generation: U64,
5283 pub batch_digest: Digest,
5284 pub projection_digest: Digest,
5285 pub applied_at: U64,
5286 pub expires_at: U64,
5287 pub counts: SourceAuthorizationAppliedCounts,
5288}
5289
5290pub const LODESTONE_API_SOURCE_AUTHORIZATION_PREPARATION_FORMAT_VERSION: u16 = 1;
5291#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5292#[serde(deny_unknown_fields)]
5293pub struct SourceAuthorizationPreparation {
5294 pub action_id: Digest,
5295 pub semantic_digest: Digest,
5296 pub index: Resource,
5297 #[serde(default, skip_serializing_if = "Option::is_none")]
5298 pub predecessor_generation: Option<U64>,
5299 pub successor_generation: U64,
5300 pub receipt: SourceAuthorizationReceipt,
5301}
5302
5303pub const LODESTONE_API_SOURCE_AUTHORIZATION_RESOLUTION_STATE_FORMAT_VERSION: u16 = 1;
5304#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5305#[serde(rename_all = "snake_case")]
5306pub enum SourceAuthorizationResolutionState {
5307 NotSubmitted,
5308 Pending,
5309 Applied,
5310 ExpiredUnknown,
5311}
5312
5313pub const LODESTONE_API_SOURCE_AUTHORIZATION_RESOLUTION_FORMAT_VERSION: u16 = 1;
5314#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5315#[serde(deny_unknown_fields)]
5316pub struct SourceAuthorizationResolution {
5317 pub action_id: Digest,
5318 pub semantic_digest: Digest,
5319 pub state: SourceAuthorizationResolutionState,
5320 #[serde(default, skip_serializing_if = "Option::is_none")]
5321 pub receipt: Option<SourceAuthorizationReceipt>,
5322}
5323
5324pub const LODESTONE_API_SECURITY_ACTION_OUTCOME_FORMAT_VERSION: u16 = 1;
5325#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5326#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
5327pub enum SecurityActionOutcome {
5328 Reserved {
5329 principal_id: Identity,
5330 api_key_id: Identity,
5331 generation: U64,
5332 },
5333 Activated {
5334 principal_id: Identity,
5335 api_key_id: Identity,
5336 generation: U64,
5337 },
5338 Revoked {
5339 principal_id: Identity,
5340 api_key_id: Identity,
5341 generation: U64,
5342 },
5343 Retired {
5344 principal_id: Identity,
5345 api_key_id: Identity,
5346 generation: U64,
5347 },
5348}
5349
5350pub const LODESTONE_API_MAINTENANCE_WORK_STATE_FORMAT_VERSION: u16 = 1;
5351#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5352#[serde(rename_all = "snake_case")]
5353pub enum MaintenanceWorkState {
5354 ParkedOperatorRequired,
5355 RetryWait,
5356 RetryReady,
5357 Leased,
5358 Deferred,
5359 Runnable,
5360}
5361
5362pub const LODESTONE_API_MAINTENANCE_ATTEMPT_STATE_FORMAT_VERSION: u16 = 1;
5363#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5364#[serde(rename_all = "snake_case")]
5365pub enum MaintenanceAttemptState {
5366 Running,
5367 DeadlineExceededDraining,
5368 DeadlineExceededReclaimPending,
5369 CancellationDraining,
5370 ClaimRecoveryPending,
5371}
5372
5373pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_FORMAT_VERSION: u16 = 1;
5374#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5375#[serde(rename_all = "snake_case")]
5376pub enum MaintenanceFailureClass {
5377 Corruption,
5378 AttemptBudget,
5379 StructuralLimit,
5380 Execution,
5381 Other,
5382}
5383
5384pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_COUNT_FORMAT_VERSION: u16 = 1;
5385#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5386#[serde(deny_unknown_fields)]
5387pub struct MaintenanceFailureClassCount {
5388 pub class: MaintenanceFailureClass,
5389 pub count: U64,
5390}
5391
5392pub const LODESTONE_API_MAINTENANCE_ATTEMPT_OBSERVATION_FORMAT_VERSION: u16 = 1;
5393#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5394#[serde(deny_unknown_fields)]
5395pub struct MaintenanceAttemptObservation {
5396 pub state: MaintenanceAttemptState,
5397 pub lease_epoch: U64,
5398 pub lease_expires_at: U64,
5399 pub observed_at_millis: U64,
5400}
5401
5402pub const LODESTONE_API_MAINTENANCE_TASK_SCOPE_FORMAT_VERSION: u16 = 1;
5403#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5404#[serde(deny_unknown_fields)]
5405pub struct MaintenanceTaskScope {
5406 pub kind: String,
5407 #[serde(default, skip_serializing_if = "Option::is_none")]
5408 pub index: Option<Resource>,
5409 #[serde(default, skip_serializing_if = "Option::is_none")]
5410 pub shard_id: Option<u32>,
5411}
5412
5413pub const LODESTONE_API_MAINTENANCE_TASK_STATUS_FORMAT_VERSION: u16 = 1;
5414#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5415#[serde(deny_unknown_fields)]
5416pub struct MaintenanceTaskStatus {
5417 pub task_id: Identity,
5418 pub kind: String,
5419 pub scope: MaintenanceTaskScope,
5420 pub checkpoint_generation: U64,
5421 pub attempt_count: u32,
5422 pub admitted_at: U64,
5423 pub last_transition_at: U64,
5424 pub last_progress_at: U64,
5425 pub work_state: MaintenanceWorkState,
5426 pub state_since: U64,
5427 #[serde(default, skip_serializing_if = "Option::is_none")]
5428 pub defer_reason: Option<String>,
5429 pub cancellation_requested: bool,
5430 #[serde(default, skip_serializing_if = "Option::is_none")]
5431 pub retry_not_before: Option<U64>,
5432 #[serde(default, skip_serializing_if = "Option::is_none")]
5433 pub failure_at: Option<U64>,
5434 #[serde(default, skip_serializing_if = "Option::is_none")]
5435 pub lease_acquired_at: Option<U64>,
5436 #[serde(default, skip_serializing_if = "Option::is_none")]
5437 pub lease_expires_at: Option<U64>,
5438 #[serde(default, skip_serializing_if = "Option::is_none")]
5439 pub failure_class: Option<MaintenanceFailureClass>,
5440 #[serde(default, skip_serializing_if = "Option::is_none")]
5441 pub failure_code: Option<String>,
5442 pub operator_action_required: bool,
5443 #[serde(default, skip_serializing_if = "Option::is_none")]
5444 pub local_attempt: Option<MaintenanceAttemptObservation>,
5445}
5446
5447pub const LODESTONE_API_MAINTENANCE_STATUS_AGGREGATE_SHAPE_VERSION: u16 = 1;
5448pub const LODESTONE_API_MAINTENANCE_STATUS_AGGREGATE_FORMAT_VERSION: u16 = 2;
5449#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5450#[serde(deny_unknown_fields)]
5451pub struct MaintenanceStatusAggregate {
5452 pub format_version: u32,
5453 pub recovery_era: Identity,
5454 pub source_revision: U64,
5455 pub root_revision: U64,
5456 pub logical_observation_time: U64,
5457 #[serde(default, skip_serializing_if = "Option::is_none")]
5458 pub local_observation_millis: Option<U64>,
5459 pub total_incomplete: U64,
5460 pub parked_operator_required: U64,
5461 pub retry_wait: U64,
5462 pub retry_ready: U64,
5463 pub leased: U64,
5464 pub deferred: U64,
5465 pub runnable: U64,
5466 pub eligible_backlog: U64,
5467 pub cancellation_requested: U64,
5468 #[serde(default, skip_serializing_if = "Option::is_none")]
5469 pub oldest_backlog_age: Option<U64>,
5470 #[serde(default, skip_serializing_if = "Option::is_none")]
5471 pub oldest_runnable_age: Option<U64>,
5472 #[serde(default, skip_serializing_if = "Option::is_none")]
5473 pub oldest_retry_wait_age: Option<U64>,
5474 #[serde(default, skip_serializing_if = "Option::is_none")]
5475 pub oldest_parked_age: Option<U64>,
5476 #[serde(default, skip_serializing_if = "Option::is_none")]
5477 pub oldest_no_progress_age: Option<U64>,
5478 pub current_action_capacity: u32,
5479 pub maximum_action_capacity: u32,
5480 pub active_passes: U64,
5481 pub local_in_flight: U64,
5482 pub deadline_draining: U64,
5483 pub cancellation_draining: U64,
5484 pub claim_recovery_pending: U64,
5485 pub projection_refresh_pending: bool,
5486 #[serde(default, skip_serializing_if = "Option::is_none")]
5487 pub durable_last_progress_at: Option<U64>,
5488 pub tasks_claimed_total: U64,
5489 pub tasks_progressed_total: U64,
5490 pub tasks_completed_total: U64,
5491 pub task_retries_total: U64,
5492 pub task_failures_total: U64,
5493 pub deadline_failures_total: U64,
5494 pub cancellations_total: U64,
5495 pub overlay_capacity_exhaustions_total: U64,
5496 pub failure_classes: Vec<MaintenanceFailureClassCount>,
5497}
5498
5499pub const LODESTONE_API_RUNTIME_STATUS_DETAIL_FORMAT_VERSION: u16 = 1;
5500#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5501#[serde(deny_unknown_fields)]
5502pub struct RuntimeStatusDetail {
5503 pub metastore_revision: U64,
5504 pub root_revision: U64,
5505 pub logical_time: U64,
5506 pub degraded_dependencies: Vec<String>,
5507}
5508
5509pub const LODESTONE_API_RESULT_CACHE_STATUS_SHAPE_VERSION: u16 = 2;
5510pub const LODESTONE_API_RESULT_CACHE_STATUS_FORMAT_VERSION: u16 = 3;
5511#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5512#[serde(deny_unknown_fields)]
5513pub struct ResultCacheStatus {
5514 pub format_version: u32,
5515 pub hits: U64,
5516 pub misses: U64,
5517 pub admissions: U64,
5518 pub bypasses: U64,
5519 pub evictions: U64,
5520 pub collection_bytes: U64,
5521 pub collection_entries: u32,
5522}
5523
5524pub const LODESTONE_API_FIELD_PROMOTION_STATUS_SHAPE_VERSION: u16 = 1;
5525pub const LODESTONE_API_FIELD_PROMOTION_STATUS_FORMAT_VERSION: u16 = 3;
5526#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5527#[serde(deny_unknown_fields)]
5528pub struct FieldPromotionStatus {
5529 pub format_version: u32,
5530 pub index: Resource,
5531 pub mapping_generation: U64,
5532 pub policy_generation: U64,
5533 #[serde(default, skip_serializing_if = "Option::is_none")]
5534 pub last_decision_generation: Option<U64>,
5535 pub heat_records: u32,
5536 pub promoted_fields: u32,
5537 pub extra_bytes: U64,
5538 pub enabled: bool,
5539}
5540
5541pub const LODESTONE_API_OVERLOAD_SHARD_STATUS_SHAPE_VERSION: u16 = 2;
5542pub const LODESTONE_API_OVERLOAD_SHARD_STATUS_FORMAT_VERSION: u16 = 3;
5543#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5544#[serde(deny_unknown_fields)]
5545pub struct OverloadShardStatus {
5546 pub format_version: u32,
5547 pub shard_id: u32,
5548 pub writer_epoch: U64,
5549 pub configured_mode: String,
5550 pub effective_disposition: String,
5551 pub registered_through: U64,
5552 pub indexed_through: U64,
5553 pub lag_operations: U64,
5554 pub backlog_bytes: U64,
5555 pub oldest_age_millis: U64,
5556 pub collection_share_bytes: U64,
5557 pub recovery_ops_this_pass: u32,
5558 pub pending_overlay_documents: U64,
5559 #[serde(default, skip_serializing_if = "Option::is_none")]
5560 pub shed_reason: Option<String>,
5561}
5562
5563pub const LODESTONE_API_EXTERNAL_KEY_BINDING_FORMAT_VERSION: u16 = 1;
5564#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5565#[serde(deny_unknown_fields)]
5566pub struct ExternalKeyBinding {
5567 pub content_key_id: Identity,
5568 pub content_key_generation: U64,
5569 pub binding_id: Identity,
5570 pub binding_generation: U64,
5571 pub access_generation: U64,
5572 pub opaque_binding_base64: String,
5573 pub object_context_digest: Digest,
5574}
5575
5576pub const LODESTONE_API_EXTERNAL_KEY_RETIREMENT_TARGET_FORMAT_VERSION: u16 = 1;
5577#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5578#[serde(deny_unknown_fields)]
5579pub struct ExternalKeyRetirementTarget {
5580 pub content_key_id: Identity,
5581 pub content_key_generation: U64,
5582 pub binding_id: Identity,
5583 pub binding_generation: U64,
5584 pub access_generation: U64,
5585 pub object_context_digest: Digest,
5586}
5587
5588pub const LODESTONE_API_EXTERNAL_KEY_RETIREMENT_OUTCOME_FORMAT_VERSION: u16 = 1;
5589#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5590#[serde(rename_all = "snake_case")]
5591pub enum ExternalKeyRetirementOutcome {
5592 Retired,
5593 AlreadyAbsent,
5594}
5595
5596pub const LODESTONE_API_EXTERNAL_KEY_RETIREMENT_RECEIPT_SHAPE_VERSION: u16 = 1;
5597pub const LODESTONE_API_EXTERNAL_KEY_RETIREMENT_RECEIPT_FORMAT_VERSION: u16 = 1;
5598#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5599#[serde(deny_unknown_fields)]
5600pub struct ExternalKeyRetirementReceipt {
5601 pub format_version: u32,
5602 pub action_id: Digest,
5603 pub index: Resource,
5604 pub target: ExternalKeyRetirementTarget,
5605 pub outcome: ExternalKeyRetirementOutcome,
5606 pub authority_revision: U64,
5607 pub authority_digest: Digest,
5608}
5609
5610pub const LODESTONE_API_EXTERNAL_KEY_RETIREMENT_RESOLUTION_STATE_FORMAT_VERSION: u16 = 1;
5611#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5612#[serde(rename_all = "snake_case")]
5613pub enum ExternalKeyRetirementResolutionState {
5614 NotSubmitted,
5615 Pending,
5616 Retired,
5617 AlreadyAbsent,
5618 KnownRetired,
5619 ExpiredUnknown,
5620}
5621
5622pub const LODESTONE_API_ROLLUP_MEASURE_FORMAT_VERSION: u16 = 1;
5623#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5624#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
5625pub enum RollupMeasure {
5626 Count,
5627 Sum { field_path_digest: Digest },
5628 Min { field_path_digest: Digest },
5629 Max { field_path_digest: Digest },
5630}
5631
5632pub const LODESTONE_API_AGGREGATE_THEN_DELETE_POLICY_FORMAT_VERSION: u16 = 1;
5633#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5634#[serde(deny_unknown_fields)]
5635pub struct AggregateThenDeletePolicy {
5636 pub policy_id: Identity,
5637 pub policy_generation: U64,
5638 pub detail_retirement_acknowledged: bool,
5639 #[serde(default, skip_serializing_if = "Option::is_none")]
5640 pub expected_policy_generation: Option<U64>,
5641 pub timestamp_field_digest: Digest,
5642 pub bucket_width_millis: U64,
5643 pub bucket_alignment_millis: U64,
5644 pub dimensions: Vec<Digest>,
5645 pub measures: Vec<RollupMeasure>,
5646}
5647
5648pub const LODESTONE_API_LIFECYCLE_BINDING_STATUS_FORMAT_VERSION: u16 = 1;
5649#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5650#[serde(deny_unknown_fields)]
5651pub struct LifecycleBindingStatus {
5652 pub content_key_id: Identity,
5653 pub content_key_generation: U64,
5654 pub binding_id: Identity,
5655 pub binding_generation: U64,
5656 pub access_generation: U64,
5657}
5658
5659pub const LODESTONE_API_LIFECYCLE_ROLLUP_STATUS_FORMAT_VERSION: u16 = 1;
5660#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5661#[serde(deny_unknown_fields)]
5662pub struct LifecycleRollupStatus {
5663 pub policy_id: Identity,
5664 pub policy_generation: U64,
5665 pub ledger_revision: U64,
5666 pub coverages: u32,
5667 pub raw_retired_coverages: u32,
5668 pub detail_retirement_acknowledged: bool,
5669 pub query_contract_version: u32,
5670 pub timestamp_field_digest: Digest,
5671 pub bucket_width_millis: U64,
5672 pub bucket_alignment_millis: U64,
5673 pub dimensions: Vec<Digest>,
5674 pub measures: Vec<RollupMeasure>,
5675}
5676
5677pub const LODESTONE_API_LIFECYCLE_STATUS_SHAPE_VERSION: u16 = 2;
5678pub const LODESTONE_API_LIFECYCLE_STATUS_FORMAT_VERSION: u16 = 4;
5679#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5680#[serde(deny_unknown_fields)]
5681pub struct LifecycleStatus {
5682 pub format_version: u32,
5683 pub index: Resource,
5684 pub authority_revision: U64,
5685 pub active_bindings: Vec<LifecycleBindingStatus>,
5686 #[serde(default, skip_serializing_if = "Option::is_none")]
5687 pub rollup: Option<LifecycleRollupStatus>,
5688}
5689
5690pub const LODESTONE_API_QUOTA_LIMIT_FORMAT_VERSION: u16 = 1;
5691#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5692#[serde(deny_unknown_fields)]
5693pub struct QuotaLimit {
5694 pub dimension: String,
5695 pub maximum: U64,
5696 pub window_millis: U64,
5697}
5698
5699pub const LODESTONE_API_QUOTA_CONSUMPTION_FORMAT_VERSION: u16 = 1;
5700#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5701#[serde(deny_unknown_fields)]
5702pub struct QuotaConsumption {
5703 pub dimension: String,
5704 pub consumed: U64,
5705 pub window_millis: U64,
5706}
5707
5708pub const LODESTONE_API_QUOTA_UPDATE_FORMAT_VERSION: u16 = 1;
5709#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5710#[serde(deny_unknown_fields)]
5711pub struct QuotaUpdate {
5712 pub revision: U64,
5713 pub state: String,
5714}
5715
5716pub const LODESTONE_API_STORAGE_OVERALL_POSTURE_FORMAT_VERSION: u16 = 1;
5717#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5718#[serde(rename_all = "snake_case")]
5719pub enum StorageOverallPosture {
5720 FilesystemDevelopment,
5721 ProviderObjectStorage,
5722 S3CompatibleDevelopment,
5723 Mixed,
5724}
5725
5726pub const LODESTONE_API_STORAGE_PROFILE_ROLE_FORMAT_VERSION: u16 = 1;
5727#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5728#[serde(rename_all = "snake_case")]
5729pub enum StorageProfileRole {
5730 Control,
5731 DefaultWal,
5732 DefaultData,
5733}
5734
5735pub const LODESTONE_API_STORAGE_PROVIDER_POSTURE_FORMAT_VERSION: u16 = 1;
5736#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5737#[serde(rename_all = "snake_case")]
5738pub enum StorageProviderPosture {
5739 Aws,
5740 GoogleCloudStorage,
5741 AzureBlob,
5742 S3CompatibleDevelopment,
5743 FilesystemDevelopment,
5744}
5745
5746pub const LODESTONE_API_STORAGE_BACKEND_SERVICE_CLASS_FORMAT_VERSION: u16 = 1;
5747#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5748#[serde(rename_all = "snake_case")]
5749pub enum StorageBackendServiceClass {
5750 RegionalObject,
5751 ZonalLowLatency,
5752}
5753
5754pub const LODESTONE_API_STORAGE_PROFILE_ROLE_BINDING_FORMAT_VERSION: u16 = 1;
5755#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5756#[serde(deny_unknown_fields)]
5757pub struct StorageProfileRoleBinding {
5758 pub role: StorageProfileRole,
5759 pub authority_group: u32,
5760 pub provider: StorageProviderPosture,
5761 pub service_class: StorageBackendServiceClass,
5762}
5763
5764pub const LODESTONE_API_STORAGE_PROFILE_ATTESTATION_SHAPE_VERSION: u16 = 1;
5765pub const LODESTONE_API_STORAGE_PROFILE_ATTESTATION_FORMAT_VERSION: u16 = 1;
5766#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5767#[serde(deny_unknown_fields)]
5768pub struct StorageProfileAttestation {
5769 pub format_version: u32,
5770 pub configuration_generation: U64,
5771 pub overall_posture: StorageOverallPosture,
5772 pub roles: Vec<StorageProfileRoleBinding>,
5773 pub default_durability: ResourceDurabilityClass,
5774 pub default_storage: ResourceStorageClass,
5775 pub default_policy_digest: Digest,
5776 pub storage_profile_digest: Digest,
5777 pub attestation_digest: Digest,
5778}
5779
5780pub const LODESTONE_API_STORAGE_PROFILE_EXPECTATION_SHAPE_VERSION: u16 = 1;
5781pub const LODESTONE_API_STORAGE_PROFILE_EXPECTATION_FORMAT_VERSION: u16 = 1;
5782#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5783#[serde(deny_unknown_fields)]
5784pub struct StorageProfileExpectation {
5785 pub format_version: u32,
5786 #[serde(default, skip_serializing_if = "Option::is_none")]
5787 pub required_posture: Option<StorageOverallPosture>,
5788 #[serde(default, skip_serializing_if = "Option::is_none")]
5789 pub expected_storage_profile_digest: Option<Digest>,
5790}
5791
5792pub const LODESTONE_API_CORE_BINDING_FORMAT_VERSION: u16 = 3;
5793#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5794#[serde(deny_unknown_fields)]
5795pub struct CoreBinding {
5796 pub cluster_id: Identity,
5797 pub collection_id: Identity,
5798 pub configuration_generation: U64,
5799 pub native_endpoints: Vec<String>,
5800 pub selected_stream_endpoint: String,
5801 pub schema_id: String,
5802 pub schema_digest: Digest,
5803 pub storage_profile: StorageProfileAttestation,
5804}
5805
5806pub const LODESTONE_API_READINESS_OBSERVATION_FORMAT_VERSION: u16 = 1;
5807#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5808#[serde(deny_unknown_fields)]
5809pub struct ReadinessObservation {
5810 pub subject: String,
5811 pub state: String,
5812 #[serde(default, skip_serializing_if = "Option::is_none")]
5813 pub reason: Option<String>,
5814 pub revision: U64,
5815 pub observed_cut: U64,
5816}
5817
5818pub const LODESTONE_API_USAGE_DIMENSION_FORMAT_VERSION: u16 = 1;
5819#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5820#[serde(deny_unknown_fields)]
5821pub struct UsageDimension {
5822 pub name: String,
5823 pub value: String,
5824}
5825
5826pub const LODESTONE_API_PHYSICAL_USAGE_VALUE_FORMAT_VERSION: u16 = 2;
5827#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5828#[serde(deny_unknown_fields)]
5829pub struct PhysicalUsageValue {
5830 pub meter: String,
5831 pub unit: String,
5832 pub value: ExactDecimal,
5833}
5834
5835pub const LODESTONE_API_CORE_USAGE_UNITS_FORMAT_VERSION: u16 = 2;
5836#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5837#[serde(deny_unknown_fields)]
5838pub struct CoreUsageUnits {
5839 pub sequence: U64,
5840 pub record_identity: Digest,
5841 pub index_id: Identity,
5842 pub workload_class: WorkloadClass,
5843 pub window_start: U64,
5844 pub window_end: U64,
5845 pub meter_set_version: u32,
5846 pub dimensions: Vec<UsageDimension>,
5847 pub values: Vec<PhysicalUsageValue>,
5848 pub authority_revision: U64,
5849 pub source_digest: Digest,
5850}
5851
5852pub const LODESTONE_API_CORE_USAGE_CORRECTION_FORMAT_VERSION: u16 = 2;
5853#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5854#[serde(deny_unknown_fields)]
5855pub struct CoreUsageCorrection {
5856 pub sequence: U64,
5857 pub correction_sequence: U64,
5858 pub correction_identity: Digest,
5859 pub target_record_identity: Digest,
5860 pub index_id: Identity,
5861 pub workload_class: WorkloadClass,
5862 pub window_start: U64,
5863 pub window_end: U64,
5864 pub meter_set_version: u32,
5865 pub dimensions: Vec<UsageDimension>,
5866 pub values: Vec<PhysicalUsageValue>,
5867 pub reason_digest: Digest,
5868 pub authority_revision: U64,
5869 pub source_digest: Digest,
5870}
5871
5872pub const LODESTONE_API_INDEX_STORAGE_USAGE_FORMAT_VERSION: u16 = 1;
5873#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5874#[serde(deny_unknown_fields)]
5875pub struct IndexStorageUsage {
5876 pub index_id: Identity,
5877 pub logical_bytes: U64,
5878 pub exclusive_bytes: U64,
5879 pub shared_bytes: U64,
5880}
5881
5882pub const LODESTONE_API_COLLECTION_STORAGE_USAGE_SHAPE_VERSION: u16 = 1;
5883pub const LODESTONE_API_COLLECTION_STORAGE_USAGE_FORMAT_VERSION: u16 = 1;
5884#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5885#[serde(deny_unknown_fields)]
5886pub struct CollectionStorageUsage {
5887 pub format_version: u32,
5888 pub catalog_revision: U64,
5889 pub catalog_root_digest: Digest,
5890 pub current_physical_bytes: U64,
5891 pub retained_physical_bytes: U64,
5892 pub retained_unique_bytes: U64,
5893 pub retained_shared_bytes: U64,
5894 pub protected_roots: u32,
5895 pub indexes: Vec<IndexStorageUsage>,
5896 pub observation_digest: Digest,
5897}
5898
5899pub const LODESTONE_API_RESPONSE_META_SHAPE_VERSION: u16 = 1;
5900pub const LODESTONE_API_RESPONSE_META_FORMAT_VERSION: u16 = 1;
5901#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5902#[serde(deny_unknown_fields)]
5903pub struct ResponseMeta {
5904 pub format_version: u32,
5905 pub request_id: String,
5906 pub correlation_id: Identity,
5907 pub diagnostic_id: Identity,
5908}
5909
5910pub const LODESTONE_API_ERROR_DISPOSITION_FORMAT_VERSION: u16 = 1;
5911#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5912#[serde(rename_all = "snake_case")]
5913pub enum ErrorDisposition {
5914 NotSubmitted,
5915 Submitted,
5916 Resolved,
5917 KnownRetired,
5918 Indeterminate,
5919}
5920
5921pub const LODESTONE_API_RECOVERY_ACTION_FORMAT_VERSION: u16 = 1;
5922#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5923#[serde(rename_all = "snake_case")]
5924pub enum RecoveryAction {
5925 Retry,
5926 RetryAfter,
5927 RefreshCredential,
5928 RestartPage,
5929 ReduceRequest,
5930 Resolve,
5931 RefreshPrecondition,
5932 CorrectRange,
5933 Stop,
5934}
5935
5936pub const LODESTONE_API_LIMIT_CLASS_FORMAT_VERSION: u16 = 1;
5937#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5938#[serde(rename_all = "snake_case")]
5939pub enum LimitClass {
5940 RequestBound,
5941 CollectionQuota,
5942 EngineSafety,
5943}
5944
5945pub const LODESTONE_API_ERROR_DETAIL_FORMAT_VERSION: u16 = 3;
5946#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5947#[serde(tag = "code", rename_all = "snake_case", deny_unknown_fields)]
5948pub enum ErrorDetail {
5949 Aborted {
5950 reason: String,
5951 },
5952 DeadlineExceeded,
5953 InvalidRequest {
5954 #[serde(default, skip_serializing_if = "Option::is_none")]
5955 field: Option<String>,
5956 reason: String,
5957 },
5958 UnsupportedVersion {
5959 observed: u32,
5960 maximum_supported: u32,
5961 },
5962 Unauthenticated,
5963 PermissionDenied {
5964 #[serde(default, skip_serializing_if = "Option::is_none")]
5965 action: Option<String>,
5966 #[serde(default, skip_serializing_if = "Option::is_none")]
5967 workload_class: Option<WorkloadClass>,
5968 },
5969 NotFound {
5970 #[serde(default, skip_serializing_if = "Option::is_none")]
5971 resource: Option<String>,
5972 },
5973 Conflict {
5974 #[serde(default, skip_serializing_if = "Option::is_none")]
5975 expected_revision: Option<U64>,
5976 #[serde(default, skip_serializing_if = "Option::is_none")]
5977 observed_revision: Option<U64>,
5978 },
5979 StaleCursor {
5980 restart_count: u32,
5981 },
5982 RestartBudgetExhausted {
5983 maximum_restarts: u32,
5984 },
5985 LimitExceeded {
5986 class: LimitClass,
5987 limit_id: String,
5988 maximum: U64,
5989 },
5990 CapabilityUnavailable {
5991 #[serde(default, skip_serializing_if = "Option::is_none")]
5992 capability: Option<String>,
5993 },
5994 NotSubmitted {
5995 #[serde(default, skip_serializing_if = "Option::is_none")]
5996 retry_after_millis: Option<U64>,
5997 },
5998 SubmittedIndeterminate {
5999 #[serde(default, skip_serializing_if = "Option::is_none")]
6000 locator: Option<Locator>,
6001 },
6002 ExpiredUnknown {
6003 #[serde(default, skip_serializing_if = "Option::is_none")]
6004 locator: Option<Locator>,
6005 },
6006 SecretNotEscrowed,
6007 RetentionGap {
6008 retired_through: U64,
6009 },
6010 ArtifactRangeInvalid {
6011 maximum_bytes: U64,
6012 },
6013 ChecksumMismatch {
6014 expected: Digest,
6015 observed: Digest,
6016 },
6017 TemporarilyUnavailable {
6018 #[serde(default, skip_serializing_if = "Option::is_none")]
6019 retry_after_millis: Option<U64>,
6020 },
6021 Internal,
6022}
6023
6024pub const LODESTONE_API_CONNECTION_PROFILE_SHAPE_VERSION: u16 = 4;
6025pub const LODESTONE_API_CONNECTION_PROFILE_FORMAT_VERSION: u16 = 4;
6026#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6027#[serde(deny_unknown_fields)]
6028pub struct ConnectionProfile {
6029 pub format_version: u32,
6030 pub profile_generation: U64,
6031 pub native_endpoints: Vec<String>,
6032 pub selected_stream_endpoint: String,
6033 pub tls_server_name: String,
6034 pub tls_trust_sha256: Digest,
6035 pub expected_cluster_id: Identity,
6036 pub expected_collection_id: Identity,
6037 pub expected_principal_id: Identity,
6038 pub schema_id: String,
6039 pub schema_digest: Digest,
6040 pub credential_id: Identity,
6041 pub credential_generation: U64,
6042 #[serde(default, skip_serializing_if = "Option::is_none")]
6043 pub credential_expires_at: Option<U64>,
6044 pub secret_reference: String,
6045 #[serde(default, skip_serializing_if = "Option::is_none")]
6046 pub storage_profile_expectation: Option<StorageProfileExpectation>,
6047}
6048
6049#[derive(Clone, Copy, Debug, Eq, PartialEq)]
6050pub enum TypeKind {
6051 Enum,
6052 Struct,
6053 TaggedUnion,
6054}
6055#[derive(Clone, Copy, Debug, Eq, PartialEq)]
6056pub struct TypeContract {
6057 pub name: &'static str,
6058 pub shape_version: u16,
6059 pub instance_format_version: Option<u16>,
6060 pub kind: TypeKind,
6061 pub wire: bool,
6062}
6063pub const LODESTONE_API_TYPE_CONTRACTS: &[TypeContract] = &[
6064 TypeContract {
6065 name: "cursor",
6066 shape_version: 1,
6067 instance_format_version: None,
6068 kind: TypeKind::Struct,
6069 wire: true,
6070 },
6071 TypeContract {
6072 name: "locator",
6073 shape_version: 1,
6074 instance_format_version: None,
6075 kind: TypeKind::Struct,
6076 wire: true,
6077 },
6078 TypeContract {
6079 name: "resource",
6080 shape_version: 1,
6081 instance_format_version: None,
6082 kind: TypeKind::Struct,
6083 wire: true,
6084 },
6085 TypeContract {
6086 name: "read_cut_kind",
6087 shape_version: 1,
6088 instance_format_version: None,
6089 kind: TypeKind::Enum,
6090 wire: true,
6091 },
6092 TypeContract {
6093 name: "read_cut_index_evidence",
6094 shape_version: 1,
6095 instance_format_version: None,
6096 kind: TypeKind::Struct,
6097 wire: true,
6098 },
6099 TypeContract {
6100 name: "read_cut_evidence",
6101 shape_version: 1,
6102 instance_format_version: Some(1),
6103 kind: TypeKind::Struct,
6104 wire: true,
6105 },
6106 TypeContract {
6107 name: "table_snapshot_object_role",
6108 shape_version: 1,
6109 instance_format_version: None,
6110 kind: TypeKind::Enum,
6111 wire: true,
6112 },
6113 TypeContract {
6114 name: "table_snapshot_codec",
6115 shape_version: 1,
6116 instance_format_version: None,
6117 kind: TypeKind::Enum,
6118 wire: true,
6119 },
6120 TypeContract {
6121 name: "table_snapshot_object",
6122 shape_version: 1,
6123 instance_format_version: None,
6124 kind: TypeKind::Struct,
6125 wire: true,
6126 },
6127 TypeContract {
6128 name: "table_snapshot",
6129 shape_version: 1,
6130 instance_format_version: Some(1),
6131 kind: TypeKind::Struct,
6132 wire: true,
6133 },
6134 TypeContract {
6135 name: "table_snapshot_resolution_state",
6136 shape_version: 1,
6137 instance_format_version: None,
6138 kind: TypeKind::Enum,
6139 wire: true,
6140 },
6141 TypeContract {
6142 name: "table_snapshot_resolution",
6143 shape_version: 1,
6144 instance_format_version: None,
6145 kind: TypeKind::Struct,
6146 wire: true,
6147 },
6148 TypeContract {
6149 name: "table_snapshot_read",
6150 shape_version: 1,
6151 instance_format_version: None,
6152 kind: TypeKind::Struct,
6153 wire: true,
6154 },
6155 TypeContract {
6156 name: "logical_occupancy_counts",
6157 shape_version: 1,
6158 instance_format_version: None,
6159 kind: TypeKind::Struct,
6160 wire: true,
6161 },
6162 TypeContract {
6163 name: "logical_occupancy_gap_state",
6164 shape_version: 1,
6165 instance_format_version: None,
6166 kind: TypeKind::Enum,
6167 wire: true,
6168 },
6169 TypeContract {
6170 name: "logical_occupancy_snapshot_evidence",
6171 shape_version: 1,
6172 instance_format_version: Some(1),
6173 kind: TypeKind::Struct,
6174 wire: true,
6175 },
6176 TypeContract {
6177 name: "logical_occupancy_window_gap",
6178 shape_version: 1,
6179 instance_format_version: Some(1),
6180 kind: TypeKind::Struct,
6181 wire: true,
6182 },
6183 TypeContract {
6184 name: "field_promotion_configuration",
6185 shape_version: 1,
6186 instance_format_version: Some(3),
6187 kind: TypeKind::Struct,
6188 wire: true,
6189 },
6190 TypeContract {
6191 name: "overload_configuration",
6192 shape_version: 2,
6193 instance_format_version: Some(3),
6194 kind: TypeKind::Struct,
6195 wire: true,
6196 },
6197 TypeContract {
6198 name: "index_policies",
6199 shape_version: 1,
6200 instance_format_version: None,
6201 kind: TypeKind::Struct,
6202 wire: true,
6203 },
6204 TypeContract {
6205 name: "maintenance_budgets",
6206 shape_version: 1,
6207 instance_format_version: None,
6208 kind: TypeKind::Struct,
6209 wire: true,
6210 },
6211 TypeContract {
6212 name: "resource_durability_class",
6213 shape_version: 1,
6214 instance_format_version: None,
6215 kind: TypeKind::Enum,
6216 wire: true,
6217 },
6218 TypeContract {
6219 name: "resource_storage_class",
6220 shape_version: 1,
6221 instance_format_version: None,
6222 kind: TypeKind::Enum,
6223 wire: true,
6224 },
6225 TypeContract {
6226 name: "vector_quality_objective",
6227 shape_version: 1,
6228 instance_format_version: None,
6229 kind: TypeKind::Enum,
6230 wire: true,
6231 },
6232 TypeContract {
6233 name: "vector_indexing_objective",
6234 shape_version: 1,
6235 instance_format_version: None,
6236 kind: TypeKind::Enum,
6237 wire: true,
6238 },
6239 TypeContract {
6240 name: "vector_residency_intent",
6241 shape_version: 1,
6242 instance_format_version: None,
6243 kind: TypeKind::Enum,
6244 wire: true,
6245 },
6246 TypeContract {
6247 name: "vector_calibration_binding",
6248 shape_version: 1,
6249 instance_format_version: None,
6250 kind: TypeKind::Struct,
6251 wire: true,
6252 },
6253 TypeContract {
6254 name: "vector_resource_policy",
6255 shape_version: 2,
6256 instance_format_version: None,
6257 kind: TypeKind::Struct,
6258 wire: true,
6259 },
6260 TypeContract {
6261 name: "workload_class",
6262 shape_version: 1,
6263 instance_format_version: None,
6264 kind: TypeKind::Enum,
6265 wire: true,
6266 },
6267 TypeContract {
6268 name: "index_resource_spec",
6269 shape_version: 3,
6270 instance_format_version: Some(3),
6271 kind: TypeKind::Struct,
6272 wire: true,
6273 },
6274 TypeContract {
6275 name: "index_summary",
6276 shape_version: 1,
6277 instance_format_version: None,
6278 kind: TypeKind::Struct,
6279 wire: true,
6280 },
6281 TypeContract {
6282 name: "mapping_mode",
6283 shape_version: 1,
6284 instance_format_version: None,
6285 kind: TypeKind::Enum,
6286 wire: true,
6287 },
6288 TypeContract {
6289 name: "dynamic_mapping_policy",
6290 shape_version: 1,
6291 instance_format_version: None,
6292 kind: TypeKind::Enum,
6293 wire: true,
6294 },
6295 TypeContract {
6296 name: "mapping_analyzer",
6297 shape_version: 1,
6298 instance_format_version: None,
6299 kind: TypeKind::Enum,
6300 wire: true,
6301 },
6302 TypeContract {
6303 name: "keyword_normalizer",
6304 shape_version: 1,
6305 instance_format_version: None,
6306 kind: TypeKind::Enum,
6307 wire: true,
6308 },
6309 TypeContract {
6310 name: "vector_metric",
6311 shape_version: 1,
6312 instance_format_version: None,
6313 kind: TypeKind::Enum,
6314 wire: true,
6315 },
6316 TypeContract {
6317 name: "mapping_scalar",
6318 shape_version: 1,
6319 instance_format_version: None,
6320 kind: TypeKind::TaggedUnion,
6321 wire: true,
6322 },
6323 TypeContract {
6324 name: "sparse_vector_weight_type",
6325 shape_version: 1,
6326 instance_format_version: None,
6327 kind: TypeKind::Enum,
6328 wire: true,
6329 },
6330 TypeContract {
6331 name: "mapping_field_type",
6332 shape_version: 3,
6333 instance_format_version: None,
6334 kind: TypeKind::TaggedUnion,
6335 wire: true,
6336 },
6337 TypeContract {
6338 name: "mapping_field",
6339 shape_version: 1,
6340 instance_format_version: None,
6341 kind: TypeKind::Struct,
6342 wire: true,
6343 },
6344 TypeContract {
6345 name: "multi_field_projection",
6346 shape_version: 1,
6347 instance_format_version: None,
6348 kind: TypeKind::Struct,
6349 wire: true,
6350 },
6351 TypeContract {
6352 name: "analyzer_identity",
6353 shape_version: 1,
6354 instance_format_version: None,
6355 kind: TypeKind::Struct,
6356 wire: true,
6357 },
6358 TypeContract {
6359 name: "keyword_limit",
6360 shape_version: 1,
6361 instance_format_version: None,
6362 kind: TypeKind::Struct,
6363 wire: true,
6364 },
6365 TypeContract {
6366 name: "profile_privacy_action",
6367 shape_version: 1,
6368 instance_format_version: None,
6369 kind: TypeKind::Enum,
6370 wire: true,
6371 },
6372 TypeContract {
6373 name: "profile_privacy_field",
6374 shape_version: 1,
6375 instance_format_version: None,
6376 kind: TypeKind::TaggedUnion,
6377 wire: true,
6378 },
6379 TypeContract {
6380 name: "profile_privacy_rule",
6381 shape_version: 1,
6382 instance_format_version: None,
6383 kind: TypeKind::Struct,
6384 wire: true,
6385 },
6386 TypeContract {
6387 name: "profile_privacy_policy",
6388 shape_version: 1,
6389 instance_format_version: Some(1),
6390 kind: TypeKind::Struct,
6391 wire: true,
6392 },
6393 TypeContract {
6394 name: "mapping_record_model",
6395 shape_version: 3,
6396 instance_format_version: None,
6397 kind: TypeKind::TaggedUnion,
6398 wire: true,
6399 },
6400 TypeContract {
6401 name: "mapping",
6402 shape_version: 4,
6403 instance_format_version: Some(10),
6404 kind: TypeKind::Struct,
6405 wire: true,
6406 },
6407 TypeContract {
6408 name: "index_detail",
6409 shape_version: 1,
6410 instance_format_version: None,
6411 kind: TypeKind::Struct,
6412 wire: true,
6413 },
6414 TypeContract {
6415 name: "source_provider",
6416 shape_version: 1,
6417 instance_format_version: None,
6418 kind: TypeKind::Enum,
6419 wire: true,
6420 },
6421 TypeContract {
6422 name: "source_decoder",
6423 shape_version: 1,
6424 instance_format_version: None,
6425 kind: TypeKind::Enum,
6426 wire: true,
6427 },
6428 TypeContract {
6429 name: "source_replay_guarantees",
6430 shape_version: 1,
6431 instance_format_version: None,
6432 kind: TypeKind::Struct,
6433 wire: true,
6434 },
6435 TypeContract {
6436 name: "source_partition_configuration",
6437 shape_version: 1,
6438 instance_format_version: None,
6439 kind: TypeKind::Struct,
6440 wire: true,
6441 },
6442 TypeContract {
6443 name: "replayable_source_configuration",
6444 shape_version: 1,
6445 instance_format_version: None,
6446 kind: TypeKind::Struct,
6447 wire: true,
6448 },
6449 TypeContract {
6450 name: "source_partition_status",
6451 shape_version: 1,
6452 instance_format_version: None,
6453 kind: TypeKind::Struct,
6454 wire: true,
6455 },
6456 TypeContract {
6457 name: "replayable_source_status",
6458 shape_version: 1,
6459 instance_format_version: None,
6460 kind: TypeKind::Struct,
6461 wire: true,
6462 },
6463 TypeContract {
6464 name: "source_control_transition",
6465 shape_version: 1,
6466 instance_format_version: None,
6467 kind: TypeKind::Enum,
6468 wire: true,
6469 },
6470 TypeContract {
6471 name: "history_ledger_precondition",
6472 shape_version: 1,
6473 instance_format_version: None,
6474 kind: TypeKind::TaggedUnion,
6475 wire: true,
6476 },
6477 TypeContract {
6478 name: "history_retention_policy",
6479 shape_version: 1,
6480 instance_format_version: None,
6481 kind: TypeKind::Struct,
6482 wire: true,
6483 },
6484 TypeContract {
6485 name: "history_selector",
6486 shape_version: 1,
6487 instance_format_version: None,
6488 kind: TypeKind::TaggedUnion,
6489 wire: true,
6490 },
6491 TypeContract {
6492 name: "history_hold",
6493 shape_version: 1,
6494 instance_format_version: None,
6495 kind: TypeKind::Struct,
6496 wire: true,
6497 },
6498 TypeContract {
6499 name: "history_status",
6500 shape_version: 1,
6501 instance_format_version: None,
6502 kind: TypeKind::Struct,
6503 wire: true,
6504 },
6505 TypeContract {
6506 name: "history_resolution",
6507 shape_version: 1,
6508 instance_format_version: None,
6509 kind: TypeKind::Struct,
6510 wire: true,
6511 },
6512 TypeContract {
6513 name: "index_reference",
6514 shape_version: 1,
6515 instance_format_version: None,
6516 kind: TypeKind::Struct,
6517 wire: true,
6518 },
6519 TypeContract {
6520 name: "alias_target",
6521 shape_version: 1,
6522 instance_format_version: None,
6523 kind: TypeKind::Struct,
6524 wire: true,
6525 },
6526 TypeContract {
6527 name: "alias_summary",
6528 shape_version: 1,
6529 instance_format_version: None,
6530 kind: TypeKind::Struct,
6531 wire: true,
6532 },
6533 TypeContract {
6534 name: "alias_detail",
6535 shape_version: 1,
6536 instance_format_version: None,
6537 kind: TypeKind::Struct,
6538 wire: true,
6539 },
6540 TypeContract {
6541 name: "data_stream_summary",
6542 shape_version: 1,
6543 instance_format_version: None,
6544 kind: TypeKind::Struct,
6545 wire: true,
6546 },
6547 TypeContract {
6548 name: "component_template_binding",
6549 shape_version: 1,
6550 instance_format_version: None,
6551 kind: TypeKind::Struct,
6552 wire: true,
6553 },
6554 TypeContract {
6555 name: "index_template_binding",
6556 shape_version: 1,
6557 instance_format_version: None,
6558 kind: TypeKind::Struct,
6559 wire: true,
6560 },
6561 TypeContract {
6562 name: "lifecycle_policy_binding",
6563 shape_version: 1,
6564 instance_format_version: None,
6565 kind: TypeKind::Struct,
6566 wire: true,
6567 },
6568 TypeContract {
6569 name: "data_stream_detail",
6570 shape_version: 2,
6571 instance_format_version: None,
6572 kind: TypeKind::Struct,
6573 wire: true,
6574 },
6575 TypeContract {
6576 name: "component_template_summary",
6577 shape_version: 1,
6578 instance_format_version: None,
6579 kind: TypeKind::Struct,
6580 wire: true,
6581 },
6582 TypeContract {
6583 name: "component_template_detail",
6584 shape_version: 1,
6585 instance_format_version: None,
6586 kind: TypeKind::Struct,
6587 wire: true,
6588 },
6589 TypeContract {
6590 name: "index_template_summary",
6591 shape_version: 1,
6592 instance_format_version: None,
6593 kind: TypeKind::Struct,
6594 wire: true,
6595 },
6596 TypeContract {
6597 name: "index_template_detail",
6598 shape_version: 1,
6599 instance_format_version: None,
6600 kind: TypeKind::Struct,
6601 wire: true,
6602 },
6603 TypeContract {
6604 name: "ingest_pipeline_summary",
6605 shape_version: 1,
6606 instance_format_version: None,
6607 kind: TypeKind::Struct,
6608 wire: true,
6609 },
6610 TypeContract {
6611 name: "ingest_pipeline_detail",
6612 shape_version: 1,
6613 instance_format_version: None,
6614 kind: TypeKind::Struct,
6615 wire: true,
6616 },
6617 TypeContract {
6618 name: "ingest_pipeline_selection",
6619 shape_version: 1,
6620 instance_format_version: None,
6621 kind: TypeKind::Struct,
6622 wire: true,
6623 },
6624 TypeContract {
6625 name: "lifecycle_policy_summary",
6626 shape_version: 1,
6627 instance_format_version: None,
6628 kind: TypeKind::Struct,
6629 wire: true,
6630 },
6631 TypeContract {
6632 name: "rollover_thresholds",
6633 shape_version: 1,
6634 instance_format_version: None,
6635 kind: TypeKind::Struct,
6636 wire: true,
6637 },
6638 TypeContract {
6639 name: "retention_policy",
6640 shape_version: 1,
6641 instance_format_version: None,
6642 kind: TypeKind::Struct,
6643 wire: true,
6644 },
6645 TypeContract {
6646 name: "lifecycle_policy_detail",
6647 shape_version: 2,
6648 instance_format_version: None,
6649 kind: TypeKind::Struct,
6650 wire: true,
6651 },
6652 TypeContract {
6653 name: "text_query_operator",
6654 shape_version: 1,
6655 instance_format_version: None,
6656 kind: TypeKind::Enum,
6657 wire: true,
6658 },
6659 TypeContract {
6660 name: "text_query_analyzer",
6661 shape_version: 1,
6662 instance_format_version: None,
6663 kind: TypeKind::Enum,
6664 wire: true,
6665 },
6666 TypeContract {
6667 name: "zero_terms_query",
6668 shape_version: 1,
6669 instance_format_version: None,
6670 kind: TypeKind::Enum,
6671 wire: true,
6672 },
6673 TypeContract {
6674 name: "text_query_options",
6675 shape_version: 1,
6676 instance_format_version: None,
6677 kind: TypeKind::Struct,
6678 wire: true,
6679 },
6680 TypeContract {
6681 name: "multi_match_mode",
6682 shape_version: 1,
6683 instance_format_version: None,
6684 kind: TypeKind::Enum,
6685 wire: true,
6686 },
6687 TypeContract {
6688 name: "multi_match_field",
6689 shape_version: 1,
6690 instance_format_version: None,
6691 kind: TypeKind::Struct,
6692 wire: true,
6693 },
6694 TypeContract {
6695 name: "multi_match_options",
6696 shape_version: 1,
6697 instance_format_version: None,
6698 kind: TypeKind::Struct,
6699 wire: true,
6700 },
6701 TypeContract {
6702 name: "sort_order",
6703 shape_version: 1,
6704 instance_format_version: None,
6705 kind: TypeKind::Enum,
6706 wire: true,
6707 },
6708 TypeContract {
6709 name: "sort_mode",
6710 shape_version: 1,
6711 instance_format_version: None,
6712 kind: TypeKind::Enum,
6713 wire: true,
6714 },
6715 TypeContract {
6716 name: "missing_order",
6717 shape_version: 1,
6718 instance_format_version: None,
6719 kind: TypeKind::Enum,
6720 wire: true,
6721 },
6722 TypeContract {
6723 name: "nested_score_mode",
6724 shape_version: 1,
6725 instance_format_version: None,
6726 kind: TypeKind::Enum,
6727 wire: true,
6728 },
6729 TypeContract {
6730 name: "nested_inner_hits",
6731 shape_version: 1,
6732 instance_format_version: None,
6733 kind: TypeKind::Struct,
6734 wire: true,
6735 },
6736 TypeContract {
6737 name: "sort_spec",
6738 shape_version: 1,
6739 instance_format_version: None,
6740 kind: TypeKind::TaggedUnion,
6741 wire: true,
6742 },
6743 TypeContract {
6744 name: "query",
6745 shape_version: 1,
6746 instance_format_version: None,
6747 kind: TypeKind::TaggedUnion,
6748 wire: true,
6749 },
6750 TypeContract {
6751 name: "dense_retrieval_mode",
6752 shape_version: 1,
6753 instance_format_version: None,
6754 kind: TypeKind::Enum,
6755 wire: true,
6756 },
6757 TypeContract {
6758 name: "vector_achieved_mode",
6759 shape_version: 1,
6760 instance_format_version: None,
6761 kind: TypeKind::Enum,
6762 wire: true,
6763 },
6764 TypeContract {
6765 name: "vector_branch_diagnostics",
6766 shape_version: 2,
6767 instance_format_version: None,
6768 kind: TypeKind::Struct,
6769 wire: true,
6770 },
6771 TypeContract {
6772 name: "dense_vector_element_type",
6773 shape_version: 1,
6774 instance_format_version: None,
6775 kind: TypeKind::Enum,
6776 wire: true,
6777 },
6778 TypeContract {
6779 name: "dense_vector_byte_order",
6780 shape_version: 1,
6781 instance_format_version: None,
6782 kind: TypeKind::Enum,
6783 wire: true,
6784 },
6785 TypeContract {
6786 name: "vector_value",
6787 shape_version: 1,
6788 instance_format_version: None,
6789 kind: TypeKind::TaggedUnion,
6790 wire: true,
6791 },
6792 TypeContract {
6793 name: "sparse_vector_entry",
6794 shape_version: 1,
6795 instance_format_version: None,
6796 kind: TypeKind::Struct,
6797 wire: true,
6798 },
6799 TypeContract {
6800 name: "sparse_vector_value",
6801 shape_version: 1,
6802 instance_format_version: None,
6803 kind: TypeKind::Struct,
6804 wire: true,
6805 },
6806 TypeContract {
6807 name: "vector_set_value",
6808 shape_version: 1,
6809 instance_format_version: None,
6810 kind: TypeKind::Struct,
6811 wire: true,
6812 },
6813 TypeContract {
6814 name: "vector_evaluation_snapshot",
6815 shape_version: 1,
6816 instance_format_version: None,
6817 kind: TypeKind::TaggedUnion,
6818 wire: true,
6819 },
6820 TypeContract {
6821 name: "vector_evaluation_query_set",
6822 shape_version: 1,
6823 instance_format_version: None,
6824 kind: TypeKind::TaggedUnion,
6825 wire: true,
6826 },
6827 TypeContract {
6828 name: "vector_evaluation_budget",
6829 shape_version: 1,
6830 instance_format_version: None,
6831 kind: TypeKind::Struct,
6832 wire: true,
6833 },
6834 TypeContract {
6835 name: "vector_candidate_policy",
6836 shape_version: 1,
6837 instance_format_version: None,
6838 kind: TypeKind::Enum,
6839 wire: true,
6840 },
6841 TypeContract {
6842 name: "vector_calibration_objective",
6843 shape_version: 1,
6844 instance_format_version: None,
6845 kind: TypeKind::Enum,
6846 wire: true,
6847 },
6848 TypeContract {
6849 name: "vector_strategy_profile",
6850 shape_version: 1,
6851 instance_format_version: None,
6852 kind: TypeKind::Enum,
6853 wire: true,
6854 },
6855 TypeContract {
6856 name: "vector_evaluation_work",
6857 shape_version: 1,
6858 instance_format_version: None,
6859 kind: TypeKind::Struct,
6860 wire: true,
6861 },
6862 TypeContract {
6863 name: "vector_evaluation_error_code",
6864 shape_version: 1,
6865 instance_format_version: None,
6866 kind: TypeKind::Enum,
6867 wire: true,
6868 },
6869 TypeContract {
6870 name: "vector_evaluation_error",
6871 shape_version: 1,
6872 instance_format_version: None,
6873 kind: TypeKind::Struct,
6874 wire: true,
6875 },
6876 TypeContract {
6877 name: "vector_recall_result",
6878 shape_version: 1,
6879 instance_format_version: Some(1),
6880 kind: TypeKind::Struct,
6881 wire: true,
6882 },
6883 TypeContract {
6884 name: "vector_calibration_candidate",
6885 shape_version: 1,
6886 instance_format_version: None,
6887 kind: TypeKind::Struct,
6888 wire: true,
6889 },
6890 TypeContract {
6891 name: "vector_calibration_result",
6892 shape_version: 1,
6893 instance_format_version: Some(1),
6894 kind: TypeKind::Struct,
6895 wire: true,
6896 },
6897 TypeContract {
6898 name: "vector_diagnostic_result",
6899 shape_version: 1,
6900 instance_format_version: None,
6901 kind: TypeKind::TaggedUnion,
6902 wire: true,
6903 },
6904 TypeContract {
6905 name: "vector_warm_component",
6906 shape_version: 1,
6907 instance_format_version: None,
6908 kind: TypeKind::Enum,
6909 wire: true,
6910 },
6911 TypeContract {
6912 name: "vector_warm_state",
6913 shape_version: 1,
6914 instance_format_version: None,
6915 kind: TypeKind::Enum,
6916 wire: true,
6917 },
6918 TypeContract {
6919 name: "vector_warm_achievement",
6920 shape_version: 1,
6921 instance_format_version: None,
6922 kind: TypeKind::Struct,
6923 wire: true,
6924 },
6925 TypeContract {
6926 name: "vector_warm_result",
6927 shape_version: 1,
6928 instance_format_version: Some(1),
6929 kind: TypeKind::Struct,
6930 wire: true,
6931 },
6932 TypeContract {
6933 name: "dense_retrieval_threshold",
6934 shape_version: 1,
6935 instance_format_version: None,
6936 kind: TypeKind::TaggedUnion,
6937 wire: true,
6938 },
6939 TypeContract {
6940 name: "retrieval_branch",
6941 shape_version: 3,
6942 instance_format_version: None,
6943 kind: TypeKind::TaggedUnion,
6944 wire: true,
6945 },
6946 TypeContract {
6947 name: "weighted_rrf_fusion",
6948 shape_version: 1,
6949 instance_format_version: None,
6950 kind: TypeKind::Struct,
6951 wire: true,
6952 },
6953 TypeContract {
6954 name: "retrieval_plan",
6955 shape_version: 1,
6956 instance_format_version: Some(1),
6957 kind: TypeKind::Struct,
6958 wire: true,
6959 },
6960 TypeContract {
6961 name: "histogram_bounds",
6962 shape_version: 1,
6963 instance_format_version: None,
6964 kind: TypeKind::Struct,
6965 wire: true,
6966 },
6967 TypeContract {
6968 name: "date_histogram_bounds",
6969 shape_version: 1,
6970 instance_format_version: None,
6971 kind: TypeKind::Struct,
6972 wire: true,
6973 },
6974 TypeContract {
6975 name: "approximation_algorithm",
6976 shape_version: 1,
6977 instance_format_version: None,
6978 kind: TypeKind::Enum,
6979 wire: true,
6980 },
6981 TypeContract {
6982 name: "approximation",
6983 shape_version: 1,
6984 instance_format_version: None,
6985 kind: TypeKind::Struct,
6986 wire: true,
6987 },
6988 TypeContract {
6989 name: "percentile_value",
6990 shape_version: 1,
6991 instance_format_version: None,
6992 kind: TypeKind::Struct,
6993 wire: true,
6994 },
6995 TypeContract {
6996 name: "approximate_percentile_value",
6997 shape_version: 1,
6998 instance_format_version: None,
6999 kind: TypeKind::Struct,
7000 wire: true,
7001 },
7002 TypeContract {
7003 name: "time_series_operator",
7004 shape_version: 1,
7005 instance_format_version: None,
7006 kind: TypeKind::Enum,
7007 wire: true,
7008 },
7009 TypeContract {
7010 name: "time_series_missing_data",
7011 shape_version: 1,
7012 instance_format_version: None,
7013 kind: TypeKind::Enum,
7014 wire: true,
7015 },
7016 TypeContract {
7017 name: "time_series_quantile_mode",
7018 shape_version: 1,
7019 instance_format_version: None,
7020 kind: TypeKind::Enum,
7021 wire: true,
7022 },
7023 TypeContract {
7024 name: "time_series_bucket_state",
7025 shape_version: 1,
7026 instance_format_version: None,
7027 kind: TypeKind::Enum,
7028 wire: true,
7029 },
7030 TypeContract {
7031 name: "time_series_quantile_value",
7032 shape_version: 1,
7033 instance_format_version: None,
7034 kind: TypeKind::Struct,
7035 wire: true,
7036 },
7037 TypeContract {
7038 name: "time_series_value",
7039 shape_version: 1,
7040 instance_format_version: None,
7041 kind: TypeKind::TaggedUnion,
7042 wire: true,
7043 },
7044 TypeContract {
7045 name: "time_series_bucket",
7046 shape_version: 1,
7047 instance_format_version: None,
7048 kind: TypeKind::Struct,
7049 wire: true,
7050 },
7051 TypeContract {
7052 name: "relationship_traversal_direction",
7053 shape_version: 1,
7054 instance_format_version: None,
7055 kind: TypeKind::Enum,
7056 wire: true,
7057 },
7058 TypeContract {
7059 name: "relationship_traversal_filter",
7060 shape_version: 1,
7061 instance_format_version: None,
7062 kind: TypeKind::Struct,
7063 wire: true,
7064 },
7065 TypeContract {
7066 name: "relationship_traversal_budget",
7067 shape_version: 1,
7068 instance_format_version: None,
7069 kind: TypeKind::Struct,
7070 wire: true,
7071 },
7072 TypeContract {
7073 name: "traversed_relationship",
7074 shape_version: 1,
7075 instance_format_version: None,
7076 kind: TypeKind::Struct,
7077 wire: true,
7078 },
7079 TypeContract {
7080 name: "profile_query_operation",
7081 shape_version: 1,
7082 instance_format_version: None,
7083 kind: TypeKind::Enum,
7084 wire: true,
7085 },
7086 TypeContract {
7087 name: "profile_group_by",
7088 shape_version: 1,
7089 instance_format_version: None,
7090 kind: TypeKind::TaggedUnion,
7091 wire: true,
7092 },
7093 TypeContract {
7094 name: "profile_query_filter",
7095 shape_version: 1,
7096 instance_format_version: None,
7097 kind: TypeKind::Struct,
7098 wire: true,
7099 },
7100 TypeContract {
7101 name: "profile_query_budget",
7102 shape_version: 1,
7103 instance_format_version: None,
7104 kind: TypeKind::Struct,
7105 wire: true,
7106 },
7107 TypeContract {
7108 name: "profile_query_row",
7109 shape_version: 1,
7110 instance_format_version: None,
7111 kind: TypeKind::Struct,
7112 wire: true,
7113 },
7114 TypeContract {
7115 name: "temporal_input",
7116 shape_version: 1,
7117 instance_format_version: None,
7118 kind: TypeKind::Struct,
7119 wire: true,
7120 },
7121 TypeContract {
7122 name: "temporal_pattern",
7123 shape_version: 1,
7124 instance_format_version: None,
7125 kind: TypeKind::TaggedUnion,
7126 wire: true,
7127 },
7128 TypeContract {
7129 name: "historical_temporal_definition",
7130 shape_version: 1,
7131 instance_format_version: Some(1),
7132 kind: TypeKind::Struct,
7133 wire: true,
7134 },
7135 TypeContract {
7136 name: "temporal_evidence_status",
7137 shape_version: 2,
7138 instance_format_version: None,
7139 kind: TypeKind::Enum,
7140 wire: true,
7141 },
7142 TypeContract {
7143 name: "temporal_source_event",
7144 shape_version: 1,
7145 instance_format_version: None,
7146 kind: TypeKind::Struct,
7147 wire: true,
7148 },
7149 TypeContract {
7150 name: "temporal_evidence",
7151 shape_version: 2,
7152 instance_format_version: None,
7153 kind: TypeKind::Struct,
7154 wire: true,
7155 },
7156 TypeContract {
7157 name: "continuous_temporal_start",
7158 shape_version: 1,
7159 instance_format_version: None,
7160 kind: TypeKind::TaggedUnion,
7161 wire: true,
7162 },
7163 TypeContract {
7164 name: "continuous_temporal_watermark_policy",
7165 shape_version: 1,
7166 instance_format_version: None,
7167 kind: TypeKind::TaggedUnion,
7168 wire: true,
7169 },
7170 TypeContract {
7171 name: "continuous_temporal_late_data_policy",
7172 shape_version: 1,
7173 instance_format_version: None,
7174 kind: TypeKind::TaggedUnion,
7175 wire: true,
7176 },
7177 TypeContract {
7178 name: "continuous_temporal_output",
7179 shape_version: 1,
7180 instance_format_version: None,
7181 kind: TypeKind::TaggedUnion,
7182 wire: true,
7183 },
7184 TypeContract {
7185 name: "continuous_temporal_definition",
7186 shape_version: 1,
7187 instance_format_version: Some(1),
7188 kind: TypeKind::Struct,
7189 wire: true,
7190 },
7191 TypeContract {
7192 name: "continuous_temporal_frontier",
7193 shape_version: 1,
7194 instance_format_version: None,
7195 kind: TypeKind::Struct,
7196 wire: true,
7197 },
7198 TypeContract {
7199 name: "continuous_temporal_available_frontier",
7200 shape_version: 1,
7201 instance_format_version: None,
7202 kind: TypeKind::Struct,
7203 wire: true,
7204 },
7205 TypeContract {
7206 name: "continuous_temporal_gap_reason",
7207 shape_version: 1,
7208 instance_format_version: None,
7209 kind: TypeKind::Enum,
7210 wire: true,
7211 },
7212 TypeContract {
7213 name: "continuous_temporal_gap",
7214 shape_version: 1,
7215 instance_format_version: None,
7216 kind: TypeKind::Struct,
7217 wire: true,
7218 },
7219 TypeContract {
7220 name: "continuous_temporal_evaluation",
7221 shape_version: 1,
7222 instance_format_version: Some(1),
7223 kind: TypeKind::Struct,
7224 wire: true,
7225 },
7226 TypeContract {
7227 name: "composite_order",
7228 shape_version: 1,
7229 instance_format_version: None,
7230 kind: TypeKind::Enum,
7231 wire: true,
7232 },
7233 TypeContract {
7234 name: "composite_source",
7235 shape_version: 1,
7236 instance_format_version: None,
7237 kind: TypeKind::TaggedUnion,
7238 wire: true,
7239 },
7240 TypeContract {
7241 name: "aggregation",
7242 shape_version: 3,
7243 instance_format_version: None,
7244 kind: TypeKind::TaggedUnion,
7245 wire: true,
7246 },
7247 TypeContract {
7248 name: "nested_search_hit",
7249 shape_version: 2,
7250 instance_format_version: None,
7251 kind: TypeKind::Struct,
7252 wire: true,
7253 },
7254 TypeContract {
7255 name: "named_nested_inner_hits_result",
7256 shape_version: 1,
7257 instance_format_version: None,
7258 kind: TypeKind::Struct,
7259 wire: true,
7260 },
7261 TypeContract {
7262 name: "fragment_boundary",
7263 shape_version: 1,
7264 instance_format_version: None,
7265 kind: TypeKind::Enum,
7266 wire: true,
7267 },
7268 TypeContract {
7269 name: "fragment_offset_encoding",
7270 shape_version: 1,
7271 instance_format_version: None,
7272 kind: TypeKind::Enum,
7273 wire: true,
7274 },
7275 TypeContract {
7276 name: "fragment_ranker",
7277 shape_version: 1,
7278 instance_format_version: None,
7279 kind: TypeKind::Enum,
7280 wire: true,
7281 },
7282 TypeContract {
7283 name: "fragment_request",
7284 shape_version: 1,
7285 instance_format_version: None,
7286 kind: TypeKind::Struct,
7287 wire: true,
7288 },
7289 TypeContract {
7290 name: "search_fragment",
7291 shape_version: 1,
7292 instance_format_version: None,
7293 kind: TypeKind::Struct,
7294 wire: true,
7295 },
7296 TypeContract {
7297 name: "numeric_feature_transform",
7298 shape_version: 1,
7299 instance_format_version: None,
7300 kind: TypeKind::TaggedUnion,
7301 wire: true,
7302 },
7303 TypeContract {
7304 name: "numeric_result_feature",
7305 shape_version: 1,
7306 instance_format_version: None,
7307 kind: TypeKind::Struct,
7308 wire: true,
7309 },
7310 TypeContract {
7311 name: "result_feature_request",
7312 shape_version: 1,
7313 instance_format_version: None,
7314 kind: TypeKind::Struct,
7315 wire: true,
7316 },
7317 TypeContract {
7318 name: "result_diversification",
7319 shape_version: 1,
7320 instance_format_version: None,
7321 kind: TypeKind::Struct,
7322 wire: true,
7323 },
7324 TypeContract {
7325 name: "source_projection",
7326 shape_version: 1,
7327 instance_format_version: None,
7328 kind: TypeKind::TaggedUnion,
7329 wire: true,
7330 },
7331 TypeContract {
7332 name: "branch_score_kind",
7333 shape_version: 2,
7334 instance_format_version: None,
7335 kind: TypeKind::Enum,
7336 wire: true,
7337 },
7338 TypeContract {
7339 name: "result_feature",
7340 shape_version: 1,
7341 instance_format_version: None,
7342 kind: TypeKind::TaggedUnion,
7343 wire: true,
7344 },
7345 TypeContract {
7346 name: "native_record_locator",
7347 shape_version: 1,
7348 instance_format_version: None,
7349 kind: TypeKind::Struct,
7350 wire: true,
7351 },
7352 TypeContract {
7353 name: "search_hit",
7354 shape_version: 4,
7355 instance_format_version: None,
7356 kind: TypeKind::Struct,
7357 wire: true,
7358 },
7359 TypeContract {
7360 name: "record_erasure_state",
7361 shape_version: 1,
7362 instance_format_version: None,
7363 kind: TypeKind::Enum,
7364 wire: true,
7365 },
7366 TypeContract {
7367 name: "record_erasure_receipt",
7368 shape_version: 1,
7369 instance_format_version: None,
7370 kind: TypeKind::Struct,
7371 wire: true,
7372 },
7373 TypeContract {
7374 name: "aggregation_bucket",
7375 shape_version: 1,
7376 instance_format_version: None,
7377 kind: TypeKind::Struct,
7378 wire: true,
7379 },
7380 TypeContract {
7381 name: "aggregation_result",
7382 shape_version: 3,
7383 instance_format_version: None,
7384 kind: TypeKind::TaggedUnion,
7385 wire: true,
7386 },
7387 TypeContract {
7388 name: "shard_counts",
7389 shape_version: 1,
7390 instance_format_version: None,
7391 kind: TypeKind::Struct,
7392 wire: true,
7393 },
7394 TypeContract {
7395 name: "total_hits_relation",
7396 shape_version: 1,
7397 instance_format_version: None,
7398 kind: TypeKind::Enum,
7399 wire: true,
7400 },
7401 TypeContract {
7402 name: "search_total",
7403 shape_version: 1,
7404 instance_format_version: None,
7405 kind: TypeKind::Struct,
7406 wire: true,
7407 },
7408 TypeContract {
7409 name: "search_execution_freshness",
7410 shape_version: 1,
7411 instance_format_version: None,
7412 kind: TypeKind::Enum,
7413 wire: true,
7414 },
7415 TypeContract {
7416 name: "search_freshness",
7417 shape_version: 1,
7418 instance_format_version: None,
7419 kind: TypeKind::Enum,
7420 wire: true,
7421 },
7422 TypeContract {
7423 name: "search_degradation_reason",
7424 shape_version: 1,
7425 instance_format_version: None,
7426 kind: TypeKind::Enum,
7427 wire: true,
7428 },
7429 TypeContract {
7430 name: "search_achievement",
7431 shape_version: 1,
7432 instance_format_version: None,
7433 kind: TypeKind::Struct,
7434 wire: true,
7435 },
7436 TypeContract {
7437 name: "search_failure_stage",
7438 shape_version: 1,
7439 instance_format_version: None,
7440 kind: TypeKind::Enum,
7441 wire: true,
7442 },
7443 TypeContract {
7444 name: "search_failure_reason",
7445 shape_version: 1,
7446 instance_format_version: None,
7447 kind: TypeKind::Enum,
7448 wire: true,
7449 },
7450 TypeContract {
7451 name: "collection_shard",
7452 shape_version: 1,
7453 instance_format_version: None,
7454 kind: TypeKind::Struct,
7455 wire: true,
7456 },
7457 TypeContract {
7458 name: "search_partial_failure",
7459 shape_version: 1,
7460 instance_format_version: None,
7461 kind: TypeKind::Struct,
7462 wire: true,
7463 },
7464 TypeContract {
7465 name: "artifact",
7466 shape_version: 1,
7467 instance_format_version: None,
7468 kind: TypeKind::Struct,
7469 wire: true,
7470 },
7471 TypeContract {
7472 name: "portability_storage_capability",
7473 shape_version: 1,
7474 instance_format_version: None,
7475 kind: TypeKind::Struct,
7476 wire: true,
7477 },
7478 TypeContract {
7479 name: "collection_export_artifact",
7480 shape_version: 1,
7481 instance_format_version: None,
7482 kind: TypeKind::Struct,
7483 wire: true,
7484 },
7485 TypeContract {
7486 name: "collection_transfer_sequence",
7487 shape_version: 1,
7488 instance_format_version: None,
7489 kind: TypeKind::Struct,
7490 wire: true,
7491 },
7492 TypeContract {
7493 name: "collection_transfer_artifact",
7494 shape_version: 1,
7495 instance_format_version: None,
7496 kind: TypeKind::Struct,
7497 wire: true,
7498 },
7499 TypeContract {
7500 name: "collection_standby_state",
7501 shape_version: 1,
7502 instance_format_version: None,
7503 kind: TypeKind::Enum,
7504 wire: true,
7505 },
7506 TypeContract {
7507 name: "collection_standby",
7508 shape_version: 1,
7509 instance_format_version: None,
7510 kind: TypeKind::Struct,
7511 wire: true,
7512 },
7513 TypeContract {
7514 name: "portability_key_capability_reference_state",
7515 shape_version: 1,
7516 instance_format_version: None,
7517 kind: TypeKind::Enum,
7518 wire: true,
7519 },
7520 TypeContract {
7521 name: "collection_export_retirement",
7522 shape_version: 1,
7523 instance_format_version: None,
7524 kind: TypeKind::Struct,
7525 wire: true,
7526 },
7527 TypeContract {
7528 name: "index_transfer_page",
7529 shape_version: 1,
7530 instance_format_version: None,
7531 kind: TypeKind::Struct,
7532 wire: true,
7533 },
7534 TypeContract {
7535 name: "index_transfer_artifact",
7536 shape_version: 1,
7537 instance_format_version: None,
7538 kind: TypeKind::Struct,
7539 wire: true,
7540 },
7541 TypeContract {
7542 name: "search_validation_bound",
7543 shape_version: 1,
7544 instance_format_version: None,
7545 kind: TypeKind::TaggedUnion,
7546 wire: true,
7547 },
7548 TypeContract {
7549 name: "search_validation_estimates",
7550 shape_version: 1,
7551 instance_format_version: None,
7552 kind: TypeKind::Struct,
7553 wire: true,
7554 },
7555 TypeContract {
7556 name: "search_validation_limit",
7557 shape_version: 1,
7558 instance_format_version: None,
7559 kind: TypeKind::Struct,
7560 wire: true,
7561 },
7562 TypeContract {
7563 name: "operation_kind",
7564 shape_version: 4,
7565 instance_format_version: None,
7566 kind: TypeKind::Enum,
7567 wire: true,
7568 },
7569 TypeContract {
7570 name: "operation_authority",
7571 shape_version: 1,
7572 instance_format_version: None,
7573 kind: TypeKind::Enum,
7574 wire: true,
7575 },
7576 TypeContract {
7577 name: "operation_target",
7578 shape_version: 1,
7579 instance_format_version: None,
7580 kind: TypeKind::TaggedUnion,
7581 wire: true,
7582 },
7583 TypeContract {
7584 name: "operation_state",
7585 shape_version: 1,
7586 instance_format_version: None,
7587 kind: TypeKind::Enum,
7588 wire: true,
7589 },
7590 TypeContract {
7591 name: "operation_pending_state",
7592 shape_version: 1,
7593 instance_format_version: None,
7594 kind: TypeKind::Enum,
7595 wire: true,
7596 },
7597 TypeContract {
7598 name: "operation_progress_unit",
7599 shape_version: 1,
7600 instance_format_version: None,
7601 kind: TypeKind::Enum,
7602 wire: true,
7603 },
7604 TypeContract {
7605 name: "operation_progress",
7606 shape_version: 1,
7607 instance_format_version: None,
7608 kind: TypeKind::Struct,
7609 wire: true,
7610 },
7611 TypeContract {
7612 name: "operation_result",
7613 shape_version: 1,
7614 instance_format_version: None,
7615 kind: TypeKind::TaggedUnion,
7616 wire: true,
7617 },
7618 TypeContract {
7619 name: "operation_failure",
7620 shape_version: 1,
7621 instance_format_version: None,
7622 kind: TypeKind::Struct,
7623 wire: true,
7624 },
7625 TypeContract {
7626 name: "operation_cancellation",
7627 shape_version: 1,
7628 instance_format_version: None,
7629 kind: TypeKind::Enum,
7630 wire: true,
7631 },
7632 TypeContract {
7633 name: "operation_retention_state",
7634 shape_version: 1,
7635 instance_format_version: None,
7636 kind: TypeKind::Enum,
7637 wire: true,
7638 },
7639 TypeContract {
7640 name: "operation_retention",
7641 shape_version: 1,
7642 instance_format_version: None,
7643 kind: TypeKind::Struct,
7644 wire: true,
7645 },
7646 TypeContract {
7647 name: "operation",
7648 shape_version: 2,
7649 instance_format_version: None,
7650 kind: TypeKind::Struct,
7651 wire: true,
7652 },
7653 TypeContract {
7654 name: "write_durability_boundary",
7655 shape_version: 1,
7656 instance_format_version: None,
7657 kind: TypeKind::Enum,
7658 wire: true,
7659 },
7660 TypeContract {
7661 name: "write_visibility_mode",
7662 shape_version: 1,
7663 instance_format_version: None,
7664 kind: TypeKind::Enum,
7665 wire: true,
7666 },
7667 TypeContract {
7668 name: "write_response_stage",
7669 shape_version: 1,
7670 instance_format_version: None,
7671 kind: TypeKind::Enum,
7672 wire: true,
7673 },
7674 TypeContract {
7675 name: "write_achievement",
7676 shape_version: 1,
7677 instance_format_version: None,
7678 kind: TypeKind::Struct,
7679 wire: true,
7680 },
7681 TypeContract {
7682 name: "mutation_commit_position",
7683 shape_version: 1,
7684 instance_format_version: None,
7685 kind: TypeKind::Struct,
7686 wire: true,
7687 },
7688 TypeContract {
7689 name: "mutation_commit_receipt",
7690 shape_version: 1,
7691 instance_format_version: Some(1),
7692 kind: TypeKind::Struct,
7693 wire: true,
7694 },
7695 TypeContract {
7696 name: "mutation_resolver",
7697 shape_version: 2,
7698 instance_format_version: None,
7699 kind: TypeKind::Enum,
7700 wire: true,
7701 },
7702 TypeContract {
7703 name: "mutation_outcome",
7704 shape_version: 1,
7705 instance_format_version: None,
7706 kind: TypeKind::TaggedUnion,
7707 wire: true,
7708 },
7709 TypeContract {
7710 name: "submission_state",
7711 shape_version: 1,
7712 instance_format_version: None,
7713 kind: TypeKind::Enum,
7714 wire: true,
7715 },
7716 TypeContract {
7717 name: "expected_binding",
7718 shape_version: 1,
7719 instance_format_version: None,
7720 kind: TypeKind::Struct,
7721 wire: true,
7722 },
7723 TypeContract {
7724 name: "administration_alias_action",
7725 shape_version: 1,
7726 instance_format_version: None,
7727 kind: TypeKind::TaggedUnion,
7728 wire: true,
7729 },
7730 TypeContract {
7731 name: "administration_mutation",
7732 shape_version: 3,
7733 instance_format_version: None,
7734 kind: TypeKind::TaggedUnion,
7735 wire: true,
7736 },
7737 TypeContract {
7738 name: "administration_outcome",
7739 shape_version: 1,
7740 instance_format_version: None,
7741 kind: TypeKind::Struct,
7742 wire: true,
7743 },
7744 TypeContract {
7745 name: "index_change_apply_receipt",
7746 shape_version: 1,
7747 instance_format_version: None,
7748 kind: TypeKind::Struct,
7749 wire: true,
7750 },
7751 TypeContract {
7752 name: "index_change_resolution_state",
7753 shape_version: 1,
7754 instance_format_version: None,
7755 kind: TypeKind::Enum,
7756 wire: true,
7757 },
7758 TypeContract {
7759 name: "bulk_document_item",
7760 shape_version: 2,
7761 instance_format_version: None,
7762 kind: TypeKind::Struct,
7763 wire: true,
7764 },
7765 TypeContract {
7766 name: "bulk_document_item_outcome",
7767 shape_version: 1,
7768 instance_format_version: None,
7769 kind: TypeKind::Struct,
7770 wire: true,
7771 },
7772 TypeContract {
7773 name: "bulk_document_outcome",
7774 shape_version: 1,
7775 instance_format_version: None,
7776 kind: TypeKind::Struct,
7777 wire: true,
7778 },
7779 TypeContract {
7780 name: "metric_attribute_value",
7781 shape_version: 1,
7782 instance_format_version: None,
7783 kind: TypeKind::TaggedUnion,
7784 wire: true,
7785 },
7786 TypeContract {
7787 name: "metric_attribute",
7788 shape_version: 1,
7789 instance_format_version: None,
7790 kind: TypeKind::Struct,
7791 wire: true,
7792 },
7793 TypeContract {
7794 name: "metric_number",
7795 shape_version: 1,
7796 instance_format_version: None,
7797 kind: TypeKind::TaggedUnion,
7798 wire: true,
7799 },
7800 TypeContract {
7801 name: "metric_temporality",
7802 shape_version: 1,
7803 instance_format_version: None,
7804 kind: TypeKind::Enum,
7805 wire: true,
7806 },
7807 TypeContract {
7808 name: "metric_point_kind",
7809 shape_version: 1,
7810 instance_format_version: None,
7811 kind: TypeKind::Enum,
7812 wire: true,
7813 },
7814 TypeContract {
7815 name: "metric_exponential_buckets",
7816 shape_version: 1,
7817 instance_format_version: None,
7818 kind: TypeKind::Struct,
7819 wire: true,
7820 },
7821 TypeContract {
7822 name: "metric_data",
7823 shape_version: 1,
7824 instance_format_version: None,
7825 kind: TypeKind::TaggedUnion,
7826 wire: true,
7827 },
7828 TypeContract {
7829 name: "metric_instrumentation_scope",
7830 shape_version: 1,
7831 instance_format_version: None,
7832 kind: TypeKind::Struct,
7833 wire: true,
7834 },
7835 TypeContract {
7836 name: "metric_exemplar",
7837 shape_version: 1,
7838 instance_format_version: None,
7839 kind: TypeKind::Struct,
7840 wire: true,
7841 },
7842 TypeContract {
7843 name: "metric_point",
7844 shape_version: 1,
7845 instance_format_version: Some(1),
7846 kind: TypeKind::Struct,
7847 wire: true,
7848 },
7849 TypeContract {
7850 name: "entity_ref",
7851 shape_version: 1,
7852 instance_format_version: None,
7853 kind: TypeKind::Struct,
7854 wire: true,
7855 },
7856 TypeContract {
7857 name: "relationship_evidence_ref",
7858 shape_version: 1,
7859 instance_format_version: None,
7860 kind: TypeKind::Struct,
7861 wire: true,
7862 },
7863 TypeContract {
7864 name: "relationship_directionality",
7865 shape_version: 1,
7866 instance_format_version: None,
7867 kind: TypeKind::Enum,
7868 wire: true,
7869 },
7870 TypeContract {
7871 name: "relationship_record",
7872 shape_version: 1,
7873 instance_format_version: Some(1),
7874 kind: TypeKind::Struct,
7875 wire: true,
7876 },
7877 TypeContract {
7878 name: "profile_label",
7879 shape_version: 1,
7880 instance_format_version: None,
7881 kind: TypeKind::Struct,
7882 wire: true,
7883 },
7884 TypeContract {
7885 name: "profile_sample_type",
7886 shape_version: 1,
7887 instance_format_version: None,
7888 kind: TypeKind::Struct,
7889 wire: true,
7890 },
7891 TypeContract {
7892 name: "profile_mapping",
7893 shape_version: 1,
7894 instance_format_version: None,
7895 kind: TypeKind::Struct,
7896 wire: true,
7897 },
7898 TypeContract {
7899 name: "profile_function",
7900 shape_version: 1,
7901 instance_format_version: None,
7902 kind: TypeKind::Struct,
7903 wire: true,
7904 },
7905 TypeContract {
7906 name: "profile_line",
7907 shape_version: 1,
7908 instance_format_version: None,
7909 kind: TypeKind::Struct,
7910 wire: true,
7911 },
7912 TypeContract {
7913 name: "profile_location",
7914 shape_version: 1,
7915 instance_format_version: None,
7916 kind: TypeKind::Struct,
7917 wire: true,
7918 },
7919 TypeContract {
7920 name: "profile_stack",
7921 shape_version: 1,
7922 instance_format_version: None,
7923 kind: TypeKind::Struct,
7924 wire: true,
7925 },
7926 TypeContract {
7927 name: "profile_sample",
7928 shape_version: 1,
7929 instance_format_version: None,
7930 kind: TypeKind::Struct,
7931 wire: true,
7932 },
7933 TypeContract {
7934 name: "profile_instrumentation_scope",
7935 shape_version: 1,
7936 instance_format_version: None,
7937 kind: TypeKind::Struct,
7938 wire: true,
7939 },
7940 TypeContract {
7941 name: "profile_batch",
7942 shape_version: 1,
7943 instance_format_version: Some(1),
7944 kind: TypeKind::Struct,
7945 wire: true,
7946 },
7947 TypeContract {
7948 name: "native_record",
7949 shape_version: 3,
7950 instance_format_version: None,
7951 kind: TypeKind::TaggedUnion,
7952 wire: true,
7953 },
7954 TypeContract {
7955 name: "retained_append_item",
7956 shape_version: 4,
7957 instance_format_version: None,
7958 kind: TypeKind::Struct,
7959 wire: true,
7960 },
7961 TypeContract {
7962 name: "retained_append_state",
7963 shape_version: 1,
7964 instance_format_version: None,
7965 kind: TypeKind::Enum,
7966 wire: true,
7967 },
7968 TypeContract {
7969 name: "retained_append_retry_safety",
7970 shape_version: 1,
7971 instance_format_version: None,
7972 kind: TypeKind::Enum,
7973 wire: true,
7974 },
7975 TypeContract {
7976 name: "retained_append_item_outcome",
7977 shape_version: 1,
7978 instance_format_version: None,
7979 kind: TypeKind::Struct,
7980 wire: true,
7981 },
7982 TypeContract {
7983 name: "retained_append_bulk_outcome",
7984 shape_version: 1,
7985 instance_format_version: None,
7986 kind: TypeKind::Struct,
7987 wire: true,
7988 },
7989 TypeContract {
7990 name: "retained_append_observation_state",
7991 shape_version: 1,
7992 instance_format_version: None,
7993 kind: TypeKind::Enum,
7994 wire: true,
7995 },
7996 TypeContract {
7997 name: "retained_append_observation_outcome",
7998 shape_version: 1,
7999 instance_format_version: None,
8000 kind: TypeKind::Struct,
8001 wire: true,
8002 },
8003 TypeContract {
8004 name: "binary_value",
8005 shape_version: 1,
8006 instance_format_version: None,
8007 kind: TypeKind::Struct,
8008 wire: true,
8009 },
8010 TypeContract {
8011 name: "state_hash_field",
8012 shape_version: 1,
8013 instance_format_version: None,
8014 kind: TypeKind::Struct,
8015 wire: true,
8016 },
8017 TypeContract {
8018 name: "state_set_entry",
8019 shape_version: 1,
8020 instance_format_version: None,
8021 kind: TypeKind::Struct,
8022 wire: true,
8023 },
8024 TypeContract {
8025 name: "state_set_condition",
8026 shape_version: 1,
8027 instance_format_version: None,
8028 kind: TypeKind::Enum,
8029 wire: true,
8030 },
8031 TypeContract {
8032 name: "state_operation",
8033 shape_version: 1,
8034 instance_format_version: None,
8035 kind: TypeKind::TaggedUnion,
8036 wire: true,
8037 },
8038 TypeContract {
8039 name: "state_optional_value",
8040 shape_version: 1,
8041 instance_format_version: None,
8042 kind: TypeKind::TaggedUnion,
8043 wire: true,
8044 },
8045 TypeContract {
8046 name: "state_command_result",
8047 shape_version: 1,
8048 instance_format_version: None,
8049 kind: TypeKind::TaggedUnion,
8050 wire: true,
8051 },
8052 TypeContract {
8053 name: "state_write_resolution",
8054 shape_version: 1,
8055 instance_format_version: None,
8056 kind: TypeKind::TaggedUnion,
8057 wire: true,
8058 },
8059 TypeContract {
8060 name: "service_credential_reservation",
8061 shape_version: 1,
8062 instance_format_version: None,
8063 kind: TypeKind::Struct,
8064 wire: true,
8065 },
8066 TypeContract {
8067 name: "subscription_metadata_field",
8068 shape_version: 1,
8069 instance_format_version: None,
8070 kind: TypeKind::Enum,
8071 wire: true,
8072 },
8073 TypeContract {
8074 name: "subscription_field",
8075 shape_version: 1,
8076 instance_format_version: None,
8077 kind: TypeKind::TaggedUnion,
8078 wire: true,
8079 },
8080 TypeContract {
8081 name: "subscription_filter",
8082 shape_version: 1,
8083 instance_format_version: None,
8084 kind: TypeKind::TaggedUnion,
8085 wire: true,
8086 },
8087 TypeContract {
8088 name: "subscription_cursor_entry",
8089 shape_version: 1,
8090 instance_format_version: None,
8091 kind: TypeKind::Struct,
8092 wire: true,
8093 },
8094 TypeContract {
8095 name: "subscription_route",
8096 shape_version: 1,
8097 instance_format_version: None,
8098 kind: TypeKind::Struct,
8099 wire: true,
8100 },
8101 TypeContract {
8102 name: "subscription_start_position",
8103 shape_version: 1,
8104 instance_format_version: None,
8105 kind: TypeKind::TaggedUnion,
8106 wire: true,
8107 },
8108 TypeContract {
8109 name: "subscription_start",
8110 shape_version: 1,
8111 instance_format_version: Some(1),
8112 kind: TypeKind::Struct,
8113 wire: true,
8114 },
8115 TypeContract {
8116 name: "subscription_accepted",
8117 shape_version: 1,
8118 instance_format_version: Some(1),
8119 kind: TypeKind::Struct,
8120 wire: true,
8121 },
8122 TypeContract {
8123 name: "subscription_writer_fence",
8124 shape_version: 1,
8125 instance_format_version: None,
8126 kind: TypeKind::Struct,
8127 wire: true,
8128 },
8129 TypeContract {
8130 name: "subscription_event",
8131 shape_version: 1,
8132 instance_format_version: Some(1),
8133 kind: TypeKind::Struct,
8134 wire: true,
8135 },
8136 TypeContract {
8137 name: "subscription_heartbeat",
8138 shape_version: 1,
8139 instance_format_version: Some(1),
8140 kind: TypeKind::Struct,
8141 wire: true,
8142 },
8143 TypeContract {
8144 name: "subscription_gap",
8145 shape_version: 1,
8146 instance_format_version: Some(1),
8147 kind: TypeKind::Struct,
8148 wire: true,
8149 },
8150 TypeContract {
8151 name: "subscription_terminal_reason",
8152 shape_version: 1,
8153 instance_format_version: None,
8154 kind: TypeKind::Enum,
8155 wire: true,
8156 },
8157 TypeContract {
8158 name: "subscription_terminal",
8159 shape_version: 2,
8160 instance_format_version: Some(2),
8161 kind: TypeKind::Struct,
8162 wire: true,
8163 },
8164 TypeContract {
8165 name: "subscription_frame",
8166 shape_version: 1,
8167 instance_format_version: None,
8168 kind: TypeKind::TaggedUnion,
8169 wire: true,
8170 },
8171 TypeContract {
8172 name: "stream_binding",
8173 shape_version: 1,
8174 instance_format_version: None,
8175 kind: TypeKind::Struct,
8176 wire: true,
8177 },
8178 TypeContract {
8179 name: "capability_grant",
8180 shape_version: 1,
8181 instance_format_version: None,
8182 kind: TypeKind::Struct,
8183 wire: true,
8184 },
8185 TypeContract {
8186 name: "protocol_limit",
8187 shape_version: 1,
8188 instance_format_version: None,
8189 kind: TypeKind::Struct,
8190 wire: true,
8191 },
8192 TypeContract {
8193 name: "document_mutation_condition",
8194 shape_version: 1,
8195 instance_format_version: None,
8196 kind: TypeKind::TaggedUnion,
8197 wire: true,
8198 },
8199 TypeContract {
8200 name: "audit_adapter",
8201 shape_version: 1,
8202 instance_format_version: None,
8203 kind: TypeKind::Enum,
8204 wire: true,
8205 },
8206 TypeContract {
8207 name: "audit_decision",
8208 shape_version: 1,
8209 instance_format_version: None,
8210 kind: TypeKind::Enum,
8211 wire: true,
8212 },
8213 TypeContract {
8214 name: "audit_outcome",
8215 shape_version: 1,
8216 instance_format_version: None,
8217 kind: TypeKind::Enum,
8218 wire: true,
8219 },
8220 TypeContract {
8221 name: "audit_detail",
8222 shape_version: 1,
8223 instance_format_version: None,
8224 kind: TypeKind::Enum,
8225 wire: true,
8226 },
8227 TypeContract {
8228 name: "audit_gap_reason",
8229 shape_version: 1,
8230 instance_format_version: None,
8231 kind: TypeKind::Enum,
8232 wire: true,
8233 },
8234 TypeContract {
8235 name: "audit_event",
8236 shape_version: 2,
8237 instance_format_version: None,
8238 kind: TypeKind::Struct,
8239 wire: true,
8240 },
8241 TypeContract {
8242 name: "audit_gap",
8243 shape_version: 2,
8244 instance_format_version: None,
8245 kind: TypeKind::Struct,
8246 wire: true,
8247 },
8248 TypeContract {
8249 name: "audit_stream_state",
8250 shape_version: 1,
8251 instance_format_version: None,
8252 kind: TypeKind::Struct,
8253 wire: true,
8254 },
8255 TypeContract {
8256 name: "service_credential_grant",
8257 shape_version: 1,
8258 instance_format_version: None,
8259 kind: TypeKind::Struct,
8260 wire: true,
8261 },
8262 TypeContract {
8263 name: "service_credential_summary",
8264 shape_version: 1,
8265 instance_format_version: None,
8266 kind: TypeKind::Struct,
8267 wire: true,
8268 },
8269 TypeContract {
8270 name: "security_role",
8271 shape_version: 2,
8272 instance_format_version: None,
8273 kind: TypeKind::Struct,
8274 wire: true,
8275 },
8276 TypeContract {
8277 name: "role_append_scope_change",
8278 shape_version: 1,
8279 instance_format_version: None,
8280 kind: TypeKind::TaggedUnion,
8281 wire: true,
8282 },
8283 TypeContract {
8284 name: "role_append_access_preparation",
8285 shape_version: 1,
8286 instance_format_version: None,
8287 kind: TypeKind::TaggedUnion,
8288 wire: true,
8289 },
8290 TypeContract {
8291 name: "source_authorization_subject_kind",
8292 shape_version: 1,
8293 instance_format_version: None,
8294 kind: TypeKind::Enum,
8295 wire: true,
8296 },
8297 TypeContract {
8298 name: "source_authorization_subject",
8299 shape_version: 1,
8300 instance_format_version: None,
8301 kind: TypeKind::Struct,
8302 wire: true,
8303 },
8304 TypeContract {
8305 name: "delegated_query_source_subject",
8306 shape_version: 1,
8307 instance_format_version: None,
8308 kind: TypeKind::Struct,
8309 wire: true,
8310 },
8311 TypeContract {
8312 name: "delegated_query_subject_claims",
8313 shape_version: 1,
8314 instance_format_version: Some(1),
8315 kind: TypeKind::Struct,
8316 wire: true,
8317 },
8318 TypeContract {
8319 name: "signed_delegated_query_subject",
8320 shape_version: 1,
8321 instance_format_version: None,
8322 kind: TypeKind::Struct,
8323 wire: true,
8324 },
8325 TypeContract {
8326 name: "source_authorization_principal_change",
8327 shape_version: 1,
8328 instance_format_version: None,
8329 kind: TypeKind::TaggedUnion,
8330 wire: true,
8331 },
8332 TypeContract {
8333 name: "source_authorization_group_change",
8334 shape_version: 1,
8335 instance_format_version: None,
8336 kind: TypeKind::TaggedUnion,
8337 wire: true,
8338 },
8339 TypeContract {
8340 name: "source_authorization_membership_replacement",
8341 shape_version: 1,
8342 instance_format_version: None,
8343 kind: TypeKind::Struct,
8344 wire: true,
8345 },
8346 TypeContract {
8347 name: "source_authorization_document_acl_replacement",
8348 shape_version: 1,
8349 instance_format_version: None,
8350 kind: TypeKind::Struct,
8351 wire: true,
8352 },
8353 TypeContract {
8354 name: "source_authorization_batch",
8355 shape_version: 1,
8356 instance_format_version: Some(1),
8357 kind: TypeKind::Struct,
8358 wire: true,
8359 },
8360 TypeContract {
8361 name: "source_authorization_applied_counts",
8362 shape_version: 1,
8363 instance_format_version: None,
8364 kind: TypeKind::Struct,
8365 wire: true,
8366 },
8367 TypeContract {
8368 name: "source_authorization_receipt",
8369 shape_version: 1,
8370 instance_format_version: Some(1),
8371 kind: TypeKind::Struct,
8372 wire: true,
8373 },
8374 TypeContract {
8375 name: "source_authorization_preparation",
8376 shape_version: 1,
8377 instance_format_version: None,
8378 kind: TypeKind::Struct,
8379 wire: true,
8380 },
8381 TypeContract {
8382 name: "source_authorization_resolution_state",
8383 shape_version: 1,
8384 instance_format_version: None,
8385 kind: TypeKind::Enum,
8386 wire: true,
8387 },
8388 TypeContract {
8389 name: "source_authorization_resolution",
8390 shape_version: 1,
8391 instance_format_version: None,
8392 kind: TypeKind::Struct,
8393 wire: true,
8394 },
8395 TypeContract {
8396 name: "security_action_outcome",
8397 shape_version: 1,
8398 instance_format_version: None,
8399 kind: TypeKind::TaggedUnion,
8400 wire: true,
8401 },
8402 TypeContract {
8403 name: "maintenance_work_state",
8404 shape_version: 1,
8405 instance_format_version: None,
8406 kind: TypeKind::Enum,
8407 wire: true,
8408 },
8409 TypeContract {
8410 name: "maintenance_attempt_state",
8411 shape_version: 1,
8412 instance_format_version: None,
8413 kind: TypeKind::Enum,
8414 wire: true,
8415 },
8416 TypeContract {
8417 name: "maintenance_failure_class",
8418 shape_version: 1,
8419 instance_format_version: None,
8420 kind: TypeKind::Enum,
8421 wire: true,
8422 },
8423 TypeContract {
8424 name: "maintenance_failure_class_count",
8425 shape_version: 1,
8426 instance_format_version: None,
8427 kind: TypeKind::Struct,
8428 wire: true,
8429 },
8430 TypeContract {
8431 name: "maintenance_attempt_observation",
8432 shape_version: 1,
8433 instance_format_version: None,
8434 kind: TypeKind::Struct,
8435 wire: true,
8436 },
8437 TypeContract {
8438 name: "maintenance_task_scope",
8439 shape_version: 1,
8440 instance_format_version: None,
8441 kind: TypeKind::Struct,
8442 wire: true,
8443 },
8444 TypeContract {
8445 name: "maintenance_task_status",
8446 shape_version: 1,
8447 instance_format_version: None,
8448 kind: TypeKind::Struct,
8449 wire: true,
8450 },
8451 TypeContract {
8452 name: "maintenance_status_aggregate",
8453 shape_version: 1,
8454 instance_format_version: Some(2),
8455 kind: TypeKind::Struct,
8456 wire: true,
8457 },
8458 TypeContract {
8459 name: "runtime_status_detail",
8460 shape_version: 1,
8461 instance_format_version: None,
8462 kind: TypeKind::Struct,
8463 wire: true,
8464 },
8465 TypeContract {
8466 name: "result_cache_status",
8467 shape_version: 2,
8468 instance_format_version: Some(3),
8469 kind: TypeKind::Struct,
8470 wire: true,
8471 },
8472 TypeContract {
8473 name: "field_promotion_status",
8474 shape_version: 1,
8475 instance_format_version: Some(3),
8476 kind: TypeKind::Struct,
8477 wire: true,
8478 },
8479 TypeContract {
8480 name: "overload_shard_status",
8481 shape_version: 2,
8482 instance_format_version: Some(3),
8483 kind: TypeKind::Struct,
8484 wire: true,
8485 },
8486 TypeContract {
8487 name: "external_key_binding",
8488 shape_version: 1,
8489 instance_format_version: None,
8490 kind: TypeKind::Struct,
8491 wire: true,
8492 },
8493 TypeContract {
8494 name: "external_key_retirement_target",
8495 shape_version: 1,
8496 instance_format_version: None,
8497 kind: TypeKind::Struct,
8498 wire: true,
8499 },
8500 TypeContract {
8501 name: "external_key_retirement_outcome",
8502 shape_version: 1,
8503 instance_format_version: None,
8504 kind: TypeKind::Enum,
8505 wire: true,
8506 },
8507 TypeContract {
8508 name: "external_key_retirement_receipt",
8509 shape_version: 1,
8510 instance_format_version: Some(1),
8511 kind: TypeKind::Struct,
8512 wire: true,
8513 },
8514 TypeContract {
8515 name: "external_key_retirement_resolution_state",
8516 shape_version: 1,
8517 instance_format_version: None,
8518 kind: TypeKind::Enum,
8519 wire: true,
8520 },
8521 TypeContract {
8522 name: "rollup_measure",
8523 shape_version: 1,
8524 instance_format_version: None,
8525 kind: TypeKind::TaggedUnion,
8526 wire: true,
8527 },
8528 TypeContract {
8529 name: "aggregate_then_delete_policy",
8530 shape_version: 1,
8531 instance_format_version: None,
8532 kind: TypeKind::Struct,
8533 wire: true,
8534 },
8535 TypeContract {
8536 name: "lifecycle_binding_status",
8537 shape_version: 1,
8538 instance_format_version: None,
8539 kind: TypeKind::Struct,
8540 wire: true,
8541 },
8542 TypeContract {
8543 name: "lifecycle_rollup_status",
8544 shape_version: 1,
8545 instance_format_version: None,
8546 kind: TypeKind::Struct,
8547 wire: true,
8548 },
8549 TypeContract {
8550 name: "lifecycle_status",
8551 shape_version: 2,
8552 instance_format_version: Some(4),
8553 kind: TypeKind::Struct,
8554 wire: true,
8555 },
8556 TypeContract {
8557 name: "quota_limit",
8558 shape_version: 1,
8559 instance_format_version: None,
8560 kind: TypeKind::Struct,
8561 wire: true,
8562 },
8563 TypeContract {
8564 name: "quota_consumption",
8565 shape_version: 1,
8566 instance_format_version: None,
8567 kind: TypeKind::Struct,
8568 wire: true,
8569 },
8570 TypeContract {
8571 name: "quota_update",
8572 shape_version: 1,
8573 instance_format_version: None,
8574 kind: TypeKind::Struct,
8575 wire: true,
8576 },
8577 TypeContract {
8578 name: "storage_overall_posture",
8579 shape_version: 1,
8580 instance_format_version: None,
8581 kind: TypeKind::Enum,
8582 wire: true,
8583 },
8584 TypeContract {
8585 name: "storage_profile_role",
8586 shape_version: 1,
8587 instance_format_version: None,
8588 kind: TypeKind::Enum,
8589 wire: true,
8590 },
8591 TypeContract {
8592 name: "storage_provider_posture",
8593 shape_version: 1,
8594 instance_format_version: None,
8595 kind: TypeKind::Enum,
8596 wire: true,
8597 },
8598 TypeContract {
8599 name: "storage_backend_service_class",
8600 shape_version: 1,
8601 instance_format_version: None,
8602 kind: TypeKind::Enum,
8603 wire: true,
8604 },
8605 TypeContract {
8606 name: "storage_profile_role_binding",
8607 shape_version: 1,
8608 instance_format_version: None,
8609 kind: TypeKind::Struct,
8610 wire: true,
8611 },
8612 TypeContract {
8613 name: "storage_profile_attestation",
8614 shape_version: 1,
8615 instance_format_version: Some(1),
8616 kind: TypeKind::Struct,
8617 wire: true,
8618 },
8619 TypeContract {
8620 name: "storage_profile_expectation",
8621 shape_version: 1,
8622 instance_format_version: Some(1),
8623 kind: TypeKind::Struct,
8624 wire: true,
8625 },
8626 TypeContract {
8627 name: "core_binding",
8628 shape_version: 3,
8629 instance_format_version: None,
8630 kind: TypeKind::Struct,
8631 wire: true,
8632 },
8633 TypeContract {
8634 name: "readiness_observation",
8635 shape_version: 1,
8636 instance_format_version: None,
8637 kind: TypeKind::Struct,
8638 wire: true,
8639 },
8640 TypeContract {
8641 name: "usage_dimension",
8642 shape_version: 1,
8643 instance_format_version: None,
8644 kind: TypeKind::Struct,
8645 wire: true,
8646 },
8647 TypeContract {
8648 name: "physical_usage_value",
8649 shape_version: 2,
8650 instance_format_version: None,
8651 kind: TypeKind::Struct,
8652 wire: true,
8653 },
8654 TypeContract {
8655 name: "core_usage_units",
8656 shape_version: 2,
8657 instance_format_version: None,
8658 kind: TypeKind::Struct,
8659 wire: true,
8660 },
8661 TypeContract {
8662 name: "core_usage_correction",
8663 shape_version: 2,
8664 instance_format_version: None,
8665 kind: TypeKind::Struct,
8666 wire: true,
8667 },
8668 TypeContract {
8669 name: "index_storage_usage",
8670 shape_version: 1,
8671 instance_format_version: None,
8672 kind: TypeKind::Struct,
8673 wire: true,
8674 },
8675 TypeContract {
8676 name: "collection_storage_usage",
8677 shape_version: 1,
8678 instance_format_version: Some(1),
8679 kind: TypeKind::Struct,
8680 wire: true,
8681 },
8682 TypeContract {
8683 name: "response_meta",
8684 shape_version: 1,
8685 instance_format_version: Some(1),
8686 kind: TypeKind::Struct,
8687 wire: true,
8688 },
8689 TypeContract {
8690 name: "error_disposition",
8691 shape_version: 1,
8692 instance_format_version: None,
8693 kind: TypeKind::Enum,
8694 wire: true,
8695 },
8696 TypeContract {
8697 name: "recovery_action",
8698 shape_version: 1,
8699 instance_format_version: None,
8700 kind: TypeKind::Enum,
8701 wire: true,
8702 },
8703 TypeContract {
8704 name: "limit_class",
8705 shape_version: 1,
8706 instance_format_version: None,
8707 kind: TypeKind::Enum,
8708 wire: true,
8709 },
8710 TypeContract {
8711 name: "error_detail",
8712 shape_version: 3,
8713 instance_format_version: None,
8714 kind: TypeKind::TaggedUnion,
8715 wire: true,
8716 },
8717 TypeContract {
8718 name: "connection_profile",
8719 shape_version: 4,
8720 instance_format_version: Some(4),
8721 kind: TypeKind::Struct,
8722 wire: false,
8723 },
8724];
8725#[derive(Clone, Copy, Debug, Eq, PartialEq)]
8726pub struct StreamContract {
8727 pub name: &'static str,
8728 pub action: Action,
8729 pub transport: &'static str,
8730 pub service: &'static str,
8731 pub method: &'static str,
8732 pub auth_metadata: &'static str,
8733 pub auth_scheme: &'static str,
8734 pub semantic_format_version: u16,
8735 pub start_type: &'static str,
8736 pub frame_type: &'static str,
8737}
8738pub const LODESTONE_API_STREAM_CONTRACTS: &[StreamContract] = &[StreamContract {
8739 name: "subscription",
8740 action: Action::SubscriptionRead,
8741 transport: "grpc_tls",
8742 service: "lodestone.api.FilterSubscription",
8743 method: "/lodestone.api.FilterSubscription/Subscribe",
8744 auth_metadata: "authorization",
8745 auth_scheme: "ApiKey",
8746 semantic_format_version: 1,
8747 start_type: "subscription_start",
8748 frame_type: "subscription_frame",
8749}];
8750#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8751#[serde(deny_unknown_fields)]
8752pub struct ErrorBody {
8753 pub code: ErrorCode,
8754 pub message: String,
8755 pub disposition: ErrorDisposition,
8756 pub recovery: RecoveryAction,
8757 pub details: ErrorDetail,
8758}
8759#[derive(Clone, Copy, Debug, Eq, PartialEq)]
8760pub enum ErrorShapeError {
8761 DetailCodeMismatch,
8762 OutcomeMismatch,
8763 RetryAfterOutOfRange,
8764}
8765impl ErrorBody {
8766 pub fn try_new(
8767 code: ErrorCode,
8768 message: String,
8769 disposition: ErrorDisposition,
8770 recovery: RecoveryAction,
8771 details: ErrorDetail,
8772 ) -> Result<Self, ErrorShapeError> {
8773 let body = Self {
8774 code,
8775 message,
8776 disposition,
8777 recovery,
8778 details,
8779 };
8780 validate_error_body(&body)?;
8781 Ok(body)
8782 }
8783 pub fn retry_safe(&self) -> bool {
8784 self.disposition == ErrorDisposition::NotSubmitted
8785 && matches!(
8786 self.recovery,
8787 RecoveryAction::Retry
8788 | RecoveryAction::RetryAfter
8789 | RecoveryAction::RefreshCredential
8790 | RecoveryAction::RestartPage
8791 | RecoveryAction::ReduceRequest
8792 | RecoveryAction::RefreshPrecondition
8793 | RecoveryAction::CorrectRange
8794 )
8795 }
8796 pub fn submitted(&self) -> bool {
8797 self.disposition != ErrorDisposition::NotSubmitted
8798 }
8799}
8800pub fn validate_error_body(body: &ErrorBody) -> Result<(), ErrorShapeError> {
8801 let detail_matches = matches!(
8802 (&body.code, &body.details),
8803 (ErrorCode::Aborted, ErrorDetail::Aborted { .. })
8804 | (ErrorCode::DeadlineExceeded, ErrorDetail::DeadlineExceeded)
8805 | (ErrorCode::InvalidRequest, ErrorDetail::InvalidRequest { .. })
8806 | (ErrorCode::UnsupportedVersion, ErrorDetail::UnsupportedVersion { .. })
8807 | (ErrorCode::Unauthenticated, ErrorDetail::Unauthenticated)
8808 | (ErrorCode::PermissionDenied, ErrorDetail::PermissionDenied { .. })
8809 | (ErrorCode::NotFound, ErrorDetail::NotFound { .. })
8810 | (ErrorCode::Conflict, ErrorDetail::Conflict { .. })
8811 | (ErrorCode::StaleCursor, ErrorDetail::StaleCursor { .. })
8812 | (
8813 ErrorCode::RestartBudgetExhausted,
8814 ErrorDetail::RestartBudgetExhausted { .. }
8815 )
8816 | (ErrorCode::LimitExceeded, ErrorDetail::LimitExceeded { .. })
8817 | (
8818 ErrorCode::CapabilityUnavailable,
8819 ErrorDetail::CapabilityUnavailable { .. }
8820 )
8821 | (ErrorCode::NotSubmitted, ErrorDetail::NotSubmitted { .. })
8822 | (
8823 ErrorCode::SubmittedIndeterminate,
8824 ErrorDetail::SubmittedIndeterminate { .. }
8825 )
8826 | (ErrorCode::ExpiredUnknown, ErrorDetail::ExpiredUnknown { .. })
8827 | (ErrorCode::SecretNotEscrowed, ErrorDetail::SecretNotEscrowed)
8828 | (ErrorCode::RetentionGap, ErrorDetail::RetentionGap { .. })
8829 | (
8830 ErrorCode::ArtifactRangeInvalid,
8831 ErrorDetail::ArtifactRangeInvalid { .. }
8832 )
8833 | (ErrorCode::ChecksumMismatch, ErrorDetail::ChecksumMismatch { .. })
8834 | (
8835 ErrorCode::TemporarilyUnavailable,
8836 ErrorDetail::TemporarilyUnavailable { .. }
8837 )
8838 | (ErrorCode::Internal, ErrorDetail::Internal)
8839 );
8840 if !detail_matches {
8841 return Err(ErrorShapeError::DetailCodeMismatch);
8842 }
8843 if !LODESTONE_API_ERROR_OUTCOMES.iter().any(|contract| {
8844 contract.code == body.code && contract.disposition == body.disposition && contract.recovery == body.recovery
8845 }) {
8846 return Err(ErrorShapeError::OutcomeMismatch);
8847 }
8848 let retry_after = match &body.details {
8849 ErrorDetail::NotSubmitted { retry_after_millis }
8850 | ErrorDetail::TemporarilyUnavailable { retry_after_millis } => retry_after_millis.as_ref(),
8851 _ => None,
8852 };
8853 if retry_after
8854 .and_then(|value| value.value.parse::<u64>().ok())
8855 .is_some_and(|value| value > 60000)
8856 {
8857 return Err(ErrorShapeError::RetryAfterOutOfRange);
8858 }
8859 Ok(())
8860}
8861#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
8862#[serde(deny_unknown_fields)]
8863pub struct RequestMeta {
8864 pub format_version: u16,
8865 pub request_id: String,
8866 pub correlation_id: Identity,
8867 pub absolute_deadline_unix_millis: U64,
8868 pub workload_class: WorkloadClass,
8869}
8870
8871#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8872#[serde(deny_unknown_fields)]
8873pub struct DiscoverRequest {}
8874
8875#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8876#[serde(deny_unknown_fields)]
8877pub struct DiscoverResult {
8878 pub principal_id: Identity,
8879 pub collection_id: Identity,
8880 pub policy_revision: U64,
8881 pub artifact_version: String,
8882 pub schema_id: String,
8883 pub schema_digest: Digest,
8884 pub streams: Vec<StreamBinding>,
8885 pub capabilities: Vec<CapabilityGrant>,
8886 pub limits: Vec<ProtocolLimit>,
8887}
8888
8889#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8890#[serde(deny_unknown_fields)]
8891pub struct ListIndexesRequest {
8892 pub page_size: u32,
8893 #[serde(default, skip_serializing_if = "Option::is_none")]
8894 pub cursor: Option<Cursor>,
8895 #[serde(default, skip_serializing_if = "Option::is_none")]
8896 pub name_prefix: Option<String>,
8897 #[serde(default, skip_serializing_if = "Option::is_none")]
8898 pub mode: Option<String>,
8899 #[serde(default, skip_serializing_if = "Option::is_none")]
8900 pub state: Option<String>,
8901 pub restart_count: u32,
8902}
8903
8904#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8905#[serde(deny_unknown_fields)]
8906pub struct ListIndexesResult {
8907 pub items: Vec<IndexSummary>,
8908 #[serde(default, skip_serializing_if = "Option::is_none")]
8909 pub next_cursor: Option<Cursor>,
8910 pub restart_count: u32,
8911}
8912
8913#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8914#[serde(deny_unknown_fields)]
8915pub struct GetIndexRequest {
8916 pub name: String,
8917 #[serde(default, skip_serializing_if = "Option::is_none")]
8918 pub expected_incarnation: Option<Identity>,
8919}
8920
8921#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8922#[serde(deny_unknown_fields)]
8923pub struct GetIndexResult {
8924 pub resource: IndexDetail,
8925}
8926
8927#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8928#[serde(deny_unknown_fields)]
8929pub struct ValidateIndexChangeRequest {
8930 pub action_kind: String,
8931 pub name: String,
8932 #[serde(default, skip_serializing_if = "Option::is_none")]
8933 pub expected_incarnation: Option<Identity>,
8934 #[serde(default, skip_serializing_if = "Option::is_none")]
8935 pub expected_revision: Option<U64>,
8936 #[serde(default, skip_serializing_if = "Option::is_none")]
8937 pub mode: Option<String>,
8938 #[serde(default, skip_serializing_if = "Option::is_none")]
8939 pub mapping: Option<Mapping>,
8940 #[serde(default, skip_serializing_if = "Option::is_none")]
8941 pub policies: Option<IndexPolicies>,
8942}
8943
8944#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8945#[serde(deny_unknown_fields)]
8946pub struct ValidateIndexChangeResult {
8947 pub change_kind: String,
8948 #[serde(default, skip_serializing_if = "Option::is_none")]
8949 pub action_id: Option<Digest>,
8950 pub fields_added: Vec<String>,
8951 pub policy_axes_changed: Vec<String>,
8952 pub required_capabilities: Vec<String>,
8953 pub catalog_revision: U64,
8954 pub policy_revision: U64,
8955}
8956
8957#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8958#[serde(deny_unknown_fields)]
8959pub struct ApplyIndexChangeRequest {
8960 pub action_id: Digest,
8961 pub index: Resource,
8962 pub expected_revision: U64,
8963 #[serde(default, skip_serializing_if = "Option::is_none")]
8964 pub mapping: Option<Mapping>,
8965 #[serde(default, skip_serializing_if = "Option::is_none")]
8966 pub policies: Option<IndexPolicies>,
8967}
8968
8969#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8970#[serde(deny_unknown_fields)]
8971pub struct ApplyIndexChangeResult {
8972 pub receipt: IndexChangeApplyReceipt,
8973}
8974
8975#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8976#[serde(deny_unknown_fields)]
8977pub struct ResolveIndexChangeRequest {
8978 pub action_id: Digest,
8979 pub index: Resource,
8980 pub expected_revision: U64,
8981 #[serde(default, skip_serializing_if = "Option::is_none")]
8982 pub mapping: Option<Mapping>,
8983 #[serde(default, skip_serializing_if = "Option::is_none")]
8984 pub policies: Option<IndexPolicies>,
8985}
8986
8987#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8988#[serde(deny_unknown_fields)]
8989pub struct ResolveIndexChangeResult {
8990 pub state: IndexChangeResolutionState,
8991 #[serde(default, skip_serializing_if = "Option::is_none")]
8992 pub receipt: Option<IndexChangeApplyReceipt>,
8993 #[serde(default, skip_serializing_if = "Option::is_none")]
8994 pub failure: Option<String>,
8995}
8996
8997#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8998#[serde(deny_unknown_fields)]
8999pub struct ApplyAdministrationMutationRequest {
9000 pub action_id: Digest,
9001 pub expected_revision: U64,
9002 pub mutation: AdministrationMutation,
9003}
9004
9005#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9006#[serde(deny_unknown_fields)]
9007pub struct ApplyAdministrationMutationResult {
9008 pub outcome: AdministrationOutcome,
9009}
9010
9011#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9012#[serde(deny_unknown_fields)]
9013pub struct ListAliasesRequest {
9014 pub page_size: u32,
9015 #[serde(default, skip_serializing_if = "Option::is_none")]
9016 pub cursor: Option<Cursor>,
9017 #[serde(default, skip_serializing_if = "Option::is_none")]
9018 pub name_prefix: Option<String>,
9019 pub restart_count: u32,
9020}
9021
9022#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9023#[serde(deny_unknown_fields)]
9024pub struct ListAliasesResult {
9025 pub items: Vec<AliasSummary>,
9026 #[serde(default, skip_serializing_if = "Option::is_none")]
9027 pub next_cursor: Option<Cursor>,
9028 pub restart_count: u32,
9029}
9030
9031#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9032#[serde(deny_unknown_fields)]
9033pub struct GetAliasRequest {
9034 pub name: String,
9035}
9036
9037#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9038#[serde(deny_unknown_fields)]
9039pub struct GetAliasResult {
9040 pub resource: AliasDetail,
9041}
9042
9043#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9044#[serde(deny_unknown_fields)]
9045pub struct ListDataStreamsRequest {
9046 pub page_size: u32,
9047 #[serde(default, skip_serializing_if = "Option::is_none")]
9048 pub cursor: Option<Cursor>,
9049 #[serde(default, skip_serializing_if = "Option::is_none")]
9050 pub name_prefix: Option<String>,
9051 pub restart_count: u32,
9052}
9053
9054#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9055#[serde(deny_unknown_fields)]
9056pub struct ListDataStreamsResult {
9057 pub items: Vec<DataStreamSummary>,
9058 #[serde(default, skip_serializing_if = "Option::is_none")]
9059 pub next_cursor: Option<Cursor>,
9060 pub restart_count: u32,
9061}
9062
9063#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9064#[serde(deny_unknown_fields)]
9065pub struct GetDataStreamRequest {
9066 pub name: String,
9067}
9068
9069#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9070#[serde(deny_unknown_fields)]
9071pub struct GetDataStreamResult {
9072 pub resource: DataStreamDetail,
9073}
9074
9075#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9076#[serde(deny_unknown_fields)]
9077pub struct ListComponentTemplatesRequest {
9078 pub page_size: u32,
9079 #[serde(default, skip_serializing_if = "Option::is_none")]
9080 pub cursor: Option<Cursor>,
9081 #[serde(default, skip_serializing_if = "Option::is_none")]
9082 pub name_prefix: Option<String>,
9083 pub restart_count: u32,
9084}
9085
9086#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9087#[serde(deny_unknown_fields)]
9088pub struct ListComponentTemplatesResult {
9089 pub items: Vec<ComponentTemplateSummary>,
9090 #[serde(default, skip_serializing_if = "Option::is_none")]
9091 pub next_cursor: Option<Cursor>,
9092 pub restart_count: u32,
9093}
9094
9095#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9096#[serde(deny_unknown_fields)]
9097pub struct GetComponentTemplateRequest {
9098 pub name: String,
9099 #[serde(default, skip_serializing_if = "Option::is_none")]
9100 pub expected_incarnation: Option<Identity>,
9101}
9102
9103#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9104#[serde(deny_unknown_fields)]
9105pub struct GetComponentTemplateResult {
9106 pub resource: ComponentTemplateDetail,
9107}
9108
9109#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9110#[serde(deny_unknown_fields)]
9111pub struct ListIndexTemplatesRequest {
9112 pub page_size: u32,
9113 #[serde(default, skip_serializing_if = "Option::is_none")]
9114 pub cursor: Option<Cursor>,
9115 #[serde(default, skip_serializing_if = "Option::is_none")]
9116 pub name_prefix: Option<String>,
9117 pub restart_count: u32,
9118}
9119
9120#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9121#[serde(deny_unknown_fields)]
9122pub struct ListIndexTemplatesResult {
9123 pub items: Vec<IndexTemplateSummary>,
9124 #[serde(default, skip_serializing_if = "Option::is_none")]
9125 pub next_cursor: Option<Cursor>,
9126 pub restart_count: u32,
9127}
9128
9129#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9130#[serde(deny_unknown_fields)]
9131pub struct GetIndexTemplateRequest {
9132 pub name: String,
9133 #[serde(default, skip_serializing_if = "Option::is_none")]
9134 pub expected_incarnation: Option<Identity>,
9135}
9136
9137#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9138#[serde(deny_unknown_fields)]
9139pub struct GetIndexTemplateResult {
9140 pub resource: IndexTemplateDetail,
9141}
9142
9143#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9144#[serde(deny_unknown_fields)]
9145pub struct ListIngestPipelinesRequest {
9146 pub page_size: u32,
9147 #[serde(default, skip_serializing_if = "Option::is_none")]
9148 pub cursor: Option<Cursor>,
9149 #[serde(default, skip_serializing_if = "Option::is_none")]
9150 pub name_prefix: Option<String>,
9151 pub restart_count: u32,
9152}
9153
9154#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9155#[serde(deny_unknown_fields)]
9156pub struct ListIngestPipelinesResult {
9157 pub items: Vec<IngestPipelineSummary>,
9158 #[serde(default, skip_serializing_if = "Option::is_none")]
9159 pub next_cursor: Option<Cursor>,
9160 pub restart_count: u32,
9161}
9162
9163#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9164#[serde(deny_unknown_fields)]
9165pub struct GetIngestPipelineRequest {
9166 pub name: String,
9167 #[serde(default, skip_serializing_if = "Option::is_none")]
9168 pub expected_incarnation: Option<Identity>,
9169}
9170
9171#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9172#[serde(deny_unknown_fields)]
9173pub struct GetIngestPipelineResult {
9174 pub resource: IngestPipelineDetail,
9175}
9176
9177#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9178#[serde(deny_unknown_fields)]
9179pub struct SimulateIngestPipelineRequest {
9180 #[serde(default, skip_serializing_if = "Option::is_none")]
9181 pub name: Option<String>,
9182 #[serde(default, skip_serializing_if = "Option::is_none")]
9183 pub expected: Option<ExpectedBinding>,
9184 #[serde(default, skip_serializing_if = "Option::is_none")]
9185 pub definition: Option<RawJson>,
9186 pub source: RawJson,
9187}
9188
9189#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9190#[serde(deny_unknown_fields)]
9191pub struct SimulateIngestPipelineResult {
9192 #[serde(default, skip_serializing_if = "Option::is_none")]
9193 pub source: Option<RawJson>,
9194 pub dropped: bool,
9195 pub changed: bool,
9196}
9197
9198#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9199#[serde(deny_unknown_fields)]
9200pub struct ReprocessByQueryRequest {
9201 pub action_id: Digest,
9202 pub index: Resource,
9203 pub query: Query,
9204 #[serde(default, skip_serializing_if = "Option::is_none")]
9205 pub pipeline: Option<IngestPipelineSelection>,
9206 pub batch_size: u32,
9207 pub max_docs: U64,
9208 pub proceed_on_conflict: bool,
9209 pub slices: u32,
9210 pub requests_per_second: u32,
9211 pub wait_for_completion: bool,
9212}
9213
9214#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9215#[serde(deny_unknown_fields)]
9216pub struct ReprocessByQueryResult {
9217 pub task_id: Identity,
9218 pub scanned: U64,
9219 pub updated: U64,
9220 pub noops: U64,
9221 pub version_conflicts: U64,
9222 pub batches: U64,
9223 pub completed: bool,
9224}
9225
9226#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9227#[serde(deny_unknown_fields)]
9228pub struct ListLifecyclePoliciesRequest {
9229 pub page_size: u32,
9230 #[serde(default, skip_serializing_if = "Option::is_none")]
9231 pub cursor: Option<Cursor>,
9232 #[serde(default, skip_serializing_if = "Option::is_none")]
9233 pub name_prefix: Option<String>,
9234 pub restart_count: u32,
9235}
9236
9237#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9238#[serde(deny_unknown_fields)]
9239pub struct ListLifecyclePoliciesResult {
9240 pub items: Vec<LifecyclePolicySummary>,
9241 #[serde(default, skip_serializing_if = "Option::is_none")]
9242 pub next_cursor: Option<Cursor>,
9243 pub restart_count: u32,
9244}
9245
9246#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9247#[serde(deny_unknown_fields)]
9248pub struct GetLifecyclePolicyRequest {
9249 pub name: String,
9250}
9251
9252#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9253#[serde(deny_unknown_fields)]
9254pub struct GetLifecyclePolicyResult {
9255 pub resource: LifecyclePolicyDetail,
9256}
9257
9258#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9259#[serde(deny_unknown_fields)]
9260pub struct PrepareCreateIndexRequest {
9261 pub name: String,
9262 pub mapping: Mapping,
9263 #[serde(default, skip_serializing_if = "Option::is_none")]
9264 pub resource_spec: Option<IndexResourceSpec>,
9265 #[serde(default, skip_serializing_if = "Option::is_none")]
9266 pub retained_event_identity: Option<bool>,
9267}
9268
9269#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9270#[serde(deny_unknown_fields)]
9271pub struct PrepareCreateIndexResult {
9272 pub locator: Locator,
9273 pub expires_at: U64,
9274 pub semantic_digest: Digest,
9275 pub resource_spec: IndexResourceSpec,
9276}
9277
9278#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9279#[serde(deny_unknown_fields)]
9280pub struct PrepareDeleteIndexRequest {
9281 pub name: String,
9282 pub expected_incarnation: Identity,
9283}
9284
9285#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9286#[serde(deny_unknown_fields)]
9287pub struct PrepareDeleteIndexResult {
9288 #[serde(default, skip_serializing_if = "Option::is_none")]
9289 pub locator: Option<Locator>,
9290 #[serde(default, skip_serializing_if = "Option::is_none")]
9291 pub expires_at: Option<U64>,
9292 #[serde(default, skip_serializing_if = "Option::is_none")]
9293 pub semantic_digest: Option<Digest>,
9294 pub impact_digest: Digest,
9295 pub blockers: Vec<String>,
9296 pub scheduled_effects: Vec<String>,
9297 #[serde(default, skip_serializing_if = "Option::is_none")]
9298 pub estimated_documents: Option<U64>,
9299 #[serde(default, skip_serializing_if = "Option::is_none")]
9300 pub estimated_logical_bytes: Option<U64>,
9301}
9302
9303#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9304#[serde(deny_unknown_fields)]
9305pub struct SubmitCatalogActionRequest {
9306 pub locator: Locator,
9307 pub semantic_digest: Digest,
9308 pub action_kind: String,
9309 pub name: String,
9310 #[serde(default, skip_serializing_if = "Option::is_none")]
9311 pub mapping: Option<Mapping>,
9312 #[serde(default, skip_serializing_if = "Option::is_none")]
9313 pub resource_spec: Option<IndexResourceSpec>,
9314 #[serde(default, skip_serializing_if = "Option::is_none")]
9315 pub expected_incarnation: Option<Identity>,
9316}
9317
9318#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9319#[serde(deny_unknown_fields)]
9320pub struct SubmitCatalogActionResult {
9321 pub locator: Locator,
9322 pub state: String,
9323 pub mutation_outcome: MutationOutcome,
9324}
9325
9326#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9327#[serde(deny_unknown_fields)]
9328pub struct ResolveCatalogActionRequest {
9329 pub locator: Locator,
9330}
9331
9332#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9333#[serde(deny_unknown_fields)]
9334pub struct ResolveCatalogActionResult {
9335 pub locator: Locator,
9336 pub state: String,
9337 #[serde(default, skip_serializing_if = "Option::is_none")]
9338 pub resource: Option<Resource>,
9339}
9340
9341#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9342#[serde(deny_unknown_fields)]
9343pub struct PrepareReplayableSourceIndexRequest {
9344 pub name: String,
9345 pub mapping: Mapping,
9346 #[serde(default, skip_serializing_if = "Option::is_none")]
9347 pub resource_spec: Option<IndexResourceSpec>,
9348 pub source: ReplayableSourceConfiguration,
9349}
9350
9351#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9352#[serde(deny_unknown_fields)]
9353pub struct PrepareReplayableSourceIndexResult {
9354 pub locator: Locator,
9355 pub expires_at: U64,
9356 pub semantic_digest: Digest,
9357 pub resource_spec: IndexResourceSpec,
9358}
9359
9360#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9361#[serde(deny_unknown_fields)]
9362pub struct SubmitReplayableSourceIndexRequest {
9363 pub locator: Locator,
9364 pub semantic_digest: Digest,
9365 pub name: String,
9366 pub mapping: Mapping,
9367 pub resource_spec: IndexResourceSpec,
9368 pub source: ReplayableSourceConfiguration,
9369}
9370
9371#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9372#[serde(deny_unknown_fields)]
9373pub struct SubmitReplayableSourceIndexResult {
9374 pub locator: Locator,
9375 pub state: String,
9376 pub mutation_outcome: MutationOutcome,
9377}
9378
9379#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9380#[serde(deny_unknown_fields)]
9381pub struct GetReplayableSourceRequest {
9382 pub index: Resource,
9383}
9384
9385#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9386#[serde(deny_unknown_fields)]
9387pub struct GetReplayableSourceResult {
9388 pub status: ReplayableSourceStatus,
9389}
9390
9391#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9392#[serde(deny_unknown_fields)]
9393pub struct ControlReplayableSourceRequest {
9394 pub index: Resource,
9395 pub expected_generation: U64,
9396 pub transition: SourceControlTransition,
9397}
9398
9399#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9400#[serde(deny_unknown_fields)]
9401pub struct ControlReplayableSourceResult {
9402 pub status: ReplayableSourceStatus,
9403 pub mutation_outcome: MutationOutcome,
9404}
9405
9406#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9407#[serde(deny_unknown_fields)]
9408pub struct CloneIndexRequest {
9409 pub source: Resource,
9410 pub destination_name: String,
9411 pub operation_id: Identity,
9412 pub source_cut_id: Identity,
9413}
9414
9415#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9416#[serde(deny_unknown_fields)]
9417pub struct CloneIndexResult {
9418 pub destination: Resource,
9419 pub source_cut_id: Identity,
9420 pub mutation_outcome: MutationOutcome,
9421}
9422
9423#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9424#[serde(deny_unknown_fields)]
9425pub struct ConfigureHistoryRequest {
9426 pub index: Resource,
9427 pub precondition: HistoryLedgerPrecondition,
9428 pub policy: HistoryRetentionPolicy,
9429}
9430
9431#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9432#[serde(deny_unknown_fields)]
9433pub struct ConfigureHistoryResult {
9434 pub status: HistoryStatus,
9435 pub mutation_outcome: MutationOutcome,
9436}
9437
9438#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9439#[serde(deny_unknown_fields)]
9440pub struct GetHistoryRequest {
9441 pub index: Resource,
9442}
9443
9444#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9445#[serde(deny_unknown_fields)]
9446pub struct GetHistoryResult {
9447 pub status: HistoryStatus,
9448}
9449
9450#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9451#[serde(deny_unknown_fields)]
9452pub struct ResolveHistoryRequest {
9453 pub index: Resource,
9454 pub selector: HistorySelector,
9455}
9456
9457#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9458#[serde(deny_unknown_fields)]
9459pub struct ResolveHistoryResult {
9460 pub resolution: HistoryResolution,
9461}
9462
9463#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9464#[serde(deny_unknown_fields)]
9465pub struct PlaceHistoryHoldRequest {
9466 pub index: Resource,
9467 pub expected_ledger_revision: U64,
9468 pub hold: HistoryHold,
9469}
9470
9471#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9472#[serde(deny_unknown_fields)]
9473pub struct PlaceHistoryHoldResult {
9474 pub status: HistoryStatus,
9475 pub mutation_outcome: MutationOutcome,
9476}
9477
9478#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9479#[serde(deny_unknown_fields)]
9480pub struct ReleaseHistoryHoldRequest {
9481 pub index: Resource,
9482 pub expected_ledger_revision: U64,
9483 pub hold_id: Identity,
9484}
9485
9486#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9487#[serde(deny_unknown_fields)]
9488pub struct ReleaseHistoryHoldResult {
9489 pub status: HistoryStatus,
9490 pub mutation_outcome: MutationOutcome,
9491}
9492
9493#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9494#[serde(deny_unknown_fields)]
9495pub struct PrepareDocumentMutationRequest {
9496 pub index: Resource,
9497 pub document_id: String,
9498 pub operation: String,
9499 #[serde(default, skip_serializing_if = "Option::is_none")]
9500 pub source: Option<RawJson>,
9501 #[serde(default, skip_serializing_if = "Option::is_none")]
9502 pub record: Option<NativeRecord>,
9503 #[serde(default, skip_serializing_if = "Option::is_none")]
9504 pub routing: Option<String>,
9505 #[serde(default, skip_serializing_if = "Option::is_none")]
9506 pub condition: Option<DocumentMutationCondition>,
9507 #[serde(default, skip_serializing_if = "Option::is_none")]
9508 pub pipeline: Option<IngestPipelineSelection>,
9509}
9510
9511#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9512#[serde(deny_unknown_fields)]
9513pub struct PrepareDocumentMutationResult {
9514 pub locator: Locator,
9515 pub semantic_digest: Digest,
9516 pub retention_max_entries: U64,
9517 pub retention_sequence_window: U64,
9518}
9519
9520#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9521#[serde(deny_unknown_fields)]
9522pub struct SubmitDocumentMutationRequest {
9523 pub locator: Locator,
9524 pub semantic_digest: Digest,
9525 pub index: Resource,
9526 pub document_id: String,
9527 pub operation: String,
9528 #[serde(default, skip_serializing_if = "Option::is_none")]
9529 pub source: Option<RawJson>,
9530 #[serde(default, skip_serializing_if = "Option::is_none")]
9531 pub record: Option<NativeRecord>,
9532 #[serde(default, skip_serializing_if = "Option::is_none")]
9533 pub routing: Option<String>,
9534 #[serde(default, skip_serializing_if = "Option::is_none")]
9535 pub condition: Option<DocumentMutationCondition>,
9536 #[serde(default, skip_serializing_if = "Option::is_none")]
9537 pub pipeline: Option<IngestPipelineSelection>,
9538}
9539
9540#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9541#[serde(deny_unknown_fields)]
9542pub struct SubmitDocumentMutationResult {
9543 pub locator: Locator,
9544 pub state: String,
9545 pub mutation_outcome: MutationOutcome,
9546 #[serde(default, skip_serializing_if = "Option::is_none")]
9547 pub achievement: Option<WriteAchievement>,
9548 #[serde(default, skip_serializing_if = "Option::is_none")]
9549 pub sequence: Option<U64>,
9550 #[serde(default, skip_serializing_if = "Option::is_none")]
9551 pub mapping_generation: Option<U64>,
9552 pub mapping_adopted: bool,
9553 #[serde(default, skip_serializing_if = "Option::is_none")]
9554 pub commit_receipt: Option<MutationCommitReceipt>,
9555}
9556
9557#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9558#[serde(deny_unknown_fields)]
9559pub struct PrepareDocumentBulkRequest {
9560 pub batch_id: Digest,
9561 pub index: Resource,
9562 pub items: Vec<BulkDocumentItem>,
9563}
9564
9565#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9566#[serde(deny_unknown_fields)]
9567pub struct PrepareDocumentBulkResult {
9568 pub outcome: BulkDocumentOutcome,
9569}
9570
9571#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9572#[serde(deny_unknown_fields)]
9573pub struct SubmitDocumentBulkRequest {
9574 pub batch_id: Digest,
9575 pub index: Resource,
9576 pub items: Vec<BulkDocumentItem>,
9577 pub preparations: Vec<BulkDocumentItemOutcome>,
9578}
9579
9580#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9581#[serde(deny_unknown_fields)]
9582pub struct SubmitDocumentBulkResult {
9583 pub outcome: BulkDocumentOutcome,
9584}
9585
9586#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9587#[serde(deny_unknown_fields)]
9588pub struct ResolveDocumentBulkRequest {
9589 pub batch_id: Digest,
9590 pub index: Resource,
9591 pub items: Vec<BulkDocumentItemOutcome>,
9592}
9593
9594#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9595#[serde(deny_unknown_fields)]
9596pub struct ResolveDocumentBulkResult {
9597 pub outcome: BulkDocumentOutcome,
9598}
9599
9600#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9601#[serde(deny_unknown_fields)]
9602pub struct PrepareAppendBulkRequest {
9603 pub batch_id: Digest,
9604 pub index: Resource,
9605 pub items: Vec<RetainedAppendItem>,
9606}
9607
9608#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9609#[serde(deny_unknown_fields)]
9610pub struct PrepareAppendBulkResult {
9611 pub outcome: RetainedAppendBulkOutcome,
9612}
9613
9614#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9615#[serde(deny_unknown_fields)]
9616pub struct SubmitAppendBulkRequest {
9617 pub batch_id: Digest,
9618 pub index: Resource,
9619 pub items: Vec<RetainedAppendItem>,
9620 pub preparations: Vec<RetainedAppendItemOutcome>,
9621}
9622
9623#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9624#[serde(deny_unknown_fields)]
9625pub struct SubmitAppendBulkResult {
9626 pub outcome: RetainedAppendBulkOutcome,
9627}
9628
9629#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9630#[serde(deny_unknown_fields)]
9631pub struct ResolveAppendBulkRequest {
9632 pub batch_id: Digest,
9633 pub index: Resource,
9634 pub items: Vec<RetainedAppendItemOutcome>,
9635}
9636
9637#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9638#[serde(deny_unknown_fields)]
9639pub struct ResolveAppendBulkResult {
9640 pub outcome: RetainedAppendBulkOutcome,
9641}
9642
9643#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9644#[serde(deny_unknown_fields)]
9645pub struct ObserveAppendCommittedRequest {
9646 pub index: Resource,
9647 pub locator: Locator,
9648}
9649
9650#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9651#[serde(deny_unknown_fields)]
9652pub struct ObserveAppendCommittedResult {
9653 pub outcome: RetainedAppendObservationOutcome,
9654}
9655
9656#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9657#[serde(deny_unknown_fields)]
9658pub struct ResolveDocumentMutationRequest {
9659 pub locator: Locator,
9660}
9661
9662#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9663#[serde(deny_unknown_fields)]
9664pub struct ResolveDocumentMutationResult {
9665 pub locator: Locator,
9666 pub state: String,
9667 #[serde(default, skip_serializing_if = "Option::is_none")]
9668 pub sequence: Option<U64>,
9669 #[serde(default, skip_serializing_if = "Option::is_none")]
9670 pub mapping_generation: Option<U64>,
9671 pub mapping_adopted: bool,
9672 #[serde(default, skip_serializing_if = "Option::is_none")]
9673 pub source: Option<RawJson>,
9674 #[serde(default, skip_serializing_if = "Option::is_none")]
9675 pub commit_receipt: Option<MutationCommitReceipt>,
9676}
9677
9678#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9679#[serde(deny_unknown_fields)]
9680pub struct GetDocumentRequest {
9681 pub index: Resource,
9682 pub document_id: String,
9683 #[serde(default, skip_serializing_if = "Option::is_none")]
9684 pub routing: Option<String>,
9685}
9686
9687#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9688#[serde(deny_unknown_fields)]
9689pub struct GetDocumentResult {
9690 pub found: bool,
9691 #[serde(default, skip_serializing_if = "Option::is_none")]
9692 pub source: Option<RawJson>,
9693 #[serde(default, skip_serializing_if = "Option::is_none")]
9694 pub sequence: Option<U64>,
9695 #[serde(default, skip_serializing_if = "Option::is_none")]
9696 pub primary_term: Option<U64>,
9697}
9698
9699#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9700#[serde(deny_unknown_fields)]
9701pub struct SearchRequest {
9702 #[serde(default, skip_serializing_if = "Option::is_none")]
9703 pub indexes: Option<Vec<Resource>>,
9704 #[serde(default, skip_serializing_if = "Option::is_none")]
9705 pub query: Option<Query>,
9706 #[serde(default, skip_serializing_if = "Option::is_none")]
9707 pub retrieval: Option<RetrievalPlan>,
9708 #[serde(default, skip_serializing_if = "Option::is_none")]
9709 pub aggregations: Option<Vec<Aggregation>>,
9710 pub sort: Vec<SortSpec>,
9711 #[serde(default, skip_serializing_if = "Option::is_none")]
9712 pub routing: Option<Vec<String>>,
9713 pub freshness: SearchFreshness,
9714 pub page_size: u32,
9715 #[serde(default, skip_serializing_if = "Option::is_none")]
9716 pub cursor: Option<Cursor>,
9717 #[serde(default, skip_serializing_if = "Option::is_none")]
9718 pub pit: Option<Cursor>,
9719 pub allow_partial: bool,
9720 #[serde(default, skip_serializing_if = "Option::is_none")]
9721 pub total_hits_threshold: Option<U64>,
9722 pub diagnostics: bool,
9723 #[serde(default, skip_serializing_if = "Option::is_none")]
9724 pub fragments: Option<FragmentRequest>,
9725 #[serde(default, skip_serializing_if = "Option::is_none")]
9726 pub features: Option<ResultFeatureRequest>,
9727 #[serde(default, skip_serializing_if = "Option::is_none")]
9728 pub diversification: Option<ResultDiversification>,
9729 #[serde(default, skip_serializing_if = "Option::is_none")]
9730 pub source_projection: Option<SourceProjection>,
9731 #[serde(default, skip_serializing_if = "Option::is_none")]
9732 pub delegated_query_subject: Option<SignedDelegatedQuerySubject>,
9733}
9734
9735#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9736#[serde(deny_unknown_fields)]
9737pub struct SearchResult {
9738 pub hits: Vec<SearchHit>,
9739 pub aggregations: Vec<AggregationResult>,
9740 #[serde(default, skip_serializing_if = "Option::is_none")]
9741 pub next_cursor: Option<Cursor>,
9742 pub timed_out: bool,
9743 pub partial: bool,
9744 pub achieved: SearchAchievement,
9745 pub shards: ShardCounts,
9746 pub total: SearchTotal,
9747 pub failures: Vec<SearchPartialFailure>,
9748 pub vector_diagnostics: Vec<VectorBranchDiagnostics>,
9749 #[serde(default, skip_serializing_if = "Option::is_none")]
9750 pub read_cut: Option<ReadCutEvidence>,
9751}
9752
9753#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9754#[serde(deny_unknown_fields)]
9755pub struct TraverseRelationshipsRequest {
9756 pub pit: Cursor,
9757 pub indexes: Vec<Resource>,
9758 pub seeds: Vec<EntityRef>,
9759 pub direction: RelationshipTraversalDirection,
9760 pub filter: RelationshipTraversalFilter,
9761 pub budget: RelationshipTraversalBudget,
9762 pub allow_partial: bool,
9763}
9764
9765#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9766#[serde(deny_unknown_fields)]
9767pub struct TraverseRelationshipsResult {
9768 pub relationships: Vec<TraversedRelationship>,
9769 pub visited_entities: Vec<EntityRef>,
9770 pub input_cut_digest: Digest,
9771 pub partial: bool,
9772 pub incomplete_frontier: Vec<EntityRef>,
9773 pub failures: Vec<SearchPartialFailure>,
9774}
9775
9776#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9777#[serde(deny_unknown_fields)]
9778pub struct QueryProfilesRequest {
9779 pub pit: Cursor,
9780 pub indexes: Vec<Resource>,
9781 pub operation: ProfileQueryOperation,
9782 pub start_unix_nanos: U64,
9783 pub end_unix_nanos: U64,
9784 pub sample_type: String,
9785 pub unit: String,
9786 pub filter: ProfileQueryFilter,
9787 #[serde(default, skip_serializing_if = "Option::is_none")]
9788 pub group_by: Option<ProfileGroupBy>,
9789 pub budget: ProfileQueryBudget,
9790 pub allow_partial: bool,
9791}
9792
9793#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9794#[serde(deny_unknown_fields)]
9795pub struct QueryProfilesResult {
9796 pub rows: Vec<ProfileQueryRow>,
9797 pub evaluated_batches: u32,
9798 pub evaluated_samples: u32,
9799 pub input_cut_digest: Digest,
9800 pub partial: bool,
9801 pub approximate: bool,
9802 pub failures: Vec<SearchPartialFailure>,
9803}
9804
9805#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9806#[serde(deny_unknown_fields)]
9807pub struct EvaluateTemporalEvidenceRequest {
9808 pub pit: Cursor,
9809 pub definition: HistoricalTemporalDefinition,
9810}
9811
9812#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9813#[serde(deny_unknown_fields)]
9814pub struct EvaluateTemporalEvidenceResult {
9815 pub evidence: Vec<TemporalEvidence>,
9816 pub input_cut_digest: Digest,
9817 pub pattern_digest: Digest,
9818 pub evaluated_events: u32,
9819}
9820
9821#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9822#[serde(deny_unknown_fields)]
9823pub struct CreateContinuousTemporalEvaluationRequest {
9824 pub action_id: Digest,
9825 pub definition: ContinuousTemporalDefinition,
9826}
9827
9828#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9829#[serde(deny_unknown_fields)]
9830pub struct CreateContinuousTemporalEvaluationResult {
9831 pub evaluation: ContinuousTemporalEvaluation,
9832 pub mutation_outcome: MutationOutcome,
9833}
9834
9835#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9836#[serde(deny_unknown_fields)]
9837pub struct GetContinuousTemporalEvaluationRequest {
9838 pub evaluation_id: Identity,
9839}
9840
9841#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9842#[serde(deny_unknown_fields)]
9843pub struct GetContinuousTemporalEvaluationResult {
9844 pub evaluation: ContinuousTemporalEvaluation,
9845}
9846
9847#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9848#[serde(deny_unknown_fields)]
9849pub struct PauseContinuousTemporalEvaluationRequest {
9850 pub action_id: Digest,
9851 pub evaluation_id: Identity,
9852 pub expected_revision: U64,
9853}
9854
9855#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9856#[serde(deny_unknown_fields)]
9857pub struct PauseContinuousTemporalEvaluationResult {
9858 pub evaluation: ContinuousTemporalEvaluation,
9859 pub mutation_outcome: MutationOutcome,
9860}
9861
9862#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9863#[serde(deny_unknown_fields)]
9864pub struct ResumeContinuousTemporalEvaluationRequest {
9865 pub action_id: Digest,
9866 pub evaluation_id: Identity,
9867 pub expected_revision: U64,
9868}
9869
9870#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9871#[serde(deny_unknown_fields)]
9872pub struct ResumeContinuousTemporalEvaluationResult {
9873 pub evaluation: ContinuousTemporalEvaluation,
9874 pub mutation_outcome: MutationOutcome,
9875}
9876
9877#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9878#[serde(deny_unknown_fields)]
9879pub struct ReplaceContinuousTemporalEvaluationRequest {
9880 pub action_id: Digest,
9881 pub expected_revision: U64,
9882 pub definition: ContinuousTemporalDefinition,
9883}
9884
9885#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9886#[serde(deny_unknown_fields)]
9887pub struct ReplaceContinuousTemporalEvaluationResult {
9888 pub evaluation: ContinuousTemporalEvaluation,
9889 pub mutation_outcome: MutationOutcome,
9890}
9891
9892#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9893#[serde(deny_unknown_fields)]
9894pub struct RetireContinuousTemporalEvaluationRequest {
9895 pub action_id: Digest,
9896 pub evaluation_id: Identity,
9897 pub expected_revision: U64,
9898}
9899
9900#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9901#[serde(deny_unknown_fields)]
9902pub struct RetireContinuousTemporalEvaluationResult {
9903 #[serde(default, skip_serializing_if = "Option::is_none")]
9904 pub evaluation: Option<ContinuousTemporalEvaluation>,
9905 pub mutation_outcome: MutationOutcome,
9906}
9907
9908#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9909#[serde(deny_unknown_fields)]
9910pub struct ReadContinuousTemporalEvidenceRequest {
9911 pub evaluation_id: Identity,
9912 pub expected_revision: U64,
9913 pub minimum_event_time_unix_nanos: U64,
9914 pub page_size: u32,
9915 #[serde(default, skip_serializing_if = "Option::is_none")]
9916 pub cursor: Option<Cursor>,
9917}
9918
9919#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9920#[serde(deny_unknown_fields)]
9921pub struct ReadContinuousTemporalEvidenceResult {
9922 pub evidence: Vec<TemporalEvidence>,
9923 #[serde(default, skip_serializing_if = "Option::is_none")]
9924 pub next_cursor: Option<Cursor>,
9925 pub retained_floor_unix_nanos: U64,
9926 pub evaluation_revision: U64,
9927}
9928
9929#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9930#[serde(deny_unknown_fields)]
9931pub struct ValidateSearchRequest {
9932 pub indexes: Vec<Resource>,
9933 #[serde(default, skip_serializing_if = "Option::is_none")]
9934 pub query: Option<Query>,
9935 #[serde(default, skip_serializing_if = "Option::is_none")]
9936 pub retrieval: Option<RetrievalPlan>,
9937 #[serde(default, skip_serializing_if = "Option::is_none")]
9938 pub aggregations: Option<Vec<Aggregation>>,
9939 pub sort: Vec<SortSpec>,
9940 #[serde(default, skip_serializing_if = "Option::is_none")]
9941 pub routing: Option<Vec<String>>,
9942 pub freshness: SearchFreshness,
9943 pub page_size: u32,
9944 pub allow_partial: bool,
9945 #[serde(default, skip_serializing_if = "Option::is_none")]
9946 pub total_hits_threshold: Option<U64>,
9947 #[serde(default, skip_serializing_if = "Option::is_none")]
9948 pub fragments: Option<FragmentRequest>,
9949 #[serde(default, skip_serializing_if = "Option::is_none")]
9950 pub features: Option<ResultFeatureRequest>,
9951 #[serde(default, skip_serializing_if = "Option::is_none")]
9952 pub diversification: Option<ResultDiversification>,
9953 #[serde(default, skip_serializing_if = "Option::is_none")]
9954 pub source_projection: Option<SourceProjection>,
9955}
9956
9957#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9958#[serde(deny_unknown_fields)]
9959pub struct ValidateSearchResult {
9960 pub catalog_revision: U64,
9961 pub resolved_indexes: Vec<Resource>,
9962 pub authorized: bool,
9963 pub capabilities: Vec<String>,
9964 pub shape_digest: Digest,
9965 pub warnings: Vec<String>,
9966 pub refusals: Vec<String>,
9967 pub limits: Vec<SearchValidationLimit>,
9968 pub estimates: SearchValidationEstimates,
9969}
9970
9971#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9972#[serde(deny_unknown_fields)]
9973pub struct MaterializeTableSnapshotRequest {
9974 pub action_id: Digest,
9975 pub semantic_digest: Digest,
9976 pub index: Resource,
9977 pub keep_alive_millis: U64,
9978 pub maximum_objects: u32,
9979 pub maximum_range_bytes: U64,
9980}
9981
9982#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9983#[serde(deny_unknown_fields)]
9984pub struct MaterializeTableSnapshotResult {
9985 pub resolution: TableSnapshotResolution,
9986}
9987
9988#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9989#[serde(deny_unknown_fields)]
9990pub struct ResolveTableSnapshotRequest {
9991 pub action_id: Digest,
9992 pub semantic_digest: Digest,
9993 pub index: Resource,
9994 pub keep_alive_millis: U64,
9995 pub maximum_objects: u32,
9996 pub maximum_range_bytes: U64,
9997}
9998
9999#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10000#[serde(deny_unknown_fields)]
10001pub struct ResolveTableSnapshotResult {
10002 pub resolution: TableSnapshotResolution,
10003}
10004
10005#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10006#[serde(deny_unknown_fields)]
10007pub struct ReadTableSnapshotRequest {
10008 pub snapshot: Locator,
10009 pub index: Resource,
10010 pub object_id: Digest,
10011 pub offset: U64,
10012 pub length: u32,
10013}
10014
10015#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10016#[serde(deny_unknown_fields)]
10017pub struct ReadTableSnapshotResult {
10018 pub read: TableSnapshotRead,
10019}
10020
10021#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10022#[serde(deny_unknown_fields)]
10023pub struct OpenPitRequest {
10024 pub indexes: Vec<Resource>,
10025 pub keep_alive_millis: U64,
10026}
10027
10028#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10029#[serde(deny_unknown_fields)]
10030pub struct OpenPitResult {
10031 pub pit: Cursor,
10032 pub expires_at: U64,
10033 pub shard_count: u32,
10034 pub read_cut: ReadCutEvidence,
10035}
10036
10037#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10038#[serde(deny_unknown_fields)]
10039pub struct RenewPitRequest {
10040 pub pit: Cursor,
10041 pub keep_alive_millis: U64,
10042}
10043
10044#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10045#[serde(deny_unknown_fields)]
10046pub struct RenewPitResult {
10047 pub pit: Cursor,
10048 pub expires_at: U64,
10049 pub shard_count: u32,
10050 pub read_cut: ReadCutEvidence,
10051}
10052
10053#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10054#[serde(deny_unknown_fields)]
10055pub struct ClosePitRequest {
10056 pub pit: Cursor,
10057}
10058
10059#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10060#[serde(deny_unknown_fields)]
10061pub struct ClosePitResult {
10062 pub removed: bool,
10063}
10064
10065#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10066#[serde(deny_unknown_fields)]
10067pub struct ListOperationsRequest {
10068 pub page_size: u32,
10069 #[serde(default, skip_serializing_if = "Option::is_none")]
10070 pub cursor: Option<Cursor>,
10071}
10072
10073#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10074#[serde(deny_unknown_fields)]
10075pub struct ListOperationsResult {
10076 pub items: Vec<Operation>,
10077 #[serde(default, skip_serializing_if = "Option::is_none")]
10078 pub next_cursor: Option<Cursor>,
10079}
10080
10081#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10082#[serde(deny_unknown_fields)]
10083pub struct GetOperationRequest {
10084 pub locator: Locator,
10085}
10086
10087#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10088#[serde(deny_unknown_fields)]
10089pub struct GetOperationResult {
10090 pub operation: Operation,
10091}
10092
10093#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10094#[serde(deny_unknown_fields)]
10095pub struct WaitOperationRequest {
10096 pub locator: Locator,
10097 pub after_authority_revision: U64,
10098 pub maximum_attempts: u32,
10099 pub interval_millis: U64,
10100}
10101
10102#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10103#[serde(deny_unknown_fields)]
10104pub struct WaitOperationResult {
10105 pub operation: Operation,
10106 pub attempts: u32,
10107}
10108
10109#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10110#[serde(deny_unknown_fields)]
10111pub struct CancelOperationRequest {
10112 pub locator: Locator,
10113 pub expected_authority_revision: U64,
10114 pub cancel_action: Identity,
10115}
10116
10117#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10118#[serde(deny_unknown_fields)]
10119pub struct CancelOperationResult {
10120 pub locator: Locator,
10121 pub cancel_generation: U64,
10122 pub mutation_outcome: MutationOutcome,
10123}
10124
10125#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10126#[serde(deny_unknown_fields)]
10127pub struct ListAuditEventsRequest {
10128 pub start_time: U64,
10129 pub end_time: U64,
10130 pub actions: Vec<String>,
10131 pub page_size: u32,
10132 #[serde(default, skip_serializing_if = "Option::is_none")]
10133 pub cursor: Option<Cursor>,
10134}
10135
10136#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10137#[serde(deny_unknown_fields)]
10138pub struct ListAuditEventsResult {
10139 pub stream: AuditStreamState,
10140 pub events: Vec<AuditEvent>,
10141 #[serde(default, skip_serializing_if = "Option::is_none")]
10142 pub next_cursor: Option<Cursor>,
10143 pub gaps: Vec<AuditGap>,
10144 pub object_reads: u32,
10145}
10146
10147#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10148#[serde(deny_unknown_fields)]
10149pub struct ExportAuditEventsRequest {
10150 pub start_time: U64,
10151 pub end_time: U64,
10152 pub actions: Vec<String>,
10153 pub page_size: u32,
10154 #[serde(default, skip_serializing_if = "Option::is_none")]
10155 pub cursor: Option<Cursor>,
10156}
10157
10158#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10159#[serde(deny_unknown_fields)]
10160pub struct ExportAuditEventsResult {
10161 pub stream: AuditStreamState,
10162 pub events: Vec<AuditEvent>,
10163 #[serde(default, skip_serializing_if = "Option::is_none")]
10164 pub next_cursor: Option<Cursor>,
10165 pub gaps: Vec<AuditGap>,
10166 pub object_reads: u32,
10167}
10168
10169#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10170#[serde(deny_unknown_fields)]
10171pub struct ReserveServiceCredentialRequest {
10172 pub reservation_action_id: Digest,
10173 pub activation_action_id: Digest,
10174 pub role_grants: Vec<ServiceCredentialGrant>,
10175 pub credential_expires_at: U64,
10176 pub reservation_expires_at: U64,
10177}
10178
10179#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10180#[serde(deny_unknown_fields)]
10181pub struct ReserveServiceCredentialResult {
10182 pub reservation: ServiceCredentialReservation,
10183}
10184
10185#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10186#[serde(deny_unknown_fields)]
10187pub struct ReserveServiceCredentialRotationRequest {
10188 pub reservation_action_id: Digest,
10189 pub activation_action_id: Digest,
10190 pub current_api_key_id: Identity,
10191 pub expected_generation: U64,
10192 pub credential_expires_at: U64,
10193 pub overlap_until: U64,
10194 pub reservation_expires_at: U64,
10195}
10196
10197#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10198#[serde(deny_unknown_fields)]
10199pub struct ReserveServiceCredentialRotationResult {
10200 pub reservation: ServiceCredentialReservation,
10201}
10202
10203#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10204#[serde(deny_unknown_fields)]
10205pub struct ActivateServiceCredentialRequest {
10206 pub reservation: ServiceCredentialReservation,
10207 pub verifier: Digest,
10208}
10209
10210#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10211#[serde(deny_unknown_fields)]
10212pub struct ActivateServiceCredentialResult {
10213 pub locator: Locator,
10214 pub outcome: SecurityActionOutcome,
10215 pub secret_escrowed: bool,
10216}
10217
10218#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10219#[serde(deny_unknown_fields)]
10220pub struct ResolveServiceCredentialReservationRequest {
10221 pub reservation_action_id: Digest,
10222}
10223
10224#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10225#[serde(deny_unknown_fields)]
10226pub struct ResolveServiceCredentialReservationResult {
10227 pub state: String,
10228 #[serde(default, skip_serializing_if = "Option::is_none")]
10229 pub reservation: Option<ServiceCredentialReservation>,
10230 #[serde(default, skip_serializing_if = "Option::is_none")]
10231 pub outcome: Option<SecurityActionOutcome>,
10232}
10233
10234#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10235#[serde(deny_unknown_fields)]
10236pub struct PrepareRevokeServiceCredentialRequest {
10237 pub api_key_id: Identity,
10238 pub expected_generation: U64,
10239}
10240
10241#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10242#[serde(deny_unknown_fields)]
10243pub struct PrepareRevokeServiceCredentialResult {
10244 pub locator: Locator,
10245 pub semantic_digest: Digest,
10246 pub expires_at: U64,
10247}
10248
10249#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10250#[serde(deny_unknown_fields)]
10251pub struct RevokeServiceCredentialRequest {
10252 pub locator: Locator,
10253 pub api_key_id: Identity,
10254 pub expected_generation: U64,
10255}
10256
10257#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10258#[serde(deny_unknown_fields)]
10259pub struct RevokeServiceCredentialResult {
10260 pub locator: Locator,
10261 pub principal_id: Identity,
10262 pub api_key_id: Identity,
10263 pub state: String,
10264}
10265
10266#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10267#[serde(deny_unknown_fields)]
10268pub struct ResolveSecurityActionRequest {
10269 pub locator: Locator,
10270}
10271
10272#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10273#[serde(deny_unknown_fields)]
10274pub struct ResolveSecurityActionResult {
10275 pub locator: Locator,
10276 pub state: String,
10277 #[serde(default, skip_serializing_if = "Option::is_none")]
10278 pub result: Option<SecurityActionOutcome>,
10279 pub secret_escrowed: bool,
10280}
10281
10282#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10283#[serde(deny_unknown_fields)]
10284pub struct GetSecurityRoleRequest {
10285 pub role_name: String,
10286}
10287
10288#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10289#[serde(deny_unknown_fields)]
10290pub struct GetSecurityRoleResult {
10291 pub role: SecurityRole,
10292}
10293
10294#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10295#[serde(deny_unknown_fields)]
10296pub struct PrepareRoleAppendAccessChangeRequest {
10297 pub role_name: String,
10298 pub expected_role_version: U64,
10299 pub changes: Vec<RoleAppendScopeChange>,
10300}
10301
10302#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10303#[serde(deny_unknown_fields)]
10304pub struct PrepareRoleAppendAccessChangeResult {
10305 pub preparation: RoleAppendAccessPreparation,
10306}
10307
10308#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10309#[serde(deny_unknown_fields)]
10310pub struct SubmitRoleAppendAccessChangeRequest {
10311 pub locator: Locator,
10312 pub semantic_digest: Digest,
10313 pub role_name: String,
10314 pub expected_role_version: U64,
10315 pub changes: Vec<RoleAppendScopeChange>,
10316}
10317
10318#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10319#[serde(deny_unknown_fields)]
10320pub struct SubmitRoleAppendAccessChangeResult {
10321 pub locator: Locator,
10322 pub state: String,
10323 pub target_policy_revision: U64,
10324 pub role: SecurityRole,
10325}
10326
10327#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10328#[serde(deny_unknown_fields)]
10329pub struct PrepareSourceAuthorizationProjectionRequest {
10330 pub index: Resource,
10331 pub batch: SourceAuthorizationBatch,
10332}
10333
10334#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10335#[serde(deny_unknown_fields)]
10336pub struct PrepareSourceAuthorizationProjectionResult {
10337 pub preparation: SourceAuthorizationPreparation,
10338}
10339
10340#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10341#[serde(deny_unknown_fields)]
10342pub struct SubmitSourceAuthorizationProjectionRequest {
10343 pub index: Resource,
10344 pub action_id: Digest,
10345 pub semantic_digest: Digest,
10346 pub successor_generation: U64,
10347}
10348
10349#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10350#[serde(deny_unknown_fields)]
10351pub struct SubmitSourceAuthorizationProjectionResult {
10352 pub receipt: SourceAuthorizationReceipt,
10353 pub resolution: SourceAuthorizationResolution,
10354 pub mutation_outcome: MutationOutcome,
10355}
10356
10357#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10358#[serde(deny_unknown_fields)]
10359pub struct ResolveSourceAuthorizationProjectionRequest {
10360 pub index: Resource,
10361 pub action_id: Digest,
10362 pub semantic_digest: Digest,
10363 pub successor_generation: U64,
10364}
10365
10366#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10367#[serde(deny_unknown_fields)]
10368pub struct ResolveSourceAuthorizationProjectionResult {
10369 pub resolution: SourceAuthorizationResolution,
10370}
10371
10372#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10373#[serde(deny_unknown_fields)]
10374pub struct ListServiceCredentialsRequest {
10375 pub page_size: u32,
10376 #[serde(default, skip_serializing_if = "Option::is_none")]
10377 pub cursor: Option<Cursor>,
10378}
10379
10380#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10381#[serde(deny_unknown_fields)]
10382pub struct ListServiceCredentialsResult {
10383 pub items: Vec<ServiceCredentialSummary>,
10384 #[serde(default, skip_serializing_if = "Option::is_none")]
10385 pub next_cursor: Option<Cursor>,
10386}
10387
10388#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10389#[serde(deny_unknown_fields)]
10390pub struct GetRuntimeStatusRequest {}
10391
10392#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10393#[serde(deny_unknown_fields)]
10394pub struct GetRuntimeStatusResult {
10395 pub ready: bool,
10396 pub recovery_era: Identity,
10397 pub catalog_revision: U64,
10398 pub policy_revision: U64,
10399 pub redacted: RuntimeStatusDetail,
10400}
10401
10402#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10403#[serde(deny_unknown_fields)]
10404pub struct GetResultCacheStatusRequest {}
10405
10406#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10407#[serde(deny_unknown_fields)]
10408pub struct GetResultCacheStatusResult {
10409 pub status: ResultCacheStatus,
10410}
10411
10412#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10413#[serde(deny_unknown_fields)]
10414pub struct GetFieldPromotionStatusRequest {
10415 pub index: Resource,
10416}
10417
10418#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10419#[serde(deny_unknown_fields)]
10420pub struct GetFieldPromotionStatusResult {
10421 pub status: FieldPromotionStatus,
10422}
10423
10424#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10425#[serde(deny_unknown_fields)]
10426pub struct GetOverloadStatusRequest {
10427 pub index: Resource,
10428}
10429
10430#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10431#[serde(deny_unknown_fields)]
10432pub struct GetOverloadStatusResult {
10433 pub runtime_observed: bool,
10434 pub shards: Vec<OverloadShardStatus>,
10435}
10436
10437#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10438#[serde(deny_unknown_fields)]
10439pub struct ConfigureExternalKeyRequest {
10440 pub index: Resource,
10441 pub expected_authority_revision: U64,
10442 pub binding: ExternalKeyBinding,
10443}
10444
10445#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10446#[serde(deny_unknown_fields)]
10447pub struct ConfigureExternalKeyResult {
10448 pub status: LifecycleStatus,
10449 pub mutation_outcome: MutationOutcome,
10450}
10451
10452#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10453#[serde(deny_unknown_fields)]
10454pub struct RotateExternalKeyBindingRequest {
10455 pub index: Resource,
10456 pub expected_authority_revision: U64,
10457 pub predecessor_binding_id: Identity,
10458 pub binding: ExternalKeyBinding,
10459}
10460
10461#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10462#[serde(deny_unknown_fields)]
10463pub struct RotateExternalKeyBindingResult {
10464 pub status: LifecycleStatus,
10465 pub mutation_outcome: MutationOutcome,
10466}
10467
10468#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10469#[serde(deny_unknown_fields)]
10470pub struct RetireExternalKeyBindingRequest {
10471 pub action_id: Digest,
10472 pub index: Resource,
10473 pub expected_authority_revision: U64,
10474 pub target: ExternalKeyRetirementTarget,
10475}
10476
10477#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10478#[serde(deny_unknown_fields)]
10479pub struct RetireExternalKeyBindingResult {
10480 pub receipt: ExternalKeyRetirementReceipt,
10481}
10482
10483#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10484#[serde(deny_unknown_fields)]
10485pub struct ResolveExternalKeyBindingRetirementRequest {
10486 pub action_id: Digest,
10487 pub index: Resource,
10488 pub target: ExternalKeyRetirementTarget,
10489}
10490
10491#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10492#[serde(deny_unknown_fields)]
10493pub struct ResolveExternalKeyBindingRetirementResult {
10494 pub state: ExternalKeyRetirementResolutionState,
10495 #[serde(default, skip_serializing_if = "Option::is_none")]
10496 pub receipt: Option<ExternalKeyRetirementReceipt>,
10497 #[serde(default, skip_serializing_if = "Option::is_none")]
10498 pub current_authority_revision: Option<U64>,
10499 #[serde(default, skip_serializing_if = "Option::is_none")]
10500 pub current_authority_digest: Option<Digest>,
10501}
10502
10503#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10504#[serde(deny_unknown_fields)]
10505pub struct ConfigureAggregateThenDeleteRequest {
10506 pub index: Resource,
10507 pub expected_authority_revision: U64,
10508 pub policy: AggregateThenDeletePolicy,
10509}
10510
10511#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10512#[serde(deny_unknown_fields)]
10513pub struct ConfigureAggregateThenDeleteResult {
10514 pub status: LifecycleStatus,
10515 pub mutation_outcome: MutationOutcome,
10516}
10517
10518#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10519#[serde(deny_unknown_fields)]
10520pub struct GetLifecycleStatusRequest {
10521 pub index: Resource,
10522}
10523
10524#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10525#[serde(deny_unknown_fields)]
10526pub struct GetLifecycleStatusResult {
10527 pub status: LifecycleStatus,
10528}
10529
10530#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10531#[serde(deny_unknown_fields)]
10532pub struct EraseRecordRequest {
10533 pub action_id: Digest,
10534 pub index: Resource,
10535 pub locator: NativeRecordLocator,
10536 pub maximum_scan_bytes: U64,
10537 pub maximum_rewrite_bytes: U64,
10538 pub wait_for_completion: bool,
10539}
10540
10541#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10542#[serde(deny_unknown_fields)]
10543pub struct EraseRecordResult {
10544 pub receipt: RecordErasureReceipt,
10545}
10546
10547#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10548#[serde(deny_unknown_fields)]
10549pub struct ResolveRecordErasureRequest {
10550 pub action_id: Digest,
10551 pub index: Resource,
10552 pub locator: NativeRecordLocator,
10553 pub maximum_scan_bytes: U64,
10554 pub maximum_rewrite_bytes: U64,
10555 pub wait_for_completion: bool,
10556}
10557
10558#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10559#[serde(deny_unknown_fields)]
10560pub struct ResolveRecordErasureResult {
10561 #[serde(default, skip_serializing_if = "Option::is_none")]
10562 pub receipt: Option<RecordErasureReceipt>,
10563 pub expired_unknown: bool,
10564}
10565
10566#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10567#[serde(deny_unknown_fields)]
10568pub struct GetRecordErasureRequest {
10569 pub index: Resource,
10570 pub task_id: Identity,
10571}
10572
10573#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10574#[serde(deny_unknown_fields)]
10575pub struct GetRecordErasureResult {
10576 pub receipt: RecordErasureReceipt,
10577}
10578
10579#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10580#[serde(deny_unknown_fields)]
10581pub struct GetQuotaRequest {}
10582
10583#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10584#[serde(deny_unknown_fields)]
10585pub struct GetQuotaResult {
10586 pub revision: U64,
10587 pub limits: Vec<QuotaLimit>,
10588 pub usage: Vec<QuotaConsumption>,
10589}
10590
10591#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10592#[serde(deny_unknown_fields)]
10593pub struct UpdateQuotaRequest {
10594 pub expected_revision: U64,
10595 pub limits: Vec<QuotaLimit>,
10596}
10597
10598#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10599#[serde(deny_unknown_fields)]
10600pub struct UpdateQuotaResult {
10601 pub update: QuotaUpdate,
10602}
10603
10604#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10605#[serde(deny_unknown_fields)]
10606pub struct GetBindingRequest {}
10607
10608#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10609#[serde(deny_unknown_fields)]
10610pub struct GetBindingResult {
10611 pub binding: CoreBinding,
10612 pub derived: bool,
10613 pub revision: U64,
10614}
10615
10616#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10617#[serde(deny_unknown_fields)]
10618pub struct GetAdmissionStatusRequest {}
10619
10620#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10621#[serde(deny_unknown_fields)]
10622pub struct GetAdmissionStatusResult {
10623 pub state: String,
10624 pub revision: U64,
10625 pub converged: bool,
10626}
10627
10628#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10629#[serde(deny_unknown_fields)]
10630pub struct SetAdmissionRequest {
10631 pub expected_revision: U64,
10632 pub state: String,
10633}
10634
10635#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10636#[serde(deny_unknown_fields)]
10637pub struct SetAdmissionResult {
10638 pub state: String,
10639 pub revision: U64,
10640 pub converged: bool,
10641}
10642
10643#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10644#[serde(deny_unknown_fields)]
10645pub struct GetQuiesceStatusRequest {}
10646
10647#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10648#[serde(deny_unknown_fields)]
10649pub struct GetQuiesceStatusResult {
10650 pub ready: bool,
10651 pub blockers: Vec<String>,
10652 pub observations: Vec<ReadinessObservation>,
10653 pub recovery_era: Identity,
10654 pub observed_at: U64,
10655 pub expires_at: U64,
10656}
10657
10658#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10659#[serde(deny_unknown_fields)]
10660pub struct GetDecommissionReadinessRequest {}
10661
10662#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10663#[serde(deny_unknown_fields)]
10664pub struct GetDecommissionReadinessResult {
10665 pub ready: bool,
10666 pub blockers: Vec<String>,
10667 pub observations: Vec<ReadinessObservation>,
10668 pub recovery_era: Identity,
10669 pub observed_at: U64,
10670 pub expires_at: U64,
10671}
10672
10673#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10674#[serde(deny_unknown_fields)]
10675pub struct GetUpgradeReadinessRequest {}
10676
10677#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10678#[serde(deny_unknown_fields)]
10679pub struct GetUpgradeReadinessResult {
10680 pub ready: bool,
10681 pub blockers: Vec<String>,
10682 pub observations: Vec<ReadinessObservation>,
10683 pub recovery_era: Identity,
10684 pub observed_at: U64,
10685 pub expires_at: U64,
10686}
10687
10688#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10689#[serde(deny_unknown_fields)]
10690pub struct GetMaintenanceStatusRequest {
10691 pub page_size: u32,
10692 #[serde(default, skip_serializing_if = "Option::is_none")]
10693 pub cursor: Option<Cursor>,
10694 #[serde(default, skip_serializing_if = "Option::is_none")]
10695 pub index: Option<Resource>,
10696}
10697
10698#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10699#[serde(deny_unknown_fields)]
10700pub struct GetMaintenanceStatusResult {
10701 pub aggregate: MaintenanceStatusAggregate,
10702 pub items: Vec<MaintenanceTaskStatus>,
10703 #[serde(default, skip_serializing_if = "Option::is_none")]
10704 pub next_cursor: Option<Cursor>,
10705}
10706
10707#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10708#[serde(deny_unknown_fields)]
10709pub struct WarmVectorIndexRequest {
10710 pub index: Resource,
10711 #[serde(default, skip_serializing_if = "Option::is_none")]
10712 pub expected_root_digest: Option<Digest>,
10713 pub components: Vec<VectorWarmComponent>,
10714 pub maximum_requests: u32,
10715 pub maximum_bytes: U64,
10716 pub maximum_achievements: u32,
10717 pub expires_at: U64,
10718}
10719
10720#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10721#[serde(deny_unknown_fields)]
10722pub struct WarmVectorIndexResult {
10723 pub result: VectorWarmResult,
10724}
10725
10726#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10727#[serde(deny_unknown_fields)]
10728pub struct EvaluateVectorRecallRequest {
10729 pub action_id: Digest,
10730 pub index: Resource,
10731 pub field: String,
10732 pub mapping_generation: U64,
10733 pub snapshot: VectorEvaluationSnapshot,
10734 pub query_set: VectorEvaluationQuerySet,
10735 #[serde(default, skip_serializing_if = "Option::is_none")]
10736 pub filter: Option<Query>,
10737 pub metric: VectorMetric,
10738 pub k: u32,
10739 pub candidate_policy: VectorCandidatePolicy,
10740 pub budget: VectorEvaluationBudget,
10741 pub maximum_bytes: U64,
10742}
10743
10744#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10745#[serde(deny_unknown_fields)]
10746pub struct EvaluateVectorRecallResult {
10747 pub operation: Operation,
10748}
10749
10750#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10751#[serde(deny_unknown_fields)]
10752pub struct CalibrateVectorStrategyRequest {
10753 pub action_id: Digest,
10754 pub index: Resource,
10755 pub field: String,
10756 pub mapping_generation: U64,
10757 pub snapshot: VectorEvaluationSnapshot,
10758 pub query_set: VectorEvaluationQuerySet,
10759 #[serde(default, skip_serializing_if = "Option::is_none")]
10760 pub filter: Option<Query>,
10761 pub metric: VectorMetric,
10762 pub k: u32,
10763 pub objective: VectorCalibrationObjective,
10764 pub minimum_recall_basis_points: u32,
10765 pub budget: VectorEvaluationBudget,
10766 pub maximum_bytes: U64,
10767}
10768
10769#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10770#[serde(deny_unknown_fields)]
10771pub struct CalibrateVectorStrategyResult {
10772 pub operation: Operation,
10773}
10774
10775#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10776#[serde(deny_unknown_fields)]
10777pub struct GetVectorDiagnosticRequest {
10778 pub locator: Locator,
10779}
10780
10781#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10782#[serde(deny_unknown_fields)]
10783pub struct GetVectorDiagnosticResult {
10784 pub operation: Operation,
10785 pub artifacts: Vec<Artifact>,
10786 #[serde(default, skip_serializing_if = "Option::is_none")]
10787 pub result: Option<VectorDiagnosticResult>,
10788}
10789
10790#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10791#[serde(deny_unknown_fields)]
10792pub struct CreateDiagnosticRequest {
10793 pub scope: String,
10794 pub maximum_bytes: U64,
10795}
10796
10797#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10798#[serde(deny_unknown_fields)]
10799pub struct CreateDiagnosticResult {
10800 pub operation: Operation,
10801}
10802
10803#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10804#[serde(deny_unknown_fields)]
10805pub struct GetDiagnosticRequest {
10806 pub locator: Locator,
10807}
10808
10809#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10810#[serde(deny_unknown_fields)]
10811pub struct GetDiagnosticResult {
10812 pub operation: Operation,
10813 pub artifacts: Vec<Artifact>,
10814}
10815
10816#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10817#[serde(deny_unknown_fields)]
10818pub struct PrepareCollectionExportRequest {
10819 pub action_id: Digest,
10820 pub storage: PortabilityStorageCapability,
10821}
10822
10823#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10824#[serde(deny_unknown_fields)]
10825pub struct PrepareCollectionExportResult {
10826 pub semantic_digest: Digest,
10827 pub maximum_bytes: U64,
10828}
10829
10830#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10831#[serde(deny_unknown_fields)]
10832pub struct StartCollectionExportRequest {
10833 pub action_id: Digest,
10834 pub semantic_digest: Digest,
10835 pub storage: PortabilityStorageCapability,
10836}
10837
10838#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10839#[serde(deny_unknown_fields)]
10840pub struct StartCollectionExportResult {
10841 pub operation: Operation,
10842}
10843
10844#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10845#[serde(deny_unknown_fields)]
10846pub struct ResolveCollectionExportRequest {
10847 pub action_id: Digest,
10848 pub semantic_digest: Digest,
10849 pub storage: PortabilityStorageCapability,
10850}
10851
10852#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10853#[serde(deny_unknown_fields)]
10854pub struct ResolveCollectionExportResult {
10855 #[serde(default, skip_serializing_if = "Option::is_none")]
10856 pub operation: Option<Operation>,
10857 #[serde(default, skip_serializing_if = "Option::is_none")]
10858 pub artifact: Option<CollectionExportArtifact>,
10859 pub expired_unknown: bool,
10860}
10861
10862#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10863#[serde(deny_unknown_fields)]
10864pub struct VerifyCollectionExportRequest {
10865 pub artifact: CollectionExportArtifact,
10866 pub storage: PortabilityStorageCapability,
10867}
10868
10869#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10870#[serde(deny_unknown_fields)]
10871pub struct VerifyCollectionExportResult {
10872 pub verified: bool,
10873 pub source_collection_id: Identity,
10874 pub source_catalog_revision: U64,
10875 pub index_count: u32,
10876 pub document_count: U64,
10877}
10878
10879#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10880#[serde(deny_unknown_fields)]
10881pub struct PrepareCollectionExportRetirementRequest {
10882 pub action_id: Digest,
10883 pub artifact: CollectionExportArtifact,
10884 pub storage: PortabilityStorageCapability,
10885}
10886
10887#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10888#[serde(deny_unknown_fields)]
10889pub struct PrepareCollectionExportRetirementResult {
10890 pub semantic_digest: Digest,
10891 pub maximum_bytes: U64,
10892}
10893
10894#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10895#[serde(deny_unknown_fields)]
10896pub struct StartCollectionExportRetirementRequest {
10897 pub action_id: Digest,
10898 pub semantic_digest: Digest,
10899 pub artifact: CollectionExportArtifact,
10900 pub storage: PortabilityStorageCapability,
10901}
10902
10903#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10904#[serde(deny_unknown_fields)]
10905pub struct StartCollectionExportRetirementResult {
10906 pub operation: Operation,
10907}
10908
10909#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10910#[serde(deny_unknown_fields)]
10911pub struct ResolveCollectionExportRetirementRequest {
10912 pub action_id: Digest,
10913 pub semantic_digest: Digest,
10914 pub artifact: CollectionExportArtifact,
10915 pub storage: PortabilityStorageCapability,
10916}
10917
10918#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10919#[serde(deny_unknown_fields)]
10920pub struct ResolveCollectionExportRetirementResult {
10921 #[serde(default, skip_serializing_if = "Option::is_none")]
10922 pub operation: Option<Operation>,
10923 #[serde(default, skip_serializing_if = "Option::is_none")]
10924 pub retirement: Option<CollectionExportRetirement>,
10925 pub expired_unknown: bool,
10926}
10927
10928#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10929#[serde(deny_unknown_fields)]
10930pub struct PrepareCollectionRestoreRequest {
10931 pub action_id: Digest,
10932 pub artifact: CollectionExportArtifact,
10933 pub storage: PortabilityStorageCapability,
10934}
10935
10936#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10937#[serde(deny_unknown_fields)]
10938pub struct PrepareCollectionRestoreResult {
10939 pub semantic_digest: Digest,
10940 pub source_collection_id: Identity,
10941 pub maximum_bytes: U64,
10942}
10943
10944#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10945#[serde(deny_unknown_fields)]
10946pub struct StartCollectionRestoreRequest {
10947 pub action_id: Digest,
10948 pub semantic_digest: Digest,
10949 pub artifact: CollectionExportArtifact,
10950 pub storage: PortabilityStorageCapability,
10951}
10952
10953#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10954#[serde(deny_unknown_fields)]
10955pub struct StartCollectionRestoreResult {
10956 pub operation: Operation,
10957}
10958
10959#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10960#[serde(deny_unknown_fields)]
10961pub struct ResolveCollectionRestoreRequest {
10962 pub action_id: Digest,
10963 pub semantic_digest: Digest,
10964 pub artifact: CollectionExportArtifact,
10965 pub storage: PortabilityStorageCapability,
10966}
10967
10968#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10969#[serde(deny_unknown_fields)]
10970pub struct ResolveCollectionRestoreResult {
10971 #[serde(default, skip_serializing_if = "Option::is_none")]
10972 pub operation: Option<Operation>,
10973 pub expired_unknown: bool,
10974}
10975
10976#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10977#[serde(deny_unknown_fields)]
10978pub struct PrepareCollectionTransferExportRequest {
10979 pub action_id: Digest,
10980 pub expected_security_generation: U64,
10981 pub storage: PortabilityStorageCapability,
10982}
10983
10984#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10985#[serde(deny_unknown_fields)]
10986pub struct PrepareCollectionTransferExportResult {
10987 pub semantic_digest: Digest,
10988 pub maximum_bytes: U64,
10989}
10990
10991#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10992#[serde(deny_unknown_fields)]
10993pub struct StartCollectionTransferExportRequest {
10994 pub action_id: Digest,
10995 pub semantic_digest: Digest,
10996 pub expected_security_generation: U64,
10997 pub storage: PortabilityStorageCapability,
10998}
10999
11000#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11001#[serde(deny_unknown_fields)]
11002pub struct StartCollectionTransferExportResult {
11003 pub operation: Operation,
11004}
11005
11006#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11007#[serde(deny_unknown_fields)]
11008pub struct ResolveCollectionTransferExportRequest {
11009 pub action_id: Digest,
11010 pub semantic_digest: Digest,
11011 pub expected_security_generation: U64,
11012 pub storage: PortabilityStorageCapability,
11013}
11014
11015#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11016#[serde(deny_unknown_fields)]
11017pub struct ResolveCollectionTransferExportResult {
11018 #[serde(default, skip_serializing_if = "Option::is_none")]
11019 pub operation: Option<Operation>,
11020 #[serde(default, skip_serializing_if = "Option::is_none")]
11021 pub artifact: Option<CollectionTransferArtifact>,
11022 pub expired_unknown: bool,
11023}
11024
11025#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11026#[serde(deny_unknown_fields)]
11027pub struct PrepareCollectionTransferRestoreRequest {
11028 pub action_id: Digest,
11029 pub artifact: CollectionTransferArtifact,
11030 pub storage: PortabilityStorageCapability,
11031}
11032
11033#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11034#[serde(deny_unknown_fields)]
11035pub struct PrepareCollectionTransferRestoreResult {
11036 pub semantic_digest: Digest,
11037 pub source_collection_id: Identity,
11038 pub final_content_digest: Digest,
11039 pub maximum_bytes: U64,
11040}
11041
11042#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11043#[serde(deny_unknown_fields)]
11044pub struct StartCollectionTransferRestoreRequest {
11045 pub action_id: Digest,
11046 pub semantic_digest: Digest,
11047 pub artifact: CollectionTransferArtifact,
11048 pub storage: PortabilityStorageCapability,
11049}
11050
11051#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11052#[serde(deny_unknown_fields)]
11053pub struct StartCollectionTransferRestoreResult {
11054 pub operation: Operation,
11055}
11056
11057#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11058#[serde(deny_unknown_fields)]
11059pub struct ResolveCollectionTransferRestoreRequest {
11060 pub action_id: Digest,
11061 pub semantic_digest: Digest,
11062 pub artifact: CollectionTransferArtifact,
11063 pub storage: PortabilityStorageCapability,
11064}
11065
11066#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11067#[serde(deny_unknown_fields)]
11068pub struct ResolveCollectionTransferRestoreResult {
11069 #[serde(default, skip_serializing_if = "Option::is_none")]
11070 pub operation: Option<Operation>,
11071 #[serde(default, skip_serializing_if = "Option::is_none")]
11072 pub verified_content_digest: Option<Digest>,
11073 pub expired_unknown: bool,
11074}
11075
11076#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11077#[serde(deny_unknown_fields)]
11078pub struct PrepareCollectionStandbyAdmissionRequest {
11079 pub action_id: Digest,
11080 pub standby_id: Digest,
11081 pub restore_action_id: Digest,
11082 pub restore_semantic_digest: Digest,
11083 pub artifact: CollectionTransferArtifact,
11084 pub storage: PortabilityStorageCapability,
11085 pub expected_standby_catalog_revision: U64,
11086 pub expected_standby_security_generation: U64,
11087}
11088
11089#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11090#[serde(deny_unknown_fields)]
11091pub struct PrepareCollectionStandbyAdmissionResult {
11092 pub semantic_digest: Digest,
11093 pub binding_digest: Digest,
11094 pub source_durability_digest: Digest,
11095 pub standby_durability_digest: Digest,
11096}
11097
11098#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11099#[serde(deny_unknown_fields)]
11100pub struct StartCollectionStandbyAdmissionRequest {
11101 pub action_id: Digest,
11102 pub semantic_digest: Digest,
11103 pub standby_id: Digest,
11104 pub restore_action_id: Digest,
11105 pub restore_semantic_digest: Digest,
11106 pub artifact: CollectionTransferArtifact,
11107 pub storage: PortabilityStorageCapability,
11108 pub expected_standby_catalog_revision: U64,
11109 pub expected_standby_security_generation: U64,
11110}
11111
11112#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11113#[serde(deny_unknown_fields)]
11114pub struct StartCollectionStandbyAdmissionResult {
11115 pub operation: Operation,
11116}
11117
11118#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11119#[serde(deny_unknown_fields)]
11120pub struct ResolveCollectionStandbyAdmissionRequest {
11121 pub action_id: Digest,
11122 pub semantic_digest: Digest,
11123 pub standby_id: Digest,
11124 pub restore_action_id: Digest,
11125 pub restore_semantic_digest: Digest,
11126 pub artifact: CollectionTransferArtifact,
11127 pub storage: PortabilityStorageCapability,
11128 pub expected_standby_catalog_revision: U64,
11129 pub expected_standby_security_generation: U64,
11130}
11131
11132#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11133#[serde(deny_unknown_fields)]
11134pub struct ResolveCollectionStandbyAdmissionResult {
11135 #[serde(default, skip_serializing_if = "Option::is_none")]
11136 pub operation: Option<Operation>,
11137 #[serde(default, skip_serializing_if = "Option::is_none")]
11138 pub standby: Option<CollectionStandby>,
11139 pub expired_unknown: bool,
11140}
11141
11142#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11143#[serde(deny_unknown_fields)]
11144pub struct PrepareCollectionStandbyActivationRequest {
11145 pub action_id: Digest,
11146 pub standby_id: Digest,
11147 pub binding_digest: Digest,
11148 pub expected_activation_generation: U64,
11149 pub expected_standby_catalog_revision: U64,
11150 pub expected_standby_security_generation: U64,
11151 pub expected_standby_content_digest: Digest,
11152 pub expected_standby_durability_digest: Digest,
11153}
11154
11155#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11156#[serde(deny_unknown_fields)]
11157pub struct PrepareCollectionStandbyActivationResult {
11158 pub semantic_digest: Digest,
11159 pub activation_generation: U64,
11160 pub activation_fence: Digest,
11161}
11162
11163#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11164#[serde(deny_unknown_fields)]
11165pub struct StartCollectionStandbyActivationRequest {
11166 pub action_id: Digest,
11167 pub semantic_digest: Digest,
11168 pub standby_id: Digest,
11169 pub binding_digest: Digest,
11170 pub expected_activation_generation: U64,
11171 pub expected_standby_catalog_revision: U64,
11172 pub expected_standby_security_generation: U64,
11173 pub expected_standby_content_digest: Digest,
11174 pub expected_standby_durability_digest: Digest,
11175}
11176
11177#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11178#[serde(deny_unknown_fields)]
11179pub struct StartCollectionStandbyActivationResult {
11180 pub operation: Operation,
11181}
11182
11183#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11184#[serde(deny_unknown_fields)]
11185pub struct ResolveCollectionStandbyActivationRequest {
11186 pub action_id: Digest,
11187 pub semantic_digest: Digest,
11188 pub standby_id: Digest,
11189 pub binding_digest: Digest,
11190 pub expected_activation_generation: U64,
11191 pub expected_standby_catalog_revision: U64,
11192 pub expected_standby_security_generation: U64,
11193 pub expected_standby_content_digest: Digest,
11194 pub expected_standby_durability_digest: Digest,
11195}
11196
11197#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11198#[serde(deny_unknown_fields)]
11199pub struct ResolveCollectionStandbyActivationResult {
11200 #[serde(default, skip_serializing_if = "Option::is_none")]
11201 pub operation: Option<Operation>,
11202 #[serde(default, skip_serializing_if = "Option::is_none")]
11203 pub standby: Option<CollectionStandby>,
11204 pub expired_unknown: bool,
11205}
11206
11207#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11208#[serde(deny_unknown_fields)]
11209pub struct PrepareIndexExportRequest {
11210 pub action_id: Digest,
11211 pub index: Resource,
11212 pub storage: PortabilityStorageCapability,
11213 pub maximum_records: u32,
11214 pub maximum_pages: u32,
11215 pub maximum_page_bytes: U64,
11216}
11217
11218#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11219#[serde(deny_unknown_fields)]
11220pub struct PrepareIndexExportResult {
11221 pub semantic_digest: Digest,
11222 pub maximum_bytes: U64,
11223}
11224
11225#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11226#[serde(deny_unknown_fields)]
11227pub struct StartIndexExportRequest {
11228 pub action_id: Digest,
11229 pub semantic_digest: Digest,
11230 pub index: Resource,
11231 pub storage: PortabilityStorageCapability,
11232 pub maximum_records: u32,
11233 pub maximum_pages: u32,
11234 pub maximum_page_bytes: U64,
11235}
11236
11237#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11238#[serde(deny_unknown_fields)]
11239pub struct StartIndexExportResult {
11240 pub operation: Operation,
11241}
11242
11243#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11244#[serde(deny_unknown_fields)]
11245pub struct ResolveIndexExportRequest {
11246 pub action_id: Digest,
11247 pub semantic_digest: Digest,
11248 pub index: Resource,
11249 pub storage: PortabilityStorageCapability,
11250 pub maximum_records: u32,
11251 pub maximum_pages: u32,
11252 pub maximum_page_bytes: U64,
11253}
11254
11255#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11256#[serde(deny_unknown_fields)]
11257pub struct ResolveIndexExportResult {
11258 #[serde(default, skip_serializing_if = "Option::is_none")]
11259 pub operation: Option<Operation>,
11260 #[serde(default, skip_serializing_if = "Option::is_none")]
11261 pub artifact: Option<IndexTransferArtifact>,
11262 pub expired_unknown: bool,
11263}
11264
11265#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11266#[serde(deny_unknown_fields)]
11267pub struct VerifyIndexExportRequest {
11268 pub artifact: IndexTransferArtifact,
11269 pub storage: PortabilityStorageCapability,
11270}
11271
11272#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11273#[serde(deny_unknown_fields)]
11274pub struct VerifyIndexExportResult {
11275 pub verified: bool,
11276 pub source_cluster_storage_id: Identity,
11277 pub source_collection_id: Identity,
11278 pub source_index: Resource,
11279 pub source_catalog_revision: U64,
11280 pub source_cut_digest: Digest,
11281 pub page_count: u32,
11282 pub record_count: u32,
11283}
11284
11285#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11286#[serde(deny_unknown_fields)]
11287pub struct PrepareIndexImportRequest {
11288 pub action_id: Digest,
11289 pub artifact: IndexTransferArtifact,
11290 pub storage: PortabilityStorageCapability,
11291 pub destination_name: String,
11292 pub expected_name_absent: bool,
11293 pub destination_policies: IndexPolicies,
11294 pub destination_resource_spec: IndexResourceSpec,
11295}
11296
11297#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11298#[serde(deny_unknown_fields)]
11299pub struct PrepareIndexImportResult {
11300 pub semantic_digest: Digest,
11301 pub source_cluster_storage_id: Identity,
11302 pub source_collection_id: Identity,
11303 pub source_index: Resource,
11304 pub maximum_bytes: U64,
11305}
11306
11307#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11308#[serde(deny_unknown_fields)]
11309pub struct StartIndexImportRequest {
11310 pub action_id: Digest,
11311 pub semantic_digest: Digest,
11312 pub artifact: IndexTransferArtifact,
11313 pub storage: PortabilityStorageCapability,
11314 pub destination_name: String,
11315 pub expected_name_absent: bool,
11316 pub destination_policies: IndexPolicies,
11317 pub destination_resource_spec: IndexResourceSpec,
11318}
11319
11320#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11321#[serde(deny_unknown_fields)]
11322pub struct StartIndexImportResult {
11323 pub operation: Operation,
11324}
11325
11326#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11327#[serde(deny_unknown_fields)]
11328pub struct ResolveIndexImportRequest {
11329 pub action_id: Digest,
11330 pub semantic_digest: Digest,
11331 pub artifact: IndexTransferArtifact,
11332 pub storage: PortabilityStorageCapability,
11333 pub destination_name: String,
11334 pub expected_name_absent: bool,
11335 pub destination_policies: IndexPolicies,
11336 pub destination_resource_spec: IndexResourceSpec,
11337}
11338
11339#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11340#[serde(deny_unknown_fields)]
11341pub struct ResolveIndexImportResult {
11342 #[serde(default, skip_serializing_if = "Option::is_none")]
11343 pub operation: Option<Operation>,
11344 #[serde(default, skip_serializing_if = "Option::is_none")]
11345 pub destination: Option<Resource>,
11346 pub expired_unknown: bool,
11347}
11348
11349#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11350#[serde(deny_unknown_fields)]
11351pub struct ReadArtifactChunkRequest {
11352 pub artifact: Artifact,
11353 pub offset: U64,
11354 pub length: u32,
11355}
11356
11357#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11358#[serde(deny_unknown_fields)]
11359pub struct ReadArtifactChunkResult {
11360 pub offset: U64,
11361 pub bytes_base64: String,
11362 pub chunk_sha256: String,
11363 pub artifact_sha256: String,
11364 pub complete: bool,
11365}
11366
11367#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11368#[serde(deny_unknown_fields)]
11369pub struct ExportUsageRequest {
11370 pub window_start: U64,
11371 pub window_end: U64,
11372 pub page_size: u32,
11373 #[serde(default, skip_serializing_if = "Option::is_none")]
11374 pub cursor: Option<Cursor>,
11375}
11376
11377#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11378#[serde(deny_unknown_fields)]
11379pub struct ExportUsageResult {
11380 pub units: Vec<CoreUsageUnits>,
11381 pub corrections: Vec<CoreUsageCorrection>,
11382 #[serde(default, skip_serializing_if = "Option::is_none")]
11383 pub next_cursor: Option<Cursor>,
11384 pub cumulative_through: U64,
11385}
11386
11387#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11388#[serde(deny_unknown_fields)]
11389pub struct GetStorageUsageRequest {}
11390
11391#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11392#[serde(deny_unknown_fields)]
11393pub struct GetStorageUsageResult {
11394 pub usage: CollectionStorageUsage,
11395}
11396
11397#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11398#[serde(deny_unknown_fields)]
11399pub struct ReadLogicalOccupancyRequest {
11400 pub index: Resource,
11401 #[serde(default, skip_serializing_if = "Option::is_none")]
11402 pub pit: Option<Cursor>,
11403 #[serde(default, skip_serializing_if = "Option::is_none")]
11404 pub window_start: Option<U64>,
11405 #[serde(default, skip_serializing_if = "Option::is_none")]
11406 pub window_end: Option<U64>,
11407 pub page_size: u32,
11408 #[serde(default, skip_serializing_if = "Option::is_none")]
11409 pub cursor: Option<Cursor>,
11410}
11411
11412#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11413#[serde(deny_unknown_fields)]
11414pub struct ReadLogicalOccupancyResult {
11415 #[serde(default, skip_serializing_if = "Option::is_none")]
11416 pub evidence: Option<LogicalOccupancySnapshotEvidence>,
11417 #[serde(default, skip_serializing_if = "Option::is_none")]
11418 pub window_gap: Option<LogicalOccupancyWindowGap>,
11419 #[serde(default, skip_serializing_if = "Option::is_none")]
11420 pub next_cursor: Option<Cursor>,
11421}
11422
11423#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11424#[serde(deny_unknown_fields)]
11425pub struct ExecuteStateReadRequest {
11426 pub index: Resource,
11427 pub operation: StateOperation,
11428}
11429
11430#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11431#[serde(deny_unknown_fields)]
11432pub struct ExecuteStateReadResult {
11433 pub result: StateCommandResult,
11434}
11435
11436#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11437#[serde(deny_unknown_fields)]
11438pub struct PrepareStateWriteRequest {
11439 pub index: Resource,
11440 pub action_id: Digest,
11441 pub operation: StateOperation,
11442}
11443
11444#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11445#[serde(deny_unknown_fields)]
11446pub struct PrepareStateWriteResult {
11447 pub locator: Locator,
11448 pub semantic_digest: Digest,
11449 pub retention_max_entries: U64,
11450 pub retention_sequence_window: U64,
11451}
11452
11453#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11454#[serde(deny_unknown_fields)]
11455pub struct SubmitStateWriteRequest {
11456 pub index: Resource,
11457 pub action_id: Digest,
11458 pub operation: StateOperation,
11459 pub locator: Locator,
11460 pub semantic_digest: Digest,
11461}
11462
11463#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11464#[serde(deny_unknown_fields)]
11465pub struct SubmitStateWriteResult {
11466 #[serde(default, skip_serializing_if = "Option::is_none")]
11467 pub result: Option<StateCommandResult>,
11468 #[serde(default, skip_serializing_if = "Option::is_none")]
11469 pub resolution: Option<StateWriteResolution>,
11470 pub mutation_outcome: MutationOutcome,
11471 #[serde(default, skip_serializing_if = "Option::is_none")]
11472 pub achievement: Option<WriteAchievement>,
11473}
11474
11475#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11476#[serde(deny_unknown_fields)]
11477pub struct ResolveStateWriteRequest {
11478 pub index: Resource,
11479 pub action_id: Digest,
11480 pub operation: StateOperation,
11481 pub locator: Locator,
11482 pub semantic_digest: Digest,
11483}
11484
11485#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11486#[serde(deny_unknown_fields)]
11487pub struct ResolveStateWriteResult {
11488 pub resolution: StateWriteResolution,
11489}
11490
11491#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11492#[serde(tag = "command", content = "body", rename_all = "snake_case")]
11493pub enum RequestBody {
11494 Discover(DiscoverRequest),
11495 ListIndexes(ListIndexesRequest),
11496 GetIndex(GetIndexRequest),
11497 ValidateIndexChange(ValidateIndexChangeRequest),
11498 ApplyIndexChange(ApplyIndexChangeRequest),
11499 ResolveIndexChange(ResolveIndexChangeRequest),
11500 ApplyAdministrationMutation(ApplyAdministrationMutationRequest),
11501 ListAliases(ListAliasesRequest),
11502 GetAlias(GetAliasRequest),
11503 ListDataStreams(ListDataStreamsRequest),
11504 GetDataStream(GetDataStreamRequest),
11505 ListComponentTemplates(ListComponentTemplatesRequest),
11506 GetComponentTemplate(GetComponentTemplateRequest),
11507 ListIndexTemplates(ListIndexTemplatesRequest),
11508 GetIndexTemplate(GetIndexTemplateRequest),
11509 ListIngestPipelines(ListIngestPipelinesRequest),
11510 GetIngestPipeline(GetIngestPipelineRequest),
11511 SimulateIngestPipeline(SimulateIngestPipelineRequest),
11512 ReprocessByQuery(ReprocessByQueryRequest),
11513 ListLifecyclePolicies(ListLifecyclePoliciesRequest),
11514 GetLifecyclePolicy(GetLifecyclePolicyRequest),
11515 PrepareCreateIndex(PrepareCreateIndexRequest),
11516 PrepareDeleteIndex(PrepareDeleteIndexRequest),
11517 SubmitCatalogAction(SubmitCatalogActionRequest),
11518 ResolveCatalogAction(ResolveCatalogActionRequest),
11519 PrepareReplayableSourceIndex(PrepareReplayableSourceIndexRequest),
11520 SubmitReplayableSourceIndex(SubmitReplayableSourceIndexRequest),
11521 GetReplayableSource(GetReplayableSourceRequest),
11522 ControlReplayableSource(ControlReplayableSourceRequest),
11523 CloneIndex(CloneIndexRequest),
11524 ConfigureHistory(ConfigureHistoryRequest),
11525 GetHistory(GetHistoryRequest),
11526 ResolveHistory(ResolveHistoryRequest),
11527 PlaceHistoryHold(PlaceHistoryHoldRequest),
11528 ReleaseHistoryHold(ReleaseHistoryHoldRequest),
11529 PrepareDocumentMutation(PrepareDocumentMutationRequest),
11530 SubmitDocumentMutation(SubmitDocumentMutationRequest),
11531 PrepareDocumentBulk(PrepareDocumentBulkRequest),
11532 SubmitDocumentBulk(SubmitDocumentBulkRequest),
11533 ResolveDocumentBulk(ResolveDocumentBulkRequest),
11534 PrepareAppendBulk(PrepareAppendBulkRequest),
11535 SubmitAppendBulk(SubmitAppendBulkRequest),
11536 ResolveAppendBulk(ResolveAppendBulkRequest),
11537 ObserveAppendCommitted(ObserveAppendCommittedRequest),
11538 ResolveDocumentMutation(ResolveDocumentMutationRequest),
11539 GetDocument(GetDocumentRequest),
11540 Search(SearchRequest),
11541 TraverseRelationships(TraverseRelationshipsRequest),
11542 QueryProfiles(QueryProfilesRequest),
11543 EvaluateTemporalEvidence(EvaluateTemporalEvidenceRequest),
11544 CreateContinuousTemporalEvaluation(CreateContinuousTemporalEvaluationRequest),
11545 GetContinuousTemporalEvaluation(GetContinuousTemporalEvaluationRequest),
11546 PauseContinuousTemporalEvaluation(PauseContinuousTemporalEvaluationRequest),
11547 ResumeContinuousTemporalEvaluation(ResumeContinuousTemporalEvaluationRequest),
11548 ReplaceContinuousTemporalEvaluation(ReplaceContinuousTemporalEvaluationRequest),
11549 RetireContinuousTemporalEvaluation(RetireContinuousTemporalEvaluationRequest),
11550 ReadContinuousTemporalEvidence(ReadContinuousTemporalEvidenceRequest),
11551 ValidateSearch(ValidateSearchRequest),
11552 MaterializeTableSnapshot(MaterializeTableSnapshotRequest),
11553 ResolveTableSnapshot(ResolveTableSnapshotRequest),
11554 ReadTableSnapshot(ReadTableSnapshotRequest),
11555 OpenPit(OpenPitRequest),
11556 RenewPit(RenewPitRequest),
11557 ClosePit(ClosePitRequest),
11558 ListOperations(ListOperationsRequest),
11559 GetOperation(GetOperationRequest),
11560 WaitOperation(WaitOperationRequest),
11561 CancelOperation(CancelOperationRequest),
11562 ListAuditEvents(ListAuditEventsRequest),
11563 ExportAuditEvents(ExportAuditEventsRequest),
11564 ReserveServiceCredential(ReserveServiceCredentialRequest),
11565 ReserveServiceCredentialRotation(ReserveServiceCredentialRotationRequest),
11566 ActivateServiceCredential(ActivateServiceCredentialRequest),
11567 ResolveServiceCredentialReservation(ResolveServiceCredentialReservationRequest),
11568 PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialRequest),
11569 RevokeServiceCredential(RevokeServiceCredentialRequest),
11570 ResolveSecurityAction(ResolveSecurityActionRequest),
11571 GetSecurityRole(GetSecurityRoleRequest),
11572 PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeRequest),
11573 SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeRequest),
11574 PrepareSourceAuthorizationProjection(PrepareSourceAuthorizationProjectionRequest),
11575 SubmitSourceAuthorizationProjection(SubmitSourceAuthorizationProjectionRequest),
11576 ResolveSourceAuthorizationProjection(ResolveSourceAuthorizationProjectionRequest),
11577 ListServiceCredentials(ListServiceCredentialsRequest),
11578 GetRuntimeStatus(GetRuntimeStatusRequest),
11579 GetResultCacheStatus(GetResultCacheStatusRequest),
11580 GetFieldPromotionStatus(GetFieldPromotionStatusRequest),
11581 GetOverloadStatus(GetOverloadStatusRequest),
11582 ConfigureExternalKey(ConfigureExternalKeyRequest),
11583 RotateExternalKeyBinding(RotateExternalKeyBindingRequest),
11584 RetireExternalKeyBinding(RetireExternalKeyBindingRequest),
11585 ResolveExternalKeyBindingRetirement(ResolveExternalKeyBindingRetirementRequest),
11586 ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteRequest),
11587 GetLifecycleStatus(GetLifecycleStatusRequest),
11588 EraseRecord(EraseRecordRequest),
11589 ResolveRecordErasure(ResolveRecordErasureRequest),
11590 GetRecordErasure(GetRecordErasureRequest),
11591 GetQuota(GetQuotaRequest),
11592 UpdateQuota(UpdateQuotaRequest),
11593 GetBinding(GetBindingRequest),
11594 GetAdmissionStatus(GetAdmissionStatusRequest),
11595 SetAdmission(SetAdmissionRequest),
11596 GetQuiesceStatus(GetQuiesceStatusRequest),
11597 GetDecommissionReadiness(GetDecommissionReadinessRequest),
11598 GetUpgradeReadiness(GetUpgradeReadinessRequest),
11599 GetMaintenanceStatus(GetMaintenanceStatusRequest),
11600 WarmVectorIndex(WarmVectorIndexRequest),
11601 EvaluateVectorRecall(EvaluateVectorRecallRequest),
11602 CalibrateVectorStrategy(CalibrateVectorStrategyRequest),
11603 GetVectorDiagnostic(GetVectorDiagnosticRequest),
11604 CreateDiagnostic(CreateDiagnosticRequest),
11605 GetDiagnostic(GetDiagnosticRequest),
11606 PrepareCollectionExport(PrepareCollectionExportRequest),
11607 StartCollectionExport(StartCollectionExportRequest),
11608 ResolveCollectionExport(ResolveCollectionExportRequest),
11609 VerifyCollectionExport(VerifyCollectionExportRequest),
11610 PrepareCollectionExportRetirement(PrepareCollectionExportRetirementRequest),
11611 StartCollectionExportRetirement(StartCollectionExportRetirementRequest),
11612 ResolveCollectionExportRetirement(ResolveCollectionExportRetirementRequest),
11613 PrepareCollectionRestore(PrepareCollectionRestoreRequest),
11614 StartCollectionRestore(StartCollectionRestoreRequest),
11615 ResolveCollectionRestore(ResolveCollectionRestoreRequest),
11616 PrepareCollectionTransferExport(PrepareCollectionTransferExportRequest),
11617 StartCollectionTransferExport(StartCollectionTransferExportRequest),
11618 ResolveCollectionTransferExport(ResolveCollectionTransferExportRequest),
11619 PrepareCollectionTransferRestore(PrepareCollectionTransferRestoreRequest),
11620 StartCollectionTransferRestore(StartCollectionTransferRestoreRequest),
11621 ResolveCollectionTransferRestore(ResolveCollectionTransferRestoreRequest),
11622 PrepareCollectionStandbyAdmission(PrepareCollectionStandbyAdmissionRequest),
11623 StartCollectionStandbyAdmission(StartCollectionStandbyAdmissionRequest),
11624 ResolveCollectionStandbyAdmission(ResolveCollectionStandbyAdmissionRequest),
11625 PrepareCollectionStandbyActivation(PrepareCollectionStandbyActivationRequest),
11626 StartCollectionStandbyActivation(StartCollectionStandbyActivationRequest),
11627 ResolveCollectionStandbyActivation(ResolveCollectionStandbyActivationRequest),
11628 PrepareIndexExport(PrepareIndexExportRequest),
11629 StartIndexExport(StartIndexExportRequest),
11630 ResolveIndexExport(ResolveIndexExportRequest),
11631 VerifyIndexExport(VerifyIndexExportRequest),
11632 PrepareIndexImport(PrepareIndexImportRequest),
11633 StartIndexImport(StartIndexImportRequest),
11634 ResolveIndexImport(ResolveIndexImportRequest),
11635 ReadArtifactChunk(ReadArtifactChunkRequest),
11636 ExportUsage(ExportUsageRequest),
11637 GetStorageUsage(GetStorageUsageRequest),
11638 ReadLogicalOccupancy(ReadLogicalOccupancyRequest),
11639 ExecuteStateRead(ExecuteStateReadRequest),
11640 PrepareStateWrite(PrepareStateWriteRequest),
11641 SubmitStateWrite(SubmitStateWriteRequest),
11642 ResolveStateWrite(ResolveStateWriteRequest),
11643}
11644
11645#[allow(clippy::large_enum_variant)]
11648#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
11649#[serde(tag = "command", content = "body", rename_all = "snake_case")]
11650pub enum ResultBody {
11651 Discover(DiscoverResult),
11652 ListIndexes(ListIndexesResult),
11653 GetIndex(GetIndexResult),
11654 ValidateIndexChange(ValidateIndexChangeResult),
11655 ApplyIndexChange(ApplyIndexChangeResult),
11656 ResolveIndexChange(ResolveIndexChangeResult),
11657 ApplyAdministrationMutation(ApplyAdministrationMutationResult),
11658 ListAliases(ListAliasesResult),
11659 GetAlias(GetAliasResult),
11660 ListDataStreams(ListDataStreamsResult),
11661 GetDataStream(GetDataStreamResult),
11662 ListComponentTemplates(ListComponentTemplatesResult),
11663 GetComponentTemplate(GetComponentTemplateResult),
11664 ListIndexTemplates(ListIndexTemplatesResult),
11665 GetIndexTemplate(GetIndexTemplateResult),
11666 ListIngestPipelines(ListIngestPipelinesResult),
11667 GetIngestPipeline(GetIngestPipelineResult),
11668 SimulateIngestPipeline(SimulateIngestPipelineResult),
11669 ReprocessByQuery(ReprocessByQueryResult),
11670 ListLifecyclePolicies(ListLifecyclePoliciesResult),
11671 GetLifecyclePolicy(GetLifecyclePolicyResult),
11672 PrepareCreateIndex(PrepareCreateIndexResult),
11673 PrepareDeleteIndex(PrepareDeleteIndexResult),
11674 SubmitCatalogAction(SubmitCatalogActionResult),
11675 ResolveCatalogAction(ResolveCatalogActionResult),
11676 PrepareReplayableSourceIndex(PrepareReplayableSourceIndexResult),
11677 SubmitReplayableSourceIndex(SubmitReplayableSourceIndexResult),
11678 GetReplayableSource(GetReplayableSourceResult),
11679 ControlReplayableSource(ControlReplayableSourceResult),
11680 CloneIndex(CloneIndexResult),
11681 ConfigureHistory(ConfigureHistoryResult),
11682 GetHistory(GetHistoryResult),
11683 ResolveHistory(ResolveHistoryResult),
11684 PlaceHistoryHold(PlaceHistoryHoldResult),
11685 ReleaseHistoryHold(ReleaseHistoryHoldResult),
11686 PrepareDocumentMutation(PrepareDocumentMutationResult),
11687 SubmitDocumentMutation(SubmitDocumentMutationResult),
11688 PrepareDocumentBulk(PrepareDocumentBulkResult),
11689 SubmitDocumentBulk(SubmitDocumentBulkResult),
11690 ResolveDocumentBulk(ResolveDocumentBulkResult),
11691 PrepareAppendBulk(PrepareAppendBulkResult),
11692 SubmitAppendBulk(SubmitAppendBulkResult),
11693 ResolveAppendBulk(ResolveAppendBulkResult),
11694 ObserveAppendCommitted(ObserveAppendCommittedResult),
11695 ResolveDocumentMutation(ResolveDocumentMutationResult),
11696 GetDocument(GetDocumentResult),
11697 Search(SearchResult),
11698 TraverseRelationships(TraverseRelationshipsResult),
11699 QueryProfiles(QueryProfilesResult),
11700 EvaluateTemporalEvidence(EvaluateTemporalEvidenceResult),
11701 CreateContinuousTemporalEvaluation(CreateContinuousTemporalEvaluationResult),
11702 GetContinuousTemporalEvaluation(GetContinuousTemporalEvaluationResult),
11703 PauseContinuousTemporalEvaluation(PauseContinuousTemporalEvaluationResult),
11704 ResumeContinuousTemporalEvaluation(ResumeContinuousTemporalEvaluationResult),
11705 ReplaceContinuousTemporalEvaluation(ReplaceContinuousTemporalEvaluationResult),
11706 RetireContinuousTemporalEvaluation(RetireContinuousTemporalEvaluationResult),
11707 ReadContinuousTemporalEvidence(ReadContinuousTemporalEvidenceResult),
11708 ValidateSearch(ValidateSearchResult),
11709 MaterializeTableSnapshot(MaterializeTableSnapshotResult),
11710 ResolveTableSnapshot(ResolveTableSnapshotResult),
11711 ReadTableSnapshot(ReadTableSnapshotResult),
11712 OpenPit(OpenPitResult),
11713 RenewPit(RenewPitResult),
11714 ClosePit(ClosePitResult),
11715 ListOperations(ListOperationsResult),
11716 GetOperation(GetOperationResult),
11717 WaitOperation(WaitOperationResult),
11718 CancelOperation(CancelOperationResult),
11719 ListAuditEvents(ListAuditEventsResult),
11720 ExportAuditEvents(ExportAuditEventsResult),
11721 ReserveServiceCredential(ReserveServiceCredentialResult),
11722 ReserveServiceCredentialRotation(ReserveServiceCredentialRotationResult),
11723 ActivateServiceCredential(ActivateServiceCredentialResult),
11724 ResolveServiceCredentialReservation(ResolveServiceCredentialReservationResult),
11725 PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialResult),
11726 RevokeServiceCredential(RevokeServiceCredentialResult),
11727 ResolveSecurityAction(ResolveSecurityActionResult),
11728 GetSecurityRole(GetSecurityRoleResult),
11729 PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeResult),
11730 SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeResult),
11731 PrepareSourceAuthorizationProjection(PrepareSourceAuthorizationProjectionResult),
11732 SubmitSourceAuthorizationProjection(SubmitSourceAuthorizationProjectionResult),
11733 ResolveSourceAuthorizationProjection(ResolveSourceAuthorizationProjectionResult),
11734 ListServiceCredentials(ListServiceCredentialsResult),
11735 GetRuntimeStatus(GetRuntimeStatusResult),
11736 GetResultCacheStatus(GetResultCacheStatusResult),
11737 GetFieldPromotionStatus(GetFieldPromotionStatusResult),
11738 GetOverloadStatus(GetOverloadStatusResult),
11739 ConfigureExternalKey(ConfigureExternalKeyResult),
11740 RotateExternalKeyBinding(RotateExternalKeyBindingResult),
11741 RetireExternalKeyBinding(RetireExternalKeyBindingResult),
11742 ResolveExternalKeyBindingRetirement(ResolveExternalKeyBindingRetirementResult),
11743 ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteResult),
11744 GetLifecycleStatus(GetLifecycleStatusResult),
11745 EraseRecord(EraseRecordResult),
11746 ResolveRecordErasure(ResolveRecordErasureResult),
11747 GetRecordErasure(GetRecordErasureResult),
11748 GetQuota(GetQuotaResult),
11749 UpdateQuota(UpdateQuotaResult),
11750 GetBinding(GetBindingResult),
11751 GetAdmissionStatus(GetAdmissionStatusResult),
11752 SetAdmission(SetAdmissionResult),
11753 GetQuiesceStatus(GetQuiesceStatusResult),
11754 GetDecommissionReadiness(GetDecommissionReadinessResult),
11755 GetUpgradeReadiness(GetUpgradeReadinessResult),
11756 GetMaintenanceStatus(GetMaintenanceStatusResult),
11757 WarmVectorIndex(WarmVectorIndexResult),
11758 EvaluateVectorRecall(EvaluateVectorRecallResult),
11759 CalibrateVectorStrategy(CalibrateVectorStrategyResult),
11760 GetVectorDiagnostic(GetVectorDiagnosticResult),
11761 CreateDiagnostic(CreateDiagnosticResult),
11762 GetDiagnostic(GetDiagnosticResult),
11763 PrepareCollectionExport(PrepareCollectionExportResult),
11764 StartCollectionExport(StartCollectionExportResult),
11765 ResolveCollectionExport(ResolveCollectionExportResult),
11766 VerifyCollectionExport(VerifyCollectionExportResult),
11767 PrepareCollectionExportRetirement(PrepareCollectionExportRetirementResult),
11768 StartCollectionExportRetirement(StartCollectionExportRetirementResult),
11769 ResolveCollectionExportRetirement(ResolveCollectionExportRetirementResult),
11770 PrepareCollectionRestore(PrepareCollectionRestoreResult),
11771 StartCollectionRestore(StartCollectionRestoreResult),
11772 ResolveCollectionRestore(ResolveCollectionRestoreResult),
11773 PrepareCollectionTransferExport(PrepareCollectionTransferExportResult),
11774 StartCollectionTransferExport(StartCollectionTransferExportResult),
11775 ResolveCollectionTransferExport(ResolveCollectionTransferExportResult),
11776 PrepareCollectionTransferRestore(PrepareCollectionTransferRestoreResult),
11777 StartCollectionTransferRestore(StartCollectionTransferRestoreResult),
11778 ResolveCollectionTransferRestore(ResolveCollectionTransferRestoreResult),
11779 PrepareCollectionStandbyAdmission(PrepareCollectionStandbyAdmissionResult),
11780 StartCollectionStandbyAdmission(StartCollectionStandbyAdmissionResult),
11781 ResolveCollectionStandbyAdmission(ResolveCollectionStandbyAdmissionResult),
11782 PrepareCollectionStandbyActivation(PrepareCollectionStandbyActivationResult),
11783 StartCollectionStandbyActivation(StartCollectionStandbyActivationResult),
11784 ResolveCollectionStandbyActivation(ResolveCollectionStandbyActivationResult),
11785 PrepareIndexExport(PrepareIndexExportResult),
11786 StartIndexExport(StartIndexExportResult),
11787 ResolveIndexExport(ResolveIndexExportResult),
11788 VerifyIndexExport(VerifyIndexExportResult),
11789 PrepareIndexImport(PrepareIndexImportResult),
11790 StartIndexImport(StartIndexImportResult),
11791 ResolveIndexImport(ResolveIndexImportResult),
11792 ReadArtifactChunk(ReadArtifactChunkResult),
11793 ExportUsage(ExportUsageResult),
11794 GetStorageUsage(GetStorageUsageResult),
11795 ReadLogicalOccupancy(ReadLogicalOccupancyResult),
11796 ExecuteStateRead(ExecuteStateReadResult),
11797 PrepareStateWrite(PrepareStateWriteResult),
11798 SubmitStateWrite(SubmitStateWriteResult),
11799 ResolveStateWrite(ResolveStateWriteResult),
11800}
11801
11802pub const fn command_for_request(value: &RequestBody) -> Command {
11803 match value {
11804 RequestBody::Discover(_) => Command::Discover,
11805 RequestBody::ListIndexes(_) => Command::ListIndexes,
11806 RequestBody::GetIndex(_) => Command::GetIndex,
11807 RequestBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
11808 RequestBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
11809 RequestBody::ResolveIndexChange(_) => Command::ResolveIndexChange,
11810 RequestBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
11811 RequestBody::ListAliases(_) => Command::ListAliases,
11812 RequestBody::GetAlias(_) => Command::GetAlias,
11813 RequestBody::ListDataStreams(_) => Command::ListDataStreams,
11814 RequestBody::GetDataStream(_) => Command::GetDataStream,
11815 RequestBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
11816 RequestBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
11817 RequestBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
11818 RequestBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
11819 RequestBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
11820 RequestBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
11821 RequestBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
11822 RequestBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
11823 RequestBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
11824 RequestBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
11825 RequestBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
11826 RequestBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
11827 RequestBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
11828 RequestBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
11829 RequestBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
11830 RequestBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
11831 RequestBody::GetReplayableSource(_) => Command::GetReplayableSource,
11832 RequestBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
11833 RequestBody::CloneIndex(_) => Command::CloneIndex,
11834 RequestBody::ConfigureHistory(_) => Command::ConfigureHistory,
11835 RequestBody::GetHistory(_) => Command::GetHistory,
11836 RequestBody::ResolveHistory(_) => Command::ResolveHistory,
11837 RequestBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
11838 RequestBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
11839 RequestBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
11840 RequestBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
11841 RequestBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
11842 RequestBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
11843 RequestBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
11844 RequestBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
11845 RequestBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
11846 RequestBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
11847 RequestBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
11848 RequestBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
11849 RequestBody::GetDocument(_) => Command::GetDocument,
11850 RequestBody::Search(_) => Command::Search,
11851 RequestBody::TraverseRelationships(_) => Command::TraverseRelationships,
11852 RequestBody::QueryProfiles(_) => Command::QueryProfiles,
11853 RequestBody::EvaluateTemporalEvidence(_) => Command::EvaluateTemporalEvidence,
11854 RequestBody::CreateContinuousTemporalEvaluation(_) => Command::CreateContinuousTemporalEvaluation,
11855 RequestBody::GetContinuousTemporalEvaluation(_) => Command::GetContinuousTemporalEvaluation,
11856 RequestBody::PauseContinuousTemporalEvaluation(_) => Command::PauseContinuousTemporalEvaluation,
11857 RequestBody::ResumeContinuousTemporalEvaluation(_) => Command::ResumeContinuousTemporalEvaluation,
11858 RequestBody::ReplaceContinuousTemporalEvaluation(_) => Command::ReplaceContinuousTemporalEvaluation,
11859 RequestBody::RetireContinuousTemporalEvaluation(_) => Command::RetireContinuousTemporalEvaluation,
11860 RequestBody::ReadContinuousTemporalEvidence(_) => Command::ReadContinuousTemporalEvidence,
11861 RequestBody::ValidateSearch(_) => Command::ValidateSearch,
11862 RequestBody::MaterializeTableSnapshot(_) => Command::MaterializeTableSnapshot,
11863 RequestBody::ResolveTableSnapshot(_) => Command::ResolveTableSnapshot,
11864 RequestBody::ReadTableSnapshot(_) => Command::ReadTableSnapshot,
11865 RequestBody::OpenPit(_) => Command::OpenPit,
11866 RequestBody::RenewPit(_) => Command::RenewPit,
11867 RequestBody::ClosePit(_) => Command::ClosePit,
11868 RequestBody::ListOperations(_) => Command::ListOperations,
11869 RequestBody::GetOperation(_) => Command::GetOperation,
11870 RequestBody::WaitOperation(_) => Command::WaitOperation,
11871 RequestBody::CancelOperation(_) => Command::CancelOperation,
11872 RequestBody::ListAuditEvents(_) => Command::ListAuditEvents,
11873 RequestBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
11874 RequestBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
11875 RequestBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
11876 RequestBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
11877 RequestBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
11878 RequestBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
11879 RequestBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
11880 RequestBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
11881 RequestBody::GetSecurityRole(_) => Command::GetSecurityRole,
11882 RequestBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
11883 RequestBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
11884 RequestBody::PrepareSourceAuthorizationProjection(_) => Command::PrepareSourceAuthorizationProjection,
11885 RequestBody::SubmitSourceAuthorizationProjection(_) => Command::SubmitSourceAuthorizationProjection,
11886 RequestBody::ResolveSourceAuthorizationProjection(_) => Command::ResolveSourceAuthorizationProjection,
11887 RequestBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
11888 RequestBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
11889 RequestBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
11890 RequestBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
11891 RequestBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
11892 RequestBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
11893 RequestBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
11894 RequestBody::RetireExternalKeyBinding(_) => Command::RetireExternalKeyBinding,
11895 RequestBody::ResolveExternalKeyBindingRetirement(_) => Command::ResolveExternalKeyBindingRetirement,
11896 RequestBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
11897 RequestBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
11898 RequestBody::EraseRecord(_) => Command::EraseRecord,
11899 RequestBody::ResolveRecordErasure(_) => Command::ResolveRecordErasure,
11900 RequestBody::GetRecordErasure(_) => Command::GetRecordErasure,
11901 RequestBody::GetQuota(_) => Command::GetQuota,
11902 RequestBody::UpdateQuota(_) => Command::UpdateQuota,
11903 RequestBody::GetBinding(_) => Command::GetBinding,
11904 RequestBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
11905 RequestBody::SetAdmission(_) => Command::SetAdmission,
11906 RequestBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
11907 RequestBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
11908 RequestBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
11909 RequestBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
11910 RequestBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
11911 RequestBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
11912 RequestBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
11913 RequestBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
11914 RequestBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
11915 RequestBody::GetDiagnostic(_) => Command::GetDiagnostic,
11916 RequestBody::PrepareCollectionExport(_) => Command::PrepareCollectionExport,
11917 RequestBody::StartCollectionExport(_) => Command::StartCollectionExport,
11918 RequestBody::ResolveCollectionExport(_) => Command::ResolveCollectionExport,
11919 RequestBody::VerifyCollectionExport(_) => Command::VerifyCollectionExport,
11920 RequestBody::PrepareCollectionExportRetirement(_) => Command::PrepareCollectionExportRetirement,
11921 RequestBody::StartCollectionExportRetirement(_) => Command::StartCollectionExportRetirement,
11922 RequestBody::ResolveCollectionExportRetirement(_) => Command::ResolveCollectionExportRetirement,
11923 RequestBody::PrepareCollectionRestore(_) => Command::PrepareCollectionRestore,
11924 RequestBody::StartCollectionRestore(_) => Command::StartCollectionRestore,
11925 RequestBody::ResolveCollectionRestore(_) => Command::ResolveCollectionRestore,
11926 RequestBody::PrepareCollectionTransferExport(_) => Command::PrepareCollectionTransferExport,
11927 RequestBody::StartCollectionTransferExport(_) => Command::StartCollectionTransferExport,
11928 RequestBody::ResolveCollectionTransferExport(_) => Command::ResolveCollectionTransferExport,
11929 RequestBody::PrepareCollectionTransferRestore(_) => Command::PrepareCollectionTransferRestore,
11930 RequestBody::StartCollectionTransferRestore(_) => Command::StartCollectionTransferRestore,
11931 RequestBody::ResolveCollectionTransferRestore(_) => Command::ResolveCollectionTransferRestore,
11932 RequestBody::PrepareCollectionStandbyAdmission(_) => Command::PrepareCollectionStandbyAdmission,
11933 RequestBody::StartCollectionStandbyAdmission(_) => Command::StartCollectionStandbyAdmission,
11934 RequestBody::ResolveCollectionStandbyAdmission(_) => Command::ResolveCollectionStandbyAdmission,
11935 RequestBody::PrepareCollectionStandbyActivation(_) => Command::PrepareCollectionStandbyActivation,
11936 RequestBody::StartCollectionStandbyActivation(_) => Command::StartCollectionStandbyActivation,
11937 RequestBody::ResolveCollectionStandbyActivation(_) => Command::ResolveCollectionStandbyActivation,
11938 RequestBody::PrepareIndexExport(_) => Command::PrepareIndexExport,
11939 RequestBody::StartIndexExport(_) => Command::StartIndexExport,
11940 RequestBody::ResolveIndexExport(_) => Command::ResolveIndexExport,
11941 RequestBody::VerifyIndexExport(_) => Command::VerifyIndexExport,
11942 RequestBody::PrepareIndexImport(_) => Command::PrepareIndexImport,
11943 RequestBody::StartIndexImport(_) => Command::StartIndexImport,
11944 RequestBody::ResolveIndexImport(_) => Command::ResolveIndexImport,
11945 RequestBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
11946 RequestBody::ExportUsage(_) => Command::ExportUsage,
11947 RequestBody::GetStorageUsage(_) => Command::GetStorageUsage,
11948 RequestBody::ReadLogicalOccupancy(_) => Command::ReadLogicalOccupancy,
11949 RequestBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
11950 RequestBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
11951 RequestBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
11952 RequestBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
11953 }
11954}
11955
11956pub const fn command_for_result(value: &ResultBody) -> Command {
11957 match value {
11958 ResultBody::Discover(_) => Command::Discover,
11959 ResultBody::ListIndexes(_) => Command::ListIndexes,
11960 ResultBody::GetIndex(_) => Command::GetIndex,
11961 ResultBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
11962 ResultBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
11963 ResultBody::ResolveIndexChange(_) => Command::ResolveIndexChange,
11964 ResultBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
11965 ResultBody::ListAliases(_) => Command::ListAliases,
11966 ResultBody::GetAlias(_) => Command::GetAlias,
11967 ResultBody::ListDataStreams(_) => Command::ListDataStreams,
11968 ResultBody::GetDataStream(_) => Command::GetDataStream,
11969 ResultBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
11970 ResultBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
11971 ResultBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
11972 ResultBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
11973 ResultBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
11974 ResultBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
11975 ResultBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
11976 ResultBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
11977 ResultBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
11978 ResultBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
11979 ResultBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
11980 ResultBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
11981 ResultBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
11982 ResultBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
11983 ResultBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
11984 ResultBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
11985 ResultBody::GetReplayableSource(_) => Command::GetReplayableSource,
11986 ResultBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
11987 ResultBody::CloneIndex(_) => Command::CloneIndex,
11988 ResultBody::ConfigureHistory(_) => Command::ConfigureHistory,
11989 ResultBody::GetHistory(_) => Command::GetHistory,
11990 ResultBody::ResolveHistory(_) => Command::ResolveHistory,
11991 ResultBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
11992 ResultBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
11993 ResultBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
11994 ResultBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
11995 ResultBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
11996 ResultBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
11997 ResultBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
11998 ResultBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
11999 ResultBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
12000 ResultBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
12001 ResultBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
12002 ResultBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
12003 ResultBody::GetDocument(_) => Command::GetDocument,
12004 ResultBody::Search(_) => Command::Search,
12005 ResultBody::TraverseRelationships(_) => Command::TraverseRelationships,
12006 ResultBody::QueryProfiles(_) => Command::QueryProfiles,
12007 ResultBody::EvaluateTemporalEvidence(_) => Command::EvaluateTemporalEvidence,
12008 ResultBody::CreateContinuousTemporalEvaluation(_) => Command::CreateContinuousTemporalEvaluation,
12009 ResultBody::GetContinuousTemporalEvaluation(_) => Command::GetContinuousTemporalEvaluation,
12010 ResultBody::PauseContinuousTemporalEvaluation(_) => Command::PauseContinuousTemporalEvaluation,
12011 ResultBody::ResumeContinuousTemporalEvaluation(_) => Command::ResumeContinuousTemporalEvaluation,
12012 ResultBody::ReplaceContinuousTemporalEvaluation(_) => Command::ReplaceContinuousTemporalEvaluation,
12013 ResultBody::RetireContinuousTemporalEvaluation(_) => Command::RetireContinuousTemporalEvaluation,
12014 ResultBody::ReadContinuousTemporalEvidence(_) => Command::ReadContinuousTemporalEvidence,
12015 ResultBody::ValidateSearch(_) => Command::ValidateSearch,
12016 ResultBody::MaterializeTableSnapshot(_) => Command::MaterializeTableSnapshot,
12017 ResultBody::ResolveTableSnapshot(_) => Command::ResolveTableSnapshot,
12018 ResultBody::ReadTableSnapshot(_) => Command::ReadTableSnapshot,
12019 ResultBody::OpenPit(_) => Command::OpenPit,
12020 ResultBody::RenewPit(_) => Command::RenewPit,
12021 ResultBody::ClosePit(_) => Command::ClosePit,
12022 ResultBody::ListOperations(_) => Command::ListOperations,
12023 ResultBody::GetOperation(_) => Command::GetOperation,
12024 ResultBody::WaitOperation(_) => Command::WaitOperation,
12025 ResultBody::CancelOperation(_) => Command::CancelOperation,
12026 ResultBody::ListAuditEvents(_) => Command::ListAuditEvents,
12027 ResultBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
12028 ResultBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
12029 ResultBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
12030 ResultBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
12031 ResultBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
12032 ResultBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
12033 ResultBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
12034 ResultBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
12035 ResultBody::GetSecurityRole(_) => Command::GetSecurityRole,
12036 ResultBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
12037 ResultBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
12038 ResultBody::PrepareSourceAuthorizationProjection(_) => Command::PrepareSourceAuthorizationProjection,
12039 ResultBody::SubmitSourceAuthorizationProjection(_) => Command::SubmitSourceAuthorizationProjection,
12040 ResultBody::ResolveSourceAuthorizationProjection(_) => Command::ResolveSourceAuthorizationProjection,
12041 ResultBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
12042 ResultBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
12043 ResultBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
12044 ResultBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
12045 ResultBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
12046 ResultBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
12047 ResultBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
12048 ResultBody::RetireExternalKeyBinding(_) => Command::RetireExternalKeyBinding,
12049 ResultBody::ResolveExternalKeyBindingRetirement(_) => Command::ResolveExternalKeyBindingRetirement,
12050 ResultBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
12051 ResultBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
12052 ResultBody::EraseRecord(_) => Command::EraseRecord,
12053 ResultBody::ResolveRecordErasure(_) => Command::ResolveRecordErasure,
12054 ResultBody::GetRecordErasure(_) => Command::GetRecordErasure,
12055 ResultBody::GetQuota(_) => Command::GetQuota,
12056 ResultBody::UpdateQuota(_) => Command::UpdateQuota,
12057 ResultBody::GetBinding(_) => Command::GetBinding,
12058 ResultBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
12059 ResultBody::SetAdmission(_) => Command::SetAdmission,
12060 ResultBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
12061 ResultBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
12062 ResultBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
12063 ResultBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
12064 ResultBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
12065 ResultBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
12066 ResultBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
12067 ResultBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
12068 ResultBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
12069 ResultBody::GetDiagnostic(_) => Command::GetDiagnostic,
12070 ResultBody::PrepareCollectionExport(_) => Command::PrepareCollectionExport,
12071 ResultBody::StartCollectionExport(_) => Command::StartCollectionExport,
12072 ResultBody::ResolveCollectionExport(_) => Command::ResolveCollectionExport,
12073 ResultBody::VerifyCollectionExport(_) => Command::VerifyCollectionExport,
12074 ResultBody::PrepareCollectionExportRetirement(_) => Command::PrepareCollectionExportRetirement,
12075 ResultBody::StartCollectionExportRetirement(_) => Command::StartCollectionExportRetirement,
12076 ResultBody::ResolveCollectionExportRetirement(_) => Command::ResolveCollectionExportRetirement,
12077 ResultBody::PrepareCollectionRestore(_) => Command::PrepareCollectionRestore,
12078 ResultBody::StartCollectionRestore(_) => Command::StartCollectionRestore,
12079 ResultBody::ResolveCollectionRestore(_) => Command::ResolveCollectionRestore,
12080 ResultBody::PrepareCollectionTransferExport(_) => Command::PrepareCollectionTransferExport,
12081 ResultBody::StartCollectionTransferExport(_) => Command::StartCollectionTransferExport,
12082 ResultBody::ResolveCollectionTransferExport(_) => Command::ResolveCollectionTransferExport,
12083 ResultBody::PrepareCollectionTransferRestore(_) => Command::PrepareCollectionTransferRestore,
12084 ResultBody::StartCollectionTransferRestore(_) => Command::StartCollectionTransferRestore,
12085 ResultBody::ResolveCollectionTransferRestore(_) => Command::ResolveCollectionTransferRestore,
12086 ResultBody::PrepareCollectionStandbyAdmission(_) => Command::PrepareCollectionStandbyAdmission,
12087 ResultBody::StartCollectionStandbyAdmission(_) => Command::StartCollectionStandbyAdmission,
12088 ResultBody::ResolveCollectionStandbyAdmission(_) => Command::ResolveCollectionStandbyAdmission,
12089 ResultBody::PrepareCollectionStandbyActivation(_) => Command::PrepareCollectionStandbyActivation,
12090 ResultBody::StartCollectionStandbyActivation(_) => Command::StartCollectionStandbyActivation,
12091 ResultBody::ResolveCollectionStandbyActivation(_) => Command::ResolveCollectionStandbyActivation,
12092 ResultBody::PrepareIndexExport(_) => Command::PrepareIndexExport,
12093 ResultBody::StartIndexExport(_) => Command::StartIndexExport,
12094 ResultBody::ResolveIndexExport(_) => Command::ResolveIndexExport,
12095 ResultBody::VerifyIndexExport(_) => Command::VerifyIndexExport,
12096 ResultBody::PrepareIndexImport(_) => Command::PrepareIndexImport,
12097 ResultBody::StartIndexImport(_) => Command::StartIndexImport,
12098 ResultBody::ResolveIndexImport(_) => Command::ResolveIndexImport,
12099 ResultBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
12100 ResultBody::ExportUsage(_) => Command::ExportUsage,
12101 ResultBody::GetStorageUsage(_) => Command::GetStorageUsage,
12102 ResultBody::ReadLogicalOccupancy(_) => Command::ReadLogicalOccupancy,
12103 ResultBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
12104 ResultBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
12105 ResultBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
12106 ResultBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
12107 }
12108}
12109
12110#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
12111#[serde(deny_unknown_fields)]
12112pub struct RequestEnvelope {
12113 pub meta: RequestMeta,
12114 pub request: RequestBody,
12115}
12116#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
12117#[serde(tag = "outcome", rename_all = "snake_case")]
12118pub enum ResponseEnvelope {
12119 Success {
12120 meta: ResponseMeta,
12121 result: Box<ResultBody>,
12122 },
12123 Error {
12124 meta: ResponseMeta,
12125 error: ErrorBody,
12126 },
12127}
12128
12129#[derive(Clone, Copy, Debug, Eq, PartialEq)]
12130pub struct CommandContract {
12131 pub command: Command,
12132 pub action: Action,
12133 pub cancellable: bool,
12134 pub mutation: &'static str,
12135}
12136pub const LODESTONE_API_COMMAND_CONTRACTS: &[CommandContract] = &[
12137 CommandContract {
12138 command: Command::Discover,
12139 action: Action::IdentityDiscovery,
12140 cancellable: true,
12141 mutation: "read_only",
12142 },
12143 CommandContract {
12144 command: Command::ListIndexes,
12145 action: Action::CatalogRead,
12146 cancellable: true,
12147 mutation: "read_only",
12148 },
12149 CommandContract {
12150 command: Command::GetIndex,
12151 action: Action::CatalogRead,
12152 cancellable: true,
12153 mutation: "read_only",
12154 },
12155 CommandContract {
12156 command: Command::ValidateIndexChange,
12157 action: Action::IndexAdmin,
12158 cancellable: true,
12159 mutation: "read_only",
12160 },
12161 CommandContract {
12162 command: Command::ApplyIndexChange,
12163 action: Action::IndexAdmin,
12164 cancellable: true,
12165 mutation: "catalog_submit",
12166 },
12167 CommandContract {
12168 command: Command::ResolveIndexChange,
12169 action: Action::IndexAdmin,
12170 cancellable: true,
12171 mutation: "read_only",
12172 },
12173 CommandContract {
12174 command: Command::ApplyAdministrationMutation,
12175 action: Action::LifecycleAdmin,
12176 cancellable: true,
12177 mutation: "administration_submit",
12178 },
12179 CommandContract {
12180 command: Command::ListAliases,
12181 action: Action::CatalogRead,
12182 cancellable: true,
12183 mutation: "read_only",
12184 },
12185 CommandContract {
12186 command: Command::GetAlias,
12187 action: Action::CatalogRead,
12188 cancellable: true,
12189 mutation: "read_only",
12190 },
12191 CommandContract {
12192 command: Command::ListDataStreams,
12193 action: Action::CatalogRead,
12194 cancellable: true,
12195 mutation: "read_only",
12196 },
12197 CommandContract {
12198 command: Command::GetDataStream,
12199 action: Action::CatalogRead,
12200 cancellable: true,
12201 mutation: "read_only",
12202 },
12203 CommandContract {
12204 command: Command::ListComponentTemplates,
12205 action: Action::CatalogRead,
12206 cancellable: true,
12207 mutation: "read_only",
12208 },
12209 CommandContract {
12210 command: Command::GetComponentTemplate,
12211 action: Action::CatalogRead,
12212 cancellable: true,
12213 mutation: "read_only",
12214 },
12215 CommandContract {
12216 command: Command::ListIndexTemplates,
12217 action: Action::CatalogRead,
12218 cancellable: true,
12219 mutation: "read_only",
12220 },
12221 CommandContract {
12222 command: Command::GetIndexTemplate,
12223 action: Action::CatalogRead,
12224 cancellable: true,
12225 mutation: "read_only",
12226 },
12227 CommandContract {
12228 command: Command::ListIngestPipelines,
12229 action: Action::LifecycleAdmin,
12230 cancellable: true,
12231 mutation: "read_only",
12232 },
12233 CommandContract {
12234 command: Command::GetIngestPipeline,
12235 action: Action::LifecycleAdmin,
12236 cancellable: true,
12237 mutation: "read_only",
12238 },
12239 CommandContract {
12240 command: Command::SimulateIngestPipeline,
12241 action: Action::LifecycleAdmin,
12242 cancellable: true,
12243 mutation: "read_only",
12244 },
12245 CommandContract {
12246 command: Command::ReprocessByQuery,
12247 action: Action::DataWrite,
12248 cancellable: true,
12249 mutation: "authority_submit",
12250 },
12251 CommandContract {
12252 command: Command::ListLifecyclePolicies,
12253 action: Action::CatalogRead,
12254 cancellable: true,
12255 mutation: "read_only",
12256 },
12257 CommandContract {
12258 command: Command::GetLifecyclePolicy,
12259 action: Action::CatalogRead,
12260 cancellable: true,
12261 mutation: "read_only",
12262 },
12263 CommandContract {
12264 command: Command::PrepareCreateIndex,
12265 action: Action::IndexAdmin,
12266 cancellable: true,
12267 mutation: "catalog_prepare",
12268 },
12269 CommandContract {
12270 command: Command::PrepareDeleteIndex,
12271 action: Action::IndexAdmin,
12272 cancellable: true,
12273 mutation: "catalog_prepare",
12274 },
12275 CommandContract {
12276 command: Command::SubmitCatalogAction,
12277 action: Action::IndexAdmin,
12278 cancellable: true,
12279 mutation: "catalog_submit",
12280 },
12281 CommandContract {
12282 command: Command::ResolveCatalogAction,
12283 action: Action::IndexAdmin,
12284 cancellable: true,
12285 mutation: "read_only",
12286 },
12287 CommandContract {
12288 command: Command::PrepareReplayableSourceIndex,
12289 action: Action::IndexAdmin,
12290 cancellable: true,
12291 mutation: "catalog_prepare",
12292 },
12293 CommandContract {
12294 command: Command::SubmitReplayableSourceIndex,
12295 action: Action::IndexAdmin,
12296 cancellable: true,
12297 mutation: "catalog_submit",
12298 },
12299 CommandContract {
12300 command: Command::GetReplayableSource,
12301 action: Action::CatalogRead,
12302 cancellable: true,
12303 mutation: "read_only",
12304 },
12305 CommandContract {
12306 command: Command::ControlReplayableSource,
12307 action: Action::IndexAdmin,
12308 cancellable: true,
12309 mutation: "catalog_submit",
12310 },
12311 CommandContract {
12312 command: Command::CloneIndex,
12313 action: Action::IndexAdmin,
12314 cancellable: true,
12315 mutation: "catalog_submit",
12316 },
12317 CommandContract {
12318 command: Command::ConfigureHistory,
12319 action: Action::IndexAdmin,
12320 cancellable: true,
12321 mutation: "catalog_submit",
12322 },
12323 CommandContract {
12324 command: Command::GetHistory,
12325 action: Action::CatalogRead,
12326 cancellable: true,
12327 mutation: "read_only",
12328 },
12329 CommandContract {
12330 command: Command::ResolveHistory,
12331 action: Action::DataRead,
12332 cancellable: true,
12333 mutation: "read_only",
12334 },
12335 CommandContract {
12336 command: Command::PlaceHistoryHold,
12337 action: Action::IndexAdmin,
12338 cancellable: true,
12339 mutation: "catalog_submit",
12340 },
12341 CommandContract {
12342 command: Command::ReleaseHistoryHold,
12343 action: Action::IndexAdmin,
12344 cancellable: true,
12345 mutation: "catalog_submit",
12346 },
12347 CommandContract {
12348 command: Command::PrepareDocumentMutation,
12349 action: Action::DataWrite,
12350 cancellable: true,
12351 mutation: "read_only_prepare",
12352 },
12353 CommandContract {
12354 command: Command::SubmitDocumentMutation,
12355 action: Action::DataWrite,
12356 cancellable: true,
12357 mutation: "wal_submit",
12358 },
12359 CommandContract {
12360 command: Command::PrepareDocumentBulk,
12361 action: Action::DataWrite,
12362 cancellable: true,
12363 mutation: "read_only_prepare",
12364 },
12365 CommandContract {
12366 command: Command::SubmitDocumentBulk,
12367 action: Action::DataWrite,
12368 cancellable: true,
12369 mutation: "wal_submit",
12370 },
12371 CommandContract {
12372 command: Command::ResolveDocumentBulk,
12373 action: Action::DataRead,
12374 cancellable: true,
12375 mutation: "read_only",
12376 },
12377 CommandContract {
12378 command: Command::PrepareAppendBulk,
12379 action: Action::Append,
12380 cancellable: true,
12381 mutation: "read_only_prepare",
12382 },
12383 CommandContract {
12384 command: Command::SubmitAppendBulk,
12385 action: Action::Append,
12386 cancellable: true,
12387 mutation: "wal_submit",
12388 },
12389 CommandContract {
12390 command: Command::ResolveAppendBulk,
12391 action: Action::ResolveAppend,
12392 cancellable: true,
12393 mutation: "read_only",
12394 },
12395 CommandContract {
12396 command: Command::ObserveAppendCommitted,
12397 action: Action::ResolveAppend,
12398 cancellable: true,
12399 mutation: "read_only",
12400 },
12401 CommandContract {
12402 command: Command::ResolveDocumentMutation,
12403 action: Action::DataRead,
12404 cancellable: true,
12405 mutation: "read_only",
12406 },
12407 CommandContract {
12408 command: Command::GetDocument,
12409 action: Action::DataRead,
12410 cancellable: true,
12411 mutation: "read_only",
12412 },
12413 CommandContract {
12414 command: Command::Search,
12415 action: Action::DataRead,
12416 cancellable: true,
12417 mutation: "read_only",
12418 },
12419 CommandContract {
12420 command: Command::TraverseRelationships,
12421 action: Action::DataRead,
12422 cancellable: true,
12423 mutation: "read_only",
12424 },
12425 CommandContract {
12426 command: Command::QueryProfiles,
12427 action: Action::DataRead,
12428 cancellable: true,
12429 mutation: "read_only",
12430 },
12431 CommandContract {
12432 command: Command::EvaluateTemporalEvidence,
12433 action: Action::DataRead,
12434 cancellable: true,
12435 mutation: "read_only",
12436 },
12437 CommandContract {
12438 command: Command::CreateContinuousTemporalEvaluation,
12439 action: Action::LifecycleAdmin,
12440 cancellable: true,
12441 mutation: "catalog_submit",
12442 },
12443 CommandContract {
12444 command: Command::GetContinuousTemporalEvaluation,
12445 action: Action::CatalogRead,
12446 cancellable: true,
12447 mutation: "read_only",
12448 },
12449 CommandContract {
12450 command: Command::PauseContinuousTemporalEvaluation,
12451 action: Action::LifecycleAdmin,
12452 cancellable: true,
12453 mutation: "catalog_submit",
12454 },
12455 CommandContract {
12456 command: Command::ResumeContinuousTemporalEvaluation,
12457 action: Action::LifecycleAdmin,
12458 cancellable: true,
12459 mutation: "catalog_submit",
12460 },
12461 CommandContract {
12462 command: Command::ReplaceContinuousTemporalEvaluation,
12463 action: Action::LifecycleAdmin,
12464 cancellable: true,
12465 mutation: "catalog_submit",
12466 },
12467 CommandContract {
12468 command: Command::RetireContinuousTemporalEvaluation,
12469 action: Action::LifecycleAdmin,
12470 cancellable: true,
12471 mutation: "catalog_submit",
12472 },
12473 CommandContract {
12474 command: Command::ReadContinuousTemporalEvidence,
12475 action: Action::DataRead,
12476 cancellable: true,
12477 mutation: "read_only",
12478 },
12479 CommandContract {
12480 command: Command::ValidateSearch,
12481 action: Action::DataRead,
12482 cancellable: true,
12483 mutation: "read_only",
12484 },
12485 CommandContract {
12486 command: Command::MaterializeTableSnapshot,
12487 action: Action::DataRead,
12488 cancellable: true,
12489 mutation: "catalog_submit",
12490 },
12491 CommandContract {
12492 command: Command::ResolveTableSnapshot,
12493 action: Action::DataRead,
12494 cancellable: true,
12495 mutation: "read_only",
12496 },
12497 CommandContract {
12498 command: Command::ReadTableSnapshot,
12499 action: Action::DataRead,
12500 cancellable: true,
12501 mutation: "read_only",
12502 },
12503 CommandContract {
12504 command: Command::OpenPit,
12505 action: Action::DataRead,
12506 cancellable: true,
12507 mutation: "authority_submit",
12508 },
12509 CommandContract {
12510 command: Command::RenewPit,
12511 action: Action::DataRead,
12512 cancellable: true,
12513 mutation: "authority_submit",
12514 },
12515 CommandContract {
12516 command: Command::ClosePit,
12517 action: Action::DataRead,
12518 cancellable: true,
12519 mutation: "authority_submit",
12520 },
12521 CommandContract {
12522 command: Command::ListOperations,
12523 action: Action::OperationRead,
12524 cancellable: true,
12525 mutation: "read_only",
12526 },
12527 CommandContract {
12528 command: Command::GetOperation,
12529 action: Action::OperationRead,
12530 cancellable: true,
12531 mutation: "read_only",
12532 },
12533 CommandContract {
12534 command: Command::WaitOperation,
12535 action: Action::OperationRead,
12536 cancellable: true,
12537 mutation: "read_only",
12538 },
12539 CommandContract {
12540 command: Command::CancelOperation,
12541 action: Action::OperationCancel,
12542 cancellable: true,
12543 mutation: "authority_submit",
12544 },
12545 CommandContract {
12546 command: Command::ListAuditEvents,
12547 action: Action::AuditRead,
12548 cancellable: true,
12549 mutation: "read_only",
12550 },
12551 CommandContract {
12552 command: Command::ExportAuditEvents,
12553 action: Action::AuditRead,
12554 cancellable: true,
12555 mutation: "read_only",
12556 },
12557 CommandContract {
12558 command: Command::ReserveServiceCredential,
12559 action: Action::SecurityAdmin,
12560 cancellable: true,
12561 mutation: "security_reserve",
12562 },
12563 CommandContract {
12564 command: Command::ReserveServiceCredentialRotation,
12565 action: Action::SecurityAdmin,
12566 cancellable: true,
12567 mutation: "security_reserve",
12568 },
12569 CommandContract {
12570 command: Command::ActivateServiceCredential,
12571 action: Action::SecurityAdmin,
12572 cancellable: true,
12573 mutation: "security_submit",
12574 },
12575 CommandContract {
12576 command: Command::ResolveServiceCredentialReservation,
12577 action: Action::SecurityRead,
12578 cancellable: true,
12579 mutation: "read_only",
12580 },
12581 CommandContract {
12582 command: Command::PrepareRevokeServiceCredential,
12583 action: Action::SecurityAdmin,
12584 cancellable: true,
12585 mutation: "read_only_prepare",
12586 },
12587 CommandContract {
12588 command: Command::RevokeServiceCredential,
12589 action: Action::SecurityAdmin,
12590 cancellable: true,
12591 mutation: "security_submit",
12592 },
12593 CommandContract {
12594 command: Command::ResolveSecurityAction,
12595 action: Action::SecurityRead,
12596 cancellable: true,
12597 mutation: "read_only",
12598 },
12599 CommandContract {
12600 command: Command::GetSecurityRole,
12601 action: Action::SecurityRead,
12602 cancellable: true,
12603 mutation: "read_only",
12604 },
12605 CommandContract {
12606 command: Command::PrepareRoleAppendAccessChange,
12607 action: Action::SecurityAdmin,
12608 cancellable: true,
12609 mutation: "read_only_prepare",
12610 },
12611 CommandContract {
12612 command: Command::SubmitRoleAppendAccessChange,
12613 action: Action::SecurityAdmin,
12614 cancellable: true,
12615 mutation: "security_submit",
12616 },
12617 CommandContract {
12618 command: Command::PrepareSourceAuthorizationProjection,
12619 action: Action::IndexAdmin,
12620 cancellable: true,
12621 mutation: "read_only_prepare",
12622 },
12623 CommandContract {
12624 command: Command::SubmitSourceAuthorizationProjection,
12625 action: Action::IndexAdmin,
12626 cancellable: true,
12627 mutation: "security_submit",
12628 },
12629 CommandContract {
12630 command: Command::ResolveSourceAuthorizationProjection,
12631 action: Action::IndexAdmin,
12632 cancellable: true,
12633 mutation: "read_only",
12634 },
12635 CommandContract {
12636 command: Command::ListServiceCredentials,
12637 action: Action::SecurityRead,
12638 cancellable: true,
12639 mutation: "read_only",
12640 },
12641 CommandContract {
12642 command: Command::GetRuntimeStatus,
12643 action: Action::CatalogRead,
12644 cancellable: true,
12645 mutation: "read_only",
12646 },
12647 CommandContract {
12648 command: Command::GetResultCacheStatus,
12649 action: Action::CatalogRead,
12650 cancellable: true,
12651 mutation: "read_only",
12652 },
12653 CommandContract {
12654 command: Command::GetFieldPromotionStatus,
12655 action: Action::CatalogRead,
12656 cancellable: true,
12657 mutation: "read_only",
12658 },
12659 CommandContract {
12660 command: Command::GetOverloadStatus,
12661 action: Action::CatalogRead,
12662 cancellable: true,
12663 mutation: "read_only",
12664 },
12665 CommandContract {
12666 command: Command::ConfigureExternalKey,
12667 action: Action::LifecycleAdmin,
12668 cancellable: true,
12669 mutation: "authority_submit",
12670 },
12671 CommandContract {
12672 command: Command::RotateExternalKeyBinding,
12673 action: Action::LifecycleAdmin,
12674 cancellable: true,
12675 mutation: "authority_submit",
12676 },
12677 CommandContract {
12678 command: Command::RetireExternalKeyBinding,
12679 action: Action::LifecycleAdmin,
12680 cancellable: true,
12681 mutation: "authority_submit",
12682 },
12683 CommandContract {
12684 command: Command::ResolveExternalKeyBindingRetirement,
12685 action: Action::LifecycleAdmin,
12686 cancellable: true,
12687 mutation: "read_only",
12688 },
12689 CommandContract {
12690 command: Command::ConfigureAggregateThenDelete,
12691 action: Action::LifecycleAdmin,
12692 cancellable: true,
12693 mutation: "authority_submit",
12694 },
12695 CommandContract {
12696 command: Command::GetLifecycleStatus,
12697 action: Action::CatalogRead,
12698 cancellable: true,
12699 mutation: "read_only",
12700 },
12701 CommandContract {
12702 command: Command::EraseRecord,
12703 action: Action::LifecycleAdmin,
12704 cancellable: true,
12705 mutation: "authority_submit",
12706 },
12707 CommandContract {
12708 command: Command::ResolveRecordErasure,
12709 action: Action::LifecycleAdmin,
12710 cancellable: true,
12711 mutation: "read_only",
12712 },
12713 CommandContract {
12714 command: Command::GetRecordErasure,
12715 action: Action::LifecycleAdmin,
12716 cancellable: true,
12717 mutation: "read_only",
12718 },
12719 CommandContract {
12720 command: Command::GetQuota,
12721 action: Action::QuotaRead,
12722 cancellable: true,
12723 mutation: "read_only",
12724 },
12725 CommandContract {
12726 command: Command::UpdateQuota,
12727 action: Action::QuotaAdmin,
12728 cancellable: true,
12729 mutation: "quota_submit",
12730 },
12731 CommandContract {
12732 command: Command::GetBinding,
12733 action: Action::BindingRead,
12734 cancellable: true,
12735 mutation: "read_only",
12736 },
12737 CommandContract {
12738 command: Command::GetAdmissionStatus,
12739 action: Action::AdmissionRead,
12740 cancellable: true,
12741 mutation: "read_only",
12742 },
12743 CommandContract {
12744 command: Command::SetAdmission,
12745 action: Action::AdmissionAdmin,
12746 cancellable: true,
12747 mutation: "admission_submit",
12748 },
12749 CommandContract {
12750 command: Command::GetQuiesceStatus,
12751 action: Action::AdmissionRead,
12752 cancellable: true,
12753 mutation: "read_only",
12754 },
12755 CommandContract {
12756 command: Command::GetDecommissionReadiness,
12757 action: Action::AdmissionRead,
12758 cancellable: true,
12759 mutation: "read_only",
12760 },
12761 CommandContract {
12762 command: Command::GetUpgradeReadiness,
12763 action: Action::TaskRead,
12764 cancellable: true,
12765 mutation: "read_only",
12766 },
12767 CommandContract {
12768 command: Command::GetMaintenanceStatus,
12769 action: Action::TaskRead,
12770 cancellable: true,
12771 mutation: "read_only",
12772 },
12773 CommandContract {
12774 command: Command::WarmVectorIndex,
12775 action: Action::DataRead,
12776 cancellable: true,
12777 mutation: "read_only",
12778 },
12779 CommandContract {
12780 command: Command::EvaluateVectorRecall,
12781 action: Action::DiagnosticsCreate,
12782 cancellable: true,
12783 mutation: "diagnostic_submit",
12784 },
12785 CommandContract {
12786 command: Command::CalibrateVectorStrategy,
12787 action: Action::DiagnosticsCreate,
12788 cancellable: true,
12789 mutation: "diagnostic_submit",
12790 },
12791 CommandContract {
12792 command: Command::GetVectorDiagnostic,
12793 action: Action::DiagnosticsRead,
12794 cancellable: true,
12795 mutation: "read_only",
12796 },
12797 CommandContract {
12798 command: Command::CreateDiagnostic,
12799 action: Action::DiagnosticsCreate,
12800 cancellable: true,
12801 mutation: "diagnostic_submit",
12802 },
12803 CommandContract {
12804 command: Command::GetDiagnostic,
12805 action: Action::DiagnosticsRead,
12806 cancellable: true,
12807 mutation: "read_only",
12808 },
12809 CommandContract {
12810 command: Command::PrepareCollectionExport,
12811 action: Action::CollectionExport,
12812 cancellable: true,
12813 mutation: "read_only_prepare",
12814 },
12815 CommandContract {
12816 command: Command::StartCollectionExport,
12817 action: Action::CollectionExport,
12818 cancellable: true,
12819 mutation: "portability_submit",
12820 },
12821 CommandContract {
12822 command: Command::ResolveCollectionExport,
12823 action: Action::CollectionExport,
12824 cancellable: true,
12825 mutation: "read_only",
12826 },
12827 CommandContract {
12828 command: Command::VerifyCollectionExport,
12829 action: Action::CollectionExport,
12830 cancellable: true,
12831 mutation: "read_only",
12832 },
12833 CommandContract {
12834 command: Command::PrepareCollectionExportRetirement,
12835 action: Action::CollectionExport,
12836 cancellable: true,
12837 mutation: "read_only_prepare",
12838 },
12839 CommandContract {
12840 command: Command::StartCollectionExportRetirement,
12841 action: Action::CollectionExport,
12842 cancellable: true,
12843 mutation: "portability_submit",
12844 },
12845 CommandContract {
12846 command: Command::ResolveCollectionExportRetirement,
12847 action: Action::CollectionExport,
12848 cancellable: true,
12849 mutation: "read_only",
12850 },
12851 CommandContract {
12852 command: Command::PrepareCollectionRestore,
12853 action: Action::CollectionRestore,
12854 cancellable: true,
12855 mutation: "read_only_prepare",
12856 },
12857 CommandContract {
12858 command: Command::StartCollectionRestore,
12859 action: Action::CollectionRestore,
12860 cancellable: true,
12861 mutation: "portability_submit",
12862 },
12863 CommandContract {
12864 command: Command::ResolveCollectionRestore,
12865 action: Action::CollectionRestore,
12866 cancellable: true,
12867 mutation: "read_only",
12868 },
12869 CommandContract {
12870 command: Command::PrepareCollectionTransferExport,
12871 action: Action::CollectionTransferExport,
12872 cancellable: true,
12873 mutation: "read_only_prepare",
12874 },
12875 CommandContract {
12876 command: Command::StartCollectionTransferExport,
12877 action: Action::CollectionTransferExport,
12878 cancellable: true,
12879 mutation: "portability_submit",
12880 },
12881 CommandContract {
12882 command: Command::ResolveCollectionTransferExport,
12883 action: Action::CollectionTransferExport,
12884 cancellable: true,
12885 mutation: "read_only",
12886 },
12887 CommandContract {
12888 command: Command::PrepareCollectionTransferRestore,
12889 action: Action::CollectionTransferRestore,
12890 cancellable: true,
12891 mutation: "read_only_prepare",
12892 },
12893 CommandContract {
12894 command: Command::StartCollectionTransferRestore,
12895 action: Action::CollectionTransferRestore,
12896 cancellable: true,
12897 mutation: "portability_submit",
12898 },
12899 CommandContract {
12900 command: Command::ResolveCollectionTransferRestore,
12901 action: Action::CollectionTransferRestore,
12902 cancellable: true,
12903 mutation: "read_only",
12904 },
12905 CommandContract {
12906 command: Command::PrepareCollectionStandbyAdmission,
12907 action: Action::CollectionStandbyAdmission,
12908 cancellable: true,
12909 mutation: "read_only_prepare",
12910 },
12911 CommandContract {
12912 command: Command::StartCollectionStandbyAdmission,
12913 action: Action::CollectionStandbyAdmission,
12914 cancellable: true,
12915 mutation: "portability_submit",
12916 },
12917 CommandContract {
12918 command: Command::ResolveCollectionStandbyAdmission,
12919 action: Action::CollectionStandbyAdmission,
12920 cancellable: true,
12921 mutation: "read_only",
12922 },
12923 CommandContract {
12924 command: Command::PrepareCollectionStandbyActivation,
12925 action: Action::CollectionStandbyActivation,
12926 cancellable: true,
12927 mutation: "read_only_prepare",
12928 },
12929 CommandContract {
12930 command: Command::StartCollectionStandbyActivation,
12931 action: Action::CollectionStandbyActivation,
12932 cancellable: true,
12933 mutation: "portability_submit",
12934 },
12935 CommandContract {
12936 command: Command::ResolveCollectionStandbyActivation,
12937 action: Action::CollectionStandbyActivation,
12938 cancellable: true,
12939 mutation: "read_only",
12940 },
12941 CommandContract {
12942 command: Command::PrepareIndexExport,
12943 action: Action::IndexExport,
12944 cancellable: true,
12945 mutation: "read_only_prepare",
12946 },
12947 CommandContract {
12948 command: Command::StartIndexExport,
12949 action: Action::IndexExport,
12950 cancellable: true,
12951 mutation: "portability_submit",
12952 },
12953 CommandContract {
12954 command: Command::ResolveIndexExport,
12955 action: Action::IndexExport,
12956 cancellable: true,
12957 mutation: "read_only",
12958 },
12959 CommandContract {
12960 command: Command::VerifyIndexExport,
12961 action: Action::IndexExport,
12962 cancellable: true,
12963 mutation: "read_only",
12964 },
12965 CommandContract {
12966 command: Command::PrepareIndexImport,
12967 action: Action::IndexImport,
12968 cancellable: true,
12969 mutation: "read_only_prepare",
12970 },
12971 CommandContract {
12972 command: Command::StartIndexImport,
12973 action: Action::IndexImport,
12974 cancellable: true,
12975 mutation: "portability_submit",
12976 },
12977 CommandContract {
12978 command: Command::ResolveIndexImport,
12979 action: Action::IndexImport,
12980 cancellable: true,
12981 mutation: "read_only",
12982 },
12983 CommandContract {
12984 command: Command::ReadArtifactChunk,
12985 action: Action::OperationRead,
12986 cancellable: true,
12987 mutation: "read_only",
12988 },
12989 CommandContract {
12990 command: Command::ExportUsage,
12991 action: Action::UsageRead,
12992 cancellable: true,
12993 mutation: "read_only",
12994 },
12995 CommandContract {
12996 command: Command::GetStorageUsage,
12997 action: Action::UsageRead,
12998 cancellable: true,
12999 mutation: "read_only",
13000 },
13001 CommandContract {
13002 command: Command::ReadLogicalOccupancy,
13003 action: Action::UsageRead,
13004 cancellable: true,
13005 mutation: "read_only",
13006 },
13007 CommandContract {
13008 command: Command::ExecuteStateRead,
13009 action: Action::DataRead,
13010 cancellable: true,
13011 mutation: "read_only",
13012 },
13013 CommandContract {
13014 command: Command::PrepareStateWrite,
13015 action: Action::DataWrite,
13016 cancellable: true,
13017 mutation: "read_only_prepare",
13018 },
13019 CommandContract {
13020 command: Command::SubmitStateWrite,
13021 action: Action::DataWrite,
13022 cancellable: true,
13023 mutation: "state_submit",
13024 },
13025 CommandContract {
13026 command: Command::ResolveStateWrite,
13027 action: Action::DataRead,
13028 cancellable: true,
13029 mutation: "read_only",
13030 },
13031];
13032#[derive(Clone, Copy, Debug, Eq, PartialEq)]
13033pub struct CommandSemanticContract {
13034 pub command: Command,
13035 pub admissible_errors: &'static [ErrorCode],
13036 pub limit_ids: &'static [&'static str],
13037 pub effect_class: &'static str,
13038 pub risk_flags: &'static [&'static str],
13039 pub capability_family: &'static str,
13040 pub retry_safety: &'static str,
13041 pub identity_requirement: &'static str,
13042 pub resolver: Option<Command>,
13043 pub cancellation: &'static str,
13044 pub side_effects: &'static [&'static str],
13045 pub recovery: &'static str,
13046 pub collection_index_ref: &'static str,
13047}
13048pub const LODESTONE_API_COMMAND_SEMANTICS: &[CommandSemanticContract] = &[
13049 CommandSemanticContract {
13050 command: Command::Discover,
13051 admissible_errors: &[
13052 ErrorCode::Aborted,
13053 ErrorCode::DeadlineExceeded,
13054 ErrorCode::InvalidRequest,
13055 ErrorCode::UnsupportedVersion,
13056 ErrorCode::Unauthenticated,
13057 ErrorCode::PermissionDenied,
13058 ErrorCode::NotFound,
13059 ErrorCode::LimitExceeded,
13060 ErrorCode::CapabilityUnavailable,
13061 ErrorCode::TemporarilyUnavailable,
13062 ErrorCode::Internal,
13063 ],
13064 limit_ids: &["request_bytes", "response_bytes"],
13065 effect_class: "read_only",
13066 risk_flags: &[],
13067 capability_family: "discovery",
13068 retry_safety: "safe",
13069 identity_requirement: "none",
13070 resolver: None,
13071 cancellation: "per_call",
13072 side_effects: &[],
13073 recovery: "retry",
13074 collection_index_ref: "none",
13075 },
13076 CommandSemanticContract {
13077 command: Command::ListIndexes,
13078 admissible_errors: &[
13079 ErrorCode::Aborted,
13080 ErrorCode::DeadlineExceeded,
13081 ErrorCode::InvalidRequest,
13082 ErrorCode::UnsupportedVersion,
13083 ErrorCode::Unauthenticated,
13084 ErrorCode::PermissionDenied,
13085 ErrorCode::NotFound,
13086 ErrorCode::StaleCursor,
13087 ErrorCode::RestartBudgetExhausted,
13088 ErrorCode::LimitExceeded,
13089 ErrorCode::CapabilityUnavailable,
13090 ErrorCode::TemporarilyUnavailable,
13091 ErrorCode::Internal,
13092 ],
13093 limit_ids: &[
13094 "request_bytes",
13095 "response_bytes",
13096 "page_size",
13097 "catalog_page_size",
13098 "catalog_restart_budget",
13099 ],
13100 effect_class: "read_only",
13101 risk_flags: &[],
13102 capability_family: "catalog",
13103 retry_safety: "safe",
13104 identity_requirement: "none",
13105 resolver: None,
13106 cancellation: "per_call",
13107 side_effects: &[],
13108 recovery: "retry",
13109 collection_index_ref: "none",
13110 },
13111 CommandSemanticContract {
13112 command: Command::GetIndex,
13113 admissible_errors: &[
13114 ErrorCode::Aborted,
13115 ErrorCode::DeadlineExceeded,
13116 ErrorCode::InvalidRequest,
13117 ErrorCode::UnsupportedVersion,
13118 ErrorCode::Unauthenticated,
13119 ErrorCode::PermissionDenied,
13120 ErrorCode::NotFound,
13121 ErrorCode::LimitExceeded,
13122 ErrorCode::CapabilityUnavailable,
13123 ErrorCode::TemporarilyUnavailable,
13124 ErrorCode::Internal,
13125 ],
13126 limit_ids: &["request_bytes", "response_bytes"],
13127 effect_class: "read_only",
13128 risk_flags: &[],
13129 capability_family: "catalog",
13130 retry_safety: "safe",
13131 identity_requirement: "none",
13132 resolver: None,
13133 cancellation: "per_call",
13134 side_effects: &[],
13135 recovery: "retry",
13136 collection_index_ref: "none",
13137 },
13138 CommandSemanticContract {
13139 command: Command::ValidateIndexChange,
13140 admissible_errors: &[
13141 ErrorCode::Aborted,
13142 ErrorCode::DeadlineExceeded,
13143 ErrorCode::InvalidRequest,
13144 ErrorCode::UnsupportedVersion,
13145 ErrorCode::Unauthenticated,
13146 ErrorCode::PermissionDenied,
13147 ErrorCode::NotFound,
13148 ErrorCode::LimitExceeded,
13149 ErrorCode::CapabilityUnavailable,
13150 ErrorCode::TemporarilyUnavailable,
13151 ErrorCode::Internal,
13152 ],
13153 limit_ids: &["request_bytes", "response_bytes"],
13154 effect_class: "read_only",
13155 risk_flags: &[],
13156 capability_family: "catalog",
13157 retry_safety: "safe",
13158 identity_requirement: "none",
13159 resolver: None,
13160 cancellation: "per_call",
13161 side_effects: &[],
13162 recovery: "retry",
13163 collection_index_ref: "request_name",
13164 },
13165 CommandSemanticContract {
13166 command: Command::ApplyIndexChange,
13167 admissible_errors: &[
13168 ErrorCode::Aborted,
13169 ErrorCode::DeadlineExceeded,
13170 ErrorCode::InvalidRequest,
13171 ErrorCode::UnsupportedVersion,
13172 ErrorCode::Unauthenticated,
13173 ErrorCode::PermissionDenied,
13174 ErrorCode::NotFound,
13175 ErrorCode::Conflict,
13176 ErrorCode::LimitExceeded,
13177 ErrorCode::CapabilityUnavailable,
13178 ErrorCode::NotSubmitted,
13179 ErrorCode::SubmittedIndeterminate,
13180 ErrorCode::ExpiredUnknown,
13181 ErrorCode::TemporarilyUnavailable,
13182 ErrorCode::Internal,
13183 ],
13184 limit_ids: &["request_bytes", "response_bytes"],
13185 effect_class: "durable_submit",
13186 risk_flags: &[],
13187 capability_family: "catalog",
13188 retry_safety: "safe",
13189 identity_requirement: "caller_action_id",
13190 resolver: Some(Command::ResolveIndexChange),
13191 cancellation: "per_call_until_submission_then_resolve",
13192 side_effects: &["commits_authoritative_state"],
13193 recovery: "resolve_with_resolve_index_change",
13194 collection_index_ref: "request_index",
13195 },
13196 CommandSemanticContract {
13197 command: Command::ResolveIndexChange,
13198 admissible_errors: &[
13199 ErrorCode::Aborted,
13200 ErrorCode::DeadlineExceeded,
13201 ErrorCode::InvalidRequest,
13202 ErrorCode::UnsupportedVersion,
13203 ErrorCode::Unauthenticated,
13204 ErrorCode::PermissionDenied,
13205 ErrorCode::NotFound,
13206 ErrorCode::LimitExceeded,
13207 ErrorCode::CapabilityUnavailable,
13208 ErrorCode::TemporarilyUnavailable,
13209 ErrorCode::Internal,
13210 ],
13211 limit_ids: &["request_bytes", "response_bytes"],
13212 effect_class: "read_only",
13213 risk_flags: &[],
13214 capability_family: "catalog",
13215 retry_safety: "safe",
13216 identity_requirement: "caller_action_id",
13217 resolver: None,
13218 cancellation: "per_call",
13219 side_effects: &[],
13220 recovery: "retry",
13221 collection_index_ref: "request_index",
13222 },
13223 CommandSemanticContract {
13224 command: Command::ApplyAdministrationMutation,
13225 admissible_errors: &[
13226 ErrorCode::Aborted,
13227 ErrorCode::DeadlineExceeded,
13228 ErrorCode::InvalidRequest,
13229 ErrorCode::UnsupportedVersion,
13230 ErrorCode::Unauthenticated,
13231 ErrorCode::PermissionDenied,
13232 ErrorCode::NotFound,
13233 ErrorCode::Conflict,
13234 ErrorCode::LimitExceeded,
13235 ErrorCode::CapabilityUnavailable,
13236 ErrorCode::NotSubmitted,
13237 ErrorCode::SubmittedIndeterminate,
13238 ErrorCode::ExpiredUnknown,
13239 ErrorCode::TemporarilyUnavailable,
13240 ErrorCode::Internal,
13241 ],
13242 limit_ids: &["request_bytes", "response_bytes"],
13243 effect_class: "control_write",
13244 risk_flags: &[],
13245 capability_family: "lifecycle",
13246 retry_safety: "pre_submit_only",
13247 identity_requirement: "caller_action_id",
13248 resolver: None,
13249 cancellation: "per_call_until_submission_then_resolve",
13250 side_effects: &["commits_authoritative_state"],
13251 recovery: "retry_if_not_submitted",
13252 collection_index_ref: "none",
13253 },
13254 CommandSemanticContract {
13255 command: Command::ListAliases,
13256 admissible_errors: &[
13257 ErrorCode::Aborted,
13258 ErrorCode::DeadlineExceeded,
13259 ErrorCode::InvalidRequest,
13260 ErrorCode::UnsupportedVersion,
13261 ErrorCode::Unauthenticated,
13262 ErrorCode::PermissionDenied,
13263 ErrorCode::NotFound,
13264 ErrorCode::StaleCursor,
13265 ErrorCode::RestartBudgetExhausted,
13266 ErrorCode::LimitExceeded,
13267 ErrorCode::CapabilityUnavailable,
13268 ErrorCode::TemporarilyUnavailable,
13269 ErrorCode::Internal,
13270 ],
13271 limit_ids: &[
13272 "request_bytes",
13273 "response_bytes",
13274 "page_size",
13275 "catalog_page_size",
13276 "catalog_restart_budget",
13277 ],
13278 effect_class: "read_only",
13279 risk_flags: &[],
13280 capability_family: "catalog",
13281 retry_safety: "safe",
13282 identity_requirement: "none",
13283 resolver: None,
13284 cancellation: "per_call",
13285 side_effects: &[],
13286 recovery: "retry",
13287 collection_index_ref: "none",
13288 },
13289 CommandSemanticContract {
13290 command: Command::GetAlias,
13291 admissible_errors: &[
13292 ErrorCode::Aborted,
13293 ErrorCode::DeadlineExceeded,
13294 ErrorCode::InvalidRequest,
13295 ErrorCode::UnsupportedVersion,
13296 ErrorCode::Unauthenticated,
13297 ErrorCode::PermissionDenied,
13298 ErrorCode::NotFound,
13299 ErrorCode::LimitExceeded,
13300 ErrorCode::CapabilityUnavailable,
13301 ErrorCode::TemporarilyUnavailable,
13302 ErrorCode::Internal,
13303 ],
13304 limit_ids: &["request_bytes", "response_bytes"],
13305 effect_class: "read_only",
13306 risk_flags: &[],
13307 capability_family: "catalog",
13308 retry_safety: "safe",
13309 identity_requirement: "none",
13310 resolver: None,
13311 cancellation: "per_call",
13312 side_effects: &[],
13313 recovery: "retry",
13314 collection_index_ref: "none",
13315 },
13316 CommandSemanticContract {
13317 command: Command::ListDataStreams,
13318 admissible_errors: &[
13319 ErrorCode::Aborted,
13320 ErrorCode::DeadlineExceeded,
13321 ErrorCode::InvalidRequest,
13322 ErrorCode::UnsupportedVersion,
13323 ErrorCode::Unauthenticated,
13324 ErrorCode::PermissionDenied,
13325 ErrorCode::NotFound,
13326 ErrorCode::StaleCursor,
13327 ErrorCode::RestartBudgetExhausted,
13328 ErrorCode::LimitExceeded,
13329 ErrorCode::CapabilityUnavailable,
13330 ErrorCode::TemporarilyUnavailable,
13331 ErrorCode::Internal,
13332 ],
13333 limit_ids: &[
13334 "request_bytes",
13335 "response_bytes",
13336 "page_size",
13337 "catalog_page_size",
13338 "catalog_restart_budget",
13339 ],
13340 effect_class: "read_only",
13341 risk_flags: &[],
13342 capability_family: "catalog",
13343 retry_safety: "safe",
13344 identity_requirement: "none",
13345 resolver: None,
13346 cancellation: "per_call",
13347 side_effects: &[],
13348 recovery: "retry",
13349 collection_index_ref: "none",
13350 },
13351 CommandSemanticContract {
13352 command: Command::GetDataStream,
13353 admissible_errors: &[
13354 ErrorCode::Aborted,
13355 ErrorCode::DeadlineExceeded,
13356 ErrorCode::InvalidRequest,
13357 ErrorCode::UnsupportedVersion,
13358 ErrorCode::Unauthenticated,
13359 ErrorCode::PermissionDenied,
13360 ErrorCode::NotFound,
13361 ErrorCode::LimitExceeded,
13362 ErrorCode::CapabilityUnavailable,
13363 ErrorCode::TemporarilyUnavailable,
13364 ErrorCode::Internal,
13365 ],
13366 limit_ids: &["request_bytes", "response_bytes"],
13367 effect_class: "read_only",
13368 risk_flags: &[],
13369 capability_family: "catalog",
13370 retry_safety: "safe",
13371 identity_requirement: "none",
13372 resolver: None,
13373 cancellation: "per_call",
13374 side_effects: &[],
13375 recovery: "retry",
13376 collection_index_ref: "none",
13377 },
13378 CommandSemanticContract {
13379 command: Command::ListComponentTemplates,
13380 admissible_errors: &[
13381 ErrorCode::Aborted,
13382 ErrorCode::DeadlineExceeded,
13383 ErrorCode::InvalidRequest,
13384 ErrorCode::UnsupportedVersion,
13385 ErrorCode::Unauthenticated,
13386 ErrorCode::PermissionDenied,
13387 ErrorCode::NotFound,
13388 ErrorCode::StaleCursor,
13389 ErrorCode::RestartBudgetExhausted,
13390 ErrorCode::LimitExceeded,
13391 ErrorCode::CapabilityUnavailable,
13392 ErrorCode::TemporarilyUnavailable,
13393 ErrorCode::Internal,
13394 ],
13395 limit_ids: &[
13396 "request_bytes",
13397 "response_bytes",
13398 "page_size",
13399 "catalog_page_size",
13400 "catalog_restart_budget",
13401 ],
13402 effect_class: "read_only",
13403 risk_flags: &[],
13404 capability_family: "catalog",
13405 retry_safety: "safe",
13406 identity_requirement: "none",
13407 resolver: None,
13408 cancellation: "per_call",
13409 side_effects: &[],
13410 recovery: "retry",
13411 collection_index_ref: "none",
13412 },
13413 CommandSemanticContract {
13414 command: Command::GetComponentTemplate,
13415 admissible_errors: &[
13416 ErrorCode::Aborted,
13417 ErrorCode::DeadlineExceeded,
13418 ErrorCode::InvalidRequest,
13419 ErrorCode::UnsupportedVersion,
13420 ErrorCode::Unauthenticated,
13421 ErrorCode::PermissionDenied,
13422 ErrorCode::NotFound,
13423 ErrorCode::LimitExceeded,
13424 ErrorCode::CapabilityUnavailable,
13425 ErrorCode::TemporarilyUnavailable,
13426 ErrorCode::Internal,
13427 ],
13428 limit_ids: &["request_bytes", "response_bytes"],
13429 effect_class: "read_only",
13430 risk_flags: &[],
13431 capability_family: "catalog",
13432 retry_safety: "safe",
13433 identity_requirement: "none",
13434 resolver: None,
13435 cancellation: "per_call",
13436 side_effects: &[],
13437 recovery: "retry",
13438 collection_index_ref: "none",
13439 },
13440 CommandSemanticContract {
13441 command: Command::ListIndexTemplates,
13442 admissible_errors: &[
13443 ErrorCode::Aborted,
13444 ErrorCode::DeadlineExceeded,
13445 ErrorCode::InvalidRequest,
13446 ErrorCode::UnsupportedVersion,
13447 ErrorCode::Unauthenticated,
13448 ErrorCode::PermissionDenied,
13449 ErrorCode::NotFound,
13450 ErrorCode::StaleCursor,
13451 ErrorCode::RestartBudgetExhausted,
13452 ErrorCode::LimitExceeded,
13453 ErrorCode::CapabilityUnavailable,
13454 ErrorCode::TemporarilyUnavailable,
13455 ErrorCode::Internal,
13456 ],
13457 limit_ids: &[
13458 "request_bytes",
13459 "response_bytes",
13460 "page_size",
13461 "catalog_page_size",
13462 "catalog_restart_budget",
13463 ],
13464 effect_class: "read_only",
13465 risk_flags: &[],
13466 capability_family: "catalog",
13467 retry_safety: "safe",
13468 identity_requirement: "none",
13469 resolver: None,
13470 cancellation: "per_call",
13471 side_effects: &[],
13472 recovery: "retry",
13473 collection_index_ref: "none",
13474 },
13475 CommandSemanticContract {
13476 command: Command::GetIndexTemplate,
13477 admissible_errors: &[
13478 ErrorCode::Aborted,
13479 ErrorCode::DeadlineExceeded,
13480 ErrorCode::InvalidRequest,
13481 ErrorCode::UnsupportedVersion,
13482 ErrorCode::Unauthenticated,
13483 ErrorCode::PermissionDenied,
13484 ErrorCode::NotFound,
13485 ErrorCode::LimitExceeded,
13486 ErrorCode::CapabilityUnavailable,
13487 ErrorCode::TemporarilyUnavailable,
13488 ErrorCode::Internal,
13489 ],
13490 limit_ids: &["request_bytes", "response_bytes"],
13491 effect_class: "read_only",
13492 risk_flags: &[],
13493 capability_family: "catalog",
13494 retry_safety: "safe",
13495 identity_requirement: "none",
13496 resolver: None,
13497 cancellation: "per_call",
13498 side_effects: &[],
13499 recovery: "retry",
13500 collection_index_ref: "none",
13501 },
13502 CommandSemanticContract {
13503 command: Command::ListIngestPipelines,
13504 admissible_errors: &[
13505 ErrorCode::Aborted,
13506 ErrorCode::DeadlineExceeded,
13507 ErrorCode::InvalidRequest,
13508 ErrorCode::UnsupportedVersion,
13509 ErrorCode::Unauthenticated,
13510 ErrorCode::PermissionDenied,
13511 ErrorCode::NotFound,
13512 ErrorCode::StaleCursor,
13513 ErrorCode::RestartBudgetExhausted,
13514 ErrorCode::LimitExceeded,
13515 ErrorCode::CapabilityUnavailable,
13516 ErrorCode::TemporarilyUnavailable,
13517 ErrorCode::Internal,
13518 ],
13519 limit_ids: &[
13520 "request_bytes",
13521 "response_bytes",
13522 "page_size",
13523 "catalog_page_size",
13524 "catalog_restart_budget",
13525 ],
13526 effect_class: "read_only",
13527 risk_flags: &[],
13528 capability_family: "lifecycle",
13529 retry_safety: "safe",
13530 identity_requirement: "none",
13531 resolver: None,
13532 cancellation: "per_call",
13533 side_effects: &[],
13534 recovery: "retry",
13535 collection_index_ref: "none",
13536 },
13537 CommandSemanticContract {
13538 command: Command::GetIngestPipeline,
13539 admissible_errors: &[
13540 ErrorCode::Aborted,
13541 ErrorCode::DeadlineExceeded,
13542 ErrorCode::InvalidRequest,
13543 ErrorCode::UnsupportedVersion,
13544 ErrorCode::Unauthenticated,
13545 ErrorCode::PermissionDenied,
13546 ErrorCode::NotFound,
13547 ErrorCode::LimitExceeded,
13548 ErrorCode::CapabilityUnavailable,
13549 ErrorCode::TemporarilyUnavailable,
13550 ErrorCode::Internal,
13551 ],
13552 limit_ids: &["request_bytes", "response_bytes"],
13553 effect_class: "read_only",
13554 risk_flags: &[],
13555 capability_family: "lifecycle",
13556 retry_safety: "safe",
13557 identity_requirement: "none",
13558 resolver: None,
13559 cancellation: "per_call",
13560 side_effects: &[],
13561 recovery: "retry",
13562 collection_index_ref: "none",
13563 },
13564 CommandSemanticContract {
13565 command: Command::SimulateIngestPipeline,
13566 admissible_errors: &[
13567 ErrorCode::Aborted,
13568 ErrorCode::DeadlineExceeded,
13569 ErrorCode::InvalidRequest,
13570 ErrorCode::UnsupportedVersion,
13571 ErrorCode::Unauthenticated,
13572 ErrorCode::PermissionDenied,
13573 ErrorCode::NotFound,
13574 ErrorCode::LimitExceeded,
13575 ErrorCode::CapabilityUnavailable,
13576 ErrorCode::TemporarilyUnavailable,
13577 ErrorCode::Internal,
13578 ],
13579 limit_ids: &["request_bytes", "response_bytes"],
13580 effect_class: "read_only",
13581 risk_flags: &[],
13582 capability_family: "lifecycle",
13583 retry_safety: "safe",
13584 identity_requirement: "none",
13585 resolver: None,
13586 cancellation: "per_call",
13587 side_effects: &[],
13588 recovery: "retry",
13589 collection_index_ref: "none",
13590 },
13591 CommandSemanticContract {
13592 command: Command::ReprocessByQuery,
13593 admissible_errors: &[
13594 ErrorCode::Aborted,
13595 ErrorCode::DeadlineExceeded,
13596 ErrorCode::InvalidRequest,
13597 ErrorCode::UnsupportedVersion,
13598 ErrorCode::Unauthenticated,
13599 ErrorCode::PermissionDenied,
13600 ErrorCode::NotFound,
13601 ErrorCode::Conflict,
13602 ErrorCode::LimitExceeded,
13603 ErrorCode::CapabilityUnavailable,
13604 ErrorCode::NotSubmitted,
13605 ErrorCode::SubmittedIndeterminate,
13606 ErrorCode::ExpiredUnknown,
13607 ErrorCode::TemporarilyUnavailable,
13608 ErrorCode::Internal,
13609 ],
13610 limit_ids: &["request_bytes", "response_bytes"],
13611 effect_class: "durable_submit",
13612 risk_flags: &[],
13613 capability_family: "data",
13614 retry_safety: "safe",
13615 identity_requirement: "caller_action_id",
13616 resolver: None,
13617 cancellation: "per_call_until_submission_then_resolve",
13618 side_effects: &["commits_authoritative_state"],
13619 recovery: "retry",
13620 collection_index_ref: "request_index",
13621 },
13622 CommandSemanticContract {
13623 command: Command::ListLifecyclePolicies,
13624 admissible_errors: &[
13625 ErrorCode::Aborted,
13626 ErrorCode::DeadlineExceeded,
13627 ErrorCode::InvalidRequest,
13628 ErrorCode::UnsupportedVersion,
13629 ErrorCode::Unauthenticated,
13630 ErrorCode::PermissionDenied,
13631 ErrorCode::NotFound,
13632 ErrorCode::StaleCursor,
13633 ErrorCode::RestartBudgetExhausted,
13634 ErrorCode::LimitExceeded,
13635 ErrorCode::CapabilityUnavailable,
13636 ErrorCode::TemporarilyUnavailable,
13637 ErrorCode::Internal,
13638 ],
13639 limit_ids: &[
13640 "request_bytes",
13641 "response_bytes",
13642 "page_size",
13643 "catalog_page_size",
13644 "catalog_restart_budget",
13645 ],
13646 effect_class: "read_only",
13647 risk_flags: &[],
13648 capability_family: "catalog",
13649 retry_safety: "safe",
13650 identity_requirement: "none",
13651 resolver: None,
13652 cancellation: "per_call",
13653 side_effects: &[],
13654 recovery: "retry",
13655 collection_index_ref: "none",
13656 },
13657 CommandSemanticContract {
13658 command: Command::GetLifecyclePolicy,
13659 admissible_errors: &[
13660 ErrorCode::Aborted,
13661 ErrorCode::DeadlineExceeded,
13662 ErrorCode::InvalidRequest,
13663 ErrorCode::UnsupportedVersion,
13664 ErrorCode::Unauthenticated,
13665 ErrorCode::PermissionDenied,
13666 ErrorCode::NotFound,
13667 ErrorCode::LimitExceeded,
13668 ErrorCode::CapabilityUnavailable,
13669 ErrorCode::TemporarilyUnavailable,
13670 ErrorCode::Internal,
13671 ],
13672 limit_ids: &["request_bytes", "response_bytes"],
13673 effect_class: "read_only",
13674 risk_flags: &[],
13675 capability_family: "catalog",
13676 retry_safety: "safe",
13677 identity_requirement: "none",
13678 resolver: None,
13679 cancellation: "per_call",
13680 side_effects: &[],
13681 recovery: "retry",
13682 collection_index_ref: "none",
13683 },
13684 CommandSemanticContract {
13685 command: Command::PrepareCreateIndex,
13686 admissible_errors: &[
13687 ErrorCode::Aborted,
13688 ErrorCode::DeadlineExceeded,
13689 ErrorCode::InvalidRequest,
13690 ErrorCode::UnsupportedVersion,
13691 ErrorCode::Unauthenticated,
13692 ErrorCode::PermissionDenied,
13693 ErrorCode::NotFound,
13694 ErrorCode::LimitExceeded,
13695 ErrorCode::CapabilityUnavailable,
13696 ErrorCode::TemporarilyUnavailable,
13697 ErrorCode::Internal,
13698 ],
13699 limit_ids: &[
13700 "request_bytes",
13701 "response_bytes",
13702 "resource_initial_shards",
13703 "resource_target_shard_bytes",
13704 "resource_admission_weight",
13705 "resource_ram_bytes",
13706 "resource_nvme_bytes",
13707 "resource_refresh_millis",
13708 "resource_memtable_bytes",
13709 "resource_parallelism",
13710 ],
13711 effect_class: "prepare",
13712 risk_flags: &[],
13713 capability_family: "catalog",
13714 retry_safety: "safe",
13715 identity_requirement: "server_locator",
13716 resolver: None,
13717 cancellation: "per_call",
13718 side_effects: &["creates_bounded_preparation"],
13719 recovery: "retry",
13720 collection_index_ref: "request_name",
13721 },
13722 CommandSemanticContract {
13723 command: Command::PrepareDeleteIndex,
13724 admissible_errors: &[
13725 ErrorCode::Aborted,
13726 ErrorCode::DeadlineExceeded,
13727 ErrorCode::InvalidRequest,
13728 ErrorCode::UnsupportedVersion,
13729 ErrorCode::Unauthenticated,
13730 ErrorCode::PermissionDenied,
13731 ErrorCode::NotFound,
13732 ErrorCode::LimitExceeded,
13733 ErrorCode::CapabilityUnavailable,
13734 ErrorCode::TemporarilyUnavailable,
13735 ErrorCode::Internal,
13736 ],
13737 limit_ids: &["request_bytes", "response_bytes"],
13738 effect_class: "prepare",
13739 risk_flags: &["destructive"],
13740 capability_family: "catalog",
13741 retry_safety: "safe",
13742 identity_requirement: "server_locator",
13743 resolver: None,
13744 cancellation: "per_call",
13745 side_effects: &["creates_bounded_preparation"],
13746 recovery: "retry",
13747 collection_index_ref: "request_name",
13748 },
13749 CommandSemanticContract {
13750 command: Command::SubmitCatalogAction,
13751 admissible_errors: &[
13752 ErrorCode::Aborted,
13753 ErrorCode::DeadlineExceeded,
13754 ErrorCode::InvalidRequest,
13755 ErrorCode::UnsupportedVersion,
13756 ErrorCode::Unauthenticated,
13757 ErrorCode::PermissionDenied,
13758 ErrorCode::NotFound,
13759 ErrorCode::Conflict,
13760 ErrorCode::LimitExceeded,
13761 ErrorCode::CapabilityUnavailable,
13762 ErrorCode::NotSubmitted,
13763 ErrorCode::SubmittedIndeterminate,
13764 ErrorCode::ExpiredUnknown,
13765 ErrorCode::TemporarilyUnavailable,
13766 ErrorCode::Internal,
13767 ],
13768 limit_ids: &[
13769 "request_bytes",
13770 "response_bytes",
13771 "resource_initial_shards",
13772 "resource_target_shard_bytes",
13773 "resource_admission_weight",
13774 "resource_ram_bytes",
13775 "resource_nvme_bytes",
13776 "resource_refresh_millis",
13777 "resource_memtable_bytes",
13778 "resource_parallelism",
13779 ],
13780 effect_class: "durable_submit",
13781 risk_flags: &[],
13782 capability_family: "catalog",
13783 retry_safety: "pre_submit_only",
13784 identity_requirement: "request_locator",
13785 resolver: Some(Command::ResolveCatalogAction),
13786 cancellation: "per_call_until_submission_then_resolve",
13787 side_effects: &["commits_authoritative_state"],
13788 recovery: "resolve_with_resolve_catalog_action",
13789 collection_index_ref: "request_name",
13790 },
13791 CommandSemanticContract {
13792 command: Command::ResolveCatalogAction,
13793 admissible_errors: &[
13794 ErrorCode::Aborted,
13795 ErrorCode::DeadlineExceeded,
13796 ErrorCode::InvalidRequest,
13797 ErrorCode::UnsupportedVersion,
13798 ErrorCode::Unauthenticated,
13799 ErrorCode::PermissionDenied,
13800 ErrorCode::NotFound,
13801 ErrorCode::LimitExceeded,
13802 ErrorCode::CapabilityUnavailable,
13803 ErrorCode::TemporarilyUnavailable,
13804 ErrorCode::Internal,
13805 ],
13806 limit_ids: &["request_bytes", "response_bytes"],
13807 effect_class: "read_only",
13808 risk_flags: &[],
13809 capability_family: "catalog",
13810 retry_safety: "safe",
13811 identity_requirement: "request_locator",
13812 resolver: None,
13813 cancellation: "per_call",
13814 side_effects: &[],
13815 recovery: "retry",
13816 collection_index_ref: "caller",
13817 },
13818 CommandSemanticContract {
13819 command: Command::PrepareReplayableSourceIndex,
13820 admissible_errors: &[
13821 ErrorCode::Aborted,
13822 ErrorCode::DeadlineExceeded,
13823 ErrorCode::InvalidRequest,
13824 ErrorCode::UnsupportedVersion,
13825 ErrorCode::Unauthenticated,
13826 ErrorCode::PermissionDenied,
13827 ErrorCode::NotFound,
13828 ErrorCode::LimitExceeded,
13829 ErrorCode::CapabilityUnavailable,
13830 ErrorCode::RetentionGap,
13831 ErrorCode::TemporarilyUnavailable,
13832 ErrorCode::Internal,
13833 ],
13834 limit_ids: &[
13835 "request_bytes",
13836 "response_bytes",
13837 "resource_initial_shards",
13838 "resource_target_shard_bytes",
13839 "resource_admission_weight",
13840 "resource_ram_bytes",
13841 "resource_nvme_bytes",
13842 "resource_refresh_millis",
13843 "resource_memtable_bytes",
13844 "resource_parallelism",
13845 ],
13846 effect_class: "prepare",
13847 risk_flags: &[],
13848 capability_family: "catalog",
13849 retry_safety: "safe",
13850 identity_requirement: "server_locator",
13851 resolver: None,
13852 cancellation: "per_call",
13853 side_effects: &["creates_bounded_preparation"],
13854 recovery: "retry",
13855 collection_index_ref: "request_name",
13856 },
13857 CommandSemanticContract {
13858 command: Command::SubmitReplayableSourceIndex,
13859 admissible_errors: &[
13860 ErrorCode::Aborted,
13861 ErrorCode::DeadlineExceeded,
13862 ErrorCode::InvalidRequest,
13863 ErrorCode::UnsupportedVersion,
13864 ErrorCode::Unauthenticated,
13865 ErrorCode::PermissionDenied,
13866 ErrorCode::NotFound,
13867 ErrorCode::Conflict,
13868 ErrorCode::LimitExceeded,
13869 ErrorCode::CapabilityUnavailable,
13870 ErrorCode::NotSubmitted,
13871 ErrorCode::SubmittedIndeterminate,
13872 ErrorCode::ExpiredUnknown,
13873 ErrorCode::RetentionGap,
13874 ErrorCode::TemporarilyUnavailable,
13875 ErrorCode::Internal,
13876 ],
13877 limit_ids: &[
13878 "request_bytes",
13879 "response_bytes",
13880 "resource_initial_shards",
13881 "resource_target_shard_bytes",
13882 "resource_admission_weight",
13883 "resource_ram_bytes",
13884 "resource_nvme_bytes",
13885 "resource_refresh_millis",
13886 "resource_memtable_bytes",
13887 "resource_parallelism",
13888 ],
13889 effect_class: "durable_submit",
13890 risk_flags: &[],
13891 capability_family: "catalog",
13892 retry_safety: "pre_submit_only",
13893 identity_requirement: "request_locator",
13894 resolver: Some(Command::ResolveCatalogAction),
13895 cancellation: "per_call_until_submission_then_resolve",
13896 side_effects: &["commits_authoritative_state"],
13897 recovery: "resolve_with_resolve_catalog_action",
13898 collection_index_ref: "request_name",
13899 },
13900 CommandSemanticContract {
13901 command: Command::GetReplayableSource,
13902 admissible_errors: &[
13903 ErrorCode::Aborted,
13904 ErrorCode::DeadlineExceeded,
13905 ErrorCode::InvalidRequest,
13906 ErrorCode::UnsupportedVersion,
13907 ErrorCode::Unauthenticated,
13908 ErrorCode::PermissionDenied,
13909 ErrorCode::NotFound,
13910 ErrorCode::LimitExceeded,
13911 ErrorCode::CapabilityUnavailable,
13912 ErrorCode::RetentionGap,
13913 ErrorCode::TemporarilyUnavailable,
13914 ErrorCode::Internal,
13915 ],
13916 limit_ids: &["request_bytes", "response_bytes"],
13917 effect_class: "read_only",
13918 risk_flags: &[],
13919 capability_family: "catalog",
13920 retry_safety: "safe",
13921 identity_requirement: "none",
13922 resolver: None,
13923 cancellation: "per_call",
13924 side_effects: &[],
13925 recovery: "retry",
13926 collection_index_ref: "none",
13927 },
13928 CommandSemanticContract {
13929 command: Command::ControlReplayableSource,
13930 admissible_errors: &[
13931 ErrorCode::Aborted,
13932 ErrorCode::DeadlineExceeded,
13933 ErrorCode::InvalidRequest,
13934 ErrorCode::UnsupportedVersion,
13935 ErrorCode::Unauthenticated,
13936 ErrorCode::PermissionDenied,
13937 ErrorCode::NotFound,
13938 ErrorCode::Conflict,
13939 ErrorCode::LimitExceeded,
13940 ErrorCode::CapabilityUnavailable,
13941 ErrorCode::NotSubmitted,
13942 ErrorCode::SubmittedIndeterminate,
13943 ErrorCode::ExpiredUnknown,
13944 ErrorCode::RetentionGap,
13945 ErrorCode::TemporarilyUnavailable,
13946 ErrorCode::Internal,
13947 ],
13948 limit_ids: &["request_bytes", "response_bytes"],
13949 effect_class: "durable_submit",
13950 risk_flags: &[],
13951 capability_family: "catalog",
13952 retry_safety: "pre_submit_only",
13953 identity_requirement: "none",
13954 resolver: None,
13955 cancellation: "per_call_until_submission_then_resolve",
13956 side_effects: &["commits_authoritative_state"],
13957 recovery: "retry_if_not_submitted",
13958 collection_index_ref: "request_index",
13959 },
13960 CommandSemanticContract {
13961 command: Command::CloneIndex,
13962 admissible_errors: &[
13963 ErrorCode::Aborted,
13964 ErrorCode::DeadlineExceeded,
13965 ErrorCode::InvalidRequest,
13966 ErrorCode::UnsupportedVersion,
13967 ErrorCode::Unauthenticated,
13968 ErrorCode::PermissionDenied,
13969 ErrorCode::NotFound,
13970 ErrorCode::Conflict,
13971 ErrorCode::LimitExceeded,
13972 ErrorCode::CapabilityUnavailable,
13973 ErrorCode::NotSubmitted,
13974 ErrorCode::SubmittedIndeterminate,
13975 ErrorCode::ExpiredUnknown,
13976 ErrorCode::TemporarilyUnavailable,
13977 ErrorCode::Internal,
13978 ],
13979 limit_ids: &["request_bytes", "response_bytes"],
13980 effect_class: "durable_submit",
13981 risk_flags: &[],
13982 capability_family: "catalog",
13983 retry_safety: "pre_submit_only",
13984 identity_requirement: "caller_action_id",
13985 resolver: Some(Command::CloneIndex),
13986 cancellation: "per_call_until_submission_then_resolve",
13987 side_effects: &["commits_authoritative_state"],
13988 recovery: "resolve_with_clone_index",
13989 collection_index_ref: "caller",
13990 },
13991 CommandSemanticContract {
13992 command: Command::ConfigureHistory,
13993 admissible_errors: &[
13994 ErrorCode::Aborted,
13995 ErrorCode::DeadlineExceeded,
13996 ErrorCode::InvalidRequest,
13997 ErrorCode::UnsupportedVersion,
13998 ErrorCode::Unauthenticated,
13999 ErrorCode::PermissionDenied,
14000 ErrorCode::NotFound,
14001 ErrorCode::Conflict,
14002 ErrorCode::LimitExceeded,
14003 ErrorCode::CapabilityUnavailable,
14004 ErrorCode::NotSubmitted,
14005 ErrorCode::SubmittedIndeterminate,
14006 ErrorCode::ExpiredUnknown,
14007 ErrorCode::TemporarilyUnavailable,
14008 ErrorCode::Internal,
14009 ],
14010 limit_ids: &["request_bytes", "response_bytes"],
14011 effect_class: "durable_submit",
14012 risk_flags: &[],
14013 capability_family: "catalog",
14014 retry_safety: "pre_submit_only",
14015 identity_requirement: "none",
14016 resolver: Some(Command::GetHistory),
14017 cancellation: "per_call_until_submission_then_resolve",
14018 side_effects: &["commits_authoritative_state"],
14019 recovery: "resolve_with_get_history",
14020 collection_index_ref: "request_index",
14021 },
14022 CommandSemanticContract {
14023 command: Command::GetHistory,
14024 admissible_errors: &[
14025 ErrorCode::Aborted,
14026 ErrorCode::DeadlineExceeded,
14027 ErrorCode::InvalidRequest,
14028 ErrorCode::UnsupportedVersion,
14029 ErrorCode::Unauthenticated,
14030 ErrorCode::PermissionDenied,
14031 ErrorCode::NotFound,
14032 ErrorCode::LimitExceeded,
14033 ErrorCode::CapabilityUnavailable,
14034 ErrorCode::TemporarilyUnavailable,
14035 ErrorCode::Internal,
14036 ],
14037 limit_ids: &["request_bytes", "response_bytes"],
14038 effect_class: "read_only",
14039 risk_flags: &[],
14040 capability_family: "catalog",
14041 retry_safety: "safe",
14042 identity_requirement: "none",
14043 resolver: None,
14044 cancellation: "per_call",
14045 side_effects: &[],
14046 recovery: "retry",
14047 collection_index_ref: "none",
14048 },
14049 CommandSemanticContract {
14050 command: Command::ResolveHistory,
14051 admissible_errors: &[
14052 ErrorCode::Aborted,
14053 ErrorCode::DeadlineExceeded,
14054 ErrorCode::InvalidRequest,
14055 ErrorCode::UnsupportedVersion,
14056 ErrorCode::Unauthenticated,
14057 ErrorCode::PermissionDenied,
14058 ErrorCode::NotFound,
14059 ErrorCode::LimitExceeded,
14060 ErrorCode::CapabilityUnavailable,
14061 ErrorCode::RetentionGap,
14062 ErrorCode::TemporarilyUnavailable,
14063 ErrorCode::Internal,
14064 ],
14065 limit_ids: &["request_bytes", "response_bytes"],
14066 effect_class: "read_only",
14067 risk_flags: &[],
14068 capability_family: "data",
14069 retry_safety: "safe",
14070 identity_requirement: "none",
14071 resolver: None,
14072 cancellation: "per_call",
14073 side_effects: &[],
14074 recovery: "retry",
14075 collection_index_ref: "request_index",
14076 },
14077 CommandSemanticContract {
14078 command: Command::PlaceHistoryHold,
14079 admissible_errors: &[
14080 ErrorCode::Aborted,
14081 ErrorCode::DeadlineExceeded,
14082 ErrorCode::InvalidRequest,
14083 ErrorCode::UnsupportedVersion,
14084 ErrorCode::Unauthenticated,
14085 ErrorCode::PermissionDenied,
14086 ErrorCode::NotFound,
14087 ErrorCode::Conflict,
14088 ErrorCode::LimitExceeded,
14089 ErrorCode::CapabilityUnavailable,
14090 ErrorCode::NotSubmitted,
14091 ErrorCode::SubmittedIndeterminate,
14092 ErrorCode::ExpiredUnknown,
14093 ErrorCode::TemporarilyUnavailable,
14094 ErrorCode::Internal,
14095 ],
14096 limit_ids: &["request_bytes", "response_bytes"],
14097 effect_class: "durable_submit",
14098 risk_flags: &[],
14099 capability_family: "catalog",
14100 retry_safety: "pre_submit_only",
14101 identity_requirement: "none",
14102 resolver: Some(Command::GetHistory),
14103 cancellation: "per_call_until_submission_then_resolve",
14104 side_effects: &["commits_authoritative_state"],
14105 recovery: "resolve_with_get_history",
14106 collection_index_ref: "request_index",
14107 },
14108 CommandSemanticContract {
14109 command: Command::ReleaseHistoryHold,
14110 admissible_errors: &[
14111 ErrorCode::Aborted,
14112 ErrorCode::DeadlineExceeded,
14113 ErrorCode::InvalidRequest,
14114 ErrorCode::UnsupportedVersion,
14115 ErrorCode::Unauthenticated,
14116 ErrorCode::PermissionDenied,
14117 ErrorCode::NotFound,
14118 ErrorCode::Conflict,
14119 ErrorCode::LimitExceeded,
14120 ErrorCode::CapabilityUnavailable,
14121 ErrorCode::NotSubmitted,
14122 ErrorCode::SubmittedIndeterminate,
14123 ErrorCode::ExpiredUnknown,
14124 ErrorCode::TemporarilyUnavailable,
14125 ErrorCode::Internal,
14126 ],
14127 limit_ids: &["request_bytes", "response_bytes"],
14128 effect_class: "durable_submit",
14129 risk_flags: &[],
14130 capability_family: "catalog",
14131 retry_safety: "pre_submit_only",
14132 identity_requirement: "none",
14133 resolver: Some(Command::GetHistory),
14134 cancellation: "per_call_until_submission_then_resolve",
14135 side_effects: &["commits_authoritative_state"],
14136 recovery: "resolve_with_get_history",
14137 collection_index_ref: "request_index",
14138 },
14139 CommandSemanticContract {
14140 command: Command::PrepareDocumentMutation,
14141 admissible_errors: &[
14142 ErrorCode::Aborted,
14143 ErrorCode::DeadlineExceeded,
14144 ErrorCode::InvalidRequest,
14145 ErrorCode::UnsupportedVersion,
14146 ErrorCode::Unauthenticated,
14147 ErrorCode::PermissionDenied,
14148 ErrorCode::NotFound,
14149 ErrorCode::LimitExceeded,
14150 ErrorCode::CapabilityUnavailable,
14151 ErrorCode::TemporarilyUnavailable,
14152 ErrorCode::Internal,
14153 ],
14154 limit_ids: &["request_bytes", "response_bytes"],
14155 effect_class: "prepare",
14156 risk_flags: &[],
14157 capability_family: "data",
14158 retry_safety: "safe",
14159 identity_requirement: "server_locator",
14160 resolver: None,
14161 cancellation: "per_call",
14162 side_effects: &["creates_bounded_preparation"],
14163 recovery: "retry",
14164 collection_index_ref: "request_index",
14165 },
14166 CommandSemanticContract {
14167 command: Command::SubmitDocumentMutation,
14168 admissible_errors: &[
14169 ErrorCode::Aborted,
14170 ErrorCode::DeadlineExceeded,
14171 ErrorCode::InvalidRequest,
14172 ErrorCode::UnsupportedVersion,
14173 ErrorCode::Unauthenticated,
14174 ErrorCode::PermissionDenied,
14175 ErrorCode::NotFound,
14176 ErrorCode::Conflict,
14177 ErrorCode::LimitExceeded,
14178 ErrorCode::CapabilityUnavailable,
14179 ErrorCode::NotSubmitted,
14180 ErrorCode::SubmittedIndeterminate,
14181 ErrorCode::ExpiredUnknown,
14182 ErrorCode::TemporarilyUnavailable,
14183 ErrorCode::Internal,
14184 ],
14185 limit_ids: &["request_bytes", "response_bytes"],
14186 effect_class: "durable_submit",
14187 risk_flags: &[],
14188 capability_family: "data",
14189 retry_safety: "pre_submit_only",
14190 identity_requirement: "request_locator",
14191 resolver: Some(Command::ResolveDocumentMutation),
14192 cancellation: "per_call_until_submission_then_resolve",
14193 side_effects: &["commits_authoritative_state"],
14194 recovery: "resolve_with_resolve_document_mutation",
14195 collection_index_ref: "request_index",
14196 },
14197 CommandSemanticContract {
14198 command: Command::PrepareDocumentBulk,
14199 admissible_errors: &[
14200 ErrorCode::Aborted,
14201 ErrorCode::DeadlineExceeded,
14202 ErrorCode::InvalidRequest,
14203 ErrorCode::UnsupportedVersion,
14204 ErrorCode::Unauthenticated,
14205 ErrorCode::PermissionDenied,
14206 ErrorCode::NotFound,
14207 ErrorCode::LimitExceeded,
14208 ErrorCode::CapabilityUnavailable,
14209 ErrorCode::TemporarilyUnavailable,
14210 ErrorCode::Internal,
14211 ],
14212 limit_ids: &[
14213 "request_bytes",
14214 "response_bytes",
14215 "bulk_document_items",
14216 "bulk_document_bytes",
14217 ],
14218 effect_class: "prepare",
14219 risk_flags: &[],
14220 capability_family: "data",
14221 retry_safety: "safe",
14222 identity_requirement: "caller_action_id",
14223 resolver: None,
14224 cancellation: "per_call",
14225 side_effects: &["creates_bounded_preparation"],
14226 recovery: "retry",
14227 collection_index_ref: "request_index",
14228 },
14229 CommandSemanticContract {
14230 command: Command::SubmitDocumentBulk,
14231 admissible_errors: &[
14232 ErrorCode::Aborted,
14233 ErrorCode::DeadlineExceeded,
14234 ErrorCode::InvalidRequest,
14235 ErrorCode::UnsupportedVersion,
14236 ErrorCode::Unauthenticated,
14237 ErrorCode::PermissionDenied,
14238 ErrorCode::NotFound,
14239 ErrorCode::Conflict,
14240 ErrorCode::LimitExceeded,
14241 ErrorCode::CapabilityUnavailable,
14242 ErrorCode::NotSubmitted,
14243 ErrorCode::SubmittedIndeterminate,
14244 ErrorCode::ExpiredUnknown,
14245 ErrorCode::TemporarilyUnavailable,
14246 ErrorCode::Internal,
14247 ],
14248 limit_ids: &[
14249 "request_bytes",
14250 "response_bytes",
14251 "bulk_document_items",
14252 "bulk_document_bytes",
14253 ],
14254 effect_class: "durable_submit",
14255 risk_flags: &[],
14256 capability_family: "data",
14257 retry_safety: "pre_submit_only",
14258 identity_requirement: "caller_action_id",
14259 resolver: Some(Command::ResolveDocumentBulk),
14260 cancellation: "per_call_until_submission_then_resolve",
14261 side_effects: &["commits_authoritative_state"],
14262 recovery: "resolve_with_resolve_document_bulk",
14263 collection_index_ref: "request_index",
14264 },
14265 CommandSemanticContract {
14266 command: Command::ResolveDocumentBulk,
14267 admissible_errors: &[
14268 ErrorCode::Aborted,
14269 ErrorCode::DeadlineExceeded,
14270 ErrorCode::InvalidRequest,
14271 ErrorCode::UnsupportedVersion,
14272 ErrorCode::Unauthenticated,
14273 ErrorCode::PermissionDenied,
14274 ErrorCode::NotFound,
14275 ErrorCode::LimitExceeded,
14276 ErrorCode::CapabilityUnavailable,
14277 ErrorCode::TemporarilyUnavailable,
14278 ErrorCode::Internal,
14279 ],
14280 limit_ids: &[
14281 "request_bytes",
14282 "response_bytes",
14283 "bulk_document_items",
14284 "bulk_document_bytes",
14285 ],
14286 effect_class: "read_only",
14287 risk_flags: &[],
14288 capability_family: "data",
14289 retry_safety: "safe",
14290 identity_requirement: "caller_action_id",
14291 resolver: None,
14292 cancellation: "per_call",
14293 side_effects: &[],
14294 recovery: "retry",
14295 collection_index_ref: "request_index",
14296 },
14297 CommandSemanticContract {
14298 command: Command::PrepareAppendBulk,
14299 admissible_errors: &[
14300 ErrorCode::Aborted,
14301 ErrorCode::DeadlineExceeded,
14302 ErrorCode::InvalidRequest,
14303 ErrorCode::UnsupportedVersion,
14304 ErrorCode::Unauthenticated,
14305 ErrorCode::PermissionDenied,
14306 ErrorCode::NotFound,
14307 ErrorCode::LimitExceeded,
14308 ErrorCode::CapabilityUnavailable,
14309 ErrorCode::TemporarilyUnavailable,
14310 ErrorCode::Internal,
14311 ],
14312 limit_ids: &[
14313 "request_bytes",
14314 "response_bytes",
14315 "bulk_document_items",
14316 "bulk_document_bytes",
14317 ],
14318 effect_class: "prepare",
14319 risk_flags: &[],
14320 capability_family: "data",
14321 retry_safety: "safe",
14322 identity_requirement: "caller_action_id",
14323 resolver: None,
14324 cancellation: "per_call",
14325 side_effects: &[],
14326 recovery: "retry",
14327 collection_index_ref: "request_index",
14328 },
14329 CommandSemanticContract {
14330 command: Command::SubmitAppendBulk,
14331 admissible_errors: &[
14332 ErrorCode::Aborted,
14333 ErrorCode::DeadlineExceeded,
14334 ErrorCode::InvalidRequest,
14335 ErrorCode::UnsupportedVersion,
14336 ErrorCode::Unauthenticated,
14337 ErrorCode::PermissionDenied,
14338 ErrorCode::NotFound,
14339 ErrorCode::Conflict,
14340 ErrorCode::LimitExceeded,
14341 ErrorCode::CapabilityUnavailable,
14342 ErrorCode::NotSubmitted,
14343 ErrorCode::SubmittedIndeterminate,
14344 ErrorCode::TemporarilyUnavailable,
14345 ErrorCode::Internal,
14346 ],
14347 limit_ids: &[
14348 "request_bytes",
14349 "response_bytes",
14350 "bulk_document_items",
14351 "bulk_document_bytes",
14352 ],
14353 effect_class: "durable_submit",
14354 risk_flags: &[],
14355 capability_family: "data",
14356 retry_safety: "pre_submit_only",
14357 identity_requirement: "request_locator",
14358 resolver: Some(Command::ResolveAppendBulk),
14359 cancellation: "per_call_until_submission_then_resolve",
14360 side_effects: &["commits_authoritative_state"],
14361 recovery: "resolve_with_resolve_append_bulk",
14362 collection_index_ref: "request_index",
14363 },
14364 CommandSemanticContract {
14365 command: Command::ResolveAppendBulk,
14366 admissible_errors: &[
14367 ErrorCode::Aborted,
14368 ErrorCode::DeadlineExceeded,
14369 ErrorCode::InvalidRequest,
14370 ErrorCode::UnsupportedVersion,
14371 ErrorCode::Unauthenticated,
14372 ErrorCode::PermissionDenied,
14373 ErrorCode::NotFound,
14374 ErrorCode::Conflict,
14375 ErrorCode::LimitExceeded,
14376 ErrorCode::CapabilityUnavailable,
14377 ErrorCode::TemporarilyUnavailable,
14378 ErrorCode::Internal,
14379 ],
14380 limit_ids: &[
14381 "request_bytes",
14382 "response_bytes",
14383 "bulk_document_items",
14384 "bulk_document_bytes",
14385 ],
14386 effect_class: "read_only",
14387 risk_flags: &[],
14388 capability_family: "data",
14389 retry_safety: "safe",
14390 identity_requirement: "request_locator",
14391 resolver: None,
14392 cancellation: "per_call",
14393 side_effects: &[],
14394 recovery: "retry",
14395 collection_index_ref: "request_index",
14396 },
14397 CommandSemanticContract {
14398 command: Command::ObserveAppendCommitted,
14399 admissible_errors: &[
14400 ErrorCode::Aborted,
14401 ErrorCode::DeadlineExceeded,
14402 ErrorCode::InvalidRequest,
14403 ErrorCode::UnsupportedVersion,
14404 ErrorCode::Unauthenticated,
14405 ErrorCode::PermissionDenied,
14406 ErrorCode::NotFound,
14407 ErrorCode::Conflict,
14408 ErrorCode::LimitExceeded,
14409 ErrorCode::CapabilityUnavailable,
14410 ErrorCode::TemporarilyUnavailable,
14411 ErrorCode::Internal,
14412 ],
14413 limit_ids: &["request_bytes", "response_bytes"],
14414 effect_class: "read_only",
14415 risk_flags: &[],
14416 capability_family: "data",
14417 retry_safety: "safe",
14418 identity_requirement: "request_locator",
14419 resolver: None,
14420 cancellation: "per_call",
14421 side_effects: &[],
14422 recovery: "retry",
14423 collection_index_ref: "request_index",
14424 },
14425 CommandSemanticContract {
14426 command: Command::ResolveDocumentMutation,
14427 admissible_errors: &[
14428 ErrorCode::Aborted,
14429 ErrorCode::DeadlineExceeded,
14430 ErrorCode::InvalidRequest,
14431 ErrorCode::UnsupportedVersion,
14432 ErrorCode::Unauthenticated,
14433 ErrorCode::PermissionDenied,
14434 ErrorCode::NotFound,
14435 ErrorCode::LimitExceeded,
14436 ErrorCode::CapabilityUnavailable,
14437 ErrorCode::TemporarilyUnavailable,
14438 ErrorCode::Internal,
14439 ],
14440 limit_ids: &["request_bytes", "response_bytes"],
14441 effect_class: "read_only",
14442 risk_flags: &[],
14443 capability_family: "data",
14444 retry_safety: "safe",
14445 identity_requirement: "request_locator",
14446 resolver: None,
14447 cancellation: "per_call",
14448 side_effects: &[],
14449 recovery: "retry",
14450 collection_index_ref: "caller",
14451 },
14452 CommandSemanticContract {
14453 command: Command::GetDocument,
14454 admissible_errors: &[
14455 ErrorCode::Aborted,
14456 ErrorCode::DeadlineExceeded,
14457 ErrorCode::InvalidRequest,
14458 ErrorCode::UnsupportedVersion,
14459 ErrorCode::Unauthenticated,
14460 ErrorCode::PermissionDenied,
14461 ErrorCode::NotFound,
14462 ErrorCode::LimitExceeded,
14463 ErrorCode::CapabilityUnavailable,
14464 ErrorCode::TemporarilyUnavailable,
14465 ErrorCode::Internal,
14466 ],
14467 limit_ids: &["request_bytes", "response_bytes"],
14468 effect_class: "read_only",
14469 risk_flags: &[],
14470 capability_family: "data",
14471 retry_safety: "safe",
14472 identity_requirement: "none",
14473 resolver: None,
14474 cancellation: "per_call",
14475 side_effects: &[],
14476 recovery: "retry",
14477 collection_index_ref: "request_index",
14478 },
14479 CommandSemanticContract {
14480 command: Command::Search,
14481 admissible_errors: &[
14482 ErrorCode::Aborted,
14483 ErrorCode::DeadlineExceeded,
14484 ErrorCode::InvalidRequest,
14485 ErrorCode::UnsupportedVersion,
14486 ErrorCode::Unauthenticated,
14487 ErrorCode::PermissionDenied,
14488 ErrorCode::NotFound,
14489 ErrorCode::StaleCursor,
14490 ErrorCode::RestartBudgetExhausted,
14491 ErrorCode::LimitExceeded,
14492 ErrorCode::CapabilityUnavailable,
14493 ErrorCode::TemporarilyUnavailable,
14494 ErrorCode::Internal,
14495 ],
14496 limit_ids: &[
14497 "request_bytes",
14498 "response_bytes",
14499 "page_size",
14500 "query_clauses",
14501 "aggregation_nodes",
14502 "aggregation_buckets",
14503 "routing_values",
14504 "routing_value_bytes",
14505 "query_recursion_depth",
14506 "text_query_bytes",
14507 "text_query_fields",
14508 "text_query_slop",
14509 "text_query_boost",
14510 "text_query_fuzzy_expansions",
14511 "text_query_fuzzy_distance",
14512 "text_query_dictionary_scan_terms",
14513 "text_query_dictionary_scan_bytes",
14514 "text_query_fuzzy_work_units",
14515 "vector_dimensions",
14516 "vector_query_bytes",
14517 "vector_request_bytes",
14518 "vector_candidates",
14519 "vector_set_query_vectors",
14520 "vector_set_query_bytes",
14521 "retrieval_branches",
14522 "retrieval_branch_name_bytes",
14523 "retrieval_window",
14524 "fragment_fields",
14525 "fragments_per_field",
14526 "fragment_bytes",
14527 "fragment_total_bytes",
14528 "result_feature_hits",
14529 "result_features",
14530 "diversification_fields",
14531 "diversification_per_group",
14532 "source_projection_patterns",
14533 "source_projection_pattern_bytes",
14534 "search_result_window",
14535 ],
14536 effect_class: "read_only",
14537 risk_flags: &[],
14538 capability_family: "data",
14539 retry_safety: "safe",
14540 identity_requirement: "none",
14541 resolver: None,
14542 cancellation: "per_call",
14543 side_effects: &[],
14544 recovery: "retry",
14545 collection_index_ref: "request_indexes_or_pit_authority",
14546 },
14547 CommandSemanticContract {
14548 command: Command::TraverseRelationships,
14549 admissible_errors: &[
14550 ErrorCode::Aborted,
14551 ErrorCode::DeadlineExceeded,
14552 ErrorCode::InvalidRequest,
14553 ErrorCode::UnsupportedVersion,
14554 ErrorCode::Unauthenticated,
14555 ErrorCode::PermissionDenied,
14556 ErrorCode::NotFound,
14557 ErrorCode::LimitExceeded,
14558 ErrorCode::CapabilityUnavailable,
14559 ErrorCode::TemporarilyUnavailable,
14560 ErrorCode::Internal,
14561 ],
14562 limit_ids: &[
14563 "request_bytes",
14564 "response_bytes",
14565 "relationship_indexes",
14566 "relationship_seeds",
14567 "relationship_filter_values",
14568 "relationship_depth",
14569 "relationship_fan_out",
14570 "relationship_visited_entities",
14571 "relationship_visited_records",
14572 "relationship_returned_records",
14573 "relationship_memory_bytes",
14574 "search_result_window",
14575 ],
14576 effect_class: "read_only",
14577 risk_flags: &[],
14578 capability_family: "data",
14579 retry_safety: "safe",
14580 identity_requirement: "none",
14581 resolver: None,
14582 cancellation: "per_call",
14583 side_effects: &[],
14584 recovery: "retry",
14585 collection_index_ref: "pit_authority",
14586 },
14587 CommandSemanticContract {
14588 command: Command::QueryProfiles,
14589 admissible_errors: &[
14590 ErrorCode::Aborted,
14591 ErrorCode::DeadlineExceeded,
14592 ErrorCode::InvalidRequest,
14593 ErrorCode::UnsupportedVersion,
14594 ErrorCode::Unauthenticated,
14595 ErrorCode::PermissionDenied,
14596 ErrorCode::NotFound,
14597 ErrorCode::LimitExceeded,
14598 ErrorCode::CapabilityUnavailable,
14599 ErrorCode::TemporarilyUnavailable,
14600 ErrorCode::Internal,
14601 ],
14602 limit_ids: &[
14603 "request_bytes",
14604 "response_bytes",
14605 "profile_indexes",
14606 "profile_filter_values",
14607 "profile_batches",
14608 "profile_samples",
14609 "profile_results",
14610 "profile_memory_bytes",
14611 "search_result_window",
14612 ],
14613 effect_class: "read_only",
14614 risk_flags: &[],
14615 capability_family: "data",
14616 retry_safety: "safe",
14617 identity_requirement: "none",
14618 resolver: None,
14619 cancellation: "per_call",
14620 side_effects: &[],
14621 recovery: "retry",
14622 collection_index_ref: "pit_authority",
14623 },
14624 CommandSemanticContract {
14625 command: Command::EvaluateTemporalEvidence,
14626 admissible_errors: &[
14627 ErrorCode::Aborted,
14628 ErrorCode::DeadlineExceeded,
14629 ErrorCode::InvalidRequest,
14630 ErrorCode::UnsupportedVersion,
14631 ErrorCode::Unauthenticated,
14632 ErrorCode::PermissionDenied,
14633 ErrorCode::NotFound,
14634 ErrorCode::LimitExceeded,
14635 ErrorCode::CapabilityUnavailable,
14636 ErrorCode::TemporarilyUnavailable,
14637 ErrorCode::Internal,
14638 ],
14639 limit_ids: &[
14640 "request_bytes",
14641 "response_bytes",
14642 "query_clauses",
14643 "query_recursion_depth",
14644 "search_result_window",
14645 "temporal_inputs",
14646 "temporal_pattern_nodes",
14647 "temporal_pattern_depth",
14648 "temporal_pattern_branches",
14649 "temporal_correlation_keys",
14650 "temporal_events",
14651 "temporal_states",
14652 "temporal_captured_events",
14653 "temporal_results",
14654 "temporal_state_bytes",
14655 "temporal_interval_nanos",
14656 ],
14657 effect_class: "read_only",
14658 risk_flags: &[],
14659 capability_family: "data",
14660 retry_safety: "safe",
14661 identity_requirement: "none",
14662 resolver: None,
14663 cancellation: "per_call",
14664 side_effects: &[],
14665 recovery: "retry",
14666 collection_index_ref: "pit_authority",
14667 },
14668 CommandSemanticContract {
14669 command: Command::CreateContinuousTemporalEvaluation,
14670 admissible_errors: &[
14671 ErrorCode::Aborted,
14672 ErrorCode::DeadlineExceeded,
14673 ErrorCode::InvalidRequest,
14674 ErrorCode::UnsupportedVersion,
14675 ErrorCode::Unauthenticated,
14676 ErrorCode::PermissionDenied,
14677 ErrorCode::NotFound,
14678 ErrorCode::Conflict,
14679 ErrorCode::LimitExceeded,
14680 ErrorCode::CapabilityUnavailable,
14681 ErrorCode::NotSubmitted,
14682 ErrorCode::SubmittedIndeterminate,
14683 ErrorCode::TemporarilyUnavailable,
14684 ErrorCode::Internal,
14685 ],
14686 limit_ids: &[
14687 "request_bytes",
14688 "response_bytes",
14689 "temporal_inputs",
14690 "temporal_pattern_nodes",
14691 "temporal_pattern_depth",
14692 "temporal_pattern_branches",
14693 "temporal_correlation_keys",
14694 "temporal_events",
14695 "temporal_states",
14696 "temporal_captured_events",
14697 "temporal_results",
14698 "temporal_state_bytes",
14699 "temporal_interval_nanos",
14700 ],
14701 effect_class: "durable_submit",
14702 risk_flags: &[],
14703 capability_family: "lifecycle",
14704 retry_safety: "pre_submit_only",
14705 identity_requirement: "caller_action_id",
14706 resolver: Some(Command::GetContinuousTemporalEvaluation),
14707 cancellation: "per_call_until_submission_then_resolve",
14708 side_effects: &["commits_authoritative_state"],
14709 recovery: "resolve_with_get_continuous_temporal_evaluation",
14710 collection_index_ref: "request_temporal_inputs",
14711 },
14712 CommandSemanticContract {
14713 command: Command::GetContinuousTemporalEvaluation,
14714 admissible_errors: &[
14715 ErrorCode::Aborted,
14716 ErrorCode::DeadlineExceeded,
14717 ErrorCode::InvalidRequest,
14718 ErrorCode::UnsupportedVersion,
14719 ErrorCode::Unauthenticated,
14720 ErrorCode::PermissionDenied,
14721 ErrorCode::NotFound,
14722 ErrorCode::LimitExceeded,
14723 ErrorCode::CapabilityUnavailable,
14724 ErrorCode::TemporarilyUnavailable,
14725 ErrorCode::Internal,
14726 ],
14727 limit_ids: &["request_bytes", "response_bytes"],
14728 effect_class: "read_only",
14729 risk_flags: &[],
14730 capability_family: "lifecycle",
14731 retry_safety: "safe",
14732 identity_requirement: "none",
14733 resolver: None,
14734 cancellation: "per_call",
14735 side_effects: &[],
14736 recovery: "retry",
14737 collection_index_ref: "request_evaluation",
14738 },
14739 CommandSemanticContract {
14740 command: Command::PauseContinuousTemporalEvaluation,
14741 admissible_errors: &[
14742 ErrorCode::Aborted,
14743 ErrorCode::DeadlineExceeded,
14744 ErrorCode::InvalidRequest,
14745 ErrorCode::UnsupportedVersion,
14746 ErrorCode::Unauthenticated,
14747 ErrorCode::PermissionDenied,
14748 ErrorCode::NotFound,
14749 ErrorCode::Conflict,
14750 ErrorCode::LimitExceeded,
14751 ErrorCode::CapabilityUnavailable,
14752 ErrorCode::NotSubmitted,
14753 ErrorCode::SubmittedIndeterminate,
14754 ErrorCode::TemporarilyUnavailable,
14755 ErrorCode::Internal,
14756 ],
14757 limit_ids: &["request_bytes", "response_bytes"],
14758 effect_class: "durable_submit",
14759 risk_flags: &[],
14760 capability_family: "lifecycle",
14761 retry_safety: "pre_submit_only",
14762 identity_requirement: "caller_action_id",
14763 resolver: Some(Command::GetContinuousTemporalEvaluation),
14764 cancellation: "per_call_until_submission_then_resolve",
14765 side_effects: &["commits_authoritative_state"],
14766 recovery: "resolve_with_get_continuous_temporal_evaluation",
14767 collection_index_ref: "request_evaluation",
14768 },
14769 CommandSemanticContract {
14770 command: Command::ResumeContinuousTemporalEvaluation,
14771 admissible_errors: &[
14772 ErrorCode::Aborted,
14773 ErrorCode::DeadlineExceeded,
14774 ErrorCode::InvalidRequest,
14775 ErrorCode::UnsupportedVersion,
14776 ErrorCode::Unauthenticated,
14777 ErrorCode::PermissionDenied,
14778 ErrorCode::NotFound,
14779 ErrorCode::Conflict,
14780 ErrorCode::LimitExceeded,
14781 ErrorCode::CapabilityUnavailable,
14782 ErrorCode::NotSubmitted,
14783 ErrorCode::SubmittedIndeterminate,
14784 ErrorCode::TemporarilyUnavailable,
14785 ErrorCode::Internal,
14786 ],
14787 limit_ids: &["request_bytes", "response_bytes"],
14788 effect_class: "durable_submit",
14789 risk_flags: &[],
14790 capability_family: "lifecycle",
14791 retry_safety: "pre_submit_only",
14792 identity_requirement: "caller_action_id",
14793 resolver: Some(Command::GetContinuousTemporalEvaluation),
14794 cancellation: "per_call_until_submission_then_resolve",
14795 side_effects: &["commits_authoritative_state"],
14796 recovery: "resolve_with_get_continuous_temporal_evaluation",
14797 collection_index_ref: "request_evaluation",
14798 },
14799 CommandSemanticContract {
14800 command: Command::ReplaceContinuousTemporalEvaluation,
14801 admissible_errors: &[
14802 ErrorCode::Aborted,
14803 ErrorCode::DeadlineExceeded,
14804 ErrorCode::InvalidRequest,
14805 ErrorCode::UnsupportedVersion,
14806 ErrorCode::Unauthenticated,
14807 ErrorCode::PermissionDenied,
14808 ErrorCode::NotFound,
14809 ErrorCode::Conflict,
14810 ErrorCode::LimitExceeded,
14811 ErrorCode::CapabilityUnavailable,
14812 ErrorCode::NotSubmitted,
14813 ErrorCode::SubmittedIndeterminate,
14814 ErrorCode::TemporarilyUnavailable,
14815 ErrorCode::Internal,
14816 ],
14817 limit_ids: &[
14818 "request_bytes",
14819 "response_bytes",
14820 "temporal_inputs",
14821 "temporal_pattern_nodes",
14822 "temporal_pattern_depth",
14823 "temporal_pattern_branches",
14824 "temporal_correlation_keys",
14825 "temporal_events",
14826 "temporal_states",
14827 "temporal_captured_events",
14828 "temporal_results",
14829 "temporal_state_bytes",
14830 "temporal_interval_nanos",
14831 ],
14832 effect_class: "durable_submit",
14833 risk_flags: &[],
14834 capability_family: "lifecycle",
14835 retry_safety: "pre_submit_only",
14836 identity_requirement: "caller_action_id",
14837 resolver: Some(Command::GetContinuousTemporalEvaluation),
14838 cancellation: "per_call_until_submission_then_resolve",
14839 side_effects: &["commits_authoritative_state"],
14840 recovery: "resolve_with_get_continuous_temporal_evaluation",
14841 collection_index_ref: "request_temporal_inputs",
14842 },
14843 CommandSemanticContract {
14844 command: Command::RetireContinuousTemporalEvaluation,
14845 admissible_errors: &[
14846 ErrorCode::Aborted,
14847 ErrorCode::DeadlineExceeded,
14848 ErrorCode::InvalidRequest,
14849 ErrorCode::UnsupportedVersion,
14850 ErrorCode::Unauthenticated,
14851 ErrorCode::PermissionDenied,
14852 ErrorCode::NotFound,
14853 ErrorCode::Conflict,
14854 ErrorCode::LimitExceeded,
14855 ErrorCode::CapabilityUnavailable,
14856 ErrorCode::NotSubmitted,
14857 ErrorCode::SubmittedIndeterminate,
14858 ErrorCode::TemporarilyUnavailable,
14859 ErrorCode::Internal,
14860 ],
14861 limit_ids: &["request_bytes", "response_bytes"],
14862 effect_class: "durable_submit",
14863 risk_flags: &["destructive"],
14864 capability_family: "lifecycle",
14865 retry_safety: "pre_submit_only",
14866 identity_requirement: "caller_action_id",
14867 resolver: Some(Command::GetContinuousTemporalEvaluation),
14868 cancellation: "per_call_until_submission_then_resolve",
14869 side_effects: &["commits_authoritative_state"],
14870 recovery: "resolve_with_get_continuous_temporal_evaluation",
14871 collection_index_ref: "request_evaluation",
14872 },
14873 CommandSemanticContract {
14874 command: Command::ReadContinuousTemporalEvidence,
14875 admissible_errors: &[
14876 ErrorCode::Aborted,
14877 ErrorCode::DeadlineExceeded,
14878 ErrorCode::InvalidRequest,
14879 ErrorCode::UnsupportedVersion,
14880 ErrorCode::Unauthenticated,
14881 ErrorCode::PermissionDenied,
14882 ErrorCode::NotFound,
14883 ErrorCode::Conflict,
14884 ErrorCode::RetentionGap,
14885 ErrorCode::LimitExceeded,
14886 ErrorCode::CapabilityUnavailable,
14887 ErrorCode::TemporarilyUnavailable,
14888 ErrorCode::Internal,
14889 ],
14890 limit_ids: &["request_bytes", "response_bytes", "page_size", "temporal_results"],
14891 effect_class: "read_only",
14892 risk_flags: &[],
14893 capability_family: "data",
14894 retry_safety: "safe",
14895 identity_requirement: "none",
14896 resolver: None,
14897 cancellation: "per_call",
14898 side_effects: &[],
14899 recovery: "retry",
14900 collection_index_ref: "request_evaluation",
14901 },
14902 CommandSemanticContract {
14903 command: Command::ValidateSearch,
14904 admissible_errors: &[
14905 ErrorCode::Aborted,
14906 ErrorCode::DeadlineExceeded,
14907 ErrorCode::InvalidRequest,
14908 ErrorCode::UnsupportedVersion,
14909 ErrorCode::Unauthenticated,
14910 ErrorCode::PermissionDenied,
14911 ErrorCode::NotFound,
14912 ErrorCode::LimitExceeded,
14913 ErrorCode::CapabilityUnavailable,
14914 ErrorCode::TemporarilyUnavailable,
14915 ErrorCode::Internal,
14916 ],
14917 limit_ids: &[
14918 "request_bytes",
14919 "response_bytes",
14920 "page_size",
14921 "query_clauses",
14922 "aggregation_nodes",
14923 "aggregation_buckets",
14924 "routing_values",
14925 "routing_value_bytes",
14926 "query_recursion_depth",
14927 "source_projection_patterns",
14928 "source_projection_pattern_bytes",
14929 "search_result_window",
14930 ],
14931 effect_class: "read_only",
14932 risk_flags: &[],
14933 capability_family: "data",
14934 retry_safety: "safe",
14935 identity_requirement: "none",
14936 resolver: None,
14937 cancellation: "per_call",
14938 side_effects: &[],
14939 recovery: "retry",
14940 collection_index_ref: "request_indexes_uniform",
14941 },
14942 CommandSemanticContract {
14943 command: Command::MaterializeTableSnapshot,
14944 admissible_errors: &[
14945 ErrorCode::Aborted,
14946 ErrorCode::DeadlineExceeded,
14947 ErrorCode::InvalidRequest,
14948 ErrorCode::UnsupportedVersion,
14949 ErrorCode::Unauthenticated,
14950 ErrorCode::PermissionDenied,
14951 ErrorCode::NotFound,
14952 ErrorCode::Conflict,
14953 ErrorCode::LimitExceeded,
14954 ErrorCode::CapabilityUnavailable,
14955 ErrorCode::NotSubmitted,
14956 ErrorCode::SubmittedIndeterminate,
14957 ErrorCode::ExpiredUnknown,
14958 ErrorCode::ChecksumMismatch,
14959 ErrorCode::TemporarilyUnavailable,
14960 ErrorCode::Internal,
14961 ],
14962 limit_ids: &[
14963 "request_bytes",
14964 "response_bytes",
14965 "table_snapshot_objects",
14966 "table_snapshot_ttl_millis",
14967 "table_snapshot_read_bytes",
14968 ],
14969 effect_class: "durable_submit",
14970 risk_flags: &[],
14971 capability_family: "data",
14972 retry_safety: "pre_submit_only",
14973 identity_requirement: "caller_action_id",
14974 resolver: Some(Command::ResolveTableSnapshot),
14975 cancellation: "per_call_until_submission_then_resolve",
14976 side_effects: &["creates_bounded_preparation", "commits_authoritative_state"],
14977 recovery: "resolve_with_resolve_table_snapshot",
14978 collection_index_ref: "request_index",
14979 },
14980 CommandSemanticContract {
14981 command: Command::ResolveTableSnapshot,
14982 admissible_errors: &[
14983 ErrorCode::Aborted,
14984 ErrorCode::DeadlineExceeded,
14985 ErrorCode::InvalidRequest,
14986 ErrorCode::UnsupportedVersion,
14987 ErrorCode::Unauthenticated,
14988 ErrorCode::PermissionDenied,
14989 ErrorCode::NotFound,
14990 ErrorCode::Conflict,
14991 ErrorCode::LimitExceeded,
14992 ErrorCode::CapabilityUnavailable,
14993 ErrorCode::ExpiredUnknown,
14994 ErrorCode::ChecksumMismatch,
14995 ErrorCode::TemporarilyUnavailable,
14996 ErrorCode::Internal,
14997 ],
14998 limit_ids: &[
14999 "request_bytes",
15000 "response_bytes",
15001 "table_snapshot_objects",
15002 "table_snapshot_ttl_millis",
15003 "table_snapshot_read_bytes",
15004 ],
15005 effect_class: "read_only",
15006 risk_flags: &[],
15007 capability_family: "data",
15008 retry_safety: "safe",
15009 identity_requirement: "caller_action_id",
15010 resolver: None,
15011 cancellation: "per_call",
15012 side_effects: &[],
15013 recovery: "retry",
15014 collection_index_ref: "request_index",
15015 },
15016 CommandSemanticContract {
15017 command: Command::ReadTableSnapshot,
15018 admissible_errors: &[
15019 ErrorCode::Aborted,
15020 ErrorCode::DeadlineExceeded,
15021 ErrorCode::InvalidRequest,
15022 ErrorCode::UnsupportedVersion,
15023 ErrorCode::Unauthenticated,
15024 ErrorCode::PermissionDenied,
15025 ErrorCode::NotFound,
15026 ErrorCode::Conflict,
15027 ErrorCode::LimitExceeded,
15028 ErrorCode::CapabilityUnavailable,
15029 ErrorCode::ArtifactRangeInvalid,
15030 ErrorCode::ChecksumMismatch,
15031 ErrorCode::TemporarilyUnavailable,
15032 ErrorCode::Internal,
15033 ],
15034 limit_ids: &["request_bytes", "response_bytes", "table_snapshot_read_bytes"],
15035 effect_class: "read_only",
15036 risk_flags: &[],
15037 capability_family: "data",
15038 retry_safety: "safe",
15039 identity_requirement: "request_locator",
15040 resolver: None,
15041 cancellation: "per_call",
15042 side_effects: &[],
15043 recovery: "retry",
15044 collection_index_ref: "request_index",
15045 },
15046 CommandSemanticContract {
15047 command: Command::OpenPit,
15048 admissible_errors: &[
15049 ErrorCode::Aborted,
15050 ErrorCode::DeadlineExceeded,
15051 ErrorCode::InvalidRequest,
15052 ErrorCode::UnsupportedVersion,
15053 ErrorCode::Unauthenticated,
15054 ErrorCode::PermissionDenied,
15055 ErrorCode::NotFound,
15056 ErrorCode::Conflict,
15057 ErrorCode::LimitExceeded,
15058 ErrorCode::CapabilityUnavailable,
15059 ErrorCode::NotSubmitted,
15060 ErrorCode::SubmittedIndeterminate,
15061 ErrorCode::ExpiredUnknown,
15062 ErrorCode::TemporarilyUnavailable,
15063 ErrorCode::Internal,
15064 ],
15065 limit_ids: &["request_bytes", "response_bytes"],
15066 effect_class: "lease_renewing_read",
15067 risk_flags: &[],
15068 capability_family: "data",
15069 retry_safety: "pre_submit_only",
15070 identity_requirement: "none",
15071 resolver: None,
15072 cancellation: "per_call_until_submission_then_resolve",
15073 side_effects: &["renews_or_closes_existing_lease"],
15074 recovery: "retry_if_not_submitted",
15075 collection_index_ref: "request_indexes_uniform",
15076 },
15077 CommandSemanticContract {
15078 command: Command::RenewPit,
15079 admissible_errors: &[
15080 ErrorCode::Aborted,
15081 ErrorCode::DeadlineExceeded,
15082 ErrorCode::InvalidRequest,
15083 ErrorCode::UnsupportedVersion,
15084 ErrorCode::Unauthenticated,
15085 ErrorCode::PermissionDenied,
15086 ErrorCode::NotFound,
15087 ErrorCode::Conflict,
15088 ErrorCode::LimitExceeded,
15089 ErrorCode::CapabilityUnavailable,
15090 ErrorCode::NotSubmitted,
15091 ErrorCode::SubmittedIndeterminate,
15092 ErrorCode::ExpiredUnknown,
15093 ErrorCode::TemporarilyUnavailable,
15094 ErrorCode::Internal,
15095 ],
15096 limit_ids: &["request_bytes", "response_bytes"],
15097 effect_class: "lease_renewing_read",
15098 risk_flags: &[],
15099 capability_family: "data",
15100 retry_safety: "pre_submit_only",
15101 identity_requirement: "none",
15102 resolver: None,
15103 cancellation: "per_call_until_submission_then_resolve",
15104 side_effects: &["renews_or_closes_existing_lease"],
15105 recovery: "retry_if_not_submitted",
15106 collection_index_ref: "pit_authority",
15107 },
15108 CommandSemanticContract {
15109 command: Command::ClosePit,
15110 admissible_errors: &[
15111 ErrorCode::Aborted,
15112 ErrorCode::DeadlineExceeded,
15113 ErrorCode::InvalidRequest,
15114 ErrorCode::UnsupportedVersion,
15115 ErrorCode::Unauthenticated,
15116 ErrorCode::PermissionDenied,
15117 ErrorCode::NotFound,
15118 ErrorCode::Conflict,
15119 ErrorCode::LimitExceeded,
15120 ErrorCode::CapabilityUnavailable,
15121 ErrorCode::NotSubmitted,
15122 ErrorCode::SubmittedIndeterminate,
15123 ErrorCode::ExpiredUnknown,
15124 ErrorCode::TemporarilyUnavailable,
15125 ErrorCode::Internal,
15126 ],
15127 limit_ids: &["request_bytes", "response_bytes"],
15128 effect_class: "lease_renewing_read",
15129 risk_flags: &[],
15130 capability_family: "data",
15131 retry_safety: "pre_submit_only",
15132 identity_requirement: "none",
15133 resolver: None,
15134 cancellation: "per_call_until_submission_then_resolve",
15135 side_effects: &["renews_or_closes_existing_lease"],
15136 recovery: "retry_if_not_submitted",
15137 collection_index_ref: "pit_authority",
15138 },
15139 CommandSemanticContract {
15140 command: Command::ListOperations,
15141 admissible_errors: &[
15142 ErrorCode::Aborted,
15143 ErrorCode::DeadlineExceeded,
15144 ErrorCode::InvalidRequest,
15145 ErrorCode::UnsupportedVersion,
15146 ErrorCode::Unauthenticated,
15147 ErrorCode::PermissionDenied,
15148 ErrorCode::NotFound,
15149 ErrorCode::StaleCursor,
15150 ErrorCode::RestartBudgetExhausted,
15151 ErrorCode::LimitExceeded,
15152 ErrorCode::CapabilityUnavailable,
15153 ErrorCode::TemporarilyUnavailable,
15154 ErrorCode::Internal,
15155 ],
15156 limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
15157 effect_class: "read_only",
15158 risk_flags: &[],
15159 capability_family: "operations",
15160 retry_safety: "safe",
15161 identity_requirement: "none",
15162 resolver: None,
15163 cancellation: "per_call",
15164 side_effects: &[],
15165 recovery: "retry",
15166 collection_index_ref: "none",
15167 },
15168 CommandSemanticContract {
15169 command: Command::GetOperation,
15170 admissible_errors: &[
15171 ErrorCode::Aborted,
15172 ErrorCode::DeadlineExceeded,
15173 ErrorCode::InvalidRequest,
15174 ErrorCode::UnsupportedVersion,
15175 ErrorCode::Unauthenticated,
15176 ErrorCode::PermissionDenied,
15177 ErrorCode::NotFound,
15178 ErrorCode::LimitExceeded,
15179 ErrorCode::CapabilityUnavailable,
15180 ErrorCode::TemporarilyUnavailable,
15181 ErrorCode::Internal,
15182 ],
15183 limit_ids: &["request_bytes", "response_bytes"],
15184 effect_class: "read_only",
15185 risk_flags: &[],
15186 capability_family: "operations",
15187 retry_safety: "safe",
15188 identity_requirement: "request_locator",
15189 resolver: None,
15190 cancellation: "per_call",
15191 side_effects: &[],
15192 recovery: "retry",
15193 collection_index_ref: "none",
15194 },
15195 CommandSemanticContract {
15196 command: Command::WaitOperation,
15197 admissible_errors: &[
15198 ErrorCode::Aborted,
15199 ErrorCode::DeadlineExceeded,
15200 ErrorCode::InvalidRequest,
15201 ErrorCode::UnsupportedVersion,
15202 ErrorCode::Unauthenticated,
15203 ErrorCode::PermissionDenied,
15204 ErrorCode::NotFound,
15205 ErrorCode::Conflict,
15206 ErrorCode::LimitExceeded,
15207 ErrorCode::CapabilityUnavailable,
15208 ErrorCode::TemporarilyUnavailable,
15209 ErrorCode::Internal,
15210 ],
15211 limit_ids: &[
15212 "request_bytes",
15213 "response_bytes",
15214 "operation_wait_attempts",
15215 "operation_wait_interval_millis",
15216 ],
15217 effect_class: "read_only",
15218 risk_flags: &[],
15219 capability_family: "operations",
15220 retry_safety: "safe",
15221 identity_requirement: "request_locator",
15222 resolver: None,
15223 cancellation: "per_call",
15224 side_effects: &[],
15225 recovery: "retry",
15226 collection_index_ref: "none",
15227 },
15228 CommandSemanticContract {
15229 command: Command::CancelOperation,
15230 admissible_errors: &[
15231 ErrorCode::Aborted,
15232 ErrorCode::DeadlineExceeded,
15233 ErrorCode::InvalidRequest,
15234 ErrorCode::UnsupportedVersion,
15235 ErrorCode::Unauthenticated,
15236 ErrorCode::PermissionDenied,
15237 ErrorCode::NotFound,
15238 ErrorCode::Conflict,
15239 ErrorCode::LimitExceeded,
15240 ErrorCode::CapabilityUnavailable,
15241 ErrorCode::NotSubmitted,
15242 ErrorCode::SubmittedIndeterminate,
15243 ErrorCode::ExpiredUnknown,
15244 ErrorCode::TemporarilyUnavailable,
15245 ErrorCode::Internal,
15246 ],
15247 limit_ids: &["request_bytes", "response_bytes"],
15248 effect_class: "control_write",
15249 risk_flags: &[],
15250 capability_family: "operations",
15251 retry_safety: "pre_submit_only",
15252 identity_requirement: "request_locator",
15253 resolver: None,
15254 cancellation: "per_call_until_submission_then_resolve",
15255 side_effects: &["commits_authoritative_state"],
15256 recovery: "retry_if_not_submitted",
15257 collection_index_ref: "none",
15258 },
15259 CommandSemanticContract {
15260 command: Command::ListAuditEvents,
15261 admissible_errors: &[
15262 ErrorCode::Aborted,
15263 ErrorCode::DeadlineExceeded,
15264 ErrorCode::InvalidRequest,
15265 ErrorCode::UnsupportedVersion,
15266 ErrorCode::Unauthenticated,
15267 ErrorCode::PermissionDenied,
15268 ErrorCode::NotFound,
15269 ErrorCode::StaleCursor,
15270 ErrorCode::RestartBudgetExhausted,
15271 ErrorCode::LimitExceeded,
15272 ErrorCode::CapabilityUnavailable,
15273 ErrorCode::TemporarilyUnavailable,
15274 ErrorCode::Internal,
15275 ],
15276 limit_ids: &["request_bytes", "response_bytes", "page_size"],
15277 effect_class: "read_only",
15278 risk_flags: &[],
15279 capability_family: "audit",
15280 retry_safety: "safe",
15281 identity_requirement: "none",
15282 resolver: None,
15283 cancellation: "per_call",
15284 side_effects: &[],
15285 recovery: "retry",
15286 collection_index_ref: "none",
15287 },
15288 CommandSemanticContract {
15289 command: Command::ExportAuditEvents,
15290 admissible_errors: &[
15291 ErrorCode::Aborted,
15292 ErrorCode::DeadlineExceeded,
15293 ErrorCode::InvalidRequest,
15294 ErrorCode::UnsupportedVersion,
15295 ErrorCode::Unauthenticated,
15296 ErrorCode::PermissionDenied,
15297 ErrorCode::NotFound,
15298 ErrorCode::StaleCursor,
15299 ErrorCode::RestartBudgetExhausted,
15300 ErrorCode::LimitExceeded,
15301 ErrorCode::CapabilityUnavailable,
15302 ErrorCode::TemporarilyUnavailable,
15303 ErrorCode::Internal,
15304 ],
15305 limit_ids: &["request_bytes", "response_bytes", "page_size"],
15306 effect_class: "read_only",
15307 risk_flags: &[],
15308 capability_family: "audit",
15309 retry_safety: "safe",
15310 identity_requirement: "none",
15311 resolver: None,
15312 cancellation: "per_call",
15313 side_effects: &[],
15314 recovery: "retry",
15315 collection_index_ref: "none",
15316 },
15317 CommandSemanticContract {
15318 command: Command::ReserveServiceCredential,
15319 admissible_errors: &[
15320 ErrorCode::Aborted,
15321 ErrorCode::DeadlineExceeded,
15322 ErrorCode::InvalidRequest,
15323 ErrorCode::UnsupportedVersion,
15324 ErrorCode::Unauthenticated,
15325 ErrorCode::PermissionDenied,
15326 ErrorCode::NotFound,
15327 ErrorCode::Conflict,
15328 ErrorCode::LimitExceeded,
15329 ErrorCode::CapabilityUnavailable,
15330 ErrorCode::NotSubmitted,
15331 ErrorCode::SubmittedIndeterminate,
15332 ErrorCode::ExpiredUnknown,
15333 ErrorCode::SecretNotEscrowed,
15334 ErrorCode::TemporarilyUnavailable,
15335 ErrorCode::Internal,
15336 ],
15337 limit_ids: &["request_bytes", "response_bytes"],
15338 effect_class: "durable_submit",
15339 risk_flags: &["credential_sensitive"],
15340 capability_family: "security",
15341 retry_safety: "pre_submit_only",
15342 identity_requirement: "caller_action_id",
15343 resolver: Some(Command::ResolveServiceCredentialReservation),
15344 cancellation: "per_call_until_submission_then_resolve",
15345 side_effects: &["commits_authoritative_state"],
15346 recovery: "resolve_with_resolve_service_credential_reservation",
15347 collection_index_ref: "none",
15348 },
15349 CommandSemanticContract {
15350 command: Command::ReserveServiceCredentialRotation,
15351 admissible_errors: &[
15352 ErrorCode::Aborted,
15353 ErrorCode::DeadlineExceeded,
15354 ErrorCode::InvalidRequest,
15355 ErrorCode::UnsupportedVersion,
15356 ErrorCode::Unauthenticated,
15357 ErrorCode::PermissionDenied,
15358 ErrorCode::NotFound,
15359 ErrorCode::Conflict,
15360 ErrorCode::LimitExceeded,
15361 ErrorCode::CapabilityUnavailable,
15362 ErrorCode::NotSubmitted,
15363 ErrorCode::SubmittedIndeterminate,
15364 ErrorCode::ExpiredUnknown,
15365 ErrorCode::SecretNotEscrowed,
15366 ErrorCode::TemporarilyUnavailable,
15367 ErrorCode::Internal,
15368 ],
15369 limit_ids: &["request_bytes", "response_bytes"],
15370 effect_class: "durable_submit",
15371 risk_flags: &["credential_sensitive"],
15372 capability_family: "security",
15373 retry_safety: "pre_submit_only",
15374 identity_requirement: "caller_action_id",
15375 resolver: Some(Command::ResolveServiceCredentialReservation),
15376 cancellation: "per_call_until_submission_then_resolve",
15377 side_effects: &["commits_authoritative_state"],
15378 recovery: "resolve_with_resolve_service_credential_reservation",
15379 collection_index_ref: "none",
15380 },
15381 CommandSemanticContract {
15382 command: Command::ActivateServiceCredential,
15383 admissible_errors: &[
15384 ErrorCode::Aborted,
15385 ErrorCode::DeadlineExceeded,
15386 ErrorCode::InvalidRequest,
15387 ErrorCode::UnsupportedVersion,
15388 ErrorCode::Unauthenticated,
15389 ErrorCode::PermissionDenied,
15390 ErrorCode::NotFound,
15391 ErrorCode::Conflict,
15392 ErrorCode::LimitExceeded,
15393 ErrorCode::CapabilityUnavailable,
15394 ErrorCode::NotSubmitted,
15395 ErrorCode::SubmittedIndeterminate,
15396 ErrorCode::ExpiredUnknown,
15397 ErrorCode::SecretNotEscrowed,
15398 ErrorCode::TemporarilyUnavailable,
15399 ErrorCode::Internal,
15400 ],
15401 limit_ids: &["request_bytes", "response_bytes"],
15402 effect_class: "durable_submit",
15403 risk_flags: &["credential_sensitive"],
15404 capability_family: "security",
15405 retry_safety: "pre_submit_only",
15406 identity_requirement: "server_locator",
15407 resolver: Some(Command::ResolveServiceCredentialReservation),
15408 cancellation: "per_call_until_submission_then_resolve",
15409 side_effects: &["commits_authoritative_state"],
15410 recovery: "resolve_with_resolve_service_credential_reservation",
15411 collection_index_ref: "none",
15412 },
15413 CommandSemanticContract {
15414 command: Command::ResolveServiceCredentialReservation,
15415 admissible_errors: &[
15416 ErrorCode::Aborted,
15417 ErrorCode::DeadlineExceeded,
15418 ErrorCode::InvalidRequest,
15419 ErrorCode::UnsupportedVersion,
15420 ErrorCode::Unauthenticated,
15421 ErrorCode::PermissionDenied,
15422 ErrorCode::NotFound,
15423 ErrorCode::LimitExceeded,
15424 ErrorCode::CapabilityUnavailable,
15425 ErrorCode::SecretNotEscrowed,
15426 ErrorCode::TemporarilyUnavailable,
15427 ErrorCode::Internal,
15428 ],
15429 limit_ids: &["request_bytes", "response_bytes"],
15430 effect_class: "read_only",
15431 risk_flags: &["credential_sensitive"],
15432 capability_family: "security",
15433 retry_safety: "safe",
15434 identity_requirement: "caller_action_id",
15435 resolver: None,
15436 cancellation: "per_call",
15437 side_effects: &[],
15438 recovery: "retry",
15439 collection_index_ref: "none",
15440 },
15441 CommandSemanticContract {
15442 command: Command::PrepareRevokeServiceCredential,
15443 admissible_errors: &[
15444 ErrorCode::Aborted,
15445 ErrorCode::DeadlineExceeded,
15446 ErrorCode::InvalidRequest,
15447 ErrorCode::UnsupportedVersion,
15448 ErrorCode::Unauthenticated,
15449 ErrorCode::PermissionDenied,
15450 ErrorCode::NotFound,
15451 ErrorCode::LimitExceeded,
15452 ErrorCode::CapabilityUnavailable,
15453 ErrorCode::SecretNotEscrowed,
15454 ErrorCode::TemporarilyUnavailable,
15455 ErrorCode::Internal,
15456 ],
15457 limit_ids: &["request_bytes", "response_bytes"],
15458 effect_class: "prepare",
15459 risk_flags: &["destructive", "credential_sensitive"],
15460 capability_family: "security",
15461 retry_safety: "safe",
15462 identity_requirement: "server_locator",
15463 resolver: None,
15464 cancellation: "per_call",
15465 side_effects: &["creates_bounded_preparation"],
15466 recovery: "retry",
15467 collection_index_ref: "none",
15468 },
15469 CommandSemanticContract {
15470 command: Command::RevokeServiceCredential,
15471 admissible_errors: &[
15472 ErrorCode::Aborted,
15473 ErrorCode::DeadlineExceeded,
15474 ErrorCode::InvalidRequest,
15475 ErrorCode::UnsupportedVersion,
15476 ErrorCode::Unauthenticated,
15477 ErrorCode::PermissionDenied,
15478 ErrorCode::NotFound,
15479 ErrorCode::Conflict,
15480 ErrorCode::LimitExceeded,
15481 ErrorCode::CapabilityUnavailable,
15482 ErrorCode::NotSubmitted,
15483 ErrorCode::SubmittedIndeterminate,
15484 ErrorCode::ExpiredUnknown,
15485 ErrorCode::SecretNotEscrowed,
15486 ErrorCode::TemporarilyUnavailable,
15487 ErrorCode::Internal,
15488 ],
15489 limit_ids: &["request_bytes", "response_bytes"],
15490 effect_class: "durable_submit",
15491 risk_flags: &["destructive", "credential_sensitive"],
15492 capability_family: "security",
15493 retry_safety: "pre_submit_only",
15494 identity_requirement: "request_locator",
15495 resolver: Some(Command::ResolveSecurityAction),
15496 cancellation: "per_call_until_submission_then_resolve",
15497 side_effects: &["commits_authoritative_state"],
15498 recovery: "resolve_with_resolve_security_action",
15499 collection_index_ref: "none",
15500 },
15501 CommandSemanticContract {
15502 command: Command::ResolveSecurityAction,
15503 admissible_errors: &[
15504 ErrorCode::Aborted,
15505 ErrorCode::DeadlineExceeded,
15506 ErrorCode::InvalidRequest,
15507 ErrorCode::UnsupportedVersion,
15508 ErrorCode::Unauthenticated,
15509 ErrorCode::PermissionDenied,
15510 ErrorCode::NotFound,
15511 ErrorCode::LimitExceeded,
15512 ErrorCode::CapabilityUnavailable,
15513 ErrorCode::SecretNotEscrowed,
15514 ErrorCode::TemporarilyUnavailable,
15515 ErrorCode::Internal,
15516 ],
15517 limit_ids: &["request_bytes", "response_bytes"],
15518 effect_class: "read_only",
15519 risk_flags: &[],
15520 capability_family: "security",
15521 retry_safety: "safe",
15522 identity_requirement: "request_locator",
15523 resolver: None,
15524 cancellation: "per_call",
15525 side_effects: &[],
15526 recovery: "retry",
15527 collection_index_ref: "none",
15528 },
15529 CommandSemanticContract {
15530 command: Command::GetSecurityRole,
15531 admissible_errors: &[
15532 ErrorCode::Aborted,
15533 ErrorCode::DeadlineExceeded,
15534 ErrorCode::InvalidRequest,
15535 ErrorCode::UnsupportedVersion,
15536 ErrorCode::Unauthenticated,
15537 ErrorCode::PermissionDenied,
15538 ErrorCode::NotFound,
15539 ErrorCode::LimitExceeded,
15540 ErrorCode::CapabilityUnavailable,
15541 ErrorCode::TemporarilyUnavailable,
15542 ErrorCode::Internal,
15543 ],
15544 limit_ids: &["request_bytes", "response_bytes"],
15545 effect_class: "read_only",
15546 risk_flags: &[],
15547 capability_family: "security",
15548 retry_safety: "safe",
15549 identity_requirement: "none",
15550 resolver: None,
15551 cancellation: "per_call",
15552 side_effects: &[],
15553 recovery: "retry",
15554 collection_index_ref: "none",
15555 },
15556 CommandSemanticContract {
15557 command: Command::PrepareRoleAppendAccessChange,
15558 admissible_errors: &[
15559 ErrorCode::Aborted,
15560 ErrorCode::DeadlineExceeded,
15561 ErrorCode::InvalidRequest,
15562 ErrorCode::UnsupportedVersion,
15563 ErrorCode::Unauthenticated,
15564 ErrorCode::PermissionDenied,
15565 ErrorCode::NotFound,
15566 ErrorCode::Conflict,
15567 ErrorCode::LimitExceeded,
15568 ErrorCode::CapabilityUnavailable,
15569 ErrorCode::TemporarilyUnavailable,
15570 ErrorCode::Internal,
15571 ],
15572 limit_ids: &["request_bytes", "response_bytes"],
15573 effect_class: "prepare",
15574 risk_flags: &["destructive"],
15575 capability_family: "security",
15576 retry_safety: "safe",
15577 identity_requirement: "server_locator",
15578 resolver: None,
15579 cancellation: "per_call",
15580 side_effects: &["creates_bounded_preparation"],
15581 recovery: "retry",
15582 collection_index_ref: "none",
15583 },
15584 CommandSemanticContract {
15585 command: Command::SubmitRoleAppendAccessChange,
15586 admissible_errors: &[
15587 ErrorCode::Aborted,
15588 ErrorCode::DeadlineExceeded,
15589 ErrorCode::InvalidRequest,
15590 ErrorCode::UnsupportedVersion,
15591 ErrorCode::Unauthenticated,
15592 ErrorCode::PermissionDenied,
15593 ErrorCode::NotFound,
15594 ErrorCode::Conflict,
15595 ErrorCode::LimitExceeded,
15596 ErrorCode::CapabilityUnavailable,
15597 ErrorCode::NotSubmitted,
15598 ErrorCode::SubmittedIndeterminate,
15599 ErrorCode::ExpiredUnknown,
15600 ErrorCode::TemporarilyUnavailable,
15601 ErrorCode::Internal,
15602 ],
15603 limit_ids: &["request_bytes", "response_bytes"],
15604 effect_class: "durable_submit",
15605 risk_flags: &["destructive"],
15606 capability_family: "security",
15607 retry_safety: "pre_submit_only",
15608 identity_requirement: "request_locator",
15609 resolver: Some(Command::ResolveSecurityAction),
15610 cancellation: "per_call_until_submission_then_resolve",
15611 side_effects: &["commits_authoritative_state"],
15612 recovery: "resolve_with_resolve_security_action",
15613 collection_index_ref: "none",
15614 },
15615 CommandSemanticContract {
15616 command: Command::PrepareSourceAuthorizationProjection,
15617 admissible_errors: &[
15618 ErrorCode::Aborted,
15619 ErrorCode::DeadlineExceeded,
15620 ErrorCode::InvalidRequest,
15621 ErrorCode::UnsupportedVersion,
15622 ErrorCode::Unauthenticated,
15623 ErrorCode::PermissionDenied,
15624 ErrorCode::NotFound,
15625 ErrorCode::Conflict,
15626 ErrorCode::LimitExceeded,
15627 ErrorCode::CapabilityUnavailable,
15628 ErrorCode::TemporarilyUnavailable,
15629 ErrorCode::Internal,
15630 ],
15631 limit_ids: &["request_bytes", "response_bytes"],
15632 effect_class: "prepare",
15633 risk_flags: &["destructive"],
15634 capability_family: "security",
15635 retry_safety: "safe",
15636 identity_requirement: "caller_action_id",
15637 resolver: None,
15638 cancellation: "per_call",
15639 side_effects: &["creates_bounded_preparation"],
15640 recovery: "retry",
15641 collection_index_ref: "request_index",
15642 },
15643 CommandSemanticContract {
15644 command: Command::SubmitSourceAuthorizationProjection,
15645 admissible_errors: &[
15646 ErrorCode::Aborted,
15647 ErrorCode::DeadlineExceeded,
15648 ErrorCode::InvalidRequest,
15649 ErrorCode::UnsupportedVersion,
15650 ErrorCode::Unauthenticated,
15651 ErrorCode::PermissionDenied,
15652 ErrorCode::NotFound,
15653 ErrorCode::Conflict,
15654 ErrorCode::LimitExceeded,
15655 ErrorCode::CapabilityUnavailable,
15656 ErrorCode::NotSubmitted,
15657 ErrorCode::SubmittedIndeterminate,
15658 ErrorCode::ExpiredUnknown,
15659 ErrorCode::TemporarilyUnavailable,
15660 ErrorCode::Internal,
15661 ],
15662 limit_ids: &["request_bytes", "response_bytes"],
15663 effect_class: "durable_submit",
15664 risk_flags: &["destructive"],
15665 capability_family: "security",
15666 retry_safety: "pre_submit_only",
15667 identity_requirement: "caller_action_id",
15668 resolver: Some(Command::ResolveSourceAuthorizationProjection),
15669 cancellation: "per_call_until_submission_then_resolve",
15670 side_effects: &["commits_authoritative_state"],
15671 recovery: "resolve_with_resolve_source_authorization_projection",
15672 collection_index_ref: "request_index",
15673 },
15674 CommandSemanticContract {
15675 command: Command::ResolveSourceAuthorizationProjection,
15676 admissible_errors: &[
15677 ErrorCode::Aborted,
15678 ErrorCode::DeadlineExceeded,
15679 ErrorCode::InvalidRequest,
15680 ErrorCode::UnsupportedVersion,
15681 ErrorCode::Unauthenticated,
15682 ErrorCode::PermissionDenied,
15683 ErrorCode::NotFound,
15684 ErrorCode::Conflict,
15685 ErrorCode::LimitExceeded,
15686 ErrorCode::CapabilityUnavailable,
15687 ErrorCode::TemporarilyUnavailable,
15688 ErrorCode::Internal,
15689 ],
15690 limit_ids: &["request_bytes", "response_bytes"],
15691 effect_class: "read_only",
15692 risk_flags: &[],
15693 capability_family: "security",
15694 retry_safety: "safe",
15695 identity_requirement: "caller_action_id",
15696 resolver: None,
15697 cancellation: "per_call",
15698 side_effects: &[],
15699 recovery: "retry",
15700 collection_index_ref: "request_index",
15701 },
15702 CommandSemanticContract {
15703 command: Command::ListServiceCredentials,
15704 admissible_errors: &[
15705 ErrorCode::Aborted,
15706 ErrorCode::DeadlineExceeded,
15707 ErrorCode::InvalidRequest,
15708 ErrorCode::UnsupportedVersion,
15709 ErrorCode::Unauthenticated,
15710 ErrorCode::PermissionDenied,
15711 ErrorCode::NotFound,
15712 ErrorCode::StaleCursor,
15713 ErrorCode::RestartBudgetExhausted,
15714 ErrorCode::LimitExceeded,
15715 ErrorCode::CapabilityUnavailable,
15716 ErrorCode::SecretNotEscrowed,
15717 ErrorCode::TemporarilyUnavailable,
15718 ErrorCode::Internal,
15719 ],
15720 limit_ids: &["request_bytes", "response_bytes", "page_size"],
15721 effect_class: "read_only",
15722 risk_flags: &["credential_sensitive"],
15723 capability_family: "security",
15724 retry_safety: "safe",
15725 identity_requirement: "none",
15726 resolver: None,
15727 cancellation: "per_call",
15728 side_effects: &[],
15729 recovery: "retry",
15730 collection_index_ref: "none",
15731 },
15732 CommandSemanticContract {
15733 command: Command::GetRuntimeStatus,
15734 admissible_errors: &[
15735 ErrorCode::Aborted,
15736 ErrorCode::DeadlineExceeded,
15737 ErrorCode::InvalidRequest,
15738 ErrorCode::UnsupportedVersion,
15739 ErrorCode::Unauthenticated,
15740 ErrorCode::PermissionDenied,
15741 ErrorCode::NotFound,
15742 ErrorCode::LimitExceeded,
15743 ErrorCode::CapabilityUnavailable,
15744 ErrorCode::TemporarilyUnavailable,
15745 ErrorCode::Internal,
15746 ],
15747 limit_ids: &["request_bytes", "response_bytes"],
15748 effect_class: "read_only",
15749 risk_flags: &[],
15750 capability_family: "catalog",
15751 retry_safety: "safe",
15752 identity_requirement: "none",
15753 resolver: None,
15754 cancellation: "per_call",
15755 side_effects: &[],
15756 recovery: "retry",
15757 collection_index_ref: "none",
15758 },
15759 CommandSemanticContract {
15760 command: Command::GetResultCacheStatus,
15761 admissible_errors: &[
15762 ErrorCode::Aborted,
15763 ErrorCode::DeadlineExceeded,
15764 ErrorCode::InvalidRequest,
15765 ErrorCode::UnsupportedVersion,
15766 ErrorCode::Unauthenticated,
15767 ErrorCode::PermissionDenied,
15768 ErrorCode::NotFound,
15769 ErrorCode::LimitExceeded,
15770 ErrorCode::CapabilityUnavailable,
15771 ErrorCode::TemporarilyUnavailable,
15772 ErrorCode::Internal,
15773 ],
15774 limit_ids: &["request_bytes", "response_bytes"],
15775 effect_class: "read_only",
15776 risk_flags: &[],
15777 capability_family: "catalog",
15778 retry_safety: "safe",
15779 identity_requirement: "none",
15780 resolver: None,
15781 cancellation: "per_call",
15782 side_effects: &[],
15783 recovery: "retry",
15784 collection_index_ref: "none",
15785 },
15786 CommandSemanticContract {
15787 command: Command::GetFieldPromotionStatus,
15788 admissible_errors: &[
15789 ErrorCode::Aborted,
15790 ErrorCode::DeadlineExceeded,
15791 ErrorCode::InvalidRequest,
15792 ErrorCode::UnsupportedVersion,
15793 ErrorCode::Unauthenticated,
15794 ErrorCode::PermissionDenied,
15795 ErrorCode::NotFound,
15796 ErrorCode::LimitExceeded,
15797 ErrorCode::CapabilityUnavailable,
15798 ErrorCode::TemporarilyUnavailable,
15799 ErrorCode::Internal,
15800 ],
15801 limit_ids: &["request_bytes", "response_bytes"],
15802 effect_class: "read_only",
15803 risk_flags: &[],
15804 capability_family: "catalog",
15805 retry_safety: "safe",
15806 identity_requirement: "none",
15807 resolver: None,
15808 cancellation: "per_call",
15809 side_effects: &[],
15810 recovery: "retry",
15811 collection_index_ref: "none",
15812 },
15813 CommandSemanticContract {
15814 command: Command::GetOverloadStatus,
15815 admissible_errors: &[
15816 ErrorCode::Aborted,
15817 ErrorCode::DeadlineExceeded,
15818 ErrorCode::InvalidRequest,
15819 ErrorCode::UnsupportedVersion,
15820 ErrorCode::Unauthenticated,
15821 ErrorCode::PermissionDenied,
15822 ErrorCode::NotFound,
15823 ErrorCode::LimitExceeded,
15824 ErrorCode::CapabilityUnavailable,
15825 ErrorCode::TemporarilyUnavailable,
15826 ErrorCode::Internal,
15827 ],
15828 limit_ids: &["request_bytes", "response_bytes"],
15829 effect_class: "read_only",
15830 risk_flags: &[],
15831 capability_family: "catalog",
15832 retry_safety: "safe",
15833 identity_requirement: "none",
15834 resolver: None,
15835 cancellation: "per_call",
15836 side_effects: &[],
15837 recovery: "retry",
15838 collection_index_ref: "none",
15839 },
15840 CommandSemanticContract {
15841 command: Command::ConfigureExternalKey,
15842 admissible_errors: &[
15843 ErrorCode::Aborted,
15844 ErrorCode::DeadlineExceeded,
15845 ErrorCode::InvalidRequest,
15846 ErrorCode::UnsupportedVersion,
15847 ErrorCode::Unauthenticated,
15848 ErrorCode::PermissionDenied,
15849 ErrorCode::NotFound,
15850 ErrorCode::Conflict,
15851 ErrorCode::LimitExceeded,
15852 ErrorCode::CapabilityUnavailable,
15853 ErrorCode::NotSubmitted,
15854 ErrorCode::SubmittedIndeterminate,
15855 ErrorCode::ExpiredUnknown,
15856 ErrorCode::TemporarilyUnavailable,
15857 ErrorCode::Internal,
15858 ],
15859 limit_ids: &["request_bytes", "response_bytes"],
15860 effect_class: "control_write",
15861 risk_flags: &[],
15862 capability_family: "lifecycle",
15863 retry_safety: "pre_submit_only",
15864 identity_requirement: "none",
15865 resolver: None,
15866 cancellation: "per_call_until_submission_then_resolve",
15867 side_effects: &["commits_authoritative_state"],
15868 recovery: "retry_if_not_submitted",
15869 collection_index_ref: "request_index",
15870 },
15871 CommandSemanticContract {
15872 command: Command::RotateExternalKeyBinding,
15873 admissible_errors: &[
15874 ErrorCode::Aborted,
15875 ErrorCode::DeadlineExceeded,
15876 ErrorCode::InvalidRequest,
15877 ErrorCode::UnsupportedVersion,
15878 ErrorCode::Unauthenticated,
15879 ErrorCode::PermissionDenied,
15880 ErrorCode::NotFound,
15881 ErrorCode::Conflict,
15882 ErrorCode::LimitExceeded,
15883 ErrorCode::CapabilityUnavailable,
15884 ErrorCode::NotSubmitted,
15885 ErrorCode::SubmittedIndeterminate,
15886 ErrorCode::ExpiredUnknown,
15887 ErrorCode::TemporarilyUnavailable,
15888 ErrorCode::Internal,
15889 ],
15890 limit_ids: &["request_bytes", "response_bytes"],
15891 effect_class: "control_write",
15892 risk_flags: &[],
15893 capability_family: "lifecycle",
15894 retry_safety: "pre_submit_only",
15895 identity_requirement: "none",
15896 resolver: None,
15897 cancellation: "per_call_until_submission_then_resolve",
15898 side_effects: &["commits_authoritative_state"],
15899 recovery: "retry_if_not_submitted",
15900 collection_index_ref: "request_index",
15901 },
15902 CommandSemanticContract {
15903 command: Command::RetireExternalKeyBinding,
15904 admissible_errors: &[
15905 ErrorCode::Aborted,
15906 ErrorCode::DeadlineExceeded,
15907 ErrorCode::InvalidRequest,
15908 ErrorCode::UnsupportedVersion,
15909 ErrorCode::Unauthenticated,
15910 ErrorCode::PermissionDenied,
15911 ErrorCode::NotFound,
15912 ErrorCode::Conflict,
15913 ErrorCode::LimitExceeded,
15914 ErrorCode::CapabilityUnavailable,
15915 ErrorCode::NotSubmitted,
15916 ErrorCode::SubmittedIndeterminate,
15917 ErrorCode::ExpiredUnknown,
15918 ErrorCode::TemporarilyUnavailable,
15919 ErrorCode::Internal,
15920 ],
15921 limit_ids: &["request_bytes", "response_bytes"],
15922 effect_class: "durable_submit",
15923 risk_flags: &["destructive"],
15924 capability_family: "lifecycle",
15925 retry_safety: "pre_submit_only",
15926 identity_requirement: "caller_action_id",
15927 resolver: Some(Command::ResolveExternalKeyBindingRetirement),
15928 cancellation: "per_call_until_submission_then_resolve",
15929 side_effects: &["commits_authoritative_state"],
15930 recovery: "resolve_with_resolve_external_key_binding_retirement",
15931 collection_index_ref: "request_index",
15932 },
15933 CommandSemanticContract {
15934 command: Command::ResolveExternalKeyBindingRetirement,
15935 admissible_errors: &[
15936 ErrorCode::Aborted,
15937 ErrorCode::DeadlineExceeded,
15938 ErrorCode::InvalidRequest,
15939 ErrorCode::UnsupportedVersion,
15940 ErrorCode::Unauthenticated,
15941 ErrorCode::PermissionDenied,
15942 ErrorCode::NotFound,
15943 ErrorCode::LimitExceeded,
15944 ErrorCode::CapabilityUnavailable,
15945 ErrorCode::TemporarilyUnavailable,
15946 ErrorCode::Internal,
15947 ],
15948 limit_ids: &["request_bytes", "response_bytes"],
15949 effect_class: "read_only",
15950 risk_flags: &[],
15951 capability_family: "lifecycle",
15952 retry_safety: "safe",
15953 identity_requirement: "caller_action_id",
15954 resolver: None,
15955 cancellation: "per_call",
15956 side_effects: &[],
15957 recovery: "retry",
15958 collection_index_ref: "request_index",
15959 },
15960 CommandSemanticContract {
15961 command: Command::ConfigureAggregateThenDelete,
15962 admissible_errors: &[
15963 ErrorCode::Aborted,
15964 ErrorCode::DeadlineExceeded,
15965 ErrorCode::InvalidRequest,
15966 ErrorCode::UnsupportedVersion,
15967 ErrorCode::Unauthenticated,
15968 ErrorCode::PermissionDenied,
15969 ErrorCode::NotFound,
15970 ErrorCode::Conflict,
15971 ErrorCode::LimitExceeded,
15972 ErrorCode::CapabilityUnavailable,
15973 ErrorCode::NotSubmitted,
15974 ErrorCode::SubmittedIndeterminate,
15975 ErrorCode::ExpiredUnknown,
15976 ErrorCode::TemporarilyUnavailable,
15977 ErrorCode::Internal,
15978 ],
15979 limit_ids: &["request_bytes", "response_bytes"],
15980 effect_class: "control_write",
15981 risk_flags: &["destructive"],
15982 capability_family: "lifecycle",
15983 retry_safety: "pre_submit_only",
15984 identity_requirement: "none",
15985 resolver: None,
15986 cancellation: "per_call_until_submission_then_resolve",
15987 side_effects: &["commits_authoritative_state"],
15988 recovery: "retry_if_not_submitted",
15989 collection_index_ref: "request_index",
15990 },
15991 CommandSemanticContract {
15992 command: Command::GetLifecycleStatus,
15993 admissible_errors: &[
15994 ErrorCode::Aborted,
15995 ErrorCode::DeadlineExceeded,
15996 ErrorCode::InvalidRequest,
15997 ErrorCode::UnsupportedVersion,
15998 ErrorCode::Unauthenticated,
15999 ErrorCode::PermissionDenied,
16000 ErrorCode::NotFound,
16001 ErrorCode::LimitExceeded,
16002 ErrorCode::CapabilityUnavailable,
16003 ErrorCode::TemporarilyUnavailable,
16004 ErrorCode::Internal,
16005 ],
16006 limit_ids: &["request_bytes", "response_bytes"],
16007 effect_class: "read_only",
16008 risk_flags: &[],
16009 capability_family: "catalog",
16010 retry_safety: "safe",
16011 identity_requirement: "none",
16012 resolver: None,
16013 cancellation: "per_call",
16014 side_effects: &[],
16015 recovery: "retry",
16016 collection_index_ref: "none",
16017 },
16018 CommandSemanticContract {
16019 command: Command::EraseRecord,
16020 admissible_errors: &[
16021 ErrorCode::Aborted,
16022 ErrorCode::DeadlineExceeded,
16023 ErrorCode::InvalidRequest,
16024 ErrorCode::UnsupportedVersion,
16025 ErrorCode::Unauthenticated,
16026 ErrorCode::PermissionDenied,
16027 ErrorCode::NotFound,
16028 ErrorCode::Conflict,
16029 ErrorCode::LimitExceeded,
16030 ErrorCode::CapabilityUnavailable,
16031 ErrorCode::NotSubmitted,
16032 ErrorCode::SubmittedIndeterminate,
16033 ErrorCode::ExpiredUnknown,
16034 ErrorCode::TemporarilyUnavailable,
16035 ErrorCode::Internal,
16036 ],
16037 limit_ids: &[
16038 "request_bytes",
16039 "response_bytes",
16040 "record_erasure_scan_bytes",
16041 "record_erasure_rewrite_bytes",
16042 ],
16043 effect_class: "durable_submit",
16044 risk_flags: &["destructive"],
16045 capability_family: "lifecycle",
16046 retry_safety: "pre_submit_only",
16047 identity_requirement: "caller_action_id",
16048 resolver: Some(Command::ResolveRecordErasure),
16049 cancellation: "per_call_until_submission_then_resolve",
16050 side_effects: &["commits_authoritative_state"],
16051 recovery: "resolve_with_resolve_record_erasure",
16052 collection_index_ref: "request_index",
16053 },
16054 CommandSemanticContract {
16055 command: Command::ResolveRecordErasure,
16056 admissible_errors: &[
16057 ErrorCode::Aborted,
16058 ErrorCode::DeadlineExceeded,
16059 ErrorCode::InvalidRequest,
16060 ErrorCode::UnsupportedVersion,
16061 ErrorCode::Unauthenticated,
16062 ErrorCode::PermissionDenied,
16063 ErrorCode::NotFound,
16064 ErrorCode::Conflict,
16065 ErrorCode::LimitExceeded,
16066 ErrorCode::CapabilityUnavailable,
16067 ErrorCode::TemporarilyUnavailable,
16068 ErrorCode::Internal,
16069 ],
16070 limit_ids: &[
16071 "request_bytes",
16072 "response_bytes",
16073 "record_erasure_scan_bytes",
16074 "record_erasure_rewrite_bytes",
16075 ],
16076 effect_class: "read_only",
16077 risk_flags: &[],
16078 capability_family: "lifecycle",
16079 retry_safety: "safe",
16080 identity_requirement: "caller_action_id",
16081 resolver: None,
16082 cancellation: "per_call",
16083 side_effects: &[],
16084 recovery: "retry",
16085 collection_index_ref: "request_index",
16086 },
16087 CommandSemanticContract {
16088 command: Command::GetRecordErasure,
16089 admissible_errors: &[
16090 ErrorCode::Aborted,
16091 ErrorCode::DeadlineExceeded,
16092 ErrorCode::InvalidRequest,
16093 ErrorCode::UnsupportedVersion,
16094 ErrorCode::Unauthenticated,
16095 ErrorCode::PermissionDenied,
16096 ErrorCode::NotFound,
16097 ErrorCode::LimitExceeded,
16098 ErrorCode::CapabilityUnavailable,
16099 ErrorCode::TemporarilyUnavailable,
16100 ErrorCode::Internal,
16101 ],
16102 limit_ids: &["request_bytes", "response_bytes"],
16103 effect_class: "read_only",
16104 risk_flags: &[],
16105 capability_family: "lifecycle",
16106 retry_safety: "safe",
16107 identity_requirement: "request_identity",
16108 resolver: None,
16109 cancellation: "per_call",
16110 side_effects: &[],
16111 recovery: "retry",
16112 collection_index_ref: "request_index",
16113 },
16114 CommandSemanticContract {
16115 command: Command::GetQuota,
16116 admissible_errors: &[
16117 ErrorCode::Aborted,
16118 ErrorCode::DeadlineExceeded,
16119 ErrorCode::InvalidRequest,
16120 ErrorCode::UnsupportedVersion,
16121 ErrorCode::Unauthenticated,
16122 ErrorCode::PermissionDenied,
16123 ErrorCode::NotFound,
16124 ErrorCode::LimitExceeded,
16125 ErrorCode::CapabilityUnavailable,
16126 ErrorCode::TemporarilyUnavailable,
16127 ErrorCode::Internal,
16128 ],
16129 limit_ids: &["request_bytes", "response_bytes"],
16130 effect_class: "read_only",
16131 risk_flags: &[],
16132 capability_family: "quota",
16133 retry_safety: "safe",
16134 identity_requirement: "none",
16135 resolver: None,
16136 cancellation: "per_call",
16137 side_effects: &[],
16138 recovery: "retry",
16139 collection_index_ref: "none",
16140 },
16141 CommandSemanticContract {
16142 command: Command::UpdateQuota,
16143 admissible_errors: &[
16144 ErrorCode::Aborted,
16145 ErrorCode::DeadlineExceeded,
16146 ErrorCode::InvalidRequest,
16147 ErrorCode::UnsupportedVersion,
16148 ErrorCode::Unauthenticated,
16149 ErrorCode::PermissionDenied,
16150 ErrorCode::NotFound,
16151 ErrorCode::Conflict,
16152 ErrorCode::LimitExceeded,
16153 ErrorCode::CapabilityUnavailable,
16154 ErrorCode::NotSubmitted,
16155 ErrorCode::SubmittedIndeterminate,
16156 ErrorCode::ExpiredUnknown,
16157 ErrorCode::TemporarilyUnavailable,
16158 ErrorCode::Internal,
16159 ],
16160 limit_ids: &["request_bytes", "response_bytes"],
16161 effect_class: "control_write",
16162 risk_flags: &[],
16163 capability_family: "quota",
16164 retry_safety: "pre_submit_only",
16165 identity_requirement: "none",
16166 resolver: None,
16167 cancellation: "per_call_until_submission_then_resolve",
16168 side_effects: &["commits_authoritative_state"],
16169 recovery: "retry_if_not_submitted",
16170 collection_index_ref: "none",
16171 },
16172 CommandSemanticContract {
16173 command: Command::GetBinding,
16174 admissible_errors: &[
16175 ErrorCode::Aborted,
16176 ErrorCode::DeadlineExceeded,
16177 ErrorCode::InvalidRequest,
16178 ErrorCode::UnsupportedVersion,
16179 ErrorCode::Unauthenticated,
16180 ErrorCode::PermissionDenied,
16181 ErrorCode::NotFound,
16182 ErrorCode::LimitExceeded,
16183 ErrorCode::CapabilityUnavailable,
16184 ErrorCode::TemporarilyUnavailable,
16185 ErrorCode::Internal,
16186 ],
16187 limit_ids: &["request_bytes", "response_bytes"],
16188 effect_class: "read_only",
16189 risk_flags: &[],
16190 capability_family: "runtime_control",
16191 retry_safety: "safe",
16192 identity_requirement: "none",
16193 resolver: None,
16194 cancellation: "per_call",
16195 side_effects: &[],
16196 recovery: "retry",
16197 collection_index_ref: "none",
16198 },
16199 CommandSemanticContract {
16200 command: Command::GetAdmissionStatus,
16201 admissible_errors: &[
16202 ErrorCode::Aborted,
16203 ErrorCode::DeadlineExceeded,
16204 ErrorCode::InvalidRequest,
16205 ErrorCode::UnsupportedVersion,
16206 ErrorCode::Unauthenticated,
16207 ErrorCode::PermissionDenied,
16208 ErrorCode::NotFound,
16209 ErrorCode::LimitExceeded,
16210 ErrorCode::CapabilityUnavailable,
16211 ErrorCode::TemporarilyUnavailable,
16212 ErrorCode::Internal,
16213 ],
16214 limit_ids: &["request_bytes", "response_bytes"],
16215 effect_class: "read_only",
16216 risk_flags: &[],
16217 capability_family: "runtime_control",
16218 retry_safety: "safe",
16219 identity_requirement: "none",
16220 resolver: None,
16221 cancellation: "per_call",
16222 side_effects: &[],
16223 recovery: "retry",
16224 collection_index_ref: "none",
16225 },
16226 CommandSemanticContract {
16227 command: Command::SetAdmission,
16228 admissible_errors: &[
16229 ErrorCode::Aborted,
16230 ErrorCode::DeadlineExceeded,
16231 ErrorCode::InvalidRequest,
16232 ErrorCode::UnsupportedVersion,
16233 ErrorCode::Unauthenticated,
16234 ErrorCode::PermissionDenied,
16235 ErrorCode::NotFound,
16236 ErrorCode::Conflict,
16237 ErrorCode::LimitExceeded,
16238 ErrorCode::CapabilityUnavailable,
16239 ErrorCode::NotSubmitted,
16240 ErrorCode::SubmittedIndeterminate,
16241 ErrorCode::ExpiredUnknown,
16242 ErrorCode::TemporarilyUnavailable,
16243 ErrorCode::Internal,
16244 ],
16245 limit_ids: &["request_bytes", "response_bytes"],
16246 effect_class: "control_write",
16247 risk_flags: &[],
16248 capability_family: "runtime_control",
16249 retry_safety: "pre_submit_only",
16250 identity_requirement: "none",
16251 resolver: None,
16252 cancellation: "per_call_until_submission_then_resolve",
16253 side_effects: &["commits_authoritative_state"],
16254 recovery: "retry_if_not_submitted",
16255 collection_index_ref: "none",
16256 },
16257 CommandSemanticContract {
16258 command: Command::GetQuiesceStatus,
16259 admissible_errors: &[
16260 ErrorCode::Aborted,
16261 ErrorCode::DeadlineExceeded,
16262 ErrorCode::InvalidRequest,
16263 ErrorCode::UnsupportedVersion,
16264 ErrorCode::Unauthenticated,
16265 ErrorCode::PermissionDenied,
16266 ErrorCode::NotFound,
16267 ErrorCode::LimitExceeded,
16268 ErrorCode::CapabilityUnavailable,
16269 ErrorCode::TemporarilyUnavailable,
16270 ErrorCode::Internal,
16271 ],
16272 limit_ids: &["request_bytes", "response_bytes"],
16273 effect_class: "read_only",
16274 risk_flags: &[],
16275 capability_family: "runtime_control",
16276 retry_safety: "safe",
16277 identity_requirement: "none",
16278 resolver: None,
16279 cancellation: "per_call",
16280 side_effects: &[],
16281 recovery: "retry",
16282 collection_index_ref: "none",
16283 },
16284 CommandSemanticContract {
16285 command: Command::GetDecommissionReadiness,
16286 admissible_errors: &[
16287 ErrorCode::Aborted,
16288 ErrorCode::DeadlineExceeded,
16289 ErrorCode::InvalidRequest,
16290 ErrorCode::UnsupportedVersion,
16291 ErrorCode::Unauthenticated,
16292 ErrorCode::PermissionDenied,
16293 ErrorCode::NotFound,
16294 ErrorCode::LimitExceeded,
16295 ErrorCode::CapabilityUnavailable,
16296 ErrorCode::TemporarilyUnavailable,
16297 ErrorCode::Internal,
16298 ],
16299 limit_ids: &["request_bytes", "response_bytes"],
16300 effect_class: "read_only",
16301 risk_flags: &[],
16302 capability_family: "runtime_control",
16303 retry_safety: "safe",
16304 identity_requirement: "none",
16305 resolver: None,
16306 cancellation: "per_call",
16307 side_effects: &[],
16308 recovery: "retry",
16309 collection_index_ref: "none",
16310 },
16311 CommandSemanticContract {
16312 command: Command::GetUpgradeReadiness,
16313 admissible_errors: &[
16314 ErrorCode::Aborted,
16315 ErrorCode::DeadlineExceeded,
16316 ErrorCode::InvalidRequest,
16317 ErrorCode::UnsupportedVersion,
16318 ErrorCode::Unauthenticated,
16319 ErrorCode::PermissionDenied,
16320 ErrorCode::NotFound,
16321 ErrorCode::LimitExceeded,
16322 ErrorCode::CapabilityUnavailable,
16323 ErrorCode::TemporarilyUnavailable,
16324 ErrorCode::Internal,
16325 ],
16326 limit_ids: &["request_bytes", "response_bytes"],
16327 effect_class: "read_only",
16328 risk_flags: &[],
16329 capability_family: "operations",
16330 retry_safety: "safe",
16331 identity_requirement: "none",
16332 resolver: None,
16333 cancellation: "per_call",
16334 side_effects: &[],
16335 recovery: "retry",
16336 collection_index_ref: "none",
16337 },
16338 CommandSemanticContract {
16339 command: Command::GetMaintenanceStatus,
16340 admissible_errors: &[
16341 ErrorCode::Aborted,
16342 ErrorCode::DeadlineExceeded,
16343 ErrorCode::InvalidRequest,
16344 ErrorCode::UnsupportedVersion,
16345 ErrorCode::Unauthenticated,
16346 ErrorCode::PermissionDenied,
16347 ErrorCode::NotFound,
16348 ErrorCode::StaleCursor,
16349 ErrorCode::LimitExceeded,
16350 ErrorCode::CapabilityUnavailable,
16351 ErrorCode::TemporarilyUnavailable,
16352 ErrorCode::Internal,
16353 ],
16354 limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
16355 effect_class: "read_only",
16356 risk_flags: &[],
16357 capability_family: "operations",
16358 retry_safety: "safe",
16359 identity_requirement: "none",
16360 resolver: None,
16361 cancellation: "per_call",
16362 side_effects: &[],
16363 recovery: "retry",
16364 collection_index_ref: "optional_request_index",
16365 },
16366 CommandSemanticContract {
16367 command: Command::WarmVectorIndex,
16368 admissible_errors: &[
16369 ErrorCode::Aborted,
16370 ErrorCode::DeadlineExceeded,
16371 ErrorCode::InvalidRequest,
16372 ErrorCode::UnsupportedVersion,
16373 ErrorCode::Unauthenticated,
16374 ErrorCode::PermissionDenied,
16375 ErrorCode::NotFound,
16376 ErrorCode::Conflict,
16377 ErrorCode::LimitExceeded,
16378 ErrorCode::CapabilityUnavailable,
16379 ErrorCode::TemporarilyUnavailable,
16380 ErrorCode::Internal,
16381 ],
16382 limit_ids: &[
16383 "request_bytes",
16384 "response_bytes",
16385 "vector_warm_components",
16386 "vector_warm_requests",
16387 "vector_warm_bytes",
16388 "vector_warm_achievements",
16389 "vector_warm_ttl_millis",
16390 ],
16391 effect_class: "read_only",
16392 risk_flags: &[],
16393 capability_family: "data",
16394 retry_safety: "safe",
16395 identity_requirement: "exact_root",
16396 resolver: None,
16397 cancellation: "per_call",
16398 side_effects: &["populates_reconstructible_cache"],
16399 recovery: "retry",
16400 collection_index_ref: "request_index",
16401 },
16402 CommandSemanticContract {
16403 command: Command::EvaluateVectorRecall,
16404 admissible_errors: &[
16405 ErrorCode::Aborted,
16406 ErrorCode::DeadlineExceeded,
16407 ErrorCode::InvalidRequest,
16408 ErrorCode::UnsupportedVersion,
16409 ErrorCode::Unauthenticated,
16410 ErrorCode::PermissionDenied,
16411 ErrorCode::NotFound,
16412 ErrorCode::Conflict,
16413 ErrorCode::LimitExceeded,
16414 ErrorCode::CapabilityUnavailable,
16415 ErrorCode::NotSubmitted,
16416 ErrorCode::SubmittedIndeterminate,
16417 ErrorCode::ExpiredUnknown,
16418 ErrorCode::TemporarilyUnavailable,
16419 ErrorCode::Internal,
16420 ],
16421 limit_ids: &[
16422 "request_bytes",
16423 "response_bytes",
16424 "vector_dimensions",
16425 "vector_query_bytes",
16426 "vector_request_bytes",
16427 "vector_candidates",
16428 "vector_evaluation_queries",
16429 "vector_evaluation_k",
16430 "vector_evaluation_artifact_bytes",
16431 ],
16432 effect_class: "durable_submit",
16433 risk_flags: &[],
16434 capability_family: "diagnostics",
16435 retry_safety: "pre_submit_only",
16436 identity_requirement: "caller_action_id",
16437 resolver: None,
16438 cancellation: "per_call_until_submission_then_resolve",
16439 side_effects: &["commits_authoritative_state"],
16440 recovery: "retry_if_not_submitted",
16441 collection_index_ref: "request_index",
16442 },
16443 CommandSemanticContract {
16444 command: Command::CalibrateVectorStrategy,
16445 admissible_errors: &[
16446 ErrorCode::Aborted,
16447 ErrorCode::DeadlineExceeded,
16448 ErrorCode::InvalidRequest,
16449 ErrorCode::UnsupportedVersion,
16450 ErrorCode::Unauthenticated,
16451 ErrorCode::PermissionDenied,
16452 ErrorCode::NotFound,
16453 ErrorCode::Conflict,
16454 ErrorCode::LimitExceeded,
16455 ErrorCode::CapabilityUnavailable,
16456 ErrorCode::NotSubmitted,
16457 ErrorCode::SubmittedIndeterminate,
16458 ErrorCode::ExpiredUnknown,
16459 ErrorCode::TemporarilyUnavailable,
16460 ErrorCode::Internal,
16461 ],
16462 limit_ids: &[
16463 "request_bytes",
16464 "response_bytes",
16465 "vector_dimensions",
16466 "vector_query_bytes",
16467 "vector_request_bytes",
16468 "vector_candidates",
16469 "vector_evaluation_queries",
16470 "vector_evaluation_k",
16471 "vector_evaluation_profiles",
16472 "vector_evaluation_artifact_bytes",
16473 ],
16474 effect_class: "durable_submit",
16475 risk_flags: &[],
16476 capability_family: "diagnostics",
16477 retry_safety: "pre_submit_only",
16478 identity_requirement: "caller_action_id",
16479 resolver: None,
16480 cancellation: "per_call_until_submission_then_resolve",
16481 side_effects: &["commits_authoritative_state"],
16482 recovery: "retry_if_not_submitted",
16483 collection_index_ref: "request_index",
16484 },
16485 CommandSemanticContract {
16486 command: Command::GetVectorDiagnostic,
16487 admissible_errors: &[
16488 ErrorCode::Aborted,
16489 ErrorCode::DeadlineExceeded,
16490 ErrorCode::InvalidRequest,
16491 ErrorCode::UnsupportedVersion,
16492 ErrorCode::Unauthenticated,
16493 ErrorCode::PermissionDenied,
16494 ErrorCode::NotFound,
16495 ErrorCode::LimitExceeded,
16496 ErrorCode::CapabilityUnavailable,
16497 ErrorCode::TemporarilyUnavailable,
16498 ErrorCode::Internal,
16499 ],
16500 limit_ids: &["request_bytes", "response_bytes"],
16501 effect_class: "read_only",
16502 risk_flags: &[],
16503 capability_family: "diagnostics",
16504 retry_safety: "safe",
16505 identity_requirement: "request_locator",
16506 resolver: None,
16507 cancellation: "per_call",
16508 side_effects: &[],
16509 recovery: "retry",
16510 collection_index_ref: "none",
16511 },
16512 CommandSemanticContract {
16513 command: Command::CreateDiagnostic,
16514 admissible_errors: &[
16515 ErrorCode::Aborted,
16516 ErrorCode::DeadlineExceeded,
16517 ErrorCode::InvalidRequest,
16518 ErrorCode::UnsupportedVersion,
16519 ErrorCode::Unauthenticated,
16520 ErrorCode::PermissionDenied,
16521 ErrorCode::NotFound,
16522 ErrorCode::Conflict,
16523 ErrorCode::LimitExceeded,
16524 ErrorCode::CapabilityUnavailable,
16525 ErrorCode::NotSubmitted,
16526 ErrorCode::SubmittedIndeterminate,
16527 ErrorCode::ExpiredUnknown,
16528 ErrorCode::TemporarilyUnavailable,
16529 ErrorCode::Internal,
16530 ],
16531 limit_ids: &["request_bytes", "response_bytes"],
16532 effect_class: "durable_submit",
16533 risk_flags: &[],
16534 capability_family: "diagnostics",
16535 retry_safety: "pre_submit_only",
16536 identity_requirement: "none",
16537 resolver: None,
16538 cancellation: "per_call_until_submission_then_resolve",
16539 side_effects: &["commits_authoritative_state"],
16540 recovery: "retry_if_not_submitted",
16541 collection_index_ref: "none",
16542 },
16543 CommandSemanticContract {
16544 command: Command::GetDiagnostic,
16545 admissible_errors: &[
16546 ErrorCode::Aborted,
16547 ErrorCode::DeadlineExceeded,
16548 ErrorCode::InvalidRequest,
16549 ErrorCode::UnsupportedVersion,
16550 ErrorCode::Unauthenticated,
16551 ErrorCode::PermissionDenied,
16552 ErrorCode::NotFound,
16553 ErrorCode::LimitExceeded,
16554 ErrorCode::CapabilityUnavailable,
16555 ErrorCode::TemporarilyUnavailable,
16556 ErrorCode::Internal,
16557 ],
16558 limit_ids: &["request_bytes", "response_bytes"],
16559 effect_class: "read_only",
16560 risk_flags: &[],
16561 capability_family: "diagnostics",
16562 retry_safety: "safe",
16563 identity_requirement: "request_locator",
16564 resolver: None,
16565 cancellation: "per_call",
16566 side_effects: &[],
16567 recovery: "retry",
16568 collection_index_ref: "none",
16569 },
16570 CommandSemanticContract {
16571 command: Command::PrepareCollectionExport,
16572 admissible_errors: &[
16573 ErrorCode::Aborted,
16574 ErrorCode::DeadlineExceeded,
16575 ErrorCode::InvalidRequest,
16576 ErrorCode::UnsupportedVersion,
16577 ErrorCode::Unauthenticated,
16578 ErrorCode::PermissionDenied,
16579 ErrorCode::NotFound,
16580 ErrorCode::LimitExceeded,
16581 ErrorCode::CapabilityUnavailable,
16582 ErrorCode::TemporarilyUnavailable,
16583 ErrorCode::Internal,
16584 ],
16585 limit_ids: &[
16586 "request_bytes",
16587 "response_bytes",
16588 "collection_export_bytes",
16589 "portability_prefix_bytes",
16590 ],
16591 effect_class: "prepare",
16592 risk_flags: &[],
16593 capability_family: "portability",
16594 retry_safety: "safe",
16595 identity_requirement: "caller_action_id",
16596 resolver: None,
16597 cancellation: "per_call",
16598 side_effects: &[],
16599 recovery: "retry",
16600 collection_index_ref: "none",
16601 },
16602 CommandSemanticContract {
16603 command: Command::StartCollectionExport,
16604 admissible_errors: &[
16605 ErrorCode::Aborted,
16606 ErrorCode::DeadlineExceeded,
16607 ErrorCode::InvalidRequest,
16608 ErrorCode::UnsupportedVersion,
16609 ErrorCode::Unauthenticated,
16610 ErrorCode::PermissionDenied,
16611 ErrorCode::NotFound,
16612 ErrorCode::Conflict,
16613 ErrorCode::LimitExceeded,
16614 ErrorCode::CapabilityUnavailable,
16615 ErrorCode::NotSubmitted,
16616 ErrorCode::SubmittedIndeterminate,
16617 ErrorCode::ExpiredUnknown,
16618 ErrorCode::TemporarilyUnavailable,
16619 ErrorCode::Internal,
16620 ],
16621 limit_ids: &[
16622 "request_bytes",
16623 "response_bytes",
16624 "collection_export_bytes",
16625 "collection_export_documents",
16626 "portability_prefix_bytes",
16627 ],
16628 effect_class: "durable_submit",
16629 risk_flags: &[],
16630 capability_family: "portability",
16631 retry_safety: "pre_submit_only",
16632 identity_requirement: "caller_action_id",
16633 resolver: Some(Command::ResolveCollectionExport),
16634 cancellation: "per_call_until_submission_then_resolve",
16635 side_effects: &["commits_authoritative_state", "writes_external_artifact"],
16636 recovery: "resolve_with_resolve_collection_export",
16637 collection_index_ref: "none",
16638 },
16639 CommandSemanticContract {
16640 command: Command::ResolveCollectionExport,
16641 admissible_errors: &[
16642 ErrorCode::Aborted,
16643 ErrorCode::DeadlineExceeded,
16644 ErrorCode::InvalidRequest,
16645 ErrorCode::UnsupportedVersion,
16646 ErrorCode::Unauthenticated,
16647 ErrorCode::PermissionDenied,
16648 ErrorCode::NotFound,
16649 ErrorCode::LimitExceeded,
16650 ErrorCode::CapabilityUnavailable,
16651 ErrorCode::TemporarilyUnavailable,
16652 ErrorCode::Internal,
16653 ],
16654 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
16655 effect_class: "read_only",
16656 risk_flags: &[],
16657 capability_family: "portability",
16658 retry_safety: "safe",
16659 identity_requirement: "caller_action_id",
16660 resolver: None,
16661 cancellation: "per_call",
16662 side_effects: &[],
16663 recovery: "retry",
16664 collection_index_ref: "none",
16665 },
16666 CommandSemanticContract {
16667 command: Command::VerifyCollectionExport,
16668 admissible_errors: &[
16669 ErrorCode::Aborted,
16670 ErrorCode::DeadlineExceeded,
16671 ErrorCode::InvalidRequest,
16672 ErrorCode::UnsupportedVersion,
16673 ErrorCode::Unauthenticated,
16674 ErrorCode::PermissionDenied,
16675 ErrorCode::NotFound,
16676 ErrorCode::LimitExceeded,
16677 ErrorCode::CapabilityUnavailable,
16678 ErrorCode::ChecksumMismatch,
16679 ErrorCode::TemporarilyUnavailable,
16680 ErrorCode::Internal,
16681 ],
16682 limit_ids: &[
16683 "request_bytes",
16684 "response_bytes",
16685 "collection_export_bytes",
16686 "portability_prefix_bytes",
16687 ],
16688 effect_class: "read_only",
16689 risk_flags: &[],
16690 capability_family: "portability",
16691 retry_safety: "safe",
16692 identity_requirement: "request_locator",
16693 resolver: None,
16694 cancellation: "per_call",
16695 side_effects: &[],
16696 recovery: "retry",
16697 collection_index_ref: "none",
16698 },
16699 CommandSemanticContract {
16700 command: Command::PrepareCollectionExportRetirement,
16701 admissible_errors: &[
16702 ErrorCode::Aborted,
16703 ErrorCode::DeadlineExceeded,
16704 ErrorCode::InvalidRequest,
16705 ErrorCode::UnsupportedVersion,
16706 ErrorCode::Unauthenticated,
16707 ErrorCode::PermissionDenied,
16708 ErrorCode::NotFound,
16709 ErrorCode::Conflict,
16710 ErrorCode::LimitExceeded,
16711 ErrorCode::CapabilityUnavailable,
16712 ErrorCode::ChecksumMismatch,
16713 ErrorCode::TemporarilyUnavailable,
16714 ErrorCode::Internal,
16715 ],
16716 limit_ids: &[
16717 "request_bytes",
16718 "response_bytes",
16719 "collection_export_bytes",
16720 "portability_prefix_bytes",
16721 ],
16722 effect_class: "prepare",
16723 risk_flags: &["destructive"],
16724 capability_family: "portability",
16725 retry_safety: "safe",
16726 identity_requirement: "caller_action_id",
16727 resolver: None,
16728 cancellation: "per_call",
16729 side_effects: &[],
16730 recovery: "retry",
16731 collection_index_ref: "none",
16732 },
16733 CommandSemanticContract {
16734 command: Command::StartCollectionExportRetirement,
16735 admissible_errors: &[
16736 ErrorCode::Aborted,
16737 ErrorCode::DeadlineExceeded,
16738 ErrorCode::InvalidRequest,
16739 ErrorCode::UnsupportedVersion,
16740 ErrorCode::Unauthenticated,
16741 ErrorCode::PermissionDenied,
16742 ErrorCode::NotFound,
16743 ErrorCode::Conflict,
16744 ErrorCode::LimitExceeded,
16745 ErrorCode::CapabilityUnavailable,
16746 ErrorCode::NotSubmitted,
16747 ErrorCode::SubmittedIndeterminate,
16748 ErrorCode::ExpiredUnknown,
16749 ErrorCode::ChecksumMismatch,
16750 ErrorCode::TemporarilyUnavailable,
16751 ErrorCode::Internal,
16752 ],
16753 limit_ids: &[
16754 "request_bytes",
16755 "response_bytes",
16756 "collection_export_bytes",
16757 "portability_prefix_bytes",
16758 ],
16759 effect_class: "durable_submit",
16760 risk_flags: &["destructive"],
16761 capability_family: "portability",
16762 retry_safety: "pre_submit_only",
16763 identity_requirement: "caller_action_id",
16764 resolver: Some(Command::ResolveCollectionExportRetirement),
16765 cancellation: "per_call_until_submission_then_resolve",
16766 side_effects: &[
16767 "commits_authoritative_state",
16768 "deletes_external_artifact",
16769 "releases_key_capability_reference",
16770 ],
16771 recovery: "resolve_with_resolve_collection_export_retirement",
16772 collection_index_ref: "none",
16773 },
16774 CommandSemanticContract {
16775 command: Command::ResolveCollectionExportRetirement,
16776 admissible_errors: &[
16777 ErrorCode::Aborted,
16778 ErrorCode::DeadlineExceeded,
16779 ErrorCode::InvalidRequest,
16780 ErrorCode::UnsupportedVersion,
16781 ErrorCode::Unauthenticated,
16782 ErrorCode::PermissionDenied,
16783 ErrorCode::NotFound,
16784 ErrorCode::Conflict,
16785 ErrorCode::LimitExceeded,
16786 ErrorCode::CapabilityUnavailable,
16787 ErrorCode::TemporarilyUnavailable,
16788 ErrorCode::Internal,
16789 ],
16790 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
16791 effect_class: "read_only",
16792 risk_flags: &[],
16793 capability_family: "portability",
16794 retry_safety: "safe",
16795 identity_requirement: "caller_action_id",
16796 resolver: None,
16797 cancellation: "per_call",
16798 side_effects: &[],
16799 recovery: "retry",
16800 collection_index_ref: "none",
16801 },
16802 CommandSemanticContract {
16803 command: Command::PrepareCollectionRestore,
16804 admissible_errors: &[
16805 ErrorCode::Aborted,
16806 ErrorCode::DeadlineExceeded,
16807 ErrorCode::InvalidRequest,
16808 ErrorCode::UnsupportedVersion,
16809 ErrorCode::Unauthenticated,
16810 ErrorCode::PermissionDenied,
16811 ErrorCode::NotFound,
16812 ErrorCode::Conflict,
16813 ErrorCode::LimitExceeded,
16814 ErrorCode::CapabilityUnavailable,
16815 ErrorCode::ChecksumMismatch,
16816 ErrorCode::TemporarilyUnavailable,
16817 ErrorCode::Internal,
16818 ],
16819 limit_ids: &[
16820 "request_bytes",
16821 "response_bytes",
16822 "collection_export_bytes",
16823 "portability_prefix_bytes",
16824 ],
16825 effect_class: "prepare",
16826 risk_flags: &[],
16827 capability_family: "portability",
16828 retry_safety: "safe",
16829 identity_requirement: "caller_action_id",
16830 resolver: None,
16831 cancellation: "per_call",
16832 side_effects: &[],
16833 recovery: "retry",
16834 collection_index_ref: "none",
16835 },
16836 CommandSemanticContract {
16837 command: Command::StartCollectionRestore,
16838 admissible_errors: &[
16839 ErrorCode::Aborted,
16840 ErrorCode::DeadlineExceeded,
16841 ErrorCode::InvalidRequest,
16842 ErrorCode::UnsupportedVersion,
16843 ErrorCode::Unauthenticated,
16844 ErrorCode::PermissionDenied,
16845 ErrorCode::NotFound,
16846 ErrorCode::Conflict,
16847 ErrorCode::LimitExceeded,
16848 ErrorCode::CapabilityUnavailable,
16849 ErrorCode::NotSubmitted,
16850 ErrorCode::SubmittedIndeterminate,
16851 ErrorCode::ExpiredUnknown,
16852 ErrorCode::ChecksumMismatch,
16853 ErrorCode::TemporarilyUnavailable,
16854 ErrorCode::Internal,
16855 ],
16856 limit_ids: &[
16857 "request_bytes",
16858 "response_bytes",
16859 "collection_export_bytes",
16860 "collection_export_documents",
16861 "portability_prefix_bytes",
16862 ],
16863 effect_class: "durable_submit",
16864 risk_flags: &[],
16865 capability_family: "portability",
16866 retry_safety: "pre_submit_only",
16867 identity_requirement: "caller_action_id",
16868 resolver: Some(Command::ResolveCollectionRestore),
16869 cancellation: "per_call_until_submission_then_resolve",
16870 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
16871 recovery: "resolve_with_resolve_collection_restore",
16872 collection_index_ref: "none",
16873 },
16874 CommandSemanticContract {
16875 command: Command::ResolveCollectionRestore,
16876 admissible_errors: &[
16877 ErrorCode::Aborted,
16878 ErrorCode::DeadlineExceeded,
16879 ErrorCode::InvalidRequest,
16880 ErrorCode::UnsupportedVersion,
16881 ErrorCode::Unauthenticated,
16882 ErrorCode::PermissionDenied,
16883 ErrorCode::NotFound,
16884 ErrorCode::LimitExceeded,
16885 ErrorCode::CapabilityUnavailable,
16886 ErrorCode::TemporarilyUnavailable,
16887 ErrorCode::Internal,
16888 ],
16889 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
16890 effect_class: "read_only",
16891 risk_flags: &[],
16892 capability_family: "portability",
16893 retry_safety: "safe",
16894 identity_requirement: "caller_action_id",
16895 resolver: None,
16896 cancellation: "per_call",
16897 side_effects: &[],
16898 recovery: "retry",
16899 collection_index_ref: "none",
16900 },
16901 CommandSemanticContract {
16902 command: Command::PrepareCollectionTransferExport,
16903 admissible_errors: &[
16904 ErrorCode::Aborted,
16905 ErrorCode::DeadlineExceeded,
16906 ErrorCode::InvalidRequest,
16907 ErrorCode::UnsupportedVersion,
16908 ErrorCode::Unauthenticated,
16909 ErrorCode::PermissionDenied,
16910 ErrorCode::NotFound,
16911 ErrorCode::Conflict,
16912 ErrorCode::LimitExceeded,
16913 ErrorCode::CapabilityUnavailable,
16914 ErrorCode::TemporarilyUnavailable,
16915 ErrorCode::Internal,
16916 ],
16917 limit_ids: &[
16918 "request_bytes",
16919 "response_bytes",
16920 "collection_export_bytes",
16921 "portability_prefix_bytes",
16922 ],
16923 effect_class: "prepare",
16924 risk_flags: &[],
16925 capability_family: "portability",
16926 retry_safety: "safe",
16927 identity_requirement: "caller_action_id",
16928 resolver: None,
16929 cancellation: "per_call",
16930 side_effects: &[],
16931 recovery: "retry",
16932 collection_index_ref: "none",
16933 },
16934 CommandSemanticContract {
16935 command: Command::StartCollectionTransferExport,
16936 admissible_errors: &[
16937 ErrorCode::Aborted,
16938 ErrorCode::DeadlineExceeded,
16939 ErrorCode::InvalidRequest,
16940 ErrorCode::UnsupportedVersion,
16941 ErrorCode::Unauthenticated,
16942 ErrorCode::PermissionDenied,
16943 ErrorCode::NotFound,
16944 ErrorCode::Conflict,
16945 ErrorCode::LimitExceeded,
16946 ErrorCode::CapabilityUnavailable,
16947 ErrorCode::NotSubmitted,
16948 ErrorCode::SubmittedIndeterminate,
16949 ErrorCode::ExpiredUnknown,
16950 ErrorCode::TemporarilyUnavailable,
16951 ErrorCode::Internal,
16952 ],
16953 limit_ids: &[
16954 "request_bytes",
16955 "response_bytes",
16956 "collection_export_bytes",
16957 "collection_export_documents",
16958 "portability_prefix_bytes",
16959 ],
16960 effect_class: "durable_submit",
16961 risk_flags: &[],
16962 capability_family: "portability",
16963 retry_safety: "pre_submit_only",
16964 identity_requirement: "caller_action_id",
16965 resolver: Some(Command::ResolveCollectionTransferExport),
16966 cancellation: "per_call_until_submission_then_resolve",
16967 side_effects: &[
16968 "commits_authoritative_state",
16969 "closes_collection_admission",
16970 "writes_external_artifact",
16971 ],
16972 recovery: "resolve_with_resolve_collection_transfer_export",
16973 collection_index_ref: "none",
16974 },
16975 CommandSemanticContract {
16976 command: Command::ResolveCollectionTransferExport,
16977 admissible_errors: &[
16978 ErrorCode::Aborted,
16979 ErrorCode::DeadlineExceeded,
16980 ErrorCode::InvalidRequest,
16981 ErrorCode::UnsupportedVersion,
16982 ErrorCode::Unauthenticated,
16983 ErrorCode::PermissionDenied,
16984 ErrorCode::NotFound,
16985 ErrorCode::LimitExceeded,
16986 ErrorCode::CapabilityUnavailable,
16987 ErrorCode::ChecksumMismatch,
16988 ErrorCode::TemporarilyUnavailable,
16989 ErrorCode::Internal,
16990 ],
16991 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
16992 effect_class: "read_only",
16993 risk_flags: &[],
16994 capability_family: "portability",
16995 retry_safety: "safe",
16996 identity_requirement: "caller_action_id",
16997 resolver: None,
16998 cancellation: "per_call",
16999 side_effects: &[],
17000 recovery: "retry",
17001 collection_index_ref: "none",
17002 },
17003 CommandSemanticContract {
17004 command: Command::PrepareCollectionTransferRestore,
17005 admissible_errors: &[
17006 ErrorCode::Aborted,
17007 ErrorCode::DeadlineExceeded,
17008 ErrorCode::InvalidRequest,
17009 ErrorCode::UnsupportedVersion,
17010 ErrorCode::Unauthenticated,
17011 ErrorCode::PermissionDenied,
17012 ErrorCode::NotFound,
17013 ErrorCode::Conflict,
17014 ErrorCode::LimitExceeded,
17015 ErrorCode::CapabilityUnavailable,
17016 ErrorCode::ChecksumMismatch,
17017 ErrorCode::TemporarilyUnavailable,
17018 ErrorCode::Internal,
17019 ],
17020 limit_ids: &[
17021 "request_bytes",
17022 "response_bytes",
17023 "collection_export_bytes",
17024 "portability_prefix_bytes",
17025 ],
17026 effect_class: "prepare",
17027 risk_flags: &[],
17028 capability_family: "portability",
17029 retry_safety: "safe",
17030 identity_requirement: "caller_action_id",
17031 resolver: None,
17032 cancellation: "per_call",
17033 side_effects: &[],
17034 recovery: "retry",
17035 collection_index_ref: "none",
17036 },
17037 CommandSemanticContract {
17038 command: Command::StartCollectionTransferRestore,
17039 admissible_errors: &[
17040 ErrorCode::Aborted,
17041 ErrorCode::DeadlineExceeded,
17042 ErrorCode::InvalidRequest,
17043 ErrorCode::UnsupportedVersion,
17044 ErrorCode::Unauthenticated,
17045 ErrorCode::PermissionDenied,
17046 ErrorCode::NotFound,
17047 ErrorCode::Conflict,
17048 ErrorCode::LimitExceeded,
17049 ErrorCode::CapabilityUnavailable,
17050 ErrorCode::NotSubmitted,
17051 ErrorCode::SubmittedIndeterminate,
17052 ErrorCode::ExpiredUnknown,
17053 ErrorCode::ChecksumMismatch,
17054 ErrorCode::TemporarilyUnavailable,
17055 ErrorCode::Internal,
17056 ],
17057 limit_ids: &[
17058 "request_bytes",
17059 "response_bytes",
17060 "collection_export_bytes",
17061 "collection_export_documents",
17062 "portability_prefix_bytes",
17063 ],
17064 effect_class: "durable_submit",
17065 risk_flags: &[],
17066 capability_family: "portability",
17067 retry_safety: "pre_submit_only",
17068 identity_requirement: "caller_action_id",
17069 resolver: Some(Command::ResolveCollectionTransferRestore),
17070 cancellation: "per_call_until_submission_then_resolve",
17071 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
17072 recovery: "resolve_with_resolve_collection_transfer_restore",
17073 collection_index_ref: "none",
17074 },
17075 CommandSemanticContract {
17076 command: Command::ResolveCollectionTransferRestore,
17077 admissible_errors: &[
17078 ErrorCode::Aborted,
17079 ErrorCode::DeadlineExceeded,
17080 ErrorCode::InvalidRequest,
17081 ErrorCode::UnsupportedVersion,
17082 ErrorCode::Unauthenticated,
17083 ErrorCode::PermissionDenied,
17084 ErrorCode::NotFound,
17085 ErrorCode::LimitExceeded,
17086 ErrorCode::CapabilityUnavailable,
17087 ErrorCode::ChecksumMismatch,
17088 ErrorCode::TemporarilyUnavailable,
17089 ErrorCode::Internal,
17090 ],
17091 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
17092 effect_class: "read_only",
17093 risk_flags: &[],
17094 capability_family: "portability",
17095 retry_safety: "safe",
17096 identity_requirement: "caller_action_id",
17097 resolver: None,
17098 cancellation: "per_call",
17099 side_effects: &[],
17100 recovery: "retry",
17101 collection_index_ref: "none",
17102 },
17103 CommandSemanticContract {
17104 command: Command::PrepareCollectionStandbyAdmission,
17105 admissible_errors: &[
17106 ErrorCode::Aborted,
17107 ErrorCode::DeadlineExceeded,
17108 ErrorCode::InvalidRequest,
17109 ErrorCode::UnsupportedVersion,
17110 ErrorCode::Unauthenticated,
17111 ErrorCode::PermissionDenied,
17112 ErrorCode::NotFound,
17113 ErrorCode::Conflict,
17114 ErrorCode::LimitExceeded,
17115 ErrorCode::CapabilityUnavailable,
17116 ErrorCode::ChecksumMismatch,
17117 ErrorCode::TemporarilyUnavailable,
17118 ErrorCode::Internal,
17119 ],
17120 limit_ids: &[
17121 "request_bytes",
17122 "response_bytes",
17123 "collection_export_bytes",
17124 "portability_prefix_bytes",
17125 ],
17126 effect_class: "prepare",
17127 risk_flags: &[],
17128 capability_family: "portability",
17129 retry_safety: "safe",
17130 identity_requirement: "caller_action_id",
17131 resolver: None,
17132 cancellation: "per_call",
17133 side_effects: &[],
17134 recovery: "retry",
17135 collection_index_ref: "none",
17136 },
17137 CommandSemanticContract {
17138 command: Command::StartCollectionStandbyAdmission,
17139 admissible_errors: &[
17140 ErrorCode::Aborted,
17141 ErrorCode::DeadlineExceeded,
17142 ErrorCode::InvalidRequest,
17143 ErrorCode::UnsupportedVersion,
17144 ErrorCode::Unauthenticated,
17145 ErrorCode::PermissionDenied,
17146 ErrorCode::NotFound,
17147 ErrorCode::Conflict,
17148 ErrorCode::LimitExceeded,
17149 ErrorCode::CapabilityUnavailable,
17150 ErrorCode::NotSubmitted,
17151 ErrorCode::SubmittedIndeterminate,
17152 ErrorCode::ExpiredUnknown,
17153 ErrorCode::ChecksumMismatch,
17154 ErrorCode::TemporarilyUnavailable,
17155 ErrorCode::Internal,
17156 ],
17157 limit_ids: &[
17158 "request_bytes",
17159 "response_bytes",
17160 "collection_export_bytes",
17161 "portability_prefix_bytes",
17162 ],
17163 effect_class: "durable_submit",
17164 risk_flags: &[],
17165 capability_family: "portability",
17166 retry_safety: "pre_submit_only",
17167 identity_requirement: "caller_action_id",
17168 resolver: Some(Command::ResolveCollectionStandbyAdmission),
17169 cancellation: "per_call_until_submission_then_resolve",
17170 side_effects: &["commits_authoritative_state"],
17171 recovery: "resolve_with_resolve_collection_standby_admission",
17172 collection_index_ref: "none",
17173 },
17174 CommandSemanticContract {
17175 command: Command::ResolveCollectionStandbyAdmission,
17176 admissible_errors: &[
17177 ErrorCode::Aborted,
17178 ErrorCode::DeadlineExceeded,
17179 ErrorCode::InvalidRequest,
17180 ErrorCode::UnsupportedVersion,
17181 ErrorCode::Unauthenticated,
17182 ErrorCode::PermissionDenied,
17183 ErrorCode::NotFound,
17184 ErrorCode::Conflict,
17185 ErrorCode::LimitExceeded,
17186 ErrorCode::CapabilityUnavailable,
17187 ErrorCode::ChecksumMismatch,
17188 ErrorCode::TemporarilyUnavailable,
17189 ErrorCode::Internal,
17190 ],
17191 limit_ids: &[
17192 "request_bytes",
17193 "response_bytes",
17194 "collection_export_bytes",
17195 "portability_prefix_bytes",
17196 ],
17197 effect_class: "read_only",
17198 risk_flags: &[],
17199 capability_family: "portability",
17200 retry_safety: "safe",
17201 identity_requirement: "caller_action_id",
17202 resolver: None,
17203 cancellation: "per_call",
17204 side_effects: &[],
17205 recovery: "retry",
17206 collection_index_ref: "none",
17207 },
17208 CommandSemanticContract {
17209 command: Command::PrepareCollectionStandbyActivation,
17210 admissible_errors: &[
17211 ErrorCode::Aborted,
17212 ErrorCode::DeadlineExceeded,
17213 ErrorCode::InvalidRequest,
17214 ErrorCode::UnsupportedVersion,
17215 ErrorCode::Unauthenticated,
17216 ErrorCode::PermissionDenied,
17217 ErrorCode::NotFound,
17218 ErrorCode::Conflict,
17219 ErrorCode::LimitExceeded,
17220 ErrorCode::CapabilityUnavailable,
17221 ErrorCode::TemporarilyUnavailable,
17222 ErrorCode::Internal,
17223 ],
17224 limit_ids: &["request_bytes", "response_bytes"],
17225 effect_class: "prepare",
17226 risk_flags: &[],
17227 capability_family: "portability",
17228 retry_safety: "safe",
17229 identity_requirement: "caller_action_id",
17230 resolver: None,
17231 cancellation: "per_call",
17232 side_effects: &[],
17233 recovery: "retry",
17234 collection_index_ref: "none",
17235 },
17236 CommandSemanticContract {
17237 command: Command::StartCollectionStandbyActivation,
17238 admissible_errors: &[
17239 ErrorCode::Aborted,
17240 ErrorCode::DeadlineExceeded,
17241 ErrorCode::InvalidRequest,
17242 ErrorCode::UnsupportedVersion,
17243 ErrorCode::Unauthenticated,
17244 ErrorCode::PermissionDenied,
17245 ErrorCode::NotFound,
17246 ErrorCode::Conflict,
17247 ErrorCode::LimitExceeded,
17248 ErrorCode::CapabilityUnavailable,
17249 ErrorCode::NotSubmitted,
17250 ErrorCode::SubmittedIndeterminate,
17251 ErrorCode::ExpiredUnknown,
17252 ErrorCode::TemporarilyUnavailable,
17253 ErrorCode::Internal,
17254 ],
17255 limit_ids: &["request_bytes", "response_bytes"],
17256 effect_class: "durable_submit",
17257 risk_flags: &[],
17258 capability_family: "portability",
17259 retry_safety: "pre_submit_only",
17260 identity_requirement: "caller_action_id",
17261 resolver: Some(Command::ResolveCollectionStandbyActivation),
17262 cancellation: "per_call_until_submission_then_resolve",
17263 side_effects: &["commits_authoritative_state"],
17264 recovery: "resolve_with_resolve_collection_standby_activation",
17265 collection_index_ref: "none",
17266 },
17267 CommandSemanticContract {
17268 command: Command::ResolveCollectionStandbyActivation,
17269 admissible_errors: &[
17270 ErrorCode::Aborted,
17271 ErrorCode::DeadlineExceeded,
17272 ErrorCode::InvalidRequest,
17273 ErrorCode::UnsupportedVersion,
17274 ErrorCode::Unauthenticated,
17275 ErrorCode::PermissionDenied,
17276 ErrorCode::NotFound,
17277 ErrorCode::Conflict,
17278 ErrorCode::LimitExceeded,
17279 ErrorCode::CapabilityUnavailable,
17280 ErrorCode::TemporarilyUnavailable,
17281 ErrorCode::Internal,
17282 ],
17283 limit_ids: &["request_bytes", "response_bytes"],
17284 effect_class: "read_only",
17285 risk_flags: &[],
17286 capability_family: "portability",
17287 retry_safety: "safe",
17288 identity_requirement: "caller_action_id",
17289 resolver: None,
17290 cancellation: "per_call",
17291 side_effects: &[],
17292 recovery: "retry",
17293 collection_index_ref: "none",
17294 },
17295 CommandSemanticContract {
17296 command: Command::PrepareIndexExport,
17297 admissible_errors: &[
17298 ErrorCode::Aborted,
17299 ErrorCode::DeadlineExceeded,
17300 ErrorCode::InvalidRequest,
17301 ErrorCode::UnsupportedVersion,
17302 ErrorCode::Unauthenticated,
17303 ErrorCode::PermissionDenied,
17304 ErrorCode::NotFound,
17305 ErrorCode::LimitExceeded,
17306 ErrorCode::CapabilityUnavailable,
17307 ErrorCode::TemporarilyUnavailable,
17308 ErrorCode::Internal,
17309 ],
17310 limit_ids: &[
17311 "request_bytes",
17312 "response_bytes",
17313 "index_transfer_bytes",
17314 "index_transfer_records",
17315 "index_transfer_pages",
17316 "portability_prefix_bytes",
17317 ],
17318 effect_class: "prepare",
17319 risk_flags: &[],
17320 capability_family: "portability",
17321 retry_safety: "safe",
17322 identity_requirement: "caller_action_id",
17323 resolver: None,
17324 cancellation: "per_call",
17325 side_effects: &[],
17326 recovery: "retry",
17327 collection_index_ref: "request_index",
17328 },
17329 CommandSemanticContract {
17330 command: Command::StartIndexExport,
17331 admissible_errors: &[
17332 ErrorCode::Aborted,
17333 ErrorCode::DeadlineExceeded,
17334 ErrorCode::InvalidRequest,
17335 ErrorCode::UnsupportedVersion,
17336 ErrorCode::Unauthenticated,
17337 ErrorCode::PermissionDenied,
17338 ErrorCode::NotFound,
17339 ErrorCode::Conflict,
17340 ErrorCode::LimitExceeded,
17341 ErrorCode::CapabilityUnavailable,
17342 ErrorCode::NotSubmitted,
17343 ErrorCode::SubmittedIndeterminate,
17344 ErrorCode::ExpiredUnknown,
17345 ErrorCode::TemporarilyUnavailable,
17346 ErrorCode::Internal,
17347 ],
17348 limit_ids: &[
17349 "request_bytes",
17350 "response_bytes",
17351 "index_transfer_bytes",
17352 "index_transfer_records",
17353 "index_transfer_pages",
17354 "portability_prefix_bytes",
17355 ],
17356 effect_class: "durable_submit",
17357 risk_flags: &[],
17358 capability_family: "portability",
17359 retry_safety: "pre_submit_only",
17360 identity_requirement: "caller_action_id",
17361 resolver: Some(Command::ResolveIndexExport),
17362 cancellation: "per_call_until_submission_then_resolve",
17363 side_effects: &["commits_authoritative_state", "writes_external_artifact"],
17364 recovery: "resolve_with_resolve_index_export",
17365 collection_index_ref: "request_index",
17366 },
17367 CommandSemanticContract {
17368 command: Command::ResolveIndexExport,
17369 admissible_errors: &[
17370 ErrorCode::Aborted,
17371 ErrorCode::DeadlineExceeded,
17372 ErrorCode::InvalidRequest,
17373 ErrorCode::UnsupportedVersion,
17374 ErrorCode::Unauthenticated,
17375 ErrorCode::PermissionDenied,
17376 ErrorCode::NotFound,
17377 ErrorCode::LimitExceeded,
17378 ErrorCode::CapabilityUnavailable,
17379 ErrorCode::ChecksumMismatch,
17380 ErrorCode::TemporarilyUnavailable,
17381 ErrorCode::Internal,
17382 ],
17383 limit_ids: &[
17384 "request_bytes",
17385 "response_bytes",
17386 "index_transfer_bytes",
17387 "index_transfer_pages",
17388 "portability_prefix_bytes",
17389 ],
17390 effect_class: "read_only",
17391 risk_flags: &[],
17392 capability_family: "portability",
17393 retry_safety: "safe",
17394 identity_requirement: "caller_action_id",
17395 resolver: None,
17396 cancellation: "per_call",
17397 side_effects: &[],
17398 recovery: "retry",
17399 collection_index_ref: "request_index",
17400 },
17401 CommandSemanticContract {
17402 command: Command::VerifyIndexExport,
17403 admissible_errors: &[
17404 ErrorCode::Aborted,
17405 ErrorCode::DeadlineExceeded,
17406 ErrorCode::InvalidRequest,
17407 ErrorCode::UnsupportedVersion,
17408 ErrorCode::Unauthenticated,
17409 ErrorCode::PermissionDenied,
17410 ErrorCode::NotFound,
17411 ErrorCode::LimitExceeded,
17412 ErrorCode::CapabilityUnavailable,
17413 ErrorCode::ChecksumMismatch,
17414 ErrorCode::TemporarilyUnavailable,
17415 ErrorCode::Internal,
17416 ],
17417 limit_ids: &[
17418 "request_bytes",
17419 "response_bytes",
17420 "index_transfer_bytes",
17421 "index_transfer_pages",
17422 "portability_prefix_bytes",
17423 ],
17424 effect_class: "read_only",
17425 risk_flags: &[],
17426 capability_family: "portability",
17427 retry_safety: "safe",
17428 identity_requirement: "request_locator",
17429 resolver: None,
17430 cancellation: "per_call",
17431 side_effects: &[],
17432 recovery: "retry",
17433 collection_index_ref: "request_artifact_source_index",
17434 },
17435 CommandSemanticContract {
17436 command: Command::PrepareIndexImport,
17437 admissible_errors: &[
17438 ErrorCode::Aborted,
17439 ErrorCode::DeadlineExceeded,
17440 ErrorCode::InvalidRequest,
17441 ErrorCode::UnsupportedVersion,
17442 ErrorCode::Unauthenticated,
17443 ErrorCode::PermissionDenied,
17444 ErrorCode::NotFound,
17445 ErrorCode::Conflict,
17446 ErrorCode::LimitExceeded,
17447 ErrorCode::CapabilityUnavailable,
17448 ErrorCode::ChecksumMismatch,
17449 ErrorCode::TemporarilyUnavailable,
17450 ErrorCode::Internal,
17451 ],
17452 limit_ids: &[
17453 "request_bytes",
17454 "response_bytes",
17455 "index_transfer_bytes",
17456 "index_transfer_pages",
17457 "portability_prefix_bytes",
17458 "resource_initial_shards",
17459 "resource_target_shard_bytes",
17460 "resource_admission_weight",
17461 "resource_ram_bytes",
17462 "resource_nvme_bytes",
17463 "resource_refresh_millis",
17464 "resource_memtable_bytes",
17465 "resource_parallelism",
17466 ],
17467 effect_class: "prepare",
17468 risk_flags: &[],
17469 capability_family: "portability",
17470 retry_safety: "safe",
17471 identity_requirement: "caller_action_id",
17472 resolver: None,
17473 cancellation: "per_call",
17474 side_effects: &[],
17475 recovery: "retry",
17476 collection_index_ref: "request_destination_name",
17477 },
17478 CommandSemanticContract {
17479 command: Command::StartIndexImport,
17480 admissible_errors: &[
17481 ErrorCode::Aborted,
17482 ErrorCode::DeadlineExceeded,
17483 ErrorCode::InvalidRequest,
17484 ErrorCode::UnsupportedVersion,
17485 ErrorCode::Unauthenticated,
17486 ErrorCode::PermissionDenied,
17487 ErrorCode::NotFound,
17488 ErrorCode::Conflict,
17489 ErrorCode::LimitExceeded,
17490 ErrorCode::CapabilityUnavailable,
17491 ErrorCode::NotSubmitted,
17492 ErrorCode::SubmittedIndeterminate,
17493 ErrorCode::ExpiredUnknown,
17494 ErrorCode::ChecksumMismatch,
17495 ErrorCode::TemporarilyUnavailable,
17496 ErrorCode::Internal,
17497 ],
17498 limit_ids: &[
17499 "request_bytes",
17500 "response_bytes",
17501 "index_transfer_bytes",
17502 "index_transfer_pages",
17503 "portability_prefix_bytes",
17504 "resource_initial_shards",
17505 "resource_target_shard_bytes",
17506 "resource_admission_weight",
17507 "resource_ram_bytes",
17508 "resource_nvme_bytes",
17509 "resource_refresh_millis",
17510 "resource_memtable_bytes",
17511 "resource_parallelism",
17512 ],
17513 effect_class: "durable_submit",
17514 risk_flags: &[],
17515 capability_family: "portability",
17516 retry_safety: "pre_submit_only",
17517 identity_requirement: "caller_action_id",
17518 resolver: Some(Command::ResolveIndexImport),
17519 cancellation: "per_call_until_submission_then_resolve",
17520 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
17521 recovery: "resolve_with_resolve_index_import",
17522 collection_index_ref: "request_destination_name",
17523 },
17524 CommandSemanticContract {
17525 command: Command::ResolveIndexImport,
17526 admissible_errors: &[
17527 ErrorCode::Aborted,
17528 ErrorCode::DeadlineExceeded,
17529 ErrorCode::InvalidRequest,
17530 ErrorCode::UnsupportedVersion,
17531 ErrorCode::Unauthenticated,
17532 ErrorCode::PermissionDenied,
17533 ErrorCode::NotFound,
17534 ErrorCode::LimitExceeded,
17535 ErrorCode::CapabilityUnavailable,
17536 ErrorCode::ChecksumMismatch,
17537 ErrorCode::TemporarilyUnavailable,
17538 ErrorCode::Internal,
17539 ],
17540 limit_ids: &[
17541 "request_bytes",
17542 "response_bytes",
17543 "index_transfer_bytes",
17544 "index_transfer_pages",
17545 "portability_prefix_bytes",
17546 ],
17547 effect_class: "read_only",
17548 risk_flags: &[],
17549 capability_family: "portability",
17550 retry_safety: "safe",
17551 identity_requirement: "caller_action_id",
17552 resolver: None,
17553 cancellation: "per_call",
17554 side_effects: &[],
17555 recovery: "retry",
17556 collection_index_ref: "request_destination_name",
17557 },
17558 CommandSemanticContract {
17559 command: Command::ReadArtifactChunk,
17560 admissible_errors: &[
17561 ErrorCode::Aborted,
17562 ErrorCode::DeadlineExceeded,
17563 ErrorCode::InvalidRequest,
17564 ErrorCode::UnsupportedVersion,
17565 ErrorCode::Unauthenticated,
17566 ErrorCode::PermissionDenied,
17567 ErrorCode::NotFound,
17568 ErrorCode::LimitExceeded,
17569 ErrorCode::CapabilityUnavailable,
17570 ErrorCode::ArtifactRangeInvalid,
17571 ErrorCode::ChecksumMismatch,
17572 ErrorCode::TemporarilyUnavailable,
17573 ErrorCode::Internal,
17574 ],
17575 limit_ids: &["request_bytes", "response_bytes", "artifact_chunk_bytes"],
17576 effect_class: "read_only",
17577 risk_flags: &[],
17578 capability_family: "operations",
17579 retry_safety: "safe",
17580 identity_requirement: "none",
17581 resolver: None,
17582 cancellation: "per_call",
17583 side_effects: &[],
17584 recovery: "retry",
17585 collection_index_ref: "none",
17586 },
17587 CommandSemanticContract {
17588 command: Command::ExportUsage,
17589 admissible_errors: &[
17590 ErrorCode::Aborted,
17591 ErrorCode::DeadlineExceeded,
17592 ErrorCode::InvalidRequest,
17593 ErrorCode::UnsupportedVersion,
17594 ErrorCode::Unauthenticated,
17595 ErrorCode::PermissionDenied,
17596 ErrorCode::NotFound,
17597 ErrorCode::StaleCursor,
17598 ErrorCode::RestartBudgetExhausted,
17599 ErrorCode::LimitExceeded,
17600 ErrorCode::CapabilityUnavailable,
17601 ErrorCode::TemporarilyUnavailable,
17602 ErrorCode::Internal,
17603 ],
17604 limit_ids: &["request_bytes", "response_bytes", "page_size"],
17605 effect_class: "read_only",
17606 risk_flags: &[],
17607 capability_family: "usage",
17608 retry_safety: "safe",
17609 identity_requirement: "none",
17610 resolver: None,
17611 cancellation: "per_call",
17612 side_effects: &[],
17613 recovery: "retry",
17614 collection_index_ref: "none",
17615 },
17616 CommandSemanticContract {
17617 command: Command::GetStorageUsage,
17618 admissible_errors: &[
17619 ErrorCode::Aborted,
17620 ErrorCode::DeadlineExceeded,
17621 ErrorCode::Unauthenticated,
17622 ErrorCode::PermissionDenied,
17623 ErrorCode::NotFound,
17624 ErrorCode::LimitExceeded,
17625 ErrorCode::CapabilityUnavailable,
17626 ErrorCode::TemporarilyUnavailable,
17627 ErrorCode::Internal,
17628 ],
17629 limit_ids: &["request_bytes", "response_bytes"],
17630 effect_class: "read_only",
17631 risk_flags: &[],
17632 capability_family: "usage",
17633 retry_safety: "safe",
17634 identity_requirement: "none",
17635 resolver: None,
17636 cancellation: "per_call",
17637 side_effects: &[],
17638 recovery: "retry",
17639 collection_index_ref: "none",
17640 },
17641 CommandSemanticContract {
17642 command: Command::ReadLogicalOccupancy,
17643 admissible_errors: &[
17644 ErrorCode::Aborted,
17645 ErrorCode::DeadlineExceeded,
17646 ErrorCode::InvalidRequest,
17647 ErrorCode::UnsupportedVersion,
17648 ErrorCode::Unauthenticated,
17649 ErrorCode::PermissionDenied,
17650 ErrorCode::NotFound,
17651 ErrorCode::StaleCursor,
17652 ErrorCode::LimitExceeded,
17653 ErrorCode::CapabilityUnavailable,
17654 ErrorCode::TemporarilyUnavailable,
17655 ErrorCode::Internal,
17656 ],
17657 limit_ids: &["request_bytes", "response_bytes", "page_size", "search_result_window"],
17658 effect_class: "read_only",
17659 risk_flags: &[],
17660 capability_family: "usage",
17661 retry_safety: "safe",
17662 identity_requirement: "none",
17663 resolver: None,
17664 cancellation: "per_call",
17665 side_effects: &[],
17666 recovery: "retry",
17667 collection_index_ref: "request_index",
17668 },
17669 CommandSemanticContract {
17670 command: Command::ExecuteStateRead,
17671 admissible_errors: &[
17672 ErrorCode::Aborted,
17673 ErrorCode::DeadlineExceeded,
17674 ErrorCode::InvalidRequest,
17675 ErrorCode::UnsupportedVersion,
17676 ErrorCode::Unauthenticated,
17677 ErrorCode::PermissionDenied,
17678 ErrorCode::NotFound,
17679 ErrorCode::LimitExceeded,
17680 ErrorCode::CapabilityUnavailable,
17681 ErrorCode::TemporarilyUnavailable,
17682 ErrorCode::Internal,
17683 ],
17684 limit_ids: &[
17685 "request_bytes",
17686 "response_bytes",
17687 "state_command_keys",
17688 "state_command_value_bytes",
17689 ],
17690 effect_class: "read_only",
17691 risk_flags: &[],
17692 capability_family: "data",
17693 retry_safety: "safe",
17694 identity_requirement: "none",
17695 resolver: None,
17696 cancellation: "per_call",
17697 side_effects: &[],
17698 recovery: "retry",
17699 collection_index_ref: "request_index",
17700 },
17701 CommandSemanticContract {
17702 command: Command::PrepareStateWrite,
17703 admissible_errors: &[
17704 ErrorCode::Aborted,
17705 ErrorCode::DeadlineExceeded,
17706 ErrorCode::InvalidRequest,
17707 ErrorCode::UnsupportedVersion,
17708 ErrorCode::Unauthenticated,
17709 ErrorCode::PermissionDenied,
17710 ErrorCode::NotFound,
17711 ErrorCode::LimitExceeded,
17712 ErrorCode::CapabilityUnavailable,
17713 ErrorCode::TemporarilyUnavailable,
17714 ErrorCode::Internal,
17715 ],
17716 limit_ids: &[
17717 "request_bytes",
17718 "response_bytes",
17719 "state_command_keys",
17720 "state_command_value_bytes",
17721 ],
17722 effect_class: "prepare",
17723 risk_flags: &[],
17724 capability_family: "data",
17725 retry_safety: "safe",
17726 identity_requirement: "caller_action_id",
17727 resolver: None,
17728 cancellation: "per_call",
17729 side_effects: &["creates_bounded_preparation"],
17730 recovery: "retry",
17731 collection_index_ref: "request_index",
17732 },
17733 CommandSemanticContract {
17734 command: Command::SubmitStateWrite,
17735 admissible_errors: &[
17736 ErrorCode::Aborted,
17737 ErrorCode::DeadlineExceeded,
17738 ErrorCode::InvalidRequest,
17739 ErrorCode::UnsupportedVersion,
17740 ErrorCode::Unauthenticated,
17741 ErrorCode::PermissionDenied,
17742 ErrorCode::NotFound,
17743 ErrorCode::Conflict,
17744 ErrorCode::LimitExceeded,
17745 ErrorCode::CapabilityUnavailable,
17746 ErrorCode::NotSubmitted,
17747 ErrorCode::SubmittedIndeterminate,
17748 ErrorCode::ExpiredUnknown,
17749 ErrorCode::TemporarilyUnavailable,
17750 ErrorCode::Internal,
17751 ],
17752 limit_ids: &[
17753 "request_bytes",
17754 "response_bytes",
17755 "state_command_keys",
17756 "state_command_value_bytes",
17757 ],
17758 effect_class: "durable_submit",
17759 risk_flags: &[],
17760 capability_family: "data",
17761 retry_safety: "pre_submit_only",
17762 identity_requirement: "request_locator",
17763 resolver: Some(Command::ResolveStateWrite),
17764 cancellation: "per_call_until_submission_then_resolve",
17765 side_effects: &["commits_authoritative_state"],
17766 recovery: "resolve_with_resolve_state_write",
17767 collection_index_ref: "request_index",
17768 },
17769 CommandSemanticContract {
17770 command: Command::ResolveStateWrite,
17771 admissible_errors: &[
17772 ErrorCode::Aborted,
17773 ErrorCode::DeadlineExceeded,
17774 ErrorCode::InvalidRequest,
17775 ErrorCode::UnsupportedVersion,
17776 ErrorCode::Unauthenticated,
17777 ErrorCode::PermissionDenied,
17778 ErrorCode::NotFound,
17779 ErrorCode::LimitExceeded,
17780 ErrorCode::CapabilityUnavailable,
17781 ErrorCode::TemporarilyUnavailable,
17782 ErrorCode::Internal,
17783 ],
17784 limit_ids: &[
17785 "request_bytes",
17786 "response_bytes",
17787 "state_command_keys",
17788 "state_command_value_bytes",
17789 ],
17790 effect_class: "read_only",
17791 risk_flags: &[],
17792 capability_family: "data",
17793 retry_safety: "safe",
17794 identity_requirement: "request_locator",
17795 resolver: None,
17796 cancellation: "per_call",
17797 side_effects: &[],
17798 recovery: "retry",
17799 collection_index_ref: "request_index",
17800 },
17801];
17802#[derive(Clone, Copy, Debug, Eq, PartialEq)]
17803pub struct CommandOutcomeContract {
17804 pub command: Command,
17805 pub possible_submission_states: &'static [&'static str],
17806 pub identity_requirement: &'static str,
17807 pub resolver_command: Option<Command>,
17808 pub cancellation: &'static str,
17809}
17810pub const LODESTONE_API_COMMAND_OUTCOMES: &[CommandOutcomeContract] = &[
17811 CommandOutcomeContract {
17812 command: Command::Discover,
17813 possible_submission_states: &["not_submitted", "resolved"],
17814 identity_requirement: "none",
17815 resolver_command: None,
17816 cancellation: "per_call",
17817 },
17818 CommandOutcomeContract {
17819 command: Command::ListIndexes,
17820 possible_submission_states: &["not_submitted", "resolved"],
17821 identity_requirement: "none",
17822 resolver_command: None,
17823 cancellation: "per_call",
17824 },
17825 CommandOutcomeContract {
17826 command: Command::GetIndex,
17827 possible_submission_states: &["not_submitted", "resolved"],
17828 identity_requirement: "none",
17829 resolver_command: None,
17830 cancellation: "per_call",
17831 },
17832 CommandOutcomeContract {
17833 command: Command::ValidateIndexChange,
17834 possible_submission_states: &["not_submitted", "resolved"],
17835 identity_requirement: "none",
17836 resolver_command: None,
17837 cancellation: "per_call",
17838 },
17839 CommandOutcomeContract {
17840 command: Command::ApplyIndexChange,
17841 possible_submission_states: &[
17842 "not_submitted",
17843 "submitted",
17844 "known_retired",
17845 "indeterminate",
17846 "resolved",
17847 ],
17848 identity_requirement: "caller_action_id",
17849 resolver_command: Some(Command::ResolveIndexChange),
17850 cancellation: "per_call_until_submission_then_resolve",
17851 },
17852 CommandOutcomeContract {
17853 command: Command::ResolveIndexChange,
17854 possible_submission_states: &["not_submitted", "resolved"],
17855 identity_requirement: "caller_action_id",
17856 resolver_command: None,
17857 cancellation: "per_call",
17858 },
17859 CommandOutcomeContract {
17860 command: Command::ApplyAdministrationMutation,
17861 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
17862 identity_requirement: "caller_action_id",
17863 resolver_command: None,
17864 cancellation: "per_call_until_submission_then_resolve",
17865 },
17866 CommandOutcomeContract {
17867 command: Command::ListAliases,
17868 possible_submission_states: &["not_submitted", "resolved"],
17869 identity_requirement: "none",
17870 resolver_command: None,
17871 cancellation: "per_call",
17872 },
17873 CommandOutcomeContract {
17874 command: Command::GetAlias,
17875 possible_submission_states: &["not_submitted", "resolved"],
17876 identity_requirement: "none",
17877 resolver_command: None,
17878 cancellation: "per_call",
17879 },
17880 CommandOutcomeContract {
17881 command: Command::ListDataStreams,
17882 possible_submission_states: &["not_submitted", "resolved"],
17883 identity_requirement: "none",
17884 resolver_command: None,
17885 cancellation: "per_call",
17886 },
17887 CommandOutcomeContract {
17888 command: Command::GetDataStream,
17889 possible_submission_states: &["not_submitted", "resolved"],
17890 identity_requirement: "none",
17891 resolver_command: None,
17892 cancellation: "per_call",
17893 },
17894 CommandOutcomeContract {
17895 command: Command::ListComponentTemplates,
17896 possible_submission_states: &["not_submitted", "resolved"],
17897 identity_requirement: "none",
17898 resolver_command: None,
17899 cancellation: "per_call",
17900 },
17901 CommandOutcomeContract {
17902 command: Command::GetComponentTemplate,
17903 possible_submission_states: &["not_submitted", "resolved"],
17904 identity_requirement: "none",
17905 resolver_command: None,
17906 cancellation: "per_call",
17907 },
17908 CommandOutcomeContract {
17909 command: Command::ListIndexTemplates,
17910 possible_submission_states: &["not_submitted", "resolved"],
17911 identity_requirement: "none",
17912 resolver_command: None,
17913 cancellation: "per_call",
17914 },
17915 CommandOutcomeContract {
17916 command: Command::GetIndexTemplate,
17917 possible_submission_states: &["not_submitted", "resolved"],
17918 identity_requirement: "none",
17919 resolver_command: None,
17920 cancellation: "per_call",
17921 },
17922 CommandOutcomeContract {
17923 command: Command::ListIngestPipelines,
17924 possible_submission_states: &["not_submitted", "resolved"],
17925 identity_requirement: "none",
17926 resolver_command: None,
17927 cancellation: "per_call",
17928 },
17929 CommandOutcomeContract {
17930 command: Command::GetIngestPipeline,
17931 possible_submission_states: &["not_submitted", "resolved"],
17932 identity_requirement: "none",
17933 resolver_command: None,
17934 cancellation: "per_call",
17935 },
17936 CommandOutcomeContract {
17937 command: Command::SimulateIngestPipeline,
17938 possible_submission_states: &["not_submitted", "resolved"],
17939 identity_requirement: "none",
17940 resolver_command: None,
17941 cancellation: "per_call",
17942 },
17943 CommandOutcomeContract {
17944 command: Command::ReprocessByQuery,
17945 possible_submission_states: &[
17946 "not_submitted",
17947 "submitted",
17948 "known_retired",
17949 "indeterminate",
17950 "resolved",
17951 ],
17952 identity_requirement: "caller_action_id",
17953 resolver_command: None,
17954 cancellation: "per_call_until_submission_then_resolve",
17955 },
17956 CommandOutcomeContract {
17957 command: Command::ListLifecyclePolicies,
17958 possible_submission_states: &["not_submitted", "resolved"],
17959 identity_requirement: "none",
17960 resolver_command: None,
17961 cancellation: "per_call",
17962 },
17963 CommandOutcomeContract {
17964 command: Command::GetLifecyclePolicy,
17965 possible_submission_states: &["not_submitted", "resolved"],
17966 identity_requirement: "none",
17967 resolver_command: None,
17968 cancellation: "per_call",
17969 },
17970 CommandOutcomeContract {
17971 command: Command::PrepareCreateIndex,
17972 possible_submission_states: &["not_submitted", "resolved"],
17973 identity_requirement: "server_locator",
17974 resolver_command: None,
17975 cancellation: "per_call",
17976 },
17977 CommandOutcomeContract {
17978 command: Command::PrepareDeleteIndex,
17979 possible_submission_states: &["not_submitted", "resolved"],
17980 identity_requirement: "server_locator",
17981 resolver_command: None,
17982 cancellation: "per_call",
17983 },
17984 CommandOutcomeContract {
17985 command: Command::SubmitCatalogAction,
17986 possible_submission_states: &[
17987 "not_submitted",
17988 "submitted",
17989 "known_retired",
17990 "indeterminate",
17991 "resolved",
17992 ],
17993 identity_requirement: "request_locator",
17994 resolver_command: Some(Command::ResolveCatalogAction),
17995 cancellation: "per_call_until_submission_then_resolve",
17996 },
17997 CommandOutcomeContract {
17998 command: Command::ResolveCatalogAction,
17999 possible_submission_states: &["not_submitted", "resolved"],
18000 identity_requirement: "request_locator",
18001 resolver_command: None,
18002 cancellation: "per_call",
18003 },
18004 CommandOutcomeContract {
18005 command: Command::PrepareReplayableSourceIndex,
18006 possible_submission_states: &["not_submitted", "resolved"],
18007 identity_requirement: "server_locator",
18008 resolver_command: None,
18009 cancellation: "per_call",
18010 },
18011 CommandOutcomeContract {
18012 command: Command::SubmitReplayableSourceIndex,
18013 possible_submission_states: &[
18014 "not_submitted",
18015 "submitted",
18016 "known_retired",
18017 "indeterminate",
18018 "resolved",
18019 ],
18020 identity_requirement: "request_locator",
18021 resolver_command: Some(Command::ResolveCatalogAction),
18022 cancellation: "per_call_until_submission_then_resolve",
18023 },
18024 CommandOutcomeContract {
18025 command: Command::GetReplayableSource,
18026 possible_submission_states: &["not_submitted", "resolved"],
18027 identity_requirement: "none",
18028 resolver_command: None,
18029 cancellation: "per_call",
18030 },
18031 CommandOutcomeContract {
18032 command: Command::ControlReplayableSource,
18033 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18034 identity_requirement: "none",
18035 resolver_command: None,
18036 cancellation: "per_call_until_submission_then_resolve",
18037 },
18038 CommandOutcomeContract {
18039 command: Command::CloneIndex,
18040 possible_submission_states: &[
18041 "not_submitted",
18042 "submitted",
18043 "known_retired",
18044 "indeterminate",
18045 "resolved",
18046 ],
18047 identity_requirement: "caller_action_id",
18048 resolver_command: Some(Command::CloneIndex),
18049 cancellation: "per_call_until_submission_then_resolve",
18050 },
18051 CommandOutcomeContract {
18052 command: Command::ConfigureHistory,
18053 possible_submission_states: &[
18054 "not_submitted",
18055 "submitted",
18056 "known_retired",
18057 "indeterminate",
18058 "resolved",
18059 ],
18060 identity_requirement: "none",
18061 resolver_command: Some(Command::GetHistory),
18062 cancellation: "per_call_until_submission_then_resolve",
18063 },
18064 CommandOutcomeContract {
18065 command: Command::GetHistory,
18066 possible_submission_states: &["not_submitted", "resolved"],
18067 identity_requirement: "none",
18068 resolver_command: None,
18069 cancellation: "per_call",
18070 },
18071 CommandOutcomeContract {
18072 command: Command::ResolveHistory,
18073 possible_submission_states: &["not_submitted", "resolved"],
18074 identity_requirement: "none",
18075 resolver_command: None,
18076 cancellation: "per_call",
18077 },
18078 CommandOutcomeContract {
18079 command: Command::PlaceHistoryHold,
18080 possible_submission_states: &[
18081 "not_submitted",
18082 "submitted",
18083 "known_retired",
18084 "indeterminate",
18085 "resolved",
18086 ],
18087 identity_requirement: "none",
18088 resolver_command: Some(Command::GetHistory),
18089 cancellation: "per_call_until_submission_then_resolve",
18090 },
18091 CommandOutcomeContract {
18092 command: Command::ReleaseHistoryHold,
18093 possible_submission_states: &[
18094 "not_submitted",
18095 "submitted",
18096 "known_retired",
18097 "indeterminate",
18098 "resolved",
18099 ],
18100 identity_requirement: "none",
18101 resolver_command: Some(Command::GetHistory),
18102 cancellation: "per_call_until_submission_then_resolve",
18103 },
18104 CommandOutcomeContract {
18105 command: Command::PrepareDocumentMutation,
18106 possible_submission_states: &["not_submitted", "resolved"],
18107 identity_requirement: "server_locator",
18108 resolver_command: None,
18109 cancellation: "per_call",
18110 },
18111 CommandOutcomeContract {
18112 command: Command::SubmitDocumentMutation,
18113 possible_submission_states: &[
18114 "not_submitted",
18115 "submitted",
18116 "known_retired",
18117 "indeterminate",
18118 "resolved",
18119 ],
18120 identity_requirement: "request_locator",
18121 resolver_command: Some(Command::ResolveDocumentMutation),
18122 cancellation: "per_call_until_submission_then_resolve",
18123 },
18124 CommandOutcomeContract {
18125 command: Command::PrepareDocumentBulk,
18126 possible_submission_states: &["not_submitted", "resolved"],
18127 identity_requirement: "caller_action_id",
18128 resolver_command: None,
18129 cancellation: "per_call",
18130 },
18131 CommandOutcomeContract {
18132 command: Command::SubmitDocumentBulk,
18133 possible_submission_states: &[
18134 "not_submitted",
18135 "submitted",
18136 "known_retired",
18137 "indeterminate",
18138 "resolved",
18139 ],
18140 identity_requirement: "caller_action_id",
18141 resolver_command: Some(Command::ResolveDocumentBulk),
18142 cancellation: "per_call_until_submission_then_resolve",
18143 },
18144 CommandOutcomeContract {
18145 command: Command::ResolveDocumentBulk,
18146 possible_submission_states: &["not_submitted", "resolved"],
18147 identity_requirement: "caller_action_id",
18148 resolver_command: None,
18149 cancellation: "per_call",
18150 },
18151 CommandOutcomeContract {
18152 command: Command::PrepareAppendBulk,
18153 possible_submission_states: &["not_submitted", "resolved"],
18154 identity_requirement: "caller_action_id",
18155 resolver_command: None,
18156 cancellation: "per_call",
18157 },
18158 CommandOutcomeContract {
18159 command: Command::SubmitAppendBulk,
18160 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18161 identity_requirement: "request_locator",
18162 resolver_command: Some(Command::ResolveAppendBulk),
18163 cancellation: "per_call_until_submission_then_resolve",
18164 },
18165 CommandOutcomeContract {
18166 command: Command::ResolveAppendBulk,
18167 possible_submission_states: &["not_submitted", "resolved"],
18168 identity_requirement: "request_locator",
18169 resolver_command: None,
18170 cancellation: "per_call",
18171 },
18172 CommandOutcomeContract {
18173 command: Command::ObserveAppendCommitted,
18174 possible_submission_states: &["not_submitted", "resolved"],
18175 identity_requirement: "request_locator",
18176 resolver_command: None,
18177 cancellation: "per_call",
18178 },
18179 CommandOutcomeContract {
18180 command: Command::ResolveDocumentMutation,
18181 possible_submission_states: &["not_submitted", "resolved"],
18182 identity_requirement: "request_locator",
18183 resolver_command: None,
18184 cancellation: "per_call",
18185 },
18186 CommandOutcomeContract {
18187 command: Command::GetDocument,
18188 possible_submission_states: &["not_submitted", "resolved"],
18189 identity_requirement: "none",
18190 resolver_command: None,
18191 cancellation: "per_call",
18192 },
18193 CommandOutcomeContract {
18194 command: Command::Search,
18195 possible_submission_states: &["not_submitted", "resolved"],
18196 identity_requirement: "none",
18197 resolver_command: None,
18198 cancellation: "per_call",
18199 },
18200 CommandOutcomeContract {
18201 command: Command::TraverseRelationships,
18202 possible_submission_states: &["not_submitted", "resolved"],
18203 identity_requirement: "none",
18204 resolver_command: None,
18205 cancellation: "per_call",
18206 },
18207 CommandOutcomeContract {
18208 command: Command::QueryProfiles,
18209 possible_submission_states: &["not_submitted", "resolved"],
18210 identity_requirement: "none",
18211 resolver_command: None,
18212 cancellation: "per_call",
18213 },
18214 CommandOutcomeContract {
18215 command: Command::EvaluateTemporalEvidence,
18216 possible_submission_states: &["not_submitted", "resolved"],
18217 identity_requirement: "none",
18218 resolver_command: None,
18219 cancellation: "per_call",
18220 },
18221 CommandOutcomeContract {
18222 command: Command::CreateContinuousTemporalEvaluation,
18223 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18224 identity_requirement: "caller_action_id",
18225 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
18226 cancellation: "per_call_until_submission_then_resolve",
18227 },
18228 CommandOutcomeContract {
18229 command: Command::GetContinuousTemporalEvaluation,
18230 possible_submission_states: &["not_submitted", "resolved"],
18231 identity_requirement: "none",
18232 resolver_command: None,
18233 cancellation: "per_call",
18234 },
18235 CommandOutcomeContract {
18236 command: Command::PauseContinuousTemporalEvaluation,
18237 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18238 identity_requirement: "caller_action_id",
18239 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
18240 cancellation: "per_call_until_submission_then_resolve",
18241 },
18242 CommandOutcomeContract {
18243 command: Command::ResumeContinuousTemporalEvaluation,
18244 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18245 identity_requirement: "caller_action_id",
18246 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
18247 cancellation: "per_call_until_submission_then_resolve",
18248 },
18249 CommandOutcomeContract {
18250 command: Command::ReplaceContinuousTemporalEvaluation,
18251 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18252 identity_requirement: "caller_action_id",
18253 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
18254 cancellation: "per_call_until_submission_then_resolve",
18255 },
18256 CommandOutcomeContract {
18257 command: Command::RetireContinuousTemporalEvaluation,
18258 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18259 identity_requirement: "caller_action_id",
18260 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
18261 cancellation: "per_call_until_submission_then_resolve",
18262 },
18263 CommandOutcomeContract {
18264 command: Command::ReadContinuousTemporalEvidence,
18265 possible_submission_states: &["not_submitted", "resolved"],
18266 identity_requirement: "none",
18267 resolver_command: None,
18268 cancellation: "per_call",
18269 },
18270 CommandOutcomeContract {
18271 command: Command::ValidateSearch,
18272 possible_submission_states: &["not_submitted", "resolved"],
18273 identity_requirement: "none",
18274 resolver_command: None,
18275 cancellation: "per_call",
18276 },
18277 CommandOutcomeContract {
18278 command: Command::MaterializeTableSnapshot,
18279 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18280 identity_requirement: "caller_action_id",
18281 resolver_command: Some(Command::ResolveTableSnapshot),
18282 cancellation: "per_call_until_submission_then_resolve",
18283 },
18284 CommandOutcomeContract {
18285 command: Command::ResolveTableSnapshot,
18286 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18287 identity_requirement: "caller_action_id",
18288 resolver_command: None,
18289 cancellation: "per_call",
18290 },
18291 CommandOutcomeContract {
18292 command: Command::ReadTableSnapshot,
18293 possible_submission_states: &["not_submitted", "resolved"],
18294 identity_requirement: "request_locator",
18295 resolver_command: None,
18296 cancellation: "per_call",
18297 },
18298 CommandOutcomeContract {
18299 command: Command::OpenPit,
18300 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18301 identity_requirement: "none",
18302 resolver_command: None,
18303 cancellation: "per_call_until_submission_then_resolve",
18304 },
18305 CommandOutcomeContract {
18306 command: Command::RenewPit,
18307 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18308 identity_requirement: "none",
18309 resolver_command: None,
18310 cancellation: "per_call_until_submission_then_resolve",
18311 },
18312 CommandOutcomeContract {
18313 command: Command::ClosePit,
18314 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18315 identity_requirement: "none",
18316 resolver_command: None,
18317 cancellation: "per_call_until_submission_then_resolve",
18318 },
18319 CommandOutcomeContract {
18320 command: Command::ListOperations,
18321 possible_submission_states: &["not_submitted", "resolved"],
18322 identity_requirement: "none",
18323 resolver_command: None,
18324 cancellation: "per_call",
18325 },
18326 CommandOutcomeContract {
18327 command: Command::GetOperation,
18328 possible_submission_states: &["not_submitted", "resolved"],
18329 identity_requirement: "request_locator",
18330 resolver_command: None,
18331 cancellation: "per_call",
18332 },
18333 CommandOutcomeContract {
18334 command: Command::WaitOperation,
18335 possible_submission_states: &["not_submitted", "resolved"],
18336 identity_requirement: "request_locator",
18337 resolver_command: None,
18338 cancellation: "per_call",
18339 },
18340 CommandOutcomeContract {
18341 command: Command::CancelOperation,
18342 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18343 identity_requirement: "request_locator",
18344 resolver_command: None,
18345 cancellation: "per_call_until_submission_then_resolve",
18346 },
18347 CommandOutcomeContract {
18348 command: Command::ListAuditEvents,
18349 possible_submission_states: &["not_submitted", "resolved"],
18350 identity_requirement: "none",
18351 resolver_command: None,
18352 cancellation: "per_call",
18353 },
18354 CommandOutcomeContract {
18355 command: Command::ExportAuditEvents,
18356 possible_submission_states: &["not_submitted", "resolved"],
18357 identity_requirement: "none",
18358 resolver_command: None,
18359 cancellation: "per_call",
18360 },
18361 CommandOutcomeContract {
18362 command: Command::ReserveServiceCredential,
18363 possible_submission_states: &[
18364 "not_submitted",
18365 "submitted",
18366 "known_retired",
18367 "indeterminate",
18368 "resolved",
18369 ],
18370 identity_requirement: "caller_action_id",
18371 resolver_command: Some(Command::ResolveServiceCredentialReservation),
18372 cancellation: "per_call_until_submission_then_resolve",
18373 },
18374 CommandOutcomeContract {
18375 command: Command::ReserveServiceCredentialRotation,
18376 possible_submission_states: &[
18377 "not_submitted",
18378 "submitted",
18379 "known_retired",
18380 "indeterminate",
18381 "resolved",
18382 ],
18383 identity_requirement: "caller_action_id",
18384 resolver_command: Some(Command::ResolveServiceCredentialReservation),
18385 cancellation: "per_call_until_submission_then_resolve",
18386 },
18387 CommandOutcomeContract {
18388 command: Command::ActivateServiceCredential,
18389 possible_submission_states: &[
18390 "not_submitted",
18391 "submitted",
18392 "known_retired",
18393 "indeterminate",
18394 "resolved",
18395 ],
18396 identity_requirement: "server_locator",
18397 resolver_command: Some(Command::ResolveServiceCredentialReservation),
18398 cancellation: "per_call_until_submission_then_resolve",
18399 },
18400 CommandOutcomeContract {
18401 command: Command::ResolveServiceCredentialReservation,
18402 possible_submission_states: &["not_submitted", "resolved"],
18403 identity_requirement: "caller_action_id",
18404 resolver_command: None,
18405 cancellation: "per_call",
18406 },
18407 CommandOutcomeContract {
18408 command: Command::PrepareRevokeServiceCredential,
18409 possible_submission_states: &["not_submitted", "resolved"],
18410 identity_requirement: "server_locator",
18411 resolver_command: None,
18412 cancellation: "per_call",
18413 },
18414 CommandOutcomeContract {
18415 command: Command::RevokeServiceCredential,
18416 possible_submission_states: &[
18417 "not_submitted",
18418 "submitted",
18419 "known_retired",
18420 "indeterminate",
18421 "resolved",
18422 ],
18423 identity_requirement: "request_locator",
18424 resolver_command: Some(Command::ResolveSecurityAction),
18425 cancellation: "per_call_until_submission_then_resolve",
18426 },
18427 CommandOutcomeContract {
18428 command: Command::ResolveSecurityAction,
18429 possible_submission_states: &["not_submitted", "resolved"],
18430 identity_requirement: "request_locator",
18431 resolver_command: None,
18432 cancellation: "per_call",
18433 },
18434 CommandOutcomeContract {
18435 command: Command::GetSecurityRole,
18436 possible_submission_states: &["not_submitted", "resolved"],
18437 identity_requirement: "none",
18438 resolver_command: None,
18439 cancellation: "per_call",
18440 },
18441 CommandOutcomeContract {
18442 command: Command::PrepareRoleAppendAccessChange,
18443 possible_submission_states: &["not_submitted", "resolved"],
18444 identity_requirement: "server_locator",
18445 resolver_command: None,
18446 cancellation: "per_call",
18447 },
18448 CommandOutcomeContract {
18449 command: Command::SubmitRoleAppendAccessChange,
18450 possible_submission_states: &[
18451 "not_submitted",
18452 "submitted",
18453 "known_retired",
18454 "indeterminate",
18455 "resolved",
18456 ],
18457 identity_requirement: "request_locator",
18458 resolver_command: Some(Command::ResolveSecurityAction),
18459 cancellation: "per_call_until_submission_then_resolve",
18460 },
18461 CommandOutcomeContract {
18462 command: Command::PrepareSourceAuthorizationProjection,
18463 possible_submission_states: &["not_submitted", "resolved"],
18464 identity_requirement: "caller_action_id",
18465 resolver_command: None,
18466 cancellation: "per_call",
18467 },
18468 CommandOutcomeContract {
18469 command: Command::SubmitSourceAuthorizationProjection,
18470 possible_submission_states: &[
18471 "not_submitted",
18472 "submitted",
18473 "known_retired",
18474 "indeterminate",
18475 "resolved",
18476 ],
18477 identity_requirement: "caller_action_id",
18478 resolver_command: Some(Command::ResolveSourceAuthorizationProjection),
18479 cancellation: "per_call_until_submission_then_resolve",
18480 },
18481 CommandOutcomeContract {
18482 command: Command::ResolveSourceAuthorizationProjection,
18483 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18484 identity_requirement: "caller_action_id",
18485 resolver_command: None,
18486 cancellation: "per_call",
18487 },
18488 CommandOutcomeContract {
18489 command: Command::ListServiceCredentials,
18490 possible_submission_states: &["not_submitted", "resolved"],
18491 identity_requirement: "none",
18492 resolver_command: None,
18493 cancellation: "per_call",
18494 },
18495 CommandOutcomeContract {
18496 command: Command::GetRuntimeStatus,
18497 possible_submission_states: &["not_submitted", "resolved"],
18498 identity_requirement: "none",
18499 resolver_command: None,
18500 cancellation: "per_call",
18501 },
18502 CommandOutcomeContract {
18503 command: Command::GetResultCacheStatus,
18504 possible_submission_states: &["not_submitted", "resolved"],
18505 identity_requirement: "none",
18506 resolver_command: None,
18507 cancellation: "per_call",
18508 },
18509 CommandOutcomeContract {
18510 command: Command::GetFieldPromotionStatus,
18511 possible_submission_states: &["not_submitted", "resolved"],
18512 identity_requirement: "none",
18513 resolver_command: None,
18514 cancellation: "per_call",
18515 },
18516 CommandOutcomeContract {
18517 command: Command::GetOverloadStatus,
18518 possible_submission_states: &["not_submitted", "resolved"],
18519 identity_requirement: "none",
18520 resolver_command: None,
18521 cancellation: "per_call",
18522 },
18523 CommandOutcomeContract {
18524 command: Command::ConfigureExternalKey,
18525 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18526 identity_requirement: "none",
18527 resolver_command: None,
18528 cancellation: "per_call_until_submission_then_resolve",
18529 },
18530 CommandOutcomeContract {
18531 command: Command::RotateExternalKeyBinding,
18532 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18533 identity_requirement: "none",
18534 resolver_command: None,
18535 cancellation: "per_call_until_submission_then_resolve",
18536 },
18537 CommandOutcomeContract {
18538 command: Command::RetireExternalKeyBinding,
18539 possible_submission_states: &[
18540 "not_submitted",
18541 "submitted",
18542 "known_retired",
18543 "indeterminate",
18544 "resolved",
18545 ],
18546 identity_requirement: "caller_action_id",
18547 resolver_command: Some(Command::ResolveExternalKeyBindingRetirement),
18548 cancellation: "per_call_until_submission_then_resolve",
18549 },
18550 CommandOutcomeContract {
18551 command: Command::ResolveExternalKeyBindingRetirement,
18552 possible_submission_states: &["not_submitted", "resolved"],
18553 identity_requirement: "caller_action_id",
18554 resolver_command: None,
18555 cancellation: "per_call",
18556 },
18557 CommandOutcomeContract {
18558 command: Command::ConfigureAggregateThenDelete,
18559 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18560 identity_requirement: "none",
18561 resolver_command: None,
18562 cancellation: "per_call_until_submission_then_resolve",
18563 },
18564 CommandOutcomeContract {
18565 command: Command::GetLifecycleStatus,
18566 possible_submission_states: &["not_submitted", "resolved"],
18567 identity_requirement: "none",
18568 resolver_command: None,
18569 cancellation: "per_call",
18570 },
18571 CommandOutcomeContract {
18572 command: Command::EraseRecord,
18573 possible_submission_states: &[
18574 "not_submitted",
18575 "submitted",
18576 "known_retired",
18577 "indeterminate",
18578 "resolved",
18579 ],
18580 identity_requirement: "caller_action_id",
18581 resolver_command: Some(Command::ResolveRecordErasure),
18582 cancellation: "per_call_until_submission_then_resolve",
18583 },
18584 CommandOutcomeContract {
18585 command: Command::ResolveRecordErasure,
18586 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18587 identity_requirement: "caller_action_id",
18588 resolver_command: None,
18589 cancellation: "per_call",
18590 },
18591 CommandOutcomeContract {
18592 command: Command::GetRecordErasure,
18593 possible_submission_states: &["not_submitted", "resolved"],
18594 identity_requirement: "request_identity",
18595 resolver_command: None,
18596 cancellation: "per_call",
18597 },
18598 CommandOutcomeContract {
18599 command: Command::GetQuota,
18600 possible_submission_states: &["not_submitted", "resolved"],
18601 identity_requirement: "none",
18602 resolver_command: None,
18603 cancellation: "per_call",
18604 },
18605 CommandOutcomeContract {
18606 command: Command::UpdateQuota,
18607 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18608 identity_requirement: "none",
18609 resolver_command: None,
18610 cancellation: "per_call_until_submission_then_resolve",
18611 },
18612 CommandOutcomeContract {
18613 command: Command::GetBinding,
18614 possible_submission_states: &["not_submitted", "resolved"],
18615 identity_requirement: "none",
18616 resolver_command: None,
18617 cancellation: "per_call",
18618 },
18619 CommandOutcomeContract {
18620 command: Command::GetAdmissionStatus,
18621 possible_submission_states: &["not_submitted", "resolved"],
18622 identity_requirement: "none",
18623 resolver_command: None,
18624 cancellation: "per_call",
18625 },
18626 CommandOutcomeContract {
18627 command: Command::SetAdmission,
18628 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18629 identity_requirement: "none",
18630 resolver_command: None,
18631 cancellation: "per_call_until_submission_then_resolve",
18632 },
18633 CommandOutcomeContract {
18634 command: Command::GetQuiesceStatus,
18635 possible_submission_states: &["not_submitted", "resolved"],
18636 identity_requirement: "none",
18637 resolver_command: None,
18638 cancellation: "per_call",
18639 },
18640 CommandOutcomeContract {
18641 command: Command::GetDecommissionReadiness,
18642 possible_submission_states: &["not_submitted", "resolved"],
18643 identity_requirement: "none",
18644 resolver_command: None,
18645 cancellation: "per_call",
18646 },
18647 CommandOutcomeContract {
18648 command: Command::GetUpgradeReadiness,
18649 possible_submission_states: &["not_submitted", "resolved"],
18650 identity_requirement: "none",
18651 resolver_command: None,
18652 cancellation: "per_call",
18653 },
18654 CommandOutcomeContract {
18655 command: Command::GetMaintenanceStatus,
18656 possible_submission_states: &["not_submitted", "resolved"],
18657 identity_requirement: "none",
18658 resolver_command: None,
18659 cancellation: "per_call",
18660 },
18661 CommandOutcomeContract {
18662 command: Command::WarmVectorIndex,
18663 possible_submission_states: &["not_submitted", "resolved"],
18664 identity_requirement: "exact_root",
18665 resolver_command: None,
18666 cancellation: "per_call",
18667 },
18668 CommandOutcomeContract {
18669 command: Command::EvaluateVectorRecall,
18670 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18671 identity_requirement: "caller_action_id",
18672 resolver_command: None,
18673 cancellation: "per_call_until_submission_then_resolve",
18674 },
18675 CommandOutcomeContract {
18676 command: Command::CalibrateVectorStrategy,
18677 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18678 identity_requirement: "caller_action_id",
18679 resolver_command: None,
18680 cancellation: "per_call_until_submission_then_resolve",
18681 },
18682 CommandOutcomeContract {
18683 command: Command::GetVectorDiagnostic,
18684 possible_submission_states: &["not_submitted", "resolved"],
18685 identity_requirement: "request_locator",
18686 resolver_command: None,
18687 cancellation: "per_call",
18688 },
18689 CommandOutcomeContract {
18690 command: Command::CreateDiagnostic,
18691 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18692 identity_requirement: "none",
18693 resolver_command: None,
18694 cancellation: "per_call_until_submission_then_resolve",
18695 },
18696 CommandOutcomeContract {
18697 command: Command::GetDiagnostic,
18698 possible_submission_states: &["not_submitted", "resolved"],
18699 identity_requirement: "request_locator",
18700 resolver_command: None,
18701 cancellation: "per_call",
18702 },
18703 CommandOutcomeContract {
18704 command: Command::PrepareCollectionExport,
18705 possible_submission_states: &["not_submitted", "resolved"],
18706 identity_requirement: "caller_action_id",
18707 resolver_command: None,
18708 cancellation: "per_call",
18709 },
18710 CommandOutcomeContract {
18711 command: Command::StartCollectionExport,
18712 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18713 identity_requirement: "caller_action_id",
18714 resolver_command: Some(Command::ResolveCollectionExport),
18715 cancellation: "per_call_until_submission_then_resolve",
18716 },
18717 CommandOutcomeContract {
18718 command: Command::ResolveCollectionExport,
18719 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18720 identity_requirement: "caller_action_id",
18721 resolver_command: None,
18722 cancellation: "per_call",
18723 },
18724 CommandOutcomeContract {
18725 command: Command::VerifyCollectionExport,
18726 possible_submission_states: &["not_submitted", "resolved"],
18727 identity_requirement: "request_locator",
18728 resolver_command: None,
18729 cancellation: "per_call",
18730 },
18731 CommandOutcomeContract {
18732 command: Command::PrepareCollectionExportRetirement,
18733 possible_submission_states: &["not_submitted", "resolved"],
18734 identity_requirement: "caller_action_id",
18735 resolver_command: None,
18736 cancellation: "per_call",
18737 },
18738 CommandOutcomeContract {
18739 command: Command::StartCollectionExportRetirement,
18740 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18741 identity_requirement: "caller_action_id",
18742 resolver_command: Some(Command::ResolveCollectionExportRetirement),
18743 cancellation: "per_call_until_submission_then_resolve",
18744 },
18745 CommandOutcomeContract {
18746 command: Command::ResolveCollectionExportRetirement,
18747 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18748 identity_requirement: "caller_action_id",
18749 resolver_command: None,
18750 cancellation: "per_call",
18751 },
18752 CommandOutcomeContract {
18753 command: Command::PrepareCollectionRestore,
18754 possible_submission_states: &["not_submitted", "resolved"],
18755 identity_requirement: "caller_action_id",
18756 resolver_command: None,
18757 cancellation: "per_call",
18758 },
18759 CommandOutcomeContract {
18760 command: Command::StartCollectionRestore,
18761 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18762 identity_requirement: "caller_action_id",
18763 resolver_command: Some(Command::ResolveCollectionRestore),
18764 cancellation: "per_call_until_submission_then_resolve",
18765 },
18766 CommandOutcomeContract {
18767 command: Command::ResolveCollectionRestore,
18768 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18769 identity_requirement: "caller_action_id",
18770 resolver_command: None,
18771 cancellation: "per_call",
18772 },
18773 CommandOutcomeContract {
18774 command: Command::PrepareCollectionTransferExport,
18775 possible_submission_states: &["not_submitted", "resolved"],
18776 identity_requirement: "caller_action_id",
18777 resolver_command: None,
18778 cancellation: "per_call",
18779 },
18780 CommandOutcomeContract {
18781 command: Command::StartCollectionTransferExport,
18782 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18783 identity_requirement: "caller_action_id",
18784 resolver_command: Some(Command::ResolveCollectionTransferExport),
18785 cancellation: "per_call_until_submission_then_resolve",
18786 },
18787 CommandOutcomeContract {
18788 command: Command::ResolveCollectionTransferExport,
18789 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18790 identity_requirement: "caller_action_id",
18791 resolver_command: None,
18792 cancellation: "per_call",
18793 },
18794 CommandOutcomeContract {
18795 command: Command::PrepareCollectionTransferRestore,
18796 possible_submission_states: &["not_submitted", "resolved"],
18797 identity_requirement: "caller_action_id",
18798 resolver_command: None,
18799 cancellation: "per_call",
18800 },
18801 CommandOutcomeContract {
18802 command: Command::StartCollectionTransferRestore,
18803 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18804 identity_requirement: "caller_action_id",
18805 resolver_command: Some(Command::ResolveCollectionTransferRestore),
18806 cancellation: "per_call_until_submission_then_resolve",
18807 },
18808 CommandOutcomeContract {
18809 command: Command::ResolveCollectionTransferRestore,
18810 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18811 identity_requirement: "caller_action_id",
18812 resolver_command: None,
18813 cancellation: "per_call",
18814 },
18815 CommandOutcomeContract {
18816 command: Command::PrepareCollectionStandbyAdmission,
18817 possible_submission_states: &["not_submitted", "resolved"],
18818 identity_requirement: "caller_action_id",
18819 resolver_command: None,
18820 cancellation: "per_call",
18821 },
18822 CommandOutcomeContract {
18823 command: Command::StartCollectionStandbyAdmission,
18824 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18825 identity_requirement: "caller_action_id",
18826 resolver_command: Some(Command::ResolveCollectionStandbyAdmission),
18827 cancellation: "per_call_until_submission_then_resolve",
18828 },
18829 CommandOutcomeContract {
18830 command: Command::ResolveCollectionStandbyAdmission,
18831 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18832 identity_requirement: "caller_action_id",
18833 resolver_command: None,
18834 cancellation: "per_call",
18835 },
18836 CommandOutcomeContract {
18837 command: Command::PrepareCollectionStandbyActivation,
18838 possible_submission_states: &["not_submitted", "resolved"],
18839 identity_requirement: "caller_action_id",
18840 resolver_command: None,
18841 cancellation: "per_call",
18842 },
18843 CommandOutcomeContract {
18844 command: Command::StartCollectionStandbyActivation,
18845 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18846 identity_requirement: "caller_action_id",
18847 resolver_command: Some(Command::ResolveCollectionStandbyActivation),
18848 cancellation: "per_call_until_submission_then_resolve",
18849 },
18850 CommandOutcomeContract {
18851 command: Command::ResolveCollectionStandbyActivation,
18852 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18853 identity_requirement: "caller_action_id",
18854 resolver_command: None,
18855 cancellation: "per_call",
18856 },
18857 CommandOutcomeContract {
18858 command: Command::PrepareIndexExport,
18859 possible_submission_states: &["not_submitted", "resolved"],
18860 identity_requirement: "caller_action_id",
18861 resolver_command: None,
18862 cancellation: "per_call",
18863 },
18864 CommandOutcomeContract {
18865 command: Command::StartIndexExport,
18866 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18867 identity_requirement: "caller_action_id",
18868 resolver_command: Some(Command::ResolveIndexExport),
18869 cancellation: "per_call_until_submission_then_resolve",
18870 },
18871 CommandOutcomeContract {
18872 command: Command::ResolveIndexExport,
18873 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18874 identity_requirement: "caller_action_id",
18875 resolver_command: None,
18876 cancellation: "per_call",
18877 },
18878 CommandOutcomeContract {
18879 command: Command::VerifyIndexExport,
18880 possible_submission_states: &["not_submitted", "resolved"],
18881 identity_requirement: "request_locator",
18882 resolver_command: None,
18883 cancellation: "per_call",
18884 },
18885 CommandOutcomeContract {
18886 command: Command::PrepareIndexImport,
18887 possible_submission_states: &["not_submitted", "resolved"],
18888 identity_requirement: "caller_action_id",
18889 resolver_command: None,
18890 cancellation: "per_call",
18891 },
18892 CommandOutcomeContract {
18893 command: Command::StartIndexImport,
18894 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
18895 identity_requirement: "caller_action_id",
18896 resolver_command: Some(Command::ResolveIndexImport),
18897 cancellation: "per_call_until_submission_then_resolve",
18898 },
18899 CommandOutcomeContract {
18900 command: Command::ResolveIndexImport,
18901 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
18902 identity_requirement: "caller_action_id",
18903 resolver_command: None,
18904 cancellation: "per_call",
18905 },
18906 CommandOutcomeContract {
18907 command: Command::ReadArtifactChunk,
18908 possible_submission_states: &["not_submitted", "resolved"],
18909 identity_requirement: "none",
18910 resolver_command: None,
18911 cancellation: "per_call",
18912 },
18913 CommandOutcomeContract {
18914 command: Command::ExportUsage,
18915 possible_submission_states: &["not_submitted", "resolved"],
18916 identity_requirement: "none",
18917 resolver_command: None,
18918 cancellation: "per_call",
18919 },
18920 CommandOutcomeContract {
18921 command: Command::GetStorageUsage,
18922 possible_submission_states: &["not_submitted", "resolved"],
18923 identity_requirement: "none",
18924 resolver_command: None,
18925 cancellation: "per_call",
18926 },
18927 CommandOutcomeContract {
18928 command: Command::ReadLogicalOccupancy,
18929 possible_submission_states: &["not_submitted", "resolved"],
18930 identity_requirement: "none",
18931 resolver_command: None,
18932 cancellation: "per_call",
18933 },
18934 CommandOutcomeContract {
18935 command: Command::ExecuteStateRead,
18936 possible_submission_states: &["not_submitted", "resolved"],
18937 identity_requirement: "none",
18938 resolver_command: None,
18939 cancellation: "per_call",
18940 },
18941 CommandOutcomeContract {
18942 command: Command::PrepareStateWrite,
18943 possible_submission_states: &["not_submitted", "resolved"],
18944 identity_requirement: "caller_action_id",
18945 resolver_command: None,
18946 cancellation: "per_call",
18947 },
18948 CommandOutcomeContract {
18949 command: Command::SubmitStateWrite,
18950 possible_submission_states: &[
18951 "not_submitted",
18952 "submitted",
18953 "known_retired",
18954 "indeterminate",
18955 "resolved",
18956 ],
18957 identity_requirement: "request_locator",
18958 resolver_command: Some(Command::ResolveStateWrite),
18959 cancellation: "per_call_until_submission_then_resolve",
18960 },
18961 CommandOutcomeContract {
18962 command: Command::ResolveStateWrite,
18963 possible_submission_states: &["not_submitted", "resolved"],
18964 identity_requirement: "request_locator",
18965 resolver_command: None,
18966 cancellation: "per_call",
18967 },
18968];
18969#[derive(Clone, Copy, Debug, Eq, PartialEq)]
18970pub struct ErrorOutcomeContract {
18971 pub code: ErrorCode,
18972 pub disposition: ErrorDisposition,
18973 pub recovery: RecoveryAction,
18974 pub retry_after_limit_id: Option<&'static str>,
18975 pub recovery_identity: &'static str,
18976}
18977pub const LODESTONE_API_ERROR_OUTCOMES: &[ErrorOutcomeContract] = &[
18978 ErrorOutcomeContract {
18979 code: ErrorCode::Aborted,
18980 disposition: ErrorDisposition::NotSubmitted,
18981 recovery: RecoveryAction::Retry,
18982 retry_after_limit_id: None,
18983 recovery_identity: "request_identity",
18984 },
18985 ErrorOutcomeContract {
18986 code: ErrorCode::Aborted,
18987 disposition: ErrorDisposition::Indeterminate,
18988 recovery: RecoveryAction::Resolve,
18989 retry_after_limit_id: None,
18990 recovery_identity: "request_identity",
18991 },
18992 ErrorOutcomeContract {
18993 code: ErrorCode::DeadlineExceeded,
18994 disposition: ErrorDisposition::NotSubmitted,
18995 recovery: RecoveryAction::Retry,
18996 retry_after_limit_id: None,
18997 recovery_identity: "request_identity",
18998 },
18999 ErrorOutcomeContract {
19000 code: ErrorCode::DeadlineExceeded,
19001 disposition: ErrorDisposition::Indeterminate,
19002 recovery: RecoveryAction::Resolve,
19003 retry_after_limit_id: None,
19004 recovery_identity: "request_identity",
19005 },
19006 ErrorOutcomeContract {
19007 code: ErrorCode::InvalidRequest,
19008 disposition: ErrorDisposition::NotSubmitted,
19009 recovery: RecoveryAction::Stop,
19010 retry_after_limit_id: None,
19011 recovery_identity: "none",
19012 },
19013 ErrorOutcomeContract {
19014 code: ErrorCode::UnsupportedVersion,
19015 disposition: ErrorDisposition::NotSubmitted,
19016 recovery: RecoveryAction::Stop,
19017 retry_after_limit_id: None,
19018 recovery_identity: "none",
19019 },
19020 ErrorOutcomeContract {
19021 code: ErrorCode::Unauthenticated,
19022 disposition: ErrorDisposition::NotSubmitted,
19023 recovery: RecoveryAction::RefreshCredential,
19024 retry_after_limit_id: None,
19025 recovery_identity: "none",
19026 },
19027 ErrorOutcomeContract {
19028 code: ErrorCode::PermissionDenied,
19029 disposition: ErrorDisposition::NotSubmitted,
19030 recovery: RecoveryAction::Stop,
19031 retry_after_limit_id: None,
19032 recovery_identity: "none",
19033 },
19034 ErrorOutcomeContract {
19035 code: ErrorCode::NotFound,
19036 disposition: ErrorDisposition::NotSubmitted,
19037 recovery: RecoveryAction::Stop,
19038 retry_after_limit_id: None,
19039 recovery_identity: "request_identity",
19040 },
19041 ErrorOutcomeContract {
19042 code: ErrorCode::NotFound,
19043 disposition: ErrorDisposition::Resolved,
19044 recovery: RecoveryAction::Stop,
19045 retry_after_limit_id: None,
19046 recovery_identity: "request_identity",
19047 },
19048 ErrorOutcomeContract {
19049 code: ErrorCode::Conflict,
19050 disposition: ErrorDisposition::NotSubmitted,
19051 recovery: RecoveryAction::RefreshPrecondition,
19052 retry_after_limit_id: None,
19053 recovery_identity: "request_identity",
19054 },
19055 ErrorOutcomeContract {
19056 code: ErrorCode::Conflict,
19057 disposition: ErrorDisposition::Resolved,
19058 recovery: RecoveryAction::Stop,
19059 retry_after_limit_id: None,
19060 recovery_identity: "request_identity",
19061 },
19062 ErrorOutcomeContract {
19063 code: ErrorCode::StaleCursor,
19064 disposition: ErrorDisposition::NotSubmitted,
19065 recovery: RecoveryAction::RestartPage,
19066 retry_after_limit_id: None,
19067 recovery_identity: "cursor",
19068 },
19069 ErrorOutcomeContract {
19070 code: ErrorCode::RestartBudgetExhausted,
19071 disposition: ErrorDisposition::NotSubmitted,
19072 recovery: RecoveryAction::Stop,
19073 retry_after_limit_id: None,
19074 recovery_identity: "cursor",
19075 },
19076 ErrorOutcomeContract {
19077 code: ErrorCode::LimitExceeded,
19078 disposition: ErrorDisposition::NotSubmitted,
19079 recovery: RecoveryAction::ReduceRequest,
19080 retry_after_limit_id: None,
19081 recovery_identity: "none",
19082 },
19083 ErrorOutcomeContract {
19084 code: ErrorCode::CapabilityUnavailable,
19085 disposition: ErrorDisposition::NotSubmitted,
19086 recovery: RecoveryAction::Stop,
19087 retry_after_limit_id: None,
19088 recovery_identity: "none",
19089 },
19090 ErrorOutcomeContract {
19091 code: ErrorCode::NotSubmitted,
19092 disposition: ErrorDisposition::NotSubmitted,
19093 recovery: RecoveryAction::RetryAfter,
19094 retry_after_limit_id: Some("retry_after_millis"),
19095 recovery_identity: "request_identity",
19096 },
19097 ErrorOutcomeContract {
19098 code: ErrorCode::SubmittedIndeterminate,
19099 disposition: ErrorDisposition::Indeterminate,
19100 recovery: RecoveryAction::Resolve,
19101 retry_after_limit_id: None,
19102 recovery_identity: "locator_or_caller_action_id",
19103 },
19104 ErrorOutcomeContract {
19105 code: ErrorCode::ExpiredUnknown,
19106 disposition: ErrorDisposition::KnownRetired,
19107 recovery: RecoveryAction::Stop,
19108 retry_after_limit_id: None,
19109 recovery_identity: "locator_or_caller_action_id",
19110 },
19111 ErrorOutcomeContract {
19112 code: ErrorCode::SecretNotEscrowed,
19113 disposition: ErrorDisposition::Resolved,
19114 recovery: RecoveryAction::Resolve,
19115 retry_after_limit_id: None,
19116 recovery_identity: "reservation_action_id",
19117 },
19118 ErrorOutcomeContract {
19119 code: ErrorCode::RetentionGap,
19120 disposition: ErrorDisposition::KnownRetired,
19121 recovery: RecoveryAction::Stop,
19122 retry_after_limit_id: None,
19123 recovery_identity: "cursor_or_locator",
19124 },
19125 ErrorOutcomeContract {
19126 code: ErrorCode::ArtifactRangeInvalid,
19127 disposition: ErrorDisposition::NotSubmitted,
19128 recovery: RecoveryAction::CorrectRange,
19129 retry_after_limit_id: None,
19130 recovery_identity: "artifact_identity",
19131 },
19132 ErrorOutcomeContract {
19133 code: ErrorCode::ChecksumMismatch,
19134 disposition: ErrorDisposition::Resolved,
19135 recovery: RecoveryAction::Stop,
19136 retry_after_limit_id: None,
19137 recovery_identity: "artifact_identity",
19138 },
19139 ErrorOutcomeContract {
19140 code: ErrorCode::TemporarilyUnavailable,
19141 disposition: ErrorDisposition::NotSubmitted,
19142 recovery: RecoveryAction::RetryAfter,
19143 retry_after_limit_id: Some("retry_after_millis"),
19144 recovery_identity: "request_identity",
19145 },
19146 ErrorOutcomeContract {
19147 code: ErrorCode::TemporarilyUnavailable,
19148 disposition: ErrorDisposition::Indeterminate,
19149 recovery: RecoveryAction::Resolve,
19150 retry_after_limit_id: Some("retry_after_millis"),
19151 recovery_identity: "request_identity",
19152 },
19153 ErrorOutcomeContract {
19154 code: ErrorCode::Internal,
19155 disposition: ErrorDisposition::NotSubmitted,
19156 recovery: RecoveryAction::Stop,
19157 retry_after_limit_id: None,
19158 recovery_identity: "request_identity",
19159 },
19160 ErrorOutcomeContract {
19161 code: ErrorCode::Internal,
19162 disposition: ErrorDisposition::Resolved,
19163 recovery: RecoveryAction::Stop,
19164 retry_after_limit_id: None,
19165 recovery_identity: "request_identity",
19166 },
19167 ErrorOutcomeContract {
19168 code: ErrorCode::Internal,
19169 disposition: ErrorDisposition::Indeterminate,
19170 recovery: RecoveryAction::Resolve,
19171 retry_after_limit_id: None,
19172 recovery_identity: "request_identity",
19173 },
19174];
19175#[derive(Clone, Copy, Debug, Eq, PartialEq)]
19176pub struct Limit {
19177 pub id: &'static str,
19178 pub default: u64,
19179 pub maximum: u64,
19180 pub unit: &'static str,
19181}
19182pub const LODESTONE_API_LIMITS: &[Limit] = &[
19183 Limit {
19184 id: "request_bytes",
19185 default: 2097152,
19186 maximum: 2097152,
19187 unit: "bytes",
19188 },
19189 Limit {
19190 id: "response_bytes",
19191 default: 2097152,
19192 maximum: 2097152,
19193 unit: "bytes",
19194 },
19195 Limit {
19196 id: "record_erasure_scan_bytes",
19197 default: 68719476736,
19198 maximum: 68719476736,
19199 unit: "bytes",
19200 },
19201 Limit {
19202 id: "record_erasure_rewrite_bytes",
19203 default: 68719476736,
19204 maximum: 68719476736,
19205 unit: "bytes",
19206 },
19207 Limit {
19208 id: "page_size",
19209 default: 100,
19210 maximum: 1000,
19211 unit: "items",
19212 },
19213 Limit {
19214 id: "catalog_page_size",
19215 default: 100,
19216 maximum: 100,
19217 unit: "items",
19218 },
19219 Limit {
19220 id: "catalog_restart_budget",
19221 default: 8,
19222 maximum: 8,
19223 unit: "restarts",
19224 },
19225 Limit {
19226 id: "query_clauses",
19227 default: 256,
19228 maximum: 1024,
19229 unit: "clauses",
19230 },
19231 Limit {
19232 id: "text_query_bytes",
19233 default: 16384,
19234 maximum: 16384,
19235 unit: "bytes",
19236 },
19237 Limit {
19238 id: "text_query_fields",
19239 default: 64,
19240 maximum: 64,
19241 unit: "fields",
19242 },
19243 Limit {
19244 id: "text_query_slop",
19245 default: 64,
19246 maximum: 64,
19247 unit: "positions",
19248 },
19249 Limit {
19250 id: "text_query_boost",
19251 default: 1024,
19252 maximum: 1024,
19253 unit: "multiplier",
19254 },
19255 Limit {
19256 id: "text_query_fuzzy_expansions",
19257 default: 1024,
19258 maximum: 1024,
19259 unit: "terms",
19260 },
19261 Limit {
19262 id: "text_query_fuzzy_distance",
19263 default: 2,
19264 maximum: 2,
19265 unit: "edits",
19266 },
19267 Limit {
19268 id: "text_query_dictionary_scan_terms",
19269 default: 65536,
19270 maximum: 65536,
19271 unit: "terms",
19272 },
19273 Limit {
19274 id: "text_query_dictionary_scan_bytes",
19275 default: 16777216,
19276 maximum: 16777216,
19277 unit: "bytes",
19278 },
19279 Limit {
19280 id: "text_query_fuzzy_work_units",
19281 default: 2000000,
19282 maximum: 2000000,
19283 unit: "distance_cells",
19284 },
19285 Limit {
19286 id: "aggregation_nodes",
19287 default: 64,
19288 maximum: 256,
19289 unit: "nodes",
19290 },
19291 Limit {
19292 id: "aggregation_buckets",
19293 default: 65536,
19294 maximum: 65536,
19295 unit: "buckets",
19296 },
19297 Limit {
19298 id: "metric_point_bytes",
19299 default: 1048576,
19300 maximum: 1048576,
19301 unit: "bytes",
19302 },
19303 Limit {
19304 id: "metric_attributes",
19305 default: 128,
19306 maximum: 128,
19307 unit: "items",
19308 },
19309 Limit {
19310 id: "metric_attribute_bytes",
19311 default: 65536,
19312 maximum: 65536,
19313 unit: "bytes",
19314 },
19315 Limit {
19316 id: "metric_exemplars",
19317 default: 8,
19318 maximum: 8,
19319 unit: "items",
19320 },
19321 Limit {
19322 id: "metric_histogram_buckets",
19323 default: 4097,
19324 maximum: 4097,
19325 unit: "buckets",
19326 },
19327 Limit {
19328 id: "time_series_grouping_keys",
19329 default: 4,
19330 maximum: 16,
19331 unit: "keys",
19332 },
19333 Limit {
19334 id: "time_series_points",
19335 default: 100000,
19336 maximum: 100000,
19337 unit: "points",
19338 },
19339 Limit {
19340 id: "time_series_series",
19341 default: 10000,
19342 maximum: 10000,
19343 unit: "series",
19344 },
19345 Limit {
19346 id: "time_series_buckets",
19347 default: 65536,
19348 maximum: 65536,
19349 unit: "buckets",
19350 },
19351 Limit {
19352 id: "time_series_results",
19353 default: 65536,
19354 maximum: 65536,
19355 unit: "results",
19356 },
19357 Limit {
19358 id: "time_series_quantiles",
19359 default: 10,
19360 maximum: 100,
19361 unit: "quantiles",
19362 },
19363 Limit {
19364 id: "time_series_state_bytes",
19365 default: 67108864,
19366 maximum: 67108864,
19367 unit: "bytes",
19368 },
19369 Limit {
19370 id: "temporal_inputs",
19371 default: 16,
19372 maximum: 16,
19373 unit: "indexes",
19374 },
19375 Limit {
19376 id: "temporal_pattern_nodes",
19377 default: 64,
19378 maximum: 64,
19379 unit: "nodes",
19380 },
19381 Limit {
19382 id: "temporal_pattern_depth",
19383 default: 16,
19384 maximum: 16,
19385 unit: "levels",
19386 },
19387 Limit {
19388 id: "temporal_pattern_branches",
19389 default: 16,
19390 maximum: 16,
19391 unit: "branches",
19392 },
19393 Limit {
19394 id: "temporal_correlation_keys",
19395 default: 4,
19396 maximum: 4,
19397 unit: "fields",
19398 },
19399 Limit {
19400 id: "temporal_events",
19401 default: 4096,
19402 maximum: 4096,
19403 unit: "events",
19404 },
19405 Limit {
19406 id: "temporal_states",
19407 default: 65536,
19408 maximum: 65536,
19409 unit: "states",
19410 },
19411 Limit {
19412 id: "temporal_captured_events",
19413 default: 256,
19414 maximum: 256,
19415 unit: "events",
19416 },
19417 Limit {
19418 id: "temporal_results",
19419 default: 4096,
19420 maximum: 4096,
19421 unit: "results",
19422 },
19423 Limit {
19424 id: "temporal_state_bytes",
19425 default: 67108864,
19426 maximum: 67108864,
19427 unit: "bytes",
19428 },
19429 Limit {
19430 id: "temporal_interval_nanos",
19431 default: 2678400000000000,
19432 maximum: 2678400000000000,
19433 unit: "nanoseconds",
19434 },
19435 Limit {
19436 id: "relationship_indexes",
19437 default: 4,
19438 maximum: 16,
19439 unit: "indexes",
19440 },
19441 Limit {
19442 id: "relationship_seeds",
19443 default: 16,
19444 maximum: 128,
19445 unit: "entities",
19446 },
19447 Limit {
19448 id: "relationship_filter_values",
19449 default: 16,
19450 maximum: 128,
19451 unit: "values",
19452 },
19453 Limit {
19454 id: "relationship_depth",
19455 default: 4,
19456 maximum: 16,
19457 unit: "levels",
19458 },
19459 Limit {
19460 id: "relationship_fan_out",
19461 default: 256,
19462 maximum: 4096,
19463 unit: "relationships",
19464 },
19465 Limit {
19466 id: "relationship_visited_entities",
19467 default: 10000,
19468 maximum: 65536,
19469 unit: "entities",
19470 },
19471 Limit {
19472 id: "relationship_visited_records",
19473 default: 10000,
19474 maximum: 10000,
19475 unit: "records",
19476 },
19477 Limit {
19478 id: "relationship_returned_records",
19479 default: 10000,
19480 maximum: 10000,
19481 unit: "records",
19482 },
19483 Limit {
19484 id: "relationship_memory_bytes",
19485 default: 67108864,
19486 maximum: 268435456,
19487 unit: "bytes",
19488 },
19489 Limit {
19490 id: "profile_indexes",
19491 default: 4,
19492 maximum: 16,
19493 unit: "indexes",
19494 },
19495 Limit {
19496 id: "profile_filter_values",
19497 default: 16,
19498 maximum: 128,
19499 unit: "values",
19500 },
19501 Limit {
19502 id: "profile_batches",
19503 default: 10000,
19504 maximum: 10000,
19505 unit: "batches",
19506 },
19507 Limit {
19508 id: "profile_samples",
19509 default: 100000,
19510 maximum: 100000,
19511 unit: "samples",
19512 },
19513 Limit {
19514 id: "profile_results",
19515 default: 10000,
19516 maximum: 10000,
19517 unit: "results",
19518 },
19519 Limit {
19520 id: "profile_memory_bytes",
19521 default: 67108864,
19522 maximum: 268435456,
19523 unit: "bytes",
19524 },
19525 Limit {
19526 id: "approximate_cardinality_precision",
19527 default: 12,
19528 maximum: 16,
19529 unit: "index_bits",
19530 },
19531 Limit {
19532 id: "approximate_percentile_precision",
19533 default: 10,
19534 maximum: 12,
19535 unit: "index_bits",
19536 },
19537 Limit {
19538 id: "operation_page_authorities",
19539 default: 7,
19540 maximum: 7,
19541 unit: "authorities",
19542 },
19543 Limit {
19544 id: "artifact_chunk_bytes",
19545 default: 262144,
19546 maximum: 1048576,
19547 unit: "bytes",
19548 },
19549 Limit {
19550 id: "table_snapshot_objects",
19551 default: 1024,
19552 maximum: 4096,
19553 unit: "objects",
19554 },
19555 Limit {
19556 id: "table_snapshot_ttl_millis",
19557 default: 3600000,
19558 maximum: 604800000,
19559 unit: "milliseconds",
19560 },
19561 Limit {
19562 id: "table_snapshot_read_bytes",
19563 default: 262144,
19564 maximum: 1048576,
19565 unit: "bytes",
19566 },
19567 Limit {
19568 id: "bulk_document_items",
19569 default: 128,
19570 maximum: 1024,
19571 unit: "items",
19572 },
19573 Limit {
19574 id: "bulk_document_bytes",
19575 default: 2097152,
19576 maximum: 2097152,
19577 unit: "bytes",
19578 },
19579 Limit {
19580 id: "state_command_keys",
19581 default: 128,
19582 maximum: 128,
19583 unit: "keys",
19584 },
19585 Limit {
19586 id: "state_command_value_bytes",
19587 default: 1048576,
19588 maximum: 1048576,
19589 unit: "bytes",
19590 },
19591 Limit {
19592 id: "state_write_outcomes",
19593 default: 4096,
19594 maximum: 4096,
19595 unit: "entries",
19596 },
19597 Limit {
19598 id: "exact_decimal_scale",
19599 default: 18,
19600 maximum: 1024,
19601 unit: "decimal_places",
19602 },
19603 Limit {
19604 id: "retry_after_millis",
19605 default: 1000,
19606 maximum: 60000,
19607 unit: "milliseconds",
19608 },
19609 Limit {
19610 id: "mapping_fields",
19611 default: 16384,
19612 maximum: 16384,
19613 unit: "fields",
19614 },
19615 Limit {
19616 id: "search_result_window",
19617 default: 10000,
19618 maximum: 10000,
19619 unit: "items",
19620 },
19621 Limit {
19622 id: "routing_values",
19623 default: 1024,
19624 maximum: 1024,
19625 unit: "items",
19626 },
19627 Limit {
19628 id: "routing_value_bytes",
19629 default: 4096,
19630 maximum: 4096,
19631 unit: "bytes",
19632 },
19633 Limit {
19634 id: "query_recursion_depth",
19635 default: 64,
19636 maximum: 64,
19637 unit: "levels",
19638 },
19639 Limit {
19640 id: "vector_dimensions",
19641 default: 16384,
19642 maximum: 16384,
19643 unit: "dimensions",
19644 },
19645 Limit {
19646 id: "vector_query_bytes",
19647 default: 65536,
19648 maximum: 65536,
19649 unit: "bytes",
19650 },
19651 Limit {
19652 id: "vector_request_bytes",
19653 default: 1048576,
19654 maximum: 1048576,
19655 unit: "bytes",
19656 },
19657 Limit {
19658 id: "vector_candidates",
19659 default: 10000,
19660 maximum: 10000,
19661 unit: "items",
19662 },
19663 Limit {
19664 id: "vector_set_document_vectors",
19665 default: 128,
19666 maximum: 128,
19667 unit: "vectors",
19668 },
19669 Limit {
19670 id: "vector_set_document_bytes",
19671 default: 65536,
19672 maximum: 65536,
19673 unit: "bytes",
19674 },
19675 Limit {
19676 id: "vector_set_query_vectors",
19677 default: 32,
19678 maximum: 32,
19679 unit: "vectors",
19680 },
19681 Limit {
19682 id: "vector_set_query_bytes",
19683 default: 65536,
19684 maximum: 65536,
19685 unit: "bytes",
19686 },
19687 Limit {
19688 id: "retrieval_branches",
19689 default: 16,
19690 maximum: 16,
19691 unit: "branches",
19692 },
19693 Limit {
19694 id: "retrieval_branch_name_bytes",
19695 default: 64,
19696 maximum: 64,
19697 unit: "bytes",
19698 },
19699 Limit {
19700 id: "retrieval_window",
19701 default: 10000,
19702 maximum: 10000,
19703 unit: "items",
19704 },
19705 Limit {
19706 id: "fragment_fields",
19707 default: 4,
19708 maximum: 16,
19709 unit: "fields",
19710 },
19711 Limit {
19712 id: "fragments_per_field",
19713 default: 1,
19714 maximum: 8,
19715 unit: "items",
19716 },
19717 Limit {
19718 id: "fragment_bytes",
19719 default: 150,
19720 maximum: 8192,
19721 unit: "bytes",
19722 },
19723 Limit {
19724 id: "fragment_total_bytes",
19725 default: 65536,
19726 maximum: 65536,
19727 unit: "bytes",
19728 },
19729 Limit {
19730 id: "result_feature_hits",
19731 default: 10,
19732 maximum: 100,
19733 unit: "items",
19734 },
19735 Limit {
19736 id: "result_features",
19737 default: 4,
19738 maximum: 16,
19739 unit: "features",
19740 },
19741 Limit {
19742 id: "diversification_fields",
19743 default: 1,
19744 maximum: 4,
19745 unit: "fields",
19746 },
19747 Limit {
19748 id: "diversification_per_group",
19749 default: 1,
19750 maximum: 64,
19751 unit: "items",
19752 },
19753 Limit {
19754 id: "source_projection_patterns",
19755 default: 128,
19756 maximum: 128,
19757 unit: "patterns",
19758 },
19759 Limit {
19760 id: "source_projection_pattern_bytes",
19761 default: 512,
19762 maximum: 512,
19763 unit: "bytes",
19764 },
19765 Limit {
19766 id: "vector_evaluation_queries",
19767 default: 64,
19768 maximum: 256,
19769 unit: "queries",
19770 },
19771 Limit {
19772 id: "vector_evaluation_k",
19773 default: 10,
19774 maximum: 1000,
19775 unit: "items",
19776 },
19777 Limit {
19778 id: "vector_evaluation_profiles",
19779 default: 3,
19780 maximum: 3,
19781 unit: "profiles",
19782 },
19783 Limit {
19784 id: "vector_evaluation_artifact_bytes",
19785 default: 1048576,
19786 maximum: 1048576,
19787 unit: "bytes",
19788 },
19789 Limit {
19790 id: "vector_warm_components",
19791 default: 2,
19792 maximum: 3,
19793 unit: "components",
19794 },
19795 Limit {
19796 id: "vector_warm_requests",
19797 default: 1024,
19798 maximum: 65536,
19799 unit: "requests",
19800 },
19801 Limit {
19802 id: "vector_warm_bytes",
19803 default: 268435456,
19804 maximum: 1073741824,
19805 unit: "bytes",
19806 },
19807 Limit {
19808 id: "vector_warm_achievements",
19809 default: 1024,
19810 maximum: 10000,
19811 unit: "items",
19812 },
19813 Limit {
19814 id: "vector_warm_ttl_millis",
19815 default: 300000,
19816 maximum: 900000,
19817 unit: "milliseconds",
19818 },
19819 Limit {
19820 id: "operation_page_size",
19821 default: 100,
19822 maximum: 100,
19823 unit: "items",
19824 },
19825 Limit {
19826 id: "operation_wait_attempts",
19827 default: 20,
19828 maximum: 100,
19829 unit: "attempts",
19830 },
19831 Limit {
19832 id: "operation_wait_interval_millis",
19833 default: 100,
19834 maximum: 60000,
19835 unit: "milliseconds",
19836 },
19837 Limit {
19838 id: "resource_initial_shards",
19839 default: 1,
19840 maximum: 4096,
19841 unit: "shards",
19842 },
19843 Limit {
19844 id: "resource_target_shard_bytes",
19845 default: 536870912,
19846 maximum: 1125899906842624,
19847 unit: "bytes",
19848 },
19849 Limit {
19850 id: "resource_admission_weight",
19851 default: 1,
19852 maximum: 1000000,
19853 unit: "weight",
19854 },
19855 Limit {
19856 id: "resource_ram_bytes",
19857 default: 1073741824,
19858 maximum: 1125899906842624,
19859 unit: "bytes",
19860 },
19861 Limit {
19862 id: "resource_nvme_bytes",
19863 default: 2147483648,
19864 maximum: 1125899906842624,
19865 unit: "bytes",
19866 },
19867 Limit {
19868 id: "resource_refresh_millis",
19869 default: 200,
19870 maximum: 604800000,
19871 unit: "milliseconds",
19872 },
19873 Limit {
19874 id: "resource_memtable_bytes",
19875 default: 268435456,
19876 maximum: 1125899906842624,
19877 unit: "bytes",
19878 },
19879 Limit {
19880 id: "resource_parallelism",
19881 default: 1,
19882 maximum: 4096,
19883 unit: "workers",
19884 },
19885 Limit {
19886 id: "collection_export_bytes",
19887 default: 268435456,
19888 maximum: 268435456,
19889 unit: "bytes",
19890 },
19891 Limit {
19892 id: "collection_export_documents",
19893 default: 10000,
19894 maximum: 10000,
19895 unit: "documents",
19896 },
19897 Limit {
19898 id: "index_transfer_bytes",
19899 default: 268435456,
19900 maximum: 268435456,
19901 unit: "bytes",
19902 },
19903 Limit {
19904 id: "index_transfer_records",
19905 default: 10000,
19906 maximum: 10000,
19907 unit: "records",
19908 },
19909 Limit {
19910 id: "index_transfer_pages",
19911 default: 7,
19912 maximum: 7,
19913 unit: "pages",
19914 },
19915 Limit {
19916 id: "portability_prefix_bytes",
19917 default: 512,
19918 maximum: 512,
19919 unit: "bytes",
19920 },
19921];
19922#[derive(Clone, Copy, Debug, Eq, PartialEq)]
19923pub enum JsonError {
19924 DuplicateObjectField,
19925 InvalidScalar,
19926}
19927pub fn validate_semantic_json(value: &JsonValue) -> Result<(), JsonError> {
19928 match value {
19929 JsonValue::I64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
19930 JsonValue::U64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
19931 JsonValue::ExactDecimal(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
19932 JsonValue::Approximate(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
19933 JsonValue::Array(items) => items.iter().try_for_each(validate_semantic_json),
19934 JsonValue::Object(fields) => {
19935 let mut names = std::collections::BTreeSet::new();
19936 for field in fields {
19937 if !names.insert(field.name.as_str()) {
19938 return Err(JsonError::DuplicateObjectField);
19939 }
19940 validate_semantic_json(&field.value)?;
19941 }
19942 Ok(())
19943 }
19944 JsonValue::Null | JsonValue::Bool(_) | JsonValue::String(_) => Ok(()),
19945 }
19946}
19947#[cfg(test)]
19948mod tests {
19949 use super::*;
19950 fn assert_fixture<T>(value: &serde_json::Value) -> Result<(), Box<dyn std::error::Error>>
19951 where
19952 T: serde::de::DeserializeOwned + Serialize,
19953 {
19954 let decoded: T = serde_json::from_value(value.clone())?;
19955 assert_eq!(serde_json::to_value(decoded)?, *value);
19956 Ok(())
19957 }
19958 #[test]
19959 fn every_named_type_has_a_canonical_round_trip_fixture() -> Result<(), Box<dyn std::error::Error>> {
19960 let document: serde_json::Value =
19961 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
19962 assert_eq!(document["spec_sha256"], LODESTONE_API_SPEC_SHA256);
19963 let fixtures = document["named_types"]
19964 .as_object()
19965 .ok_or("named type fixtures are not an object")?;
19966 assert_eq!(fixtures.len(), LODESTONE_API_TYPE_CONTRACTS.len());
19967 for (name, value) in fixtures {
19968 match name.as_str() {
19969 "cursor" => assert_fixture::<Cursor>(value)?,
19970 "locator" => assert_fixture::<Locator>(value)?,
19971 "resource" => assert_fixture::<Resource>(value)?,
19972 "read_cut_kind" => assert_fixture::<ReadCutKind>(value)?,
19973 "read_cut_index_evidence" => assert_fixture::<ReadCutIndexEvidence>(value)?,
19974 "read_cut_evidence" => assert_fixture::<ReadCutEvidence>(value)?,
19975 "table_snapshot_object_role" => assert_fixture::<TableSnapshotObjectRole>(value)?,
19976 "table_snapshot_codec" => assert_fixture::<TableSnapshotCodec>(value)?,
19977 "table_snapshot_object" => assert_fixture::<TableSnapshotObject>(value)?,
19978 "table_snapshot" => assert_fixture::<TableSnapshot>(value)?,
19979 "table_snapshot_resolution_state" => assert_fixture::<TableSnapshotResolutionState>(value)?,
19980 "table_snapshot_resolution" => assert_fixture::<TableSnapshotResolution>(value)?,
19981 "table_snapshot_read" => assert_fixture::<TableSnapshotRead>(value)?,
19982 "logical_occupancy_counts" => assert_fixture::<LogicalOccupancyCounts>(value)?,
19983 "logical_occupancy_gap_state" => assert_fixture::<LogicalOccupancyGapState>(value)?,
19984 "logical_occupancy_snapshot_evidence" => assert_fixture::<LogicalOccupancySnapshotEvidence>(value)?,
19985 "logical_occupancy_window_gap" => assert_fixture::<LogicalOccupancyWindowGap>(value)?,
19986 "field_promotion_configuration" => assert_fixture::<FieldPromotionConfiguration>(value)?,
19987 "overload_configuration" => assert_fixture::<OverloadConfiguration>(value)?,
19988 "index_policies" => assert_fixture::<IndexPolicies>(value)?,
19989 "maintenance_budgets" => assert_fixture::<MaintenanceBudgets>(value)?,
19990 "resource_durability_class" => assert_fixture::<ResourceDurabilityClass>(value)?,
19991 "resource_storage_class" => assert_fixture::<ResourceStorageClass>(value)?,
19992 "vector_quality_objective" => assert_fixture::<VectorQualityObjective>(value)?,
19993 "vector_indexing_objective" => assert_fixture::<VectorIndexingObjective>(value)?,
19994 "vector_residency_intent" => assert_fixture::<VectorResidencyIntent>(value)?,
19995 "vector_calibration_binding" => assert_fixture::<VectorCalibrationBinding>(value)?,
19996 "vector_resource_policy" => assert_fixture::<VectorResourcePolicy>(value)?,
19997 "workload_class" => assert_fixture::<WorkloadClass>(value)?,
19998 "index_resource_spec" => assert_fixture::<IndexResourceSpec>(value)?,
19999 "index_summary" => assert_fixture::<IndexSummary>(value)?,
20000 "mapping_mode" => assert_fixture::<MappingMode>(value)?,
20001 "dynamic_mapping_policy" => assert_fixture::<DynamicMappingPolicy>(value)?,
20002 "mapping_analyzer" => assert_fixture::<MappingAnalyzer>(value)?,
20003 "keyword_normalizer" => assert_fixture::<KeywordNormalizer>(value)?,
20004 "vector_metric" => assert_fixture::<VectorMetric>(value)?,
20005 "mapping_scalar" => assert_fixture::<MappingScalar>(value)?,
20006 "sparse_vector_weight_type" => assert_fixture::<SparseVectorWeightType>(value)?,
20007 "mapping_field_type" => assert_fixture::<MappingFieldType>(value)?,
20008 "mapping_field" => assert_fixture::<MappingField>(value)?,
20009 "multi_field_projection" => assert_fixture::<MultiFieldProjection>(value)?,
20010 "analyzer_identity" => assert_fixture::<AnalyzerIdentity>(value)?,
20011 "keyword_limit" => assert_fixture::<KeywordLimit>(value)?,
20012 "profile_privacy_action" => assert_fixture::<ProfilePrivacyAction>(value)?,
20013 "profile_privacy_field" => assert_fixture::<ProfilePrivacyField>(value)?,
20014 "profile_privacy_rule" => assert_fixture::<ProfilePrivacyRule>(value)?,
20015 "profile_privacy_policy" => assert_fixture::<ProfilePrivacyPolicy>(value)?,
20016 "mapping_record_model" => assert_fixture::<MappingRecordModel>(value)?,
20017 "mapping" => assert_fixture::<Mapping>(value)?,
20018 "index_detail" => assert_fixture::<IndexDetail>(value)?,
20019 "source_provider" => assert_fixture::<SourceProvider>(value)?,
20020 "source_decoder" => assert_fixture::<SourceDecoder>(value)?,
20021 "source_replay_guarantees" => assert_fixture::<SourceReplayGuarantees>(value)?,
20022 "source_partition_configuration" => assert_fixture::<SourcePartitionConfiguration>(value)?,
20023 "replayable_source_configuration" => assert_fixture::<ReplayableSourceConfiguration>(value)?,
20024 "source_partition_status" => assert_fixture::<SourcePartitionStatus>(value)?,
20025 "replayable_source_status" => assert_fixture::<ReplayableSourceStatus>(value)?,
20026 "source_control_transition" => assert_fixture::<SourceControlTransition>(value)?,
20027 "history_ledger_precondition" => assert_fixture::<HistoryLedgerPrecondition>(value)?,
20028 "history_retention_policy" => assert_fixture::<HistoryRetentionPolicy>(value)?,
20029 "history_selector" => assert_fixture::<HistorySelector>(value)?,
20030 "history_hold" => assert_fixture::<HistoryHold>(value)?,
20031 "history_status" => assert_fixture::<HistoryStatus>(value)?,
20032 "history_resolution" => assert_fixture::<HistoryResolution>(value)?,
20033 "index_reference" => assert_fixture::<IndexReference>(value)?,
20034 "alias_target" => assert_fixture::<AliasTarget>(value)?,
20035 "alias_summary" => assert_fixture::<AliasSummary>(value)?,
20036 "alias_detail" => assert_fixture::<AliasDetail>(value)?,
20037 "data_stream_summary" => assert_fixture::<DataStreamSummary>(value)?,
20038 "component_template_binding" => assert_fixture::<ComponentTemplateBinding>(value)?,
20039 "index_template_binding" => assert_fixture::<IndexTemplateBinding>(value)?,
20040 "lifecycle_policy_binding" => assert_fixture::<LifecyclePolicyBinding>(value)?,
20041 "data_stream_detail" => assert_fixture::<DataStreamDetail>(value)?,
20042 "component_template_summary" => assert_fixture::<ComponentTemplateSummary>(value)?,
20043 "component_template_detail" => assert_fixture::<ComponentTemplateDetail>(value)?,
20044 "index_template_summary" => assert_fixture::<IndexTemplateSummary>(value)?,
20045 "index_template_detail" => assert_fixture::<IndexTemplateDetail>(value)?,
20046 "ingest_pipeline_summary" => assert_fixture::<IngestPipelineSummary>(value)?,
20047 "ingest_pipeline_detail" => assert_fixture::<IngestPipelineDetail>(value)?,
20048 "ingest_pipeline_selection" => assert_fixture::<IngestPipelineSelection>(value)?,
20049 "lifecycle_policy_summary" => assert_fixture::<LifecyclePolicySummary>(value)?,
20050 "rollover_thresholds" => assert_fixture::<RolloverThresholds>(value)?,
20051 "retention_policy" => assert_fixture::<RetentionPolicy>(value)?,
20052 "lifecycle_policy_detail" => assert_fixture::<LifecyclePolicyDetail>(value)?,
20053 "text_query_operator" => assert_fixture::<TextQueryOperator>(value)?,
20054 "text_query_analyzer" => assert_fixture::<TextQueryAnalyzer>(value)?,
20055 "zero_terms_query" => assert_fixture::<ZeroTermsQuery>(value)?,
20056 "text_query_options" => assert_fixture::<TextQueryOptions>(value)?,
20057 "multi_match_mode" => assert_fixture::<MultiMatchMode>(value)?,
20058 "multi_match_field" => assert_fixture::<MultiMatchField>(value)?,
20059 "multi_match_options" => assert_fixture::<MultiMatchOptions>(value)?,
20060 "sort_order" => assert_fixture::<SortOrder>(value)?,
20061 "sort_mode" => assert_fixture::<SortMode>(value)?,
20062 "missing_order" => assert_fixture::<MissingOrder>(value)?,
20063 "nested_score_mode" => assert_fixture::<NestedScoreMode>(value)?,
20064 "nested_inner_hits" => assert_fixture::<NestedInnerHits>(value)?,
20065 "sort_spec" => assert_fixture::<SortSpec>(value)?,
20066 "query" => assert_fixture::<Query>(value)?,
20067 "dense_retrieval_mode" => assert_fixture::<DenseRetrievalMode>(value)?,
20068 "vector_achieved_mode" => assert_fixture::<VectorAchievedMode>(value)?,
20069 "vector_branch_diagnostics" => assert_fixture::<VectorBranchDiagnostics>(value)?,
20070 "dense_vector_element_type" => assert_fixture::<DenseVectorElementType>(value)?,
20071 "dense_vector_byte_order" => assert_fixture::<DenseVectorByteOrder>(value)?,
20072 "vector_value" => assert_fixture::<VectorValue>(value)?,
20073 "sparse_vector_entry" => assert_fixture::<SparseVectorEntry>(value)?,
20074 "sparse_vector_value" => assert_fixture::<SparseVectorValue>(value)?,
20075 "vector_set_value" => assert_fixture::<VectorSetValue>(value)?,
20076 "vector_evaluation_snapshot" => assert_fixture::<VectorEvaluationSnapshot>(value)?,
20077 "vector_evaluation_query_set" => assert_fixture::<VectorEvaluationQuerySet>(value)?,
20078 "vector_evaluation_budget" => assert_fixture::<VectorEvaluationBudget>(value)?,
20079 "vector_candidate_policy" => assert_fixture::<VectorCandidatePolicy>(value)?,
20080 "vector_calibration_objective" => assert_fixture::<VectorCalibrationObjective>(value)?,
20081 "vector_strategy_profile" => assert_fixture::<VectorStrategyProfile>(value)?,
20082 "vector_evaluation_work" => assert_fixture::<VectorEvaluationWork>(value)?,
20083 "vector_evaluation_error_code" => assert_fixture::<VectorEvaluationErrorCode>(value)?,
20084 "vector_evaluation_error" => assert_fixture::<VectorEvaluationError>(value)?,
20085 "vector_recall_result" => assert_fixture::<VectorRecallResult>(value)?,
20086 "vector_calibration_candidate" => assert_fixture::<VectorCalibrationCandidate>(value)?,
20087 "vector_calibration_result" => assert_fixture::<VectorCalibrationResult>(value)?,
20088 "vector_diagnostic_result" => assert_fixture::<VectorDiagnosticResult>(value)?,
20089 "vector_warm_component" => assert_fixture::<VectorWarmComponent>(value)?,
20090 "vector_warm_state" => assert_fixture::<VectorWarmState>(value)?,
20091 "vector_warm_achievement" => assert_fixture::<VectorWarmAchievement>(value)?,
20092 "vector_warm_result" => assert_fixture::<VectorWarmResult>(value)?,
20093 "dense_retrieval_threshold" => assert_fixture::<DenseRetrievalThreshold>(value)?,
20094 "retrieval_branch" => assert_fixture::<RetrievalBranch>(value)?,
20095 "weighted_rrf_fusion" => assert_fixture::<WeightedRrfFusion>(value)?,
20096 "retrieval_plan" => assert_fixture::<RetrievalPlan>(value)?,
20097 "histogram_bounds" => assert_fixture::<HistogramBounds>(value)?,
20098 "date_histogram_bounds" => assert_fixture::<DateHistogramBounds>(value)?,
20099 "approximation_algorithm" => assert_fixture::<ApproximationAlgorithm>(value)?,
20100 "approximation" => assert_fixture::<Approximation>(value)?,
20101 "percentile_value" => assert_fixture::<PercentileValue>(value)?,
20102 "approximate_percentile_value" => assert_fixture::<ApproximatePercentileValue>(value)?,
20103 "time_series_operator" => assert_fixture::<TimeSeriesOperator>(value)?,
20104 "time_series_missing_data" => assert_fixture::<TimeSeriesMissingData>(value)?,
20105 "time_series_quantile_mode" => assert_fixture::<TimeSeriesQuantileMode>(value)?,
20106 "time_series_bucket_state" => assert_fixture::<TimeSeriesBucketState>(value)?,
20107 "time_series_quantile_value" => assert_fixture::<TimeSeriesQuantileValue>(value)?,
20108 "time_series_value" => assert_fixture::<TimeSeriesValue>(value)?,
20109 "time_series_bucket" => assert_fixture::<TimeSeriesBucket>(value)?,
20110 "relationship_traversal_direction" => assert_fixture::<RelationshipTraversalDirection>(value)?,
20111 "relationship_traversal_filter" => assert_fixture::<RelationshipTraversalFilter>(value)?,
20112 "relationship_traversal_budget" => assert_fixture::<RelationshipTraversalBudget>(value)?,
20113 "traversed_relationship" => assert_fixture::<TraversedRelationship>(value)?,
20114 "profile_query_operation" => assert_fixture::<ProfileQueryOperation>(value)?,
20115 "profile_group_by" => assert_fixture::<ProfileGroupBy>(value)?,
20116 "profile_query_filter" => assert_fixture::<ProfileQueryFilter>(value)?,
20117 "profile_query_budget" => assert_fixture::<ProfileQueryBudget>(value)?,
20118 "profile_query_row" => assert_fixture::<ProfileQueryRow>(value)?,
20119 "temporal_input" => assert_fixture::<TemporalInput>(value)?,
20120 "temporal_pattern" => assert_fixture::<TemporalPattern>(value)?,
20121 "historical_temporal_definition" => assert_fixture::<HistoricalTemporalDefinition>(value)?,
20122 "temporal_evidence_status" => assert_fixture::<TemporalEvidenceStatus>(value)?,
20123 "temporal_source_event" => assert_fixture::<TemporalSourceEvent>(value)?,
20124 "temporal_evidence" => assert_fixture::<TemporalEvidence>(value)?,
20125 "continuous_temporal_start" => assert_fixture::<ContinuousTemporalStart>(value)?,
20126 "continuous_temporal_watermark_policy" => assert_fixture::<ContinuousTemporalWatermarkPolicy>(value)?,
20127 "continuous_temporal_late_data_policy" => assert_fixture::<ContinuousTemporalLateDataPolicy>(value)?,
20128 "continuous_temporal_output" => assert_fixture::<ContinuousTemporalOutput>(value)?,
20129 "continuous_temporal_definition" => assert_fixture::<ContinuousTemporalDefinition>(value)?,
20130 "continuous_temporal_frontier" => assert_fixture::<ContinuousTemporalFrontier>(value)?,
20131 "continuous_temporal_available_frontier" => {
20132 assert_fixture::<ContinuousTemporalAvailableFrontier>(value)?
20133 }
20134 "continuous_temporal_gap_reason" => assert_fixture::<ContinuousTemporalGapReason>(value)?,
20135 "continuous_temporal_gap" => assert_fixture::<ContinuousTemporalGap>(value)?,
20136 "continuous_temporal_evaluation" => assert_fixture::<ContinuousTemporalEvaluation>(value)?,
20137 "composite_order" => assert_fixture::<CompositeOrder>(value)?,
20138 "composite_source" => assert_fixture::<CompositeSource>(value)?,
20139 "aggregation" => assert_fixture::<Aggregation>(value)?,
20140 "nested_search_hit" => assert_fixture::<NestedSearchHit>(value)?,
20141 "named_nested_inner_hits_result" => assert_fixture::<NamedNestedInnerHitsResult>(value)?,
20142 "fragment_boundary" => assert_fixture::<FragmentBoundary>(value)?,
20143 "fragment_offset_encoding" => assert_fixture::<FragmentOffsetEncoding>(value)?,
20144 "fragment_ranker" => assert_fixture::<FragmentRanker>(value)?,
20145 "fragment_request" => assert_fixture::<FragmentRequest>(value)?,
20146 "search_fragment" => assert_fixture::<SearchFragment>(value)?,
20147 "numeric_feature_transform" => assert_fixture::<NumericFeatureTransform>(value)?,
20148 "numeric_result_feature" => assert_fixture::<NumericResultFeature>(value)?,
20149 "result_feature_request" => assert_fixture::<ResultFeatureRequest>(value)?,
20150 "result_diversification" => assert_fixture::<ResultDiversification>(value)?,
20151 "source_projection" => assert_fixture::<SourceProjection>(value)?,
20152 "branch_score_kind" => assert_fixture::<BranchScoreKind>(value)?,
20153 "result_feature" => assert_fixture::<ResultFeature>(value)?,
20154 "native_record_locator" => assert_fixture::<NativeRecordLocator>(value)?,
20155 "search_hit" => assert_fixture::<SearchHit>(value)?,
20156 "record_erasure_state" => assert_fixture::<RecordErasureState>(value)?,
20157 "record_erasure_receipt" => assert_fixture::<RecordErasureReceipt>(value)?,
20158 "aggregation_bucket" => assert_fixture::<AggregationBucket>(value)?,
20159 "aggregation_result" => assert_fixture::<AggregationResult>(value)?,
20160 "shard_counts" => assert_fixture::<ShardCounts>(value)?,
20161 "total_hits_relation" => assert_fixture::<TotalHitsRelation>(value)?,
20162 "search_total" => assert_fixture::<SearchTotal>(value)?,
20163 "search_execution_freshness" => assert_fixture::<SearchExecutionFreshness>(value)?,
20164 "search_freshness" => assert_fixture::<SearchFreshness>(value)?,
20165 "search_degradation_reason" => assert_fixture::<SearchDegradationReason>(value)?,
20166 "search_achievement" => assert_fixture::<SearchAchievement>(value)?,
20167 "search_failure_stage" => assert_fixture::<SearchFailureStage>(value)?,
20168 "search_failure_reason" => assert_fixture::<SearchFailureReason>(value)?,
20169 "collection_shard" => assert_fixture::<CollectionShard>(value)?,
20170 "search_partial_failure" => assert_fixture::<SearchPartialFailure>(value)?,
20171 "artifact" => assert_fixture::<Artifact>(value)?,
20172 "portability_storage_capability" => assert_fixture::<PortabilityStorageCapability>(value)?,
20173 "collection_export_artifact" => assert_fixture::<CollectionExportArtifact>(value)?,
20174 "collection_transfer_sequence" => assert_fixture::<CollectionTransferSequence>(value)?,
20175 "collection_transfer_artifact" => assert_fixture::<CollectionTransferArtifact>(value)?,
20176 "collection_standby_state" => assert_fixture::<CollectionStandbyState>(value)?,
20177 "collection_standby" => assert_fixture::<CollectionStandby>(value)?,
20178 "portability_key_capability_reference_state" => {
20179 assert_fixture::<PortabilityKeyCapabilityReferenceState>(value)?
20180 }
20181 "collection_export_retirement" => assert_fixture::<CollectionExportRetirement>(value)?,
20182 "index_transfer_page" => assert_fixture::<IndexTransferPage>(value)?,
20183 "index_transfer_artifact" => assert_fixture::<IndexTransferArtifact>(value)?,
20184 "search_validation_bound" => assert_fixture::<SearchValidationBound>(value)?,
20185 "search_validation_estimates" => assert_fixture::<SearchValidationEstimates>(value)?,
20186 "search_validation_limit" => assert_fixture::<SearchValidationLimit>(value)?,
20187 "operation_kind" => assert_fixture::<OperationKind>(value)?,
20188 "operation_authority" => assert_fixture::<OperationAuthority>(value)?,
20189 "operation_target" => assert_fixture::<OperationTarget>(value)?,
20190 "operation_state" => assert_fixture::<OperationState>(value)?,
20191 "operation_pending_state" => assert_fixture::<OperationPendingState>(value)?,
20192 "operation_progress_unit" => assert_fixture::<OperationProgressUnit>(value)?,
20193 "operation_progress" => assert_fixture::<OperationProgress>(value)?,
20194 "operation_result" => assert_fixture::<OperationResult>(value)?,
20195 "operation_failure" => assert_fixture::<OperationFailure>(value)?,
20196 "operation_cancellation" => assert_fixture::<OperationCancellation>(value)?,
20197 "operation_retention_state" => assert_fixture::<OperationRetentionState>(value)?,
20198 "operation_retention" => assert_fixture::<OperationRetention>(value)?,
20199 "operation" => assert_fixture::<Operation>(value)?,
20200 "write_durability_boundary" => assert_fixture::<WriteDurabilityBoundary>(value)?,
20201 "write_visibility_mode" => assert_fixture::<WriteVisibilityMode>(value)?,
20202 "write_response_stage" => assert_fixture::<WriteResponseStage>(value)?,
20203 "write_achievement" => assert_fixture::<WriteAchievement>(value)?,
20204 "mutation_commit_position" => assert_fixture::<MutationCommitPosition>(value)?,
20205 "mutation_commit_receipt" => assert_fixture::<MutationCommitReceipt>(value)?,
20206 "mutation_resolver" => assert_fixture::<MutationResolver>(value)?,
20207 "mutation_outcome" => assert_fixture::<MutationOutcome>(value)?,
20208 "submission_state" => assert_fixture::<SubmissionState>(value)?,
20209 "expected_binding" => assert_fixture::<ExpectedBinding>(value)?,
20210 "administration_alias_action" => assert_fixture::<AdministrationAliasAction>(value)?,
20211 "administration_mutation" => assert_fixture::<AdministrationMutation>(value)?,
20212 "administration_outcome" => assert_fixture::<AdministrationOutcome>(value)?,
20213 "index_change_apply_receipt" => assert_fixture::<IndexChangeApplyReceipt>(value)?,
20214 "index_change_resolution_state" => assert_fixture::<IndexChangeResolutionState>(value)?,
20215 "bulk_document_item" => assert_fixture::<BulkDocumentItem>(value)?,
20216 "bulk_document_item_outcome" => assert_fixture::<BulkDocumentItemOutcome>(value)?,
20217 "bulk_document_outcome" => assert_fixture::<BulkDocumentOutcome>(value)?,
20218 "metric_attribute_value" => assert_fixture::<MetricAttributeValue>(value)?,
20219 "metric_attribute" => assert_fixture::<MetricAttribute>(value)?,
20220 "metric_number" => assert_fixture::<MetricNumber>(value)?,
20221 "metric_temporality" => assert_fixture::<MetricTemporality>(value)?,
20222 "metric_point_kind" => assert_fixture::<MetricPointKind>(value)?,
20223 "metric_exponential_buckets" => assert_fixture::<MetricExponentialBuckets>(value)?,
20224 "metric_data" => assert_fixture::<MetricData>(value)?,
20225 "metric_instrumentation_scope" => assert_fixture::<MetricInstrumentationScope>(value)?,
20226 "metric_exemplar" => assert_fixture::<MetricExemplar>(value)?,
20227 "metric_point" => assert_fixture::<MetricPoint>(value)?,
20228 "entity_ref" => assert_fixture::<EntityRef>(value)?,
20229 "relationship_evidence_ref" => assert_fixture::<RelationshipEvidenceRef>(value)?,
20230 "relationship_directionality" => assert_fixture::<RelationshipDirectionality>(value)?,
20231 "relationship_record" => assert_fixture::<RelationshipRecord>(value)?,
20232 "profile_label" => assert_fixture::<ProfileLabel>(value)?,
20233 "profile_sample_type" => assert_fixture::<ProfileSampleType>(value)?,
20234 "profile_mapping" => assert_fixture::<ProfileMapping>(value)?,
20235 "profile_function" => assert_fixture::<ProfileFunction>(value)?,
20236 "profile_line" => assert_fixture::<ProfileLine>(value)?,
20237 "profile_location" => assert_fixture::<ProfileLocation>(value)?,
20238 "profile_stack" => assert_fixture::<ProfileStack>(value)?,
20239 "profile_sample" => assert_fixture::<ProfileSample>(value)?,
20240 "profile_instrumentation_scope" => assert_fixture::<ProfileInstrumentationScope>(value)?,
20241 "profile_batch" => assert_fixture::<ProfileBatch>(value)?,
20242 "native_record" => assert_fixture::<NativeRecord>(value)?,
20243 "retained_append_item" => assert_fixture::<RetainedAppendItem>(value)?,
20244 "retained_append_state" => assert_fixture::<RetainedAppendState>(value)?,
20245 "retained_append_retry_safety" => assert_fixture::<RetainedAppendRetrySafety>(value)?,
20246 "retained_append_item_outcome" => assert_fixture::<RetainedAppendItemOutcome>(value)?,
20247 "retained_append_bulk_outcome" => assert_fixture::<RetainedAppendBulkOutcome>(value)?,
20248 "retained_append_observation_state" => assert_fixture::<RetainedAppendObservationState>(value)?,
20249 "retained_append_observation_outcome" => assert_fixture::<RetainedAppendObservationOutcome>(value)?,
20250 "binary_value" => assert_fixture::<BinaryValue>(value)?,
20251 "state_hash_field" => assert_fixture::<StateHashField>(value)?,
20252 "state_set_entry" => assert_fixture::<StateSetEntry>(value)?,
20253 "state_set_condition" => assert_fixture::<StateSetCondition>(value)?,
20254 "state_operation" => assert_fixture::<StateOperation>(value)?,
20255 "state_optional_value" => assert_fixture::<StateOptionalValue>(value)?,
20256 "state_command_result" => assert_fixture::<StateCommandResult>(value)?,
20257 "state_write_resolution" => assert_fixture::<StateWriteResolution>(value)?,
20258 "service_credential_reservation" => assert_fixture::<ServiceCredentialReservation>(value)?,
20259 "subscription_metadata_field" => assert_fixture::<SubscriptionMetadataField>(value)?,
20260 "subscription_field" => assert_fixture::<SubscriptionField>(value)?,
20261 "subscription_filter" => assert_fixture::<SubscriptionFilter>(value)?,
20262 "subscription_cursor_entry" => assert_fixture::<SubscriptionCursorEntry>(value)?,
20263 "subscription_route" => assert_fixture::<SubscriptionRoute>(value)?,
20264 "subscription_start_position" => assert_fixture::<SubscriptionStartPosition>(value)?,
20265 "subscription_start" => assert_fixture::<SubscriptionStart>(value)?,
20266 "subscription_accepted" => assert_fixture::<SubscriptionAccepted>(value)?,
20267 "subscription_writer_fence" => assert_fixture::<SubscriptionWriterFence>(value)?,
20268 "subscription_event" => assert_fixture::<SubscriptionEvent>(value)?,
20269 "subscription_heartbeat" => assert_fixture::<SubscriptionHeartbeat>(value)?,
20270 "subscription_gap" => assert_fixture::<SubscriptionGap>(value)?,
20271 "subscription_terminal_reason" => assert_fixture::<SubscriptionTerminalReason>(value)?,
20272 "subscription_terminal" => assert_fixture::<SubscriptionTerminal>(value)?,
20273 "subscription_frame" => assert_fixture::<SubscriptionFrame>(value)?,
20274 "stream_binding" => assert_fixture::<StreamBinding>(value)?,
20275 "capability_grant" => assert_fixture::<CapabilityGrant>(value)?,
20276 "protocol_limit" => assert_fixture::<ProtocolLimit>(value)?,
20277 "document_mutation_condition" => assert_fixture::<DocumentMutationCondition>(value)?,
20278 "audit_adapter" => assert_fixture::<AuditAdapter>(value)?,
20279 "audit_decision" => assert_fixture::<AuditDecision>(value)?,
20280 "audit_outcome" => assert_fixture::<AuditOutcome>(value)?,
20281 "audit_detail" => assert_fixture::<AuditDetail>(value)?,
20282 "audit_gap_reason" => assert_fixture::<AuditGapReason>(value)?,
20283 "audit_event" => assert_fixture::<AuditEvent>(value)?,
20284 "audit_gap" => assert_fixture::<AuditGap>(value)?,
20285 "audit_stream_state" => assert_fixture::<AuditStreamState>(value)?,
20286 "service_credential_grant" => assert_fixture::<ServiceCredentialGrant>(value)?,
20287 "service_credential_summary" => assert_fixture::<ServiceCredentialSummary>(value)?,
20288 "security_role" => assert_fixture::<SecurityRole>(value)?,
20289 "role_append_scope_change" => assert_fixture::<RoleAppendScopeChange>(value)?,
20290 "role_append_access_preparation" => assert_fixture::<RoleAppendAccessPreparation>(value)?,
20291 "source_authorization_subject_kind" => assert_fixture::<SourceAuthorizationSubjectKind>(value)?,
20292 "source_authorization_subject" => assert_fixture::<SourceAuthorizationSubject>(value)?,
20293 "delegated_query_source_subject" => assert_fixture::<DelegatedQuerySourceSubject>(value)?,
20294 "delegated_query_subject_claims" => assert_fixture::<DelegatedQuerySubjectClaims>(value)?,
20295 "signed_delegated_query_subject" => assert_fixture::<SignedDelegatedQuerySubject>(value)?,
20296 "source_authorization_principal_change" => assert_fixture::<SourceAuthorizationPrincipalChange>(value)?,
20297 "source_authorization_group_change" => assert_fixture::<SourceAuthorizationGroupChange>(value)?,
20298 "source_authorization_membership_replacement" => {
20299 assert_fixture::<SourceAuthorizationMembershipReplacement>(value)?
20300 }
20301 "source_authorization_document_acl_replacement" => {
20302 assert_fixture::<SourceAuthorizationDocumentAclReplacement>(value)?
20303 }
20304 "source_authorization_batch" => assert_fixture::<SourceAuthorizationBatch>(value)?,
20305 "source_authorization_applied_counts" => assert_fixture::<SourceAuthorizationAppliedCounts>(value)?,
20306 "source_authorization_receipt" => assert_fixture::<SourceAuthorizationReceipt>(value)?,
20307 "source_authorization_preparation" => assert_fixture::<SourceAuthorizationPreparation>(value)?,
20308 "source_authorization_resolution_state" => assert_fixture::<SourceAuthorizationResolutionState>(value)?,
20309 "source_authorization_resolution" => assert_fixture::<SourceAuthorizationResolution>(value)?,
20310 "security_action_outcome" => assert_fixture::<SecurityActionOutcome>(value)?,
20311 "maintenance_work_state" => assert_fixture::<MaintenanceWorkState>(value)?,
20312 "maintenance_attempt_state" => assert_fixture::<MaintenanceAttemptState>(value)?,
20313 "maintenance_failure_class" => assert_fixture::<MaintenanceFailureClass>(value)?,
20314 "maintenance_failure_class_count" => assert_fixture::<MaintenanceFailureClassCount>(value)?,
20315 "maintenance_attempt_observation" => assert_fixture::<MaintenanceAttemptObservation>(value)?,
20316 "maintenance_task_scope" => assert_fixture::<MaintenanceTaskScope>(value)?,
20317 "maintenance_task_status" => assert_fixture::<MaintenanceTaskStatus>(value)?,
20318 "maintenance_status_aggregate" => assert_fixture::<MaintenanceStatusAggregate>(value)?,
20319 "runtime_status_detail" => assert_fixture::<RuntimeStatusDetail>(value)?,
20320 "result_cache_status" => assert_fixture::<ResultCacheStatus>(value)?,
20321 "field_promotion_status" => assert_fixture::<FieldPromotionStatus>(value)?,
20322 "overload_shard_status" => assert_fixture::<OverloadShardStatus>(value)?,
20323 "external_key_binding" => assert_fixture::<ExternalKeyBinding>(value)?,
20324 "external_key_retirement_target" => assert_fixture::<ExternalKeyRetirementTarget>(value)?,
20325 "external_key_retirement_outcome" => assert_fixture::<ExternalKeyRetirementOutcome>(value)?,
20326 "external_key_retirement_receipt" => assert_fixture::<ExternalKeyRetirementReceipt>(value)?,
20327 "external_key_retirement_resolution_state" => {
20328 assert_fixture::<ExternalKeyRetirementResolutionState>(value)?
20329 }
20330 "rollup_measure" => assert_fixture::<RollupMeasure>(value)?,
20331 "aggregate_then_delete_policy" => assert_fixture::<AggregateThenDeletePolicy>(value)?,
20332 "lifecycle_binding_status" => assert_fixture::<LifecycleBindingStatus>(value)?,
20333 "lifecycle_rollup_status" => assert_fixture::<LifecycleRollupStatus>(value)?,
20334 "lifecycle_status" => assert_fixture::<LifecycleStatus>(value)?,
20335 "quota_limit" => assert_fixture::<QuotaLimit>(value)?,
20336 "quota_consumption" => assert_fixture::<QuotaConsumption>(value)?,
20337 "quota_update" => assert_fixture::<QuotaUpdate>(value)?,
20338 "storage_overall_posture" => assert_fixture::<StorageOverallPosture>(value)?,
20339 "storage_profile_role" => assert_fixture::<StorageProfileRole>(value)?,
20340 "storage_provider_posture" => assert_fixture::<StorageProviderPosture>(value)?,
20341 "storage_backend_service_class" => assert_fixture::<StorageBackendServiceClass>(value)?,
20342 "storage_profile_role_binding" => assert_fixture::<StorageProfileRoleBinding>(value)?,
20343 "storage_profile_attestation" => assert_fixture::<StorageProfileAttestation>(value)?,
20344 "storage_profile_expectation" => assert_fixture::<StorageProfileExpectation>(value)?,
20345 "core_binding" => assert_fixture::<CoreBinding>(value)?,
20346 "readiness_observation" => assert_fixture::<ReadinessObservation>(value)?,
20347 "usage_dimension" => assert_fixture::<UsageDimension>(value)?,
20348 "physical_usage_value" => assert_fixture::<PhysicalUsageValue>(value)?,
20349 "core_usage_units" => assert_fixture::<CoreUsageUnits>(value)?,
20350 "core_usage_correction" => assert_fixture::<CoreUsageCorrection>(value)?,
20351 "index_storage_usage" => assert_fixture::<IndexStorageUsage>(value)?,
20352 "collection_storage_usage" => assert_fixture::<CollectionStorageUsage>(value)?,
20353 "response_meta" => assert_fixture::<ResponseMeta>(value)?,
20354 "error_disposition" => assert_fixture::<ErrorDisposition>(value)?,
20355 "recovery_action" => assert_fixture::<RecoveryAction>(value)?,
20356 "limit_class" => assert_fixture::<LimitClass>(value)?,
20357 "error_detail" => assert_fixture::<ErrorDetail>(value)?,
20358 "connection_profile" => assert_fixture::<ConnectionProfile>(value)?,
20359 _ => return Err("fixture names an unknown generated type".into()),
20360 }
20361 }
20362 Ok(())
20363 }
20364 #[test]
20365 fn every_aggregation_variant_has_a_canonical_fixture() -> Result<(), Box<dyn std::error::Error>> {
20366 let document: serde_json::Value =
20367 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
20368 let fixtures = document["aggregation_variants"]
20369 .as_object()
20370 .ok_or("aggregation fixtures are not an object")?;
20371 assert_eq!(fixtures.len(), 17);
20372 for value in fixtures.values() {
20373 assert_fixture::<Aggregation>(value)?;
20374 }
20375 Ok(())
20376 }
20377 #[test]
20378 fn every_versioned_union_variant_has_a_canonical_fixture() -> Result<(), Box<dyn std::error::Error>> {
20379 let document: serde_json::Value =
20380 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
20381 let fixtures = document["versioned_union_variants"]
20382 .as_object()
20383 .ok_or("versioned union fixtures are not an object")?;
20384 assert_eq!(fixtures.len(), 6);
20385 for (name, value) in fixtures {
20386 match name.as_str() {
20387 "mapping_field_type.vector" => assert_fixture::<MappingFieldType>(value)?,
20388 "mapping_field_type.sparse_vector" => assert_fixture::<MappingFieldType>(value)?,
20389 "mapping_field_type.vector_set" => assert_fixture::<MappingFieldType>(value)?,
20390 "mapping_record_model.metric_v1" => assert_fixture::<MappingRecordModel>(value)?,
20391 "mapping_record_model.relationship_v1" => assert_fixture::<MappingRecordModel>(value)?,
20392 "mapping_record_model.profile_v1" => assert_fixture::<MappingRecordModel>(value)?,
20393 _ => return Err("fixture names an unknown versioned union variant".into()),
20394 }
20395 }
20396 Ok(())
20397 }
20398 #[test]
20399 fn exact_scalar_canonicality_is_closed() {
20400 assert_eq!(
20401 U64 {
20402 value: u64::MAX.to_string()
20403 }
20404 .validate(),
20405 Ok(())
20406 );
20407 assert_eq!(
20408 I64 {
20409 value: i64::MIN.to_string()
20410 }
20411 .validate(),
20412 Ok(())
20413 );
20414 assert_eq!(U64 { value: "01".to_owned() }.validate(), Err(ScalarError::InvalidU64));
20415 assert_eq!(
20416 ExactDecimal {
20417 coefficient: "12345".to_owned(),
20418 scale: 2
20419 }
20420 .validate(),
20421 Ok(())
20422 );
20423 assert_eq!(
20424 ExactDecimal {
20425 coefficient: "123450".to_owned(),
20426 scale: 3
20427 }
20428 .validate(),
20429 Err(ScalarError::InvalidDecimal)
20430 );
20431 assert_eq!(
20432 ExactDecimal {
20433 coefficient: "1".to_owned(),
20434 scale: 1_025
20435 }
20436 .validate(),
20437 Err(ScalarError::InvalidDecimal)
20438 );
20439 }
20440 #[test]
20441 fn scalar_decoders_refuse_numbers_and_noncanonical_strings() {
20442 assert!(serde_json::from_str::<U64>("9007199254740993").is_err());
20443 assert!(serde_json::from_str::<U64>(r#""01""#).is_err());
20444 assert!(serde_json::from_str::<Identity>(r#""0123456789ABCDEF0123456789ABCDEF""#).is_err());
20445 assert!(serde_json::from_str::<Digest>(r#""0123456789abcdef0123456789abcdef""#).is_err());
20446 assert!(serde_json::from_str::<ExactDecimal>(r#"{"coefficient":"123450","scale":3}"#).is_err());
20447 assert!(serde_json::from_str::<ApproximateNumber>(r#""1.0""#).is_err());
20448 }
20449 #[test]
20450 fn semantic_json_rejects_duplicate_fields() {
20451 let value = JsonValue::Object(vec![
20452 JsonField {
20453 name: "x".to_owned(),
20454 value: JsonValue::Null,
20455 },
20456 JsonField {
20457 name: "x".to_owned(),
20458 value: JsonValue::Bool(true),
20459 },
20460 ]);
20461 assert_eq!(validate_semantic_json(&value), Err(JsonError::DuplicateObjectField));
20462 }
20463 #[test]
20464 fn strict_generated_shapes_refuse_malformed_duplicate_unknown_field_and_tag() {
20465 assert!(serde_json::from_str::<DiscoverRequest>(r#"{"unexpected":true}"#).is_err());
20466 assert!(serde_json::from_str::<Cursor>(r#"{"value":"a","value":"b"}"#).is_err());
20467 assert!(serde_json::from_str::<Query>(r#"{"kind":"future_query"}"#).is_err());
20468 assert!(serde_json::from_str::<Cursor>(r#"{"value":1}"#).is_err());
20469 }
20470 fn admitted_error_detail(code: ErrorCode) -> ErrorDetail {
20471 match code {
20472 ErrorCode::Aborted => ErrorDetail::Aborted {
20473 reason: "test".to_owned(),
20474 },
20475 ErrorCode::DeadlineExceeded => ErrorDetail::DeadlineExceeded,
20476 ErrorCode::InvalidRequest => ErrorDetail::InvalidRequest {
20477 field: None,
20478 reason: "test".to_owned(),
20479 },
20480 ErrorCode::UnsupportedVersion => ErrorDetail::UnsupportedVersion {
20481 observed: 1,
20482 maximum_supported: 1,
20483 },
20484 ErrorCode::Unauthenticated => ErrorDetail::Unauthenticated,
20485 ErrorCode::PermissionDenied => ErrorDetail::PermissionDenied {
20486 action: None,
20487 workload_class: None,
20488 },
20489 ErrorCode::NotFound => ErrorDetail::NotFound { resource: None },
20490 ErrorCode::Conflict => ErrorDetail::Conflict {
20491 expected_revision: None,
20492 observed_revision: None,
20493 },
20494 ErrorCode::StaleCursor => ErrorDetail::StaleCursor { restart_count: 0 },
20495 ErrorCode::RestartBudgetExhausted => ErrorDetail::RestartBudgetExhausted { maximum_restarts: 0 },
20496 ErrorCode::LimitExceeded => ErrorDetail::LimitExceeded {
20497 class: LimitClass::RequestBound,
20498 limit_id: "test".to_owned(),
20499 maximum: U64 { value: "0".to_owned() },
20500 },
20501 ErrorCode::CapabilityUnavailable => ErrorDetail::CapabilityUnavailable { capability: None },
20502 ErrorCode::NotSubmitted => ErrorDetail::NotSubmitted {
20503 retry_after_millis: None,
20504 },
20505 ErrorCode::SubmittedIndeterminate => ErrorDetail::SubmittedIndeterminate { locator: None },
20506 ErrorCode::ExpiredUnknown => ErrorDetail::ExpiredUnknown { locator: None },
20507 ErrorCode::SecretNotEscrowed => ErrorDetail::SecretNotEscrowed,
20508 ErrorCode::RetentionGap => ErrorDetail::RetentionGap {
20509 retired_through: U64 { value: "0".to_owned() },
20510 },
20511 ErrorCode::ArtifactRangeInvalid => ErrorDetail::ArtifactRangeInvalid {
20512 maximum_bytes: U64 { value: "0".to_owned() },
20513 },
20514 ErrorCode::ChecksumMismatch => ErrorDetail::ChecksumMismatch {
20515 expected: Digest { value: "0".repeat(64) },
20516 observed: Digest { value: "0".repeat(64) },
20517 },
20518 ErrorCode::TemporarilyUnavailable => ErrorDetail::TemporarilyUnavailable {
20519 retry_after_millis: None,
20520 },
20521 ErrorCode::Internal => ErrorDetail::Internal,
20522 }
20523 }
20524 #[test]
20525 fn every_admitted_error_outcome_is_constructible_and_invalid_combinations_fail_closed() {
20526 let mut codes = std::collections::BTreeSet::new();
20527 for contract in LODESTONE_API_ERROR_OUTCOMES {
20528 codes.insert(format!("{:?}", contract.code));
20529 assert_eq!(
20530 ErrorBody::try_new(
20531 contract.code,
20532 "test".to_owned(),
20533 contract.disposition,
20534 contract.recovery,
20535 admitted_error_detail(contract.code)
20536 ),
20537 Ok(ErrorBody {
20538 code: contract.code,
20539 message: "test".to_owned(),
20540 disposition: contract.disposition,
20541 recovery: contract.recovery,
20542 details: admitted_error_detail(contract.code)
20543 })
20544 );
20545 }
20546 assert_eq!(codes.len(), 21);
20547 assert_eq!(
20548 ErrorBody::try_new(
20549 ErrorCode::Aborted,
20550 "test".to_owned(),
20551 ErrorDisposition::NotSubmitted,
20552 RecoveryAction::Stop,
20553 admitted_error_detail(ErrorCode::Aborted)
20554 ),
20555 Err(ErrorShapeError::OutcomeMismatch)
20556 );
20557 assert_eq!(
20558 ErrorBody::try_new(
20559 ErrorCode::Aborted,
20560 "test".to_owned(),
20561 ErrorDisposition::NotSubmitted,
20562 RecoveryAction::Retry,
20563 ErrorDetail::Internal
20564 ),
20565 Err(ErrorShapeError::DetailCodeMismatch)
20566 );
20567 assert_eq!(
20568 ErrorBody::try_new(
20569 ErrorCode::TemporarilyUnavailable,
20570 "test".to_owned(),
20571 ErrorDisposition::NotSubmitted,
20572 RecoveryAction::RetryAfter,
20573 ErrorDetail::TemporarilyUnavailable {
20574 retry_after_millis: Some(U64 {
20575 value: "60001".to_owned()
20576 })
20577 }
20578 ),
20579 Err(ErrorShapeError::RetryAfterOutOfRange)
20580 );
20581 }
20582 #[test]
20583 fn registries_match_the_idl() {
20584 assert_eq!(LODESTONE_API_COMMAND_CONTRACTS.len(), 149);
20585 assert_eq!(LODESTONE_API_COMMAND_SEMANTICS.len(), 149);
20586 assert_eq!(LODESTONE_API_COMMAND_OUTCOMES.len(), 149);
20587 assert_eq!(LODESTONE_API_ERROR_CODES.len(), 21);
20588 assert_eq!(LODESTONE_API_ERROR_OUTCOMES.len(), 28);
20589 assert_eq!(LODESTONE_API_TYPE_CONTRACTS.len(), 380);
20590 assert_eq!(LODESTONE_API_STREAM_CONTRACTS.len(), 1);
20591 assert_eq!(LODESTONE_API_LIMITS.len(), 123);
20592 assert_eq!(LODESTONE_API_CLUSTER_CONTROL_ACTIONS.len(), 24);
20593 assert_eq!(LODESTONE_API_CLUSTER_CONTROL_TYPES.len(), 12);
20594 }
20595 #[test]
20596 fn mutation_outcome_metadata_matches_submission_boundaries() {
20597 for (command, outcome) in LODESTONE_API_COMMAND_CONTRACTS
20598 .iter()
20599 .zip(LODESTONE_API_COMMAND_OUTCOMES)
20600 {
20601 assert_eq!(command.command, outcome.command);
20602 let submits = !matches!(command.mutation, "read_only" | "read_only_prepare" | "catalog_prepare");
20603 assert_eq!(outcome.possible_submission_states.contains(&"submitted"), submits);
20604 assert_eq!(outcome.possible_submission_states.contains(&"indeterminate"), submits);
20605 assert_eq!(
20606 outcome.cancellation == "per_call_until_submission_then_resolve",
20607 submits
20608 );
20609 }
20610 for command in [
20611 Command::ReserveServiceCredential,
20612 Command::ReserveServiceCredentialRotation,
20613 ] {
20614 let outcome = LODESTONE_API_COMMAND_OUTCOMES
20615 .iter()
20616 .find(|outcome| outcome.command == command);
20617 assert!(
20618 matches!(outcome, Some(value) if value.identity_requirement == "caller_action_id" && value.resolver_command == Some(Command::ResolveServiceCredentialReservation))
20619 );
20620 }
20621 }
20622}