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 = "e2faa28e31bf61559d113cf56b4a081666cc1d69314fb8ca84853e8653ff4bf7";
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 IndexExport,
237 IndexImport,
238}
239
240#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
241#[serde(rename_all = "snake_case")]
242pub enum ErrorCode {
243 Aborted,
244 DeadlineExceeded,
245 InvalidRequest,
246 UnsupportedVersion,
247 Unauthenticated,
248 PermissionDenied,
249 NotFound,
250 Conflict,
251 StaleCursor,
252 RestartBudgetExhausted,
253 LimitExceeded,
254 CapabilityUnavailable,
255 NotSubmitted,
256 SubmittedIndeterminate,
257 ExpiredUnknown,
258 SecretNotEscrowed,
259 RetentionGap,
260 ArtifactRangeInvalid,
261 ChecksumMismatch,
262 TemporarilyUnavailable,
263 Internal,
264}
265
266#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
267#[serde(rename_all = "snake_case")]
268pub enum Command {
269 Discover,
270 ListIndexes,
271 GetIndex,
272 ValidateIndexChange,
273 ApplyIndexChange,
274 ApplyAdministrationMutation,
275 ListAliases,
276 GetAlias,
277 ListDataStreams,
278 GetDataStream,
279 ListComponentTemplates,
280 GetComponentTemplate,
281 ListIndexTemplates,
282 GetIndexTemplate,
283 ListIngestPipelines,
284 GetIngestPipeline,
285 SimulateIngestPipeline,
286 ReprocessByQuery,
287 ListLifecyclePolicies,
288 GetLifecyclePolicy,
289 PrepareCreateIndex,
290 PrepareDeleteIndex,
291 SubmitCatalogAction,
292 ResolveCatalogAction,
293 PrepareReplayableSourceIndex,
294 SubmitReplayableSourceIndex,
295 GetReplayableSource,
296 ControlReplayableSource,
297 CloneIndex,
298 ConfigureHistory,
299 GetHistory,
300 ResolveHistory,
301 PlaceHistoryHold,
302 ReleaseHistoryHold,
303 PrepareDocumentMutation,
304 SubmitDocumentMutation,
305 PrepareDocumentBulk,
306 SubmitDocumentBulk,
307 ResolveDocumentBulk,
308 PrepareAppendBulk,
309 SubmitAppendBulk,
310 ResolveAppendBulk,
311 ObserveAppendCommitted,
312 ResolveDocumentMutation,
313 GetDocument,
314 Search,
315 TraverseRelationships,
316 QueryProfiles,
317 EvaluateTemporalEvidence,
318 CreateContinuousTemporalEvaluation,
319 GetContinuousTemporalEvaluation,
320 PauseContinuousTemporalEvaluation,
321 ResumeContinuousTemporalEvaluation,
322 ReplaceContinuousTemporalEvaluation,
323 RetireContinuousTemporalEvaluation,
324 ReadContinuousTemporalEvidence,
325 ValidateSearch,
326 OpenPit,
327 RenewPit,
328 ClosePit,
329 ListOperations,
330 GetOperation,
331 WaitOperation,
332 CancelOperation,
333 ListAuditEvents,
334 ExportAuditEvents,
335 ReserveServiceCredential,
336 ReserveServiceCredentialRotation,
337 ActivateServiceCredential,
338 ResolveServiceCredentialReservation,
339 PrepareRevokeServiceCredential,
340 RevokeServiceCredential,
341 ResolveSecurityAction,
342 GetSecurityRole,
343 PrepareRoleAppendAccessChange,
344 SubmitRoleAppendAccessChange,
345 ListServiceCredentials,
346 GetRuntimeStatus,
347 GetResultCacheStatus,
348 GetFieldPromotionStatus,
349 GetOverloadStatus,
350 ConfigureExternalKey,
351 RotateExternalKeyBinding,
352 ConfigureAggregateThenDelete,
353 GetLifecycleStatus,
354 GetQuota,
355 UpdateQuota,
356 GetBinding,
357 GetAdmissionStatus,
358 SetAdmission,
359 GetQuiesceStatus,
360 GetDecommissionReadiness,
361 GetUpgradeReadiness,
362 GetMaintenanceStatus,
363 WarmVectorIndex,
364 EvaluateVectorRecall,
365 CalibrateVectorStrategy,
366 GetVectorDiagnostic,
367 CreateDiagnostic,
368 GetDiagnostic,
369 PrepareCollectionExport,
370 StartCollectionExport,
371 ResolveCollectionExport,
372 VerifyCollectionExport,
373 PrepareCollectionExportRetirement,
374 StartCollectionExportRetirement,
375 ResolveCollectionExportRetirement,
376 PrepareCollectionRestore,
377 StartCollectionRestore,
378 ResolveCollectionRestore,
379 PrepareIndexExport,
380 StartIndexExport,
381 ResolveIndexExport,
382 VerifyIndexExport,
383 PrepareIndexImport,
384 StartIndexImport,
385 ResolveIndexImport,
386 ReadArtifactChunk,
387 ExportUsage,
388 ReadLogicalOccupancy,
389 ExecuteStateRead,
390 PrepareStateWrite,
391 SubmitStateWrite,
392 ResolveStateWrite,
393}
394
395pub const LODESTONE_API_ERROR_CODES: &[ErrorCode] = &[
396 ErrorCode::Aborted,
397 ErrorCode::DeadlineExceeded,
398 ErrorCode::InvalidRequest,
399 ErrorCode::UnsupportedVersion,
400 ErrorCode::Unauthenticated,
401 ErrorCode::PermissionDenied,
402 ErrorCode::NotFound,
403 ErrorCode::Conflict,
404 ErrorCode::StaleCursor,
405 ErrorCode::RestartBudgetExhausted,
406 ErrorCode::LimitExceeded,
407 ErrorCode::CapabilityUnavailable,
408 ErrorCode::NotSubmitted,
409 ErrorCode::SubmittedIndeterminate,
410 ErrorCode::ExpiredUnknown,
411 ErrorCode::SecretNotEscrowed,
412 ErrorCode::RetentionGap,
413 ErrorCode::ArtifactRangeInvalid,
414 ErrorCode::ChecksumMismatch,
415 ErrorCode::TemporarilyUnavailable,
416 ErrorCode::Internal,
417];
418
419#[derive(Clone, Copy, Debug, Eq, PartialEq)]
420pub struct ActionAuthorizationContract {
421 pub action: Action,
422 pub any_of_permission_ids: &'static [&'static str],
423}
424pub const LODESTONE_API_ACTION_AUTHORIZATION: &[ActionAuthorizationContract] = &[
425 ActionAuthorizationContract {
426 action: Action::IdentityDiscovery,
427 any_of_permission_ids: &["security_read"],
428 },
429 ActionAuthorizationContract {
430 action: Action::DataRead,
431 any_of_permission_ids: &["data_read"],
432 },
433 ActionAuthorizationContract {
434 action: Action::DataWrite,
435 any_of_permission_ids: &["data_write"],
436 },
437 ActionAuthorizationContract {
438 action: Action::Append,
439 any_of_permission_ids: &["append"],
440 },
441 ActionAuthorizationContract {
442 action: Action::ResolveAppend,
443 any_of_permission_ids: &["resolve_append"],
444 },
445 ActionAuthorizationContract {
446 action: Action::IndexAdmin,
447 any_of_permission_ids: &["index_admin"],
448 },
449 ActionAuthorizationContract {
450 action: Action::CatalogRead,
451 any_of_permission_ids: &["catalog_read"],
452 },
453 ActionAuthorizationContract {
454 action: Action::TaskRead,
455 any_of_permission_ids: &["task_read"],
456 },
457 ActionAuthorizationContract {
458 action: Action::SubscriptionRead,
459 any_of_permission_ids: &["subscription_read"],
460 },
461 ActionAuthorizationContract {
462 action: Action::DiagnosticsRead,
463 any_of_permission_ids: &["diagnostics_read"],
464 },
465 ActionAuthorizationContract {
466 action: Action::DiagnosticsCreate,
467 any_of_permission_ids: &["diagnostics_create"],
468 },
469 ActionAuthorizationContract {
470 action: Action::SecurityRead,
471 any_of_permission_ids: &["security_read"],
472 },
473 ActionAuthorizationContract {
474 action: Action::SecurityAdmin,
475 any_of_permission_ids: &["security_admin"],
476 },
477 ActionAuthorizationContract {
478 action: Action::AuditRead,
479 any_of_permission_ids: &["audit_read"],
480 },
481 ActionAuthorizationContract {
482 action: Action::QuotaRead,
483 any_of_permission_ids: &["quota_read"],
484 },
485 ActionAuthorizationContract {
486 action: Action::QuotaAdmin,
487 any_of_permission_ids: &["quota_admin"],
488 },
489 ActionAuthorizationContract {
490 action: Action::BindingRead,
491 any_of_permission_ids: &["binding_read"],
492 },
493 ActionAuthorizationContract {
494 action: Action::LifecycleAdmin,
495 any_of_permission_ids: &["lifecycle_admin"],
496 },
497 ActionAuthorizationContract {
498 action: Action::AdmissionRead,
499 any_of_permission_ids: &["admission_read"],
500 },
501 ActionAuthorizationContract {
502 action: Action::AdmissionAdmin,
503 any_of_permission_ids: &["admission_admin"],
504 },
505 ActionAuthorizationContract {
506 action: Action::UsageRead,
507 any_of_permission_ids: &["usage_read"],
508 },
509 ActionAuthorizationContract {
510 action: Action::OperationRead,
511 any_of_permission_ids: &[
512 "catalog_read",
513 "task_read",
514 "security_read",
515 "diagnostics_read",
516 "collection_export",
517 "collection_restore",
518 "index_export",
519 "index_import",
520 ],
521 },
522 ActionAuthorizationContract {
523 action: Action::OperationCancel,
524 any_of_permission_ids: &[
525 "index_admin",
526 "task_admin",
527 "security_admin",
528 "diagnostics_create",
529 "collection_export",
530 "index_export",
531 ],
532 },
533 ActionAuthorizationContract {
534 action: Action::CollectionExport,
535 any_of_permission_ids: &["collection_export"],
536 },
537 ActionAuthorizationContract {
538 action: Action::CollectionRestore,
539 any_of_permission_ids: &["collection_restore"],
540 },
541 ActionAuthorizationContract {
542 action: Action::IndexExport,
543 any_of_permission_ids: &["index_export"],
544 },
545 ActionAuthorizationContract {
546 action: Action::IndexImport,
547 any_of_permission_ids: &["index_import"],
548 },
549];
550pub fn action_authorization(action: Action) -> Option<&'static ActionAuthorizationContract> {
551 LODESTONE_API_ACTION_AUTHORIZATION
552 .iter()
553 .find(|contract| contract.action == action)
554}
555
556#[derive(Clone, Copy, Debug, Eq, PartialEq)]
557pub struct RuntimeCapabilityAuthorizationContract {
558 pub capability_id: &'static str,
559 pub required_permission_ids: &'static [&'static str],
560}
561pub const LODESTONE_API_RUNTIME_CAPABILITY_AUTHORIZATION: &[RuntimeCapabilityAuthorizationContract] = &[
562 RuntimeCapabilityAuthorizationContract {
563 capability_id: "search_and_append_log",
564 required_permission_ids: &["data_read", "data_write"],
565 },
566 RuntimeCapabilityAuthorizationContract {
567 capability_id: "native_metric_records_and_time_series",
568 required_permission_ids: &["data_read", "append"],
569 },
570 RuntimeCapabilityAuthorizationContract {
571 capability_id: "historical_temporal_evidence",
572 required_permission_ids: &["data_read"],
573 },
574 RuntimeCapabilityAuthorizationContract {
575 capability_id: "continuous_temporal_evidence",
576 required_permission_ids: &["data_read", "lifecycle_admin"],
577 },
578 RuntimeCapabilityAuthorizationContract {
579 capability_id: "bounded_relationship_traversal",
580 required_permission_ids: &["data_read", "data_write", "append"],
581 },
582 RuntimeCapabilityAuthorizationContract {
583 capability_id: "native_continuous_profiles",
584 required_permission_ids: &["data_read", "append"],
585 },
586 RuntimeCapabilityAuthorizationContract {
587 capability_id: "committed_vector_and_hybrid",
588 required_permission_ids: &["data_read"],
589 },
590 RuntimeCapabilityAuthorizationContract {
591 capability_id: "realtime_or_pit_vector",
592 required_permission_ids: &["data_read"],
593 },
594 RuntimeCapabilityAuthorizationContract {
595 capability_id: "state_standard_express_ephemeral",
596 required_permission_ids: &["data_read", "data_write"],
597 },
598 RuntimeCapabilityAuthorizationContract {
599 capability_id: "state_relaxed",
600 required_permission_ids: &[],
601 },
602 RuntimeCapabilityAuthorizationContract {
603 capability_id: "bounded_resp",
604 required_permission_ids: &["data_read", "data_write"],
605 },
606 RuntimeCapabilityAuthorizationContract {
607 capability_id: "lodestone_rust_client",
608 required_permission_ids: &[],
609 },
610 RuntimeCapabilityAuthorizationContract {
611 capability_id: "replayable_source_indexes",
612 required_permission_ids: &["index_admin"],
613 },
614 RuntimeCapabilityAuthorizationContract {
615 capability_id: "zero_copy_clones",
616 required_permission_ids: &["index_admin"],
617 },
618 RuntimeCapabilityAuthorizationContract {
619 capability_id: "retained_history",
620 required_permission_ids: &["data_read"],
621 },
622 RuntimeCapabilityAuthorizationContract {
623 capability_id: "generation_result_cache",
624 required_permission_ids: &["data_read"],
625 },
626 RuntimeCapabilityAuthorizationContract {
627 capability_id: "adaptive_field_promotion",
628 required_permission_ids: &["index_admin"],
629 },
630 RuntimeCapabilityAuthorizationContract {
631 capability_id: "durable_overload_buffering",
632 required_permission_ids: &["data_read", "data_write"],
633 },
634 RuntimeCapabilityAuthorizationContract {
635 capability_id: "current_table_reader",
636 required_permission_ids: &["data_read"],
637 },
638 RuntimeCapabilityAuthorizationContract {
639 capability_id: "crypto_shred_and_rollup_lifecycle",
640 required_permission_ids: &["lifecycle_admin"],
641 },
642];
643pub fn runtime_capability_authorization(
644 capability_id: &str,
645) -> Option<&'static RuntimeCapabilityAuthorizationContract> {
646 LODESTONE_API_RUNTIME_CAPABILITY_AUTHORIZATION
647 .iter()
648 .find(|contract| contract.capability_id == capability_id)
649}
650
651#[derive(Clone, Copy, Debug, Eq, PartialEq)]
652pub struct ClusterControlActionContract {
653 pub credential_kind: &'static str,
654 pub action: &'static str,
655}
656pub const LODESTONE_API_CLUSTER_CONTROL_FORMAT_VERSION: u16 = 2;
657pub const LODESTONE_API_CLUSTER_CONTROL_TRANSPORT: &str = "isolated_tls_u32_be_length_then_canonical_json";
658pub const LODESTONE_API_CLUSTER_CONTROL_ACTIONS: &[ClusterControlActionContract] = &[
659 ClusterControlActionContract {
660 credential_kind: "collection_provisioner",
661 action: "initialize_collection_authority",
662 },
663 ClusterControlActionContract {
664 credential_kind: "collection_provisioner",
665 action: "activate_collection_authority",
666 },
667 ClusterControlActionContract {
668 credential_kind: "collection_provisioner",
669 action: "resolve_collection_authority",
670 },
671 ClusterControlActionContract {
672 credential_kind: "collection_provisioner",
673 action: "inspect_collection_retirement",
674 },
675 ClusterControlActionContract {
676 credential_kind: "collection_provisioner",
677 action: "retire_collection_authority",
678 },
679 ClusterControlActionContract {
680 credential_kind: "collection_provisioner",
681 action: "reserve_cluster_control_credential_rotation",
682 },
683 ClusterControlActionContract {
684 credential_kind: "collection_provisioner",
685 action: "activate_cluster_control_credential_rotation",
686 },
687 ClusterControlActionContract {
688 credential_kind: "collection_provisioner",
689 action: "revoke_cluster_control_credential",
690 },
691 ClusterControlActionContract {
692 credential_kind: "collection_provisioner",
693 action: "resolve_cluster_control_credential",
694 },
695 ClusterControlActionContract {
696 credential_kind: "capacity_observer",
697 action: "observe_cluster_capacity",
698 },
699 ClusterControlActionContract {
700 credential_kind: "capacity_observer",
701 action: "observe_resource_diagnostics",
702 },
703 ClusterControlActionContract {
704 credential_kind: "recovery_operator",
705 action: "list_cluster_backups",
706 },
707 ClusterControlActionContract {
708 credential_kind: "recovery_operator",
709 action: "get_cluster_backup",
710 },
711 ClusterControlActionContract {
712 credential_kind: "recovery_operator",
713 action: "create_cluster_backup",
714 },
715 ClusterControlActionContract {
716 credential_kind: "recovery_operator",
717 action: "resolve_cluster_backup",
718 },
719 ClusterControlActionContract {
720 credential_kind: "recovery_operator",
721 action: "delete_cluster_backup",
722 },
723 ClusterControlActionContract {
724 credential_kind: "recovery_operator",
725 action: "resolve_cluster_backup_deletion",
726 },
727 ClusterControlActionContract {
728 credential_kind: "recovery_operator",
729 action: "get_cluster_restore_readiness",
730 },
731 ClusterControlActionContract {
732 credential_kind: "recovery_operator",
733 action: "prepare_offline_recovery",
734 },
735 ClusterControlActionContract {
736 credential_kind: "recovery_operator",
737 action: "reserve_cluster_control_credential_rotation",
738 },
739 ClusterControlActionContract {
740 credential_kind: "recovery_operator",
741 action: "activate_cluster_control_credential_rotation",
742 },
743 ClusterControlActionContract {
744 credential_kind: "recovery_operator",
745 action: "revoke_cluster_control_credential",
746 },
747 ClusterControlActionContract {
748 credential_kind: "recovery_operator",
749 action: "resolve_cluster_control_credential",
750 },
751];
752pub const LODESTONE_API_CLUSTER_CONTROL_TYPES: &[&str] = &[
753 "cluster_control_session",
754 "cluster_control_request",
755 "cluster_control_response",
756 "collection_authority_operation",
757 "collection_retirement_blockers",
758 "core_capacity_observation",
759 "core_resource_diagnostic_page",
760 "cluster_control_credential_rotation",
761 "cluster_backup_operation",
762 "cluster_restore_readiness",
763];
764
765pub const LODESTONE_API_CURSOR_FORMAT_VERSION: u16 = 1;
766#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
767#[serde(deny_unknown_fields)]
768pub struct Cursor {
769 pub value: String,
770}
771
772pub const LODESTONE_API_LOCATOR_FORMAT_VERSION: u16 = 1;
773#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
774#[serde(deny_unknown_fields)]
775pub struct Locator {
776 pub authority: String,
777 pub value: String,
778}
779
780pub const LODESTONE_API_RESOURCE_FORMAT_VERSION: u16 = 1;
781#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
782#[serde(deny_unknown_fields)]
783pub struct Resource {
784 pub kind: String,
785 pub name: String,
786 pub incarnation: Identity,
787}
788
789pub const LODESTONE_API_READ_CUT_KIND_FORMAT_VERSION: u16 = 1;
790#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
791#[serde(rename_all = "snake_case")]
792pub enum ReadCutKind {
793 Committed,
794}
795
796pub const LODESTONE_API_READ_CUT_INDEX_EVIDENCE_FORMAT_VERSION: u16 = 1;
797#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
798#[serde(deny_unknown_fields)]
799pub struct ReadCutIndexEvidence {
800 pub index: Resource,
801 pub pinned_schema_generation: U64,
802 pub cut_digest: Digest,
803}
804
805pub const LODESTONE_API_READ_CUT_EVIDENCE_SHAPE_VERSION: u16 = 1;
806pub const LODESTONE_API_READ_CUT_EVIDENCE_FORMAT_VERSION: u16 = 1;
807#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
808#[serde(deny_unknown_fields)]
809pub struct ReadCutEvidence {
810 pub format_version: u32,
811 pub kind: ReadCutKind,
812 pub collection_id: Identity,
813 pub recovery_era: Identity,
814 pub catalog_revision: U64,
815 pub indexes: Vec<ReadCutIndexEvidence>,
816 pub aggregate_digest: Digest,
817}
818
819pub const LODESTONE_API_LOGICAL_OCCUPANCY_COUNTS_FORMAT_VERSION: u16 = 1;
820#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
821#[serde(deny_unknown_fields)]
822pub struct LogicalOccupancyCounts {
823 pub live_records: U64,
824 pub indexed_source_bytes: U64,
825 pub dense_vector_values: U64,
826 pub dense_vector_bytes: U64,
827 pub sparse_vector_values: U64,
828 pub sparse_vector_nonzero: U64,
829 pub sparse_vector_bytes: U64,
830 pub vector_set_values: U64,
831 pub vector_set_vectors: U64,
832 pub vector_set_bytes: U64,
833}
834
835pub const LODESTONE_API_LOGICAL_OCCUPANCY_GAP_STATE_FORMAT_VERSION: u16 = 1;
836#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
837#[serde(rename_all = "snake_case")]
838pub enum LogicalOccupancyGapState {
839 None,
840 AuthoritativeLifecycleTransitionsUnavailable,
841}
842
843pub const LODESTONE_API_LOGICAL_OCCUPANCY_SNAPSHOT_EVIDENCE_SHAPE_VERSION: u16 = 1;
844pub const LODESTONE_API_LOGICAL_OCCUPANCY_SNAPSHOT_EVIDENCE_FORMAT_VERSION: u16 = 1;
845#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
846#[serde(deny_unknown_fields)]
847pub struct LogicalOccupancySnapshotEvidence {
848 pub format_version: u32,
849 pub index: Resource,
850 pub mapping_generation: U64,
851 pub read_cut: ReadCutEvidence,
852 pub page_ordinal: u32,
853 pub page: LogicalOccupancyCounts,
854 pub cumulative: LogicalOccupancyCounts,
855 pub record_identity: Digest,
856 pub source_revision: Digest,
857 pub completeness_watermark: Digest,
858 pub complete: bool,
859 pub gap_state: LogicalOccupancyGapState,
860 #[serde(default, skip_serializing_if = "Option::is_none")]
861 pub corrects_record: Option<Digest>,
862}
863
864pub const LODESTONE_API_LOGICAL_OCCUPANCY_WINDOW_GAP_SHAPE_VERSION: u16 = 1;
865pub const LODESTONE_API_LOGICAL_OCCUPANCY_WINDOW_GAP_FORMAT_VERSION: u16 = 1;
866#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
867#[serde(deny_unknown_fields)]
868pub struct LogicalOccupancyWindowGap {
869 pub format_version: u32,
870 pub index: Resource,
871 pub window_start: U64,
872 pub window_end: U64,
873 pub gap_state: LogicalOccupancyGapState,
874}
875
876pub const LODESTONE_API_FIELD_PROMOTION_CONFIGURATION_SHAPE_VERSION: u16 = 1;
877pub const LODESTONE_API_FIELD_PROMOTION_CONFIGURATION_FORMAT_VERSION: u16 = 3;
878#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
879#[serde(deny_unknown_fields)]
880pub struct FieldPromotionConfiguration {
881 pub format_version: u32,
882 pub enabled: bool,
883 pub minimum_query_count: u32,
884 pub maximum_promoted_fields: u32,
885 pub maximum_cardinality: U64,
886 pub maximum_extra_bytes: U64,
887 pub allow_sensitive: bool,
888}
889
890pub const LODESTONE_API_OVERLOAD_CONFIGURATION_SHAPE_VERSION: u16 = 2;
891pub const LODESTONE_API_OVERLOAD_CONFIGURATION_FORMAT_VERSION: u16 = 3;
892#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
893#[serde(deny_unknown_fields)]
894pub struct OverloadConfiguration {
895 pub format_version: u32,
896 pub mode: String,
897 pub maximum_backlog_bytes: U64,
898 pub maximum_backlog_age_millis: U64,
899 pub maximum_collection_share_bytes: U64,
900 pub maximum_recovery_ops_per_pass: u32,
901 pub maximum_pending_overlay_documents: U64,
902}
903
904pub const LODESTONE_API_INDEX_POLICIES_FORMAT_VERSION: u16 = 1;
905#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
906#[serde(deny_unknown_fields)]
907pub struct IndexPolicies {
908 pub durability: String,
909 pub storage: String,
910 pub cache: String,
911 #[serde(default, skip_serializing_if = "Option::is_none")]
912 pub default_visibility: Option<String>,
913 pub field_promotion: FieldPromotionConfiguration,
914 pub overload: OverloadConfiguration,
915}
916
917pub const LODESTONE_API_MAINTENANCE_BUDGETS_FORMAT_VERSION: u16 = 1;
918#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
919#[serde(deny_unknown_fields)]
920pub struct MaintenanceBudgets {
921 pub memtable_max_bytes: U64,
922 pub refresh_max_millis: U64,
923 pub seal_max_bytes: U64,
924 pub seal_max_millis: U64,
925 pub merge_max_bytes: U64,
926 pub delete_resolution_max_bytes: U64,
927 pub wal_retention_max_bytes: U64,
928 pub gc_max_keys: u32,
929 pub fsck_max_objects: u32,
930 pub deleted_tombstone_retention_millis: U64,
931}
932
933pub const LODESTONE_API_RESOURCE_DURABILITY_CLASS_FORMAT_VERSION: u16 = 1;
934#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
935#[serde(rename_all = "snake_case")]
936pub enum ResourceDurabilityClass {
937 RegionalObject,
938 ZonalLowLatency,
939 Relaxed,
940 Ephemeral,
941}
942
943pub const LODESTONE_API_RESOURCE_STORAGE_CLASS_FORMAT_VERSION: u16 = 1;
944#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
945#[serde(rename_all = "snake_case")]
946pub enum ResourceStorageClass {
947 Standard,
948 Cold,
949}
950
951pub const LODESTONE_API_VECTOR_QUALITY_OBJECTIVE_FORMAT_VERSION: u16 = 1;
952#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
953#[serde(rename_all = "snake_case")]
954pub enum VectorQualityObjective {
955 Balanced,
956 HighRecall,
957 MemoryEfficient,
958}
959
960pub const LODESTONE_API_VECTOR_INDEXING_OBJECTIVE_FORMAT_VERSION: u16 = 1;
961#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
962#[serde(rename_all = "snake_case")]
963pub enum VectorIndexingObjective {
964 FastBuild,
965 Balanced,
966 Compact,
967}
968
969pub const LODESTONE_API_VECTOR_RESIDENCY_INTENT_FORMAT_VERSION: u16 = 1;
970#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
971#[serde(rename_all = "snake_case")]
972pub enum VectorResidencyIntent {
973 Automatic,
974 PreferResident,
975 RequireResident,
976}
977
978pub const LODESTONE_API_VECTOR_CALIBRATION_BINDING_FORMAT_VERSION: u16 = 1;
979#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
980#[serde(deny_unknown_fields)]
981pub struct VectorCalibrationBinding {
982 pub profile: VectorStrategyProfile,
983 pub evidence_digest: Digest,
984}
985
986pub const LODESTONE_API_VECTOR_RESOURCE_POLICY_FORMAT_VERSION: u16 = 2;
987#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
988#[serde(deny_unknown_fields)]
989pub struct VectorResourcePolicy {
990 pub quality: VectorQualityObjective,
991 pub indexing: VectorIndexingObjective,
992 #[serde(default, skip_serializing_if = "Option::is_none")]
993 pub residency: Option<VectorResidencyIntent>,
994 #[serde(default, skip_serializing_if = "Option::is_none")]
995 pub calibration: Option<VectorCalibrationBinding>,
996}
997
998pub const LODESTONE_API_WORKLOAD_CLASS_FORMAT_VERSION: u16 = 1;
999#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1000#[serde(rename_all = "snake_case")]
1001pub enum WorkloadClass {
1002 InteractiveSearch,
1003 BatchAnalytics,
1004 StreamingIngest,
1005 BulkBackfill,
1006 InternalMaintenance,
1007}
1008
1009pub const LODESTONE_API_INDEX_RESOURCE_SPEC_SHAPE_VERSION: u16 = 3;
1010pub const LODESTONE_API_INDEX_RESOURCE_SPEC_FORMAT_VERSION: u16 = 3;
1011#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1012#[serde(deny_unknown_fields)]
1013pub struct IndexResourceSpec {
1014 pub format_version: u32,
1015 pub revision: U64,
1016 pub initial_shards: u32,
1017 pub target_shard_bytes: U64,
1018 pub durability: ResourceDurabilityClass,
1019 pub storage_class: ResourceStorageClass,
1020 pub ram_admission_weight: u32,
1021 pub ram_hard_max_bytes: U64,
1022 pub nvme_admission_weight: u32,
1023 pub nvme_hard_max_bytes: U64,
1024 pub refresh_objective_millis: u32,
1025 pub memtable_hard_max_bytes: U64,
1026 pub seal_parallelism: u32,
1027 pub merge_parallelism: u32,
1028 pub vector: VectorResourcePolicy,
1029 #[serde(default, skip_serializing_if = "Option::is_none")]
1030 pub lifecycle_binding: Option<Identity>,
1031 pub encryption_required: bool,
1032 #[serde(default, skip_serializing_if = "Option::is_none")]
1033 pub resolver_capability: Option<Identity>,
1034}
1035
1036pub const LODESTONE_API_INDEX_SUMMARY_FORMAT_VERSION: u16 = 1;
1037#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1038#[serde(deny_unknown_fields)]
1039pub struct IndexSummary {
1040 pub name: String,
1041 pub incarnation: Identity,
1042 pub revision: U64,
1043 pub mode: String,
1044 pub retained_event_identity: bool,
1045 pub state: String,
1046 pub schema_generation: U64,
1047 pub routing_revision: U64,
1048 pub shard_count: u32,
1049 pub policies: IndexPolicies,
1050 pub management_mode: String,
1051}
1052
1053pub const LODESTONE_API_MAPPING_MODE_FORMAT_VERSION: u16 = 1;
1054#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1055#[serde(rename_all = "snake_case")]
1056pub enum MappingMode {
1057 Mutable,
1058 AppendLog,
1059 State,
1060}
1061
1062pub const LODESTONE_API_DYNAMIC_MAPPING_POLICY_FORMAT_VERSION: u16 = 1;
1063#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1064#[serde(rename_all = "snake_case")]
1065pub enum DynamicMappingPolicy {
1066 True,
1067 False,
1068 Strict,
1069}
1070
1071pub const LODESTONE_API_MAPPING_ANALYZER_FORMAT_VERSION: u16 = 1;
1072#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1073#[serde(rename_all = "snake_case")]
1074pub enum MappingAnalyzer {
1075 Keyword,
1076 Simple,
1077 Standard,
1078 Whitespace,
1079}
1080
1081pub const LODESTONE_API_KEYWORD_NORMALIZER_FORMAT_VERSION: u16 = 1;
1082#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1083#[serde(rename_all = "snake_case")]
1084pub enum KeywordNormalizer {
1085 Keyword,
1086 Lowercase,
1087}
1088
1089pub const LODESTONE_API_VECTOR_METRIC_FORMAT_VERSION: u16 = 1;
1090#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1091#[serde(rename_all = "snake_case")]
1092pub enum VectorMetric {
1093 Cosine,
1094 DotProduct,
1095 SquaredL2,
1096}
1097
1098pub const LODESTONE_API_MAPPING_SCALAR_FORMAT_VERSION: u16 = 1;
1099#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1100#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1101pub enum MappingScalar {
1102 Boolean { value: bool },
1103 I64 { value: I64 },
1104 U64 { value: U64 },
1105 F64Bits { value: U64 },
1106 Keyword { value: String },
1107}
1108
1109pub const LODESTONE_API_SPARSE_VECTOR_WEIGHT_TYPE_FORMAT_VERSION: u16 = 1;
1110#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1111#[serde(rename_all = "snake_case")]
1112pub enum SparseVectorWeightType {
1113 F32,
1114 F16,
1115}
1116
1117pub const LODESTONE_API_MAPPING_FIELD_TYPE_SHAPE_VERSION: u16 = 3;
1118pub const LODESTONE_API_MAPPING_FIELD_TYPE_VECTOR_FORMAT_VERSION: u16 = 2;
1119pub const LODESTONE_API_MAPPING_FIELD_TYPE_SPARSE_VECTOR_FORMAT_VERSION: u16 = 1;
1120pub const LODESTONE_API_MAPPING_FIELD_TYPE_VECTOR_SET_FORMAT_VERSION: u16 = 1;
1121#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1122#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1123pub enum MappingFieldType {
1124 Text,
1125 Keyword,
1126 U64,
1127 Date,
1128 I64,
1129 F64,
1130 Bool,
1131 Nested,
1132 Vector {
1133 format_version: u32,
1134 field_id: u32,
1135 dimensions: u32,
1136 metric: VectorMetric,
1137 element_type: DenseVectorElementType,
1138 #[serde(default, skip_serializing_if = "Option::is_none")]
1139 quantization_scale: Option<ApproximateNumber>,
1140 },
1141 SparseVector {
1142 format_version: u32,
1143 field_id: u32,
1144 maximum_dimension: u32,
1145 weight_type: SparseVectorWeightType,
1146 },
1147 VectorSet {
1148 format_version: u32,
1149 field_id: u32,
1150 dimensions: u32,
1151 metric: VectorMetric,
1152 element_type: DenseVectorElementType,
1153 #[serde(default, skip_serializing_if = "Option::is_none")]
1154 quantization_scale: Option<ApproximateNumber>,
1155 maximum_vectors: u32,
1156 },
1157}
1158
1159pub const LODESTONE_API_MAPPING_FIELD_FORMAT_VERSION: u16 = 1;
1160#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1161#[serde(deny_unknown_fields)]
1162pub struct MappingField {
1163 pub path: String,
1164 pub field_type: MappingFieldType,
1165 pub stored: bool,
1166 #[serde(default, skip_serializing_if = "Option::is_none")]
1167 pub null_value: Option<MappingScalar>,
1168}
1169
1170pub const LODESTONE_API_MULTI_FIELD_PROJECTION_FORMAT_VERSION: u16 = 1;
1171#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1172#[serde(deny_unknown_fields)]
1173pub struct MultiFieldProjection {
1174 pub parent: String,
1175 pub child: String,
1176}
1177
1178pub const LODESTONE_API_ANALYZER_IDENTITY_FORMAT_VERSION: u16 = 1;
1179#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1180#[serde(deny_unknown_fields)]
1181pub struct AnalyzerIdentity {
1182 pub field: String,
1183 pub index_analyzer: MappingAnalyzer,
1184 pub search_analyzer: MappingAnalyzer,
1185}
1186
1187pub const LODESTONE_API_KEYWORD_LIMIT_FORMAT_VERSION: u16 = 1;
1188#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1189#[serde(deny_unknown_fields)]
1190pub struct KeywordLimit {
1191 pub field: String,
1192 pub max_bytes: u32,
1193 pub normalizer: KeywordNormalizer,
1194}
1195
1196pub const LODESTONE_API_PROFILE_PRIVACY_ACTION_FORMAT_VERSION: u16 = 1;
1197#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1198#[serde(rename_all = "snake_case")]
1199pub enum ProfilePrivacyAction {
1200 Allow,
1201 Drop,
1202 Redact,
1203 Reject,
1204}
1205
1206pub const LODESTONE_API_PROFILE_PRIVACY_FIELD_FORMAT_VERSION: u16 = 1;
1207#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1208#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1209pub enum ProfilePrivacyField {
1210 ResourceAttribute { key: String },
1211 ScopeAttribute { key: String },
1212 SampleLabel { key: String },
1213 FunctionName,
1214 FunctionSystemName,
1215 FunctionFilename,
1216 MappingFilename,
1217}
1218
1219pub const LODESTONE_API_PROFILE_PRIVACY_RULE_FORMAT_VERSION: u16 = 1;
1220#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1221#[serde(deny_unknown_fields)]
1222pub struct ProfilePrivacyRule {
1223 pub field: ProfilePrivacyField,
1224 pub action: ProfilePrivacyAction,
1225}
1226
1227pub const LODESTONE_API_PROFILE_PRIVACY_POLICY_SHAPE_VERSION: u16 = 1;
1228pub const LODESTONE_API_PROFILE_PRIVACY_POLICY_FORMAT_VERSION: u16 = 1;
1229#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1230#[serde(deny_unknown_fields)]
1231pub struct ProfilePrivacyPolicy {
1232 pub format_version: u32,
1233 pub rules: Vec<ProfilePrivacyRule>,
1234}
1235
1236pub const LODESTONE_API_MAPPING_RECORD_MODEL_SHAPE_VERSION: u16 = 3;
1237pub const LODESTONE_API_MAPPING_RECORD_MODEL_METRIC_V1_FORMAT_VERSION: u16 = 1;
1238pub const LODESTONE_API_MAPPING_RECORD_MODEL_RELATIONSHIP_V1_FORMAT_VERSION: u16 = 1;
1239pub const LODESTONE_API_MAPPING_RECORD_MODEL_PROFILE_V1_FORMAT_VERSION: u16 = 1;
1240#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1241#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1242pub enum MappingRecordModel {
1243 Document,
1244 MetricV1 {
1245 format_version: u32,
1246 grouping_attributes: Vec<String>,
1247 },
1248 RelationshipV1 {
1249 format_version: u32,
1250 },
1251 ProfileV1 {
1252 format_version: u32,
1253 privacy: ProfilePrivacyPolicy,
1254 },
1255}
1256
1257pub const LODESTONE_API_MAPPING_SHAPE_VERSION: u16 = 4;
1258pub const LODESTONE_API_MAPPING_FORMAT_VERSION: u16 = 10;
1259#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1260#[serde(deny_unknown_fields)]
1261pub struct Mapping {
1262 pub format_version: u32,
1263 pub generation: U64,
1264 pub mode: MappingMode,
1265 pub record_model: MappingRecordModel,
1266 pub dynamic_policy: DynamicMappingPolicy,
1267 pub fields: Vec<MappingField>,
1268 pub multi_field_projections: Vec<MultiFieldProjection>,
1269 pub analyzer_identities: Vec<AnalyzerIdentity>,
1270 pub keyword_limits: Vec<KeywordLimit>,
1271 pub nested_paths: Vec<String>,
1272}
1273
1274pub const LODESTONE_API_INDEX_DETAIL_FORMAT_VERSION: u16 = 1;
1275#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1276#[serde(deny_unknown_fields)]
1277pub struct IndexDetail {
1278 pub summary: IndexSummary,
1279 pub current_mapping: Mapping,
1280 pub budgets: MaintenanceBudgets,
1281 pub resource_spec: IndexResourceSpec,
1282 pub aliases: Vec<String>,
1283 pub data_streams: Vec<String>,
1284}
1285
1286pub const LODESTONE_API_SOURCE_PROVIDER_FORMAT_VERSION: u16 = 1;
1287#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1288#[serde(rename_all = "snake_case")]
1289pub enum SourceProvider {
1290 Kafka,
1291 ObjectLog,
1292 HttpReplay,
1293 GrpcReplay,
1294}
1295
1296pub const LODESTONE_API_SOURCE_DECODER_FORMAT_VERSION: u16 = 1;
1297#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1298#[serde(rename_all = "snake_case")]
1299pub enum SourceDecoder {
1300 LodestoneDocumentJson,
1301 DebeziumPostgresJson,
1302}
1303
1304pub const LODESTONE_API_SOURCE_REPLAY_GUARANTEES_FORMAT_VERSION: u16 = 1;
1305#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1306#[serde(deny_unknown_fields)]
1307pub struct SourceReplayGuarantees {
1308 pub durable_replay: bool,
1309 pub stable_partition_identity: bool,
1310 pub stable_operation_identity: bool,
1311 pub ordered_positions: bool,
1312 pub bounded_reads: bool,
1313 pub explicit_retention: bool,
1314 pub explicit_rewind: bool,
1315 pub minimum_replay_window_millis: U64,
1316}
1317
1318pub const LODESTONE_API_SOURCE_PARTITION_CONFIGURATION_FORMAT_VERSION: u16 = 1;
1319#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1320#[serde(deny_unknown_fields)]
1321pub struct SourcePartitionConfiguration {
1322 pub partition_id: u32,
1323 pub partition_incarnation: U64,
1324 pub initial_next_ordinal: U64,
1325 pub initial_resume_token_base64: String,
1326}
1327
1328pub const LODESTONE_API_REPLAYABLE_SOURCE_CONFIGURATION_FORMAT_VERSION: u16 = 1;
1329#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1330#[serde(deny_unknown_fields)]
1331pub struct ReplayableSourceConfiguration {
1332 pub source_incarnation: U64,
1333 pub source_identity_digest: Digest,
1334 pub provider: SourceProvider,
1335 pub decoder: SourceDecoder,
1336 pub partitions: Vec<SourcePartitionConfiguration>,
1337 pub guarantees: SourceReplayGuarantees,
1338}
1339
1340pub const LODESTONE_API_SOURCE_PARTITION_STATUS_FORMAT_VERSION: u16 = 1;
1341#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1342#[serde(deny_unknown_fields)]
1343pub struct SourcePartitionStatus {
1344 pub partition_id: u32,
1345 pub partition_incarnation: U64,
1346 pub indexed_next_ordinal: U64,
1347 #[serde(default, skip_serializing_if = "Option::is_none")]
1348 pub provider_high_watermark_next_ordinal: Option<U64>,
1349 #[serde(default, skip_serializing_if = "Option::is_none")]
1350 pub retention_floor_next_ordinal: Option<U64>,
1351 #[serde(default, skip_serializing_if = "Option::is_none")]
1352 pub lag_records: Option<U64>,
1353}
1354
1355pub const LODESTONE_API_REPLAYABLE_SOURCE_STATUS_FORMAT_VERSION: u16 = 1;
1356#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1357#[serde(deny_unknown_fields)]
1358pub struct ReplayableSourceStatus {
1359 pub index: Resource,
1360 pub provider: SourceProvider,
1361 pub decoder: SourceDecoder,
1362 pub source_incarnation: U64,
1363 pub source_identity_digest: Digest,
1364 pub lifecycle: String,
1365 pub lifecycle_generation: U64,
1366 #[serde(default, skip_serializing_if = "Option::is_none")]
1367 pub pause_reason: Option<String>,
1368 #[serde(default, skip_serializing_if = "Option::is_none")]
1369 pub rebuild_reason: Option<String>,
1370 pub retry_state: String,
1371 pub retention_risk: String,
1372 #[serde(default, skip_serializing_if = "Option::is_none")]
1373 pub last_batch_identity: Option<Identity>,
1374 pub partitions: Vec<SourcePartitionStatus>,
1375}
1376
1377pub const LODESTONE_API_SOURCE_CONTROL_TRANSITION_FORMAT_VERSION: u16 = 1;
1378#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1379#[serde(rename_all = "snake_case")]
1380pub enum SourceControlTransition {
1381 Pause,
1382 Resume,
1383 RequireRebuild,
1384}
1385
1386pub const LODESTONE_API_HISTORY_LEDGER_PRECONDITION_FORMAT_VERSION: u16 = 1;
1387#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1388#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1389pub enum HistoryLedgerPrecondition {
1390 Absent,
1391 Exact { revision: U64 },
1392}
1393
1394pub const LODESTONE_API_HISTORY_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1395#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1396#[serde(deny_unknown_fields)]
1397pub struct HistoryRetentionPolicy {
1398 pub keep_for_millis: U64,
1399 pub capture_interval_millis: U64,
1400 pub maximum_cuts: u32,
1401 pub privacy_overlay_identity_limit: u32,
1402}
1403
1404pub const LODESTONE_API_HISTORY_SELECTOR_FORMAT_VERSION: u16 = 1;
1405#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1406#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1407pub enum HistorySelector {
1408 ExactCut { cut_id: Identity },
1409 AtOrBeforeCommitTime { unix_millis: U64 },
1410}
1411
1412pub const LODESTONE_API_HISTORY_HOLD_FORMAT_VERSION: u16 = 1;
1413#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1414#[serde(deny_unknown_fields)]
1415pub struct HistoryHold {
1416 pub hold_id: Identity,
1417 pub cut_ids: Vec<Identity>,
1418}
1419
1420pub const LODESTONE_API_HISTORY_STATUS_FORMAT_VERSION: u16 = 1;
1421#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1422#[serde(deny_unknown_fields)]
1423pub struct HistoryStatus {
1424 pub index: Resource,
1425 pub revision: U64,
1426 pub policy: HistoryRetentionPolicy,
1427 pub page_count: u32,
1428 pub cut_count: u32,
1429 pub holds: Vec<HistoryHold>,
1430}
1431
1432pub const LODESTONE_API_HISTORY_RESOLUTION_FORMAT_VERSION: u16 = 1;
1433#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1434#[serde(deny_unknown_fields)]
1435pub struct HistoryResolution {
1436 pub index: Resource,
1437 pub selector: HistorySelector,
1438 pub cut_id: Identity,
1439 pub committed_at_unix_millis: U64,
1440 pub uncertainty_millis: U64,
1441 pub shard_count: u32,
1442 pub security_policy_revision: U64,
1443}
1444
1445pub const LODESTONE_API_INDEX_REFERENCE_FORMAT_VERSION: u16 = 1;
1446#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1447#[serde(deny_unknown_fields)]
1448pub struct IndexReference {
1449 pub name: String,
1450 pub incarnation: Identity,
1451}
1452
1453pub const LODESTONE_API_ALIAS_TARGET_FORMAT_VERSION: u16 = 1;
1454#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1455#[serde(deny_unknown_fields)]
1456pub struct AliasTarget {
1457 pub index: IndexReference,
1458 pub write_index: bool,
1459}
1460
1461pub const LODESTONE_API_ALIAS_SUMMARY_FORMAT_VERSION: u16 = 1;
1462#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1463#[serde(deny_unknown_fields)]
1464pub struct AliasSummary {
1465 pub name: String,
1466 pub revision: U64,
1467 pub visible_target_count: u32,
1468}
1469
1470pub const LODESTONE_API_ALIAS_DETAIL_FORMAT_VERSION: u16 = 1;
1471#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1472#[serde(deny_unknown_fields)]
1473pub struct AliasDetail {
1474 pub summary: AliasSummary,
1475 pub visible_targets: Vec<AliasTarget>,
1476 #[serde(default, skip_serializing_if = "Option::is_none")]
1477 pub filter: Option<RawJson>,
1478 #[serde(default, skip_serializing_if = "Option::is_none")]
1479 pub index_routing: Option<String>,
1480 #[serde(default, skip_serializing_if = "Option::is_none")]
1481 pub search_routing: Option<String>,
1482}
1483
1484pub const LODESTONE_API_DATA_STREAM_SUMMARY_FORMAT_VERSION: u16 = 1;
1485#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1486#[serde(deny_unknown_fields)]
1487pub struct DataStreamSummary {
1488 pub name: String,
1489 pub incarnation: Identity,
1490 pub revision: U64,
1491 pub generation: U64,
1492 pub state: String,
1493 pub visible_backing_count: u32,
1494}
1495
1496pub const LODESTONE_API_COMPONENT_TEMPLATE_BINDING_FORMAT_VERSION: u16 = 1;
1497#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1498#[serde(deny_unknown_fields)]
1499pub struct ComponentTemplateBinding {
1500 pub name: String,
1501 pub incarnation: Identity,
1502 pub revision: U64,
1503}
1504
1505pub const LODESTONE_API_INDEX_TEMPLATE_BINDING_FORMAT_VERSION: u16 = 1;
1506#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1507#[serde(deny_unknown_fields)]
1508pub struct IndexTemplateBinding {
1509 pub name: String,
1510 pub incarnation: Identity,
1511 pub revision: U64,
1512}
1513
1514pub const LODESTONE_API_LIFECYCLE_POLICY_BINDING_FORMAT_VERSION: u16 = 1;
1515#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1516#[serde(deny_unknown_fields)]
1517pub struct LifecyclePolicyBinding {
1518 pub name: String,
1519 pub incarnation: Identity,
1520 pub revision: U64,
1521}
1522
1523pub const LODESTONE_API_DATA_STREAM_DETAIL_FORMAT_VERSION: u16 = 1;
1524#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1525#[serde(deny_unknown_fields)]
1526pub struct DataStreamDetail {
1527 pub summary: DataStreamSummary,
1528 pub visible_backing_indices: Vec<IndexReference>,
1529 #[serde(default, skip_serializing_if = "Option::is_none")]
1530 pub write_index: Option<IndexReference>,
1531 pub timestamp_field: String,
1532 pub index_template: IndexTemplateBinding,
1533 #[serde(default, skip_serializing_if = "Option::is_none")]
1534 pub lifecycle_policy: Option<LifecyclePolicyBinding>,
1535}
1536
1537pub const LODESTONE_API_COMPONENT_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1538#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1539#[serde(deny_unknown_fields)]
1540pub struct ComponentTemplateSummary {
1541 pub name: String,
1542 pub incarnation: Identity,
1543 pub revision: U64,
1544}
1545
1546pub const LODESTONE_API_COMPONENT_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1547#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1548#[serde(deny_unknown_fields)]
1549pub struct ComponentTemplateDetail {
1550 pub summary: ComponentTemplateSummary,
1551 pub mapping: Mapping,
1552 pub settings: RawJson,
1553 #[serde(default, skip_serializing_if = "Option::is_none")]
1554 pub resource_spec: Option<IndexResourceSpec>,
1555}
1556
1557pub const LODESTONE_API_INDEX_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1558#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1559#[serde(deny_unknown_fields)]
1560pub struct IndexTemplateSummary {
1561 pub name: String,
1562 pub incarnation: Identity,
1563 pub revision: U64,
1564 pub priority: i32,
1565 pub data_stream: bool,
1566}
1567
1568pub const LODESTONE_API_INDEX_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1569#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1570#[serde(deny_unknown_fields)]
1571pub struct IndexTemplateDetail {
1572 pub summary: IndexTemplateSummary,
1573 pub index_patterns: Vec<String>,
1574 pub components: Vec<ComponentTemplateBinding>,
1575 pub mapping: Mapping,
1576 pub settings: RawJson,
1577 #[serde(default, skip_serializing_if = "Option::is_none")]
1578 pub resource_spec: Option<IndexResourceSpec>,
1579}
1580
1581pub const LODESTONE_API_INGEST_PIPELINE_SUMMARY_FORMAT_VERSION: u16 = 1;
1582#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1583#[serde(deny_unknown_fields)]
1584pub struct IngestPipelineSummary {
1585 pub name: String,
1586 pub incarnation: Identity,
1587 pub revision: U64,
1588 pub digest: Digest,
1589}
1590
1591pub const LODESTONE_API_INGEST_PIPELINE_DETAIL_FORMAT_VERSION: u16 = 1;
1592#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1593#[serde(deny_unknown_fields)]
1594pub struct IngestPipelineDetail {
1595 pub summary: IngestPipelineSummary,
1596 pub definition: RawJson,
1597}
1598
1599pub const LODESTONE_API_INGEST_PIPELINE_SELECTION_FORMAT_VERSION: u16 = 1;
1600#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1601#[serde(deny_unknown_fields)]
1602pub struct IngestPipelineSelection {
1603 pub name: String,
1604 pub expected: ExpectedBinding,
1605}
1606
1607pub const LODESTONE_API_LIFECYCLE_POLICY_SUMMARY_FORMAT_VERSION: u16 = 1;
1608#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1609#[serde(deny_unknown_fields)]
1610pub struct LifecyclePolicySummary {
1611 pub name: String,
1612 pub incarnation: Identity,
1613 pub revision: U64,
1614}
1615
1616pub const LODESTONE_API_ROLLOVER_THRESHOLDS_FORMAT_VERSION: u16 = 1;
1617#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1618#[serde(deny_unknown_fields)]
1619pub struct RolloverThresholds {
1620 #[serde(default, skip_serializing_if = "Option::is_none")]
1621 pub max_primary_docs: Option<U64>,
1622 #[serde(default, skip_serializing_if = "Option::is_none")]
1623 pub max_primary_bytes: Option<U64>,
1624 #[serde(default, skip_serializing_if = "Option::is_none")]
1625 pub max_age_millis: Option<U64>,
1626}
1627
1628pub const LODESTONE_API_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1629#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1630#[serde(deny_unknown_fields)]
1631pub struct RetentionPolicy {
1632 #[serde(default, skip_serializing_if = "Option::is_none")]
1633 pub document_max_age_millis: Option<U64>,
1634 #[serde(default, skip_serializing_if = "Option::is_none")]
1635 pub backing_index_max_age_millis: Option<U64>,
1636}
1637
1638pub const LODESTONE_API_LIFECYCLE_POLICY_DETAIL_FORMAT_VERSION: u16 = 1;
1639#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1640#[serde(deny_unknown_fields)]
1641pub struct LifecyclePolicyDetail {
1642 pub summary: LifecyclePolicySummary,
1643 pub rollover: RolloverThresholds,
1644 pub retention: RetentionPolicy,
1645 pub merge_hint: bool,
1646 pub freeze_hint: bool,
1647 pub delete_expired: bool,
1648}
1649
1650pub const LODESTONE_API_TEXT_QUERY_OPERATOR_FORMAT_VERSION: u16 = 1;
1651#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1652#[serde(rename_all = "snake_case")]
1653pub enum TextQueryOperator {
1654 Or,
1655 And,
1656}
1657
1658pub const LODESTONE_API_TEXT_QUERY_ANALYZER_FORMAT_VERSION: u16 = 1;
1659#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1660#[serde(rename_all = "snake_case")]
1661pub enum TextQueryAnalyzer {
1662 Mapping,
1663 Standard,
1664 Simple,
1665 Whitespace,
1666 Keyword,
1667}
1668
1669pub const LODESTONE_API_ZERO_TERMS_QUERY_FORMAT_VERSION: u16 = 1;
1670#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1671#[serde(rename_all = "snake_case")]
1672pub enum ZeroTermsQuery {
1673 None,
1674 All,
1675}
1676
1677pub const LODESTONE_API_TEXT_QUERY_OPTIONS_FORMAT_VERSION: u16 = 1;
1678#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1679#[serde(deny_unknown_fields)]
1680pub struct TextQueryOptions {
1681 pub operator: TextQueryOperator,
1682 #[serde(default, skip_serializing_if = "Option::is_none")]
1683 pub minimum_should_match: Option<u32>,
1684 pub analyzer: TextQueryAnalyzer,
1685 pub zero_terms_query: ZeroTermsQuery,
1686}
1687
1688pub const LODESTONE_API_MULTI_MATCH_MODE_FORMAT_VERSION: u16 = 1;
1689#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1690#[serde(rename_all = "snake_case")]
1691pub enum MultiMatchMode {
1692 BestFields,
1693 MostFields,
1694 Phrase,
1695 PhrasePrefix,
1696 CrossFields,
1697}
1698
1699pub const LODESTONE_API_MULTI_MATCH_FIELD_FORMAT_VERSION: u16 = 1;
1700#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1701#[serde(deny_unknown_fields)]
1702pub struct MultiMatchField {
1703 pub field: String,
1704 pub boost: ApproximateNumber,
1705}
1706
1707pub const LODESTONE_API_MULTI_MATCH_OPTIONS_FORMAT_VERSION: u16 = 1;
1708#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1709#[serde(deny_unknown_fields)]
1710pub struct MultiMatchOptions {
1711 pub mode: MultiMatchMode,
1712 pub operator: TextQueryOperator,
1713 #[serde(default, skip_serializing_if = "Option::is_none")]
1714 pub minimum_should_match: Option<u32>,
1715 pub analyzer: TextQueryAnalyzer,
1716 pub zero_terms_query: ZeroTermsQuery,
1717 pub slop: u32,
1718}
1719
1720pub const LODESTONE_API_SORT_ORDER_FORMAT_VERSION: u16 = 1;
1721#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1722#[serde(rename_all = "snake_case")]
1723pub enum SortOrder {
1724 Asc,
1725 Desc,
1726}
1727
1728pub const LODESTONE_API_SORT_MODE_FORMAT_VERSION: u16 = 1;
1729#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1730#[serde(rename_all = "snake_case")]
1731pub enum SortMode {
1732 Auto,
1733 Min,
1734 Max,
1735}
1736
1737pub const LODESTONE_API_MISSING_ORDER_FORMAT_VERSION: u16 = 1;
1738#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1739#[serde(rename_all = "snake_case")]
1740pub enum MissingOrder {
1741 First,
1742 Last,
1743}
1744
1745pub const LODESTONE_API_NESTED_SCORE_MODE_FORMAT_VERSION: u16 = 1;
1746#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1747#[serde(rename_all = "snake_case")]
1748pub enum NestedScoreMode {
1749 Avg,
1750 Max,
1751 Min,
1752 None,
1753 Sum,
1754}
1755
1756pub const LODESTONE_API_NESTED_INNER_HITS_FORMAT_VERSION: u16 = 1;
1757#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1758#[serde(deny_unknown_fields)]
1759pub struct NestedInnerHits {
1760 #[serde(default, skip_serializing_if = "Option::is_none")]
1761 pub name: Option<String>,
1762 pub from: u32,
1763 pub size: u32,
1764 pub sort: Vec<SortSpec>,
1765}
1766
1767pub const LODESTONE_API_SORT_SPEC_FORMAT_VERSION: u16 = 1;
1768#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1769#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1770pub enum SortSpec {
1771 Score {
1772 order: SortOrder,
1773 },
1774 Field {
1775 field: String,
1776 order: SortOrder,
1777 #[serde(default, skip_serializing_if = "Option::is_none")]
1778 missing: Option<MissingOrder>,
1779 mode: SortMode,
1780 },
1781 NestedField {
1782 path: String,
1783 field: String,
1784 #[serde(default, skip_serializing_if = "Option::is_none")]
1785 filter: Option<Box<Query>>,
1786 order: SortOrder,
1787 #[serde(default, skip_serializing_if = "Option::is_none")]
1788 missing: Option<MissingOrder>,
1789 mode: SortMode,
1790 },
1791}
1792
1793pub const LODESTONE_API_QUERY_FORMAT_VERSION: u16 = 1;
1794#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1795#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1796pub enum Query {
1797 MatchAll,
1798 Term {
1799 field: String,
1800 value: JsonValue,
1801 },
1802 Terms {
1803 field: String,
1804 values: Vec<JsonValue>,
1805 },
1806 Range {
1807 field: String,
1808 #[serde(default, skip_serializing_if = "Option::is_none")]
1809 lower: Option<JsonValue>,
1810 #[serde(default, skip_serializing_if = "Option::is_none")]
1811 upper: Option<JsonValue>,
1812 include_lower: bool,
1813 include_upper: bool,
1814 },
1815 Text {
1816 field: String,
1817 text: String,
1818 #[serde(default, skip_serializing_if = "Option::is_none")]
1819 options: Option<TextQueryOptions>,
1820 },
1821 MultiMatch {
1822 fields: Vec<MultiMatchField>,
1823 text: String,
1824 #[serde(default, skip_serializing_if = "Option::is_none")]
1825 options: Option<MultiMatchOptions>,
1826 },
1827 Exists {
1828 field: String,
1829 },
1830 Prefix {
1831 field: String,
1832 prefix: String,
1833 #[serde(default, skip_serializing_if = "Option::is_none")]
1834 analyzer: Option<TextQueryAnalyzer>,
1835 analyze_wildcard: bool,
1836 },
1837 Fuzzy {
1838 field: String,
1839 value: String,
1840 distance: u32,
1841 #[serde(default, skip_serializing_if = "Option::is_none")]
1842 analyzer: Option<TextQueryAnalyzer>,
1843 },
1844 Boost {
1845 query: Box<Query>,
1846 boost: ApproximateNumber,
1847 },
1848 Bool {
1849 must: Vec<Query>,
1850 filter: Vec<Query>,
1851 should: Vec<Query>,
1852 must_not: Vec<Query>,
1853 minimum_should_match: u32,
1854 },
1855 Nested {
1856 path: String,
1857 query: Box<Query>,
1858 score_mode: NestedScoreMode,
1859 ignore_unmapped: bool,
1860 #[serde(default, skip_serializing_if = "Option::is_none")]
1861 inner_hits: Option<NestedInnerHits>,
1862 },
1863}
1864
1865pub const LODESTONE_API_DENSE_RETRIEVAL_MODE_FORMAT_VERSION: u16 = 1;
1866#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1867#[serde(rename_all = "snake_case")]
1868pub enum DenseRetrievalMode {
1869 Auto,
1870 Ann,
1871 Exact,
1872}
1873
1874pub const LODESTONE_API_VECTOR_ACHIEVED_MODE_FORMAT_VERSION: u16 = 1;
1875#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1876#[serde(rename_all = "snake_case")]
1877pub enum VectorAchievedMode {
1878 Exact,
1879 Ann,
1880 Mixed,
1881}
1882
1883pub const LODESTONE_API_VECTOR_BRANCH_DIAGNOSTICS_FORMAT_VERSION: u16 = 2;
1884#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1885#[serde(deny_unknown_fields)]
1886pub struct VectorBranchDiagnostics {
1887 pub name: String,
1888 pub requested_mode: DenseRetrievalMode,
1889 pub achieved_mode: VectorAchievedMode,
1890 pub result_count: U64,
1891 pub exact_segments: U64,
1892 pub ann_segments: U64,
1893 pub exact_fallback_segments: U64,
1894 pub distance_evaluations: U64,
1895 pub peak_scratch_bytes: U64,
1896 pub fresh_vectors_scanned: U64,
1897 pub realtime_overlay_queries: U64,
1898 pub realtime_overlay_candidates: U64,
1899 pub bundle_roots: U64,
1900 pub object_read_requests: U64,
1901 pub object_bytes_read: U64,
1902 pub cache_hits: U64,
1903 pub cache_misses: U64,
1904 pub snapshot_digests: Vec<Digest>,
1905}
1906
1907pub const LODESTONE_API_DENSE_VECTOR_ELEMENT_TYPE_FORMAT_VERSION: u16 = 1;
1908#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1909#[serde(rename_all = "snake_case")]
1910pub enum DenseVectorElementType {
1911 F32,
1912 F16,
1913 I8,
1914}
1915
1916pub const LODESTONE_API_DENSE_VECTOR_BYTE_ORDER_FORMAT_VERSION: u16 = 1;
1917#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1918#[serde(rename_all = "snake_case")]
1919pub enum DenseVectorByteOrder {
1920 LittleEndian,
1921}
1922
1923pub const LODESTONE_API_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
1924#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1925#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1926pub enum VectorValue {
1927 Numeric {
1928 values: Vec<ApproximateNumber>,
1929 },
1930 Binary {
1931 element_type: DenseVectorElementType,
1932 byte_order: DenseVectorByteOrder,
1933 data_base64: String,
1934 #[serde(default, skip_serializing_if = "Option::is_none")]
1935 quantization_scale: Option<ApproximateNumber>,
1936 },
1937}
1938
1939pub const LODESTONE_API_SPARSE_VECTOR_ENTRY_FORMAT_VERSION: u16 = 1;
1940#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1941#[serde(deny_unknown_fields)]
1942pub struct SparseVectorEntry {
1943 pub dimension: u32,
1944 pub weight: ApproximateNumber,
1945}
1946
1947pub const LODESTONE_API_SPARSE_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
1948#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1949#[serde(deny_unknown_fields)]
1950pub struct SparseVectorValue {
1951 pub entries: Vec<SparseVectorEntry>,
1952}
1953
1954pub const LODESTONE_API_VECTOR_SET_VALUE_FORMAT_VERSION: u16 = 1;
1955#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1956#[serde(deny_unknown_fields)]
1957pub struct VectorSetValue {
1958 pub vectors: Vec<VectorValue>,
1959}
1960
1961pub const LODESTONE_API_VECTOR_EVALUATION_SNAPSHOT_FORMAT_VERSION: u16 = 1;
1962#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1963#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1964pub enum VectorEvaluationSnapshot {
1965 CommittedCut { digest: Digest },
1966 Pit { pit: Cursor },
1967}
1968
1969pub const LODESTONE_API_VECTOR_EVALUATION_QUERY_SET_FORMAT_VERSION: u16 = 1;
1970#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1971#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1972pub enum VectorEvaluationQuerySet {
1973 Sample { seed: U64, sample_count: u32 },
1974 Supplied { digest: Digest, queries: Vec<VectorValue> },
1975}
1976
1977pub const LODESTONE_API_VECTOR_EVALUATION_BUDGET_FORMAT_VERSION: u16 = 1;
1978#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1979#[serde(deny_unknown_fields)]
1980pub struct VectorEvaluationBudget {
1981 pub maximum_distance_evaluations: U64,
1982 pub maximum_elapsed_work_units: U64,
1983 pub maximum_peak_memory_bytes: U64,
1984 pub maximum_object_reads: U64,
1985 pub maximum_object_bytes: U64,
1986 pub maximum_build_scratch_bytes: U64,
1987 pub maximum_profile_comparisons: u32,
1988}
1989
1990pub const LODESTONE_API_VECTOR_CANDIDATE_POLICY_FORMAT_VERSION: u16 = 1;
1991#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1992#[serde(rename_all = "snake_case")]
1993pub enum VectorCandidatePolicy {
1994 Balanced,
1995 HighRecall,
1996 MemoryEfficient,
1997}
1998
1999pub const LODESTONE_API_VECTOR_CALIBRATION_OBJECTIVE_FORMAT_VERSION: u16 = 1;
2000#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2001#[serde(rename_all = "snake_case")]
2002pub enum VectorCalibrationObjective {
2003 Balanced,
2004 HighRecall,
2005 MemoryEfficient,
2006}
2007
2008pub const LODESTONE_API_VECTOR_STRATEGY_PROFILE_FORMAT_VERSION: u16 = 1;
2009#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2010#[serde(rename_all = "snake_case")]
2011pub enum VectorStrategyProfile {
2012 BalancedV1,
2013 HighRecallV1,
2014 MemoryEfficientV1,
2015}
2016
2017pub const LODESTONE_API_VECTOR_EVALUATION_WORK_FORMAT_VERSION: u16 = 1;
2018#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2019#[serde(deny_unknown_fields)]
2020pub struct VectorEvaluationWork {
2021 pub distance_evaluations: U64,
2022 pub elapsed_work_units: U64,
2023 pub peak_memory_bytes: U64,
2024 pub object_reads: U64,
2025 pub object_bytes: U64,
2026}
2027
2028pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_CODE_FORMAT_VERSION: u16 = 1;
2029#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2030#[serde(rename_all = "snake_case")]
2031pub enum VectorEvaluationErrorCode {
2032 AnnRefused,
2033 ExhaustiveRefused,
2034 TimedOut,
2035 Cancelled,
2036 Internal,
2037}
2038
2039pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_FORMAT_VERSION: u16 = 1;
2040#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2041#[serde(deny_unknown_fields)]
2042pub struct VectorEvaluationError {
2043 pub sample_ordinal: u32,
2044 pub code: VectorEvaluationErrorCode,
2045}
2046
2047pub const LODESTONE_API_VECTOR_RECALL_RESULT_SHAPE_VERSION: u16 = 1;
2048pub const LODESTONE_API_VECTOR_RECALL_RESULT_FORMAT_VERSION: u16 = 1;
2049#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2050#[serde(deny_unknown_fields)]
2051pub struct VectorRecallResult {
2052 pub format_version: u32,
2053 pub index: Resource,
2054 pub field: String,
2055 pub mapping_generation: U64,
2056 pub snapshot_digest: Digest,
2057 pub query_set_digest: Digest,
2058 pub metric: VectorMetric,
2059 pub k: u32,
2060 pub candidate_policy: VectorCandidatePolicy,
2061 pub strategy_identity: String,
2062 pub completed_samples: u32,
2063 pub ann_result_count: U64,
2064 pub exhaustive_result_count: U64,
2065 pub mean_recall_basis_points: u32,
2066 pub minimum_recall_basis_points: u32,
2067 pub p05_recall_basis_points: u32,
2068 pub p50_recall_basis_points: u32,
2069 pub p90_recall_basis_points: u32,
2070 pub p99_recall_basis_points: u32,
2071 pub ann_work: VectorEvaluationWork,
2072 pub exhaustive_work: VectorEvaluationWork,
2073 pub errors: Vec<VectorEvaluationError>,
2074}
2075
2076pub const LODESTONE_API_VECTOR_CALIBRATION_CANDIDATE_FORMAT_VERSION: u16 = 1;
2077#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2078#[serde(deny_unknown_fields)]
2079pub struct VectorCalibrationCandidate {
2080 pub profile: VectorStrategyProfile,
2081 pub recall: VectorRecallResult,
2082 pub build_scratch_bytes: U64,
2083 pub resident_bytes: U64,
2084 pub evidence_digest: Digest,
2085}
2086
2087pub const LODESTONE_API_VECTOR_CALIBRATION_RESULT_SHAPE_VERSION: u16 = 1;
2088pub const LODESTONE_API_VECTOR_CALIBRATION_RESULT_FORMAT_VERSION: u16 = 1;
2089#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2090#[serde(deny_unknown_fields)]
2091pub struct VectorCalibrationResult {
2092 pub format_version: u32,
2093 pub objective: VectorCalibrationObjective,
2094 pub candidates: Vec<VectorCalibrationCandidate>,
2095 pub recommended_profile: VectorStrategyProfile,
2096 pub recommended_evidence_digest: Digest,
2097 pub requires_explicit_resource_revision_and_rebuild: bool,
2098}
2099
2100pub const LODESTONE_API_VECTOR_DIAGNOSTIC_RESULT_FORMAT_VERSION: u16 = 1;
2101#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2102#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2103pub enum VectorDiagnosticResult {
2104 Recall { result: Box<VectorRecallResult> },
2105 Calibration { result: Box<VectorCalibrationResult> },
2106}
2107
2108pub const LODESTONE_API_VECTOR_WARM_COMPONENT_FORMAT_VERSION: u16 = 1;
2109#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2110#[serde(rename_all = "snake_case")]
2111pub enum VectorWarmComponent {
2112 Directory,
2113 Approximate,
2114 Exact,
2115}
2116
2117pub const LODESTONE_API_VECTOR_WARM_STATE_FORMAT_VERSION: u16 = 1;
2118#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2119#[serde(rename_all = "snake_case")]
2120pub enum VectorWarmState {
2121 Warmed,
2122 Partial,
2123 Stale,
2124}
2125
2126pub const LODESTONE_API_VECTOR_WARM_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
2127#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2128#[serde(deny_unknown_fields)]
2129pub struct VectorWarmAchievement {
2130 pub component: VectorWarmComponent,
2131 pub cache_identity: Digest,
2132 pub resident_bytes: U64,
2133}
2134
2135pub const LODESTONE_API_VECTOR_WARM_RESULT_SHAPE_VERSION: u16 = 1;
2136pub const LODESTONE_API_VECTOR_WARM_RESULT_FORMAT_VERSION: u16 = 1;
2137#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2138#[serde(deny_unknown_fields)]
2139pub struct VectorWarmResult {
2140 pub format_version: u32,
2141 pub operation_identity: Digest,
2142 pub index: Resource,
2143 pub root_digest: Digest,
2144 pub state: VectorWarmState,
2145 pub progress: ExactDecimal,
2146 pub achieved: Vec<VectorWarmAchievement>,
2147 pub object_requests: U64,
2148 pub object_bytes: U64,
2149 pub cache_hits: U64,
2150 pub cache_misses: U64,
2151 pub started_at: U64,
2152 pub completed_at: U64,
2153 pub expires_at: U64,
2154 #[serde(default, skip_serializing_if = "Option::is_none")]
2155 pub residency_intent: Option<VectorResidencyIntent>,
2156}
2157
2158pub const LODESTONE_API_DENSE_RETRIEVAL_THRESHOLD_FORMAT_VERSION: u16 = 1;
2159#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2160#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2161pub enum DenseRetrievalThreshold {
2162 MinimumScore { value: ApproximateNumber },
2163 MaximumDistance { value: ApproximateNumber },
2164}
2165
2166pub const LODESTONE_API_RETRIEVAL_BRANCH_FORMAT_VERSION: u16 = 3;
2167#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2168#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2169pub enum RetrievalBranch {
2170 Lexical {
2171 name: String,
2172 query: Box<Query>,
2173 #[serde(default, skip_serializing_if = "Option::is_none")]
2174 filter: Option<Box<Query>>,
2175 window: u32,
2176 weight: ApproximateNumber,
2177 },
2178 Dense {
2179 name: String,
2180 field: String,
2181 query_vector: VectorValue,
2182 #[serde(default, skip_serializing_if = "Option::is_none")]
2183 filter: Option<Box<Query>>,
2184 window: u32,
2185 #[serde(default, skip_serializing_if = "Option::is_none")]
2186 candidates: Option<u32>,
2187 weight: ApproximateNumber,
2188 mode: DenseRetrievalMode,
2189 #[serde(default, skip_serializing_if = "Option::is_none")]
2190 threshold: Option<DenseRetrievalThreshold>,
2191 },
2192 Sparse {
2193 name: String,
2194 field: String,
2195 query_vector: SparseVectorValue,
2196 #[serde(default, skip_serializing_if = "Option::is_none")]
2197 filter: Option<Box<Query>>,
2198 window: u32,
2199 weight: ApproximateNumber,
2200 },
2201 LateInteraction {
2202 name: String,
2203 field: String,
2204 query_vectors: VectorSetValue,
2205 #[serde(default, skip_serializing_if = "Option::is_none")]
2206 filter: Option<Box<Query>>,
2207 window: u32,
2208 candidates: u32,
2209 weight: ApproximateNumber,
2210 },
2211}
2212
2213pub const LODESTONE_API_WEIGHTED_RRF_FUSION_FORMAT_VERSION: u16 = 1;
2214#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2215#[serde(deny_unknown_fields)]
2216pub struct WeightedRrfFusion {
2217 pub rank_constant: u32,
2218}
2219
2220pub const LODESTONE_API_RETRIEVAL_PLAN_SHAPE_VERSION: u16 = 1;
2221pub const LODESTONE_API_RETRIEVAL_PLAN_FORMAT_VERSION: u16 = 1;
2222#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2223#[serde(deny_unknown_fields)]
2224pub struct RetrievalPlan {
2225 pub format_version: u32,
2226 #[serde(default, skip_serializing_if = "Option::is_none")]
2227 pub global_filter: Option<Box<Query>>,
2228 pub branches: Vec<RetrievalBranch>,
2229 pub fusion: WeightedRrfFusion,
2230 pub result_window: u32,
2231}
2232
2233pub const LODESTONE_API_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
2234#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2235#[serde(deny_unknown_fields)]
2236pub struct HistogramBounds {
2237 #[serde(default, skip_serializing_if = "Option::is_none")]
2238 pub min: Option<ApproximateNumber>,
2239 #[serde(default, skip_serializing_if = "Option::is_none")]
2240 pub max: Option<ApproximateNumber>,
2241}
2242
2243pub const LODESTONE_API_DATE_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
2244#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2245#[serde(deny_unknown_fields)]
2246pub struct DateHistogramBounds {
2247 #[serde(default, skip_serializing_if = "Option::is_none")]
2248 pub min: Option<I64>,
2249 #[serde(default, skip_serializing_if = "Option::is_none")]
2250 pub max: Option<I64>,
2251}
2252
2253pub const LODESTONE_API_APPROXIMATION_ALGORITHM_FORMAT_VERSION: u16 = 1;
2254#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2255#[serde(rename_all = "snake_case")]
2256pub enum ApproximationAlgorithm {
2257 HyperloglogV1,
2258 FloatPrefixHistogramV1,
2259}
2260
2261pub const LODESTONE_API_APPROXIMATION_FORMAT_VERSION: u16 = 1;
2262#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2263#[serde(deny_unknown_fields)]
2264pub struct Approximation {
2265 pub algorithm: ApproximationAlgorithm,
2266 pub algorithm_version: u32,
2267 pub precision: u32,
2268 pub state_bytes: U64,
2269 #[serde(default, skip_serializing_if = "Option::is_none")]
2270 pub relative_standard_error: Option<ApproximateNumber>,
2271 #[serde(default, skip_serializing_if = "Option::is_none")]
2272 pub maximum_rank_error: Option<ApproximateNumber>,
2273}
2274
2275pub const LODESTONE_API_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
2276#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2277#[serde(deny_unknown_fields)]
2278pub struct PercentileValue {
2279 pub percent: ApproximateNumber,
2280 #[serde(default, skip_serializing_if = "Option::is_none")]
2281 pub value: Option<ApproximateNumber>,
2282}
2283
2284pub const LODESTONE_API_APPROXIMATE_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
2285#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2286#[serde(deny_unknown_fields)]
2287pub struct ApproximatePercentileValue {
2288 pub percent: ApproximateNumber,
2289 pub value: ApproximateNumber,
2290 pub lower_bound: ApproximateNumber,
2291 pub upper_bound: ApproximateNumber,
2292 pub maximum_rank_error: ApproximateNumber,
2293}
2294
2295pub const LODESTONE_API_TIME_SERIES_OPERATOR_FORMAT_VERSION: u16 = 1;
2296#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2297#[serde(rename_all = "snake_case")]
2298pub enum TimeSeriesOperator {
2299 Raw,
2300 Sum,
2301 Count,
2302 Min,
2303 Max,
2304 Average,
2305 Delta,
2306 Increase,
2307 Rate,
2308 HistogramMerge,
2309 Quantiles,
2310}
2311
2312pub const LODESTONE_API_TIME_SERIES_MISSING_DATA_FORMAT_VERSION: u16 = 1;
2313#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2314#[serde(rename_all = "snake_case")]
2315pub enum TimeSeriesMissingData {
2316 Omit,
2317 ExplicitEmpty,
2318}
2319
2320pub const LODESTONE_API_TIME_SERIES_QUANTILE_MODE_FORMAT_VERSION: u16 = 1;
2321#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2322#[serde(rename_all = "snake_case")]
2323pub enum TimeSeriesQuantileMode {
2324 Exact,
2325 Approximate,
2326}
2327
2328pub const LODESTONE_API_TIME_SERIES_BUCKET_STATE_FORMAT_VERSION: u16 = 1;
2329#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2330#[serde(rename_all = "snake_case")]
2331pub enum TimeSeriesBucketState {
2332 Observed,
2333 ExplicitEmpty,
2334}
2335
2336pub const LODESTONE_API_TIME_SERIES_QUANTILE_VALUE_FORMAT_VERSION: u16 = 1;
2337#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2338#[serde(deny_unknown_fields)]
2339pub struct TimeSeriesQuantileValue {
2340 pub quantile: ApproximateNumber,
2341 #[serde(default, skip_serializing_if = "Option::is_none")]
2342 pub value: Option<MetricNumber>,
2343 #[serde(default, skip_serializing_if = "Option::is_none")]
2344 pub lower_bound: Option<MetricNumber>,
2345 #[serde(default, skip_serializing_if = "Option::is_none")]
2346 pub upper_bound: Option<MetricNumber>,
2347 #[serde(default, skip_serializing_if = "Option::is_none")]
2348 pub maximum_rank_error: Option<ApproximateNumber>,
2349}
2350
2351pub const LODESTONE_API_TIME_SERIES_VALUE_FORMAT_VERSION: u16 = 1;
2352#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2353#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2354pub enum TimeSeriesValue {
2355 Raw {
2356 values: Vec<MetricNumber>,
2357 },
2358 Number {
2359 value: MetricNumber,
2360 algorithm: String,
2361 },
2362 Count {
2363 value: U64,
2364 },
2365 ExplicitHistogram {
2366 count: U64,
2367 #[serde(default, skip_serializing_if = "Option::is_none")]
2368 sum: Option<MetricNumber>,
2369 bounds_f64_bits: Vec<U64>,
2370 bucket_counts: Vec<U64>,
2371 },
2372 ExponentialHistogram {
2373 count: U64,
2374 #[serde(default, skip_serializing_if = "Option::is_none")]
2375 sum: Option<MetricNumber>,
2376 scale: i32,
2377 zero_count: U64,
2378 positive: MetricExponentialBuckets,
2379 negative: MetricExponentialBuckets,
2380 },
2381 Quantiles {
2382 values: Vec<TimeSeriesQuantileValue>,
2383 exact: bool,
2384 algorithm: String,
2385 algorithm_version: u32,
2386 state_bytes: U64,
2387 },
2388}
2389
2390pub const LODESTONE_API_TIME_SERIES_BUCKET_FORMAT_VERSION: u16 = 1;
2391#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2392#[serde(deny_unknown_fields)]
2393pub struct TimeSeriesBucket {
2394 pub start_unix_nanos: U64,
2395 pub end_unix_nanos: U64,
2396 pub group: Vec<MetricAttribute>,
2397 pub state: TimeSeriesBucketState,
2398 pub reset: bool,
2399 #[serde(default, skip_serializing_if = "Option::is_none")]
2400 pub value: Option<TimeSeriesValue>,
2401 pub exemplars: Vec<MetricExemplar>,
2402}
2403
2404pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_DIRECTION_FORMAT_VERSION: u16 = 1;
2405#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2406#[serde(rename_all = "snake_case")]
2407pub enum RelationshipTraversalDirection {
2408 Inbound,
2409 Outbound,
2410 Both,
2411}
2412
2413pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_FILTER_FORMAT_VERSION: u16 = 1;
2414#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2415#[serde(deny_unknown_fields)]
2416pub struct RelationshipTraversalFilter {
2417 pub relationship_types: Vec<String>,
2418 pub assertion_classes: Vec<String>,
2419 pub provenance: Vec<String>,
2420 #[serde(default, skip_serializing_if = "Option::is_none")]
2421 pub valid_from_unix_nanos: Option<U64>,
2422 #[serde(default, skip_serializing_if = "Option::is_none")]
2423 pub valid_through_unix_nanos: Option<U64>,
2424}
2425
2426pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_BUDGET_FORMAT_VERSION: u16 = 1;
2427#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2428#[serde(deny_unknown_fields)]
2429pub struct RelationshipTraversalBudget {
2430 pub maximum_depth: u32,
2431 pub maximum_fan_out: u32,
2432 pub maximum_visited_entities: u32,
2433 pub maximum_visited_relationships: u32,
2434 pub maximum_returned_relationships: u32,
2435 pub maximum_memory_bytes: U64,
2436}
2437
2438pub const LODESTONE_API_TRAVERSED_RELATIONSHIP_FORMAT_VERSION: u16 = 1;
2439#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2440#[serde(deny_unknown_fields)]
2441pub struct TraversedRelationship {
2442 pub depth: u32,
2443 pub from: EntityRef,
2444 pub to: EntityRef,
2445 pub relationship: RelationshipRecord,
2446}
2447
2448pub const LODESTONE_API_PROFILE_QUERY_OPERATION_FORMAT_VERSION: u16 = 1;
2449#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2450#[serde(rename_all = "snake_case")]
2451pub enum ProfileQueryOperation {
2452 Flamegraph,
2453 TopStacks,
2454 TopFunctions,
2455 SampleTable,
2456}
2457
2458pub const LODESTONE_API_PROFILE_GROUP_BY_FORMAT_VERSION: u16 = 1;
2459#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2460#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2461pub enum ProfileGroupBy {
2462 ResourceAttribute { key: String },
2463 SampleLabel { key: String },
2464 BuildId,
2465 ModuleId,
2466}
2467
2468pub const LODESTONE_API_PROFILE_QUERY_FILTER_FORMAT_VERSION: u16 = 1;
2469#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2470#[serde(deny_unknown_fields)]
2471pub struct ProfileQueryFilter {
2472 pub profile_ids: Vec<String>,
2473 pub build_ids: Vec<String>,
2474 pub module_ids: Vec<String>,
2475 pub function_ids: Vec<String>,
2476 pub trace_ids: Vec<String>,
2477 pub span_ids: Vec<String>,
2478}
2479
2480pub const LODESTONE_API_PROFILE_QUERY_BUDGET_FORMAT_VERSION: u16 = 1;
2481#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2482#[serde(deny_unknown_fields)]
2483pub struct ProfileQueryBudget {
2484 pub maximum_batches: u32,
2485 pub maximum_samples: u32,
2486 pub maximum_results: u32,
2487 pub maximum_memory_bytes: U64,
2488}
2489
2490pub const LODESTONE_API_PROFILE_QUERY_ROW_FORMAT_VERSION: u16 = 1;
2491#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2492#[serde(deny_unknown_fields)]
2493pub struct ProfileQueryRow {
2494 pub key: String,
2495 pub stack: Vec<String>,
2496 pub value: MetricNumber,
2497 pub sample_count: U64,
2498}
2499
2500pub const LODESTONE_API_TEMPORAL_INPUT_FORMAT_VERSION: u16 = 1;
2501#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2502#[serde(deny_unknown_fields)]
2503pub struct TemporalInput {
2504 pub index: Resource,
2505 pub schema_generation: U64,
2506}
2507
2508pub const LODESTONE_API_TEMPORAL_PATTERN_FORMAT_VERSION: u16 = 1;
2509#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2510#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2511pub enum TemporalPattern {
2512 Event {
2513 node_id: String,
2514 query: Box<Query>,
2515 },
2516 Sequence {
2517 node_id: String,
2518 branches: Vec<TemporalPattern>,
2519 within_nanos: U64,
2520 },
2521 AllOf {
2522 node_id: String,
2523 branches: Vec<TemporalPattern>,
2524 within_nanos: U64,
2525 },
2526 AnyOf {
2527 node_id: String,
2528 branches: Vec<TemporalPattern>,
2529 },
2530 Count {
2531 node_id: String,
2532 pattern: Box<TemporalPattern>,
2533 minimum: u32,
2534 within_nanos: U64,
2535 },
2536 Repetition {
2537 node_id: String,
2538 pattern: Box<TemporalPattern>,
2539 count: u32,
2540 within_nanos: U64,
2541 },
2542 NotFollowedBy {
2543 node_id: String,
2544 anchor: Box<TemporalPattern>,
2545 forbidden: Box<TemporalPattern>,
2546 within_nanos: U64,
2547 },
2548}
2549
2550pub const LODESTONE_API_HISTORICAL_TEMPORAL_DEFINITION_SHAPE_VERSION: u16 = 1;
2551pub const LODESTONE_API_HISTORICAL_TEMPORAL_DEFINITION_FORMAT_VERSION: u16 = 1;
2552#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2553#[serde(deny_unknown_fields)]
2554pub struct HistoricalTemporalDefinition {
2555 pub format_version: u32,
2556 pub pattern_generation: U64,
2557 pub inputs: Vec<TemporalInput>,
2558 pub event_time_field: String,
2559 pub correlation_fields: Vec<String>,
2560 pub pattern: TemporalPattern,
2561 pub watermark_unix_nanos: U64,
2562 pub maximum_events: u32,
2563 pub maximum_states: u32,
2564 pub maximum_captured_events: u32,
2565 pub maximum_results: u32,
2566 pub maximum_state_bytes: U64,
2567}
2568
2569pub const LODESTONE_API_TEMPORAL_EVIDENCE_STATUS_FORMAT_VERSION: u16 = 2;
2570#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2571#[serde(rename_all = "snake_case")]
2572pub enum TemporalEvidenceStatus {
2573 Provisional,
2574 Final,
2575 Correction,
2576 Retraction,
2577}
2578
2579pub const LODESTONE_API_TEMPORAL_SOURCE_EVENT_FORMAT_VERSION: u16 = 1;
2580#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2581#[serde(deny_unknown_fields)]
2582pub struct TemporalSourceEvent {
2583 pub index: Resource,
2584 pub shard_id: u32,
2585 pub recovery_era: Identity,
2586 pub sequence: U64,
2587 pub document_id: String,
2588}
2589
2590pub const LODESTONE_API_TEMPORAL_EVIDENCE_FORMAT_VERSION: u16 = 2;
2591#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2592#[serde(deny_unknown_fields)]
2593pub struct TemporalEvidence {
2594 pub evidence_id: Digest,
2595 pub pattern_generation: U64,
2596 pub pattern_digest: Digest,
2597 pub correlation_key: Vec<JsonValue>,
2598 pub matched_node_id: String,
2599 pub interval_start_unix_nanos: U64,
2600 pub interval_end_unix_nanos: U64,
2601 pub watermark_unix_nanos: U64,
2602 pub source_events: Vec<TemporalSourceEvent>,
2603 pub input_cut_digest: Digest,
2604 pub status: TemporalEvidenceStatus,
2605 #[serde(default, skip_serializing_if = "Option::is_none")]
2606 pub predecessor_evidence_id: Option<Digest>,
2607}
2608
2609pub const LODESTONE_API_CONTINUOUS_TEMPORAL_START_FORMAT_VERSION: u16 = 1;
2610#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2611#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2612pub enum ContinuousTemporalStart {
2613 FromCurrentHeads,
2614 HistoricalThenFollow { pit: Cursor },
2615}
2616
2617pub const LODESTONE_API_CONTINUOUS_TEMPORAL_WATERMARK_POLICY_FORMAT_VERSION: u16 = 1;
2618#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2619#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2620pub enum ContinuousTemporalWatermarkPolicy {
2621 MaximumObservedMinusOutOfOrder {
2622 allowed_out_of_orderness_nanos: U64,
2623 },
2624 MappingBoundEvent {
2625 allowed_out_of_orderness_nanos: U64,
2626 predicate: Box<Query>,
2627 timestamp_field: String,
2628 },
2629}
2630
2631pub const LODESTONE_API_CONTINUOUS_TEMPORAL_LATE_DATA_POLICY_FORMAT_VERSION: u16 = 1;
2632#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2633#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2634pub enum ContinuousTemporalLateDataPolicy {
2635 RecomputeWithinHorizon { correction_horizon_nanos: U64 },
2636 PauseWithGap,
2637}
2638
2639pub const LODESTONE_API_CONTINUOUS_TEMPORAL_OUTPUT_FORMAT_VERSION: u16 = 1;
2640#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2641#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2642pub enum ContinuousTemporalOutput {
2643 InternalResults {
2644 maximum_retained_records: U64,
2645 maximum_retained_bytes: U64,
2646 maximum_retained_event_age_nanos: U64,
2647 },
2648 MaterializedIndex {
2649 index: Resource,
2650 schema_generation: U64,
2651 },
2652}
2653
2654pub const LODESTONE_API_CONTINUOUS_TEMPORAL_DEFINITION_SHAPE_VERSION: u16 = 1;
2655pub const LODESTONE_API_CONTINUOUS_TEMPORAL_DEFINITION_FORMAT_VERSION: u16 = 1;
2656#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2657#[serde(deny_unknown_fields)]
2658pub struct ContinuousTemporalDefinition {
2659 pub format_version: u32,
2660 pub evaluation_id: Identity,
2661 pub pattern_generation: U64,
2662 pub inputs: Vec<TemporalInput>,
2663 pub event_time_field: String,
2664 pub correlation_fields: Vec<String>,
2665 pub pattern: TemporalPattern,
2666 pub start: ContinuousTemporalStart,
2667 pub watermark_policy: ContinuousTemporalWatermarkPolicy,
2668 pub late_data_policy: ContinuousTemporalLateDataPolicy,
2669 pub maximum_events_per_step: u32,
2670 pub maximum_states: u32,
2671 pub maximum_captured_events: u32,
2672 pub maximum_results: u32,
2673 pub maximum_state_bytes: U64,
2674 pub maximum_lag_bytes: U64,
2675 pub maximum_lag_events: U64,
2676 pub maximum_lag_event_age_nanos: U64,
2677 pub output: ContinuousTemporalOutput,
2678}
2679
2680pub const LODESTONE_API_CONTINUOUS_TEMPORAL_FRONTIER_FORMAT_VERSION: u16 = 1;
2681#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2682#[serde(deny_unknown_fields)]
2683pub struct ContinuousTemporalFrontier {
2684 pub index: Resource,
2685 pub shard_id: u32,
2686 pub recovery_era: Identity,
2687 pub routing_revision: U64,
2688 pub registered_wal_frontier: U64,
2689 #[serde(default, skip_serializing_if = "Option::is_none")]
2690 pub watermark_unix_nanos: Option<U64>,
2691}
2692
2693pub const LODESTONE_API_CONTINUOUS_TEMPORAL_AVAILABLE_FRONTIER_FORMAT_VERSION: u16 = 1;
2694#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2695#[serde(deny_unknown_fields)]
2696pub struct ContinuousTemporalAvailableFrontier {
2697 pub index: Resource,
2698 pub shard_id: u32,
2699 pub sequence: U64,
2700}
2701
2702pub const LODESTONE_API_CONTINUOUS_TEMPORAL_GAP_REASON_FORMAT_VERSION: u16 = 1;
2703#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2704#[serde(rename_all = "snake_case")]
2705pub enum ContinuousTemporalGapReason {
2706 RetentionGap,
2707 LateDataGap,
2708 SchemaGap,
2709 RouteGap,
2710 OutputGap,
2711}
2712
2713pub const LODESTONE_API_CONTINUOUS_TEMPORAL_GAP_FORMAT_VERSION: u16 = 1;
2714#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2715#[serde(deny_unknown_fields)]
2716pub struct ContinuousTemporalGap {
2717 pub reason: ContinuousTemporalGapReason,
2718 pub last_complete_frontiers: Vec<ContinuousTemporalFrontier>,
2719 pub earliest_available_frontiers: Vec<ContinuousTemporalAvailableFrontier>,
2720}
2721
2722pub const LODESTONE_API_CONTINUOUS_TEMPORAL_EVALUATION_SHAPE_VERSION: u16 = 1;
2723pub const LODESTONE_API_CONTINUOUS_TEMPORAL_EVALUATION_FORMAT_VERSION: u16 = 1;
2724#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2725#[serde(deny_unknown_fields)]
2726pub struct ContinuousTemporalEvaluation {
2727 pub format_version: u32,
2728 pub evaluation_id: Identity,
2729 pub generation: U64,
2730 pub revision: U64,
2731 pub definition_digest: Digest,
2732 pub definition: ContinuousTemporalDefinition,
2733 pub lifecycle: String,
2734 pub frontiers: Vec<ContinuousTemporalFrontier>,
2735 #[serde(default, skip_serializing_if = "Option::is_none")]
2736 pub global_watermark_unix_nanos: Option<U64>,
2737 pub state_bytes: U64,
2738 pub active_states: U64,
2739 pub active_timers: U64,
2740 pub retained_results: U64,
2741 pub pending_emissions: U64,
2742 #[serde(default, skip_serializing_if = "Option::is_none")]
2743 pub last_materialized_frontier_digest: Option<Digest>,
2744 pub retry_count: u32,
2745 #[serde(default, skip_serializing_if = "Option::is_none")]
2746 pub gap: Option<ContinuousTemporalGap>,
2747}
2748
2749pub const LODESTONE_API_COMPOSITE_ORDER_FORMAT_VERSION: u16 = 1;
2750#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2751#[serde(rename_all = "snake_case")]
2752pub enum CompositeOrder {
2753 Asc,
2754 Desc,
2755}
2756
2757pub const LODESTONE_API_COMPOSITE_SOURCE_FORMAT_VERSION: u16 = 1;
2758#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2759#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2760pub enum CompositeSource {
2761 Terms {
2762 name: String,
2763 field: String,
2764 order: CompositeOrder,
2765 },
2766 DateHistogram {
2767 name: String,
2768 field: String,
2769 #[serde(default, skip_serializing_if = "Option::is_none")]
2770 fixed_interval_millis: Option<U64>,
2771 #[serde(default, skip_serializing_if = "Option::is_none")]
2772 calendar_interval: Option<String>,
2773 #[serde(default, skip_serializing_if = "Option::is_none")]
2774 time_zone: Option<String>,
2775 offset_millis: I64,
2776 order: CompositeOrder,
2777 },
2778}
2779
2780pub const LODESTONE_API_AGGREGATION_FORMAT_VERSION: u16 = 3;
2781#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2782#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2783pub enum Aggregation {
2784 Terms {
2785 name: String,
2786 field: String,
2787 size: u32,
2788 sub_aggregations: Vec<Aggregation>,
2789 },
2790 Histogram {
2791 name: String,
2792 field: String,
2793 interval: ApproximateNumber,
2794 min_doc_count: U64,
2795 #[serde(default, skip_serializing_if = "Option::is_none")]
2796 extended_bounds: Option<HistogramBounds>,
2797 #[serde(default, skip_serializing_if = "Option::is_none")]
2798 hard_bounds: Option<HistogramBounds>,
2799 offset: ApproximateNumber,
2800 #[serde(default, skip_serializing_if = "Option::is_none")]
2801 missing: Option<ApproximateNumber>,
2802 sub_aggregations: Vec<Aggregation>,
2803 },
2804 Cardinality {
2805 name: String,
2806 field: String,
2807 },
2808 Percentiles {
2809 name: String,
2810 field: String,
2811 percents: Vec<ApproximateNumber>,
2812 },
2813 ApproximateCardinality {
2814 name: String,
2815 field: String,
2816 precision: u32,
2817 },
2818 ApproximatePercentiles {
2819 name: String,
2820 field: String,
2821 percents: Vec<ApproximateNumber>,
2822 precision: u32,
2823 },
2824 Sum {
2825 name: String,
2826 field: String,
2827 },
2828 Avg {
2829 name: String,
2830 field: String,
2831 },
2832 Min {
2833 name: String,
2834 field: String,
2835 },
2836 Max {
2837 name: String,
2838 field: String,
2839 },
2840 Stats {
2841 name: String,
2842 field: String,
2843 },
2844 DateHistogram {
2845 name: String,
2846 field: String,
2847 #[serde(default, skip_serializing_if = "Option::is_none")]
2848 fixed_interval_millis: Option<U64>,
2849 #[serde(default, skip_serializing_if = "Option::is_none")]
2850 calendar_interval: Option<String>,
2851 #[serde(default, skip_serializing_if = "Option::is_none")]
2852 time_zone: Option<String>,
2853 min_doc_count: U64,
2854 #[serde(default, skip_serializing_if = "Option::is_none")]
2855 extended_bounds: Option<DateHistogramBounds>,
2856 #[serde(default, skip_serializing_if = "Option::is_none")]
2857 hard_bounds: Option<DateHistogramBounds>,
2858 offset_millis: I64,
2859 #[serde(default, skip_serializing_if = "Option::is_none")]
2860 missing: Option<I64>,
2861 sub_aggregations: Vec<Aggregation>,
2862 },
2863 Composite {
2864 name: String,
2865 size: u32,
2866 sources: Vec<CompositeSource>,
2867 #[serde(default, skip_serializing_if = "Option::is_none")]
2868 after: Option<Cursor>,
2869 sub_aggregations: Vec<Aggregation>,
2870 },
2871 Filter {
2872 name: String,
2873 query: Box<Query>,
2874 sub_aggregations: Vec<Aggregation>,
2875 },
2876 Nested {
2877 name: String,
2878 path: String,
2879 sub_aggregations: Vec<Aggregation>,
2880 },
2881 ReverseNested {
2882 name: String,
2883 #[serde(default, skip_serializing_if = "Option::is_none")]
2884 path: Option<String>,
2885 sub_aggregations: Vec<Aggregation>,
2886 },
2887 TimeSeriesV1 {
2888 name: String,
2889 metric_name: String,
2890 unit: String,
2891 point_kind: MetricPointKind,
2892 #[serde(default, skip_serializing_if = "Option::is_none")]
2893 temporality: Option<MetricTemporality>,
2894 #[serde(default, skip_serializing_if = "Option::is_none")]
2895 monotonic: Option<bool>,
2896 range_start_unix_nanos: U64,
2897 range_end_unix_nanos: U64,
2898 bucket_width_nanos: U64,
2899 alignment_origin_unix_nanos: U64,
2900 group_by: Vec<String>,
2901 operator: TimeSeriesOperator,
2902 missing_data: TimeSeriesMissingData,
2903 quantiles: Vec<ApproximateNumber>,
2904 quantile_mode: TimeSeriesQuantileMode,
2905 maximum_exemplars: u32,
2906 maximum_points: u32,
2907 maximum_series: u32,
2908 maximum_buckets: u32,
2909 maximum_results: u32,
2910 maximum_state_bytes: U64,
2911 },
2912}
2913
2914pub const LODESTONE_API_NESTED_SEARCH_HIT_FORMAT_VERSION: u16 = 2;
2915#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2916#[serde(deny_unknown_fields)]
2917pub struct NestedSearchHit {
2918 pub path: String,
2919 pub ordinal: u32,
2920 #[serde(default, skip_serializing_if = "Option::is_none")]
2921 pub score: Option<ApproximateNumber>,
2922 #[serde(default, skip_serializing_if = "Option::is_none")]
2923 pub source: Option<RawJson>,
2924 pub sort: Vec<JsonValue>,
2925}
2926
2927pub const LODESTONE_API_NAMED_NESTED_INNER_HITS_RESULT_FORMAT_VERSION: u16 = 1;
2928#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2929#[serde(deny_unknown_fields)]
2930pub struct NamedNestedInnerHitsResult {
2931 pub name: String,
2932 pub total: U64,
2933 pub hits: Vec<NestedSearchHit>,
2934}
2935
2936pub const LODESTONE_API_FRAGMENT_BOUNDARY_FORMAT_VERSION: u16 = 1;
2937#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2938#[serde(rename_all = "snake_case")]
2939pub enum FragmentBoundary {
2940 Word,
2941 Sentence,
2942 Paragraph,
2943 WholeField,
2944}
2945
2946pub const LODESTONE_API_FRAGMENT_OFFSET_ENCODING_FORMAT_VERSION: u16 = 1;
2947#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2948#[serde(rename_all = "snake_case")]
2949pub enum FragmentOffsetEncoding {
2950 Utf8Bytes,
2951 Utf16CodeUnits,
2952 UnicodeCodepoints,
2953}
2954
2955pub const LODESTONE_API_FRAGMENT_RANKER_FORMAT_VERSION: u16 = 1;
2956#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2957#[serde(rename_all = "snake_case")]
2958pub enum FragmentRanker {
2959 LexicalMatchCountV1,
2960}
2961
2962pub const LODESTONE_API_FRAGMENT_REQUEST_FORMAT_VERSION: u16 = 1;
2963#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2964#[serde(deny_unknown_fields)]
2965pub struct FragmentRequest {
2966 pub fields: Vec<String>,
2967 pub max_fragment_bytes: u32,
2968 pub max_fragments: u32,
2969 pub boundary: FragmentBoundary,
2970 pub offset_encoding: FragmentOffsetEncoding,
2971 pub ranker: FragmentRanker,
2972}
2973
2974pub const LODESTONE_API_SEARCH_FRAGMENT_FORMAT_VERSION: u16 = 1;
2975#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2976#[serde(deny_unknown_fields)]
2977pub struct SearchFragment {
2978 pub field: String,
2979 pub text: String,
2980 pub start: u32,
2981 pub end: u32,
2982 pub offset_encoding: FragmentOffsetEncoding,
2983 pub rank: u32,
2984 pub match_count: u32,
2985 pub truncated: bool,
2986 pub partial: bool,
2987}
2988
2989pub const LODESTONE_API_NUMERIC_FEATURE_TRANSFORM_FORMAT_VERSION: u16 = 1;
2990#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2991#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2992pub enum NumericFeatureTransform {
2993 Identity,
2994 Log1p,
2995 Clamp {
2996 minimum: ApproximateNumber,
2997 maximum: ApproximateNumber,
2998 },
2999}
3000
3001pub const LODESTONE_API_NUMERIC_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
3002#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3003#[serde(deny_unknown_fields)]
3004pub struct NumericResultFeature {
3005 pub name: String,
3006 pub field: String,
3007 pub transform: NumericFeatureTransform,
3008}
3009
3010pub const LODESTONE_API_RESULT_FEATURE_REQUEST_FORMAT_VERSION: u16 = 1;
3011#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3012#[serde(deny_unknown_fields)]
3013pub struct ResultFeatureRequest {
3014 pub top_n: u32,
3015 pub include_branch_components: bool,
3016 pub numeric: Vec<NumericResultFeature>,
3017}
3018
3019pub const LODESTONE_API_RESULT_DIVERSIFICATION_FORMAT_VERSION: u16 = 1;
3020#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3021#[serde(deny_unknown_fields)]
3022pub struct ResultDiversification {
3023 pub fields: Vec<String>,
3024 pub max_per_group: u32,
3025}
3026
3027pub const LODESTONE_API_SOURCE_PROJECTION_FORMAT_VERSION: u16 = 1;
3028#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3029#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3030pub enum SourceProjection {
3031 Full,
3032 Omit,
3033 Filter {
3034 includes: Vec<String>,
3035 excludes: Vec<String>,
3036 },
3037}
3038
3039pub const LODESTONE_API_BRANCH_SCORE_KIND_FORMAT_VERSION: u16 = 2;
3040#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3041#[serde(rename_all = "snake_case")]
3042pub enum BranchScoreKind {
3043 LexicalScore,
3044 DenseSimilarity,
3045 SparseDotProduct,
3046 LateInteractionMaxsim,
3047}
3048
3049pub const LODESTONE_API_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
3050#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3051#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3052pub enum ResultFeature {
3053 Branch {
3054 branch: String,
3055 score_kind: BranchScoreKind,
3056 rank: u32,
3057 score: ApproximateNumber,
3058 },
3059 Numeric {
3060 name: String,
3061 field: String,
3062 value: ApproximateNumber,
3063 },
3064}
3065
3066pub const LODESTONE_API_SEARCH_HIT_FORMAT_VERSION: u16 = 2;
3067#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3068#[serde(deny_unknown_fields)]
3069pub struct SearchHit {
3070 pub index: Resource,
3071 pub document_id: String,
3072 #[serde(default, skip_serializing_if = "Option::is_none")]
3073 pub score: Option<ApproximateNumber>,
3074 #[serde(default, skip_serializing_if = "Option::is_none")]
3075 pub source: Option<RawJson>,
3076 pub sort: Vec<JsonValue>,
3077 pub fragments: Vec<SearchFragment>,
3078 pub features: Vec<ResultFeature>,
3079 pub group_values: Vec<JsonValue>,
3080 pub inner_hits: Vec<NamedNestedInnerHitsResult>,
3081}
3082
3083pub const LODESTONE_API_AGGREGATION_BUCKET_FORMAT_VERSION: u16 = 1;
3084#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3085#[serde(deny_unknown_fields)]
3086pub struct AggregationBucket {
3087 pub key: JsonValue,
3088 pub document_count: U64,
3089 pub sub_aggregations: Vec<AggregationResult>,
3090}
3091
3092pub const LODESTONE_API_AGGREGATION_RESULT_FORMAT_VERSION: u16 = 3;
3093#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3094#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3095pub enum AggregationResult {
3096 Terms {
3097 name: String,
3098 buckets: Vec<AggregationBucket>,
3099 partial: bool,
3100 },
3101 Histogram {
3102 name: String,
3103 buckets: Vec<AggregationBucket>,
3104 partial: bool,
3105 },
3106 DateHistogram {
3107 name: String,
3108 buckets: Vec<AggregationBucket>,
3109 partial: bool,
3110 },
3111 Composite {
3112 name: String,
3113 buckets: Vec<AggregationBucket>,
3114 #[serde(default, skip_serializing_if = "Option::is_none")]
3115 after: Option<Cursor>,
3116 partial: bool,
3117 },
3118 Filter {
3119 name: String,
3120 buckets: Vec<AggregationBucket>,
3121 partial: bool,
3122 },
3123 SingleBucket {
3124 name: String,
3125 document_count: U64,
3126 sub_aggregations: Vec<AggregationResult>,
3127 partial: bool,
3128 },
3129 Cardinality {
3130 name: String,
3131 #[serde(default, skip_serializing_if = "Option::is_none")]
3132 value: Option<ApproximateNumber>,
3133 partial: bool,
3134 },
3135 Percentiles {
3136 name: String,
3137 values: Vec<PercentileValue>,
3138 partial: bool,
3139 },
3140 ApproximateCardinality {
3141 name: String,
3142 value: ApproximateNumber,
3143 approximation: Approximation,
3144 partial: bool,
3145 },
3146 ApproximatePercentiles {
3147 name: String,
3148 values: Vec<ApproximatePercentileValue>,
3149 approximation: Approximation,
3150 partial: bool,
3151 },
3152 Sum {
3153 name: String,
3154 #[serde(default, skip_serializing_if = "Option::is_none")]
3155 value: Option<ApproximateNumber>,
3156 partial: bool,
3157 },
3158 Avg {
3159 name: String,
3160 #[serde(default, skip_serializing_if = "Option::is_none")]
3161 value: Option<ApproximateNumber>,
3162 partial: bool,
3163 },
3164 Min {
3165 name: String,
3166 #[serde(default, skip_serializing_if = "Option::is_none")]
3167 value: Option<ApproximateNumber>,
3168 partial: bool,
3169 },
3170 Max {
3171 name: String,
3172 #[serde(default, skip_serializing_if = "Option::is_none")]
3173 value: Option<ApproximateNumber>,
3174 partial: bool,
3175 },
3176 Stats {
3177 name: String,
3178 count: U64,
3179 #[serde(default, skip_serializing_if = "Option::is_none")]
3180 min: Option<ApproximateNumber>,
3181 #[serde(default, skip_serializing_if = "Option::is_none")]
3182 max: Option<ApproximateNumber>,
3183 #[serde(default, skip_serializing_if = "Option::is_none")]
3184 avg: Option<ApproximateNumber>,
3185 sum: ApproximateNumber,
3186 partial: bool,
3187 },
3188 TimeSeriesV1 {
3189 name: String,
3190 buckets: Vec<TimeSeriesBucket>,
3191 partial: bool,
3192 },
3193}
3194
3195pub const LODESTONE_API_SHARD_COUNTS_FORMAT_VERSION: u16 = 1;
3196#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3197#[serde(deny_unknown_fields)]
3198pub struct ShardCounts {
3199 pub total: u32,
3200 pub successful: u32,
3201 pub skipped: u32,
3202 pub failed: u32,
3203}
3204
3205pub const LODESTONE_API_TOTAL_HITS_RELATION_FORMAT_VERSION: u16 = 1;
3206#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3207#[serde(rename_all = "snake_case")]
3208pub enum TotalHitsRelation {
3209 Exact,
3210 LowerBound,
3211 Incomplete,
3212}
3213
3214pub const LODESTONE_API_SEARCH_TOTAL_FORMAT_VERSION: u16 = 1;
3215#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3216#[serde(deny_unknown_fields)]
3217pub struct SearchTotal {
3218 pub value: U64,
3219 pub relation: TotalHitsRelation,
3220 pub partial: bool,
3221}
3222
3223pub const LODESTONE_API_SEARCH_EXECUTION_FRESHNESS_FORMAT_VERSION: u16 = 1;
3224#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3225#[serde(rename_all = "snake_case")]
3226pub enum SearchExecutionFreshness {
3227 Realtime,
3228 Committed,
3229}
3230
3231pub const LODESTONE_API_SEARCH_FRESHNESS_FORMAT_VERSION: u16 = 1;
3232#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3233#[serde(rename_all = "snake_case")]
3234pub enum SearchFreshness {
3235 Auto,
3236 Realtime,
3237 Committed,
3238}
3239
3240pub const LODESTONE_API_SEARCH_DEGRADATION_REASON_FORMAT_VERSION: u16 = 1;
3241#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3242#[serde(rename_all = "snake_case")]
3243pub enum SearchDegradationReason {
3244 WriterUnavailable,
3245}
3246
3247pub const LODESTONE_API_SEARCH_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
3248#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3249#[serde(deny_unknown_fields)]
3250pub struct SearchAchievement {
3251 pub freshness: SearchExecutionFreshness,
3252 pub degradation_reasons: Vec<SearchDegradationReason>,
3253}
3254
3255pub const LODESTONE_API_SEARCH_FAILURE_STAGE_FORMAT_VERSION: u16 = 1;
3256#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3257#[serde(rename_all = "snake_case")]
3258pub enum SearchFailureStage {
3259 Preflight,
3260 Dispatch,
3261}
3262
3263pub const LODESTONE_API_SEARCH_FAILURE_REASON_FORMAT_VERSION: u16 = 1;
3264#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3265#[serde(rename_all = "snake_case")]
3266pub enum SearchFailureReason {
3267 Cancelled,
3268 Overloaded,
3269 ResourceLimit,
3270 DeadlineExceeded,
3271 Unavailable,
3272 InvalidResponse,
3273}
3274
3275pub const LODESTONE_API_COLLECTION_SHARD_FORMAT_VERSION: u16 = 1;
3276#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3277#[serde(deny_unknown_fields)]
3278pub struct CollectionShard {
3279 pub collection_id: Identity,
3280 pub index_id: Identity,
3281 pub shard_id: u32,
3282}
3283
3284pub const LODESTONE_API_SEARCH_PARTIAL_FAILURE_FORMAT_VERSION: u16 = 1;
3285#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3286#[serde(deny_unknown_fields)]
3287pub struct SearchPartialFailure {
3288 pub shard: CollectionShard,
3289 pub stage: SearchFailureStage,
3290 pub reason: SearchFailureReason,
3291 pub recovery: RecoveryAction,
3292}
3293
3294pub const LODESTONE_API_ARTIFACT_FORMAT_VERSION: u16 = 1;
3295#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3296#[serde(deny_unknown_fields)]
3297pub struct Artifact {
3298 pub locator: Locator,
3299 pub bytes: U64,
3300 pub sha256: Digest,
3301 pub expires_at: U64,
3302}
3303
3304pub const LODESTONE_API_PORTABILITY_STORAGE_CAPABILITY_FORMAT_VERSION: u16 = 1;
3305#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3306#[serde(deny_unknown_fields)]
3307pub struct PortabilityStorageCapability {
3308 pub backend_authority: String,
3309 pub object_prefix: String,
3310 pub maximum_bytes: U64,
3311 #[serde(default, skip_serializing_if = "Option::is_none")]
3312 pub key_capability_digest: Option<Digest>,
3313}
3314
3315pub const LODESTONE_API_COLLECTION_EXPORT_ARTIFACT_FORMAT_VERSION: u16 = 1;
3316#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3317#[serde(deny_unknown_fields)]
3318pub struct CollectionExportArtifact {
3319 pub artifact: Artifact,
3320 pub backend_authority: String,
3321 pub object_key: String,
3322 pub source_collection_id: Identity,
3323 pub source_catalog_revision: U64,
3324}
3325
3326pub const LODESTONE_API_PORTABILITY_KEY_CAPABILITY_REFERENCE_STATE_FORMAT_VERSION: u16 = 1;
3327#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3328#[serde(rename_all = "snake_case")]
3329pub enum PortabilityKeyCapabilityReferenceState {
3330 NotApplicable,
3331 Released,
3332}
3333
3334pub const LODESTONE_API_COLLECTION_EXPORT_RETIREMENT_FORMAT_VERSION: u16 = 1;
3335#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3336#[serde(deny_unknown_fields)]
3337pub struct CollectionExportRetirement {
3338 pub artifact: CollectionExportArtifact,
3339 pub artifact_absent: bool,
3340 pub key_capability_reference_state: PortabilityKeyCapabilityReferenceState,
3341}
3342
3343pub const LODESTONE_API_INDEX_TRANSFER_PAGE_FORMAT_VERSION: u16 = 1;
3344#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3345#[serde(deny_unknown_fields)]
3346pub struct IndexTransferPage {
3347 pub ordinal: u32,
3348 pub object_key: String,
3349 pub bytes: U64,
3350 pub content_digest: Digest,
3351 pub record_count: u32,
3352}
3353
3354pub const LODESTONE_API_INDEX_TRANSFER_ARTIFACT_FORMAT_VERSION: u16 = 1;
3355#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3356#[serde(deny_unknown_fields)]
3357pub struct IndexTransferArtifact {
3358 pub manifest: Artifact,
3359 pub manifest_object_key: String,
3360 pub transfer_identity: Digest,
3361 pub source_cluster_storage_id: Identity,
3362 pub source_collection_id: Identity,
3363 pub source_index: Resource,
3364 pub source_catalog_revision: U64,
3365 pub source_cut_digest: Digest,
3366 pub pages: Vec<IndexTransferPage>,
3367 pub record_count: u32,
3368}
3369
3370pub const LODESTONE_API_SEARCH_VALIDATION_BOUND_FORMAT_VERSION: u16 = 1;
3371#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3372#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3373pub enum SearchValidationBound {
3374 Exact { value: U64 },
3375 UpperBound { value: U64 },
3376 Unknown { reason: String },
3377}
3378
3379pub const LODESTONE_API_SEARCH_VALIDATION_ESTIMATES_FORMAT_VERSION: u16 = 1;
3380#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3381#[serde(deny_unknown_fields)]
3382pub struct SearchValidationEstimates {
3383 pub shard_fanout: SearchValidationBound,
3384 pub candidate_documents: SearchValidationBound,
3385 pub segments: SearchValidationBound,
3386 pub buckets: SearchValidationBound,
3387 pub memory_bytes: SearchValidationBound,
3388 pub object_reads: SearchValidationBound,
3389 pub object_bytes: SearchValidationBound,
3390 pub response_bytes: SearchValidationBound,
3391 pub planning_work: SearchValidationBound,
3392}
3393
3394pub const LODESTONE_API_SEARCH_VALIDATION_LIMIT_FORMAT_VERSION: u16 = 1;
3395#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3396#[serde(deny_unknown_fields)]
3397pub struct SearchValidationLimit {
3398 pub id: String,
3399 pub applied: U64,
3400 pub unit: String,
3401}
3402
3403pub const LODESTONE_API_OPERATION_KIND_FORMAT_VERSION: u16 = 3;
3404#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3405#[serde(rename_all = "snake_case")]
3406pub enum OperationKind {
3407 Catalog,
3408 MaintenanceTask,
3409 Security,
3410 Diagnostic,
3411 CollectionExport,
3412 CollectionExportRetirement,
3413 CollectionRestore,
3414 IndexExport,
3415 IndexImport,
3416 VectorEvaluation,
3417 VectorWarm,
3418 Lifecycle,
3419 Quota,
3420 Admission,
3421}
3422
3423pub const LODESTONE_API_OPERATION_AUTHORITY_FORMAT_VERSION: u16 = 1;
3424#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3425#[serde(rename_all = "snake_case")]
3426pub enum OperationAuthority {
3427 Catalog,
3428 Tasks,
3429 Security,
3430 Diagnostics,
3431 Portability,
3432 Lifecycle,
3433 Quota,
3434 Admission,
3435}
3436
3437pub const LODESTONE_API_OPERATION_TARGET_FORMAT_VERSION: u16 = 1;
3438#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3439#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3440pub enum OperationTarget {
3441 Collection { collection_id: Identity },
3442 Resource { resource: Resource },
3443 Artifact { locator: Locator },
3444 None,
3445}
3446
3447pub const LODESTONE_API_OPERATION_STATE_FORMAT_VERSION: u16 = 1;
3448#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3449#[serde(rename_all = "snake_case")]
3450pub enum OperationState {
3451 Pending,
3452 Succeeded,
3453 Failed,
3454 Cancelled,
3455}
3456
3457pub const LODESTONE_API_OPERATION_PENDING_STATE_FORMAT_VERSION: u16 = 1;
3458#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3459#[serde(rename_all = "snake_case")]
3460pub enum OperationPendingState {
3461 Queued,
3462 Running,
3463 CancelRequested,
3464}
3465
3466pub const LODESTONE_API_OPERATION_PROGRESS_UNIT_FORMAT_VERSION: u16 = 1;
3467#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3468#[serde(rename_all = "snake_case")]
3469pub enum OperationProgressUnit {
3470 BasisPoints,
3471 Items,
3472 Bytes,
3473 WorkUnits,
3474}
3475
3476pub const LODESTONE_API_OPERATION_PROGRESS_FORMAT_VERSION: u16 = 1;
3477#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3478#[serde(deny_unknown_fields)]
3479pub struct OperationProgress {
3480 pub completed: U64,
3481 pub total: U64,
3482 pub unit: OperationProgressUnit,
3483}
3484
3485pub const LODESTONE_API_OPERATION_RESULT_FORMAT_VERSION: u16 = 1;
3486#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3487#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3488pub enum OperationResult {
3489 None,
3490 Artifacts { items: Vec<Artifact> },
3491}
3492
3493pub const LODESTONE_API_OPERATION_FAILURE_FORMAT_VERSION: u16 = 1;
3494#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3495#[serde(deny_unknown_fields)]
3496pub struct OperationFailure {
3497 pub error: ErrorBody,
3498}
3499
3500pub const LODESTONE_API_OPERATION_CANCELLATION_FORMAT_VERSION: u16 = 1;
3501#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3502#[serde(rename_all = "snake_case")]
3503pub enum OperationCancellation {
3504 NotCancellable,
3505 Cancellable,
3506 CancelRequested,
3507 Cancelled,
3508}
3509
3510pub const LODESTONE_API_OPERATION_RETENTION_STATE_FORMAT_VERSION: u16 = 1;
3511#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3512#[serde(rename_all = "snake_case")]
3513pub enum OperationRetentionState {
3514 Active,
3515 Retired,
3516}
3517
3518pub const LODESTONE_API_OPERATION_RETENTION_FORMAT_VERSION: u16 = 1;
3519#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3520#[serde(deny_unknown_fields)]
3521pub struct OperationRetention {
3522 pub state: OperationRetentionState,
3523 #[serde(default, skip_serializing_if = "Option::is_none")]
3524 pub retire_after: Option<U64>,
3525}
3526
3527pub const LODESTONE_API_OPERATION_FORMAT_VERSION: u16 = 2;
3528#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3529#[serde(deny_unknown_fields)]
3530pub struct Operation {
3531 pub locator: Locator,
3532 pub kind: OperationKind,
3533 pub authority: OperationAuthority,
3534 pub target: OperationTarget,
3535 pub authority_revision: U64,
3536 pub current_state: OperationState,
3537 #[serde(default, skip_serializing_if = "Option::is_none")]
3538 pub pending_state: Option<OperationPendingState>,
3539 #[serde(default, skip_serializing_if = "Option::is_none")]
3540 pub progress: Option<OperationProgress>,
3541 #[serde(default, skip_serializing_if = "Option::is_none")]
3542 pub result: Option<OperationResult>,
3543 #[serde(default, skip_serializing_if = "Option::is_none")]
3544 pub failure: Option<OperationFailure>,
3545 pub cancellation: OperationCancellation,
3546 pub retention: OperationRetention,
3547 pub submitted_at: U64,
3548 #[serde(default, skip_serializing_if = "Option::is_none")]
3549 pub terminal_at: Option<U64>,
3550}
3551
3552pub const LODESTONE_API_WRITE_DURABILITY_BOUNDARY_FORMAT_VERSION: u16 = 1;
3553#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3554#[serde(rename_all = "snake_case")]
3555pub enum WriteDurabilityBoundary {
3556 Registered,
3557 IncarnationMemory,
3558}
3559
3560pub const LODESTONE_API_WRITE_VISIBILITY_MODE_FORMAT_VERSION: u16 = 1;
3561#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3562#[serde(rename_all = "snake_case")]
3563pub enum WriteVisibilityMode {
3564 Applied,
3565 WaitFor,
3566}
3567
3568pub const LODESTONE_API_WRITE_RESPONSE_STAGE_FORMAT_VERSION: u16 = 1;
3569#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3570#[serde(rename_all = "snake_case")]
3571pub enum WriteResponseStage {
3572 Validated,
3573 Admitted,
3574 Sequenced,
3575 ObjectPut,
3576 Registered,
3577 AppliedToActiveMemtable,
3578 MicroCommitted,
3579 Sealed,
3580}
3581
3582pub const LODESTONE_API_WRITE_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
3583#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3584#[serde(deny_unknown_fields)]
3585pub struct WriteAchievement {
3586 pub durability_class: ResourceDurabilityClass,
3587 pub durability_boundary: WriteDurabilityBoundary,
3588 pub visibility_mode: WriteVisibilityMode,
3589 pub response_stage: WriteResponseStage,
3590}
3591
3592pub const LODESTONE_API_MUTATION_COMMIT_POSITION_FORMAT_VERSION: u16 = 1;
3593#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3594#[serde(deny_unknown_fields)]
3595pub struct MutationCommitPosition {
3596 pub leader_term: U64,
3597 pub leader_node_id: U64,
3598 pub log_index: U64,
3599}
3600
3601pub const LODESTONE_API_MUTATION_COMMIT_RECEIPT_SHAPE_VERSION: u16 = 1;
3602pub const LODESTONE_API_MUTATION_COMMIT_RECEIPT_FORMAT_VERSION: u16 = 1;
3603#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3604#[serde(deny_unknown_fields)]
3605pub struct MutationCommitReceipt {
3606 pub format_version: u32,
3607 pub registration_position: MutationCommitPosition,
3608 pub sequence: U64,
3609 pub primary_term: U64,
3610 pub mapping_generation: U64,
3611 pub durability_class: ResourceDurabilityClass,
3612 pub durability_boundary: WriteDurabilityBoundary,
3613 pub committed_at_unix_millis: U64,
3614 pub committed_at_uncertainty_millis: U64,
3615}
3616
3617pub const LODESTONE_API_MUTATION_RESOLVER_FORMAT_VERSION: u16 = 1;
3618#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3619#[serde(rename_all = "snake_case")]
3620pub enum MutationResolver {
3621 CloneIndex,
3622 GetHistory,
3623 ResolveAppendBulk,
3624 ResolveCatalogAction,
3625 ResolveDocumentBulk,
3626 ResolveDocumentMutation,
3627 ResolveSecurityAction,
3628 ResolveServiceCredentialReservation,
3629 ResolveStateWrite,
3630}
3631
3632pub const LODESTONE_API_MUTATION_OUTCOME_FORMAT_VERSION: u16 = 1;
3633#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3634#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
3635pub enum MutationOutcome {
3636 Terminal,
3637 Pending {
3638 #[serde(default, skip_serializing_if = "Option::is_none")]
3639 resolver: Option<MutationResolver>,
3640 },
3641 Indeterminate {
3642 #[serde(default, skip_serializing_if = "Option::is_none")]
3643 resolver: Option<MutationResolver>,
3644 },
3645 ResolutionRequired {
3646 resolver: MutationResolver,
3647 },
3648}
3649
3650pub const LODESTONE_API_SUBMISSION_STATE_FORMAT_VERSION: u16 = 1;
3651#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3652#[serde(rename_all = "snake_case")]
3653pub enum SubmissionState {
3654 NotSubmitted,
3655 Submitted,
3656 Resolved,
3657 KnownRetired,
3658 Indeterminate,
3659}
3660
3661pub const LODESTONE_API_EXPECTED_BINDING_FORMAT_VERSION: u16 = 1;
3662#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3663#[serde(deny_unknown_fields)]
3664pub struct ExpectedBinding {
3665 pub incarnation: Identity,
3666 pub revision: U64,
3667}
3668
3669pub const LODESTONE_API_ADMINISTRATION_ALIAS_ACTION_FORMAT_VERSION: u16 = 1;
3670#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3671#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3672pub enum AdministrationAliasAction {
3673 Put {
3674 name: String,
3675 #[serde(default, skip_serializing_if = "Option::is_none")]
3676 expected_revision: Option<U64>,
3677 targets: Vec<AliasTarget>,
3678 #[serde(default, skip_serializing_if = "Option::is_none")]
3679 filter: Option<RawJson>,
3680 #[serde(default, skip_serializing_if = "Option::is_none")]
3681 index_routing: Option<String>,
3682 #[serde(default, skip_serializing_if = "Option::is_none")]
3683 search_routing: Option<String>,
3684 },
3685 Delete {
3686 name: String,
3687 expected_revision: U64,
3688 },
3689}
3690
3691pub const LODESTONE_API_ADMINISTRATION_MUTATION_FORMAT_VERSION: u16 = 1;
3692#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3693#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3694pub enum AdministrationMutation {
3695 ApplyAliasActions {
3696 actions: Vec<AdministrationAliasAction>,
3697 },
3698 PutComponentTemplate {
3699 name: String,
3700 #[serde(default, skip_serializing_if = "Option::is_none")]
3701 expected: Option<ExpectedBinding>,
3702 mapping: Mapping,
3703 settings: RawJson,
3704 #[serde(default, skip_serializing_if = "Option::is_none")]
3705 resource_spec: Option<IndexResourceSpec>,
3706 },
3707 DeleteComponentTemplate {
3708 name: String,
3709 expected: ExpectedBinding,
3710 },
3711 PutIndexTemplate {
3712 name: String,
3713 #[serde(default, skip_serializing_if = "Option::is_none")]
3714 expected: Option<ExpectedBinding>,
3715 priority: i32,
3716 data_stream: bool,
3717 index_patterns: Vec<String>,
3718 components: Vec<ExpectedBinding>,
3719 mapping: Mapping,
3720 settings: RawJson,
3721 #[serde(default, skip_serializing_if = "Option::is_none")]
3722 resource_spec: Option<IndexResourceSpec>,
3723 },
3724 DeleteIndexTemplate {
3725 name: String,
3726 expected: ExpectedBinding,
3727 },
3728 PutIngestPipeline {
3729 name: String,
3730 #[serde(default, skip_serializing_if = "Option::is_none")]
3731 expected: Option<ExpectedBinding>,
3732 definition: RawJson,
3733 },
3734 DeleteIngestPipeline {
3735 name: String,
3736 expected: ExpectedBinding,
3737 },
3738 PutLifecyclePolicy {
3739 name: String,
3740 #[serde(default, skip_serializing_if = "Option::is_none")]
3741 expected: Option<ExpectedBinding>,
3742 rollover: RolloverThresholds,
3743 retention: RetentionPolicy,
3744 merge_hint: bool,
3745 freeze_hint: bool,
3746 delete_expired: bool,
3747 },
3748 DeleteLifecyclePolicy {
3749 name: String,
3750 expected: ExpectedBinding,
3751 },
3752 CreateDataStream {
3753 name: String,
3754 timestamp_field: String,
3755 index_template: ExpectedBinding,
3756 #[serde(default, skip_serializing_if = "Option::is_none")]
3757 lifecycle_policy: Option<ExpectedBinding>,
3758 },
3759 DeleteDataStream {
3760 name: String,
3761 expected_revision: U64,
3762 },
3763 RolloverDataStream {
3764 name: String,
3765 expected_revision: U64,
3766 },
3767}
3768
3769pub const LODESTONE_API_ADMINISTRATION_OUTCOME_FORMAT_VERSION: u16 = 1;
3770#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3771#[serde(deny_unknown_fields)]
3772pub struct AdministrationOutcome {
3773 pub action_id: Digest,
3774 pub authority_revision: U64,
3775 pub state: String,
3776 #[serde(default, skip_serializing_if = "Option::is_none")]
3777 pub resource: Option<Resource>,
3778}
3779
3780pub const LODESTONE_API_INDEX_CHANGE_APPLY_RECEIPT_FORMAT_VERSION: u16 = 1;
3781#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3782#[serde(deny_unknown_fields)]
3783pub struct IndexChangeApplyReceipt {
3784 pub action_id: Digest,
3785 pub semantic_digest: Digest,
3786 pub index: Resource,
3787 pub revision: U64,
3788 pub schema_generation: U64,
3789 pub state: String,
3790}
3791
3792pub const LODESTONE_API_BULK_DOCUMENT_ITEM_FORMAT_VERSION: u16 = 2;
3793#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3794#[serde(deny_unknown_fields)]
3795pub struct BulkDocumentItem {
3796 pub item_action_id: Digest,
3797 pub document_id: String,
3798 pub operation: String,
3799 #[serde(default, skip_serializing_if = "Option::is_none")]
3800 pub source: Option<RawJson>,
3801 #[serde(default, skip_serializing_if = "Option::is_none")]
3802 pub record: Option<NativeRecord>,
3803 #[serde(default, skip_serializing_if = "Option::is_none")]
3804 pub routing: Option<String>,
3805 #[serde(default, skip_serializing_if = "Option::is_none")]
3806 pub condition: Option<DocumentMutationCondition>,
3807 #[serde(default, skip_serializing_if = "Option::is_none")]
3808 pub pipeline: Option<IngestPipelineSelection>,
3809 pub semantic_digest: Digest,
3810}
3811
3812pub const LODESTONE_API_BULK_DOCUMENT_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
3813#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3814#[serde(deny_unknown_fields)]
3815pub struct BulkDocumentItemOutcome {
3816 pub item_action_id: Digest,
3817 #[serde(default, skip_serializing_if = "Option::is_none")]
3818 pub locator: Option<Locator>,
3819 pub state: SubmissionState,
3820 #[serde(default, skip_serializing_if = "Option::is_none")]
3821 pub sequence: Option<U64>,
3822 #[serde(default, skip_serializing_if = "Option::is_none")]
3823 pub mapping_generation: Option<U64>,
3824 pub mapping_adopted: bool,
3825 pub no_document_effect: bool,
3826 #[serde(default, skip_serializing_if = "Option::is_none")]
3827 pub error: Option<ErrorBody>,
3828}
3829
3830pub const LODESTONE_API_BULK_DOCUMENT_OUTCOME_FORMAT_VERSION: u16 = 1;
3831#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3832#[serde(deny_unknown_fields)]
3833pub struct BulkDocumentOutcome {
3834 pub batch_id: Digest,
3835 pub index: Resource,
3836 pub items: Vec<BulkDocumentItemOutcome>,
3837 pub complete: bool,
3838 #[serde(default, skip_serializing_if = "Option::is_none")]
3839 pub achievement: Option<WriteAchievement>,
3840}
3841
3842pub const LODESTONE_API_METRIC_ATTRIBUTE_VALUE_FORMAT_VERSION: u16 = 1;
3843#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3844#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3845pub enum MetricAttributeValue {
3846 String { value: String },
3847 Boolean { value: bool },
3848 I64 { value: I64 },
3849 U64 { value: U64 },
3850 F64Bits { value: U64 },
3851}
3852
3853pub const LODESTONE_API_METRIC_ATTRIBUTE_FORMAT_VERSION: u16 = 1;
3854#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3855#[serde(deny_unknown_fields)]
3856pub struct MetricAttribute {
3857 pub key: String,
3858 pub value: MetricAttributeValue,
3859}
3860
3861pub const LODESTONE_API_METRIC_NUMBER_FORMAT_VERSION: u16 = 1;
3862#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3863#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3864pub enum MetricNumber {
3865 I64 { value: I64 },
3866 F64Bits { value: U64 },
3867}
3868
3869pub const LODESTONE_API_METRIC_TEMPORALITY_FORMAT_VERSION: u16 = 1;
3870#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3871#[serde(rename_all = "snake_case")]
3872pub enum MetricTemporality {
3873 Cumulative,
3874 Delta,
3875}
3876
3877pub const LODESTONE_API_METRIC_POINT_KIND_FORMAT_VERSION: u16 = 1;
3878#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3879#[serde(rename_all = "snake_case")]
3880pub enum MetricPointKind {
3881 Gauge,
3882 Sum,
3883 ExplicitHistogram,
3884 ExponentialHistogram,
3885}
3886
3887pub const LODESTONE_API_METRIC_EXPONENTIAL_BUCKETS_FORMAT_VERSION: u16 = 1;
3888#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3889#[serde(deny_unknown_fields)]
3890pub struct MetricExponentialBuckets {
3891 pub offset: i32,
3892 pub counts: Vec<U64>,
3893}
3894
3895pub const LODESTONE_API_METRIC_DATA_FORMAT_VERSION: u16 = 1;
3896#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3897#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3898pub enum MetricData {
3899 Gauge {
3900 value: MetricNumber,
3901 },
3902 Sum {
3903 value: MetricNumber,
3904 temporality: MetricTemporality,
3905 monotonic: bool,
3906 },
3907 ExplicitHistogram {
3908 temporality: MetricTemporality,
3909 count: U64,
3910 #[serde(default, skip_serializing_if = "Option::is_none")]
3911 sum: Option<MetricNumber>,
3912 bounds_f64_bits: Vec<U64>,
3913 bucket_counts: Vec<U64>,
3914 },
3915 ExponentialHistogram {
3916 temporality: MetricTemporality,
3917 count: U64,
3918 #[serde(default, skip_serializing_if = "Option::is_none")]
3919 sum: Option<MetricNumber>,
3920 scale: i32,
3921 zero_count: U64,
3922 positive: MetricExponentialBuckets,
3923 negative: MetricExponentialBuckets,
3924 },
3925}
3926
3927pub const LODESTONE_API_METRIC_INSTRUMENTATION_SCOPE_FORMAT_VERSION: u16 = 1;
3928#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3929#[serde(deny_unknown_fields)]
3930pub struct MetricInstrumentationScope {
3931 pub name: String,
3932 #[serde(default, skip_serializing_if = "Option::is_none")]
3933 pub version: Option<String>,
3934 #[serde(default, skip_serializing_if = "Option::is_none")]
3935 pub schema_url: Option<String>,
3936 pub attributes: Vec<MetricAttribute>,
3937}
3938
3939pub const LODESTONE_API_METRIC_EXEMPLAR_FORMAT_VERSION: u16 = 1;
3940#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3941#[serde(deny_unknown_fields)]
3942pub struct MetricExemplar {
3943 pub timestamp_unix_nanos: U64,
3944 pub value: MetricNumber,
3945 #[serde(default, skip_serializing_if = "Option::is_none")]
3946 pub trace_id: Option<String>,
3947 #[serde(default, skip_serializing_if = "Option::is_none")]
3948 pub span_id: Option<String>,
3949 pub filtered_attributes: Vec<MetricAttribute>,
3950}
3951
3952pub const LODESTONE_API_METRIC_POINT_SHAPE_VERSION: u16 = 1;
3953pub const LODESTONE_API_METRIC_POINT_FORMAT_VERSION: u16 = 1;
3954#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3955#[serde(deny_unknown_fields)]
3956pub struct MetricPoint {
3957 pub format_version: u32,
3958 pub resource_attributes: Vec<MetricAttribute>,
3959 pub instrumentation_scope: MetricInstrumentationScope,
3960 pub metric_name: String,
3961 #[serde(default, skip_serializing_if = "Option::is_none")]
3962 pub description: Option<String>,
3963 pub unit: String,
3964 pub series_attributes: Vec<MetricAttribute>,
3965 pub timestamp_unix_nanos: U64,
3966 #[serde(default, skip_serializing_if = "Option::is_none")]
3967 pub start_timestamp_unix_nanos: Option<U64>,
3968 pub data: MetricData,
3969 pub exemplars: Vec<MetricExemplar>,
3970}
3971
3972pub const LODESTONE_API_ENTITY_REF_FORMAT_VERSION: u16 = 1;
3973#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3974#[serde(deny_unknown_fields)]
3975pub struct EntityRef {
3976 pub entity_kind: String,
3977 pub entity_id: String,
3978}
3979
3980pub const LODESTONE_API_RELATIONSHIP_EVIDENCE_REF_FORMAT_VERSION: u16 = 1;
3981#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3982#[serde(deny_unknown_fields)]
3983pub struct RelationshipEvidenceRef {
3984 pub index: Resource,
3985 pub record_id: String,
3986}
3987
3988pub const LODESTONE_API_RELATIONSHIP_DIRECTIONALITY_FORMAT_VERSION: u16 = 1;
3989#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3990#[serde(rename_all = "snake_case")]
3991pub enum RelationshipDirectionality {
3992 Directed,
3993 Undirected,
3994}
3995
3996pub const LODESTONE_API_RELATIONSHIP_RECORD_SHAPE_VERSION: u16 = 1;
3997pub const LODESTONE_API_RELATIONSHIP_RECORD_FORMAT_VERSION: u16 = 1;
3998#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3999#[serde(deny_unknown_fields)]
4000pub struct RelationshipRecord {
4001 pub format_version: u32,
4002 pub relationship_id: String,
4003 pub source: EntityRef,
4004 pub target: EntityRef,
4005 pub relationship_type: String,
4006 pub directionality: RelationshipDirectionality,
4007 #[serde(default, skip_serializing_if = "Option::is_none")]
4008 pub valid_from_unix_nanos: Option<U64>,
4009 #[serde(default, skip_serializing_if = "Option::is_none")]
4010 pub valid_through_unix_nanos: Option<U64>,
4011 pub provenance: Vec<String>,
4012 pub evidence: Vec<RelationshipEvidenceRef>,
4013 pub assertion_class: String,
4014}
4015
4016pub const LODESTONE_API_PROFILE_LABEL_FORMAT_VERSION: u16 = 1;
4017#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4018#[serde(deny_unknown_fields)]
4019pub struct ProfileLabel {
4020 pub key: String,
4021 pub value: String,
4022}
4023
4024pub const LODESTONE_API_PROFILE_SAMPLE_TYPE_FORMAT_VERSION: u16 = 1;
4025#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4026#[serde(deny_unknown_fields)]
4027pub struct ProfileSampleType {
4028 pub sample_type: String,
4029 pub unit: String,
4030}
4031
4032pub const LODESTONE_API_PROFILE_MAPPING_FORMAT_VERSION: u16 = 1;
4033#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4034#[serde(deny_unknown_fields)]
4035pub struct ProfileMapping {
4036 pub mapping_id: String,
4037 pub build_id: String,
4038 pub module_id: String,
4039 #[serde(default, skip_serializing_if = "Option::is_none")]
4040 pub filename: Option<String>,
4041}
4042
4043pub const LODESTONE_API_PROFILE_FUNCTION_FORMAT_VERSION: u16 = 1;
4044#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4045#[serde(deny_unknown_fields)]
4046pub struct ProfileFunction {
4047 pub function_id: String,
4048 #[serde(default, skip_serializing_if = "Option::is_none")]
4049 pub name: Option<String>,
4050 #[serde(default, skip_serializing_if = "Option::is_none")]
4051 pub system_name: Option<String>,
4052 #[serde(default, skip_serializing_if = "Option::is_none")]
4053 pub filename: Option<String>,
4054 #[serde(default, skip_serializing_if = "Option::is_none")]
4055 pub start_line: Option<U64>,
4056 #[serde(default, skip_serializing_if = "Option::is_none")]
4057 pub symbol_observation_id: Option<String>,
4058}
4059
4060pub const LODESTONE_API_PROFILE_LINE_FORMAT_VERSION: u16 = 1;
4061#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4062#[serde(deny_unknown_fields)]
4063pub struct ProfileLine {
4064 pub function_id: String,
4065 pub line: U64,
4066}
4067
4068pub const LODESTONE_API_PROFILE_LOCATION_FORMAT_VERSION: u16 = 1;
4069#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4070#[serde(deny_unknown_fields)]
4071pub struct ProfileLocation {
4072 pub location_id: String,
4073 #[serde(default, skip_serializing_if = "Option::is_none")]
4074 pub mapping_id: Option<String>,
4075 pub address: U64,
4076 pub lines: Vec<ProfileLine>,
4077}
4078
4079pub const LODESTONE_API_PROFILE_STACK_FORMAT_VERSION: u16 = 1;
4080#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4081#[serde(deny_unknown_fields)]
4082pub struct ProfileStack {
4083 pub stack_id: String,
4084 #[serde(default, skip_serializing_if = "Option::is_none")]
4085 pub parent_stack_id: Option<String>,
4086 pub location_id: String,
4087}
4088
4089pub const LODESTONE_API_PROFILE_SAMPLE_FORMAT_VERSION: u16 = 1;
4090#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4091#[serde(deny_unknown_fields)]
4092pub struct ProfileSample {
4093 pub sample_id: String,
4094 pub stack_id: String,
4095 pub values: Vec<MetricNumber>,
4096 pub labels: Vec<ProfileLabel>,
4097 #[serde(default, skip_serializing_if = "Option::is_none")]
4098 pub trace_id: Option<String>,
4099 #[serde(default, skip_serializing_if = "Option::is_none")]
4100 pub span_id: Option<String>,
4101}
4102
4103pub const LODESTONE_API_PROFILE_INSTRUMENTATION_SCOPE_FORMAT_VERSION: u16 = 1;
4104#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4105#[serde(deny_unknown_fields)]
4106pub struct ProfileInstrumentationScope {
4107 pub name: String,
4108 #[serde(default, skip_serializing_if = "Option::is_none")]
4109 pub version: Option<String>,
4110 pub attributes: Vec<ProfileLabel>,
4111}
4112
4113pub const LODESTONE_API_PROFILE_BATCH_SHAPE_VERSION: u16 = 1;
4114pub const LODESTONE_API_PROFILE_BATCH_FORMAT_VERSION: u16 = 1;
4115#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4116#[serde(deny_unknown_fields)]
4117pub struct ProfileBatch {
4118 pub format_version: u32,
4119 pub profile_id: String,
4120 pub batch_id: String,
4121 pub start_unix_nanos: U64,
4122 pub end_unix_nanos: U64,
4123 pub duration_nanos: U64,
4124 pub period_nanos: U64,
4125 pub sample_types: Vec<ProfileSampleType>,
4126 pub resource_attributes: Vec<ProfileLabel>,
4127 pub instrumentation_scope: ProfileInstrumentationScope,
4128 pub mappings: Vec<ProfileMapping>,
4129 pub functions: Vec<ProfileFunction>,
4130 pub locations: Vec<ProfileLocation>,
4131 pub stacks: Vec<ProfileStack>,
4132 pub samples: Vec<ProfileSample>,
4133}
4134
4135pub const LODESTONE_API_NATIVE_RECORD_FORMAT_VERSION: u16 = 3;
4136#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4137#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4138pub enum NativeRecord {
4139 Document { source: RawJson },
4140 MetricPoint { point: Box<MetricPoint> },
4141 Relationship { relationship: Box<RelationshipRecord> },
4142 ProfileBatch { batch: Box<ProfileBatch> },
4143}
4144
4145pub const LODESTONE_API_RETAINED_APPEND_ITEM_FORMAT_VERSION: u16 = 4;
4146#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4147#[serde(deny_unknown_fields)]
4148pub struct RetainedAppendItem {
4149 pub item_action_id: Digest,
4150 pub document_id: String,
4151 pub record: NativeRecord,
4152}
4153
4154pub const LODESTONE_API_RETAINED_APPEND_STATE_FORMAT_VERSION: u16 = 1;
4155#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4156#[serde(rename_all = "snake_case")]
4157pub enum RetainedAppendState {
4158 Prepared,
4159 Committed,
4160 Replayed,
4161 Conflict,
4162 NotSubmittedRetryable,
4163 NotSubmittedTerminal,
4164 SubmittedIndeterminate,
4165 Retired,
4166}
4167
4168pub const LODESTONE_API_RETAINED_APPEND_RETRY_SAFETY_FORMAT_VERSION: u16 = 1;
4169#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4170#[serde(rename_all = "snake_case")]
4171pub enum RetainedAppendRetrySafety {
4172 Safe,
4173 ResolveOnly,
4174 Terminal,
4175}
4176
4177pub const LODESTONE_API_RETAINED_APPEND_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
4178#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4179#[serde(deny_unknown_fields)]
4180pub struct RetainedAppendItemOutcome {
4181 pub item_action_id: Digest,
4182 #[serde(default, skip_serializing_if = "Option::is_none")]
4183 pub locator: Option<Locator>,
4184 #[serde(default, skip_serializing_if = "Option::is_none")]
4185 pub semantic_digest: Option<Digest>,
4186 pub state: RetainedAppendState,
4187 pub retry_safety: RetainedAppendRetrySafety,
4188 #[serde(default, skip_serializing_if = "Option::is_none")]
4189 pub sequence: Option<U64>,
4190 #[serde(default, skip_serializing_if = "Option::is_none")]
4191 pub primary_term: Option<U64>,
4192 #[serde(default, skip_serializing_if = "Option::is_none")]
4193 pub error: Option<ErrorBody>,
4194}
4195
4196pub const LODESTONE_API_RETAINED_APPEND_BULK_OUTCOME_FORMAT_VERSION: u16 = 1;
4197#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4198#[serde(deny_unknown_fields)]
4199pub struct RetainedAppendBulkOutcome {
4200 pub batch_id: Digest,
4201 pub index: Resource,
4202 pub items: Vec<RetainedAppendItemOutcome>,
4203 pub complete: bool,
4204 #[serde(default, skip_serializing_if = "Option::is_none")]
4205 pub achievement: Option<WriteAchievement>,
4206}
4207
4208pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_STATE_FORMAT_VERSION: u16 = 1;
4209#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4210#[serde(rename_all = "snake_case")]
4211pub enum RetainedAppendObservationState {
4212 Visible,
4213 Pending,
4214 SubmittedIndeterminate,
4215 Conflict,
4216 Retired,
4217}
4218
4219pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_OUTCOME_FORMAT_VERSION: u16 = 1;
4220#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4221#[serde(deny_unknown_fields)]
4222pub struct RetainedAppendObservationOutcome {
4223 pub index: Resource,
4224 pub locator: Locator,
4225 pub state: RetainedAppendObservationState,
4226 #[serde(default, skip_serializing_if = "Option::is_none")]
4227 pub sequence: Option<U64>,
4228 #[serde(default, skip_serializing_if = "Option::is_none")]
4229 pub primary_term: Option<U64>,
4230}
4231
4232pub const LODESTONE_API_BINARY_VALUE_FORMAT_VERSION: u16 = 1;
4233#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4234#[serde(deny_unknown_fields)]
4235pub struct BinaryValue {
4236 pub bytes_base64: String,
4237}
4238
4239pub const LODESTONE_API_STATE_HASH_FIELD_FORMAT_VERSION: u16 = 1;
4240#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4241#[serde(deny_unknown_fields)]
4242pub struct StateHashField {
4243 pub field: BinaryValue,
4244 pub value: BinaryValue,
4245}
4246
4247pub const LODESTONE_API_STATE_SET_ENTRY_FORMAT_VERSION: u16 = 1;
4248#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4249#[serde(deny_unknown_fields)]
4250pub struct StateSetEntry {
4251 pub key: BinaryValue,
4252 pub value: BinaryValue,
4253}
4254
4255pub const LODESTONE_API_STATE_SET_CONDITION_FORMAT_VERSION: u16 = 1;
4256#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4257#[serde(rename_all = "snake_case")]
4258pub enum StateSetCondition {
4259 Always,
4260 IfAbsent,
4261 IfPresent,
4262}
4263
4264pub const LODESTONE_API_STATE_OPERATION_FORMAT_VERSION: u16 = 1;
4265#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4266#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4267pub enum StateOperation {
4268 Get {
4269 key: BinaryValue,
4270 },
4271 Set {
4272 key: BinaryValue,
4273 value: BinaryValue,
4274 condition: StateSetCondition,
4275 #[serde(default, skip_serializing_if = "Option::is_none")]
4276 expires_at_millis: Option<U64>,
4277 },
4278 Delete {
4279 keys: Vec<BinaryValue>,
4280 },
4281 Exists {
4282 keys: Vec<BinaryValue>,
4283 },
4284 ExpireAt {
4285 key: BinaryValue,
4286 absolute_millis: U64,
4287 },
4288 TtlStatus {
4289 key: BinaryValue,
4290 },
4291 Persist {
4292 key: BinaryValue,
4293 },
4294 MultiGet {
4295 keys: Vec<BinaryValue>,
4296 },
4297 MultiSet {
4298 entries: Vec<StateSetEntry>,
4299 },
4300 Increment {
4301 key: BinaryValue,
4302 delta: I64,
4303 },
4304 HashGet {
4305 key: BinaryValue,
4306 field: BinaryValue,
4307 },
4308 HashSet {
4309 key: BinaryValue,
4310 fields: Vec<StateHashField>,
4311 },
4312 HashGetAll {
4313 key: BinaryValue,
4314 },
4315}
4316
4317pub const LODESTONE_API_STATE_OPTIONAL_VALUE_FORMAT_VERSION: u16 = 1;
4318#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4319#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4320pub enum StateOptionalValue {
4321 Missing,
4322 Value { value: BinaryValue },
4323}
4324
4325pub const LODESTONE_API_STATE_COMMAND_RESULT_FORMAT_VERSION: u16 = 1;
4326#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4327#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4328pub enum StateCommandResult {
4329 Get {
4330 value: StateOptionalValue,
4331 },
4332 Set {
4333 applied: bool,
4334 },
4335 Delete {
4336 removed: u32,
4337 },
4338 Exists {
4339 count: u32,
4340 },
4341 Expire {
4342 changed: bool,
4343 },
4344 TtlStatus {
4345 state: String,
4346 #[serde(default, skip_serializing_if = "Option::is_none")]
4347 remaining_millis: Option<U64>,
4348 },
4349 Persist {
4350 changed: bool,
4351 },
4352 MultiGet {
4353 values: Vec<StateOptionalValue>,
4354 },
4355 MultiSet {
4356 written: u32,
4357 },
4358 Increment {
4359 value: I64,
4360 },
4361 HashGet {
4362 value: StateOptionalValue,
4363 },
4364 HashSet {
4365 fields_added: u32,
4366 },
4367 HashGetAll {
4368 fields: Vec<StateHashField>,
4369 },
4370}
4371
4372pub const LODESTONE_API_STATE_WRITE_RESOLUTION_FORMAT_VERSION: u16 = 1;
4373#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4374#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4375pub enum StateWriteResolution {
4376 NotSubmitted,
4377 Resolved {
4378 result: StateCommandResult,
4379 sequence: U64,
4380 },
4381 KnownRetired {
4382 retired_through: U64,
4383 },
4384 StateReset {
4385 submitted_reset_epoch: U64,
4386 current_reset_epoch: U64,
4387 },
4388 Indeterminate {
4389 #[serde(default, skip_serializing_if = "Option::is_none")]
4390 observed_high_water: Option<U64>,
4391 #[serde(default, skip_serializing_if = "Option::is_none")]
4392 current_high_water: Option<U64>,
4393 #[serde(default, skip_serializing_if = "Option::is_none")]
4394 retired_through: Option<U64>,
4395 },
4396}
4397
4398pub const LODESTONE_API_SERVICE_CREDENTIAL_RESERVATION_FORMAT_VERSION: u16 = 1;
4399#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4400#[serde(deny_unknown_fields)]
4401pub struct ServiceCredentialReservation {
4402 pub locator: Locator,
4403 pub reservation_action_id: Digest,
4404 pub activation_action_id: Digest,
4405 pub principal_id: Identity,
4406 pub api_key_id: Identity,
4407 pub generation: U64,
4408 pub reservation_expires_at: U64,
4409 pub credential_expires_at: U64,
4410 pub verifier_algorithm: String,
4411 pub verifier_algorithm_version: u32,
4412 pub required_secret_bytes: u32,
4413}
4414
4415pub const LODESTONE_API_SUBSCRIPTION_METADATA_FIELD_FORMAT_VERSION: u16 = 1;
4416#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4417#[serde(rename_all = "snake_case")]
4418pub enum SubscriptionMetadataField {
4419 Id,
4420 RoutingHash,
4421 Operation,
4422 Shard,
4423 Sequence,
4424}
4425
4426pub const LODESTONE_API_SUBSCRIPTION_FIELD_FORMAT_VERSION: u16 = 1;
4427#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4428#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4429pub enum SubscriptionField {
4430 Source { path: String },
4431 Metadata { field: SubscriptionMetadataField },
4432}
4433
4434pub const LODESTONE_API_SUBSCRIPTION_FILTER_FORMAT_VERSION: u16 = 1;
4435#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4436#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4437pub enum SubscriptionFilter {
4438 All,
4439 Bool {
4440 must: Vec<SubscriptionFilter>,
4441 should: Vec<SubscriptionFilter>,
4442 must_not: Vec<SubscriptionFilter>,
4443 minimum_should_match: u32,
4444 },
4445 Term {
4446 field: SubscriptionField,
4447 value: JsonValue,
4448 },
4449 Terms {
4450 field: SubscriptionField,
4451 values: Vec<JsonValue>,
4452 },
4453 Range {
4454 field: SubscriptionField,
4455 #[serde(default, skip_serializing_if = "Option::is_none")]
4456 gt: Option<JsonValue>,
4457 #[serde(default, skip_serializing_if = "Option::is_none")]
4458 gte: Option<JsonValue>,
4459 #[serde(default, skip_serializing_if = "Option::is_none")]
4460 lt: Option<JsonValue>,
4461 #[serde(default, skip_serializing_if = "Option::is_none")]
4462 lte: Option<JsonValue>,
4463 },
4464 Exists {
4465 field: SubscriptionField,
4466 },
4467 Prefix {
4468 field: SubscriptionField,
4469 value: String,
4470 },
4471}
4472
4473pub const LODESTONE_API_SUBSCRIPTION_CURSOR_ENTRY_FORMAT_VERSION: u16 = 1;
4474#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4475#[serde(deny_unknown_fields)]
4476pub struct SubscriptionCursorEntry {
4477 pub index: Resource,
4478 pub routing_revision: U64,
4479 pub recovery_era: Identity,
4480 pub shard_id: U64,
4481 pub sequence: U64,
4482}
4483
4484pub const LODESTONE_API_SUBSCRIPTION_ROUTE_FORMAT_VERSION: u16 = 1;
4485#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4486#[serde(deny_unknown_fields)]
4487pub struct SubscriptionRoute {
4488 pub index: Resource,
4489 pub routing_revision: U64,
4490 pub shard_ids: Vec<U64>,
4491}
4492
4493pub const LODESTONE_API_SUBSCRIPTION_START_POSITION_FORMAT_VERSION: u16 = 1;
4494#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4495#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4496pub enum SubscriptionStartPosition {
4497 FromNow,
4498 Resume {
4499 routes: Vec<SubscriptionRoute>,
4500 cut: Vec<SubscriptionCursorEntry>,
4501 },
4502}
4503
4504pub const LODESTONE_API_SUBSCRIPTION_START_SHAPE_VERSION: u16 = 1;
4505pub const LODESTONE_API_SUBSCRIPTION_START_FORMAT_VERSION: u16 = 1;
4506#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4507#[serde(deny_unknown_fields)]
4508pub struct SubscriptionStart {
4509 pub format_version: u32,
4510 pub request_id: String,
4511 pub index: Resource,
4512 #[serde(default, skip_serializing_if = "Option::is_none")]
4513 pub filter: Option<SubscriptionFilter>,
4514 pub include_deletes: bool,
4515 pub source_projection: Vec<String>,
4516 pub reconnect_attempt: u32,
4517 pub start: SubscriptionStartPosition,
4518 pub heartbeat_millis: U64,
4519 pub schema_digest: Digest,
4520}
4521
4522pub const LODESTONE_API_SUBSCRIPTION_ACCEPTED_SHAPE_VERSION: u16 = 1;
4523pub const LODESTONE_API_SUBSCRIPTION_ACCEPTED_FORMAT_VERSION: u16 = 1;
4524#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4525#[serde(deny_unknown_fields)]
4526pub struct SubscriptionAccepted {
4527 pub format_version: u32,
4528 pub routes: Vec<SubscriptionRoute>,
4529 pub accepted_cut: Vec<SubscriptionCursorEntry>,
4530 pub schema_digest: Digest,
4531}
4532
4533pub const LODESTONE_API_SUBSCRIPTION_WRITER_FENCE_FORMAT_VERSION: u16 = 1;
4534#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4535#[serde(deny_unknown_fields)]
4536pub struct SubscriptionWriterFence {
4537 pub recovery_era: Identity,
4538 pub epoch: u32,
4539}
4540
4541pub const LODESTONE_API_SUBSCRIPTION_EVENT_SHAPE_VERSION: u16 = 1;
4542pub const LODESTONE_API_SUBSCRIPTION_EVENT_FORMAT_VERSION: u16 = 1;
4543#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4544#[serde(deny_unknown_fields)]
4545pub struct SubscriptionEvent {
4546 pub format_version: u32,
4547 pub event_id: Digest,
4548 pub index: Resource,
4549 pub shard_id: U64,
4550 pub recovery_era: Identity,
4551 pub writer_fence: SubscriptionWriterFence,
4552 pub routing_revision: U64,
4553 pub sequence: U64,
4554 pub operation: String,
4555 pub document_id: String,
4556 pub routing_hash: u32,
4557 #[serde(default, skip_serializing_if = "Option::is_none")]
4558 pub source: Option<RawJson>,
4559}
4560
4561pub const LODESTONE_API_SUBSCRIPTION_HEARTBEAT_SHAPE_VERSION: u16 = 1;
4562pub const LODESTONE_API_SUBSCRIPTION_HEARTBEAT_FORMAT_VERSION: u16 = 1;
4563#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4564#[serde(deny_unknown_fields)]
4565pub struct SubscriptionHeartbeat {
4566 pub format_version: u32,
4567 pub confirmed_cut: Vec<SubscriptionCursorEntry>,
4568 pub route_revision: U64,
4569 pub authorization_revision: U64,
4570 pub authorization_valid_until_millis: U64,
4571}
4572
4573pub const LODESTONE_API_SUBSCRIPTION_GAP_SHAPE_VERSION: u16 = 1;
4574pub const LODESTONE_API_SUBSCRIPTION_GAP_FORMAT_VERSION: u16 = 1;
4575#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4576#[serde(deny_unknown_fields)]
4577pub struct SubscriptionGap {
4578 pub format_version: u32,
4579 pub affected: Vec<SubscriptionCursorEntry>,
4580 pub last_confirmed: Vec<SubscriptionCursorEntry>,
4581 pub earliest_available: Vec<SubscriptionCursorEntry>,
4582 pub reason: String,
4583 pub terminal: bool,
4584}
4585
4586pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_REASON_FORMAT_VERSION: u16 = 1;
4587#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4588#[serde(rename_all = "snake_case")]
4589pub enum SubscriptionTerminalReason {
4590 Completed,
4591 Cancelled,
4592 DeadlineExceeded,
4593 StaleCursor,
4594 RetentionGap,
4595 Unavailable,
4596 Internal,
4597}
4598
4599pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_SHAPE_VERSION: u16 = 2;
4600pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_FORMAT_VERSION: u16 = 2;
4601#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4602#[serde(deny_unknown_fields)]
4603pub struct SubscriptionTerminal {
4604 pub format_version: u32,
4605 pub reason: SubscriptionTerminalReason,
4606 pub recovery: RecoveryAction,
4607}
4608
4609pub const LODESTONE_API_SUBSCRIPTION_FRAME_FORMAT_VERSION: u16 = 1;
4610#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4611#[serde(tag = "frame", rename_all = "snake_case", deny_unknown_fields)]
4612pub enum SubscriptionFrame {
4613 Accepted { body: SubscriptionAccepted },
4614 Event { body: SubscriptionEvent },
4615 Heartbeat { body: SubscriptionHeartbeat },
4616 Gap { body: SubscriptionGap },
4617 Terminal { body: SubscriptionTerminal },
4618}
4619
4620pub const LODESTONE_API_STREAM_BINDING_FORMAT_VERSION: u16 = 1;
4621#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4622#[serde(deny_unknown_fields)]
4623pub struct StreamBinding {
4624 pub name: String,
4625 pub transport: String,
4626 pub service: String,
4627 pub method: String,
4628 pub endpoint: String,
4629 pub auth_metadata: String,
4630 pub auth_scheme: String,
4631 pub semantic_format_version: u32,
4632 pub schema_digest: Digest,
4633}
4634
4635pub const LODESTONE_API_CAPABILITY_GRANT_FORMAT_VERSION: u16 = 1;
4636#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4637#[serde(deny_unknown_fields)]
4638pub struct CapabilityGrant {
4639 pub command: String,
4640 pub action: String,
4641 pub state: String,
4642 pub reason: String,
4643 pub mutation_class: String,
4644 pub cancellable: bool,
4645 pub workload_classes: Vec<WorkloadClass>,
4646 pub possible_submission_states: Vec<String>,
4647 pub capability_family: String,
4648 pub effect_class: String,
4649 pub risk_flags: Vec<String>,
4650 pub admissible_errors: Vec<String>,
4651 pub referenced_limits: Vec<String>,
4652 pub retry_safety: String,
4653 pub identity_requirement: String,
4654 #[serde(default, skip_serializing_if = "Option::is_none")]
4655 pub resolver_command: Option<String>,
4656 pub cancellation: String,
4657 pub side_effects: Vec<String>,
4658 pub recovery: String,
4659 pub index_patterns: Vec<String>,
4660 pub exact_index_incarnations: Vec<Identity>,
4661}
4662
4663pub const LODESTONE_API_PROTOCOL_LIMIT_FORMAT_VERSION: u16 = 1;
4664#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4665#[serde(deny_unknown_fields)]
4666pub struct ProtocolLimit {
4667 pub id: String,
4668 pub default: U64,
4669 pub maximum: U64,
4670 pub unit: String,
4671}
4672
4673pub const LODESTONE_API_DOCUMENT_MUTATION_CONDITION_FORMAT_VERSION: u16 = 1;
4674#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4675#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4676pub enum DocumentMutationCondition {
4677 Any,
4678 MustNotExist,
4679 IfSeqNo { seq_no: U64 },
4680 IfSeqNoAndPrimaryTerm { seq_no: U64, primary_term: U64 },
4681}
4682
4683pub const LODESTONE_API_AUDIT_ADAPTER_FORMAT_VERSION: u16 = 1;
4684#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4685#[serde(rename_all = "snake_case")]
4686pub enum AuditAdapter {
4687 Native,
4688 Elasticsearch,
4689 Otlp,
4690 Jaeger,
4691 Grpc,
4692 WebSocket,
4693 Resp,
4694 InternalRpc,
4695 ControlPlane,
4696}
4697
4698pub const LODESTONE_API_AUDIT_DECISION_FORMAT_VERSION: u16 = 1;
4699#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4700#[serde(rename_all = "snake_case")]
4701pub enum AuditDecision {
4702 Allowed,
4703 DeniedAuthentication,
4704 DeniedAuthorization,
4705 DeniedQuota,
4706 DeniedStalePolicy,
4707}
4708
4709pub const LODESTONE_API_AUDIT_OUTCOME_FORMAT_VERSION: u16 = 1;
4710#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4711#[serde(rename_all = "snake_case")]
4712pub enum AuditOutcome {
4713 AdmissionAccepted,
4714 AuthenticationRefused,
4715 AuthorizationRefused,
4716 QuotaRefused,
4717 PolicyUnavailable,
4718 DecodeFailed,
4719 OperationSucceeded,
4720 OperationFailed,
4721 OperationIndeterminate,
4722 FailedRedacted,
4723}
4724
4725pub const LODESTONE_API_AUDIT_DETAIL_FORMAT_VERSION: u16 = 1;
4726#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4727#[serde(rename_all = "snake_case")]
4728pub enum AuditDetail {
4729 PolicyMutation,
4730 CredentialRotation,
4731 CredentialRevocation,
4732 QuotaAdmission,
4733 RequestAdmission,
4734 ExplicitCrashGap,
4735 BackupLifecycle,
4736 RetentionLifecycle,
4737 FieldPromotion,
4738}
4739
4740pub const LODESTONE_API_AUDIT_GAP_REASON_FORMAT_VERSION: u16 = 1;
4741#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4742#[serde(rename_all = "snake_case")]
4743pub enum AuditGapReason {
4744 ExplicitCrashGap,
4745 Retention,
4746}
4747
4748pub const LODESTONE_API_AUDIT_EVENT_FORMAT_VERSION: u16 = 2;
4749#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4750#[serde(deny_unknown_fields)]
4751pub struct AuditEvent {
4752 pub event_id: Digest,
4753 pub recovery_era: Identity,
4754 pub sequence: U64,
4755 pub server_time: U64,
4756 #[serde(default, skip_serializing_if = "Option::is_none")]
4757 pub principal_id: Option<Identity>,
4758 #[serde(default, skip_serializing_if = "Option::is_none")]
4759 pub api_key_id: Option<Identity>,
4760 pub policy_revision: U64,
4761 pub adapter: AuditAdapter,
4762 pub action: String,
4763 pub resource_digest: Digest,
4764 pub request_digest: Digest,
4765 #[serde(default, skip_serializing_if = "Option::is_none")]
4766 pub correlation_id: Option<Identity>,
4767 #[serde(default, skip_serializing_if = "Option::is_none")]
4768 pub diagnostic_id: Option<Identity>,
4769 pub decision: AuditDecision,
4770 pub outcome: AuditOutcome,
4771 pub detail: AuditDetail,
4772}
4773
4774pub const LODESTONE_API_AUDIT_GAP_FORMAT_VERSION: u16 = 2;
4775#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4776#[serde(deny_unknown_fields)]
4777pub struct AuditGap {
4778 pub recovery_era: Identity,
4779 pub first_sequence: U64,
4780 pub last_sequence: U64,
4781 pub reason: AuditGapReason,
4782}
4783
4784pub const LODESTONE_API_AUDIT_STREAM_STATE_FORMAT_VERSION: u16 = 1;
4785#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4786#[serde(deny_unknown_fields)]
4787pub struct AuditStreamState {
4788 pub recovery_era: Identity,
4789 pub earliest_available_sequence: U64,
4790 pub snapshot_through: U64,
4791}
4792
4793pub const LODESTONE_API_SERVICE_CREDENTIAL_GRANT_FORMAT_VERSION: u16 = 1;
4794#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4795#[serde(deny_unknown_fields)]
4796pub struct ServiceCredentialGrant {
4797 pub role_name: String,
4798 pub role_version: U64,
4799}
4800
4801pub const LODESTONE_API_SERVICE_CREDENTIAL_SUMMARY_FORMAT_VERSION: u16 = 1;
4802#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4803#[serde(deny_unknown_fields)]
4804pub struct ServiceCredentialSummary {
4805 pub principal_id: Identity,
4806 pub api_key_id: Identity,
4807 pub generation: U64,
4808 pub state: String,
4809 #[serde(default, skip_serializing_if = "Option::is_none")]
4810 pub expires_at: Option<U64>,
4811 pub grants: Vec<ServiceCredentialGrant>,
4812}
4813
4814pub const LODESTONE_API_SECURITY_ROLE_FORMAT_VERSION: u16 = 1;
4815#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4816#[serde(deny_unknown_fields)]
4817pub struct SecurityRole {
4818 pub role_name: String,
4819 pub version: U64,
4820 pub permissions: Vec<String>,
4821 pub delegable_permissions: Vec<String>,
4822 pub allowed_workload_classes: Vec<WorkloadClass>,
4823 pub index_patterns: Vec<String>,
4824 pub append_index_incarnations: Vec<Identity>,
4825}
4826
4827pub const LODESTONE_API_ROLE_APPEND_SCOPE_CHANGE_FORMAT_VERSION: u16 = 1;
4828#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4829#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4830pub enum RoleAppendScopeChange {
4831 Add { index: Resource },
4832 Remove { index_incarnation: Identity },
4833}
4834
4835pub const LODESTONE_API_ROLE_APPEND_ACCESS_PREPARATION_FORMAT_VERSION: u16 = 1;
4836#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4837#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4838pub enum RoleAppendAccessPreparation {
4839 Prepared {
4840 locator: Locator,
4841 semantic_digest: Digest,
4842 expires_at: U64,
4843 predecessor_role_version: U64,
4844 successor_role_version: U64,
4845 },
4846 AlreadySatisfied {
4847 role: SecurityRole,
4848 },
4849}
4850
4851pub const LODESTONE_API_SECURITY_ACTION_OUTCOME_FORMAT_VERSION: u16 = 1;
4852#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4853#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4854pub enum SecurityActionOutcome {
4855 Reserved {
4856 principal_id: Identity,
4857 api_key_id: Identity,
4858 generation: U64,
4859 },
4860 Activated {
4861 principal_id: Identity,
4862 api_key_id: Identity,
4863 generation: U64,
4864 },
4865 Revoked {
4866 principal_id: Identity,
4867 api_key_id: Identity,
4868 generation: U64,
4869 },
4870 Retired {
4871 principal_id: Identity,
4872 api_key_id: Identity,
4873 generation: U64,
4874 },
4875}
4876
4877pub const LODESTONE_API_MAINTENANCE_WORK_STATE_FORMAT_VERSION: u16 = 1;
4878#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4879#[serde(rename_all = "snake_case")]
4880pub enum MaintenanceWorkState {
4881 ParkedOperatorRequired,
4882 RetryWait,
4883 RetryReady,
4884 Leased,
4885 Deferred,
4886 Runnable,
4887}
4888
4889pub const LODESTONE_API_MAINTENANCE_ATTEMPT_STATE_FORMAT_VERSION: u16 = 1;
4890#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4891#[serde(rename_all = "snake_case")]
4892pub enum MaintenanceAttemptState {
4893 Running,
4894 DeadlineExceededDraining,
4895 DeadlineExceededReclaimPending,
4896 CancellationDraining,
4897 ClaimRecoveryPending,
4898}
4899
4900pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_FORMAT_VERSION: u16 = 1;
4901#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4902#[serde(rename_all = "snake_case")]
4903pub enum MaintenanceFailureClass {
4904 Corruption,
4905 AttemptBudget,
4906 StructuralLimit,
4907 Execution,
4908 Other,
4909}
4910
4911pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_COUNT_FORMAT_VERSION: u16 = 1;
4912#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4913#[serde(deny_unknown_fields)]
4914pub struct MaintenanceFailureClassCount {
4915 pub class: MaintenanceFailureClass,
4916 pub count: U64,
4917}
4918
4919pub const LODESTONE_API_MAINTENANCE_ATTEMPT_OBSERVATION_FORMAT_VERSION: u16 = 1;
4920#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4921#[serde(deny_unknown_fields)]
4922pub struct MaintenanceAttemptObservation {
4923 pub state: MaintenanceAttemptState,
4924 pub lease_epoch: U64,
4925 pub lease_expires_at: U64,
4926 pub observed_at_millis: U64,
4927}
4928
4929pub const LODESTONE_API_MAINTENANCE_TASK_SCOPE_FORMAT_VERSION: u16 = 1;
4930#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4931#[serde(deny_unknown_fields)]
4932pub struct MaintenanceTaskScope {
4933 pub kind: String,
4934 #[serde(default, skip_serializing_if = "Option::is_none")]
4935 pub index: Option<Resource>,
4936 #[serde(default, skip_serializing_if = "Option::is_none")]
4937 pub shard_id: Option<u32>,
4938}
4939
4940pub const LODESTONE_API_MAINTENANCE_TASK_STATUS_FORMAT_VERSION: u16 = 1;
4941#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4942#[serde(deny_unknown_fields)]
4943pub struct MaintenanceTaskStatus {
4944 pub task_id: Identity,
4945 pub kind: String,
4946 pub scope: MaintenanceTaskScope,
4947 pub checkpoint_generation: U64,
4948 pub attempt_count: u32,
4949 pub admitted_at: U64,
4950 pub last_transition_at: U64,
4951 pub last_progress_at: U64,
4952 pub work_state: MaintenanceWorkState,
4953 pub state_since: U64,
4954 #[serde(default, skip_serializing_if = "Option::is_none")]
4955 pub defer_reason: Option<String>,
4956 pub cancellation_requested: bool,
4957 #[serde(default, skip_serializing_if = "Option::is_none")]
4958 pub retry_not_before: Option<U64>,
4959 #[serde(default, skip_serializing_if = "Option::is_none")]
4960 pub failure_at: Option<U64>,
4961 #[serde(default, skip_serializing_if = "Option::is_none")]
4962 pub lease_acquired_at: Option<U64>,
4963 #[serde(default, skip_serializing_if = "Option::is_none")]
4964 pub lease_expires_at: Option<U64>,
4965 #[serde(default, skip_serializing_if = "Option::is_none")]
4966 pub failure_class: Option<MaintenanceFailureClass>,
4967 #[serde(default, skip_serializing_if = "Option::is_none")]
4968 pub failure_code: Option<String>,
4969 pub operator_action_required: bool,
4970 #[serde(default, skip_serializing_if = "Option::is_none")]
4971 pub local_attempt: Option<MaintenanceAttemptObservation>,
4972}
4973
4974pub const LODESTONE_API_MAINTENANCE_STATUS_AGGREGATE_SHAPE_VERSION: u16 = 1;
4975pub const LODESTONE_API_MAINTENANCE_STATUS_AGGREGATE_FORMAT_VERSION: u16 = 2;
4976#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4977#[serde(deny_unknown_fields)]
4978pub struct MaintenanceStatusAggregate {
4979 pub format_version: u32,
4980 pub recovery_era: Identity,
4981 pub source_revision: U64,
4982 pub root_revision: U64,
4983 pub logical_observation_time: U64,
4984 #[serde(default, skip_serializing_if = "Option::is_none")]
4985 pub local_observation_millis: Option<U64>,
4986 pub total_incomplete: U64,
4987 pub parked_operator_required: U64,
4988 pub retry_wait: U64,
4989 pub retry_ready: U64,
4990 pub leased: U64,
4991 pub deferred: U64,
4992 pub runnable: U64,
4993 pub eligible_backlog: U64,
4994 pub cancellation_requested: U64,
4995 #[serde(default, skip_serializing_if = "Option::is_none")]
4996 pub oldest_backlog_age: Option<U64>,
4997 #[serde(default, skip_serializing_if = "Option::is_none")]
4998 pub oldest_runnable_age: Option<U64>,
4999 #[serde(default, skip_serializing_if = "Option::is_none")]
5000 pub oldest_retry_wait_age: Option<U64>,
5001 #[serde(default, skip_serializing_if = "Option::is_none")]
5002 pub oldest_parked_age: Option<U64>,
5003 #[serde(default, skip_serializing_if = "Option::is_none")]
5004 pub oldest_no_progress_age: Option<U64>,
5005 pub current_action_capacity: u32,
5006 pub maximum_action_capacity: u32,
5007 pub active_passes: U64,
5008 pub local_in_flight: U64,
5009 pub deadline_draining: U64,
5010 pub cancellation_draining: U64,
5011 pub claim_recovery_pending: U64,
5012 pub projection_refresh_pending: bool,
5013 #[serde(default, skip_serializing_if = "Option::is_none")]
5014 pub durable_last_progress_at: Option<U64>,
5015 pub tasks_claimed_total: U64,
5016 pub tasks_progressed_total: U64,
5017 pub tasks_completed_total: U64,
5018 pub task_retries_total: U64,
5019 pub task_failures_total: U64,
5020 pub deadline_failures_total: U64,
5021 pub cancellations_total: U64,
5022 pub overlay_capacity_exhaustions_total: U64,
5023 pub failure_classes: Vec<MaintenanceFailureClassCount>,
5024}
5025
5026pub const LODESTONE_API_RUNTIME_STATUS_DETAIL_FORMAT_VERSION: u16 = 1;
5027#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5028#[serde(deny_unknown_fields)]
5029pub struct RuntimeStatusDetail {
5030 pub metastore_revision: U64,
5031 pub root_revision: U64,
5032 pub logical_time: U64,
5033 pub degraded_dependencies: Vec<String>,
5034}
5035
5036pub const LODESTONE_API_RESULT_CACHE_STATUS_SHAPE_VERSION: u16 = 2;
5037pub const LODESTONE_API_RESULT_CACHE_STATUS_FORMAT_VERSION: u16 = 3;
5038#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5039#[serde(deny_unknown_fields)]
5040pub struct ResultCacheStatus {
5041 pub format_version: u32,
5042 pub hits: U64,
5043 pub misses: U64,
5044 pub admissions: U64,
5045 pub bypasses: U64,
5046 pub evictions: U64,
5047 pub collection_bytes: U64,
5048 pub collection_entries: u32,
5049}
5050
5051pub const LODESTONE_API_FIELD_PROMOTION_STATUS_SHAPE_VERSION: u16 = 1;
5052pub const LODESTONE_API_FIELD_PROMOTION_STATUS_FORMAT_VERSION: u16 = 3;
5053#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5054#[serde(deny_unknown_fields)]
5055pub struct FieldPromotionStatus {
5056 pub format_version: u32,
5057 pub index: Resource,
5058 pub mapping_generation: U64,
5059 pub policy_generation: U64,
5060 #[serde(default, skip_serializing_if = "Option::is_none")]
5061 pub last_decision_generation: Option<U64>,
5062 pub heat_records: u32,
5063 pub promoted_fields: u32,
5064 pub extra_bytes: U64,
5065 pub enabled: bool,
5066}
5067
5068pub const LODESTONE_API_OVERLOAD_SHARD_STATUS_SHAPE_VERSION: u16 = 2;
5069pub const LODESTONE_API_OVERLOAD_SHARD_STATUS_FORMAT_VERSION: u16 = 3;
5070#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5071#[serde(deny_unknown_fields)]
5072pub struct OverloadShardStatus {
5073 pub format_version: u32,
5074 pub shard_id: u32,
5075 pub writer_epoch: U64,
5076 pub configured_mode: String,
5077 pub effective_disposition: String,
5078 pub registered_through: U64,
5079 pub indexed_through: U64,
5080 pub lag_operations: U64,
5081 pub backlog_bytes: U64,
5082 pub oldest_age_millis: U64,
5083 pub collection_share_bytes: U64,
5084 pub recovery_ops_this_pass: u32,
5085 pub pending_overlay_documents: U64,
5086 #[serde(default, skip_serializing_if = "Option::is_none")]
5087 pub shed_reason: Option<String>,
5088}
5089
5090pub const LODESTONE_API_EXTERNAL_KEY_BINDING_FORMAT_VERSION: u16 = 1;
5091#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5092#[serde(deny_unknown_fields)]
5093pub struct ExternalKeyBinding {
5094 pub content_key_id: Identity,
5095 pub content_key_generation: U64,
5096 pub binding_id: Identity,
5097 pub binding_generation: U64,
5098 pub access_generation: U64,
5099 pub opaque_binding_base64: String,
5100 pub object_context_digest: Digest,
5101}
5102
5103pub const LODESTONE_API_ROLLUP_MEASURE_FORMAT_VERSION: u16 = 1;
5104#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5105#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
5106pub enum RollupMeasure {
5107 Count,
5108 Sum { field_path_digest: Digest },
5109 Min { field_path_digest: Digest },
5110 Max { field_path_digest: Digest },
5111}
5112
5113pub const LODESTONE_API_AGGREGATE_THEN_DELETE_POLICY_FORMAT_VERSION: u16 = 1;
5114#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5115#[serde(deny_unknown_fields)]
5116pub struct AggregateThenDeletePolicy {
5117 pub policy_id: Identity,
5118 pub policy_generation: U64,
5119 pub detail_retirement_acknowledged: bool,
5120 #[serde(default, skip_serializing_if = "Option::is_none")]
5121 pub expected_policy_generation: Option<U64>,
5122 pub timestamp_field_digest: Digest,
5123 pub bucket_width_millis: U64,
5124 pub bucket_alignment_millis: U64,
5125 pub dimensions: Vec<Digest>,
5126 pub measures: Vec<RollupMeasure>,
5127}
5128
5129pub const LODESTONE_API_LIFECYCLE_BINDING_STATUS_FORMAT_VERSION: u16 = 1;
5130#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5131#[serde(deny_unknown_fields)]
5132pub struct LifecycleBindingStatus {
5133 pub content_key_id: Identity,
5134 pub content_key_generation: U64,
5135 pub binding_id: Identity,
5136 pub binding_generation: U64,
5137 pub access_generation: U64,
5138}
5139
5140pub const LODESTONE_API_LIFECYCLE_ROLLUP_STATUS_FORMAT_VERSION: u16 = 1;
5141#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5142#[serde(deny_unknown_fields)]
5143pub struct LifecycleRollupStatus {
5144 pub policy_id: Identity,
5145 pub policy_generation: U64,
5146 pub ledger_revision: U64,
5147 pub coverages: u32,
5148 pub raw_retired_coverages: u32,
5149 pub detail_retirement_acknowledged: bool,
5150 pub query_contract_version: u32,
5151 pub timestamp_field_digest: Digest,
5152 pub bucket_width_millis: U64,
5153 pub bucket_alignment_millis: U64,
5154 pub dimensions: Vec<Digest>,
5155 pub measures: Vec<RollupMeasure>,
5156}
5157
5158pub const LODESTONE_API_LIFECYCLE_STATUS_SHAPE_VERSION: u16 = 2;
5159pub const LODESTONE_API_LIFECYCLE_STATUS_FORMAT_VERSION: u16 = 4;
5160#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5161#[serde(deny_unknown_fields)]
5162pub struct LifecycleStatus {
5163 pub format_version: u32,
5164 pub index: Resource,
5165 pub authority_revision: U64,
5166 pub active_bindings: Vec<LifecycleBindingStatus>,
5167 #[serde(default, skip_serializing_if = "Option::is_none")]
5168 pub rollup: Option<LifecycleRollupStatus>,
5169}
5170
5171pub const LODESTONE_API_QUOTA_LIMIT_FORMAT_VERSION: u16 = 1;
5172#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5173#[serde(deny_unknown_fields)]
5174pub struct QuotaLimit {
5175 pub dimension: String,
5176 pub maximum: U64,
5177 pub window_millis: U64,
5178}
5179
5180pub const LODESTONE_API_QUOTA_CONSUMPTION_FORMAT_VERSION: u16 = 1;
5181#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5182#[serde(deny_unknown_fields)]
5183pub struct QuotaConsumption {
5184 pub dimension: String,
5185 pub consumed: U64,
5186 pub window_millis: U64,
5187}
5188
5189pub const LODESTONE_API_QUOTA_UPDATE_FORMAT_VERSION: u16 = 1;
5190#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5191#[serde(deny_unknown_fields)]
5192pub struct QuotaUpdate {
5193 pub revision: U64,
5194 pub state: String,
5195}
5196
5197pub const LODESTONE_API_STORAGE_OVERALL_POSTURE_FORMAT_VERSION: u16 = 1;
5198#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5199#[serde(rename_all = "snake_case")]
5200pub enum StorageOverallPosture {
5201 FilesystemDevelopment,
5202 ProviderObjectStorage,
5203 S3CompatibleDevelopment,
5204 Mixed,
5205}
5206
5207pub const LODESTONE_API_STORAGE_PROFILE_ROLE_FORMAT_VERSION: u16 = 1;
5208#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5209#[serde(rename_all = "snake_case")]
5210pub enum StorageProfileRole {
5211 Control,
5212 DefaultWal,
5213 DefaultData,
5214}
5215
5216pub const LODESTONE_API_STORAGE_PROVIDER_POSTURE_FORMAT_VERSION: u16 = 1;
5217#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5218#[serde(rename_all = "snake_case")]
5219pub enum StorageProviderPosture {
5220 Aws,
5221 GoogleCloudStorage,
5222 AzureBlob,
5223 S3CompatibleDevelopment,
5224 FilesystemDevelopment,
5225}
5226
5227pub const LODESTONE_API_STORAGE_BACKEND_SERVICE_CLASS_FORMAT_VERSION: u16 = 1;
5228#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5229#[serde(rename_all = "snake_case")]
5230pub enum StorageBackendServiceClass {
5231 RegionalObject,
5232 ZonalLowLatency,
5233}
5234
5235pub const LODESTONE_API_STORAGE_PROFILE_ROLE_BINDING_FORMAT_VERSION: u16 = 1;
5236#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5237#[serde(deny_unknown_fields)]
5238pub struct StorageProfileRoleBinding {
5239 pub role: StorageProfileRole,
5240 pub authority_group: u32,
5241 pub provider: StorageProviderPosture,
5242 pub service_class: StorageBackendServiceClass,
5243}
5244
5245pub const LODESTONE_API_STORAGE_PROFILE_ATTESTATION_SHAPE_VERSION: u16 = 1;
5246pub const LODESTONE_API_STORAGE_PROFILE_ATTESTATION_FORMAT_VERSION: u16 = 1;
5247#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5248#[serde(deny_unknown_fields)]
5249pub struct StorageProfileAttestation {
5250 pub format_version: u32,
5251 pub configuration_generation: U64,
5252 pub overall_posture: StorageOverallPosture,
5253 pub roles: Vec<StorageProfileRoleBinding>,
5254 pub default_durability: ResourceDurabilityClass,
5255 pub default_storage: ResourceStorageClass,
5256 pub default_policy_digest: Digest,
5257 pub storage_profile_digest: Digest,
5258 pub attestation_digest: Digest,
5259}
5260
5261pub const LODESTONE_API_STORAGE_PROFILE_EXPECTATION_SHAPE_VERSION: u16 = 1;
5262pub const LODESTONE_API_STORAGE_PROFILE_EXPECTATION_FORMAT_VERSION: u16 = 1;
5263#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5264#[serde(deny_unknown_fields)]
5265pub struct StorageProfileExpectation {
5266 pub format_version: u32,
5267 #[serde(default, skip_serializing_if = "Option::is_none")]
5268 pub required_posture: Option<StorageOverallPosture>,
5269 #[serde(default, skip_serializing_if = "Option::is_none")]
5270 pub expected_storage_profile_digest: Option<Digest>,
5271}
5272
5273pub const LODESTONE_API_CORE_BINDING_FORMAT_VERSION: u16 = 3;
5274#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5275#[serde(deny_unknown_fields)]
5276pub struct CoreBinding {
5277 pub cluster_id: Identity,
5278 pub collection_id: Identity,
5279 pub configuration_generation: U64,
5280 pub native_endpoints: Vec<String>,
5281 pub selected_stream_endpoint: String,
5282 pub schema_id: String,
5283 pub schema_digest: Digest,
5284 pub storage_profile: StorageProfileAttestation,
5285}
5286
5287pub const LODESTONE_API_READINESS_OBSERVATION_FORMAT_VERSION: u16 = 1;
5288#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5289#[serde(deny_unknown_fields)]
5290pub struct ReadinessObservation {
5291 pub subject: String,
5292 pub state: String,
5293 #[serde(default, skip_serializing_if = "Option::is_none")]
5294 pub reason: Option<String>,
5295 pub revision: U64,
5296 pub observed_cut: U64,
5297}
5298
5299pub const LODESTONE_API_USAGE_DIMENSION_FORMAT_VERSION: u16 = 1;
5300#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5301#[serde(deny_unknown_fields)]
5302pub struct UsageDimension {
5303 pub name: String,
5304 pub value: String,
5305}
5306
5307pub const LODESTONE_API_PHYSICAL_USAGE_VALUE_FORMAT_VERSION: u16 = 2;
5308#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5309#[serde(deny_unknown_fields)]
5310pub struct PhysicalUsageValue {
5311 pub meter: String,
5312 pub unit: String,
5313 pub value: ExactDecimal,
5314}
5315
5316pub const LODESTONE_API_CORE_USAGE_UNITS_FORMAT_VERSION: u16 = 2;
5317#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5318#[serde(deny_unknown_fields)]
5319pub struct CoreUsageUnits {
5320 pub sequence: U64,
5321 pub record_identity: Digest,
5322 pub index_id: Identity,
5323 pub workload_class: WorkloadClass,
5324 pub window_start: U64,
5325 pub window_end: U64,
5326 pub meter_set_version: u32,
5327 pub dimensions: Vec<UsageDimension>,
5328 pub values: Vec<PhysicalUsageValue>,
5329 pub authority_revision: U64,
5330 pub source_digest: Digest,
5331}
5332
5333pub const LODESTONE_API_CORE_USAGE_CORRECTION_FORMAT_VERSION: u16 = 2;
5334#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5335#[serde(deny_unknown_fields)]
5336pub struct CoreUsageCorrection {
5337 pub sequence: U64,
5338 pub correction_sequence: U64,
5339 pub correction_identity: Digest,
5340 pub target_record_identity: Digest,
5341 pub index_id: Identity,
5342 pub workload_class: WorkloadClass,
5343 pub window_start: U64,
5344 pub window_end: U64,
5345 pub meter_set_version: u32,
5346 pub dimensions: Vec<UsageDimension>,
5347 pub values: Vec<PhysicalUsageValue>,
5348 pub reason_digest: Digest,
5349 pub authority_revision: U64,
5350 pub source_digest: Digest,
5351}
5352
5353pub const LODESTONE_API_RESPONSE_META_SHAPE_VERSION: u16 = 1;
5354pub const LODESTONE_API_RESPONSE_META_FORMAT_VERSION: u16 = 1;
5355#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5356#[serde(deny_unknown_fields)]
5357pub struct ResponseMeta {
5358 pub format_version: u32,
5359 pub request_id: String,
5360 pub correlation_id: Identity,
5361 pub diagnostic_id: Identity,
5362}
5363
5364pub const LODESTONE_API_ERROR_DISPOSITION_FORMAT_VERSION: u16 = 1;
5365#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5366#[serde(rename_all = "snake_case")]
5367pub enum ErrorDisposition {
5368 NotSubmitted,
5369 Submitted,
5370 Resolved,
5371 KnownRetired,
5372 Indeterminate,
5373}
5374
5375pub const LODESTONE_API_RECOVERY_ACTION_FORMAT_VERSION: u16 = 1;
5376#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5377#[serde(rename_all = "snake_case")]
5378pub enum RecoveryAction {
5379 Retry,
5380 RetryAfter,
5381 RefreshCredential,
5382 RestartPage,
5383 ReduceRequest,
5384 Resolve,
5385 RefreshPrecondition,
5386 CorrectRange,
5387 Stop,
5388}
5389
5390pub const LODESTONE_API_LIMIT_CLASS_FORMAT_VERSION: u16 = 1;
5391#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5392#[serde(rename_all = "snake_case")]
5393pub enum LimitClass {
5394 RequestBound,
5395 CollectionQuota,
5396 EngineSafety,
5397}
5398
5399pub const LODESTONE_API_ERROR_DETAIL_FORMAT_VERSION: u16 = 3;
5400#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5401#[serde(tag = "code", rename_all = "snake_case", deny_unknown_fields)]
5402pub enum ErrorDetail {
5403 Aborted {
5404 reason: String,
5405 },
5406 DeadlineExceeded,
5407 InvalidRequest {
5408 #[serde(default, skip_serializing_if = "Option::is_none")]
5409 field: Option<String>,
5410 reason: String,
5411 },
5412 UnsupportedVersion {
5413 observed: u32,
5414 maximum_supported: u32,
5415 },
5416 Unauthenticated,
5417 PermissionDenied {
5418 #[serde(default, skip_serializing_if = "Option::is_none")]
5419 action: Option<String>,
5420 #[serde(default, skip_serializing_if = "Option::is_none")]
5421 workload_class: Option<WorkloadClass>,
5422 },
5423 NotFound {
5424 #[serde(default, skip_serializing_if = "Option::is_none")]
5425 resource: Option<String>,
5426 },
5427 Conflict {
5428 #[serde(default, skip_serializing_if = "Option::is_none")]
5429 expected_revision: Option<U64>,
5430 #[serde(default, skip_serializing_if = "Option::is_none")]
5431 observed_revision: Option<U64>,
5432 },
5433 StaleCursor {
5434 restart_count: u32,
5435 },
5436 RestartBudgetExhausted {
5437 maximum_restarts: u32,
5438 },
5439 LimitExceeded {
5440 class: LimitClass,
5441 limit_id: String,
5442 maximum: U64,
5443 },
5444 CapabilityUnavailable {
5445 #[serde(default, skip_serializing_if = "Option::is_none")]
5446 capability: Option<String>,
5447 },
5448 NotSubmitted {
5449 #[serde(default, skip_serializing_if = "Option::is_none")]
5450 retry_after_millis: Option<U64>,
5451 },
5452 SubmittedIndeterminate {
5453 #[serde(default, skip_serializing_if = "Option::is_none")]
5454 locator: Option<Locator>,
5455 },
5456 ExpiredUnknown {
5457 #[serde(default, skip_serializing_if = "Option::is_none")]
5458 locator: Option<Locator>,
5459 },
5460 SecretNotEscrowed,
5461 RetentionGap {
5462 retired_through: U64,
5463 },
5464 ArtifactRangeInvalid {
5465 maximum_bytes: U64,
5466 },
5467 ChecksumMismatch {
5468 expected: Digest,
5469 observed: Digest,
5470 },
5471 TemporarilyUnavailable {
5472 #[serde(default, skip_serializing_if = "Option::is_none")]
5473 retry_after_millis: Option<U64>,
5474 },
5475 Internal,
5476}
5477
5478pub const LODESTONE_API_CONNECTION_PROFILE_SHAPE_VERSION: u16 = 4;
5479pub const LODESTONE_API_CONNECTION_PROFILE_FORMAT_VERSION: u16 = 4;
5480#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5481#[serde(deny_unknown_fields)]
5482pub struct ConnectionProfile {
5483 pub format_version: u32,
5484 pub profile_generation: U64,
5485 pub native_endpoints: Vec<String>,
5486 pub selected_stream_endpoint: String,
5487 pub tls_server_name: String,
5488 pub tls_trust_sha256: Digest,
5489 pub expected_cluster_id: Identity,
5490 pub expected_collection_id: Identity,
5491 pub expected_principal_id: Identity,
5492 pub schema_id: String,
5493 pub schema_digest: Digest,
5494 pub credential_id: Identity,
5495 pub credential_generation: U64,
5496 #[serde(default, skip_serializing_if = "Option::is_none")]
5497 pub credential_expires_at: Option<U64>,
5498 pub secret_reference: String,
5499 #[serde(default, skip_serializing_if = "Option::is_none")]
5500 pub storage_profile_expectation: Option<StorageProfileExpectation>,
5501}
5502
5503#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5504pub enum TypeKind {
5505 Enum,
5506 Struct,
5507 TaggedUnion,
5508}
5509#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5510pub struct TypeContract {
5511 pub name: &'static str,
5512 pub shape_version: u16,
5513 pub instance_format_version: Option<u16>,
5514 pub kind: TypeKind,
5515 pub wire: bool,
5516}
5517pub const LODESTONE_API_TYPE_CONTRACTS: &[TypeContract] = &[
5518 TypeContract {
5519 name: "cursor",
5520 shape_version: 1,
5521 instance_format_version: None,
5522 kind: TypeKind::Struct,
5523 wire: true,
5524 },
5525 TypeContract {
5526 name: "locator",
5527 shape_version: 1,
5528 instance_format_version: None,
5529 kind: TypeKind::Struct,
5530 wire: true,
5531 },
5532 TypeContract {
5533 name: "resource",
5534 shape_version: 1,
5535 instance_format_version: None,
5536 kind: TypeKind::Struct,
5537 wire: true,
5538 },
5539 TypeContract {
5540 name: "read_cut_kind",
5541 shape_version: 1,
5542 instance_format_version: None,
5543 kind: TypeKind::Enum,
5544 wire: true,
5545 },
5546 TypeContract {
5547 name: "read_cut_index_evidence",
5548 shape_version: 1,
5549 instance_format_version: None,
5550 kind: TypeKind::Struct,
5551 wire: true,
5552 },
5553 TypeContract {
5554 name: "read_cut_evidence",
5555 shape_version: 1,
5556 instance_format_version: Some(1),
5557 kind: TypeKind::Struct,
5558 wire: true,
5559 },
5560 TypeContract {
5561 name: "logical_occupancy_counts",
5562 shape_version: 1,
5563 instance_format_version: None,
5564 kind: TypeKind::Struct,
5565 wire: true,
5566 },
5567 TypeContract {
5568 name: "logical_occupancy_gap_state",
5569 shape_version: 1,
5570 instance_format_version: None,
5571 kind: TypeKind::Enum,
5572 wire: true,
5573 },
5574 TypeContract {
5575 name: "logical_occupancy_snapshot_evidence",
5576 shape_version: 1,
5577 instance_format_version: Some(1),
5578 kind: TypeKind::Struct,
5579 wire: true,
5580 },
5581 TypeContract {
5582 name: "logical_occupancy_window_gap",
5583 shape_version: 1,
5584 instance_format_version: Some(1),
5585 kind: TypeKind::Struct,
5586 wire: true,
5587 },
5588 TypeContract {
5589 name: "field_promotion_configuration",
5590 shape_version: 1,
5591 instance_format_version: Some(3),
5592 kind: TypeKind::Struct,
5593 wire: true,
5594 },
5595 TypeContract {
5596 name: "overload_configuration",
5597 shape_version: 2,
5598 instance_format_version: Some(3),
5599 kind: TypeKind::Struct,
5600 wire: true,
5601 },
5602 TypeContract {
5603 name: "index_policies",
5604 shape_version: 1,
5605 instance_format_version: None,
5606 kind: TypeKind::Struct,
5607 wire: true,
5608 },
5609 TypeContract {
5610 name: "maintenance_budgets",
5611 shape_version: 1,
5612 instance_format_version: None,
5613 kind: TypeKind::Struct,
5614 wire: true,
5615 },
5616 TypeContract {
5617 name: "resource_durability_class",
5618 shape_version: 1,
5619 instance_format_version: None,
5620 kind: TypeKind::Enum,
5621 wire: true,
5622 },
5623 TypeContract {
5624 name: "resource_storage_class",
5625 shape_version: 1,
5626 instance_format_version: None,
5627 kind: TypeKind::Enum,
5628 wire: true,
5629 },
5630 TypeContract {
5631 name: "vector_quality_objective",
5632 shape_version: 1,
5633 instance_format_version: None,
5634 kind: TypeKind::Enum,
5635 wire: true,
5636 },
5637 TypeContract {
5638 name: "vector_indexing_objective",
5639 shape_version: 1,
5640 instance_format_version: None,
5641 kind: TypeKind::Enum,
5642 wire: true,
5643 },
5644 TypeContract {
5645 name: "vector_residency_intent",
5646 shape_version: 1,
5647 instance_format_version: None,
5648 kind: TypeKind::Enum,
5649 wire: true,
5650 },
5651 TypeContract {
5652 name: "vector_calibration_binding",
5653 shape_version: 1,
5654 instance_format_version: None,
5655 kind: TypeKind::Struct,
5656 wire: true,
5657 },
5658 TypeContract {
5659 name: "vector_resource_policy",
5660 shape_version: 2,
5661 instance_format_version: None,
5662 kind: TypeKind::Struct,
5663 wire: true,
5664 },
5665 TypeContract {
5666 name: "workload_class",
5667 shape_version: 1,
5668 instance_format_version: None,
5669 kind: TypeKind::Enum,
5670 wire: true,
5671 },
5672 TypeContract {
5673 name: "index_resource_spec",
5674 shape_version: 3,
5675 instance_format_version: Some(3),
5676 kind: TypeKind::Struct,
5677 wire: true,
5678 },
5679 TypeContract {
5680 name: "index_summary",
5681 shape_version: 1,
5682 instance_format_version: None,
5683 kind: TypeKind::Struct,
5684 wire: true,
5685 },
5686 TypeContract {
5687 name: "mapping_mode",
5688 shape_version: 1,
5689 instance_format_version: None,
5690 kind: TypeKind::Enum,
5691 wire: true,
5692 },
5693 TypeContract {
5694 name: "dynamic_mapping_policy",
5695 shape_version: 1,
5696 instance_format_version: None,
5697 kind: TypeKind::Enum,
5698 wire: true,
5699 },
5700 TypeContract {
5701 name: "mapping_analyzer",
5702 shape_version: 1,
5703 instance_format_version: None,
5704 kind: TypeKind::Enum,
5705 wire: true,
5706 },
5707 TypeContract {
5708 name: "keyword_normalizer",
5709 shape_version: 1,
5710 instance_format_version: None,
5711 kind: TypeKind::Enum,
5712 wire: true,
5713 },
5714 TypeContract {
5715 name: "vector_metric",
5716 shape_version: 1,
5717 instance_format_version: None,
5718 kind: TypeKind::Enum,
5719 wire: true,
5720 },
5721 TypeContract {
5722 name: "mapping_scalar",
5723 shape_version: 1,
5724 instance_format_version: None,
5725 kind: TypeKind::TaggedUnion,
5726 wire: true,
5727 },
5728 TypeContract {
5729 name: "sparse_vector_weight_type",
5730 shape_version: 1,
5731 instance_format_version: None,
5732 kind: TypeKind::Enum,
5733 wire: true,
5734 },
5735 TypeContract {
5736 name: "mapping_field_type",
5737 shape_version: 3,
5738 instance_format_version: None,
5739 kind: TypeKind::TaggedUnion,
5740 wire: true,
5741 },
5742 TypeContract {
5743 name: "mapping_field",
5744 shape_version: 1,
5745 instance_format_version: None,
5746 kind: TypeKind::Struct,
5747 wire: true,
5748 },
5749 TypeContract {
5750 name: "multi_field_projection",
5751 shape_version: 1,
5752 instance_format_version: None,
5753 kind: TypeKind::Struct,
5754 wire: true,
5755 },
5756 TypeContract {
5757 name: "analyzer_identity",
5758 shape_version: 1,
5759 instance_format_version: None,
5760 kind: TypeKind::Struct,
5761 wire: true,
5762 },
5763 TypeContract {
5764 name: "keyword_limit",
5765 shape_version: 1,
5766 instance_format_version: None,
5767 kind: TypeKind::Struct,
5768 wire: true,
5769 },
5770 TypeContract {
5771 name: "profile_privacy_action",
5772 shape_version: 1,
5773 instance_format_version: None,
5774 kind: TypeKind::Enum,
5775 wire: true,
5776 },
5777 TypeContract {
5778 name: "profile_privacy_field",
5779 shape_version: 1,
5780 instance_format_version: None,
5781 kind: TypeKind::TaggedUnion,
5782 wire: true,
5783 },
5784 TypeContract {
5785 name: "profile_privacy_rule",
5786 shape_version: 1,
5787 instance_format_version: None,
5788 kind: TypeKind::Struct,
5789 wire: true,
5790 },
5791 TypeContract {
5792 name: "profile_privacy_policy",
5793 shape_version: 1,
5794 instance_format_version: Some(1),
5795 kind: TypeKind::Struct,
5796 wire: true,
5797 },
5798 TypeContract {
5799 name: "mapping_record_model",
5800 shape_version: 3,
5801 instance_format_version: None,
5802 kind: TypeKind::TaggedUnion,
5803 wire: true,
5804 },
5805 TypeContract {
5806 name: "mapping",
5807 shape_version: 4,
5808 instance_format_version: Some(10),
5809 kind: TypeKind::Struct,
5810 wire: true,
5811 },
5812 TypeContract {
5813 name: "index_detail",
5814 shape_version: 1,
5815 instance_format_version: None,
5816 kind: TypeKind::Struct,
5817 wire: true,
5818 },
5819 TypeContract {
5820 name: "source_provider",
5821 shape_version: 1,
5822 instance_format_version: None,
5823 kind: TypeKind::Enum,
5824 wire: true,
5825 },
5826 TypeContract {
5827 name: "source_decoder",
5828 shape_version: 1,
5829 instance_format_version: None,
5830 kind: TypeKind::Enum,
5831 wire: true,
5832 },
5833 TypeContract {
5834 name: "source_replay_guarantees",
5835 shape_version: 1,
5836 instance_format_version: None,
5837 kind: TypeKind::Struct,
5838 wire: true,
5839 },
5840 TypeContract {
5841 name: "source_partition_configuration",
5842 shape_version: 1,
5843 instance_format_version: None,
5844 kind: TypeKind::Struct,
5845 wire: true,
5846 },
5847 TypeContract {
5848 name: "replayable_source_configuration",
5849 shape_version: 1,
5850 instance_format_version: None,
5851 kind: TypeKind::Struct,
5852 wire: true,
5853 },
5854 TypeContract {
5855 name: "source_partition_status",
5856 shape_version: 1,
5857 instance_format_version: None,
5858 kind: TypeKind::Struct,
5859 wire: true,
5860 },
5861 TypeContract {
5862 name: "replayable_source_status",
5863 shape_version: 1,
5864 instance_format_version: None,
5865 kind: TypeKind::Struct,
5866 wire: true,
5867 },
5868 TypeContract {
5869 name: "source_control_transition",
5870 shape_version: 1,
5871 instance_format_version: None,
5872 kind: TypeKind::Enum,
5873 wire: true,
5874 },
5875 TypeContract {
5876 name: "history_ledger_precondition",
5877 shape_version: 1,
5878 instance_format_version: None,
5879 kind: TypeKind::TaggedUnion,
5880 wire: true,
5881 },
5882 TypeContract {
5883 name: "history_retention_policy",
5884 shape_version: 1,
5885 instance_format_version: None,
5886 kind: TypeKind::Struct,
5887 wire: true,
5888 },
5889 TypeContract {
5890 name: "history_selector",
5891 shape_version: 1,
5892 instance_format_version: None,
5893 kind: TypeKind::TaggedUnion,
5894 wire: true,
5895 },
5896 TypeContract {
5897 name: "history_hold",
5898 shape_version: 1,
5899 instance_format_version: None,
5900 kind: TypeKind::Struct,
5901 wire: true,
5902 },
5903 TypeContract {
5904 name: "history_status",
5905 shape_version: 1,
5906 instance_format_version: None,
5907 kind: TypeKind::Struct,
5908 wire: true,
5909 },
5910 TypeContract {
5911 name: "history_resolution",
5912 shape_version: 1,
5913 instance_format_version: None,
5914 kind: TypeKind::Struct,
5915 wire: true,
5916 },
5917 TypeContract {
5918 name: "index_reference",
5919 shape_version: 1,
5920 instance_format_version: None,
5921 kind: TypeKind::Struct,
5922 wire: true,
5923 },
5924 TypeContract {
5925 name: "alias_target",
5926 shape_version: 1,
5927 instance_format_version: None,
5928 kind: TypeKind::Struct,
5929 wire: true,
5930 },
5931 TypeContract {
5932 name: "alias_summary",
5933 shape_version: 1,
5934 instance_format_version: None,
5935 kind: TypeKind::Struct,
5936 wire: true,
5937 },
5938 TypeContract {
5939 name: "alias_detail",
5940 shape_version: 1,
5941 instance_format_version: None,
5942 kind: TypeKind::Struct,
5943 wire: true,
5944 },
5945 TypeContract {
5946 name: "data_stream_summary",
5947 shape_version: 1,
5948 instance_format_version: None,
5949 kind: TypeKind::Struct,
5950 wire: true,
5951 },
5952 TypeContract {
5953 name: "component_template_binding",
5954 shape_version: 1,
5955 instance_format_version: None,
5956 kind: TypeKind::Struct,
5957 wire: true,
5958 },
5959 TypeContract {
5960 name: "index_template_binding",
5961 shape_version: 1,
5962 instance_format_version: None,
5963 kind: TypeKind::Struct,
5964 wire: true,
5965 },
5966 TypeContract {
5967 name: "lifecycle_policy_binding",
5968 shape_version: 1,
5969 instance_format_version: None,
5970 kind: TypeKind::Struct,
5971 wire: true,
5972 },
5973 TypeContract {
5974 name: "data_stream_detail",
5975 shape_version: 1,
5976 instance_format_version: None,
5977 kind: TypeKind::Struct,
5978 wire: true,
5979 },
5980 TypeContract {
5981 name: "component_template_summary",
5982 shape_version: 1,
5983 instance_format_version: None,
5984 kind: TypeKind::Struct,
5985 wire: true,
5986 },
5987 TypeContract {
5988 name: "component_template_detail",
5989 shape_version: 1,
5990 instance_format_version: None,
5991 kind: TypeKind::Struct,
5992 wire: true,
5993 },
5994 TypeContract {
5995 name: "index_template_summary",
5996 shape_version: 1,
5997 instance_format_version: None,
5998 kind: TypeKind::Struct,
5999 wire: true,
6000 },
6001 TypeContract {
6002 name: "index_template_detail",
6003 shape_version: 1,
6004 instance_format_version: None,
6005 kind: TypeKind::Struct,
6006 wire: true,
6007 },
6008 TypeContract {
6009 name: "ingest_pipeline_summary",
6010 shape_version: 1,
6011 instance_format_version: None,
6012 kind: TypeKind::Struct,
6013 wire: true,
6014 },
6015 TypeContract {
6016 name: "ingest_pipeline_detail",
6017 shape_version: 1,
6018 instance_format_version: None,
6019 kind: TypeKind::Struct,
6020 wire: true,
6021 },
6022 TypeContract {
6023 name: "ingest_pipeline_selection",
6024 shape_version: 1,
6025 instance_format_version: None,
6026 kind: TypeKind::Struct,
6027 wire: true,
6028 },
6029 TypeContract {
6030 name: "lifecycle_policy_summary",
6031 shape_version: 1,
6032 instance_format_version: None,
6033 kind: TypeKind::Struct,
6034 wire: true,
6035 },
6036 TypeContract {
6037 name: "rollover_thresholds",
6038 shape_version: 1,
6039 instance_format_version: None,
6040 kind: TypeKind::Struct,
6041 wire: true,
6042 },
6043 TypeContract {
6044 name: "retention_policy",
6045 shape_version: 1,
6046 instance_format_version: None,
6047 kind: TypeKind::Struct,
6048 wire: true,
6049 },
6050 TypeContract {
6051 name: "lifecycle_policy_detail",
6052 shape_version: 1,
6053 instance_format_version: None,
6054 kind: TypeKind::Struct,
6055 wire: true,
6056 },
6057 TypeContract {
6058 name: "text_query_operator",
6059 shape_version: 1,
6060 instance_format_version: None,
6061 kind: TypeKind::Enum,
6062 wire: true,
6063 },
6064 TypeContract {
6065 name: "text_query_analyzer",
6066 shape_version: 1,
6067 instance_format_version: None,
6068 kind: TypeKind::Enum,
6069 wire: true,
6070 },
6071 TypeContract {
6072 name: "zero_terms_query",
6073 shape_version: 1,
6074 instance_format_version: None,
6075 kind: TypeKind::Enum,
6076 wire: true,
6077 },
6078 TypeContract {
6079 name: "text_query_options",
6080 shape_version: 1,
6081 instance_format_version: None,
6082 kind: TypeKind::Struct,
6083 wire: true,
6084 },
6085 TypeContract {
6086 name: "multi_match_mode",
6087 shape_version: 1,
6088 instance_format_version: None,
6089 kind: TypeKind::Enum,
6090 wire: true,
6091 },
6092 TypeContract {
6093 name: "multi_match_field",
6094 shape_version: 1,
6095 instance_format_version: None,
6096 kind: TypeKind::Struct,
6097 wire: true,
6098 },
6099 TypeContract {
6100 name: "multi_match_options",
6101 shape_version: 1,
6102 instance_format_version: None,
6103 kind: TypeKind::Struct,
6104 wire: true,
6105 },
6106 TypeContract {
6107 name: "sort_order",
6108 shape_version: 1,
6109 instance_format_version: None,
6110 kind: TypeKind::Enum,
6111 wire: true,
6112 },
6113 TypeContract {
6114 name: "sort_mode",
6115 shape_version: 1,
6116 instance_format_version: None,
6117 kind: TypeKind::Enum,
6118 wire: true,
6119 },
6120 TypeContract {
6121 name: "missing_order",
6122 shape_version: 1,
6123 instance_format_version: None,
6124 kind: TypeKind::Enum,
6125 wire: true,
6126 },
6127 TypeContract {
6128 name: "nested_score_mode",
6129 shape_version: 1,
6130 instance_format_version: None,
6131 kind: TypeKind::Enum,
6132 wire: true,
6133 },
6134 TypeContract {
6135 name: "nested_inner_hits",
6136 shape_version: 1,
6137 instance_format_version: None,
6138 kind: TypeKind::Struct,
6139 wire: true,
6140 },
6141 TypeContract {
6142 name: "sort_spec",
6143 shape_version: 1,
6144 instance_format_version: None,
6145 kind: TypeKind::TaggedUnion,
6146 wire: true,
6147 },
6148 TypeContract {
6149 name: "query",
6150 shape_version: 1,
6151 instance_format_version: None,
6152 kind: TypeKind::TaggedUnion,
6153 wire: true,
6154 },
6155 TypeContract {
6156 name: "dense_retrieval_mode",
6157 shape_version: 1,
6158 instance_format_version: None,
6159 kind: TypeKind::Enum,
6160 wire: true,
6161 },
6162 TypeContract {
6163 name: "vector_achieved_mode",
6164 shape_version: 1,
6165 instance_format_version: None,
6166 kind: TypeKind::Enum,
6167 wire: true,
6168 },
6169 TypeContract {
6170 name: "vector_branch_diagnostics",
6171 shape_version: 2,
6172 instance_format_version: None,
6173 kind: TypeKind::Struct,
6174 wire: true,
6175 },
6176 TypeContract {
6177 name: "dense_vector_element_type",
6178 shape_version: 1,
6179 instance_format_version: None,
6180 kind: TypeKind::Enum,
6181 wire: true,
6182 },
6183 TypeContract {
6184 name: "dense_vector_byte_order",
6185 shape_version: 1,
6186 instance_format_version: None,
6187 kind: TypeKind::Enum,
6188 wire: true,
6189 },
6190 TypeContract {
6191 name: "vector_value",
6192 shape_version: 1,
6193 instance_format_version: None,
6194 kind: TypeKind::TaggedUnion,
6195 wire: true,
6196 },
6197 TypeContract {
6198 name: "sparse_vector_entry",
6199 shape_version: 1,
6200 instance_format_version: None,
6201 kind: TypeKind::Struct,
6202 wire: true,
6203 },
6204 TypeContract {
6205 name: "sparse_vector_value",
6206 shape_version: 1,
6207 instance_format_version: None,
6208 kind: TypeKind::Struct,
6209 wire: true,
6210 },
6211 TypeContract {
6212 name: "vector_set_value",
6213 shape_version: 1,
6214 instance_format_version: None,
6215 kind: TypeKind::Struct,
6216 wire: true,
6217 },
6218 TypeContract {
6219 name: "vector_evaluation_snapshot",
6220 shape_version: 1,
6221 instance_format_version: None,
6222 kind: TypeKind::TaggedUnion,
6223 wire: true,
6224 },
6225 TypeContract {
6226 name: "vector_evaluation_query_set",
6227 shape_version: 1,
6228 instance_format_version: None,
6229 kind: TypeKind::TaggedUnion,
6230 wire: true,
6231 },
6232 TypeContract {
6233 name: "vector_evaluation_budget",
6234 shape_version: 1,
6235 instance_format_version: None,
6236 kind: TypeKind::Struct,
6237 wire: true,
6238 },
6239 TypeContract {
6240 name: "vector_candidate_policy",
6241 shape_version: 1,
6242 instance_format_version: None,
6243 kind: TypeKind::Enum,
6244 wire: true,
6245 },
6246 TypeContract {
6247 name: "vector_calibration_objective",
6248 shape_version: 1,
6249 instance_format_version: None,
6250 kind: TypeKind::Enum,
6251 wire: true,
6252 },
6253 TypeContract {
6254 name: "vector_strategy_profile",
6255 shape_version: 1,
6256 instance_format_version: None,
6257 kind: TypeKind::Enum,
6258 wire: true,
6259 },
6260 TypeContract {
6261 name: "vector_evaluation_work",
6262 shape_version: 1,
6263 instance_format_version: None,
6264 kind: TypeKind::Struct,
6265 wire: true,
6266 },
6267 TypeContract {
6268 name: "vector_evaluation_error_code",
6269 shape_version: 1,
6270 instance_format_version: None,
6271 kind: TypeKind::Enum,
6272 wire: true,
6273 },
6274 TypeContract {
6275 name: "vector_evaluation_error",
6276 shape_version: 1,
6277 instance_format_version: None,
6278 kind: TypeKind::Struct,
6279 wire: true,
6280 },
6281 TypeContract {
6282 name: "vector_recall_result",
6283 shape_version: 1,
6284 instance_format_version: Some(1),
6285 kind: TypeKind::Struct,
6286 wire: true,
6287 },
6288 TypeContract {
6289 name: "vector_calibration_candidate",
6290 shape_version: 1,
6291 instance_format_version: None,
6292 kind: TypeKind::Struct,
6293 wire: true,
6294 },
6295 TypeContract {
6296 name: "vector_calibration_result",
6297 shape_version: 1,
6298 instance_format_version: Some(1),
6299 kind: TypeKind::Struct,
6300 wire: true,
6301 },
6302 TypeContract {
6303 name: "vector_diagnostic_result",
6304 shape_version: 1,
6305 instance_format_version: None,
6306 kind: TypeKind::TaggedUnion,
6307 wire: true,
6308 },
6309 TypeContract {
6310 name: "vector_warm_component",
6311 shape_version: 1,
6312 instance_format_version: None,
6313 kind: TypeKind::Enum,
6314 wire: true,
6315 },
6316 TypeContract {
6317 name: "vector_warm_state",
6318 shape_version: 1,
6319 instance_format_version: None,
6320 kind: TypeKind::Enum,
6321 wire: true,
6322 },
6323 TypeContract {
6324 name: "vector_warm_achievement",
6325 shape_version: 1,
6326 instance_format_version: None,
6327 kind: TypeKind::Struct,
6328 wire: true,
6329 },
6330 TypeContract {
6331 name: "vector_warm_result",
6332 shape_version: 1,
6333 instance_format_version: Some(1),
6334 kind: TypeKind::Struct,
6335 wire: true,
6336 },
6337 TypeContract {
6338 name: "dense_retrieval_threshold",
6339 shape_version: 1,
6340 instance_format_version: None,
6341 kind: TypeKind::TaggedUnion,
6342 wire: true,
6343 },
6344 TypeContract {
6345 name: "retrieval_branch",
6346 shape_version: 3,
6347 instance_format_version: None,
6348 kind: TypeKind::TaggedUnion,
6349 wire: true,
6350 },
6351 TypeContract {
6352 name: "weighted_rrf_fusion",
6353 shape_version: 1,
6354 instance_format_version: None,
6355 kind: TypeKind::Struct,
6356 wire: true,
6357 },
6358 TypeContract {
6359 name: "retrieval_plan",
6360 shape_version: 1,
6361 instance_format_version: Some(1),
6362 kind: TypeKind::Struct,
6363 wire: true,
6364 },
6365 TypeContract {
6366 name: "histogram_bounds",
6367 shape_version: 1,
6368 instance_format_version: None,
6369 kind: TypeKind::Struct,
6370 wire: true,
6371 },
6372 TypeContract {
6373 name: "date_histogram_bounds",
6374 shape_version: 1,
6375 instance_format_version: None,
6376 kind: TypeKind::Struct,
6377 wire: true,
6378 },
6379 TypeContract {
6380 name: "approximation_algorithm",
6381 shape_version: 1,
6382 instance_format_version: None,
6383 kind: TypeKind::Enum,
6384 wire: true,
6385 },
6386 TypeContract {
6387 name: "approximation",
6388 shape_version: 1,
6389 instance_format_version: None,
6390 kind: TypeKind::Struct,
6391 wire: true,
6392 },
6393 TypeContract {
6394 name: "percentile_value",
6395 shape_version: 1,
6396 instance_format_version: None,
6397 kind: TypeKind::Struct,
6398 wire: true,
6399 },
6400 TypeContract {
6401 name: "approximate_percentile_value",
6402 shape_version: 1,
6403 instance_format_version: None,
6404 kind: TypeKind::Struct,
6405 wire: true,
6406 },
6407 TypeContract {
6408 name: "time_series_operator",
6409 shape_version: 1,
6410 instance_format_version: None,
6411 kind: TypeKind::Enum,
6412 wire: true,
6413 },
6414 TypeContract {
6415 name: "time_series_missing_data",
6416 shape_version: 1,
6417 instance_format_version: None,
6418 kind: TypeKind::Enum,
6419 wire: true,
6420 },
6421 TypeContract {
6422 name: "time_series_quantile_mode",
6423 shape_version: 1,
6424 instance_format_version: None,
6425 kind: TypeKind::Enum,
6426 wire: true,
6427 },
6428 TypeContract {
6429 name: "time_series_bucket_state",
6430 shape_version: 1,
6431 instance_format_version: None,
6432 kind: TypeKind::Enum,
6433 wire: true,
6434 },
6435 TypeContract {
6436 name: "time_series_quantile_value",
6437 shape_version: 1,
6438 instance_format_version: None,
6439 kind: TypeKind::Struct,
6440 wire: true,
6441 },
6442 TypeContract {
6443 name: "time_series_value",
6444 shape_version: 1,
6445 instance_format_version: None,
6446 kind: TypeKind::TaggedUnion,
6447 wire: true,
6448 },
6449 TypeContract {
6450 name: "time_series_bucket",
6451 shape_version: 1,
6452 instance_format_version: None,
6453 kind: TypeKind::Struct,
6454 wire: true,
6455 },
6456 TypeContract {
6457 name: "relationship_traversal_direction",
6458 shape_version: 1,
6459 instance_format_version: None,
6460 kind: TypeKind::Enum,
6461 wire: true,
6462 },
6463 TypeContract {
6464 name: "relationship_traversal_filter",
6465 shape_version: 1,
6466 instance_format_version: None,
6467 kind: TypeKind::Struct,
6468 wire: true,
6469 },
6470 TypeContract {
6471 name: "relationship_traversal_budget",
6472 shape_version: 1,
6473 instance_format_version: None,
6474 kind: TypeKind::Struct,
6475 wire: true,
6476 },
6477 TypeContract {
6478 name: "traversed_relationship",
6479 shape_version: 1,
6480 instance_format_version: None,
6481 kind: TypeKind::Struct,
6482 wire: true,
6483 },
6484 TypeContract {
6485 name: "profile_query_operation",
6486 shape_version: 1,
6487 instance_format_version: None,
6488 kind: TypeKind::Enum,
6489 wire: true,
6490 },
6491 TypeContract {
6492 name: "profile_group_by",
6493 shape_version: 1,
6494 instance_format_version: None,
6495 kind: TypeKind::TaggedUnion,
6496 wire: true,
6497 },
6498 TypeContract {
6499 name: "profile_query_filter",
6500 shape_version: 1,
6501 instance_format_version: None,
6502 kind: TypeKind::Struct,
6503 wire: true,
6504 },
6505 TypeContract {
6506 name: "profile_query_budget",
6507 shape_version: 1,
6508 instance_format_version: None,
6509 kind: TypeKind::Struct,
6510 wire: true,
6511 },
6512 TypeContract {
6513 name: "profile_query_row",
6514 shape_version: 1,
6515 instance_format_version: None,
6516 kind: TypeKind::Struct,
6517 wire: true,
6518 },
6519 TypeContract {
6520 name: "temporal_input",
6521 shape_version: 1,
6522 instance_format_version: None,
6523 kind: TypeKind::Struct,
6524 wire: true,
6525 },
6526 TypeContract {
6527 name: "temporal_pattern",
6528 shape_version: 1,
6529 instance_format_version: None,
6530 kind: TypeKind::TaggedUnion,
6531 wire: true,
6532 },
6533 TypeContract {
6534 name: "historical_temporal_definition",
6535 shape_version: 1,
6536 instance_format_version: Some(1),
6537 kind: TypeKind::Struct,
6538 wire: true,
6539 },
6540 TypeContract {
6541 name: "temporal_evidence_status",
6542 shape_version: 2,
6543 instance_format_version: None,
6544 kind: TypeKind::Enum,
6545 wire: true,
6546 },
6547 TypeContract {
6548 name: "temporal_source_event",
6549 shape_version: 1,
6550 instance_format_version: None,
6551 kind: TypeKind::Struct,
6552 wire: true,
6553 },
6554 TypeContract {
6555 name: "temporal_evidence",
6556 shape_version: 2,
6557 instance_format_version: None,
6558 kind: TypeKind::Struct,
6559 wire: true,
6560 },
6561 TypeContract {
6562 name: "continuous_temporal_start",
6563 shape_version: 1,
6564 instance_format_version: None,
6565 kind: TypeKind::TaggedUnion,
6566 wire: true,
6567 },
6568 TypeContract {
6569 name: "continuous_temporal_watermark_policy",
6570 shape_version: 1,
6571 instance_format_version: None,
6572 kind: TypeKind::TaggedUnion,
6573 wire: true,
6574 },
6575 TypeContract {
6576 name: "continuous_temporal_late_data_policy",
6577 shape_version: 1,
6578 instance_format_version: None,
6579 kind: TypeKind::TaggedUnion,
6580 wire: true,
6581 },
6582 TypeContract {
6583 name: "continuous_temporal_output",
6584 shape_version: 1,
6585 instance_format_version: None,
6586 kind: TypeKind::TaggedUnion,
6587 wire: true,
6588 },
6589 TypeContract {
6590 name: "continuous_temporal_definition",
6591 shape_version: 1,
6592 instance_format_version: Some(1),
6593 kind: TypeKind::Struct,
6594 wire: true,
6595 },
6596 TypeContract {
6597 name: "continuous_temporal_frontier",
6598 shape_version: 1,
6599 instance_format_version: None,
6600 kind: TypeKind::Struct,
6601 wire: true,
6602 },
6603 TypeContract {
6604 name: "continuous_temporal_available_frontier",
6605 shape_version: 1,
6606 instance_format_version: None,
6607 kind: TypeKind::Struct,
6608 wire: true,
6609 },
6610 TypeContract {
6611 name: "continuous_temporal_gap_reason",
6612 shape_version: 1,
6613 instance_format_version: None,
6614 kind: TypeKind::Enum,
6615 wire: true,
6616 },
6617 TypeContract {
6618 name: "continuous_temporal_gap",
6619 shape_version: 1,
6620 instance_format_version: None,
6621 kind: TypeKind::Struct,
6622 wire: true,
6623 },
6624 TypeContract {
6625 name: "continuous_temporal_evaluation",
6626 shape_version: 1,
6627 instance_format_version: Some(1),
6628 kind: TypeKind::Struct,
6629 wire: true,
6630 },
6631 TypeContract {
6632 name: "composite_order",
6633 shape_version: 1,
6634 instance_format_version: None,
6635 kind: TypeKind::Enum,
6636 wire: true,
6637 },
6638 TypeContract {
6639 name: "composite_source",
6640 shape_version: 1,
6641 instance_format_version: None,
6642 kind: TypeKind::TaggedUnion,
6643 wire: true,
6644 },
6645 TypeContract {
6646 name: "aggregation",
6647 shape_version: 3,
6648 instance_format_version: None,
6649 kind: TypeKind::TaggedUnion,
6650 wire: true,
6651 },
6652 TypeContract {
6653 name: "nested_search_hit",
6654 shape_version: 2,
6655 instance_format_version: None,
6656 kind: TypeKind::Struct,
6657 wire: true,
6658 },
6659 TypeContract {
6660 name: "named_nested_inner_hits_result",
6661 shape_version: 1,
6662 instance_format_version: None,
6663 kind: TypeKind::Struct,
6664 wire: true,
6665 },
6666 TypeContract {
6667 name: "fragment_boundary",
6668 shape_version: 1,
6669 instance_format_version: None,
6670 kind: TypeKind::Enum,
6671 wire: true,
6672 },
6673 TypeContract {
6674 name: "fragment_offset_encoding",
6675 shape_version: 1,
6676 instance_format_version: None,
6677 kind: TypeKind::Enum,
6678 wire: true,
6679 },
6680 TypeContract {
6681 name: "fragment_ranker",
6682 shape_version: 1,
6683 instance_format_version: None,
6684 kind: TypeKind::Enum,
6685 wire: true,
6686 },
6687 TypeContract {
6688 name: "fragment_request",
6689 shape_version: 1,
6690 instance_format_version: None,
6691 kind: TypeKind::Struct,
6692 wire: true,
6693 },
6694 TypeContract {
6695 name: "search_fragment",
6696 shape_version: 1,
6697 instance_format_version: None,
6698 kind: TypeKind::Struct,
6699 wire: true,
6700 },
6701 TypeContract {
6702 name: "numeric_feature_transform",
6703 shape_version: 1,
6704 instance_format_version: None,
6705 kind: TypeKind::TaggedUnion,
6706 wire: true,
6707 },
6708 TypeContract {
6709 name: "numeric_result_feature",
6710 shape_version: 1,
6711 instance_format_version: None,
6712 kind: TypeKind::Struct,
6713 wire: true,
6714 },
6715 TypeContract {
6716 name: "result_feature_request",
6717 shape_version: 1,
6718 instance_format_version: None,
6719 kind: TypeKind::Struct,
6720 wire: true,
6721 },
6722 TypeContract {
6723 name: "result_diversification",
6724 shape_version: 1,
6725 instance_format_version: None,
6726 kind: TypeKind::Struct,
6727 wire: true,
6728 },
6729 TypeContract {
6730 name: "source_projection",
6731 shape_version: 1,
6732 instance_format_version: None,
6733 kind: TypeKind::TaggedUnion,
6734 wire: true,
6735 },
6736 TypeContract {
6737 name: "branch_score_kind",
6738 shape_version: 2,
6739 instance_format_version: None,
6740 kind: TypeKind::Enum,
6741 wire: true,
6742 },
6743 TypeContract {
6744 name: "result_feature",
6745 shape_version: 1,
6746 instance_format_version: None,
6747 kind: TypeKind::TaggedUnion,
6748 wire: true,
6749 },
6750 TypeContract {
6751 name: "search_hit",
6752 shape_version: 2,
6753 instance_format_version: None,
6754 kind: TypeKind::Struct,
6755 wire: true,
6756 },
6757 TypeContract {
6758 name: "aggregation_bucket",
6759 shape_version: 1,
6760 instance_format_version: None,
6761 kind: TypeKind::Struct,
6762 wire: true,
6763 },
6764 TypeContract {
6765 name: "aggregation_result",
6766 shape_version: 3,
6767 instance_format_version: None,
6768 kind: TypeKind::TaggedUnion,
6769 wire: true,
6770 },
6771 TypeContract {
6772 name: "shard_counts",
6773 shape_version: 1,
6774 instance_format_version: None,
6775 kind: TypeKind::Struct,
6776 wire: true,
6777 },
6778 TypeContract {
6779 name: "total_hits_relation",
6780 shape_version: 1,
6781 instance_format_version: None,
6782 kind: TypeKind::Enum,
6783 wire: true,
6784 },
6785 TypeContract {
6786 name: "search_total",
6787 shape_version: 1,
6788 instance_format_version: None,
6789 kind: TypeKind::Struct,
6790 wire: true,
6791 },
6792 TypeContract {
6793 name: "search_execution_freshness",
6794 shape_version: 1,
6795 instance_format_version: None,
6796 kind: TypeKind::Enum,
6797 wire: true,
6798 },
6799 TypeContract {
6800 name: "search_freshness",
6801 shape_version: 1,
6802 instance_format_version: None,
6803 kind: TypeKind::Enum,
6804 wire: true,
6805 },
6806 TypeContract {
6807 name: "search_degradation_reason",
6808 shape_version: 1,
6809 instance_format_version: None,
6810 kind: TypeKind::Enum,
6811 wire: true,
6812 },
6813 TypeContract {
6814 name: "search_achievement",
6815 shape_version: 1,
6816 instance_format_version: None,
6817 kind: TypeKind::Struct,
6818 wire: true,
6819 },
6820 TypeContract {
6821 name: "search_failure_stage",
6822 shape_version: 1,
6823 instance_format_version: None,
6824 kind: TypeKind::Enum,
6825 wire: true,
6826 },
6827 TypeContract {
6828 name: "search_failure_reason",
6829 shape_version: 1,
6830 instance_format_version: None,
6831 kind: TypeKind::Enum,
6832 wire: true,
6833 },
6834 TypeContract {
6835 name: "collection_shard",
6836 shape_version: 1,
6837 instance_format_version: None,
6838 kind: TypeKind::Struct,
6839 wire: true,
6840 },
6841 TypeContract {
6842 name: "search_partial_failure",
6843 shape_version: 1,
6844 instance_format_version: None,
6845 kind: TypeKind::Struct,
6846 wire: true,
6847 },
6848 TypeContract {
6849 name: "artifact",
6850 shape_version: 1,
6851 instance_format_version: None,
6852 kind: TypeKind::Struct,
6853 wire: true,
6854 },
6855 TypeContract {
6856 name: "portability_storage_capability",
6857 shape_version: 1,
6858 instance_format_version: None,
6859 kind: TypeKind::Struct,
6860 wire: true,
6861 },
6862 TypeContract {
6863 name: "collection_export_artifact",
6864 shape_version: 1,
6865 instance_format_version: None,
6866 kind: TypeKind::Struct,
6867 wire: true,
6868 },
6869 TypeContract {
6870 name: "portability_key_capability_reference_state",
6871 shape_version: 1,
6872 instance_format_version: None,
6873 kind: TypeKind::Enum,
6874 wire: true,
6875 },
6876 TypeContract {
6877 name: "collection_export_retirement",
6878 shape_version: 1,
6879 instance_format_version: None,
6880 kind: TypeKind::Struct,
6881 wire: true,
6882 },
6883 TypeContract {
6884 name: "index_transfer_page",
6885 shape_version: 1,
6886 instance_format_version: None,
6887 kind: TypeKind::Struct,
6888 wire: true,
6889 },
6890 TypeContract {
6891 name: "index_transfer_artifact",
6892 shape_version: 1,
6893 instance_format_version: None,
6894 kind: TypeKind::Struct,
6895 wire: true,
6896 },
6897 TypeContract {
6898 name: "search_validation_bound",
6899 shape_version: 1,
6900 instance_format_version: None,
6901 kind: TypeKind::TaggedUnion,
6902 wire: true,
6903 },
6904 TypeContract {
6905 name: "search_validation_estimates",
6906 shape_version: 1,
6907 instance_format_version: None,
6908 kind: TypeKind::Struct,
6909 wire: true,
6910 },
6911 TypeContract {
6912 name: "search_validation_limit",
6913 shape_version: 1,
6914 instance_format_version: None,
6915 kind: TypeKind::Struct,
6916 wire: true,
6917 },
6918 TypeContract {
6919 name: "operation_kind",
6920 shape_version: 3,
6921 instance_format_version: None,
6922 kind: TypeKind::Enum,
6923 wire: true,
6924 },
6925 TypeContract {
6926 name: "operation_authority",
6927 shape_version: 1,
6928 instance_format_version: None,
6929 kind: TypeKind::Enum,
6930 wire: true,
6931 },
6932 TypeContract {
6933 name: "operation_target",
6934 shape_version: 1,
6935 instance_format_version: None,
6936 kind: TypeKind::TaggedUnion,
6937 wire: true,
6938 },
6939 TypeContract {
6940 name: "operation_state",
6941 shape_version: 1,
6942 instance_format_version: None,
6943 kind: TypeKind::Enum,
6944 wire: true,
6945 },
6946 TypeContract {
6947 name: "operation_pending_state",
6948 shape_version: 1,
6949 instance_format_version: None,
6950 kind: TypeKind::Enum,
6951 wire: true,
6952 },
6953 TypeContract {
6954 name: "operation_progress_unit",
6955 shape_version: 1,
6956 instance_format_version: None,
6957 kind: TypeKind::Enum,
6958 wire: true,
6959 },
6960 TypeContract {
6961 name: "operation_progress",
6962 shape_version: 1,
6963 instance_format_version: None,
6964 kind: TypeKind::Struct,
6965 wire: true,
6966 },
6967 TypeContract {
6968 name: "operation_result",
6969 shape_version: 1,
6970 instance_format_version: None,
6971 kind: TypeKind::TaggedUnion,
6972 wire: true,
6973 },
6974 TypeContract {
6975 name: "operation_failure",
6976 shape_version: 1,
6977 instance_format_version: None,
6978 kind: TypeKind::Struct,
6979 wire: true,
6980 },
6981 TypeContract {
6982 name: "operation_cancellation",
6983 shape_version: 1,
6984 instance_format_version: None,
6985 kind: TypeKind::Enum,
6986 wire: true,
6987 },
6988 TypeContract {
6989 name: "operation_retention_state",
6990 shape_version: 1,
6991 instance_format_version: None,
6992 kind: TypeKind::Enum,
6993 wire: true,
6994 },
6995 TypeContract {
6996 name: "operation_retention",
6997 shape_version: 1,
6998 instance_format_version: None,
6999 kind: TypeKind::Struct,
7000 wire: true,
7001 },
7002 TypeContract {
7003 name: "operation",
7004 shape_version: 2,
7005 instance_format_version: None,
7006 kind: TypeKind::Struct,
7007 wire: true,
7008 },
7009 TypeContract {
7010 name: "write_durability_boundary",
7011 shape_version: 1,
7012 instance_format_version: None,
7013 kind: TypeKind::Enum,
7014 wire: true,
7015 },
7016 TypeContract {
7017 name: "write_visibility_mode",
7018 shape_version: 1,
7019 instance_format_version: None,
7020 kind: TypeKind::Enum,
7021 wire: true,
7022 },
7023 TypeContract {
7024 name: "write_response_stage",
7025 shape_version: 1,
7026 instance_format_version: None,
7027 kind: TypeKind::Enum,
7028 wire: true,
7029 },
7030 TypeContract {
7031 name: "write_achievement",
7032 shape_version: 1,
7033 instance_format_version: None,
7034 kind: TypeKind::Struct,
7035 wire: true,
7036 },
7037 TypeContract {
7038 name: "mutation_commit_position",
7039 shape_version: 1,
7040 instance_format_version: None,
7041 kind: TypeKind::Struct,
7042 wire: true,
7043 },
7044 TypeContract {
7045 name: "mutation_commit_receipt",
7046 shape_version: 1,
7047 instance_format_version: Some(1),
7048 kind: TypeKind::Struct,
7049 wire: true,
7050 },
7051 TypeContract {
7052 name: "mutation_resolver",
7053 shape_version: 1,
7054 instance_format_version: None,
7055 kind: TypeKind::Enum,
7056 wire: true,
7057 },
7058 TypeContract {
7059 name: "mutation_outcome",
7060 shape_version: 1,
7061 instance_format_version: None,
7062 kind: TypeKind::TaggedUnion,
7063 wire: true,
7064 },
7065 TypeContract {
7066 name: "submission_state",
7067 shape_version: 1,
7068 instance_format_version: None,
7069 kind: TypeKind::Enum,
7070 wire: true,
7071 },
7072 TypeContract {
7073 name: "expected_binding",
7074 shape_version: 1,
7075 instance_format_version: None,
7076 kind: TypeKind::Struct,
7077 wire: true,
7078 },
7079 TypeContract {
7080 name: "administration_alias_action",
7081 shape_version: 1,
7082 instance_format_version: None,
7083 kind: TypeKind::TaggedUnion,
7084 wire: true,
7085 },
7086 TypeContract {
7087 name: "administration_mutation",
7088 shape_version: 1,
7089 instance_format_version: None,
7090 kind: TypeKind::TaggedUnion,
7091 wire: true,
7092 },
7093 TypeContract {
7094 name: "administration_outcome",
7095 shape_version: 1,
7096 instance_format_version: None,
7097 kind: TypeKind::Struct,
7098 wire: true,
7099 },
7100 TypeContract {
7101 name: "index_change_apply_receipt",
7102 shape_version: 1,
7103 instance_format_version: None,
7104 kind: TypeKind::Struct,
7105 wire: true,
7106 },
7107 TypeContract {
7108 name: "bulk_document_item",
7109 shape_version: 2,
7110 instance_format_version: None,
7111 kind: TypeKind::Struct,
7112 wire: true,
7113 },
7114 TypeContract {
7115 name: "bulk_document_item_outcome",
7116 shape_version: 1,
7117 instance_format_version: None,
7118 kind: TypeKind::Struct,
7119 wire: true,
7120 },
7121 TypeContract {
7122 name: "bulk_document_outcome",
7123 shape_version: 1,
7124 instance_format_version: None,
7125 kind: TypeKind::Struct,
7126 wire: true,
7127 },
7128 TypeContract {
7129 name: "metric_attribute_value",
7130 shape_version: 1,
7131 instance_format_version: None,
7132 kind: TypeKind::TaggedUnion,
7133 wire: true,
7134 },
7135 TypeContract {
7136 name: "metric_attribute",
7137 shape_version: 1,
7138 instance_format_version: None,
7139 kind: TypeKind::Struct,
7140 wire: true,
7141 },
7142 TypeContract {
7143 name: "metric_number",
7144 shape_version: 1,
7145 instance_format_version: None,
7146 kind: TypeKind::TaggedUnion,
7147 wire: true,
7148 },
7149 TypeContract {
7150 name: "metric_temporality",
7151 shape_version: 1,
7152 instance_format_version: None,
7153 kind: TypeKind::Enum,
7154 wire: true,
7155 },
7156 TypeContract {
7157 name: "metric_point_kind",
7158 shape_version: 1,
7159 instance_format_version: None,
7160 kind: TypeKind::Enum,
7161 wire: true,
7162 },
7163 TypeContract {
7164 name: "metric_exponential_buckets",
7165 shape_version: 1,
7166 instance_format_version: None,
7167 kind: TypeKind::Struct,
7168 wire: true,
7169 },
7170 TypeContract {
7171 name: "metric_data",
7172 shape_version: 1,
7173 instance_format_version: None,
7174 kind: TypeKind::TaggedUnion,
7175 wire: true,
7176 },
7177 TypeContract {
7178 name: "metric_instrumentation_scope",
7179 shape_version: 1,
7180 instance_format_version: None,
7181 kind: TypeKind::Struct,
7182 wire: true,
7183 },
7184 TypeContract {
7185 name: "metric_exemplar",
7186 shape_version: 1,
7187 instance_format_version: None,
7188 kind: TypeKind::Struct,
7189 wire: true,
7190 },
7191 TypeContract {
7192 name: "metric_point",
7193 shape_version: 1,
7194 instance_format_version: Some(1),
7195 kind: TypeKind::Struct,
7196 wire: true,
7197 },
7198 TypeContract {
7199 name: "entity_ref",
7200 shape_version: 1,
7201 instance_format_version: None,
7202 kind: TypeKind::Struct,
7203 wire: true,
7204 },
7205 TypeContract {
7206 name: "relationship_evidence_ref",
7207 shape_version: 1,
7208 instance_format_version: None,
7209 kind: TypeKind::Struct,
7210 wire: true,
7211 },
7212 TypeContract {
7213 name: "relationship_directionality",
7214 shape_version: 1,
7215 instance_format_version: None,
7216 kind: TypeKind::Enum,
7217 wire: true,
7218 },
7219 TypeContract {
7220 name: "relationship_record",
7221 shape_version: 1,
7222 instance_format_version: Some(1),
7223 kind: TypeKind::Struct,
7224 wire: true,
7225 },
7226 TypeContract {
7227 name: "profile_label",
7228 shape_version: 1,
7229 instance_format_version: None,
7230 kind: TypeKind::Struct,
7231 wire: true,
7232 },
7233 TypeContract {
7234 name: "profile_sample_type",
7235 shape_version: 1,
7236 instance_format_version: None,
7237 kind: TypeKind::Struct,
7238 wire: true,
7239 },
7240 TypeContract {
7241 name: "profile_mapping",
7242 shape_version: 1,
7243 instance_format_version: None,
7244 kind: TypeKind::Struct,
7245 wire: true,
7246 },
7247 TypeContract {
7248 name: "profile_function",
7249 shape_version: 1,
7250 instance_format_version: None,
7251 kind: TypeKind::Struct,
7252 wire: true,
7253 },
7254 TypeContract {
7255 name: "profile_line",
7256 shape_version: 1,
7257 instance_format_version: None,
7258 kind: TypeKind::Struct,
7259 wire: true,
7260 },
7261 TypeContract {
7262 name: "profile_location",
7263 shape_version: 1,
7264 instance_format_version: None,
7265 kind: TypeKind::Struct,
7266 wire: true,
7267 },
7268 TypeContract {
7269 name: "profile_stack",
7270 shape_version: 1,
7271 instance_format_version: None,
7272 kind: TypeKind::Struct,
7273 wire: true,
7274 },
7275 TypeContract {
7276 name: "profile_sample",
7277 shape_version: 1,
7278 instance_format_version: None,
7279 kind: TypeKind::Struct,
7280 wire: true,
7281 },
7282 TypeContract {
7283 name: "profile_instrumentation_scope",
7284 shape_version: 1,
7285 instance_format_version: None,
7286 kind: TypeKind::Struct,
7287 wire: true,
7288 },
7289 TypeContract {
7290 name: "profile_batch",
7291 shape_version: 1,
7292 instance_format_version: Some(1),
7293 kind: TypeKind::Struct,
7294 wire: true,
7295 },
7296 TypeContract {
7297 name: "native_record",
7298 shape_version: 3,
7299 instance_format_version: None,
7300 kind: TypeKind::TaggedUnion,
7301 wire: true,
7302 },
7303 TypeContract {
7304 name: "retained_append_item",
7305 shape_version: 4,
7306 instance_format_version: None,
7307 kind: TypeKind::Struct,
7308 wire: true,
7309 },
7310 TypeContract {
7311 name: "retained_append_state",
7312 shape_version: 1,
7313 instance_format_version: None,
7314 kind: TypeKind::Enum,
7315 wire: true,
7316 },
7317 TypeContract {
7318 name: "retained_append_retry_safety",
7319 shape_version: 1,
7320 instance_format_version: None,
7321 kind: TypeKind::Enum,
7322 wire: true,
7323 },
7324 TypeContract {
7325 name: "retained_append_item_outcome",
7326 shape_version: 1,
7327 instance_format_version: None,
7328 kind: TypeKind::Struct,
7329 wire: true,
7330 },
7331 TypeContract {
7332 name: "retained_append_bulk_outcome",
7333 shape_version: 1,
7334 instance_format_version: None,
7335 kind: TypeKind::Struct,
7336 wire: true,
7337 },
7338 TypeContract {
7339 name: "retained_append_observation_state",
7340 shape_version: 1,
7341 instance_format_version: None,
7342 kind: TypeKind::Enum,
7343 wire: true,
7344 },
7345 TypeContract {
7346 name: "retained_append_observation_outcome",
7347 shape_version: 1,
7348 instance_format_version: None,
7349 kind: TypeKind::Struct,
7350 wire: true,
7351 },
7352 TypeContract {
7353 name: "binary_value",
7354 shape_version: 1,
7355 instance_format_version: None,
7356 kind: TypeKind::Struct,
7357 wire: true,
7358 },
7359 TypeContract {
7360 name: "state_hash_field",
7361 shape_version: 1,
7362 instance_format_version: None,
7363 kind: TypeKind::Struct,
7364 wire: true,
7365 },
7366 TypeContract {
7367 name: "state_set_entry",
7368 shape_version: 1,
7369 instance_format_version: None,
7370 kind: TypeKind::Struct,
7371 wire: true,
7372 },
7373 TypeContract {
7374 name: "state_set_condition",
7375 shape_version: 1,
7376 instance_format_version: None,
7377 kind: TypeKind::Enum,
7378 wire: true,
7379 },
7380 TypeContract {
7381 name: "state_operation",
7382 shape_version: 1,
7383 instance_format_version: None,
7384 kind: TypeKind::TaggedUnion,
7385 wire: true,
7386 },
7387 TypeContract {
7388 name: "state_optional_value",
7389 shape_version: 1,
7390 instance_format_version: None,
7391 kind: TypeKind::TaggedUnion,
7392 wire: true,
7393 },
7394 TypeContract {
7395 name: "state_command_result",
7396 shape_version: 1,
7397 instance_format_version: None,
7398 kind: TypeKind::TaggedUnion,
7399 wire: true,
7400 },
7401 TypeContract {
7402 name: "state_write_resolution",
7403 shape_version: 1,
7404 instance_format_version: None,
7405 kind: TypeKind::TaggedUnion,
7406 wire: true,
7407 },
7408 TypeContract {
7409 name: "service_credential_reservation",
7410 shape_version: 1,
7411 instance_format_version: None,
7412 kind: TypeKind::Struct,
7413 wire: true,
7414 },
7415 TypeContract {
7416 name: "subscription_metadata_field",
7417 shape_version: 1,
7418 instance_format_version: None,
7419 kind: TypeKind::Enum,
7420 wire: true,
7421 },
7422 TypeContract {
7423 name: "subscription_field",
7424 shape_version: 1,
7425 instance_format_version: None,
7426 kind: TypeKind::TaggedUnion,
7427 wire: true,
7428 },
7429 TypeContract {
7430 name: "subscription_filter",
7431 shape_version: 1,
7432 instance_format_version: None,
7433 kind: TypeKind::TaggedUnion,
7434 wire: true,
7435 },
7436 TypeContract {
7437 name: "subscription_cursor_entry",
7438 shape_version: 1,
7439 instance_format_version: None,
7440 kind: TypeKind::Struct,
7441 wire: true,
7442 },
7443 TypeContract {
7444 name: "subscription_route",
7445 shape_version: 1,
7446 instance_format_version: None,
7447 kind: TypeKind::Struct,
7448 wire: true,
7449 },
7450 TypeContract {
7451 name: "subscription_start_position",
7452 shape_version: 1,
7453 instance_format_version: None,
7454 kind: TypeKind::TaggedUnion,
7455 wire: true,
7456 },
7457 TypeContract {
7458 name: "subscription_start",
7459 shape_version: 1,
7460 instance_format_version: Some(1),
7461 kind: TypeKind::Struct,
7462 wire: true,
7463 },
7464 TypeContract {
7465 name: "subscription_accepted",
7466 shape_version: 1,
7467 instance_format_version: Some(1),
7468 kind: TypeKind::Struct,
7469 wire: true,
7470 },
7471 TypeContract {
7472 name: "subscription_writer_fence",
7473 shape_version: 1,
7474 instance_format_version: None,
7475 kind: TypeKind::Struct,
7476 wire: true,
7477 },
7478 TypeContract {
7479 name: "subscription_event",
7480 shape_version: 1,
7481 instance_format_version: Some(1),
7482 kind: TypeKind::Struct,
7483 wire: true,
7484 },
7485 TypeContract {
7486 name: "subscription_heartbeat",
7487 shape_version: 1,
7488 instance_format_version: Some(1),
7489 kind: TypeKind::Struct,
7490 wire: true,
7491 },
7492 TypeContract {
7493 name: "subscription_gap",
7494 shape_version: 1,
7495 instance_format_version: Some(1),
7496 kind: TypeKind::Struct,
7497 wire: true,
7498 },
7499 TypeContract {
7500 name: "subscription_terminal_reason",
7501 shape_version: 1,
7502 instance_format_version: None,
7503 kind: TypeKind::Enum,
7504 wire: true,
7505 },
7506 TypeContract {
7507 name: "subscription_terminal",
7508 shape_version: 2,
7509 instance_format_version: Some(2),
7510 kind: TypeKind::Struct,
7511 wire: true,
7512 },
7513 TypeContract {
7514 name: "subscription_frame",
7515 shape_version: 1,
7516 instance_format_version: None,
7517 kind: TypeKind::TaggedUnion,
7518 wire: true,
7519 },
7520 TypeContract {
7521 name: "stream_binding",
7522 shape_version: 1,
7523 instance_format_version: None,
7524 kind: TypeKind::Struct,
7525 wire: true,
7526 },
7527 TypeContract {
7528 name: "capability_grant",
7529 shape_version: 1,
7530 instance_format_version: None,
7531 kind: TypeKind::Struct,
7532 wire: true,
7533 },
7534 TypeContract {
7535 name: "protocol_limit",
7536 shape_version: 1,
7537 instance_format_version: None,
7538 kind: TypeKind::Struct,
7539 wire: true,
7540 },
7541 TypeContract {
7542 name: "document_mutation_condition",
7543 shape_version: 1,
7544 instance_format_version: None,
7545 kind: TypeKind::TaggedUnion,
7546 wire: true,
7547 },
7548 TypeContract {
7549 name: "audit_adapter",
7550 shape_version: 1,
7551 instance_format_version: None,
7552 kind: TypeKind::Enum,
7553 wire: true,
7554 },
7555 TypeContract {
7556 name: "audit_decision",
7557 shape_version: 1,
7558 instance_format_version: None,
7559 kind: TypeKind::Enum,
7560 wire: true,
7561 },
7562 TypeContract {
7563 name: "audit_outcome",
7564 shape_version: 1,
7565 instance_format_version: None,
7566 kind: TypeKind::Enum,
7567 wire: true,
7568 },
7569 TypeContract {
7570 name: "audit_detail",
7571 shape_version: 1,
7572 instance_format_version: None,
7573 kind: TypeKind::Enum,
7574 wire: true,
7575 },
7576 TypeContract {
7577 name: "audit_gap_reason",
7578 shape_version: 1,
7579 instance_format_version: None,
7580 kind: TypeKind::Enum,
7581 wire: true,
7582 },
7583 TypeContract {
7584 name: "audit_event",
7585 shape_version: 2,
7586 instance_format_version: None,
7587 kind: TypeKind::Struct,
7588 wire: true,
7589 },
7590 TypeContract {
7591 name: "audit_gap",
7592 shape_version: 2,
7593 instance_format_version: None,
7594 kind: TypeKind::Struct,
7595 wire: true,
7596 },
7597 TypeContract {
7598 name: "audit_stream_state",
7599 shape_version: 1,
7600 instance_format_version: None,
7601 kind: TypeKind::Struct,
7602 wire: true,
7603 },
7604 TypeContract {
7605 name: "service_credential_grant",
7606 shape_version: 1,
7607 instance_format_version: None,
7608 kind: TypeKind::Struct,
7609 wire: true,
7610 },
7611 TypeContract {
7612 name: "service_credential_summary",
7613 shape_version: 1,
7614 instance_format_version: None,
7615 kind: TypeKind::Struct,
7616 wire: true,
7617 },
7618 TypeContract {
7619 name: "security_role",
7620 shape_version: 1,
7621 instance_format_version: None,
7622 kind: TypeKind::Struct,
7623 wire: true,
7624 },
7625 TypeContract {
7626 name: "role_append_scope_change",
7627 shape_version: 1,
7628 instance_format_version: None,
7629 kind: TypeKind::TaggedUnion,
7630 wire: true,
7631 },
7632 TypeContract {
7633 name: "role_append_access_preparation",
7634 shape_version: 1,
7635 instance_format_version: None,
7636 kind: TypeKind::TaggedUnion,
7637 wire: true,
7638 },
7639 TypeContract {
7640 name: "security_action_outcome",
7641 shape_version: 1,
7642 instance_format_version: None,
7643 kind: TypeKind::TaggedUnion,
7644 wire: true,
7645 },
7646 TypeContract {
7647 name: "maintenance_work_state",
7648 shape_version: 1,
7649 instance_format_version: None,
7650 kind: TypeKind::Enum,
7651 wire: true,
7652 },
7653 TypeContract {
7654 name: "maintenance_attempt_state",
7655 shape_version: 1,
7656 instance_format_version: None,
7657 kind: TypeKind::Enum,
7658 wire: true,
7659 },
7660 TypeContract {
7661 name: "maintenance_failure_class",
7662 shape_version: 1,
7663 instance_format_version: None,
7664 kind: TypeKind::Enum,
7665 wire: true,
7666 },
7667 TypeContract {
7668 name: "maintenance_failure_class_count",
7669 shape_version: 1,
7670 instance_format_version: None,
7671 kind: TypeKind::Struct,
7672 wire: true,
7673 },
7674 TypeContract {
7675 name: "maintenance_attempt_observation",
7676 shape_version: 1,
7677 instance_format_version: None,
7678 kind: TypeKind::Struct,
7679 wire: true,
7680 },
7681 TypeContract {
7682 name: "maintenance_task_scope",
7683 shape_version: 1,
7684 instance_format_version: None,
7685 kind: TypeKind::Struct,
7686 wire: true,
7687 },
7688 TypeContract {
7689 name: "maintenance_task_status",
7690 shape_version: 1,
7691 instance_format_version: None,
7692 kind: TypeKind::Struct,
7693 wire: true,
7694 },
7695 TypeContract {
7696 name: "maintenance_status_aggregate",
7697 shape_version: 1,
7698 instance_format_version: Some(2),
7699 kind: TypeKind::Struct,
7700 wire: true,
7701 },
7702 TypeContract {
7703 name: "runtime_status_detail",
7704 shape_version: 1,
7705 instance_format_version: None,
7706 kind: TypeKind::Struct,
7707 wire: true,
7708 },
7709 TypeContract {
7710 name: "result_cache_status",
7711 shape_version: 2,
7712 instance_format_version: Some(3),
7713 kind: TypeKind::Struct,
7714 wire: true,
7715 },
7716 TypeContract {
7717 name: "field_promotion_status",
7718 shape_version: 1,
7719 instance_format_version: Some(3),
7720 kind: TypeKind::Struct,
7721 wire: true,
7722 },
7723 TypeContract {
7724 name: "overload_shard_status",
7725 shape_version: 2,
7726 instance_format_version: Some(3),
7727 kind: TypeKind::Struct,
7728 wire: true,
7729 },
7730 TypeContract {
7731 name: "external_key_binding",
7732 shape_version: 1,
7733 instance_format_version: None,
7734 kind: TypeKind::Struct,
7735 wire: true,
7736 },
7737 TypeContract {
7738 name: "rollup_measure",
7739 shape_version: 1,
7740 instance_format_version: None,
7741 kind: TypeKind::TaggedUnion,
7742 wire: true,
7743 },
7744 TypeContract {
7745 name: "aggregate_then_delete_policy",
7746 shape_version: 1,
7747 instance_format_version: None,
7748 kind: TypeKind::Struct,
7749 wire: true,
7750 },
7751 TypeContract {
7752 name: "lifecycle_binding_status",
7753 shape_version: 1,
7754 instance_format_version: None,
7755 kind: TypeKind::Struct,
7756 wire: true,
7757 },
7758 TypeContract {
7759 name: "lifecycle_rollup_status",
7760 shape_version: 1,
7761 instance_format_version: None,
7762 kind: TypeKind::Struct,
7763 wire: true,
7764 },
7765 TypeContract {
7766 name: "lifecycle_status",
7767 shape_version: 2,
7768 instance_format_version: Some(4),
7769 kind: TypeKind::Struct,
7770 wire: true,
7771 },
7772 TypeContract {
7773 name: "quota_limit",
7774 shape_version: 1,
7775 instance_format_version: None,
7776 kind: TypeKind::Struct,
7777 wire: true,
7778 },
7779 TypeContract {
7780 name: "quota_consumption",
7781 shape_version: 1,
7782 instance_format_version: None,
7783 kind: TypeKind::Struct,
7784 wire: true,
7785 },
7786 TypeContract {
7787 name: "quota_update",
7788 shape_version: 1,
7789 instance_format_version: None,
7790 kind: TypeKind::Struct,
7791 wire: true,
7792 },
7793 TypeContract {
7794 name: "storage_overall_posture",
7795 shape_version: 1,
7796 instance_format_version: None,
7797 kind: TypeKind::Enum,
7798 wire: true,
7799 },
7800 TypeContract {
7801 name: "storage_profile_role",
7802 shape_version: 1,
7803 instance_format_version: None,
7804 kind: TypeKind::Enum,
7805 wire: true,
7806 },
7807 TypeContract {
7808 name: "storage_provider_posture",
7809 shape_version: 1,
7810 instance_format_version: None,
7811 kind: TypeKind::Enum,
7812 wire: true,
7813 },
7814 TypeContract {
7815 name: "storage_backend_service_class",
7816 shape_version: 1,
7817 instance_format_version: None,
7818 kind: TypeKind::Enum,
7819 wire: true,
7820 },
7821 TypeContract {
7822 name: "storage_profile_role_binding",
7823 shape_version: 1,
7824 instance_format_version: None,
7825 kind: TypeKind::Struct,
7826 wire: true,
7827 },
7828 TypeContract {
7829 name: "storage_profile_attestation",
7830 shape_version: 1,
7831 instance_format_version: Some(1),
7832 kind: TypeKind::Struct,
7833 wire: true,
7834 },
7835 TypeContract {
7836 name: "storage_profile_expectation",
7837 shape_version: 1,
7838 instance_format_version: Some(1),
7839 kind: TypeKind::Struct,
7840 wire: true,
7841 },
7842 TypeContract {
7843 name: "core_binding",
7844 shape_version: 3,
7845 instance_format_version: None,
7846 kind: TypeKind::Struct,
7847 wire: true,
7848 },
7849 TypeContract {
7850 name: "readiness_observation",
7851 shape_version: 1,
7852 instance_format_version: None,
7853 kind: TypeKind::Struct,
7854 wire: true,
7855 },
7856 TypeContract {
7857 name: "usage_dimension",
7858 shape_version: 1,
7859 instance_format_version: None,
7860 kind: TypeKind::Struct,
7861 wire: true,
7862 },
7863 TypeContract {
7864 name: "physical_usage_value",
7865 shape_version: 2,
7866 instance_format_version: None,
7867 kind: TypeKind::Struct,
7868 wire: true,
7869 },
7870 TypeContract {
7871 name: "core_usage_units",
7872 shape_version: 2,
7873 instance_format_version: None,
7874 kind: TypeKind::Struct,
7875 wire: true,
7876 },
7877 TypeContract {
7878 name: "core_usage_correction",
7879 shape_version: 2,
7880 instance_format_version: None,
7881 kind: TypeKind::Struct,
7882 wire: true,
7883 },
7884 TypeContract {
7885 name: "response_meta",
7886 shape_version: 1,
7887 instance_format_version: Some(1),
7888 kind: TypeKind::Struct,
7889 wire: true,
7890 },
7891 TypeContract {
7892 name: "error_disposition",
7893 shape_version: 1,
7894 instance_format_version: None,
7895 kind: TypeKind::Enum,
7896 wire: true,
7897 },
7898 TypeContract {
7899 name: "recovery_action",
7900 shape_version: 1,
7901 instance_format_version: None,
7902 kind: TypeKind::Enum,
7903 wire: true,
7904 },
7905 TypeContract {
7906 name: "limit_class",
7907 shape_version: 1,
7908 instance_format_version: None,
7909 kind: TypeKind::Enum,
7910 wire: true,
7911 },
7912 TypeContract {
7913 name: "error_detail",
7914 shape_version: 3,
7915 instance_format_version: None,
7916 kind: TypeKind::TaggedUnion,
7917 wire: true,
7918 },
7919 TypeContract {
7920 name: "connection_profile",
7921 shape_version: 4,
7922 instance_format_version: Some(4),
7923 kind: TypeKind::Struct,
7924 wire: false,
7925 },
7926];
7927#[derive(Clone, Copy, Debug, Eq, PartialEq)]
7928pub struct StreamContract {
7929 pub name: &'static str,
7930 pub action: Action,
7931 pub transport: &'static str,
7932 pub service: &'static str,
7933 pub method: &'static str,
7934 pub auth_metadata: &'static str,
7935 pub auth_scheme: &'static str,
7936 pub semantic_format_version: u16,
7937 pub start_type: &'static str,
7938 pub frame_type: &'static str,
7939}
7940pub const LODESTONE_API_STREAM_CONTRACTS: &[StreamContract] = &[StreamContract {
7941 name: "subscription",
7942 action: Action::SubscriptionRead,
7943 transport: "grpc_tls",
7944 service: "lodestone.api.FilterSubscription",
7945 method: "/lodestone.api.FilterSubscription/Subscribe",
7946 auth_metadata: "authorization",
7947 auth_scheme: "ApiKey",
7948 semantic_format_version: 1,
7949 start_type: "subscription_start",
7950 frame_type: "subscription_frame",
7951}];
7952#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7953#[serde(deny_unknown_fields)]
7954pub struct ErrorBody {
7955 pub code: ErrorCode,
7956 pub message: String,
7957 pub disposition: ErrorDisposition,
7958 pub recovery: RecoveryAction,
7959 pub details: ErrorDetail,
7960}
7961#[derive(Clone, Copy, Debug, Eq, PartialEq)]
7962pub enum ErrorShapeError {
7963 DetailCodeMismatch,
7964 OutcomeMismatch,
7965 RetryAfterOutOfRange,
7966}
7967impl ErrorBody {
7968 pub fn try_new(
7969 code: ErrorCode,
7970 message: String,
7971 disposition: ErrorDisposition,
7972 recovery: RecoveryAction,
7973 details: ErrorDetail,
7974 ) -> Result<Self, ErrorShapeError> {
7975 let body = Self {
7976 code,
7977 message,
7978 disposition,
7979 recovery,
7980 details,
7981 };
7982 validate_error_body(&body)?;
7983 Ok(body)
7984 }
7985 pub fn retry_safe(&self) -> bool {
7986 self.disposition == ErrorDisposition::NotSubmitted
7987 && matches!(
7988 self.recovery,
7989 RecoveryAction::Retry
7990 | RecoveryAction::RetryAfter
7991 | RecoveryAction::RefreshCredential
7992 | RecoveryAction::RestartPage
7993 | RecoveryAction::ReduceRequest
7994 | RecoveryAction::RefreshPrecondition
7995 | RecoveryAction::CorrectRange
7996 )
7997 }
7998 pub fn submitted(&self) -> bool {
7999 self.disposition != ErrorDisposition::NotSubmitted
8000 }
8001}
8002pub fn validate_error_body(body: &ErrorBody) -> Result<(), ErrorShapeError> {
8003 let detail_matches = matches!(
8004 (&body.code, &body.details),
8005 (ErrorCode::Aborted, ErrorDetail::Aborted { .. })
8006 | (ErrorCode::DeadlineExceeded, ErrorDetail::DeadlineExceeded)
8007 | (ErrorCode::InvalidRequest, ErrorDetail::InvalidRequest { .. })
8008 | (ErrorCode::UnsupportedVersion, ErrorDetail::UnsupportedVersion { .. })
8009 | (ErrorCode::Unauthenticated, ErrorDetail::Unauthenticated)
8010 | (ErrorCode::PermissionDenied, ErrorDetail::PermissionDenied { .. })
8011 | (ErrorCode::NotFound, ErrorDetail::NotFound { .. })
8012 | (ErrorCode::Conflict, ErrorDetail::Conflict { .. })
8013 | (ErrorCode::StaleCursor, ErrorDetail::StaleCursor { .. })
8014 | (
8015 ErrorCode::RestartBudgetExhausted,
8016 ErrorDetail::RestartBudgetExhausted { .. }
8017 )
8018 | (ErrorCode::LimitExceeded, ErrorDetail::LimitExceeded { .. })
8019 | (
8020 ErrorCode::CapabilityUnavailable,
8021 ErrorDetail::CapabilityUnavailable { .. }
8022 )
8023 | (ErrorCode::NotSubmitted, ErrorDetail::NotSubmitted { .. })
8024 | (
8025 ErrorCode::SubmittedIndeterminate,
8026 ErrorDetail::SubmittedIndeterminate { .. }
8027 )
8028 | (ErrorCode::ExpiredUnknown, ErrorDetail::ExpiredUnknown { .. })
8029 | (ErrorCode::SecretNotEscrowed, ErrorDetail::SecretNotEscrowed)
8030 | (ErrorCode::RetentionGap, ErrorDetail::RetentionGap { .. })
8031 | (
8032 ErrorCode::ArtifactRangeInvalid,
8033 ErrorDetail::ArtifactRangeInvalid { .. }
8034 )
8035 | (ErrorCode::ChecksumMismatch, ErrorDetail::ChecksumMismatch { .. })
8036 | (
8037 ErrorCode::TemporarilyUnavailable,
8038 ErrorDetail::TemporarilyUnavailable { .. }
8039 )
8040 | (ErrorCode::Internal, ErrorDetail::Internal)
8041 );
8042 if !detail_matches {
8043 return Err(ErrorShapeError::DetailCodeMismatch);
8044 }
8045 if !LODESTONE_API_ERROR_OUTCOMES.iter().any(|contract| {
8046 contract.code == body.code && contract.disposition == body.disposition && contract.recovery == body.recovery
8047 }) {
8048 return Err(ErrorShapeError::OutcomeMismatch);
8049 }
8050 let retry_after = match &body.details {
8051 ErrorDetail::NotSubmitted { retry_after_millis }
8052 | ErrorDetail::TemporarilyUnavailable { retry_after_millis } => retry_after_millis.as_ref(),
8053 _ => None,
8054 };
8055 if retry_after
8056 .and_then(|value| value.value.parse::<u64>().ok())
8057 .is_some_and(|value| value > 60000)
8058 {
8059 return Err(ErrorShapeError::RetryAfterOutOfRange);
8060 }
8061 Ok(())
8062}
8063#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
8064#[serde(deny_unknown_fields)]
8065pub struct RequestMeta {
8066 pub format_version: u16,
8067 pub request_id: String,
8068 pub correlation_id: Identity,
8069 pub absolute_deadline_unix_millis: U64,
8070 pub workload_class: WorkloadClass,
8071}
8072
8073#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8074#[serde(deny_unknown_fields)]
8075pub struct DiscoverRequest {}
8076
8077#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8078#[serde(deny_unknown_fields)]
8079pub struct DiscoverResult {
8080 pub principal_id: Identity,
8081 pub collection_id: Identity,
8082 pub policy_revision: U64,
8083 pub artifact_version: String,
8084 pub schema_id: String,
8085 pub schema_digest: Digest,
8086 pub streams: Vec<StreamBinding>,
8087 pub capabilities: Vec<CapabilityGrant>,
8088 pub limits: Vec<ProtocolLimit>,
8089}
8090
8091#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8092#[serde(deny_unknown_fields)]
8093pub struct ListIndexesRequest {
8094 pub page_size: u32,
8095 #[serde(default, skip_serializing_if = "Option::is_none")]
8096 pub cursor: Option<Cursor>,
8097 #[serde(default, skip_serializing_if = "Option::is_none")]
8098 pub name_prefix: Option<String>,
8099 #[serde(default, skip_serializing_if = "Option::is_none")]
8100 pub mode: Option<String>,
8101 #[serde(default, skip_serializing_if = "Option::is_none")]
8102 pub state: Option<String>,
8103 pub restart_count: u32,
8104}
8105
8106#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8107#[serde(deny_unknown_fields)]
8108pub struct ListIndexesResult {
8109 pub items: Vec<IndexSummary>,
8110 #[serde(default, skip_serializing_if = "Option::is_none")]
8111 pub next_cursor: Option<Cursor>,
8112 pub restart_count: u32,
8113}
8114
8115#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8116#[serde(deny_unknown_fields)]
8117pub struct GetIndexRequest {
8118 pub name: String,
8119 #[serde(default, skip_serializing_if = "Option::is_none")]
8120 pub expected_incarnation: Option<Identity>,
8121}
8122
8123#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8124#[serde(deny_unknown_fields)]
8125pub struct GetIndexResult {
8126 pub resource: IndexDetail,
8127}
8128
8129#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8130#[serde(deny_unknown_fields)]
8131pub struct ValidateIndexChangeRequest {
8132 pub action_kind: String,
8133 pub name: String,
8134 #[serde(default, skip_serializing_if = "Option::is_none")]
8135 pub expected_incarnation: Option<Identity>,
8136 #[serde(default, skip_serializing_if = "Option::is_none")]
8137 pub expected_revision: Option<U64>,
8138 #[serde(default, skip_serializing_if = "Option::is_none")]
8139 pub mode: Option<String>,
8140 #[serde(default, skip_serializing_if = "Option::is_none")]
8141 pub mapping: Option<Mapping>,
8142 #[serde(default, skip_serializing_if = "Option::is_none")]
8143 pub policies: Option<IndexPolicies>,
8144}
8145
8146#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8147#[serde(deny_unknown_fields)]
8148pub struct ValidateIndexChangeResult {
8149 pub change_kind: String,
8150 #[serde(default, skip_serializing_if = "Option::is_none")]
8151 pub action_id: Option<Digest>,
8152 pub fields_added: Vec<String>,
8153 pub policy_axes_changed: Vec<String>,
8154 pub required_capabilities: Vec<String>,
8155 pub catalog_revision: U64,
8156 pub policy_revision: U64,
8157}
8158
8159#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8160#[serde(deny_unknown_fields)]
8161pub struct ApplyIndexChangeRequest {
8162 pub action_id: Digest,
8163 pub index: Resource,
8164 pub expected_revision: U64,
8165 #[serde(default, skip_serializing_if = "Option::is_none")]
8166 pub mapping: Option<Mapping>,
8167 #[serde(default, skip_serializing_if = "Option::is_none")]
8168 pub policies: Option<IndexPolicies>,
8169}
8170
8171#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8172#[serde(deny_unknown_fields)]
8173pub struct ApplyIndexChangeResult {
8174 pub receipt: IndexChangeApplyReceipt,
8175}
8176
8177#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8178#[serde(deny_unknown_fields)]
8179pub struct ApplyAdministrationMutationRequest {
8180 pub action_id: Digest,
8181 pub expected_revision: U64,
8182 pub mutation: AdministrationMutation,
8183}
8184
8185#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8186#[serde(deny_unknown_fields)]
8187pub struct ApplyAdministrationMutationResult {
8188 pub outcome: AdministrationOutcome,
8189}
8190
8191#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8192#[serde(deny_unknown_fields)]
8193pub struct ListAliasesRequest {
8194 pub page_size: u32,
8195 #[serde(default, skip_serializing_if = "Option::is_none")]
8196 pub cursor: Option<Cursor>,
8197 #[serde(default, skip_serializing_if = "Option::is_none")]
8198 pub name_prefix: Option<String>,
8199 pub restart_count: u32,
8200}
8201
8202#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8203#[serde(deny_unknown_fields)]
8204pub struct ListAliasesResult {
8205 pub items: Vec<AliasSummary>,
8206 #[serde(default, skip_serializing_if = "Option::is_none")]
8207 pub next_cursor: Option<Cursor>,
8208 pub restart_count: u32,
8209}
8210
8211#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8212#[serde(deny_unknown_fields)]
8213pub struct GetAliasRequest {
8214 pub name: String,
8215}
8216
8217#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8218#[serde(deny_unknown_fields)]
8219pub struct GetAliasResult {
8220 pub resource: AliasDetail,
8221}
8222
8223#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8224#[serde(deny_unknown_fields)]
8225pub struct ListDataStreamsRequest {
8226 pub page_size: u32,
8227 #[serde(default, skip_serializing_if = "Option::is_none")]
8228 pub cursor: Option<Cursor>,
8229 #[serde(default, skip_serializing_if = "Option::is_none")]
8230 pub name_prefix: Option<String>,
8231 pub restart_count: u32,
8232}
8233
8234#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8235#[serde(deny_unknown_fields)]
8236pub struct ListDataStreamsResult {
8237 pub items: Vec<DataStreamSummary>,
8238 #[serde(default, skip_serializing_if = "Option::is_none")]
8239 pub next_cursor: Option<Cursor>,
8240 pub restart_count: u32,
8241}
8242
8243#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8244#[serde(deny_unknown_fields)]
8245pub struct GetDataStreamRequest {
8246 pub name: String,
8247}
8248
8249#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8250#[serde(deny_unknown_fields)]
8251pub struct GetDataStreamResult {
8252 pub resource: DataStreamDetail,
8253}
8254
8255#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8256#[serde(deny_unknown_fields)]
8257pub struct ListComponentTemplatesRequest {
8258 pub page_size: u32,
8259 #[serde(default, skip_serializing_if = "Option::is_none")]
8260 pub cursor: Option<Cursor>,
8261 #[serde(default, skip_serializing_if = "Option::is_none")]
8262 pub name_prefix: Option<String>,
8263 pub restart_count: u32,
8264}
8265
8266#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8267#[serde(deny_unknown_fields)]
8268pub struct ListComponentTemplatesResult {
8269 pub items: Vec<ComponentTemplateSummary>,
8270 #[serde(default, skip_serializing_if = "Option::is_none")]
8271 pub next_cursor: Option<Cursor>,
8272 pub restart_count: u32,
8273}
8274
8275#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8276#[serde(deny_unknown_fields)]
8277pub struct GetComponentTemplateRequest {
8278 pub name: String,
8279 #[serde(default, skip_serializing_if = "Option::is_none")]
8280 pub expected_incarnation: Option<Identity>,
8281}
8282
8283#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8284#[serde(deny_unknown_fields)]
8285pub struct GetComponentTemplateResult {
8286 pub resource: ComponentTemplateDetail,
8287}
8288
8289#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8290#[serde(deny_unknown_fields)]
8291pub struct ListIndexTemplatesRequest {
8292 pub page_size: u32,
8293 #[serde(default, skip_serializing_if = "Option::is_none")]
8294 pub cursor: Option<Cursor>,
8295 #[serde(default, skip_serializing_if = "Option::is_none")]
8296 pub name_prefix: Option<String>,
8297 pub restart_count: u32,
8298}
8299
8300#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8301#[serde(deny_unknown_fields)]
8302pub struct ListIndexTemplatesResult {
8303 pub items: Vec<IndexTemplateSummary>,
8304 #[serde(default, skip_serializing_if = "Option::is_none")]
8305 pub next_cursor: Option<Cursor>,
8306 pub restart_count: u32,
8307}
8308
8309#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8310#[serde(deny_unknown_fields)]
8311pub struct GetIndexTemplateRequest {
8312 pub name: String,
8313 #[serde(default, skip_serializing_if = "Option::is_none")]
8314 pub expected_incarnation: Option<Identity>,
8315}
8316
8317#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8318#[serde(deny_unknown_fields)]
8319pub struct GetIndexTemplateResult {
8320 pub resource: IndexTemplateDetail,
8321}
8322
8323#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8324#[serde(deny_unknown_fields)]
8325pub struct ListIngestPipelinesRequest {
8326 pub page_size: u32,
8327 #[serde(default, skip_serializing_if = "Option::is_none")]
8328 pub cursor: Option<Cursor>,
8329 #[serde(default, skip_serializing_if = "Option::is_none")]
8330 pub name_prefix: Option<String>,
8331 pub restart_count: u32,
8332}
8333
8334#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8335#[serde(deny_unknown_fields)]
8336pub struct ListIngestPipelinesResult {
8337 pub items: Vec<IngestPipelineSummary>,
8338 #[serde(default, skip_serializing_if = "Option::is_none")]
8339 pub next_cursor: Option<Cursor>,
8340 pub restart_count: u32,
8341}
8342
8343#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8344#[serde(deny_unknown_fields)]
8345pub struct GetIngestPipelineRequest {
8346 pub name: String,
8347 #[serde(default, skip_serializing_if = "Option::is_none")]
8348 pub expected_incarnation: Option<Identity>,
8349}
8350
8351#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8352#[serde(deny_unknown_fields)]
8353pub struct GetIngestPipelineResult {
8354 pub resource: IngestPipelineDetail,
8355}
8356
8357#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8358#[serde(deny_unknown_fields)]
8359pub struct SimulateIngestPipelineRequest {
8360 #[serde(default, skip_serializing_if = "Option::is_none")]
8361 pub name: Option<String>,
8362 #[serde(default, skip_serializing_if = "Option::is_none")]
8363 pub expected: Option<ExpectedBinding>,
8364 #[serde(default, skip_serializing_if = "Option::is_none")]
8365 pub definition: Option<RawJson>,
8366 pub source: RawJson,
8367}
8368
8369#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8370#[serde(deny_unknown_fields)]
8371pub struct SimulateIngestPipelineResult {
8372 #[serde(default, skip_serializing_if = "Option::is_none")]
8373 pub source: Option<RawJson>,
8374 pub dropped: bool,
8375 pub changed: bool,
8376}
8377
8378#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8379#[serde(deny_unknown_fields)]
8380pub struct ReprocessByQueryRequest {
8381 pub action_id: Digest,
8382 pub index: Resource,
8383 pub query: Query,
8384 #[serde(default, skip_serializing_if = "Option::is_none")]
8385 pub pipeline: Option<IngestPipelineSelection>,
8386 pub batch_size: u32,
8387 pub max_docs: U64,
8388 pub proceed_on_conflict: bool,
8389 pub slices: u32,
8390 pub requests_per_second: u32,
8391 pub wait_for_completion: bool,
8392}
8393
8394#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8395#[serde(deny_unknown_fields)]
8396pub struct ReprocessByQueryResult {
8397 pub task_id: Identity,
8398 pub scanned: U64,
8399 pub updated: U64,
8400 pub noops: U64,
8401 pub version_conflicts: U64,
8402 pub batches: U64,
8403 pub completed: bool,
8404}
8405
8406#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8407#[serde(deny_unknown_fields)]
8408pub struct ListLifecyclePoliciesRequest {
8409 pub page_size: u32,
8410 #[serde(default, skip_serializing_if = "Option::is_none")]
8411 pub cursor: Option<Cursor>,
8412 #[serde(default, skip_serializing_if = "Option::is_none")]
8413 pub name_prefix: Option<String>,
8414 pub restart_count: u32,
8415}
8416
8417#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8418#[serde(deny_unknown_fields)]
8419pub struct ListLifecyclePoliciesResult {
8420 pub items: Vec<LifecyclePolicySummary>,
8421 #[serde(default, skip_serializing_if = "Option::is_none")]
8422 pub next_cursor: Option<Cursor>,
8423 pub restart_count: u32,
8424}
8425
8426#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8427#[serde(deny_unknown_fields)]
8428pub struct GetLifecyclePolicyRequest {
8429 pub name: String,
8430}
8431
8432#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8433#[serde(deny_unknown_fields)]
8434pub struct GetLifecyclePolicyResult {
8435 pub resource: LifecyclePolicyDetail,
8436}
8437
8438#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8439#[serde(deny_unknown_fields)]
8440pub struct PrepareCreateIndexRequest {
8441 pub name: String,
8442 pub mapping: Mapping,
8443 #[serde(default, skip_serializing_if = "Option::is_none")]
8444 pub resource_spec: Option<IndexResourceSpec>,
8445 #[serde(default, skip_serializing_if = "Option::is_none")]
8446 pub retained_event_identity: Option<bool>,
8447}
8448
8449#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8450#[serde(deny_unknown_fields)]
8451pub struct PrepareCreateIndexResult {
8452 pub locator: Locator,
8453 pub expires_at: U64,
8454 pub semantic_digest: Digest,
8455 pub resource_spec: IndexResourceSpec,
8456}
8457
8458#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8459#[serde(deny_unknown_fields)]
8460pub struct PrepareDeleteIndexRequest {
8461 pub name: String,
8462 pub expected_incarnation: Identity,
8463}
8464
8465#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8466#[serde(deny_unknown_fields)]
8467pub struct PrepareDeleteIndexResult {
8468 #[serde(default, skip_serializing_if = "Option::is_none")]
8469 pub locator: Option<Locator>,
8470 #[serde(default, skip_serializing_if = "Option::is_none")]
8471 pub expires_at: Option<U64>,
8472 #[serde(default, skip_serializing_if = "Option::is_none")]
8473 pub semantic_digest: Option<Digest>,
8474 pub impact_digest: Digest,
8475 pub blockers: Vec<String>,
8476 pub scheduled_effects: Vec<String>,
8477 #[serde(default, skip_serializing_if = "Option::is_none")]
8478 pub estimated_documents: Option<U64>,
8479 #[serde(default, skip_serializing_if = "Option::is_none")]
8480 pub estimated_logical_bytes: Option<U64>,
8481}
8482
8483#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8484#[serde(deny_unknown_fields)]
8485pub struct SubmitCatalogActionRequest {
8486 pub locator: Locator,
8487 pub semantic_digest: Digest,
8488 pub action_kind: String,
8489 pub name: String,
8490 #[serde(default, skip_serializing_if = "Option::is_none")]
8491 pub mapping: Option<Mapping>,
8492 #[serde(default, skip_serializing_if = "Option::is_none")]
8493 pub resource_spec: Option<IndexResourceSpec>,
8494 #[serde(default, skip_serializing_if = "Option::is_none")]
8495 pub expected_incarnation: Option<Identity>,
8496}
8497
8498#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8499#[serde(deny_unknown_fields)]
8500pub struct SubmitCatalogActionResult {
8501 pub locator: Locator,
8502 pub state: String,
8503 pub mutation_outcome: MutationOutcome,
8504}
8505
8506#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8507#[serde(deny_unknown_fields)]
8508pub struct ResolveCatalogActionRequest {
8509 pub locator: Locator,
8510}
8511
8512#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8513#[serde(deny_unknown_fields)]
8514pub struct ResolveCatalogActionResult {
8515 pub locator: Locator,
8516 pub state: String,
8517 #[serde(default, skip_serializing_if = "Option::is_none")]
8518 pub resource: Option<Resource>,
8519}
8520
8521#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8522#[serde(deny_unknown_fields)]
8523pub struct PrepareReplayableSourceIndexRequest {
8524 pub name: String,
8525 pub mapping: Mapping,
8526 #[serde(default, skip_serializing_if = "Option::is_none")]
8527 pub resource_spec: Option<IndexResourceSpec>,
8528 pub source: ReplayableSourceConfiguration,
8529}
8530
8531#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8532#[serde(deny_unknown_fields)]
8533pub struct PrepareReplayableSourceIndexResult {
8534 pub locator: Locator,
8535 pub expires_at: U64,
8536 pub semantic_digest: Digest,
8537 pub resource_spec: IndexResourceSpec,
8538}
8539
8540#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8541#[serde(deny_unknown_fields)]
8542pub struct SubmitReplayableSourceIndexRequest {
8543 pub locator: Locator,
8544 pub semantic_digest: Digest,
8545 pub name: String,
8546 pub mapping: Mapping,
8547 pub resource_spec: IndexResourceSpec,
8548 pub source: ReplayableSourceConfiguration,
8549}
8550
8551#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8552#[serde(deny_unknown_fields)]
8553pub struct SubmitReplayableSourceIndexResult {
8554 pub locator: Locator,
8555 pub state: String,
8556 pub mutation_outcome: MutationOutcome,
8557}
8558
8559#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8560#[serde(deny_unknown_fields)]
8561pub struct GetReplayableSourceRequest {
8562 pub index: Resource,
8563}
8564
8565#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8566#[serde(deny_unknown_fields)]
8567pub struct GetReplayableSourceResult {
8568 pub status: ReplayableSourceStatus,
8569}
8570
8571#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8572#[serde(deny_unknown_fields)]
8573pub struct ControlReplayableSourceRequest {
8574 pub index: Resource,
8575 pub expected_generation: U64,
8576 pub transition: SourceControlTransition,
8577}
8578
8579#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8580#[serde(deny_unknown_fields)]
8581pub struct ControlReplayableSourceResult {
8582 pub status: ReplayableSourceStatus,
8583 pub mutation_outcome: MutationOutcome,
8584}
8585
8586#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8587#[serde(deny_unknown_fields)]
8588pub struct CloneIndexRequest {
8589 pub source: Resource,
8590 pub destination_name: String,
8591 pub operation_id: Identity,
8592 pub source_cut_id: Identity,
8593}
8594
8595#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8596#[serde(deny_unknown_fields)]
8597pub struct CloneIndexResult {
8598 pub destination: Resource,
8599 pub source_cut_id: Identity,
8600 pub mutation_outcome: MutationOutcome,
8601}
8602
8603#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8604#[serde(deny_unknown_fields)]
8605pub struct ConfigureHistoryRequest {
8606 pub index: Resource,
8607 pub precondition: HistoryLedgerPrecondition,
8608 pub policy: HistoryRetentionPolicy,
8609}
8610
8611#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8612#[serde(deny_unknown_fields)]
8613pub struct ConfigureHistoryResult {
8614 pub status: HistoryStatus,
8615 pub mutation_outcome: MutationOutcome,
8616}
8617
8618#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8619#[serde(deny_unknown_fields)]
8620pub struct GetHistoryRequest {
8621 pub index: Resource,
8622}
8623
8624#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8625#[serde(deny_unknown_fields)]
8626pub struct GetHistoryResult {
8627 pub status: HistoryStatus,
8628}
8629
8630#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8631#[serde(deny_unknown_fields)]
8632pub struct ResolveHistoryRequest {
8633 pub index: Resource,
8634 pub selector: HistorySelector,
8635}
8636
8637#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8638#[serde(deny_unknown_fields)]
8639pub struct ResolveHistoryResult {
8640 pub resolution: HistoryResolution,
8641}
8642
8643#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8644#[serde(deny_unknown_fields)]
8645pub struct PlaceHistoryHoldRequest {
8646 pub index: Resource,
8647 pub expected_ledger_revision: U64,
8648 pub hold: HistoryHold,
8649}
8650
8651#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8652#[serde(deny_unknown_fields)]
8653pub struct PlaceHistoryHoldResult {
8654 pub status: HistoryStatus,
8655 pub mutation_outcome: MutationOutcome,
8656}
8657
8658#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8659#[serde(deny_unknown_fields)]
8660pub struct ReleaseHistoryHoldRequest {
8661 pub index: Resource,
8662 pub expected_ledger_revision: U64,
8663 pub hold_id: Identity,
8664}
8665
8666#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8667#[serde(deny_unknown_fields)]
8668pub struct ReleaseHistoryHoldResult {
8669 pub status: HistoryStatus,
8670 pub mutation_outcome: MutationOutcome,
8671}
8672
8673#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8674#[serde(deny_unknown_fields)]
8675pub struct PrepareDocumentMutationRequest {
8676 pub index: Resource,
8677 pub document_id: String,
8678 pub operation: String,
8679 #[serde(default, skip_serializing_if = "Option::is_none")]
8680 pub source: Option<RawJson>,
8681 #[serde(default, skip_serializing_if = "Option::is_none")]
8682 pub record: Option<NativeRecord>,
8683 #[serde(default, skip_serializing_if = "Option::is_none")]
8684 pub routing: Option<String>,
8685 #[serde(default, skip_serializing_if = "Option::is_none")]
8686 pub condition: Option<DocumentMutationCondition>,
8687 #[serde(default, skip_serializing_if = "Option::is_none")]
8688 pub pipeline: Option<IngestPipelineSelection>,
8689}
8690
8691#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8692#[serde(deny_unknown_fields)]
8693pub struct PrepareDocumentMutationResult {
8694 pub locator: Locator,
8695 pub semantic_digest: Digest,
8696 pub retention_max_entries: U64,
8697 pub retention_sequence_window: U64,
8698}
8699
8700#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8701#[serde(deny_unknown_fields)]
8702pub struct SubmitDocumentMutationRequest {
8703 pub locator: Locator,
8704 pub semantic_digest: Digest,
8705 pub index: Resource,
8706 pub document_id: String,
8707 pub operation: String,
8708 #[serde(default, skip_serializing_if = "Option::is_none")]
8709 pub source: Option<RawJson>,
8710 #[serde(default, skip_serializing_if = "Option::is_none")]
8711 pub record: Option<NativeRecord>,
8712 #[serde(default, skip_serializing_if = "Option::is_none")]
8713 pub routing: Option<String>,
8714 #[serde(default, skip_serializing_if = "Option::is_none")]
8715 pub condition: Option<DocumentMutationCondition>,
8716 #[serde(default, skip_serializing_if = "Option::is_none")]
8717 pub pipeline: Option<IngestPipelineSelection>,
8718}
8719
8720#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8721#[serde(deny_unknown_fields)]
8722pub struct SubmitDocumentMutationResult {
8723 pub locator: Locator,
8724 pub state: String,
8725 pub mutation_outcome: MutationOutcome,
8726 #[serde(default, skip_serializing_if = "Option::is_none")]
8727 pub achievement: Option<WriteAchievement>,
8728 #[serde(default, skip_serializing_if = "Option::is_none")]
8729 pub sequence: Option<U64>,
8730 #[serde(default, skip_serializing_if = "Option::is_none")]
8731 pub mapping_generation: Option<U64>,
8732 pub mapping_adopted: bool,
8733 #[serde(default, skip_serializing_if = "Option::is_none")]
8734 pub commit_receipt: Option<MutationCommitReceipt>,
8735}
8736
8737#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8738#[serde(deny_unknown_fields)]
8739pub struct PrepareDocumentBulkRequest {
8740 pub batch_id: Digest,
8741 pub index: Resource,
8742 pub items: Vec<BulkDocumentItem>,
8743}
8744
8745#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8746#[serde(deny_unknown_fields)]
8747pub struct PrepareDocumentBulkResult {
8748 pub outcome: BulkDocumentOutcome,
8749}
8750
8751#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8752#[serde(deny_unknown_fields)]
8753pub struct SubmitDocumentBulkRequest {
8754 pub batch_id: Digest,
8755 pub index: Resource,
8756 pub items: Vec<BulkDocumentItem>,
8757 pub preparations: Vec<BulkDocumentItemOutcome>,
8758}
8759
8760#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8761#[serde(deny_unknown_fields)]
8762pub struct SubmitDocumentBulkResult {
8763 pub outcome: BulkDocumentOutcome,
8764}
8765
8766#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8767#[serde(deny_unknown_fields)]
8768pub struct ResolveDocumentBulkRequest {
8769 pub batch_id: Digest,
8770 pub index: Resource,
8771 pub items: Vec<BulkDocumentItemOutcome>,
8772}
8773
8774#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8775#[serde(deny_unknown_fields)]
8776pub struct ResolveDocumentBulkResult {
8777 pub outcome: BulkDocumentOutcome,
8778}
8779
8780#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8781#[serde(deny_unknown_fields)]
8782pub struct PrepareAppendBulkRequest {
8783 pub batch_id: Digest,
8784 pub index: Resource,
8785 pub items: Vec<RetainedAppendItem>,
8786}
8787
8788#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8789#[serde(deny_unknown_fields)]
8790pub struct PrepareAppendBulkResult {
8791 pub outcome: RetainedAppendBulkOutcome,
8792}
8793
8794#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8795#[serde(deny_unknown_fields)]
8796pub struct SubmitAppendBulkRequest {
8797 pub batch_id: Digest,
8798 pub index: Resource,
8799 pub items: Vec<RetainedAppendItem>,
8800 pub preparations: Vec<RetainedAppendItemOutcome>,
8801}
8802
8803#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8804#[serde(deny_unknown_fields)]
8805pub struct SubmitAppendBulkResult {
8806 pub outcome: RetainedAppendBulkOutcome,
8807}
8808
8809#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8810#[serde(deny_unknown_fields)]
8811pub struct ResolveAppendBulkRequest {
8812 pub batch_id: Digest,
8813 pub index: Resource,
8814 pub items: Vec<RetainedAppendItemOutcome>,
8815}
8816
8817#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8818#[serde(deny_unknown_fields)]
8819pub struct ResolveAppendBulkResult {
8820 pub outcome: RetainedAppendBulkOutcome,
8821}
8822
8823#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8824#[serde(deny_unknown_fields)]
8825pub struct ObserveAppendCommittedRequest {
8826 pub index: Resource,
8827 pub locator: Locator,
8828}
8829
8830#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8831#[serde(deny_unknown_fields)]
8832pub struct ObserveAppendCommittedResult {
8833 pub outcome: RetainedAppendObservationOutcome,
8834}
8835
8836#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8837#[serde(deny_unknown_fields)]
8838pub struct ResolveDocumentMutationRequest {
8839 pub locator: Locator,
8840}
8841
8842#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8843#[serde(deny_unknown_fields)]
8844pub struct ResolveDocumentMutationResult {
8845 pub locator: Locator,
8846 pub state: String,
8847 #[serde(default, skip_serializing_if = "Option::is_none")]
8848 pub sequence: Option<U64>,
8849 #[serde(default, skip_serializing_if = "Option::is_none")]
8850 pub mapping_generation: Option<U64>,
8851 pub mapping_adopted: bool,
8852 #[serde(default, skip_serializing_if = "Option::is_none")]
8853 pub source: Option<RawJson>,
8854 #[serde(default, skip_serializing_if = "Option::is_none")]
8855 pub commit_receipt: Option<MutationCommitReceipt>,
8856}
8857
8858#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8859#[serde(deny_unknown_fields)]
8860pub struct GetDocumentRequest {
8861 pub index: Resource,
8862 pub document_id: String,
8863 #[serde(default, skip_serializing_if = "Option::is_none")]
8864 pub routing: Option<String>,
8865}
8866
8867#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8868#[serde(deny_unknown_fields)]
8869pub struct GetDocumentResult {
8870 pub found: bool,
8871 #[serde(default, skip_serializing_if = "Option::is_none")]
8872 pub source: Option<RawJson>,
8873 #[serde(default, skip_serializing_if = "Option::is_none")]
8874 pub sequence: Option<U64>,
8875 #[serde(default, skip_serializing_if = "Option::is_none")]
8876 pub primary_term: Option<U64>,
8877}
8878
8879#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8880#[serde(deny_unknown_fields)]
8881pub struct SearchRequest {
8882 #[serde(default, skip_serializing_if = "Option::is_none")]
8883 pub indexes: Option<Vec<Resource>>,
8884 #[serde(default, skip_serializing_if = "Option::is_none")]
8885 pub query: Option<Query>,
8886 #[serde(default, skip_serializing_if = "Option::is_none")]
8887 pub retrieval: Option<RetrievalPlan>,
8888 #[serde(default, skip_serializing_if = "Option::is_none")]
8889 pub aggregations: Option<Vec<Aggregation>>,
8890 pub sort: Vec<SortSpec>,
8891 #[serde(default, skip_serializing_if = "Option::is_none")]
8892 pub routing: Option<Vec<String>>,
8893 pub freshness: SearchFreshness,
8894 pub page_size: u32,
8895 #[serde(default, skip_serializing_if = "Option::is_none")]
8896 pub cursor: Option<Cursor>,
8897 #[serde(default, skip_serializing_if = "Option::is_none")]
8898 pub pit: Option<Cursor>,
8899 pub allow_partial: bool,
8900 #[serde(default, skip_serializing_if = "Option::is_none")]
8901 pub total_hits_threshold: Option<U64>,
8902 pub diagnostics: bool,
8903 #[serde(default, skip_serializing_if = "Option::is_none")]
8904 pub fragments: Option<FragmentRequest>,
8905 #[serde(default, skip_serializing_if = "Option::is_none")]
8906 pub features: Option<ResultFeatureRequest>,
8907 #[serde(default, skip_serializing_if = "Option::is_none")]
8908 pub diversification: Option<ResultDiversification>,
8909 #[serde(default, skip_serializing_if = "Option::is_none")]
8910 pub source_projection: Option<SourceProjection>,
8911}
8912
8913#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8914#[serde(deny_unknown_fields)]
8915pub struct SearchResult {
8916 pub hits: Vec<SearchHit>,
8917 pub aggregations: Vec<AggregationResult>,
8918 #[serde(default, skip_serializing_if = "Option::is_none")]
8919 pub next_cursor: Option<Cursor>,
8920 pub timed_out: bool,
8921 pub partial: bool,
8922 pub achieved: SearchAchievement,
8923 pub shards: ShardCounts,
8924 pub total: SearchTotal,
8925 pub failures: Vec<SearchPartialFailure>,
8926 pub vector_diagnostics: Vec<VectorBranchDiagnostics>,
8927 #[serde(default, skip_serializing_if = "Option::is_none")]
8928 pub read_cut: Option<ReadCutEvidence>,
8929}
8930
8931#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8932#[serde(deny_unknown_fields)]
8933pub struct TraverseRelationshipsRequest {
8934 pub pit: Cursor,
8935 pub indexes: Vec<Resource>,
8936 pub seeds: Vec<EntityRef>,
8937 pub direction: RelationshipTraversalDirection,
8938 pub filter: RelationshipTraversalFilter,
8939 pub budget: RelationshipTraversalBudget,
8940 pub allow_partial: bool,
8941}
8942
8943#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8944#[serde(deny_unknown_fields)]
8945pub struct TraverseRelationshipsResult {
8946 pub relationships: Vec<TraversedRelationship>,
8947 pub visited_entities: Vec<EntityRef>,
8948 pub input_cut_digest: Digest,
8949 pub partial: bool,
8950 pub incomplete_frontier: Vec<EntityRef>,
8951 pub failures: Vec<SearchPartialFailure>,
8952}
8953
8954#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8955#[serde(deny_unknown_fields)]
8956pub struct QueryProfilesRequest {
8957 pub pit: Cursor,
8958 pub indexes: Vec<Resource>,
8959 pub operation: ProfileQueryOperation,
8960 pub start_unix_nanos: U64,
8961 pub end_unix_nanos: U64,
8962 pub sample_type: String,
8963 pub unit: String,
8964 pub filter: ProfileQueryFilter,
8965 #[serde(default, skip_serializing_if = "Option::is_none")]
8966 pub group_by: Option<ProfileGroupBy>,
8967 pub budget: ProfileQueryBudget,
8968 pub allow_partial: bool,
8969}
8970
8971#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8972#[serde(deny_unknown_fields)]
8973pub struct QueryProfilesResult {
8974 pub rows: Vec<ProfileQueryRow>,
8975 pub evaluated_batches: u32,
8976 pub evaluated_samples: u32,
8977 pub input_cut_digest: Digest,
8978 pub partial: bool,
8979 pub approximate: bool,
8980 pub failures: Vec<SearchPartialFailure>,
8981}
8982
8983#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8984#[serde(deny_unknown_fields)]
8985pub struct EvaluateTemporalEvidenceRequest {
8986 pub pit: Cursor,
8987 pub definition: HistoricalTemporalDefinition,
8988}
8989
8990#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8991#[serde(deny_unknown_fields)]
8992pub struct EvaluateTemporalEvidenceResult {
8993 pub evidence: Vec<TemporalEvidence>,
8994 pub input_cut_digest: Digest,
8995 pub pattern_digest: Digest,
8996 pub evaluated_events: u32,
8997}
8998
8999#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9000#[serde(deny_unknown_fields)]
9001pub struct CreateContinuousTemporalEvaluationRequest {
9002 pub action_id: Digest,
9003 pub definition: ContinuousTemporalDefinition,
9004}
9005
9006#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9007#[serde(deny_unknown_fields)]
9008pub struct CreateContinuousTemporalEvaluationResult {
9009 pub evaluation: ContinuousTemporalEvaluation,
9010 pub mutation_outcome: MutationOutcome,
9011}
9012
9013#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9014#[serde(deny_unknown_fields)]
9015pub struct GetContinuousTemporalEvaluationRequest {
9016 pub evaluation_id: Identity,
9017}
9018
9019#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9020#[serde(deny_unknown_fields)]
9021pub struct GetContinuousTemporalEvaluationResult {
9022 pub evaluation: ContinuousTemporalEvaluation,
9023}
9024
9025#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9026#[serde(deny_unknown_fields)]
9027pub struct PauseContinuousTemporalEvaluationRequest {
9028 pub action_id: Digest,
9029 pub evaluation_id: Identity,
9030 pub expected_revision: U64,
9031}
9032
9033#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9034#[serde(deny_unknown_fields)]
9035pub struct PauseContinuousTemporalEvaluationResult {
9036 pub evaluation: ContinuousTemporalEvaluation,
9037 pub mutation_outcome: MutationOutcome,
9038}
9039
9040#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9041#[serde(deny_unknown_fields)]
9042pub struct ResumeContinuousTemporalEvaluationRequest {
9043 pub action_id: Digest,
9044 pub evaluation_id: Identity,
9045 pub expected_revision: U64,
9046}
9047
9048#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9049#[serde(deny_unknown_fields)]
9050pub struct ResumeContinuousTemporalEvaluationResult {
9051 pub evaluation: ContinuousTemporalEvaluation,
9052 pub mutation_outcome: MutationOutcome,
9053}
9054
9055#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9056#[serde(deny_unknown_fields)]
9057pub struct ReplaceContinuousTemporalEvaluationRequest {
9058 pub action_id: Digest,
9059 pub expected_revision: U64,
9060 pub definition: ContinuousTemporalDefinition,
9061}
9062
9063#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9064#[serde(deny_unknown_fields)]
9065pub struct ReplaceContinuousTemporalEvaluationResult {
9066 pub evaluation: ContinuousTemporalEvaluation,
9067 pub mutation_outcome: MutationOutcome,
9068}
9069
9070#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9071#[serde(deny_unknown_fields)]
9072pub struct RetireContinuousTemporalEvaluationRequest {
9073 pub action_id: Digest,
9074 pub evaluation_id: Identity,
9075 pub expected_revision: U64,
9076}
9077
9078#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9079#[serde(deny_unknown_fields)]
9080pub struct RetireContinuousTemporalEvaluationResult {
9081 #[serde(default, skip_serializing_if = "Option::is_none")]
9082 pub evaluation: Option<ContinuousTemporalEvaluation>,
9083 pub mutation_outcome: MutationOutcome,
9084}
9085
9086#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9087#[serde(deny_unknown_fields)]
9088pub struct ReadContinuousTemporalEvidenceRequest {
9089 pub evaluation_id: Identity,
9090 pub expected_revision: U64,
9091 pub minimum_event_time_unix_nanos: U64,
9092 pub page_size: u32,
9093 #[serde(default, skip_serializing_if = "Option::is_none")]
9094 pub cursor: Option<Cursor>,
9095}
9096
9097#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9098#[serde(deny_unknown_fields)]
9099pub struct ReadContinuousTemporalEvidenceResult {
9100 pub evidence: Vec<TemporalEvidence>,
9101 #[serde(default, skip_serializing_if = "Option::is_none")]
9102 pub next_cursor: Option<Cursor>,
9103 pub retained_floor_unix_nanos: U64,
9104 pub evaluation_revision: U64,
9105}
9106
9107#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9108#[serde(deny_unknown_fields)]
9109pub struct ValidateSearchRequest {
9110 pub indexes: Vec<Resource>,
9111 #[serde(default, skip_serializing_if = "Option::is_none")]
9112 pub query: Option<Query>,
9113 #[serde(default, skip_serializing_if = "Option::is_none")]
9114 pub retrieval: Option<RetrievalPlan>,
9115 #[serde(default, skip_serializing_if = "Option::is_none")]
9116 pub aggregations: Option<Vec<Aggregation>>,
9117 pub sort: Vec<SortSpec>,
9118 #[serde(default, skip_serializing_if = "Option::is_none")]
9119 pub routing: Option<Vec<String>>,
9120 pub freshness: SearchFreshness,
9121 pub page_size: u32,
9122 pub allow_partial: bool,
9123 #[serde(default, skip_serializing_if = "Option::is_none")]
9124 pub total_hits_threshold: Option<U64>,
9125 #[serde(default, skip_serializing_if = "Option::is_none")]
9126 pub fragments: Option<FragmentRequest>,
9127 #[serde(default, skip_serializing_if = "Option::is_none")]
9128 pub features: Option<ResultFeatureRequest>,
9129 #[serde(default, skip_serializing_if = "Option::is_none")]
9130 pub diversification: Option<ResultDiversification>,
9131 #[serde(default, skip_serializing_if = "Option::is_none")]
9132 pub source_projection: Option<SourceProjection>,
9133}
9134
9135#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9136#[serde(deny_unknown_fields)]
9137pub struct ValidateSearchResult {
9138 pub catalog_revision: U64,
9139 pub resolved_indexes: Vec<Resource>,
9140 pub authorized: bool,
9141 pub capabilities: Vec<String>,
9142 pub shape_digest: Digest,
9143 pub warnings: Vec<String>,
9144 pub refusals: Vec<String>,
9145 pub limits: Vec<SearchValidationLimit>,
9146 pub estimates: SearchValidationEstimates,
9147}
9148
9149#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9150#[serde(deny_unknown_fields)]
9151pub struct OpenPitRequest {
9152 pub indexes: Vec<Resource>,
9153 pub keep_alive_millis: U64,
9154}
9155
9156#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9157#[serde(deny_unknown_fields)]
9158pub struct OpenPitResult {
9159 pub pit: Cursor,
9160 pub expires_at: U64,
9161 pub shard_count: u32,
9162 pub read_cut: ReadCutEvidence,
9163}
9164
9165#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9166#[serde(deny_unknown_fields)]
9167pub struct RenewPitRequest {
9168 pub pit: Cursor,
9169 pub keep_alive_millis: U64,
9170}
9171
9172#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9173#[serde(deny_unknown_fields)]
9174pub struct RenewPitResult {
9175 pub pit: Cursor,
9176 pub expires_at: U64,
9177 pub shard_count: u32,
9178 pub read_cut: ReadCutEvidence,
9179}
9180
9181#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9182#[serde(deny_unknown_fields)]
9183pub struct ClosePitRequest {
9184 pub pit: Cursor,
9185}
9186
9187#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9188#[serde(deny_unknown_fields)]
9189pub struct ClosePitResult {
9190 pub removed: bool,
9191}
9192
9193#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9194#[serde(deny_unknown_fields)]
9195pub struct ListOperationsRequest {
9196 pub page_size: u32,
9197 #[serde(default, skip_serializing_if = "Option::is_none")]
9198 pub cursor: Option<Cursor>,
9199}
9200
9201#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9202#[serde(deny_unknown_fields)]
9203pub struct ListOperationsResult {
9204 pub items: Vec<Operation>,
9205 #[serde(default, skip_serializing_if = "Option::is_none")]
9206 pub next_cursor: Option<Cursor>,
9207}
9208
9209#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9210#[serde(deny_unknown_fields)]
9211pub struct GetOperationRequest {
9212 pub locator: Locator,
9213}
9214
9215#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9216#[serde(deny_unknown_fields)]
9217pub struct GetOperationResult {
9218 pub operation: Operation,
9219}
9220
9221#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9222#[serde(deny_unknown_fields)]
9223pub struct WaitOperationRequest {
9224 pub locator: Locator,
9225 pub after_authority_revision: U64,
9226 pub maximum_attempts: u32,
9227 pub interval_millis: U64,
9228}
9229
9230#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9231#[serde(deny_unknown_fields)]
9232pub struct WaitOperationResult {
9233 pub operation: Operation,
9234 pub attempts: u32,
9235}
9236
9237#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9238#[serde(deny_unknown_fields)]
9239pub struct CancelOperationRequest {
9240 pub locator: Locator,
9241 pub expected_authority_revision: U64,
9242 pub cancel_action: Identity,
9243}
9244
9245#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9246#[serde(deny_unknown_fields)]
9247pub struct CancelOperationResult {
9248 pub locator: Locator,
9249 pub cancel_generation: U64,
9250 pub mutation_outcome: MutationOutcome,
9251}
9252
9253#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9254#[serde(deny_unknown_fields)]
9255pub struct ListAuditEventsRequest {
9256 pub start_time: U64,
9257 pub end_time: U64,
9258 pub actions: Vec<String>,
9259 pub page_size: u32,
9260 #[serde(default, skip_serializing_if = "Option::is_none")]
9261 pub cursor: Option<Cursor>,
9262}
9263
9264#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9265#[serde(deny_unknown_fields)]
9266pub struct ListAuditEventsResult {
9267 pub stream: AuditStreamState,
9268 pub events: Vec<AuditEvent>,
9269 #[serde(default, skip_serializing_if = "Option::is_none")]
9270 pub next_cursor: Option<Cursor>,
9271 pub gaps: Vec<AuditGap>,
9272 pub object_reads: u32,
9273}
9274
9275#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9276#[serde(deny_unknown_fields)]
9277pub struct ExportAuditEventsRequest {
9278 pub start_time: U64,
9279 pub end_time: U64,
9280 pub actions: Vec<String>,
9281 pub page_size: u32,
9282 #[serde(default, skip_serializing_if = "Option::is_none")]
9283 pub cursor: Option<Cursor>,
9284}
9285
9286#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9287#[serde(deny_unknown_fields)]
9288pub struct ExportAuditEventsResult {
9289 pub stream: AuditStreamState,
9290 pub events: Vec<AuditEvent>,
9291 #[serde(default, skip_serializing_if = "Option::is_none")]
9292 pub next_cursor: Option<Cursor>,
9293 pub gaps: Vec<AuditGap>,
9294 pub object_reads: u32,
9295}
9296
9297#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9298#[serde(deny_unknown_fields)]
9299pub struct ReserveServiceCredentialRequest {
9300 pub reservation_action_id: Digest,
9301 pub activation_action_id: Digest,
9302 pub role_grants: Vec<ServiceCredentialGrant>,
9303 pub credential_expires_at: U64,
9304 pub reservation_expires_at: U64,
9305}
9306
9307#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9308#[serde(deny_unknown_fields)]
9309pub struct ReserveServiceCredentialResult {
9310 pub reservation: ServiceCredentialReservation,
9311}
9312
9313#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9314#[serde(deny_unknown_fields)]
9315pub struct ReserveServiceCredentialRotationRequest {
9316 pub reservation_action_id: Digest,
9317 pub activation_action_id: Digest,
9318 pub current_api_key_id: Identity,
9319 pub expected_generation: U64,
9320 pub credential_expires_at: U64,
9321 pub overlap_until: U64,
9322 pub reservation_expires_at: U64,
9323}
9324
9325#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9326#[serde(deny_unknown_fields)]
9327pub struct ReserveServiceCredentialRotationResult {
9328 pub reservation: ServiceCredentialReservation,
9329}
9330
9331#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9332#[serde(deny_unknown_fields)]
9333pub struct ActivateServiceCredentialRequest {
9334 pub reservation: ServiceCredentialReservation,
9335 pub verifier: Digest,
9336}
9337
9338#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9339#[serde(deny_unknown_fields)]
9340pub struct ActivateServiceCredentialResult {
9341 pub locator: Locator,
9342 pub outcome: SecurityActionOutcome,
9343 pub secret_escrowed: bool,
9344}
9345
9346#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9347#[serde(deny_unknown_fields)]
9348pub struct ResolveServiceCredentialReservationRequest {
9349 pub reservation_action_id: Digest,
9350}
9351
9352#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9353#[serde(deny_unknown_fields)]
9354pub struct ResolveServiceCredentialReservationResult {
9355 pub state: String,
9356 #[serde(default, skip_serializing_if = "Option::is_none")]
9357 pub reservation: Option<ServiceCredentialReservation>,
9358 #[serde(default, skip_serializing_if = "Option::is_none")]
9359 pub outcome: Option<SecurityActionOutcome>,
9360}
9361
9362#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9363#[serde(deny_unknown_fields)]
9364pub struct PrepareRevokeServiceCredentialRequest {
9365 pub api_key_id: Identity,
9366 pub expected_generation: U64,
9367}
9368
9369#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9370#[serde(deny_unknown_fields)]
9371pub struct PrepareRevokeServiceCredentialResult {
9372 pub locator: Locator,
9373 pub semantic_digest: Digest,
9374 pub expires_at: U64,
9375}
9376
9377#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9378#[serde(deny_unknown_fields)]
9379pub struct RevokeServiceCredentialRequest {
9380 pub locator: Locator,
9381 pub api_key_id: Identity,
9382 pub expected_generation: U64,
9383}
9384
9385#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9386#[serde(deny_unknown_fields)]
9387pub struct RevokeServiceCredentialResult {
9388 pub locator: Locator,
9389 pub principal_id: Identity,
9390 pub api_key_id: Identity,
9391 pub state: String,
9392}
9393
9394#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9395#[serde(deny_unknown_fields)]
9396pub struct ResolveSecurityActionRequest {
9397 pub locator: Locator,
9398}
9399
9400#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9401#[serde(deny_unknown_fields)]
9402pub struct ResolveSecurityActionResult {
9403 pub locator: Locator,
9404 pub state: String,
9405 #[serde(default, skip_serializing_if = "Option::is_none")]
9406 pub result: Option<SecurityActionOutcome>,
9407 pub secret_escrowed: bool,
9408}
9409
9410#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9411#[serde(deny_unknown_fields)]
9412pub struct GetSecurityRoleRequest {
9413 pub role_name: String,
9414}
9415
9416#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9417#[serde(deny_unknown_fields)]
9418pub struct GetSecurityRoleResult {
9419 pub role: SecurityRole,
9420}
9421
9422#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9423#[serde(deny_unknown_fields)]
9424pub struct PrepareRoleAppendAccessChangeRequest {
9425 pub role_name: String,
9426 pub expected_role_version: U64,
9427 pub changes: Vec<RoleAppendScopeChange>,
9428}
9429
9430#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9431#[serde(deny_unknown_fields)]
9432pub struct PrepareRoleAppendAccessChangeResult {
9433 pub preparation: RoleAppendAccessPreparation,
9434}
9435
9436#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9437#[serde(deny_unknown_fields)]
9438pub struct SubmitRoleAppendAccessChangeRequest {
9439 pub locator: Locator,
9440 pub semantic_digest: Digest,
9441 pub role_name: String,
9442 pub expected_role_version: U64,
9443 pub changes: Vec<RoleAppendScopeChange>,
9444}
9445
9446#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9447#[serde(deny_unknown_fields)]
9448pub struct SubmitRoleAppendAccessChangeResult {
9449 pub locator: Locator,
9450 pub state: String,
9451 pub target_policy_revision: U64,
9452 pub role: SecurityRole,
9453}
9454
9455#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9456#[serde(deny_unknown_fields)]
9457pub struct ListServiceCredentialsRequest {
9458 pub page_size: u32,
9459 #[serde(default, skip_serializing_if = "Option::is_none")]
9460 pub cursor: Option<Cursor>,
9461}
9462
9463#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9464#[serde(deny_unknown_fields)]
9465pub struct ListServiceCredentialsResult {
9466 pub items: Vec<ServiceCredentialSummary>,
9467 #[serde(default, skip_serializing_if = "Option::is_none")]
9468 pub next_cursor: Option<Cursor>,
9469}
9470
9471#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9472#[serde(deny_unknown_fields)]
9473pub struct GetRuntimeStatusRequest {}
9474
9475#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9476#[serde(deny_unknown_fields)]
9477pub struct GetRuntimeStatusResult {
9478 pub ready: bool,
9479 pub recovery_era: Identity,
9480 pub catalog_revision: U64,
9481 pub policy_revision: U64,
9482 pub redacted: RuntimeStatusDetail,
9483}
9484
9485#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9486#[serde(deny_unknown_fields)]
9487pub struct GetResultCacheStatusRequest {}
9488
9489#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9490#[serde(deny_unknown_fields)]
9491pub struct GetResultCacheStatusResult {
9492 pub status: ResultCacheStatus,
9493}
9494
9495#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9496#[serde(deny_unknown_fields)]
9497pub struct GetFieldPromotionStatusRequest {
9498 pub index: Resource,
9499}
9500
9501#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9502#[serde(deny_unknown_fields)]
9503pub struct GetFieldPromotionStatusResult {
9504 pub status: FieldPromotionStatus,
9505}
9506
9507#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9508#[serde(deny_unknown_fields)]
9509pub struct GetOverloadStatusRequest {
9510 pub index: Resource,
9511}
9512
9513#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9514#[serde(deny_unknown_fields)]
9515pub struct GetOverloadStatusResult {
9516 pub runtime_observed: bool,
9517 pub shards: Vec<OverloadShardStatus>,
9518}
9519
9520#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9521#[serde(deny_unknown_fields)]
9522pub struct ConfigureExternalKeyRequest {
9523 pub index: Resource,
9524 pub expected_authority_revision: U64,
9525 pub binding: ExternalKeyBinding,
9526}
9527
9528#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9529#[serde(deny_unknown_fields)]
9530pub struct ConfigureExternalKeyResult {
9531 pub status: LifecycleStatus,
9532 pub mutation_outcome: MutationOutcome,
9533}
9534
9535#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9536#[serde(deny_unknown_fields)]
9537pub struct RotateExternalKeyBindingRequest {
9538 pub index: Resource,
9539 pub expected_authority_revision: U64,
9540 pub predecessor_binding_id: Identity,
9541 pub binding: ExternalKeyBinding,
9542}
9543
9544#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9545#[serde(deny_unknown_fields)]
9546pub struct RotateExternalKeyBindingResult {
9547 pub status: LifecycleStatus,
9548 pub mutation_outcome: MutationOutcome,
9549}
9550
9551#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9552#[serde(deny_unknown_fields)]
9553pub struct ConfigureAggregateThenDeleteRequest {
9554 pub index: Resource,
9555 pub expected_authority_revision: U64,
9556 pub policy: AggregateThenDeletePolicy,
9557}
9558
9559#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9560#[serde(deny_unknown_fields)]
9561pub struct ConfigureAggregateThenDeleteResult {
9562 pub status: LifecycleStatus,
9563 pub mutation_outcome: MutationOutcome,
9564}
9565
9566#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9567#[serde(deny_unknown_fields)]
9568pub struct GetLifecycleStatusRequest {
9569 pub index: Resource,
9570}
9571
9572#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9573#[serde(deny_unknown_fields)]
9574pub struct GetLifecycleStatusResult {
9575 pub status: LifecycleStatus,
9576}
9577
9578#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9579#[serde(deny_unknown_fields)]
9580pub struct GetQuotaRequest {}
9581
9582#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9583#[serde(deny_unknown_fields)]
9584pub struct GetQuotaResult {
9585 pub revision: U64,
9586 pub limits: Vec<QuotaLimit>,
9587 pub usage: Vec<QuotaConsumption>,
9588}
9589
9590#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9591#[serde(deny_unknown_fields)]
9592pub struct UpdateQuotaRequest {
9593 pub expected_revision: U64,
9594 pub limits: Vec<QuotaLimit>,
9595}
9596
9597#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9598#[serde(deny_unknown_fields)]
9599pub struct UpdateQuotaResult {
9600 pub update: QuotaUpdate,
9601}
9602
9603#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9604#[serde(deny_unknown_fields)]
9605pub struct GetBindingRequest {}
9606
9607#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9608#[serde(deny_unknown_fields)]
9609pub struct GetBindingResult {
9610 pub binding: CoreBinding,
9611 pub derived: bool,
9612 pub revision: U64,
9613}
9614
9615#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9616#[serde(deny_unknown_fields)]
9617pub struct GetAdmissionStatusRequest {}
9618
9619#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9620#[serde(deny_unknown_fields)]
9621pub struct GetAdmissionStatusResult {
9622 pub state: String,
9623 pub revision: U64,
9624 pub converged: bool,
9625}
9626
9627#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9628#[serde(deny_unknown_fields)]
9629pub struct SetAdmissionRequest {
9630 pub expected_revision: U64,
9631 pub state: String,
9632}
9633
9634#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9635#[serde(deny_unknown_fields)]
9636pub struct SetAdmissionResult {
9637 pub state: String,
9638 pub revision: U64,
9639 pub converged: bool,
9640}
9641
9642#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9643#[serde(deny_unknown_fields)]
9644pub struct GetQuiesceStatusRequest {}
9645
9646#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9647#[serde(deny_unknown_fields)]
9648pub struct GetQuiesceStatusResult {
9649 pub ready: bool,
9650 pub blockers: Vec<String>,
9651 pub observations: Vec<ReadinessObservation>,
9652 pub recovery_era: Identity,
9653 pub observed_at: U64,
9654 pub expires_at: U64,
9655}
9656
9657#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9658#[serde(deny_unknown_fields)]
9659pub struct GetDecommissionReadinessRequest {}
9660
9661#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9662#[serde(deny_unknown_fields)]
9663pub struct GetDecommissionReadinessResult {
9664 pub ready: bool,
9665 pub blockers: Vec<String>,
9666 pub observations: Vec<ReadinessObservation>,
9667 pub recovery_era: Identity,
9668 pub observed_at: U64,
9669 pub expires_at: U64,
9670}
9671
9672#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9673#[serde(deny_unknown_fields)]
9674pub struct GetUpgradeReadinessRequest {}
9675
9676#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9677#[serde(deny_unknown_fields)]
9678pub struct GetUpgradeReadinessResult {
9679 pub ready: bool,
9680 pub blockers: Vec<String>,
9681 pub observations: Vec<ReadinessObservation>,
9682 pub recovery_era: Identity,
9683 pub observed_at: U64,
9684 pub expires_at: U64,
9685}
9686
9687#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9688#[serde(deny_unknown_fields)]
9689pub struct GetMaintenanceStatusRequest {
9690 pub page_size: u32,
9691 #[serde(default, skip_serializing_if = "Option::is_none")]
9692 pub cursor: Option<Cursor>,
9693 #[serde(default, skip_serializing_if = "Option::is_none")]
9694 pub index: Option<Resource>,
9695}
9696
9697#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9698#[serde(deny_unknown_fields)]
9699pub struct GetMaintenanceStatusResult {
9700 pub aggregate: MaintenanceStatusAggregate,
9701 pub items: Vec<MaintenanceTaskStatus>,
9702 #[serde(default, skip_serializing_if = "Option::is_none")]
9703 pub next_cursor: Option<Cursor>,
9704}
9705
9706#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9707#[serde(deny_unknown_fields)]
9708pub struct WarmVectorIndexRequest {
9709 pub index: Resource,
9710 #[serde(default, skip_serializing_if = "Option::is_none")]
9711 pub expected_root_digest: Option<Digest>,
9712 pub components: Vec<VectorWarmComponent>,
9713 pub maximum_requests: u32,
9714 pub maximum_bytes: U64,
9715 pub maximum_achievements: u32,
9716 pub expires_at: U64,
9717}
9718
9719#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9720#[serde(deny_unknown_fields)]
9721pub struct WarmVectorIndexResult {
9722 pub result: VectorWarmResult,
9723}
9724
9725#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9726#[serde(deny_unknown_fields)]
9727pub struct EvaluateVectorRecallRequest {
9728 pub action_id: Digest,
9729 pub index: Resource,
9730 pub field: String,
9731 pub mapping_generation: U64,
9732 pub snapshot: VectorEvaluationSnapshot,
9733 pub query_set: VectorEvaluationQuerySet,
9734 #[serde(default, skip_serializing_if = "Option::is_none")]
9735 pub filter: Option<Query>,
9736 pub metric: VectorMetric,
9737 pub k: u32,
9738 pub candidate_policy: VectorCandidatePolicy,
9739 pub budget: VectorEvaluationBudget,
9740 pub maximum_bytes: U64,
9741}
9742
9743#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9744#[serde(deny_unknown_fields)]
9745pub struct EvaluateVectorRecallResult {
9746 pub operation: Operation,
9747}
9748
9749#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9750#[serde(deny_unknown_fields)]
9751pub struct CalibrateVectorStrategyRequest {
9752 pub action_id: Digest,
9753 pub index: Resource,
9754 pub field: String,
9755 pub mapping_generation: U64,
9756 pub snapshot: VectorEvaluationSnapshot,
9757 pub query_set: VectorEvaluationQuerySet,
9758 #[serde(default, skip_serializing_if = "Option::is_none")]
9759 pub filter: Option<Query>,
9760 pub metric: VectorMetric,
9761 pub k: u32,
9762 pub objective: VectorCalibrationObjective,
9763 pub minimum_recall_basis_points: u32,
9764 pub budget: VectorEvaluationBudget,
9765 pub maximum_bytes: U64,
9766}
9767
9768#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9769#[serde(deny_unknown_fields)]
9770pub struct CalibrateVectorStrategyResult {
9771 pub operation: Operation,
9772}
9773
9774#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9775#[serde(deny_unknown_fields)]
9776pub struct GetVectorDiagnosticRequest {
9777 pub locator: Locator,
9778}
9779
9780#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9781#[serde(deny_unknown_fields)]
9782pub struct GetVectorDiagnosticResult {
9783 pub operation: Operation,
9784 pub artifacts: Vec<Artifact>,
9785 #[serde(default, skip_serializing_if = "Option::is_none")]
9786 pub result: Option<VectorDiagnosticResult>,
9787}
9788
9789#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9790#[serde(deny_unknown_fields)]
9791pub struct CreateDiagnosticRequest {
9792 pub scope: String,
9793 pub maximum_bytes: U64,
9794}
9795
9796#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9797#[serde(deny_unknown_fields)]
9798pub struct CreateDiagnosticResult {
9799 pub operation: Operation,
9800}
9801
9802#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9803#[serde(deny_unknown_fields)]
9804pub struct GetDiagnosticRequest {
9805 pub locator: Locator,
9806}
9807
9808#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9809#[serde(deny_unknown_fields)]
9810pub struct GetDiagnosticResult {
9811 pub operation: Operation,
9812 pub artifacts: Vec<Artifact>,
9813}
9814
9815#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9816#[serde(deny_unknown_fields)]
9817pub struct PrepareCollectionExportRequest {
9818 pub action_id: Digest,
9819 pub storage: PortabilityStorageCapability,
9820}
9821
9822#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9823#[serde(deny_unknown_fields)]
9824pub struct PrepareCollectionExportResult {
9825 pub semantic_digest: Digest,
9826 pub maximum_bytes: U64,
9827}
9828
9829#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9830#[serde(deny_unknown_fields)]
9831pub struct StartCollectionExportRequest {
9832 pub action_id: Digest,
9833 pub semantic_digest: Digest,
9834 pub storage: PortabilityStorageCapability,
9835}
9836
9837#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9838#[serde(deny_unknown_fields)]
9839pub struct StartCollectionExportResult {
9840 pub operation: Operation,
9841}
9842
9843#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9844#[serde(deny_unknown_fields)]
9845pub struct ResolveCollectionExportRequest {
9846 pub action_id: Digest,
9847 pub semantic_digest: Digest,
9848 pub storage: PortabilityStorageCapability,
9849}
9850
9851#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9852#[serde(deny_unknown_fields)]
9853pub struct ResolveCollectionExportResult {
9854 #[serde(default, skip_serializing_if = "Option::is_none")]
9855 pub operation: Option<Operation>,
9856 #[serde(default, skip_serializing_if = "Option::is_none")]
9857 pub artifact: Option<CollectionExportArtifact>,
9858 pub expired_unknown: bool,
9859}
9860
9861#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9862#[serde(deny_unknown_fields)]
9863pub struct VerifyCollectionExportRequest {
9864 pub artifact: CollectionExportArtifact,
9865 pub storage: PortabilityStorageCapability,
9866}
9867
9868#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9869#[serde(deny_unknown_fields)]
9870pub struct VerifyCollectionExportResult {
9871 pub verified: bool,
9872 pub source_collection_id: Identity,
9873 pub source_catalog_revision: U64,
9874 pub index_count: u32,
9875 pub document_count: U64,
9876}
9877
9878#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9879#[serde(deny_unknown_fields)]
9880pub struct PrepareCollectionExportRetirementRequest {
9881 pub action_id: Digest,
9882 pub artifact: CollectionExportArtifact,
9883 pub storage: PortabilityStorageCapability,
9884}
9885
9886#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9887#[serde(deny_unknown_fields)]
9888pub struct PrepareCollectionExportRetirementResult {
9889 pub semantic_digest: Digest,
9890 pub maximum_bytes: U64,
9891}
9892
9893#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9894#[serde(deny_unknown_fields)]
9895pub struct StartCollectionExportRetirementRequest {
9896 pub action_id: Digest,
9897 pub semantic_digest: Digest,
9898 pub artifact: CollectionExportArtifact,
9899 pub storage: PortabilityStorageCapability,
9900}
9901
9902#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9903#[serde(deny_unknown_fields)]
9904pub struct StartCollectionExportRetirementResult {
9905 pub operation: Operation,
9906}
9907
9908#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9909#[serde(deny_unknown_fields)]
9910pub struct ResolveCollectionExportRetirementRequest {
9911 pub action_id: Digest,
9912 pub semantic_digest: Digest,
9913 pub artifact: CollectionExportArtifact,
9914 pub storage: PortabilityStorageCapability,
9915}
9916
9917#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9918#[serde(deny_unknown_fields)]
9919pub struct ResolveCollectionExportRetirementResult {
9920 #[serde(default, skip_serializing_if = "Option::is_none")]
9921 pub operation: Option<Operation>,
9922 #[serde(default, skip_serializing_if = "Option::is_none")]
9923 pub retirement: Option<CollectionExportRetirement>,
9924 pub expired_unknown: bool,
9925}
9926
9927#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9928#[serde(deny_unknown_fields)]
9929pub struct PrepareCollectionRestoreRequest {
9930 pub action_id: Digest,
9931 pub artifact: CollectionExportArtifact,
9932 pub storage: PortabilityStorageCapability,
9933}
9934
9935#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9936#[serde(deny_unknown_fields)]
9937pub struct PrepareCollectionRestoreResult {
9938 pub semantic_digest: Digest,
9939 pub source_collection_id: Identity,
9940 pub maximum_bytes: U64,
9941}
9942
9943#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9944#[serde(deny_unknown_fields)]
9945pub struct StartCollectionRestoreRequest {
9946 pub action_id: Digest,
9947 pub semantic_digest: Digest,
9948 pub artifact: CollectionExportArtifact,
9949 pub storage: PortabilityStorageCapability,
9950}
9951
9952#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9953#[serde(deny_unknown_fields)]
9954pub struct StartCollectionRestoreResult {
9955 pub operation: Operation,
9956}
9957
9958#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9959#[serde(deny_unknown_fields)]
9960pub struct ResolveCollectionRestoreRequest {
9961 pub action_id: Digest,
9962 pub semantic_digest: Digest,
9963 pub artifact: CollectionExportArtifact,
9964 pub storage: PortabilityStorageCapability,
9965}
9966
9967#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9968#[serde(deny_unknown_fields)]
9969pub struct ResolveCollectionRestoreResult {
9970 #[serde(default, skip_serializing_if = "Option::is_none")]
9971 pub operation: Option<Operation>,
9972 pub expired_unknown: bool,
9973}
9974
9975#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9976#[serde(deny_unknown_fields)]
9977pub struct PrepareIndexExportRequest {
9978 pub action_id: Digest,
9979 pub index: Resource,
9980 pub storage: PortabilityStorageCapability,
9981 pub maximum_records: u32,
9982 pub maximum_pages: u32,
9983 pub maximum_page_bytes: U64,
9984}
9985
9986#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9987#[serde(deny_unknown_fields)]
9988pub struct PrepareIndexExportResult {
9989 pub semantic_digest: Digest,
9990 pub maximum_bytes: U64,
9991}
9992
9993#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9994#[serde(deny_unknown_fields)]
9995pub struct StartIndexExportRequest {
9996 pub action_id: Digest,
9997 pub semantic_digest: Digest,
9998 pub index: Resource,
9999 pub storage: PortabilityStorageCapability,
10000 pub maximum_records: u32,
10001 pub maximum_pages: u32,
10002 pub maximum_page_bytes: U64,
10003}
10004
10005#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10006#[serde(deny_unknown_fields)]
10007pub struct StartIndexExportResult {
10008 pub operation: Operation,
10009}
10010
10011#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10012#[serde(deny_unknown_fields)]
10013pub struct ResolveIndexExportRequest {
10014 pub action_id: Digest,
10015 pub semantic_digest: Digest,
10016 pub index: Resource,
10017 pub storage: PortabilityStorageCapability,
10018 pub maximum_records: u32,
10019 pub maximum_pages: u32,
10020 pub maximum_page_bytes: U64,
10021}
10022
10023#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10024#[serde(deny_unknown_fields)]
10025pub struct ResolveIndexExportResult {
10026 #[serde(default, skip_serializing_if = "Option::is_none")]
10027 pub operation: Option<Operation>,
10028 #[serde(default, skip_serializing_if = "Option::is_none")]
10029 pub artifact: Option<IndexTransferArtifact>,
10030 pub expired_unknown: bool,
10031}
10032
10033#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10034#[serde(deny_unknown_fields)]
10035pub struct VerifyIndexExportRequest {
10036 pub artifact: IndexTransferArtifact,
10037 pub storage: PortabilityStorageCapability,
10038}
10039
10040#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10041#[serde(deny_unknown_fields)]
10042pub struct VerifyIndexExportResult {
10043 pub verified: bool,
10044 pub source_cluster_storage_id: Identity,
10045 pub source_collection_id: Identity,
10046 pub source_index: Resource,
10047 pub source_catalog_revision: U64,
10048 pub source_cut_digest: Digest,
10049 pub page_count: u32,
10050 pub record_count: u32,
10051}
10052
10053#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10054#[serde(deny_unknown_fields)]
10055pub struct PrepareIndexImportRequest {
10056 pub action_id: Digest,
10057 pub artifact: IndexTransferArtifact,
10058 pub storage: PortabilityStorageCapability,
10059 pub destination_name: String,
10060 pub expected_name_absent: bool,
10061 pub destination_policies: IndexPolicies,
10062 pub destination_resource_spec: IndexResourceSpec,
10063}
10064
10065#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10066#[serde(deny_unknown_fields)]
10067pub struct PrepareIndexImportResult {
10068 pub semantic_digest: Digest,
10069 pub source_cluster_storage_id: Identity,
10070 pub source_collection_id: Identity,
10071 pub source_index: Resource,
10072 pub maximum_bytes: U64,
10073}
10074
10075#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10076#[serde(deny_unknown_fields)]
10077pub struct StartIndexImportRequest {
10078 pub action_id: Digest,
10079 pub semantic_digest: Digest,
10080 pub artifact: IndexTransferArtifact,
10081 pub storage: PortabilityStorageCapability,
10082 pub destination_name: String,
10083 pub expected_name_absent: bool,
10084 pub destination_policies: IndexPolicies,
10085 pub destination_resource_spec: IndexResourceSpec,
10086}
10087
10088#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10089#[serde(deny_unknown_fields)]
10090pub struct StartIndexImportResult {
10091 pub operation: Operation,
10092}
10093
10094#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10095#[serde(deny_unknown_fields)]
10096pub struct ResolveIndexImportRequest {
10097 pub action_id: Digest,
10098 pub semantic_digest: Digest,
10099 pub artifact: IndexTransferArtifact,
10100 pub storage: PortabilityStorageCapability,
10101 pub destination_name: String,
10102 pub expected_name_absent: bool,
10103 pub destination_policies: IndexPolicies,
10104 pub destination_resource_spec: IndexResourceSpec,
10105}
10106
10107#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10108#[serde(deny_unknown_fields)]
10109pub struct ResolveIndexImportResult {
10110 #[serde(default, skip_serializing_if = "Option::is_none")]
10111 pub operation: Option<Operation>,
10112 #[serde(default, skip_serializing_if = "Option::is_none")]
10113 pub destination: Option<Resource>,
10114 pub expired_unknown: bool,
10115}
10116
10117#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10118#[serde(deny_unknown_fields)]
10119pub struct ReadArtifactChunkRequest {
10120 pub artifact: Artifact,
10121 pub offset: U64,
10122 pub length: u32,
10123}
10124
10125#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10126#[serde(deny_unknown_fields)]
10127pub struct ReadArtifactChunkResult {
10128 pub offset: U64,
10129 pub bytes_base64: String,
10130 pub chunk_sha256: String,
10131 pub artifact_sha256: String,
10132 pub complete: bool,
10133}
10134
10135#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10136#[serde(deny_unknown_fields)]
10137pub struct ExportUsageRequest {
10138 pub window_start: U64,
10139 pub window_end: U64,
10140 pub page_size: u32,
10141 #[serde(default, skip_serializing_if = "Option::is_none")]
10142 pub cursor: Option<Cursor>,
10143}
10144
10145#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10146#[serde(deny_unknown_fields)]
10147pub struct ExportUsageResult {
10148 pub units: Vec<CoreUsageUnits>,
10149 pub corrections: Vec<CoreUsageCorrection>,
10150 #[serde(default, skip_serializing_if = "Option::is_none")]
10151 pub next_cursor: Option<Cursor>,
10152 pub cumulative_through: U64,
10153}
10154
10155#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10156#[serde(deny_unknown_fields)]
10157pub struct ReadLogicalOccupancyRequest {
10158 pub index: Resource,
10159 #[serde(default, skip_serializing_if = "Option::is_none")]
10160 pub pit: Option<Cursor>,
10161 #[serde(default, skip_serializing_if = "Option::is_none")]
10162 pub window_start: Option<U64>,
10163 #[serde(default, skip_serializing_if = "Option::is_none")]
10164 pub window_end: Option<U64>,
10165 pub page_size: u32,
10166 #[serde(default, skip_serializing_if = "Option::is_none")]
10167 pub cursor: Option<Cursor>,
10168}
10169
10170#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10171#[serde(deny_unknown_fields)]
10172pub struct ReadLogicalOccupancyResult {
10173 #[serde(default, skip_serializing_if = "Option::is_none")]
10174 pub evidence: Option<LogicalOccupancySnapshotEvidence>,
10175 #[serde(default, skip_serializing_if = "Option::is_none")]
10176 pub window_gap: Option<LogicalOccupancyWindowGap>,
10177 #[serde(default, skip_serializing_if = "Option::is_none")]
10178 pub next_cursor: Option<Cursor>,
10179}
10180
10181#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10182#[serde(deny_unknown_fields)]
10183pub struct ExecuteStateReadRequest {
10184 pub index: Resource,
10185 pub operation: StateOperation,
10186}
10187
10188#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10189#[serde(deny_unknown_fields)]
10190pub struct ExecuteStateReadResult {
10191 pub result: StateCommandResult,
10192}
10193
10194#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10195#[serde(deny_unknown_fields)]
10196pub struct PrepareStateWriteRequest {
10197 pub index: Resource,
10198 pub action_id: Digest,
10199 pub operation: StateOperation,
10200}
10201
10202#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10203#[serde(deny_unknown_fields)]
10204pub struct PrepareStateWriteResult {
10205 pub locator: Locator,
10206 pub semantic_digest: Digest,
10207 pub retention_max_entries: U64,
10208 pub retention_sequence_window: U64,
10209}
10210
10211#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10212#[serde(deny_unknown_fields)]
10213pub struct SubmitStateWriteRequest {
10214 pub index: Resource,
10215 pub action_id: Digest,
10216 pub operation: StateOperation,
10217 pub locator: Locator,
10218 pub semantic_digest: Digest,
10219}
10220
10221#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10222#[serde(deny_unknown_fields)]
10223pub struct SubmitStateWriteResult {
10224 #[serde(default, skip_serializing_if = "Option::is_none")]
10225 pub result: Option<StateCommandResult>,
10226 #[serde(default, skip_serializing_if = "Option::is_none")]
10227 pub resolution: Option<StateWriteResolution>,
10228 pub mutation_outcome: MutationOutcome,
10229 #[serde(default, skip_serializing_if = "Option::is_none")]
10230 pub achievement: Option<WriteAchievement>,
10231}
10232
10233#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10234#[serde(deny_unknown_fields)]
10235pub struct ResolveStateWriteRequest {
10236 pub index: Resource,
10237 pub action_id: Digest,
10238 pub operation: StateOperation,
10239 pub locator: Locator,
10240 pub semantic_digest: Digest,
10241}
10242
10243#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10244#[serde(deny_unknown_fields)]
10245pub struct ResolveStateWriteResult {
10246 pub resolution: StateWriteResolution,
10247}
10248
10249#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10250#[serde(tag = "command", content = "body", rename_all = "snake_case")]
10251pub enum RequestBody {
10252 Discover(DiscoverRequest),
10253 ListIndexes(ListIndexesRequest),
10254 GetIndex(GetIndexRequest),
10255 ValidateIndexChange(ValidateIndexChangeRequest),
10256 ApplyIndexChange(ApplyIndexChangeRequest),
10257 ApplyAdministrationMutation(ApplyAdministrationMutationRequest),
10258 ListAliases(ListAliasesRequest),
10259 GetAlias(GetAliasRequest),
10260 ListDataStreams(ListDataStreamsRequest),
10261 GetDataStream(GetDataStreamRequest),
10262 ListComponentTemplates(ListComponentTemplatesRequest),
10263 GetComponentTemplate(GetComponentTemplateRequest),
10264 ListIndexTemplates(ListIndexTemplatesRequest),
10265 GetIndexTemplate(GetIndexTemplateRequest),
10266 ListIngestPipelines(ListIngestPipelinesRequest),
10267 GetIngestPipeline(GetIngestPipelineRequest),
10268 SimulateIngestPipeline(SimulateIngestPipelineRequest),
10269 ReprocessByQuery(ReprocessByQueryRequest),
10270 ListLifecyclePolicies(ListLifecyclePoliciesRequest),
10271 GetLifecyclePolicy(GetLifecyclePolicyRequest),
10272 PrepareCreateIndex(PrepareCreateIndexRequest),
10273 PrepareDeleteIndex(PrepareDeleteIndexRequest),
10274 SubmitCatalogAction(SubmitCatalogActionRequest),
10275 ResolveCatalogAction(ResolveCatalogActionRequest),
10276 PrepareReplayableSourceIndex(PrepareReplayableSourceIndexRequest),
10277 SubmitReplayableSourceIndex(SubmitReplayableSourceIndexRequest),
10278 GetReplayableSource(GetReplayableSourceRequest),
10279 ControlReplayableSource(ControlReplayableSourceRequest),
10280 CloneIndex(CloneIndexRequest),
10281 ConfigureHistory(ConfigureHistoryRequest),
10282 GetHistory(GetHistoryRequest),
10283 ResolveHistory(ResolveHistoryRequest),
10284 PlaceHistoryHold(PlaceHistoryHoldRequest),
10285 ReleaseHistoryHold(ReleaseHistoryHoldRequest),
10286 PrepareDocumentMutation(PrepareDocumentMutationRequest),
10287 SubmitDocumentMutation(SubmitDocumentMutationRequest),
10288 PrepareDocumentBulk(PrepareDocumentBulkRequest),
10289 SubmitDocumentBulk(SubmitDocumentBulkRequest),
10290 ResolveDocumentBulk(ResolveDocumentBulkRequest),
10291 PrepareAppendBulk(PrepareAppendBulkRequest),
10292 SubmitAppendBulk(SubmitAppendBulkRequest),
10293 ResolveAppendBulk(ResolveAppendBulkRequest),
10294 ObserveAppendCommitted(ObserveAppendCommittedRequest),
10295 ResolveDocumentMutation(ResolveDocumentMutationRequest),
10296 GetDocument(GetDocumentRequest),
10297 Search(SearchRequest),
10298 TraverseRelationships(TraverseRelationshipsRequest),
10299 QueryProfiles(QueryProfilesRequest),
10300 EvaluateTemporalEvidence(EvaluateTemporalEvidenceRequest),
10301 CreateContinuousTemporalEvaluation(CreateContinuousTemporalEvaluationRequest),
10302 GetContinuousTemporalEvaluation(GetContinuousTemporalEvaluationRequest),
10303 PauseContinuousTemporalEvaluation(PauseContinuousTemporalEvaluationRequest),
10304 ResumeContinuousTemporalEvaluation(ResumeContinuousTemporalEvaluationRequest),
10305 ReplaceContinuousTemporalEvaluation(ReplaceContinuousTemporalEvaluationRequest),
10306 RetireContinuousTemporalEvaluation(RetireContinuousTemporalEvaluationRequest),
10307 ReadContinuousTemporalEvidence(ReadContinuousTemporalEvidenceRequest),
10308 ValidateSearch(ValidateSearchRequest),
10309 OpenPit(OpenPitRequest),
10310 RenewPit(RenewPitRequest),
10311 ClosePit(ClosePitRequest),
10312 ListOperations(ListOperationsRequest),
10313 GetOperation(GetOperationRequest),
10314 WaitOperation(WaitOperationRequest),
10315 CancelOperation(CancelOperationRequest),
10316 ListAuditEvents(ListAuditEventsRequest),
10317 ExportAuditEvents(ExportAuditEventsRequest),
10318 ReserveServiceCredential(ReserveServiceCredentialRequest),
10319 ReserveServiceCredentialRotation(ReserveServiceCredentialRotationRequest),
10320 ActivateServiceCredential(ActivateServiceCredentialRequest),
10321 ResolveServiceCredentialReservation(ResolveServiceCredentialReservationRequest),
10322 PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialRequest),
10323 RevokeServiceCredential(RevokeServiceCredentialRequest),
10324 ResolveSecurityAction(ResolveSecurityActionRequest),
10325 GetSecurityRole(GetSecurityRoleRequest),
10326 PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeRequest),
10327 SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeRequest),
10328 ListServiceCredentials(ListServiceCredentialsRequest),
10329 GetRuntimeStatus(GetRuntimeStatusRequest),
10330 GetResultCacheStatus(GetResultCacheStatusRequest),
10331 GetFieldPromotionStatus(GetFieldPromotionStatusRequest),
10332 GetOverloadStatus(GetOverloadStatusRequest),
10333 ConfigureExternalKey(ConfigureExternalKeyRequest),
10334 RotateExternalKeyBinding(RotateExternalKeyBindingRequest),
10335 ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteRequest),
10336 GetLifecycleStatus(GetLifecycleStatusRequest),
10337 GetQuota(GetQuotaRequest),
10338 UpdateQuota(UpdateQuotaRequest),
10339 GetBinding(GetBindingRequest),
10340 GetAdmissionStatus(GetAdmissionStatusRequest),
10341 SetAdmission(SetAdmissionRequest),
10342 GetQuiesceStatus(GetQuiesceStatusRequest),
10343 GetDecommissionReadiness(GetDecommissionReadinessRequest),
10344 GetUpgradeReadiness(GetUpgradeReadinessRequest),
10345 GetMaintenanceStatus(GetMaintenanceStatusRequest),
10346 WarmVectorIndex(WarmVectorIndexRequest),
10347 EvaluateVectorRecall(EvaluateVectorRecallRequest),
10348 CalibrateVectorStrategy(CalibrateVectorStrategyRequest),
10349 GetVectorDiagnostic(GetVectorDiagnosticRequest),
10350 CreateDiagnostic(CreateDiagnosticRequest),
10351 GetDiagnostic(GetDiagnosticRequest),
10352 PrepareCollectionExport(PrepareCollectionExportRequest),
10353 StartCollectionExport(StartCollectionExportRequest),
10354 ResolveCollectionExport(ResolveCollectionExportRequest),
10355 VerifyCollectionExport(VerifyCollectionExportRequest),
10356 PrepareCollectionExportRetirement(PrepareCollectionExportRetirementRequest),
10357 StartCollectionExportRetirement(StartCollectionExportRetirementRequest),
10358 ResolveCollectionExportRetirement(ResolveCollectionExportRetirementRequest),
10359 PrepareCollectionRestore(PrepareCollectionRestoreRequest),
10360 StartCollectionRestore(StartCollectionRestoreRequest),
10361 ResolveCollectionRestore(ResolveCollectionRestoreRequest),
10362 PrepareIndexExport(PrepareIndexExportRequest),
10363 StartIndexExport(StartIndexExportRequest),
10364 ResolveIndexExport(ResolveIndexExportRequest),
10365 VerifyIndexExport(VerifyIndexExportRequest),
10366 PrepareIndexImport(PrepareIndexImportRequest),
10367 StartIndexImport(StartIndexImportRequest),
10368 ResolveIndexImport(ResolveIndexImportRequest),
10369 ReadArtifactChunk(ReadArtifactChunkRequest),
10370 ExportUsage(ExportUsageRequest),
10371 ReadLogicalOccupancy(ReadLogicalOccupancyRequest),
10372 ExecuteStateRead(ExecuteStateReadRequest),
10373 PrepareStateWrite(PrepareStateWriteRequest),
10374 SubmitStateWrite(SubmitStateWriteRequest),
10375 ResolveStateWrite(ResolveStateWriteRequest),
10376}
10377
10378#[allow(clippy::large_enum_variant)]
10381#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10382#[serde(tag = "command", content = "body", rename_all = "snake_case")]
10383pub enum ResultBody {
10384 Discover(DiscoverResult),
10385 ListIndexes(ListIndexesResult),
10386 GetIndex(GetIndexResult),
10387 ValidateIndexChange(ValidateIndexChangeResult),
10388 ApplyIndexChange(ApplyIndexChangeResult),
10389 ApplyAdministrationMutation(ApplyAdministrationMutationResult),
10390 ListAliases(ListAliasesResult),
10391 GetAlias(GetAliasResult),
10392 ListDataStreams(ListDataStreamsResult),
10393 GetDataStream(GetDataStreamResult),
10394 ListComponentTemplates(ListComponentTemplatesResult),
10395 GetComponentTemplate(GetComponentTemplateResult),
10396 ListIndexTemplates(ListIndexTemplatesResult),
10397 GetIndexTemplate(GetIndexTemplateResult),
10398 ListIngestPipelines(ListIngestPipelinesResult),
10399 GetIngestPipeline(GetIngestPipelineResult),
10400 SimulateIngestPipeline(SimulateIngestPipelineResult),
10401 ReprocessByQuery(ReprocessByQueryResult),
10402 ListLifecyclePolicies(ListLifecyclePoliciesResult),
10403 GetLifecyclePolicy(GetLifecyclePolicyResult),
10404 PrepareCreateIndex(PrepareCreateIndexResult),
10405 PrepareDeleteIndex(PrepareDeleteIndexResult),
10406 SubmitCatalogAction(SubmitCatalogActionResult),
10407 ResolveCatalogAction(ResolveCatalogActionResult),
10408 PrepareReplayableSourceIndex(PrepareReplayableSourceIndexResult),
10409 SubmitReplayableSourceIndex(SubmitReplayableSourceIndexResult),
10410 GetReplayableSource(GetReplayableSourceResult),
10411 ControlReplayableSource(ControlReplayableSourceResult),
10412 CloneIndex(CloneIndexResult),
10413 ConfigureHistory(ConfigureHistoryResult),
10414 GetHistory(GetHistoryResult),
10415 ResolveHistory(ResolveHistoryResult),
10416 PlaceHistoryHold(PlaceHistoryHoldResult),
10417 ReleaseHistoryHold(ReleaseHistoryHoldResult),
10418 PrepareDocumentMutation(PrepareDocumentMutationResult),
10419 SubmitDocumentMutation(SubmitDocumentMutationResult),
10420 PrepareDocumentBulk(PrepareDocumentBulkResult),
10421 SubmitDocumentBulk(SubmitDocumentBulkResult),
10422 ResolveDocumentBulk(ResolveDocumentBulkResult),
10423 PrepareAppendBulk(PrepareAppendBulkResult),
10424 SubmitAppendBulk(SubmitAppendBulkResult),
10425 ResolveAppendBulk(ResolveAppendBulkResult),
10426 ObserveAppendCommitted(ObserveAppendCommittedResult),
10427 ResolveDocumentMutation(ResolveDocumentMutationResult),
10428 GetDocument(GetDocumentResult),
10429 Search(SearchResult),
10430 TraverseRelationships(TraverseRelationshipsResult),
10431 QueryProfiles(QueryProfilesResult),
10432 EvaluateTemporalEvidence(EvaluateTemporalEvidenceResult),
10433 CreateContinuousTemporalEvaluation(CreateContinuousTemporalEvaluationResult),
10434 GetContinuousTemporalEvaluation(GetContinuousTemporalEvaluationResult),
10435 PauseContinuousTemporalEvaluation(PauseContinuousTemporalEvaluationResult),
10436 ResumeContinuousTemporalEvaluation(ResumeContinuousTemporalEvaluationResult),
10437 ReplaceContinuousTemporalEvaluation(ReplaceContinuousTemporalEvaluationResult),
10438 RetireContinuousTemporalEvaluation(RetireContinuousTemporalEvaluationResult),
10439 ReadContinuousTemporalEvidence(ReadContinuousTemporalEvidenceResult),
10440 ValidateSearch(ValidateSearchResult),
10441 OpenPit(OpenPitResult),
10442 RenewPit(RenewPitResult),
10443 ClosePit(ClosePitResult),
10444 ListOperations(ListOperationsResult),
10445 GetOperation(GetOperationResult),
10446 WaitOperation(WaitOperationResult),
10447 CancelOperation(CancelOperationResult),
10448 ListAuditEvents(ListAuditEventsResult),
10449 ExportAuditEvents(ExportAuditEventsResult),
10450 ReserveServiceCredential(ReserveServiceCredentialResult),
10451 ReserveServiceCredentialRotation(ReserveServiceCredentialRotationResult),
10452 ActivateServiceCredential(ActivateServiceCredentialResult),
10453 ResolveServiceCredentialReservation(ResolveServiceCredentialReservationResult),
10454 PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialResult),
10455 RevokeServiceCredential(RevokeServiceCredentialResult),
10456 ResolveSecurityAction(ResolveSecurityActionResult),
10457 GetSecurityRole(GetSecurityRoleResult),
10458 PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeResult),
10459 SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeResult),
10460 ListServiceCredentials(ListServiceCredentialsResult),
10461 GetRuntimeStatus(GetRuntimeStatusResult),
10462 GetResultCacheStatus(GetResultCacheStatusResult),
10463 GetFieldPromotionStatus(GetFieldPromotionStatusResult),
10464 GetOverloadStatus(GetOverloadStatusResult),
10465 ConfigureExternalKey(ConfigureExternalKeyResult),
10466 RotateExternalKeyBinding(RotateExternalKeyBindingResult),
10467 ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteResult),
10468 GetLifecycleStatus(GetLifecycleStatusResult),
10469 GetQuota(GetQuotaResult),
10470 UpdateQuota(UpdateQuotaResult),
10471 GetBinding(GetBindingResult),
10472 GetAdmissionStatus(GetAdmissionStatusResult),
10473 SetAdmission(SetAdmissionResult),
10474 GetQuiesceStatus(GetQuiesceStatusResult),
10475 GetDecommissionReadiness(GetDecommissionReadinessResult),
10476 GetUpgradeReadiness(GetUpgradeReadinessResult),
10477 GetMaintenanceStatus(GetMaintenanceStatusResult),
10478 WarmVectorIndex(WarmVectorIndexResult),
10479 EvaluateVectorRecall(EvaluateVectorRecallResult),
10480 CalibrateVectorStrategy(CalibrateVectorStrategyResult),
10481 GetVectorDiagnostic(GetVectorDiagnosticResult),
10482 CreateDiagnostic(CreateDiagnosticResult),
10483 GetDiagnostic(GetDiagnosticResult),
10484 PrepareCollectionExport(PrepareCollectionExportResult),
10485 StartCollectionExport(StartCollectionExportResult),
10486 ResolveCollectionExport(ResolveCollectionExportResult),
10487 VerifyCollectionExport(VerifyCollectionExportResult),
10488 PrepareCollectionExportRetirement(PrepareCollectionExportRetirementResult),
10489 StartCollectionExportRetirement(StartCollectionExportRetirementResult),
10490 ResolveCollectionExportRetirement(ResolveCollectionExportRetirementResult),
10491 PrepareCollectionRestore(PrepareCollectionRestoreResult),
10492 StartCollectionRestore(StartCollectionRestoreResult),
10493 ResolveCollectionRestore(ResolveCollectionRestoreResult),
10494 PrepareIndexExport(PrepareIndexExportResult),
10495 StartIndexExport(StartIndexExportResult),
10496 ResolveIndexExport(ResolveIndexExportResult),
10497 VerifyIndexExport(VerifyIndexExportResult),
10498 PrepareIndexImport(PrepareIndexImportResult),
10499 StartIndexImport(StartIndexImportResult),
10500 ResolveIndexImport(ResolveIndexImportResult),
10501 ReadArtifactChunk(ReadArtifactChunkResult),
10502 ExportUsage(ExportUsageResult),
10503 ReadLogicalOccupancy(ReadLogicalOccupancyResult),
10504 ExecuteStateRead(ExecuteStateReadResult),
10505 PrepareStateWrite(PrepareStateWriteResult),
10506 SubmitStateWrite(SubmitStateWriteResult),
10507 ResolveStateWrite(ResolveStateWriteResult),
10508}
10509
10510pub const fn command_for_request(value: &RequestBody) -> Command {
10511 match value {
10512 RequestBody::Discover(_) => Command::Discover,
10513 RequestBody::ListIndexes(_) => Command::ListIndexes,
10514 RequestBody::GetIndex(_) => Command::GetIndex,
10515 RequestBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
10516 RequestBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
10517 RequestBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
10518 RequestBody::ListAliases(_) => Command::ListAliases,
10519 RequestBody::GetAlias(_) => Command::GetAlias,
10520 RequestBody::ListDataStreams(_) => Command::ListDataStreams,
10521 RequestBody::GetDataStream(_) => Command::GetDataStream,
10522 RequestBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
10523 RequestBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
10524 RequestBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
10525 RequestBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
10526 RequestBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
10527 RequestBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
10528 RequestBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
10529 RequestBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
10530 RequestBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
10531 RequestBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
10532 RequestBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
10533 RequestBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
10534 RequestBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
10535 RequestBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
10536 RequestBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
10537 RequestBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
10538 RequestBody::GetReplayableSource(_) => Command::GetReplayableSource,
10539 RequestBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
10540 RequestBody::CloneIndex(_) => Command::CloneIndex,
10541 RequestBody::ConfigureHistory(_) => Command::ConfigureHistory,
10542 RequestBody::GetHistory(_) => Command::GetHistory,
10543 RequestBody::ResolveHistory(_) => Command::ResolveHistory,
10544 RequestBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
10545 RequestBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
10546 RequestBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
10547 RequestBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
10548 RequestBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
10549 RequestBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
10550 RequestBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
10551 RequestBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
10552 RequestBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
10553 RequestBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
10554 RequestBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
10555 RequestBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
10556 RequestBody::GetDocument(_) => Command::GetDocument,
10557 RequestBody::Search(_) => Command::Search,
10558 RequestBody::TraverseRelationships(_) => Command::TraverseRelationships,
10559 RequestBody::QueryProfiles(_) => Command::QueryProfiles,
10560 RequestBody::EvaluateTemporalEvidence(_) => Command::EvaluateTemporalEvidence,
10561 RequestBody::CreateContinuousTemporalEvaluation(_) => Command::CreateContinuousTemporalEvaluation,
10562 RequestBody::GetContinuousTemporalEvaluation(_) => Command::GetContinuousTemporalEvaluation,
10563 RequestBody::PauseContinuousTemporalEvaluation(_) => Command::PauseContinuousTemporalEvaluation,
10564 RequestBody::ResumeContinuousTemporalEvaluation(_) => Command::ResumeContinuousTemporalEvaluation,
10565 RequestBody::ReplaceContinuousTemporalEvaluation(_) => Command::ReplaceContinuousTemporalEvaluation,
10566 RequestBody::RetireContinuousTemporalEvaluation(_) => Command::RetireContinuousTemporalEvaluation,
10567 RequestBody::ReadContinuousTemporalEvidence(_) => Command::ReadContinuousTemporalEvidence,
10568 RequestBody::ValidateSearch(_) => Command::ValidateSearch,
10569 RequestBody::OpenPit(_) => Command::OpenPit,
10570 RequestBody::RenewPit(_) => Command::RenewPit,
10571 RequestBody::ClosePit(_) => Command::ClosePit,
10572 RequestBody::ListOperations(_) => Command::ListOperations,
10573 RequestBody::GetOperation(_) => Command::GetOperation,
10574 RequestBody::WaitOperation(_) => Command::WaitOperation,
10575 RequestBody::CancelOperation(_) => Command::CancelOperation,
10576 RequestBody::ListAuditEvents(_) => Command::ListAuditEvents,
10577 RequestBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
10578 RequestBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
10579 RequestBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
10580 RequestBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
10581 RequestBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
10582 RequestBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
10583 RequestBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
10584 RequestBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
10585 RequestBody::GetSecurityRole(_) => Command::GetSecurityRole,
10586 RequestBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
10587 RequestBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
10588 RequestBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
10589 RequestBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
10590 RequestBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
10591 RequestBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
10592 RequestBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
10593 RequestBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
10594 RequestBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
10595 RequestBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
10596 RequestBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
10597 RequestBody::GetQuota(_) => Command::GetQuota,
10598 RequestBody::UpdateQuota(_) => Command::UpdateQuota,
10599 RequestBody::GetBinding(_) => Command::GetBinding,
10600 RequestBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
10601 RequestBody::SetAdmission(_) => Command::SetAdmission,
10602 RequestBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
10603 RequestBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
10604 RequestBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
10605 RequestBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
10606 RequestBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
10607 RequestBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
10608 RequestBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
10609 RequestBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
10610 RequestBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
10611 RequestBody::GetDiagnostic(_) => Command::GetDiagnostic,
10612 RequestBody::PrepareCollectionExport(_) => Command::PrepareCollectionExport,
10613 RequestBody::StartCollectionExport(_) => Command::StartCollectionExport,
10614 RequestBody::ResolveCollectionExport(_) => Command::ResolveCollectionExport,
10615 RequestBody::VerifyCollectionExport(_) => Command::VerifyCollectionExport,
10616 RequestBody::PrepareCollectionExportRetirement(_) => Command::PrepareCollectionExportRetirement,
10617 RequestBody::StartCollectionExportRetirement(_) => Command::StartCollectionExportRetirement,
10618 RequestBody::ResolveCollectionExportRetirement(_) => Command::ResolveCollectionExportRetirement,
10619 RequestBody::PrepareCollectionRestore(_) => Command::PrepareCollectionRestore,
10620 RequestBody::StartCollectionRestore(_) => Command::StartCollectionRestore,
10621 RequestBody::ResolveCollectionRestore(_) => Command::ResolveCollectionRestore,
10622 RequestBody::PrepareIndexExport(_) => Command::PrepareIndexExport,
10623 RequestBody::StartIndexExport(_) => Command::StartIndexExport,
10624 RequestBody::ResolveIndexExport(_) => Command::ResolveIndexExport,
10625 RequestBody::VerifyIndexExport(_) => Command::VerifyIndexExport,
10626 RequestBody::PrepareIndexImport(_) => Command::PrepareIndexImport,
10627 RequestBody::StartIndexImport(_) => Command::StartIndexImport,
10628 RequestBody::ResolveIndexImport(_) => Command::ResolveIndexImport,
10629 RequestBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
10630 RequestBody::ExportUsage(_) => Command::ExportUsage,
10631 RequestBody::ReadLogicalOccupancy(_) => Command::ReadLogicalOccupancy,
10632 RequestBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
10633 RequestBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
10634 RequestBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
10635 RequestBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
10636 }
10637}
10638
10639pub const fn command_for_result(value: &ResultBody) -> Command {
10640 match value {
10641 ResultBody::Discover(_) => Command::Discover,
10642 ResultBody::ListIndexes(_) => Command::ListIndexes,
10643 ResultBody::GetIndex(_) => Command::GetIndex,
10644 ResultBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
10645 ResultBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
10646 ResultBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
10647 ResultBody::ListAliases(_) => Command::ListAliases,
10648 ResultBody::GetAlias(_) => Command::GetAlias,
10649 ResultBody::ListDataStreams(_) => Command::ListDataStreams,
10650 ResultBody::GetDataStream(_) => Command::GetDataStream,
10651 ResultBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
10652 ResultBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
10653 ResultBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
10654 ResultBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
10655 ResultBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
10656 ResultBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
10657 ResultBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
10658 ResultBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
10659 ResultBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
10660 ResultBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
10661 ResultBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
10662 ResultBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
10663 ResultBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
10664 ResultBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
10665 ResultBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
10666 ResultBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
10667 ResultBody::GetReplayableSource(_) => Command::GetReplayableSource,
10668 ResultBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
10669 ResultBody::CloneIndex(_) => Command::CloneIndex,
10670 ResultBody::ConfigureHistory(_) => Command::ConfigureHistory,
10671 ResultBody::GetHistory(_) => Command::GetHistory,
10672 ResultBody::ResolveHistory(_) => Command::ResolveHistory,
10673 ResultBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
10674 ResultBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
10675 ResultBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
10676 ResultBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
10677 ResultBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
10678 ResultBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
10679 ResultBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
10680 ResultBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
10681 ResultBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
10682 ResultBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
10683 ResultBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
10684 ResultBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
10685 ResultBody::GetDocument(_) => Command::GetDocument,
10686 ResultBody::Search(_) => Command::Search,
10687 ResultBody::TraverseRelationships(_) => Command::TraverseRelationships,
10688 ResultBody::QueryProfiles(_) => Command::QueryProfiles,
10689 ResultBody::EvaluateTemporalEvidence(_) => Command::EvaluateTemporalEvidence,
10690 ResultBody::CreateContinuousTemporalEvaluation(_) => Command::CreateContinuousTemporalEvaluation,
10691 ResultBody::GetContinuousTemporalEvaluation(_) => Command::GetContinuousTemporalEvaluation,
10692 ResultBody::PauseContinuousTemporalEvaluation(_) => Command::PauseContinuousTemporalEvaluation,
10693 ResultBody::ResumeContinuousTemporalEvaluation(_) => Command::ResumeContinuousTemporalEvaluation,
10694 ResultBody::ReplaceContinuousTemporalEvaluation(_) => Command::ReplaceContinuousTemporalEvaluation,
10695 ResultBody::RetireContinuousTemporalEvaluation(_) => Command::RetireContinuousTemporalEvaluation,
10696 ResultBody::ReadContinuousTemporalEvidence(_) => Command::ReadContinuousTemporalEvidence,
10697 ResultBody::ValidateSearch(_) => Command::ValidateSearch,
10698 ResultBody::OpenPit(_) => Command::OpenPit,
10699 ResultBody::RenewPit(_) => Command::RenewPit,
10700 ResultBody::ClosePit(_) => Command::ClosePit,
10701 ResultBody::ListOperations(_) => Command::ListOperations,
10702 ResultBody::GetOperation(_) => Command::GetOperation,
10703 ResultBody::WaitOperation(_) => Command::WaitOperation,
10704 ResultBody::CancelOperation(_) => Command::CancelOperation,
10705 ResultBody::ListAuditEvents(_) => Command::ListAuditEvents,
10706 ResultBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
10707 ResultBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
10708 ResultBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
10709 ResultBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
10710 ResultBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
10711 ResultBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
10712 ResultBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
10713 ResultBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
10714 ResultBody::GetSecurityRole(_) => Command::GetSecurityRole,
10715 ResultBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
10716 ResultBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
10717 ResultBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
10718 ResultBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
10719 ResultBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
10720 ResultBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
10721 ResultBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
10722 ResultBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
10723 ResultBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
10724 ResultBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
10725 ResultBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
10726 ResultBody::GetQuota(_) => Command::GetQuota,
10727 ResultBody::UpdateQuota(_) => Command::UpdateQuota,
10728 ResultBody::GetBinding(_) => Command::GetBinding,
10729 ResultBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
10730 ResultBody::SetAdmission(_) => Command::SetAdmission,
10731 ResultBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
10732 ResultBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
10733 ResultBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
10734 ResultBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
10735 ResultBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
10736 ResultBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
10737 ResultBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
10738 ResultBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
10739 ResultBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
10740 ResultBody::GetDiagnostic(_) => Command::GetDiagnostic,
10741 ResultBody::PrepareCollectionExport(_) => Command::PrepareCollectionExport,
10742 ResultBody::StartCollectionExport(_) => Command::StartCollectionExport,
10743 ResultBody::ResolveCollectionExport(_) => Command::ResolveCollectionExport,
10744 ResultBody::VerifyCollectionExport(_) => Command::VerifyCollectionExport,
10745 ResultBody::PrepareCollectionExportRetirement(_) => Command::PrepareCollectionExportRetirement,
10746 ResultBody::StartCollectionExportRetirement(_) => Command::StartCollectionExportRetirement,
10747 ResultBody::ResolveCollectionExportRetirement(_) => Command::ResolveCollectionExportRetirement,
10748 ResultBody::PrepareCollectionRestore(_) => Command::PrepareCollectionRestore,
10749 ResultBody::StartCollectionRestore(_) => Command::StartCollectionRestore,
10750 ResultBody::ResolveCollectionRestore(_) => Command::ResolveCollectionRestore,
10751 ResultBody::PrepareIndexExport(_) => Command::PrepareIndexExport,
10752 ResultBody::StartIndexExport(_) => Command::StartIndexExport,
10753 ResultBody::ResolveIndexExport(_) => Command::ResolveIndexExport,
10754 ResultBody::VerifyIndexExport(_) => Command::VerifyIndexExport,
10755 ResultBody::PrepareIndexImport(_) => Command::PrepareIndexImport,
10756 ResultBody::StartIndexImport(_) => Command::StartIndexImport,
10757 ResultBody::ResolveIndexImport(_) => Command::ResolveIndexImport,
10758 ResultBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
10759 ResultBody::ExportUsage(_) => Command::ExportUsage,
10760 ResultBody::ReadLogicalOccupancy(_) => Command::ReadLogicalOccupancy,
10761 ResultBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
10762 ResultBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
10763 ResultBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
10764 ResultBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
10765 }
10766}
10767
10768#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10769#[serde(deny_unknown_fields)]
10770pub struct RequestEnvelope {
10771 pub meta: RequestMeta,
10772 pub request: RequestBody,
10773}
10774#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10775#[serde(tag = "outcome", rename_all = "snake_case")]
10776pub enum ResponseEnvelope {
10777 Success {
10778 meta: ResponseMeta,
10779 result: Box<ResultBody>,
10780 },
10781 Error {
10782 meta: ResponseMeta,
10783 error: ErrorBody,
10784 },
10785}
10786
10787#[derive(Clone, Copy, Debug, Eq, PartialEq)]
10788pub struct CommandContract {
10789 pub command: Command,
10790 pub action: Action,
10791 pub cancellable: bool,
10792 pub mutation: &'static str,
10793}
10794pub const LODESTONE_API_COMMAND_CONTRACTS: &[CommandContract] = &[
10795 CommandContract {
10796 command: Command::Discover,
10797 action: Action::IdentityDiscovery,
10798 cancellable: true,
10799 mutation: "read_only",
10800 },
10801 CommandContract {
10802 command: Command::ListIndexes,
10803 action: Action::CatalogRead,
10804 cancellable: true,
10805 mutation: "read_only",
10806 },
10807 CommandContract {
10808 command: Command::GetIndex,
10809 action: Action::CatalogRead,
10810 cancellable: true,
10811 mutation: "read_only",
10812 },
10813 CommandContract {
10814 command: Command::ValidateIndexChange,
10815 action: Action::IndexAdmin,
10816 cancellable: true,
10817 mutation: "read_only",
10818 },
10819 CommandContract {
10820 command: Command::ApplyIndexChange,
10821 action: Action::IndexAdmin,
10822 cancellable: true,
10823 mutation: "catalog_submit",
10824 },
10825 CommandContract {
10826 command: Command::ApplyAdministrationMutation,
10827 action: Action::LifecycleAdmin,
10828 cancellable: true,
10829 mutation: "administration_submit",
10830 },
10831 CommandContract {
10832 command: Command::ListAliases,
10833 action: Action::CatalogRead,
10834 cancellable: true,
10835 mutation: "read_only",
10836 },
10837 CommandContract {
10838 command: Command::GetAlias,
10839 action: Action::CatalogRead,
10840 cancellable: true,
10841 mutation: "read_only",
10842 },
10843 CommandContract {
10844 command: Command::ListDataStreams,
10845 action: Action::CatalogRead,
10846 cancellable: true,
10847 mutation: "read_only",
10848 },
10849 CommandContract {
10850 command: Command::GetDataStream,
10851 action: Action::CatalogRead,
10852 cancellable: true,
10853 mutation: "read_only",
10854 },
10855 CommandContract {
10856 command: Command::ListComponentTemplates,
10857 action: Action::CatalogRead,
10858 cancellable: true,
10859 mutation: "read_only",
10860 },
10861 CommandContract {
10862 command: Command::GetComponentTemplate,
10863 action: Action::CatalogRead,
10864 cancellable: true,
10865 mutation: "read_only",
10866 },
10867 CommandContract {
10868 command: Command::ListIndexTemplates,
10869 action: Action::CatalogRead,
10870 cancellable: true,
10871 mutation: "read_only",
10872 },
10873 CommandContract {
10874 command: Command::GetIndexTemplate,
10875 action: Action::CatalogRead,
10876 cancellable: true,
10877 mutation: "read_only",
10878 },
10879 CommandContract {
10880 command: Command::ListIngestPipelines,
10881 action: Action::LifecycleAdmin,
10882 cancellable: true,
10883 mutation: "read_only",
10884 },
10885 CommandContract {
10886 command: Command::GetIngestPipeline,
10887 action: Action::LifecycleAdmin,
10888 cancellable: true,
10889 mutation: "read_only",
10890 },
10891 CommandContract {
10892 command: Command::SimulateIngestPipeline,
10893 action: Action::LifecycleAdmin,
10894 cancellable: true,
10895 mutation: "read_only",
10896 },
10897 CommandContract {
10898 command: Command::ReprocessByQuery,
10899 action: Action::DataWrite,
10900 cancellable: true,
10901 mutation: "authority_submit",
10902 },
10903 CommandContract {
10904 command: Command::ListLifecyclePolicies,
10905 action: Action::CatalogRead,
10906 cancellable: true,
10907 mutation: "read_only",
10908 },
10909 CommandContract {
10910 command: Command::GetLifecyclePolicy,
10911 action: Action::CatalogRead,
10912 cancellable: true,
10913 mutation: "read_only",
10914 },
10915 CommandContract {
10916 command: Command::PrepareCreateIndex,
10917 action: Action::IndexAdmin,
10918 cancellable: true,
10919 mutation: "catalog_prepare",
10920 },
10921 CommandContract {
10922 command: Command::PrepareDeleteIndex,
10923 action: Action::IndexAdmin,
10924 cancellable: true,
10925 mutation: "catalog_prepare",
10926 },
10927 CommandContract {
10928 command: Command::SubmitCatalogAction,
10929 action: Action::IndexAdmin,
10930 cancellable: true,
10931 mutation: "catalog_submit",
10932 },
10933 CommandContract {
10934 command: Command::ResolveCatalogAction,
10935 action: Action::IndexAdmin,
10936 cancellable: true,
10937 mutation: "read_only",
10938 },
10939 CommandContract {
10940 command: Command::PrepareReplayableSourceIndex,
10941 action: Action::IndexAdmin,
10942 cancellable: true,
10943 mutation: "catalog_prepare",
10944 },
10945 CommandContract {
10946 command: Command::SubmitReplayableSourceIndex,
10947 action: Action::IndexAdmin,
10948 cancellable: true,
10949 mutation: "catalog_submit",
10950 },
10951 CommandContract {
10952 command: Command::GetReplayableSource,
10953 action: Action::CatalogRead,
10954 cancellable: true,
10955 mutation: "read_only",
10956 },
10957 CommandContract {
10958 command: Command::ControlReplayableSource,
10959 action: Action::IndexAdmin,
10960 cancellable: true,
10961 mutation: "catalog_submit",
10962 },
10963 CommandContract {
10964 command: Command::CloneIndex,
10965 action: Action::IndexAdmin,
10966 cancellable: true,
10967 mutation: "catalog_submit",
10968 },
10969 CommandContract {
10970 command: Command::ConfigureHistory,
10971 action: Action::IndexAdmin,
10972 cancellable: true,
10973 mutation: "catalog_submit",
10974 },
10975 CommandContract {
10976 command: Command::GetHistory,
10977 action: Action::CatalogRead,
10978 cancellable: true,
10979 mutation: "read_only",
10980 },
10981 CommandContract {
10982 command: Command::ResolveHistory,
10983 action: Action::DataRead,
10984 cancellable: true,
10985 mutation: "read_only",
10986 },
10987 CommandContract {
10988 command: Command::PlaceHistoryHold,
10989 action: Action::IndexAdmin,
10990 cancellable: true,
10991 mutation: "catalog_submit",
10992 },
10993 CommandContract {
10994 command: Command::ReleaseHistoryHold,
10995 action: Action::IndexAdmin,
10996 cancellable: true,
10997 mutation: "catalog_submit",
10998 },
10999 CommandContract {
11000 command: Command::PrepareDocumentMutation,
11001 action: Action::DataWrite,
11002 cancellable: true,
11003 mutation: "read_only_prepare",
11004 },
11005 CommandContract {
11006 command: Command::SubmitDocumentMutation,
11007 action: Action::DataWrite,
11008 cancellable: true,
11009 mutation: "wal_submit",
11010 },
11011 CommandContract {
11012 command: Command::PrepareDocumentBulk,
11013 action: Action::DataWrite,
11014 cancellable: true,
11015 mutation: "read_only_prepare",
11016 },
11017 CommandContract {
11018 command: Command::SubmitDocumentBulk,
11019 action: Action::DataWrite,
11020 cancellable: true,
11021 mutation: "wal_submit",
11022 },
11023 CommandContract {
11024 command: Command::ResolveDocumentBulk,
11025 action: Action::DataRead,
11026 cancellable: true,
11027 mutation: "read_only",
11028 },
11029 CommandContract {
11030 command: Command::PrepareAppendBulk,
11031 action: Action::Append,
11032 cancellable: true,
11033 mutation: "read_only_prepare",
11034 },
11035 CommandContract {
11036 command: Command::SubmitAppendBulk,
11037 action: Action::Append,
11038 cancellable: true,
11039 mutation: "wal_submit",
11040 },
11041 CommandContract {
11042 command: Command::ResolveAppendBulk,
11043 action: Action::ResolveAppend,
11044 cancellable: true,
11045 mutation: "read_only",
11046 },
11047 CommandContract {
11048 command: Command::ObserveAppendCommitted,
11049 action: Action::ResolveAppend,
11050 cancellable: true,
11051 mutation: "read_only",
11052 },
11053 CommandContract {
11054 command: Command::ResolveDocumentMutation,
11055 action: Action::DataRead,
11056 cancellable: true,
11057 mutation: "read_only",
11058 },
11059 CommandContract {
11060 command: Command::GetDocument,
11061 action: Action::DataRead,
11062 cancellable: true,
11063 mutation: "read_only",
11064 },
11065 CommandContract {
11066 command: Command::Search,
11067 action: Action::DataRead,
11068 cancellable: true,
11069 mutation: "read_only",
11070 },
11071 CommandContract {
11072 command: Command::TraverseRelationships,
11073 action: Action::DataRead,
11074 cancellable: true,
11075 mutation: "read_only",
11076 },
11077 CommandContract {
11078 command: Command::QueryProfiles,
11079 action: Action::DataRead,
11080 cancellable: true,
11081 mutation: "read_only",
11082 },
11083 CommandContract {
11084 command: Command::EvaluateTemporalEvidence,
11085 action: Action::DataRead,
11086 cancellable: true,
11087 mutation: "read_only",
11088 },
11089 CommandContract {
11090 command: Command::CreateContinuousTemporalEvaluation,
11091 action: Action::LifecycleAdmin,
11092 cancellable: true,
11093 mutation: "catalog_submit",
11094 },
11095 CommandContract {
11096 command: Command::GetContinuousTemporalEvaluation,
11097 action: Action::CatalogRead,
11098 cancellable: true,
11099 mutation: "read_only",
11100 },
11101 CommandContract {
11102 command: Command::PauseContinuousTemporalEvaluation,
11103 action: Action::LifecycleAdmin,
11104 cancellable: true,
11105 mutation: "catalog_submit",
11106 },
11107 CommandContract {
11108 command: Command::ResumeContinuousTemporalEvaluation,
11109 action: Action::LifecycleAdmin,
11110 cancellable: true,
11111 mutation: "catalog_submit",
11112 },
11113 CommandContract {
11114 command: Command::ReplaceContinuousTemporalEvaluation,
11115 action: Action::LifecycleAdmin,
11116 cancellable: true,
11117 mutation: "catalog_submit",
11118 },
11119 CommandContract {
11120 command: Command::RetireContinuousTemporalEvaluation,
11121 action: Action::LifecycleAdmin,
11122 cancellable: true,
11123 mutation: "catalog_submit",
11124 },
11125 CommandContract {
11126 command: Command::ReadContinuousTemporalEvidence,
11127 action: Action::DataRead,
11128 cancellable: true,
11129 mutation: "read_only",
11130 },
11131 CommandContract {
11132 command: Command::ValidateSearch,
11133 action: Action::DataRead,
11134 cancellable: true,
11135 mutation: "read_only",
11136 },
11137 CommandContract {
11138 command: Command::OpenPit,
11139 action: Action::DataRead,
11140 cancellable: true,
11141 mutation: "authority_submit",
11142 },
11143 CommandContract {
11144 command: Command::RenewPit,
11145 action: Action::DataRead,
11146 cancellable: true,
11147 mutation: "authority_submit",
11148 },
11149 CommandContract {
11150 command: Command::ClosePit,
11151 action: Action::DataRead,
11152 cancellable: true,
11153 mutation: "authority_submit",
11154 },
11155 CommandContract {
11156 command: Command::ListOperations,
11157 action: Action::OperationRead,
11158 cancellable: true,
11159 mutation: "read_only",
11160 },
11161 CommandContract {
11162 command: Command::GetOperation,
11163 action: Action::OperationRead,
11164 cancellable: true,
11165 mutation: "read_only",
11166 },
11167 CommandContract {
11168 command: Command::WaitOperation,
11169 action: Action::OperationRead,
11170 cancellable: true,
11171 mutation: "read_only",
11172 },
11173 CommandContract {
11174 command: Command::CancelOperation,
11175 action: Action::OperationCancel,
11176 cancellable: true,
11177 mutation: "authority_submit",
11178 },
11179 CommandContract {
11180 command: Command::ListAuditEvents,
11181 action: Action::AuditRead,
11182 cancellable: true,
11183 mutation: "read_only",
11184 },
11185 CommandContract {
11186 command: Command::ExportAuditEvents,
11187 action: Action::AuditRead,
11188 cancellable: true,
11189 mutation: "read_only",
11190 },
11191 CommandContract {
11192 command: Command::ReserveServiceCredential,
11193 action: Action::SecurityAdmin,
11194 cancellable: true,
11195 mutation: "security_reserve",
11196 },
11197 CommandContract {
11198 command: Command::ReserveServiceCredentialRotation,
11199 action: Action::SecurityAdmin,
11200 cancellable: true,
11201 mutation: "security_reserve",
11202 },
11203 CommandContract {
11204 command: Command::ActivateServiceCredential,
11205 action: Action::SecurityAdmin,
11206 cancellable: true,
11207 mutation: "security_submit",
11208 },
11209 CommandContract {
11210 command: Command::ResolveServiceCredentialReservation,
11211 action: Action::SecurityRead,
11212 cancellable: true,
11213 mutation: "read_only",
11214 },
11215 CommandContract {
11216 command: Command::PrepareRevokeServiceCredential,
11217 action: Action::SecurityAdmin,
11218 cancellable: true,
11219 mutation: "read_only_prepare",
11220 },
11221 CommandContract {
11222 command: Command::RevokeServiceCredential,
11223 action: Action::SecurityAdmin,
11224 cancellable: true,
11225 mutation: "security_submit",
11226 },
11227 CommandContract {
11228 command: Command::ResolveSecurityAction,
11229 action: Action::SecurityRead,
11230 cancellable: true,
11231 mutation: "read_only",
11232 },
11233 CommandContract {
11234 command: Command::GetSecurityRole,
11235 action: Action::SecurityRead,
11236 cancellable: true,
11237 mutation: "read_only",
11238 },
11239 CommandContract {
11240 command: Command::PrepareRoleAppendAccessChange,
11241 action: Action::SecurityAdmin,
11242 cancellable: true,
11243 mutation: "read_only_prepare",
11244 },
11245 CommandContract {
11246 command: Command::SubmitRoleAppendAccessChange,
11247 action: Action::SecurityAdmin,
11248 cancellable: true,
11249 mutation: "security_submit",
11250 },
11251 CommandContract {
11252 command: Command::ListServiceCredentials,
11253 action: Action::SecurityRead,
11254 cancellable: true,
11255 mutation: "read_only",
11256 },
11257 CommandContract {
11258 command: Command::GetRuntimeStatus,
11259 action: Action::CatalogRead,
11260 cancellable: true,
11261 mutation: "read_only",
11262 },
11263 CommandContract {
11264 command: Command::GetResultCacheStatus,
11265 action: Action::CatalogRead,
11266 cancellable: true,
11267 mutation: "read_only",
11268 },
11269 CommandContract {
11270 command: Command::GetFieldPromotionStatus,
11271 action: Action::CatalogRead,
11272 cancellable: true,
11273 mutation: "read_only",
11274 },
11275 CommandContract {
11276 command: Command::GetOverloadStatus,
11277 action: Action::CatalogRead,
11278 cancellable: true,
11279 mutation: "read_only",
11280 },
11281 CommandContract {
11282 command: Command::ConfigureExternalKey,
11283 action: Action::LifecycleAdmin,
11284 cancellable: true,
11285 mutation: "authority_submit",
11286 },
11287 CommandContract {
11288 command: Command::RotateExternalKeyBinding,
11289 action: Action::LifecycleAdmin,
11290 cancellable: true,
11291 mutation: "authority_submit",
11292 },
11293 CommandContract {
11294 command: Command::ConfigureAggregateThenDelete,
11295 action: Action::LifecycleAdmin,
11296 cancellable: true,
11297 mutation: "authority_submit",
11298 },
11299 CommandContract {
11300 command: Command::GetLifecycleStatus,
11301 action: Action::CatalogRead,
11302 cancellable: true,
11303 mutation: "read_only",
11304 },
11305 CommandContract {
11306 command: Command::GetQuota,
11307 action: Action::QuotaRead,
11308 cancellable: true,
11309 mutation: "read_only",
11310 },
11311 CommandContract {
11312 command: Command::UpdateQuota,
11313 action: Action::QuotaAdmin,
11314 cancellable: true,
11315 mutation: "quota_submit",
11316 },
11317 CommandContract {
11318 command: Command::GetBinding,
11319 action: Action::BindingRead,
11320 cancellable: true,
11321 mutation: "read_only",
11322 },
11323 CommandContract {
11324 command: Command::GetAdmissionStatus,
11325 action: Action::AdmissionRead,
11326 cancellable: true,
11327 mutation: "read_only",
11328 },
11329 CommandContract {
11330 command: Command::SetAdmission,
11331 action: Action::AdmissionAdmin,
11332 cancellable: true,
11333 mutation: "admission_submit",
11334 },
11335 CommandContract {
11336 command: Command::GetQuiesceStatus,
11337 action: Action::AdmissionRead,
11338 cancellable: true,
11339 mutation: "read_only",
11340 },
11341 CommandContract {
11342 command: Command::GetDecommissionReadiness,
11343 action: Action::AdmissionRead,
11344 cancellable: true,
11345 mutation: "read_only",
11346 },
11347 CommandContract {
11348 command: Command::GetUpgradeReadiness,
11349 action: Action::TaskRead,
11350 cancellable: true,
11351 mutation: "read_only",
11352 },
11353 CommandContract {
11354 command: Command::GetMaintenanceStatus,
11355 action: Action::TaskRead,
11356 cancellable: true,
11357 mutation: "read_only",
11358 },
11359 CommandContract {
11360 command: Command::WarmVectorIndex,
11361 action: Action::DataRead,
11362 cancellable: true,
11363 mutation: "read_only",
11364 },
11365 CommandContract {
11366 command: Command::EvaluateVectorRecall,
11367 action: Action::DiagnosticsCreate,
11368 cancellable: true,
11369 mutation: "diagnostic_submit",
11370 },
11371 CommandContract {
11372 command: Command::CalibrateVectorStrategy,
11373 action: Action::DiagnosticsCreate,
11374 cancellable: true,
11375 mutation: "diagnostic_submit",
11376 },
11377 CommandContract {
11378 command: Command::GetVectorDiagnostic,
11379 action: Action::DiagnosticsRead,
11380 cancellable: true,
11381 mutation: "read_only",
11382 },
11383 CommandContract {
11384 command: Command::CreateDiagnostic,
11385 action: Action::DiagnosticsCreate,
11386 cancellable: true,
11387 mutation: "diagnostic_submit",
11388 },
11389 CommandContract {
11390 command: Command::GetDiagnostic,
11391 action: Action::DiagnosticsRead,
11392 cancellable: true,
11393 mutation: "read_only",
11394 },
11395 CommandContract {
11396 command: Command::PrepareCollectionExport,
11397 action: Action::CollectionExport,
11398 cancellable: true,
11399 mutation: "read_only_prepare",
11400 },
11401 CommandContract {
11402 command: Command::StartCollectionExport,
11403 action: Action::CollectionExport,
11404 cancellable: true,
11405 mutation: "portability_submit",
11406 },
11407 CommandContract {
11408 command: Command::ResolveCollectionExport,
11409 action: Action::CollectionExport,
11410 cancellable: true,
11411 mutation: "read_only",
11412 },
11413 CommandContract {
11414 command: Command::VerifyCollectionExport,
11415 action: Action::CollectionExport,
11416 cancellable: true,
11417 mutation: "read_only",
11418 },
11419 CommandContract {
11420 command: Command::PrepareCollectionExportRetirement,
11421 action: Action::CollectionExport,
11422 cancellable: true,
11423 mutation: "read_only_prepare",
11424 },
11425 CommandContract {
11426 command: Command::StartCollectionExportRetirement,
11427 action: Action::CollectionExport,
11428 cancellable: true,
11429 mutation: "portability_submit",
11430 },
11431 CommandContract {
11432 command: Command::ResolveCollectionExportRetirement,
11433 action: Action::CollectionExport,
11434 cancellable: true,
11435 mutation: "read_only",
11436 },
11437 CommandContract {
11438 command: Command::PrepareCollectionRestore,
11439 action: Action::CollectionRestore,
11440 cancellable: true,
11441 mutation: "read_only_prepare",
11442 },
11443 CommandContract {
11444 command: Command::StartCollectionRestore,
11445 action: Action::CollectionRestore,
11446 cancellable: true,
11447 mutation: "portability_submit",
11448 },
11449 CommandContract {
11450 command: Command::ResolveCollectionRestore,
11451 action: Action::CollectionRestore,
11452 cancellable: true,
11453 mutation: "read_only",
11454 },
11455 CommandContract {
11456 command: Command::PrepareIndexExport,
11457 action: Action::IndexExport,
11458 cancellable: true,
11459 mutation: "read_only_prepare",
11460 },
11461 CommandContract {
11462 command: Command::StartIndexExport,
11463 action: Action::IndexExport,
11464 cancellable: true,
11465 mutation: "portability_submit",
11466 },
11467 CommandContract {
11468 command: Command::ResolveIndexExport,
11469 action: Action::IndexExport,
11470 cancellable: true,
11471 mutation: "read_only",
11472 },
11473 CommandContract {
11474 command: Command::VerifyIndexExport,
11475 action: Action::IndexExport,
11476 cancellable: true,
11477 mutation: "read_only",
11478 },
11479 CommandContract {
11480 command: Command::PrepareIndexImport,
11481 action: Action::IndexImport,
11482 cancellable: true,
11483 mutation: "read_only_prepare",
11484 },
11485 CommandContract {
11486 command: Command::StartIndexImport,
11487 action: Action::IndexImport,
11488 cancellable: true,
11489 mutation: "portability_submit",
11490 },
11491 CommandContract {
11492 command: Command::ResolveIndexImport,
11493 action: Action::IndexImport,
11494 cancellable: true,
11495 mutation: "read_only",
11496 },
11497 CommandContract {
11498 command: Command::ReadArtifactChunk,
11499 action: Action::OperationRead,
11500 cancellable: true,
11501 mutation: "read_only",
11502 },
11503 CommandContract {
11504 command: Command::ExportUsage,
11505 action: Action::UsageRead,
11506 cancellable: true,
11507 mutation: "read_only",
11508 },
11509 CommandContract {
11510 command: Command::ReadLogicalOccupancy,
11511 action: Action::UsageRead,
11512 cancellable: true,
11513 mutation: "read_only",
11514 },
11515 CommandContract {
11516 command: Command::ExecuteStateRead,
11517 action: Action::DataRead,
11518 cancellable: true,
11519 mutation: "read_only",
11520 },
11521 CommandContract {
11522 command: Command::PrepareStateWrite,
11523 action: Action::DataWrite,
11524 cancellable: true,
11525 mutation: "read_only_prepare",
11526 },
11527 CommandContract {
11528 command: Command::SubmitStateWrite,
11529 action: Action::DataWrite,
11530 cancellable: true,
11531 mutation: "state_submit",
11532 },
11533 CommandContract {
11534 command: Command::ResolveStateWrite,
11535 action: Action::DataRead,
11536 cancellable: true,
11537 mutation: "read_only",
11538 },
11539];
11540#[derive(Clone, Copy, Debug, Eq, PartialEq)]
11541pub struct CommandSemanticContract {
11542 pub command: Command,
11543 pub admissible_errors: &'static [ErrorCode],
11544 pub limit_ids: &'static [&'static str],
11545 pub effect_class: &'static str,
11546 pub risk_flags: &'static [&'static str],
11547 pub capability_family: &'static str,
11548 pub retry_safety: &'static str,
11549 pub identity_requirement: &'static str,
11550 pub resolver: Option<Command>,
11551 pub cancellation: &'static str,
11552 pub side_effects: &'static [&'static str],
11553 pub recovery: &'static str,
11554 pub collection_index_ref: &'static str,
11555}
11556pub const LODESTONE_API_COMMAND_SEMANTICS: &[CommandSemanticContract] = &[
11557 CommandSemanticContract {
11558 command: Command::Discover,
11559 admissible_errors: &[
11560 ErrorCode::Aborted,
11561 ErrorCode::DeadlineExceeded,
11562 ErrorCode::InvalidRequest,
11563 ErrorCode::UnsupportedVersion,
11564 ErrorCode::Unauthenticated,
11565 ErrorCode::PermissionDenied,
11566 ErrorCode::NotFound,
11567 ErrorCode::LimitExceeded,
11568 ErrorCode::CapabilityUnavailable,
11569 ErrorCode::TemporarilyUnavailable,
11570 ErrorCode::Internal,
11571 ],
11572 limit_ids: &["request_bytes", "response_bytes"],
11573 effect_class: "read_only",
11574 risk_flags: &[],
11575 capability_family: "discovery",
11576 retry_safety: "safe",
11577 identity_requirement: "none",
11578 resolver: None,
11579 cancellation: "per_call",
11580 side_effects: &[],
11581 recovery: "retry",
11582 collection_index_ref: "none",
11583 },
11584 CommandSemanticContract {
11585 command: Command::ListIndexes,
11586 admissible_errors: &[
11587 ErrorCode::Aborted,
11588 ErrorCode::DeadlineExceeded,
11589 ErrorCode::InvalidRequest,
11590 ErrorCode::UnsupportedVersion,
11591 ErrorCode::Unauthenticated,
11592 ErrorCode::PermissionDenied,
11593 ErrorCode::NotFound,
11594 ErrorCode::StaleCursor,
11595 ErrorCode::RestartBudgetExhausted,
11596 ErrorCode::LimitExceeded,
11597 ErrorCode::CapabilityUnavailable,
11598 ErrorCode::TemporarilyUnavailable,
11599 ErrorCode::Internal,
11600 ],
11601 limit_ids: &[
11602 "request_bytes",
11603 "response_bytes",
11604 "page_size",
11605 "catalog_page_size",
11606 "catalog_restart_budget",
11607 ],
11608 effect_class: "read_only",
11609 risk_flags: &[],
11610 capability_family: "catalog",
11611 retry_safety: "safe",
11612 identity_requirement: "none",
11613 resolver: None,
11614 cancellation: "per_call",
11615 side_effects: &[],
11616 recovery: "retry",
11617 collection_index_ref: "none",
11618 },
11619 CommandSemanticContract {
11620 command: Command::GetIndex,
11621 admissible_errors: &[
11622 ErrorCode::Aborted,
11623 ErrorCode::DeadlineExceeded,
11624 ErrorCode::InvalidRequest,
11625 ErrorCode::UnsupportedVersion,
11626 ErrorCode::Unauthenticated,
11627 ErrorCode::PermissionDenied,
11628 ErrorCode::NotFound,
11629 ErrorCode::LimitExceeded,
11630 ErrorCode::CapabilityUnavailable,
11631 ErrorCode::TemporarilyUnavailable,
11632 ErrorCode::Internal,
11633 ],
11634 limit_ids: &["request_bytes", "response_bytes"],
11635 effect_class: "read_only",
11636 risk_flags: &[],
11637 capability_family: "catalog",
11638 retry_safety: "safe",
11639 identity_requirement: "none",
11640 resolver: None,
11641 cancellation: "per_call",
11642 side_effects: &[],
11643 recovery: "retry",
11644 collection_index_ref: "none",
11645 },
11646 CommandSemanticContract {
11647 command: Command::ValidateIndexChange,
11648 admissible_errors: &[
11649 ErrorCode::Aborted,
11650 ErrorCode::DeadlineExceeded,
11651 ErrorCode::InvalidRequest,
11652 ErrorCode::UnsupportedVersion,
11653 ErrorCode::Unauthenticated,
11654 ErrorCode::PermissionDenied,
11655 ErrorCode::NotFound,
11656 ErrorCode::LimitExceeded,
11657 ErrorCode::CapabilityUnavailable,
11658 ErrorCode::TemporarilyUnavailable,
11659 ErrorCode::Internal,
11660 ],
11661 limit_ids: &["request_bytes", "response_bytes"],
11662 effect_class: "read_only",
11663 risk_flags: &[],
11664 capability_family: "catalog",
11665 retry_safety: "safe",
11666 identity_requirement: "none",
11667 resolver: None,
11668 cancellation: "per_call",
11669 side_effects: &[],
11670 recovery: "retry",
11671 collection_index_ref: "request_name",
11672 },
11673 CommandSemanticContract {
11674 command: Command::ApplyIndexChange,
11675 admissible_errors: &[
11676 ErrorCode::Aborted,
11677 ErrorCode::DeadlineExceeded,
11678 ErrorCode::InvalidRequest,
11679 ErrorCode::UnsupportedVersion,
11680 ErrorCode::Unauthenticated,
11681 ErrorCode::PermissionDenied,
11682 ErrorCode::NotFound,
11683 ErrorCode::Conflict,
11684 ErrorCode::LimitExceeded,
11685 ErrorCode::CapabilityUnavailable,
11686 ErrorCode::NotSubmitted,
11687 ErrorCode::SubmittedIndeterminate,
11688 ErrorCode::ExpiredUnknown,
11689 ErrorCode::TemporarilyUnavailable,
11690 ErrorCode::Internal,
11691 ],
11692 limit_ids: &["request_bytes", "response_bytes"],
11693 effect_class: "durable_submit",
11694 risk_flags: &[],
11695 capability_family: "catalog",
11696 retry_safety: "pre_submit_only",
11697 identity_requirement: "caller_action_id",
11698 resolver: None,
11699 cancellation: "per_call_until_submission_then_resolve",
11700 side_effects: &["commits_authoritative_state"],
11701 recovery: "retry_if_not_submitted",
11702 collection_index_ref: "request_index",
11703 },
11704 CommandSemanticContract {
11705 command: Command::ApplyAdministrationMutation,
11706 admissible_errors: &[
11707 ErrorCode::Aborted,
11708 ErrorCode::DeadlineExceeded,
11709 ErrorCode::InvalidRequest,
11710 ErrorCode::UnsupportedVersion,
11711 ErrorCode::Unauthenticated,
11712 ErrorCode::PermissionDenied,
11713 ErrorCode::NotFound,
11714 ErrorCode::Conflict,
11715 ErrorCode::LimitExceeded,
11716 ErrorCode::CapabilityUnavailable,
11717 ErrorCode::NotSubmitted,
11718 ErrorCode::SubmittedIndeterminate,
11719 ErrorCode::ExpiredUnknown,
11720 ErrorCode::TemporarilyUnavailable,
11721 ErrorCode::Internal,
11722 ],
11723 limit_ids: &["request_bytes", "response_bytes"],
11724 effect_class: "control_write",
11725 risk_flags: &[],
11726 capability_family: "lifecycle",
11727 retry_safety: "pre_submit_only",
11728 identity_requirement: "caller_action_id",
11729 resolver: None,
11730 cancellation: "per_call_until_submission_then_resolve",
11731 side_effects: &["commits_authoritative_state"],
11732 recovery: "retry_if_not_submitted",
11733 collection_index_ref: "none",
11734 },
11735 CommandSemanticContract {
11736 command: Command::ListAliases,
11737 admissible_errors: &[
11738 ErrorCode::Aborted,
11739 ErrorCode::DeadlineExceeded,
11740 ErrorCode::InvalidRequest,
11741 ErrorCode::UnsupportedVersion,
11742 ErrorCode::Unauthenticated,
11743 ErrorCode::PermissionDenied,
11744 ErrorCode::NotFound,
11745 ErrorCode::StaleCursor,
11746 ErrorCode::RestartBudgetExhausted,
11747 ErrorCode::LimitExceeded,
11748 ErrorCode::CapabilityUnavailable,
11749 ErrorCode::TemporarilyUnavailable,
11750 ErrorCode::Internal,
11751 ],
11752 limit_ids: &[
11753 "request_bytes",
11754 "response_bytes",
11755 "page_size",
11756 "catalog_page_size",
11757 "catalog_restart_budget",
11758 ],
11759 effect_class: "read_only",
11760 risk_flags: &[],
11761 capability_family: "catalog",
11762 retry_safety: "safe",
11763 identity_requirement: "none",
11764 resolver: None,
11765 cancellation: "per_call",
11766 side_effects: &[],
11767 recovery: "retry",
11768 collection_index_ref: "none",
11769 },
11770 CommandSemanticContract {
11771 command: Command::GetAlias,
11772 admissible_errors: &[
11773 ErrorCode::Aborted,
11774 ErrorCode::DeadlineExceeded,
11775 ErrorCode::InvalidRequest,
11776 ErrorCode::UnsupportedVersion,
11777 ErrorCode::Unauthenticated,
11778 ErrorCode::PermissionDenied,
11779 ErrorCode::NotFound,
11780 ErrorCode::LimitExceeded,
11781 ErrorCode::CapabilityUnavailable,
11782 ErrorCode::TemporarilyUnavailable,
11783 ErrorCode::Internal,
11784 ],
11785 limit_ids: &["request_bytes", "response_bytes"],
11786 effect_class: "read_only",
11787 risk_flags: &[],
11788 capability_family: "catalog",
11789 retry_safety: "safe",
11790 identity_requirement: "none",
11791 resolver: None,
11792 cancellation: "per_call",
11793 side_effects: &[],
11794 recovery: "retry",
11795 collection_index_ref: "none",
11796 },
11797 CommandSemanticContract {
11798 command: Command::ListDataStreams,
11799 admissible_errors: &[
11800 ErrorCode::Aborted,
11801 ErrorCode::DeadlineExceeded,
11802 ErrorCode::InvalidRequest,
11803 ErrorCode::UnsupportedVersion,
11804 ErrorCode::Unauthenticated,
11805 ErrorCode::PermissionDenied,
11806 ErrorCode::NotFound,
11807 ErrorCode::StaleCursor,
11808 ErrorCode::RestartBudgetExhausted,
11809 ErrorCode::LimitExceeded,
11810 ErrorCode::CapabilityUnavailable,
11811 ErrorCode::TemporarilyUnavailable,
11812 ErrorCode::Internal,
11813 ],
11814 limit_ids: &[
11815 "request_bytes",
11816 "response_bytes",
11817 "page_size",
11818 "catalog_page_size",
11819 "catalog_restart_budget",
11820 ],
11821 effect_class: "read_only",
11822 risk_flags: &[],
11823 capability_family: "catalog",
11824 retry_safety: "safe",
11825 identity_requirement: "none",
11826 resolver: None,
11827 cancellation: "per_call",
11828 side_effects: &[],
11829 recovery: "retry",
11830 collection_index_ref: "none",
11831 },
11832 CommandSemanticContract {
11833 command: Command::GetDataStream,
11834 admissible_errors: &[
11835 ErrorCode::Aborted,
11836 ErrorCode::DeadlineExceeded,
11837 ErrorCode::InvalidRequest,
11838 ErrorCode::UnsupportedVersion,
11839 ErrorCode::Unauthenticated,
11840 ErrorCode::PermissionDenied,
11841 ErrorCode::NotFound,
11842 ErrorCode::LimitExceeded,
11843 ErrorCode::CapabilityUnavailable,
11844 ErrorCode::TemporarilyUnavailable,
11845 ErrorCode::Internal,
11846 ],
11847 limit_ids: &["request_bytes", "response_bytes"],
11848 effect_class: "read_only",
11849 risk_flags: &[],
11850 capability_family: "catalog",
11851 retry_safety: "safe",
11852 identity_requirement: "none",
11853 resolver: None,
11854 cancellation: "per_call",
11855 side_effects: &[],
11856 recovery: "retry",
11857 collection_index_ref: "none",
11858 },
11859 CommandSemanticContract {
11860 command: Command::ListComponentTemplates,
11861 admissible_errors: &[
11862 ErrorCode::Aborted,
11863 ErrorCode::DeadlineExceeded,
11864 ErrorCode::InvalidRequest,
11865 ErrorCode::UnsupportedVersion,
11866 ErrorCode::Unauthenticated,
11867 ErrorCode::PermissionDenied,
11868 ErrorCode::NotFound,
11869 ErrorCode::StaleCursor,
11870 ErrorCode::RestartBudgetExhausted,
11871 ErrorCode::LimitExceeded,
11872 ErrorCode::CapabilityUnavailable,
11873 ErrorCode::TemporarilyUnavailable,
11874 ErrorCode::Internal,
11875 ],
11876 limit_ids: &[
11877 "request_bytes",
11878 "response_bytes",
11879 "page_size",
11880 "catalog_page_size",
11881 "catalog_restart_budget",
11882 ],
11883 effect_class: "read_only",
11884 risk_flags: &[],
11885 capability_family: "catalog",
11886 retry_safety: "safe",
11887 identity_requirement: "none",
11888 resolver: None,
11889 cancellation: "per_call",
11890 side_effects: &[],
11891 recovery: "retry",
11892 collection_index_ref: "none",
11893 },
11894 CommandSemanticContract {
11895 command: Command::GetComponentTemplate,
11896 admissible_errors: &[
11897 ErrorCode::Aborted,
11898 ErrorCode::DeadlineExceeded,
11899 ErrorCode::InvalidRequest,
11900 ErrorCode::UnsupportedVersion,
11901 ErrorCode::Unauthenticated,
11902 ErrorCode::PermissionDenied,
11903 ErrorCode::NotFound,
11904 ErrorCode::LimitExceeded,
11905 ErrorCode::CapabilityUnavailable,
11906 ErrorCode::TemporarilyUnavailable,
11907 ErrorCode::Internal,
11908 ],
11909 limit_ids: &["request_bytes", "response_bytes"],
11910 effect_class: "read_only",
11911 risk_flags: &[],
11912 capability_family: "catalog",
11913 retry_safety: "safe",
11914 identity_requirement: "none",
11915 resolver: None,
11916 cancellation: "per_call",
11917 side_effects: &[],
11918 recovery: "retry",
11919 collection_index_ref: "none",
11920 },
11921 CommandSemanticContract {
11922 command: Command::ListIndexTemplates,
11923 admissible_errors: &[
11924 ErrorCode::Aborted,
11925 ErrorCode::DeadlineExceeded,
11926 ErrorCode::InvalidRequest,
11927 ErrorCode::UnsupportedVersion,
11928 ErrorCode::Unauthenticated,
11929 ErrorCode::PermissionDenied,
11930 ErrorCode::NotFound,
11931 ErrorCode::StaleCursor,
11932 ErrorCode::RestartBudgetExhausted,
11933 ErrorCode::LimitExceeded,
11934 ErrorCode::CapabilityUnavailable,
11935 ErrorCode::TemporarilyUnavailable,
11936 ErrorCode::Internal,
11937 ],
11938 limit_ids: &[
11939 "request_bytes",
11940 "response_bytes",
11941 "page_size",
11942 "catalog_page_size",
11943 "catalog_restart_budget",
11944 ],
11945 effect_class: "read_only",
11946 risk_flags: &[],
11947 capability_family: "catalog",
11948 retry_safety: "safe",
11949 identity_requirement: "none",
11950 resolver: None,
11951 cancellation: "per_call",
11952 side_effects: &[],
11953 recovery: "retry",
11954 collection_index_ref: "none",
11955 },
11956 CommandSemanticContract {
11957 command: Command::GetIndexTemplate,
11958 admissible_errors: &[
11959 ErrorCode::Aborted,
11960 ErrorCode::DeadlineExceeded,
11961 ErrorCode::InvalidRequest,
11962 ErrorCode::UnsupportedVersion,
11963 ErrorCode::Unauthenticated,
11964 ErrorCode::PermissionDenied,
11965 ErrorCode::NotFound,
11966 ErrorCode::LimitExceeded,
11967 ErrorCode::CapabilityUnavailable,
11968 ErrorCode::TemporarilyUnavailable,
11969 ErrorCode::Internal,
11970 ],
11971 limit_ids: &["request_bytes", "response_bytes"],
11972 effect_class: "read_only",
11973 risk_flags: &[],
11974 capability_family: "catalog",
11975 retry_safety: "safe",
11976 identity_requirement: "none",
11977 resolver: None,
11978 cancellation: "per_call",
11979 side_effects: &[],
11980 recovery: "retry",
11981 collection_index_ref: "none",
11982 },
11983 CommandSemanticContract {
11984 command: Command::ListIngestPipelines,
11985 admissible_errors: &[
11986 ErrorCode::Aborted,
11987 ErrorCode::DeadlineExceeded,
11988 ErrorCode::InvalidRequest,
11989 ErrorCode::UnsupportedVersion,
11990 ErrorCode::Unauthenticated,
11991 ErrorCode::PermissionDenied,
11992 ErrorCode::NotFound,
11993 ErrorCode::StaleCursor,
11994 ErrorCode::RestartBudgetExhausted,
11995 ErrorCode::LimitExceeded,
11996 ErrorCode::CapabilityUnavailable,
11997 ErrorCode::TemporarilyUnavailable,
11998 ErrorCode::Internal,
11999 ],
12000 limit_ids: &[
12001 "request_bytes",
12002 "response_bytes",
12003 "page_size",
12004 "catalog_page_size",
12005 "catalog_restart_budget",
12006 ],
12007 effect_class: "read_only",
12008 risk_flags: &[],
12009 capability_family: "lifecycle",
12010 retry_safety: "safe",
12011 identity_requirement: "none",
12012 resolver: None,
12013 cancellation: "per_call",
12014 side_effects: &[],
12015 recovery: "retry",
12016 collection_index_ref: "none",
12017 },
12018 CommandSemanticContract {
12019 command: Command::GetIngestPipeline,
12020 admissible_errors: &[
12021 ErrorCode::Aborted,
12022 ErrorCode::DeadlineExceeded,
12023 ErrorCode::InvalidRequest,
12024 ErrorCode::UnsupportedVersion,
12025 ErrorCode::Unauthenticated,
12026 ErrorCode::PermissionDenied,
12027 ErrorCode::NotFound,
12028 ErrorCode::LimitExceeded,
12029 ErrorCode::CapabilityUnavailable,
12030 ErrorCode::TemporarilyUnavailable,
12031 ErrorCode::Internal,
12032 ],
12033 limit_ids: &["request_bytes", "response_bytes"],
12034 effect_class: "read_only",
12035 risk_flags: &[],
12036 capability_family: "lifecycle",
12037 retry_safety: "safe",
12038 identity_requirement: "none",
12039 resolver: None,
12040 cancellation: "per_call",
12041 side_effects: &[],
12042 recovery: "retry",
12043 collection_index_ref: "none",
12044 },
12045 CommandSemanticContract {
12046 command: Command::SimulateIngestPipeline,
12047 admissible_errors: &[
12048 ErrorCode::Aborted,
12049 ErrorCode::DeadlineExceeded,
12050 ErrorCode::InvalidRequest,
12051 ErrorCode::UnsupportedVersion,
12052 ErrorCode::Unauthenticated,
12053 ErrorCode::PermissionDenied,
12054 ErrorCode::NotFound,
12055 ErrorCode::LimitExceeded,
12056 ErrorCode::CapabilityUnavailable,
12057 ErrorCode::TemporarilyUnavailable,
12058 ErrorCode::Internal,
12059 ],
12060 limit_ids: &["request_bytes", "response_bytes"],
12061 effect_class: "read_only",
12062 risk_flags: &[],
12063 capability_family: "lifecycle",
12064 retry_safety: "safe",
12065 identity_requirement: "none",
12066 resolver: None,
12067 cancellation: "per_call",
12068 side_effects: &[],
12069 recovery: "retry",
12070 collection_index_ref: "none",
12071 },
12072 CommandSemanticContract {
12073 command: Command::ReprocessByQuery,
12074 admissible_errors: &[
12075 ErrorCode::Aborted,
12076 ErrorCode::DeadlineExceeded,
12077 ErrorCode::InvalidRequest,
12078 ErrorCode::UnsupportedVersion,
12079 ErrorCode::Unauthenticated,
12080 ErrorCode::PermissionDenied,
12081 ErrorCode::NotFound,
12082 ErrorCode::Conflict,
12083 ErrorCode::LimitExceeded,
12084 ErrorCode::CapabilityUnavailable,
12085 ErrorCode::NotSubmitted,
12086 ErrorCode::SubmittedIndeterminate,
12087 ErrorCode::ExpiredUnknown,
12088 ErrorCode::TemporarilyUnavailable,
12089 ErrorCode::Internal,
12090 ],
12091 limit_ids: &["request_bytes", "response_bytes"],
12092 effect_class: "durable_submit",
12093 risk_flags: &[],
12094 capability_family: "data",
12095 retry_safety: "safe",
12096 identity_requirement: "caller_action_id",
12097 resolver: None,
12098 cancellation: "per_call_until_submission_then_resolve",
12099 side_effects: &["commits_authoritative_state"],
12100 recovery: "retry",
12101 collection_index_ref: "request_index",
12102 },
12103 CommandSemanticContract {
12104 command: Command::ListLifecyclePolicies,
12105 admissible_errors: &[
12106 ErrorCode::Aborted,
12107 ErrorCode::DeadlineExceeded,
12108 ErrorCode::InvalidRequest,
12109 ErrorCode::UnsupportedVersion,
12110 ErrorCode::Unauthenticated,
12111 ErrorCode::PermissionDenied,
12112 ErrorCode::NotFound,
12113 ErrorCode::StaleCursor,
12114 ErrorCode::RestartBudgetExhausted,
12115 ErrorCode::LimitExceeded,
12116 ErrorCode::CapabilityUnavailable,
12117 ErrorCode::TemporarilyUnavailable,
12118 ErrorCode::Internal,
12119 ],
12120 limit_ids: &[
12121 "request_bytes",
12122 "response_bytes",
12123 "page_size",
12124 "catalog_page_size",
12125 "catalog_restart_budget",
12126 ],
12127 effect_class: "read_only",
12128 risk_flags: &[],
12129 capability_family: "catalog",
12130 retry_safety: "safe",
12131 identity_requirement: "none",
12132 resolver: None,
12133 cancellation: "per_call",
12134 side_effects: &[],
12135 recovery: "retry",
12136 collection_index_ref: "none",
12137 },
12138 CommandSemanticContract {
12139 command: Command::GetLifecyclePolicy,
12140 admissible_errors: &[
12141 ErrorCode::Aborted,
12142 ErrorCode::DeadlineExceeded,
12143 ErrorCode::InvalidRequest,
12144 ErrorCode::UnsupportedVersion,
12145 ErrorCode::Unauthenticated,
12146 ErrorCode::PermissionDenied,
12147 ErrorCode::NotFound,
12148 ErrorCode::LimitExceeded,
12149 ErrorCode::CapabilityUnavailable,
12150 ErrorCode::TemporarilyUnavailable,
12151 ErrorCode::Internal,
12152 ],
12153 limit_ids: &["request_bytes", "response_bytes"],
12154 effect_class: "read_only",
12155 risk_flags: &[],
12156 capability_family: "catalog",
12157 retry_safety: "safe",
12158 identity_requirement: "none",
12159 resolver: None,
12160 cancellation: "per_call",
12161 side_effects: &[],
12162 recovery: "retry",
12163 collection_index_ref: "none",
12164 },
12165 CommandSemanticContract {
12166 command: Command::PrepareCreateIndex,
12167 admissible_errors: &[
12168 ErrorCode::Aborted,
12169 ErrorCode::DeadlineExceeded,
12170 ErrorCode::InvalidRequest,
12171 ErrorCode::UnsupportedVersion,
12172 ErrorCode::Unauthenticated,
12173 ErrorCode::PermissionDenied,
12174 ErrorCode::NotFound,
12175 ErrorCode::LimitExceeded,
12176 ErrorCode::CapabilityUnavailable,
12177 ErrorCode::TemporarilyUnavailable,
12178 ErrorCode::Internal,
12179 ],
12180 limit_ids: &[
12181 "request_bytes",
12182 "response_bytes",
12183 "resource_initial_shards",
12184 "resource_target_shard_bytes",
12185 "resource_admission_weight",
12186 "resource_ram_bytes",
12187 "resource_nvme_bytes",
12188 "resource_refresh_millis",
12189 "resource_memtable_bytes",
12190 "resource_parallelism",
12191 ],
12192 effect_class: "prepare",
12193 risk_flags: &[],
12194 capability_family: "catalog",
12195 retry_safety: "safe",
12196 identity_requirement: "server_locator",
12197 resolver: None,
12198 cancellation: "per_call",
12199 side_effects: &["creates_bounded_preparation"],
12200 recovery: "retry",
12201 collection_index_ref: "request_name",
12202 },
12203 CommandSemanticContract {
12204 command: Command::PrepareDeleteIndex,
12205 admissible_errors: &[
12206 ErrorCode::Aborted,
12207 ErrorCode::DeadlineExceeded,
12208 ErrorCode::InvalidRequest,
12209 ErrorCode::UnsupportedVersion,
12210 ErrorCode::Unauthenticated,
12211 ErrorCode::PermissionDenied,
12212 ErrorCode::NotFound,
12213 ErrorCode::LimitExceeded,
12214 ErrorCode::CapabilityUnavailable,
12215 ErrorCode::TemporarilyUnavailable,
12216 ErrorCode::Internal,
12217 ],
12218 limit_ids: &["request_bytes", "response_bytes"],
12219 effect_class: "prepare",
12220 risk_flags: &["destructive"],
12221 capability_family: "catalog",
12222 retry_safety: "safe",
12223 identity_requirement: "server_locator",
12224 resolver: None,
12225 cancellation: "per_call",
12226 side_effects: &["creates_bounded_preparation"],
12227 recovery: "retry",
12228 collection_index_ref: "request_name",
12229 },
12230 CommandSemanticContract {
12231 command: Command::SubmitCatalogAction,
12232 admissible_errors: &[
12233 ErrorCode::Aborted,
12234 ErrorCode::DeadlineExceeded,
12235 ErrorCode::InvalidRequest,
12236 ErrorCode::UnsupportedVersion,
12237 ErrorCode::Unauthenticated,
12238 ErrorCode::PermissionDenied,
12239 ErrorCode::NotFound,
12240 ErrorCode::Conflict,
12241 ErrorCode::LimitExceeded,
12242 ErrorCode::CapabilityUnavailable,
12243 ErrorCode::NotSubmitted,
12244 ErrorCode::SubmittedIndeterminate,
12245 ErrorCode::ExpiredUnknown,
12246 ErrorCode::TemporarilyUnavailable,
12247 ErrorCode::Internal,
12248 ],
12249 limit_ids: &[
12250 "request_bytes",
12251 "response_bytes",
12252 "resource_initial_shards",
12253 "resource_target_shard_bytes",
12254 "resource_admission_weight",
12255 "resource_ram_bytes",
12256 "resource_nvme_bytes",
12257 "resource_refresh_millis",
12258 "resource_memtable_bytes",
12259 "resource_parallelism",
12260 ],
12261 effect_class: "durable_submit",
12262 risk_flags: &[],
12263 capability_family: "catalog",
12264 retry_safety: "pre_submit_only",
12265 identity_requirement: "request_locator",
12266 resolver: Some(Command::ResolveCatalogAction),
12267 cancellation: "per_call_until_submission_then_resolve",
12268 side_effects: &["commits_authoritative_state"],
12269 recovery: "resolve_with_resolve_catalog_action",
12270 collection_index_ref: "request_name",
12271 },
12272 CommandSemanticContract {
12273 command: Command::ResolveCatalogAction,
12274 admissible_errors: &[
12275 ErrorCode::Aborted,
12276 ErrorCode::DeadlineExceeded,
12277 ErrorCode::InvalidRequest,
12278 ErrorCode::UnsupportedVersion,
12279 ErrorCode::Unauthenticated,
12280 ErrorCode::PermissionDenied,
12281 ErrorCode::NotFound,
12282 ErrorCode::LimitExceeded,
12283 ErrorCode::CapabilityUnavailable,
12284 ErrorCode::TemporarilyUnavailable,
12285 ErrorCode::Internal,
12286 ],
12287 limit_ids: &["request_bytes", "response_bytes"],
12288 effect_class: "read_only",
12289 risk_flags: &[],
12290 capability_family: "catalog",
12291 retry_safety: "safe",
12292 identity_requirement: "request_locator",
12293 resolver: None,
12294 cancellation: "per_call",
12295 side_effects: &[],
12296 recovery: "retry",
12297 collection_index_ref: "caller",
12298 },
12299 CommandSemanticContract {
12300 command: Command::PrepareReplayableSourceIndex,
12301 admissible_errors: &[
12302 ErrorCode::Aborted,
12303 ErrorCode::DeadlineExceeded,
12304 ErrorCode::InvalidRequest,
12305 ErrorCode::UnsupportedVersion,
12306 ErrorCode::Unauthenticated,
12307 ErrorCode::PermissionDenied,
12308 ErrorCode::NotFound,
12309 ErrorCode::LimitExceeded,
12310 ErrorCode::CapabilityUnavailable,
12311 ErrorCode::RetentionGap,
12312 ErrorCode::TemporarilyUnavailable,
12313 ErrorCode::Internal,
12314 ],
12315 limit_ids: &[
12316 "request_bytes",
12317 "response_bytes",
12318 "resource_initial_shards",
12319 "resource_target_shard_bytes",
12320 "resource_admission_weight",
12321 "resource_ram_bytes",
12322 "resource_nvme_bytes",
12323 "resource_refresh_millis",
12324 "resource_memtable_bytes",
12325 "resource_parallelism",
12326 ],
12327 effect_class: "prepare",
12328 risk_flags: &[],
12329 capability_family: "catalog",
12330 retry_safety: "safe",
12331 identity_requirement: "server_locator",
12332 resolver: None,
12333 cancellation: "per_call",
12334 side_effects: &["creates_bounded_preparation"],
12335 recovery: "retry",
12336 collection_index_ref: "request_name",
12337 },
12338 CommandSemanticContract {
12339 command: Command::SubmitReplayableSourceIndex,
12340 admissible_errors: &[
12341 ErrorCode::Aborted,
12342 ErrorCode::DeadlineExceeded,
12343 ErrorCode::InvalidRequest,
12344 ErrorCode::UnsupportedVersion,
12345 ErrorCode::Unauthenticated,
12346 ErrorCode::PermissionDenied,
12347 ErrorCode::NotFound,
12348 ErrorCode::Conflict,
12349 ErrorCode::LimitExceeded,
12350 ErrorCode::CapabilityUnavailable,
12351 ErrorCode::NotSubmitted,
12352 ErrorCode::SubmittedIndeterminate,
12353 ErrorCode::ExpiredUnknown,
12354 ErrorCode::RetentionGap,
12355 ErrorCode::TemporarilyUnavailable,
12356 ErrorCode::Internal,
12357 ],
12358 limit_ids: &[
12359 "request_bytes",
12360 "response_bytes",
12361 "resource_initial_shards",
12362 "resource_target_shard_bytes",
12363 "resource_admission_weight",
12364 "resource_ram_bytes",
12365 "resource_nvme_bytes",
12366 "resource_refresh_millis",
12367 "resource_memtable_bytes",
12368 "resource_parallelism",
12369 ],
12370 effect_class: "durable_submit",
12371 risk_flags: &[],
12372 capability_family: "catalog",
12373 retry_safety: "pre_submit_only",
12374 identity_requirement: "request_locator",
12375 resolver: Some(Command::ResolveCatalogAction),
12376 cancellation: "per_call_until_submission_then_resolve",
12377 side_effects: &["commits_authoritative_state"],
12378 recovery: "resolve_with_resolve_catalog_action",
12379 collection_index_ref: "request_name",
12380 },
12381 CommandSemanticContract {
12382 command: Command::GetReplayableSource,
12383 admissible_errors: &[
12384 ErrorCode::Aborted,
12385 ErrorCode::DeadlineExceeded,
12386 ErrorCode::InvalidRequest,
12387 ErrorCode::UnsupportedVersion,
12388 ErrorCode::Unauthenticated,
12389 ErrorCode::PermissionDenied,
12390 ErrorCode::NotFound,
12391 ErrorCode::LimitExceeded,
12392 ErrorCode::CapabilityUnavailable,
12393 ErrorCode::RetentionGap,
12394 ErrorCode::TemporarilyUnavailable,
12395 ErrorCode::Internal,
12396 ],
12397 limit_ids: &["request_bytes", "response_bytes"],
12398 effect_class: "read_only",
12399 risk_flags: &[],
12400 capability_family: "catalog",
12401 retry_safety: "safe",
12402 identity_requirement: "none",
12403 resolver: None,
12404 cancellation: "per_call",
12405 side_effects: &[],
12406 recovery: "retry",
12407 collection_index_ref: "none",
12408 },
12409 CommandSemanticContract {
12410 command: Command::ControlReplayableSource,
12411 admissible_errors: &[
12412 ErrorCode::Aborted,
12413 ErrorCode::DeadlineExceeded,
12414 ErrorCode::InvalidRequest,
12415 ErrorCode::UnsupportedVersion,
12416 ErrorCode::Unauthenticated,
12417 ErrorCode::PermissionDenied,
12418 ErrorCode::NotFound,
12419 ErrorCode::Conflict,
12420 ErrorCode::LimitExceeded,
12421 ErrorCode::CapabilityUnavailable,
12422 ErrorCode::NotSubmitted,
12423 ErrorCode::SubmittedIndeterminate,
12424 ErrorCode::ExpiredUnknown,
12425 ErrorCode::RetentionGap,
12426 ErrorCode::TemporarilyUnavailable,
12427 ErrorCode::Internal,
12428 ],
12429 limit_ids: &["request_bytes", "response_bytes"],
12430 effect_class: "durable_submit",
12431 risk_flags: &[],
12432 capability_family: "catalog",
12433 retry_safety: "pre_submit_only",
12434 identity_requirement: "none",
12435 resolver: None,
12436 cancellation: "per_call_until_submission_then_resolve",
12437 side_effects: &["commits_authoritative_state"],
12438 recovery: "retry_if_not_submitted",
12439 collection_index_ref: "request_index",
12440 },
12441 CommandSemanticContract {
12442 command: Command::CloneIndex,
12443 admissible_errors: &[
12444 ErrorCode::Aborted,
12445 ErrorCode::DeadlineExceeded,
12446 ErrorCode::InvalidRequest,
12447 ErrorCode::UnsupportedVersion,
12448 ErrorCode::Unauthenticated,
12449 ErrorCode::PermissionDenied,
12450 ErrorCode::NotFound,
12451 ErrorCode::Conflict,
12452 ErrorCode::LimitExceeded,
12453 ErrorCode::CapabilityUnavailable,
12454 ErrorCode::NotSubmitted,
12455 ErrorCode::SubmittedIndeterminate,
12456 ErrorCode::ExpiredUnknown,
12457 ErrorCode::TemporarilyUnavailable,
12458 ErrorCode::Internal,
12459 ],
12460 limit_ids: &["request_bytes", "response_bytes"],
12461 effect_class: "durable_submit",
12462 risk_flags: &[],
12463 capability_family: "catalog",
12464 retry_safety: "pre_submit_only",
12465 identity_requirement: "caller_action_id",
12466 resolver: Some(Command::CloneIndex),
12467 cancellation: "per_call_until_submission_then_resolve",
12468 side_effects: &["commits_authoritative_state"],
12469 recovery: "resolve_with_clone_index",
12470 collection_index_ref: "caller",
12471 },
12472 CommandSemanticContract {
12473 command: Command::ConfigureHistory,
12474 admissible_errors: &[
12475 ErrorCode::Aborted,
12476 ErrorCode::DeadlineExceeded,
12477 ErrorCode::InvalidRequest,
12478 ErrorCode::UnsupportedVersion,
12479 ErrorCode::Unauthenticated,
12480 ErrorCode::PermissionDenied,
12481 ErrorCode::NotFound,
12482 ErrorCode::Conflict,
12483 ErrorCode::LimitExceeded,
12484 ErrorCode::CapabilityUnavailable,
12485 ErrorCode::NotSubmitted,
12486 ErrorCode::SubmittedIndeterminate,
12487 ErrorCode::ExpiredUnknown,
12488 ErrorCode::TemporarilyUnavailable,
12489 ErrorCode::Internal,
12490 ],
12491 limit_ids: &["request_bytes", "response_bytes"],
12492 effect_class: "durable_submit",
12493 risk_flags: &[],
12494 capability_family: "catalog",
12495 retry_safety: "pre_submit_only",
12496 identity_requirement: "none",
12497 resolver: Some(Command::GetHistory),
12498 cancellation: "per_call_until_submission_then_resolve",
12499 side_effects: &["commits_authoritative_state"],
12500 recovery: "resolve_with_get_history",
12501 collection_index_ref: "request_index",
12502 },
12503 CommandSemanticContract {
12504 command: Command::GetHistory,
12505 admissible_errors: &[
12506 ErrorCode::Aborted,
12507 ErrorCode::DeadlineExceeded,
12508 ErrorCode::InvalidRequest,
12509 ErrorCode::UnsupportedVersion,
12510 ErrorCode::Unauthenticated,
12511 ErrorCode::PermissionDenied,
12512 ErrorCode::NotFound,
12513 ErrorCode::LimitExceeded,
12514 ErrorCode::CapabilityUnavailable,
12515 ErrorCode::TemporarilyUnavailable,
12516 ErrorCode::Internal,
12517 ],
12518 limit_ids: &["request_bytes", "response_bytes"],
12519 effect_class: "read_only",
12520 risk_flags: &[],
12521 capability_family: "catalog",
12522 retry_safety: "safe",
12523 identity_requirement: "none",
12524 resolver: None,
12525 cancellation: "per_call",
12526 side_effects: &[],
12527 recovery: "retry",
12528 collection_index_ref: "none",
12529 },
12530 CommandSemanticContract {
12531 command: Command::ResolveHistory,
12532 admissible_errors: &[
12533 ErrorCode::Aborted,
12534 ErrorCode::DeadlineExceeded,
12535 ErrorCode::InvalidRequest,
12536 ErrorCode::UnsupportedVersion,
12537 ErrorCode::Unauthenticated,
12538 ErrorCode::PermissionDenied,
12539 ErrorCode::NotFound,
12540 ErrorCode::LimitExceeded,
12541 ErrorCode::CapabilityUnavailable,
12542 ErrorCode::RetentionGap,
12543 ErrorCode::TemporarilyUnavailable,
12544 ErrorCode::Internal,
12545 ],
12546 limit_ids: &["request_bytes", "response_bytes"],
12547 effect_class: "read_only",
12548 risk_flags: &[],
12549 capability_family: "data",
12550 retry_safety: "safe",
12551 identity_requirement: "none",
12552 resolver: None,
12553 cancellation: "per_call",
12554 side_effects: &[],
12555 recovery: "retry",
12556 collection_index_ref: "request_index",
12557 },
12558 CommandSemanticContract {
12559 command: Command::PlaceHistoryHold,
12560 admissible_errors: &[
12561 ErrorCode::Aborted,
12562 ErrorCode::DeadlineExceeded,
12563 ErrorCode::InvalidRequest,
12564 ErrorCode::UnsupportedVersion,
12565 ErrorCode::Unauthenticated,
12566 ErrorCode::PermissionDenied,
12567 ErrorCode::NotFound,
12568 ErrorCode::Conflict,
12569 ErrorCode::LimitExceeded,
12570 ErrorCode::CapabilityUnavailable,
12571 ErrorCode::NotSubmitted,
12572 ErrorCode::SubmittedIndeterminate,
12573 ErrorCode::ExpiredUnknown,
12574 ErrorCode::TemporarilyUnavailable,
12575 ErrorCode::Internal,
12576 ],
12577 limit_ids: &["request_bytes", "response_bytes"],
12578 effect_class: "durable_submit",
12579 risk_flags: &[],
12580 capability_family: "catalog",
12581 retry_safety: "pre_submit_only",
12582 identity_requirement: "none",
12583 resolver: Some(Command::GetHistory),
12584 cancellation: "per_call_until_submission_then_resolve",
12585 side_effects: &["commits_authoritative_state"],
12586 recovery: "resolve_with_get_history",
12587 collection_index_ref: "request_index",
12588 },
12589 CommandSemanticContract {
12590 command: Command::ReleaseHistoryHold,
12591 admissible_errors: &[
12592 ErrorCode::Aborted,
12593 ErrorCode::DeadlineExceeded,
12594 ErrorCode::InvalidRequest,
12595 ErrorCode::UnsupportedVersion,
12596 ErrorCode::Unauthenticated,
12597 ErrorCode::PermissionDenied,
12598 ErrorCode::NotFound,
12599 ErrorCode::Conflict,
12600 ErrorCode::LimitExceeded,
12601 ErrorCode::CapabilityUnavailable,
12602 ErrorCode::NotSubmitted,
12603 ErrorCode::SubmittedIndeterminate,
12604 ErrorCode::ExpiredUnknown,
12605 ErrorCode::TemporarilyUnavailable,
12606 ErrorCode::Internal,
12607 ],
12608 limit_ids: &["request_bytes", "response_bytes"],
12609 effect_class: "durable_submit",
12610 risk_flags: &[],
12611 capability_family: "catalog",
12612 retry_safety: "pre_submit_only",
12613 identity_requirement: "none",
12614 resolver: Some(Command::GetHistory),
12615 cancellation: "per_call_until_submission_then_resolve",
12616 side_effects: &["commits_authoritative_state"],
12617 recovery: "resolve_with_get_history",
12618 collection_index_ref: "request_index",
12619 },
12620 CommandSemanticContract {
12621 command: Command::PrepareDocumentMutation,
12622 admissible_errors: &[
12623 ErrorCode::Aborted,
12624 ErrorCode::DeadlineExceeded,
12625 ErrorCode::InvalidRequest,
12626 ErrorCode::UnsupportedVersion,
12627 ErrorCode::Unauthenticated,
12628 ErrorCode::PermissionDenied,
12629 ErrorCode::NotFound,
12630 ErrorCode::LimitExceeded,
12631 ErrorCode::CapabilityUnavailable,
12632 ErrorCode::TemporarilyUnavailable,
12633 ErrorCode::Internal,
12634 ],
12635 limit_ids: &["request_bytes", "response_bytes"],
12636 effect_class: "prepare",
12637 risk_flags: &[],
12638 capability_family: "data",
12639 retry_safety: "safe",
12640 identity_requirement: "server_locator",
12641 resolver: None,
12642 cancellation: "per_call",
12643 side_effects: &["creates_bounded_preparation"],
12644 recovery: "retry",
12645 collection_index_ref: "request_index",
12646 },
12647 CommandSemanticContract {
12648 command: Command::SubmitDocumentMutation,
12649 admissible_errors: &[
12650 ErrorCode::Aborted,
12651 ErrorCode::DeadlineExceeded,
12652 ErrorCode::InvalidRequest,
12653 ErrorCode::UnsupportedVersion,
12654 ErrorCode::Unauthenticated,
12655 ErrorCode::PermissionDenied,
12656 ErrorCode::NotFound,
12657 ErrorCode::Conflict,
12658 ErrorCode::LimitExceeded,
12659 ErrorCode::CapabilityUnavailable,
12660 ErrorCode::NotSubmitted,
12661 ErrorCode::SubmittedIndeterminate,
12662 ErrorCode::ExpiredUnknown,
12663 ErrorCode::TemporarilyUnavailable,
12664 ErrorCode::Internal,
12665 ],
12666 limit_ids: &["request_bytes", "response_bytes"],
12667 effect_class: "durable_submit",
12668 risk_flags: &[],
12669 capability_family: "data",
12670 retry_safety: "pre_submit_only",
12671 identity_requirement: "request_locator",
12672 resolver: Some(Command::ResolveDocumentMutation),
12673 cancellation: "per_call_until_submission_then_resolve",
12674 side_effects: &["commits_authoritative_state"],
12675 recovery: "resolve_with_resolve_document_mutation",
12676 collection_index_ref: "request_index",
12677 },
12678 CommandSemanticContract {
12679 command: Command::PrepareDocumentBulk,
12680 admissible_errors: &[
12681 ErrorCode::Aborted,
12682 ErrorCode::DeadlineExceeded,
12683 ErrorCode::InvalidRequest,
12684 ErrorCode::UnsupportedVersion,
12685 ErrorCode::Unauthenticated,
12686 ErrorCode::PermissionDenied,
12687 ErrorCode::NotFound,
12688 ErrorCode::LimitExceeded,
12689 ErrorCode::CapabilityUnavailable,
12690 ErrorCode::TemporarilyUnavailable,
12691 ErrorCode::Internal,
12692 ],
12693 limit_ids: &[
12694 "request_bytes",
12695 "response_bytes",
12696 "bulk_document_items",
12697 "bulk_document_bytes",
12698 ],
12699 effect_class: "prepare",
12700 risk_flags: &[],
12701 capability_family: "data",
12702 retry_safety: "safe",
12703 identity_requirement: "caller_action_id",
12704 resolver: None,
12705 cancellation: "per_call",
12706 side_effects: &["creates_bounded_preparation"],
12707 recovery: "retry",
12708 collection_index_ref: "request_index",
12709 },
12710 CommandSemanticContract {
12711 command: Command::SubmitDocumentBulk,
12712 admissible_errors: &[
12713 ErrorCode::Aborted,
12714 ErrorCode::DeadlineExceeded,
12715 ErrorCode::InvalidRequest,
12716 ErrorCode::UnsupportedVersion,
12717 ErrorCode::Unauthenticated,
12718 ErrorCode::PermissionDenied,
12719 ErrorCode::NotFound,
12720 ErrorCode::Conflict,
12721 ErrorCode::LimitExceeded,
12722 ErrorCode::CapabilityUnavailable,
12723 ErrorCode::NotSubmitted,
12724 ErrorCode::SubmittedIndeterminate,
12725 ErrorCode::ExpiredUnknown,
12726 ErrorCode::TemporarilyUnavailable,
12727 ErrorCode::Internal,
12728 ],
12729 limit_ids: &[
12730 "request_bytes",
12731 "response_bytes",
12732 "bulk_document_items",
12733 "bulk_document_bytes",
12734 ],
12735 effect_class: "durable_submit",
12736 risk_flags: &[],
12737 capability_family: "data",
12738 retry_safety: "pre_submit_only",
12739 identity_requirement: "caller_action_id",
12740 resolver: Some(Command::ResolveDocumentBulk),
12741 cancellation: "per_call_until_submission_then_resolve",
12742 side_effects: &["commits_authoritative_state"],
12743 recovery: "resolve_with_resolve_document_bulk",
12744 collection_index_ref: "request_index",
12745 },
12746 CommandSemanticContract {
12747 command: Command::ResolveDocumentBulk,
12748 admissible_errors: &[
12749 ErrorCode::Aborted,
12750 ErrorCode::DeadlineExceeded,
12751 ErrorCode::InvalidRequest,
12752 ErrorCode::UnsupportedVersion,
12753 ErrorCode::Unauthenticated,
12754 ErrorCode::PermissionDenied,
12755 ErrorCode::NotFound,
12756 ErrorCode::LimitExceeded,
12757 ErrorCode::CapabilityUnavailable,
12758 ErrorCode::TemporarilyUnavailable,
12759 ErrorCode::Internal,
12760 ],
12761 limit_ids: &[
12762 "request_bytes",
12763 "response_bytes",
12764 "bulk_document_items",
12765 "bulk_document_bytes",
12766 ],
12767 effect_class: "read_only",
12768 risk_flags: &[],
12769 capability_family: "data",
12770 retry_safety: "safe",
12771 identity_requirement: "caller_action_id",
12772 resolver: None,
12773 cancellation: "per_call",
12774 side_effects: &[],
12775 recovery: "retry",
12776 collection_index_ref: "request_index",
12777 },
12778 CommandSemanticContract {
12779 command: Command::PrepareAppendBulk,
12780 admissible_errors: &[
12781 ErrorCode::Aborted,
12782 ErrorCode::DeadlineExceeded,
12783 ErrorCode::InvalidRequest,
12784 ErrorCode::UnsupportedVersion,
12785 ErrorCode::Unauthenticated,
12786 ErrorCode::PermissionDenied,
12787 ErrorCode::NotFound,
12788 ErrorCode::LimitExceeded,
12789 ErrorCode::CapabilityUnavailable,
12790 ErrorCode::TemporarilyUnavailable,
12791 ErrorCode::Internal,
12792 ],
12793 limit_ids: &[
12794 "request_bytes",
12795 "response_bytes",
12796 "bulk_document_items",
12797 "bulk_document_bytes",
12798 ],
12799 effect_class: "prepare",
12800 risk_flags: &[],
12801 capability_family: "data",
12802 retry_safety: "safe",
12803 identity_requirement: "caller_action_id",
12804 resolver: None,
12805 cancellation: "per_call",
12806 side_effects: &[],
12807 recovery: "retry",
12808 collection_index_ref: "request_index",
12809 },
12810 CommandSemanticContract {
12811 command: Command::SubmitAppendBulk,
12812 admissible_errors: &[
12813 ErrorCode::Aborted,
12814 ErrorCode::DeadlineExceeded,
12815 ErrorCode::InvalidRequest,
12816 ErrorCode::UnsupportedVersion,
12817 ErrorCode::Unauthenticated,
12818 ErrorCode::PermissionDenied,
12819 ErrorCode::NotFound,
12820 ErrorCode::Conflict,
12821 ErrorCode::LimitExceeded,
12822 ErrorCode::CapabilityUnavailable,
12823 ErrorCode::NotSubmitted,
12824 ErrorCode::SubmittedIndeterminate,
12825 ErrorCode::TemporarilyUnavailable,
12826 ErrorCode::Internal,
12827 ],
12828 limit_ids: &[
12829 "request_bytes",
12830 "response_bytes",
12831 "bulk_document_items",
12832 "bulk_document_bytes",
12833 ],
12834 effect_class: "durable_submit",
12835 risk_flags: &[],
12836 capability_family: "data",
12837 retry_safety: "pre_submit_only",
12838 identity_requirement: "request_locator",
12839 resolver: Some(Command::ResolveAppendBulk),
12840 cancellation: "per_call_until_submission_then_resolve",
12841 side_effects: &["commits_authoritative_state"],
12842 recovery: "resolve_with_resolve_append_bulk",
12843 collection_index_ref: "request_index",
12844 },
12845 CommandSemanticContract {
12846 command: Command::ResolveAppendBulk,
12847 admissible_errors: &[
12848 ErrorCode::Aborted,
12849 ErrorCode::DeadlineExceeded,
12850 ErrorCode::InvalidRequest,
12851 ErrorCode::UnsupportedVersion,
12852 ErrorCode::Unauthenticated,
12853 ErrorCode::PermissionDenied,
12854 ErrorCode::NotFound,
12855 ErrorCode::Conflict,
12856 ErrorCode::LimitExceeded,
12857 ErrorCode::CapabilityUnavailable,
12858 ErrorCode::TemporarilyUnavailable,
12859 ErrorCode::Internal,
12860 ],
12861 limit_ids: &[
12862 "request_bytes",
12863 "response_bytes",
12864 "bulk_document_items",
12865 "bulk_document_bytes",
12866 ],
12867 effect_class: "read_only",
12868 risk_flags: &[],
12869 capability_family: "data",
12870 retry_safety: "safe",
12871 identity_requirement: "request_locator",
12872 resolver: None,
12873 cancellation: "per_call",
12874 side_effects: &[],
12875 recovery: "retry",
12876 collection_index_ref: "request_index",
12877 },
12878 CommandSemanticContract {
12879 command: Command::ObserveAppendCommitted,
12880 admissible_errors: &[
12881 ErrorCode::Aborted,
12882 ErrorCode::DeadlineExceeded,
12883 ErrorCode::InvalidRequest,
12884 ErrorCode::UnsupportedVersion,
12885 ErrorCode::Unauthenticated,
12886 ErrorCode::PermissionDenied,
12887 ErrorCode::NotFound,
12888 ErrorCode::Conflict,
12889 ErrorCode::LimitExceeded,
12890 ErrorCode::CapabilityUnavailable,
12891 ErrorCode::TemporarilyUnavailable,
12892 ErrorCode::Internal,
12893 ],
12894 limit_ids: &["request_bytes", "response_bytes"],
12895 effect_class: "read_only",
12896 risk_flags: &[],
12897 capability_family: "data",
12898 retry_safety: "safe",
12899 identity_requirement: "request_locator",
12900 resolver: None,
12901 cancellation: "per_call",
12902 side_effects: &[],
12903 recovery: "retry",
12904 collection_index_ref: "request_index",
12905 },
12906 CommandSemanticContract {
12907 command: Command::ResolveDocumentMutation,
12908 admissible_errors: &[
12909 ErrorCode::Aborted,
12910 ErrorCode::DeadlineExceeded,
12911 ErrorCode::InvalidRequest,
12912 ErrorCode::UnsupportedVersion,
12913 ErrorCode::Unauthenticated,
12914 ErrorCode::PermissionDenied,
12915 ErrorCode::NotFound,
12916 ErrorCode::LimitExceeded,
12917 ErrorCode::CapabilityUnavailable,
12918 ErrorCode::TemporarilyUnavailable,
12919 ErrorCode::Internal,
12920 ],
12921 limit_ids: &["request_bytes", "response_bytes"],
12922 effect_class: "read_only",
12923 risk_flags: &[],
12924 capability_family: "data",
12925 retry_safety: "safe",
12926 identity_requirement: "request_locator",
12927 resolver: None,
12928 cancellation: "per_call",
12929 side_effects: &[],
12930 recovery: "retry",
12931 collection_index_ref: "caller",
12932 },
12933 CommandSemanticContract {
12934 command: Command::GetDocument,
12935 admissible_errors: &[
12936 ErrorCode::Aborted,
12937 ErrorCode::DeadlineExceeded,
12938 ErrorCode::InvalidRequest,
12939 ErrorCode::UnsupportedVersion,
12940 ErrorCode::Unauthenticated,
12941 ErrorCode::PermissionDenied,
12942 ErrorCode::NotFound,
12943 ErrorCode::LimitExceeded,
12944 ErrorCode::CapabilityUnavailable,
12945 ErrorCode::TemporarilyUnavailable,
12946 ErrorCode::Internal,
12947 ],
12948 limit_ids: &["request_bytes", "response_bytes"],
12949 effect_class: "read_only",
12950 risk_flags: &[],
12951 capability_family: "data",
12952 retry_safety: "safe",
12953 identity_requirement: "none",
12954 resolver: None,
12955 cancellation: "per_call",
12956 side_effects: &[],
12957 recovery: "retry",
12958 collection_index_ref: "request_index",
12959 },
12960 CommandSemanticContract {
12961 command: Command::Search,
12962 admissible_errors: &[
12963 ErrorCode::Aborted,
12964 ErrorCode::DeadlineExceeded,
12965 ErrorCode::InvalidRequest,
12966 ErrorCode::UnsupportedVersion,
12967 ErrorCode::Unauthenticated,
12968 ErrorCode::PermissionDenied,
12969 ErrorCode::NotFound,
12970 ErrorCode::StaleCursor,
12971 ErrorCode::RestartBudgetExhausted,
12972 ErrorCode::LimitExceeded,
12973 ErrorCode::CapabilityUnavailable,
12974 ErrorCode::TemporarilyUnavailable,
12975 ErrorCode::Internal,
12976 ],
12977 limit_ids: &[
12978 "request_bytes",
12979 "response_bytes",
12980 "page_size",
12981 "query_clauses",
12982 "aggregation_nodes",
12983 "aggregation_buckets",
12984 "routing_values",
12985 "routing_value_bytes",
12986 "query_recursion_depth",
12987 "text_query_bytes",
12988 "text_query_fields",
12989 "text_query_slop",
12990 "text_query_boost",
12991 "text_query_fuzzy_expansions",
12992 "text_query_fuzzy_distance",
12993 "text_query_dictionary_scan_terms",
12994 "text_query_dictionary_scan_bytes",
12995 "text_query_fuzzy_work_units",
12996 "vector_dimensions",
12997 "vector_query_bytes",
12998 "vector_request_bytes",
12999 "vector_candidates",
13000 "vector_set_query_vectors",
13001 "vector_set_query_bytes",
13002 "retrieval_branches",
13003 "retrieval_branch_name_bytes",
13004 "retrieval_window",
13005 "fragment_fields",
13006 "fragments_per_field",
13007 "fragment_bytes",
13008 "fragment_total_bytes",
13009 "result_feature_hits",
13010 "result_features",
13011 "diversification_fields",
13012 "diversification_per_group",
13013 "source_projection_patterns",
13014 "source_projection_pattern_bytes",
13015 "search_result_window",
13016 ],
13017 effect_class: "read_only",
13018 risk_flags: &[],
13019 capability_family: "data",
13020 retry_safety: "safe",
13021 identity_requirement: "none",
13022 resolver: None,
13023 cancellation: "per_call",
13024 side_effects: &[],
13025 recovery: "retry",
13026 collection_index_ref: "request_indexes_or_pit_authority",
13027 },
13028 CommandSemanticContract {
13029 command: Command::TraverseRelationships,
13030 admissible_errors: &[
13031 ErrorCode::Aborted,
13032 ErrorCode::DeadlineExceeded,
13033 ErrorCode::InvalidRequest,
13034 ErrorCode::UnsupportedVersion,
13035 ErrorCode::Unauthenticated,
13036 ErrorCode::PermissionDenied,
13037 ErrorCode::NotFound,
13038 ErrorCode::LimitExceeded,
13039 ErrorCode::CapabilityUnavailable,
13040 ErrorCode::TemporarilyUnavailable,
13041 ErrorCode::Internal,
13042 ],
13043 limit_ids: &[
13044 "request_bytes",
13045 "response_bytes",
13046 "relationship_indexes",
13047 "relationship_seeds",
13048 "relationship_filter_values",
13049 "relationship_depth",
13050 "relationship_fan_out",
13051 "relationship_visited_entities",
13052 "relationship_visited_records",
13053 "relationship_returned_records",
13054 "relationship_memory_bytes",
13055 "search_result_window",
13056 ],
13057 effect_class: "read_only",
13058 risk_flags: &[],
13059 capability_family: "data",
13060 retry_safety: "safe",
13061 identity_requirement: "none",
13062 resolver: None,
13063 cancellation: "per_call",
13064 side_effects: &[],
13065 recovery: "retry",
13066 collection_index_ref: "pit_authority",
13067 },
13068 CommandSemanticContract {
13069 command: Command::QueryProfiles,
13070 admissible_errors: &[
13071 ErrorCode::Aborted,
13072 ErrorCode::DeadlineExceeded,
13073 ErrorCode::InvalidRequest,
13074 ErrorCode::UnsupportedVersion,
13075 ErrorCode::Unauthenticated,
13076 ErrorCode::PermissionDenied,
13077 ErrorCode::NotFound,
13078 ErrorCode::LimitExceeded,
13079 ErrorCode::CapabilityUnavailable,
13080 ErrorCode::TemporarilyUnavailable,
13081 ErrorCode::Internal,
13082 ],
13083 limit_ids: &[
13084 "request_bytes",
13085 "response_bytes",
13086 "profile_indexes",
13087 "profile_filter_values",
13088 "profile_batches",
13089 "profile_samples",
13090 "profile_results",
13091 "profile_memory_bytes",
13092 "search_result_window",
13093 ],
13094 effect_class: "read_only",
13095 risk_flags: &[],
13096 capability_family: "data",
13097 retry_safety: "safe",
13098 identity_requirement: "none",
13099 resolver: None,
13100 cancellation: "per_call",
13101 side_effects: &[],
13102 recovery: "retry",
13103 collection_index_ref: "pit_authority",
13104 },
13105 CommandSemanticContract {
13106 command: Command::EvaluateTemporalEvidence,
13107 admissible_errors: &[
13108 ErrorCode::Aborted,
13109 ErrorCode::DeadlineExceeded,
13110 ErrorCode::InvalidRequest,
13111 ErrorCode::UnsupportedVersion,
13112 ErrorCode::Unauthenticated,
13113 ErrorCode::PermissionDenied,
13114 ErrorCode::NotFound,
13115 ErrorCode::LimitExceeded,
13116 ErrorCode::CapabilityUnavailable,
13117 ErrorCode::TemporarilyUnavailable,
13118 ErrorCode::Internal,
13119 ],
13120 limit_ids: &[
13121 "request_bytes",
13122 "response_bytes",
13123 "query_clauses",
13124 "query_recursion_depth",
13125 "search_result_window",
13126 "temporal_inputs",
13127 "temporal_pattern_nodes",
13128 "temporal_pattern_depth",
13129 "temporal_pattern_branches",
13130 "temporal_correlation_keys",
13131 "temporal_events",
13132 "temporal_states",
13133 "temporal_captured_events",
13134 "temporal_results",
13135 "temporal_state_bytes",
13136 "temporal_interval_nanos",
13137 ],
13138 effect_class: "read_only",
13139 risk_flags: &[],
13140 capability_family: "data",
13141 retry_safety: "safe",
13142 identity_requirement: "none",
13143 resolver: None,
13144 cancellation: "per_call",
13145 side_effects: &[],
13146 recovery: "retry",
13147 collection_index_ref: "pit_authority",
13148 },
13149 CommandSemanticContract {
13150 command: Command::CreateContinuousTemporalEvaluation,
13151 admissible_errors: &[
13152 ErrorCode::Aborted,
13153 ErrorCode::DeadlineExceeded,
13154 ErrorCode::InvalidRequest,
13155 ErrorCode::UnsupportedVersion,
13156 ErrorCode::Unauthenticated,
13157 ErrorCode::PermissionDenied,
13158 ErrorCode::NotFound,
13159 ErrorCode::Conflict,
13160 ErrorCode::LimitExceeded,
13161 ErrorCode::CapabilityUnavailable,
13162 ErrorCode::NotSubmitted,
13163 ErrorCode::SubmittedIndeterminate,
13164 ErrorCode::TemporarilyUnavailable,
13165 ErrorCode::Internal,
13166 ],
13167 limit_ids: &[
13168 "request_bytes",
13169 "response_bytes",
13170 "temporal_inputs",
13171 "temporal_pattern_nodes",
13172 "temporal_pattern_depth",
13173 "temporal_pattern_branches",
13174 "temporal_correlation_keys",
13175 "temporal_events",
13176 "temporal_states",
13177 "temporal_captured_events",
13178 "temporal_results",
13179 "temporal_state_bytes",
13180 "temporal_interval_nanos",
13181 ],
13182 effect_class: "durable_submit",
13183 risk_flags: &[],
13184 capability_family: "lifecycle",
13185 retry_safety: "pre_submit_only",
13186 identity_requirement: "caller_action_id",
13187 resolver: Some(Command::GetContinuousTemporalEvaluation),
13188 cancellation: "per_call_until_submission_then_resolve",
13189 side_effects: &["commits_authoritative_state"],
13190 recovery: "resolve_with_get_continuous_temporal_evaluation",
13191 collection_index_ref: "request_temporal_inputs",
13192 },
13193 CommandSemanticContract {
13194 command: Command::GetContinuousTemporalEvaluation,
13195 admissible_errors: &[
13196 ErrorCode::Aborted,
13197 ErrorCode::DeadlineExceeded,
13198 ErrorCode::InvalidRequest,
13199 ErrorCode::UnsupportedVersion,
13200 ErrorCode::Unauthenticated,
13201 ErrorCode::PermissionDenied,
13202 ErrorCode::NotFound,
13203 ErrorCode::LimitExceeded,
13204 ErrorCode::CapabilityUnavailable,
13205 ErrorCode::TemporarilyUnavailable,
13206 ErrorCode::Internal,
13207 ],
13208 limit_ids: &["request_bytes", "response_bytes"],
13209 effect_class: "read_only",
13210 risk_flags: &[],
13211 capability_family: "lifecycle",
13212 retry_safety: "safe",
13213 identity_requirement: "none",
13214 resolver: None,
13215 cancellation: "per_call",
13216 side_effects: &[],
13217 recovery: "retry",
13218 collection_index_ref: "request_evaluation",
13219 },
13220 CommandSemanticContract {
13221 command: Command::PauseContinuousTemporalEvaluation,
13222 admissible_errors: &[
13223 ErrorCode::Aborted,
13224 ErrorCode::DeadlineExceeded,
13225 ErrorCode::InvalidRequest,
13226 ErrorCode::UnsupportedVersion,
13227 ErrorCode::Unauthenticated,
13228 ErrorCode::PermissionDenied,
13229 ErrorCode::NotFound,
13230 ErrorCode::Conflict,
13231 ErrorCode::LimitExceeded,
13232 ErrorCode::CapabilityUnavailable,
13233 ErrorCode::NotSubmitted,
13234 ErrorCode::SubmittedIndeterminate,
13235 ErrorCode::TemporarilyUnavailable,
13236 ErrorCode::Internal,
13237 ],
13238 limit_ids: &["request_bytes", "response_bytes"],
13239 effect_class: "durable_submit",
13240 risk_flags: &[],
13241 capability_family: "lifecycle",
13242 retry_safety: "pre_submit_only",
13243 identity_requirement: "caller_action_id",
13244 resolver: Some(Command::GetContinuousTemporalEvaluation),
13245 cancellation: "per_call_until_submission_then_resolve",
13246 side_effects: &["commits_authoritative_state"],
13247 recovery: "resolve_with_get_continuous_temporal_evaluation",
13248 collection_index_ref: "request_evaluation",
13249 },
13250 CommandSemanticContract {
13251 command: Command::ResumeContinuousTemporalEvaluation,
13252 admissible_errors: &[
13253 ErrorCode::Aborted,
13254 ErrorCode::DeadlineExceeded,
13255 ErrorCode::InvalidRequest,
13256 ErrorCode::UnsupportedVersion,
13257 ErrorCode::Unauthenticated,
13258 ErrorCode::PermissionDenied,
13259 ErrorCode::NotFound,
13260 ErrorCode::Conflict,
13261 ErrorCode::LimitExceeded,
13262 ErrorCode::CapabilityUnavailable,
13263 ErrorCode::NotSubmitted,
13264 ErrorCode::SubmittedIndeterminate,
13265 ErrorCode::TemporarilyUnavailable,
13266 ErrorCode::Internal,
13267 ],
13268 limit_ids: &["request_bytes", "response_bytes"],
13269 effect_class: "durable_submit",
13270 risk_flags: &[],
13271 capability_family: "lifecycle",
13272 retry_safety: "pre_submit_only",
13273 identity_requirement: "caller_action_id",
13274 resolver: Some(Command::GetContinuousTemporalEvaluation),
13275 cancellation: "per_call_until_submission_then_resolve",
13276 side_effects: &["commits_authoritative_state"],
13277 recovery: "resolve_with_get_continuous_temporal_evaluation",
13278 collection_index_ref: "request_evaluation",
13279 },
13280 CommandSemanticContract {
13281 command: Command::ReplaceContinuousTemporalEvaluation,
13282 admissible_errors: &[
13283 ErrorCode::Aborted,
13284 ErrorCode::DeadlineExceeded,
13285 ErrorCode::InvalidRequest,
13286 ErrorCode::UnsupportedVersion,
13287 ErrorCode::Unauthenticated,
13288 ErrorCode::PermissionDenied,
13289 ErrorCode::NotFound,
13290 ErrorCode::Conflict,
13291 ErrorCode::LimitExceeded,
13292 ErrorCode::CapabilityUnavailable,
13293 ErrorCode::NotSubmitted,
13294 ErrorCode::SubmittedIndeterminate,
13295 ErrorCode::TemporarilyUnavailable,
13296 ErrorCode::Internal,
13297 ],
13298 limit_ids: &[
13299 "request_bytes",
13300 "response_bytes",
13301 "temporal_inputs",
13302 "temporal_pattern_nodes",
13303 "temporal_pattern_depth",
13304 "temporal_pattern_branches",
13305 "temporal_correlation_keys",
13306 "temporal_events",
13307 "temporal_states",
13308 "temporal_captured_events",
13309 "temporal_results",
13310 "temporal_state_bytes",
13311 "temporal_interval_nanos",
13312 ],
13313 effect_class: "durable_submit",
13314 risk_flags: &[],
13315 capability_family: "lifecycle",
13316 retry_safety: "pre_submit_only",
13317 identity_requirement: "caller_action_id",
13318 resolver: Some(Command::GetContinuousTemporalEvaluation),
13319 cancellation: "per_call_until_submission_then_resolve",
13320 side_effects: &["commits_authoritative_state"],
13321 recovery: "resolve_with_get_continuous_temporal_evaluation",
13322 collection_index_ref: "request_temporal_inputs",
13323 },
13324 CommandSemanticContract {
13325 command: Command::RetireContinuousTemporalEvaluation,
13326 admissible_errors: &[
13327 ErrorCode::Aborted,
13328 ErrorCode::DeadlineExceeded,
13329 ErrorCode::InvalidRequest,
13330 ErrorCode::UnsupportedVersion,
13331 ErrorCode::Unauthenticated,
13332 ErrorCode::PermissionDenied,
13333 ErrorCode::NotFound,
13334 ErrorCode::Conflict,
13335 ErrorCode::LimitExceeded,
13336 ErrorCode::CapabilityUnavailable,
13337 ErrorCode::NotSubmitted,
13338 ErrorCode::SubmittedIndeterminate,
13339 ErrorCode::TemporarilyUnavailable,
13340 ErrorCode::Internal,
13341 ],
13342 limit_ids: &["request_bytes", "response_bytes"],
13343 effect_class: "durable_submit",
13344 risk_flags: &["destructive"],
13345 capability_family: "lifecycle",
13346 retry_safety: "pre_submit_only",
13347 identity_requirement: "caller_action_id",
13348 resolver: Some(Command::GetContinuousTemporalEvaluation),
13349 cancellation: "per_call_until_submission_then_resolve",
13350 side_effects: &["commits_authoritative_state"],
13351 recovery: "resolve_with_get_continuous_temporal_evaluation",
13352 collection_index_ref: "request_evaluation",
13353 },
13354 CommandSemanticContract {
13355 command: Command::ReadContinuousTemporalEvidence,
13356 admissible_errors: &[
13357 ErrorCode::Aborted,
13358 ErrorCode::DeadlineExceeded,
13359 ErrorCode::InvalidRequest,
13360 ErrorCode::UnsupportedVersion,
13361 ErrorCode::Unauthenticated,
13362 ErrorCode::PermissionDenied,
13363 ErrorCode::NotFound,
13364 ErrorCode::Conflict,
13365 ErrorCode::RetentionGap,
13366 ErrorCode::LimitExceeded,
13367 ErrorCode::CapabilityUnavailable,
13368 ErrorCode::TemporarilyUnavailable,
13369 ErrorCode::Internal,
13370 ],
13371 limit_ids: &["request_bytes", "response_bytes", "page_size", "temporal_results"],
13372 effect_class: "read_only",
13373 risk_flags: &[],
13374 capability_family: "data",
13375 retry_safety: "safe",
13376 identity_requirement: "none",
13377 resolver: None,
13378 cancellation: "per_call",
13379 side_effects: &[],
13380 recovery: "retry",
13381 collection_index_ref: "request_evaluation",
13382 },
13383 CommandSemanticContract {
13384 command: Command::ValidateSearch,
13385 admissible_errors: &[
13386 ErrorCode::Aborted,
13387 ErrorCode::DeadlineExceeded,
13388 ErrorCode::InvalidRequest,
13389 ErrorCode::UnsupportedVersion,
13390 ErrorCode::Unauthenticated,
13391 ErrorCode::PermissionDenied,
13392 ErrorCode::NotFound,
13393 ErrorCode::LimitExceeded,
13394 ErrorCode::CapabilityUnavailable,
13395 ErrorCode::TemporarilyUnavailable,
13396 ErrorCode::Internal,
13397 ],
13398 limit_ids: &[
13399 "request_bytes",
13400 "response_bytes",
13401 "page_size",
13402 "query_clauses",
13403 "aggregation_nodes",
13404 "aggregation_buckets",
13405 "routing_values",
13406 "routing_value_bytes",
13407 "query_recursion_depth",
13408 "source_projection_patterns",
13409 "source_projection_pattern_bytes",
13410 "search_result_window",
13411 ],
13412 effect_class: "read_only",
13413 risk_flags: &[],
13414 capability_family: "data",
13415 retry_safety: "safe",
13416 identity_requirement: "none",
13417 resolver: None,
13418 cancellation: "per_call",
13419 side_effects: &[],
13420 recovery: "retry",
13421 collection_index_ref: "request_indexes_uniform",
13422 },
13423 CommandSemanticContract {
13424 command: Command::OpenPit,
13425 admissible_errors: &[
13426 ErrorCode::Aborted,
13427 ErrorCode::DeadlineExceeded,
13428 ErrorCode::InvalidRequest,
13429 ErrorCode::UnsupportedVersion,
13430 ErrorCode::Unauthenticated,
13431 ErrorCode::PermissionDenied,
13432 ErrorCode::NotFound,
13433 ErrorCode::Conflict,
13434 ErrorCode::LimitExceeded,
13435 ErrorCode::CapabilityUnavailable,
13436 ErrorCode::NotSubmitted,
13437 ErrorCode::SubmittedIndeterminate,
13438 ErrorCode::ExpiredUnknown,
13439 ErrorCode::TemporarilyUnavailable,
13440 ErrorCode::Internal,
13441 ],
13442 limit_ids: &["request_bytes", "response_bytes"],
13443 effect_class: "lease_renewing_read",
13444 risk_flags: &[],
13445 capability_family: "data",
13446 retry_safety: "pre_submit_only",
13447 identity_requirement: "none",
13448 resolver: None,
13449 cancellation: "per_call_until_submission_then_resolve",
13450 side_effects: &["renews_or_closes_existing_lease"],
13451 recovery: "retry_if_not_submitted",
13452 collection_index_ref: "request_indexes_uniform",
13453 },
13454 CommandSemanticContract {
13455 command: Command::RenewPit,
13456 admissible_errors: &[
13457 ErrorCode::Aborted,
13458 ErrorCode::DeadlineExceeded,
13459 ErrorCode::InvalidRequest,
13460 ErrorCode::UnsupportedVersion,
13461 ErrorCode::Unauthenticated,
13462 ErrorCode::PermissionDenied,
13463 ErrorCode::NotFound,
13464 ErrorCode::Conflict,
13465 ErrorCode::LimitExceeded,
13466 ErrorCode::CapabilityUnavailable,
13467 ErrorCode::NotSubmitted,
13468 ErrorCode::SubmittedIndeterminate,
13469 ErrorCode::ExpiredUnknown,
13470 ErrorCode::TemporarilyUnavailable,
13471 ErrorCode::Internal,
13472 ],
13473 limit_ids: &["request_bytes", "response_bytes"],
13474 effect_class: "lease_renewing_read",
13475 risk_flags: &[],
13476 capability_family: "data",
13477 retry_safety: "pre_submit_only",
13478 identity_requirement: "none",
13479 resolver: None,
13480 cancellation: "per_call_until_submission_then_resolve",
13481 side_effects: &["renews_or_closes_existing_lease"],
13482 recovery: "retry_if_not_submitted",
13483 collection_index_ref: "pit_authority",
13484 },
13485 CommandSemanticContract {
13486 command: Command::ClosePit,
13487 admissible_errors: &[
13488 ErrorCode::Aborted,
13489 ErrorCode::DeadlineExceeded,
13490 ErrorCode::InvalidRequest,
13491 ErrorCode::UnsupportedVersion,
13492 ErrorCode::Unauthenticated,
13493 ErrorCode::PermissionDenied,
13494 ErrorCode::NotFound,
13495 ErrorCode::Conflict,
13496 ErrorCode::LimitExceeded,
13497 ErrorCode::CapabilityUnavailable,
13498 ErrorCode::NotSubmitted,
13499 ErrorCode::SubmittedIndeterminate,
13500 ErrorCode::ExpiredUnknown,
13501 ErrorCode::TemporarilyUnavailable,
13502 ErrorCode::Internal,
13503 ],
13504 limit_ids: &["request_bytes", "response_bytes"],
13505 effect_class: "lease_renewing_read",
13506 risk_flags: &[],
13507 capability_family: "data",
13508 retry_safety: "pre_submit_only",
13509 identity_requirement: "none",
13510 resolver: None,
13511 cancellation: "per_call_until_submission_then_resolve",
13512 side_effects: &["renews_or_closes_existing_lease"],
13513 recovery: "retry_if_not_submitted",
13514 collection_index_ref: "pit_authority",
13515 },
13516 CommandSemanticContract {
13517 command: Command::ListOperations,
13518 admissible_errors: &[
13519 ErrorCode::Aborted,
13520 ErrorCode::DeadlineExceeded,
13521 ErrorCode::InvalidRequest,
13522 ErrorCode::UnsupportedVersion,
13523 ErrorCode::Unauthenticated,
13524 ErrorCode::PermissionDenied,
13525 ErrorCode::NotFound,
13526 ErrorCode::StaleCursor,
13527 ErrorCode::RestartBudgetExhausted,
13528 ErrorCode::LimitExceeded,
13529 ErrorCode::CapabilityUnavailable,
13530 ErrorCode::TemporarilyUnavailable,
13531 ErrorCode::Internal,
13532 ],
13533 limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
13534 effect_class: "read_only",
13535 risk_flags: &[],
13536 capability_family: "operations",
13537 retry_safety: "safe",
13538 identity_requirement: "none",
13539 resolver: None,
13540 cancellation: "per_call",
13541 side_effects: &[],
13542 recovery: "retry",
13543 collection_index_ref: "none",
13544 },
13545 CommandSemanticContract {
13546 command: Command::GetOperation,
13547 admissible_errors: &[
13548 ErrorCode::Aborted,
13549 ErrorCode::DeadlineExceeded,
13550 ErrorCode::InvalidRequest,
13551 ErrorCode::UnsupportedVersion,
13552 ErrorCode::Unauthenticated,
13553 ErrorCode::PermissionDenied,
13554 ErrorCode::NotFound,
13555 ErrorCode::LimitExceeded,
13556 ErrorCode::CapabilityUnavailable,
13557 ErrorCode::TemporarilyUnavailable,
13558 ErrorCode::Internal,
13559 ],
13560 limit_ids: &["request_bytes", "response_bytes"],
13561 effect_class: "read_only",
13562 risk_flags: &[],
13563 capability_family: "operations",
13564 retry_safety: "safe",
13565 identity_requirement: "request_locator",
13566 resolver: None,
13567 cancellation: "per_call",
13568 side_effects: &[],
13569 recovery: "retry",
13570 collection_index_ref: "none",
13571 },
13572 CommandSemanticContract {
13573 command: Command::WaitOperation,
13574 admissible_errors: &[
13575 ErrorCode::Aborted,
13576 ErrorCode::DeadlineExceeded,
13577 ErrorCode::InvalidRequest,
13578 ErrorCode::UnsupportedVersion,
13579 ErrorCode::Unauthenticated,
13580 ErrorCode::PermissionDenied,
13581 ErrorCode::NotFound,
13582 ErrorCode::Conflict,
13583 ErrorCode::LimitExceeded,
13584 ErrorCode::CapabilityUnavailable,
13585 ErrorCode::TemporarilyUnavailable,
13586 ErrorCode::Internal,
13587 ],
13588 limit_ids: &[
13589 "request_bytes",
13590 "response_bytes",
13591 "operation_wait_attempts",
13592 "operation_wait_interval_millis",
13593 ],
13594 effect_class: "read_only",
13595 risk_flags: &[],
13596 capability_family: "operations",
13597 retry_safety: "safe",
13598 identity_requirement: "request_locator",
13599 resolver: None,
13600 cancellation: "per_call",
13601 side_effects: &[],
13602 recovery: "retry",
13603 collection_index_ref: "none",
13604 },
13605 CommandSemanticContract {
13606 command: Command::CancelOperation,
13607 admissible_errors: &[
13608 ErrorCode::Aborted,
13609 ErrorCode::DeadlineExceeded,
13610 ErrorCode::InvalidRequest,
13611 ErrorCode::UnsupportedVersion,
13612 ErrorCode::Unauthenticated,
13613 ErrorCode::PermissionDenied,
13614 ErrorCode::NotFound,
13615 ErrorCode::Conflict,
13616 ErrorCode::LimitExceeded,
13617 ErrorCode::CapabilityUnavailable,
13618 ErrorCode::NotSubmitted,
13619 ErrorCode::SubmittedIndeterminate,
13620 ErrorCode::ExpiredUnknown,
13621 ErrorCode::TemporarilyUnavailable,
13622 ErrorCode::Internal,
13623 ],
13624 limit_ids: &["request_bytes", "response_bytes"],
13625 effect_class: "control_write",
13626 risk_flags: &[],
13627 capability_family: "operations",
13628 retry_safety: "pre_submit_only",
13629 identity_requirement: "request_locator",
13630 resolver: None,
13631 cancellation: "per_call_until_submission_then_resolve",
13632 side_effects: &["commits_authoritative_state"],
13633 recovery: "retry_if_not_submitted",
13634 collection_index_ref: "none",
13635 },
13636 CommandSemanticContract {
13637 command: Command::ListAuditEvents,
13638 admissible_errors: &[
13639 ErrorCode::Aborted,
13640 ErrorCode::DeadlineExceeded,
13641 ErrorCode::InvalidRequest,
13642 ErrorCode::UnsupportedVersion,
13643 ErrorCode::Unauthenticated,
13644 ErrorCode::PermissionDenied,
13645 ErrorCode::NotFound,
13646 ErrorCode::StaleCursor,
13647 ErrorCode::RestartBudgetExhausted,
13648 ErrorCode::LimitExceeded,
13649 ErrorCode::CapabilityUnavailable,
13650 ErrorCode::TemporarilyUnavailable,
13651 ErrorCode::Internal,
13652 ],
13653 limit_ids: &["request_bytes", "response_bytes", "page_size"],
13654 effect_class: "read_only",
13655 risk_flags: &[],
13656 capability_family: "audit",
13657 retry_safety: "safe",
13658 identity_requirement: "none",
13659 resolver: None,
13660 cancellation: "per_call",
13661 side_effects: &[],
13662 recovery: "retry",
13663 collection_index_ref: "none",
13664 },
13665 CommandSemanticContract {
13666 command: Command::ExportAuditEvents,
13667 admissible_errors: &[
13668 ErrorCode::Aborted,
13669 ErrorCode::DeadlineExceeded,
13670 ErrorCode::InvalidRequest,
13671 ErrorCode::UnsupportedVersion,
13672 ErrorCode::Unauthenticated,
13673 ErrorCode::PermissionDenied,
13674 ErrorCode::NotFound,
13675 ErrorCode::StaleCursor,
13676 ErrorCode::RestartBudgetExhausted,
13677 ErrorCode::LimitExceeded,
13678 ErrorCode::CapabilityUnavailable,
13679 ErrorCode::TemporarilyUnavailable,
13680 ErrorCode::Internal,
13681 ],
13682 limit_ids: &["request_bytes", "response_bytes", "page_size"],
13683 effect_class: "read_only",
13684 risk_flags: &[],
13685 capability_family: "audit",
13686 retry_safety: "safe",
13687 identity_requirement: "none",
13688 resolver: None,
13689 cancellation: "per_call",
13690 side_effects: &[],
13691 recovery: "retry",
13692 collection_index_ref: "none",
13693 },
13694 CommandSemanticContract {
13695 command: Command::ReserveServiceCredential,
13696 admissible_errors: &[
13697 ErrorCode::Aborted,
13698 ErrorCode::DeadlineExceeded,
13699 ErrorCode::InvalidRequest,
13700 ErrorCode::UnsupportedVersion,
13701 ErrorCode::Unauthenticated,
13702 ErrorCode::PermissionDenied,
13703 ErrorCode::NotFound,
13704 ErrorCode::Conflict,
13705 ErrorCode::LimitExceeded,
13706 ErrorCode::CapabilityUnavailable,
13707 ErrorCode::NotSubmitted,
13708 ErrorCode::SubmittedIndeterminate,
13709 ErrorCode::ExpiredUnknown,
13710 ErrorCode::SecretNotEscrowed,
13711 ErrorCode::TemporarilyUnavailable,
13712 ErrorCode::Internal,
13713 ],
13714 limit_ids: &["request_bytes", "response_bytes"],
13715 effect_class: "durable_submit",
13716 risk_flags: &["credential_sensitive"],
13717 capability_family: "security",
13718 retry_safety: "pre_submit_only",
13719 identity_requirement: "caller_action_id",
13720 resolver: Some(Command::ResolveServiceCredentialReservation),
13721 cancellation: "per_call_until_submission_then_resolve",
13722 side_effects: &["commits_authoritative_state"],
13723 recovery: "resolve_with_resolve_service_credential_reservation",
13724 collection_index_ref: "none",
13725 },
13726 CommandSemanticContract {
13727 command: Command::ReserveServiceCredentialRotation,
13728 admissible_errors: &[
13729 ErrorCode::Aborted,
13730 ErrorCode::DeadlineExceeded,
13731 ErrorCode::InvalidRequest,
13732 ErrorCode::UnsupportedVersion,
13733 ErrorCode::Unauthenticated,
13734 ErrorCode::PermissionDenied,
13735 ErrorCode::NotFound,
13736 ErrorCode::Conflict,
13737 ErrorCode::LimitExceeded,
13738 ErrorCode::CapabilityUnavailable,
13739 ErrorCode::NotSubmitted,
13740 ErrorCode::SubmittedIndeterminate,
13741 ErrorCode::ExpiredUnknown,
13742 ErrorCode::SecretNotEscrowed,
13743 ErrorCode::TemporarilyUnavailable,
13744 ErrorCode::Internal,
13745 ],
13746 limit_ids: &["request_bytes", "response_bytes"],
13747 effect_class: "durable_submit",
13748 risk_flags: &["credential_sensitive"],
13749 capability_family: "security",
13750 retry_safety: "pre_submit_only",
13751 identity_requirement: "caller_action_id",
13752 resolver: Some(Command::ResolveServiceCredentialReservation),
13753 cancellation: "per_call_until_submission_then_resolve",
13754 side_effects: &["commits_authoritative_state"],
13755 recovery: "resolve_with_resolve_service_credential_reservation",
13756 collection_index_ref: "none",
13757 },
13758 CommandSemanticContract {
13759 command: Command::ActivateServiceCredential,
13760 admissible_errors: &[
13761 ErrorCode::Aborted,
13762 ErrorCode::DeadlineExceeded,
13763 ErrorCode::InvalidRequest,
13764 ErrorCode::UnsupportedVersion,
13765 ErrorCode::Unauthenticated,
13766 ErrorCode::PermissionDenied,
13767 ErrorCode::NotFound,
13768 ErrorCode::Conflict,
13769 ErrorCode::LimitExceeded,
13770 ErrorCode::CapabilityUnavailable,
13771 ErrorCode::NotSubmitted,
13772 ErrorCode::SubmittedIndeterminate,
13773 ErrorCode::ExpiredUnknown,
13774 ErrorCode::SecretNotEscrowed,
13775 ErrorCode::TemporarilyUnavailable,
13776 ErrorCode::Internal,
13777 ],
13778 limit_ids: &["request_bytes", "response_bytes"],
13779 effect_class: "durable_submit",
13780 risk_flags: &["credential_sensitive"],
13781 capability_family: "security",
13782 retry_safety: "pre_submit_only",
13783 identity_requirement: "server_locator",
13784 resolver: Some(Command::ResolveServiceCredentialReservation),
13785 cancellation: "per_call_until_submission_then_resolve",
13786 side_effects: &["commits_authoritative_state"],
13787 recovery: "resolve_with_resolve_service_credential_reservation",
13788 collection_index_ref: "none",
13789 },
13790 CommandSemanticContract {
13791 command: Command::ResolveServiceCredentialReservation,
13792 admissible_errors: &[
13793 ErrorCode::Aborted,
13794 ErrorCode::DeadlineExceeded,
13795 ErrorCode::InvalidRequest,
13796 ErrorCode::UnsupportedVersion,
13797 ErrorCode::Unauthenticated,
13798 ErrorCode::PermissionDenied,
13799 ErrorCode::NotFound,
13800 ErrorCode::LimitExceeded,
13801 ErrorCode::CapabilityUnavailable,
13802 ErrorCode::SecretNotEscrowed,
13803 ErrorCode::TemporarilyUnavailable,
13804 ErrorCode::Internal,
13805 ],
13806 limit_ids: &["request_bytes", "response_bytes"],
13807 effect_class: "read_only",
13808 risk_flags: &["credential_sensitive"],
13809 capability_family: "security",
13810 retry_safety: "safe",
13811 identity_requirement: "caller_action_id",
13812 resolver: None,
13813 cancellation: "per_call",
13814 side_effects: &[],
13815 recovery: "retry",
13816 collection_index_ref: "none",
13817 },
13818 CommandSemanticContract {
13819 command: Command::PrepareRevokeServiceCredential,
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::SecretNotEscrowed,
13831 ErrorCode::TemporarilyUnavailable,
13832 ErrorCode::Internal,
13833 ],
13834 limit_ids: &["request_bytes", "response_bytes"],
13835 effect_class: "prepare",
13836 risk_flags: &["destructive", "credential_sensitive"],
13837 capability_family: "security",
13838 retry_safety: "safe",
13839 identity_requirement: "server_locator",
13840 resolver: None,
13841 cancellation: "per_call",
13842 side_effects: &["creates_bounded_preparation"],
13843 recovery: "retry",
13844 collection_index_ref: "none",
13845 },
13846 CommandSemanticContract {
13847 command: Command::RevokeServiceCredential,
13848 admissible_errors: &[
13849 ErrorCode::Aborted,
13850 ErrorCode::DeadlineExceeded,
13851 ErrorCode::InvalidRequest,
13852 ErrorCode::UnsupportedVersion,
13853 ErrorCode::Unauthenticated,
13854 ErrorCode::PermissionDenied,
13855 ErrorCode::NotFound,
13856 ErrorCode::Conflict,
13857 ErrorCode::LimitExceeded,
13858 ErrorCode::CapabilityUnavailable,
13859 ErrorCode::NotSubmitted,
13860 ErrorCode::SubmittedIndeterminate,
13861 ErrorCode::ExpiredUnknown,
13862 ErrorCode::SecretNotEscrowed,
13863 ErrorCode::TemporarilyUnavailable,
13864 ErrorCode::Internal,
13865 ],
13866 limit_ids: &["request_bytes", "response_bytes"],
13867 effect_class: "durable_submit",
13868 risk_flags: &["destructive", "credential_sensitive"],
13869 capability_family: "security",
13870 retry_safety: "pre_submit_only",
13871 identity_requirement: "request_locator",
13872 resolver: Some(Command::ResolveSecurityAction),
13873 cancellation: "per_call_until_submission_then_resolve",
13874 side_effects: &["commits_authoritative_state"],
13875 recovery: "resolve_with_resolve_security_action",
13876 collection_index_ref: "none",
13877 },
13878 CommandSemanticContract {
13879 command: Command::ResolveSecurityAction,
13880 admissible_errors: &[
13881 ErrorCode::Aborted,
13882 ErrorCode::DeadlineExceeded,
13883 ErrorCode::InvalidRequest,
13884 ErrorCode::UnsupportedVersion,
13885 ErrorCode::Unauthenticated,
13886 ErrorCode::PermissionDenied,
13887 ErrorCode::NotFound,
13888 ErrorCode::LimitExceeded,
13889 ErrorCode::CapabilityUnavailable,
13890 ErrorCode::SecretNotEscrowed,
13891 ErrorCode::TemporarilyUnavailable,
13892 ErrorCode::Internal,
13893 ],
13894 limit_ids: &["request_bytes", "response_bytes"],
13895 effect_class: "read_only",
13896 risk_flags: &[],
13897 capability_family: "security",
13898 retry_safety: "safe",
13899 identity_requirement: "request_locator",
13900 resolver: None,
13901 cancellation: "per_call",
13902 side_effects: &[],
13903 recovery: "retry",
13904 collection_index_ref: "none",
13905 },
13906 CommandSemanticContract {
13907 command: Command::GetSecurityRole,
13908 admissible_errors: &[
13909 ErrorCode::Aborted,
13910 ErrorCode::DeadlineExceeded,
13911 ErrorCode::InvalidRequest,
13912 ErrorCode::UnsupportedVersion,
13913 ErrorCode::Unauthenticated,
13914 ErrorCode::PermissionDenied,
13915 ErrorCode::NotFound,
13916 ErrorCode::LimitExceeded,
13917 ErrorCode::CapabilityUnavailable,
13918 ErrorCode::TemporarilyUnavailable,
13919 ErrorCode::Internal,
13920 ],
13921 limit_ids: &["request_bytes", "response_bytes"],
13922 effect_class: "read_only",
13923 risk_flags: &[],
13924 capability_family: "security",
13925 retry_safety: "safe",
13926 identity_requirement: "none",
13927 resolver: None,
13928 cancellation: "per_call",
13929 side_effects: &[],
13930 recovery: "retry",
13931 collection_index_ref: "none",
13932 },
13933 CommandSemanticContract {
13934 command: Command::PrepareRoleAppendAccessChange,
13935 admissible_errors: &[
13936 ErrorCode::Aborted,
13937 ErrorCode::DeadlineExceeded,
13938 ErrorCode::InvalidRequest,
13939 ErrorCode::UnsupportedVersion,
13940 ErrorCode::Unauthenticated,
13941 ErrorCode::PermissionDenied,
13942 ErrorCode::NotFound,
13943 ErrorCode::Conflict,
13944 ErrorCode::LimitExceeded,
13945 ErrorCode::CapabilityUnavailable,
13946 ErrorCode::TemporarilyUnavailable,
13947 ErrorCode::Internal,
13948 ],
13949 limit_ids: &["request_bytes", "response_bytes"],
13950 effect_class: "prepare",
13951 risk_flags: &["destructive"],
13952 capability_family: "security",
13953 retry_safety: "safe",
13954 identity_requirement: "server_locator",
13955 resolver: None,
13956 cancellation: "per_call",
13957 side_effects: &["creates_bounded_preparation"],
13958 recovery: "retry",
13959 collection_index_ref: "none",
13960 },
13961 CommandSemanticContract {
13962 command: Command::SubmitRoleAppendAccessChange,
13963 admissible_errors: &[
13964 ErrorCode::Aborted,
13965 ErrorCode::DeadlineExceeded,
13966 ErrorCode::InvalidRequest,
13967 ErrorCode::UnsupportedVersion,
13968 ErrorCode::Unauthenticated,
13969 ErrorCode::PermissionDenied,
13970 ErrorCode::NotFound,
13971 ErrorCode::Conflict,
13972 ErrorCode::LimitExceeded,
13973 ErrorCode::CapabilityUnavailable,
13974 ErrorCode::NotSubmitted,
13975 ErrorCode::SubmittedIndeterminate,
13976 ErrorCode::ExpiredUnknown,
13977 ErrorCode::TemporarilyUnavailable,
13978 ErrorCode::Internal,
13979 ],
13980 limit_ids: &["request_bytes", "response_bytes"],
13981 effect_class: "durable_submit",
13982 risk_flags: &["destructive"],
13983 capability_family: "security",
13984 retry_safety: "pre_submit_only",
13985 identity_requirement: "request_locator",
13986 resolver: Some(Command::ResolveSecurityAction),
13987 cancellation: "per_call_until_submission_then_resolve",
13988 side_effects: &["commits_authoritative_state"],
13989 recovery: "resolve_with_resolve_security_action",
13990 collection_index_ref: "none",
13991 },
13992 CommandSemanticContract {
13993 command: Command::ListServiceCredentials,
13994 admissible_errors: &[
13995 ErrorCode::Aborted,
13996 ErrorCode::DeadlineExceeded,
13997 ErrorCode::InvalidRequest,
13998 ErrorCode::UnsupportedVersion,
13999 ErrorCode::Unauthenticated,
14000 ErrorCode::PermissionDenied,
14001 ErrorCode::NotFound,
14002 ErrorCode::StaleCursor,
14003 ErrorCode::RestartBudgetExhausted,
14004 ErrorCode::LimitExceeded,
14005 ErrorCode::CapabilityUnavailable,
14006 ErrorCode::SecretNotEscrowed,
14007 ErrorCode::TemporarilyUnavailable,
14008 ErrorCode::Internal,
14009 ],
14010 limit_ids: &["request_bytes", "response_bytes", "page_size"],
14011 effect_class: "read_only",
14012 risk_flags: &["credential_sensitive"],
14013 capability_family: "security",
14014 retry_safety: "safe",
14015 identity_requirement: "none",
14016 resolver: None,
14017 cancellation: "per_call",
14018 side_effects: &[],
14019 recovery: "retry",
14020 collection_index_ref: "none",
14021 },
14022 CommandSemanticContract {
14023 command: Command::GetRuntimeStatus,
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::GetResultCacheStatus,
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::TemporarilyUnavailable,
14062 ErrorCode::Internal,
14063 ],
14064 limit_ids: &["request_bytes", "response_bytes"],
14065 effect_class: "read_only",
14066 risk_flags: &[],
14067 capability_family: "catalog",
14068 retry_safety: "safe",
14069 identity_requirement: "none",
14070 resolver: None,
14071 cancellation: "per_call",
14072 side_effects: &[],
14073 recovery: "retry",
14074 collection_index_ref: "none",
14075 },
14076 CommandSemanticContract {
14077 command: Command::GetFieldPromotionStatus,
14078 admissible_errors: &[
14079 ErrorCode::Aborted,
14080 ErrorCode::DeadlineExceeded,
14081 ErrorCode::InvalidRequest,
14082 ErrorCode::UnsupportedVersion,
14083 ErrorCode::Unauthenticated,
14084 ErrorCode::PermissionDenied,
14085 ErrorCode::NotFound,
14086 ErrorCode::LimitExceeded,
14087 ErrorCode::CapabilityUnavailable,
14088 ErrorCode::TemporarilyUnavailable,
14089 ErrorCode::Internal,
14090 ],
14091 limit_ids: &["request_bytes", "response_bytes"],
14092 effect_class: "read_only",
14093 risk_flags: &[],
14094 capability_family: "catalog",
14095 retry_safety: "safe",
14096 identity_requirement: "none",
14097 resolver: None,
14098 cancellation: "per_call",
14099 side_effects: &[],
14100 recovery: "retry",
14101 collection_index_ref: "none",
14102 },
14103 CommandSemanticContract {
14104 command: Command::GetOverloadStatus,
14105 admissible_errors: &[
14106 ErrorCode::Aborted,
14107 ErrorCode::DeadlineExceeded,
14108 ErrorCode::InvalidRequest,
14109 ErrorCode::UnsupportedVersion,
14110 ErrorCode::Unauthenticated,
14111 ErrorCode::PermissionDenied,
14112 ErrorCode::NotFound,
14113 ErrorCode::LimitExceeded,
14114 ErrorCode::CapabilityUnavailable,
14115 ErrorCode::TemporarilyUnavailable,
14116 ErrorCode::Internal,
14117 ],
14118 limit_ids: &["request_bytes", "response_bytes"],
14119 effect_class: "read_only",
14120 risk_flags: &[],
14121 capability_family: "catalog",
14122 retry_safety: "safe",
14123 identity_requirement: "none",
14124 resolver: None,
14125 cancellation: "per_call",
14126 side_effects: &[],
14127 recovery: "retry",
14128 collection_index_ref: "none",
14129 },
14130 CommandSemanticContract {
14131 command: Command::ConfigureExternalKey,
14132 admissible_errors: &[
14133 ErrorCode::Aborted,
14134 ErrorCode::DeadlineExceeded,
14135 ErrorCode::InvalidRequest,
14136 ErrorCode::UnsupportedVersion,
14137 ErrorCode::Unauthenticated,
14138 ErrorCode::PermissionDenied,
14139 ErrorCode::NotFound,
14140 ErrorCode::Conflict,
14141 ErrorCode::LimitExceeded,
14142 ErrorCode::CapabilityUnavailable,
14143 ErrorCode::NotSubmitted,
14144 ErrorCode::SubmittedIndeterminate,
14145 ErrorCode::ExpiredUnknown,
14146 ErrorCode::TemporarilyUnavailable,
14147 ErrorCode::Internal,
14148 ],
14149 limit_ids: &["request_bytes", "response_bytes"],
14150 effect_class: "control_write",
14151 risk_flags: &[],
14152 capability_family: "lifecycle",
14153 retry_safety: "pre_submit_only",
14154 identity_requirement: "none",
14155 resolver: None,
14156 cancellation: "per_call_until_submission_then_resolve",
14157 side_effects: &["commits_authoritative_state"],
14158 recovery: "retry_if_not_submitted",
14159 collection_index_ref: "request_index",
14160 },
14161 CommandSemanticContract {
14162 command: Command::RotateExternalKeyBinding,
14163 admissible_errors: &[
14164 ErrorCode::Aborted,
14165 ErrorCode::DeadlineExceeded,
14166 ErrorCode::InvalidRequest,
14167 ErrorCode::UnsupportedVersion,
14168 ErrorCode::Unauthenticated,
14169 ErrorCode::PermissionDenied,
14170 ErrorCode::NotFound,
14171 ErrorCode::Conflict,
14172 ErrorCode::LimitExceeded,
14173 ErrorCode::CapabilityUnavailable,
14174 ErrorCode::NotSubmitted,
14175 ErrorCode::SubmittedIndeterminate,
14176 ErrorCode::ExpiredUnknown,
14177 ErrorCode::TemporarilyUnavailable,
14178 ErrorCode::Internal,
14179 ],
14180 limit_ids: &["request_bytes", "response_bytes"],
14181 effect_class: "control_write",
14182 risk_flags: &[],
14183 capability_family: "lifecycle",
14184 retry_safety: "pre_submit_only",
14185 identity_requirement: "none",
14186 resolver: None,
14187 cancellation: "per_call_until_submission_then_resolve",
14188 side_effects: &["commits_authoritative_state"],
14189 recovery: "retry_if_not_submitted",
14190 collection_index_ref: "request_index",
14191 },
14192 CommandSemanticContract {
14193 command: Command::ConfigureAggregateThenDelete,
14194 admissible_errors: &[
14195 ErrorCode::Aborted,
14196 ErrorCode::DeadlineExceeded,
14197 ErrorCode::InvalidRequest,
14198 ErrorCode::UnsupportedVersion,
14199 ErrorCode::Unauthenticated,
14200 ErrorCode::PermissionDenied,
14201 ErrorCode::NotFound,
14202 ErrorCode::Conflict,
14203 ErrorCode::LimitExceeded,
14204 ErrorCode::CapabilityUnavailable,
14205 ErrorCode::NotSubmitted,
14206 ErrorCode::SubmittedIndeterminate,
14207 ErrorCode::ExpiredUnknown,
14208 ErrorCode::TemporarilyUnavailable,
14209 ErrorCode::Internal,
14210 ],
14211 limit_ids: &["request_bytes", "response_bytes"],
14212 effect_class: "control_write",
14213 risk_flags: &["destructive"],
14214 capability_family: "lifecycle",
14215 retry_safety: "pre_submit_only",
14216 identity_requirement: "none",
14217 resolver: None,
14218 cancellation: "per_call_until_submission_then_resolve",
14219 side_effects: &["commits_authoritative_state"],
14220 recovery: "retry_if_not_submitted",
14221 collection_index_ref: "request_index",
14222 },
14223 CommandSemanticContract {
14224 command: Command::GetLifecycleStatus,
14225 admissible_errors: &[
14226 ErrorCode::Aborted,
14227 ErrorCode::DeadlineExceeded,
14228 ErrorCode::InvalidRequest,
14229 ErrorCode::UnsupportedVersion,
14230 ErrorCode::Unauthenticated,
14231 ErrorCode::PermissionDenied,
14232 ErrorCode::NotFound,
14233 ErrorCode::LimitExceeded,
14234 ErrorCode::CapabilityUnavailable,
14235 ErrorCode::TemporarilyUnavailable,
14236 ErrorCode::Internal,
14237 ],
14238 limit_ids: &["request_bytes", "response_bytes"],
14239 effect_class: "read_only",
14240 risk_flags: &[],
14241 capability_family: "catalog",
14242 retry_safety: "safe",
14243 identity_requirement: "none",
14244 resolver: None,
14245 cancellation: "per_call",
14246 side_effects: &[],
14247 recovery: "retry",
14248 collection_index_ref: "none",
14249 },
14250 CommandSemanticContract {
14251 command: Command::GetQuota,
14252 admissible_errors: &[
14253 ErrorCode::Aborted,
14254 ErrorCode::DeadlineExceeded,
14255 ErrorCode::InvalidRequest,
14256 ErrorCode::UnsupportedVersion,
14257 ErrorCode::Unauthenticated,
14258 ErrorCode::PermissionDenied,
14259 ErrorCode::NotFound,
14260 ErrorCode::LimitExceeded,
14261 ErrorCode::CapabilityUnavailable,
14262 ErrorCode::TemporarilyUnavailable,
14263 ErrorCode::Internal,
14264 ],
14265 limit_ids: &["request_bytes", "response_bytes"],
14266 effect_class: "read_only",
14267 risk_flags: &[],
14268 capability_family: "quota",
14269 retry_safety: "safe",
14270 identity_requirement: "none",
14271 resolver: None,
14272 cancellation: "per_call",
14273 side_effects: &[],
14274 recovery: "retry",
14275 collection_index_ref: "none",
14276 },
14277 CommandSemanticContract {
14278 command: Command::UpdateQuota,
14279 admissible_errors: &[
14280 ErrorCode::Aborted,
14281 ErrorCode::DeadlineExceeded,
14282 ErrorCode::InvalidRequest,
14283 ErrorCode::UnsupportedVersion,
14284 ErrorCode::Unauthenticated,
14285 ErrorCode::PermissionDenied,
14286 ErrorCode::NotFound,
14287 ErrorCode::Conflict,
14288 ErrorCode::LimitExceeded,
14289 ErrorCode::CapabilityUnavailable,
14290 ErrorCode::NotSubmitted,
14291 ErrorCode::SubmittedIndeterminate,
14292 ErrorCode::ExpiredUnknown,
14293 ErrorCode::TemporarilyUnavailable,
14294 ErrorCode::Internal,
14295 ],
14296 limit_ids: &["request_bytes", "response_bytes"],
14297 effect_class: "control_write",
14298 risk_flags: &[],
14299 capability_family: "quota",
14300 retry_safety: "pre_submit_only",
14301 identity_requirement: "none",
14302 resolver: None,
14303 cancellation: "per_call_until_submission_then_resolve",
14304 side_effects: &["commits_authoritative_state"],
14305 recovery: "retry_if_not_submitted",
14306 collection_index_ref: "none",
14307 },
14308 CommandSemanticContract {
14309 command: Command::GetBinding,
14310 admissible_errors: &[
14311 ErrorCode::Aborted,
14312 ErrorCode::DeadlineExceeded,
14313 ErrorCode::InvalidRequest,
14314 ErrorCode::UnsupportedVersion,
14315 ErrorCode::Unauthenticated,
14316 ErrorCode::PermissionDenied,
14317 ErrorCode::NotFound,
14318 ErrorCode::LimitExceeded,
14319 ErrorCode::CapabilityUnavailable,
14320 ErrorCode::TemporarilyUnavailable,
14321 ErrorCode::Internal,
14322 ],
14323 limit_ids: &["request_bytes", "response_bytes"],
14324 effect_class: "read_only",
14325 risk_flags: &[],
14326 capability_family: "runtime_control",
14327 retry_safety: "safe",
14328 identity_requirement: "none",
14329 resolver: None,
14330 cancellation: "per_call",
14331 side_effects: &[],
14332 recovery: "retry",
14333 collection_index_ref: "none",
14334 },
14335 CommandSemanticContract {
14336 command: Command::GetAdmissionStatus,
14337 admissible_errors: &[
14338 ErrorCode::Aborted,
14339 ErrorCode::DeadlineExceeded,
14340 ErrorCode::InvalidRequest,
14341 ErrorCode::UnsupportedVersion,
14342 ErrorCode::Unauthenticated,
14343 ErrorCode::PermissionDenied,
14344 ErrorCode::NotFound,
14345 ErrorCode::LimitExceeded,
14346 ErrorCode::CapabilityUnavailable,
14347 ErrorCode::TemporarilyUnavailable,
14348 ErrorCode::Internal,
14349 ],
14350 limit_ids: &["request_bytes", "response_bytes"],
14351 effect_class: "read_only",
14352 risk_flags: &[],
14353 capability_family: "runtime_control",
14354 retry_safety: "safe",
14355 identity_requirement: "none",
14356 resolver: None,
14357 cancellation: "per_call",
14358 side_effects: &[],
14359 recovery: "retry",
14360 collection_index_ref: "none",
14361 },
14362 CommandSemanticContract {
14363 command: Command::SetAdmission,
14364 admissible_errors: &[
14365 ErrorCode::Aborted,
14366 ErrorCode::DeadlineExceeded,
14367 ErrorCode::InvalidRequest,
14368 ErrorCode::UnsupportedVersion,
14369 ErrorCode::Unauthenticated,
14370 ErrorCode::PermissionDenied,
14371 ErrorCode::NotFound,
14372 ErrorCode::Conflict,
14373 ErrorCode::LimitExceeded,
14374 ErrorCode::CapabilityUnavailable,
14375 ErrorCode::NotSubmitted,
14376 ErrorCode::SubmittedIndeterminate,
14377 ErrorCode::ExpiredUnknown,
14378 ErrorCode::TemporarilyUnavailable,
14379 ErrorCode::Internal,
14380 ],
14381 limit_ids: &["request_bytes", "response_bytes"],
14382 effect_class: "control_write",
14383 risk_flags: &[],
14384 capability_family: "runtime_control",
14385 retry_safety: "pre_submit_only",
14386 identity_requirement: "none",
14387 resolver: None,
14388 cancellation: "per_call_until_submission_then_resolve",
14389 side_effects: &["commits_authoritative_state"],
14390 recovery: "retry_if_not_submitted",
14391 collection_index_ref: "none",
14392 },
14393 CommandSemanticContract {
14394 command: Command::GetQuiesceStatus,
14395 admissible_errors: &[
14396 ErrorCode::Aborted,
14397 ErrorCode::DeadlineExceeded,
14398 ErrorCode::InvalidRequest,
14399 ErrorCode::UnsupportedVersion,
14400 ErrorCode::Unauthenticated,
14401 ErrorCode::PermissionDenied,
14402 ErrorCode::NotFound,
14403 ErrorCode::LimitExceeded,
14404 ErrorCode::CapabilityUnavailable,
14405 ErrorCode::TemporarilyUnavailable,
14406 ErrorCode::Internal,
14407 ],
14408 limit_ids: &["request_bytes", "response_bytes"],
14409 effect_class: "read_only",
14410 risk_flags: &[],
14411 capability_family: "runtime_control",
14412 retry_safety: "safe",
14413 identity_requirement: "none",
14414 resolver: None,
14415 cancellation: "per_call",
14416 side_effects: &[],
14417 recovery: "retry",
14418 collection_index_ref: "none",
14419 },
14420 CommandSemanticContract {
14421 command: Command::GetDecommissionReadiness,
14422 admissible_errors: &[
14423 ErrorCode::Aborted,
14424 ErrorCode::DeadlineExceeded,
14425 ErrorCode::InvalidRequest,
14426 ErrorCode::UnsupportedVersion,
14427 ErrorCode::Unauthenticated,
14428 ErrorCode::PermissionDenied,
14429 ErrorCode::NotFound,
14430 ErrorCode::LimitExceeded,
14431 ErrorCode::CapabilityUnavailable,
14432 ErrorCode::TemporarilyUnavailable,
14433 ErrorCode::Internal,
14434 ],
14435 limit_ids: &["request_bytes", "response_bytes"],
14436 effect_class: "read_only",
14437 risk_flags: &[],
14438 capability_family: "runtime_control",
14439 retry_safety: "safe",
14440 identity_requirement: "none",
14441 resolver: None,
14442 cancellation: "per_call",
14443 side_effects: &[],
14444 recovery: "retry",
14445 collection_index_ref: "none",
14446 },
14447 CommandSemanticContract {
14448 command: Command::GetUpgradeReadiness,
14449 admissible_errors: &[
14450 ErrorCode::Aborted,
14451 ErrorCode::DeadlineExceeded,
14452 ErrorCode::InvalidRequest,
14453 ErrorCode::UnsupportedVersion,
14454 ErrorCode::Unauthenticated,
14455 ErrorCode::PermissionDenied,
14456 ErrorCode::NotFound,
14457 ErrorCode::LimitExceeded,
14458 ErrorCode::CapabilityUnavailable,
14459 ErrorCode::TemporarilyUnavailable,
14460 ErrorCode::Internal,
14461 ],
14462 limit_ids: &["request_bytes", "response_bytes"],
14463 effect_class: "read_only",
14464 risk_flags: &[],
14465 capability_family: "operations",
14466 retry_safety: "safe",
14467 identity_requirement: "none",
14468 resolver: None,
14469 cancellation: "per_call",
14470 side_effects: &[],
14471 recovery: "retry",
14472 collection_index_ref: "none",
14473 },
14474 CommandSemanticContract {
14475 command: Command::GetMaintenanceStatus,
14476 admissible_errors: &[
14477 ErrorCode::Aborted,
14478 ErrorCode::DeadlineExceeded,
14479 ErrorCode::InvalidRequest,
14480 ErrorCode::UnsupportedVersion,
14481 ErrorCode::Unauthenticated,
14482 ErrorCode::PermissionDenied,
14483 ErrorCode::NotFound,
14484 ErrorCode::StaleCursor,
14485 ErrorCode::LimitExceeded,
14486 ErrorCode::CapabilityUnavailable,
14487 ErrorCode::TemporarilyUnavailable,
14488 ErrorCode::Internal,
14489 ],
14490 limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
14491 effect_class: "read_only",
14492 risk_flags: &[],
14493 capability_family: "operations",
14494 retry_safety: "safe",
14495 identity_requirement: "none",
14496 resolver: None,
14497 cancellation: "per_call",
14498 side_effects: &[],
14499 recovery: "retry",
14500 collection_index_ref: "optional_request_index",
14501 },
14502 CommandSemanticContract {
14503 command: Command::WarmVectorIndex,
14504 admissible_errors: &[
14505 ErrorCode::Aborted,
14506 ErrorCode::DeadlineExceeded,
14507 ErrorCode::InvalidRequest,
14508 ErrorCode::UnsupportedVersion,
14509 ErrorCode::Unauthenticated,
14510 ErrorCode::PermissionDenied,
14511 ErrorCode::NotFound,
14512 ErrorCode::Conflict,
14513 ErrorCode::LimitExceeded,
14514 ErrorCode::CapabilityUnavailable,
14515 ErrorCode::TemporarilyUnavailable,
14516 ErrorCode::Internal,
14517 ],
14518 limit_ids: &[
14519 "request_bytes",
14520 "response_bytes",
14521 "vector_warm_components",
14522 "vector_warm_requests",
14523 "vector_warm_bytes",
14524 "vector_warm_achievements",
14525 "vector_warm_ttl_millis",
14526 ],
14527 effect_class: "read_only",
14528 risk_flags: &[],
14529 capability_family: "data",
14530 retry_safety: "safe",
14531 identity_requirement: "exact_root",
14532 resolver: None,
14533 cancellation: "per_call",
14534 side_effects: &["populates_reconstructible_cache"],
14535 recovery: "retry",
14536 collection_index_ref: "request_index",
14537 },
14538 CommandSemanticContract {
14539 command: Command::EvaluateVectorRecall,
14540 admissible_errors: &[
14541 ErrorCode::Aborted,
14542 ErrorCode::DeadlineExceeded,
14543 ErrorCode::InvalidRequest,
14544 ErrorCode::UnsupportedVersion,
14545 ErrorCode::Unauthenticated,
14546 ErrorCode::PermissionDenied,
14547 ErrorCode::NotFound,
14548 ErrorCode::Conflict,
14549 ErrorCode::LimitExceeded,
14550 ErrorCode::CapabilityUnavailable,
14551 ErrorCode::NotSubmitted,
14552 ErrorCode::SubmittedIndeterminate,
14553 ErrorCode::ExpiredUnknown,
14554 ErrorCode::TemporarilyUnavailable,
14555 ErrorCode::Internal,
14556 ],
14557 limit_ids: &[
14558 "request_bytes",
14559 "response_bytes",
14560 "vector_dimensions",
14561 "vector_query_bytes",
14562 "vector_request_bytes",
14563 "vector_candidates",
14564 "vector_evaluation_queries",
14565 "vector_evaluation_k",
14566 "vector_evaluation_artifact_bytes",
14567 ],
14568 effect_class: "durable_submit",
14569 risk_flags: &[],
14570 capability_family: "diagnostics",
14571 retry_safety: "pre_submit_only",
14572 identity_requirement: "caller_action_id",
14573 resolver: None,
14574 cancellation: "per_call_until_submission_then_resolve",
14575 side_effects: &["commits_authoritative_state"],
14576 recovery: "retry_if_not_submitted",
14577 collection_index_ref: "request_index",
14578 },
14579 CommandSemanticContract {
14580 command: Command::CalibrateVectorStrategy,
14581 admissible_errors: &[
14582 ErrorCode::Aborted,
14583 ErrorCode::DeadlineExceeded,
14584 ErrorCode::InvalidRequest,
14585 ErrorCode::UnsupportedVersion,
14586 ErrorCode::Unauthenticated,
14587 ErrorCode::PermissionDenied,
14588 ErrorCode::NotFound,
14589 ErrorCode::Conflict,
14590 ErrorCode::LimitExceeded,
14591 ErrorCode::CapabilityUnavailable,
14592 ErrorCode::NotSubmitted,
14593 ErrorCode::SubmittedIndeterminate,
14594 ErrorCode::ExpiredUnknown,
14595 ErrorCode::TemporarilyUnavailable,
14596 ErrorCode::Internal,
14597 ],
14598 limit_ids: &[
14599 "request_bytes",
14600 "response_bytes",
14601 "vector_dimensions",
14602 "vector_query_bytes",
14603 "vector_request_bytes",
14604 "vector_candidates",
14605 "vector_evaluation_queries",
14606 "vector_evaluation_k",
14607 "vector_evaluation_profiles",
14608 "vector_evaluation_artifact_bytes",
14609 ],
14610 effect_class: "durable_submit",
14611 risk_flags: &[],
14612 capability_family: "diagnostics",
14613 retry_safety: "pre_submit_only",
14614 identity_requirement: "caller_action_id",
14615 resolver: None,
14616 cancellation: "per_call_until_submission_then_resolve",
14617 side_effects: &["commits_authoritative_state"],
14618 recovery: "retry_if_not_submitted",
14619 collection_index_ref: "request_index",
14620 },
14621 CommandSemanticContract {
14622 command: Command::GetVectorDiagnostic,
14623 admissible_errors: &[
14624 ErrorCode::Aborted,
14625 ErrorCode::DeadlineExceeded,
14626 ErrorCode::InvalidRequest,
14627 ErrorCode::UnsupportedVersion,
14628 ErrorCode::Unauthenticated,
14629 ErrorCode::PermissionDenied,
14630 ErrorCode::NotFound,
14631 ErrorCode::LimitExceeded,
14632 ErrorCode::CapabilityUnavailable,
14633 ErrorCode::TemporarilyUnavailable,
14634 ErrorCode::Internal,
14635 ],
14636 limit_ids: &["request_bytes", "response_bytes"],
14637 effect_class: "read_only",
14638 risk_flags: &[],
14639 capability_family: "diagnostics",
14640 retry_safety: "safe",
14641 identity_requirement: "request_locator",
14642 resolver: None,
14643 cancellation: "per_call",
14644 side_effects: &[],
14645 recovery: "retry",
14646 collection_index_ref: "none",
14647 },
14648 CommandSemanticContract {
14649 command: Command::CreateDiagnostic,
14650 admissible_errors: &[
14651 ErrorCode::Aborted,
14652 ErrorCode::DeadlineExceeded,
14653 ErrorCode::InvalidRequest,
14654 ErrorCode::UnsupportedVersion,
14655 ErrorCode::Unauthenticated,
14656 ErrorCode::PermissionDenied,
14657 ErrorCode::NotFound,
14658 ErrorCode::Conflict,
14659 ErrorCode::LimitExceeded,
14660 ErrorCode::CapabilityUnavailable,
14661 ErrorCode::NotSubmitted,
14662 ErrorCode::SubmittedIndeterminate,
14663 ErrorCode::ExpiredUnknown,
14664 ErrorCode::TemporarilyUnavailable,
14665 ErrorCode::Internal,
14666 ],
14667 limit_ids: &["request_bytes", "response_bytes"],
14668 effect_class: "durable_submit",
14669 risk_flags: &[],
14670 capability_family: "diagnostics",
14671 retry_safety: "pre_submit_only",
14672 identity_requirement: "none",
14673 resolver: None,
14674 cancellation: "per_call_until_submission_then_resolve",
14675 side_effects: &["commits_authoritative_state"],
14676 recovery: "retry_if_not_submitted",
14677 collection_index_ref: "none",
14678 },
14679 CommandSemanticContract {
14680 command: Command::GetDiagnostic,
14681 admissible_errors: &[
14682 ErrorCode::Aborted,
14683 ErrorCode::DeadlineExceeded,
14684 ErrorCode::InvalidRequest,
14685 ErrorCode::UnsupportedVersion,
14686 ErrorCode::Unauthenticated,
14687 ErrorCode::PermissionDenied,
14688 ErrorCode::NotFound,
14689 ErrorCode::LimitExceeded,
14690 ErrorCode::CapabilityUnavailable,
14691 ErrorCode::TemporarilyUnavailable,
14692 ErrorCode::Internal,
14693 ],
14694 limit_ids: &["request_bytes", "response_bytes"],
14695 effect_class: "read_only",
14696 risk_flags: &[],
14697 capability_family: "diagnostics",
14698 retry_safety: "safe",
14699 identity_requirement: "request_locator",
14700 resolver: None,
14701 cancellation: "per_call",
14702 side_effects: &[],
14703 recovery: "retry",
14704 collection_index_ref: "none",
14705 },
14706 CommandSemanticContract {
14707 command: Command::PrepareCollectionExport,
14708 admissible_errors: &[
14709 ErrorCode::Aborted,
14710 ErrorCode::DeadlineExceeded,
14711 ErrorCode::InvalidRequest,
14712 ErrorCode::UnsupportedVersion,
14713 ErrorCode::Unauthenticated,
14714 ErrorCode::PermissionDenied,
14715 ErrorCode::NotFound,
14716 ErrorCode::LimitExceeded,
14717 ErrorCode::CapabilityUnavailable,
14718 ErrorCode::TemporarilyUnavailable,
14719 ErrorCode::Internal,
14720 ],
14721 limit_ids: &[
14722 "request_bytes",
14723 "response_bytes",
14724 "collection_export_bytes",
14725 "portability_prefix_bytes",
14726 ],
14727 effect_class: "prepare",
14728 risk_flags: &[],
14729 capability_family: "portability",
14730 retry_safety: "safe",
14731 identity_requirement: "caller_action_id",
14732 resolver: None,
14733 cancellation: "per_call",
14734 side_effects: &[],
14735 recovery: "retry",
14736 collection_index_ref: "none",
14737 },
14738 CommandSemanticContract {
14739 command: Command::StartCollectionExport,
14740 admissible_errors: &[
14741 ErrorCode::Aborted,
14742 ErrorCode::DeadlineExceeded,
14743 ErrorCode::InvalidRequest,
14744 ErrorCode::UnsupportedVersion,
14745 ErrorCode::Unauthenticated,
14746 ErrorCode::PermissionDenied,
14747 ErrorCode::NotFound,
14748 ErrorCode::Conflict,
14749 ErrorCode::LimitExceeded,
14750 ErrorCode::CapabilityUnavailable,
14751 ErrorCode::NotSubmitted,
14752 ErrorCode::SubmittedIndeterminate,
14753 ErrorCode::ExpiredUnknown,
14754 ErrorCode::TemporarilyUnavailable,
14755 ErrorCode::Internal,
14756 ],
14757 limit_ids: &[
14758 "request_bytes",
14759 "response_bytes",
14760 "collection_export_bytes",
14761 "collection_export_documents",
14762 "portability_prefix_bytes",
14763 ],
14764 effect_class: "durable_submit",
14765 risk_flags: &[],
14766 capability_family: "portability",
14767 retry_safety: "pre_submit_only",
14768 identity_requirement: "caller_action_id",
14769 resolver: Some(Command::ResolveCollectionExport),
14770 cancellation: "per_call_until_submission_then_resolve",
14771 side_effects: &["commits_authoritative_state", "writes_external_artifact"],
14772 recovery: "resolve_with_resolve_collection_export",
14773 collection_index_ref: "none",
14774 },
14775 CommandSemanticContract {
14776 command: Command::ResolveCollectionExport,
14777 admissible_errors: &[
14778 ErrorCode::Aborted,
14779 ErrorCode::DeadlineExceeded,
14780 ErrorCode::InvalidRequest,
14781 ErrorCode::UnsupportedVersion,
14782 ErrorCode::Unauthenticated,
14783 ErrorCode::PermissionDenied,
14784 ErrorCode::NotFound,
14785 ErrorCode::LimitExceeded,
14786 ErrorCode::CapabilityUnavailable,
14787 ErrorCode::TemporarilyUnavailable,
14788 ErrorCode::Internal,
14789 ],
14790 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
14791 effect_class: "read_only",
14792 risk_flags: &[],
14793 capability_family: "portability",
14794 retry_safety: "safe",
14795 identity_requirement: "caller_action_id",
14796 resolver: None,
14797 cancellation: "per_call",
14798 side_effects: &[],
14799 recovery: "retry",
14800 collection_index_ref: "none",
14801 },
14802 CommandSemanticContract {
14803 command: Command::VerifyCollectionExport,
14804 admissible_errors: &[
14805 ErrorCode::Aborted,
14806 ErrorCode::DeadlineExceeded,
14807 ErrorCode::InvalidRequest,
14808 ErrorCode::UnsupportedVersion,
14809 ErrorCode::Unauthenticated,
14810 ErrorCode::PermissionDenied,
14811 ErrorCode::NotFound,
14812 ErrorCode::LimitExceeded,
14813 ErrorCode::CapabilityUnavailable,
14814 ErrorCode::ChecksumMismatch,
14815 ErrorCode::TemporarilyUnavailable,
14816 ErrorCode::Internal,
14817 ],
14818 limit_ids: &[
14819 "request_bytes",
14820 "response_bytes",
14821 "collection_export_bytes",
14822 "portability_prefix_bytes",
14823 ],
14824 effect_class: "read_only",
14825 risk_flags: &[],
14826 capability_family: "portability",
14827 retry_safety: "safe",
14828 identity_requirement: "request_locator",
14829 resolver: None,
14830 cancellation: "per_call",
14831 side_effects: &[],
14832 recovery: "retry",
14833 collection_index_ref: "none",
14834 },
14835 CommandSemanticContract {
14836 command: Command::PrepareCollectionExportRetirement,
14837 admissible_errors: &[
14838 ErrorCode::Aborted,
14839 ErrorCode::DeadlineExceeded,
14840 ErrorCode::InvalidRequest,
14841 ErrorCode::UnsupportedVersion,
14842 ErrorCode::Unauthenticated,
14843 ErrorCode::PermissionDenied,
14844 ErrorCode::NotFound,
14845 ErrorCode::Conflict,
14846 ErrorCode::LimitExceeded,
14847 ErrorCode::CapabilityUnavailable,
14848 ErrorCode::ChecksumMismatch,
14849 ErrorCode::TemporarilyUnavailable,
14850 ErrorCode::Internal,
14851 ],
14852 limit_ids: &[
14853 "request_bytes",
14854 "response_bytes",
14855 "collection_export_bytes",
14856 "portability_prefix_bytes",
14857 ],
14858 effect_class: "prepare",
14859 risk_flags: &["destructive"],
14860 capability_family: "portability",
14861 retry_safety: "safe",
14862 identity_requirement: "caller_action_id",
14863 resolver: None,
14864 cancellation: "per_call",
14865 side_effects: &[],
14866 recovery: "retry",
14867 collection_index_ref: "none",
14868 },
14869 CommandSemanticContract {
14870 command: Command::StartCollectionExportRetirement,
14871 admissible_errors: &[
14872 ErrorCode::Aborted,
14873 ErrorCode::DeadlineExceeded,
14874 ErrorCode::InvalidRequest,
14875 ErrorCode::UnsupportedVersion,
14876 ErrorCode::Unauthenticated,
14877 ErrorCode::PermissionDenied,
14878 ErrorCode::NotFound,
14879 ErrorCode::Conflict,
14880 ErrorCode::LimitExceeded,
14881 ErrorCode::CapabilityUnavailable,
14882 ErrorCode::NotSubmitted,
14883 ErrorCode::SubmittedIndeterminate,
14884 ErrorCode::ExpiredUnknown,
14885 ErrorCode::ChecksumMismatch,
14886 ErrorCode::TemporarilyUnavailable,
14887 ErrorCode::Internal,
14888 ],
14889 limit_ids: &[
14890 "request_bytes",
14891 "response_bytes",
14892 "collection_export_bytes",
14893 "portability_prefix_bytes",
14894 ],
14895 effect_class: "durable_submit",
14896 risk_flags: &["destructive"],
14897 capability_family: "portability",
14898 retry_safety: "pre_submit_only",
14899 identity_requirement: "caller_action_id",
14900 resolver: Some(Command::ResolveCollectionExportRetirement),
14901 cancellation: "per_call_until_submission_then_resolve",
14902 side_effects: &[
14903 "commits_authoritative_state",
14904 "deletes_external_artifact",
14905 "releases_key_capability_reference",
14906 ],
14907 recovery: "resolve_with_resolve_collection_export_retirement",
14908 collection_index_ref: "none",
14909 },
14910 CommandSemanticContract {
14911 command: Command::ResolveCollectionExportRetirement,
14912 admissible_errors: &[
14913 ErrorCode::Aborted,
14914 ErrorCode::DeadlineExceeded,
14915 ErrorCode::InvalidRequest,
14916 ErrorCode::UnsupportedVersion,
14917 ErrorCode::Unauthenticated,
14918 ErrorCode::PermissionDenied,
14919 ErrorCode::NotFound,
14920 ErrorCode::Conflict,
14921 ErrorCode::LimitExceeded,
14922 ErrorCode::CapabilityUnavailable,
14923 ErrorCode::TemporarilyUnavailable,
14924 ErrorCode::Internal,
14925 ],
14926 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
14927 effect_class: "read_only",
14928 risk_flags: &[],
14929 capability_family: "portability",
14930 retry_safety: "safe",
14931 identity_requirement: "caller_action_id",
14932 resolver: None,
14933 cancellation: "per_call",
14934 side_effects: &[],
14935 recovery: "retry",
14936 collection_index_ref: "none",
14937 },
14938 CommandSemanticContract {
14939 command: Command::PrepareCollectionRestore,
14940 admissible_errors: &[
14941 ErrorCode::Aborted,
14942 ErrorCode::DeadlineExceeded,
14943 ErrorCode::InvalidRequest,
14944 ErrorCode::UnsupportedVersion,
14945 ErrorCode::Unauthenticated,
14946 ErrorCode::PermissionDenied,
14947 ErrorCode::NotFound,
14948 ErrorCode::Conflict,
14949 ErrorCode::LimitExceeded,
14950 ErrorCode::CapabilityUnavailable,
14951 ErrorCode::ChecksumMismatch,
14952 ErrorCode::TemporarilyUnavailable,
14953 ErrorCode::Internal,
14954 ],
14955 limit_ids: &[
14956 "request_bytes",
14957 "response_bytes",
14958 "collection_export_bytes",
14959 "portability_prefix_bytes",
14960 ],
14961 effect_class: "prepare",
14962 risk_flags: &[],
14963 capability_family: "portability",
14964 retry_safety: "safe",
14965 identity_requirement: "caller_action_id",
14966 resolver: None,
14967 cancellation: "per_call",
14968 side_effects: &[],
14969 recovery: "retry",
14970 collection_index_ref: "none",
14971 },
14972 CommandSemanticContract {
14973 command: Command::StartCollectionRestore,
14974 admissible_errors: &[
14975 ErrorCode::Aborted,
14976 ErrorCode::DeadlineExceeded,
14977 ErrorCode::InvalidRequest,
14978 ErrorCode::UnsupportedVersion,
14979 ErrorCode::Unauthenticated,
14980 ErrorCode::PermissionDenied,
14981 ErrorCode::NotFound,
14982 ErrorCode::Conflict,
14983 ErrorCode::LimitExceeded,
14984 ErrorCode::CapabilityUnavailable,
14985 ErrorCode::NotSubmitted,
14986 ErrorCode::SubmittedIndeterminate,
14987 ErrorCode::ExpiredUnknown,
14988 ErrorCode::ChecksumMismatch,
14989 ErrorCode::TemporarilyUnavailable,
14990 ErrorCode::Internal,
14991 ],
14992 limit_ids: &[
14993 "request_bytes",
14994 "response_bytes",
14995 "collection_export_bytes",
14996 "collection_export_documents",
14997 "portability_prefix_bytes",
14998 ],
14999 effect_class: "durable_submit",
15000 risk_flags: &[],
15001 capability_family: "portability",
15002 retry_safety: "pre_submit_only",
15003 identity_requirement: "caller_action_id",
15004 resolver: Some(Command::ResolveCollectionRestore),
15005 cancellation: "per_call_until_submission_then_resolve",
15006 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
15007 recovery: "resolve_with_resolve_collection_restore",
15008 collection_index_ref: "none",
15009 },
15010 CommandSemanticContract {
15011 command: Command::ResolveCollectionRestore,
15012 admissible_errors: &[
15013 ErrorCode::Aborted,
15014 ErrorCode::DeadlineExceeded,
15015 ErrorCode::InvalidRequest,
15016 ErrorCode::UnsupportedVersion,
15017 ErrorCode::Unauthenticated,
15018 ErrorCode::PermissionDenied,
15019 ErrorCode::NotFound,
15020 ErrorCode::LimitExceeded,
15021 ErrorCode::CapabilityUnavailable,
15022 ErrorCode::TemporarilyUnavailable,
15023 ErrorCode::Internal,
15024 ],
15025 limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
15026 effect_class: "read_only",
15027 risk_flags: &[],
15028 capability_family: "portability",
15029 retry_safety: "safe",
15030 identity_requirement: "caller_action_id",
15031 resolver: None,
15032 cancellation: "per_call",
15033 side_effects: &[],
15034 recovery: "retry",
15035 collection_index_ref: "none",
15036 },
15037 CommandSemanticContract {
15038 command: Command::PrepareIndexExport,
15039 admissible_errors: &[
15040 ErrorCode::Aborted,
15041 ErrorCode::DeadlineExceeded,
15042 ErrorCode::InvalidRequest,
15043 ErrorCode::UnsupportedVersion,
15044 ErrorCode::Unauthenticated,
15045 ErrorCode::PermissionDenied,
15046 ErrorCode::NotFound,
15047 ErrorCode::LimitExceeded,
15048 ErrorCode::CapabilityUnavailable,
15049 ErrorCode::TemporarilyUnavailable,
15050 ErrorCode::Internal,
15051 ],
15052 limit_ids: &[
15053 "request_bytes",
15054 "response_bytes",
15055 "index_transfer_bytes",
15056 "index_transfer_records",
15057 "index_transfer_pages",
15058 "portability_prefix_bytes",
15059 ],
15060 effect_class: "prepare",
15061 risk_flags: &[],
15062 capability_family: "portability",
15063 retry_safety: "safe",
15064 identity_requirement: "caller_action_id",
15065 resolver: None,
15066 cancellation: "per_call",
15067 side_effects: &[],
15068 recovery: "retry",
15069 collection_index_ref: "request_index",
15070 },
15071 CommandSemanticContract {
15072 command: Command::StartIndexExport,
15073 admissible_errors: &[
15074 ErrorCode::Aborted,
15075 ErrorCode::DeadlineExceeded,
15076 ErrorCode::InvalidRequest,
15077 ErrorCode::UnsupportedVersion,
15078 ErrorCode::Unauthenticated,
15079 ErrorCode::PermissionDenied,
15080 ErrorCode::NotFound,
15081 ErrorCode::Conflict,
15082 ErrorCode::LimitExceeded,
15083 ErrorCode::CapabilityUnavailable,
15084 ErrorCode::NotSubmitted,
15085 ErrorCode::SubmittedIndeterminate,
15086 ErrorCode::ExpiredUnknown,
15087 ErrorCode::TemporarilyUnavailable,
15088 ErrorCode::Internal,
15089 ],
15090 limit_ids: &[
15091 "request_bytes",
15092 "response_bytes",
15093 "index_transfer_bytes",
15094 "index_transfer_records",
15095 "index_transfer_pages",
15096 "portability_prefix_bytes",
15097 ],
15098 effect_class: "durable_submit",
15099 risk_flags: &[],
15100 capability_family: "portability",
15101 retry_safety: "pre_submit_only",
15102 identity_requirement: "caller_action_id",
15103 resolver: Some(Command::ResolveIndexExport),
15104 cancellation: "per_call_until_submission_then_resolve",
15105 side_effects: &["commits_authoritative_state", "writes_external_artifact"],
15106 recovery: "resolve_with_resolve_index_export",
15107 collection_index_ref: "request_index",
15108 },
15109 CommandSemanticContract {
15110 command: Command::ResolveIndexExport,
15111 admissible_errors: &[
15112 ErrorCode::Aborted,
15113 ErrorCode::DeadlineExceeded,
15114 ErrorCode::InvalidRequest,
15115 ErrorCode::UnsupportedVersion,
15116 ErrorCode::Unauthenticated,
15117 ErrorCode::PermissionDenied,
15118 ErrorCode::NotFound,
15119 ErrorCode::LimitExceeded,
15120 ErrorCode::CapabilityUnavailable,
15121 ErrorCode::ChecksumMismatch,
15122 ErrorCode::TemporarilyUnavailable,
15123 ErrorCode::Internal,
15124 ],
15125 limit_ids: &[
15126 "request_bytes",
15127 "response_bytes",
15128 "index_transfer_bytes",
15129 "index_transfer_pages",
15130 "portability_prefix_bytes",
15131 ],
15132 effect_class: "read_only",
15133 risk_flags: &[],
15134 capability_family: "portability",
15135 retry_safety: "safe",
15136 identity_requirement: "caller_action_id",
15137 resolver: None,
15138 cancellation: "per_call",
15139 side_effects: &[],
15140 recovery: "retry",
15141 collection_index_ref: "request_index",
15142 },
15143 CommandSemanticContract {
15144 command: Command::VerifyIndexExport,
15145 admissible_errors: &[
15146 ErrorCode::Aborted,
15147 ErrorCode::DeadlineExceeded,
15148 ErrorCode::InvalidRequest,
15149 ErrorCode::UnsupportedVersion,
15150 ErrorCode::Unauthenticated,
15151 ErrorCode::PermissionDenied,
15152 ErrorCode::NotFound,
15153 ErrorCode::LimitExceeded,
15154 ErrorCode::CapabilityUnavailable,
15155 ErrorCode::ChecksumMismatch,
15156 ErrorCode::TemporarilyUnavailable,
15157 ErrorCode::Internal,
15158 ],
15159 limit_ids: &[
15160 "request_bytes",
15161 "response_bytes",
15162 "index_transfer_bytes",
15163 "index_transfer_pages",
15164 "portability_prefix_bytes",
15165 ],
15166 effect_class: "read_only",
15167 risk_flags: &[],
15168 capability_family: "portability",
15169 retry_safety: "safe",
15170 identity_requirement: "request_locator",
15171 resolver: None,
15172 cancellation: "per_call",
15173 side_effects: &[],
15174 recovery: "retry",
15175 collection_index_ref: "request_artifact_source_index",
15176 },
15177 CommandSemanticContract {
15178 command: Command::PrepareIndexImport,
15179 admissible_errors: &[
15180 ErrorCode::Aborted,
15181 ErrorCode::DeadlineExceeded,
15182 ErrorCode::InvalidRequest,
15183 ErrorCode::UnsupportedVersion,
15184 ErrorCode::Unauthenticated,
15185 ErrorCode::PermissionDenied,
15186 ErrorCode::NotFound,
15187 ErrorCode::Conflict,
15188 ErrorCode::LimitExceeded,
15189 ErrorCode::CapabilityUnavailable,
15190 ErrorCode::ChecksumMismatch,
15191 ErrorCode::TemporarilyUnavailable,
15192 ErrorCode::Internal,
15193 ],
15194 limit_ids: &[
15195 "request_bytes",
15196 "response_bytes",
15197 "index_transfer_bytes",
15198 "index_transfer_pages",
15199 "portability_prefix_bytes",
15200 "resource_initial_shards",
15201 "resource_target_shard_bytes",
15202 "resource_admission_weight",
15203 "resource_ram_bytes",
15204 "resource_nvme_bytes",
15205 "resource_refresh_millis",
15206 "resource_memtable_bytes",
15207 "resource_parallelism",
15208 ],
15209 effect_class: "prepare",
15210 risk_flags: &[],
15211 capability_family: "portability",
15212 retry_safety: "safe",
15213 identity_requirement: "caller_action_id",
15214 resolver: None,
15215 cancellation: "per_call",
15216 side_effects: &[],
15217 recovery: "retry",
15218 collection_index_ref: "request_destination_name",
15219 },
15220 CommandSemanticContract {
15221 command: Command::StartIndexImport,
15222 admissible_errors: &[
15223 ErrorCode::Aborted,
15224 ErrorCode::DeadlineExceeded,
15225 ErrorCode::InvalidRequest,
15226 ErrorCode::UnsupportedVersion,
15227 ErrorCode::Unauthenticated,
15228 ErrorCode::PermissionDenied,
15229 ErrorCode::NotFound,
15230 ErrorCode::Conflict,
15231 ErrorCode::LimitExceeded,
15232 ErrorCode::CapabilityUnavailable,
15233 ErrorCode::NotSubmitted,
15234 ErrorCode::SubmittedIndeterminate,
15235 ErrorCode::ExpiredUnknown,
15236 ErrorCode::ChecksumMismatch,
15237 ErrorCode::TemporarilyUnavailable,
15238 ErrorCode::Internal,
15239 ],
15240 limit_ids: &[
15241 "request_bytes",
15242 "response_bytes",
15243 "index_transfer_bytes",
15244 "index_transfer_pages",
15245 "portability_prefix_bytes",
15246 "resource_initial_shards",
15247 "resource_target_shard_bytes",
15248 "resource_admission_weight",
15249 "resource_ram_bytes",
15250 "resource_nvme_bytes",
15251 "resource_refresh_millis",
15252 "resource_memtable_bytes",
15253 "resource_parallelism",
15254 ],
15255 effect_class: "durable_submit",
15256 risk_flags: &[],
15257 capability_family: "portability",
15258 retry_safety: "pre_submit_only",
15259 identity_requirement: "caller_action_id",
15260 resolver: Some(Command::ResolveIndexImport),
15261 cancellation: "per_call_until_submission_then_resolve",
15262 side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
15263 recovery: "resolve_with_resolve_index_import",
15264 collection_index_ref: "request_destination_name",
15265 },
15266 CommandSemanticContract {
15267 command: Command::ResolveIndexImport,
15268 admissible_errors: &[
15269 ErrorCode::Aborted,
15270 ErrorCode::DeadlineExceeded,
15271 ErrorCode::InvalidRequest,
15272 ErrorCode::UnsupportedVersion,
15273 ErrorCode::Unauthenticated,
15274 ErrorCode::PermissionDenied,
15275 ErrorCode::NotFound,
15276 ErrorCode::LimitExceeded,
15277 ErrorCode::CapabilityUnavailable,
15278 ErrorCode::ChecksumMismatch,
15279 ErrorCode::TemporarilyUnavailable,
15280 ErrorCode::Internal,
15281 ],
15282 limit_ids: &[
15283 "request_bytes",
15284 "response_bytes",
15285 "index_transfer_bytes",
15286 "index_transfer_pages",
15287 "portability_prefix_bytes",
15288 ],
15289 effect_class: "read_only",
15290 risk_flags: &[],
15291 capability_family: "portability",
15292 retry_safety: "safe",
15293 identity_requirement: "caller_action_id",
15294 resolver: None,
15295 cancellation: "per_call",
15296 side_effects: &[],
15297 recovery: "retry",
15298 collection_index_ref: "request_destination_name",
15299 },
15300 CommandSemanticContract {
15301 command: Command::ReadArtifactChunk,
15302 admissible_errors: &[
15303 ErrorCode::Aborted,
15304 ErrorCode::DeadlineExceeded,
15305 ErrorCode::InvalidRequest,
15306 ErrorCode::UnsupportedVersion,
15307 ErrorCode::Unauthenticated,
15308 ErrorCode::PermissionDenied,
15309 ErrorCode::NotFound,
15310 ErrorCode::LimitExceeded,
15311 ErrorCode::CapabilityUnavailable,
15312 ErrorCode::ArtifactRangeInvalid,
15313 ErrorCode::ChecksumMismatch,
15314 ErrorCode::TemporarilyUnavailable,
15315 ErrorCode::Internal,
15316 ],
15317 limit_ids: &["request_bytes", "response_bytes", "artifact_chunk_bytes"],
15318 effect_class: "read_only",
15319 risk_flags: &[],
15320 capability_family: "operations",
15321 retry_safety: "safe",
15322 identity_requirement: "none",
15323 resolver: None,
15324 cancellation: "per_call",
15325 side_effects: &[],
15326 recovery: "retry",
15327 collection_index_ref: "none",
15328 },
15329 CommandSemanticContract {
15330 command: Command::ExportUsage,
15331 admissible_errors: &[
15332 ErrorCode::Aborted,
15333 ErrorCode::DeadlineExceeded,
15334 ErrorCode::InvalidRequest,
15335 ErrorCode::UnsupportedVersion,
15336 ErrorCode::Unauthenticated,
15337 ErrorCode::PermissionDenied,
15338 ErrorCode::NotFound,
15339 ErrorCode::StaleCursor,
15340 ErrorCode::RestartBudgetExhausted,
15341 ErrorCode::LimitExceeded,
15342 ErrorCode::CapabilityUnavailable,
15343 ErrorCode::TemporarilyUnavailable,
15344 ErrorCode::Internal,
15345 ],
15346 limit_ids: &["request_bytes", "response_bytes", "page_size"],
15347 effect_class: "read_only",
15348 risk_flags: &[],
15349 capability_family: "usage",
15350 retry_safety: "safe",
15351 identity_requirement: "none",
15352 resolver: None,
15353 cancellation: "per_call",
15354 side_effects: &[],
15355 recovery: "retry",
15356 collection_index_ref: "none",
15357 },
15358 CommandSemanticContract {
15359 command: Command::ReadLogicalOccupancy,
15360 admissible_errors: &[
15361 ErrorCode::Aborted,
15362 ErrorCode::DeadlineExceeded,
15363 ErrorCode::InvalidRequest,
15364 ErrorCode::UnsupportedVersion,
15365 ErrorCode::Unauthenticated,
15366 ErrorCode::PermissionDenied,
15367 ErrorCode::NotFound,
15368 ErrorCode::StaleCursor,
15369 ErrorCode::LimitExceeded,
15370 ErrorCode::CapabilityUnavailable,
15371 ErrorCode::TemporarilyUnavailable,
15372 ErrorCode::Internal,
15373 ],
15374 limit_ids: &["request_bytes", "response_bytes", "page_size", "search_result_window"],
15375 effect_class: "read_only",
15376 risk_flags: &[],
15377 capability_family: "usage",
15378 retry_safety: "safe",
15379 identity_requirement: "none",
15380 resolver: None,
15381 cancellation: "per_call",
15382 side_effects: &[],
15383 recovery: "retry",
15384 collection_index_ref: "request_index",
15385 },
15386 CommandSemanticContract {
15387 command: Command::ExecuteStateRead,
15388 admissible_errors: &[
15389 ErrorCode::Aborted,
15390 ErrorCode::DeadlineExceeded,
15391 ErrorCode::InvalidRequest,
15392 ErrorCode::UnsupportedVersion,
15393 ErrorCode::Unauthenticated,
15394 ErrorCode::PermissionDenied,
15395 ErrorCode::NotFound,
15396 ErrorCode::LimitExceeded,
15397 ErrorCode::CapabilityUnavailable,
15398 ErrorCode::TemporarilyUnavailable,
15399 ErrorCode::Internal,
15400 ],
15401 limit_ids: &[
15402 "request_bytes",
15403 "response_bytes",
15404 "state_command_keys",
15405 "state_command_value_bytes",
15406 ],
15407 effect_class: "read_only",
15408 risk_flags: &[],
15409 capability_family: "data",
15410 retry_safety: "safe",
15411 identity_requirement: "none",
15412 resolver: None,
15413 cancellation: "per_call",
15414 side_effects: &[],
15415 recovery: "retry",
15416 collection_index_ref: "request_index",
15417 },
15418 CommandSemanticContract {
15419 command: Command::PrepareStateWrite,
15420 admissible_errors: &[
15421 ErrorCode::Aborted,
15422 ErrorCode::DeadlineExceeded,
15423 ErrorCode::InvalidRequest,
15424 ErrorCode::UnsupportedVersion,
15425 ErrorCode::Unauthenticated,
15426 ErrorCode::PermissionDenied,
15427 ErrorCode::NotFound,
15428 ErrorCode::LimitExceeded,
15429 ErrorCode::CapabilityUnavailable,
15430 ErrorCode::TemporarilyUnavailable,
15431 ErrorCode::Internal,
15432 ],
15433 limit_ids: &[
15434 "request_bytes",
15435 "response_bytes",
15436 "state_command_keys",
15437 "state_command_value_bytes",
15438 ],
15439 effect_class: "prepare",
15440 risk_flags: &[],
15441 capability_family: "data",
15442 retry_safety: "safe",
15443 identity_requirement: "caller_action_id",
15444 resolver: None,
15445 cancellation: "per_call",
15446 side_effects: &["creates_bounded_preparation"],
15447 recovery: "retry",
15448 collection_index_ref: "request_index",
15449 },
15450 CommandSemanticContract {
15451 command: Command::SubmitStateWrite,
15452 admissible_errors: &[
15453 ErrorCode::Aborted,
15454 ErrorCode::DeadlineExceeded,
15455 ErrorCode::InvalidRequest,
15456 ErrorCode::UnsupportedVersion,
15457 ErrorCode::Unauthenticated,
15458 ErrorCode::PermissionDenied,
15459 ErrorCode::NotFound,
15460 ErrorCode::Conflict,
15461 ErrorCode::LimitExceeded,
15462 ErrorCode::CapabilityUnavailable,
15463 ErrorCode::NotSubmitted,
15464 ErrorCode::SubmittedIndeterminate,
15465 ErrorCode::ExpiredUnknown,
15466 ErrorCode::TemporarilyUnavailable,
15467 ErrorCode::Internal,
15468 ],
15469 limit_ids: &[
15470 "request_bytes",
15471 "response_bytes",
15472 "state_command_keys",
15473 "state_command_value_bytes",
15474 ],
15475 effect_class: "durable_submit",
15476 risk_flags: &[],
15477 capability_family: "data",
15478 retry_safety: "pre_submit_only",
15479 identity_requirement: "request_locator",
15480 resolver: Some(Command::ResolveStateWrite),
15481 cancellation: "per_call_until_submission_then_resolve",
15482 side_effects: &["commits_authoritative_state"],
15483 recovery: "resolve_with_resolve_state_write",
15484 collection_index_ref: "request_index",
15485 },
15486 CommandSemanticContract {
15487 command: Command::ResolveStateWrite,
15488 admissible_errors: &[
15489 ErrorCode::Aborted,
15490 ErrorCode::DeadlineExceeded,
15491 ErrorCode::InvalidRequest,
15492 ErrorCode::UnsupportedVersion,
15493 ErrorCode::Unauthenticated,
15494 ErrorCode::PermissionDenied,
15495 ErrorCode::NotFound,
15496 ErrorCode::LimitExceeded,
15497 ErrorCode::CapabilityUnavailable,
15498 ErrorCode::TemporarilyUnavailable,
15499 ErrorCode::Internal,
15500 ],
15501 limit_ids: &[
15502 "request_bytes",
15503 "response_bytes",
15504 "state_command_keys",
15505 "state_command_value_bytes",
15506 ],
15507 effect_class: "read_only",
15508 risk_flags: &[],
15509 capability_family: "data",
15510 retry_safety: "safe",
15511 identity_requirement: "request_locator",
15512 resolver: None,
15513 cancellation: "per_call",
15514 side_effects: &[],
15515 recovery: "retry",
15516 collection_index_ref: "request_index",
15517 },
15518];
15519#[derive(Clone, Copy, Debug, Eq, PartialEq)]
15520pub struct CommandOutcomeContract {
15521 pub command: Command,
15522 pub possible_submission_states: &'static [&'static str],
15523 pub identity_requirement: &'static str,
15524 pub resolver_command: Option<Command>,
15525 pub cancellation: &'static str,
15526}
15527pub const LODESTONE_API_COMMAND_OUTCOMES: &[CommandOutcomeContract] = &[
15528 CommandOutcomeContract {
15529 command: Command::Discover,
15530 possible_submission_states: &["not_submitted", "resolved"],
15531 identity_requirement: "none",
15532 resolver_command: None,
15533 cancellation: "per_call",
15534 },
15535 CommandOutcomeContract {
15536 command: Command::ListIndexes,
15537 possible_submission_states: &["not_submitted", "resolved"],
15538 identity_requirement: "none",
15539 resolver_command: None,
15540 cancellation: "per_call",
15541 },
15542 CommandOutcomeContract {
15543 command: Command::GetIndex,
15544 possible_submission_states: &["not_submitted", "resolved"],
15545 identity_requirement: "none",
15546 resolver_command: None,
15547 cancellation: "per_call",
15548 },
15549 CommandOutcomeContract {
15550 command: Command::ValidateIndexChange,
15551 possible_submission_states: &["not_submitted", "resolved"],
15552 identity_requirement: "none",
15553 resolver_command: None,
15554 cancellation: "per_call",
15555 },
15556 CommandOutcomeContract {
15557 command: Command::ApplyIndexChange,
15558 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15559 identity_requirement: "caller_action_id",
15560 resolver_command: None,
15561 cancellation: "per_call_until_submission_then_resolve",
15562 },
15563 CommandOutcomeContract {
15564 command: Command::ApplyAdministrationMutation,
15565 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15566 identity_requirement: "caller_action_id",
15567 resolver_command: None,
15568 cancellation: "per_call_until_submission_then_resolve",
15569 },
15570 CommandOutcomeContract {
15571 command: Command::ListAliases,
15572 possible_submission_states: &["not_submitted", "resolved"],
15573 identity_requirement: "none",
15574 resolver_command: None,
15575 cancellation: "per_call",
15576 },
15577 CommandOutcomeContract {
15578 command: Command::GetAlias,
15579 possible_submission_states: &["not_submitted", "resolved"],
15580 identity_requirement: "none",
15581 resolver_command: None,
15582 cancellation: "per_call",
15583 },
15584 CommandOutcomeContract {
15585 command: Command::ListDataStreams,
15586 possible_submission_states: &["not_submitted", "resolved"],
15587 identity_requirement: "none",
15588 resolver_command: None,
15589 cancellation: "per_call",
15590 },
15591 CommandOutcomeContract {
15592 command: Command::GetDataStream,
15593 possible_submission_states: &["not_submitted", "resolved"],
15594 identity_requirement: "none",
15595 resolver_command: None,
15596 cancellation: "per_call",
15597 },
15598 CommandOutcomeContract {
15599 command: Command::ListComponentTemplates,
15600 possible_submission_states: &["not_submitted", "resolved"],
15601 identity_requirement: "none",
15602 resolver_command: None,
15603 cancellation: "per_call",
15604 },
15605 CommandOutcomeContract {
15606 command: Command::GetComponentTemplate,
15607 possible_submission_states: &["not_submitted", "resolved"],
15608 identity_requirement: "none",
15609 resolver_command: None,
15610 cancellation: "per_call",
15611 },
15612 CommandOutcomeContract {
15613 command: Command::ListIndexTemplates,
15614 possible_submission_states: &["not_submitted", "resolved"],
15615 identity_requirement: "none",
15616 resolver_command: None,
15617 cancellation: "per_call",
15618 },
15619 CommandOutcomeContract {
15620 command: Command::GetIndexTemplate,
15621 possible_submission_states: &["not_submitted", "resolved"],
15622 identity_requirement: "none",
15623 resolver_command: None,
15624 cancellation: "per_call",
15625 },
15626 CommandOutcomeContract {
15627 command: Command::ListIngestPipelines,
15628 possible_submission_states: &["not_submitted", "resolved"],
15629 identity_requirement: "none",
15630 resolver_command: None,
15631 cancellation: "per_call",
15632 },
15633 CommandOutcomeContract {
15634 command: Command::GetIngestPipeline,
15635 possible_submission_states: &["not_submitted", "resolved"],
15636 identity_requirement: "none",
15637 resolver_command: None,
15638 cancellation: "per_call",
15639 },
15640 CommandOutcomeContract {
15641 command: Command::SimulateIngestPipeline,
15642 possible_submission_states: &["not_submitted", "resolved"],
15643 identity_requirement: "none",
15644 resolver_command: None,
15645 cancellation: "per_call",
15646 },
15647 CommandOutcomeContract {
15648 command: Command::ReprocessByQuery,
15649 possible_submission_states: &[
15650 "not_submitted",
15651 "submitted",
15652 "known_retired",
15653 "indeterminate",
15654 "resolved",
15655 ],
15656 identity_requirement: "caller_action_id",
15657 resolver_command: None,
15658 cancellation: "per_call_until_submission_then_resolve",
15659 },
15660 CommandOutcomeContract {
15661 command: Command::ListLifecyclePolicies,
15662 possible_submission_states: &["not_submitted", "resolved"],
15663 identity_requirement: "none",
15664 resolver_command: None,
15665 cancellation: "per_call",
15666 },
15667 CommandOutcomeContract {
15668 command: Command::GetLifecyclePolicy,
15669 possible_submission_states: &["not_submitted", "resolved"],
15670 identity_requirement: "none",
15671 resolver_command: None,
15672 cancellation: "per_call",
15673 },
15674 CommandOutcomeContract {
15675 command: Command::PrepareCreateIndex,
15676 possible_submission_states: &["not_submitted", "resolved"],
15677 identity_requirement: "server_locator",
15678 resolver_command: None,
15679 cancellation: "per_call",
15680 },
15681 CommandOutcomeContract {
15682 command: Command::PrepareDeleteIndex,
15683 possible_submission_states: &["not_submitted", "resolved"],
15684 identity_requirement: "server_locator",
15685 resolver_command: None,
15686 cancellation: "per_call",
15687 },
15688 CommandOutcomeContract {
15689 command: Command::SubmitCatalogAction,
15690 possible_submission_states: &[
15691 "not_submitted",
15692 "submitted",
15693 "known_retired",
15694 "indeterminate",
15695 "resolved",
15696 ],
15697 identity_requirement: "request_locator",
15698 resolver_command: Some(Command::ResolveCatalogAction),
15699 cancellation: "per_call_until_submission_then_resolve",
15700 },
15701 CommandOutcomeContract {
15702 command: Command::ResolveCatalogAction,
15703 possible_submission_states: &["not_submitted", "resolved"],
15704 identity_requirement: "request_locator",
15705 resolver_command: None,
15706 cancellation: "per_call",
15707 },
15708 CommandOutcomeContract {
15709 command: Command::PrepareReplayableSourceIndex,
15710 possible_submission_states: &["not_submitted", "resolved"],
15711 identity_requirement: "server_locator",
15712 resolver_command: None,
15713 cancellation: "per_call",
15714 },
15715 CommandOutcomeContract {
15716 command: Command::SubmitReplayableSourceIndex,
15717 possible_submission_states: &[
15718 "not_submitted",
15719 "submitted",
15720 "known_retired",
15721 "indeterminate",
15722 "resolved",
15723 ],
15724 identity_requirement: "request_locator",
15725 resolver_command: Some(Command::ResolveCatalogAction),
15726 cancellation: "per_call_until_submission_then_resolve",
15727 },
15728 CommandOutcomeContract {
15729 command: Command::GetReplayableSource,
15730 possible_submission_states: &["not_submitted", "resolved"],
15731 identity_requirement: "none",
15732 resolver_command: None,
15733 cancellation: "per_call",
15734 },
15735 CommandOutcomeContract {
15736 command: Command::ControlReplayableSource,
15737 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15738 identity_requirement: "none",
15739 resolver_command: None,
15740 cancellation: "per_call_until_submission_then_resolve",
15741 },
15742 CommandOutcomeContract {
15743 command: Command::CloneIndex,
15744 possible_submission_states: &[
15745 "not_submitted",
15746 "submitted",
15747 "known_retired",
15748 "indeterminate",
15749 "resolved",
15750 ],
15751 identity_requirement: "caller_action_id",
15752 resolver_command: Some(Command::CloneIndex),
15753 cancellation: "per_call_until_submission_then_resolve",
15754 },
15755 CommandOutcomeContract {
15756 command: Command::ConfigureHistory,
15757 possible_submission_states: &[
15758 "not_submitted",
15759 "submitted",
15760 "known_retired",
15761 "indeterminate",
15762 "resolved",
15763 ],
15764 identity_requirement: "none",
15765 resolver_command: Some(Command::GetHistory),
15766 cancellation: "per_call_until_submission_then_resolve",
15767 },
15768 CommandOutcomeContract {
15769 command: Command::GetHistory,
15770 possible_submission_states: &["not_submitted", "resolved"],
15771 identity_requirement: "none",
15772 resolver_command: None,
15773 cancellation: "per_call",
15774 },
15775 CommandOutcomeContract {
15776 command: Command::ResolveHistory,
15777 possible_submission_states: &["not_submitted", "resolved"],
15778 identity_requirement: "none",
15779 resolver_command: None,
15780 cancellation: "per_call",
15781 },
15782 CommandOutcomeContract {
15783 command: Command::PlaceHistoryHold,
15784 possible_submission_states: &[
15785 "not_submitted",
15786 "submitted",
15787 "known_retired",
15788 "indeterminate",
15789 "resolved",
15790 ],
15791 identity_requirement: "none",
15792 resolver_command: Some(Command::GetHistory),
15793 cancellation: "per_call_until_submission_then_resolve",
15794 },
15795 CommandOutcomeContract {
15796 command: Command::ReleaseHistoryHold,
15797 possible_submission_states: &[
15798 "not_submitted",
15799 "submitted",
15800 "known_retired",
15801 "indeterminate",
15802 "resolved",
15803 ],
15804 identity_requirement: "none",
15805 resolver_command: Some(Command::GetHistory),
15806 cancellation: "per_call_until_submission_then_resolve",
15807 },
15808 CommandOutcomeContract {
15809 command: Command::PrepareDocumentMutation,
15810 possible_submission_states: &["not_submitted", "resolved"],
15811 identity_requirement: "server_locator",
15812 resolver_command: None,
15813 cancellation: "per_call",
15814 },
15815 CommandOutcomeContract {
15816 command: Command::SubmitDocumentMutation,
15817 possible_submission_states: &[
15818 "not_submitted",
15819 "submitted",
15820 "known_retired",
15821 "indeterminate",
15822 "resolved",
15823 ],
15824 identity_requirement: "request_locator",
15825 resolver_command: Some(Command::ResolveDocumentMutation),
15826 cancellation: "per_call_until_submission_then_resolve",
15827 },
15828 CommandOutcomeContract {
15829 command: Command::PrepareDocumentBulk,
15830 possible_submission_states: &["not_submitted", "resolved"],
15831 identity_requirement: "caller_action_id",
15832 resolver_command: None,
15833 cancellation: "per_call",
15834 },
15835 CommandOutcomeContract {
15836 command: Command::SubmitDocumentBulk,
15837 possible_submission_states: &[
15838 "not_submitted",
15839 "submitted",
15840 "known_retired",
15841 "indeterminate",
15842 "resolved",
15843 ],
15844 identity_requirement: "caller_action_id",
15845 resolver_command: Some(Command::ResolveDocumentBulk),
15846 cancellation: "per_call_until_submission_then_resolve",
15847 },
15848 CommandOutcomeContract {
15849 command: Command::ResolveDocumentBulk,
15850 possible_submission_states: &["not_submitted", "resolved"],
15851 identity_requirement: "caller_action_id",
15852 resolver_command: None,
15853 cancellation: "per_call",
15854 },
15855 CommandOutcomeContract {
15856 command: Command::PrepareAppendBulk,
15857 possible_submission_states: &["not_submitted", "resolved"],
15858 identity_requirement: "caller_action_id",
15859 resolver_command: None,
15860 cancellation: "per_call",
15861 },
15862 CommandOutcomeContract {
15863 command: Command::SubmitAppendBulk,
15864 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15865 identity_requirement: "request_locator",
15866 resolver_command: Some(Command::ResolveAppendBulk),
15867 cancellation: "per_call_until_submission_then_resolve",
15868 },
15869 CommandOutcomeContract {
15870 command: Command::ResolveAppendBulk,
15871 possible_submission_states: &["not_submitted", "resolved"],
15872 identity_requirement: "request_locator",
15873 resolver_command: None,
15874 cancellation: "per_call",
15875 },
15876 CommandOutcomeContract {
15877 command: Command::ObserveAppendCommitted,
15878 possible_submission_states: &["not_submitted", "resolved"],
15879 identity_requirement: "request_locator",
15880 resolver_command: None,
15881 cancellation: "per_call",
15882 },
15883 CommandOutcomeContract {
15884 command: Command::ResolveDocumentMutation,
15885 possible_submission_states: &["not_submitted", "resolved"],
15886 identity_requirement: "request_locator",
15887 resolver_command: None,
15888 cancellation: "per_call",
15889 },
15890 CommandOutcomeContract {
15891 command: Command::GetDocument,
15892 possible_submission_states: &["not_submitted", "resolved"],
15893 identity_requirement: "none",
15894 resolver_command: None,
15895 cancellation: "per_call",
15896 },
15897 CommandOutcomeContract {
15898 command: Command::Search,
15899 possible_submission_states: &["not_submitted", "resolved"],
15900 identity_requirement: "none",
15901 resolver_command: None,
15902 cancellation: "per_call",
15903 },
15904 CommandOutcomeContract {
15905 command: Command::TraverseRelationships,
15906 possible_submission_states: &["not_submitted", "resolved"],
15907 identity_requirement: "none",
15908 resolver_command: None,
15909 cancellation: "per_call",
15910 },
15911 CommandOutcomeContract {
15912 command: Command::QueryProfiles,
15913 possible_submission_states: &["not_submitted", "resolved"],
15914 identity_requirement: "none",
15915 resolver_command: None,
15916 cancellation: "per_call",
15917 },
15918 CommandOutcomeContract {
15919 command: Command::EvaluateTemporalEvidence,
15920 possible_submission_states: &["not_submitted", "resolved"],
15921 identity_requirement: "none",
15922 resolver_command: None,
15923 cancellation: "per_call",
15924 },
15925 CommandOutcomeContract {
15926 command: Command::CreateContinuousTemporalEvaluation,
15927 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15928 identity_requirement: "caller_action_id",
15929 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15930 cancellation: "per_call_until_submission_then_resolve",
15931 },
15932 CommandOutcomeContract {
15933 command: Command::GetContinuousTemporalEvaluation,
15934 possible_submission_states: &["not_submitted", "resolved"],
15935 identity_requirement: "none",
15936 resolver_command: None,
15937 cancellation: "per_call",
15938 },
15939 CommandOutcomeContract {
15940 command: Command::PauseContinuousTemporalEvaluation,
15941 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15942 identity_requirement: "caller_action_id",
15943 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15944 cancellation: "per_call_until_submission_then_resolve",
15945 },
15946 CommandOutcomeContract {
15947 command: Command::ResumeContinuousTemporalEvaluation,
15948 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15949 identity_requirement: "caller_action_id",
15950 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15951 cancellation: "per_call_until_submission_then_resolve",
15952 },
15953 CommandOutcomeContract {
15954 command: Command::ReplaceContinuousTemporalEvaluation,
15955 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15956 identity_requirement: "caller_action_id",
15957 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15958 cancellation: "per_call_until_submission_then_resolve",
15959 },
15960 CommandOutcomeContract {
15961 command: Command::RetireContinuousTemporalEvaluation,
15962 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15963 identity_requirement: "caller_action_id",
15964 resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15965 cancellation: "per_call_until_submission_then_resolve",
15966 },
15967 CommandOutcomeContract {
15968 command: Command::ReadContinuousTemporalEvidence,
15969 possible_submission_states: &["not_submitted", "resolved"],
15970 identity_requirement: "none",
15971 resolver_command: None,
15972 cancellation: "per_call",
15973 },
15974 CommandOutcomeContract {
15975 command: Command::ValidateSearch,
15976 possible_submission_states: &["not_submitted", "resolved"],
15977 identity_requirement: "none",
15978 resolver_command: None,
15979 cancellation: "per_call",
15980 },
15981 CommandOutcomeContract {
15982 command: Command::OpenPit,
15983 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15984 identity_requirement: "none",
15985 resolver_command: None,
15986 cancellation: "per_call_until_submission_then_resolve",
15987 },
15988 CommandOutcomeContract {
15989 command: Command::RenewPit,
15990 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15991 identity_requirement: "none",
15992 resolver_command: None,
15993 cancellation: "per_call_until_submission_then_resolve",
15994 },
15995 CommandOutcomeContract {
15996 command: Command::ClosePit,
15997 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15998 identity_requirement: "none",
15999 resolver_command: None,
16000 cancellation: "per_call_until_submission_then_resolve",
16001 },
16002 CommandOutcomeContract {
16003 command: Command::ListOperations,
16004 possible_submission_states: &["not_submitted", "resolved"],
16005 identity_requirement: "none",
16006 resolver_command: None,
16007 cancellation: "per_call",
16008 },
16009 CommandOutcomeContract {
16010 command: Command::GetOperation,
16011 possible_submission_states: &["not_submitted", "resolved"],
16012 identity_requirement: "request_locator",
16013 resolver_command: None,
16014 cancellation: "per_call",
16015 },
16016 CommandOutcomeContract {
16017 command: Command::WaitOperation,
16018 possible_submission_states: &["not_submitted", "resolved"],
16019 identity_requirement: "request_locator",
16020 resolver_command: None,
16021 cancellation: "per_call",
16022 },
16023 CommandOutcomeContract {
16024 command: Command::CancelOperation,
16025 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16026 identity_requirement: "request_locator",
16027 resolver_command: None,
16028 cancellation: "per_call_until_submission_then_resolve",
16029 },
16030 CommandOutcomeContract {
16031 command: Command::ListAuditEvents,
16032 possible_submission_states: &["not_submitted", "resolved"],
16033 identity_requirement: "none",
16034 resolver_command: None,
16035 cancellation: "per_call",
16036 },
16037 CommandOutcomeContract {
16038 command: Command::ExportAuditEvents,
16039 possible_submission_states: &["not_submitted", "resolved"],
16040 identity_requirement: "none",
16041 resolver_command: None,
16042 cancellation: "per_call",
16043 },
16044 CommandOutcomeContract {
16045 command: Command::ReserveServiceCredential,
16046 possible_submission_states: &[
16047 "not_submitted",
16048 "submitted",
16049 "known_retired",
16050 "indeterminate",
16051 "resolved",
16052 ],
16053 identity_requirement: "caller_action_id",
16054 resolver_command: Some(Command::ResolveServiceCredentialReservation),
16055 cancellation: "per_call_until_submission_then_resolve",
16056 },
16057 CommandOutcomeContract {
16058 command: Command::ReserveServiceCredentialRotation,
16059 possible_submission_states: &[
16060 "not_submitted",
16061 "submitted",
16062 "known_retired",
16063 "indeterminate",
16064 "resolved",
16065 ],
16066 identity_requirement: "caller_action_id",
16067 resolver_command: Some(Command::ResolveServiceCredentialReservation),
16068 cancellation: "per_call_until_submission_then_resolve",
16069 },
16070 CommandOutcomeContract {
16071 command: Command::ActivateServiceCredential,
16072 possible_submission_states: &[
16073 "not_submitted",
16074 "submitted",
16075 "known_retired",
16076 "indeterminate",
16077 "resolved",
16078 ],
16079 identity_requirement: "server_locator",
16080 resolver_command: Some(Command::ResolveServiceCredentialReservation),
16081 cancellation: "per_call_until_submission_then_resolve",
16082 },
16083 CommandOutcomeContract {
16084 command: Command::ResolveServiceCredentialReservation,
16085 possible_submission_states: &["not_submitted", "resolved"],
16086 identity_requirement: "caller_action_id",
16087 resolver_command: None,
16088 cancellation: "per_call",
16089 },
16090 CommandOutcomeContract {
16091 command: Command::PrepareRevokeServiceCredential,
16092 possible_submission_states: &["not_submitted", "resolved"],
16093 identity_requirement: "server_locator",
16094 resolver_command: None,
16095 cancellation: "per_call",
16096 },
16097 CommandOutcomeContract {
16098 command: Command::RevokeServiceCredential,
16099 possible_submission_states: &[
16100 "not_submitted",
16101 "submitted",
16102 "known_retired",
16103 "indeterminate",
16104 "resolved",
16105 ],
16106 identity_requirement: "request_locator",
16107 resolver_command: Some(Command::ResolveSecurityAction),
16108 cancellation: "per_call_until_submission_then_resolve",
16109 },
16110 CommandOutcomeContract {
16111 command: Command::ResolveSecurityAction,
16112 possible_submission_states: &["not_submitted", "resolved"],
16113 identity_requirement: "request_locator",
16114 resolver_command: None,
16115 cancellation: "per_call",
16116 },
16117 CommandOutcomeContract {
16118 command: Command::GetSecurityRole,
16119 possible_submission_states: &["not_submitted", "resolved"],
16120 identity_requirement: "none",
16121 resolver_command: None,
16122 cancellation: "per_call",
16123 },
16124 CommandOutcomeContract {
16125 command: Command::PrepareRoleAppendAccessChange,
16126 possible_submission_states: &["not_submitted", "resolved"],
16127 identity_requirement: "server_locator",
16128 resolver_command: None,
16129 cancellation: "per_call",
16130 },
16131 CommandOutcomeContract {
16132 command: Command::SubmitRoleAppendAccessChange,
16133 possible_submission_states: &[
16134 "not_submitted",
16135 "submitted",
16136 "known_retired",
16137 "indeterminate",
16138 "resolved",
16139 ],
16140 identity_requirement: "request_locator",
16141 resolver_command: Some(Command::ResolveSecurityAction),
16142 cancellation: "per_call_until_submission_then_resolve",
16143 },
16144 CommandOutcomeContract {
16145 command: Command::ListServiceCredentials,
16146 possible_submission_states: &["not_submitted", "resolved"],
16147 identity_requirement: "none",
16148 resolver_command: None,
16149 cancellation: "per_call",
16150 },
16151 CommandOutcomeContract {
16152 command: Command::GetRuntimeStatus,
16153 possible_submission_states: &["not_submitted", "resolved"],
16154 identity_requirement: "none",
16155 resolver_command: None,
16156 cancellation: "per_call",
16157 },
16158 CommandOutcomeContract {
16159 command: Command::GetResultCacheStatus,
16160 possible_submission_states: &["not_submitted", "resolved"],
16161 identity_requirement: "none",
16162 resolver_command: None,
16163 cancellation: "per_call",
16164 },
16165 CommandOutcomeContract {
16166 command: Command::GetFieldPromotionStatus,
16167 possible_submission_states: &["not_submitted", "resolved"],
16168 identity_requirement: "none",
16169 resolver_command: None,
16170 cancellation: "per_call",
16171 },
16172 CommandOutcomeContract {
16173 command: Command::GetOverloadStatus,
16174 possible_submission_states: &["not_submitted", "resolved"],
16175 identity_requirement: "none",
16176 resolver_command: None,
16177 cancellation: "per_call",
16178 },
16179 CommandOutcomeContract {
16180 command: Command::ConfigureExternalKey,
16181 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16182 identity_requirement: "none",
16183 resolver_command: None,
16184 cancellation: "per_call_until_submission_then_resolve",
16185 },
16186 CommandOutcomeContract {
16187 command: Command::RotateExternalKeyBinding,
16188 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16189 identity_requirement: "none",
16190 resolver_command: None,
16191 cancellation: "per_call_until_submission_then_resolve",
16192 },
16193 CommandOutcomeContract {
16194 command: Command::ConfigureAggregateThenDelete,
16195 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16196 identity_requirement: "none",
16197 resolver_command: None,
16198 cancellation: "per_call_until_submission_then_resolve",
16199 },
16200 CommandOutcomeContract {
16201 command: Command::GetLifecycleStatus,
16202 possible_submission_states: &["not_submitted", "resolved"],
16203 identity_requirement: "none",
16204 resolver_command: None,
16205 cancellation: "per_call",
16206 },
16207 CommandOutcomeContract {
16208 command: Command::GetQuota,
16209 possible_submission_states: &["not_submitted", "resolved"],
16210 identity_requirement: "none",
16211 resolver_command: None,
16212 cancellation: "per_call",
16213 },
16214 CommandOutcomeContract {
16215 command: Command::UpdateQuota,
16216 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16217 identity_requirement: "none",
16218 resolver_command: None,
16219 cancellation: "per_call_until_submission_then_resolve",
16220 },
16221 CommandOutcomeContract {
16222 command: Command::GetBinding,
16223 possible_submission_states: &["not_submitted", "resolved"],
16224 identity_requirement: "none",
16225 resolver_command: None,
16226 cancellation: "per_call",
16227 },
16228 CommandOutcomeContract {
16229 command: Command::GetAdmissionStatus,
16230 possible_submission_states: &["not_submitted", "resolved"],
16231 identity_requirement: "none",
16232 resolver_command: None,
16233 cancellation: "per_call",
16234 },
16235 CommandOutcomeContract {
16236 command: Command::SetAdmission,
16237 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16238 identity_requirement: "none",
16239 resolver_command: None,
16240 cancellation: "per_call_until_submission_then_resolve",
16241 },
16242 CommandOutcomeContract {
16243 command: Command::GetQuiesceStatus,
16244 possible_submission_states: &["not_submitted", "resolved"],
16245 identity_requirement: "none",
16246 resolver_command: None,
16247 cancellation: "per_call",
16248 },
16249 CommandOutcomeContract {
16250 command: Command::GetDecommissionReadiness,
16251 possible_submission_states: &["not_submitted", "resolved"],
16252 identity_requirement: "none",
16253 resolver_command: None,
16254 cancellation: "per_call",
16255 },
16256 CommandOutcomeContract {
16257 command: Command::GetUpgradeReadiness,
16258 possible_submission_states: &["not_submitted", "resolved"],
16259 identity_requirement: "none",
16260 resolver_command: None,
16261 cancellation: "per_call",
16262 },
16263 CommandOutcomeContract {
16264 command: Command::GetMaintenanceStatus,
16265 possible_submission_states: &["not_submitted", "resolved"],
16266 identity_requirement: "none",
16267 resolver_command: None,
16268 cancellation: "per_call",
16269 },
16270 CommandOutcomeContract {
16271 command: Command::WarmVectorIndex,
16272 possible_submission_states: &["not_submitted", "resolved"],
16273 identity_requirement: "exact_root",
16274 resolver_command: None,
16275 cancellation: "per_call",
16276 },
16277 CommandOutcomeContract {
16278 command: Command::EvaluateVectorRecall,
16279 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16280 identity_requirement: "caller_action_id",
16281 resolver_command: None,
16282 cancellation: "per_call_until_submission_then_resolve",
16283 },
16284 CommandOutcomeContract {
16285 command: Command::CalibrateVectorStrategy,
16286 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16287 identity_requirement: "caller_action_id",
16288 resolver_command: None,
16289 cancellation: "per_call_until_submission_then_resolve",
16290 },
16291 CommandOutcomeContract {
16292 command: Command::GetVectorDiagnostic,
16293 possible_submission_states: &["not_submitted", "resolved"],
16294 identity_requirement: "request_locator",
16295 resolver_command: None,
16296 cancellation: "per_call",
16297 },
16298 CommandOutcomeContract {
16299 command: Command::CreateDiagnostic,
16300 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16301 identity_requirement: "none",
16302 resolver_command: None,
16303 cancellation: "per_call_until_submission_then_resolve",
16304 },
16305 CommandOutcomeContract {
16306 command: Command::GetDiagnostic,
16307 possible_submission_states: &["not_submitted", "resolved"],
16308 identity_requirement: "request_locator",
16309 resolver_command: None,
16310 cancellation: "per_call",
16311 },
16312 CommandOutcomeContract {
16313 command: Command::PrepareCollectionExport,
16314 possible_submission_states: &["not_submitted", "resolved"],
16315 identity_requirement: "caller_action_id",
16316 resolver_command: None,
16317 cancellation: "per_call",
16318 },
16319 CommandOutcomeContract {
16320 command: Command::StartCollectionExport,
16321 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16322 identity_requirement: "caller_action_id",
16323 resolver_command: Some(Command::ResolveCollectionExport),
16324 cancellation: "per_call_until_submission_then_resolve",
16325 },
16326 CommandOutcomeContract {
16327 command: Command::ResolveCollectionExport,
16328 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
16329 identity_requirement: "caller_action_id",
16330 resolver_command: None,
16331 cancellation: "per_call",
16332 },
16333 CommandOutcomeContract {
16334 command: Command::VerifyCollectionExport,
16335 possible_submission_states: &["not_submitted", "resolved"],
16336 identity_requirement: "request_locator",
16337 resolver_command: None,
16338 cancellation: "per_call",
16339 },
16340 CommandOutcomeContract {
16341 command: Command::PrepareCollectionExportRetirement,
16342 possible_submission_states: &["not_submitted", "resolved"],
16343 identity_requirement: "caller_action_id",
16344 resolver_command: None,
16345 cancellation: "per_call",
16346 },
16347 CommandOutcomeContract {
16348 command: Command::StartCollectionExportRetirement,
16349 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16350 identity_requirement: "caller_action_id",
16351 resolver_command: Some(Command::ResolveCollectionExportRetirement),
16352 cancellation: "per_call_until_submission_then_resolve",
16353 },
16354 CommandOutcomeContract {
16355 command: Command::ResolveCollectionExportRetirement,
16356 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
16357 identity_requirement: "caller_action_id",
16358 resolver_command: None,
16359 cancellation: "per_call",
16360 },
16361 CommandOutcomeContract {
16362 command: Command::PrepareCollectionRestore,
16363 possible_submission_states: &["not_submitted", "resolved"],
16364 identity_requirement: "caller_action_id",
16365 resolver_command: None,
16366 cancellation: "per_call",
16367 },
16368 CommandOutcomeContract {
16369 command: Command::StartCollectionRestore,
16370 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16371 identity_requirement: "caller_action_id",
16372 resolver_command: Some(Command::ResolveCollectionRestore),
16373 cancellation: "per_call_until_submission_then_resolve",
16374 },
16375 CommandOutcomeContract {
16376 command: Command::ResolveCollectionRestore,
16377 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
16378 identity_requirement: "caller_action_id",
16379 resolver_command: None,
16380 cancellation: "per_call",
16381 },
16382 CommandOutcomeContract {
16383 command: Command::PrepareIndexExport,
16384 possible_submission_states: &["not_submitted", "resolved"],
16385 identity_requirement: "caller_action_id",
16386 resolver_command: None,
16387 cancellation: "per_call",
16388 },
16389 CommandOutcomeContract {
16390 command: Command::StartIndexExport,
16391 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16392 identity_requirement: "caller_action_id",
16393 resolver_command: Some(Command::ResolveIndexExport),
16394 cancellation: "per_call_until_submission_then_resolve",
16395 },
16396 CommandOutcomeContract {
16397 command: Command::ResolveIndexExport,
16398 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
16399 identity_requirement: "caller_action_id",
16400 resolver_command: None,
16401 cancellation: "per_call",
16402 },
16403 CommandOutcomeContract {
16404 command: Command::VerifyIndexExport,
16405 possible_submission_states: &["not_submitted", "resolved"],
16406 identity_requirement: "request_locator",
16407 resolver_command: None,
16408 cancellation: "per_call",
16409 },
16410 CommandOutcomeContract {
16411 command: Command::PrepareIndexImport,
16412 possible_submission_states: &["not_submitted", "resolved"],
16413 identity_requirement: "caller_action_id",
16414 resolver_command: None,
16415 cancellation: "per_call",
16416 },
16417 CommandOutcomeContract {
16418 command: Command::StartIndexImport,
16419 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
16420 identity_requirement: "caller_action_id",
16421 resolver_command: Some(Command::ResolveIndexImport),
16422 cancellation: "per_call_until_submission_then_resolve",
16423 },
16424 CommandOutcomeContract {
16425 command: Command::ResolveIndexImport,
16426 possible_submission_states: &["not_submitted", "resolved", "known_retired"],
16427 identity_requirement: "caller_action_id",
16428 resolver_command: None,
16429 cancellation: "per_call",
16430 },
16431 CommandOutcomeContract {
16432 command: Command::ReadArtifactChunk,
16433 possible_submission_states: &["not_submitted", "resolved"],
16434 identity_requirement: "none",
16435 resolver_command: None,
16436 cancellation: "per_call",
16437 },
16438 CommandOutcomeContract {
16439 command: Command::ExportUsage,
16440 possible_submission_states: &["not_submitted", "resolved"],
16441 identity_requirement: "none",
16442 resolver_command: None,
16443 cancellation: "per_call",
16444 },
16445 CommandOutcomeContract {
16446 command: Command::ReadLogicalOccupancy,
16447 possible_submission_states: &["not_submitted", "resolved"],
16448 identity_requirement: "none",
16449 resolver_command: None,
16450 cancellation: "per_call",
16451 },
16452 CommandOutcomeContract {
16453 command: Command::ExecuteStateRead,
16454 possible_submission_states: &["not_submitted", "resolved"],
16455 identity_requirement: "none",
16456 resolver_command: None,
16457 cancellation: "per_call",
16458 },
16459 CommandOutcomeContract {
16460 command: Command::PrepareStateWrite,
16461 possible_submission_states: &["not_submitted", "resolved"],
16462 identity_requirement: "caller_action_id",
16463 resolver_command: None,
16464 cancellation: "per_call",
16465 },
16466 CommandOutcomeContract {
16467 command: Command::SubmitStateWrite,
16468 possible_submission_states: &[
16469 "not_submitted",
16470 "submitted",
16471 "known_retired",
16472 "indeterminate",
16473 "resolved",
16474 ],
16475 identity_requirement: "request_locator",
16476 resolver_command: Some(Command::ResolveStateWrite),
16477 cancellation: "per_call_until_submission_then_resolve",
16478 },
16479 CommandOutcomeContract {
16480 command: Command::ResolveStateWrite,
16481 possible_submission_states: &["not_submitted", "resolved"],
16482 identity_requirement: "request_locator",
16483 resolver_command: None,
16484 cancellation: "per_call",
16485 },
16486];
16487#[derive(Clone, Copy, Debug, Eq, PartialEq)]
16488pub struct ErrorOutcomeContract {
16489 pub code: ErrorCode,
16490 pub disposition: ErrorDisposition,
16491 pub recovery: RecoveryAction,
16492 pub retry_after_limit_id: Option<&'static str>,
16493 pub recovery_identity: &'static str,
16494}
16495pub const LODESTONE_API_ERROR_OUTCOMES: &[ErrorOutcomeContract] = &[
16496 ErrorOutcomeContract {
16497 code: ErrorCode::Aborted,
16498 disposition: ErrorDisposition::NotSubmitted,
16499 recovery: RecoveryAction::Retry,
16500 retry_after_limit_id: None,
16501 recovery_identity: "request_identity",
16502 },
16503 ErrorOutcomeContract {
16504 code: ErrorCode::Aborted,
16505 disposition: ErrorDisposition::Indeterminate,
16506 recovery: RecoveryAction::Resolve,
16507 retry_after_limit_id: None,
16508 recovery_identity: "request_identity",
16509 },
16510 ErrorOutcomeContract {
16511 code: ErrorCode::DeadlineExceeded,
16512 disposition: ErrorDisposition::NotSubmitted,
16513 recovery: RecoveryAction::Retry,
16514 retry_after_limit_id: None,
16515 recovery_identity: "request_identity",
16516 },
16517 ErrorOutcomeContract {
16518 code: ErrorCode::DeadlineExceeded,
16519 disposition: ErrorDisposition::Indeterminate,
16520 recovery: RecoveryAction::Resolve,
16521 retry_after_limit_id: None,
16522 recovery_identity: "request_identity",
16523 },
16524 ErrorOutcomeContract {
16525 code: ErrorCode::InvalidRequest,
16526 disposition: ErrorDisposition::NotSubmitted,
16527 recovery: RecoveryAction::Stop,
16528 retry_after_limit_id: None,
16529 recovery_identity: "none",
16530 },
16531 ErrorOutcomeContract {
16532 code: ErrorCode::UnsupportedVersion,
16533 disposition: ErrorDisposition::NotSubmitted,
16534 recovery: RecoveryAction::Stop,
16535 retry_after_limit_id: None,
16536 recovery_identity: "none",
16537 },
16538 ErrorOutcomeContract {
16539 code: ErrorCode::Unauthenticated,
16540 disposition: ErrorDisposition::NotSubmitted,
16541 recovery: RecoveryAction::RefreshCredential,
16542 retry_after_limit_id: None,
16543 recovery_identity: "none",
16544 },
16545 ErrorOutcomeContract {
16546 code: ErrorCode::PermissionDenied,
16547 disposition: ErrorDisposition::NotSubmitted,
16548 recovery: RecoveryAction::Stop,
16549 retry_after_limit_id: None,
16550 recovery_identity: "none",
16551 },
16552 ErrorOutcomeContract {
16553 code: ErrorCode::NotFound,
16554 disposition: ErrorDisposition::NotSubmitted,
16555 recovery: RecoveryAction::Stop,
16556 retry_after_limit_id: None,
16557 recovery_identity: "request_identity",
16558 },
16559 ErrorOutcomeContract {
16560 code: ErrorCode::NotFound,
16561 disposition: ErrorDisposition::Resolved,
16562 recovery: RecoveryAction::Stop,
16563 retry_after_limit_id: None,
16564 recovery_identity: "request_identity",
16565 },
16566 ErrorOutcomeContract {
16567 code: ErrorCode::Conflict,
16568 disposition: ErrorDisposition::NotSubmitted,
16569 recovery: RecoveryAction::RefreshPrecondition,
16570 retry_after_limit_id: None,
16571 recovery_identity: "request_identity",
16572 },
16573 ErrorOutcomeContract {
16574 code: ErrorCode::Conflict,
16575 disposition: ErrorDisposition::Resolved,
16576 recovery: RecoveryAction::Stop,
16577 retry_after_limit_id: None,
16578 recovery_identity: "request_identity",
16579 },
16580 ErrorOutcomeContract {
16581 code: ErrorCode::StaleCursor,
16582 disposition: ErrorDisposition::NotSubmitted,
16583 recovery: RecoveryAction::RestartPage,
16584 retry_after_limit_id: None,
16585 recovery_identity: "cursor",
16586 },
16587 ErrorOutcomeContract {
16588 code: ErrorCode::RestartBudgetExhausted,
16589 disposition: ErrorDisposition::NotSubmitted,
16590 recovery: RecoveryAction::Stop,
16591 retry_after_limit_id: None,
16592 recovery_identity: "cursor",
16593 },
16594 ErrorOutcomeContract {
16595 code: ErrorCode::LimitExceeded,
16596 disposition: ErrorDisposition::NotSubmitted,
16597 recovery: RecoveryAction::ReduceRequest,
16598 retry_after_limit_id: None,
16599 recovery_identity: "none",
16600 },
16601 ErrorOutcomeContract {
16602 code: ErrorCode::CapabilityUnavailable,
16603 disposition: ErrorDisposition::NotSubmitted,
16604 recovery: RecoveryAction::Stop,
16605 retry_after_limit_id: None,
16606 recovery_identity: "none",
16607 },
16608 ErrorOutcomeContract {
16609 code: ErrorCode::NotSubmitted,
16610 disposition: ErrorDisposition::NotSubmitted,
16611 recovery: RecoveryAction::RetryAfter,
16612 retry_after_limit_id: Some("retry_after_millis"),
16613 recovery_identity: "request_identity",
16614 },
16615 ErrorOutcomeContract {
16616 code: ErrorCode::SubmittedIndeterminate,
16617 disposition: ErrorDisposition::Indeterminate,
16618 recovery: RecoveryAction::Resolve,
16619 retry_after_limit_id: None,
16620 recovery_identity: "locator_or_caller_action_id",
16621 },
16622 ErrorOutcomeContract {
16623 code: ErrorCode::ExpiredUnknown,
16624 disposition: ErrorDisposition::KnownRetired,
16625 recovery: RecoveryAction::Stop,
16626 retry_after_limit_id: None,
16627 recovery_identity: "locator_or_caller_action_id",
16628 },
16629 ErrorOutcomeContract {
16630 code: ErrorCode::SecretNotEscrowed,
16631 disposition: ErrorDisposition::Resolved,
16632 recovery: RecoveryAction::Resolve,
16633 retry_after_limit_id: None,
16634 recovery_identity: "reservation_action_id",
16635 },
16636 ErrorOutcomeContract {
16637 code: ErrorCode::RetentionGap,
16638 disposition: ErrorDisposition::KnownRetired,
16639 recovery: RecoveryAction::Stop,
16640 retry_after_limit_id: None,
16641 recovery_identity: "cursor_or_locator",
16642 },
16643 ErrorOutcomeContract {
16644 code: ErrorCode::ArtifactRangeInvalid,
16645 disposition: ErrorDisposition::NotSubmitted,
16646 recovery: RecoveryAction::CorrectRange,
16647 retry_after_limit_id: None,
16648 recovery_identity: "artifact_identity",
16649 },
16650 ErrorOutcomeContract {
16651 code: ErrorCode::ChecksumMismatch,
16652 disposition: ErrorDisposition::Resolved,
16653 recovery: RecoveryAction::Stop,
16654 retry_after_limit_id: None,
16655 recovery_identity: "artifact_identity",
16656 },
16657 ErrorOutcomeContract {
16658 code: ErrorCode::TemporarilyUnavailable,
16659 disposition: ErrorDisposition::NotSubmitted,
16660 recovery: RecoveryAction::RetryAfter,
16661 retry_after_limit_id: Some("retry_after_millis"),
16662 recovery_identity: "request_identity",
16663 },
16664 ErrorOutcomeContract {
16665 code: ErrorCode::TemporarilyUnavailable,
16666 disposition: ErrorDisposition::Indeterminate,
16667 recovery: RecoveryAction::Resolve,
16668 retry_after_limit_id: Some("retry_after_millis"),
16669 recovery_identity: "request_identity",
16670 },
16671 ErrorOutcomeContract {
16672 code: ErrorCode::Internal,
16673 disposition: ErrorDisposition::NotSubmitted,
16674 recovery: RecoveryAction::Stop,
16675 retry_after_limit_id: None,
16676 recovery_identity: "request_identity",
16677 },
16678 ErrorOutcomeContract {
16679 code: ErrorCode::Internal,
16680 disposition: ErrorDisposition::Resolved,
16681 recovery: RecoveryAction::Stop,
16682 retry_after_limit_id: None,
16683 recovery_identity: "request_identity",
16684 },
16685 ErrorOutcomeContract {
16686 code: ErrorCode::Internal,
16687 disposition: ErrorDisposition::Indeterminate,
16688 recovery: RecoveryAction::Resolve,
16689 retry_after_limit_id: None,
16690 recovery_identity: "request_identity",
16691 },
16692];
16693#[derive(Clone, Copy, Debug, Eq, PartialEq)]
16694pub struct Limit {
16695 pub id: &'static str,
16696 pub default: u64,
16697 pub maximum: u64,
16698 pub unit: &'static str,
16699}
16700pub const LODESTONE_API_LIMITS: &[Limit] = &[
16701 Limit {
16702 id: "request_bytes",
16703 default: 2097152,
16704 maximum: 2097152,
16705 unit: "bytes",
16706 },
16707 Limit {
16708 id: "response_bytes",
16709 default: 2097152,
16710 maximum: 2097152,
16711 unit: "bytes",
16712 },
16713 Limit {
16714 id: "page_size",
16715 default: 100,
16716 maximum: 1000,
16717 unit: "items",
16718 },
16719 Limit {
16720 id: "catalog_page_size",
16721 default: 100,
16722 maximum: 100,
16723 unit: "items",
16724 },
16725 Limit {
16726 id: "catalog_restart_budget",
16727 default: 8,
16728 maximum: 8,
16729 unit: "restarts",
16730 },
16731 Limit {
16732 id: "query_clauses",
16733 default: 256,
16734 maximum: 1024,
16735 unit: "clauses",
16736 },
16737 Limit {
16738 id: "text_query_bytes",
16739 default: 16384,
16740 maximum: 16384,
16741 unit: "bytes",
16742 },
16743 Limit {
16744 id: "text_query_fields",
16745 default: 64,
16746 maximum: 64,
16747 unit: "fields",
16748 },
16749 Limit {
16750 id: "text_query_slop",
16751 default: 64,
16752 maximum: 64,
16753 unit: "positions",
16754 },
16755 Limit {
16756 id: "text_query_boost",
16757 default: 1024,
16758 maximum: 1024,
16759 unit: "multiplier",
16760 },
16761 Limit {
16762 id: "text_query_fuzzy_expansions",
16763 default: 1024,
16764 maximum: 1024,
16765 unit: "terms",
16766 },
16767 Limit {
16768 id: "text_query_fuzzy_distance",
16769 default: 2,
16770 maximum: 2,
16771 unit: "edits",
16772 },
16773 Limit {
16774 id: "text_query_dictionary_scan_terms",
16775 default: 65536,
16776 maximum: 65536,
16777 unit: "terms",
16778 },
16779 Limit {
16780 id: "text_query_dictionary_scan_bytes",
16781 default: 16777216,
16782 maximum: 16777216,
16783 unit: "bytes",
16784 },
16785 Limit {
16786 id: "text_query_fuzzy_work_units",
16787 default: 2000000,
16788 maximum: 2000000,
16789 unit: "distance_cells",
16790 },
16791 Limit {
16792 id: "aggregation_nodes",
16793 default: 64,
16794 maximum: 256,
16795 unit: "nodes",
16796 },
16797 Limit {
16798 id: "aggregation_buckets",
16799 default: 65536,
16800 maximum: 65536,
16801 unit: "buckets",
16802 },
16803 Limit {
16804 id: "metric_point_bytes",
16805 default: 1048576,
16806 maximum: 1048576,
16807 unit: "bytes",
16808 },
16809 Limit {
16810 id: "metric_attributes",
16811 default: 128,
16812 maximum: 128,
16813 unit: "items",
16814 },
16815 Limit {
16816 id: "metric_attribute_bytes",
16817 default: 65536,
16818 maximum: 65536,
16819 unit: "bytes",
16820 },
16821 Limit {
16822 id: "metric_exemplars",
16823 default: 8,
16824 maximum: 8,
16825 unit: "items",
16826 },
16827 Limit {
16828 id: "metric_histogram_buckets",
16829 default: 4097,
16830 maximum: 4097,
16831 unit: "buckets",
16832 },
16833 Limit {
16834 id: "time_series_grouping_keys",
16835 default: 4,
16836 maximum: 16,
16837 unit: "keys",
16838 },
16839 Limit {
16840 id: "time_series_points",
16841 default: 100000,
16842 maximum: 100000,
16843 unit: "points",
16844 },
16845 Limit {
16846 id: "time_series_series",
16847 default: 10000,
16848 maximum: 10000,
16849 unit: "series",
16850 },
16851 Limit {
16852 id: "time_series_buckets",
16853 default: 65536,
16854 maximum: 65536,
16855 unit: "buckets",
16856 },
16857 Limit {
16858 id: "time_series_results",
16859 default: 65536,
16860 maximum: 65536,
16861 unit: "results",
16862 },
16863 Limit {
16864 id: "time_series_quantiles",
16865 default: 10,
16866 maximum: 100,
16867 unit: "quantiles",
16868 },
16869 Limit {
16870 id: "time_series_state_bytes",
16871 default: 67108864,
16872 maximum: 67108864,
16873 unit: "bytes",
16874 },
16875 Limit {
16876 id: "temporal_inputs",
16877 default: 16,
16878 maximum: 16,
16879 unit: "indexes",
16880 },
16881 Limit {
16882 id: "temporal_pattern_nodes",
16883 default: 64,
16884 maximum: 64,
16885 unit: "nodes",
16886 },
16887 Limit {
16888 id: "temporal_pattern_depth",
16889 default: 16,
16890 maximum: 16,
16891 unit: "levels",
16892 },
16893 Limit {
16894 id: "temporal_pattern_branches",
16895 default: 16,
16896 maximum: 16,
16897 unit: "branches",
16898 },
16899 Limit {
16900 id: "temporal_correlation_keys",
16901 default: 4,
16902 maximum: 4,
16903 unit: "fields",
16904 },
16905 Limit {
16906 id: "temporal_events",
16907 default: 4096,
16908 maximum: 4096,
16909 unit: "events",
16910 },
16911 Limit {
16912 id: "temporal_states",
16913 default: 65536,
16914 maximum: 65536,
16915 unit: "states",
16916 },
16917 Limit {
16918 id: "temporal_captured_events",
16919 default: 256,
16920 maximum: 256,
16921 unit: "events",
16922 },
16923 Limit {
16924 id: "temporal_results",
16925 default: 4096,
16926 maximum: 4096,
16927 unit: "results",
16928 },
16929 Limit {
16930 id: "temporal_state_bytes",
16931 default: 67108864,
16932 maximum: 67108864,
16933 unit: "bytes",
16934 },
16935 Limit {
16936 id: "temporal_interval_nanos",
16937 default: 2678400000000000,
16938 maximum: 2678400000000000,
16939 unit: "nanoseconds",
16940 },
16941 Limit {
16942 id: "relationship_indexes",
16943 default: 4,
16944 maximum: 16,
16945 unit: "indexes",
16946 },
16947 Limit {
16948 id: "relationship_seeds",
16949 default: 16,
16950 maximum: 128,
16951 unit: "entities",
16952 },
16953 Limit {
16954 id: "relationship_filter_values",
16955 default: 16,
16956 maximum: 128,
16957 unit: "values",
16958 },
16959 Limit {
16960 id: "relationship_depth",
16961 default: 4,
16962 maximum: 16,
16963 unit: "levels",
16964 },
16965 Limit {
16966 id: "relationship_fan_out",
16967 default: 256,
16968 maximum: 4096,
16969 unit: "relationships",
16970 },
16971 Limit {
16972 id: "relationship_visited_entities",
16973 default: 10000,
16974 maximum: 65536,
16975 unit: "entities",
16976 },
16977 Limit {
16978 id: "relationship_visited_records",
16979 default: 10000,
16980 maximum: 10000,
16981 unit: "records",
16982 },
16983 Limit {
16984 id: "relationship_returned_records",
16985 default: 10000,
16986 maximum: 10000,
16987 unit: "records",
16988 },
16989 Limit {
16990 id: "relationship_memory_bytes",
16991 default: 67108864,
16992 maximum: 268435456,
16993 unit: "bytes",
16994 },
16995 Limit {
16996 id: "profile_indexes",
16997 default: 4,
16998 maximum: 16,
16999 unit: "indexes",
17000 },
17001 Limit {
17002 id: "profile_filter_values",
17003 default: 16,
17004 maximum: 128,
17005 unit: "values",
17006 },
17007 Limit {
17008 id: "profile_batches",
17009 default: 10000,
17010 maximum: 10000,
17011 unit: "batches",
17012 },
17013 Limit {
17014 id: "profile_samples",
17015 default: 100000,
17016 maximum: 100000,
17017 unit: "samples",
17018 },
17019 Limit {
17020 id: "profile_results",
17021 default: 10000,
17022 maximum: 10000,
17023 unit: "results",
17024 },
17025 Limit {
17026 id: "profile_memory_bytes",
17027 default: 67108864,
17028 maximum: 268435456,
17029 unit: "bytes",
17030 },
17031 Limit {
17032 id: "approximate_cardinality_precision",
17033 default: 12,
17034 maximum: 16,
17035 unit: "index_bits",
17036 },
17037 Limit {
17038 id: "approximate_percentile_precision",
17039 default: 10,
17040 maximum: 12,
17041 unit: "index_bits",
17042 },
17043 Limit {
17044 id: "operation_page_authorities",
17045 default: 7,
17046 maximum: 7,
17047 unit: "authorities",
17048 },
17049 Limit {
17050 id: "artifact_chunk_bytes",
17051 default: 262144,
17052 maximum: 1048576,
17053 unit: "bytes",
17054 },
17055 Limit {
17056 id: "bulk_document_items",
17057 default: 128,
17058 maximum: 1024,
17059 unit: "items",
17060 },
17061 Limit {
17062 id: "bulk_document_bytes",
17063 default: 2097152,
17064 maximum: 2097152,
17065 unit: "bytes",
17066 },
17067 Limit {
17068 id: "state_command_keys",
17069 default: 128,
17070 maximum: 128,
17071 unit: "keys",
17072 },
17073 Limit {
17074 id: "state_command_value_bytes",
17075 default: 1048576,
17076 maximum: 1048576,
17077 unit: "bytes",
17078 },
17079 Limit {
17080 id: "state_write_outcomes",
17081 default: 4096,
17082 maximum: 4096,
17083 unit: "entries",
17084 },
17085 Limit {
17086 id: "exact_decimal_scale",
17087 default: 18,
17088 maximum: 1024,
17089 unit: "decimal_places",
17090 },
17091 Limit {
17092 id: "retry_after_millis",
17093 default: 1000,
17094 maximum: 60000,
17095 unit: "milliseconds",
17096 },
17097 Limit {
17098 id: "mapping_fields",
17099 default: 16384,
17100 maximum: 16384,
17101 unit: "fields",
17102 },
17103 Limit {
17104 id: "search_result_window",
17105 default: 10000,
17106 maximum: 10000,
17107 unit: "items",
17108 },
17109 Limit {
17110 id: "routing_values",
17111 default: 1024,
17112 maximum: 1024,
17113 unit: "items",
17114 },
17115 Limit {
17116 id: "routing_value_bytes",
17117 default: 4096,
17118 maximum: 4096,
17119 unit: "bytes",
17120 },
17121 Limit {
17122 id: "query_recursion_depth",
17123 default: 64,
17124 maximum: 64,
17125 unit: "levels",
17126 },
17127 Limit {
17128 id: "vector_dimensions",
17129 default: 16384,
17130 maximum: 16384,
17131 unit: "dimensions",
17132 },
17133 Limit {
17134 id: "vector_query_bytes",
17135 default: 65536,
17136 maximum: 65536,
17137 unit: "bytes",
17138 },
17139 Limit {
17140 id: "vector_request_bytes",
17141 default: 1048576,
17142 maximum: 1048576,
17143 unit: "bytes",
17144 },
17145 Limit {
17146 id: "vector_candidates",
17147 default: 10000,
17148 maximum: 10000,
17149 unit: "items",
17150 },
17151 Limit {
17152 id: "vector_set_document_vectors",
17153 default: 128,
17154 maximum: 128,
17155 unit: "vectors",
17156 },
17157 Limit {
17158 id: "vector_set_document_bytes",
17159 default: 65536,
17160 maximum: 65536,
17161 unit: "bytes",
17162 },
17163 Limit {
17164 id: "vector_set_query_vectors",
17165 default: 32,
17166 maximum: 32,
17167 unit: "vectors",
17168 },
17169 Limit {
17170 id: "vector_set_query_bytes",
17171 default: 65536,
17172 maximum: 65536,
17173 unit: "bytes",
17174 },
17175 Limit {
17176 id: "retrieval_branches",
17177 default: 16,
17178 maximum: 16,
17179 unit: "branches",
17180 },
17181 Limit {
17182 id: "retrieval_branch_name_bytes",
17183 default: 64,
17184 maximum: 64,
17185 unit: "bytes",
17186 },
17187 Limit {
17188 id: "retrieval_window",
17189 default: 10000,
17190 maximum: 10000,
17191 unit: "items",
17192 },
17193 Limit {
17194 id: "fragment_fields",
17195 default: 4,
17196 maximum: 16,
17197 unit: "fields",
17198 },
17199 Limit {
17200 id: "fragments_per_field",
17201 default: 1,
17202 maximum: 8,
17203 unit: "items",
17204 },
17205 Limit {
17206 id: "fragment_bytes",
17207 default: 150,
17208 maximum: 8192,
17209 unit: "bytes",
17210 },
17211 Limit {
17212 id: "fragment_total_bytes",
17213 default: 65536,
17214 maximum: 65536,
17215 unit: "bytes",
17216 },
17217 Limit {
17218 id: "result_feature_hits",
17219 default: 10,
17220 maximum: 100,
17221 unit: "items",
17222 },
17223 Limit {
17224 id: "result_features",
17225 default: 4,
17226 maximum: 16,
17227 unit: "features",
17228 },
17229 Limit {
17230 id: "diversification_fields",
17231 default: 1,
17232 maximum: 4,
17233 unit: "fields",
17234 },
17235 Limit {
17236 id: "diversification_per_group",
17237 default: 1,
17238 maximum: 64,
17239 unit: "items",
17240 },
17241 Limit {
17242 id: "source_projection_patterns",
17243 default: 128,
17244 maximum: 128,
17245 unit: "patterns",
17246 },
17247 Limit {
17248 id: "source_projection_pattern_bytes",
17249 default: 512,
17250 maximum: 512,
17251 unit: "bytes",
17252 },
17253 Limit {
17254 id: "vector_evaluation_queries",
17255 default: 64,
17256 maximum: 256,
17257 unit: "queries",
17258 },
17259 Limit {
17260 id: "vector_evaluation_k",
17261 default: 10,
17262 maximum: 1000,
17263 unit: "items",
17264 },
17265 Limit {
17266 id: "vector_evaluation_profiles",
17267 default: 3,
17268 maximum: 3,
17269 unit: "profiles",
17270 },
17271 Limit {
17272 id: "vector_evaluation_artifact_bytes",
17273 default: 1048576,
17274 maximum: 1048576,
17275 unit: "bytes",
17276 },
17277 Limit {
17278 id: "vector_warm_components",
17279 default: 2,
17280 maximum: 3,
17281 unit: "components",
17282 },
17283 Limit {
17284 id: "vector_warm_requests",
17285 default: 1024,
17286 maximum: 65536,
17287 unit: "requests",
17288 },
17289 Limit {
17290 id: "vector_warm_bytes",
17291 default: 268435456,
17292 maximum: 1073741824,
17293 unit: "bytes",
17294 },
17295 Limit {
17296 id: "vector_warm_achievements",
17297 default: 1024,
17298 maximum: 10000,
17299 unit: "items",
17300 },
17301 Limit {
17302 id: "vector_warm_ttl_millis",
17303 default: 300000,
17304 maximum: 900000,
17305 unit: "milliseconds",
17306 },
17307 Limit {
17308 id: "operation_page_size",
17309 default: 100,
17310 maximum: 100,
17311 unit: "items",
17312 },
17313 Limit {
17314 id: "operation_wait_attempts",
17315 default: 20,
17316 maximum: 100,
17317 unit: "attempts",
17318 },
17319 Limit {
17320 id: "operation_wait_interval_millis",
17321 default: 100,
17322 maximum: 60000,
17323 unit: "milliseconds",
17324 },
17325 Limit {
17326 id: "resource_initial_shards",
17327 default: 1,
17328 maximum: 4096,
17329 unit: "shards",
17330 },
17331 Limit {
17332 id: "resource_target_shard_bytes",
17333 default: 536870912,
17334 maximum: 1125899906842624,
17335 unit: "bytes",
17336 },
17337 Limit {
17338 id: "resource_admission_weight",
17339 default: 1,
17340 maximum: 1000000,
17341 unit: "weight",
17342 },
17343 Limit {
17344 id: "resource_ram_bytes",
17345 default: 1073741824,
17346 maximum: 1125899906842624,
17347 unit: "bytes",
17348 },
17349 Limit {
17350 id: "resource_nvme_bytes",
17351 default: 2147483648,
17352 maximum: 1125899906842624,
17353 unit: "bytes",
17354 },
17355 Limit {
17356 id: "resource_refresh_millis",
17357 default: 200,
17358 maximum: 604800000,
17359 unit: "milliseconds",
17360 },
17361 Limit {
17362 id: "resource_memtable_bytes",
17363 default: 268435456,
17364 maximum: 1125899906842624,
17365 unit: "bytes",
17366 },
17367 Limit {
17368 id: "resource_parallelism",
17369 default: 1,
17370 maximum: 4096,
17371 unit: "workers",
17372 },
17373 Limit {
17374 id: "collection_export_bytes",
17375 default: 268435456,
17376 maximum: 268435456,
17377 unit: "bytes",
17378 },
17379 Limit {
17380 id: "collection_export_documents",
17381 default: 10000,
17382 maximum: 10000,
17383 unit: "documents",
17384 },
17385 Limit {
17386 id: "index_transfer_bytes",
17387 default: 268435456,
17388 maximum: 268435456,
17389 unit: "bytes",
17390 },
17391 Limit {
17392 id: "index_transfer_records",
17393 default: 10000,
17394 maximum: 10000,
17395 unit: "records",
17396 },
17397 Limit {
17398 id: "index_transfer_pages",
17399 default: 7,
17400 maximum: 7,
17401 unit: "pages",
17402 },
17403 Limit {
17404 id: "portability_prefix_bytes",
17405 default: 512,
17406 maximum: 512,
17407 unit: "bytes",
17408 },
17409];
17410#[derive(Clone, Copy, Debug, Eq, PartialEq)]
17411pub enum JsonError {
17412 DuplicateObjectField,
17413 InvalidScalar,
17414}
17415pub fn validate_semantic_json(value: &JsonValue) -> Result<(), JsonError> {
17416 match value {
17417 JsonValue::I64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
17418 JsonValue::U64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
17419 JsonValue::ExactDecimal(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
17420 JsonValue::Approximate(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
17421 JsonValue::Array(items) => items.iter().try_for_each(validate_semantic_json),
17422 JsonValue::Object(fields) => {
17423 let mut names = std::collections::BTreeSet::new();
17424 for field in fields {
17425 if !names.insert(field.name.as_str()) {
17426 return Err(JsonError::DuplicateObjectField);
17427 }
17428 validate_semantic_json(&field.value)?;
17429 }
17430 Ok(())
17431 }
17432 JsonValue::Null | JsonValue::Bool(_) | JsonValue::String(_) => Ok(()),
17433 }
17434}
17435#[cfg(test)]
17436mod tests {
17437 use super::*;
17438 fn assert_fixture<T>(value: &serde_json::Value) -> Result<(), Box<dyn std::error::Error>>
17439 where
17440 T: serde::de::DeserializeOwned + Serialize,
17441 {
17442 let decoded: T = serde_json::from_value(value.clone())?;
17443 assert_eq!(serde_json::to_value(decoded)?, *value);
17444 Ok(())
17445 }
17446 #[test]
17447 fn every_named_type_has_a_canonical_round_trip_fixture() -> Result<(), Box<dyn std::error::Error>> {
17448 let document: serde_json::Value =
17449 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
17450 assert_eq!(document["spec_sha256"], LODESTONE_API_SPEC_SHA256);
17451 let fixtures = document["named_types"]
17452 .as_object()
17453 .ok_or("named type fixtures are not an object")?;
17454 assert_eq!(fixtures.len(), LODESTONE_API_TYPE_CONTRACTS.len());
17455 for (name, value) in fixtures {
17456 match name.as_str() {
17457 "cursor" => assert_fixture::<Cursor>(value)?,
17458 "locator" => assert_fixture::<Locator>(value)?,
17459 "resource" => assert_fixture::<Resource>(value)?,
17460 "read_cut_kind" => assert_fixture::<ReadCutKind>(value)?,
17461 "read_cut_index_evidence" => assert_fixture::<ReadCutIndexEvidence>(value)?,
17462 "read_cut_evidence" => assert_fixture::<ReadCutEvidence>(value)?,
17463 "logical_occupancy_counts" => assert_fixture::<LogicalOccupancyCounts>(value)?,
17464 "logical_occupancy_gap_state" => assert_fixture::<LogicalOccupancyGapState>(value)?,
17465 "logical_occupancy_snapshot_evidence" => assert_fixture::<LogicalOccupancySnapshotEvidence>(value)?,
17466 "logical_occupancy_window_gap" => assert_fixture::<LogicalOccupancyWindowGap>(value)?,
17467 "field_promotion_configuration" => assert_fixture::<FieldPromotionConfiguration>(value)?,
17468 "overload_configuration" => assert_fixture::<OverloadConfiguration>(value)?,
17469 "index_policies" => assert_fixture::<IndexPolicies>(value)?,
17470 "maintenance_budgets" => assert_fixture::<MaintenanceBudgets>(value)?,
17471 "resource_durability_class" => assert_fixture::<ResourceDurabilityClass>(value)?,
17472 "resource_storage_class" => assert_fixture::<ResourceStorageClass>(value)?,
17473 "vector_quality_objective" => assert_fixture::<VectorQualityObjective>(value)?,
17474 "vector_indexing_objective" => assert_fixture::<VectorIndexingObjective>(value)?,
17475 "vector_residency_intent" => assert_fixture::<VectorResidencyIntent>(value)?,
17476 "vector_calibration_binding" => assert_fixture::<VectorCalibrationBinding>(value)?,
17477 "vector_resource_policy" => assert_fixture::<VectorResourcePolicy>(value)?,
17478 "workload_class" => assert_fixture::<WorkloadClass>(value)?,
17479 "index_resource_spec" => assert_fixture::<IndexResourceSpec>(value)?,
17480 "index_summary" => assert_fixture::<IndexSummary>(value)?,
17481 "mapping_mode" => assert_fixture::<MappingMode>(value)?,
17482 "dynamic_mapping_policy" => assert_fixture::<DynamicMappingPolicy>(value)?,
17483 "mapping_analyzer" => assert_fixture::<MappingAnalyzer>(value)?,
17484 "keyword_normalizer" => assert_fixture::<KeywordNormalizer>(value)?,
17485 "vector_metric" => assert_fixture::<VectorMetric>(value)?,
17486 "mapping_scalar" => assert_fixture::<MappingScalar>(value)?,
17487 "sparse_vector_weight_type" => assert_fixture::<SparseVectorWeightType>(value)?,
17488 "mapping_field_type" => assert_fixture::<MappingFieldType>(value)?,
17489 "mapping_field" => assert_fixture::<MappingField>(value)?,
17490 "multi_field_projection" => assert_fixture::<MultiFieldProjection>(value)?,
17491 "analyzer_identity" => assert_fixture::<AnalyzerIdentity>(value)?,
17492 "keyword_limit" => assert_fixture::<KeywordLimit>(value)?,
17493 "profile_privacy_action" => assert_fixture::<ProfilePrivacyAction>(value)?,
17494 "profile_privacy_field" => assert_fixture::<ProfilePrivacyField>(value)?,
17495 "profile_privacy_rule" => assert_fixture::<ProfilePrivacyRule>(value)?,
17496 "profile_privacy_policy" => assert_fixture::<ProfilePrivacyPolicy>(value)?,
17497 "mapping_record_model" => assert_fixture::<MappingRecordModel>(value)?,
17498 "mapping" => assert_fixture::<Mapping>(value)?,
17499 "index_detail" => assert_fixture::<IndexDetail>(value)?,
17500 "source_provider" => assert_fixture::<SourceProvider>(value)?,
17501 "source_decoder" => assert_fixture::<SourceDecoder>(value)?,
17502 "source_replay_guarantees" => assert_fixture::<SourceReplayGuarantees>(value)?,
17503 "source_partition_configuration" => assert_fixture::<SourcePartitionConfiguration>(value)?,
17504 "replayable_source_configuration" => assert_fixture::<ReplayableSourceConfiguration>(value)?,
17505 "source_partition_status" => assert_fixture::<SourcePartitionStatus>(value)?,
17506 "replayable_source_status" => assert_fixture::<ReplayableSourceStatus>(value)?,
17507 "source_control_transition" => assert_fixture::<SourceControlTransition>(value)?,
17508 "history_ledger_precondition" => assert_fixture::<HistoryLedgerPrecondition>(value)?,
17509 "history_retention_policy" => assert_fixture::<HistoryRetentionPolicy>(value)?,
17510 "history_selector" => assert_fixture::<HistorySelector>(value)?,
17511 "history_hold" => assert_fixture::<HistoryHold>(value)?,
17512 "history_status" => assert_fixture::<HistoryStatus>(value)?,
17513 "history_resolution" => assert_fixture::<HistoryResolution>(value)?,
17514 "index_reference" => assert_fixture::<IndexReference>(value)?,
17515 "alias_target" => assert_fixture::<AliasTarget>(value)?,
17516 "alias_summary" => assert_fixture::<AliasSummary>(value)?,
17517 "alias_detail" => assert_fixture::<AliasDetail>(value)?,
17518 "data_stream_summary" => assert_fixture::<DataStreamSummary>(value)?,
17519 "component_template_binding" => assert_fixture::<ComponentTemplateBinding>(value)?,
17520 "index_template_binding" => assert_fixture::<IndexTemplateBinding>(value)?,
17521 "lifecycle_policy_binding" => assert_fixture::<LifecyclePolicyBinding>(value)?,
17522 "data_stream_detail" => assert_fixture::<DataStreamDetail>(value)?,
17523 "component_template_summary" => assert_fixture::<ComponentTemplateSummary>(value)?,
17524 "component_template_detail" => assert_fixture::<ComponentTemplateDetail>(value)?,
17525 "index_template_summary" => assert_fixture::<IndexTemplateSummary>(value)?,
17526 "index_template_detail" => assert_fixture::<IndexTemplateDetail>(value)?,
17527 "ingest_pipeline_summary" => assert_fixture::<IngestPipelineSummary>(value)?,
17528 "ingest_pipeline_detail" => assert_fixture::<IngestPipelineDetail>(value)?,
17529 "ingest_pipeline_selection" => assert_fixture::<IngestPipelineSelection>(value)?,
17530 "lifecycle_policy_summary" => assert_fixture::<LifecyclePolicySummary>(value)?,
17531 "rollover_thresholds" => assert_fixture::<RolloverThresholds>(value)?,
17532 "retention_policy" => assert_fixture::<RetentionPolicy>(value)?,
17533 "lifecycle_policy_detail" => assert_fixture::<LifecyclePolicyDetail>(value)?,
17534 "text_query_operator" => assert_fixture::<TextQueryOperator>(value)?,
17535 "text_query_analyzer" => assert_fixture::<TextQueryAnalyzer>(value)?,
17536 "zero_terms_query" => assert_fixture::<ZeroTermsQuery>(value)?,
17537 "text_query_options" => assert_fixture::<TextQueryOptions>(value)?,
17538 "multi_match_mode" => assert_fixture::<MultiMatchMode>(value)?,
17539 "multi_match_field" => assert_fixture::<MultiMatchField>(value)?,
17540 "multi_match_options" => assert_fixture::<MultiMatchOptions>(value)?,
17541 "sort_order" => assert_fixture::<SortOrder>(value)?,
17542 "sort_mode" => assert_fixture::<SortMode>(value)?,
17543 "missing_order" => assert_fixture::<MissingOrder>(value)?,
17544 "nested_score_mode" => assert_fixture::<NestedScoreMode>(value)?,
17545 "nested_inner_hits" => assert_fixture::<NestedInnerHits>(value)?,
17546 "sort_spec" => assert_fixture::<SortSpec>(value)?,
17547 "query" => assert_fixture::<Query>(value)?,
17548 "dense_retrieval_mode" => assert_fixture::<DenseRetrievalMode>(value)?,
17549 "vector_achieved_mode" => assert_fixture::<VectorAchievedMode>(value)?,
17550 "vector_branch_diagnostics" => assert_fixture::<VectorBranchDiagnostics>(value)?,
17551 "dense_vector_element_type" => assert_fixture::<DenseVectorElementType>(value)?,
17552 "dense_vector_byte_order" => assert_fixture::<DenseVectorByteOrder>(value)?,
17553 "vector_value" => assert_fixture::<VectorValue>(value)?,
17554 "sparse_vector_entry" => assert_fixture::<SparseVectorEntry>(value)?,
17555 "sparse_vector_value" => assert_fixture::<SparseVectorValue>(value)?,
17556 "vector_set_value" => assert_fixture::<VectorSetValue>(value)?,
17557 "vector_evaluation_snapshot" => assert_fixture::<VectorEvaluationSnapshot>(value)?,
17558 "vector_evaluation_query_set" => assert_fixture::<VectorEvaluationQuerySet>(value)?,
17559 "vector_evaluation_budget" => assert_fixture::<VectorEvaluationBudget>(value)?,
17560 "vector_candidate_policy" => assert_fixture::<VectorCandidatePolicy>(value)?,
17561 "vector_calibration_objective" => assert_fixture::<VectorCalibrationObjective>(value)?,
17562 "vector_strategy_profile" => assert_fixture::<VectorStrategyProfile>(value)?,
17563 "vector_evaluation_work" => assert_fixture::<VectorEvaluationWork>(value)?,
17564 "vector_evaluation_error_code" => assert_fixture::<VectorEvaluationErrorCode>(value)?,
17565 "vector_evaluation_error" => assert_fixture::<VectorEvaluationError>(value)?,
17566 "vector_recall_result" => assert_fixture::<VectorRecallResult>(value)?,
17567 "vector_calibration_candidate" => assert_fixture::<VectorCalibrationCandidate>(value)?,
17568 "vector_calibration_result" => assert_fixture::<VectorCalibrationResult>(value)?,
17569 "vector_diagnostic_result" => assert_fixture::<VectorDiagnosticResult>(value)?,
17570 "vector_warm_component" => assert_fixture::<VectorWarmComponent>(value)?,
17571 "vector_warm_state" => assert_fixture::<VectorWarmState>(value)?,
17572 "vector_warm_achievement" => assert_fixture::<VectorWarmAchievement>(value)?,
17573 "vector_warm_result" => assert_fixture::<VectorWarmResult>(value)?,
17574 "dense_retrieval_threshold" => assert_fixture::<DenseRetrievalThreshold>(value)?,
17575 "retrieval_branch" => assert_fixture::<RetrievalBranch>(value)?,
17576 "weighted_rrf_fusion" => assert_fixture::<WeightedRrfFusion>(value)?,
17577 "retrieval_plan" => assert_fixture::<RetrievalPlan>(value)?,
17578 "histogram_bounds" => assert_fixture::<HistogramBounds>(value)?,
17579 "date_histogram_bounds" => assert_fixture::<DateHistogramBounds>(value)?,
17580 "approximation_algorithm" => assert_fixture::<ApproximationAlgorithm>(value)?,
17581 "approximation" => assert_fixture::<Approximation>(value)?,
17582 "percentile_value" => assert_fixture::<PercentileValue>(value)?,
17583 "approximate_percentile_value" => assert_fixture::<ApproximatePercentileValue>(value)?,
17584 "time_series_operator" => assert_fixture::<TimeSeriesOperator>(value)?,
17585 "time_series_missing_data" => assert_fixture::<TimeSeriesMissingData>(value)?,
17586 "time_series_quantile_mode" => assert_fixture::<TimeSeriesQuantileMode>(value)?,
17587 "time_series_bucket_state" => assert_fixture::<TimeSeriesBucketState>(value)?,
17588 "time_series_quantile_value" => assert_fixture::<TimeSeriesQuantileValue>(value)?,
17589 "time_series_value" => assert_fixture::<TimeSeriesValue>(value)?,
17590 "time_series_bucket" => assert_fixture::<TimeSeriesBucket>(value)?,
17591 "relationship_traversal_direction" => assert_fixture::<RelationshipTraversalDirection>(value)?,
17592 "relationship_traversal_filter" => assert_fixture::<RelationshipTraversalFilter>(value)?,
17593 "relationship_traversal_budget" => assert_fixture::<RelationshipTraversalBudget>(value)?,
17594 "traversed_relationship" => assert_fixture::<TraversedRelationship>(value)?,
17595 "profile_query_operation" => assert_fixture::<ProfileQueryOperation>(value)?,
17596 "profile_group_by" => assert_fixture::<ProfileGroupBy>(value)?,
17597 "profile_query_filter" => assert_fixture::<ProfileQueryFilter>(value)?,
17598 "profile_query_budget" => assert_fixture::<ProfileQueryBudget>(value)?,
17599 "profile_query_row" => assert_fixture::<ProfileQueryRow>(value)?,
17600 "temporal_input" => assert_fixture::<TemporalInput>(value)?,
17601 "temporal_pattern" => assert_fixture::<TemporalPattern>(value)?,
17602 "historical_temporal_definition" => assert_fixture::<HistoricalTemporalDefinition>(value)?,
17603 "temporal_evidence_status" => assert_fixture::<TemporalEvidenceStatus>(value)?,
17604 "temporal_source_event" => assert_fixture::<TemporalSourceEvent>(value)?,
17605 "temporal_evidence" => assert_fixture::<TemporalEvidence>(value)?,
17606 "continuous_temporal_start" => assert_fixture::<ContinuousTemporalStart>(value)?,
17607 "continuous_temporal_watermark_policy" => assert_fixture::<ContinuousTemporalWatermarkPolicy>(value)?,
17608 "continuous_temporal_late_data_policy" => assert_fixture::<ContinuousTemporalLateDataPolicy>(value)?,
17609 "continuous_temporal_output" => assert_fixture::<ContinuousTemporalOutput>(value)?,
17610 "continuous_temporal_definition" => assert_fixture::<ContinuousTemporalDefinition>(value)?,
17611 "continuous_temporal_frontier" => assert_fixture::<ContinuousTemporalFrontier>(value)?,
17612 "continuous_temporal_available_frontier" => {
17613 assert_fixture::<ContinuousTemporalAvailableFrontier>(value)?
17614 }
17615 "continuous_temporal_gap_reason" => assert_fixture::<ContinuousTemporalGapReason>(value)?,
17616 "continuous_temporal_gap" => assert_fixture::<ContinuousTemporalGap>(value)?,
17617 "continuous_temporal_evaluation" => assert_fixture::<ContinuousTemporalEvaluation>(value)?,
17618 "composite_order" => assert_fixture::<CompositeOrder>(value)?,
17619 "composite_source" => assert_fixture::<CompositeSource>(value)?,
17620 "aggregation" => assert_fixture::<Aggregation>(value)?,
17621 "nested_search_hit" => assert_fixture::<NestedSearchHit>(value)?,
17622 "named_nested_inner_hits_result" => assert_fixture::<NamedNestedInnerHitsResult>(value)?,
17623 "fragment_boundary" => assert_fixture::<FragmentBoundary>(value)?,
17624 "fragment_offset_encoding" => assert_fixture::<FragmentOffsetEncoding>(value)?,
17625 "fragment_ranker" => assert_fixture::<FragmentRanker>(value)?,
17626 "fragment_request" => assert_fixture::<FragmentRequest>(value)?,
17627 "search_fragment" => assert_fixture::<SearchFragment>(value)?,
17628 "numeric_feature_transform" => assert_fixture::<NumericFeatureTransform>(value)?,
17629 "numeric_result_feature" => assert_fixture::<NumericResultFeature>(value)?,
17630 "result_feature_request" => assert_fixture::<ResultFeatureRequest>(value)?,
17631 "result_diversification" => assert_fixture::<ResultDiversification>(value)?,
17632 "source_projection" => assert_fixture::<SourceProjection>(value)?,
17633 "branch_score_kind" => assert_fixture::<BranchScoreKind>(value)?,
17634 "result_feature" => assert_fixture::<ResultFeature>(value)?,
17635 "search_hit" => assert_fixture::<SearchHit>(value)?,
17636 "aggregation_bucket" => assert_fixture::<AggregationBucket>(value)?,
17637 "aggregation_result" => assert_fixture::<AggregationResult>(value)?,
17638 "shard_counts" => assert_fixture::<ShardCounts>(value)?,
17639 "total_hits_relation" => assert_fixture::<TotalHitsRelation>(value)?,
17640 "search_total" => assert_fixture::<SearchTotal>(value)?,
17641 "search_execution_freshness" => assert_fixture::<SearchExecutionFreshness>(value)?,
17642 "search_freshness" => assert_fixture::<SearchFreshness>(value)?,
17643 "search_degradation_reason" => assert_fixture::<SearchDegradationReason>(value)?,
17644 "search_achievement" => assert_fixture::<SearchAchievement>(value)?,
17645 "search_failure_stage" => assert_fixture::<SearchFailureStage>(value)?,
17646 "search_failure_reason" => assert_fixture::<SearchFailureReason>(value)?,
17647 "collection_shard" => assert_fixture::<CollectionShard>(value)?,
17648 "search_partial_failure" => assert_fixture::<SearchPartialFailure>(value)?,
17649 "artifact" => assert_fixture::<Artifact>(value)?,
17650 "portability_storage_capability" => assert_fixture::<PortabilityStorageCapability>(value)?,
17651 "collection_export_artifact" => assert_fixture::<CollectionExportArtifact>(value)?,
17652 "portability_key_capability_reference_state" => {
17653 assert_fixture::<PortabilityKeyCapabilityReferenceState>(value)?
17654 }
17655 "collection_export_retirement" => assert_fixture::<CollectionExportRetirement>(value)?,
17656 "index_transfer_page" => assert_fixture::<IndexTransferPage>(value)?,
17657 "index_transfer_artifact" => assert_fixture::<IndexTransferArtifact>(value)?,
17658 "search_validation_bound" => assert_fixture::<SearchValidationBound>(value)?,
17659 "search_validation_estimates" => assert_fixture::<SearchValidationEstimates>(value)?,
17660 "search_validation_limit" => assert_fixture::<SearchValidationLimit>(value)?,
17661 "operation_kind" => assert_fixture::<OperationKind>(value)?,
17662 "operation_authority" => assert_fixture::<OperationAuthority>(value)?,
17663 "operation_target" => assert_fixture::<OperationTarget>(value)?,
17664 "operation_state" => assert_fixture::<OperationState>(value)?,
17665 "operation_pending_state" => assert_fixture::<OperationPendingState>(value)?,
17666 "operation_progress_unit" => assert_fixture::<OperationProgressUnit>(value)?,
17667 "operation_progress" => assert_fixture::<OperationProgress>(value)?,
17668 "operation_result" => assert_fixture::<OperationResult>(value)?,
17669 "operation_failure" => assert_fixture::<OperationFailure>(value)?,
17670 "operation_cancellation" => assert_fixture::<OperationCancellation>(value)?,
17671 "operation_retention_state" => assert_fixture::<OperationRetentionState>(value)?,
17672 "operation_retention" => assert_fixture::<OperationRetention>(value)?,
17673 "operation" => assert_fixture::<Operation>(value)?,
17674 "write_durability_boundary" => assert_fixture::<WriteDurabilityBoundary>(value)?,
17675 "write_visibility_mode" => assert_fixture::<WriteVisibilityMode>(value)?,
17676 "write_response_stage" => assert_fixture::<WriteResponseStage>(value)?,
17677 "write_achievement" => assert_fixture::<WriteAchievement>(value)?,
17678 "mutation_commit_position" => assert_fixture::<MutationCommitPosition>(value)?,
17679 "mutation_commit_receipt" => assert_fixture::<MutationCommitReceipt>(value)?,
17680 "mutation_resolver" => assert_fixture::<MutationResolver>(value)?,
17681 "mutation_outcome" => assert_fixture::<MutationOutcome>(value)?,
17682 "submission_state" => assert_fixture::<SubmissionState>(value)?,
17683 "expected_binding" => assert_fixture::<ExpectedBinding>(value)?,
17684 "administration_alias_action" => assert_fixture::<AdministrationAliasAction>(value)?,
17685 "administration_mutation" => assert_fixture::<AdministrationMutation>(value)?,
17686 "administration_outcome" => assert_fixture::<AdministrationOutcome>(value)?,
17687 "index_change_apply_receipt" => assert_fixture::<IndexChangeApplyReceipt>(value)?,
17688 "bulk_document_item" => assert_fixture::<BulkDocumentItem>(value)?,
17689 "bulk_document_item_outcome" => assert_fixture::<BulkDocumentItemOutcome>(value)?,
17690 "bulk_document_outcome" => assert_fixture::<BulkDocumentOutcome>(value)?,
17691 "metric_attribute_value" => assert_fixture::<MetricAttributeValue>(value)?,
17692 "metric_attribute" => assert_fixture::<MetricAttribute>(value)?,
17693 "metric_number" => assert_fixture::<MetricNumber>(value)?,
17694 "metric_temporality" => assert_fixture::<MetricTemporality>(value)?,
17695 "metric_point_kind" => assert_fixture::<MetricPointKind>(value)?,
17696 "metric_exponential_buckets" => assert_fixture::<MetricExponentialBuckets>(value)?,
17697 "metric_data" => assert_fixture::<MetricData>(value)?,
17698 "metric_instrumentation_scope" => assert_fixture::<MetricInstrumentationScope>(value)?,
17699 "metric_exemplar" => assert_fixture::<MetricExemplar>(value)?,
17700 "metric_point" => assert_fixture::<MetricPoint>(value)?,
17701 "entity_ref" => assert_fixture::<EntityRef>(value)?,
17702 "relationship_evidence_ref" => assert_fixture::<RelationshipEvidenceRef>(value)?,
17703 "relationship_directionality" => assert_fixture::<RelationshipDirectionality>(value)?,
17704 "relationship_record" => assert_fixture::<RelationshipRecord>(value)?,
17705 "profile_label" => assert_fixture::<ProfileLabel>(value)?,
17706 "profile_sample_type" => assert_fixture::<ProfileSampleType>(value)?,
17707 "profile_mapping" => assert_fixture::<ProfileMapping>(value)?,
17708 "profile_function" => assert_fixture::<ProfileFunction>(value)?,
17709 "profile_line" => assert_fixture::<ProfileLine>(value)?,
17710 "profile_location" => assert_fixture::<ProfileLocation>(value)?,
17711 "profile_stack" => assert_fixture::<ProfileStack>(value)?,
17712 "profile_sample" => assert_fixture::<ProfileSample>(value)?,
17713 "profile_instrumentation_scope" => assert_fixture::<ProfileInstrumentationScope>(value)?,
17714 "profile_batch" => assert_fixture::<ProfileBatch>(value)?,
17715 "native_record" => assert_fixture::<NativeRecord>(value)?,
17716 "retained_append_item" => assert_fixture::<RetainedAppendItem>(value)?,
17717 "retained_append_state" => assert_fixture::<RetainedAppendState>(value)?,
17718 "retained_append_retry_safety" => assert_fixture::<RetainedAppendRetrySafety>(value)?,
17719 "retained_append_item_outcome" => assert_fixture::<RetainedAppendItemOutcome>(value)?,
17720 "retained_append_bulk_outcome" => assert_fixture::<RetainedAppendBulkOutcome>(value)?,
17721 "retained_append_observation_state" => assert_fixture::<RetainedAppendObservationState>(value)?,
17722 "retained_append_observation_outcome" => assert_fixture::<RetainedAppendObservationOutcome>(value)?,
17723 "binary_value" => assert_fixture::<BinaryValue>(value)?,
17724 "state_hash_field" => assert_fixture::<StateHashField>(value)?,
17725 "state_set_entry" => assert_fixture::<StateSetEntry>(value)?,
17726 "state_set_condition" => assert_fixture::<StateSetCondition>(value)?,
17727 "state_operation" => assert_fixture::<StateOperation>(value)?,
17728 "state_optional_value" => assert_fixture::<StateOptionalValue>(value)?,
17729 "state_command_result" => assert_fixture::<StateCommandResult>(value)?,
17730 "state_write_resolution" => assert_fixture::<StateWriteResolution>(value)?,
17731 "service_credential_reservation" => assert_fixture::<ServiceCredentialReservation>(value)?,
17732 "subscription_metadata_field" => assert_fixture::<SubscriptionMetadataField>(value)?,
17733 "subscription_field" => assert_fixture::<SubscriptionField>(value)?,
17734 "subscription_filter" => assert_fixture::<SubscriptionFilter>(value)?,
17735 "subscription_cursor_entry" => assert_fixture::<SubscriptionCursorEntry>(value)?,
17736 "subscription_route" => assert_fixture::<SubscriptionRoute>(value)?,
17737 "subscription_start_position" => assert_fixture::<SubscriptionStartPosition>(value)?,
17738 "subscription_start" => assert_fixture::<SubscriptionStart>(value)?,
17739 "subscription_accepted" => assert_fixture::<SubscriptionAccepted>(value)?,
17740 "subscription_writer_fence" => assert_fixture::<SubscriptionWriterFence>(value)?,
17741 "subscription_event" => assert_fixture::<SubscriptionEvent>(value)?,
17742 "subscription_heartbeat" => assert_fixture::<SubscriptionHeartbeat>(value)?,
17743 "subscription_gap" => assert_fixture::<SubscriptionGap>(value)?,
17744 "subscription_terminal_reason" => assert_fixture::<SubscriptionTerminalReason>(value)?,
17745 "subscription_terminal" => assert_fixture::<SubscriptionTerminal>(value)?,
17746 "subscription_frame" => assert_fixture::<SubscriptionFrame>(value)?,
17747 "stream_binding" => assert_fixture::<StreamBinding>(value)?,
17748 "capability_grant" => assert_fixture::<CapabilityGrant>(value)?,
17749 "protocol_limit" => assert_fixture::<ProtocolLimit>(value)?,
17750 "document_mutation_condition" => assert_fixture::<DocumentMutationCondition>(value)?,
17751 "audit_adapter" => assert_fixture::<AuditAdapter>(value)?,
17752 "audit_decision" => assert_fixture::<AuditDecision>(value)?,
17753 "audit_outcome" => assert_fixture::<AuditOutcome>(value)?,
17754 "audit_detail" => assert_fixture::<AuditDetail>(value)?,
17755 "audit_gap_reason" => assert_fixture::<AuditGapReason>(value)?,
17756 "audit_event" => assert_fixture::<AuditEvent>(value)?,
17757 "audit_gap" => assert_fixture::<AuditGap>(value)?,
17758 "audit_stream_state" => assert_fixture::<AuditStreamState>(value)?,
17759 "service_credential_grant" => assert_fixture::<ServiceCredentialGrant>(value)?,
17760 "service_credential_summary" => assert_fixture::<ServiceCredentialSummary>(value)?,
17761 "security_role" => assert_fixture::<SecurityRole>(value)?,
17762 "role_append_scope_change" => assert_fixture::<RoleAppendScopeChange>(value)?,
17763 "role_append_access_preparation" => assert_fixture::<RoleAppendAccessPreparation>(value)?,
17764 "security_action_outcome" => assert_fixture::<SecurityActionOutcome>(value)?,
17765 "maintenance_work_state" => assert_fixture::<MaintenanceWorkState>(value)?,
17766 "maintenance_attempt_state" => assert_fixture::<MaintenanceAttemptState>(value)?,
17767 "maintenance_failure_class" => assert_fixture::<MaintenanceFailureClass>(value)?,
17768 "maintenance_failure_class_count" => assert_fixture::<MaintenanceFailureClassCount>(value)?,
17769 "maintenance_attempt_observation" => assert_fixture::<MaintenanceAttemptObservation>(value)?,
17770 "maintenance_task_scope" => assert_fixture::<MaintenanceTaskScope>(value)?,
17771 "maintenance_task_status" => assert_fixture::<MaintenanceTaskStatus>(value)?,
17772 "maintenance_status_aggregate" => assert_fixture::<MaintenanceStatusAggregate>(value)?,
17773 "runtime_status_detail" => assert_fixture::<RuntimeStatusDetail>(value)?,
17774 "result_cache_status" => assert_fixture::<ResultCacheStatus>(value)?,
17775 "field_promotion_status" => assert_fixture::<FieldPromotionStatus>(value)?,
17776 "overload_shard_status" => assert_fixture::<OverloadShardStatus>(value)?,
17777 "external_key_binding" => assert_fixture::<ExternalKeyBinding>(value)?,
17778 "rollup_measure" => assert_fixture::<RollupMeasure>(value)?,
17779 "aggregate_then_delete_policy" => assert_fixture::<AggregateThenDeletePolicy>(value)?,
17780 "lifecycle_binding_status" => assert_fixture::<LifecycleBindingStatus>(value)?,
17781 "lifecycle_rollup_status" => assert_fixture::<LifecycleRollupStatus>(value)?,
17782 "lifecycle_status" => assert_fixture::<LifecycleStatus>(value)?,
17783 "quota_limit" => assert_fixture::<QuotaLimit>(value)?,
17784 "quota_consumption" => assert_fixture::<QuotaConsumption>(value)?,
17785 "quota_update" => assert_fixture::<QuotaUpdate>(value)?,
17786 "storage_overall_posture" => assert_fixture::<StorageOverallPosture>(value)?,
17787 "storage_profile_role" => assert_fixture::<StorageProfileRole>(value)?,
17788 "storage_provider_posture" => assert_fixture::<StorageProviderPosture>(value)?,
17789 "storage_backend_service_class" => assert_fixture::<StorageBackendServiceClass>(value)?,
17790 "storage_profile_role_binding" => assert_fixture::<StorageProfileRoleBinding>(value)?,
17791 "storage_profile_attestation" => assert_fixture::<StorageProfileAttestation>(value)?,
17792 "storage_profile_expectation" => assert_fixture::<StorageProfileExpectation>(value)?,
17793 "core_binding" => assert_fixture::<CoreBinding>(value)?,
17794 "readiness_observation" => assert_fixture::<ReadinessObservation>(value)?,
17795 "usage_dimension" => assert_fixture::<UsageDimension>(value)?,
17796 "physical_usage_value" => assert_fixture::<PhysicalUsageValue>(value)?,
17797 "core_usage_units" => assert_fixture::<CoreUsageUnits>(value)?,
17798 "core_usage_correction" => assert_fixture::<CoreUsageCorrection>(value)?,
17799 "response_meta" => assert_fixture::<ResponseMeta>(value)?,
17800 "error_disposition" => assert_fixture::<ErrorDisposition>(value)?,
17801 "recovery_action" => assert_fixture::<RecoveryAction>(value)?,
17802 "limit_class" => assert_fixture::<LimitClass>(value)?,
17803 "error_detail" => assert_fixture::<ErrorDetail>(value)?,
17804 "connection_profile" => assert_fixture::<ConnectionProfile>(value)?,
17805 _ => return Err("fixture names an unknown generated type".into()),
17806 }
17807 }
17808 Ok(())
17809 }
17810 #[test]
17811 fn every_aggregation_variant_has_a_canonical_fixture() -> Result<(), Box<dyn std::error::Error>> {
17812 let document: serde_json::Value =
17813 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
17814 let fixtures = document["aggregation_variants"]
17815 .as_object()
17816 .ok_or("aggregation fixtures are not an object")?;
17817 assert_eq!(fixtures.len(), 17);
17818 for value in fixtures.values() {
17819 assert_fixture::<Aggregation>(value)?;
17820 }
17821 Ok(())
17822 }
17823 #[test]
17824 fn every_versioned_union_variant_has_a_canonical_fixture() -> Result<(), Box<dyn std::error::Error>> {
17825 let document: serde_json::Value =
17826 serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
17827 let fixtures = document["versioned_union_variants"]
17828 .as_object()
17829 .ok_or("versioned union fixtures are not an object")?;
17830 assert_eq!(fixtures.len(), 6);
17831 for (name, value) in fixtures {
17832 match name.as_str() {
17833 "mapping_field_type.vector" => assert_fixture::<MappingFieldType>(value)?,
17834 "mapping_field_type.sparse_vector" => assert_fixture::<MappingFieldType>(value)?,
17835 "mapping_field_type.vector_set" => assert_fixture::<MappingFieldType>(value)?,
17836 "mapping_record_model.metric_v1" => assert_fixture::<MappingRecordModel>(value)?,
17837 "mapping_record_model.relationship_v1" => assert_fixture::<MappingRecordModel>(value)?,
17838 "mapping_record_model.profile_v1" => assert_fixture::<MappingRecordModel>(value)?,
17839 _ => return Err("fixture names an unknown versioned union variant".into()),
17840 }
17841 }
17842 Ok(())
17843 }
17844 #[test]
17845 fn exact_scalar_canonicality_is_closed() {
17846 assert_eq!(
17847 U64 {
17848 value: u64::MAX.to_string()
17849 }
17850 .validate(),
17851 Ok(())
17852 );
17853 assert_eq!(
17854 I64 {
17855 value: i64::MIN.to_string()
17856 }
17857 .validate(),
17858 Ok(())
17859 );
17860 assert_eq!(U64 { value: "01".to_owned() }.validate(), Err(ScalarError::InvalidU64));
17861 assert_eq!(
17862 ExactDecimal {
17863 coefficient: "12345".to_owned(),
17864 scale: 2
17865 }
17866 .validate(),
17867 Ok(())
17868 );
17869 assert_eq!(
17870 ExactDecimal {
17871 coefficient: "123450".to_owned(),
17872 scale: 3
17873 }
17874 .validate(),
17875 Err(ScalarError::InvalidDecimal)
17876 );
17877 assert_eq!(
17878 ExactDecimal {
17879 coefficient: "1".to_owned(),
17880 scale: 1_025
17881 }
17882 .validate(),
17883 Err(ScalarError::InvalidDecimal)
17884 );
17885 }
17886 #[test]
17887 fn scalar_decoders_refuse_numbers_and_noncanonical_strings() {
17888 assert!(serde_json::from_str::<U64>("9007199254740993").is_err());
17889 assert!(serde_json::from_str::<U64>(r#""01""#).is_err());
17890 assert!(serde_json::from_str::<Identity>(r#""0123456789ABCDEF0123456789ABCDEF""#).is_err());
17891 assert!(serde_json::from_str::<Digest>(r#""0123456789abcdef0123456789abcdef""#).is_err());
17892 assert!(serde_json::from_str::<ExactDecimal>(r#"{"coefficient":"123450","scale":3}"#).is_err());
17893 assert!(serde_json::from_str::<ApproximateNumber>(r#""1.0""#).is_err());
17894 }
17895 #[test]
17896 fn semantic_json_rejects_duplicate_fields() {
17897 let value = JsonValue::Object(vec![
17898 JsonField {
17899 name: "x".to_owned(),
17900 value: JsonValue::Null,
17901 },
17902 JsonField {
17903 name: "x".to_owned(),
17904 value: JsonValue::Bool(true),
17905 },
17906 ]);
17907 assert_eq!(validate_semantic_json(&value), Err(JsonError::DuplicateObjectField));
17908 }
17909 #[test]
17910 fn strict_generated_shapes_refuse_malformed_duplicate_unknown_field_and_tag() {
17911 assert!(serde_json::from_str::<DiscoverRequest>(r#"{"unexpected":true}"#).is_err());
17912 assert!(serde_json::from_str::<Cursor>(r#"{"value":"a","value":"b"}"#).is_err());
17913 assert!(serde_json::from_str::<Query>(r#"{"kind":"future_query"}"#).is_err());
17914 assert!(serde_json::from_str::<Cursor>(r#"{"value":1}"#).is_err());
17915 }
17916 fn admitted_error_detail(code: ErrorCode) -> ErrorDetail {
17917 match code {
17918 ErrorCode::Aborted => ErrorDetail::Aborted {
17919 reason: "test".to_owned(),
17920 },
17921 ErrorCode::DeadlineExceeded => ErrorDetail::DeadlineExceeded,
17922 ErrorCode::InvalidRequest => ErrorDetail::InvalidRequest {
17923 field: None,
17924 reason: "test".to_owned(),
17925 },
17926 ErrorCode::UnsupportedVersion => ErrorDetail::UnsupportedVersion {
17927 observed: 1,
17928 maximum_supported: 1,
17929 },
17930 ErrorCode::Unauthenticated => ErrorDetail::Unauthenticated,
17931 ErrorCode::PermissionDenied => ErrorDetail::PermissionDenied {
17932 action: None,
17933 workload_class: None,
17934 },
17935 ErrorCode::NotFound => ErrorDetail::NotFound { resource: None },
17936 ErrorCode::Conflict => ErrorDetail::Conflict {
17937 expected_revision: None,
17938 observed_revision: None,
17939 },
17940 ErrorCode::StaleCursor => ErrorDetail::StaleCursor { restart_count: 0 },
17941 ErrorCode::RestartBudgetExhausted => ErrorDetail::RestartBudgetExhausted { maximum_restarts: 0 },
17942 ErrorCode::LimitExceeded => ErrorDetail::LimitExceeded {
17943 class: LimitClass::RequestBound,
17944 limit_id: "test".to_owned(),
17945 maximum: U64 { value: "0".to_owned() },
17946 },
17947 ErrorCode::CapabilityUnavailable => ErrorDetail::CapabilityUnavailable { capability: None },
17948 ErrorCode::NotSubmitted => ErrorDetail::NotSubmitted {
17949 retry_after_millis: None,
17950 },
17951 ErrorCode::SubmittedIndeterminate => ErrorDetail::SubmittedIndeterminate { locator: None },
17952 ErrorCode::ExpiredUnknown => ErrorDetail::ExpiredUnknown { locator: None },
17953 ErrorCode::SecretNotEscrowed => ErrorDetail::SecretNotEscrowed,
17954 ErrorCode::RetentionGap => ErrorDetail::RetentionGap {
17955 retired_through: U64 { value: "0".to_owned() },
17956 },
17957 ErrorCode::ArtifactRangeInvalid => ErrorDetail::ArtifactRangeInvalid {
17958 maximum_bytes: U64 { value: "0".to_owned() },
17959 },
17960 ErrorCode::ChecksumMismatch => ErrorDetail::ChecksumMismatch {
17961 expected: Digest { value: "0".repeat(64) },
17962 observed: Digest { value: "0".repeat(64) },
17963 },
17964 ErrorCode::TemporarilyUnavailable => ErrorDetail::TemporarilyUnavailable {
17965 retry_after_millis: None,
17966 },
17967 ErrorCode::Internal => ErrorDetail::Internal,
17968 }
17969 }
17970 #[test]
17971 fn every_admitted_error_outcome_is_constructible_and_invalid_combinations_fail_closed() {
17972 let mut codes = std::collections::BTreeSet::new();
17973 for contract in LODESTONE_API_ERROR_OUTCOMES {
17974 codes.insert(format!("{:?}", contract.code));
17975 assert_eq!(
17976 ErrorBody::try_new(
17977 contract.code,
17978 "test".to_owned(),
17979 contract.disposition,
17980 contract.recovery,
17981 admitted_error_detail(contract.code)
17982 ),
17983 Ok(ErrorBody {
17984 code: contract.code,
17985 message: "test".to_owned(),
17986 disposition: contract.disposition,
17987 recovery: contract.recovery,
17988 details: admitted_error_detail(contract.code)
17989 })
17990 );
17991 }
17992 assert_eq!(codes.len(), 21);
17993 assert_eq!(
17994 ErrorBody::try_new(
17995 ErrorCode::Aborted,
17996 "test".to_owned(),
17997 ErrorDisposition::NotSubmitted,
17998 RecoveryAction::Stop,
17999 admitted_error_detail(ErrorCode::Aborted)
18000 ),
18001 Err(ErrorShapeError::OutcomeMismatch)
18002 );
18003 assert_eq!(
18004 ErrorBody::try_new(
18005 ErrorCode::Aborted,
18006 "test".to_owned(),
18007 ErrorDisposition::NotSubmitted,
18008 RecoveryAction::Retry,
18009 ErrorDetail::Internal
18010 ),
18011 Err(ErrorShapeError::DetailCodeMismatch)
18012 );
18013 assert_eq!(
18014 ErrorBody::try_new(
18015 ErrorCode::TemporarilyUnavailable,
18016 "test".to_owned(),
18017 ErrorDisposition::NotSubmitted,
18018 RecoveryAction::RetryAfter,
18019 ErrorDetail::TemporarilyUnavailable {
18020 retry_after_millis: Some(U64 {
18021 value: "60001".to_owned()
18022 })
18023 }
18024 ),
18025 Err(ErrorShapeError::RetryAfterOutOfRange)
18026 );
18027 }
18028 #[test]
18029 fn registries_match_the_idl() {
18030 assert_eq!(LODESTONE_API_COMMAND_CONTRACTS.len(), 124);
18031 assert_eq!(LODESTONE_API_COMMAND_SEMANTICS.len(), 124);
18032 assert_eq!(LODESTONE_API_COMMAND_OUTCOMES.len(), 124);
18033 assert_eq!(LODESTONE_API_ERROR_CODES.len(), 21);
18034 assert_eq!(LODESTONE_API_ERROR_OUTCOMES.len(), 28);
18035 assert_eq!(LODESTONE_API_TYPE_CONTRACTS.len(), 344);
18036 assert_eq!(LODESTONE_API_STREAM_CONTRACTS.len(), 1);
18037 assert_eq!(LODESTONE_API_LIMITS.len(), 118);
18038 assert_eq!(LODESTONE_API_CLUSTER_CONTROL_ACTIONS.len(), 23);
18039 assert_eq!(LODESTONE_API_CLUSTER_CONTROL_TYPES.len(), 10);
18040 }
18041 #[test]
18042 fn mutation_outcome_metadata_matches_submission_boundaries() {
18043 for (command, outcome) in LODESTONE_API_COMMAND_CONTRACTS
18044 .iter()
18045 .zip(LODESTONE_API_COMMAND_OUTCOMES)
18046 {
18047 assert_eq!(command.command, outcome.command);
18048 let submits = !matches!(command.mutation, "read_only" | "read_only_prepare" | "catalog_prepare");
18049 assert_eq!(outcome.possible_submission_states.contains(&"submitted"), submits);
18050 assert_eq!(outcome.possible_submission_states.contains(&"indeterminate"), submits);
18051 assert_eq!(
18052 outcome.cancellation == "per_call_until_submission_then_resolve",
18053 submits
18054 );
18055 }
18056 for command in [
18057 Command::ReserveServiceCredential,
18058 Command::ReserveServiceCredentialRotation,
18059 ] {
18060 let outcome = LODESTONE_API_COMMAND_OUTCOMES
18061 .iter()
18062 .find(|outcome| outcome.command == command);
18063 assert!(
18064 matches!(outcome, Some(value) if value.identity_requirement == "caller_action_id" && value.resolver_command == Some(Command::ResolveServiceCredentialReservation))
18065 );
18066 }
18067 }
18068}