1use serde::{Deserialize, Serialize};
5mod bulk_batch_id;
6pub use bulk_batch_id::{BulkBatchIdError, bulk_batch_id};
7
8pub const LODESTONE_API_SCHEMA_ID: &str = "lodestone-api";
9pub const LODESTONE_API_SPEC_SHA256: &str = "d4570e5f66dd0b6571091c95156196e0c02944e9dd3e205797402c82a3e4516b";
10pub const LODESTONE_API_FORMAT_VERSION: u16 = 2;
11pub const LODESTONE_API_ALPN: &str = "lodestone";
12pub const BULK_BATCH_ID_FORMAT_VERSION: u16 = 2;
13pub const BULK_BATCH_ID_DOMAIN: &[u8] = b"lodestone/bulk-batch\0";
14
15#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
16#[serde(transparent)]
17pub struct I64 {
18 pub value: String,
19}
20#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
21#[serde(transparent)]
22pub struct U64 {
23 pub value: String,
24}
25#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
26#[serde(transparent)]
27pub struct Identity {
28 pub value: String,
29}
30#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
31#[serde(transparent)]
32pub struct Digest {
33 pub value: String,
34}
35#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
36pub struct ExactDecimal {
37 pub coefficient: String,
38 pub scale: u32,
39}
40#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
41#[serde(transparent)]
42pub struct ApproximateNumber {
43 pub canonical_value: String,
44}
45#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
46#[serde(deny_unknown_fields)]
47pub struct RawJson {
48 pub bytes_base64: String,
49}
50#[derive(Clone, Copy, Debug, Eq, PartialEq)]
51pub enum ScalarError {
52 InvalidI64,
53 InvalidU64,
54 InvalidIdentity,
55 InvalidDigest,
56 InvalidDecimal,
57 InvalidApproximateNumber,
58}
59impl std::fmt::Display for ScalarError {
60 fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
61 write!(formatter, "invalid Lodestone API scalar: {self:?}")
62 }
63}
64impl I64 {
65 pub fn validate(&self) -> Result<(), ScalarError> {
66 self.value
67 .parse::<i64>()
68 .ok()
69 .filter(|parsed| parsed.to_string() == self.value)
70 .map(|_| ())
71 .ok_or(ScalarError::InvalidI64)
72 }
73}
74impl U64 {
75 pub fn validate(&self) -> Result<(), ScalarError> {
76 self.value
77 .parse::<u64>()
78 .ok()
79 .filter(|parsed| parsed.to_string() == self.value)
80 .map(|_| ())
81 .ok_or(ScalarError::InvalidU64)
82 }
83}
84impl Identity {
85 pub fn validate(&self) -> Result<(), ScalarError> {
86 (self.value.len() == 32
87 && self
88 .value
89 .bytes()
90 .all(|byte| byte.is_ascii_digit() || (b'a'..=b'f').contains(&byte)))
91 .then_some(())
92 .ok_or(ScalarError::InvalidIdentity)
93 }
94}
95impl Digest {
96 pub fn validate(&self) -> Result<(), ScalarError> {
97 (self.value.len() == 64
98 && self
99 .value
100 .bytes()
101 .all(|byte| byte.is_ascii_digit() || (b'a'..=b'f').contains(&byte)))
102 .then_some(())
103 .ok_or(ScalarError::InvalidDigest)
104 }
105}
106impl ExactDecimal {
107 pub fn validate(&self) -> Result<(), ScalarError> {
108 let unsigned = self.coefficient.strip_prefix('-').unwrap_or(&self.coefficient);
109 let canonical = self.coefficient == "0"
110 || (!unsigned.is_empty()
111 && !unsigned.starts_with('0')
112 && unsigned.bytes().all(|byte| byte.is_ascii_digit()));
113 (canonical
114 && self.coefficient != "-0"
115 && self.scale <= 1024
116 && (self.scale == 0 || !self.coefficient.ends_with('0')))
117 .then_some(())
118 .ok_or(ScalarError::InvalidDecimal)
119 }
120}
121impl ApproximateNumber {
122 pub fn validate(&self) -> Result<(), ScalarError> {
123 self.canonical_value
124 .parse::<f64>()
125 .ok()
126 .filter(|parsed| {
127 parsed.is_finite() && self.canonical_value != "-0" && parsed.to_string() == self.canonical_value
128 })
129 .map(|_| ())
130 .ok_or(ScalarError::InvalidApproximateNumber)
131 }
132}
133macro_rules! deserialize_validated_string_scalar {
134 ($type:ty) => {
135 impl<'de> Deserialize<'de> for $type {
136 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
137 where
138 D: serde::Deserializer<'de>,
139 {
140 let value = String::deserialize(deserializer)?;
141 let scalar = Self { value };
142 scalar.validate().map_err(serde::de::Error::custom)?;
143 Ok(scalar)
144 }
145 }
146 };
147}
148deserialize_validated_string_scalar!(I64);
149deserialize_validated_string_scalar!(U64);
150deserialize_validated_string_scalar!(Identity);
151deserialize_validated_string_scalar!(Digest);
152impl<'de> Deserialize<'de> for ExactDecimal {
153 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
154 where
155 D: serde::Deserializer<'de>,
156 {
157 #[derive(Deserialize)]
158 #[serde(deny_unknown_fields)]
159 struct Wire {
160 coefficient: String,
161 scale: u32,
162 }
163 let wire = Wire::deserialize(deserializer)?;
164 let scalar = Self {
165 coefficient: wire.coefficient,
166 scale: wire.scale,
167 };
168 scalar.validate().map_err(serde::de::Error::custom)?;
169 Ok(scalar)
170 }
171}
172impl<'de> Deserialize<'de> for ApproximateNumber {
173 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
174 where
175 D: serde::Deserializer<'de>,
176 {
177 let canonical_value = String::deserialize(deserializer)?;
178 let scalar = Self { canonical_value };
179 scalar.validate().map_err(serde::de::Error::custom)?;
180 Ok(scalar)
181 }
182}
183#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
184#[serde(tag = "kind", content = "value", rename_all = "snake_case")]
185pub enum JsonValue {
186 Null,
187 Bool(bool),
188 String(String),
189 I64(I64),
190 U64(U64),
191 ExactDecimal(ExactDecimal),
192 Approximate(ApproximateNumber),
193 Array(Vec<JsonValue>),
194 Object(Vec<JsonField>),
195}
196#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
197#[serde(deny_unknown_fields)]
198pub struct JsonField {
199 pub name: String,
200 pub value: JsonValue,
201}
202#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
203#[serde(rename_all = "snake_case")]
204pub enum Action {
205 IdentityDiscovery,
206 DataRead,
207 DataWrite,
208 Append,
209 ResolveAppend,
210 IndexAdmin,
211 CatalogRead,
212 TaskRead,
213 SubscriptionRead,
214 DiagnosticsRead,
215 DiagnosticsCreate,
216 BackupRead,
217 BackupAdmin,
218 SecurityRead,
219 SecurityAdmin,
220 AuditRead,
221 QuotaRead,
222 QuotaAdmin,
223 BindingRead,
224 LifecycleAdmin,
225 AdmissionRead,
226 AdmissionAdmin,
227 UsageRead,
228 OperationRead,
229 OperationCancel,
230}
231
232#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
233#[serde(rename_all = "snake_case")]
234pub enum ErrorCode {
235 Aborted,
236 DeadlineExceeded,
237 InvalidRequest,
238 UnsupportedVersion,
239 Unauthenticated,
240 PermissionDenied,
241 NotFound,
242 Conflict,
243 StaleCursor,
244 RestartBudgetExhausted,
245 LimitExceeded,
246 CapabilityUnavailable,
247 NotSubmitted,
248 SubmittedIndeterminate,
249 ExpiredUnknown,
250 SecretNotEscrowed,
251 RetentionGap,
252 ArtifactRangeInvalid,
253 ChecksumMismatch,
254 TemporarilyUnavailable,
255 Internal,
256}
257
258#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
259#[serde(rename_all = "snake_case")]
260pub enum Command {
261 Discover,
262 ListIndexes,
263 GetIndex,
264 ValidateIndexChange,
265 ApplyIndexChange,
266 ApplyAdministrationMutation,
267 ListAliases,
268 GetAlias,
269 ListDataStreams,
270 GetDataStream,
271 ListComponentTemplates,
272 GetComponentTemplate,
273 ListIndexTemplates,
274 GetIndexTemplate,
275 ListIngestPipelines,
276 GetIngestPipeline,
277 SimulateIngestPipeline,
278 ReprocessByQuery,
279 ListLifecyclePolicies,
280 GetLifecyclePolicy,
281 PrepareCreateIndex,
282 PrepareDeleteIndex,
283 SubmitCatalogAction,
284 ResolveCatalogAction,
285 PrepareReplayableSourceIndex,
286 SubmitReplayableSourceIndex,
287 GetReplayableSource,
288 ControlReplayableSource,
289 CloneIndex,
290 ConfigureHistory,
291 GetHistory,
292 ResolveHistory,
293 PlaceHistoryHold,
294 ReleaseHistoryHold,
295 PrepareDocumentMutation,
296 SubmitDocumentMutation,
297 PrepareDocumentBulk,
298 SubmitDocumentBulk,
299 ResolveDocumentBulk,
300 PrepareAppendBulk,
301 SubmitAppendBulk,
302 ResolveAppendBulk,
303 ObserveAppendCommitted,
304 ResolveDocumentMutation,
305 GetDocument,
306 Search,
307 OpenPit,
308 RenewPit,
309 ClosePit,
310 ListOperations,
311 GetOperation,
312 CancelOperation,
313 ListAuditEvents,
314 ExportAuditEvents,
315 ReserveServiceCredential,
316 ReserveServiceCredentialRotation,
317 ActivateServiceCredential,
318 ResolveServiceCredentialReservation,
319 PrepareRevokeServiceCredential,
320 RevokeServiceCredential,
321 ResolveSecurityAction,
322 GetSecurityRole,
323 PrepareRoleAppendAccessChange,
324 SubmitRoleAppendAccessChange,
325 ListServiceCredentials,
326 ListBackups,
327 GetBackup,
328 CreateBackup,
329 ResolveBackupAction,
330 GetRuntimeStatus,
331 GetResultCacheStatus,
332 GetFieldPromotionStatus,
333 GetOverloadStatus,
334 ConfigureExternalKey,
335 RotateExternalKeyBinding,
336 ConfigureAggregateThenDelete,
337 GetLifecycleStatus,
338 GetQuota,
339 UpdateQuota,
340 GetBinding,
341 GetAdmissionStatus,
342 SetAdmission,
343 GetQuiesceStatus,
344 GetDecommissionReadiness,
345 GetUpgradeReadiness,
346 GetMaintenanceStatus,
347 GetRestoreReadiness,
348 WarmVectorIndex,
349 EvaluateVectorRecall,
350 CalibrateVectorStrategy,
351 GetVectorDiagnostic,
352 CreateDiagnostic,
353 GetDiagnostic,
354 ReadArtifactChunk,
355 ExportUsage,
356 ExecuteStateRead,
357 PrepareStateWrite,
358 SubmitStateWrite,
359 ResolveStateWrite,
360}
361
362#[derive(Clone, Copy, Debug, Eq, PartialEq)]
363pub struct ActionAuthorizationContract {
364 pub action: Action,
365 pub any_of_permission_ids: &'static [&'static str],
366}
367pub const LODESTONE_API_ACTION_AUTHORIZATION: &[ActionAuthorizationContract] = &[
368 ActionAuthorizationContract {
369 action: Action::IdentityDiscovery,
370 any_of_permission_ids: &["security_read"],
371 },
372 ActionAuthorizationContract {
373 action: Action::DataRead,
374 any_of_permission_ids: &["data_read"],
375 },
376 ActionAuthorizationContract {
377 action: Action::DataWrite,
378 any_of_permission_ids: &["data_write"],
379 },
380 ActionAuthorizationContract {
381 action: Action::Append,
382 any_of_permission_ids: &["append"],
383 },
384 ActionAuthorizationContract {
385 action: Action::ResolveAppend,
386 any_of_permission_ids: &["resolve_append"],
387 },
388 ActionAuthorizationContract {
389 action: Action::IndexAdmin,
390 any_of_permission_ids: &["index_admin"],
391 },
392 ActionAuthorizationContract {
393 action: Action::CatalogRead,
394 any_of_permission_ids: &["catalog_read"],
395 },
396 ActionAuthorizationContract {
397 action: Action::TaskRead,
398 any_of_permission_ids: &["task_read"],
399 },
400 ActionAuthorizationContract {
401 action: Action::SubscriptionRead,
402 any_of_permission_ids: &["subscription_read"],
403 },
404 ActionAuthorizationContract {
405 action: Action::DiagnosticsRead,
406 any_of_permission_ids: &["diagnostics_read"],
407 },
408 ActionAuthorizationContract {
409 action: Action::DiagnosticsCreate,
410 any_of_permission_ids: &["diagnostics_create"],
411 },
412 ActionAuthorizationContract {
413 action: Action::BackupRead,
414 any_of_permission_ids: &["backup_read"],
415 },
416 ActionAuthorizationContract {
417 action: Action::BackupAdmin,
418 any_of_permission_ids: &["backup_admin"],
419 },
420 ActionAuthorizationContract {
421 action: Action::SecurityRead,
422 any_of_permission_ids: &["security_read"],
423 },
424 ActionAuthorizationContract {
425 action: Action::SecurityAdmin,
426 any_of_permission_ids: &["security_admin"],
427 },
428 ActionAuthorizationContract {
429 action: Action::AuditRead,
430 any_of_permission_ids: &["audit_read"],
431 },
432 ActionAuthorizationContract {
433 action: Action::QuotaRead,
434 any_of_permission_ids: &["quota_read"],
435 },
436 ActionAuthorizationContract {
437 action: Action::QuotaAdmin,
438 any_of_permission_ids: &["quota_admin"],
439 },
440 ActionAuthorizationContract {
441 action: Action::BindingRead,
442 any_of_permission_ids: &["binding_read"],
443 },
444 ActionAuthorizationContract {
445 action: Action::LifecycleAdmin,
446 any_of_permission_ids: &["lifecycle_admin"],
447 },
448 ActionAuthorizationContract {
449 action: Action::AdmissionRead,
450 any_of_permission_ids: &["admission_read"],
451 },
452 ActionAuthorizationContract {
453 action: Action::AdmissionAdmin,
454 any_of_permission_ids: &["admission_admin"],
455 },
456 ActionAuthorizationContract {
457 action: Action::UsageRead,
458 any_of_permission_ids: &["usage_read"],
459 },
460 ActionAuthorizationContract {
461 action: Action::OperationRead,
462 any_of_permission_ids: &[
463 "catalog_read",
464 "task_read",
465 "security_read",
466 "backup_read",
467 "diagnostics_read",
468 ],
469 },
470 ActionAuthorizationContract {
471 action: Action::OperationCancel,
472 any_of_permission_ids: &[
473 "index_admin",
474 "task_admin",
475 "security_admin",
476 "backup_admin",
477 "diagnostics_create",
478 ],
479 },
480];
481pub fn action_authorization(action: Action) -> Option<&'static ActionAuthorizationContract> {
482 LODESTONE_API_ACTION_AUTHORIZATION
483 .iter()
484 .find(|contract| contract.action == action)
485}
486
487#[derive(Clone, Copy, Debug, Eq, PartialEq)]
488pub struct RuntimeCapabilityAuthorizationContract {
489 pub capability_id: &'static str,
490 pub required_permission_ids: &'static [&'static str],
491}
492pub const LODESTONE_API_RUNTIME_CAPABILITY_AUTHORIZATION: &[RuntimeCapabilityAuthorizationContract] = &[
493 RuntimeCapabilityAuthorizationContract {
494 capability_id: "search_and_append_log",
495 required_permission_ids: &["data_read", "data_write"],
496 },
497 RuntimeCapabilityAuthorizationContract {
498 capability_id: "committed_vector_and_hybrid",
499 required_permission_ids: &["data_read"],
500 },
501 RuntimeCapabilityAuthorizationContract {
502 capability_id: "realtime_or_pit_vector",
503 required_permission_ids: &["data_read"],
504 },
505 RuntimeCapabilityAuthorizationContract {
506 capability_id: "state_standard_express_ephemeral",
507 required_permission_ids: &["data_read", "data_write"],
508 },
509 RuntimeCapabilityAuthorizationContract {
510 capability_id: "state_relaxed",
511 required_permission_ids: &[],
512 },
513 RuntimeCapabilityAuthorizationContract {
514 capability_id: "bounded_resp",
515 required_permission_ids: &["data_read", "data_write"],
516 },
517 RuntimeCapabilityAuthorizationContract {
518 capability_id: "lodestone_rust_client",
519 required_permission_ids: &[],
520 },
521 RuntimeCapabilityAuthorizationContract {
522 capability_id: "replayable_source_indexes",
523 required_permission_ids: &["index_admin"],
524 },
525 RuntimeCapabilityAuthorizationContract {
526 capability_id: "zero_copy_clones",
527 required_permission_ids: &["index_admin"],
528 },
529 RuntimeCapabilityAuthorizationContract {
530 capability_id: "retained_history",
531 required_permission_ids: &["data_read"],
532 },
533 RuntimeCapabilityAuthorizationContract {
534 capability_id: "generation_result_cache",
535 required_permission_ids: &["data_read"],
536 },
537 RuntimeCapabilityAuthorizationContract {
538 capability_id: "adaptive_field_promotion",
539 required_permission_ids: &["index_admin"],
540 },
541 RuntimeCapabilityAuthorizationContract {
542 capability_id: "durable_overload_buffering",
543 required_permission_ids: &["data_read", "data_write"],
544 },
545 RuntimeCapabilityAuthorizationContract {
546 capability_id: "current_table_reader",
547 required_permission_ids: &["data_read"],
548 },
549 RuntimeCapabilityAuthorizationContract {
550 capability_id: "crypto_shred_and_rollup_lifecycle",
551 required_permission_ids: &["lifecycle_admin"],
552 },
553];
554pub fn runtime_capability_authorization(
555 capability_id: &str,
556) -> Option<&'static RuntimeCapabilityAuthorizationContract> {
557 LODESTONE_API_RUNTIME_CAPABILITY_AUTHORIZATION
558 .iter()
559 .find(|contract| contract.capability_id == capability_id)
560}
561
562pub const LODESTONE_API_CURSOR_FORMAT_VERSION: u16 = 1;
563#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
564#[serde(deny_unknown_fields)]
565pub struct Cursor {
566 pub value: String,
567}
568
569pub const LODESTONE_API_LOCATOR_FORMAT_VERSION: u16 = 1;
570#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
571#[serde(deny_unknown_fields)]
572pub struct Locator {
573 pub authority: String,
574 pub value: String,
575}
576
577pub const LODESTONE_API_RESOURCE_FORMAT_VERSION: u16 = 1;
578#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
579#[serde(deny_unknown_fields)]
580pub struct Resource {
581 pub kind: String,
582 pub name: String,
583 pub incarnation: Identity,
584}
585
586pub const LODESTONE_API_FIELD_PROMOTION_CONFIGURATION_FORMAT_VERSION: u16 = 1;
587#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
588#[serde(deny_unknown_fields)]
589pub struct FieldPromotionConfiguration {
590 pub format_version: u32,
591 pub enabled: bool,
592 pub minimum_query_count: u32,
593 pub maximum_promoted_fields: u32,
594 pub maximum_cardinality: U64,
595 pub maximum_extra_bytes: U64,
596 pub allow_sensitive: bool,
597}
598
599pub const LODESTONE_API_OVERLOAD_CONFIGURATION_FORMAT_VERSION: u16 = 2;
600#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
601#[serde(deny_unknown_fields)]
602pub struct OverloadConfiguration {
603 pub format_version: u32,
604 pub mode: String,
605 pub maximum_backlog_bytes: U64,
606 pub maximum_backlog_age_millis: U64,
607 pub maximum_collection_share_bytes: U64,
608 pub maximum_recovery_ops_per_pass: u32,
609 pub maximum_pending_overlay_documents: U64,
610}
611
612pub const LODESTONE_API_INDEX_POLICIES_FORMAT_VERSION: u16 = 1;
613#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
614#[serde(deny_unknown_fields)]
615pub struct IndexPolicies {
616 pub durability: String,
617 pub storage: String,
618 pub cache: String,
619 #[serde(default, skip_serializing_if = "Option::is_none")]
620 pub default_visibility: Option<String>,
621 pub field_promotion: FieldPromotionConfiguration,
622 pub overload: OverloadConfiguration,
623}
624
625pub const LODESTONE_API_MAINTENANCE_BUDGETS_FORMAT_VERSION: u16 = 1;
626#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
627#[serde(deny_unknown_fields)]
628pub struct MaintenanceBudgets {
629 pub memtable_max_bytes: U64,
630 pub refresh_max_millis: U64,
631 pub seal_max_bytes: U64,
632 pub seal_max_millis: U64,
633 pub merge_max_bytes: U64,
634 pub delete_resolution_max_bytes: U64,
635 pub wal_retention_max_bytes: U64,
636 pub gc_max_keys: u32,
637 pub fsck_max_objects: u32,
638 pub deleted_tombstone_retention_millis: U64,
639}
640
641pub const LODESTONE_API_RESOURCE_DURABILITY_CLASS_FORMAT_VERSION: u16 = 1;
642#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
643#[serde(rename_all = "snake_case")]
644pub enum ResourceDurabilityClass {
645 RegionalObject,
646 ZonalLowLatency,
647 Relaxed,
648 Ephemeral,
649}
650
651pub const LODESTONE_API_RESOURCE_STORAGE_CLASS_FORMAT_VERSION: u16 = 1;
652#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
653#[serde(rename_all = "snake_case")]
654pub enum ResourceStorageClass {
655 Standard,
656 Cold,
657}
658
659pub const LODESTONE_API_VECTOR_QUALITY_OBJECTIVE_FORMAT_VERSION: u16 = 1;
660#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
661#[serde(rename_all = "snake_case")]
662pub enum VectorQualityObjective {
663 Balanced,
664 HighRecall,
665 MemoryEfficient,
666}
667
668pub const LODESTONE_API_VECTOR_INDEXING_OBJECTIVE_FORMAT_VERSION: u16 = 1;
669#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
670#[serde(rename_all = "snake_case")]
671pub enum VectorIndexingObjective {
672 FastBuild,
673 Balanced,
674 Compact,
675}
676
677pub const LODESTONE_API_VECTOR_RESIDENCY_INTENT_FORMAT_VERSION: u16 = 1;
678#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
679#[serde(rename_all = "snake_case")]
680pub enum VectorResidencyIntent {
681 Automatic,
682 PreferResident,
683 RequireResident,
684}
685
686pub const LODESTONE_API_VECTOR_CALIBRATION_BINDING_FORMAT_VERSION: u16 = 1;
687#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
688#[serde(deny_unknown_fields)]
689pub struct VectorCalibrationBinding {
690 pub profile: VectorStrategyProfile,
691 pub evidence_digest: Digest,
692}
693
694pub const LODESTONE_API_VECTOR_RESOURCE_POLICY_FORMAT_VERSION: u16 = 2;
695#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
696#[serde(deny_unknown_fields)]
697pub struct VectorResourcePolicy {
698 pub quality: VectorQualityObjective,
699 pub indexing: VectorIndexingObjective,
700 #[serde(default, skip_serializing_if = "Option::is_none")]
701 pub residency: Option<VectorResidencyIntent>,
702 #[serde(default, skip_serializing_if = "Option::is_none")]
703 pub calibration: Option<VectorCalibrationBinding>,
704}
705
706pub const LODESTONE_API_WORKLOAD_CLASS_FORMAT_VERSION: u16 = 1;
707#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
708#[serde(rename_all = "snake_case")]
709pub enum WorkloadClass {
710 InteractiveSearch,
711 BatchAnalytics,
712 StreamingIngest,
713 BulkBackfill,
714 InternalMaintenance,
715}
716
717pub const LODESTONE_API_INDEX_RESOURCE_SPEC_FORMAT_VERSION: u16 = 3;
718#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
719#[serde(deny_unknown_fields)]
720pub struct IndexResourceSpec {
721 pub format_version: u32,
722 pub revision: U64,
723 pub initial_shards: u32,
724 pub target_shard_bytes: U64,
725 pub durability: ResourceDurabilityClass,
726 pub storage_class: ResourceStorageClass,
727 pub ram_admission_weight: u32,
728 pub ram_hard_max_bytes: U64,
729 pub nvme_admission_weight: u32,
730 pub nvme_hard_max_bytes: U64,
731 pub refresh_objective_millis: u32,
732 pub memtable_hard_max_bytes: U64,
733 pub seal_parallelism: u32,
734 pub merge_parallelism: u32,
735 pub vector: VectorResourcePolicy,
736 #[serde(default, skip_serializing_if = "Option::is_none")]
737 pub lifecycle_binding: Option<Identity>,
738 pub encryption_required: bool,
739 #[serde(default, skip_serializing_if = "Option::is_none")]
740 pub resolver_capability: Option<Identity>,
741}
742
743pub const LODESTONE_API_INDEX_SUMMARY_FORMAT_VERSION: u16 = 1;
744#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
745#[serde(deny_unknown_fields)]
746pub struct IndexSummary {
747 pub name: String,
748 pub incarnation: Identity,
749 pub revision: U64,
750 pub mode: String,
751 pub retained_event_identity: bool,
752 pub state: String,
753 pub schema_generation: U64,
754 pub routing_revision: U64,
755 pub shard_count: u32,
756 pub policies: IndexPolicies,
757 pub management_mode: String,
758}
759
760pub const LODESTONE_API_MAPPING_MODE_FORMAT_VERSION: u16 = 1;
761#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
762#[serde(rename_all = "snake_case")]
763pub enum MappingMode {
764 Mutable,
765 AppendLog,
766 State,
767}
768
769pub const LODESTONE_API_DYNAMIC_MAPPING_POLICY_FORMAT_VERSION: u16 = 1;
770#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
771#[serde(rename_all = "snake_case")]
772pub enum DynamicMappingPolicy {
773 True,
774 False,
775 Strict,
776}
777
778pub const LODESTONE_API_MAPPING_ANALYZER_FORMAT_VERSION: u16 = 1;
779#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
780#[serde(rename_all = "snake_case")]
781pub enum MappingAnalyzer {
782 Keyword,
783 Simple,
784 Standard,
785 Whitespace,
786}
787
788pub const LODESTONE_API_KEYWORD_NORMALIZER_FORMAT_VERSION: u16 = 1;
789#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
790#[serde(rename_all = "snake_case")]
791pub enum KeywordNormalizer {
792 Keyword,
793 Lowercase,
794}
795
796pub const LODESTONE_API_VECTOR_METRIC_FORMAT_VERSION: u16 = 1;
797#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
798#[serde(rename_all = "snake_case")]
799pub enum VectorMetric {
800 Cosine,
801 DotProduct,
802 SquaredL2,
803}
804
805pub const LODESTONE_API_MAPPING_SCALAR_FORMAT_VERSION: u16 = 1;
806#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
807#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
808pub enum MappingScalar {
809 Boolean { value: bool },
810 I64 { value: I64 },
811 U64 { value: U64 },
812 F64Bits { value: U64 },
813 Keyword { value: String },
814}
815
816pub const LODESTONE_API_SPARSE_VECTOR_WEIGHT_TYPE_FORMAT_VERSION: u16 = 1;
817#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
818#[serde(rename_all = "snake_case")]
819pub enum SparseVectorWeightType {
820 F32,
821 F16,
822}
823
824pub const LODESTONE_API_MAPPING_FIELD_TYPE_FORMAT_VERSION: u16 = 3;
825#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
826#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
827pub enum MappingFieldType {
828 Text,
829 Keyword,
830 U64,
831 Date,
832 I64,
833 F64,
834 Bool,
835 Nested,
836 Vector {
837 format_version: u32,
838 field_id: u32,
839 dimensions: u32,
840 metric: VectorMetric,
841 element_type: DenseVectorElementType,
842 #[serde(default, skip_serializing_if = "Option::is_none")]
843 quantization_scale: Option<ApproximateNumber>,
844 },
845 SparseVector {
846 format_version: u32,
847 field_id: u32,
848 maximum_dimension: u32,
849 weight_type: SparseVectorWeightType,
850 },
851 VectorSet {
852 format_version: u32,
853 field_id: u32,
854 dimensions: u32,
855 metric: VectorMetric,
856 element_type: DenseVectorElementType,
857 #[serde(default, skip_serializing_if = "Option::is_none")]
858 quantization_scale: Option<ApproximateNumber>,
859 maximum_vectors: u32,
860 },
861}
862
863pub const LODESTONE_API_MAPPING_FIELD_FORMAT_VERSION: u16 = 1;
864#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
865#[serde(deny_unknown_fields)]
866pub struct MappingField {
867 pub path: String,
868 pub field_type: MappingFieldType,
869 pub stored: bool,
870 #[serde(default, skip_serializing_if = "Option::is_none")]
871 pub null_value: Option<MappingScalar>,
872}
873
874pub const LODESTONE_API_MULTI_FIELD_PROJECTION_FORMAT_VERSION: u16 = 1;
875#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
876#[serde(deny_unknown_fields)]
877pub struct MultiFieldProjection {
878 pub parent: String,
879 pub child: String,
880}
881
882pub const LODESTONE_API_ANALYZER_IDENTITY_FORMAT_VERSION: u16 = 1;
883#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
884#[serde(deny_unknown_fields)]
885pub struct AnalyzerIdentity {
886 pub field: String,
887 pub index_analyzer: MappingAnalyzer,
888 pub search_analyzer: MappingAnalyzer,
889}
890
891pub const LODESTONE_API_KEYWORD_LIMIT_FORMAT_VERSION: u16 = 1;
892#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
893#[serde(deny_unknown_fields)]
894pub struct KeywordLimit {
895 pub field: String,
896 pub max_bytes: u32,
897 pub normalizer: KeywordNormalizer,
898}
899
900pub const LODESTONE_API_MAPPING_FORMAT_VERSION: u16 = 1;
901#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
902#[serde(deny_unknown_fields)]
903pub struct Mapping {
904 pub format_version: u32,
905 pub generation: U64,
906 pub mode: MappingMode,
907 pub dynamic_policy: DynamicMappingPolicy,
908 pub fields: Vec<MappingField>,
909 pub multi_field_projections: Vec<MultiFieldProjection>,
910 pub analyzer_identities: Vec<AnalyzerIdentity>,
911 pub keyword_limits: Vec<KeywordLimit>,
912 pub nested_paths: Vec<String>,
913}
914
915pub const LODESTONE_API_INDEX_DETAIL_FORMAT_VERSION: u16 = 1;
916#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
917#[serde(deny_unknown_fields)]
918pub struct IndexDetail {
919 pub summary: IndexSummary,
920 pub current_mapping: Mapping,
921 pub budgets: MaintenanceBudgets,
922 pub resource_spec: IndexResourceSpec,
923 pub aliases: Vec<String>,
924 pub data_streams: Vec<String>,
925}
926
927pub const LODESTONE_API_SOURCE_PROVIDER_FORMAT_VERSION: u16 = 1;
928#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
929#[serde(rename_all = "snake_case")]
930pub enum SourceProvider {
931 Kafka,
932 ObjectLog,
933 HttpReplay,
934 GrpcReplay,
935}
936
937pub const LODESTONE_API_SOURCE_DECODER_FORMAT_VERSION: u16 = 1;
938#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
939#[serde(rename_all = "snake_case")]
940pub enum SourceDecoder {
941 LodestoneDocumentJson,
942 DebeziumPostgresJson,
943}
944
945pub const LODESTONE_API_SOURCE_REPLAY_GUARANTEES_FORMAT_VERSION: u16 = 1;
946#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
947#[serde(deny_unknown_fields)]
948pub struct SourceReplayGuarantees {
949 pub durable_replay: bool,
950 pub stable_partition_identity: bool,
951 pub stable_operation_identity: bool,
952 pub ordered_positions: bool,
953 pub bounded_reads: bool,
954 pub explicit_retention: bool,
955 pub explicit_rewind: bool,
956 pub minimum_replay_window_millis: U64,
957}
958
959pub const LODESTONE_API_SOURCE_PARTITION_CONFIGURATION_FORMAT_VERSION: u16 = 1;
960#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
961#[serde(deny_unknown_fields)]
962pub struct SourcePartitionConfiguration {
963 pub partition_id: u32,
964 pub partition_incarnation: U64,
965 pub initial_next_ordinal: U64,
966 pub initial_resume_token_base64: String,
967}
968
969pub const LODESTONE_API_REPLAYABLE_SOURCE_CONFIGURATION_FORMAT_VERSION: u16 = 1;
970#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
971#[serde(deny_unknown_fields)]
972pub struct ReplayableSourceConfiguration {
973 pub source_incarnation: U64,
974 pub source_identity_digest: Digest,
975 pub provider: SourceProvider,
976 pub decoder: SourceDecoder,
977 pub partitions: Vec<SourcePartitionConfiguration>,
978 pub guarantees: SourceReplayGuarantees,
979}
980
981pub const LODESTONE_API_SOURCE_PARTITION_STATUS_FORMAT_VERSION: u16 = 1;
982#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
983#[serde(deny_unknown_fields)]
984pub struct SourcePartitionStatus {
985 pub partition_id: u32,
986 pub partition_incarnation: U64,
987 pub indexed_next_ordinal: U64,
988 #[serde(default, skip_serializing_if = "Option::is_none")]
989 pub provider_high_watermark_next_ordinal: Option<U64>,
990 #[serde(default, skip_serializing_if = "Option::is_none")]
991 pub retention_floor_next_ordinal: Option<U64>,
992 #[serde(default, skip_serializing_if = "Option::is_none")]
993 pub lag_records: Option<U64>,
994}
995
996pub const LODESTONE_API_REPLAYABLE_SOURCE_STATUS_FORMAT_VERSION: u16 = 1;
997#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
998#[serde(deny_unknown_fields)]
999pub struct ReplayableSourceStatus {
1000 pub index: Resource,
1001 pub provider: SourceProvider,
1002 pub decoder: SourceDecoder,
1003 pub source_incarnation: U64,
1004 pub source_identity_digest: Digest,
1005 pub lifecycle: String,
1006 pub lifecycle_generation: U64,
1007 #[serde(default, skip_serializing_if = "Option::is_none")]
1008 pub pause_reason: Option<String>,
1009 #[serde(default, skip_serializing_if = "Option::is_none")]
1010 pub rebuild_reason: Option<String>,
1011 pub retry_state: String,
1012 pub retention_risk: String,
1013 #[serde(default, skip_serializing_if = "Option::is_none")]
1014 pub last_batch_identity: Option<Identity>,
1015 pub partitions: Vec<SourcePartitionStatus>,
1016}
1017
1018pub const LODESTONE_API_SOURCE_CONTROL_TRANSITION_FORMAT_VERSION: u16 = 1;
1019#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1020#[serde(rename_all = "snake_case")]
1021pub enum SourceControlTransition {
1022 Pause,
1023 Resume,
1024 RequireRebuild,
1025}
1026
1027pub const LODESTONE_API_HISTORY_LEDGER_PRECONDITION_FORMAT_VERSION: u16 = 1;
1028#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1029#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1030pub enum HistoryLedgerPrecondition {
1031 Absent,
1032 Exact { revision: U64 },
1033}
1034
1035pub const LODESTONE_API_HISTORY_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1036#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1037#[serde(deny_unknown_fields)]
1038pub struct HistoryRetentionPolicy {
1039 pub keep_for_millis: U64,
1040 pub capture_interval_millis: U64,
1041 pub maximum_cuts: u32,
1042 pub privacy_overlay_identity_limit: u32,
1043}
1044
1045pub const LODESTONE_API_HISTORY_SELECTOR_FORMAT_VERSION: u16 = 1;
1046#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1047#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1048pub enum HistorySelector {
1049 ExactCut { cut_id: Identity },
1050 AtOrBeforeCommitTime { unix_millis: U64 },
1051}
1052
1053pub const LODESTONE_API_HISTORY_HOLD_FORMAT_VERSION: u16 = 1;
1054#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1055#[serde(deny_unknown_fields)]
1056pub struct HistoryHold {
1057 pub hold_id: Identity,
1058 pub cut_ids: Vec<Identity>,
1059}
1060
1061pub const LODESTONE_API_HISTORY_STATUS_FORMAT_VERSION: u16 = 1;
1062#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1063#[serde(deny_unknown_fields)]
1064pub struct HistoryStatus {
1065 pub index: Resource,
1066 pub revision: U64,
1067 pub policy: HistoryRetentionPolicy,
1068 pub page_count: u32,
1069 pub cut_count: u32,
1070 pub holds: Vec<HistoryHold>,
1071}
1072
1073pub const LODESTONE_API_HISTORY_RESOLUTION_FORMAT_VERSION: u16 = 1;
1074#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1075#[serde(deny_unknown_fields)]
1076pub struct HistoryResolution {
1077 pub index: Resource,
1078 pub selector: HistorySelector,
1079 pub cut_id: Identity,
1080 pub committed_at_unix_millis: U64,
1081 pub uncertainty_millis: U64,
1082 pub shard_count: u32,
1083 pub security_policy_revision: U64,
1084}
1085
1086pub const LODESTONE_API_INDEX_REFERENCE_FORMAT_VERSION: u16 = 1;
1087#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1088#[serde(deny_unknown_fields)]
1089pub struct IndexReference {
1090 pub name: String,
1091 pub incarnation: Identity,
1092}
1093
1094pub const LODESTONE_API_ALIAS_TARGET_FORMAT_VERSION: u16 = 1;
1095#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1096#[serde(deny_unknown_fields)]
1097pub struct AliasTarget {
1098 pub index: IndexReference,
1099 pub write_index: bool,
1100}
1101
1102pub const LODESTONE_API_ALIAS_SUMMARY_FORMAT_VERSION: u16 = 1;
1103#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1104#[serde(deny_unknown_fields)]
1105pub struct AliasSummary {
1106 pub name: String,
1107 pub revision: U64,
1108 pub visible_target_count: u32,
1109}
1110
1111pub const LODESTONE_API_ALIAS_DETAIL_FORMAT_VERSION: u16 = 1;
1112#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1113#[serde(deny_unknown_fields)]
1114pub struct AliasDetail {
1115 pub summary: AliasSummary,
1116 pub visible_targets: Vec<AliasTarget>,
1117 #[serde(default, skip_serializing_if = "Option::is_none")]
1118 pub filter: Option<RawJson>,
1119 #[serde(default, skip_serializing_if = "Option::is_none")]
1120 pub index_routing: Option<String>,
1121 #[serde(default, skip_serializing_if = "Option::is_none")]
1122 pub search_routing: Option<String>,
1123}
1124
1125pub const LODESTONE_API_DATA_STREAM_SUMMARY_FORMAT_VERSION: u16 = 1;
1126#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1127#[serde(deny_unknown_fields)]
1128pub struct DataStreamSummary {
1129 pub name: String,
1130 pub incarnation: Identity,
1131 pub revision: U64,
1132 pub generation: U64,
1133 pub state: String,
1134 pub visible_backing_count: u32,
1135}
1136
1137pub const LODESTONE_API_COMPONENT_TEMPLATE_BINDING_FORMAT_VERSION: u16 = 1;
1138#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1139#[serde(deny_unknown_fields)]
1140pub struct ComponentTemplateBinding {
1141 pub name: String,
1142 pub incarnation: Identity,
1143 pub revision: U64,
1144}
1145
1146pub const LODESTONE_API_INDEX_TEMPLATE_BINDING_FORMAT_VERSION: u16 = 1;
1147#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1148#[serde(deny_unknown_fields)]
1149pub struct IndexTemplateBinding {
1150 pub name: String,
1151 pub incarnation: Identity,
1152 pub revision: U64,
1153}
1154
1155pub const LODESTONE_API_LIFECYCLE_POLICY_BINDING_FORMAT_VERSION: u16 = 1;
1156#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1157#[serde(deny_unknown_fields)]
1158pub struct LifecyclePolicyBinding {
1159 pub name: String,
1160 pub incarnation: Identity,
1161 pub revision: U64,
1162}
1163
1164pub const LODESTONE_API_DATA_STREAM_DETAIL_FORMAT_VERSION: u16 = 1;
1165#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1166#[serde(deny_unknown_fields)]
1167pub struct DataStreamDetail {
1168 pub summary: DataStreamSummary,
1169 pub visible_backing_indices: Vec<IndexReference>,
1170 #[serde(default, skip_serializing_if = "Option::is_none")]
1171 pub write_index: Option<IndexReference>,
1172 pub timestamp_field: String,
1173 pub index_template: IndexTemplateBinding,
1174 #[serde(default, skip_serializing_if = "Option::is_none")]
1175 pub lifecycle_policy: Option<LifecyclePolicyBinding>,
1176}
1177
1178pub const LODESTONE_API_COMPONENT_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1179#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1180#[serde(deny_unknown_fields)]
1181pub struct ComponentTemplateSummary {
1182 pub name: String,
1183 pub incarnation: Identity,
1184 pub revision: U64,
1185}
1186
1187pub const LODESTONE_API_COMPONENT_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1188#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1189#[serde(deny_unknown_fields)]
1190pub struct ComponentTemplateDetail {
1191 pub summary: ComponentTemplateSummary,
1192 pub mapping: Mapping,
1193 pub settings: RawJson,
1194 #[serde(default, skip_serializing_if = "Option::is_none")]
1195 pub resource_spec: Option<IndexResourceSpec>,
1196}
1197
1198pub const LODESTONE_API_INDEX_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1199#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1200#[serde(deny_unknown_fields)]
1201pub struct IndexTemplateSummary {
1202 pub name: String,
1203 pub incarnation: Identity,
1204 pub revision: U64,
1205 pub priority: i32,
1206 pub data_stream: bool,
1207}
1208
1209pub const LODESTONE_API_INDEX_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1210#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1211#[serde(deny_unknown_fields)]
1212pub struct IndexTemplateDetail {
1213 pub summary: IndexTemplateSummary,
1214 pub index_patterns: Vec<String>,
1215 pub components: Vec<ComponentTemplateBinding>,
1216 pub mapping: Mapping,
1217 pub settings: RawJson,
1218 #[serde(default, skip_serializing_if = "Option::is_none")]
1219 pub resource_spec: Option<IndexResourceSpec>,
1220}
1221
1222pub const LODESTONE_API_INGEST_PIPELINE_SUMMARY_FORMAT_VERSION: u16 = 1;
1223#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1224#[serde(deny_unknown_fields)]
1225pub struct IngestPipelineSummary {
1226 pub name: String,
1227 pub incarnation: Identity,
1228 pub revision: U64,
1229 pub digest: Digest,
1230}
1231
1232pub const LODESTONE_API_INGEST_PIPELINE_DETAIL_FORMAT_VERSION: u16 = 1;
1233#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1234#[serde(deny_unknown_fields)]
1235pub struct IngestPipelineDetail {
1236 pub summary: IngestPipelineSummary,
1237 pub definition: RawJson,
1238}
1239
1240pub const LODESTONE_API_INGEST_PIPELINE_SELECTION_FORMAT_VERSION: u16 = 1;
1241#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1242#[serde(deny_unknown_fields)]
1243pub struct IngestPipelineSelection {
1244 pub name: String,
1245 pub expected: ExpectedBinding,
1246}
1247
1248pub const LODESTONE_API_LIFECYCLE_POLICY_SUMMARY_FORMAT_VERSION: u16 = 1;
1249#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1250#[serde(deny_unknown_fields)]
1251pub struct LifecyclePolicySummary {
1252 pub name: String,
1253 pub incarnation: Identity,
1254 pub revision: U64,
1255}
1256
1257pub const LODESTONE_API_ROLLOVER_THRESHOLDS_FORMAT_VERSION: u16 = 1;
1258#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1259#[serde(deny_unknown_fields)]
1260pub struct RolloverThresholds {
1261 #[serde(default, skip_serializing_if = "Option::is_none")]
1262 pub max_primary_docs: Option<U64>,
1263 #[serde(default, skip_serializing_if = "Option::is_none")]
1264 pub max_primary_bytes: Option<U64>,
1265 #[serde(default, skip_serializing_if = "Option::is_none")]
1266 pub max_age_millis: Option<U64>,
1267}
1268
1269pub const LODESTONE_API_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1270#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1271#[serde(deny_unknown_fields)]
1272pub struct RetentionPolicy {
1273 #[serde(default, skip_serializing_if = "Option::is_none")]
1274 pub document_max_age_millis: Option<U64>,
1275 #[serde(default, skip_serializing_if = "Option::is_none")]
1276 pub backing_index_max_age_millis: Option<U64>,
1277}
1278
1279pub const LODESTONE_API_LIFECYCLE_POLICY_DETAIL_FORMAT_VERSION: u16 = 1;
1280#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1281#[serde(deny_unknown_fields)]
1282pub struct LifecyclePolicyDetail {
1283 pub summary: LifecyclePolicySummary,
1284 pub rollover: RolloverThresholds,
1285 pub retention: RetentionPolicy,
1286 pub merge_hint: bool,
1287 pub freeze_hint: bool,
1288 pub delete_expired: bool,
1289}
1290
1291pub const LODESTONE_API_TEXT_QUERY_OPERATOR_FORMAT_VERSION: u16 = 1;
1292#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1293#[serde(rename_all = "snake_case")]
1294pub enum TextQueryOperator {
1295 Or,
1296 And,
1297}
1298
1299pub const LODESTONE_API_TEXT_QUERY_ANALYZER_FORMAT_VERSION: u16 = 1;
1300#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1301#[serde(rename_all = "snake_case")]
1302pub enum TextQueryAnalyzer {
1303 Mapping,
1304 Standard,
1305 Simple,
1306 Whitespace,
1307 Keyword,
1308}
1309
1310pub const LODESTONE_API_ZERO_TERMS_QUERY_FORMAT_VERSION: u16 = 1;
1311#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1312#[serde(rename_all = "snake_case")]
1313pub enum ZeroTermsQuery {
1314 None,
1315 All,
1316}
1317
1318pub const LODESTONE_API_TEXT_QUERY_OPTIONS_FORMAT_VERSION: u16 = 1;
1319#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1320#[serde(deny_unknown_fields)]
1321pub struct TextQueryOptions {
1322 pub operator: TextQueryOperator,
1323 #[serde(default, skip_serializing_if = "Option::is_none")]
1324 pub minimum_should_match: Option<u32>,
1325 pub analyzer: TextQueryAnalyzer,
1326 pub zero_terms_query: ZeroTermsQuery,
1327}
1328
1329pub const LODESTONE_API_MULTI_MATCH_MODE_FORMAT_VERSION: u16 = 1;
1330#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1331#[serde(rename_all = "snake_case")]
1332pub enum MultiMatchMode {
1333 BestFields,
1334 MostFields,
1335 Phrase,
1336 PhrasePrefix,
1337 CrossFields,
1338}
1339
1340pub const LODESTONE_API_MULTI_MATCH_FIELD_FORMAT_VERSION: u16 = 1;
1341#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1342#[serde(deny_unknown_fields)]
1343pub struct MultiMatchField {
1344 pub field: String,
1345 pub boost: ApproximateNumber,
1346}
1347
1348pub const LODESTONE_API_MULTI_MATCH_OPTIONS_FORMAT_VERSION: u16 = 1;
1349#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1350#[serde(deny_unknown_fields)]
1351pub struct MultiMatchOptions {
1352 pub mode: MultiMatchMode,
1353 pub operator: TextQueryOperator,
1354 #[serde(default, skip_serializing_if = "Option::is_none")]
1355 pub minimum_should_match: Option<u32>,
1356 pub analyzer: TextQueryAnalyzer,
1357 pub zero_terms_query: ZeroTermsQuery,
1358 pub slop: u32,
1359}
1360
1361pub const LODESTONE_API_SORT_ORDER_FORMAT_VERSION: u16 = 1;
1362#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1363#[serde(rename_all = "snake_case")]
1364pub enum SortOrder {
1365 Asc,
1366 Desc,
1367}
1368
1369pub const LODESTONE_API_SORT_MODE_FORMAT_VERSION: u16 = 1;
1370#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1371#[serde(rename_all = "snake_case")]
1372pub enum SortMode {
1373 Auto,
1374 Min,
1375 Max,
1376}
1377
1378pub const LODESTONE_API_MISSING_ORDER_FORMAT_VERSION: u16 = 1;
1379#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1380#[serde(rename_all = "snake_case")]
1381pub enum MissingOrder {
1382 First,
1383 Last,
1384}
1385
1386pub const LODESTONE_API_NESTED_SCORE_MODE_FORMAT_VERSION: u16 = 1;
1387#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1388#[serde(rename_all = "snake_case")]
1389pub enum NestedScoreMode {
1390 Avg,
1391 Max,
1392 Min,
1393 None,
1394 Sum,
1395}
1396
1397pub const LODESTONE_API_NESTED_INNER_HITS_FORMAT_VERSION: u16 = 1;
1398#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1399#[serde(deny_unknown_fields)]
1400pub struct NestedInnerHits {
1401 #[serde(default, skip_serializing_if = "Option::is_none")]
1402 pub name: Option<String>,
1403 pub from: u32,
1404 pub size: u32,
1405 pub sort: Vec<SortSpec>,
1406}
1407
1408pub const LODESTONE_API_SORT_SPEC_FORMAT_VERSION: u16 = 1;
1409#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1410#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1411pub enum SortSpec {
1412 Score {
1413 order: SortOrder,
1414 },
1415 Field {
1416 field: String,
1417 order: SortOrder,
1418 #[serde(default, skip_serializing_if = "Option::is_none")]
1419 missing: Option<MissingOrder>,
1420 mode: SortMode,
1421 },
1422 NestedField {
1423 path: String,
1424 field: String,
1425 #[serde(default, skip_serializing_if = "Option::is_none")]
1426 filter: Option<Box<Query>>,
1427 order: SortOrder,
1428 #[serde(default, skip_serializing_if = "Option::is_none")]
1429 missing: Option<MissingOrder>,
1430 mode: SortMode,
1431 },
1432}
1433
1434pub const LODESTONE_API_QUERY_FORMAT_VERSION: u16 = 1;
1435#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1436#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1437pub enum Query {
1438 MatchAll,
1439 Term {
1440 field: String,
1441 value: JsonValue,
1442 },
1443 Terms {
1444 field: String,
1445 values: Vec<JsonValue>,
1446 },
1447 Range {
1448 field: String,
1449 #[serde(default, skip_serializing_if = "Option::is_none")]
1450 lower: Option<JsonValue>,
1451 #[serde(default, skip_serializing_if = "Option::is_none")]
1452 upper: Option<JsonValue>,
1453 include_lower: bool,
1454 include_upper: bool,
1455 },
1456 Text {
1457 field: String,
1458 text: String,
1459 #[serde(default, skip_serializing_if = "Option::is_none")]
1460 options: Option<TextQueryOptions>,
1461 },
1462 MultiMatch {
1463 fields: Vec<MultiMatchField>,
1464 text: String,
1465 #[serde(default, skip_serializing_if = "Option::is_none")]
1466 options: Option<MultiMatchOptions>,
1467 },
1468 Exists {
1469 field: String,
1470 },
1471 Prefix {
1472 field: String,
1473 prefix: String,
1474 #[serde(default, skip_serializing_if = "Option::is_none")]
1475 analyzer: Option<TextQueryAnalyzer>,
1476 analyze_wildcard: bool,
1477 },
1478 Fuzzy {
1479 field: String,
1480 value: String,
1481 distance: u32,
1482 #[serde(default, skip_serializing_if = "Option::is_none")]
1483 analyzer: Option<TextQueryAnalyzer>,
1484 },
1485 Boost {
1486 query: Box<Query>,
1487 boost: ApproximateNumber,
1488 },
1489 Bool {
1490 must: Vec<Query>,
1491 filter: Vec<Query>,
1492 should: Vec<Query>,
1493 must_not: Vec<Query>,
1494 minimum_should_match: u32,
1495 },
1496 Nested {
1497 path: String,
1498 query: Box<Query>,
1499 score_mode: NestedScoreMode,
1500 ignore_unmapped: bool,
1501 #[serde(default, skip_serializing_if = "Option::is_none")]
1502 inner_hits: Option<NestedInnerHits>,
1503 },
1504}
1505
1506pub const LODESTONE_API_DENSE_RETRIEVAL_MODE_FORMAT_VERSION: u16 = 1;
1507#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1508#[serde(rename_all = "snake_case")]
1509pub enum DenseRetrievalMode {
1510 Auto,
1511 Ann,
1512 Exact,
1513}
1514
1515pub const LODESTONE_API_VECTOR_ACHIEVED_MODE_FORMAT_VERSION: u16 = 1;
1516#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1517#[serde(rename_all = "snake_case")]
1518pub enum VectorAchievedMode {
1519 Exact,
1520 Ann,
1521 Mixed,
1522}
1523
1524pub const LODESTONE_API_VECTOR_BRANCH_DIAGNOSTICS_FORMAT_VERSION: u16 = 2;
1525#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1526#[serde(deny_unknown_fields)]
1527pub struct VectorBranchDiagnostics {
1528 pub name: String,
1529 pub requested_mode: DenseRetrievalMode,
1530 pub achieved_mode: VectorAchievedMode,
1531 pub result_count: U64,
1532 pub exact_segments: U64,
1533 pub ann_segments: U64,
1534 pub exact_fallback_segments: U64,
1535 pub distance_evaluations: U64,
1536 pub peak_scratch_bytes: U64,
1537 pub fresh_vectors_scanned: U64,
1538 pub realtime_overlay_queries: U64,
1539 pub realtime_overlay_candidates: U64,
1540 pub bundle_roots: U64,
1541 pub object_read_requests: U64,
1542 pub object_bytes_read: U64,
1543 pub cache_hits: U64,
1544 pub cache_misses: U64,
1545 pub snapshot_digests: Vec<Digest>,
1546}
1547
1548pub const LODESTONE_API_DENSE_VECTOR_ELEMENT_TYPE_FORMAT_VERSION: u16 = 1;
1549#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1550#[serde(rename_all = "snake_case")]
1551pub enum DenseVectorElementType {
1552 F32,
1553 F16,
1554 I8,
1555}
1556
1557pub const LODESTONE_API_DENSE_VECTOR_BYTE_ORDER_FORMAT_VERSION: u16 = 1;
1558#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1559#[serde(rename_all = "snake_case")]
1560pub enum DenseVectorByteOrder {
1561 LittleEndian,
1562}
1563
1564pub const LODESTONE_API_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
1565#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1566#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1567pub enum VectorValue {
1568 Numeric {
1569 values: Vec<ApproximateNumber>,
1570 },
1571 Binary {
1572 element_type: DenseVectorElementType,
1573 byte_order: DenseVectorByteOrder,
1574 data_base64: String,
1575 #[serde(default, skip_serializing_if = "Option::is_none")]
1576 quantization_scale: Option<ApproximateNumber>,
1577 },
1578}
1579
1580pub const LODESTONE_API_SPARSE_VECTOR_ENTRY_FORMAT_VERSION: u16 = 1;
1581#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1582#[serde(deny_unknown_fields)]
1583pub struct SparseVectorEntry {
1584 pub dimension: u32,
1585 pub weight: ApproximateNumber,
1586}
1587
1588pub const LODESTONE_API_SPARSE_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
1589#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1590#[serde(deny_unknown_fields)]
1591pub struct SparseVectorValue {
1592 pub entries: Vec<SparseVectorEntry>,
1593}
1594
1595pub const LODESTONE_API_VECTOR_SET_VALUE_FORMAT_VERSION: u16 = 1;
1596#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1597#[serde(deny_unknown_fields)]
1598pub struct VectorSetValue {
1599 pub vectors: Vec<VectorValue>,
1600}
1601
1602pub const LODESTONE_API_VECTOR_EVALUATION_SNAPSHOT_FORMAT_VERSION: u16 = 1;
1603#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1604#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1605pub enum VectorEvaluationSnapshot {
1606 CommittedCut { digest: Digest },
1607 Pit { pit: Cursor },
1608}
1609
1610pub const LODESTONE_API_VECTOR_EVALUATION_QUERY_SET_FORMAT_VERSION: u16 = 1;
1611#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1612#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1613pub enum VectorEvaluationQuerySet {
1614 Sample { seed: U64, sample_count: u32 },
1615 Supplied { digest: Digest, queries: Vec<VectorValue> },
1616}
1617
1618pub const LODESTONE_API_VECTOR_EVALUATION_BUDGET_FORMAT_VERSION: u16 = 1;
1619#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1620#[serde(deny_unknown_fields)]
1621pub struct VectorEvaluationBudget {
1622 pub maximum_distance_evaluations: U64,
1623 pub maximum_elapsed_work_units: U64,
1624 pub maximum_peak_memory_bytes: U64,
1625 pub maximum_object_reads: U64,
1626 pub maximum_object_bytes: U64,
1627 pub maximum_build_scratch_bytes: U64,
1628 pub maximum_profile_comparisons: u32,
1629}
1630
1631pub const LODESTONE_API_VECTOR_CANDIDATE_POLICY_FORMAT_VERSION: u16 = 1;
1632#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1633#[serde(rename_all = "snake_case")]
1634pub enum VectorCandidatePolicy {
1635 Balanced,
1636 HighRecall,
1637 MemoryEfficient,
1638}
1639
1640pub const LODESTONE_API_VECTOR_CALIBRATION_OBJECTIVE_FORMAT_VERSION: u16 = 1;
1641#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1642#[serde(rename_all = "snake_case")]
1643pub enum VectorCalibrationObjective {
1644 Balanced,
1645 HighRecall,
1646 MemoryEfficient,
1647}
1648
1649pub const LODESTONE_API_VECTOR_STRATEGY_PROFILE_FORMAT_VERSION: u16 = 1;
1650#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1651#[serde(rename_all = "snake_case")]
1652pub enum VectorStrategyProfile {
1653 BalancedV1,
1654 HighRecallV1,
1655 MemoryEfficientV1,
1656}
1657
1658pub const LODESTONE_API_VECTOR_EVALUATION_WORK_FORMAT_VERSION: u16 = 1;
1659#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1660#[serde(deny_unknown_fields)]
1661pub struct VectorEvaluationWork {
1662 pub distance_evaluations: U64,
1663 pub elapsed_work_units: U64,
1664 pub peak_memory_bytes: U64,
1665 pub object_reads: U64,
1666 pub object_bytes: U64,
1667}
1668
1669pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_CODE_FORMAT_VERSION: u16 = 1;
1670#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1671#[serde(rename_all = "snake_case")]
1672pub enum VectorEvaluationErrorCode {
1673 AnnRefused,
1674 ExhaustiveRefused,
1675 TimedOut,
1676 Cancelled,
1677 Internal,
1678}
1679
1680pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_FORMAT_VERSION: u16 = 1;
1681#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1682#[serde(deny_unknown_fields)]
1683pub struct VectorEvaluationError {
1684 pub sample_ordinal: u32,
1685 pub code: VectorEvaluationErrorCode,
1686}
1687
1688pub const LODESTONE_API_VECTOR_RECALL_RESULT_FORMAT_VERSION: u16 = 1;
1689#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1690#[serde(deny_unknown_fields)]
1691pub struct VectorRecallResult {
1692 pub format_version: u32,
1693 pub index: Resource,
1694 pub field: String,
1695 pub mapping_generation: U64,
1696 pub snapshot_digest: Digest,
1697 pub query_set_digest: Digest,
1698 pub metric: VectorMetric,
1699 pub k: u32,
1700 pub candidate_policy: VectorCandidatePolicy,
1701 pub strategy_identity: String,
1702 pub completed_samples: u32,
1703 pub ann_result_count: U64,
1704 pub exhaustive_result_count: U64,
1705 pub mean_recall_basis_points: u32,
1706 pub minimum_recall_basis_points: u32,
1707 pub p05_recall_basis_points: u32,
1708 pub p50_recall_basis_points: u32,
1709 pub p90_recall_basis_points: u32,
1710 pub p99_recall_basis_points: u32,
1711 pub ann_work: VectorEvaluationWork,
1712 pub exhaustive_work: VectorEvaluationWork,
1713 pub errors: Vec<VectorEvaluationError>,
1714}
1715
1716pub const LODESTONE_API_VECTOR_CALIBRATION_CANDIDATE_FORMAT_VERSION: u16 = 1;
1717#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1718#[serde(deny_unknown_fields)]
1719pub struct VectorCalibrationCandidate {
1720 pub profile: VectorStrategyProfile,
1721 pub recall: VectorRecallResult,
1722 pub build_scratch_bytes: U64,
1723 pub resident_bytes: U64,
1724 pub evidence_digest: Digest,
1725}
1726
1727pub const LODESTONE_API_VECTOR_CALIBRATION_RESULT_FORMAT_VERSION: u16 = 1;
1728#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1729#[serde(deny_unknown_fields)]
1730pub struct VectorCalibrationResult {
1731 pub format_version: u32,
1732 pub objective: VectorCalibrationObjective,
1733 pub candidates: Vec<VectorCalibrationCandidate>,
1734 pub recommended_profile: VectorStrategyProfile,
1735 pub recommended_evidence_digest: Digest,
1736 pub requires_explicit_resource_revision_and_rebuild: bool,
1737}
1738
1739pub const LODESTONE_API_VECTOR_DIAGNOSTIC_RESULT_FORMAT_VERSION: u16 = 1;
1740#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1741#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1742pub enum VectorDiagnosticResult {
1743 Recall { result: Box<VectorRecallResult> },
1744 Calibration { result: Box<VectorCalibrationResult> },
1745}
1746
1747pub const LODESTONE_API_VECTOR_WARM_COMPONENT_FORMAT_VERSION: u16 = 1;
1748#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1749#[serde(rename_all = "snake_case")]
1750pub enum VectorWarmComponent {
1751 Directory,
1752 Approximate,
1753 Exact,
1754}
1755
1756pub const LODESTONE_API_VECTOR_WARM_STATE_FORMAT_VERSION: u16 = 1;
1757#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1758#[serde(rename_all = "snake_case")]
1759pub enum VectorWarmState {
1760 Warmed,
1761 Partial,
1762 Stale,
1763}
1764
1765pub const LODESTONE_API_VECTOR_WARM_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
1766#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1767#[serde(deny_unknown_fields)]
1768pub struct VectorWarmAchievement {
1769 pub component: VectorWarmComponent,
1770 pub cache_identity: Digest,
1771 pub resident_bytes: U64,
1772}
1773
1774pub const LODESTONE_API_VECTOR_WARM_RESULT_FORMAT_VERSION: u16 = 1;
1775#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1776#[serde(deny_unknown_fields)]
1777pub struct VectorWarmResult {
1778 pub format_version: u32,
1779 pub operation_identity: Digest,
1780 pub index: Resource,
1781 pub root_digest: Digest,
1782 pub state: VectorWarmState,
1783 pub progress: ExactDecimal,
1784 pub achieved: Vec<VectorWarmAchievement>,
1785 pub object_requests: U64,
1786 pub object_bytes: U64,
1787 pub cache_hits: U64,
1788 pub cache_misses: U64,
1789 pub started_at: U64,
1790 pub completed_at: U64,
1791 pub expires_at: U64,
1792 #[serde(default, skip_serializing_if = "Option::is_none")]
1793 pub residency_intent: Option<VectorResidencyIntent>,
1794}
1795
1796pub const LODESTONE_API_DENSE_RETRIEVAL_THRESHOLD_FORMAT_VERSION: u16 = 1;
1797#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1798#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1799pub enum DenseRetrievalThreshold {
1800 MinimumScore { value: ApproximateNumber },
1801 MaximumDistance { value: ApproximateNumber },
1802}
1803
1804pub const LODESTONE_API_RETRIEVAL_BRANCH_FORMAT_VERSION: u16 = 3;
1805#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1806#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1807pub enum RetrievalBranch {
1808 Lexical {
1809 name: String,
1810 query: Box<Query>,
1811 #[serde(default, skip_serializing_if = "Option::is_none")]
1812 filter: Option<Box<Query>>,
1813 window: u32,
1814 weight: ApproximateNumber,
1815 },
1816 Dense {
1817 name: String,
1818 field: String,
1819 query_vector: VectorValue,
1820 #[serde(default, skip_serializing_if = "Option::is_none")]
1821 filter: Option<Box<Query>>,
1822 window: u32,
1823 #[serde(default, skip_serializing_if = "Option::is_none")]
1824 candidates: Option<u32>,
1825 weight: ApproximateNumber,
1826 mode: DenseRetrievalMode,
1827 #[serde(default, skip_serializing_if = "Option::is_none")]
1828 threshold: Option<DenseRetrievalThreshold>,
1829 },
1830 Sparse {
1831 name: String,
1832 field: String,
1833 query_vector: SparseVectorValue,
1834 #[serde(default, skip_serializing_if = "Option::is_none")]
1835 filter: Option<Box<Query>>,
1836 window: u32,
1837 weight: ApproximateNumber,
1838 },
1839 LateInteraction {
1840 name: String,
1841 field: String,
1842 query_vectors: VectorSetValue,
1843 #[serde(default, skip_serializing_if = "Option::is_none")]
1844 filter: Option<Box<Query>>,
1845 window: u32,
1846 candidates: u32,
1847 weight: ApproximateNumber,
1848 },
1849}
1850
1851pub const LODESTONE_API_WEIGHTED_RRF_FUSION_FORMAT_VERSION: u16 = 1;
1852#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1853#[serde(deny_unknown_fields)]
1854pub struct WeightedRrfFusion {
1855 pub rank_constant: u32,
1856}
1857
1858pub const LODESTONE_API_RETRIEVAL_PLAN_FORMAT_VERSION: u16 = 1;
1859#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1860#[serde(deny_unknown_fields)]
1861pub struct RetrievalPlan {
1862 pub format_version: u32,
1863 #[serde(default, skip_serializing_if = "Option::is_none")]
1864 pub global_filter: Option<Box<Query>>,
1865 pub branches: Vec<RetrievalBranch>,
1866 pub fusion: WeightedRrfFusion,
1867 pub result_window: u32,
1868}
1869
1870pub const LODESTONE_API_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
1871#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1872#[serde(deny_unknown_fields)]
1873pub struct HistogramBounds {
1874 #[serde(default, skip_serializing_if = "Option::is_none")]
1875 pub min: Option<ApproximateNumber>,
1876 #[serde(default, skip_serializing_if = "Option::is_none")]
1877 pub max: Option<ApproximateNumber>,
1878}
1879
1880pub const LODESTONE_API_DATE_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
1881#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1882#[serde(deny_unknown_fields)]
1883pub struct DateHistogramBounds {
1884 #[serde(default, skip_serializing_if = "Option::is_none")]
1885 pub min: Option<I64>,
1886 #[serde(default, skip_serializing_if = "Option::is_none")]
1887 pub max: Option<I64>,
1888}
1889
1890pub const LODESTONE_API_APPROXIMATION_ALGORITHM_FORMAT_VERSION: u16 = 1;
1891#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1892#[serde(rename_all = "snake_case")]
1893pub enum ApproximationAlgorithm {
1894 HyperloglogV1,
1895 FloatPrefixHistogramV1,
1896}
1897
1898pub const LODESTONE_API_APPROXIMATION_FORMAT_VERSION: u16 = 1;
1899#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1900#[serde(deny_unknown_fields)]
1901pub struct Approximation {
1902 pub algorithm: ApproximationAlgorithm,
1903 pub algorithm_version: u32,
1904 pub precision: u32,
1905 pub state_bytes: U64,
1906 #[serde(default, skip_serializing_if = "Option::is_none")]
1907 pub relative_standard_error: Option<ApproximateNumber>,
1908 #[serde(default, skip_serializing_if = "Option::is_none")]
1909 pub maximum_rank_error: Option<ApproximateNumber>,
1910}
1911
1912pub const LODESTONE_API_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
1913#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1914#[serde(deny_unknown_fields)]
1915pub struct PercentileValue {
1916 pub percent: ApproximateNumber,
1917 #[serde(default, skip_serializing_if = "Option::is_none")]
1918 pub value: Option<ApproximateNumber>,
1919}
1920
1921pub const LODESTONE_API_APPROXIMATE_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
1922#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1923#[serde(deny_unknown_fields)]
1924pub struct ApproximatePercentileValue {
1925 pub percent: ApproximateNumber,
1926 pub value: ApproximateNumber,
1927 pub lower_bound: ApproximateNumber,
1928 pub upper_bound: ApproximateNumber,
1929 pub maximum_rank_error: ApproximateNumber,
1930}
1931
1932pub const LODESTONE_API_AGGREGATION_FORMAT_VERSION: u16 = 1;
1933#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1934#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1935pub enum Aggregation {
1936 Terms {
1937 name: String,
1938 field: String,
1939 size: u32,
1940 sub_aggregations: Vec<Aggregation>,
1941 },
1942 Histogram {
1943 name: String,
1944 field: String,
1945 interval: ApproximateNumber,
1946 min_doc_count: U64,
1947 #[serde(default, skip_serializing_if = "Option::is_none")]
1948 extended_bounds: Option<HistogramBounds>,
1949 #[serde(default, skip_serializing_if = "Option::is_none")]
1950 hard_bounds: Option<HistogramBounds>,
1951 offset: ApproximateNumber,
1952 #[serde(default, skip_serializing_if = "Option::is_none")]
1953 missing: Option<ApproximateNumber>,
1954 sub_aggregations: Vec<Aggregation>,
1955 },
1956 Cardinality {
1957 name: String,
1958 field: String,
1959 },
1960 Percentiles {
1961 name: String,
1962 field: String,
1963 percents: Vec<ApproximateNumber>,
1964 },
1965 ApproximateCardinality {
1966 name: String,
1967 field: String,
1968 precision: u32,
1969 },
1970 ApproximatePercentiles {
1971 name: String,
1972 field: String,
1973 percents: Vec<ApproximateNumber>,
1974 precision: u32,
1975 },
1976 Sum {
1977 name: String,
1978 field: String,
1979 },
1980 Avg {
1981 name: String,
1982 field: String,
1983 },
1984 Min {
1985 name: String,
1986 field: String,
1987 },
1988 Max {
1989 name: String,
1990 field: String,
1991 },
1992 Stats {
1993 name: String,
1994 field: String,
1995 },
1996 DateHistogram {
1997 name: String,
1998 field: String,
1999 #[serde(default, skip_serializing_if = "Option::is_none")]
2000 fixed_interval_millis: Option<U64>,
2001 #[serde(default, skip_serializing_if = "Option::is_none")]
2002 calendar_interval: Option<String>,
2003 #[serde(default, skip_serializing_if = "Option::is_none")]
2004 time_zone: Option<String>,
2005 min_doc_count: U64,
2006 #[serde(default, skip_serializing_if = "Option::is_none")]
2007 extended_bounds: Option<DateHistogramBounds>,
2008 #[serde(default, skip_serializing_if = "Option::is_none")]
2009 hard_bounds: Option<DateHistogramBounds>,
2010 offset_millis: I64,
2011 #[serde(default, skip_serializing_if = "Option::is_none")]
2012 missing: Option<I64>,
2013 sub_aggregations: Vec<Aggregation>,
2014 },
2015 Composite {
2016 name: String,
2017 size: u32,
2018 sources: Vec<String>,
2019 #[serde(default, skip_serializing_if = "Option::is_none")]
2020 after: Option<Cursor>,
2021 sub_aggregations: Vec<Aggregation>,
2022 },
2023 Filter {
2024 name: String,
2025 query: Box<Query>,
2026 sub_aggregations: Vec<Aggregation>,
2027 },
2028 Nested {
2029 name: String,
2030 path: String,
2031 sub_aggregations: Vec<Aggregation>,
2032 },
2033 ReverseNested {
2034 name: String,
2035 #[serde(default, skip_serializing_if = "Option::is_none")]
2036 path: Option<String>,
2037 sub_aggregations: Vec<Aggregation>,
2038 },
2039}
2040
2041pub const LODESTONE_API_NESTED_SEARCH_HIT_FORMAT_VERSION: u16 = 1;
2042#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2043#[serde(deny_unknown_fields)]
2044pub struct NestedSearchHit {
2045 pub path: String,
2046 pub ordinal: u32,
2047 #[serde(default, skip_serializing_if = "Option::is_none")]
2048 pub score: Option<ApproximateNumber>,
2049 pub source: RawJson,
2050 pub sort: Vec<JsonValue>,
2051}
2052
2053pub const LODESTONE_API_NAMED_NESTED_INNER_HITS_RESULT_FORMAT_VERSION: u16 = 1;
2054#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2055#[serde(deny_unknown_fields)]
2056pub struct NamedNestedInnerHitsResult {
2057 pub name: String,
2058 pub total: U64,
2059 pub hits: Vec<NestedSearchHit>,
2060}
2061
2062pub const LODESTONE_API_FRAGMENT_BOUNDARY_FORMAT_VERSION: u16 = 1;
2063#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2064#[serde(rename_all = "snake_case")]
2065pub enum FragmentBoundary {
2066 Word,
2067 Sentence,
2068 Paragraph,
2069 WholeField,
2070}
2071
2072pub const LODESTONE_API_FRAGMENT_OFFSET_ENCODING_FORMAT_VERSION: u16 = 1;
2073#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2074#[serde(rename_all = "snake_case")]
2075pub enum FragmentOffsetEncoding {
2076 Utf8Bytes,
2077 Utf16CodeUnits,
2078 UnicodeCodepoints,
2079}
2080
2081pub const LODESTONE_API_FRAGMENT_RANKER_FORMAT_VERSION: u16 = 1;
2082#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2083#[serde(rename_all = "snake_case")]
2084pub enum FragmentRanker {
2085 LexicalMatchCountV1,
2086}
2087
2088pub const LODESTONE_API_FRAGMENT_REQUEST_FORMAT_VERSION: u16 = 1;
2089#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2090#[serde(deny_unknown_fields)]
2091pub struct FragmentRequest {
2092 pub fields: Vec<String>,
2093 pub max_fragment_bytes: u32,
2094 pub max_fragments: u32,
2095 pub boundary: FragmentBoundary,
2096 pub offset_encoding: FragmentOffsetEncoding,
2097 pub ranker: FragmentRanker,
2098}
2099
2100pub const LODESTONE_API_SEARCH_FRAGMENT_FORMAT_VERSION: u16 = 1;
2101#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2102#[serde(deny_unknown_fields)]
2103pub struct SearchFragment {
2104 pub field: String,
2105 pub text: String,
2106 pub start: u32,
2107 pub end: u32,
2108 pub offset_encoding: FragmentOffsetEncoding,
2109 pub rank: u32,
2110 pub match_count: u32,
2111 pub truncated: bool,
2112 pub partial: bool,
2113}
2114
2115pub const LODESTONE_API_NUMERIC_FEATURE_TRANSFORM_FORMAT_VERSION: u16 = 1;
2116#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2117#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2118pub enum NumericFeatureTransform {
2119 Identity,
2120 Log1p,
2121 Clamp {
2122 minimum: ApproximateNumber,
2123 maximum: ApproximateNumber,
2124 },
2125}
2126
2127pub const LODESTONE_API_NUMERIC_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
2128#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2129#[serde(deny_unknown_fields)]
2130pub struct NumericResultFeature {
2131 pub name: String,
2132 pub field: String,
2133 pub transform: NumericFeatureTransform,
2134}
2135
2136pub const LODESTONE_API_RESULT_FEATURE_REQUEST_FORMAT_VERSION: u16 = 1;
2137#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2138#[serde(deny_unknown_fields)]
2139pub struct ResultFeatureRequest {
2140 pub top_n: u32,
2141 pub include_branch_components: bool,
2142 pub numeric: Vec<NumericResultFeature>,
2143}
2144
2145pub const LODESTONE_API_RESULT_DIVERSIFICATION_FORMAT_VERSION: u16 = 1;
2146#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2147#[serde(deny_unknown_fields)]
2148pub struct ResultDiversification {
2149 pub fields: Vec<String>,
2150 pub max_per_group: u32,
2151}
2152
2153pub const LODESTONE_API_BRANCH_SCORE_KIND_FORMAT_VERSION: u16 = 2;
2154#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2155#[serde(rename_all = "snake_case")]
2156pub enum BranchScoreKind {
2157 LexicalScore,
2158 DenseSimilarity,
2159 SparseDotProduct,
2160 LateInteractionMaxsim,
2161}
2162
2163pub const LODESTONE_API_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
2164#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2165#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2166pub enum ResultFeature {
2167 Branch {
2168 branch: String,
2169 score_kind: BranchScoreKind,
2170 rank: u32,
2171 score: ApproximateNumber,
2172 },
2173 Numeric {
2174 name: String,
2175 field: String,
2176 value: ApproximateNumber,
2177 },
2178}
2179
2180pub const LODESTONE_API_SEARCH_HIT_FORMAT_VERSION: u16 = 2;
2181#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2182#[serde(deny_unknown_fields)]
2183pub struct SearchHit {
2184 pub index: Resource,
2185 pub document_id: String,
2186 #[serde(default, skip_serializing_if = "Option::is_none")]
2187 pub score: Option<ApproximateNumber>,
2188 #[serde(default, skip_serializing_if = "Option::is_none")]
2189 pub source: Option<RawJson>,
2190 pub sort: Vec<JsonValue>,
2191 pub fragments: Vec<SearchFragment>,
2192 pub features: Vec<ResultFeature>,
2193 pub group_values: Vec<JsonValue>,
2194 pub inner_hits: Vec<NamedNestedInnerHitsResult>,
2195}
2196
2197pub const LODESTONE_API_AGGREGATION_BUCKET_FORMAT_VERSION: u16 = 1;
2198#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2199#[serde(deny_unknown_fields)]
2200pub struct AggregationBucket {
2201 pub key: JsonValue,
2202 pub document_count: U64,
2203 pub sub_aggregations: Vec<AggregationResult>,
2204}
2205
2206pub const LODESTONE_API_AGGREGATION_RESULT_FORMAT_VERSION: u16 = 1;
2207#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2208#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2209pub enum AggregationResult {
2210 Terms {
2211 name: String,
2212 buckets: Vec<AggregationBucket>,
2213 partial: bool,
2214 },
2215 Histogram {
2216 name: String,
2217 buckets: Vec<AggregationBucket>,
2218 partial: bool,
2219 },
2220 DateHistogram {
2221 name: String,
2222 buckets: Vec<AggregationBucket>,
2223 partial: bool,
2224 },
2225 Composite {
2226 name: String,
2227 buckets: Vec<AggregationBucket>,
2228 partial: bool,
2229 },
2230 Filter {
2231 name: String,
2232 buckets: Vec<AggregationBucket>,
2233 partial: bool,
2234 },
2235 SingleBucket {
2236 name: String,
2237 document_count: U64,
2238 sub_aggregations: Vec<AggregationResult>,
2239 partial: bool,
2240 },
2241 Cardinality {
2242 name: String,
2243 #[serde(default, skip_serializing_if = "Option::is_none")]
2244 value: Option<ApproximateNumber>,
2245 partial: bool,
2246 },
2247 Percentiles {
2248 name: String,
2249 values: Vec<PercentileValue>,
2250 partial: bool,
2251 },
2252 ApproximateCardinality {
2253 name: String,
2254 value: ApproximateNumber,
2255 approximation: Approximation,
2256 partial: bool,
2257 },
2258 ApproximatePercentiles {
2259 name: String,
2260 values: Vec<ApproximatePercentileValue>,
2261 approximation: Approximation,
2262 partial: bool,
2263 },
2264 Sum {
2265 name: String,
2266 #[serde(default, skip_serializing_if = "Option::is_none")]
2267 value: Option<ApproximateNumber>,
2268 partial: bool,
2269 },
2270 Avg {
2271 name: String,
2272 #[serde(default, skip_serializing_if = "Option::is_none")]
2273 value: Option<ApproximateNumber>,
2274 partial: bool,
2275 },
2276 Min {
2277 name: String,
2278 #[serde(default, skip_serializing_if = "Option::is_none")]
2279 value: Option<ApproximateNumber>,
2280 partial: bool,
2281 },
2282 Max {
2283 name: String,
2284 #[serde(default, skip_serializing_if = "Option::is_none")]
2285 value: Option<ApproximateNumber>,
2286 partial: bool,
2287 },
2288 Stats {
2289 name: String,
2290 count: U64,
2291 #[serde(default, skip_serializing_if = "Option::is_none")]
2292 min: Option<ApproximateNumber>,
2293 #[serde(default, skip_serializing_if = "Option::is_none")]
2294 max: Option<ApproximateNumber>,
2295 #[serde(default, skip_serializing_if = "Option::is_none")]
2296 avg: Option<ApproximateNumber>,
2297 sum: ApproximateNumber,
2298 partial: bool,
2299 },
2300}
2301
2302pub const LODESTONE_API_SHARD_COUNTS_FORMAT_VERSION: u16 = 1;
2303#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2304#[serde(deny_unknown_fields)]
2305pub struct ShardCounts {
2306 pub total: u32,
2307 pub successful: u32,
2308 pub skipped: u32,
2309 pub failed: u32,
2310}
2311
2312pub const LODESTONE_API_TOTAL_HITS_RELATION_FORMAT_VERSION: u16 = 1;
2313#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2314#[serde(rename_all = "snake_case")]
2315pub enum TotalHitsRelation {
2316 Exact,
2317 LowerBound,
2318 Incomplete,
2319}
2320
2321pub const LODESTONE_API_SEARCH_TOTAL_FORMAT_VERSION: u16 = 1;
2322#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2323#[serde(deny_unknown_fields)]
2324pub struct SearchTotal {
2325 pub value: U64,
2326 pub relation: TotalHitsRelation,
2327 pub partial: bool,
2328}
2329
2330pub const LODESTONE_API_ARTIFACT_FORMAT_VERSION: u16 = 1;
2331#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2332#[serde(deny_unknown_fields)]
2333pub struct Artifact {
2334 pub locator: Locator,
2335 pub bytes: U64,
2336 pub sha256: Digest,
2337 pub expires_at: U64,
2338}
2339
2340pub const LODESTONE_API_OPERATION_FORMAT_VERSION: u16 = 1;
2341#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2342#[serde(deny_unknown_fields)]
2343pub struct Operation {
2344 pub locator: Locator,
2345 pub authority: String,
2346 pub state: String,
2347 #[serde(default, skip_serializing_if = "Option::is_none")]
2348 pub progress: Option<ExactDecimal>,
2349 pub cancellable: bool,
2350 pub submitted_at: U64,
2351 #[serde(default, skip_serializing_if = "Option::is_none")]
2352 pub terminal_at: Option<U64>,
2353 #[serde(default, skip_serializing_if = "Option::is_none")]
2354 pub retire_after: Option<U64>,
2355 pub artifacts: Vec<Artifact>,
2356}
2357
2358pub const LODESTONE_API_SUBMISSION_STATE_FORMAT_VERSION: u16 = 1;
2359#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2360#[serde(rename_all = "snake_case")]
2361pub enum SubmissionState {
2362 NotSubmitted,
2363 Submitted,
2364 Resolved,
2365 KnownRetired,
2366 Indeterminate,
2367}
2368
2369pub const LODESTONE_API_EXPECTED_BINDING_FORMAT_VERSION: u16 = 1;
2370#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2371#[serde(deny_unknown_fields)]
2372pub struct ExpectedBinding {
2373 pub incarnation: Identity,
2374 pub revision: U64,
2375}
2376
2377pub const LODESTONE_API_ADMINISTRATION_ALIAS_ACTION_FORMAT_VERSION: u16 = 1;
2378#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2379#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2380pub enum AdministrationAliasAction {
2381 Put {
2382 name: String,
2383 #[serde(default, skip_serializing_if = "Option::is_none")]
2384 expected_revision: Option<U64>,
2385 targets: Vec<AliasTarget>,
2386 #[serde(default, skip_serializing_if = "Option::is_none")]
2387 filter: Option<RawJson>,
2388 #[serde(default, skip_serializing_if = "Option::is_none")]
2389 index_routing: Option<String>,
2390 #[serde(default, skip_serializing_if = "Option::is_none")]
2391 search_routing: Option<String>,
2392 },
2393 Delete {
2394 name: String,
2395 expected_revision: U64,
2396 },
2397}
2398
2399pub const LODESTONE_API_ADMINISTRATION_MUTATION_FORMAT_VERSION: u16 = 1;
2400#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2401#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2402pub enum AdministrationMutation {
2403 ApplyAliasActions {
2404 actions: Vec<AdministrationAliasAction>,
2405 },
2406 PutComponentTemplate {
2407 name: String,
2408 #[serde(default, skip_serializing_if = "Option::is_none")]
2409 expected: Option<ExpectedBinding>,
2410 mapping: Mapping,
2411 settings: RawJson,
2412 #[serde(default, skip_serializing_if = "Option::is_none")]
2413 resource_spec: Option<IndexResourceSpec>,
2414 },
2415 DeleteComponentTemplate {
2416 name: String,
2417 expected: ExpectedBinding,
2418 },
2419 PutIndexTemplate {
2420 name: String,
2421 #[serde(default, skip_serializing_if = "Option::is_none")]
2422 expected: Option<ExpectedBinding>,
2423 priority: i32,
2424 data_stream: bool,
2425 index_patterns: Vec<String>,
2426 components: Vec<ExpectedBinding>,
2427 mapping: Mapping,
2428 settings: RawJson,
2429 #[serde(default, skip_serializing_if = "Option::is_none")]
2430 resource_spec: Option<IndexResourceSpec>,
2431 },
2432 DeleteIndexTemplate {
2433 name: String,
2434 expected: ExpectedBinding,
2435 },
2436 PutIngestPipeline {
2437 name: String,
2438 #[serde(default, skip_serializing_if = "Option::is_none")]
2439 expected: Option<ExpectedBinding>,
2440 definition: RawJson,
2441 },
2442 DeleteIngestPipeline {
2443 name: String,
2444 expected: ExpectedBinding,
2445 },
2446 PutLifecyclePolicy {
2447 name: String,
2448 #[serde(default, skip_serializing_if = "Option::is_none")]
2449 expected: Option<ExpectedBinding>,
2450 rollover: RolloverThresholds,
2451 retention: RetentionPolicy,
2452 merge_hint: bool,
2453 freeze_hint: bool,
2454 delete_expired: bool,
2455 },
2456 DeleteLifecyclePolicy {
2457 name: String,
2458 expected: ExpectedBinding,
2459 },
2460 CreateDataStream {
2461 name: String,
2462 timestamp_field: String,
2463 index_template: ExpectedBinding,
2464 #[serde(default, skip_serializing_if = "Option::is_none")]
2465 lifecycle_policy: Option<ExpectedBinding>,
2466 },
2467 DeleteDataStream {
2468 name: String,
2469 expected_revision: U64,
2470 },
2471 RolloverDataStream {
2472 name: String,
2473 expected_revision: U64,
2474 },
2475}
2476
2477pub const LODESTONE_API_ADMINISTRATION_OUTCOME_FORMAT_VERSION: u16 = 1;
2478#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2479#[serde(deny_unknown_fields)]
2480pub struct AdministrationOutcome {
2481 pub action_id: Digest,
2482 pub authority_revision: U64,
2483 pub state: String,
2484 #[serde(default, skip_serializing_if = "Option::is_none")]
2485 pub resource: Option<Resource>,
2486}
2487
2488pub const LODESTONE_API_INDEX_CHANGE_APPLY_RECEIPT_FORMAT_VERSION: u16 = 1;
2489#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2490#[serde(deny_unknown_fields)]
2491pub struct IndexChangeApplyReceipt {
2492 pub action_id: Digest,
2493 pub semantic_digest: Digest,
2494 pub index: Resource,
2495 pub revision: U64,
2496 pub schema_generation: U64,
2497 pub state: String,
2498}
2499
2500pub const LODESTONE_API_BACKUP_ENCRYPTION_POLICY_FORMAT_VERSION: u16 = 1;
2501#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2502#[serde(deny_unknown_fields)]
2503pub struct BackupEncryptionPolicy {
2504 pub backend_authority: String,
2505 pub policy_id: String,
2506 pub key_digest: Digest,
2507 pub encrypted: bool,
2508}
2509
2510pub const LODESTONE_API_BACKUP_CREATE_OUTCOME_FORMAT_VERSION: u16 = 1;
2511#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2512#[serde(deny_unknown_fields)]
2513pub struct BackupCreateOutcome {
2514 pub action_id: Digest,
2515 pub backup_id: Identity,
2516 pub operation: Operation,
2517 pub submitted: bool,
2518}
2519
2520pub const LODESTONE_API_BULK_DOCUMENT_ITEM_FORMAT_VERSION: u16 = 1;
2521#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2522#[serde(deny_unknown_fields)]
2523pub struct BulkDocumentItem {
2524 pub item_action_id: Digest,
2525 pub document_id: String,
2526 pub operation: String,
2527 #[serde(default, skip_serializing_if = "Option::is_none")]
2528 pub source: Option<RawJson>,
2529 #[serde(default, skip_serializing_if = "Option::is_none")]
2530 pub routing: Option<String>,
2531 #[serde(default, skip_serializing_if = "Option::is_none")]
2532 pub condition: Option<DocumentMutationCondition>,
2533 #[serde(default, skip_serializing_if = "Option::is_none")]
2534 pub pipeline: Option<IngestPipelineSelection>,
2535 pub semantic_digest: Digest,
2536}
2537
2538pub const LODESTONE_API_BULK_DOCUMENT_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
2539#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2540#[serde(deny_unknown_fields)]
2541pub struct BulkDocumentItemOutcome {
2542 pub item_action_id: Digest,
2543 #[serde(default, skip_serializing_if = "Option::is_none")]
2544 pub locator: Option<Locator>,
2545 pub state: SubmissionState,
2546 #[serde(default, skip_serializing_if = "Option::is_none")]
2547 pub sequence: Option<U64>,
2548 #[serde(default, skip_serializing_if = "Option::is_none")]
2549 pub mapping_generation: Option<U64>,
2550 pub mapping_adopted: bool,
2551 pub no_document_effect: bool,
2552 #[serde(default, skip_serializing_if = "Option::is_none")]
2553 pub error: Option<ErrorBody>,
2554}
2555
2556pub const LODESTONE_API_BULK_DOCUMENT_OUTCOME_FORMAT_VERSION: u16 = 1;
2557#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2558#[serde(deny_unknown_fields)]
2559pub struct BulkDocumentOutcome {
2560 pub batch_id: Digest,
2561 pub index: Resource,
2562 pub items: Vec<BulkDocumentItemOutcome>,
2563 pub complete: bool,
2564}
2565
2566pub const LODESTONE_API_RETAINED_APPEND_ITEM_FORMAT_VERSION: u16 = 1;
2567#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2568#[serde(deny_unknown_fields)]
2569pub struct RetainedAppendItem {
2570 pub item_action_id: Digest,
2571 pub document_id: String,
2572 pub source: RawJson,
2573}
2574
2575pub const LODESTONE_API_RETAINED_APPEND_STATE_FORMAT_VERSION: u16 = 1;
2576#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2577#[serde(rename_all = "snake_case")]
2578pub enum RetainedAppendState {
2579 Prepared,
2580 Committed,
2581 Replayed,
2582 Conflict,
2583 NotSubmittedRetryable,
2584 NotSubmittedTerminal,
2585 SubmittedIndeterminate,
2586 Retired,
2587}
2588
2589pub const LODESTONE_API_RETAINED_APPEND_RETRY_SAFETY_FORMAT_VERSION: u16 = 1;
2590#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2591#[serde(rename_all = "snake_case")]
2592pub enum RetainedAppendRetrySafety {
2593 Safe,
2594 ResolveOnly,
2595 Terminal,
2596}
2597
2598pub const LODESTONE_API_RETAINED_APPEND_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
2599#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2600#[serde(deny_unknown_fields)]
2601pub struct RetainedAppendItemOutcome {
2602 pub item_action_id: Digest,
2603 #[serde(default, skip_serializing_if = "Option::is_none")]
2604 pub locator: Option<Locator>,
2605 #[serde(default, skip_serializing_if = "Option::is_none")]
2606 pub semantic_digest: Option<Digest>,
2607 pub state: RetainedAppendState,
2608 pub retry_safety: RetainedAppendRetrySafety,
2609 #[serde(default, skip_serializing_if = "Option::is_none")]
2610 pub sequence: Option<U64>,
2611 #[serde(default, skip_serializing_if = "Option::is_none")]
2612 pub primary_term: Option<U64>,
2613 #[serde(default, skip_serializing_if = "Option::is_none")]
2614 pub error: Option<ErrorBody>,
2615}
2616
2617pub const LODESTONE_API_RETAINED_APPEND_BULK_OUTCOME_FORMAT_VERSION: u16 = 1;
2618#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2619#[serde(deny_unknown_fields)]
2620pub struct RetainedAppendBulkOutcome {
2621 pub batch_id: Digest,
2622 pub index: Resource,
2623 pub items: Vec<RetainedAppendItemOutcome>,
2624 pub complete: bool,
2625}
2626
2627pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_STATE_FORMAT_VERSION: u16 = 1;
2628#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2629#[serde(rename_all = "snake_case")]
2630pub enum RetainedAppendObservationState {
2631 Visible,
2632 Pending,
2633 SubmittedIndeterminate,
2634 Conflict,
2635 Retired,
2636}
2637
2638pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_OUTCOME_FORMAT_VERSION: u16 = 1;
2639#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2640#[serde(deny_unknown_fields)]
2641pub struct RetainedAppendObservationOutcome {
2642 pub index: Resource,
2643 pub locator: Locator,
2644 pub state: RetainedAppendObservationState,
2645 #[serde(default, skip_serializing_if = "Option::is_none")]
2646 pub sequence: Option<U64>,
2647 #[serde(default, skip_serializing_if = "Option::is_none")]
2648 pub primary_term: Option<U64>,
2649}
2650
2651pub const LODESTONE_API_BINARY_VALUE_FORMAT_VERSION: u16 = 1;
2652#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2653#[serde(deny_unknown_fields)]
2654pub struct BinaryValue {
2655 pub bytes_base64: String,
2656}
2657
2658pub const LODESTONE_API_STATE_HASH_FIELD_FORMAT_VERSION: u16 = 1;
2659#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2660#[serde(deny_unknown_fields)]
2661pub struct StateHashField {
2662 pub field: BinaryValue,
2663 pub value: BinaryValue,
2664}
2665
2666pub const LODESTONE_API_STATE_SET_ENTRY_FORMAT_VERSION: u16 = 1;
2667#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2668#[serde(deny_unknown_fields)]
2669pub struct StateSetEntry {
2670 pub key: BinaryValue,
2671 pub value: BinaryValue,
2672}
2673
2674pub const LODESTONE_API_STATE_SET_CONDITION_FORMAT_VERSION: u16 = 1;
2675#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2676#[serde(rename_all = "snake_case")]
2677pub enum StateSetCondition {
2678 Always,
2679 IfAbsent,
2680 IfPresent,
2681}
2682
2683pub const LODESTONE_API_STATE_OPERATION_FORMAT_VERSION: u16 = 1;
2684#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2685#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2686pub enum StateOperation {
2687 Get {
2688 key: BinaryValue,
2689 },
2690 Set {
2691 key: BinaryValue,
2692 value: BinaryValue,
2693 condition: StateSetCondition,
2694 #[serde(default, skip_serializing_if = "Option::is_none")]
2695 expires_at_millis: Option<U64>,
2696 },
2697 Delete {
2698 keys: Vec<BinaryValue>,
2699 },
2700 Exists {
2701 keys: Vec<BinaryValue>,
2702 },
2703 ExpireAt {
2704 key: BinaryValue,
2705 absolute_millis: U64,
2706 },
2707 TtlStatus {
2708 key: BinaryValue,
2709 },
2710 Persist {
2711 key: BinaryValue,
2712 },
2713 MultiGet {
2714 keys: Vec<BinaryValue>,
2715 },
2716 MultiSet {
2717 entries: Vec<StateSetEntry>,
2718 },
2719 Increment {
2720 key: BinaryValue,
2721 delta: I64,
2722 },
2723 HashGet {
2724 key: BinaryValue,
2725 field: BinaryValue,
2726 },
2727 HashSet {
2728 key: BinaryValue,
2729 fields: Vec<StateHashField>,
2730 },
2731 HashGetAll {
2732 key: BinaryValue,
2733 },
2734}
2735
2736pub const LODESTONE_API_STATE_OPTIONAL_VALUE_FORMAT_VERSION: u16 = 1;
2737#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2738#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
2739pub enum StateOptionalValue {
2740 Missing,
2741 Value { value: BinaryValue },
2742}
2743
2744pub const LODESTONE_API_STATE_COMMAND_RESULT_FORMAT_VERSION: u16 = 1;
2745#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2746#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2747pub enum StateCommandResult {
2748 Get {
2749 value: StateOptionalValue,
2750 },
2751 Set {
2752 applied: bool,
2753 },
2754 Delete {
2755 removed: u32,
2756 },
2757 Exists {
2758 count: u32,
2759 },
2760 Expire {
2761 changed: bool,
2762 },
2763 TtlStatus {
2764 state: String,
2765 #[serde(default, skip_serializing_if = "Option::is_none")]
2766 remaining_millis: Option<U64>,
2767 },
2768 Persist {
2769 changed: bool,
2770 },
2771 MultiGet {
2772 values: Vec<StateOptionalValue>,
2773 },
2774 MultiSet {
2775 written: u32,
2776 },
2777 Increment {
2778 value: I64,
2779 },
2780 HashGet {
2781 value: StateOptionalValue,
2782 },
2783 HashSet {
2784 fields_added: u32,
2785 },
2786 HashGetAll {
2787 fields: Vec<StateHashField>,
2788 },
2789}
2790
2791pub const LODESTONE_API_STATE_WRITE_RESOLUTION_FORMAT_VERSION: u16 = 1;
2792#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2793#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
2794pub enum StateWriteResolution {
2795 NotSubmitted,
2796 Resolved {
2797 result: StateCommandResult,
2798 sequence: U64,
2799 },
2800 KnownRetired {
2801 retired_through: U64,
2802 },
2803 StateReset {
2804 submitted_reset_epoch: U64,
2805 current_reset_epoch: U64,
2806 },
2807 Indeterminate {
2808 #[serde(default, skip_serializing_if = "Option::is_none")]
2809 observed_high_water: Option<U64>,
2810 #[serde(default, skip_serializing_if = "Option::is_none")]
2811 current_high_water: Option<U64>,
2812 #[serde(default, skip_serializing_if = "Option::is_none")]
2813 retired_through: Option<U64>,
2814 },
2815}
2816
2817pub const LODESTONE_API_SERVICE_CREDENTIAL_RESERVATION_FORMAT_VERSION: u16 = 1;
2818#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2819#[serde(deny_unknown_fields)]
2820pub struct ServiceCredentialReservation {
2821 pub locator: Locator,
2822 pub reservation_action_id: Digest,
2823 pub activation_action_id: Digest,
2824 pub principal_id: Identity,
2825 pub api_key_id: Identity,
2826 pub generation: U64,
2827 pub reservation_expires_at: U64,
2828 pub credential_expires_at: U64,
2829 pub verifier_algorithm: String,
2830 pub verifier_algorithm_version: u32,
2831 pub required_secret_bytes: u32,
2832}
2833
2834pub const LODESTONE_API_SUBSCRIPTION_METADATA_FIELD_FORMAT_VERSION: u16 = 1;
2835#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2836#[serde(rename_all = "snake_case")]
2837pub enum SubscriptionMetadataField {
2838 Id,
2839 RoutingHash,
2840 Operation,
2841 Shard,
2842 Sequence,
2843}
2844
2845pub const LODESTONE_API_SUBSCRIPTION_FIELD_FORMAT_VERSION: u16 = 1;
2846#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2847#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2848pub enum SubscriptionField {
2849 Source { path: String },
2850 Metadata { field: SubscriptionMetadataField },
2851}
2852
2853pub const LODESTONE_API_SUBSCRIPTION_FILTER_FORMAT_VERSION: u16 = 1;
2854#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2855#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2856pub enum SubscriptionFilter {
2857 All,
2858 Bool {
2859 must: Vec<SubscriptionFilter>,
2860 should: Vec<SubscriptionFilter>,
2861 must_not: Vec<SubscriptionFilter>,
2862 minimum_should_match: u32,
2863 },
2864 Term {
2865 field: SubscriptionField,
2866 value: JsonValue,
2867 },
2868 Terms {
2869 field: SubscriptionField,
2870 values: Vec<JsonValue>,
2871 },
2872 Range {
2873 field: SubscriptionField,
2874 #[serde(default, skip_serializing_if = "Option::is_none")]
2875 gt: Option<JsonValue>,
2876 #[serde(default, skip_serializing_if = "Option::is_none")]
2877 gte: Option<JsonValue>,
2878 #[serde(default, skip_serializing_if = "Option::is_none")]
2879 lt: Option<JsonValue>,
2880 #[serde(default, skip_serializing_if = "Option::is_none")]
2881 lte: Option<JsonValue>,
2882 },
2883 Exists {
2884 field: SubscriptionField,
2885 },
2886 Prefix {
2887 field: SubscriptionField,
2888 value: String,
2889 },
2890}
2891
2892pub const LODESTONE_API_SUBSCRIPTION_CURSOR_ENTRY_FORMAT_VERSION: u16 = 1;
2893#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2894#[serde(deny_unknown_fields)]
2895pub struct SubscriptionCursorEntry {
2896 pub index: Resource,
2897 pub routing_revision: U64,
2898 pub recovery_era: Identity,
2899 pub shard_id: U64,
2900 pub sequence: U64,
2901}
2902
2903pub const LODESTONE_API_SUBSCRIPTION_ROUTE_FORMAT_VERSION: u16 = 1;
2904#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2905#[serde(deny_unknown_fields)]
2906pub struct SubscriptionRoute {
2907 pub index: Resource,
2908 pub routing_revision: U64,
2909 pub shard_ids: Vec<U64>,
2910}
2911
2912pub const LODESTONE_API_SUBSCRIPTION_START_POSITION_FORMAT_VERSION: u16 = 1;
2913#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2914#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2915pub enum SubscriptionStartPosition {
2916 FromNow,
2917 Resume {
2918 routes: Vec<SubscriptionRoute>,
2919 cut: Vec<SubscriptionCursorEntry>,
2920 },
2921}
2922
2923pub const LODESTONE_API_SUBSCRIPTION_START_FORMAT_VERSION: u16 = 1;
2924#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2925#[serde(deny_unknown_fields)]
2926pub struct SubscriptionStart {
2927 pub format_version: u32,
2928 pub request_id: String,
2929 pub index: Resource,
2930 #[serde(default, skip_serializing_if = "Option::is_none")]
2931 pub filter: Option<SubscriptionFilter>,
2932 pub include_deletes: bool,
2933 pub source_projection: Vec<String>,
2934 pub reconnect_attempt: u32,
2935 pub start: SubscriptionStartPosition,
2936 pub heartbeat_millis: U64,
2937 pub schema_digest: Digest,
2938}
2939
2940pub const LODESTONE_API_SUBSCRIPTION_ACCEPTED_FORMAT_VERSION: u16 = 1;
2941#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2942#[serde(deny_unknown_fields)]
2943pub struct SubscriptionAccepted {
2944 pub format_version: u32,
2945 pub routes: Vec<SubscriptionRoute>,
2946 pub accepted_cut: Vec<SubscriptionCursorEntry>,
2947 pub schema_digest: Digest,
2948}
2949
2950pub const LODESTONE_API_SUBSCRIPTION_WRITER_FENCE_FORMAT_VERSION: u16 = 1;
2951#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2952#[serde(deny_unknown_fields)]
2953pub struct SubscriptionWriterFence {
2954 pub recovery_era: Identity,
2955 pub epoch: u32,
2956}
2957
2958pub const LODESTONE_API_SUBSCRIPTION_EVENT_FORMAT_VERSION: u16 = 1;
2959#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2960#[serde(deny_unknown_fields)]
2961pub struct SubscriptionEvent {
2962 pub format_version: u32,
2963 pub event_id: Digest,
2964 pub index: Resource,
2965 pub shard_id: U64,
2966 pub recovery_era: Identity,
2967 pub writer_fence: SubscriptionWriterFence,
2968 pub routing_revision: U64,
2969 pub sequence: U64,
2970 pub operation: String,
2971 pub document_id: String,
2972 pub routing_hash: u32,
2973 #[serde(default, skip_serializing_if = "Option::is_none")]
2974 pub source: Option<RawJson>,
2975}
2976
2977pub const LODESTONE_API_SUBSCRIPTION_HEARTBEAT_FORMAT_VERSION: u16 = 1;
2978#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2979#[serde(deny_unknown_fields)]
2980pub struct SubscriptionHeartbeat {
2981 pub format_version: u32,
2982 pub confirmed_cut: Vec<SubscriptionCursorEntry>,
2983 pub route_revision: U64,
2984 pub authorization_revision: U64,
2985 pub authorization_valid_until_millis: U64,
2986}
2987
2988pub const LODESTONE_API_SUBSCRIPTION_GAP_FORMAT_VERSION: u16 = 1;
2989#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2990#[serde(deny_unknown_fields)]
2991pub struct SubscriptionGap {
2992 pub format_version: u32,
2993 pub affected: Vec<SubscriptionCursorEntry>,
2994 pub last_confirmed: Vec<SubscriptionCursorEntry>,
2995 pub earliest_available: Vec<SubscriptionCursorEntry>,
2996 pub reason: String,
2997 pub terminal: bool,
2998}
2999
3000pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_FORMAT_VERSION: u16 = 1;
3001#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3002#[serde(deny_unknown_fields)]
3003pub struct SubscriptionTerminal {
3004 pub format_version: u32,
3005 pub reason: String,
3006 pub retry_safe: bool,
3007}
3008
3009pub const LODESTONE_API_SUBSCRIPTION_FRAME_FORMAT_VERSION: u16 = 1;
3010#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3011#[serde(tag = "frame", rename_all = "snake_case", deny_unknown_fields)]
3012pub enum SubscriptionFrame {
3013 Accepted { body: SubscriptionAccepted },
3014 Event { body: SubscriptionEvent },
3015 Heartbeat { body: SubscriptionHeartbeat },
3016 Gap { body: SubscriptionGap },
3017 Terminal { body: SubscriptionTerminal },
3018}
3019
3020pub const LODESTONE_API_STREAM_BINDING_FORMAT_VERSION: u16 = 1;
3021#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3022#[serde(deny_unknown_fields)]
3023pub struct StreamBinding {
3024 pub name: String,
3025 pub transport: String,
3026 pub service: String,
3027 pub method: String,
3028 pub endpoint: String,
3029 pub auth_metadata: String,
3030 pub auth_scheme: String,
3031 pub semantic_format_version: u32,
3032 pub schema_digest: Digest,
3033}
3034
3035pub const LODESTONE_API_CAPABILITY_GRANT_FORMAT_VERSION: u16 = 1;
3036#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3037#[serde(deny_unknown_fields)]
3038pub struct CapabilityGrant {
3039 pub command: String,
3040 pub action: String,
3041 pub state: String,
3042 pub reason: String,
3043 pub mutation_class: String,
3044 pub cancellable: bool,
3045 pub workload_classes: Vec<WorkloadClass>,
3046 pub possible_submission_states: Vec<String>,
3047 pub capability_family: String,
3048 pub effect_class: String,
3049 pub risk_flags: Vec<String>,
3050 pub admissible_errors: Vec<String>,
3051 pub referenced_limits: Vec<String>,
3052 pub retry_safety: String,
3053 pub identity_requirement: String,
3054 #[serde(default, skip_serializing_if = "Option::is_none")]
3055 pub resolver_command: Option<String>,
3056 pub cancellation: String,
3057 pub side_effects: Vec<String>,
3058 pub recovery: String,
3059 pub index_patterns: Vec<String>,
3060 pub exact_index_incarnations: Vec<Identity>,
3061}
3062
3063pub const LODESTONE_API_PROTOCOL_LIMIT_FORMAT_VERSION: u16 = 1;
3064#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3065#[serde(deny_unknown_fields)]
3066pub struct ProtocolLimit {
3067 pub id: String,
3068 pub default: U64,
3069 pub maximum: U64,
3070 pub unit: String,
3071}
3072
3073pub const LODESTONE_API_DOCUMENT_MUTATION_CONDITION_FORMAT_VERSION: u16 = 1;
3074#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3075#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3076pub enum DocumentMutationCondition {
3077 Any,
3078 MustNotExist,
3079 IfSeqNo { seq_no: U64 },
3080 IfSeqNoAndPrimaryTerm { seq_no: U64, primary_term: U64 },
3081}
3082
3083pub const LODESTONE_API_AUDIT_EVENT_FORMAT_VERSION: u16 = 1;
3084#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3085#[serde(deny_unknown_fields)]
3086pub struct AuditEvent {
3087 pub sequence: U64,
3088 pub server_time: U64,
3089 #[serde(default, skip_serializing_if = "Option::is_none")]
3090 pub principal_id: Option<Identity>,
3091 #[serde(default, skip_serializing_if = "Option::is_none")]
3092 pub api_key_id: Option<Identity>,
3093 pub policy_revision: U64,
3094 pub action: String,
3095 pub outcome: String,
3096 pub detail: String,
3097}
3098
3099pub const LODESTONE_API_AUDIT_GAP_FORMAT_VERSION: u16 = 1;
3100#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3101#[serde(deny_unknown_fields)]
3102pub struct AuditGap {
3103 pub first_sequence: U64,
3104 pub last_sequence: U64,
3105 pub reason: String,
3106}
3107
3108pub const LODESTONE_API_SERVICE_CREDENTIAL_GRANT_FORMAT_VERSION: u16 = 1;
3109#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3110#[serde(deny_unknown_fields)]
3111pub struct ServiceCredentialGrant {
3112 pub role_name: String,
3113 pub role_version: U64,
3114}
3115
3116pub const LODESTONE_API_SERVICE_CREDENTIAL_SUMMARY_FORMAT_VERSION: u16 = 1;
3117#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3118#[serde(deny_unknown_fields)]
3119pub struct ServiceCredentialSummary {
3120 pub principal_id: Identity,
3121 pub api_key_id: Identity,
3122 pub generation: U64,
3123 pub state: String,
3124 #[serde(default, skip_serializing_if = "Option::is_none")]
3125 pub expires_at: Option<U64>,
3126 pub grants: Vec<ServiceCredentialGrant>,
3127}
3128
3129pub const LODESTONE_API_SECURITY_ROLE_FORMAT_VERSION: u16 = 1;
3130#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3131#[serde(deny_unknown_fields)]
3132pub struct SecurityRole {
3133 pub role_name: String,
3134 pub version: U64,
3135 pub permissions: Vec<String>,
3136 pub delegable_permissions: Vec<String>,
3137 pub allowed_workload_classes: Vec<WorkloadClass>,
3138 pub index_patterns: Vec<String>,
3139 pub append_index_incarnations: Vec<Identity>,
3140}
3141
3142pub const LODESTONE_API_ROLE_APPEND_SCOPE_CHANGE_FORMAT_VERSION: u16 = 1;
3143#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3144#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3145pub enum RoleAppendScopeChange {
3146 Add { index: Resource },
3147 Remove { index_incarnation: Identity },
3148}
3149
3150pub const LODESTONE_API_ROLE_APPEND_ACCESS_PREPARATION_FORMAT_VERSION: u16 = 1;
3151#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3152#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
3153pub enum RoleAppendAccessPreparation {
3154 Prepared {
3155 locator: Locator,
3156 semantic_digest: Digest,
3157 expires_at: U64,
3158 predecessor_role_version: U64,
3159 successor_role_version: U64,
3160 },
3161 AlreadySatisfied {
3162 role: SecurityRole,
3163 },
3164}
3165
3166pub const LODESTONE_API_SECURITY_ACTION_OUTCOME_FORMAT_VERSION: u16 = 1;
3167#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3168#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3169pub enum SecurityActionOutcome {
3170 Reserved {
3171 principal_id: Identity,
3172 api_key_id: Identity,
3173 generation: U64,
3174 },
3175 Activated {
3176 principal_id: Identity,
3177 api_key_id: Identity,
3178 generation: U64,
3179 },
3180 Revoked {
3181 principal_id: Identity,
3182 api_key_id: Identity,
3183 generation: U64,
3184 },
3185 Retired {
3186 principal_id: Identity,
3187 api_key_id: Identity,
3188 generation: U64,
3189 },
3190}
3191
3192pub const LODESTONE_API_MAINTENANCE_WORK_STATE_FORMAT_VERSION: u16 = 1;
3193#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3194#[serde(rename_all = "snake_case")]
3195pub enum MaintenanceWorkState {
3196 ParkedOperatorRequired,
3197 RetryWait,
3198 RetryReady,
3199 Leased,
3200 Deferred,
3201 Runnable,
3202}
3203
3204pub const LODESTONE_API_MAINTENANCE_ATTEMPT_STATE_FORMAT_VERSION: u16 = 1;
3205#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3206#[serde(rename_all = "snake_case")]
3207pub enum MaintenanceAttemptState {
3208 Running,
3209 DeadlineExceededDraining,
3210 DeadlineExceededReclaimPending,
3211 CancellationDraining,
3212 ClaimRecoveryPending,
3213}
3214
3215pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_FORMAT_VERSION: u16 = 1;
3216#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3217#[serde(rename_all = "snake_case")]
3218pub enum MaintenanceFailureClass {
3219 Corruption,
3220 AttemptBudget,
3221 StructuralLimit,
3222 Execution,
3223 Other,
3224}
3225
3226pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_COUNT_FORMAT_VERSION: u16 = 1;
3227#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3228#[serde(deny_unknown_fields)]
3229pub struct MaintenanceFailureClassCount {
3230 pub class: MaintenanceFailureClass,
3231 pub count: U64,
3232}
3233
3234pub const LODESTONE_API_MAINTENANCE_ATTEMPT_OBSERVATION_FORMAT_VERSION: u16 = 1;
3235#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3236#[serde(deny_unknown_fields)]
3237pub struct MaintenanceAttemptObservation {
3238 pub state: MaintenanceAttemptState,
3239 pub lease_epoch: U64,
3240 pub lease_expires_at: U64,
3241 pub observed_at_millis: U64,
3242}
3243
3244pub const LODESTONE_API_MAINTENANCE_TASK_SCOPE_FORMAT_VERSION: u16 = 1;
3245#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3246#[serde(deny_unknown_fields)]
3247pub struct MaintenanceTaskScope {
3248 pub kind: String,
3249 #[serde(default, skip_serializing_if = "Option::is_none")]
3250 pub index: Option<Resource>,
3251 #[serde(default, skip_serializing_if = "Option::is_none")]
3252 pub shard_id: Option<u32>,
3253}
3254
3255pub const LODESTONE_API_MAINTENANCE_TASK_STATUS_FORMAT_VERSION: u16 = 1;
3256#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3257#[serde(deny_unknown_fields)]
3258pub struct MaintenanceTaskStatus {
3259 pub task_id: Identity,
3260 pub kind: String,
3261 pub scope: MaintenanceTaskScope,
3262 pub checkpoint_generation: U64,
3263 pub attempt_count: u32,
3264 pub admitted_at: U64,
3265 pub last_transition_at: U64,
3266 pub last_progress_at: U64,
3267 pub work_state: MaintenanceWorkState,
3268 pub state_since: U64,
3269 #[serde(default, skip_serializing_if = "Option::is_none")]
3270 pub defer_reason: Option<String>,
3271 pub cancellation_requested: bool,
3272 #[serde(default, skip_serializing_if = "Option::is_none")]
3273 pub retry_not_before: Option<U64>,
3274 #[serde(default, skip_serializing_if = "Option::is_none")]
3275 pub failure_at: Option<U64>,
3276 #[serde(default, skip_serializing_if = "Option::is_none")]
3277 pub lease_acquired_at: Option<U64>,
3278 #[serde(default, skip_serializing_if = "Option::is_none")]
3279 pub lease_expires_at: Option<U64>,
3280 #[serde(default, skip_serializing_if = "Option::is_none")]
3281 pub failure_class: Option<MaintenanceFailureClass>,
3282 #[serde(default, skip_serializing_if = "Option::is_none")]
3283 pub failure_code: Option<String>,
3284 pub operator_action_required: bool,
3285 #[serde(default, skip_serializing_if = "Option::is_none")]
3286 pub local_attempt: Option<MaintenanceAttemptObservation>,
3287}
3288
3289pub const LODESTONE_API_MAINTENANCE_STATUS_AGGREGATE_FORMAT_VERSION: u16 = 1;
3290#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3291#[serde(deny_unknown_fields)]
3292pub struct MaintenanceStatusAggregate {
3293 pub format_version: u32,
3294 pub recovery_era: Identity,
3295 pub source_revision: U64,
3296 pub root_revision: U64,
3297 pub logical_observation_time: U64,
3298 #[serde(default, skip_serializing_if = "Option::is_none")]
3299 pub local_observation_millis: Option<U64>,
3300 pub total_incomplete: U64,
3301 pub parked_operator_required: U64,
3302 pub retry_wait: U64,
3303 pub retry_ready: U64,
3304 pub leased: U64,
3305 pub deferred: U64,
3306 pub runnable: U64,
3307 pub eligible_backlog: U64,
3308 pub cancellation_requested: U64,
3309 #[serde(default, skip_serializing_if = "Option::is_none")]
3310 pub oldest_backlog_age: Option<U64>,
3311 #[serde(default, skip_serializing_if = "Option::is_none")]
3312 pub oldest_runnable_age: Option<U64>,
3313 #[serde(default, skip_serializing_if = "Option::is_none")]
3314 pub oldest_retry_wait_age: Option<U64>,
3315 #[serde(default, skip_serializing_if = "Option::is_none")]
3316 pub oldest_parked_age: Option<U64>,
3317 #[serde(default, skip_serializing_if = "Option::is_none")]
3318 pub oldest_no_progress_age: Option<U64>,
3319 pub current_action_capacity: u32,
3320 pub maximum_action_capacity: u32,
3321 pub active_passes: U64,
3322 pub local_in_flight: U64,
3323 pub deadline_draining: U64,
3324 pub cancellation_draining: U64,
3325 pub claim_recovery_pending: U64,
3326 pub projection_refresh_pending: bool,
3327 #[serde(default, skip_serializing_if = "Option::is_none")]
3328 pub durable_last_progress_at: Option<U64>,
3329 pub tasks_claimed_total: U64,
3330 pub tasks_progressed_total: U64,
3331 pub tasks_completed_total: U64,
3332 pub task_retries_total: U64,
3333 pub task_failures_total: U64,
3334 pub deadline_failures_total: U64,
3335 pub cancellations_total: U64,
3336 pub overlay_capacity_exhaustions_total: U64,
3337 pub failure_classes: Vec<MaintenanceFailureClassCount>,
3338}
3339
3340pub const LODESTONE_API_RUNTIME_STATUS_DETAIL_FORMAT_VERSION: u16 = 1;
3341#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3342#[serde(deny_unknown_fields)]
3343pub struct RuntimeStatusDetail {
3344 pub metastore_revision: U64,
3345 pub root_revision: U64,
3346 pub logical_time: U64,
3347 pub degraded_dependencies: Vec<String>,
3348}
3349
3350pub const LODESTONE_API_RESULT_CACHE_STATUS_FORMAT_VERSION: u16 = 2;
3351#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3352#[serde(deny_unknown_fields)]
3353pub struct ResultCacheStatus {
3354 pub format_version: u32,
3355 pub hits: U64,
3356 pub misses: U64,
3357 pub admissions: U64,
3358 pub bypasses: U64,
3359 pub evictions: U64,
3360 pub collection_bytes: U64,
3361 pub collection_entries: u32,
3362}
3363
3364pub const LODESTONE_API_FIELD_PROMOTION_STATUS_FORMAT_VERSION: u16 = 1;
3365#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3366#[serde(deny_unknown_fields)]
3367pub struct FieldPromotionStatus {
3368 pub format_version: u32,
3369 pub index: Resource,
3370 pub mapping_generation: U64,
3371 pub policy_generation: U64,
3372 #[serde(default, skip_serializing_if = "Option::is_none")]
3373 pub last_decision_generation: Option<U64>,
3374 pub heat_records: u32,
3375 pub promoted_fields: u32,
3376 pub extra_bytes: U64,
3377 pub enabled: bool,
3378}
3379
3380pub const LODESTONE_API_OVERLOAD_SHARD_STATUS_FORMAT_VERSION: u16 = 2;
3381#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3382#[serde(deny_unknown_fields)]
3383pub struct OverloadShardStatus {
3384 pub format_version: u32,
3385 pub shard_id: u32,
3386 pub writer_epoch: U64,
3387 pub configured_mode: String,
3388 pub effective_disposition: String,
3389 pub registered_through: U64,
3390 pub indexed_through: U64,
3391 pub lag_operations: U64,
3392 pub backlog_bytes: U64,
3393 pub oldest_age_millis: U64,
3394 pub collection_share_bytes: U64,
3395 pub recovery_ops_this_pass: u32,
3396 pub pending_overlay_documents: U64,
3397 #[serde(default, skip_serializing_if = "Option::is_none")]
3398 pub shed_reason: Option<String>,
3399}
3400
3401pub const LODESTONE_API_EXTERNAL_KEY_BINDING_FORMAT_VERSION: u16 = 1;
3402#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3403#[serde(deny_unknown_fields)]
3404pub struct ExternalKeyBinding {
3405 pub content_key_id: Identity,
3406 pub content_key_generation: U64,
3407 pub binding_id: Identity,
3408 pub binding_generation: U64,
3409 pub access_generation: U64,
3410 pub opaque_binding_base64: String,
3411 pub object_context_digest: Digest,
3412}
3413
3414pub const LODESTONE_API_ROLLUP_MEASURE_FORMAT_VERSION: u16 = 1;
3415#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3416#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3417pub enum RollupMeasure {
3418 Count,
3419 Sum { field_path_digest: Digest },
3420 Min { field_path_digest: Digest },
3421 Max { field_path_digest: Digest },
3422}
3423
3424pub const LODESTONE_API_AGGREGATE_THEN_DELETE_POLICY_FORMAT_VERSION: u16 = 1;
3425#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3426#[serde(deny_unknown_fields)]
3427pub struct AggregateThenDeletePolicy {
3428 pub policy_id: Identity,
3429 pub policy_generation: U64,
3430 pub detail_retirement_acknowledged: bool,
3431 #[serde(default, skip_serializing_if = "Option::is_none")]
3432 pub expected_policy_generation: Option<U64>,
3433 pub timestamp_field_digest: Digest,
3434 pub bucket_width_millis: U64,
3435 pub bucket_alignment_millis: U64,
3436 pub dimensions: Vec<Digest>,
3437 pub measures: Vec<RollupMeasure>,
3438}
3439
3440pub const LODESTONE_API_LIFECYCLE_BINDING_STATUS_FORMAT_VERSION: u16 = 1;
3441#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3442#[serde(deny_unknown_fields)]
3443pub struct LifecycleBindingStatus {
3444 pub content_key_id: Identity,
3445 pub content_key_generation: U64,
3446 pub binding_id: Identity,
3447 pub binding_generation: U64,
3448 pub access_generation: U64,
3449}
3450
3451pub const LODESTONE_API_LIFECYCLE_ROLLUP_STATUS_FORMAT_VERSION: u16 = 1;
3452#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3453#[serde(deny_unknown_fields)]
3454pub struct LifecycleRollupStatus {
3455 pub policy_id: Identity,
3456 pub policy_generation: U64,
3457 pub ledger_revision: U64,
3458 pub coverages: u32,
3459 pub raw_retired_coverages: u32,
3460 pub detail_retirement_acknowledged: bool,
3461 pub query_contract_version: u32,
3462 pub timestamp_field_digest: Digest,
3463 pub bucket_width_millis: U64,
3464 pub bucket_alignment_millis: U64,
3465 pub dimensions: Vec<Digest>,
3466 pub measures: Vec<RollupMeasure>,
3467}
3468
3469pub const LODESTONE_API_LIFECYCLE_STATUS_FORMAT_VERSION: u16 = 2;
3470#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3471#[serde(deny_unknown_fields)]
3472pub struct LifecycleStatus {
3473 pub format_version: u32,
3474 pub index: Resource,
3475 pub authority_revision: U64,
3476 pub active_bindings: Vec<LifecycleBindingStatus>,
3477 #[serde(default, skip_serializing_if = "Option::is_none")]
3478 pub rollup: Option<LifecycleRollupStatus>,
3479}
3480
3481pub const LODESTONE_API_QUOTA_LIMIT_FORMAT_VERSION: u16 = 1;
3482#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3483#[serde(deny_unknown_fields)]
3484pub struct QuotaLimit {
3485 pub dimension: String,
3486 pub maximum: U64,
3487 pub window_millis: U64,
3488}
3489
3490pub const LODESTONE_API_QUOTA_CONSUMPTION_FORMAT_VERSION: u16 = 1;
3491#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3492#[serde(deny_unknown_fields)]
3493pub struct QuotaConsumption {
3494 pub dimension: String,
3495 pub consumed: U64,
3496 pub window_millis: U64,
3497}
3498
3499pub const LODESTONE_API_QUOTA_UPDATE_FORMAT_VERSION: u16 = 1;
3500#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3501#[serde(deny_unknown_fields)]
3502pub struct QuotaUpdate {
3503 pub revision: U64,
3504 pub state: String,
3505}
3506
3507pub const LODESTONE_API_CORE_BINDING_FORMAT_VERSION: u16 = 2;
3508#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3509#[serde(deny_unknown_fields)]
3510pub struct CoreBinding {
3511 pub cluster_id: Identity,
3512 pub collection_id: Identity,
3513 pub configuration_generation: U64,
3514 pub native_endpoints: Vec<String>,
3515 pub selected_stream_endpoint: String,
3516 pub schema_id: String,
3517 pub schema_digest: Digest,
3518}
3519
3520pub const LODESTONE_API_READINESS_OBSERVATION_FORMAT_VERSION: u16 = 1;
3521#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3522#[serde(deny_unknown_fields)]
3523pub struct ReadinessObservation {
3524 pub subject: String,
3525 pub state: String,
3526 #[serde(default, skip_serializing_if = "Option::is_none")]
3527 pub reason: Option<String>,
3528 pub revision: U64,
3529 pub observed_cut: U64,
3530}
3531
3532pub const LODESTONE_API_USAGE_DIMENSION_FORMAT_VERSION: u16 = 1;
3533#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3534#[serde(deny_unknown_fields)]
3535pub struct UsageDimension {
3536 pub name: String,
3537 pub value: String,
3538}
3539
3540pub const LODESTONE_API_PHYSICAL_USAGE_VALUE_FORMAT_VERSION: u16 = 2;
3541#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3542#[serde(deny_unknown_fields)]
3543pub struct PhysicalUsageValue {
3544 pub meter: String,
3545 pub unit: String,
3546 pub value: ExactDecimal,
3547}
3548
3549pub const LODESTONE_API_CORE_USAGE_UNITS_FORMAT_VERSION: u16 = 2;
3550#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3551#[serde(deny_unknown_fields)]
3552pub struct CoreUsageUnits {
3553 pub sequence: U64,
3554 pub record_identity: Digest,
3555 pub index_id: Identity,
3556 pub workload_class: WorkloadClass,
3557 pub window_start: U64,
3558 pub window_end: U64,
3559 pub meter_set_version: u32,
3560 pub dimensions: Vec<UsageDimension>,
3561 pub values: Vec<PhysicalUsageValue>,
3562 pub authority_revision: U64,
3563 pub source_digest: Digest,
3564}
3565
3566pub const LODESTONE_API_CORE_USAGE_CORRECTION_FORMAT_VERSION: u16 = 2;
3567#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3568#[serde(deny_unknown_fields)]
3569pub struct CoreUsageCorrection {
3570 pub sequence: U64,
3571 pub correction_sequence: U64,
3572 pub correction_identity: Digest,
3573 pub target_record_identity: Digest,
3574 pub index_id: Identity,
3575 pub workload_class: WorkloadClass,
3576 pub window_start: U64,
3577 pub window_end: U64,
3578 pub meter_set_version: u32,
3579 pub dimensions: Vec<UsageDimension>,
3580 pub values: Vec<PhysicalUsageValue>,
3581 pub reason_digest: Digest,
3582 pub authority_revision: U64,
3583 pub source_digest: Digest,
3584}
3585
3586pub const LODESTONE_API_ERROR_DETAIL_FORMAT_VERSION: u16 = 1;
3587#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3588#[serde(tag = "code", rename_all = "snake_case", deny_unknown_fields)]
3589pub enum ErrorDetail {
3590 Aborted {
3591 reason: String,
3592 },
3593 DeadlineExceeded {
3594 submitted: bool,
3595 },
3596 InvalidRequest {
3597 #[serde(default, skip_serializing_if = "Option::is_none")]
3598 field: Option<String>,
3599 reason: String,
3600 },
3601 UnsupportedVersion {
3602 observed: u32,
3603 maximum_supported: u32,
3604 },
3605 Unauthenticated,
3606 PermissionDenied {
3607 #[serde(default, skip_serializing_if = "Option::is_none")]
3608 action: Option<String>,
3609 #[serde(default, skip_serializing_if = "Option::is_none")]
3610 workload_class: Option<WorkloadClass>,
3611 },
3612 NotFound {
3613 #[serde(default, skip_serializing_if = "Option::is_none")]
3614 resource: Option<String>,
3615 },
3616 Conflict {
3617 #[serde(default, skip_serializing_if = "Option::is_none")]
3618 expected_revision: Option<U64>,
3619 #[serde(default, skip_serializing_if = "Option::is_none")]
3620 observed_revision: Option<U64>,
3621 },
3622 StaleCursor {
3623 restart_count: u32,
3624 },
3625 RestartBudgetExhausted {
3626 maximum_restarts: u32,
3627 },
3628 LimitExceeded {
3629 limit_id: String,
3630 maximum: U64,
3631 },
3632 CapabilityUnavailable {
3633 #[serde(default, skip_serializing_if = "Option::is_none")]
3634 capability: Option<String>,
3635 },
3636 NotSubmitted {
3637 #[serde(default, skip_serializing_if = "Option::is_none")]
3638 retry_after_millis: Option<U64>,
3639 },
3640 SubmittedIndeterminate {
3641 #[serde(default, skip_serializing_if = "Option::is_none")]
3642 locator: Option<Locator>,
3643 },
3644 ExpiredUnknown {
3645 #[serde(default, skip_serializing_if = "Option::is_none")]
3646 locator: Option<Locator>,
3647 },
3648 SecretNotEscrowed,
3649 RetentionGap {
3650 retired_through: U64,
3651 },
3652 ArtifactRangeInvalid {
3653 maximum_bytes: U64,
3654 },
3655 ChecksumMismatch {
3656 expected: Digest,
3657 observed: Digest,
3658 },
3659 TemporarilyUnavailable {
3660 #[serde(default, skip_serializing_if = "Option::is_none")]
3661 retry_after_millis: Option<U64>,
3662 },
3663 Internal,
3664}
3665
3666pub const LODESTONE_API_CONNECTION_PROFILE_FORMAT_VERSION: u16 = 3;
3667#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3668#[serde(deny_unknown_fields)]
3669pub struct ConnectionProfile {
3670 pub format_version: u32,
3671 pub profile_generation: U64,
3672 pub native_endpoints: Vec<String>,
3673 pub selected_stream_endpoint: String,
3674 pub tls_server_name: String,
3675 pub tls_trust_sha256: Digest,
3676 pub expected_cluster_id: Identity,
3677 pub expected_collection_id: Identity,
3678 pub expected_principal_id: Identity,
3679 pub schema_id: String,
3680 pub schema_digest: Digest,
3681 pub credential_id: Identity,
3682 pub credential_generation: U64,
3683 #[serde(default, skip_serializing_if = "Option::is_none")]
3684 pub credential_expires_at: Option<U64>,
3685 pub secret_reference: String,
3686}
3687
3688#[derive(Clone, Copy, Debug, Eq, PartialEq)]
3689pub enum TypeKind {
3690 Enum,
3691 Struct,
3692 TaggedUnion,
3693}
3694#[derive(Clone, Copy, Debug, Eq, PartialEq)]
3695pub struct TypeContract {
3696 pub name: &'static str,
3697 pub format_version: u16,
3698 pub kind: TypeKind,
3699 pub wire: bool,
3700}
3701pub const LODESTONE_API_TYPE_CONTRACTS: &[TypeContract] = &[
3702 TypeContract {
3703 name: "cursor",
3704 format_version: 1,
3705 kind: TypeKind::Struct,
3706 wire: true,
3707 },
3708 TypeContract {
3709 name: "locator",
3710 format_version: 1,
3711 kind: TypeKind::Struct,
3712 wire: true,
3713 },
3714 TypeContract {
3715 name: "resource",
3716 format_version: 1,
3717 kind: TypeKind::Struct,
3718 wire: true,
3719 },
3720 TypeContract {
3721 name: "field_promotion_configuration",
3722 format_version: 1,
3723 kind: TypeKind::Struct,
3724 wire: true,
3725 },
3726 TypeContract {
3727 name: "overload_configuration",
3728 format_version: 2,
3729 kind: TypeKind::Struct,
3730 wire: true,
3731 },
3732 TypeContract {
3733 name: "index_policies",
3734 format_version: 1,
3735 kind: TypeKind::Struct,
3736 wire: true,
3737 },
3738 TypeContract {
3739 name: "maintenance_budgets",
3740 format_version: 1,
3741 kind: TypeKind::Struct,
3742 wire: true,
3743 },
3744 TypeContract {
3745 name: "resource_durability_class",
3746 format_version: 1,
3747 kind: TypeKind::Enum,
3748 wire: true,
3749 },
3750 TypeContract {
3751 name: "resource_storage_class",
3752 format_version: 1,
3753 kind: TypeKind::Enum,
3754 wire: true,
3755 },
3756 TypeContract {
3757 name: "vector_quality_objective",
3758 format_version: 1,
3759 kind: TypeKind::Enum,
3760 wire: true,
3761 },
3762 TypeContract {
3763 name: "vector_indexing_objective",
3764 format_version: 1,
3765 kind: TypeKind::Enum,
3766 wire: true,
3767 },
3768 TypeContract {
3769 name: "vector_residency_intent",
3770 format_version: 1,
3771 kind: TypeKind::Enum,
3772 wire: true,
3773 },
3774 TypeContract {
3775 name: "vector_calibration_binding",
3776 format_version: 1,
3777 kind: TypeKind::Struct,
3778 wire: true,
3779 },
3780 TypeContract {
3781 name: "vector_resource_policy",
3782 format_version: 2,
3783 kind: TypeKind::Struct,
3784 wire: true,
3785 },
3786 TypeContract {
3787 name: "workload_class",
3788 format_version: 1,
3789 kind: TypeKind::Enum,
3790 wire: true,
3791 },
3792 TypeContract {
3793 name: "index_resource_spec",
3794 format_version: 3,
3795 kind: TypeKind::Struct,
3796 wire: true,
3797 },
3798 TypeContract {
3799 name: "index_summary",
3800 format_version: 1,
3801 kind: TypeKind::Struct,
3802 wire: true,
3803 },
3804 TypeContract {
3805 name: "mapping_mode",
3806 format_version: 1,
3807 kind: TypeKind::Enum,
3808 wire: true,
3809 },
3810 TypeContract {
3811 name: "dynamic_mapping_policy",
3812 format_version: 1,
3813 kind: TypeKind::Enum,
3814 wire: true,
3815 },
3816 TypeContract {
3817 name: "mapping_analyzer",
3818 format_version: 1,
3819 kind: TypeKind::Enum,
3820 wire: true,
3821 },
3822 TypeContract {
3823 name: "keyword_normalizer",
3824 format_version: 1,
3825 kind: TypeKind::Enum,
3826 wire: true,
3827 },
3828 TypeContract {
3829 name: "vector_metric",
3830 format_version: 1,
3831 kind: TypeKind::Enum,
3832 wire: true,
3833 },
3834 TypeContract {
3835 name: "mapping_scalar",
3836 format_version: 1,
3837 kind: TypeKind::TaggedUnion,
3838 wire: true,
3839 },
3840 TypeContract {
3841 name: "sparse_vector_weight_type",
3842 format_version: 1,
3843 kind: TypeKind::Enum,
3844 wire: true,
3845 },
3846 TypeContract {
3847 name: "mapping_field_type",
3848 format_version: 3,
3849 kind: TypeKind::TaggedUnion,
3850 wire: true,
3851 },
3852 TypeContract {
3853 name: "mapping_field",
3854 format_version: 1,
3855 kind: TypeKind::Struct,
3856 wire: true,
3857 },
3858 TypeContract {
3859 name: "multi_field_projection",
3860 format_version: 1,
3861 kind: TypeKind::Struct,
3862 wire: true,
3863 },
3864 TypeContract {
3865 name: "analyzer_identity",
3866 format_version: 1,
3867 kind: TypeKind::Struct,
3868 wire: true,
3869 },
3870 TypeContract {
3871 name: "keyword_limit",
3872 format_version: 1,
3873 kind: TypeKind::Struct,
3874 wire: true,
3875 },
3876 TypeContract {
3877 name: "mapping",
3878 format_version: 1,
3879 kind: TypeKind::Struct,
3880 wire: true,
3881 },
3882 TypeContract {
3883 name: "index_detail",
3884 format_version: 1,
3885 kind: TypeKind::Struct,
3886 wire: true,
3887 },
3888 TypeContract {
3889 name: "source_provider",
3890 format_version: 1,
3891 kind: TypeKind::Enum,
3892 wire: true,
3893 },
3894 TypeContract {
3895 name: "source_decoder",
3896 format_version: 1,
3897 kind: TypeKind::Enum,
3898 wire: true,
3899 },
3900 TypeContract {
3901 name: "source_replay_guarantees",
3902 format_version: 1,
3903 kind: TypeKind::Struct,
3904 wire: true,
3905 },
3906 TypeContract {
3907 name: "source_partition_configuration",
3908 format_version: 1,
3909 kind: TypeKind::Struct,
3910 wire: true,
3911 },
3912 TypeContract {
3913 name: "replayable_source_configuration",
3914 format_version: 1,
3915 kind: TypeKind::Struct,
3916 wire: true,
3917 },
3918 TypeContract {
3919 name: "source_partition_status",
3920 format_version: 1,
3921 kind: TypeKind::Struct,
3922 wire: true,
3923 },
3924 TypeContract {
3925 name: "replayable_source_status",
3926 format_version: 1,
3927 kind: TypeKind::Struct,
3928 wire: true,
3929 },
3930 TypeContract {
3931 name: "source_control_transition",
3932 format_version: 1,
3933 kind: TypeKind::Enum,
3934 wire: true,
3935 },
3936 TypeContract {
3937 name: "history_ledger_precondition",
3938 format_version: 1,
3939 kind: TypeKind::TaggedUnion,
3940 wire: true,
3941 },
3942 TypeContract {
3943 name: "history_retention_policy",
3944 format_version: 1,
3945 kind: TypeKind::Struct,
3946 wire: true,
3947 },
3948 TypeContract {
3949 name: "history_selector",
3950 format_version: 1,
3951 kind: TypeKind::TaggedUnion,
3952 wire: true,
3953 },
3954 TypeContract {
3955 name: "history_hold",
3956 format_version: 1,
3957 kind: TypeKind::Struct,
3958 wire: true,
3959 },
3960 TypeContract {
3961 name: "history_status",
3962 format_version: 1,
3963 kind: TypeKind::Struct,
3964 wire: true,
3965 },
3966 TypeContract {
3967 name: "history_resolution",
3968 format_version: 1,
3969 kind: TypeKind::Struct,
3970 wire: true,
3971 },
3972 TypeContract {
3973 name: "index_reference",
3974 format_version: 1,
3975 kind: TypeKind::Struct,
3976 wire: true,
3977 },
3978 TypeContract {
3979 name: "alias_target",
3980 format_version: 1,
3981 kind: TypeKind::Struct,
3982 wire: true,
3983 },
3984 TypeContract {
3985 name: "alias_summary",
3986 format_version: 1,
3987 kind: TypeKind::Struct,
3988 wire: true,
3989 },
3990 TypeContract {
3991 name: "alias_detail",
3992 format_version: 1,
3993 kind: TypeKind::Struct,
3994 wire: true,
3995 },
3996 TypeContract {
3997 name: "data_stream_summary",
3998 format_version: 1,
3999 kind: TypeKind::Struct,
4000 wire: true,
4001 },
4002 TypeContract {
4003 name: "component_template_binding",
4004 format_version: 1,
4005 kind: TypeKind::Struct,
4006 wire: true,
4007 },
4008 TypeContract {
4009 name: "index_template_binding",
4010 format_version: 1,
4011 kind: TypeKind::Struct,
4012 wire: true,
4013 },
4014 TypeContract {
4015 name: "lifecycle_policy_binding",
4016 format_version: 1,
4017 kind: TypeKind::Struct,
4018 wire: true,
4019 },
4020 TypeContract {
4021 name: "data_stream_detail",
4022 format_version: 1,
4023 kind: TypeKind::Struct,
4024 wire: true,
4025 },
4026 TypeContract {
4027 name: "component_template_summary",
4028 format_version: 1,
4029 kind: TypeKind::Struct,
4030 wire: true,
4031 },
4032 TypeContract {
4033 name: "component_template_detail",
4034 format_version: 1,
4035 kind: TypeKind::Struct,
4036 wire: true,
4037 },
4038 TypeContract {
4039 name: "index_template_summary",
4040 format_version: 1,
4041 kind: TypeKind::Struct,
4042 wire: true,
4043 },
4044 TypeContract {
4045 name: "index_template_detail",
4046 format_version: 1,
4047 kind: TypeKind::Struct,
4048 wire: true,
4049 },
4050 TypeContract {
4051 name: "ingest_pipeline_summary",
4052 format_version: 1,
4053 kind: TypeKind::Struct,
4054 wire: true,
4055 },
4056 TypeContract {
4057 name: "ingest_pipeline_detail",
4058 format_version: 1,
4059 kind: TypeKind::Struct,
4060 wire: true,
4061 },
4062 TypeContract {
4063 name: "ingest_pipeline_selection",
4064 format_version: 1,
4065 kind: TypeKind::Struct,
4066 wire: true,
4067 },
4068 TypeContract {
4069 name: "lifecycle_policy_summary",
4070 format_version: 1,
4071 kind: TypeKind::Struct,
4072 wire: true,
4073 },
4074 TypeContract {
4075 name: "rollover_thresholds",
4076 format_version: 1,
4077 kind: TypeKind::Struct,
4078 wire: true,
4079 },
4080 TypeContract {
4081 name: "retention_policy",
4082 format_version: 1,
4083 kind: TypeKind::Struct,
4084 wire: true,
4085 },
4086 TypeContract {
4087 name: "lifecycle_policy_detail",
4088 format_version: 1,
4089 kind: TypeKind::Struct,
4090 wire: true,
4091 },
4092 TypeContract {
4093 name: "text_query_operator",
4094 format_version: 1,
4095 kind: TypeKind::Enum,
4096 wire: true,
4097 },
4098 TypeContract {
4099 name: "text_query_analyzer",
4100 format_version: 1,
4101 kind: TypeKind::Enum,
4102 wire: true,
4103 },
4104 TypeContract {
4105 name: "zero_terms_query",
4106 format_version: 1,
4107 kind: TypeKind::Enum,
4108 wire: true,
4109 },
4110 TypeContract {
4111 name: "text_query_options",
4112 format_version: 1,
4113 kind: TypeKind::Struct,
4114 wire: true,
4115 },
4116 TypeContract {
4117 name: "multi_match_mode",
4118 format_version: 1,
4119 kind: TypeKind::Enum,
4120 wire: true,
4121 },
4122 TypeContract {
4123 name: "multi_match_field",
4124 format_version: 1,
4125 kind: TypeKind::Struct,
4126 wire: true,
4127 },
4128 TypeContract {
4129 name: "multi_match_options",
4130 format_version: 1,
4131 kind: TypeKind::Struct,
4132 wire: true,
4133 },
4134 TypeContract {
4135 name: "sort_order",
4136 format_version: 1,
4137 kind: TypeKind::Enum,
4138 wire: true,
4139 },
4140 TypeContract {
4141 name: "sort_mode",
4142 format_version: 1,
4143 kind: TypeKind::Enum,
4144 wire: true,
4145 },
4146 TypeContract {
4147 name: "missing_order",
4148 format_version: 1,
4149 kind: TypeKind::Enum,
4150 wire: true,
4151 },
4152 TypeContract {
4153 name: "nested_score_mode",
4154 format_version: 1,
4155 kind: TypeKind::Enum,
4156 wire: true,
4157 },
4158 TypeContract {
4159 name: "nested_inner_hits",
4160 format_version: 1,
4161 kind: TypeKind::Struct,
4162 wire: true,
4163 },
4164 TypeContract {
4165 name: "sort_spec",
4166 format_version: 1,
4167 kind: TypeKind::TaggedUnion,
4168 wire: true,
4169 },
4170 TypeContract {
4171 name: "query",
4172 format_version: 1,
4173 kind: TypeKind::TaggedUnion,
4174 wire: true,
4175 },
4176 TypeContract {
4177 name: "dense_retrieval_mode",
4178 format_version: 1,
4179 kind: TypeKind::Enum,
4180 wire: true,
4181 },
4182 TypeContract {
4183 name: "vector_achieved_mode",
4184 format_version: 1,
4185 kind: TypeKind::Enum,
4186 wire: true,
4187 },
4188 TypeContract {
4189 name: "vector_branch_diagnostics",
4190 format_version: 2,
4191 kind: TypeKind::Struct,
4192 wire: true,
4193 },
4194 TypeContract {
4195 name: "dense_vector_element_type",
4196 format_version: 1,
4197 kind: TypeKind::Enum,
4198 wire: true,
4199 },
4200 TypeContract {
4201 name: "dense_vector_byte_order",
4202 format_version: 1,
4203 kind: TypeKind::Enum,
4204 wire: true,
4205 },
4206 TypeContract {
4207 name: "vector_value",
4208 format_version: 1,
4209 kind: TypeKind::TaggedUnion,
4210 wire: true,
4211 },
4212 TypeContract {
4213 name: "sparse_vector_entry",
4214 format_version: 1,
4215 kind: TypeKind::Struct,
4216 wire: true,
4217 },
4218 TypeContract {
4219 name: "sparse_vector_value",
4220 format_version: 1,
4221 kind: TypeKind::Struct,
4222 wire: true,
4223 },
4224 TypeContract {
4225 name: "vector_set_value",
4226 format_version: 1,
4227 kind: TypeKind::Struct,
4228 wire: true,
4229 },
4230 TypeContract {
4231 name: "vector_evaluation_snapshot",
4232 format_version: 1,
4233 kind: TypeKind::TaggedUnion,
4234 wire: true,
4235 },
4236 TypeContract {
4237 name: "vector_evaluation_query_set",
4238 format_version: 1,
4239 kind: TypeKind::TaggedUnion,
4240 wire: true,
4241 },
4242 TypeContract {
4243 name: "vector_evaluation_budget",
4244 format_version: 1,
4245 kind: TypeKind::Struct,
4246 wire: true,
4247 },
4248 TypeContract {
4249 name: "vector_candidate_policy",
4250 format_version: 1,
4251 kind: TypeKind::Enum,
4252 wire: true,
4253 },
4254 TypeContract {
4255 name: "vector_calibration_objective",
4256 format_version: 1,
4257 kind: TypeKind::Enum,
4258 wire: true,
4259 },
4260 TypeContract {
4261 name: "vector_strategy_profile",
4262 format_version: 1,
4263 kind: TypeKind::Enum,
4264 wire: true,
4265 },
4266 TypeContract {
4267 name: "vector_evaluation_work",
4268 format_version: 1,
4269 kind: TypeKind::Struct,
4270 wire: true,
4271 },
4272 TypeContract {
4273 name: "vector_evaluation_error_code",
4274 format_version: 1,
4275 kind: TypeKind::Enum,
4276 wire: true,
4277 },
4278 TypeContract {
4279 name: "vector_evaluation_error",
4280 format_version: 1,
4281 kind: TypeKind::Struct,
4282 wire: true,
4283 },
4284 TypeContract {
4285 name: "vector_recall_result",
4286 format_version: 1,
4287 kind: TypeKind::Struct,
4288 wire: true,
4289 },
4290 TypeContract {
4291 name: "vector_calibration_candidate",
4292 format_version: 1,
4293 kind: TypeKind::Struct,
4294 wire: true,
4295 },
4296 TypeContract {
4297 name: "vector_calibration_result",
4298 format_version: 1,
4299 kind: TypeKind::Struct,
4300 wire: true,
4301 },
4302 TypeContract {
4303 name: "vector_diagnostic_result",
4304 format_version: 1,
4305 kind: TypeKind::TaggedUnion,
4306 wire: true,
4307 },
4308 TypeContract {
4309 name: "vector_warm_component",
4310 format_version: 1,
4311 kind: TypeKind::Enum,
4312 wire: true,
4313 },
4314 TypeContract {
4315 name: "vector_warm_state",
4316 format_version: 1,
4317 kind: TypeKind::Enum,
4318 wire: true,
4319 },
4320 TypeContract {
4321 name: "vector_warm_achievement",
4322 format_version: 1,
4323 kind: TypeKind::Struct,
4324 wire: true,
4325 },
4326 TypeContract {
4327 name: "vector_warm_result",
4328 format_version: 1,
4329 kind: TypeKind::Struct,
4330 wire: true,
4331 },
4332 TypeContract {
4333 name: "dense_retrieval_threshold",
4334 format_version: 1,
4335 kind: TypeKind::TaggedUnion,
4336 wire: true,
4337 },
4338 TypeContract {
4339 name: "retrieval_branch",
4340 format_version: 3,
4341 kind: TypeKind::TaggedUnion,
4342 wire: true,
4343 },
4344 TypeContract {
4345 name: "weighted_rrf_fusion",
4346 format_version: 1,
4347 kind: TypeKind::Struct,
4348 wire: true,
4349 },
4350 TypeContract {
4351 name: "retrieval_plan",
4352 format_version: 1,
4353 kind: TypeKind::Struct,
4354 wire: true,
4355 },
4356 TypeContract {
4357 name: "histogram_bounds",
4358 format_version: 1,
4359 kind: TypeKind::Struct,
4360 wire: true,
4361 },
4362 TypeContract {
4363 name: "date_histogram_bounds",
4364 format_version: 1,
4365 kind: TypeKind::Struct,
4366 wire: true,
4367 },
4368 TypeContract {
4369 name: "approximation_algorithm",
4370 format_version: 1,
4371 kind: TypeKind::Enum,
4372 wire: true,
4373 },
4374 TypeContract {
4375 name: "approximation",
4376 format_version: 1,
4377 kind: TypeKind::Struct,
4378 wire: true,
4379 },
4380 TypeContract {
4381 name: "percentile_value",
4382 format_version: 1,
4383 kind: TypeKind::Struct,
4384 wire: true,
4385 },
4386 TypeContract {
4387 name: "approximate_percentile_value",
4388 format_version: 1,
4389 kind: TypeKind::Struct,
4390 wire: true,
4391 },
4392 TypeContract {
4393 name: "aggregation",
4394 format_version: 1,
4395 kind: TypeKind::TaggedUnion,
4396 wire: true,
4397 },
4398 TypeContract {
4399 name: "nested_search_hit",
4400 format_version: 1,
4401 kind: TypeKind::Struct,
4402 wire: true,
4403 },
4404 TypeContract {
4405 name: "named_nested_inner_hits_result",
4406 format_version: 1,
4407 kind: TypeKind::Struct,
4408 wire: true,
4409 },
4410 TypeContract {
4411 name: "fragment_boundary",
4412 format_version: 1,
4413 kind: TypeKind::Enum,
4414 wire: true,
4415 },
4416 TypeContract {
4417 name: "fragment_offset_encoding",
4418 format_version: 1,
4419 kind: TypeKind::Enum,
4420 wire: true,
4421 },
4422 TypeContract {
4423 name: "fragment_ranker",
4424 format_version: 1,
4425 kind: TypeKind::Enum,
4426 wire: true,
4427 },
4428 TypeContract {
4429 name: "fragment_request",
4430 format_version: 1,
4431 kind: TypeKind::Struct,
4432 wire: true,
4433 },
4434 TypeContract {
4435 name: "search_fragment",
4436 format_version: 1,
4437 kind: TypeKind::Struct,
4438 wire: true,
4439 },
4440 TypeContract {
4441 name: "numeric_feature_transform",
4442 format_version: 1,
4443 kind: TypeKind::TaggedUnion,
4444 wire: true,
4445 },
4446 TypeContract {
4447 name: "numeric_result_feature",
4448 format_version: 1,
4449 kind: TypeKind::Struct,
4450 wire: true,
4451 },
4452 TypeContract {
4453 name: "result_feature_request",
4454 format_version: 1,
4455 kind: TypeKind::Struct,
4456 wire: true,
4457 },
4458 TypeContract {
4459 name: "result_diversification",
4460 format_version: 1,
4461 kind: TypeKind::Struct,
4462 wire: true,
4463 },
4464 TypeContract {
4465 name: "branch_score_kind",
4466 format_version: 2,
4467 kind: TypeKind::Enum,
4468 wire: true,
4469 },
4470 TypeContract {
4471 name: "result_feature",
4472 format_version: 1,
4473 kind: TypeKind::TaggedUnion,
4474 wire: true,
4475 },
4476 TypeContract {
4477 name: "search_hit",
4478 format_version: 2,
4479 kind: TypeKind::Struct,
4480 wire: true,
4481 },
4482 TypeContract {
4483 name: "aggregation_bucket",
4484 format_version: 1,
4485 kind: TypeKind::Struct,
4486 wire: true,
4487 },
4488 TypeContract {
4489 name: "aggregation_result",
4490 format_version: 1,
4491 kind: TypeKind::TaggedUnion,
4492 wire: true,
4493 },
4494 TypeContract {
4495 name: "shard_counts",
4496 format_version: 1,
4497 kind: TypeKind::Struct,
4498 wire: true,
4499 },
4500 TypeContract {
4501 name: "total_hits_relation",
4502 format_version: 1,
4503 kind: TypeKind::Enum,
4504 wire: true,
4505 },
4506 TypeContract {
4507 name: "search_total",
4508 format_version: 1,
4509 kind: TypeKind::Struct,
4510 wire: true,
4511 },
4512 TypeContract {
4513 name: "artifact",
4514 format_version: 1,
4515 kind: TypeKind::Struct,
4516 wire: true,
4517 },
4518 TypeContract {
4519 name: "operation",
4520 format_version: 1,
4521 kind: TypeKind::Struct,
4522 wire: true,
4523 },
4524 TypeContract {
4525 name: "submission_state",
4526 format_version: 1,
4527 kind: TypeKind::Enum,
4528 wire: true,
4529 },
4530 TypeContract {
4531 name: "expected_binding",
4532 format_version: 1,
4533 kind: TypeKind::Struct,
4534 wire: true,
4535 },
4536 TypeContract {
4537 name: "administration_alias_action",
4538 format_version: 1,
4539 kind: TypeKind::TaggedUnion,
4540 wire: true,
4541 },
4542 TypeContract {
4543 name: "administration_mutation",
4544 format_version: 1,
4545 kind: TypeKind::TaggedUnion,
4546 wire: true,
4547 },
4548 TypeContract {
4549 name: "administration_outcome",
4550 format_version: 1,
4551 kind: TypeKind::Struct,
4552 wire: true,
4553 },
4554 TypeContract {
4555 name: "index_change_apply_receipt",
4556 format_version: 1,
4557 kind: TypeKind::Struct,
4558 wire: true,
4559 },
4560 TypeContract {
4561 name: "backup_encryption_policy",
4562 format_version: 1,
4563 kind: TypeKind::Struct,
4564 wire: true,
4565 },
4566 TypeContract {
4567 name: "backup_create_outcome",
4568 format_version: 1,
4569 kind: TypeKind::Struct,
4570 wire: true,
4571 },
4572 TypeContract {
4573 name: "bulk_document_item",
4574 format_version: 1,
4575 kind: TypeKind::Struct,
4576 wire: true,
4577 },
4578 TypeContract {
4579 name: "bulk_document_item_outcome",
4580 format_version: 1,
4581 kind: TypeKind::Struct,
4582 wire: true,
4583 },
4584 TypeContract {
4585 name: "bulk_document_outcome",
4586 format_version: 1,
4587 kind: TypeKind::Struct,
4588 wire: true,
4589 },
4590 TypeContract {
4591 name: "retained_append_item",
4592 format_version: 1,
4593 kind: TypeKind::Struct,
4594 wire: true,
4595 },
4596 TypeContract {
4597 name: "retained_append_state",
4598 format_version: 1,
4599 kind: TypeKind::Enum,
4600 wire: true,
4601 },
4602 TypeContract {
4603 name: "retained_append_retry_safety",
4604 format_version: 1,
4605 kind: TypeKind::Enum,
4606 wire: true,
4607 },
4608 TypeContract {
4609 name: "retained_append_item_outcome",
4610 format_version: 1,
4611 kind: TypeKind::Struct,
4612 wire: true,
4613 },
4614 TypeContract {
4615 name: "retained_append_bulk_outcome",
4616 format_version: 1,
4617 kind: TypeKind::Struct,
4618 wire: true,
4619 },
4620 TypeContract {
4621 name: "retained_append_observation_state",
4622 format_version: 1,
4623 kind: TypeKind::Enum,
4624 wire: true,
4625 },
4626 TypeContract {
4627 name: "retained_append_observation_outcome",
4628 format_version: 1,
4629 kind: TypeKind::Struct,
4630 wire: true,
4631 },
4632 TypeContract {
4633 name: "binary_value",
4634 format_version: 1,
4635 kind: TypeKind::Struct,
4636 wire: true,
4637 },
4638 TypeContract {
4639 name: "state_hash_field",
4640 format_version: 1,
4641 kind: TypeKind::Struct,
4642 wire: true,
4643 },
4644 TypeContract {
4645 name: "state_set_entry",
4646 format_version: 1,
4647 kind: TypeKind::Struct,
4648 wire: true,
4649 },
4650 TypeContract {
4651 name: "state_set_condition",
4652 format_version: 1,
4653 kind: TypeKind::Enum,
4654 wire: true,
4655 },
4656 TypeContract {
4657 name: "state_operation",
4658 format_version: 1,
4659 kind: TypeKind::TaggedUnion,
4660 wire: true,
4661 },
4662 TypeContract {
4663 name: "state_optional_value",
4664 format_version: 1,
4665 kind: TypeKind::TaggedUnion,
4666 wire: true,
4667 },
4668 TypeContract {
4669 name: "state_command_result",
4670 format_version: 1,
4671 kind: TypeKind::TaggedUnion,
4672 wire: true,
4673 },
4674 TypeContract {
4675 name: "state_write_resolution",
4676 format_version: 1,
4677 kind: TypeKind::TaggedUnion,
4678 wire: true,
4679 },
4680 TypeContract {
4681 name: "service_credential_reservation",
4682 format_version: 1,
4683 kind: TypeKind::Struct,
4684 wire: true,
4685 },
4686 TypeContract {
4687 name: "subscription_metadata_field",
4688 format_version: 1,
4689 kind: TypeKind::Enum,
4690 wire: true,
4691 },
4692 TypeContract {
4693 name: "subscription_field",
4694 format_version: 1,
4695 kind: TypeKind::TaggedUnion,
4696 wire: true,
4697 },
4698 TypeContract {
4699 name: "subscription_filter",
4700 format_version: 1,
4701 kind: TypeKind::TaggedUnion,
4702 wire: true,
4703 },
4704 TypeContract {
4705 name: "subscription_cursor_entry",
4706 format_version: 1,
4707 kind: TypeKind::Struct,
4708 wire: true,
4709 },
4710 TypeContract {
4711 name: "subscription_route",
4712 format_version: 1,
4713 kind: TypeKind::Struct,
4714 wire: true,
4715 },
4716 TypeContract {
4717 name: "subscription_start_position",
4718 format_version: 1,
4719 kind: TypeKind::TaggedUnion,
4720 wire: true,
4721 },
4722 TypeContract {
4723 name: "subscription_start",
4724 format_version: 1,
4725 kind: TypeKind::Struct,
4726 wire: true,
4727 },
4728 TypeContract {
4729 name: "subscription_accepted",
4730 format_version: 1,
4731 kind: TypeKind::Struct,
4732 wire: true,
4733 },
4734 TypeContract {
4735 name: "subscription_writer_fence",
4736 format_version: 1,
4737 kind: TypeKind::Struct,
4738 wire: true,
4739 },
4740 TypeContract {
4741 name: "subscription_event",
4742 format_version: 1,
4743 kind: TypeKind::Struct,
4744 wire: true,
4745 },
4746 TypeContract {
4747 name: "subscription_heartbeat",
4748 format_version: 1,
4749 kind: TypeKind::Struct,
4750 wire: true,
4751 },
4752 TypeContract {
4753 name: "subscription_gap",
4754 format_version: 1,
4755 kind: TypeKind::Struct,
4756 wire: true,
4757 },
4758 TypeContract {
4759 name: "subscription_terminal",
4760 format_version: 1,
4761 kind: TypeKind::Struct,
4762 wire: true,
4763 },
4764 TypeContract {
4765 name: "subscription_frame",
4766 format_version: 1,
4767 kind: TypeKind::TaggedUnion,
4768 wire: true,
4769 },
4770 TypeContract {
4771 name: "stream_binding",
4772 format_version: 1,
4773 kind: TypeKind::Struct,
4774 wire: true,
4775 },
4776 TypeContract {
4777 name: "capability_grant",
4778 format_version: 1,
4779 kind: TypeKind::Struct,
4780 wire: true,
4781 },
4782 TypeContract {
4783 name: "protocol_limit",
4784 format_version: 1,
4785 kind: TypeKind::Struct,
4786 wire: true,
4787 },
4788 TypeContract {
4789 name: "document_mutation_condition",
4790 format_version: 1,
4791 kind: TypeKind::TaggedUnion,
4792 wire: true,
4793 },
4794 TypeContract {
4795 name: "audit_event",
4796 format_version: 1,
4797 kind: TypeKind::Struct,
4798 wire: true,
4799 },
4800 TypeContract {
4801 name: "audit_gap",
4802 format_version: 1,
4803 kind: TypeKind::Struct,
4804 wire: true,
4805 },
4806 TypeContract {
4807 name: "service_credential_grant",
4808 format_version: 1,
4809 kind: TypeKind::Struct,
4810 wire: true,
4811 },
4812 TypeContract {
4813 name: "service_credential_summary",
4814 format_version: 1,
4815 kind: TypeKind::Struct,
4816 wire: true,
4817 },
4818 TypeContract {
4819 name: "security_role",
4820 format_version: 1,
4821 kind: TypeKind::Struct,
4822 wire: true,
4823 },
4824 TypeContract {
4825 name: "role_append_scope_change",
4826 format_version: 1,
4827 kind: TypeKind::TaggedUnion,
4828 wire: true,
4829 },
4830 TypeContract {
4831 name: "role_append_access_preparation",
4832 format_version: 1,
4833 kind: TypeKind::TaggedUnion,
4834 wire: true,
4835 },
4836 TypeContract {
4837 name: "security_action_outcome",
4838 format_version: 1,
4839 kind: TypeKind::TaggedUnion,
4840 wire: true,
4841 },
4842 TypeContract {
4843 name: "maintenance_work_state",
4844 format_version: 1,
4845 kind: TypeKind::Enum,
4846 wire: true,
4847 },
4848 TypeContract {
4849 name: "maintenance_attempt_state",
4850 format_version: 1,
4851 kind: TypeKind::Enum,
4852 wire: true,
4853 },
4854 TypeContract {
4855 name: "maintenance_failure_class",
4856 format_version: 1,
4857 kind: TypeKind::Enum,
4858 wire: true,
4859 },
4860 TypeContract {
4861 name: "maintenance_failure_class_count",
4862 format_version: 1,
4863 kind: TypeKind::Struct,
4864 wire: true,
4865 },
4866 TypeContract {
4867 name: "maintenance_attempt_observation",
4868 format_version: 1,
4869 kind: TypeKind::Struct,
4870 wire: true,
4871 },
4872 TypeContract {
4873 name: "maintenance_task_scope",
4874 format_version: 1,
4875 kind: TypeKind::Struct,
4876 wire: true,
4877 },
4878 TypeContract {
4879 name: "maintenance_task_status",
4880 format_version: 1,
4881 kind: TypeKind::Struct,
4882 wire: true,
4883 },
4884 TypeContract {
4885 name: "maintenance_status_aggregate",
4886 format_version: 1,
4887 kind: TypeKind::Struct,
4888 wire: true,
4889 },
4890 TypeContract {
4891 name: "runtime_status_detail",
4892 format_version: 1,
4893 kind: TypeKind::Struct,
4894 wire: true,
4895 },
4896 TypeContract {
4897 name: "result_cache_status",
4898 format_version: 2,
4899 kind: TypeKind::Struct,
4900 wire: true,
4901 },
4902 TypeContract {
4903 name: "field_promotion_status",
4904 format_version: 1,
4905 kind: TypeKind::Struct,
4906 wire: true,
4907 },
4908 TypeContract {
4909 name: "overload_shard_status",
4910 format_version: 2,
4911 kind: TypeKind::Struct,
4912 wire: true,
4913 },
4914 TypeContract {
4915 name: "external_key_binding",
4916 format_version: 1,
4917 kind: TypeKind::Struct,
4918 wire: true,
4919 },
4920 TypeContract {
4921 name: "rollup_measure",
4922 format_version: 1,
4923 kind: TypeKind::TaggedUnion,
4924 wire: true,
4925 },
4926 TypeContract {
4927 name: "aggregate_then_delete_policy",
4928 format_version: 1,
4929 kind: TypeKind::Struct,
4930 wire: true,
4931 },
4932 TypeContract {
4933 name: "lifecycle_binding_status",
4934 format_version: 1,
4935 kind: TypeKind::Struct,
4936 wire: true,
4937 },
4938 TypeContract {
4939 name: "lifecycle_rollup_status",
4940 format_version: 1,
4941 kind: TypeKind::Struct,
4942 wire: true,
4943 },
4944 TypeContract {
4945 name: "lifecycle_status",
4946 format_version: 2,
4947 kind: TypeKind::Struct,
4948 wire: true,
4949 },
4950 TypeContract {
4951 name: "quota_limit",
4952 format_version: 1,
4953 kind: TypeKind::Struct,
4954 wire: true,
4955 },
4956 TypeContract {
4957 name: "quota_consumption",
4958 format_version: 1,
4959 kind: TypeKind::Struct,
4960 wire: true,
4961 },
4962 TypeContract {
4963 name: "quota_update",
4964 format_version: 1,
4965 kind: TypeKind::Struct,
4966 wire: true,
4967 },
4968 TypeContract {
4969 name: "core_binding",
4970 format_version: 2,
4971 kind: TypeKind::Struct,
4972 wire: true,
4973 },
4974 TypeContract {
4975 name: "readiness_observation",
4976 format_version: 1,
4977 kind: TypeKind::Struct,
4978 wire: true,
4979 },
4980 TypeContract {
4981 name: "usage_dimension",
4982 format_version: 1,
4983 kind: TypeKind::Struct,
4984 wire: true,
4985 },
4986 TypeContract {
4987 name: "physical_usage_value",
4988 format_version: 2,
4989 kind: TypeKind::Struct,
4990 wire: true,
4991 },
4992 TypeContract {
4993 name: "core_usage_units",
4994 format_version: 2,
4995 kind: TypeKind::Struct,
4996 wire: true,
4997 },
4998 TypeContract {
4999 name: "core_usage_correction",
5000 format_version: 2,
5001 kind: TypeKind::Struct,
5002 wire: true,
5003 },
5004 TypeContract {
5005 name: "error_detail",
5006 format_version: 1,
5007 kind: TypeKind::TaggedUnion,
5008 wire: true,
5009 },
5010 TypeContract {
5011 name: "connection_profile",
5012 format_version: 3,
5013 kind: TypeKind::Struct,
5014 wire: false,
5015 },
5016];
5017#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5018pub struct StreamContract {
5019 pub name: &'static str,
5020 pub action: Action,
5021 pub transport: &'static str,
5022 pub service: &'static str,
5023 pub method: &'static str,
5024 pub auth_metadata: &'static str,
5025 pub auth_scheme: &'static str,
5026 pub semantic_format_version: u16,
5027 pub start_type: &'static str,
5028 pub frame_type: &'static str,
5029}
5030pub const LODESTONE_API_STREAM_CONTRACTS: &[StreamContract] = &[StreamContract {
5031 name: "subscription",
5032 action: Action::SubscriptionRead,
5033 transport: "grpc_tls",
5034 service: "lodestone.api.FilterSubscription",
5035 method: "/lodestone.api.FilterSubscription/Subscribe",
5036 auth_metadata: "authorization",
5037 auth_scheme: "ApiKey",
5038 semantic_format_version: 1,
5039 start_type: "subscription_start",
5040 frame_type: "subscription_frame",
5041}];
5042#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5043#[serde(deny_unknown_fields)]
5044pub struct ErrorBody {
5045 pub code: ErrorCode,
5046 pub message: String,
5047 pub retry_safe: bool,
5048 pub submitted: bool,
5049 pub details: Option<ErrorDetail>,
5050}
5051#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5052pub enum ErrorShapeError {
5053 DetailCodeMismatch,
5054 RetryAfterOutOfRange,
5055}
5056pub fn validate_error_body(body: &ErrorBody) -> Result<(), ErrorShapeError> {
5057 let detail_matches = matches!(
5058 (&body.code, &body.details),
5059 (_, None)
5060 | (ErrorCode::Aborted, Some(ErrorDetail::Aborted { .. }))
5061 | (ErrorCode::DeadlineExceeded, Some(ErrorDetail::DeadlineExceeded { .. }))
5062 | (ErrorCode::InvalidRequest, Some(ErrorDetail::InvalidRequest { .. }))
5063 | (
5064 ErrorCode::UnsupportedVersion,
5065 Some(ErrorDetail::UnsupportedVersion { .. })
5066 )
5067 | (ErrorCode::Unauthenticated, Some(ErrorDetail::Unauthenticated))
5068 | (ErrorCode::PermissionDenied, Some(ErrorDetail::PermissionDenied { .. }))
5069 | (ErrorCode::NotFound, Some(ErrorDetail::NotFound { .. }))
5070 | (ErrorCode::Conflict, Some(ErrorDetail::Conflict { .. }))
5071 | (ErrorCode::StaleCursor, Some(ErrorDetail::StaleCursor { .. }))
5072 | (
5073 ErrorCode::RestartBudgetExhausted,
5074 Some(ErrorDetail::RestartBudgetExhausted { .. })
5075 )
5076 | (ErrorCode::LimitExceeded, Some(ErrorDetail::LimitExceeded { .. }))
5077 | (
5078 ErrorCode::CapabilityUnavailable,
5079 Some(ErrorDetail::CapabilityUnavailable { .. })
5080 )
5081 | (ErrorCode::NotSubmitted, Some(ErrorDetail::NotSubmitted { .. }))
5082 | (
5083 ErrorCode::SubmittedIndeterminate,
5084 Some(ErrorDetail::SubmittedIndeterminate { .. })
5085 )
5086 | (ErrorCode::ExpiredUnknown, Some(ErrorDetail::ExpiredUnknown { .. }))
5087 | (ErrorCode::SecretNotEscrowed, Some(ErrorDetail::SecretNotEscrowed))
5088 | (ErrorCode::RetentionGap, Some(ErrorDetail::RetentionGap { .. }))
5089 | (
5090 ErrorCode::ArtifactRangeInvalid,
5091 Some(ErrorDetail::ArtifactRangeInvalid { .. })
5092 )
5093 | (ErrorCode::ChecksumMismatch, Some(ErrorDetail::ChecksumMismatch { .. }))
5094 | (
5095 ErrorCode::TemporarilyUnavailable,
5096 Some(ErrorDetail::TemporarilyUnavailable { .. })
5097 )
5098 | (ErrorCode::Internal, Some(ErrorDetail::Internal))
5099 );
5100 if !detail_matches {
5101 return Err(ErrorShapeError::DetailCodeMismatch);
5102 }
5103 let retry_after = match &body.details {
5104 Some(ErrorDetail::NotSubmitted { retry_after_millis })
5105 | Some(ErrorDetail::TemporarilyUnavailable { retry_after_millis }) => retry_after_millis.as_ref(),
5106 _ => None,
5107 };
5108 if retry_after
5109 .and_then(|value| value.value.parse::<u64>().ok())
5110 .is_some_and(|value| value > 60000)
5111 {
5112 return Err(ErrorShapeError::RetryAfterOutOfRange);
5113 }
5114 Ok(())
5115}
5116#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
5117#[serde(deny_unknown_fields)]
5118pub struct RequestMeta {
5119 pub format_version: u16,
5120 pub request_id: String,
5121 pub correlation_id: Identity,
5122 pub absolute_deadline_unix_millis: U64,
5123 pub workload_class: WorkloadClass,
5124}
5125
5126#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5127#[serde(deny_unknown_fields)]
5128pub struct DiscoverRequest {}
5129
5130#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5131#[serde(deny_unknown_fields)]
5132pub struct DiscoverResult {
5133 pub principal_id: Identity,
5134 pub collection_id: Identity,
5135 pub policy_revision: U64,
5136 pub artifact_version: String,
5137 pub schema_id: String,
5138 pub schema_digest: Digest,
5139 pub streams: Vec<StreamBinding>,
5140 pub capabilities: Vec<CapabilityGrant>,
5141 pub limits: Vec<ProtocolLimit>,
5142}
5143
5144#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5145#[serde(deny_unknown_fields)]
5146pub struct ListIndexesRequest {
5147 pub page_size: u32,
5148 #[serde(default, skip_serializing_if = "Option::is_none")]
5149 pub cursor: Option<Cursor>,
5150 #[serde(default, skip_serializing_if = "Option::is_none")]
5151 pub name_prefix: Option<String>,
5152 #[serde(default, skip_serializing_if = "Option::is_none")]
5153 pub mode: Option<String>,
5154 #[serde(default, skip_serializing_if = "Option::is_none")]
5155 pub state: Option<String>,
5156 pub restart_count: u32,
5157}
5158
5159#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5160#[serde(deny_unknown_fields)]
5161pub struct ListIndexesResult {
5162 pub items: Vec<IndexSummary>,
5163 #[serde(default, skip_serializing_if = "Option::is_none")]
5164 pub next_cursor: Option<Cursor>,
5165 pub restart_count: u32,
5166}
5167
5168#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5169#[serde(deny_unknown_fields)]
5170pub struct GetIndexRequest {
5171 pub name: String,
5172 #[serde(default, skip_serializing_if = "Option::is_none")]
5173 pub expected_incarnation: Option<Identity>,
5174}
5175
5176#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5177#[serde(deny_unknown_fields)]
5178pub struct GetIndexResult {
5179 pub resource: IndexDetail,
5180}
5181
5182#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5183#[serde(deny_unknown_fields)]
5184pub struct ValidateIndexChangeRequest {
5185 pub action_kind: String,
5186 pub name: String,
5187 #[serde(default, skip_serializing_if = "Option::is_none")]
5188 pub expected_incarnation: Option<Identity>,
5189 #[serde(default, skip_serializing_if = "Option::is_none")]
5190 pub expected_revision: Option<U64>,
5191 #[serde(default, skip_serializing_if = "Option::is_none")]
5192 pub mode: Option<String>,
5193 #[serde(default, skip_serializing_if = "Option::is_none")]
5194 pub mapping: Option<Mapping>,
5195 #[serde(default, skip_serializing_if = "Option::is_none")]
5196 pub policies: Option<IndexPolicies>,
5197}
5198
5199#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5200#[serde(deny_unknown_fields)]
5201pub struct ValidateIndexChangeResult {
5202 pub change_kind: String,
5203 pub fields_added: Vec<String>,
5204 pub policy_axes_changed: Vec<String>,
5205 pub required_capabilities: Vec<String>,
5206 pub catalog_revision: U64,
5207 pub policy_revision: U64,
5208}
5209
5210#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5211#[serde(deny_unknown_fields)]
5212pub struct ApplyIndexChangeRequest {
5213 pub action_id: Digest,
5214 pub index: Resource,
5215 pub expected_revision: U64,
5216 #[serde(default, skip_serializing_if = "Option::is_none")]
5217 pub mapping: Option<Mapping>,
5218 #[serde(default, skip_serializing_if = "Option::is_none")]
5219 pub policies: Option<IndexPolicies>,
5220}
5221
5222#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5223#[serde(deny_unknown_fields)]
5224pub struct ApplyIndexChangeResult {
5225 pub receipt: IndexChangeApplyReceipt,
5226}
5227
5228#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5229#[serde(deny_unknown_fields)]
5230pub struct ApplyAdministrationMutationRequest {
5231 pub action_id: Digest,
5232 pub expected_revision: U64,
5233 pub mutation: AdministrationMutation,
5234}
5235
5236#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5237#[serde(deny_unknown_fields)]
5238pub struct ApplyAdministrationMutationResult {
5239 pub outcome: AdministrationOutcome,
5240}
5241
5242#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5243#[serde(deny_unknown_fields)]
5244pub struct ListAliasesRequest {
5245 pub page_size: u32,
5246 #[serde(default, skip_serializing_if = "Option::is_none")]
5247 pub cursor: Option<Cursor>,
5248 #[serde(default, skip_serializing_if = "Option::is_none")]
5249 pub name_prefix: Option<String>,
5250 pub restart_count: u32,
5251}
5252
5253#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5254#[serde(deny_unknown_fields)]
5255pub struct ListAliasesResult {
5256 pub items: Vec<AliasSummary>,
5257 #[serde(default, skip_serializing_if = "Option::is_none")]
5258 pub next_cursor: Option<Cursor>,
5259 pub restart_count: u32,
5260}
5261
5262#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5263#[serde(deny_unknown_fields)]
5264pub struct GetAliasRequest {
5265 pub name: String,
5266}
5267
5268#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5269#[serde(deny_unknown_fields)]
5270pub struct GetAliasResult {
5271 pub resource: AliasDetail,
5272}
5273
5274#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5275#[serde(deny_unknown_fields)]
5276pub struct ListDataStreamsRequest {
5277 pub page_size: u32,
5278 #[serde(default, skip_serializing_if = "Option::is_none")]
5279 pub cursor: Option<Cursor>,
5280 #[serde(default, skip_serializing_if = "Option::is_none")]
5281 pub name_prefix: Option<String>,
5282 pub restart_count: u32,
5283}
5284
5285#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5286#[serde(deny_unknown_fields)]
5287pub struct ListDataStreamsResult {
5288 pub items: Vec<DataStreamSummary>,
5289 #[serde(default, skip_serializing_if = "Option::is_none")]
5290 pub next_cursor: Option<Cursor>,
5291 pub restart_count: u32,
5292}
5293
5294#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5295#[serde(deny_unknown_fields)]
5296pub struct GetDataStreamRequest {
5297 pub name: String,
5298}
5299
5300#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5301#[serde(deny_unknown_fields)]
5302pub struct GetDataStreamResult {
5303 pub resource: DataStreamDetail,
5304}
5305
5306#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5307#[serde(deny_unknown_fields)]
5308pub struct ListComponentTemplatesRequest {
5309 pub page_size: u32,
5310 #[serde(default, skip_serializing_if = "Option::is_none")]
5311 pub cursor: Option<Cursor>,
5312 #[serde(default, skip_serializing_if = "Option::is_none")]
5313 pub name_prefix: Option<String>,
5314 pub restart_count: u32,
5315}
5316
5317#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5318#[serde(deny_unknown_fields)]
5319pub struct ListComponentTemplatesResult {
5320 pub items: Vec<ComponentTemplateSummary>,
5321 #[serde(default, skip_serializing_if = "Option::is_none")]
5322 pub next_cursor: Option<Cursor>,
5323 pub restart_count: u32,
5324}
5325
5326#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5327#[serde(deny_unknown_fields)]
5328pub struct GetComponentTemplateRequest {
5329 pub name: String,
5330 #[serde(default, skip_serializing_if = "Option::is_none")]
5331 pub expected_incarnation: Option<Identity>,
5332}
5333
5334#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5335#[serde(deny_unknown_fields)]
5336pub struct GetComponentTemplateResult {
5337 pub resource: ComponentTemplateDetail,
5338}
5339
5340#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5341#[serde(deny_unknown_fields)]
5342pub struct ListIndexTemplatesRequest {
5343 pub page_size: u32,
5344 #[serde(default, skip_serializing_if = "Option::is_none")]
5345 pub cursor: Option<Cursor>,
5346 #[serde(default, skip_serializing_if = "Option::is_none")]
5347 pub name_prefix: Option<String>,
5348 pub restart_count: u32,
5349}
5350
5351#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5352#[serde(deny_unknown_fields)]
5353pub struct ListIndexTemplatesResult {
5354 pub items: Vec<IndexTemplateSummary>,
5355 #[serde(default, skip_serializing_if = "Option::is_none")]
5356 pub next_cursor: Option<Cursor>,
5357 pub restart_count: u32,
5358}
5359
5360#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5361#[serde(deny_unknown_fields)]
5362pub struct GetIndexTemplateRequest {
5363 pub name: String,
5364 #[serde(default, skip_serializing_if = "Option::is_none")]
5365 pub expected_incarnation: Option<Identity>,
5366}
5367
5368#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5369#[serde(deny_unknown_fields)]
5370pub struct GetIndexTemplateResult {
5371 pub resource: IndexTemplateDetail,
5372}
5373
5374#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5375#[serde(deny_unknown_fields)]
5376pub struct ListIngestPipelinesRequest {
5377 pub page_size: u32,
5378 #[serde(default, skip_serializing_if = "Option::is_none")]
5379 pub cursor: Option<Cursor>,
5380 #[serde(default, skip_serializing_if = "Option::is_none")]
5381 pub name_prefix: Option<String>,
5382 pub restart_count: u32,
5383}
5384
5385#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5386#[serde(deny_unknown_fields)]
5387pub struct ListIngestPipelinesResult {
5388 pub items: Vec<IngestPipelineSummary>,
5389 #[serde(default, skip_serializing_if = "Option::is_none")]
5390 pub next_cursor: Option<Cursor>,
5391 pub restart_count: u32,
5392}
5393
5394#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5395#[serde(deny_unknown_fields)]
5396pub struct GetIngestPipelineRequest {
5397 pub name: String,
5398 #[serde(default, skip_serializing_if = "Option::is_none")]
5399 pub expected_incarnation: Option<Identity>,
5400}
5401
5402#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5403#[serde(deny_unknown_fields)]
5404pub struct GetIngestPipelineResult {
5405 pub resource: IngestPipelineDetail,
5406}
5407
5408#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5409#[serde(deny_unknown_fields)]
5410pub struct SimulateIngestPipelineRequest {
5411 #[serde(default, skip_serializing_if = "Option::is_none")]
5412 pub name: Option<String>,
5413 #[serde(default, skip_serializing_if = "Option::is_none")]
5414 pub expected: Option<ExpectedBinding>,
5415 #[serde(default, skip_serializing_if = "Option::is_none")]
5416 pub definition: Option<RawJson>,
5417 pub source: RawJson,
5418}
5419
5420#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5421#[serde(deny_unknown_fields)]
5422pub struct SimulateIngestPipelineResult {
5423 #[serde(default, skip_serializing_if = "Option::is_none")]
5424 pub source: Option<RawJson>,
5425 pub dropped: bool,
5426 pub changed: bool,
5427}
5428
5429#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5430#[serde(deny_unknown_fields)]
5431pub struct ReprocessByQueryRequest {
5432 pub action_id: Digest,
5433 pub index: Resource,
5434 pub query: Query,
5435 #[serde(default, skip_serializing_if = "Option::is_none")]
5436 pub pipeline: Option<IngestPipelineSelection>,
5437 pub batch_size: u32,
5438 pub max_docs: U64,
5439 pub proceed_on_conflict: bool,
5440 pub slices: u32,
5441 pub requests_per_second: u32,
5442 pub wait_for_completion: bool,
5443}
5444
5445#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5446#[serde(deny_unknown_fields)]
5447pub struct ReprocessByQueryResult {
5448 pub task_id: Identity,
5449 pub scanned: U64,
5450 pub updated: U64,
5451 pub noops: U64,
5452 pub version_conflicts: U64,
5453 pub batches: U64,
5454 pub completed: bool,
5455}
5456
5457#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5458#[serde(deny_unknown_fields)]
5459pub struct ListLifecyclePoliciesRequest {
5460 pub page_size: u32,
5461 #[serde(default, skip_serializing_if = "Option::is_none")]
5462 pub cursor: Option<Cursor>,
5463 #[serde(default, skip_serializing_if = "Option::is_none")]
5464 pub name_prefix: Option<String>,
5465 pub restart_count: u32,
5466}
5467
5468#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5469#[serde(deny_unknown_fields)]
5470pub struct ListLifecyclePoliciesResult {
5471 pub items: Vec<LifecyclePolicySummary>,
5472 #[serde(default, skip_serializing_if = "Option::is_none")]
5473 pub next_cursor: Option<Cursor>,
5474 pub restart_count: u32,
5475}
5476
5477#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5478#[serde(deny_unknown_fields)]
5479pub struct GetLifecyclePolicyRequest {
5480 pub name: String,
5481}
5482
5483#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5484#[serde(deny_unknown_fields)]
5485pub struct GetLifecyclePolicyResult {
5486 pub resource: LifecyclePolicyDetail,
5487}
5488
5489#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5490#[serde(deny_unknown_fields)]
5491pub struct PrepareCreateIndexRequest {
5492 pub name: String,
5493 pub mapping: Mapping,
5494 #[serde(default, skip_serializing_if = "Option::is_none")]
5495 pub resource_spec: Option<IndexResourceSpec>,
5496 #[serde(default, skip_serializing_if = "Option::is_none")]
5497 pub retained_event_identity: Option<bool>,
5498}
5499
5500#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5501#[serde(deny_unknown_fields)]
5502pub struct PrepareCreateIndexResult {
5503 pub locator: Locator,
5504 pub expires_at: U64,
5505 pub semantic_digest: Digest,
5506 pub resource_spec: IndexResourceSpec,
5507}
5508
5509#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5510#[serde(deny_unknown_fields)]
5511pub struct PrepareDeleteIndexRequest {
5512 pub name: String,
5513 pub expected_incarnation: Identity,
5514}
5515
5516#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5517#[serde(deny_unknown_fields)]
5518pub struct PrepareDeleteIndexResult {
5519 #[serde(default, skip_serializing_if = "Option::is_none")]
5520 pub locator: Option<Locator>,
5521 #[serde(default, skip_serializing_if = "Option::is_none")]
5522 pub expires_at: Option<U64>,
5523 #[serde(default, skip_serializing_if = "Option::is_none")]
5524 pub semantic_digest: Option<Digest>,
5525 pub impact_digest: Digest,
5526 pub blockers: Vec<String>,
5527 pub scheduled_effects: Vec<String>,
5528 #[serde(default, skip_serializing_if = "Option::is_none")]
5529 pub estimated_documents: Option<U64>,
5530 #[serde(default, skip_serializing_if = "Option::is_none")]
5531 pub estimated_logical_bytes: Option<U64>,
5532}
5533
5534#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5535#[serde(deny_unknown_fields)]
5536pub struct SubmitCatalogActionRequest {
5537 pub locator: Locator,
5538 pub semantic_digest: Digest,
5539 pub action_kind: String,
5540 pub name: String,
5541 #[serde(default, skip_serializing_if = "Option::is_none")]
5542 pub mapping: Option<Mapping>,
5543 #[serde(default, skip_serializing_if = "Option::is_none")]
5544 pub resource_spec: Option<IndexResourceSpec>,
5545 #[serde(default, skip_serializing_if = "Option::is_none")]
5546 pub expected_incarnation: Option<Identity>,
5547}
5548
5549#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5550#[serde(deny_unknown_fields)]
5551pub struct SubmitCatalogActionResult {
5552 pub locator: Locator,
5553 pub state: String,
5554 pub submitted: bool,
5555}
5556
5557#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5558#[serde(deny_unknown_fields)]
5559pub struct ResolveCatalogActionRequest {
5560 pub locator: Locator,
5561}
5562
5563#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5564#[serde(deny_unknown_fields)]
5565pub struct ResolveCatalogActionResult {
5566 pub locator: Locator,
5567 pub state: String,
5568 #[serde(default, skip_serializing_if = "Option::is_none")]
5569 pub resource: Option<Resource>,
5570}
5571
5572#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5573#[serde(deny_unknown_fields)]
5574pub struct PrepareReplayableSourceIndexRequest {
5575 pub name: String,
5576 pub mapping: Mapping,
5577 #[serde(default, skip_serializing_if = "Option::is_none")]
5578 pub resource_spec: Option<IndexResourceSpec>,
5579 pub source: ReplayableSourceConfiguration,
5580}
5581
5582#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5583#[serde(deny_unknown_fields)]
5584pub struct PrepareReplayableSourceIndexResult {
5585 pub locator: Locator,
5586 pub expires_at: U64,
5587 pub semantic_digest: Digest,
5588 pub resource_spec: IndexResourceSpec,
5589}
5590
5591#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5592#[serde(deny_unknown_fields)]
5593pub struct SubmitReplayableSourceIndexRequest {
5594 pub locator: Locator,
5595 pub semantic_digest: Digest,
5596 pub name: String,
5597 pub mapping: Mapping,
5598 pub resource_spec: IndexResourceSpec,
5599 pub source: ReplayableSourceConfiguration,
5600}
5601
5602#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5603#[serde(deny_unknown_fields)]
5604pub struct SubmitReplayableSourceIndexResult {
5605 pub locator: Locator,
5606 pub state: String,
5607 pub submitted: bool,
5608}
5609
5610#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5611#[serde(deny_unknown_fields)]
5612pub struct GetReplayableSourceRequest {
5613 pub index: Resource,
5614}
5615
5616#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5617#[serde(deny_unknown_fields)]
5618pub struct GetReplayableSourceResult {
5619 pub status: ReplayableSourceStatus,
5620}
5621
5622#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5623#[serde(deny_unknown_fields)]
5624pub struct ControlReplayableSourceRequest {
5625 pub index: Resource,
5626 pub expected_generation: U64,
5627 pub transition: SourceControlTransition,
5628}
5629
5630#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5631#[serde(deny_unknown_fields)]
5632pub struct ControlReplayableSourceResult {
5633 pub status: ReplayableSourceStatus,
5634 pub submitted: bool,
5635}
5636
5637#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5638#[serde(deny_unknown_fields)]
5639pub struct CloneIndexRequest {
5640 pub source: Resource,
5641 pub destination_name: String,
5642 pub operation_id: Identity,
5643 pub source_cut_id: Identity,
5644}
5645
5646#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5647#[serde(deny_unknown_fields)]
5648pub struct CloneIndexResult {
5649 pub destination: Resource,
5650 pub source_cut_id: Identity,
5651 pub submitted: bool,
5652}
5653
5654#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5655#[serde(deny_unknown_fields)]
5656pub struct ConfigureHistoryRequest {
5657 pub index: Resource,
5658 pub precondition: HistoryLedgerPrecondition,
5659 pub policy: HistoryRetentionPolicy,
5660}
5661
5662#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5663#[serde(deny_unknown_fields)]
5664pub struct ConfigureHistoryResult {
5665 pub status: HistoryStatus,
5666 pub submitted: bool,
5667}
5668
5669#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5670#[serde(deny_unknown_fields)]
5671pub struct GetHistoryRequest {
5672 pub index: Resource,
5673}
5674
5675#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5676#[serde(deny_unknown_fields)]
5677pub struct GetHistoryResult {
5678 pub status: HistoryStatus,
5679}
5680
5681#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5682#[serde(deny_unknown_fields)]
5683pub struct ResolveHistoryRequest {
5684 pub index: Resource,
5685 pub selector: HistorySelector,
5686}
5687
5688#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5689#[serde(deny_unknown_fields)]
5690pub struct ResolveHistoryResult {
5691 pub resolution: HistoryResolution,
5692}
5693
5694#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5695#[serde(deny_unknown_fields)]
5696pub struct PlaceHistoryHoldRequest {
5697 pub index: Resource,
5698 pub expected_ledger_revision: U64,
5699 pub hold: HistoryHold,
5700}
5701
5702#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5703#[serde(deny_unknown_fields)]
5704pub struct PlaceHistoryHoldResult {
5705 pub status: HistoryStatus,
5706 pub submitted: bool,
5707}
5708
5709#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5710#[serde(deny_unknown_fields)]
5711pub struct ReleaseHistoryHoldRequest {
5712 pub index: Resource,
5713 pub expected_ledger_revision: U64,
5714 pub hold_id: Identity,
5715}
5716
5717#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5718#[serde(deny_unknown_fields)]
5719pub struct ReleaseHistoryHoldResult {
5720 pub status: HistoryStatus,
5721 pub submitted: bool,
5722}
5723
5724#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5725#[serde(deny_unknown_fields)]
5726pub struct PrepareDocumentMutationRequest {
5727 pub index: Resource,
5728 pub document_id: String,
5729 pub operation: String,
5730 #[serde(default, skip_serializing_if = "Option::is_none")]
5731 pub source: Option<RawJson>,
5732 #[serde(default, skip_serializing_if = "Option::is_none")]
5733 pub routing: Option<String>,
5734 #[serde(default, skip_serializing_if = "Option::is_none")]
5735 pub condition: Option<DocumentMutationCondition>,
5736 #[serde(default, skip_serializing_if = "Option::is_none")]
5737 pub pipeline: Option<IngestPipelineSelection>,
5738}
5739
5740#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5741#[serde(deny_unknown_fields)]
5742pub struct PrepareDocumentMutationResult {
5743 pub locator: Locator,
5744 pub semantic_digest: Digest,
5745 pub retention_max_entries: U64,
5746 pub retention_sequence_window: U64,
5747}
5748
5749#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5750#[serde(deny_unknown_fields)]
5751pub struct SubmitDocumentMutationRequest {
5752 pub locator: Locator,
5753 pub semantic_digest: Digest,
5754 pub index: Resource,
5755 pub document_id: String,
5756 pub operation: String,
5757 #[serde(default, skip_serializing_if = "Option::is_none")]
5758 pub source: Option<RawJson>,
5759 #[serde(default, skip_serializing_if = "Option::is_none")]
5760 pub routing: Option<String>,
5761 #[serde(default, skip_serializing_if = "Option::is_none")]
5762 pub condition: Option<DocumentMutationCondition>,
5763 #[serde(default, skip_serializing_if = "Option::is_none")]
5764 pub pipeline: Option<IngestPipelineSelection>,
5765}
5766
5767#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5768#[serde(deny_unknown_fields)]
5769pub struct SubmitDocumentMutationResult {
5770 pub locator: Locator,
5771 pub state: String,
5772 pub submitted: bool,
5773 #[serde(default, skip_serializing_if = "Option::is_none")]
5774 pub sequence: Option<U64>,
5775 #[serde(default, skip_serializing_if = "Option::is_none")]
5776 pub mapping_generation: Option<U64>,
5777 pub mapping_adopted: bool,
5778}
5779
5780#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5781#[serde(deny_unknown_fields)]
5782pub struct PrepareDocumentBulkRequest {
5783 pub batch_id: Digest,
5784 pub index: Resource,
5785 pub items: Vec<BulkDocumentItem>,
5786}
5787
5788#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5789#[serde(deny_unknown_fields)]
5790pub struct PrepareDocumentBulkResult {
5791 pub outcome: BulkDocumentOutcome,
5792}
5793
5794#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5795#[serde(deny_unknown_fields)]
5796pub struct SubmitDocumentBulkRequest {
5797 pub batch_id: Digest,
5798 pub index: Resource,
5799 pub items: Vec<BulkDocumentItem>,
5800 pub preparations: Vec<BulkDocumentItemOutcome>,
5801}
5802
5803#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5804#[serde(deny_unknown_fields)]
5805pub struct SubmitDocumentBulkResult {
5806 pub outcome: BulkDocumentOutcome,
5807}
5808
5809#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5810#[serde(deny_unknown_fields)]
5811pub struct ResolveDocumentBulkRequest {
5812 pub batch_id: Digest,
5813 pub index: Resource,
5814 pub items: Vec<BulkDocumentItemOutcome>,
5815}
5816
5817#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5818#[serde(deny_unknown_fields)]
5819pub struct ResolveDocumentBulkResult {
5820 pub outcome: BulkDocumentOutcome,
5821}
5822
5823#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5824#[serde(deny_unknown_fields)]
5825pub struct PrepareAppendBulkRequest {
5826 pub batch_id: Digest,
5827 pub index: Resource,
5828 pub items: Vec<RetainedAppendItem>,
5829}
5830
5831#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5832#[serde(deny_unknown_fields)]
5833pub struct PrepareAppendBulkResult {
5834 pub outcome: RetainedAppendBulkOutcome,
5835}
5836
5837#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5838#[serde(deny_unknown_fields)]
5839pub struct SubmitAppendBulkRequest {
5840 pub batch_id: Digest,
5841 pub index: Resource,
5842 pub items: Vec<RetainedAppendItem>,
5843 pub preparations: Vec<RetainedAppendItemOutcome>,
5844}
5845
5846#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5847#[serde(deny_unknown_fields)]
5848pub struct SubmitAppendBulkResult {
5849 pub outcome: RetainedAppendBulkOutcome,
5850}
5851
5852#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5853#[serde(deny_unknown_fields)]
5854pub struct ResolveAppendBulkRequest {
5855 pub batch_id: Digest,
5856 pub index: Resource,
5857 pub items: Vec<RetainedAppendItemOutcome>,
5858}
5859
5860#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5861#[serde(deny_unknown_fields)]
5862pub struct ResolveAppendBulkResult {
5863 pub outcome: RetainedAppendBulkOutcome,
5864}
5865
5866#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5867#[serde(deny_unknown_fields)]
5868pub struct ObserveAppendCommittedRequest {
5869 pub index: Resource,
5870 pub locator: Locator,
5871}
5872
5873#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5874#[serde(deny_unknown_fields)]
5875pub struct ObserveAppendCommittedResult {
5876 pub outcome: RetainedAppendObservationOutcome,
5877}
5878
5879#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5880#[serde(deny_unknown_fields)]
5881pub struct ResolveDocumentMutationRequest {
5882 pub locator: Locator,
5883}
5884
5885#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5886#[serde(deny_unknown_fields)]
5887pub struct ResolveDocumentMutationResult {
5888 pub locator: Locator,
5889 pub state: String,
5890 #[serde(default, skip_serializing_if = "Option::is_none")]
5891 pub sequence: Option<U64>,
5892 #[serde(default, skip_serializing_if = "Option::is_none")]
5893 pub mapping_generation: Option<U64>,
5894 pub mapping_adopted: bool,
5895 #[serde(default, skip_serializing_if = "Option::is_none")]
5896 pub source: Option<RawJson>,
5897}
5898
5899#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5900#[serde(deny_unknown_fields)]
5901pub struct GetDocumentRequest {
5902 pub index: Resource,
5903 pub document_id: String,
5904 #[serde(default, skip_serializing_if = "Option::is_none")]
5905 pub routing: Option<String>,
5906}
5907
5908#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5909#[serde(deny_unknown_fields)]
5910pub struct GetDocumentResult {
5911 pub found: bool,
5912 #[serde(default, skip_serializing_if = "Option::is_none")]
5913 pub source: Option<RawJson>,
5914 #[serde(default, skip_serializing_if = "Option::is_none")]
5915 pub sequence: Option<U64>,
5916 #[serde(default, skip_serializing_if = "Option::is_none")]
5917 pub primary_term: Option<U64>,
5918}
5919
5920#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5921#[serde(deny_unknown_fields)]
5922pub struct SearchRequest {
5923 #[serde(default, skip_serializing_if = "Option::is_none")]
5924 pub indexes: Option<Vec<Resource>>,
5925 #[serde(default, skip_serializing_if = "Option::is_none")]
5926 pub query: Option<Query>,
5927 #[serde(default, skip_serializing_if = "Option::is_none")]
5928 pub retrieval: Option<RetrievalPlan>,
5929 #[serde(default, skip_serializing_if = "Option::is_none")]
5930 pub aggregations: Option<Vec<Aggregation>>,
5931 pub sort: Vec<SortSpec>,
5932 #[serde(default, skip_serializing_if = "Option::is_none")]
5933 pub routing: Option<Vec<String>>,
5934 pub freshness: String,
5935 pub page_size: u32,
5936 #[serde(default, skip_serializing_if = "Option::is_none")]
5937 pub cursor: Option<Cursor>,
5938 #[serde(default, skip_serializing_if = "Option::is_none")]
5939 pub pit: Option<Cursor>,
5940 pub allow_partial: bool,
5941 #[serde(default, skip_serializing_if = "Option::is_none")]
5942 pub total_hits_threshold: Option<U64>,
5943 pub diagnostics: bool,
5944 #[serde(default, skip_serializing_if = "Option::is_none")]
5945 pub fragments: Option<FragmentRequest>,
5946 #[serde(default, skip_serializing_if = "Option::is_none")]
5947 pub features: Option<ResultFeatureRequest>,
5948 #[serde(default, skip_serializing_if = "Option::is_none")]
5949 pub diversification: Option<ResultDiversification>,
5950}
5951
5952#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5953#[serde(deny_unknown_fields)]
5954pub struct SearchResult {
5955 pub hits: Vec<SearchHit>,
5956 pub aggregations: Vec<AggregationResult>,
5957 #[serde(default, skip_serializing_if = "Option::is_none")]
5958 pub next_cursor: Option<Cursor>,
5959 pub timed_out: bool,
5960 pub partial: bool,
5961 pub shards: ShardCounts,
5962 pub total: SearchTotal,
5963 pub failures: Vec<ErrorBody>,
5964 pub vector_diagnostics: Vec<VectorBranchDiagnostics>,
5965}
5966
5967#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5968#[serde(deny_unknown_fields)]
5969pub struct OpenPitRequest {
5970 pub indexes: Vec<Resource>,
5971 pub keep_alive_millis: U64,
5972}
5973
5974#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5975#[serde(deny_unknown_fields)]
5976pub struct OpenPitResult {
5977 pub pit: Cursor,
5978 pub expires_at: U64,
5979 pub shard_count: u32,
5980}
5981
5982#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5983#[serde(deny_unknown_fields)]
5984pub struct RenewPitRequest {
5985 pub pit: Cursor,
5986 pub keep_alive_millis: U64,
5987}
5988
5989#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5990#[serde(deny_unknown_fields)]
5991pub struct RenewPitResult {
5992 pub pit: Cursor,
5993 pub expires_at: U64,
5994 pub shard_count: u32,
5995}
5996
5997#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5998#[serde(deny_unknown_fields)]
5999pub struct ClosePitRequest {
6000 pub pit: Cursor,
6001}
6002
6003#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6004#[serde(deny_unknown_fields)]
6005pub struct ClosePitResult {
6006 pub removed: bool,
6007}
6008
6009#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6010#[serde(deny_unknown_fields)]
6011pub struct ListOperationsRequest {
6012 pub page_size: u32,
6013 #[serde(default, skip_serializing_if = "Option::is_none")]
6014 pub cursor: Option<Cursor>,
6015}
6016
6017#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6018#[serde(deny_unknown_fields)]
6019pub struct ListOperationsResult {
6020 pub items: Vec<Operation>,
6021 #[serde(default, skip_serializing_if = "Option::is_none")]
6022 pub next_cursor: Option<Cursor>,
6023}
6024
6025#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6026#[serde(deny_unknown_fields)]
6027pub struct GetOperationRequest {
6028 pub locator: Locator,
6029}
6030
6031#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6032#[serde(deny_unknown_fields)]
6033pub struct GetOperationResult {
6034 pub operation: Operation,
6035}
6036
6037#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6038#[serde(deny_unknown_fields)]
6039pub struct CancelOperationRequest {
6040 pub locator: Locator,
6041 pub expected_authority_revision: U64,
6042 pub cancel_action: Identity,
6043}
6044
6045#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6046#[serde(deny_unknown_fields)]
6047pub struct CancelOperationResult {
6048 pub locator: Locator,
6049 pub cancel_generation: U64,
6050 pub submitted: bool,
6051}
6052
6053#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6054#[serde(deny_unknown_fields)]
6055pub struct ListAuditEventsRequest {
6056 pub start_time: U64,
6057 pub end_time: U64,
6058 pub actions: Vec<String>,
6059 pub page_size: u32,
6060 #[serde(default, skip_serializing_if = "Option::is_none")]
6061 pub cursor: Option<Cursor>,
6062}
6063
6064#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6065#[serde(deny_unknown_fields)]
6066pub struct ListAuditEventsResult {
6067 pub events: Vec<AuditEvent>,
6068 #[serde(default, skip_serializing_if = "Option::is_none")]
6069 pub next_cursor: Option<Cursor>,
6070 pub gaps: Vec<AuditGap>,
6071 pub object_reads: u32,
6072}
6073
6074#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6075#[serde(deny_unknown_fields)]
6076pub struct ExportAuditEventsRequest {
6077 pub start_time: U64,
6078 pub end_time: U64,
6079 pub actions: Vec<String>,
6080 pub page_size: u32,
6081 #[serde(default, skip_serializing_if = "Option::is_none")]
6082 pub cursor: Option<Cursor>,
6083}
6084
6085#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6086#[serde(deny_unknown_fields)]
6087pub struct ExportAuditEventsResult {
6088 pub events: Vec<AuditEvent>,
6089 #[serde(default, skip_serializing_if = "Option::is_none")]
6090 pub next_cursor: Option<Cursor>,
6091 pub gaps: Vec<AuditGap>,
6092 pub object_reads: u32,
6093}
6094
6095#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6096#[serde(deny_unknown_fields)]
6097pub struct ReserveServiceCredentialRequest {
6098 pub reservation_action_id: Digest,
6099 pub activation_action_id: Digest,
6100 pub role_grants: Vec<ServiceCredentialGrant>,
6101 pub credential_expires_at: U64,
6102 pub reservation_expires_at: U64,
6103}
6104
6105#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6106#[serde(deny_unknown_fields)]
6107pub struct ReserveServiceCredentialResult {
6108 pub reservation: ServiceCredentialReservation,
6109}
6110
6111#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6112#[serde(deny_unknown_fields)]
6113pub struct ReserveServiceCredentialRotationRequest {
6114 pub reservation_action_id: Digest,
6115 pub activation_action_id: Digest,
6116 pub current_api_key_id: Identity,
6117 pub expected_generation: U64,
6118 pub credential_expires_at: U64,
6119 pub overlap_until: U64,
6120 pub reservation_expires_at: U64,
6121}
6122
6123#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6124#[serde(deny_unknown_fields)]
6125pub struct ReserveServiceCredentialRotationResult {
6126 pub reservation: ServiceCredentialReservation,
6127}
6128
6129#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6130#[serde(deny_unknown_fields)]
6131pub struct ActivateServiceCredentialRequest {
6132 pub reservation: ServiceCredentialReservation,
6133 pub verifier: Digest,
6134}
6135
6136#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6137#[serde(deny_unknown_fields)]
6138pub struct ActivateServiceCredentialResult {
6139 pub locator: Locator,
6140 pub outcome: SecurityActionOutcome,
6141 pub secret_escrowed: bool,
6142}
6143
6144#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6145#[serde(deny_unknown_fields)]
6146pub struct ResolveServiceCredentialReservationRequest {
6147 pub reservation_action_id: Digest,
6148}
6149
6150#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6151#[serde(deny_unknown_fields)]
6152pub struct ResolveServiceCredentialReservationResult {
6153 pub state: String,
6154 #[serde(default, skip_serializing_if = "Option::is_none")]
6155 pub reservation: Option<ServiceCredentialReservation>,
6156 #[serde(default, skip_serializing_if = "Option::is_none")]
6157 pub outcome: Option<SecurityActionOutcome>,
6158}
6159
6160#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6161#[serde(deny_unknown_fields)]
6162pub struct PrepareRevokeServiceCredentialRequest {
6163 pub api_key_id: Identity,
6164 pub expected_generation: U64,
6165}
6166
6167#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6168#[serde(deny_unknown_fields)]
6169pub struct PrepareRevokeServiceCredentialResult {
6170 pub locator: Locator,
6171 pub semantic_digest: Digest,
6172 pub expires_at: U64,
6173}
6174
6175#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6176#[serde(deny_unknown_fields)]
6177pub struct RevokeServiceCredentialRequest {
6178 pub locator: Locator,
6179 pub api_key_id: Identity,
6180 pub expected_generation: U64,
6181}
6182
6183#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6184#[serde(deny_unknown_fields)]
6185pub struct RevokeServiceCredentialResult {
6186 pub locator: Locator,
6187 pub principal_id: Identity,
6188 pub api_key_id: Identity,
6189 pub state: String,
6190}
6191
6192#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6193#[serde(deny_unknown_fields)]
6194pub struct ResolveSecurityActionRequest {
6195 pub locator: Locator,
6196}
6197
6198#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6199#[serde(deny_unknown_fields)]
6200pub struct ResolveSecurityActionResult {
6201 pub locator: Locator,
6202 pub state: String,
6203 #[serde(default, skip_serializing_if = "Option::is_none")]
6204 pub result: Option<SecurityActionOutcome>,
6205 pub secret_escrowed: bool,
6206}
6207
6208#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6209#[serde(deny_unknown_fields)]
6210pub struct GetSecurityRoleRequest {
6211 pub role_name: String,
6212}
6213
6214#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6215#[serde(deny_unknown_fields)]
6216pub struct GetSecurityRoleResult {
6217 pub role: SecurityRole,
6218}
6219
6220#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6221#[serde(deny_unknown_fields)]
6222pub struct PrepareRoleAppendAccessChangeRequest {
6223 pub role_name: String,
6224 pub expected_role_version: U64,
6225 pub changes: Vec<RoleAppendScopeChange>,
6226}
6227
6228#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6229#[serde(deny_unknown_fields)]
6230pub struct PrepareRoleAppendAccessChangeResult {
6231 pub preparation: RoleAppendAccessPreparation,
6232}
6233
6234#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6235#[serde(deny_unknown_fields)]
6236pub struct SubmitRoleAppendAccessChangeRequest {
6237 pub locator: Locator,
6238 pub semantic_digest: Digest,
6239 pub role_name: String,
6240 pub expected_role_version: U64,
6241 pub changes: Vec<RoleAppendScopeChange>,
6242}
6243
6244#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6245#[serde(deny_unknown_fields)]
6246pub struct SubmitRoleAppendAccessChangeResult {
6247 pub locator: Locator,
6248 pub state: String,
6249 pub target_policy_revision: U64,
6250 pub role: SecurityRole,
6251}
6252
6253#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6254#[serde(deny_unknown_fields)]
6255pub struct ListServiceCredentialsRequest {
6256 pub page_size: u32,
6257 #[serde(default, skip_serializing_if = "Option::is_none")]
6258 pub cursor: Option<Cursor>,
6259}
6260
6261#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6262#[serde(deny_unknown_fields)]
6263pub struct ListServiceCredentialsResult {
6264 pub items: Vec<ServiceCredentialSummary>,
6265 #[serde(default, skip_serializing_if = "Option::is_none")]
6266 pub next_cursor: Option<Cursor>,
6267}
6268
6269#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6270#[serde(deny_unknown_fields)]
6271pub struct ListBackupsRequest {
6272 pub page_size: u32,
6273 #[serde(default, skip_serializing_if = "Option::is_none")]
6274 pub cursor: Option<Cursor>,
6275}
6276
6277#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6278#[serde(deny_unknown_fields)]
6279pub struct ListBackupsResult {
6280 pub items: Vec<Operation>,
6281 #[serde(default, skip_serializing_if = "Option::is_none")]
6282 pub next_cursor: Option<Cursor>,
6283}
6284
6285#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6286#[serde(deny_unknown_fields)]
6287pub struct GetBackupRequest {
6288 pub locator: Locator,
6289}
6290
6291#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6292#[serde(deny_unknown_fields)]
6293pub struct GetBackupResult {
6294 pub operation: Operation,
6295 pub artifacts: Vec<Artifact>,
6296}
6297
6298#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6299#[serde(deny_unknown_fields)]
6300pub struct CreateBackupRequest {
6301 pub action_id: Digest,
6302 pub encryption_policies: Vec<BackupEncryptionPolicy>,
6303}
6304
6305#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6306#[serde(deny_unknown_fields)]
6307pub struct CreateBackupResult {
6308 pub outcome: BackupCreateOutcome,
6309}
6310
6311#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6312#[serde(deny_unknown_fields)]
6313pub struct ResolveBackupActionRequest {
6314 pub action_id: Digest,
6315}
6316
6317#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6318#[serde(deny_unknown_fields)]
6319pub struct ResolveBackupActionResult {
6320 pub operation: Operation,
6321}
6322
6323#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6324#[serde(deny_unknown_fields)]
6325pub struct GetRuntimeStatusRequest {}
6326
6327#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6328#[serde(deny_unknown_fields)]
6329pub struct GetRuntimeStatusResult {
6330 pub ready: bool,
6331 pub recovery_era: Identity,
6332 pub catalog_revision: U64,
6333 pub policy_revision: U64,
6334 pub redacted: RuntimeStatusDetail,
6335}
6336
6337#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6338#[serde(deny_unknown_fields)]
6339pub struct GetResultCacheStatusRequest {}
6340
6341#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6342#[serde(deny_unknown_fields)]
6343pub struct GetResultCacheStatusResult {
6344 pub status: ResultCacheStatus,
6345}
6346
6347#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6348#[serde(deny_unknown_fields)]
6349pub struct GetFieldPromotionStatusRequest {
6350 pub index: Resource,
6351}
6352
6353#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6354#[serde(deny_unknown_fields)]
6355pub struct GetFieldPromotionStatusResult {
6356 pub status: FieldPromotionStatus,
6357}
6358
6359#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6360#[serde(deny_unknown_fields)]
6361pub struct GetOverloadStatusRequest {
6362 pub index: Resource,
6363}
6364
6365#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6366#[serde(deny_unknown_fields)]
6367pub struct GetOverloadStatusResult {
6368 pub runtime_observed: bool,
6369 pub shards: Vec<OverloadShardStatus>,
6370}
6371
6372#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6373#[serde(deny_unknown_fields)]
6374pub struct ConfigureExternalKeyRequest {
6375 pub index: Resource,
6376 pub expected_authority_revision: U64,
6377 pub binding: ExternalKeyBinding,
6378}
6379
6380#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6381#[serde(deny_unknown_fields)]
6382pub struct ConfigureExternalKeyResult {
6383 pub status: LifecycleStatus,
6384 pub submitted: bool,
6385}
6386
6387#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6388#[serde(deny_unknown_fields)]
6389pub struct RotateExternalKeyBindingRequest {
6390 pub index: Resource,
6391 pub expected_authority_revision: U64,
6392 pub predecessor_binding_id: Identity,
6393 pub binding: ExternalKeyBinding,
6394}
6395
6396#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6397#[serde(deny_unknown_fields)]
6398pub struct RotateExternalKeyBindingResult {
6399 pub status: LifecycleStatus,
6400 pub submitted: bool,
6401}
6402
6403#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6404#[serde(deny_unknown_fields)]
6405pub struct ConfigureAggregateThenDeleteRequest {
6406 pub index: Resource,
6407 pub expected_authority_revision: U64,
6408 pub policy: AggregateThenDeletePolicy,
6409}
6410
6411#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6412#[serde(deny_unknown_fields)]
6413pub struct ConfigureAggregateThenDeleteResult {
6414 pub status: LifecycleStatus,
6415 pub submitted: bool,
6416}
6417
6418#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6419#[serde(deny_unknown_fields)]
6420pub struct GetLifecycleStatusRequest {
6421 pub index: Resource,
6422}
6423
6424#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6425#[serde(deny_unknown_fields)]
6426pub struct GetLifecycleStatusResult {
6427 pub status: LifecycleStatus,
6428}
6429
6430#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6431#[serde(deny_unknown_fields)]
6432pub struct GetQuotaRequest {}
6433
6434#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6435#[serde(deny_unknown_fields)]
6436pub struct GetQuotaResult {
6437 pub revision: U64,
6438 pub limits: Vec<QuotaLimit>,
6439 pub usage: Vec<QuotaConsumption>,
6440}
6441
6442#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6443#[serde(deny_unknown_fields)]
6444pub struct UpdateQuotaRequest {
6445 pub expected_revision: U64,
6446 pub limits: Vec<QuotaLimit>,
6447}
6448
6449#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6450#[serde(deny_unknown_fields)]
6451pub struct UpdateQuotaResult {
6452 pub update: QuotaUpdate,
6453}
6454
6455#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6456#[serde(deny_unknown_fields)]
6457pub struct GetBindingRequest {}
6458
6459#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6460#[serde(deny_unknown_fields)]
6461pub struct GetBindingResult {
6462 pub binding: CoreBinding,
6463 pub derived: bool,
6464 pub revision: U64,
6465}
6466
6467#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6468#[serde(deny_unknown_fields)]
6469pub struct GetAdmissionStatusRequest {}
6470
6471#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6472#[serde(deny_unknown_fields)]
6473pub struct GetAdmissionStatusResult {
6474 pub state: String,
6475 pub revision: U64,
6476 pub converged: bool,
6477}
6478
6479#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6480#[serde(deny_unknown_fields)]
6481pub struct SetAdmissionRequest {
6482 pub expected_revision: U64,
6483 pub state: String,
6484}
6485
6486#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6487#[serde(deny_unknown_fields)]
6488pub struct SetAdmissionResult {
6489 pub state: String,
6490 pub revision: U64,
6491 pub converged: bool,
6492}
6493
6494#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6495#[serde(deny_unknown_fields)]
6496pub struct GetQuiesceStatusRequest {}
6497
6498#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6499#[serde(deny_unknown_fields)]
6500pub struct GetQuiesceStatusResult {
6501 pub ready: bool,
6502 pub blockers: Vec<String>,
6503 pub observations: Vec<ReadinessObservation>,
6504 pub recovery_era: Identity,
6505 pub observed_at: U64,
6506 pub expires_at: U64,
6507}
6508
6509#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6510#[serde(deny_unknown_fields)]
6511pub struct GetDecommissionReadinessRequest {}
6512
6513#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6514#[serde(deny_unknown_fields)]
6515pub struct GetDecommissionReadinessResult {
6516 pub ready: bool,
6517 pub blockers: Vec<String>,
6518 pub observations: Vec<ReadinessObservation>,
6519 pub recovery_era: Identity,
6520 pub observed_at: U64,
6521 pub expires_at: U64,
6522}
6523
6524#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6525#[serde(deny_unknown_fields)]
6526pub struct GetUpgradeReadinessRequest {}
6527
6528#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6529#[serde(deny_unknown_fields)]
6530pub struct GetUpgradeReadinessResult {
6531 pub ready: bool,
6532 pub blockers: Vec<String>,
6533 pub observations: Vec<ReadinessObservation>,
6534 pub recovery_era: Identity,
6535 pub observed_at: U64,
6536 pub expires_at: U64,
6537}
6538
6539#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6540#[serde(deny_unknown_fields)]
6541pub struct GetMaintenanceStatusRequest {
6542 pub page_size: u32,
6543 #[serde(default, skip_serializing_if = "Option::is_none")]
6544 pub cursor: Option<Cursor>,
6545 #[serde(default, skip_serializing_if = "Option::is_none")]
6546 pub index: Option<Resource>,
6547}
6548
6549#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6550#[serde(deny_unknown_fields)]
6551pub struct GetMaintenanceStatusResult {
6552 pub aggregate: MaintenanceStatusAggregate,
6553 pub items: Vec<MaintenanceTaskStatus>,
6554 #[serde(default, skip_serializing_if = "Option::is_none")]
6555 pub next_cursor: Option<Cursor>,
6556}
6557
6558#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6559#[serde(deny_unknown_fields)]
6560pub struct GetRestoreReadinessRequest {}
6561
6562#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6563#[serde(deny_unknown_fields)]
6564pub struct GetRestoreReadinessResult {
6565 pub ready: bool,
6566 pub blockers: Vec<String>,
6567 pub observations: Vec<ReadinessObservation>,
6568 pub recovery_era: Identity,
6569 pub observed_at: U64,
6570 pub expires_at: U64,
6571}
6572
6573#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6574#[serde(deny_unknown_fields)]
6575pub struct WarmVectorIndexRequest {
6576 pub index: Resource,
6577 #[serde(default, skip_serializing_if = "Option::is_none")]
6578 pub expected_root_digest: Option<Digest>,
6579 pub components: Vec<VectorWarmComponent>,
6580 pub maximum_requests: u32,
6581 pub maximum_bytes: U64,
6582 pub maximum_achievements: u32,
6583 pub expires_at: U64,
6584}
6585
6586#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6587#[serde(deny_unknown_fields)]
6588pub struct WarmVectorIndexResult {
6589 pub result: VectorWarmResult,
6590}
6591
6592#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6593#[serde(deny_unknown_fields)]
6594pub struct EvaluateVectorRecallRequest {
6595 pub action_id: Digest,
6596 pub index: Resource,
6597 pub field: String,
6598 pub mapping_generation: U64,
6599 pub snapshot: VectorEvaluationSnapshot,
6600 pub query_set: VectorEvaluationQuerySet,
6601 #[serde(default, skip_serializing_if = "Option::is_none")]
6602 pub filter: Option<Query>,
6603 pub metric: VectorMetric,
6604 pub k: u32,
6605 pub candidate_policy: VectorCandidatePolicy,
6606 pub budget: VectorEvaluationBudget,
6607 pub maximum_bytes: U64,
6608}
6609
6610#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6611#[serde(deny_unknown_fields)]
6612pub struct EvaluateVectorRecallResult {
6613 pub operation: Operation,
6614}
6615
6616#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6617#[serde(deny_unknown_fields)]
6618pub struct CalibrateVectorStrategyRequest {
6619 pub action_id: Digest,
6620 pub index: Resource,
6621 pub field: String,
6622 pub mapping_generation: U64,
6623 pub snapshot: VectorEvaluationSnapshot,
6624 pub query_set: VectorEvaluationQuerySet,
6625 #[serde(default, skip_serializing_if = "Option::is_none")]
6626 pub filter: Option<Query>,
6627 pub metric: VectorMetric,
6628 pub k: u32,
6629 pub objective: VectorCalibrationObjective,
6630 pub minimum_recall_basis_points: u32,
6631 pub budget: VectorEvaluationBudget,
6632 pub maximum_bytes: U64,
6633}
6634
6635#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6636#[serde(deny_unknown_fields)]
6637pub struct CalibrateVectorStrategyResult {
6638 pub operation: Operation,
6639}
6640
6641#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6642#[serde(deny_unknown_fields)]
6643pub struct GetVectorDiagnosticRequest {
6644 pub locator: Locator,
6645}
6646
6647#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6648#[serde(deny_unknown_fields)]
6649pub struct GetVectorDiagnosticResult {
6650 pub operation: Operation,
6651 pub artifacts: Vec<Artifact>,
6652 #[serde(default, skip_serializing_if = "Option::is_none")]
6653 pub result: Option<VectorDiagnosticResult>,
6654}
6655
6656#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6657#[serde(deny_unknown_fields)]
6658pub struct CreateDiagnosticRequest {
6659 pub scope: String,
6660 pub maximum_bytes: U64,
6661}
6662
6663#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6664#[serde(deny_unknown_fields)]
6665pub struct CreateDiagnosticResult {
6666 pub operation: Operation,
6667}
6668
6669#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6670#[serde(deny_unknown_fields)]
6671pub struct GetDiagnosticRequest {
6672 pub locator: Locator,
6673}
6674
6675#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6676#[serde(deny_unknown_fields)]
6677pub struct GetDiagnosticResult {
6678 pub operation: Operation,
6679 pub artifacts: Vec<Artifact>,
6680}
6681
6682#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6683#[serde(deny_unknown_fields)]
6684pub struct ReadArtifactChunkRequest {
6685 pub artifact: Artifact,
6686 pub offset: U64,
6687 pub length: u32,
6688}
6689
6690#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6691#[serde(deny_unknown_fields)]
6692pub struct ReadArtifactChunkResult {
6693 pub offset: U64,
6694 pub bytes_base64: String,
6695 pub chunk_sha256: String,
6696 pub artifact_sha256: String,
6697 pub complete: bool,
6698}
6699
6700#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6701#[serde(deny_unknown_fields)]
6702pub struct ExportUsageRequest {
6703 pub window_start: U64,
6704 pub window_end: U64,
6705 pub page_size: u32,
6706 #[serde(default, skip_serializing_if = "Option::is_none")]
6707 pub cursor: Option<Cursor>,
6708}
6709
6710#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6711#[serde(deny_unknown_fields)]
6712pub struct ExportUsageResult {
6713 pub units: Vec<CoreUsageUnits>,
6714 pub corrections: Vec<CoreUsageCorrection>,
6715 #[serde(default, skip_serializing_if = "Option::is_none")]
6716 pub next_cursor: Option<Cursor>,
6717 pub cumulative_through: U64,
6718}
6719
6720#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6721#[serde(deny_unknown_fields)]
6722pub struct ExecuteStateReadRequest {
6723 pub index: Resource,
6724 pub operation: StateOperation,
6725}
6726
6727#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6728#[serde(deny_unknown_fields)]
6729pub struct ExecuteStateReadResult {
6730 pub result: StateCommandResult,
6731}
6732
6733#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6734#[serde(deny_unknown_fields)]
6735pub struct PrepareStateWriteRequest {
6736 pub index: Resource,
6737 pub action_id: Digest,
6738 pub operation: StateOperation,
6739}
6740
6741#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6742#[serde(deny_unknown_fields)]
6743pub struct PrepareStateWriteResult {
6744 pub locator: Locator,
6745 pub semantic_digest: Digest,
6746 pub retention_max_entries: U64,
6747 pub retention_sequence_window: U64,
6748}
6749
6750#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6751#[serde(deny_unknown_fields)]
6752pub struct SubmitStateWriteRequest {
6753 pub index: Resource,
6754 pub action_id: Digest,
6755 pub operation: StateOperation,
6756 pub locator: Locator,
6757 pub semantic_digest: Digest,
6758}
6759
6760#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6761#[serde(deny_unknown_fields)]
6762pub struct SubmitStateWriteResult {
6763 #[serde(default, skip_serializing_if = "Option::is_none")]
6764 pub result: Option<StateCommandResult>,
6765 #[serde(default, skip_serializing_if = "Option::is_none")]
6766 pub resolution: Option<StateWriteResolution>,
6767 pub submitted: bool,
6768}
6769
6770#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6771#[serde(deny_unknown_fields)]
6772pub struct ResolveStateWriteRequest {
6773 pub index: Resource,
6774 pub action_id: Digest,
6775 pub operation: StateOperation,
6776 pub locator: Locator,
6777 pub semantic_digest: Digest,
6778}
6779
6780#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6781#[serde(deny_unknown_fields)]
6782pub struct ResolveStateWriteResult {
6783 pub resolution: StateWriteResolution,
6784}
6785
6786#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6787#[serde(tag = "command", content = "body", rename_all = "snake_case")]
6788pub enum RequestBody {
6789 Discover(DiscoverRequest),
6790 ListIndexes(ListIndexesRequest),
6791 GetIndex(GetIndexRequest),
6792 ValidateIndexChange(ValidateIndexChangeRequest),
6793 ApplyIndexChange(ApplyIndexChangeRequest),
6794 ApplyAdministrationMutation(ApplyAdministrationMutationRequest),
6795 ListAliases(ListAliasesRequest),
6796 GetAlias(GetAliasRequest),
6797 ListDataStreams(ListDataStreamsRequest),
6798 GetDataStream(GetDataStreamRequest),
6799 ListComponentTemplates(ListComponentTemplatesRequest),
6800 GetComponentTemplate(GetComponentTemplateRequest),
6801 ListIndexTemplates(ListIndexTemplatesRequest),
6802 GetIndexTemplate(GetIndexTemplateRequest),
6803 ListIngestPipelines(ListIngestPipelinesRequest),
6804 GetIngestPipeline(GetIngestPipelineRequest),
6805 SimulateIngestPipeline(SimulateIngestPipelineRequest),
6806 ReprocessByQuery(ReprocessByQueryRequest),
6807 ListLifecyclePolicies(ListLifecyclePoliciesRequest),
6808 GetLifecyclePolicy(GetLifecyclePolicyRequest),
6809 PrepareCreateIndex(PrepareCreateIndexRequest),
6810 PrepareDeleteIndex(PrepareDeleteIndexRequest),
6811 SubmitCatalogAction(SubmitCatalogActionRequest),
6812 ResolveCatalogAction(ResolveCatalogActionRequest),
6813 PrepareReplayableSourceIndex(PrepareReplayableSourceIndexRequest),
6814 SubmitReplayableSourceIndex(SubmitReplayableSourceIndexRequest),
6815 GetReplayableSource(GetReplayableSourceRequest),
6816 ControlReplayableSource(ControlReplayableSourceRequest),
6817 CloneIndex(CloneIndexRequest),
6818 ConfigureHistory(ConfigureHistoryRequest),
6819 GetHistory(GetHistoryRequest),
6820 ResolveHistory(ResolveHistoryRequest),
6821 PlaceHistoryHold(PlaceHistoryHoldRequest),
6822 ReleaseHistoryHold(ReleaseHistoryHoldRequest),
6823 PrepareDocumentMutation(PrepareDocumentMutationRequest),
6824 SubmitDocumentMutation(SubmitDocumentMutationRequest),
6825 PrepareDocumentBulk(PrepareDocumentBulkRequest),
6826 SubmitDocumentBulk(SubmitDocumentBulkRequest),
6827 ResolveDocumentBulk(ResolveDocumentBulkRequest),
6828 PrepareAppendBulk(PrepareAppendBulkRequest),
6829 SubmitAppendBulk(SubmitAppendBulkRequest),
6830 ResolveAppendBulk(ResolveAppendBulkRequest),
6831 ObserveAppendCommitted(ObserveAppendCommittedRequest),
6832 ResolveDocumentMutation(ResolveDocumentMutationRequest),
6833 GetDocument(GetDocumentRequest),
6834 Search(SearchRequest),
6835 OpenPit(OpenPitRequest),
6836 RenewPit(RenewPitRequest),
6837 ClosePit(ClosePitRequest),
6838 ListOperations(ListOperationsRequest),
6839 GetOperation(GetOperationRequest),
6840 CancelOperation(CancelOperationRequest),
6841 ListAuditEvents(ListAuditEventsRequest),
6842 ExportAuditEvents(ExportAuditEventsRequest),
6843 ReserveServiceCredential(ReserveServiceCredentialRequest),
6844 ReserveServiceCredentialRotation(ReserveServiceCredentialRotationRequest),
6845 ActivateServiceCredential(ActivateServiceCredentialRequest),
6846 ResolveServiceCredentialReservation(ResolveServiceCredentialReservationRequest),
6847 PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialRequest),
6848 RevokeServiceCredential(RevokeServiceCredentialRequest),
6849 ResolveSecurityAction(ResolveSecurityActionRequest),
6850 GetSecurityRole(GetSecurityRoleRequest),
6851 PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeRequest),
6852 SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeRequest),
6853 ListServiceCredentials(ListServiceCredentialsRequest),
6854 ListBackups(ListBackupsRequest),
6855 GetBackup(GetBackupRequest),
6856 CreateBackup(CreateBackupRequest),
6857 ResolveBackupAction(ResolveBackupActionRequest),
6858 GetRuntimeStatus(GetRuntimeStatusRequest),
6859 GetResultCacheStatus(GetResultCacheStatusRequest),
6860 GetFieldPromotionStatus(GetFieldPromotionStatusRequest),
6861 GetOverloadStatus(GetOverloadStatusRequest),
6862 ConfigureExternalKey(ConfigureExternalKeyRequest),
6863 RotateExternalKeyBinding(RotateExternalKeyBindingRequest),
6864 ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteRequest),
6865 GetLifecycleStatus(GetLifecycleStatusRequest),
6866 GetQuota(GetQuotaRequest),
6867 UpdateQuota(UpdateQuotaRequest),
6868 GetBinding(GetBindingRequest),
6869 GetAdmissionStatus(GetAdmissionStatusRequest),
6870 SetAdmission(SetAdmissionRequest),
6871 GetQuiesceStatus(GetQuiesceStatusRequest),
6872 GetDecommissionReadiness(GetDecommissionReadinessRequest),
6873 GetUpgradeReadiness(GetUpgradeReadinessRequest),
6874 GetMaintenanceStatus(GetMaintenanceStatusRequest),
6875 GetRestoreReadiness(GetRestoreReadinessRequest),
6876 WarmVectorIndex(WarmVectorIndexRequest),
6877 EvaluateVectorRecall(EvaluateVectorRecallRequest),
6878 CalibrateVectorStrategy(CalibrateVectorStrategyRequest),
6879 GetVectorDiagnostic(GetVectorDiagnosticRequest),
6880 CreateDiagnostic(CreateDiagnosticRequest),
6881 GetDiagnostic(GetDiagnosticRequest),
6882 ReadArtifactChunk(ReadArtifactChunkRequest),
6883 ExportUsage(ExportUsageRequest),
6884 ExecuteStateRead(ExecuteStateReadRequest),
6885 PrepareStateWrite(PrepareStateWriteRequest),
6886 SubmitStateWrite(SubmitStateWriteRequest),
6887 ResolveStateWrite(ResolveStateWriteRequest),
6888}
6889
6890#[allow(clippy::large_enum_variant)]
6893#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6894#[serde(tag = "command", content = "body", rename_all = "snake_case")]
6895pub enum ResultBody {
6896 Discover(DiscoverResult),
6897 ListIndexes(ListIndexesResult),
6898 GetIndex(GetIndexResult),
6899 ValidateIndexChange(ValidateIndexChangeResult),
6900 ApplyIndexChange(ApplyIndexChangeResult),
6901 ApplyAdministrationMutation(ApplyAdministrationMutationResult),
6902 ListAliases(ListAliasesResult),
6903 GetAlias(GetAliasResult),
6904 ListDataStreams(ListDataStreamsResult),
6905 GetDataStream(GetDataStreamResult),
6906 ListComponentTemplates(ListComponentTemplatesResult),
6907 GetComponentTemplate(GetComponentTemplateResult),
6908 ListIndexTemplates(ListIndexTemplatesResult),
6909 GetIndexTemplate(GetIndexTemplateResult),
6910 ListIngestPipelines(ListIngestPipelinesResult),
6911 GetIngestPipeline(GetIngestPipelineResult),
6912 SimulateIngestPipeline(SimulateIngestPipelineResult),
6913 ReprocessByQuery(ReprocessByQueryResult),
6914 ListLifecyclePolicies(ListLifecyclePoliciesResult),
6915 GetLifecyclePolicy(GetLifecyclePolicyResult),
6916 PrepareCreateIndex(PrepareCreateIndexResult),
6917 PrepareDeleteIndex(PrepareDeleteIndexResult),
6918 SubmitCatalogAction(SubmitCatalogActionResult),
6919 ResolveCatalogAction(ResolveCatalogActionResult),
6920 PrepareReplayableSourceIndex(PrepareReplayableSourceIndexResult),
6921 SubmitReplayableSourceIndex(SubmitReplayableSourceIndexResult),
6922 GetReplayableSource(GetReplayableSourceResult),
6923 ControlReplayableSource(ControlReplayableSourceResult),
6924 CloneIndex(CloneIndexResult),
6925 ConfigureHistory(ConfigureHistoryResult),
6926 GetHistory(GetHistoryResult),
6927 ResolveHistory(ResolveHistoryResult),
6928 PlaceHistoryHold(PlaceHistoryHoldResult),
6929 ReleaseHistoryHold(ReleaseHistoryHoldResult),
6930 PrepareDocumentMutation(PrepareDocumentMutationResult),
6931 SubmitDocumentMutation(SubmitDocumentMutationResult),
6932 PrepareDocumentBulk(PrepareDocumentBulkResult),
6933 SubmitDocumentBulk(SubmitDocumentBulkResult),
6934 ResolveDocumentBulk(ResolveDocumentBulkResult),
6935 PrepareAppendBulk(PrepareAppendBulkResult),
6936 SubmitAppendBulk(SubmitAppendBulkResult),
6937 ResolveAppendBulk(ResolveAppendBulkResult),
6938 ObserveAppendCommitted(ObserveAppendCommittedResult),
6939 ResolveDocumentMutation(ResolveDocumentMutationResult),
6940 GetDocument(GetDocumentResult),
6941 Search(SearchResult),
6942 OpenPit(OpenPitResult),
6943 RenewPit(RenewPitResult),
6944 ClosePit(ClosePitResult),
6945 ListOperations(ListOperationsResult),
6946 GetOperation(GetOperationResult),
6947 CancelOperation(CancelOperationResult),
6948 ListAuditEvents(ListAuditEventsResult),
6949 ExportAuditEvents(ExportAuditEventsResult),
6950 ReserveServiceCredential(ReserveServiceCredentialResult),
6951 ReserveServiceCredentialRotation(ReserveServiceCredentialRotationResult),
6952 ActivateServiceCredential(ActivateServiceCredentialResult),
6953 ResolveServiceCredentialReservation(ResolveServiceCredentialReservationResult),
6954 PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialResult),
6955 RevokeServiceCredential(RevokeServiceCredentialResult),
6956 ResolveSecurityAction(ResolveSecurityActionResult),
6957 GetSecurityRole(GetSecurityRoleResult),
6958 PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeResult),
6959 SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeResult),
6960 ListServiceCredentials(ListServiceCredentialsResult),
6961 ListBackups(ListBackupsResult),
6962 GetBackup(GetBackupResult),
6963 CreateBackup(CreateBackupResult),
6964 ResolveBackupAction(ResolveBackupActionResult),
6965 GetRuntimeStatus(GetRuntimeStatusResult),
6966 GetResultCacheStatus(GetResultCacheStatusResult),
6967 GetFieldPromotionStatus(GetFieldPromotionStatusResult),
6968 GetOverloadStatus(GetOverloadStatusResult),
6969 ConfigureExternalKey(ConfigureExternalKeyResult),
6970 RotateExternalKeyBinding(RotateExternalKeyBindingResult),
6971 ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteResult),
6972 GetLifecycleStatus(GetLifecycleStatusResult),
6973 GetQuota(GetQuotaResult),
6974 UpdateQuota(UpdateQuotaResult),
6975 GetBinding(GetBindingResult),
6976 GetAdmissionStatus(GetAdmissionStatusResult),
6977 SetAdmission(SetAdmissionResult),
6978 GetQuiesceStatus(GetQuiesceStatusResult),
6979 GetDecommissionReadiness(GetDecommissionReadinessResult),
6980 GetUpgradeReadiness(GetUpgradeReadinessResult),
6981 GetMaintenanceStatus(GetMaintenanceStatusResult),
6982 GetRestoreReadiness(GetRestoreReadinessResult),
6983 WarmVectorIndex(WarmVectorIndexResult),
6984 EvaluateVectorRecall(EvaluateVectorRecallResult),
6985 CalibrateVectorStrategy(CalibrateVectorStrategyResult),
6986 GetVectorDiagnostic(GetVectorDiagnosticResult),
6987 CreateDiagnostic(CreateDiagnosticResult),
6988 GetDiagnostic(GetDiagnosticResult),
6989 ReadArtifactChunk(ReadArtifactChunkResult),
6990 ExportUsage(ExportUsageResult),
6991 ExecuteStateRead(ExecuteStateReadResult),
6992 PrepareStateWrite(PrepareStateWriteResult),
6993 SubmitStateWrite(SubmitStateWriteResult),
6994 ResolveStateWrite(ResolveStateWriteResult),
6995}
6996
6997pub const fn command_for_request(value: &RequestBody) -> Command {
6998 match value {
6999 RequestBody::Discover(_) => Command::Discover,
7000 RequestBody::ListIndexes(_) => Command::ListIndexes,
7001 RequestBody::GetIndex(_) => Command::GetIndex,
7002 RequestBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
7003 RequestBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
7004 RequestBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
7005 RequestBody::ListAliases(_) => Command::ListAliases,
7006 RequestBody::GetAlias(_) => Command::GetAlias,
7007 RequestBody::ListDataStreams(_) => Command::ListDataStreams,
7008 RequestBody::GetDataStream(_) => Command::GetDataStream,
7009 RequestBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
7010 RequestBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
7011 RequestBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
7012 RequestBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
7013 RequestBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
7014 RequestBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
7015 RequestBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
7016 RequestBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
7017 RequestBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
7018 RequestBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
7019 RequestBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
7020 RequestBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
7021 RequestBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
7022 RequestBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
7023 RequestBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
7024 RequestBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
7025 RequestBody::GetReplayableSource(_) => Command::GetReplayableSource,
7026 RequestBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
7027 RequestBody::CloneIndex(_) => Command::CloneIndex,
7028 RequestBody::ConfigureHistory(_) => Command::ConfigureHistory,
7029 RequestBody::GetHistory(_) => Command::GetHistory,
7030 RequestBody::ResolveHistory(_) => Command::ResolveHistory,
7031 RequestBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
7032 RequestBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
7033 RequestBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
7034 RequestBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
7035 RequestBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
7036 RequestBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
7037 RequestBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
7038 RequestBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
7039 RequestBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
7040 RequestBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
7041 RequestBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
7042 RequestBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
7043 RequestBody::GetDocument(_) => Command::GetDocument,
7044 RequestBody::Search(_) => Command::Search,
7045 RequestBody::OpenPit(_) => Command::OpenPit,
7046 RequestBody::RenewPit(_) => Command::RenewPit,
7047 RequestBody::ClosePit(_) => Command::ClosePit,
7048 RequestBody::ListOperations(_) => Command::ListOperations,
7049 RequestBody::GetOperation(_) => Command::GetOperation,
7050 RequestBody::CancelOperation(_) => Command::CancelOperation,
7051 RequestBody::ListAuditEvents(_) => Command::ListAuditEvents,
7052 RequestBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
7053 RequestBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
7054 RequestBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
7055 RequestBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
7056 RequestBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
7057 RequestBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
7058 RequestBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
7059 RequestBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
7060 RequestBody::GetSecurityRole(_) => Command::GetSecurityRole,
7061 RequestBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
7062 RequestBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
7063 RequestBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
7064 RequestBody::ListBackups(_) => Command::ListBackups,
7065 RequestBody::GetBackup(_) => Command::GetBackup,
7066 RequestBody::CreateBackup(_) => Command::CreateBackup,
7067 RequestBody::ResolveBackupAction(_) => Command::ResolveBackupAction,
7068 RequestBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
7069 RequestBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
7070 RequestBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
7071 RequestBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
7072 RequestBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
7073 RequestBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
7074 RequestBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
7075 RequestBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
7076 RequestBody::GetQuota(_) => Command::GetQuota,
7077 RequestBody::UpdateQuota(_) => Command::UpdateQuota,
7078 RequestBody::GetBinding(_) => Command::GetBinding,
7079 RequestBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
7080 RequestBody::SetAdmission(_) => Command::SetAdmission,
7081 RequestBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
7082 RequestBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
7083 RequestBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
7084 RequestBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
7085 RequestBody::GetRestoreReadiness(_) => Command::GetRestoreReadiness,
7086 RequestBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
7087 RequestBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
7088 RequestBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
7089 RequestBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
7090 RequestBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
7091 RequestBody::GetDiagnostic(_) => Command::GetDiagnostic,
7092 RequestBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
7093 RequestBody::ExportUsage(_) => Command::ExportUsage,
7094 RequestBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
7095 RequestBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
7096 RequestBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
7097 RequestBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
7098 }
7099}
7100
7101pub const fn command_for_result(value: &ResultBody) -> Command {
7102 match value {
7103 ResultBody::Discover(_) => Command::Discover,
7104 ResultBody::ListIndexes(_) => Command::ListIndexes,
7105 ResultBody::GetIndex(_) => Command::GetIndex,
7106 ResultBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
7107 ResultBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
7108 ResultBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
7109 ResultBody::ListAliases(_) => Command::ListAliases,
7110 ResultBody::GetAlias(_) => Command::GetAlias,
7111 ResultBody::ListDataStreams(_) => Command::ListDataStreams,
7112 ResultBody::GetDataStream(_) => Command::GetDataStream,
7113 ResultBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
7114 ResultBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
7115 ResultBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
7116 ResultBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
7117 ResultBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
7118 ResultBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
7119 ResultBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
7120 ResultBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
7121 ResultBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
7122 ResultBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
7123 ResultBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
7124 ResultBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
7125 ResultBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
7126 ResultBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
7127 ResultBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
7128 ResultBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
7129 ResultBody::GetReplayableSource(_) => Command::GetReplayableSource,
7130 ResultBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
7131 ResultBody::CloneIndex(_) => Command::CloneIndex,
7132 ResultBody::ConfigureHistory(_) => Command::ConfigureHistory,
7133 ResultBody::GetHistory(_) => Command::GetHistory,
7134 ResultBody::ResolveHistory(_) => Command::ResolveHistory,
7135 ResultBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
7136 ResultBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
7137 ResultBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
7138 ResultBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
7139 ResultBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
7140 ResultBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
7141 ResultBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
7142 ResultBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
7143 ResultBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
7144 ResultBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
7145 ResultBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
7146 ResultBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
7147 ResultBody::GetDocument(_) => Command::GetDocument,
7148 ResultBody::Search(_) => Command::Search,
7149 ResultBody::OpenPit(_) => Command::OpenPit,
7150 ResultBody::RenewPit(_) => Command::RenewPit,
7151 ResultBody::ClosePit(_) => Command::ClosePit,
7152 ResultBody::ListOperations(_) => Command::ListOperations,
7153 ResultBody::GetOperation(_) => Command::GetOperation,
7154 ResultBody::CancelOperation(_) => Command::CancelOperation,
7155 ResultBody::ListAuditEvents(_) => Command::ListAuditEvents,
7156 ResultBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
7157 ResultBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
7158 ResultBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
7159 ResultBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
7160 ResultBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
7161 ResultBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
7162 ResultBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
7163 ResultBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
7164 ResultBody::GetSecurityRole(_) => Command::GetSecurityRole,
7165 ResultBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
7166 ResultBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
7167 ResultBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
7168 ResultBody::ListBackups(_) => Command::ListBackups,
7169 ResultBody::GetBackup(_) => Command::GetBackup,
7170 ResultBody::CreateBackup(_) => Command::CreateBackup,
7171 ResultBody::ResolveBackupAction(_) => Command::ResolveBackupAction,
7172 ResultBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
7173 ResultBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
7174 ResultBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
7175 ResultBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
7176 ResultBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
7177 ResultBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
7178 ResultBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
7179 ResultBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
7180 ResultBody::GetQuota(_) => Command::GetQuota,
7181 ResultBody::UpdateQuota(_) => Command::UpdateQuota,
7182 ResultBody::GetBinding(_) => Command::GetBinding,
7183 ResultBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
7184 ResultBody::SetAdmission(_) => Command::SetAdmission,
7185 ResultBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
7186 ResultBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
7187 ResultBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
7188 ResultBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
7189 ResultBody::GetRestoreReadiness(_) => Command::GetRestoreReadiness,
7190 ResultBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
7191 ResultBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
7192 ResultBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
7193 ResultBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
7194 ResultBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
7195 ResultBody::GetDiagnostic(_) => Command::GetDiagnostic,
7196 ResultBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
7197 ResultBody::ExportUsage(_) => Command::ExportUsage,
7198 ResultBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
7199 ResultBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
7200 ResultBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
7201 ResultBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
7202 }
7203}
7204
7205#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7206#[serde(deny_unknown_fields)]
7207pub struct RequestEnvelope {
7208 pub meta: RequestMeta,
7209 pub request: RequestBody,
7210}
7211#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7212#[serde(tag = "outcome", rename_all = "snake_case")]
7213pub enum ResponseEnvelope {
7214 Success {
7215 format_version: u16,
7216 request_id: String,
7217 result: Box<ResultBody>,
7218 },
7219 Error {
7220 format_version: u16,
7221 request_id: String,
7222 error: ErrorBody,
7223 },
7224}
7225
7226#[derive(Clone, Copy, Debug, Eq, PartialEq)]
7227pub struct CommandContract {
7228 pub command: Command,
7229 pub action: Action,
7230 pub cancellable: bool,
7231 pub mutation: &'static str,
7232}
7233pub const LODESTONE_API_COMMAND_CONTRACTS: &[CommandContract] = &[
7234 CommandContract {
7235 command: Command::Discover,
7236 action: Action::IdentityDiscovery,
7237 cancellable: true,
7238 mutation: "read_only",
7239 },
7240 CommandContract {
7241 command: Command::ListIndexes,
7242 action: Action::CatalogRead,
7243 cancellable: true,
7244 mutation: "read_only",
7245 },
7246 CommandContract {
7247 command: Command::GetIndex,
7248 action: Action::CatalogRead,
7249 cancellable: true,
7250 mutation: "read_only",
7251 },
7252 CommandContract {
7253 command: Command::ValidateIndexChange,
7254 action: Action::IndexAdmin,
7255 cancellable: true,
7256 mutation: "read_only",
7257 },
7258 CommandContract {
7259 command: Command::ApplyIndexChange,
7260 action: Action::IndexAdmin,
7261 cancellable: true,
7262 mutation: "catalog_submit",
7263 },
7264 CommandContract {
7265 command: Command::ApplyAdministrationMutation,
7266 action: Action::LifecycleAdmin,
7267 cancellable: true,
7268 mutation: "administration_submit",
7269 },
7270 CommandContract {
7271 command: Command::ListAliases,
7272 action: Action::CatalogRead,
7273 cancellable: true,
7274 mutation: "read_only",
7275 },
7276 CommandContract {
7277 command: Command::GetAlias,
7278 action: Action::CatalogRead,
7279 cancellable: true,
7280 mutation: "read_only",
7281 },
7282 CommandContract {
7283 command: Command::ListDataStreams,
7284 action: Action::CatalogRead,
7285 cancellable: true,
7286 mutation: "read_only",
7287 },
7288 CommandContract {
7289 command: Command::GetDataStream,
7290 action: Action::CatalogRead,
7291 cancellable: true,
7292 mutation: "read_only",
7293 },
7294 CommandContract {
7295 command: Command::ListComponentTemplates,
7296 action: Action::CatalogRead,
7297 cancellable: true,
7298 mutation: "read_only",
7299 },
7300 CommandContract {
7301 command: Command::GetComponentTemplate,
7302 action: Action::CatalogRead,
7303 cancellable: true,
7304 mutation: "read_only",
7305 },
7306 CommandContract {
7307 command: Command::ListIndexTemplates,
7308 action: Action::CatalogRead,
7309 cancellable: true,
7310 mutation: "read_only",
7311 },
7312 CommandContract {
7313 command: Command::GetIndexTemplate,
7314 action: Action::CatalogRead,
7315 cancellable: true,
7316 mutation: "read_only",
7317 },
7318 CommandContract {
7319 command: Command::ListIngestPipelines,
7320 action: Action::LifecycleAdmin,
7321 cancellable: true,
7322 mutation: "read_only",
7323 },
7324 CommandContract {
7325 command: Command::GetIngestPipeline,
7326 action: Action::LifecycleAdmin,
7327 cancellable: true,
7328 mutation: "read_only",
7329 },
7330 CommandContract {
7331 command: Command::SimulateIngestPipeline,
7332 action: Action::LifecycleAdmin,
7333 cancellable: true,
7334 mutation: "read_only",
7335 },
7336 CommandContract {
7337 command: Command::ReprocessByQuery,
7338 action: Action::DataWrite,
7339 cancellable: true,
7340 mutation: "authority_submit",
7341 },
7342 CommandContract {
7343 command: Command::ListLifecyclePolicies,
7344 action: Action::CatalogRead,
7345 cancellable: true,
7346 mutation: "read_only",
7347 },
7348 CommandContract {
7349 command: Command::GetLifecyclePolicy,
7350 action: Action::CatalogRead,
7351 cancellable: true,
7352 mutation: "read_only",
7353 },
7354 CommandContract {
7355 command: Command::PrepareCreateIndex,
7356 action: Action::IndexAdmin,
7357 cancellable: true,
7358 mutation: "catalog_prepare",
7359 },
7360 CommandContract {
7361 command: Command::PrepareDeleteIndex,
7362 action: Action::IndexAdmin,
7363 cancellable: true,
7364 mutation: "catalog_prepare",
7365 },
7366 CommandContract {
7367 command: Command::SubmitCatalogAction,
7368 action: Action::IndexAdmin,
7369 cancellable: true,
7370 mutation: "catalog_submit",
7371 },
7372 CommandContract {
7373 command: Command::ResolveCatalogAction,
7374 action: Action::IndexAdmin,
7375 cancellable: true,
7376 mutation: "read_only",
7377 },
7378 CommandContract {
7379 command: Command::PrepareReplayableSourceIndex,
7380 action: Action::IndexAdmin,
7381 cancellable: true,
7382 mutation: "catalog_prepare",
7383 },
7384 CommandContract {
7385 command: Command::SubmitReplayableSourceIndex,
7386 action: Action::IndexAdmin,
7387 cancellable: true,
7388 mutation: "catalog_submit",
7389 },
7390 CommandContract {
7391 command: Command::GetReplayableSource,
7392 action: Action::CatalogRead,
7393 cancellable: true,
7394 mutation: "read_only",
7395 },
7396 CommandContract {
7397 command: Command::ControlReplayableSource,
7398 action: Action::IndexAdmin,
7399 cancellable: true,
7400 mutation: "catalog_submit",
7401 },
7402 CommandContract {
7403 command: Command::CloneIndex,
7404 action: Action::IndexAdmin,
7405 cancellable: true,
7406 mutation: "catalog_submit",
7407 },
7408 CommandContract {
7409 command: Command::ConfigureHistory,
7410 action: Action::IndexAdmin,
7411 cancellable: true,
7412 mutation: "catalog_submit",
7413 },
7414 CommandContract {
7415 command: Command::GetHistory,
7416 action: Action::CatalogRead,
7417 cancellable: true,
7418 mutation: "read_only",
7419 },
7420 CommandContract {
7421 command: Command::ResolveHistory,
7422 action: Action::DataRead,
7423 cancellable: true,
7424 mutation: "read_only",
7425 },
7426 CommandContract {
7427 command: Command::PlaceHistoryHold,
7428 action: Action::IndexAdmin,
7429 cancellable: true,
7430 mutation: "catalog_submit",
7431 },
7432 CommandContract {
7433 command: Command::ReleaseHistoryHold,
7434 action: Action::IndexAdmin,
7435 cancellable: true,
7436 mutation: "catalog_submit",
7437 },
7438 CommandContract {
7439 command: Command::PrepareDocumentMutation,
7440 action: Action::DataWrite,
7441 cancellable: true,
7442 mutation: "read_only_prepare",
7443 },
7444 CommandContract {
7445 command: Command::SubmitDocumentMutation,
7446 action: Action::DataWrite,
7447 cancellable: true,
7448 mutation: "wal_submit",
7449 },
7450 CommandContract {
7451 command: Command::PrepareDocumentBulk,
7452 action: Action::DataWrite,
7453 cancellable: true,
7454 mutation: "read_only_prepare",
7455 },
7456 CommandContract {
7457 command: Command::SubmitDocumentBulk,
7458 action: Action::DataWrite,
7459 cancellable: true,
7460 mutation: "wal_submit",
7461 },
7462 CommandContract {
7463 command: Command::ResolveDocumentBulk,
7464 action: Action::DataRead,
7465 cancellable: true,
7466 mutation: "read_only",
7467 },
7468 CommandContract {
7469 command: Command::PrepareAppendBulk,
7470 action: Action::Append,
7471 cancellable: true,
7472 mutation: "read_only_prepare",
7473 },
7474 CommandContract {
7475 command: Command::SubmitAppendBulk,
7476 action: Action::Append,
7477 cancellable: true,
7478 mutation: "wal_submit",
7479 },
7480 CommandContract {
7481 command: Command::ResolveAppendBulk,
7482 action: Action::ResolveAppend,
7483 cancellable: true,
7484 mutation: "read_only",
7485 },
7486 CommandContract {
7487 command: Command::ObserveAppendCommitted,
7488 action: Action::ResolveAppend,
7489 cancellable: true,
7490 mutation: "read_only",
7491 },
7492 CommandContract {
7493 command: Command::ResolveDocumentMutation,
7494 action: Action::DataRead,
7495 cancellable: true,
7496 mutation: "read_only",
7497 },
7498 CommandContract {
7499 command: Command::GetDocument,
7500 action: Action::DataRead,
7501 cancellable: true,
7502 mutation: "read_only",
7503 },
7504 CommandContract {
7505 command: Command::Search,
7506 action: Action::DataRead,
7507 cancellable: true,
7508 mutation: "read_only",
7509 },
7510 CommandContract {
7511 command: Command::OpenPit,
7512 action: Action::DataRead,
7513 cancellable: true,
7514 mutation: "authority_submit",
7515 },
7516 CommandContract {
7517 command: Command::RenewPit,
7518 action: Action::DataRead,
7519 cancellable: true,
7520 mutation: "authority_submit",
7521 },
7522 CommandContract {
7523 command: Command::ClosePit,
7524 action: Action::DataRead,
7525 cancellable: true,
7526 mutation: "authority_submit",
7527 },
7528 CommandContract {
7529 command: Command::ListOperations,
7530 action: Action::OperationRead,
7531 cancellable: true,
7532 mutation: "read_only",
7533 },
7534 CommandContract {
7535 command: Command::GetOperation,
7536 action: Action::OperationRead,
7537 cancellable: true,
7538 mutation: "read_only",
7539 },
7540 CommandContract {
7541 command: Command::CancelOperation,
7542 action: Action::OperationCancel,
7543 cancellable: true,
7544 mutation: "authority_submit",
7545 },
7546 CommandContract {
7547 command: Command::ListAuditEvents,
7548 action: Action::AuditRead,
7549 cancellable: true,
7550 mutation: "read_only",
7551 },
7552 CommandContract {
7553 command: Command::ExportAuditEvents,
7554 action: Action::AuditRead,
7555 cancellable: true,
7556 mutation: "read_only",
7557 },
7558 CommandContract {
7559 command: Command::ReserveServiceCredential,
7560 action: Action::SecurityAdmin,
7561 cancellable: true,
7562 mutation: "security_reserve",
7563 },
7564 CommandContract {
7565 command: Command::ReserveServiceCredentialRotation,
7566 action: Action::SecurityAdmin,
7567 cancellable: true,
7568 mutation: "security_reserve",
7569 },
7570 CommandContract {
7571 command: Command::ActivateServiceCredential,
7572 action: Action::SecurityAdmin,
7573 cancellable: true,
7574 mutation: "security_submit",
7575 },
7576 CommandContract {
7577 command: Command::ResolveServiceCredentialReservation,
7578 action: Action::SecurityRead,
7579 cancellable: true,
7580 mutation: "read_only",
7581 },
7582 CommandContract {
7583 command: Command::PrepareRevokeServiceCredential,
7584 action: Action::SecurityAdmin,
7585 cancellable: true,
7586 mutation: "read_only_prepare",
7587 },
7588 CommandContract {
7589 command: Command::RevokeServiceCredential,
7590 action: Action::SecurityAdmin,
7591 cancellable: true,
7592 mutation: "security_submit",
7593 },
7594 CommandContract {
7595 command: Command::ResolveSecurityAction,
7596 action: Action::SecurityRead,
7597 cancellable: true,
7598 mutation: "read_only",
7599 },
7600 CommandContract {
7601 command: Command::GetSecurityRole,
7602 action: Action::SecurityRead,
7603 cancellable: true,
7604 mutation: "read_only",
7605 },
7606 CommandContract {
7607 command: Command::PrepareRoleAppendAccessChange,
7608 action: Action::SecurityAdmin,
7609 cancellable: true,
7610 mutation: "read_only_prepare",
7611 },
7612 CommandContract {
7613 command: Command::SubmitRoleAppendAccessChange,
7614 action: Action::SecurityAdmin,
7615 cancellable: true,
7616 mutation: "security_submit",
7617 },
7618 CommandContract {
7619 command: Command::ListServiceCredentials,
7620 action: Action::SecurityRead,
7621 cancellable: true,
7622 mutation: "read_only",
7623 },
7624 CommandContract {
7625 command: Command::ListBackups,
7626 action: Action::BackupRead,
7627 cancellable: true,
7628 mutation: "read_only",
7629 },
7630 CommandContract {
7631 command: Command::GetBackup,
7632 action: Action::BackupRead,
7633 cancellable: true,
7634 mutation: "read_only",
7635 },
7636 CommandContract {
7637 command: Command::CreateBackup,
7638 action: Action::BackupAdmin,
7639 cancellable: true,
7640 mutation: "backup_submit",
7641 },
7642 CommandContract {
7643 command: Command::ResolveBackupAction,
7644 action: Action::BackupRead,
7645 cancellable: true,
7646 mutation: "read_only",
7647 },
7648 CommandContract {
7649 command: Command::GetRuntimeStatus,
7650 action: Action::CatalogRead,
7651 cancellable: true,
7652 mutation: "read_only",
7653 },
7654 CommandContract {
7655 command: Command::GetResultCacheStatus,
7656 action: Action::CatalogRead,
7657 cancellable: true,
7658 mutation: "read_only",
7659 },
7660 CommandContract {
7661 command: Command::GetFieldPromotionStatus,
7662 action: Action::CatalogRead,
7663 cancellable: true,
7664 mutation: "read_only",
7665 },
7666 CommandContract {
7667 command: Command::GetOverloadStatus,
7668 action: Action::CatalogRead,
7669 cancellable: true,
7670 mutation: "read_only",
7671 },
7672 CommandContract {
7673 command: Command::ConfigureExternalKey,
7674 action: Action::LifecycleAdmin,
7675 cancellable: true,
7676 mutation: "authority_submit",
7677 },
7678 CommandContract {
7679 command: Command::RotateExternalKeyBinding,
7680 action: Action::LifecycleAdmin,
7681 cancellable: true,
7682 mutation: "authority_submit",
7683 },
7684 CommandContract {
7685 command: Command::ConfigureAggregateThenDelete,
7686 action: Action::LifecycleAdmin,
7687 cancellable: true,
7688 mutation: "authority_submit",
7689 },
7690 CommandContract {
7691 command: Command::GetLifecycleStatus,
7692 action: Action::CatalogRead,
7693 cancellable: true,
7694 mutation: "read_only",
7695 },
7696 CommandContract {
7697 command: Command::GetQuota,
7698 action: Action::QuotaRead,
7699 cancellable: true,
7700 mutation: "read_only",
7701 },
7702 CommandContract {
7703 command: Command::UpdateQuota,
7704 action: Action::QuotaAdmin,
7705 cancellable: true,
7706 mutation: "quota_submit",
7707 },
7708 CommandContract {
7709 command: Command::GetBinding,
7710 action: Action::BindingRead,
7711 cancellable: true,
7712 mutation: "read_only",
7713 },
7714 CommandContract {
7715 command: Command::GetAdmissionStatus,
7716 action: Action::AdmissionRead,
7717 cancellable: true,
7718 mutation: "read_only",
7719 },
7720 CommandContract {
7721 command: Command::SetAdmission,
7722 action: Action::AdmissionAdmin,
7723 cancellable: true,
7724 mutation: "admission_submit",
7725 },
7726 CommandContract {
7727 command: Command::GetQuiesceStatus,
7728 action: Action::AdmissionRead,
7729 cancellable: true,
7730 mutation: "read_only",
7731 },
7732 CommandContract {
7733 command: Command::GetDecommissionReadiness,
7734 action: Action::AdmissionRead,
7735 cancellable: true,
7736 mutation: "read_only",
7737 },
7738 CommandContract {
7739 command: Command::GetUpgradeReadiness,
7740 action: Action::TaskRead,
7741 cancellable: true,
7742 mutation: "read_only",
7743 },
7744 CommandContract {
7745 command: Command::GetMaintenanceStatus,
7746 action: Action::TaskRead,
7747 cancellable: true,
7748 mutation: "read_only",
7749 },
7750 CommandContract {
7751 command: Command::GetRestoreReadiness,
7752 action: Action::BackupRead,
7753 cancellable: true,
7754 mutation: "read_only",
7755 },
7756 CommandContract {
7757 command: Command::WarmVectorIndex,
7758 action: Action::DataRead,
7759 cancellable: true,
7760 mutation: "read_only",
7761 },
7762 CommandContract {
7763 command: Command::EvaluateVectorRecall,
7764 action: Action::DiagnosticsCreate,
7765 cancellable: true,
7766 mutation: "diagnostic_submit",
7767 },
7768 CommandContract {
7769 command: Command::CalibrateVectorStrategy,
7770 action: Action::DiagnosticsCreate,
7771 cancellable: true,
7772 mutation: "diagnostic_submit",
7773 },
7774 CommandContract {
7775 command: Command::GetVectorDiagnostic,
7776 action: Action::DiagnosticsRead,
7777 cancellable: true,
7778 mutation: "read_only",
7779 },
7780 CommandContract {
7781 command: Command::CreateDiagnostic,
7782 action: Action::DiagnosticsCreate,
7783 cancellable: true,
7784 mutation: "diagnostic_submit",
7785 },
7786 CommandContract {
7787 command: Command::GetDiagnostic,
7788 action: Action::DiagnosticsRead,
7789 cancellable: true,
7790 mutation: "read_only",
7791 },
7792 CommandContract {
7793 command: Command::ReadArtifactChunk,
7794 action: Action::OperationRead,
7795 cancellable: true,
7796 mutation: "read_only",
7797 },
7798 CommandContract {
7799 command: Command::ExportUsage,
7800 action: Action::UsageRead,
7801 cancellable: true,
7802 mutation: "read_only",
7803 },
7804 CommandContract {
7805 command: Command::ExecuteStateRead,
7806 action: Action::DataRead,
7807 cancellable: true,
7808 mutation: "read_only",
7809 },
7810 CommandContract {
7811 command: Command::PrepareStateWrite,
7812 action: Action::DataWrite,
7813 cancellable: true,
7814 mutation: "read_only_prepare",
7815 },
7816 CommandContract {
7817 command: Command::SubmitStateWrite,
7818 action: Action::DataWrite,
7819 cancellable: true,
7820 mutation: "state_submit",
7821 },
7822 CommandContract {
7823 command: Command::ResolveStateWrite,
7824 action: Action::DataRead,
7825 cancellable: true,
7826 mutation: "read_only",
7827 },
7828];
7829#[derive(Clone, Copy, Debug, Eq, PartialEq)]
7830pub struct CommandSemanticContract {
7831 pub command: Command,
7832 pub admissible_errors: &'static [ErrorCode],
7833 pub limit_ids: &'static [&'static str],
7834 pub effect_class: &'static str,
7835 pub risk_flags: &'static [&'static str],
7836 pub capability_family: &'static str,
7837 pub retry_safety: &'static str,
7838 pub identity_requirement: &'static str,
7839 pub resolver: Option<Command>,
7840 pub cancellation: &'static str,
7841 pub side_effects: &'static [&'static str],
7842 pub recovery: &'static str,
7843 pub collection_index_ref: &'static str,
7844}
7845pub const LODESTONE_API_COMMAND_SEMANTICS: &[CommandSemanticContract] = &[
7846 CommandSemanticContract {
7847 command: Command::Discover,
7848 admissible_errors: &[
7849 ErrorCode::Aborted,
7850 ErrorCode::DeadlineExceeded,
7851 ErrorCode::InvalidRequest,
7852 ErrorCode::UnsupportedVersion,
7853 ErrorCode::Unauthenticated,
7854 ErrorCode::PermissionDenied,
7855 ErrorCode::NotFound,
7856 ErrorCode::LimitExceeded,
7857 ErrorCode::CapabilityUnavailable,
7858 ErrorCode::TemporarilyUnavailable,
7859 ErrorCode::Internal,
7860 ],
7861 limit_ids: &["request_bytes", "response_bytes"],
7862 effect_class: "read_only",
7863 risk_flags: &[],
7864 capability_family: "discovery",
7865 retry_safety: "safe",
7866 identity_requirement: "none",
7867 resolver: None,
7868 cancellation: "per_call",
7869 side_effects: &[],
7870 recovery: "retry",
7871 collection_index_ref: "none",
7872 },
7873 CommandSemanticContract {
7874 command: Command::ListIndexes,
7875 admissible_errors: &[
7876 ErrorCode::Aborted,
7877 ErrorCode::DeadlineExceeded,
7878 ErrorCode::InvalidRequest,
7879 ErrorCode::UnsupportedVersion,
7880 ErrorCode::Unauthenticated,
7881 ErrorCode::PermissionDenied,
7882 ErrorCode::NotFound,
7883 ErrorCode::StaleCursor,
7884 ErrorCode::RestartBudgetExhausted,
7885 ErrorCode::LimitExceeded,
7886 ErrorCode::CapabilityUnavailable,
7887 ErrorCode::TemporarilyUnavailable,
7888 ErrorCode::Internal,
7889 ],
7890 limit_ids: &[
7891 "request_bytes",
7892 "response_bytes",
7893 "page_size",
7894 "catalog_page_size",
7895 "catalog_restart_budget",
7896 ],
7897 effect_class: "read_only",
7898 risk_flags: &[],
7899 capability_family: "catalog",
7900 retry_safety: "safe",
7901 identity_requirement: "none",
7902 resolver: None,
7903 cancellation: "per_call",
7904 side_effects: &[],
7905 recovery: "retry",
7906 collection_index_ref: "none",
7907 },
7908 CommandSemanticContract {
7909 command: Command::GetIndex,
7910 admissible_errors: &[
7911 ErrorCode::Aborted,
7912 ErrorCode::DeadlineExceeded,
7913 ErrorCode::InvalidRequest,
7914 ErrorCode::UnsupportedVersion,
7915 ErrorCode::Unauthenticated,
7916 ErrorCode::PermissionDenied,
7917 ErrorCode::NotFound,
7918 ErrorCode::LimitExceeded,
7919 ErrorCode::CapabilityUnavailable,
7920 ErrorCode::TemporarilyUnavailable,
7921 ErrorCode::Internal,
7922 ],
7923 limit_ids: &["request_bytes", "response_bytes"],
7924 effect_class: "read_only",
7925 risk_flags: &[],
7926 capability_family: "catalog",
7927 retry_safety: "safe",
7928 identity_requirement: "none",
7929 resolver: None,
7930 cancellation: "per_call",
7931 side_effects: &[],
7932 recovery: "retry",
7933 collection_index_ref: "none",
7934 },
7935 CommandSemanticContract {
7936 command: Command::ValidateIndexChange,
7937 admissible_errors: &[
7938 ErrorCode::Aborted,
7939 ErrorCode::DeadlineExceeded,
7940 ErrorCode::InvalidRequest,
7941 ErrorCode::UnsupportedVersion,
7942 ErrorCode::Unauthenticated,
7943 ErrorCode::PermissionDenied,
7944 ErrorCode::NotFound,
7945 ErrorCode::LimitExceeded,
7946 ErrorCode::CapabilityUnavailable,
7947 ErrorCode::TemporarilyUnavailable,
7948 ErrorCode::Internal,
7949 ],
7950 limit_ids: &["request_bytes", "response_bytes"],
7951 effect_class: "read_only",
7952 risk_flags: &[],
7953 capability_family: "catalog",
7954 retry_safety: "safe",
7955 identity_requirement: "none",
7956 resolver: None,
7957 cancellation: "per_call",
7958 side_effects: &[],
7959 recovery: "retry",
7960 collection_index_ref: "request_name",
7961 },
7962 CommandSemanticContract {
7963 command: Command::ApplyIndexChange,
7964 admissible_errors: &[
7965 ErrorCode::Aborted,
7966 ErrorCode::DeadlineExceeded,
7967 ErrorCode::InvalidRequest,
7968 ErrorCode::UnsupportedVersion,
7969 ErrorCode::Unauthenticated,
7970 ErrorCode::PermissionDenied,
7971 ErrorCode::NotFound,
7972 ErrorCode::Conflict,
7973 ErrorCode::LimitExceeded,
7974 ErrorCode::CapabilityUnavailable,
7975 ErrorCode::NotSubmitted,
7976 ErrorCode::SubmittedIndeterminate,
7977 ErrorCode::ExpiredUnknown,
7978 ErrorCode::TemporarilyUnavailable,
7979 ErrorCode::Internal,
7980 ],
7981 limit_ids: &["request_bytes", "response_bytes"],
7982 effect_class: "durable_submit",
7983 risk_flags: &[],
7984 capability_family: "catalog",
7985 retry_safety: "pre_submit_only",
7986 identity_requirement: "caller_action_id",
7987 resolver: None,
7988 cancellation: "per_call_until_submission_then_resolve",
7989 side_effects: &["commits_authoritative_state"],
7990 recovery: "retry_if_not_submitted",
7991 collection_index_ref: "request_index",
7992 },
7993 CommandSemanticContract {
7994 command: Command::ApplyAdministrationMutation,
7995 admissible_errors: &[
7996 ErrorCode::Aborted,
7997 ErrorCode::DeadlineExceeded,
7998 ErrorCode::InvalidRequest,
7999 ErrorCode::UnsupportedVersion,
8000 ErrorCode::Unauthenticated,
8001 ErrorCode::PermissionDenied,
8002 ErrorCode::NotFound,
8003 ErrorCode::Conflict,
8004 ErrorCode::LimitExceeded,
8005 ErrorCode::CapabilityUnavailable,
8006 ErrorCode::NotSubmitted,
8007 ErrorCode::SubmittedIndeterminate,
8008 ErrorCode::ExpiredUnknown,
8009 ErrorCode::TemporarilyUnavailable,
8010 ErrorCode::Internal,
8011 ],
8012 limit_ids: &["request_bytes", "response_bytes"],
8013 effect_class: "control_write",
8014 risk_flags: &[],
8015 capability_family: "lifecycle",
8016 retry_safety: "pre_submit_only",
8017 identity_requirement: "caller_action_id",
8018 resolver: None,
8019 cancellation: "per_call_until_submission_then_resolve",
8020 side_effects: &["commits_authoritative_state"],
8021 recovery: "retry_if_not_submitted",
8022 collection_index_ref: "none",
8023 },
8024 CommandSemanticContract {
8025 command: Command::ListAliases,
8026 admissible_errors: &[
8027 ErrorCode::Aborted,
8028 ErrorCode::DeadlineExceeded,
8029 ErrorCode::InvalidRequest,
8030 ErrorCode::UnsupportedVersion,
8031 ErrorCode::Unauthenticated,
8032 ErrorCode::PermissionDenied,
8033 ErrorCode::NotFound,
8034 ErrorCode::StaleCursor,
8035 ErrorCode::RestartBudgetExhausted,
8036 ErrorCode::LimitExceeded,
8037 ErrorCode::CapabilityUnavailable,
8038 ErrorCode::TemporarilyUnavailable,
8039 ErrorCode::Internal,
8040 ],
8041 limit_ids: &[
8042 "request_bytes",
8043 "response_bytes",
8044 "page_size",
8045 "catalog_page_size",
8046 "catalog_restart_budget",
8047 ],
8048 effect_class: "read_only",
8049 risk_flags: &[],
8050 capability_family: "catalog",
8051 retry_safety: "safe",
8052 identity_requirement: "none",
8053 resolver: None,
8054 cancellation: "per_call",
8055 side_effects: &[],
8056 recovery: "retry",
8057 collection_index_ref: "none",
8058 },
8059 CommandSemanticContract {
8060 command: Command::GetAlias,
8061 admissible_errors: &[
8062 ErrorCode::Aborted,
8063 ErrorCode::DeadlineExceeded,
8064 ErrorCode::InvalidRequest,
8065 ErrorCode::UnsupportedVersion,
8066 ErrorCode::Unauthenticated,
8067 ErrorCode::PermissionDenied,
8068 ErrorCode::NotFound,
8069 ErrorCode::LimitExceeded,
8070 ErrorCode::CapabilityUnavailable,
8071 ErrorCode::TemporarilyUnavailable,
8072 ErrorCode::Internal,
8073 ],
8074 limit_ids: &["request_bytes", "response_bytes"],
8075 effect_class: "read_only",
8076 risk_flags: &[],
8077 capability_family: "catalog",
8078 retry_safety: "safe",
8079 identity_requirement: "none",
8080 resolver: None,
8081 cancellation: "per_call",
8082 side_effects: &[],
8083 recovery: "retry",
8084 collection_index_ref: "none",
8085 },
8086 CommandSemanticContract {
8087 command: Command::ListDataStreams,
8088 admissible_errors: &[
8089 ErrorCode::Aborted,
8090 ErrorCode::DeadlineExceeded,
8091 ErrorCode::InvalidRequest,
8092 ErrorCode::UnsupportedVersion,
8093 ErrorCode::Unauthenticated,
8094 ErrorCode::PermissionDenied,
8095 ErrorCode::NotFound,
8096 ErrorCode::StaleCursor,
8097 ErrorCode::RestartBudgetExhausted,
8098 ErrorCode::LimitExceeded,
8099 ErrorCode::CapabilityUnavailable,
8100 ErrorCode::TemporarilyUnavailable,
8101 ErrorCode::Internal,
8102 ],
8103 limit_ids: &[
8104 "request_bytes",
8105 "response_bytes",
8106 "page_size",
8107 "catalog_page_size",
8108 "catalog_restart_budget",
8109 ],
8110 effect_class: "read_only",
8111 risk_flags: &[],
8112 capability_family: "catalog",
8113 retry_safety: "safe",
8114 identity_requirement: "none",
8115 resolver: None,
8116 cancellation: "per_call",
8117 side_effects: &[],
8118 recovery: "retry",
8119 collection_index_ref: "none",
8120 },
8121 CommandSemanticContract {
8122 command: Command::GetDataStream,
8123 admissible_errors: &[
8124 ErrorCode::Aborted,
8125 ErrorCode::DeadlineExceeded,
8126 ErrorCode::InvalidRequest,
8127 ErrorCode::UnsupportedVersion,
8128 ErrorCode::Unauthenticated,
8129 ErrorCode::PermissionDenied,
8130 ErrorCode::NotFound,
8131 ErrorCode::LimitExceeded,
8132 ErrorCode::CapabilityUnavailable,
8133 ErrorCode::TemporarilyUnavailable,
8134 ErrorCode::Internal,
8135 ],
8136 limit_ids: &["request_bytes", "response_bytes"],
8137 effect_class: "read_only",
8138 risk_flags: &[],
8139 capability_family: "catalog",
8140 retry_safety: "safe",
8141 identity_requirement: "none",
8142 resolver: None,
8143 cancellation: "per_call",
8144 side_effects: &[],
8145 recovery: "retry",
8146 collection_index_ref: "none",
8147 },
8148 CommandSemanticContract {
8149 command: Command::ListComponentTemplates,
8150 admissible_errors: &[
8151 ErrorCode::Aborted,
8152 ErrorCode::DeadlineExceeded,
8153 ErrorCode::InvalidRequest,
8154 ErrorCode::UnsupportedVersion,
8155 ErrorCode::Unauthenticated,
8156 ErrorCode::PermissionDenied,
8157 ErrorCode::NotFound,
8158 ErrorCode::StaleCursor,
8159 ErrorCode::RestartBudgetExhausted,
8160 ErrorCode::LimitExceeded,
8161 ErrorCode::CapabilityUnavailable,
8162 ErrorCode::TemporarilyUnavailable,
8163 ErrorCode::Internal,
8164 ],
8165 limit_ids: &[
8166 "request_bytes",
8167 "response_bytes",
8168 "page_size",
8169 "catalog_page_size",
8170 "catalog_restart_budget",
8171 ],
8172 effect_class: "read_only",
8173 risk_flags: &[],
8174 capability_family: "catalog",
8175 retry_safety: "safe",
8176 identity_requirement: "none",
8177 resolver: None,
8178 cancellation: "per_call",
8179 side_effects: &[],
8180 recovery: "retry",
8181 collection_index_ref: "none",
8182 },
8183 CommandSemanticContract {
8184 command: Command::GetComponentTemplate,
8185 admissible_errors: &[
8186 ErrorCode::Aborted,
8187 ErrorCode::DeadlineExceeded,
8188 ErrorCode::InvalidRequest,
8189 ErrorCode::UnsupportedVersion,
8190 ErrorCode::Unauthenticated,
8191 ErrorCode::PermissionDenied,
8192 ErrorCode::NotFound,
8193 ErrorCode::LimitExceeded,
8194 ErrorCode::CapabilityUnavailable,
8195 ErrorCode::TemporarilyUnavailable,
8196 ErrorCode::Internal,
8197 ],
8198 limit_ids: &["request_bytes", "response_bytes"],
8199 effect_class: "read_only",
8200 risk_flags: &[],
8201 capability_family: "catalog",
8202 retry_safety: "safe",
8203 identity_requirement: "none",
8204 resolver: None,
8205 cancellation: "per_call",
8206 side_effects: &[],
8207 recovery: "retry",
8208 collection_index_ref: "none",
8209 },
8210 CommandSemanticContract {
8211 command: Command::ListIndexTemplates,
8212 admissible_errors: &[
8213 ErrorCode::Aborted,
8214 ErrorCode::DeadlineExceeded,
8215 ErrorCode::InvalidRequest,
8216 ErrorCode::UnsupportedVersion,
8217 ErrorCode::Unauthenticated,
8218 ErrorCode::PermissionDenied,
8219 ErrorCode::NotFound,
8220 ErrorCode::StaleCursor,
8221 ErrorCode::RestartBudgetExhausted,
8222 ErrorCode::LimitExceeded,
8223 ErrorCode::CapabilityUnavailable,
8224 ErrorCode::TemporarilyUnavailable,
8225 ErrorCode::Internal,
8226 ],
8227 limit_ids: &[
8228 "request_bytes",
8229 "response_bytes",
8230 "page_size",
8231 "catalog_page_size",
8232 "catalog_restart_budget",
8233 ],
8234 effect_class: "read_only",
8235 risk_flags: &[],
8236 capability_family: "catalog",
8237 retry_safety: "safe",
8238 identity_requirement: "none",
8239 resolver: None,
8240 cancellation: "per_call",
8241 side_effects: &[],
8242 recovery: "retry",
8243 collection_index_ref: "none",
8244 },
8245 CommandSemanticContract {
8246 command: Command::GetIndexTemplate,
8247 admissible_errors: &[
8248 ErrorCode::Aborted,
8249 ErrorCode::DeadlineExceeded,
8250 ErrorCode::InvalidRequest,
8251 ErrorCode::UnsupportedVersion,
8252 ErrorCode::Unauthenticated,
8253 ErrorCode::PermissionDenied,
8254 ErrorCode::NotFound,
8255 ErrorCode::LimitExceeded,
8256 ErrorCode::CapabilityUnavailable,
8257 ErrorCode::TemporarilyUnavailable,
8258 ErrorCode::Internal,
8259 ],
8260 limit_ids: &["request_bytes", "response_bytes"],
8261 effect_class: "read_only",
8262 risk_flags: &[],
8263 capability_family: "catalog",
8264 retry_safety: "safe",
8265 identity_requirement: "none",
8266 resolver: None,
8267 cancellation: "per_call",
8268 side_effects: &[],
8269 recovery: "retry",
8270 collection_index_ref: "none",
8271 },
8272 CommandSemanticContract {
8273 command: Command::ListIngestPipelines,
8274 admissible_errors: &[
8275 ErrorCode::Aborted,
8276 ErrorCode::DeadlineExceeded,
8277 ErrorCode::InvalidRequest,
8278 ErrorCode::UnsupportedVersion,
8279 ErrorCode::Unauthenticated,
8280 ErrorCode::PermissionDenied,
8281 ErrorCode::NotFound,
8282 ErrorCode::StaleCursor,
8283 ErrorCode::RestartBudgetExhausted,
8284 ErrorCode::LimitExceeded,
8285 ErrorCode::CapabilityUnavailable,
8286 ErrorCode::TemporarilyUnavailable,
8287 ErrorCode::Internal,
8288 ],
8289 limit_ids: &[
8290 "request_bytes",
8291 "response_bytes",
8292 "page_size",
8293 "catalog_page_size",
8294 "catalog_restart_budget",
8295 ],
8296 effect_class: "read_only",
8297 risk_flags: &[],
8298 capability_family: "lifecycle",
8299 retry_safety: "safe",
8300 identity_requirement: "none",
8301 resolver: None,
8302 cancellation: "per_call",
8303 side_effects: &[],
8304 recovery: "retry",
8305 collection_index_ref: "none",
8306 },
8307 CommandSemanticContract {
8308 command: Command::GetIngestPipeline,
8309 admissible_errors: &[
8310 ErrorCode::Aborted,
8311 ErrorCode::DeadlineExceeded,
8312 ErrorCode::InvalidRequest,
8313 ErrorCode::UnsupportedVersion,
8314 ErrorCode::Unauthenticated,
8315 ErrorCode::PermissionDenied,
8316 ErrorCode::NotFound,
8317 ErrorCode::LimitExceeded,
8318 ErrorCode::CapabilityUnavailable,
8319 ErrorCode::TemporarilyUnavailable,
8320 ErrorCode::Internal,
8321 ],
8322 limit_ids: &["request_bytes", "response_bytes"],
8323 effect_class: "read_only",
8324 risk_flags: &[],
8325 capability_family: "lifecycle",
8326 retry_safety: "safe",
8327 identity_requirement: "none",
8328 resolver: None,
8329 cancellation: "per_call",
8330 side_effects: &[],
8331 recovery: "retry",
8332 collection_index_ref: "none",
8333 },
8334 CommandSemanticContract {
8335 command: Command::SimulateIngestPipeline,
8336 admissible_errors: &[
8337 ErrorCode::Aborted,
8338 ErrorCode::DeadlineExceeded,
8339 ErrorCode::InvalidRequest,
8340 ErrorCode::UnsupportedVersion,
8341 ErrorCode::Unauthenticated,
8342 ErrorCode::PermissionDenied,
8343 ErrorCode::NotFound,
8344 ErrorCode::LimitExceeded,
8345 ErrorCode::CapabilityUnavailable,
8346 ErrorCode::TemporarilyUnavailable,
8347 ErrorCode::Internal,
8348 ],
8349 limit_ids: &["request_bytes", "response_bytes"],
8350 effect_class: "read_only",
8351 risk_flags: &[],
8352 capability_family: "lifecycle",
8353 retry_safety: "safe",
8354 identity_requirement: "none",
8355 resolver: None,
8356 cancellation: "per_call",
8357 side_effects: &[],
8358 recovery: "retry",
8359 collection_index_ref: "none",
8360 },
8361 CommandSemanticContract {
8362 command: Command::ReprocessByQuery,
8363 admissible_errors: &[
8364 ErrorCode::Aborted,
8365 ErrorCode::DeadlineExceeded,
8366 ErrorCode::InvalidRequest,
8367 ErrorCode::UnsupportedVersion,
8368 ErrorCode::Unauthenticated,
8369 ErrorCode::PermissionDenied,
8370 ErrorCode::NotFound,
8371 ErrorCode::Conflict,
8372 ErrorCode::LimitExceeded,
8373 ErrorCode::CapabilityUnavailable,
8374 ErrorCode::NotSubmitted,
8375 ErrorCode::SubmittedIndeterminate,
8376 ErrorCode::ExpiredUnknown,
8377 ErrorCode::TemporarilyUnavailable,
8378 ErrorCode::Internal,
8379 ],
8380 limit_ids: &["request_bytes", "response_bytes"],
8381 effect_class: "durable_submit",
8382 risk_flags: &[],
8383 capability_family: "data",
8384 retry_safety: "safe",
8385 identity_requirement: "caller_action_id",
8386 resolver: None,
8387 cancellation: "per_call_until_submission_then_resolve",
8388 side_effects: &["commits_authoritative_state"],
8389 recovery: "retry",
8390 collection_index_ref: "request_index",
8391 },
8392 CommandSemanticContract {
8393 command: Command::ListLifecyclePolicies,
8394 admissible_errors: &[
8395 ErrorCode::Aborted,
8396 ErrorCode::DeadlineExceeded,
8397 ErrorCode::InvalidRequest,
8398 ErrorCode::UnsupportedVersion,
8399 ErrorCode::Unauthenticated,
8400 ErrorCode::PermissionDenied,
8401 ErrorCode::NotFound,
8402 ErrorCode::StaleCursor,
8403 ErrorCode::RestartBudgetExhausted,
8404 ErrorCode::LimitExceeded,
8405 ErrorCode::CapabilityUnavailable,
8406 ErrorCode::TemporarilyUnavailable,
8407 ErrorCode::Internal,
8408 ],
8409 limit_ids: &[
8410 "request_bytes",
8411 "response_bytes",
8412 "page_size",
8413 "catalog_page_size",
8414 "catalog_restart_budget",
8415 ],
8416 effect_class: "read_only",
8417 risk_flags: &[],
8418 capability_family: "catalog",
8419 retry_safety: "safe",
8420 identity_requirement: "none",
8421 resolver: None,
8422 cancellation: "per_call",
8423 side_effects: &[],
8424 recovery: "retry",
8425 collection_index_ref: "none",
8426 },
8427 CommandSemanticContract {
8428 command: Command::GetLifecyclePolicy,
8429 admissible_errors: &[
8430 ErrorCode::Aborted,
8431 ErrorCode::DeadlineExceeded,
8432 ErrorCode::InvalidRequest,
8433 ErrorCode::UnsupportedVersion,
8434 ErrorCode::Unauthenticated,
8435 ErrorCode::PermissionDenied,
8436 ErrorCode::NotFound,
8437 ErrorCode::LimitExceeded,
8438 ErrorCode::CapabilityUnavailable,
8439 ErrorCode::TemporarilyUnavailable,
8440 ErrorCode::Internal,
8441 ],
8442 limit_ids: &["request_bytes", "response_bytes"],
8443 effect_class: "read_only",
8444 risk_flags: &[],
8445 capability_family: "catalog",
8446 retry_safety: "safe",
8447 identity_requirement: "none",
8448 resolver: None,
8449 cancellation: "per_call",
8450 side_effects: &[],
8451 recovery: "retry",
8452 collection_index_ref: "none",
8453 },
8454 CommandSemanticContract {
8455 command: Command::PrepareCreateIndex,
8456 admissible_errors: &[
8457 ErrorCode::Aborted,
8458 ErrorCode::DeadlineExceeded,
8459 ErrorCode::InvalidRequest,
8460 ErrorCode::UnsupportedVersion,
8461 ErrorCode::Unauthenticated,
8462 ErrorCode::PermissionDenied,
8463 ErrorCode::NotFound,
8464 ErrorCode::LimitExceeded,
8465 ErrorCode::CapabilityUnavailable,
8466 ErrorCode::TemporarilyUnavailable,
8467 ErrorCode::Internal,
8468 ],
8469 limit_ids: &[
8470 "request_bytes",
8471 "response_bytes",
8472 "resource_initial_shards",
8473 "resource_target_shard_bytes",
8474 "resource_admission_weight",
8475 "resource_ram_bytes",
8476 "resource_nvme_bytes",
8477 "resource_refresh_millis",
8478 "resource_memtable_bytes",
8479 "resource_parallelism",
8480 ],
8481 effect_class: "prepare",
8482 risk_flags: &[],
8483 capability_family: "catalog",
8484 retry_safety: "safe",
8485 identity_requirement: "server_locator",
8486 resolver: None,
8487 cancellation: "per_call",
8488 side_effects: &["creates_bounded_preparation"],
8489 recovery: "retry",
8490 collection_index_ref: "request_name",
8491 },
8492 CommandSemanticContract {
8493 command: Command::PrepareDeleteIndex,
8494 admissible_errors: &[
8495 ErrorCode::Aborted,
8496 ErrorCode::DeadlineExceeded,
8497 ErrorCode::InvalidRequest,
8498 ErrorCode::UnsupportedVersion,
8499 ErrorCode::Unauthenticated,
8500 ErrorCode::PermissionDenied,
8501 ErrorCode::NotFound,
8502 ErrorCode::LimitExceeded,
8503 ErrorCode::CapabilityUnavailable,
8504 ErrorCode::TemporarilyUnavailable,
8505 ErrorCode::Internal,
8506 ],
8507 limit_ids: &["request_bytes", "response_bytes"],
8508 effect_class: "prepare",
8509 risk_flags: &["destructive"],
8510 capability_family: "catalog",
8511 retry_safety: "safe",
8512 identity_requirement: "server_locator",
8513 resolver: None,
8514 cancellation: "per_call",
8515 side_effects: &["creates_bounded_preparation"],
8516 recovery: "retry",
8517 collection_index_ref: "request_name",
8518 },
8519 CommandSemanticContract {
8520 command: Command::SubmitCatalogAction,
8521 admissible_errors: &[
8522 ErrorCode::Aborted,
8523 ErrorCode::DeadlineExceeded,
8524 ErrorCode::InvalidRequest,
8525 ErrorCode::UnsupportedVersion,
8526 ErrorCode::Unauthenticated,
8527 ErrorCode::PermissionDenied,
8528 ErrorCode::NotFound,
8529 ErrorCode::Conflict,
8530 ErrorCode::LimitExceeded,
8531 ErrorCode::CapabilityUnavailable,
8532 ErrorCode::NotSubmitted,
8533 ErrorCode::SubmittedIndeterminate,
8534 ErrorCode::ExpiredUnknown,
8535 ErrorCode::TemporarilyUnavailable,
8536 ErrorCode::Internal,
8537 ],
8538 limit_ids: &[
8539 "request_bytes",
8540 "response_bytes",
8541 "resource_initial_shards",
8542 "resource_target_shard_bytes",
8543 "resource_admission_weight",
8544 "resource_ram_bytes",
8545 "resource_nvme_bytes",
8546 "resource_refresh_millis",
8547 "resource_memtable_bytes",
8548 "resource_parallelism",
8549 ],
8550 effect_class: "durable_submit",
8551 risk_flags: &[],
8552 capability_family: "catalog",
8553 retry_safety: "pre_submit_only",
8554 identity_requirement: "request_locator",
8555 resolver: Some(Command::ResolveCatalogAction),
8556 cancellation: "per_call_until_submission_then_resolve",
8557 side_effects: &["commits_authoritative_state"],
8558 recovery: "resolve_with_resolve_catalog_action",
8559 collection_index_ref: "request_name",
8560 },
8561 CommandSemanticContract {
8562 command: Command::ResolveCatalogAction,
8563 admissible_errors: &[
8564 ErrorCode::Aborted,
8565 ErrorCode::DeadlineExceeded,
8566 ErrorCode::InvalidRequest,
8567 ErrorCode::UnsupportedVersion,
8568 ErrorCode::Unauthenticated,
8569 ErrorCode::PermissionDenied,
8570 ErrorCode::NotFound,
8571 ErrorCode::LimitExceeded,
8572 ErrorCode::CapabilityUnavailable,
8573 ErrorCode::TemporarilyUnavailable,
8574 ErrorCode::Internal,
8575 ],
8576 limit_ids: &["request_bytes", "response_bytes"],
8577 effect_class: "read_only",
8578 risk_flags: &[],
8579 capability_family: "catalog",
8580 retry_safety: "safe",
8581 identity_requirement: "request_locator",
8582 resolver: None,
8583 cancellation: "per_call",
8584 side_effects: &[],
8585 recovery: "retry",
8586 collection_index_ref: "caller",
8587 },
8588 CommandSemanticContract {
8589 command: Command::PrepareReplayableSourceIndex,
8590 admissible_errors: &[
8591 ErrorCode::Aborted,
8592 ErrorCode::DeadlineExceeded,
8593 ErrorCode::InvalidRequest,
8594 ErrorCode::UnsupportedVersion,
8595 ErrorCode::Unauthenticated,
8596 ErrorCode::PermissionDenied,
8597 ErrorCode::NotFound,
8598 ErrorCode::LimitExceeded,
8599 ErrorCode::CapabilityUnavailable,
8600 ErrorCode::RetentionGap,
8601 ErrorCode::TemporarilyUnavailable,
8602 ErrorCode::Internal,
8603 ],
8604 limit_ids: &[
8605 "request_bytes",
8606 "response_bytes",
8607 "resource_initial_shards",
8608 "resource_target_shard_bytes",
8609 "resource_admission_weight",
8610 "resource_ram_bytes",
8611 "resource_nvme_bytes",
8612 "resource_refresh_millis",
8613 "resource_memtable_bytes",
8614 "resource_parallelism",
8615 ],
8616 effect_class: "prepare",
8617 risk_flags: &[],
8618 capability_family: "catalog",
8619 retry_safety: "safe",
8620 identity_requirement: "server_locator",
8621 resolver: None,
8622 cancellation: "per_call",
8623 side_effects: &["creates_bounded_preparation"],
8624 recovery: "retry",
8625 collection_index_ref: "request_name",
8626 },
8627 CommandSemanticContract {
8628 command: Command::SubmitReplayableSourceIndex,
8629 admissible_errors: &[
8630 ErrorCode::Aborted,
8631 ErrorCode::DeadlineExceeded,
8632 ErrorCode::InvalidRequest,
8633 ErrorCode::UnsupportedVersion,
8634 ErrorCode::Unauthenticated,
8635 ErrorCode::PermissionDenied,
8636 ErrorCode::NotFound,
8637 ErrorCode::Conflict,
8638 ErrorCode::LimitExceeded,
8639 ErrorCode::CapabilityUnavailable,
8640 ErrorCode::NotSubmitted,
8641 ErrorCode::SubmittedIndeterminate,
8642 ErrorCode::ExpiredUnknown,
8643 ErrorCode::RetentionGap,
8644 ErrorCode::TemporarilyUnavailable,
8645 ErrorCode::Internal,
8646 ],
8647 limit_ids: &[
8648 "request_bytes",
8649 "response_bytes",
8650 "resource_initial_shards",
8651 "resource_target_shard_bytes",
8652 "resource_admission_weight",
8653 "resource_ram_bytes",
8654 "resource_nvme_bytes",
8655 "resource_refresh_millis",
8656 "resource_memtable_bytes",
8657 "resource_parallelism",
8658 ],
8659 effect_class: "durable_submit",
8660 risk_flags: &[],
8661 capability_family: "catalog",
8662 retry_safety: "pre_submit_only",
8663 identity_requirement: "request_locator",
8664 resolver: Some(Command::ResolveCatalogAction),
8665 cancellation: "per_call_until_submission_then_resolve",
8666 side_effects: &["commits_authoritative_state"],
8667 recovery: "resolve_with_resolve_catalog_action",
8668 collection_index_ref: "request_name",
8669 },
8670 CommandSemanticContract {
8671 command: Command::GetReplayableSource,
8672 admissible_errors: &[
8673 ErrorCode::Aborted,
8674 ErrorCode::DeadlineExceeded,
8675 ErrorCode::InvalidRequest,
8676 ErrorCode::UnsupportedVersion,
8677 ErrorCode::Unauthenticated,
8678 ErrorCode::PermissionDenied,
8679 ErrorCode::NotFound,
8680 ErrorCode::LimitExceeded,
8681 ErrorCode::CapabilityUnavailable,
8682 ErrorCode::RetentionGap,
8683 ErrorCode::TemporarilyUnavailable,
8684 ErrorCode::Internal,
8685 ],
8686 limit_ids: &["request_bytes", "response_bytes"],
8687 effect_class: "read_only",
8688 risk_flags: &[],
8689 capability_family: "catalog",
8690 retry_safety: "safe",
8691 identity_requirement: "none",
8692 resolver: None,
8693 cancellation: "per_call",
8694 side_effects: &[],
8695 recovery: "retry",
8696 collection_index_ref: "none",
8697 },
8698 CommandSemanticContract {
8699 command: Command::ControlReplayableSource,
8700 admissible_errors: &[
8701 ErrorCode::Aborted,
8702 ErrorCode::DeadlineExceeded,
8703 ErrorCode::InvalidRequest,
8704 ErrorCode::UnsupportedVersion,
8705 ErrorCode::Unauthenticated,
8706 ErrorCode::PermissionDenied,
8707 ErrorCode::NotFound,
8708 ErrorCode::Conflict,
8709 ErrorCode::LimitExceeded,
8710 ErrorCode::CapabilityUnavailable,
8711 ErrorCode::NotSubmitted,
8712 ErrorCode::SubmittedIndeterminate,
8713 ErrorCode::ExpiredUnknown,
8714 ErrorCode::RetentionGap,
8715 ErrorCode::TemporarilyUnavailable,
8716 ErrorCode::Internal,
8717 ],
8718 limit_ids: &["request_bytes", "response_bytes"],
8719 effect_class: "durable_submit",
8720 risk_flags: &[],
8721 capability_family: "catalog",
8722 retry_safety: "pre_submit_only",
8723 identity_requirement: "none",
8724 resolver: None,
8725 cancellation: "per_call_until_submission_then_resolve",
8726 side_effects: &["commits_authoritative_state"],
8727 recovery: "retry_if_not_submitted",
8728 collection_index_ref: "request_index",
8729 },
8730 CommandSemanticContract {
8731 command: Command::CloneIndex,
8732 admissible_errors: &[
8733 ErrorCode::Aborted,
8734 ErrorCode::DeadlineExceeded,
8735 ErrorCode::InvalidRequest,
8736 ErrorCode::UnsupportedVersion,
8737 ErrorCode::Unauthenticated,
8738 ErrorCode::PermissionDenied,
8739 ErrorCode::NotFound,
8740 ErrorCode::Conflict,
8741 ErrorCode::LimitExceeded,
8742 ErrorCode::CapabilityUnavailable,
8743 ErrorCode::NotSubmitted,
8744 ErrorCode::SubmittedIndeterminate,
8745 ErrorCode::ExpiredUnknown,
8746 ErrorCode::TemporarilyUnavailable,
8747 ErrorCode::Internal,
8748 ],
8749 limit_ids: &["request_bytes", "response_bytes"],
8750 effect_class: "durable_submit",
8751 risk_flags: &[],
8752 capability_family: "catalog",
8753 retry_safety: "pre_submit_only",
8754 identity_requirement: "caller_action_id",
8755 resolver: Some(Command::CloneIndex),
8756 cancellation: "per_call_until_submission_then_resolve",
8757 side_effects: &["commits_authoritative_state"],
8758 recovery: "resolve_with_clone_index",
8759 collection_index_ref: "caller",
8760 },
8761 CommandSemanticContract {
8762 command: Command::ConfigureHistory,
8763 admissible_errors: &[
8764 ErrorCode::Aborted,
8765 ErrorCode::DeadlineExceeded,
8766 ErrorCode::InvalidRequest,
8767 ErrorCode::UnsupportedVersion,
8768 ErrorCode::Unauthenticated,
8769 ErrorCode::PermissionDenied,
8770 ErrorCode::NotFound,
8771 ErrorCode::Conflict,
8772 ErrorCode::LimitExceeded,
8773 ErrorCode::CapabilityUnavailable,
8774 ErrorCode::NotSubmitted,
8775 ErrorCode::SubmittedIndeterminate,
8776 ErrorCode::ExpiredUnknown,
8777 ErrorCode::TemporarilyUnavailable,
8778 ErrorCode::Internal,
8779 ],
8780 limit_ids: &["request_bytes", "response_bytes"],
8781 effect_class: "durable_submit",
8782 risk_flags: &[],
8783 capability_family: "catalog",
8784 retry_safety: "pre_submit_only",
8785 identity_requirement: "none",
8786 resolver: Some(Command::GetHistory),
8787 cancellation: "per_call_until_submission_then_resolve",
8788 side_effects: &["commits_authoritative_state"],
8789 recovery: "resolve_with_get_history",
8790 collection_index_ref: "request_index",
8791 },
8792 CommandSemanticContract {
8793 command: Command::GetHistory,
8794 admissible_errors: &[
8795 ErrorCode::Aborted,
8796 ErrorCode::DeadlineExceeded,
8797 ErrorCode::InvalidRequest,
8798 ErrorCode::UnsupportedVersion,
8799 ErrorCode::Unauthenticated,
8800 ErrorCode::PermissionDenied,
8801 ErrorCode::NotFound,
8802 ErrorCode::LimitExceeded,
8803 ErrorCode::CapabilityUnavailable,
8804 ErrorCode::TemporarilyUnavailable,
8805 ErrorCode::Internal,
8806 ],
8807 limit_ids: &["request_bytes", "response_bytes"],
8808 effect_class: "read_only",
8809 risk_flags: &[],
8810 capability_family: "catalog",
8811 retry_safety: "safe",
8812 identity_requirement: "none",
8813 resolver: None,
8814 cancellation: "per_call",
8815 side_effects: &[],
8816 recovery: "retry",
8817 collection_index_ref: "none",
8818 },
8819 CommandSemanticContract {
8820 command: Command::ResolveHistory,
8821 admissible_errors: &[
8822 ErrorCode::Aborted,
8823 ErrorCode::DeadlineExceeded,
8824 ErrorCode::InvalidRequest,
8825 ErrorCode::UnsupportedVersion,
8826 ErrorCode::Unauthenticated,
8827 ErrorCode::PermissionDenied,
8828 ErrorCode::NotFound,
8829 ErrorCode::LimitExceeded,
8830 ErrorCode::CapabilityUnavailable,
8831 ErrorCode::RetentionGap,
8832 ErrorCode::TemporarilyUnavailable,
8833 ErrorCode::Internal,
8834 ],
8835 limit_ids: &["request_bytes", "response_bytes"],
8836 effect_class: "read_only",
8837 risk_flags: &[],
8838 capability_family: "data",
8839 retry_safety: "safe",
8840 identity_requirement: "none",
8841 resolver: None,
8842 cancellation: "per_call",
8843 side_effects: &[],
8844 recovery: "retry",
8845 collection_index_ref: "request_index",
8846 },
8847 CommandSemanticContract {
8848 command: Command::PlaceHistoryHold,
8849 admissible_errors: &[
8850 ErrorCode::Aborted,
8851 ErrorCode::DeadlineExceeded,
8852 ErrorCode::InvalidRequest,
8853 ErrorCode::UnsupportedVersion,
8854 ErrorCode::Unauthenticated,
8855 ErrorCode::PermissionDenied,
8856 ErrorCode::NotFound,
8857 ErrorCode::Conflict,
8858 ErrorCode::LimitExceeded,
8859 ErrorCode::CapabilityUnavailable,
8860 ErrorCode::NotSubmitted,
8861 ErrorCode::SubmittedIndeterminate,
8862 ErrorCode::ExpiredUnknown,
8863 ErrorCode::TemporarilyUnavailable,
8864 ErrorCode::Internal,
8865 ],
8866 limit_ids: &["request_bytes", "response_bytes"],
8867 effect_class: "durable_submit",
8868 risk_flags: &[],
8869 capability_family: "catalog",
8870 retry_safety: "pre_submit_only",
8871 identity_requirement: "none",
8872 resolver: Some(Command::GetHistory),
8873 cancellation: "per_call_until_submission_then_resolve",
8874 side_effects: &["commits_authoritative_state"],
8875 recovery: "resolve_with_get_history",
8876 collection_index_ref: "request_index",
8877 },
8878 CommandSemanticContract {
8879 command: Command::ReleaseHistoryHold,
8880 admissible_errors: &[
8881 ErrorCode::Aborted,
8882 ErrorCode::DeadlineExceeded,
8883 ErrorCode::InvalidRequest,
8884 ErrorCode::UnsupportedVersion,
8885 ErrorCode::Unauthenticated,
8886 ErrorCode::PermissionDenied,
8887 ErrorCode::NotFound,
8888 ErrorCode::Conflict,
8889 ErrorCode::LimitExceeded,
8890 ErrorCode::CapabilityUnavailable,
8891 ErrorCode::NotSubmitted,
8892 ErrorCode::SubmittedIndeterminate,
8893 ErrorCode::ExpiredUnknown,
8894 ErrorCode::TemporarilyUnavailable,
8895 ErrorCode::Internal,
8896 ],
8897 limit_ids: &["request_bytes", "response_bytes"],
8898 effect_class: "durable_submit",
8899 risk_flags: &[],
8900 capability_family: "catalog",
8901 retry_safety: "pre_submit_only",
8902 identity_requirement: "none",
8903 resolver: Some(Command::GetHistory),
8904 cancellation: "per_call_until_submission_then_resolve",
8905 side_effects: &["commits_authoritative_state"],
8906 recovery: "resolve_with_get_history",
8907 collection_index_ref: "request_index",
8908 },
8909 CommandSemanticContract {
8910 command: Command::PrepareDocumentMutation,
8911 admissible_errors: &[
8912 ErrorCode::Aborted,
8913 ErrorCode::DeadlineExceeded,
8914 ErrorCode::InvalidRequest,
8915 ErrorCode::UnsupportedVersion,
8916 ErrorCode::Unauthenticated,
8917 ErrorCode::PermissionDenied,
8918 ErrorCode::NotFound,
8919 ErrorCode::LimitExceeded,
8920 ErrorCode::CapabilityUnavailable,
8921 ErrorCode::TemporarilyUnavailable,
8922 ErrorCode::Internal,
8923 ],
8924 limit_ids: &["request_bytes", "response_bytes"],
8925 effect_class: "prepare",
8926 risk_flags: &[],
8927 capability_family: "data",
8928 retry_safety: "safe",
8929 identity_requirement: "server_locator",
8930 resolver: None,
8931 cancellation: "per_call",
8932 side_effects: &["creates_bounded_preparation"],
8933 recovery: "retry",
8934 collection_index_ref: "request_index",
8935 },
8936 CommandSemanticContract {
8937 command: Command::SubmitDocumentMutation,
8938 admissible_errors: &[
8939 ErrorCode::Aborted,
8940 ErrorCode::DeadlineExceeded,
8941 ErrorCode::InvalidRequest,
8942 ErrorCode::UnsupportedVersion,
8943 ErrorCode::Unauthenticated,
8944 ErrorCode::PermissionDenied,
8945 ErrorCode::NotFound,
8946 ErrorCode::Conflict,
8947 ErrorCode::LimitExceeded,
8948 ErrorCode::CapabilityUnavailable,
8949 ErrorCode::NotSubmitted,
8950 ErrorCode::SubmittedIndeterminate,
8951 ErrorCode::ExpiredUnknown,
8952 ErrorCode::TemporarilyUnavailable,
8953 ErrorCode::Internal,
8954 ],
8955 limit_ids: &["request_bytes", "response_bytes"],
8956 effect_class: "durable_submit",
8957 risk_flags: &[],
8958 capability_family: "data",
8959 retry_safety: "pre_submit_only",
8960 identity_requirement: "request_locator",
8961 resolver: Some(Command::ResolveDocumentMutation),
8962 cancellation: "per_call_until_submission_then_resolve",
8963 side_effects: &["commits_authoritative_state"],
8964 recovery: "resolve_with_resolve_document_mutation",
8965 collection_index_ref: "request_index",
8966 },
8967 CommandSemanticContract {
8968 command: Command::PrepareDocumentBulk,
8969 admissible_errors: &[
8970 ErrorCode::Aborted,
8971 ErrorCode::DeadlineExceeded,
8972 ErrorCode::InvalidRequest,
8973 ErrorCode::UnsupportedVersion,
8974 ErrorCode::Unauthenticated,
8975 ErrorCode::PermissionDenied,
8976 ErrorCode::NotFound,
8977 ErrorCode::LimitExceeded,
8978 ErrorCode::CapabilityUnavailable,
8979 ErrorCode::TemporarilyUnavailable,
8980 ErrorCode::Internal,
8981 ],
8982 limit_ids: &[
8983 "request_bytes",
8984 "response_bytes",
8985 "bulk_document_items",
8986 "bulk_document_bytes",
8987 ],
8988 effect_class: "prepare",
8989 risk_flags: &[],
8990 capability_family: "data",
8991 retry_safety: "safe",
8992 identity_requirement: "caller_action_id",
8993 resolver: None,
8994 cancellation: "per_call",
8995 side_effects: &["creates_bounded_preparation"],
8996 recovery: "retry",
8997 collection_index_ref: "request_index",
8998 },
8999 CommandSemanticContract {
9000 command: Command::SubmitDocumentBulk,
9001 admissible_errors: &[
9002 ErrorCode::Aborted,
9003 ErrorCode::DeadlineExceeded,
9004 ErrorCode::InvalidRequest,
9005 ErrorCode::UnsupportedVersion,
9006 ErrorCode::Unauthenticated,
9007 ErrorCode::PermissionDenied,
9008 ErrorCode::NotFound,
9009 ErrorCode::Conflict,
9010 ErrorCode::LimitExceeded,
9011 ErrorCode::CapabilityUnavailable,
9012 ErrorCode::NotSubmitted,
9013 ErrorCode::SubmittedIndeterminate,
9014 ErrorCode::ExpiredUnknown,
9015 ErrorCode::TemporarilyUnavailable,
9016 ErrorCode::Internal,
9017 ],
9018 limit_ids: &[
9019 "request_bytes",
9020 "response_bytes",
9021 "bulk_document_items",
9022 "bulk_document_bytes",
9023 ],
9024 effect_class: "durable_submit",
9025 risk_flags: &[],
9026 capability_family: "data",
9027 retry_safety: "pre_submit_only",
9028 identity_requirement: "caller_action_id",
9029 resolver: Some(Command::ResolveDocumentBulk),
9030 cancellation: "per_call_until_submission_then_resolve",
9031 side_effects: &["commits_authoritative_state"],
9032 recovery: "resolve_with_resolve_document_bulk",
9033 collection_index_ref: "request_index",
9034 },
9035 CommandSemanticContract {
9036 command: Command::ResolveDocumentBulk,
9037 admissible_errors: &[
9038 ErrorCode::Aborted,
9039 ErrorCode::DeadlineExceeded,
9040 ErrorCode::InvalidRequest,
9041 ErrorCode::UnsupportedVersion,
9042 ErrorCode::Unauthenticated,
9043 ErrorCode::PermissionDenied,
9044 ErrorCode::NotFound,
9045 ErrorCode::LimitExceeded,
9046 ErrorCode::CapabilityUnavailable,
9047 ErrorCode::TemporarilyUnavailable,
9048 ErrorCode::Internal,
9049 ],
9050 limit_ids: &[
9051 "request_bytes",
9052 "response_bytes",
9053 "bulk_document_items",
9054 "bulk_document_bytes",
9055 ],
9056 effect_class: "read_only",
9057 risk_flags: &[],
9058 capability_family: "data",
9059 retry_safety: "safe",
9060 identity_requirement: "caller_action_id",
9061 resolver: None,
9062 cancellation: "per_call",
9063 side_effects: &[],
9064 recovery: "retry",
9065 collection_index_ref: "request_index",
9066 },
9067 CommandSemanticContract {
9068 command: Command::PrepareAppendBulk,
9069 admissible_errors: &[
9070 ErrorCode::Aborted,
9071 ErrorCode::DeadlineExceeded,
9072 ErrorCode::InvalidRequest,
9073 ErrorCode::UnsupportedVersion,
9074 ErrorCode::Unauthenticated,
9075 ErrorCode::PermissionDenied,
9076 ErrorCode::NotFound,
9077 ErrorCode::LimitExceeded,
9078 ErrorCode::CapabilityUnavailable,
9079 ErrorCode::TemporarilyUnavailable,
9080 ErrorCode::Internal,
9081 ],
9082 limit_ids: &[
9083 "request_bytes",
9084 "response_bytes",
9085 "bulk_document_items",
9086 "bulk_document_bytes",
9087 ],
9088 effect_class: "prepare",
9089 risk_flags: &[],
9090 capability_family: "data",
9091 retry_safety: "safe",
9092 identity_requirement: "caller_action_id",
9093 resolver: None,
9094 cancellation: "per_call",
9095 side_effects: &[],
9096 recovery: "retry",
9097 collection_index_ref: "request_index",
9098 },
9099 CommandSemanticContract {
9100 command: Command::SubmitAppendBulk,
9101 admissible_errors: &[
9102 ErrorCode::Aborted,
9103 ErrorCode::DeadlineExceeded,
9104 ErrorCode::InvalidRequest,
9105 ErrorCode::UnsupportedVersion,
9106 ErrorCode::Unauthenticated,
9107 ErrorCode::PermissionDenied,
9108 ErrorCode::NotFound,
9109 ErrorCode::Conflict,
9110 ErrorCode::LimitExceeded,
9111 ErrorCode::CapabilityUnavailable,
9112 ErrorCode::NotSubmitted,
9113 ErrorCode::SubmittedIndeterminate,
9114 ErrorCode::TemporarilyUnavailable,
9115 ErrorCode::Internal,
9116 ],
9117 limit_ids: &[
9118 "request_bytes",
9119 "response_bytes",
9120 "bulk_document_items",
9121 "bulk_document_bytes",
9122 ],
9123 effect_class: "durable_submit",
9124 risk_flags: &[],
9125 capability_family: "data",
9126 retry_safety: "pre_submit_only",
9127 identity_requirement: "request_locator",
9128 resolver: Some(Command::ResolveAppendBulk),
9129 cancellation: "per_call_until_submission_then_resolve",
9130 side_effects: &["commits_authoritative_state"],
9131 recovery: "resolve_with_resolve_append_bulk",
9132 collection_index_ref: "request_index",
9133 },
9134 CommandSemanticContract {
9135 command: Command::ResolveAppendBulk,
9136 admissible_errors: &[
9137 ErrorCode::Aborted,
9138 ErrorCode::DeadlineExceeded,
9139 ErrorCode::InvalidRequest,
9140 ErrorCode::UnsupportedVersion,
9141 ErrorCode::Unauthenticated,
9142 ErrorCode::PermissionDenied,
9143 ErrorCode::NotFound,
9144 ErrorCode::Conflict,
9145 ErrorCode::LimitExceeded,
9146 ErrorCode::CapabilityUnavailable,
9147 ErrorCode::TemporarilyUnavailable,
9148 ErrorCode::Internal,
9149 ],
9150 limit_ids: &[
9151 "request_bytes",
9152 "response_bytes",
9153 "bulk_document_items",
9154 "bulk_document_bytes",
9155 ],
9156 effect_class: "read_only",
9157 risk_flags: &[],
9158 capability_family: "data",
9159 retry_safety: "safe",
9160 identity_requirement: "request_locator",
9161 resolver: None,
9162 cancellation: "per_call",
9163 side_effects: &[],
9164 recovery: "retry",
9165 collection_index_ref: "request_index",
9166 },
9167 CommandSemanticContract {
9168 command: Command::ObserveAppendCommitted,
9169 admissible_errors: &[
9170 ErrorCode::Aborted,
9171 ErrorCode::DeadlineExceeded,
9172 ErrorCode::InvalidRequest,
9173 ErrorCode::UnsupportedVersion,
9174 ErrorCode::Unauthenticated,
9175 ErrorCode::PermissionDenied,
9176 ErrorCode::NotFound,
9177 ErrorCode::Conflict,
9178 ErrorCode::LimitExceeded,
9179 ErrorCode::CapabilityUnavailable,
9180 ErrorCode::TemporarilyUnavailable,
9181 ErrorCode::Internal,
9182 ],
9183 limit_ids: &["request_bytes", "response_bytes"],
9184 effect_class: "read_only",
9185 risk_flags: &[],
9186 capability_family: "data",
9187 retry_safety: "safe",
9188 identity_requirement: "request_locator",
9189 resolver: None,
9190 cancellation: "per_call",
9191 side_effects: &[],
9192 recovery: "retry",
9193 collection_index_ref: "request_index",
9194 },
9195 CommandSemanticContract {
9196 command: Command::ResolveDocumentMutation,
9197 admissible_errors: &[
9198 ErrorCode::Aborted,
9199 ErrorCode::DeadlineExceeded,
9200 ErrorCode::InvalidRequest,
9201 ErrorCode::UnsupportedVersion,
9202 ErrorCode::Unauthenticated,
9203 ErrorCode::PermissionDenied,
9204 ErrorCode::NotFound,
9205 ErrorCode::LimitExceeded,
9206 ErrorCode::CapabilityUnavailable,
9207 ErrorCode::TemporarilyUnavailable,
9208 ErrorCode::Internal,
9209 ],
9210 limit_ids: &["request_bytes", "response_bytes"],
9211 effect_class: "read_only",
9212 risk_flags: &[],
9213 capability_family: "data",
9214 retry_safety: "safe",
9215 identity_requirement: "request_locator",
9216 resolver: None,
9217 cancellation: "per_call",
9218 side_effects: &[],
9219 recovery: "retry",
9220 collection_index_ref: "caller",
9221 },
9222 CommandSemanticContract {
9223 command: Command::GetDocument,
9224 admissible_errors: &[
9225 ErrorCode::Aborted,
9226 ErrorCode::DeadlineExceeded,
9227 ErrorCode::InvalidRequest,
9228 ErrorCode::UnsupportedVersion,
9229 ErrorCode::Unauthenticated,
9230 ErrorCode::PermissionDenied,
9231 ErrorCode::NotFound,
9232 ErrorCode::LimitExceeded,
9233 ErrorCode::CapabilityUnavailable,
9234 ErrorCode::TemporarilyUnavailable,
9235 ErrorCode::Internal,
9236 ],
9237 limit_ids: &["request_bytes", "response_bytes"],
9238 effect_class: "read_only",
9239 risk_flags: &[],
9240 capability_family: "data",
9241 retry_safety: "safe",
9242 identity_requirement: "none",
9243 resolver: None,
9244 cancellation: "per_call",
9245 side_effects: &[],
9246 recovery: "retry",
9247 collection_index_ref: "request_index",
9248 },
9249 CommandSemanticContract {
9250 command: Command::Search,
9251 admissible_errors: &[
9252 ErrorCode::Aborted,
9253 ErrorCode::DeadlineExceeded,
9254 ErrorCode::InvalidRequest,
9255 ErrorCode::UnsupportedVersion,
9256 ErrorCode::Unauthenticated,
9257 ErrorCode::PermissionDenied,
9258 ErrorCode::NotFound,
9259 ErrorCode::StaleCursor,
9260 ErrorCode::RestartBudgetExhausted,
9261 ErrorCode::LimitExceeded,
9262 ErrorCode::CapabilityUnavailable,
9263 ErrorCode::TemporarilyUnavailable,
9264 ErrorCode::Internal,
9265 ],
9266 limit_ids: &[
9267 "request_bytes",
9268 "response_bytes",
9269 "page_size",
9270 "query_clauses",
9271 "aggregation_nodes",
9272 "aggregation_buckets",
9273 "routing_values",
9274 "routing_value_bytes",
9275 "query_recursion_depth",
9276 "text_query_bytes",
9277 "text_query_fields",
9278 "text_query_slop",
9279 "text_query_boost",
9280 "text_query_fuzzy_expansions",
9281 "text_query_fuzzy_distance",
9282 "text_query_dictionary_scan_terms",
9283 "text_query_dictionary_scan_bytes",
9284 "text_query_fuzzy_work_units",
9285 "vector_dimensions",
9286 "vector_query_bytes",
9287 "vector_request_bytes",
9288 "vector_candidates",
9289 "vector_set_query_vectors",
9290 "vector_set_query_bytes",
9291 "retrieval_branches",
9292 "retrieval_branch_name_bytes",
9293 "retrieval_window",
9294 "fragment_fields",
9295 "fragments_per_field",
9296 "fragment_bytes",
9297 "fragment_total_bytes",
9298 "result_feature_hits",
9299 "result_features",
9300 "diversification_fields",
9301 "diversification_per_group",
9302 "search_result_window",
9303 ],
9304 effect_class: "read_only",
9305 risk_flags: &[],
9306 capability_family: "data",
9307 retry_safety: "safe",
9308 identity_requirement: "none",
9309 resolver: None,
9310 cancellation: "per_call",
9311 side_effects: &[],
9312 recovery: "retry",
9313 collection_index_ref: "request_indexes_or_pit_authority",
9314 },
9315 CommandSemanticContract {
9316 command: Command::OpenPit,
9317 admissible_errors: &[
9318 ErrorCode::Aborted,
9319 ErrorCode::DeadlineExceeded,
9320 ErrorCode::InvalidRequest,
9321 ErrorCode::UnsupportedVersion,
9322 ErrorCode::Unauthenticated,
9323 ErrorCode::PermissionDenied,
9324 ErrorCode::NotFound,
9325 ErrorCode::Conflict,
9326 ErrorCode::LimitExceeded,
9327 ErrorCode::CapabilityUnavailable,
9328 ErrorCode::NotSubmitted,
9329 ErrorCode::SubmittedIndeterminate,
9330 ErrorCode::ExpiredUnknown,
9331 ErrorCode::TemporarilyUnavailable,
9332 ErrorCode::Internal,
9333 ],
9334 limit_ids: &["request_bytes", "response_bytes"],
9335 effect_class: "lease_renewing_read",
9336 risk_flags: &[],
9337 capability_family: "data",
9338 retry_safety: "pre_submit_only",
9339 identity_requirement: "none",
9340 resolver: None,
9341 cancellation: "per_call_until_submission_then_resolve",
9342 side_effects: &["renews_or_closes_existing_lease"],
9343 recovery: "retry_if_not_submitted",
9344 collection_index_ref: "request_indexes_uniform",
9345 },
9346 CommandSemanticContract {
9347 command: Command::RenewPit,
9348 admissible_errors: &[
9349 ErrorCode::Aborted,
9350 ErrorCode::DeadlineExceeded,
9351 ErrorCode::InvalidRequest,
9352 ErrorCode::UnsupportedVersion,
9353 ErrorCode::Unauthenticated,
9354 ErrorCode::PermissionDenied,
9355 ErrorCode::NotFound,
9356 ErrorCode::Conflict,
9357 ErrorCode::LimitExceeded,
9358 ErrorCode::CapabilityUnavailable,
9359 ErrorCode::NotSubmitted,
9360 ErrorCode::SubmittedIndeterminate,
9361 ErrorCode::ExpiredUnknown,
9362 ErrorCode::TemporarilyUnavailable,
9363 ErrorCode::Internal,
9364 ],
9365 limit_ids: &["request_bytes", "response_bytes"],
9366 effect_class: "lease_renewing_read",
9367 risk_flags: &[],
9368 capability_family: "data",
9369 retry_safety: "pre_submit_only",
9370 identity_requirement: "none",
9371 resolver: None,
9372 cancellation: "per_call_until_submission_then_resolve",
9373 side_effects: &["renews_or_closes_existing_lease"],
9374 recovery: "retry_if_not_submitted",
9375 collection_index_ref: "pit_authority",
9376 },
9377 CommandSemanticContract {
9378 command: Command::ClosePit,
9379 admissible_errors: &[
9380 ErrorCode::Aborted,
9381 ErrorCode::DeadlineExceeded,
9382 ErrorCode::InvalidRequest,
9383 ErrorCode::UnsupportedVersion,
9384 ErrorCode::Unauthenticated,
9385 ErrorCode::PermissionDenied,
9386 ErrorCode::NotFound,
9387 ErrorCode::Conflict,
9388 ErrorCode::LimitExceeded,
9389 ErrorCode::CapabilityUnavailable,
9390 ErrorCode::NotSubmitted,
9391 ErrorCode::SubmittedIndeterminate,
9392 ErrorCode::ExpiredUnknown,
9393 ErrorCode::TemporarilyUnavailable,
9394 ErrorCode::Internal,
9395 ],
9396 limit_ids: &["request_bytes", "response_bytes"],
9397 effect_class: "lease_renewing_read",
9398 risk_flags: &[],
9399 capability_family: "data",
9400 retry_safety: "pre_submit_only",
9401 identity_requirement: "none",
9402 resolver: None,
9403 cancellation: "per_call_until_submission_then_resolve",
9404 side_effects: &["renews_or_closes_existing_lease"],
9405 recovery: "retry_if_not_submitted",
9406 collection_index_ref: "pit_authority",
9407 },
9408 CommandSemanticContract {
9409 command: Command::ListOperations,
9410 admissible_errors: &[
9411 ErrorCode::Aborted,
9412 ErrorCode::DeadlineExceeded,
9413 ErrorCode::InvalidRequest,
9414 ErrorCode::UnsupportedVersion,
9415 ErrorCode::Unauthenticated,
9416 ErrorCode::PermissionDenied,
9417 ErrorCode::NotFound,
9418 ErrorCode::StaleCursor,
9419 ErrorCode::RestartBudgetExhausted,
9420 ErrorCode::LimitExceeded,
9421 ErrorCode::CapabilityUnavailable,
9422 ErrorCode::TemporarilyUnavailable,
9423 ErrorCode::Internal,
9424 ],
9425 limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
9426 effect_class: "read_only",
9427 risk_flags: &[],
9428 capability_family: "operations",
9429 retry_safety: "safe",
9430 identity_requirement: "none",
9431 resolver: None,
9432 cancellation: "per_call",
9433 side_effects: &[],
9434 recovery: "retry",
9435 collection_index_ref: "none",
9436 },
9437 CommandSemanticContract {
9438 command: Command::GetOperation,
9439 admissible_errors: &[
9440 ErrorCode::Aborted,
9441 ErrorCode::DeadlineExceeded,
9442 ErrorCode::InvalidRequest,
9443 ErrorCode::UnsupportedVersion,
9444 ErrorCode::Unauthenticated,
9445 ErrorCode::PermissionDenied,
9446 ErrorCode::NotFound,
9447 ErrorCode::LimitExceeded,
9448 ErrorCode::CapabilityUnavailable,
9449 ErrorCode::TemporarilyUnavailable,
9450 ErrorCode::Internal,
9451 ],
9452 limit_ids: &["request_bytes", "response_bytes"],
9453 effect_class: "read_only",
9454 risk_flags: &[],
9455 capability_family: "operations",
9456 retry_safety: "safe",
9457 identity_requirement: "request_locator",
9458 resolver: None,
9459 cancellation: "per_call",
9460 side_effects: &[],
9461 recovery: "retry",
9462 collection_index_ref: "none",
9463 },
9464 CommandSemanticContract {
9465 command: Command::CancelOperation,
9466 admissible_errors: &[
9467 ErrorCode::Aborted,
9468 ErrorCode::DeadlineExceeded,
9469 ErrorCode::InvalidRequest,
9470 ErrorCode::UnsupportedVersion,
9471 ErrorCode::Unauthenticated,
9472 ErrorCode::PermissionDenied,
9473 ErrorCode::NotFound,
9474 ErrorCode::Conflict,
9475 ErrorCode::LimitExceeded,
9476 ErrorCode::CapabilityUnavailable,
9477 ErrorCode::NotSubmitted,
9478 ErrorCode::SubmittedIndeterminate,
9479 ErrorCode::ExpiredUnknown,
9480 ErrorCode::TemporarilyUnavailable,
9481 ErrorCode::Internal,
9482 ],
9483 limit_ids: &["request_bytes", "response_bytes"],
9484 effect_class: "control_write",
9485 risk_flags: &[],
9486 capability_family: "operations",
9487 retry_safety: "pre_submit_only",
9488 identity_requirement: "request_locator",
9489 resolver: None,
9490 cancellation: "per_call_until_submission_then_resolve",
9491 side_effects: &["commits_authoritative_state"],
9492 recovery: "retry_if_not_submitted",
9493 collection_index_ref: "none",
9494 },
9495 CommandSemanticContract {
9496 command: Command::ListAuditEvents,
9497 admissible_errors: &[
9498 ErrorCode::Aborted,
9499 ErrorCode::DeadlineExceeded,
9500 ErrorCode::InvalidRequest,
9501 ErrorCode::UnsupportedVersion,
9502 ErrorCode::Unauthenticated,
9503 ErrorCode::PermissionDenied,
9504 ErrorCode::NotFound,
9505 ErrorCode::StaleCursor,
9506 ErrorCode::RestartBudgetExhausted,
9507 ErrorCode::LimitExceeded,
9508 ErrorCode::CapabilityUnavailable,
9509 ErrorCode::TemporarilyUnavailable,
9510 ErrorCode::Internal,
9511 ],
9512 limit_ids: &["request_bytes", "response_bytes", "page_size"],
9513 effect_class: "read_only",
9514 risk_flags: &[],
9515 capability_family: "audit",
9516 retry_safety: "safe",
9517 identity_requirement: "none",
9518 resolver: None,
9519 cancellation: "per_call",
9520 side_effects: &[],
9521 recovery: "retry",
9522 collection_index_ref: "none",
9523 },
9524 CommandSemanticContract {
9525 command: Command::ExportAuditEvents,
9526 admissible_errors: &[
9527 ErrorCode::Aborted,
9528 ErrorCode::DeadlineExceeded,
9529 ErrorCode::InvalidRequest,
9530 ErrorCode::UnsupportedVersion,
9531 ErrorCode::Unauthenticated,
9532 ErrorCode::PermissionDenied,
9533 ErrorCode::NotFound,
9534 ErrorCode::StaleCursor,
9535 ErrorCode::RestartBudgetExhausted,
9536 ErrorCode::LimitExceeded,
9537 ErrorCode::CapabilityUnavailable,
9538 ErrorCode::TemporarilyUnavailable,
9539 ErrorCode::Internal,
9540 ],
9541 limit_ids: &["request_bytes", "response_bytes", "page_size"],
9542 effect_class: "read_only",
9543 risk_flags: &[],
9544 capability_family: "audit",
9545 retry_safety: "safe",
9546 identity_requirement: "none",
9547 resolver: None,
9548 cancellation: "per_call",
9549 side_effects: &[],
9550 recovery: "retry",
9551 collection_index_ref: "none",
9552 },
9553 CommandSemanticContract {
9554 command: Command::ReserveServiceCredential,
9555 admissible_errors: &[
9556 ErrorCode::Aborted,
9557 ErrorCode::DeadlineExceeded,
9558 ErrorCode::InvalidRequest,
9559 ErrorCode::UnsupportedVersion,
9560 ErrorCode::Unauthenticated,
9561 ErrorCode::PermissionDenied,
9562 ErrorCode::NotFound,
9563 ErrorCode::Conflict,
9564 ErrorCode::LimitExceeded,
9565 ErrorCode::CapabilityUnavailable,
9566 ErrorCode::NotSubmitted,
9567 ErrorCode::SubmittedIndeterminate,
9568 ErrorCode::ExpiredUnknown,
9569 ErrorCode::SecretNotEscrowed,
9570 ErrorCode::TemporarilyUnavailable,
9571 ErrorCode::Internal,
9572 ],
9573 limit_ids: &["request_bytes", "response_bytes"],
9574 effect_class: "durable_submit",
9575 risk_flags: &["credential_sensitive"],
9576 capability_family: "security",
9577 retry_safety: "pre_submit_only",
9578 identity_requirement: "caller_action_id",
9579 resolver: Some(Command::ResolveServiceCredentialReservation),
9580 cancellation: "per_call_until_submission_then_resolve",
9581 side_effects: &["commits_authoritative_state"],
9582 recovery: "resolve_with_resolve_service_credential_reservation",
9583 collection_index_ref: "none",
9584 },
9585 CommandSemanticContract {
9586 command: Command::ReserveServiceCredentialRotation,
9587 admissible_errors: &[
9588 ErrorCode::Aborted,
9589 ErrorCode::DeadlineExceeded,
9590 ErrorCode::InvalidRequest,
9591 ErrorCode::UnsupportedVersion,
9592 ErrorCode::Unauthenticated,
9593 ErrorCode::PermissionDenied,
9594 ErrorCode::NotFound,
9595 ErrorCode::Conflict,
9596 ErrorCode::LimitExceeded,
9597 ErrorCode::CapabilityUnavailable,
9598 ErrorCode::NotSubmitted,
9599 ErrorCode::SubmittedIndeterminate,
9600 ErrorCode::ExpiredUnknown,
9601 ErrorCode::SecretNotEscrowed,
9602 ErrorCode::TemporarilyUnavailable,
9603 ErrorCode::Internal,
9604 ],
9605 limit_ids: &["request_bytes", "response_bytes"],
9606 effect_class: "durable_submit",
9607 risk_flags: &["credential_sensitive"],
9608 capability_family: "security",
9609 retry_safety: "pre_submit_only",
9610 identity_requirement: "caller_action_id",
9611 resolver: Some(Command::ResolveServiceCredentialReservation),
9612 cancellation: "per_call_until_submission_then_resolve",
9613 side_effects: &["commits_authoritative_state"],
9614 recovery: "resolve_with_resolve_service_credential_reservation",
9615 collection_index_ref: "none",
9616 },
9617 CommandSemanticContract {
9618 command: Command::ActivateServiceCredential,
9619 admissible_errors: &[
9620 ErrorCode::Aborted,
9621 ErrorCode::DeadlineExceeded,
9622 ErrorCode::InvalidRequest,
9623 ErrorCode::UnsupportedVersion,
9624 ErrorCode::Unauthenticated,
9625 ErrorCode::PermissionDenied,
9626 ErrorCode::NotFound,
9627 ErrorCode::Conflict,
9628 ErrorCode::LimitExceeded,
9629 ErrorCode::CapabilityUnavailable,
9630 ErrorCode::NotSubmitted,
9631 ErrorCode::SubmittedIndeterminate,
9632 ErrorCode::ExpiredUnknown,
9633 ErrorCode::SecretNotEscrowed,
9634 ErrorCode::TemporarilyUnavailable,
9635 ErrorCode::Internal,
9636 ],
9637 limit_ids: &["request_bytes", "response_bytes"],
9638 effect_class: "durable_submit",
9639 risk_flags: &["credential_sensitive"],
9640 capability_family: "security",
9641 retry_safety: "pre_submit_only",
9642 identity_requirement: "server_locator",
9643 resolver: Some(Command::ResolveServiceCredentialReservation),
9644 cancellation: "per_call_until_submission_then_resolve",
9645 side_effects: &["commits_authoritative_state"],
9646 recovery: "resolve_with_resolve_service_credential_reservation",
9647 collection_index_ref: "none",
9648 },
9649 CommandSemanticContract {
9650 command: Command::ResolveServiceCredentialReservation,
9651 admissible_errors: &[
9652 ErrorCode::Aborted,
9653 ErrorCode::DeadlineExceeded,
9654 ErrorCode::InvalidRequest,
9655 ErrorCode::UnsupportedVersion,
9656 ErrorCode::Unauthenticated,
9657 ErrorCode::PermissionDenied,
9658 ErrorCode::NotFound,
9659 ErrorCode::LimitExceeded,
9660 ErrorCode::CapabilityUnavailable,
9661 ErrorCode::SecretNotEscrowed,
9662 ErrorCode::TemporarilyUnavailable,
9663 ErrorCode::Internal,
9664 ],
9665 limit_ids: &["request_bytes", "response_bytes"],
9666 effect_class: "read_only",
9667 risk_flags: &["credential_sensitive"],
9668 capability_family: "security",
9669 retry_safety: "safe",
9670 identity_requirement: "caller_action_id",
9671 resolver: None,
9672 cancellation: "per_call",
9673 side_effects: &[],
9674 recovery: "retry",
9675 collection_index_ref: "none",
9676 },
9677 CommandSemanticContract {
9678 command: Command::PrepareRevokeServiceCredential,
9679 admissible_errors: &[
9680 ErrorCode::Aborted,
9681 ErrorCode::DeadlineExceeded,
9682 ErrorCode::InvalidRequest,
9683 ErrorCode::UnsupportedVersion,
9684 ErrorCode::Unauthenticated,
9685 ErrorCode::PermissionDenied,
9686 ErrorCode::NotFound,
9687 ErrorCode::LimitExceeded,
9688 ErrorCode::CapabilityUnavailable,
9689 ErrorCode::SecretNotEscrowed,
9690 ErrorCode::TemporarilyUnavailable,
9691 ErrorCode::Internal,
9692 ],
9693 limit_ids: &["request_bytes", "response_bytes"],
9694 effect_class: "prepare",
9695 risk_flags: &["destructive", "credential_sensitive"],
9696 capability_family: "security",
9697 retry_safety: "safe",
9698 identity_requirement: "server_locator",
9699 resolver: None,
9700 cancellation: "per_call",
9701 side_effects: &["creates_bounded_preparation"],
9702 recovery: "retry",
9703 collection_index_ref: "none",
9704 },
9705 CommandSemanticContract {
9706 command: Command::RevokeServiceCredential,
9707 admissible_errors: &[
9708 ErrorCode::Aborted,
9709 ErrorCode::DeadlineExceeded,
9710 ErrorCode::InvalidRequest,
9711 ErrorCode::UnsupportedVersion,
9712 ErrorCode::Unauthenticated,
9713 ErrorCode::PermissionDenied,
9714 ErrorCode::NotFound,
9715 ErrorCode::Conflict,
9716 ErrorCode::LimitExceeded,
9717 ErrorCode::CapabilityUnavailable,
9718 ErrorCode::NotSubmitted,
9719 ErrorCode::SubmittedIndeterminate,
9720 ErrorCode::ExpiredUnknown,
9721 ErrorCode::SecretNotEscrowed,
9722 ErrorCode::TemporarilyUnavailable,
9723 ErrorCode::Internal,
9724 ],
9725 limit_ids: &["request_bytes", "response_bytes"],
9726 effect_class: "durable_submit",
9727 risk_flags: &["destructive", "credential_sensitive"],
9728 capability_family: "security",
9729 retry_safety: "pre_submit_only",
9730 identity_requirement: "request_locator",
9731 resolver: Some(Command::ResolveSecurityAction),
9732 cancellation: "per_call_until_submission_then_resolve",
9733 side_effects: &["commits_authoritative_state"],
9734 recovery: "resolve_with_resolve_security_action",
9735 collection_index_ref: "none",
9736 },
9737 CommandSemanticContract {
9738 command: Command::ResolveSecurityAction,
9739 admissible_errors: &[
9740 ErrorCode::Aborted,
9741 ErrorCode::DeadlineExceeded,
9742 ErrorCode::InvalidRequest,
9743 ErrorCode::UnsupportedVersion,
9744 ErrorCode::Unauthenticated,
9745 ErrorCode::PermissionDenied,
9746 ErrorCode::NotFound,
9747 ErrorCode::LimitExceeded,
9748 ErrorCode::CapabilityUnavailable,
9749 ErrorCode::SecretNotEscrowed,
9750 ErrorCode::TemporarilyUnavailable,
9751 ErrorCode::Internal,
9752 ],
9753 limit_ids: &["request_bytes", "response_bytes"],
9754 effect_class: "read_only",
9755 risk_flags: &[],
9756 capability_family: "security",
9757 retry_safety: "safe",
9758 identity_requirement: "request_locator",
9759 resolver: None,
9760 cancellation: "per_call",
9761 side_effects: &[],
9762 recovery: "retry",
9763 collection_index_ref: "none",
9764 },
9765 CommandSemanticContract {
9766 command: Command::GetSecurityRole,
9767 admissible_errors: &[
9768 ErrorCode::Aborted,
9769 ErrorCode::DeadlineExceeded,
9770 ErrorCode::InvalidRequest,
9771 ErrorCode::UnsupportedVersion,
9772 ErrorCode::Unauthenticated,
9773 ErrorCode::PermissionDenied,
9774 ErrorCode::NotFound,
9775 ErrorCode::LimitExceeded,
9776 ErrorCode::CapabilityUnavailable,
9777 ErrorCode::TemporarilyUnavailable,
9778 ErrorCode::Internal,
9779 ],
9780 limit_ids: &["request_bytes", "response_bytes"],
9781 effect_class: "read_only",
9782 risk_flags: &[],
9783 capability_family: "security",
9784 retry_safety: "safe",
9785 identity_requirement: "none",
9786 resolver: None,
9787 cancellation: "per_call",
9788 side_effects: &[],
9789 recovery: "retry",
9790 collection_index_ref: "none",
9791 },
9792 CommandSemanticContract {
9793 command: Command::PrepareRoleAppendAccessChange,
9794 admissible_errors: &[
9795 ErrorCode::Aborted,
9796 ErrorCode::DeadlineExceeded,
9797 ErrorCode::InvalidRequest,
9798 ErrorCode::UnsupportedVersion,
9799 ErrorCode::Unauthenticated,
9800 ErrorCode::PermissionDenied,
9801 ErrorCode::NotFound,
9802 ErrorCode::Conflict,
9803 ErrorCode::LimitExceeded,
9804 ErrorCode::CapabilityUnavailable,
9805 ErrorCode::TemporarilyUnavailable,
9806 ErrorCode::Internal,
9807 ],
9808 limit_ids: &["request_bytes", "response_bytes"],
9809 effect_class: "prepare",
9810 risk_flags: &["destructive"],
9811 capability_family: "security",
9812 retry_safety: "safe",
9813 identity_requirement: "server_locator",
9814 resolver: None,
9815 cancellation: "per_call",
9816 side_effects: &["creates_bounded_preparation"],
9817 recovery: "retry",
9818 collection_index_ref: "none",
9819 },
9820 CommandSemanticContract {
9821 command: Command::SubmitRoleAppendAccessChange,
9822 admissible_errors: &[
9823 ErrorCode::Aborted,
9824 ErrorCode::DeadlineExceeded,
9825 ErrorCode::InvalidRequest,
9826 ErrorCode::UnsupportedVersion,
9827 ErrorCode::Unauthenticated,
9828 ErrorCode::PermissionDenied,
9829 ErrorCode::NotFound,
9830 ErrorCode::Conflict,
9831 ErrorCode::LimitExceeded,
9832 ErrorCode::CapabilityUnavailable,
9833 ErrorCode::NotSubmitted,
9834 ErrorCode::SubmittedIndeterminate,
9835 ErrorCode::ExpiredUnknown,
9836 ErrorCode::TemporarilyUnavailable,
9837 ErrorCode::Internal,
9838 ],
9839 limit_ids: &["request_bytes", "response_bytes"],
9840 effect_class: "durable_submit",
9841 risk_flags: &["destructive"],
9842 capability_family: "security",
9843 retry_safety: "pre_submit_only",
9844 identity_requirement: "request_locator",
9845 resolver: Some(Command::ResolveSecurityAction),
9846 cancellation: "per_call_until_submission_then_resolve",
9847 side_effects: &["commits_authoritative_state"],
9848 recovery: "resolve_with_resolve_security_action",
9849 collection_index_ref: "none",
9850 },
9851 CommandSemanticContract {
9852 command: Command::ListServiceCredentials,
9853 admissible_errors: &[
9854 ErrorCode::Aborted,
9855 ErrorCode::DeadlineExceeded,
9856 ErrorCode::InvalidRequest,
9857 ErrorCode::UnsupportedVersion,
9858 ErrorCode::Unauthenticated,
9859 ErrorCode::PermissionDenied,
9860 ErrorCode::NotFound,
9861 ErrorCode::StaleCursor,
9862 ErrorCode::RestartBudgetExhausted,
9863 ErrorCode::LimitExceeded,
9864 ErrorCode::CapabilityUnavailable,
9865 ErrorCode::SecretNotEscrowed,
9866 ErrorCode::TemporarilyUnavailable,
9867 ErrorCode::Internal,
9868 ],
9869 limit_ids: &["request_bytes", "response_bytes", "page_size"],
9870 effect_class: "read_only",
9871 risk_flags: &["credential_sensitive"],
9872 capability_family: "security",
9873 retry_safety: "safe",
9874 identity_requirement: "none",
9875 resolver: None,
9876 cancellation: "per_call",
9877 side_effects: &[],
9878 recovery: "retry",
9879 collection_index_ref: "none",
9880 },
9881 CommandSemanticContract {
9882 command: Command::ListBackups,
9883 admissible_errors: &[
9884 ErrorCode::Aborted,
9885 ErrorCode::DeadlineExceeded,
9886 ErrorCode::InvalidRequest,
9887 ErrorCode::UnsupportedVersion,
9888 ErrorCode::Unauthenticated,
9889 ErrorCode::PermissionDenied,
9890 ErrorCode::NotFound,
9891 ErrorCode::StaleCursor,
9892 ErrorCode::RestartBudgetExhausted,
9893 ErrorCode::LimitExceeded,
9894 ErrorCode::CapabilityUnavailable,
9895 ErrorCode::TemporarilyUnavailable,
9896 ErrorCode::Internal,
9897 ],
9898 limit_ids: &["request_bytes", "response_bytes", "page_size"],
9899 effect_class: "read_only",
9900 risk_flags: &[],
9901 capability_family: "backup",
9902 retry_safety: "safe",
9903 identity_requirement: "none",
9904 resolver: None,
9905 cancellation: "per_call",
9906 side_effects: &[],
9907 recovery: "retry",
9908 collection_index_ref: "none",
9909 },
9910 CommandSemanticContract {
9911 command: Command::GetBackup,
9912 admissible_errors: &[
9913 ErrorCode::Aborted,
9914 ErrorCode::DeadlineExceeded,
9915 ErrorCode::InvalidRequest,
9916 ErrorCode::UnsupportedVersion,
9917 ErrorCode::Unauthenticated,
9918 ErrorCode::PermissionDenied,
9919 ErrorCode::NotFound,
9920 ErrorCode::LimitExceeded,
9921 ErrorCode::CapabilityUnavailable,
9922 ErrorCode::TemporarilyUnavailable,
9923 ErrorCode::Internal,
9924 ],
9925 limit_ids: &["request_bytes", "response_bytes"],
9926 effect_class: "read_only",
9927 risk_flags: &[],
9928 capability_family: "backup",
9929 retry_safety: "safe",
9930 identity_requirement: "request_locator",
9931 resolver: None,
9932 cancellation: "per_call",
9933 side_effects: &[],
9934 recovery: "retry",
9935 collection_index_ref: "none",
9936 },
9937 CommandSemanticContract {
9938 command: Command::CreateBackup,
9939 admissible_errors: &[
9940 ErrorCode::Aborted,
9941 ErrorCode::DeadlineExceeded,
9942 ErrorCode::InvalidRequest,
9943 ErrorCode::UnsupportedVersion,
9944 ErrorCode::Unauthenticated,
9945 ErrorCode::PermissionDenied,
9946 ErrorCode::NotFound,
9947 ErrorCode::Conflict,
9948 ErrorCode::LimitExceeded,
9949 ErrorCode::CapabilityUnavailable,
9950 ErrorCode::NotSubmitted,
9951 ErrorCode::SubmittedIndeterminate,
9952 ErrorCode::ExpiredUnknown,
9953 ErrorCode::TemporarilyUnavailable,
9954 ErrorCode::Internal,
9955 ],
9956 limit_ids: &["request_bytes", "response_bytes"],
9957 effect_class: "durable_submit",
9958 risk_flags: &[],
9959 capability_family: "backup",
9960 retry_safety: "pre_submit_only",
9961 identity_requirement: "caller_action_id",
9962 resolver: Some(Command::ResolveBackupAction),
9963 cancellation: "per_call_until_submission_then_resolve",
9964 side_effects: &["commits_authoritative_state"],
9965 recovery: "resolve_with_resolve_backup_action",
9966 collection_index_ref: "none",
9967 },
9968 CommandSemanticContract {
9969 command: Command::ResolveBackupAction,
9970 admissible_errors: &[
9971 ErrorCode::Aborted,
9972 ErrorCode::DeadlineExceeded,
9973 ErrorCode::InvalidRequest,
9974 ErrorCode::UnsupportedVersion,
9975 ErrorCode::Unauthenticated,
9976 ErrorCode::PermissionDenied,
9977 ErrorCode::NotFound,
9978 ErrorCode::LimitExceeded,
9979 ErrorCode::CapabilityUnavailable,
9980 ErrorCode::TemporarilyUnavailable,
9981 ErrorCode::Internal,
9982 ],
9983 limit_ids: &["request_bytes", "response_bytes"],
9984 effect_class: "read_only",
9985 risk_flags: &[],
9986 capability_family: "backup",
9987 retry_safety: "safe",
9988 identity_requirement: "caller_action_id",
9989 resolver: None,
9990 cancellation: "per_call",
9991 side_effects: &[],
9992 recovery: "retry",
9993 collection_index_ref: "none",
9994 },
9995 CommandSemanticContract {
9996 command: Command::GetRuntimeStatus,
9997 admissible_errors: &[
9998 ErrorCode::Aborted,
9999 ErrorCode::DeadlineExceeded,
10000 ErrorCode::InvalidRequest,
10001 ErrorCode::UnsupportedVersion,
10002 ErrorCode::Unauthenticated,
10003 ErrorCode::PermissionDenied,
10004 ErrorCode::NotFound,
10005 ErrorCode::LimitExceeded,
10006 ErrorCode::CapabilityUnavailable,
10007 ErrorCode::TemporarilyUnavailable,
10008 ErrorCode::Internal,
10009 ],
10010 limit_ids: &["request_bytes", "response_bytes"],
10011 effect_class: "read_only",
10012 risk_flags: &[],
10013 capability_family: "catalog",
10014 retry_safety: "safe",
10015 identity_requirement: "none",
10016 resolver: None,
10017 cancellation: "per_call",
10018 side_effects: &[],
10019 recovery: "retry",
10020 collection_index_ref: "none",
10021 },
10022 CommandSemanticContract {
10023 command: Command::GetResultCacheStatus,
10024 admissible_errors: &[
10025 ErrorCode::Aborted,
10026 ErrorCode::DeadlineExceeded,
10027 ErrorCode::InvalidRequest,
10028 ErrorCode::UnsupportedVersion,
10029 ErrorCode::Unauthenticated,
10030 ErrorCode::PermissionDenied,
10031 ErrorCode::NotFound,
10032 ErrorCode::LimitExceeded,
10033 ErrorCode::CapabilityUnavailable,
10034 ErrorCode::TemporarilyUnavailable,
10035 ErrorCode::Internal,
10036 ],
10037 limit_ids: &["request_bytes", "response_bytes"],
10038 effect_class: "read_only",
10039 risk_flags: &[],
10040 capability_family: "catalog",
10041 retry_safety: "safe",
10042 identity_requirement: "none",
10043 resolver: None,
10044 cancellation: "per_call",
10045 side_effects: &[],
10046 recovery: "retry",
10047 collection_index_ref: "none",
10048 },
10049 CommandSemanticContract {
10050 command: Command::GetFieldPromotionStatus,
10051 admissible_errors: &[
10052 ErrorCode::Aborted,
10053 ErrorCode::DeadlineExceeded,
10054 ErrorCode::InvalidRequest,
10055 ErrorCode::UnsupportedVersion,
10056 ErrorCode::Unauthenticated,
10057 ErrorCode::PermissionDenied,
10058 ErrorCode::NotFound,
10059 ErrorCode::LimitExceeded,
10060 ErrorCode::CapabilityUnavailable,
10061 ErrorCode::TemporarilyUnavailable,
10062 ErrorCode::Internal,
10063 ],
10064 limit_ids: &["request_bytes", "response_bytes"],
10065 effect_class: "read_only",
10066 risk_flags: &[],
10067 capability_family: "catalog",
10068 retry_safety: "safe",
10069 identity_requirement: "none",
10070 resolver: None,
10071 cancellation: "per_call",
10072 side_effects: &[],
10073 recovery: "retry",
10074 collection_index_ref: "none",
10075 },
10076 CommandSemanticContract {
10077 command: Command::GetOverloadStatus,
10078 admissible_errors: &[
10079 ErrorCode::Aborted,
10080 ErrorCode::DeadlineExceeded,
10081 ErrorCode::InvalidRequest,
10082 ErrorCode::UnsupportedVersion,
10083 ErrorCode::Unauthenticated,
10084 ErrorCode::PermissionDenied,
10085 ErrorCode::NotFound,
10086 ErrorCode::LimitExceeded,
10087 ErrorCode::CapabilityUnavailable,
10088 ErrorCode::TemporarilyUnavailable,
10089 ErrorCode::Internal,
10090 ],
10091 limit_ids: &["request_bytes", "response_bytes"],
10092 effect_class: "read_only",
10093 risk_flags: &[],
10094 capability_family: "catalog",
10095 retry_safety: "safe",
10096 identity_requirement: "none",
10097 resolver: None,
10098 cancellation: "per_call",
10099 side_effects: &[],
10100 recovery: "retry",
10101 collection_index_ref: "none",
10102 },
10103 CommandSemanticContract {
10104 command: Command::ConfigureExternalKey,
10105 admissible_errors: &[
10106 ErrorCode::Aborted,
10107 ErrorCode::DeadlineExceeded,
10108 ErrorCode::InvalidRequest,
10109 ErrorCode::UnsupportedVersion,
10110 ErrorCode::Unauthenticated,
10111 ErrorCode::PermissionDenied,
10112 ErrorCode::NotFound,
10113 ErrorCode::Conflict,
10114 ErrorCode::LimitExceeded,
10115 ErrorCode::CapabilityUnavailable,
10116 ErrorCode::NotSubmitted,
10117 ErrorCode::SubmittedIndeterminate,
10118 ErrorCode::ExpiredUnknown,
10119 ErrorCode::TemporarilyUnavailable,
10120 ErrorCode::Internal,
10121 ],
10122 limit_ids: &["request_bytes", "response_bytes"],
10123 effect_class: "control_write",
10124 risk_flags: &[],
10125 capability_family: "lifecycle",
10126 retry_safety: "pre_submit_only",
10127 identity_requirement: "none",
10128 resolver: None,
10129 cancellation: "per_call_until_submission_then_resolve",
10130 side_effects: &["commits_authoritative_state"],
10131 recovery: "retry_if_not_submitted",
10132 collection_index_ref: "request_index",
10133 },
10134 CommandSemanticContract {
10135 command: Command::RotateExternalKeyBinding,
10136 admissible_errors: &[
10137 ErrorCode::Aborted,
10138 ErrorCode::DeadlineExceeded,
10139 ErrorCode::InvalidRequest,
10140 ErrorCode::UnsupportedVersion,
10141 ErrorCode::Unauthenticated,
10142 ErrorCode::PermissionDenied,
10143 ErrorCode::NotFound,
10144 ErrorCode::Conflict,
10145 ErrorCode::LimitExceeded,
10146 ErrorCode::CapabilityUnavailable,
10147 ErrorCode::NotSubmitted,
10148 ErrorCode::SubmittedIndeterminate,
10149 ErrorCode::ExpiredUnknown,
10150 ErrorCode::TemporarilyUnavailable,
10151 ErrorCode::Internal,
10152 ],
10153 limit_ids: &["request_bytes", "response_bytes"],
10154 effect_class: "control_write",
10155 risk_flags: &[],
10156 capability_family: "lifecycle",
10157 retry_safety: "pre_submit_only",
10158 identity_requirement: "none",
10159 resolver: None,
10160 cancellation: "per_call_until_submission_then_resolve",
10161 side_effects: &["commits_authoritative_state"],
10162 recovery: "retry_if_not_submitted",
10163 collection_index_ref: "request_index",
10164 },
10165 CommandSemanticContract {
10166 command: Command::ConfigureAggregateThenDelete,
10167 admissible_errors: &[
10168 ErrorCode::Aborted,
10169 ErrorCode::DeadlineExceeded,
10170 ErrorCode::InvalidRequest,
10171 ErrorCode::UnsupportedVersion,
10172 ErrorCode::Unauthenticated,
10173 ErrorCode::PermissionDenied,
10174 ErrorCode::NotFound,
10175 ErrorCode::Conflict,
10176 ErrorCode::LimitExceeded,
10177 ErrorCode::CapabilityUnavailable,
10178 ErrorCode::NotSubmitted,
10179 ErrorCode::SubmittedIndeterminate,
10180 ErrorCode::ExpiredUnknown,
10181 ErrorCode::TemporarilyUnavailable,
10182 ErrorCode::Internal,
10183 ],
10184 limit_ids: &["request_bytes", "response_bytes"],
10185 effect_class: "control_write",
10186 risk_flags: &["destructive"],
10187 capability_family: "lifecycle",
10188 retry_safety: "pre_submit_only",
10189 identity_requirement: "none",
10190 resolver: None,
10191 cancellation: "per_call_until_submission_then_resolve",
10192 side_effects: &["commits_authoritative_state"],
10193 recovery: "retry_if_not_submitted",
10194 collection_index_ref: "request_index",
10195 },
10196 CommandSemanticContract {
10197 command: Command::GetLifecycleStatus,
10198 admissible_errors: &[
10199 ErrorCode::Aborted,
10200 ErrorCode::DeadlineExceeded,
10201 ErrorCode::InvalidRequest,
10202 ErrorCode::UnsupportedVersion,
10203 ErrorCode::Unauthenticated,
10204 ErrorCode::PermissionDenied,
10205 ErrorCode::NotFound,
10206 ErrorCode::LimitExceeded,
10207 ErrorCode::CapabilityUnavailable,
10208 ErrorCode::TemporarilyUnavailable,
10209 ErrorCode::Internal,
10210 ],
10211 limit_ids: &["request_bytes", "response_bytes"],
10212 effect_class: "read_only",
10213 risk_flags: &[],
10214 capability_family: "catalog",
10215 retry_safety: "safe",
10216 identity_requirement: "none",
10217 resolver: None,
10218 cancellation: "per_call",
10219 side_effects: &[],
10220 recovery: "retry",
10221 collection_index_ref: "none",
10222 },
10223 CommandSemanticContract {
10224 command: Command::GetQuota,
10225 admissible_errors: &[
10226 ErrorCode::Aborted,
10227 ErrorCode::DeadlineExceeded,
10228 ErrorCode::InvalidRequest,
10229 ErrorCode::UnsupportedVersion,
10230 ErrorCode::Unauthenticated,
10231 ErrorCode::PermissionDenied,
10232 ErrorCode::NotFound,
10233 ErrorCode::LimitExceeded,
10234 ErrorCode::CapabilityUnavailable,
10235 ErrorCode::TemporarilyUnavailable,
10236 ErrorCode::Internal,
10237 ],
10238 limit_ids: &["request_bytes", "response_bytes"],
10239 effect_class: "read_only",
10240 risk_flags: &[],
10241 capability_family: "quota",
10242 retry_safety: "safe",
10243 identity_requirement: "none",
10244 resolver: None,
10245 cancellation: "per_call",
10246 side_effects: &[],
10247 recovery: "retry",
10248 collection_index_ref: "none",
10249 },
10250 CommandSemanticContract {
10251 command: Command::UpdateQuota,
10252 admissible_errors: &[
10253 ErrorCode::Aborted,
10254 ErrorCode::DeadlineExceeded,
10255 ErrorCode::InvalidRequest,
10256 ErrorCode::UnsupportedVersion,
10257 ErrorCode::Unauthenticated,
10258 ErrorCode::PermissionDenied,
10259 ErrorCode::NotFound,
10260 ErrorCode::Conflict,
10261 ErrorCode::LimitExceeded,
10262 ErrorCode::CapabilityUnavailable,
10263 ErrorCode::NotSubmitted,
10264 ErrorCode::SubmittedIndeterminate,
10265 ErrorCode::ExpiredUnknown,
10266 ErrorCode::TemporarilyUnavailable,
10267 ErrorCode::Internal,
10268 ],
10269 limit_ids: &["request_bytes", "response_bytes"],
10270 effect_class: "control_write",
10271 risk_flags: &[],
10272 capability_family: "quota",
10273 retry_safety: "pre_submit_only",
10274 identity_requirement: "none",
10275 resolver: None,
10276 cancellation: "per_call_until_submission_then_resolve",
10277 side_effects: &["commits_authoritative_state"],
10278 recovery: "retry_if_not_submitted",
10279 collection_index_ref: "none",
10280 },
10281 CommandSemanticContract {
10282 command: Command::GetBinding,
10283 admissible_errors: &[
10284 ErrorCode::Aborted,
10285 ErrorCode::DeadlineExceeded,
10286 ErrorCode::InvalidRequest,
10287 ErrorCode::UnsupportedVersion,
10288 ErrorCode::Unauthenticated,
10289 ErrorCode::PermissionDenied,
10290 ErrorCode::NotFound,
10291 ErrorCode::LimitExceeded,
10292 ErrorCode::CapabilityUnavailable,
10293 ErrorCode::TemporarilyUnavailable,
10294 ErrorCode::Internal,
10295 ],
10296 limit_ids: &["request_bytes", "response_bytes"],
10297 effect_class: "read_only",
10298 risk_flags: &[],
10299 capability_family: "runtime_control",
10300 retry_safety: "safe",
10301 identity_requirement: "none",
10302 resolver: None,
10303 cancellation: "per_call",
10304 side_effects: &[],
10305 recovery: "retry",
10306 collection_index_ref: "none",
10307 },
10308 CommandSemanticContract {
10309 command: Command::GetAdmissionStatus,
10310 admissible_errors: &[
10311 ErrorCode::Aborted,
10312 ErrorCode::DeadlineExceeded,
10313 ErrorCode::InvalidRequest,
10314 ErrorCode::UnsupportedVersion,
10315 ErrorCode::Unauthenticated,
10316 ErrorCode::PermissionDenied,
10317 ErrorCode::NotFound,
10318 ErrorCode::LimitExceeded,
10319 ErrorCode::CapabilityUnavailable,
10320 ErrorCode::TemporarilyUnavailable,
10321 ErrorCode::Internal,
10322 ],
10323 limit_ids: &["request_bytes", "response_bytes"],
10324 effect_class: "read_only",
10325 risk_flags: &[],
10326 capability_family: "runtime_control",
10327 retry_safety: "safe",
10328 identity_requirement: "none",
10329 resolver: None,
10330 cancellation: "per_call",
10331 side_effects: &[],
10332 recovery: "retry",
10333 collection_index_ref: "none",
10334 },
10335 CommandSemanticContract {
10336 command: Command::SetAdmission,
10337 admissible_errors: &[
10338 ErrorCode::Aborted,
10339 ErrorCode::DeadlineExceeded,
10340 ErrorCode::InvalidRequest,
10341 ErrorCode::UnsupportedVersion,
10342 ErrorCode::Unauthenticated,
10343 ErrorCode::PermissionDenied,
10344 ErrorCode::NotFound,
10345 ErrorCode::Conflict,
10346 ErrorCode::LimitExceeded,
10347 ErrorCode::CapabilityUnavailable,
10348 ErrorCode::NotSubmitted,
10349 ErrorCode::SubmittedIndeterminate,
10350 ErrorCode::ExpiredUnknown,
10351 ErrorCode::TemporarilyUnavailable,
10352 ErrorCode::Internal,
10353 ],
10354 limit_ids: &["request_bytes", "response_bytes"],
10355 effect_class: "control_write",
10356 risk_flags: &[],
10357 capability_family: "runtime_control",
10358 retry_safety: "pre_submit_only",
10359 identity_requirement: "none",
10360 resolver: None,
10361 cancellation: "per_call_until_submission_then_resolve",
10362 side_effects: &["commits_authoritative_state"],
10363 recovery: "retry_if_not_submitted",
10364 collection_index_ref: "none",
10365 },
10366 CommandSemanticContract {
10367 command: Command::GetQuiesceStatus,
10368 admissible_errors: &[
10369 ErrorCode::Aborted,
10370 ErrorCode::DeadlineExceeded,
10371 ErrorCode::InvalidRequest,
10372 ErrorCode::UnsupportedVersion,
10373 ErrorCode::Unauthenticated,
10374 ErrorCode::PermissionDenied,
10375 ErrorCode::NotFound,
10376 ErrorCode::LimitExceeded,
10377 ErrorCode::CapabilityUnavailable,
10378 ErrorCode::TemporarilyUnavailable,
10379 ErrorCode::Internal,
10380 ],
10381 limit_ids: &["request_bytes", "response_bytes"],
10382 effect_class: "read_only",
10383 risk_flags: &[],
10384 capability_family: "runtime_control",
10385 retry_safety: "safe",
10386 identity_requirement: "none",
10387 resolver: None,
10388 cancellation: "per_call",
10389 side_effects: &[],
10390 recovery: "retry",
10391 collection_index_ref: "none",
10392 },
10393 CommandSemanticContract {
10394 command: Command::GetDecommissionReadiness,
10395 admissible_errors: &[
10396 ErrorCode::Aborted,
10397 ErrorCode::DeadlineExceeded,
10398 ErrorCode::InvalidRequest,
10399 ErrorCode::UnsupportedVersion,
10400 ErrorCode::Unauthenticated,
10401 ErrorCode::PermissionDenied,
10402 ErrorCode::NotFound,
10403 ErrorCode::LimitExceeded,
10404 ErrorCode::CapabilityUnavailable,
10405 ErrorCode::TemporarilyUnavailable,
10406 ErrorCode::Internal,
10407 ],
10408 limit_ids: &["request_bytes", "response_bytes"],
10409 effect_class: "read_only",
10410 risk_flags: &[],
10411 capability_family: "runtime_control",
10412 retry_safety: "safe",
10413 identity_requirement: "none",
10414 resolver: None,
10415 cancellation: "per_call",
10416 side_effects: &[],
10417 recovery: "retry",
10418 collection_index_ref: "none",
10419 },
10420 CommandSemanticContract {
10421 command: Command::GetUpgradeReadiness,
10422 admissible_errors: &[
10423 ErrorCode::Aborted,
10424 ErrorCode::DeadlineExceeded,
10425 ErrorCode::InvalidRequest,
10426 ErrorCode::UnsupportedVersion,
10427 ErrorCode::Unauthenticated,
10428 ErrorCode::PermissionDenied,
10429 ErrorCode::NotFound,
10430 ErrorCode::LimitExceeded,
10431 ErrorCode::CapabilityUnavailable,
10432 ErrorCode::TemporarilyUnavailable,
10433 ErrorCode::Internal,
10434 ],
10435 limit_ids: &["request_bytes", "response_bytes"],
10436 effect_class: "read_only",
10437 risk_flags: &[],
10438 capability_family: "operations",
10439 retry_safety: "safe",
10440 identity_requirement: "none",
10441 resolver: None,
10442 cancellation: "per_call",
10443 side_effects: &[],
10444 recovery: "retry",
10445 collection_index_ref: "none",
10446 },
10447 CommandSemanticContract {
10448 command: Command::GetMaintenanceStatus,
10449 admissible_errors: &[
10450 ErrorCode::Aborted,
10451 ErrorCode::DeadlineExceeded,
10452 ErrorCode::InvalidRequest,
10453 ErrorCode::UnsupportedVersion,
10454 ErrorCode::Unauthenticated,
10455 ErrorCode::PermissionDenied,
10456 ErrorCode::NotFound,
10457 ErrorCode::StaleCursor,
10458 ErrorCode::LimitExceeded,
10459 ErrorCode::CapabilityUnavailable,
10460 ErrorCode::TemporarilyUnavailable,
10461 ErrorCode::Internal,
10462 ],
10463 limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
10464 effect_class: "read_only",
10465 risk_flags: &[],
10466 capability_family: "operations",
10467 retry_safety: "safe",
10468 identity_requirement: "none",
10469 resolver: None,
10470 cancellation: "per_call",
10471 side_effects: &[],
10472 recovery: "retry",
10473 collection_index_ref: "optional_request_index",
10474 },
10475 CommandSemanticContract {
10476 command: Command::GetRestoreReadiness,
10477 admissible_errors: &[
10478 ErrorCode::Aborted,
10479 ErrorCode::DeadlineExceeded,
10480 ErrorCode::InvalidRequest,
10481 ErrorCode::UnsupportedVersion,
10482 ErrorCode::Unauthenticated,
10483 ErrorCode::PermissionDenied,
10484 ErrorCode::NotFound,
10485 ErrorCode::LimitExceeded,
10486 ErrorCode::CapabilityUnavailable,
10487 ErrorCode::TemporarilyUnavailable,
10488 ErrorCode::Internal,
10489 ],
10490 limit_ids: &["request_bytes", "response_bytes"],
10491 effect_class: "read_only",
10492 risk_flags: &[],
10493 capability_family: "backup",
10494 retry_safety: "safe",
10495 identity_requirement: "none",
10496 resolver: None,
10497 cancellation: "per_call",
10498 side_effects: &[],
10499 recovery: "retry",
10500 collection_index_ref: "none",
10501 },
10502 CommandSemanticContract {
10503 command: Command::WarmVectorIndex,
10504 admissible_errors: &[
10505 ErrorCode::Aborted,
10506 ErrorCode::DeadlineExceeded,
10507 ErrorCode::InvalidRequest,
10508 ErrorCode::UnsupportedVersion,
10509 ErrorCode::Unauthenticated,
10510 ErrorCode::PermissionDenied,
10511 ErrorCode::NotFound,
10512 ErrorCode::Conflict,
10513 ErrorCode::LimitExceeded,
10514 ErrorCode::CapabilityUnavailable,
10515 ErrorCode::TemporarilyUnavailable,
10516 ErrorCode::Internal,
10517 ],
10518 limit_ids: &[
10519 "request_bytes",
10520 "response_bytes",
10521 "vector_warm_components",
10522 "vector_warm_requests",
10523 "vector_warm_bytes",
10524 "vector_warm_achievements",
10525 "vector_warm_ttl_millis",
10526 ],
10527 effect_class: "read_only",
10528 risk_flags: &[],
10529 capability_family: "data",
10530 retry_safety: "safe",
10531 identity_requirement: "exact_root",
10532 resolver: None,
10533 cancellation: "per_call",
10534 side_effects: &["populates_reconstructible_cache"],
10535 recovery: "retry",
10536 collection_index_ref: "request_index",
10537 },
10538 CommandSemanticContract {
10539 command: Command::EvaluateVectorRecall,
10540 admissible_errors: &[
10541 ErrorCode::Aborted,
10542 ErrorCode::DeadlineExceeded,
10543 ErrorCode::InvalidRequest,
10544 ErrorCode::UnsupportedVersion,
10545 ErrorCode::Unauthenticated,
10546 ErrorCode::PermissionDenied,
10547 ErrorCode::NotFound,
10548 ErrorCode::Conflict,
10549 ErrorCode::LimitExceeded,
10550 ErrorCode::CapabilityUnavailable,
10551 ErrorCode::NotSubmitted,
10552 ErrorCode::SubmittedIndeterminate,
10553 ErrorCode::ExpiredUnknown,
10554 ErrorCode::TemporarilyUnavailable,
10555 ErrorCode::Internal,
10556 ],
10557 limit_ids: &[
10558 "request_bytes",
10559 "response_bytes",
10560 "vector_dimensions",
10561 "vector_query_bytes",
10562 "vector_request_bytes",
10563 "vector_candidates",
10564 "vector_evaluation_queries",
10565 "vector_evaluation_k",
10566 "vector_evaluation_artifact_bytes",
10567 ],
10568 effect_class: "durable_submit",
10569 risk_flags: &[],
10570 capability_family: "diagnostics",
10571 retry_safety: "pre_submit_only",
10572 identity_requirement: "caller_action_id",
10573 resolver: None,
10574 cancellation: "per_call_until_submission_then_resolve",
10575 side_effects: &["commits_authoritative_state"],
10576 recovery: "retry_if_not_submitted",
10577 collection_index_ref: "request_index",
10578 },
10579 CommandSemanticContract {
10580 command: Command::CalibrateVectorStrategy,
10581 admissible_errors: &[
10582 ErrorCode::Aborted,
10583 ErrorCode::DeadlineExceeded,
10584 ErrorCode::InvalidRequest,
10585 ErrorCode::UnsupportedVersion,
10586 ErrorCode::Unauthenticated,
10587 ErrorCode::PermissionDenied,
10588 ErrorCode::NotFound,
10589 ErrorCode::Conflict,
10590 ErrorCode::LimitExceeded,
10591 ErrorCode::CapabilityUnavailable,
10592 ErrorCode::NotSubmitted,
10593 ErrorCode::SubmittedIndeterminate,
10594 ErrorCode::ExpiredUnknown,
10595 ErrorCode::TemporarilyUnavailable,
10596 ErrorCode::Internal,
10597 ],
10598 limit_ids: &[
10599 "request_bytes",
10600 "response_bytes",
10601 "vector_dimensions",
10602 "vector_query_bytes",
10603 "vector_request_bytes",
10604 "vector_candidates",
10605 "vector_evaluation_queries",
10606 "vector_evaluation_k",
10607 "vector_evaluation_profiles",
10608 "vector_evaluation_artifact_bytes",
10609 ],
10610 effect_class: "durable_submit",
10611 risk_flags: &[],
10612 capability_family: "diagnostics",
10613 retry_safety: "pre_submit_only",
10614 identity_requirement: "caller_action_id",
10615 resolver: None,
10616 cancellation: "per_call_until_submission_then_resolve",
10617 side_effects: &["commits_authoritative_state"],
10618 recovery: "retry_if_not_submitted",
10619 collection_index_ref: "request_index",
10620 },
10621 CommandSemanticContract {
10622 command: Command::GetVectorDiagnostic,
10623 admissible_errors: &[
10624 ErrorCode::Aborted,
10625 ErrorCode::DeadlineExceeded,
10626 ErrorCode::InvalidRequest,
10627 ErrorCode::UnsupportedVersion,
10628 ErrorCode::Unauthenticated,
10629 ErrorCode::PermissionDenied,
10630 ErrorCode::NotFound,
10631 ErrorCode::LimitExceeded,
10632 ErrorCode::CapabilityUnavailable,
10633 ErrorCode::TemporarilyUnavailable,
10634 ErrorCode::Internal,
10635 ],
10636 limit_ids: &["request_bytes", "response_bytes"],
10637 effect_class: "read_only",
10638 risk_flags: &[],
10639 capability_family: "diagnostics",
10640 retry_safety: "safe",
10641 identity_requirement: "request_locator",
10642 resolver: None,
10643 cancellation: "per_call",
10644 side_effects: &[],
10645 recovery: "retry",
10646 collection_index_ref: "none",
10647 },
10648 CommandSemanticContract {
10649 command: Command::CreateDiagnostic,
10650 admissible_errors: &[
10651 ErrorCode::Aborted,
10652 ErrorCode::DeadlineExceeded,
10653 ErrorCode::InvalidRequest,
10654 ErrorCode::UnsupportedVersion,
10655 ErrorCode::Unauthenticated,
10656 ErrorCode::PermissionDenied,
10657 ErrorCode::NotFound,
10658 ErrorCode::Conflict,
10659 ErrorCode::LimitExceeded,
10660 ErrorCode::CapabilityUnavailable,
10661 ErrorCode::NotSubmitted,
10662 ErrorCode::SubmittedIndeterminate,
10663 ErrorCode::ExpiredUnknown,
10664 ErrorCode::TemporarilyUnavailable,
10665 ErrorCode::Internal,
10666 ],
10667 limit_ids: &["request_bytes", "response_bytes"],
10668 effect_class: "durable_submit",
10669 risk_flags: &[],
10670 capability_family: "diagnostics",
10671 retry_safety: "pre_submit_only",
10672 identity_requirement: "none",
10673 resolver: None,
10674 cancellation: "per_call_until_submission_then_resolve",
10675 side_effects: &["commits_authoritative_state"],
10676 recovery: "retry_if_not_submitted",
10677 collection_index_ref: "none",
10678 },
10679 CommandSemanticContract {
10680 command: Command::GetDiagnostic,
10681 admissible_errors: &[
10682 ErrorCode::Aborted,
10683 ErrorCode::DeadlineExceeded,
10684 ErrorCode::InvalidRequest,
10685 ErrorCode::UnsupportedVersion,
10686 ErrorCode::Unauthenticated,
10687 ErrorCode::PermissionDenied,
10688 ErrorCode::NotFound,
10689 ErrorCode::LimitExceeded,
10690 ErrorCode::CapabilityUnavailable,
10691 ErrorCode::TemporarilyUnavailable,
10692 ErrorCode::Internal,
10693 ],
10694 limit_ids: &["request_bytes", "response_bytes"],
10695 effect_class: "read_only",
10696 risk_flags: &[],
10697 capability_family: "diagnostics",
10698 retry_safety: "safe",
10699 identity_requirement: "request_locator",
10700 resolver: None,
10701 cancellation: "per_call",
10702 side_effects: &[],
10703 recovery: "retry",
10704 collection_index_ref: "none",
10705 },
10706 CommandSemanticContract {
10707 command: Command::ReadArtifactChunk,
10708 admissible_errors: &[
10709 ErrorCode::Aborted,
10710 ErrorCode::DeadlineExceeded,
10711 ErrorCode::InvalidRequest,
10712 ErrorCode::UnsupportedVersion,
10713 ErrorCode::Unauthenticated,
10714 ErrorCode::PermissionDenied,
10715 ErrorCode::NotFound,
10716 ErrorCode::LimitExceeded,
10717 ErrorCode::CapabilityUnavailable,
10718 ErrorCode::ArtifactRangeInvalid,
10719 ErrorCode::ChecksumMismatch,
10720 ErrorCode::TemporarilyUnavailable,
10721 ErrorCode::Internal,
10722 ],
10723 limit_ids: &["request_bytes", "response_bytes", "artifact_chunk_bytes"],
10724 effect_class: "read_only",
10725 risk_flags: &[],
10726 capability_family: "operations",
10727 retry_safety: "safe",
10728 identity_requirement: "none",
10729 resolver: None,
10730 cancellation: "per_call",
10731 side_effects: &[],
10732 recovery: "retry",
10733 collection_index_ref: "none",
10734 },
10735 CommandSemanticContract {
10736 command: Command::ExportUsage,
10737 admissible_errors: &[
10738 ErrorCode::Aborted,
10739 ErrorCode::DeadlineExceeded,
10740 ErrorCode::InvalidRequest,
10741 ErrorCode::UnsupportedVersion,
10742 ErrorCode::Unauthenticated,
10743 ErrorCode::PermissionDenied,
10744 ErrorCode::NotFound,
10745 ErrorCode::StaleCursor,
10746 ErrorCode::RestartBudgetExhausted,
10747 ErrorCode::LimitExceeded,
10748 ErrorCode::CapabilityUnavailable,
10749 ErrorCode::TemporarilyUnavailable,
10750 ErrorCode::Internal,
10751 ],
10752 limit_ids: &["request_bytes", "response_bytes", "page_size"],
10753 effect_class: "read_only",
10754 risk_flags: &[],
10755 capability_family: "usage",
10756 retry_safety: "safe",
10757 identity_requirement: "none",
10758 resolver: None,
10759 cancellation: "per_call",
10760 side_effects: &[],
10761 recovery: "retry",
10762 collection_index_ref: "none",
10763 },
10764 CommandSemanticContract {
10765 command: Command::ExecuteStateRead,
10766 admissible_errors: &[
10767 ErrorCode::Aborted,
10768 ErrorCode::DeadlineExceeded,
10769 ErrorCode::InvalidRequest,
10770 ErrorCode::UnsupportedVersion,
10771 ErrorCode::Unauthenticated,
10772 ErrorCode::PermissionDenied,
10773 ErrorCode::NotFound,
10774 ErrorCode::LimitExceeded,
10775 ErrorCode::CapabilityUnavailable,
10776 ErrorCode::TemporarilyUnavailable,
10777 ErrorCode::Internal,
10778 ],
10779 limit_ids: &[
10780 "request_bytes",
10781 "response_bytes",
10782 "state_command_keys",
10783 "state_command_value_bytes",
10784 ],
10785 effect_class: "read_only",
10786 risk_flags: &[],
10787 capability_family: "data",
10788 retry_safety: "safe",
10789 identity_requirement: "none",
10790 resolver: None,
10791 cancellation: "per_call",
10792 side_effects: &[],
10793 recovery: "retry",
10794 collection_index_ref: "request_index",
10795 },
10796 CommandSemanticContract {
10797 command: Command::PrepareStateWrite,
10798 admissible_errors: &[
10799 ErrorCode::Aborted,
10800 ErrorCode::DeadlineExceeded,
10801 ErrorCode::InvalidRequest,
10802 ErrorCode::UnsupportedVersion,
10803 ErrorCode::Unauthenticated,
10804 ErrorCode::PermissionDenied,
10805 ErrorCode::NotFound,
10806 ErrorCode::LimitExceeded,
10807 ErrorCode::CapabilityUnavailable,
10808 ErrorCode::TemporarilyUnavailable,
10809 ErrorCode::Internal,
10810 ],
10811 limit_ids: &[
10812 "request_bytes",
10813 "response_bytes",
10814 "state_command_keys",
10815 "state_command_value_bytes",
10816 ],
10817 effect_class: "prepare",
10818 risk_flags: &[],
10819 capability_family: "data",
10820 retry_safety: "safe",
10821 identity_requirement: "caller_action_id",
10822 resolver: None,
10823 cancellation: "per_call",
10824 side_effects: &["creates_bounded_preparation"],
10825 recovery: "retry",
10826 collection_index_ref: "request_index",
10827 },
10828 CommandSemanticContract {
10829 command: Command::SubmitStateWrite,
10830 admissible_errors: &[
10831 ErrorCode::Aborted,
10832 ErrorCode::DeadlineExceeded,
10833 ErrorCode::InvalidRequest,
10834 ErrorCode::UnsupportedVersion,
10835 ErrorCode::Unauthenticated,
10836 ErrorCode::PermissionDenied,
10837 ErrorCode::NotFound,
10838 ErrorCode::Conflict,
10839 ErrorCode::LimitExceeded,
10840 ErrorCode::CapabilityUnavailable,
10841 ErrorCode::NotSubmitted,
10842 ErrorCode::SubmittedIndeterminate,
10843 ErrorCode::ExpiredUnknown,
10844 ErrorCode::TemporarilyUnavailable,
10845 ErrorCode::Internal,
10846 ],
10847 limit_ids: &[
10848 "request_bytes",
10849 "response_bytes",
10850 "state_command_keys",
10851 "state_command_value_bytes",
10852 ],
10853 effect_class: "durable_submit",
10854 risk_flags: &[],
10855 capability_family: "data",
10856 retry_safety: "pre_submit_only",
10857 identity_requirement: "request_locator",
10858 resolver: Some(Command::ResolveStateWrite),
10859 cancellation: "per_call_until_submission_then_resolve",
10860 side_effects: &["commits_authoritative_state"],
10861 recovery: "resolve_with_resolve_state_write",
10862 collection_index_ref: "request_index",
10863 },
10864 CommandSemanticContract {
10865 command: Command::ResolveStateWrite,
10866 admissible_errors: &[
10867 ErrorCode::Aborted,
10868 ErrorCode::DeadlineExceeded,
10869 ErrorCode::InvalidRequest,
10870 ErrorCode::UnsupportedVersion,
10871 ErrorCode::Unauthenticated,
10872 ErrorCode::PermissionDenied,
10873 ErrorCode::NotFound,
10874 ErrorCode::LimitExceeded,
10875 ErrorCode::CapabilityUnavailable,
10876 ErrorCode::TemporarilyUnavailable,
10877 ErrorCode::Internal,
10878 ],
10879 limit_ids: &[
10880 "request_bytes",
10881 "response_bytes",
10882 "state_command_keys",
10883 "state_command_value_bytes",
10884 ],
10885 effect_class: "read_only",
10886 risk_flags: &[],
10887 capability_family: "data",
10888 retry_safety: "safe",
10889 identity_requirement: "request_locator",
10890 resolver: None,
10891 cancellation: "per_call",
10892 side_effects: &[],
10893 recovery: "retry",
10894 collection_index_ref: "request_index",
10895 },
10896];
10897#[derive(Clone, Copy, Debug, Eq, PartialEq)]
10898pub struct CommandOutcomeContract {
10899 pub command: Command,
10900 pub pre_submit_retry_safe: bool,
10901 pub possible_submission_states: &'static [&'static str],
10902 pub identity_requirement: &'static str,
10903 pub resolver_command: Option<Command>,
10904 pub cancellation: &'static str,
10905 pub bounded_retry_after: bool,
10906}
10907pub const LODESTONE_API_COMMAND_OUTCOMES: &[CommandOutcomeContract] = &[
10908 CommandOutcomeContract {
10909 command: Command::Discover,
10910 pre_submit_retry_safe: true,
10911 possible_submission_states: &["not_submitted", "resolved"],
10912 identity_requirement: "none",
10913 resolver_command: None,
10914 cancellation: "per_call",
10915 bounded_retry_after: true,
10916 },
10917 CommandOutcomeContract {
10918 command: Command::ListIndexes,
10919 pre_submit_retry_safe: true,
10920 possible_submission_states: &["not_submitted", "resolved"],
10921 identity_requirement: "none",
10922 resolver_command: None,
10923 cancellation: "per_call",
10924 bounded_retry_after: true,
10925 },
10926 CommandOutcomeContract {
10927 command: Command::GetIndex,
10928 pre_submit_retry_safe: true,
10929 possible_submission_states: &["not_submitted", "resolved"],
10930 identity_requirement: "none",
10931 resolver_command: None,
10932 cancellation: "per_call",
10933 bounded_retry_after: true,
10934 },
10935 CommandOutcomeContract {
10936 command: Command::ValidateIndexChange,
10937 pre_submit_retry_safe: true,
10938 possible_submission_states: &["not_submitted", "resolved"],
10939 identity_requirement: "none",
10940 resolver_command: None,
10941 cancellation: "per_call",
10942 bounded_retry_after: true,
10943 },
10944 CommandOutcomeContract {
10945 command: Command::ApplyIndexChange,
10946 pre_submit_retry_safe: true,
10947 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
10948 identity_requirement: "caller_action_id",
10949 resolver_command: None,
10950 cancellation: "per_call_until_submission_then_resolve",
10951 bounded_retry_after: true,
10952 },
10953 CommandOutcomeContract {
10954 command: Command::ApplyAdministrationMutation,
10955 pre_submit_retry_safe: true,
10956 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
10957 identity_requirement: "caller_action_id",
10958 resolver_command: None,
10959 cancellation: "per_call_until_submission_then_resolve",
10960 bounded_retry_after: true,
10961 },
10962 CommandOutcomeContract {
10963 command: Command::ListAliases,
10964 pre_submit_retry_safe: true,
10965 possible_submission_states: &["not_submitted", "resolved"],
10966 identity_requirement: "none",
10967 resolver_command: None,
10968 cancellation: "per_call",
10969 bounded_retry_after: true,
10970 },
10971 CommandOutcomeContract {
10972 command: Command::GetAlias,
10973 pre_submit_retry_safe: true,
10974 possible_submission_states: &["not_submitted", "resolved"],
10975 identity_requirement: "none",
10976 resolver_command: None,
10977 cancellation: "per_call",
10978 bounded_retry_after: true,
10979 },
10980 CommandOutcomeContract {
10981 command: Command::ListDataStreams,
10982 pre_submit_retry_safe: true,
10983 possible_submission_states: &["not_submitted", "resolved"],
10984 identity_requirement: "none",
10985 resolver_command: None,
10986 cancellation: "per_call",
10987 bounded_retry_after: true,
10988 },
10989 CommandOutcomeContract {
10990 command: Command::GetDataStream,
10991 pre_submit_retry_safe: true,
10992 possible_submission_states: &["not_submitted", "resolved"],
10993 identity_requirement: "none",
10994 resolver_command: None,
10995 cancellation: "per_call",
10996 bounded_retry_after: true,
10997 },
10998 CommandOutcomeContract {
10999 command: Command::ListComponentTemplates,
11000 pre_submit_retry_safe: true,
11001 possible_submission_states: &["not_submitted", "resolved"],
11002 identity_requirement: "none",
11003 resolver_command: None,
11004 cancellation: "per_call",
11005 bounded_retry_after: true,
11006 },
11007 CommandOutcomeContract {
11008 command: Command::GetComponentTemplate,
11009 pre_submit_retry_safe: true,
11010 possible_submission_states: &["not_submitted", "resolved"],
11011 identity_requirement: "none",
11012 resolver_command: None,
11013 cancellation: "per_call",
11014 bounded_retry_after: true,
11015 },
11016 CommandOutcomeContract {
11017 command: Command::ListIndexTemplates,
11018 pre_submit_retry_safe: true,
11019 possible_submission_states: &["not_submitted", "resolved"],
11020 identity_requirement: "none",
11021 resolver_command: None,
11022 cancellation: "per_call",
11023 bounded_retry_after: true,
11024 },
11025 CommandOutcomeContract {
11026 command: Command::GetIndexTemplate,
11027 pre_submit_retry_safe: true,
11028 possible_submission_states: &["not_submitted", "resolved"],
11029 identity_requirement: "none",
11030 resolver_command: None,
11031 cancellation: "per_call",
11032 bounded_retry_after: true,
11033 },
11034 CommandOutcomeContract {
11035 command: Command::ListIngestPipelines,
11036 pre_submit_retry_safe: true,
11037 possible_submission_states: &["not_submitted", "resolved"],
11038 identity_requirement: "none",
11039 resolver_command: None,
11040 cancellation: "per_call",
11041 bounded_retry_after: true,
11042 },
11043 CommandOutcomeContract {
11044 command: Command::GetIngestPipeline,
11045 pre_submit_retry_safe: true,
11046 possible_submission_states: &["not_submitted", "resolved"],
11047 identity_requirement: "none",
11048 resolver_command: None,
11049 cancellation: "per_call",
11050 bounded_retry_after: true,
11051 },
11052 CommandOutcomeContract {
11053 command: Command::SimulateIngestPipeline,
11054 pre_submit_retry_safe: true,
11055 possible_submission_states: &["not_submitted", "resolved"],
11056 identity_requirement: "none",
11057 resolver_command: None,
11058 cancellation: "per_call",
11059 bounded_retry_after: true,
11060 },
11061 CommandOutcomeContract {
11062 command: Command::ReprocessByQuery,
11063 pre_submit_retry_safe: true,
11064 possible_submission_states: &[
11065 "not_submitted",
11066 "submitted",
11067 "known_retired",
11068 "indeterminate",
11069 "resolved",
11070 ],
11071 identity_requirement: "caller_action_id",
11072 resolver_command: None,
11073 cancellation: "per_call_until_submission_then_resolve",
11074 bounded_retry_after: true,
11075 },
11076 CommandOutcomeContract {
11077 command: Command::ListLifecyclePolicies,
11078 pre_submit_retry_safe: true,
11079 possible_submission_states: &["not_submitted", "resolved"],
11080 identity_requirement: "none",
11081 resolver_command: None,
11082 cancellation: "per_call",
11083 bounded_retry_after: true,
11084 },
11085 CommandOutcomeContract {
11086 command: Command::GetLifecyclePolicy,
11087 pre_submit_retry_safe: true,
11088 possible_submission_states: &["not_submitted", "resolved"],
11089 identity_requirement: "none",
11090 resolver_command: None,
11091 cancellation: "per_call",
11092 bounded_retry_after: true,
11093 },
11094 CommandOutcomeContract {
11095 command: Command::PrepareCreateIndex,
11096 pre_submit_retry_safe: true,
11097 possible_submission_states: &["not_submitted", "resolved"],
11098 identity_requirement: "server_locator",
11099 resolver_command: None,
11100 cancellation: "per_call",
11101 bounded_retry_after: true,
11102 },
11103 CommandOutcomeContract {
11104 command: Command::PrepareDeleteIndex,
11105 pre_submit_retry_safe: true,
11106 possible_submission_states: &["not_submitted", "resolved"],
11107 identity_requirement: "server_locator",
11108 resolver_command: None,
11109 cancellation: "per_call",
11110 bounded_retry_after: true,
11111 },
11112 CommandOutcomeContract {
11113 command: Command::SubmitCatalogAction,
11114 pre_submit_retry_safe: true,
11115 possible_submission_states: &[
11116 "not_submitted",
11117 "submitted",
11118 "known_retired",
11119 "indeterminate",
11120 "resolved",
11121 ],
11122 identity_requirement: "request_locator",
11123 resolver_command: Some(Command::ResolveCatalogAction),
11124 cancellation: "per_call_until_submission_then_resolve",
11125 bounded_retry_after: true,
11126 },
11127 CommandOutcomeContract {
11128 command: Command::ResolveCatalogAction,
11129 pre_submit_retry_safe: true,
11130 possible_submission_states: &["not_submitted", "resolved"],
11131 identity_requirement: "request_locator",
11132 resolver_command: None,
11133 cancellation: "per_call",
11134 bounded_retry_after: true,
11135 },
11136 CommandOutcomeContract {
11137 command: Command::PrepareReplayableSourceIndex,
11138 pre_submit_retry_safe: true,
11139 possible_submission_states: &["not_submitted", "resolved"],
11140 identity_requirement: "server_locator",
11141 resolver_command: None,
11142 cancellation: "per_call",
11143 bounded_retry_after: true,
11144 },
11145 CommandOutcomeContract {
11146 command: Command::SubmitReplayableSourceIndex,
11147 pre_submit_retry_safe: true,
11148 possible_submission_states: &[
11149 "not_submitted",
11150 "submitted",
11151 "known_retired",
11152 "indeterminate",
11153 "resolved",
11154 ],
11155 identity_requirement: "request_locator",
11156 resolver_command: Some(Command::ResolveCatalogAction),
11157 cancellation: "per_call_until_submission_then_resolve",
11158 bounded_retry_after: true,
11159 },
11160 CommandOutcomeContract {
11161 command: Command::GetReplayableSource,
11162 pre_submit_retry_safe: true,
11163 possible_submission_states: &["not_submitted", "resolved"],
11164 identity_requirement: "none",
11165 resolver_command: None,
11166 cancellation: "per_call",
11167 bounded_retry_after: true,
11168 },
11169 CommandOutcomeContract {
11170 command: Command::ControlReplayableSource,
11171 pre_submit_retry_safe: true,
11172 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
11173 identity_requirement: "none",
11174 resolver_command: None,
11175 cancellation: "per_call_until_submission_then_resolve",
11176 bounded_retry_after: true,
11177 },
11178 CommandOutcomeContract {
11179 command: Command::CloneIndex,
11180 pre_submit_retry_safe: true,
11181 possible_submission_states: &[
11182 "not_submitted",
11183 "submitted",
11184 "known_retired",
11185 "indeterminate",
11186 "resolved",
11187 ],
11188 identity_requirement: "caller_action_id",
11189 resolver_command: Some(Command::CloneIndex),
11190 cancellation: "per_call_until_submission_then_resolve",
11191 bounded_retry_after: true,
11192 },
11193 CommandOutcomeContract {
11194 command: Command::ConfigureHistory,
11195 pre_submit_retry_safe: true,
11196 possible_submission_states: &[
11197 "not_submitted",
11198 "submitted",
11199 "known_retired",
11200 "indeterminate",
11201 "resolved",
11202 ],
11203 identity_requirement: "none",
11204 resolver_command: Some(Command::GetHistory),
11205 cancellation: "per_call_until_submission_then_resolve",
11206 bounded_retry_after: true,
11207 },
11208 CommandOutcomeContract {
11209 command: Command::GetHistory,
11210 pre_submit_retry_safe: true,
11211 possible_submission_states: &["not_submitted", "resolved"],
11212 identity_requirement: "none",
11213 resolver_command: None,
11214 cancellation: "per_call",
11215 bounded_retry_after: true,
11216 },
11217 CommandOutcomeContract {
11218 command: Command::ResolveHistory,
11219 pre_submit_retry_safe: true,
11220 possible_submission_states: &["not_submitted", "resolved"],
11221 identity_requirement: "none",
11222 resolver_command: None,
11223 cancellation: "per_call",
11224 bounded_retry_after: true,
11225 },
11226 CommandOutcomeContract {
11227 command: Command::PlaceHistoryHold,
11228 pre_submit_retry_safe: true,
11229 possible_submission_states: &[
11230 "not_submitted",
11231 "submitted",
11232 "known_retired",
11233 "indeterminate",
11234 "resolved",
11235 ],
11236 identity_requirement: "none",
11237 resolver_command: Some(Command::GetHistory),
11238 cancellation: "per_call_until_submission_then_resolve",
11239 bounded_retry_after: true,
11240 },
11241 CommandOutcomeContract {
11242 command: Command::ReleaseHistoryHold,
11243 pre_submit_retry_safe: true,
11244 possible_submission_states: &[
11245 "not_submitted",
11246 "submitted",
11247 "known_retired",
11248 "indeterminate",
11249 "resolved",
11250 ],
11251 identity_requirement: "none",
11252 resolver_command: Some(Command::GetHistory),
11253 cancellation: "per_call_until_submission_then_resolve",
11254 bounded_retry_after: true,
11255 },
11256 CommandOutcomeContract {
11257 command: Command::PrepareDocumentMutation,
11258 pre_submit_retry_safe: true,
11259 possible_submission_states: &["not_submitted", "resolved"],
11260 identity_requirement: "server_locator",
11261 resolver_command: None,
11262 cancellation: "per_call",
11263 bounded_retry_after: true,
11264 },
11265 CommandOutcomeContract {
11266 command: Command::SubmitDocumentMutation,
11267 pre_submit_retry_safe: true,
11268 possible_submission_states: &[
11269 "not_submitted",
11270 "submitted",
11271 "known_retired",
11272 "indeterminate",
11273 "resolved",
11274 ],
11275 identity_requirement: "request_locator",
11276 resolver_command: Some(Command::ResolveDocumentMutation),
11277 cancellation: "per_call_until_submission_then_resolve",
11278 bounded_retry_after: true,
11279 },
11280 CommandOutcomeContract {
11281 command: Command::PrepareDocumentBulk,
11282 pre_submit_retry_safe: true,
11283 possible_submission_states: &["not_submitted", "resolved"],
11284 identity_requirement: "caller_action_id",
11285 resolver_command: None,
11286 cancellation: "per_call",
11287 bounded_retry_after: true,
11288 },
11289 CommandOutcomeContract {
11290 command: Command::SubmitDocumentBulk,
11291 pre_submit_retry_safe: true,
11292 possible_submission_states: &[
11293 "not_submitted",
11294 "submitted",
11295 "known_retired",
11296 "indeterminate",
11297 "resolved",
11298 ],
11299 identity_requirement: "caller_action_id",
11300 resolver_command: Some(Command::ResolveDocumentBulk),
11301 cancellation: "per_call_until_submission_then_resolve",
11302 bounded_retry_after: true,
11303 },
11304 CommandOutcomeContract {
11305 command: Command::ResolveDocumentBulk,
11306 pre_submit_retry_safe: true,
11307 possible_submission_states: &["not_submitted", "resolved"],
11308 identity_requirement: "caller_action_id",
11309 resolver_command: None,
11310 cancellation: "per_call",
11311 bounded_retry_after: true,
11312 },
11313 CommandOutcomeContract {
11314 command: Command::PrepareAppendBulk,
11315 pre_submit_retry_safe: true,
11316 possible_submission_states: &["not_submitted", "resolved"],
11317 identity_requirement: "caller_action_id",
11318 resolver_command: None,
11319 cancellation: "per_call",
11320 bounded_retry_after: true,
11321 },
11322 CommandOutcomeContract {
11323 command: Command::SubmitAppendBulk,
11324 pre_submit_retry_safe: true,
11325 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
11326 identity_requirement: "request_locator",
11327 resolver_command: Some(Command::ResolveAppendBulk),
11328 cancellation: "per_call_until_submission_then_resolve",
11329 bounded_retry_after: true,
11330 },
11331 CommandOutcomeContract {
11332 command: Command::ResolveAppendBulk,
11333 pre_submit_retry_safe: true,
11334 possible_submission_states: &["not_submitted", "resolved"],
11335 identity_requirement: "request_locator",
11336 resolver_command: None,
11337 cancellation: "per_call",
11338 bounded_retry_after: true,
11339 },
11340 CommandOutcomeContract {
11341 command: Command::ObserveAppendCommitted,
11342 pre_submit_retry_safe: true,
11343 possible_submission_states: &["not_submitted", "resolved"],
11344 identity_requirement: "request_locator",
11345 resolver_command: None,
11346 cancellation: "per_call",
11347 bounded_retry_after: true,
11348 },
11349 CommandOutcomeContract {
11350 command: Command::ResolveDocumentMutation,
11351 pre_submit_retry_safe: true,
11352 possible_submission_states: &["not_submitted", "resolved"],
11353 identity_requirement: "request_locator",
11354 resolver_command: None,
11355 cancellation: "per_call",
11356 bounded_retry_after: true,
11357 },
11358 CommandOutcomeContract {
11359 command: Command::GetDocument,
11360 pre_submit_retry_safe: true,
11361 possible_submission_states: &["not_submitted", "resolved"],
11362 identity_requirement: "none",
11363 resolver_command: None,
11364 cancellation: "per_call",
11365 bounded_retry_after: true,
11366 },
11367 CommandOutcomeContract {
11368 command: Command::Search,
11369 pre_submit_retry_safe: true,
11370 possible_submission_states: &["not_submitted", "resolved"],
11371 identity_requirement: "none",
11372 resolver_command: None,
11373 cancellation: "per_call",
11374 bounded_retry_after: true,
11375 },
11376 CommandOutcomeContract {
11377 command: Command::OpenPit,
11378 pre_submit_retry_safe: true,
11379 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
11380 identity_requirement: "none",
11381 resolver_command: None,
11382 cancellation: "per_call_until_submission_then_resolve",
11383 bounded_retry_after: true,
11384 },
11385 CommandOutcomeContract {
11386 command: Command::RenewPit,
11387 pre_submit_retry_safe: true,
11388 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
11389 identity_requirement: "none",
11390 resolver_command: None,
11391 cancellation: "per_call_until_submission_then_resolve",
11392 bounded_retry_after: true,
11393 },
11394 CommandOutcomeContract {
11395 command: Command::ClosePit,
11396 pre_submit_retry_safe: true,
11397 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
11398 identity_requirement: "none",
11399 resolver_command: None,
11400 cancellation: "per_call_until_submission_then_resolve",
11401 bounded_retry_after: true,
11402 },
11403 CommandOutcomeContract {
11404 command: Command::ListOperations,
11405 pre_submit_retry_safe: true,
11406 possible_submission_states: &["not_submitted", "resolved"],
11407 identity_requirement: "none",
11408 resolver_command: None,
11409 cancellation: "per_call",
11410 bounded_retry_after: true,
11411 },
11412 CommandOutcomeContract {
11413 command: Command::GetOperation,
11414 pre_submit_retry_safe: true,
11415 possible_submission_states: &["not_submitted", "resolved"],
11416 identity_requirement: "request_locator",
11417 resolver_command: None,
11418 cancellation: "per_call",
11419 bounded_retry_after: true,
11420 },
11421 CommandOutcomeContract {
11422 command: Command::CancelOperation,
11423 pre_submit_retry_safe: true,
11424 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
11425 identity_requirement: "request_locator",
11426 resolver_command: None,
11427 cancellation: "per_call_until_submission_then_resolve",
11428 bounded_retry_after: true,
11429 },
11430 CommandOutcomeContract {
11431 command: Command::ListAuditEvents,
11432 pre_submit_retry_safe: true,
11433 possible_submission_states: &["not_submitted", "resolved"],
11434 identity_requirement: "none",
11435 resolver_command: None,
11436 cancellation: "per_call",
11437 bounded_retry_after: true,
11438 },
11439 CommandOutcomeContract {
11440 command: Command::ExportAuditEvents,
11441 pre_submit_retry_safe: true,
11442 possible_submission_states: &["not_submitted", "resolved"],
11443 identity_requirement: "none",
11444 resolver_command: None,
11445 cancellation: "per_call",
11446 bounded_retry_after: true,
11447 },
11448 CommandOutcomeContract {
11449 command: Command::ReserveServiceCredential,
11450 pre_submit_retry_safe: true,
11451 possible_submission_states: &[
11452 "not_submitted",
11453 "submitted",
11454 "known_retired",
11455 "indeterminate",
11456 "resolved",
11457 ],
11458 identity_requirement: "caller_action_id",
11459 resolver_command: Some(Command::ResolveServiceCredentialReservation),
11460 cancellation: "per_call_until_submission_then_resolve",
11461 bounded_retry_after: true,
11462 },
11463 CommandOutcomeContract {
11464 command: Command::ReserveServiceCredentialRotation,
11465 pre_submit_retry_safe: true,
11466 possible_submission_states: &[
11467 "not_submitted",
11468 "submitted",
11469 "known_retired",
11470 "indeterminate",
11471 "resolved",
11472 ],
11473 identity_requirement: "caller_action_id",
11474 resolver_command: Some(Command::ResolveServiceCredentialReservation),
11475 cancellation: "per_call_until_submission_then_resolve",
11476 bounded_retry_after: true,
11477 },
11478 CommandOutcomeContract {
11479 command: Command::ActivateServiceCredential,
11480 pre_submit_retry_safe: true,
11481 possible_submission_states: &[
11482 "not_submitted",
11483 "submitted",
11484 "known_retired",
11485 "indeterminate",
11486 "resolved",
11487 ],
11488 identity_requirement: "server_locator",
11489 resolver_command: Some(Command::ResolveServiceCredentialReservation),
11490 cancellation: "per_call_until_submission_then_resolve",
11491 bounded_retry_after: true,
11492 },
11493 CommandOutcomeContract {
11494 command: Command::ResolveServiceCredentialReservation,
11495 pre_submit_retry_safe: true,
11496 possible_submission_states: &["not_submitted", "resolved"],
11497 identity_requirement: "caller_action_id",
11498 resolver_command: None,
11499 cancellation: "per_call",
11500 bounded_retry_after: true,
11501 },
11502 CommandOutcomeContract {
11503 command: Command::PrepareRevokeServiceCredential,
11504 pre_submit_retry_safe: true,
11505 possible_submission_states: &["not_submitted", "resolved"],
11506 identity_requirement: "server_locator",
11507 resolver_command: None,
11508 cancellation: "per_call",
11509 bounded_retry_after: true,
11510 },
11511 CommandOutcomeContract {
11512 command: Command::RevokeServiceCredential,
11513 pre_submit_retry_safe: true,
11514 possible_submission_states: &[
11515 "not_submitted",
11516 "submitted",
11517 "known_retired",
11518 "indeterminate",
11519 "resolved",
11520 ],
11521 identity_requirement: "request_locator",
11522 resolver_command: Some(Command::ResolveSecurityAction),
11523 cancellation: "per_call_until_submission_then_resolve",
11524 bounded_retry_after: true,
11525 },
11526 CommandOutcomeContract {
11527 command: Command::ResolveSecurityAction,
11528 pre_submit_retry_safe: true,
11529 possible_submission_states: &["not_submitted", "resolved"],
11530 identity_requirement: "request_locator",
11531 resolver_command: None,
11532 cancellation: "per_call",
11533 bounded_retry_after: true,
11534 },
11535 CommandOutcomeContract {
11536 command: Command::GetSecurityRole,
11537 pre_submit_retry_safe: true,
11538 possible_submission_states: &["not_submitted", "resolved"],
11539 identity_requirement: "none",
11540 resolver_command: None,
11541 cancellation: "per_call",
11542 bounded_retry_after: true,
11543 },
11544 CommandOutcomeContract {
11545 command: Command::PrepareRoleAppendAccessChange,
11546 pre_submit_retry_safe: true,
11547 possible_submission_states: &["not_submitted", "resolved"],
11548 identity_requirement: "server_locator",
11549 resolver_command: None,
11550 cancellation: "per_call",
11551 bounded_retry_after: true,
11552 },
11553 CommandOutcomeContract {
11554 command: Command::SubmitRoleAppendAccessChange,
11555 pre_submit_retry_safe: true,
11556 possible_submission_states: &[
11557 "not_submitted",
11558 "submitted",
11559 "known_retired",
11560 "indeterminate",
11561 "resolved",
11562 ],
11563 identity_requirement: "request_locator",
11564 resolver_command: Some(Command::ResolveSecurityAction),
11565 cancellation: "per_call_until_submission_then_resolve",
11566 bounded_retry_after: true,
11567 },
11568 CommandOutcomeContract {
11569 command: Command::ListServiceCredentials,
11570 pre_submit_retry_safe: true,
11571 possible_submission_states: &["not_submitted", "resolved"],
11572 identity_requirement: "none",
11573 resolver_command: None,
11574 cancellation: "per_call",
11575 bounded_retry_after: true,
11576 },
11577 CommandOutcomeContract {
11578 command: Command::ListBackups,
11579 pre_submit_retry_safe: true,
11580 possible_submission_states: &["not_submitted", "resolved"],
11581 identity_requirement: "none",
11582 resolver_command: None,
11583 cancellation: "per_call",
11584 bounded_retry_after: true,
11585 },
11586 CommandOutcomeContract {
11587 command: Command::GetBackup,
11588 pre_submit_retry_safe: true,
11589 possible_submission_states: &["not_submitted", "resolved"],
11590 identity_requirement: "request_locator",
11591 resolver_command: None,
11592 cancellation: "per_call",
11593 bounded_retry_after: true,
11594 },
11595 CommandOutcomeContract {
11596 command: Command::CreateBackup,
11597 pre_submit_retry_safe: true,
11598 possible_submission_states: &[
11599 "not_submitted",
11600 "submitted",
11601 "known_retired",
11602 "indeterminate",
11603 "resolved",
11604 ],
11605 identity_requirement: "caller_action_id",
11606 resolver_command: Some(Command::ResolveBackupAction),
11607 cancellation: "per_call_until_submission_then_resolve",
11608 bounded_retry_after: true,
11609 },
11610 CommandOutcomeContract {
11611 command: Command::ResolveBackupAction,
11612 pre_submit_retry_safe: true,
11613 possible_submission_states: &["not_submitted", "resolved"],
11614 identity_requirement: "caller_action_id",
11615 resolver_command: None,
11616 cancellation: "per_call",
11617 bounded_retry_after: true,
11618 },
11619 CommandOutcomeContract {
11620 command: Command::GetRuntimeStatus,
11621 pre_submit_retry_safe: true,
11622 possible_submission_states: &["not_submitted", "resolved"],
11623 identity_requirement: "none",
11624 resolver_command: None,
11625 cancellation: "per_call",
11626 bounded_retry_after: true,
11627 },
11628 CommandOutcomeContract {
11629 command: Command::GetResultCacheStatus,
11630 pre_submit_retry_safe: true,
11631 possible_submission_states: &["not_submitted", "resolved"],
11632 identity_requirement: "none",
11633 resolver_command: None,
11634 cancellation: "per_call",
11635 bounded_retry_after: true,
11636 },
11637 CommandOutcomeContract {
11638 command: Command::GetFieldPromotionStatus,
11639 pre_submit_retry_safe: true,
11640 possible_submission_states: &["not_submitted", "resolved"],
11641 identity_requirement: "none",
11642 resolver_command: None,
11643 cancellation: "per_call",
11644 bounded_retry_after: true,
11645 },
11646 CommandOutcomeContract {
11647 command: Command::GetOverloadStatus,
11648 pre_submit_retry_safe: true,
11649 possible_submission_states: &["not_submitted", "resolved"],
11650 identity_requirement: "none",
11651 resolver_command: None,
11652 cancellation: "per_call",
11653 bounded_retry_after: true,
11654 },
11655 CommandOutcomeContract {
11656 command: Command::ConfigureExternalKey,
11657 pre_submit_retry_safe: true,
11658 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
11659 identity_requirement: "none",
11660 resolver_command: None,
11661 cancellation: "per_call_until_submission_then_resolve",
11662 bounded_retry_after: true,
11663 },
11664 CommandOutcomeContract {
11665 command: Command::RotateExternalKeyBinding,
11666 pre_submit_retry_safe: true,
11667 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
11668 identity_requirement: "none",
11669 resolver_command: None,
11670 cancellation: "per_call_until_submission_then_resolve",
11671 bounded_retry_after: true,
11672 },
11673 CommandOutcomeContract {
11674 command: Command::ConfigureAggregateThenDelete,
11675 pre_submit_retry_safe: true,
11676 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
11677 identity_requirement: "none",
11678 resolver_command: None,
11679 cancellation: "per_call_until_submission_then_resolve",
11680 bounded_retry_after: true,
11681 },
11682 CommandOutcomeContract {
11683 command: Command::GetLifecycleStatus,
11684 pre_submit_retry_safe: true,
11685 possible_submission_states: &["not_submitted", "resolved"],
11686 identity_requirement: "none",
11687 resolver_command: None,
11688 cancellation: "per_call",
11689 bounded_retry_after: true,
11690 },
11691 CommandOutcomeContract {
11692 command: Command::GetQuota,
11693 pre_submit_retry_safe: true,
11694 possible_submission_states: &["not_submitted", "resolved"],
11695 identity_requirement: "none",
11696 resolver_command: None,
11697 cancellation: "per_call",
11698 bounded_retry_after: true,
11699 },
11700 CommandOutcomeContract {
11701 command: Command::UpdateQuota,
11702 pre_submit_retry_safe: true,
11703 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
11704 identity_requirement: "none",
11705 resolver_command: None,
11706 cancellation: "per_call_until_submission_then_resolve",
11707 bounded_retry_after: true,
11708 },
11709 CommandOutcomeContract {
11710 command: Command::GetBinding,
11711 pre_submit_retry_safe: true,
11712 possible_submission_states: &["not_submitted", "resolved"],
11713 identity_requirement: "none",
11714 resolver_command: None,
11715 cancellation: "per_call",
11716 bounded_retry_after: true,
11717 },
11718 CommandOutcomeContract {
11719 command: Command::GetAdmissionStatus,
11720 pre_submit_retry_safe: true,
11721 possible_submission_states: &["not_submitted", "resolved"],
11722 identity_requirement: "none",
11723 resolver_command: None,
11724 cancellation: "per_call",
11725 bounded_retry_after: true,
11726 },
11727 CommandOutcomeContract {
11728 command: Command::SetAdmission,
11729 pre_submit_retry_safe: true,
11730 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
11731 identity_requirement: "none",
11732 resolver_command: None,
11733 cancellation: "per_call_until_submission_then_resolve",
11734 bounded_retry_after: true,
11735 },
11736 CommandOutcomeContract {
11737 command: Command::GetQuiesceStatus,
11738 pre_submit_retry_safe: true,
11739 possible_submission_states: &["not_submitted", "resolved"],
11740 identity_requirement: "none",
11741 resolver_command: None,
11742 cancellation: "per_call",
11743 bounded_retry_after: true,
11744 },
11745 CommandOutcomeContract {
11746 command: Command::GetDecommissionReadiness,
11747 pre_submit_retry_safe: true,
11748 possible_submission_states: &["not_submitted", "resolved"],
11749 identity_requirement: "none",
11750 resolver_command: None,
11751 cancellation: "per_call",
11752 bounded_retry_after: true,
11753 },
11754 CommandOutcomeContract {
11755 command: Command::GetUpgradeReadiness,
11756 pre_submit_retry_safe: true,
11757 possible_submission_states: &["not_submitted", "resolved"],
11758 identity_requirement: "none",
11759 resolver_command: None,
11760 cancellation: "per_call",
11761 bounded_retry_after: true,
11762 },
11763 CommandOutcomeContract {
11764 command: Command::GetMaintenanceStatus,
11765 pre_submit_retry_safe: true,
11766 possible_submission_states: &["not_submitted", "resolved"],
11767 identity_requirement: "none",
11768 resolver_command: None,
11769 cancellation: "per_call",
11770 bounded_retry_after: true,
11771 },
11772 CommandOutcomeContract {
11773 command: Command::GetRestoreReadiness,
11774 pre_submit_retry_safe: true,
11775 possible_submission_states: &["not_submitted", "resolved"],
11776 identity_requirement: "none",
11777 resolver_command: None,
11778 cancellation: "per_call",
11779 bounded_retry_after: true,
11780 },
11781 CommandOutcomeContract {
11782 command: Command::WarmVectorIndex,
11783 pre_submit_retry_safe: true,
11784 possible_submission_states: &["not_submitted", "resolved"],
11785 identity_requirement: "exact_root",
11786 resolver_command: None,
11787 cancellation: "per_call",
11788 bounded_retry_after: true,
11789 },
11790 CommandOutcomeContract {
11791 command: Command::EvaluateVectorRecall,
11792 pre_submit_retry_safe: true,
11793 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
11794 identity_requirement: "caller_action_id",
11795 resolver_command: None,
11796 cancellation: "per_call_until_submission_then_resolve",
11797 bounded_retry_after: true,
11798 },
11799 CommandOutcomeContract {
11800 command: Command::CalibrateVectorStrategy,
11801 pre_submit_retry_safe: true,
11802 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
11803 identity_requirement: "caller_action_id",
11804 resolver_command: None,
11805 cancellation: "per_call_until_submission_then_resolve",
11806 bounded_retry_after: true,
11807 },
11808 CommandOutcomeContract {
11809 command: Command::GetVectorDiagnostic,
11810 pre_submit_retry_safe: true,
11811 possible_submission_states: &["not_submitted", "resolved"],
11812 identity_requirement: "request_locator",
11813 resolver_command: None,
11814 cancellation: "per_call",
11815 bounded_retry_after: true,
11816 },
11817 CommandOutcomeContract {
11818 command: Command::CreateDiagnostic,
11819 pre_submit_retry_safe: true,
11820 possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
11821 identity_requirement: "none",
11822 resolver_command: None,
11823 cancellation: "per_call_until_submission_then_resolve",
11824 bounded_retry_after: true,
11825 },
11826 CommandOutcomeContract {
11827 command: Command::GetDiagnostic,
11828 pre_submit_retry_safe: true,
11829 possible_submission_states: &["not_submitted", "resolved"],
11830 identity_requirement: "request_locator",
11831 resolver_command: None,
11832 cancellation: "per_call",
11833 bounded_retry_after: true,
11834 },
11835 CommandOutcomeContract {
11836 command: Command::ReadArtifactChunk,
11837 pre_submit_retry_safe: true,
11838 possible_submission_states: &["not_submitted", "resolved"],
11839 identity_requirement: "none",
11840 resolver_command: None,
11841 cancellation: "per_call",
11842 bounded_retry_after: true,
11843 },
11844 CommandOutcomeContract {
11845 command: Command::ExportUsage,
11846 pre_submit_retry_safe: true,
11847 possible_submission_states: &["not_submitted", "resolved"],
11848 identity_requirement: "none",
11849 resolver_command: None,
11850 cancellation: "per_call",
11851 bounded_retry_after: true,
11852 },
11853 CommandOutcomeContract {
11854 command: Command::ExecuteStateRead,
11855 pre_submit_retry_safe: true,
11856 possible_submission_states: &["not_submitted", "resolved"],
11857 identity_requirement: "none",
11858 resolver_command: None,
11859 cancellation: "per_call",
11860 bounded_retry_after: true,
11861 },
11862 CommandOutcomeContract {
11863 command: Command::PrepareStateWrite,
11864 pre_submit_retry_safe: true,
11865 possible_submission_states: &["not_submitted", "resolved"],
11866 identity_requirement: "caller_action_id",
11867 resolver_command: None,
11868 cancellation: "per_call",
11869 bounded_retry_after: true,
11870 },
11871 CommandOutcomeContract {
11872 command: Command::SubmitStateWrite,
11873 pre_submit_retry_safe: true,
11874 possible_submission_states: &[
11875 "not_submitted",
11876 "submitted",
11877 "known_retired",
11878 "indeterminate",
11879 "resolved",
11880 ],
11881 identity_requirement: "request_locator",
11882 resolver_command: Some(Command::ResolveStateWrite),
11883 cancellation: "per_call_until_submission_then_resolve",
11884 bounded_retry_after: true,
11885 },
11886 CommandOutcomeContract {
11887 command: Command::ResolveStateWrite,
11888 pre_submit_retry_safe: true,
11889 possible_submission_states: &["not_submitted", "resolved"],
11890 identity_requirement: "request_locator",
11891 resolver_command: None,
11892 cancellation: "per_call",
11893 bounded_retry_after: true,
11894 },
11895];
11896#[derive(Clone, Copy, Debug, Eq, PartialEq)]
11897pub struct ErrorOutcomeContract {
11898 pub code: ErrorCode,
11899 pub when_not_submitted: Option<&'static str>,
11900 pub when_submitted: Option<&'static str>,
11901 pub retry_safe: &'static str,
11902 pub retry_after_limit_id: Option<&'static str>,
11903 pub recovery_identity: &'static str,
11904}
11905pub const LODESTONE_API_ERROR_OUTCOMES: &[ErrorOutcomeContract] = &[
11906 ErrorOutcomeContract {
11907 code: ErrorCode::Aborted,
11908 when_not_submitted: Some("not_submitted"),
11909 when_submitted: Some("submitted"),
11910 retry_safe: "only_when_retry_safe",
11911 retry_after_limit_id: None,
11912 recovery_identity: "request_identity",
11913 },
11914 ErrorOutcomeContract {
11915 code: ErrorCode::DeadlineExceeded,
11916 when_not_submitted: Some("not_submitted"),
11917 when_submitted: Some("submitted"),
11918 retry_safe: "only_when_retry_safe",
11919 retry_after_limit_id: None,
11920 recovery_identity: "request_identity",
11921 },
11922 ErrorOutcomeContract {
11923 code: ErrorCode::InvalidRequest,
11924 when_not_submitted: Some("not_submitted"),
11925 when_submitted: None,
11926 retry_safe: "stop",
11927 retry_after_limit_id: None,
11928 recovery_identity: "none",
11929 },
11930 ErrorOutcomeContract {
11931 code: ErrorCode::UnsupportedVersion,
11932 when_not_submitted: Some("not_submitted"),
11933 when_submitted: None,
11934 retry_safe: "stop",
11935 retry_after_limit_id: None,
11936 recovery_identity: "none",
11937 },
11938 ErrorOutcomeContract {
11939 code: ErrorCode::Unauthenticated,
11940 when_not_submitted: Some("not_submitted"),
11941 when_submitted: None,
11942 retry_safe: "refresh_credential_then_retry",
11943 retry_after_limit_id: None,
11944 recovery_identity: "none",
11945 },
11946 ErrorOutcomeContract {
11947 code: ErrorCode::PermissionDenied,
11948 when_not_submitted: Some("not_submitted"),
11949 when_submitted: None,
11950 retry_safe: "stop",
11951 retry_after_limit_id: None,
11952 recovery_identity: "none",
11953 },
11954 ErrorOutcomeContract {
11955 code: ErrorCode::NotFound,
11956 when_not_submitted: Some("not_submitted"),
11957 when_submitted: Some("resolved"),
11958 retry_safe: "stop",
11959 retry_after_limit_id: None,
11960 recovery_identity: "request_identity",
11961 },
11962 ErrorOutcomeContract {
11963 code: ErrorCode::Conflict,
11964 when_not_submitted: Some("not_submitted"),
11965 when_submitted: Some("resolved"),
11966 retry_safe: "resolve_or_refresh_precondition",
11967 retry_after_limit_id: None,
11968 recovery_identity: "request_identity",
11969 },
11970 ErrorOutcomeContract {
11971 code: ErrorCode::StaleCursor,
11972 when_not_submitted: Some("not_submitted"),
11973 when_submitted: None,
11974 retry_safe: "restart_page",
11975 retry_after_limit_id: None,
11976 recovery_identity: "cursor",
11977 },
11978 ErrorOutcomeContract {
11979 code: ErrorCode::RestartBudgetExhausted,
11980 when_not_submitted: Some("not_submitted"),
11981 when_submitted: None,
11982 retry_safe: "stop",
11983 retry_after_limit_id: None,
11984 recovery_identity: "cursor",
11985 },
11986 ErrorOutcomeContract {
11987 code: ErrorCode::LimitExceeded,
11988 when_not_submitted: Some("not_submitted"),
11989 when_submitted: None,
11990 retry_safe: "reduce_request",
11991 retry_after_limit_id: None,
11992 recovery_identity: "none",
11993 },
11994 ErrorOutcomeContract {
11995 code: ErrorCode::CapabilityUnavailable,
11996 when_not_submitted: Some("not_submitted"),
11997 when_submitted: None,
11998 retry_safe: "stop",
11999 retry_after_limit_id: None,
12000 recovery_identity: "none",
12001 },
12002 ErrorOutcomeContract {
12003 code: ErrorCode::NotSubmitted,
12004 when_not_submitted: Some("not_submitted"),
12005 when_submitted: None,
12006 retry_safe: "retry_after",
12007 retry_after_limit_id: Some("retry_after_millis"),
12008 recovery_identity: "request_identity",
12009 },
12010 ErrorOutcomeContract {
12011 code: ErrorCode::SubmittedIndeterminate,
12012 when_not_submitted: None,
12013 when_submitted: Some("indeterminate"),
12014 retry_safe: "resolve",
12015 retry_after_limit_id: None,
12016 recovery_identity: "locator_or_caller_action_id",
12017 },
12018 ErrorOutcomeContract {
12019 code: ErrorCode::ExpiredUnknown,
12020 when_not_submitted: Some("known_retired"),
12021 when_submitted: Some("known_retired"),
12022 retry_safe: "stop",
12023 retry_after_limit_id: None,
12024 recovery_identity: "locator_or_caller_action_id",
12025 },
12026 ErrorOutcomeContract {
12027 code: ErrorCode::SecretNotEscrowed,
12028 when_not_submitted: None,
12029 when_submitted: Some("resolved"),
12030 retry_safe: "resolve",
12031 retry_after_limit_id: None,
12032 recovery_identity: "reservation_action_id",
12033 },
12034 ErrorOutcomeContract {
12035 code: ErrorCode::RetentionGap,
12036 when_not_submitted: Some("known_retired"),
12037 when_submitted: Some("known_retired"),
12038 retry_safe: "stop",
12039 retry_after_limit_id: None,
12040 recovery_identity: "cursor_or_locator",
12041 },
12042 ErrorOutcomeContract {
12043 code: ErrorCode::ArtifactRangeInvalid,
12044 when_not_submitted: Some("not_submitted"),
12045 when_submitted: None,
12046 retry_safe: "correct_range",
12047 retry_after_limit_id: None,
12048 recovery_identity: "artifact_identity",
12049 },
12050 ErrorOutcomeContract {
12051 code: ErrorCode::ChecksumMismatch,
12052 when_not_submitted: Some("resolved"),
12053 when_submitted: Some("resolved"),
12054 retry_safe: "stop",
12055 retry_after_limit_id: None,
12056 recovery_identity: "artifact_identity",
12057 },
12058 ErrorOutcomeContract {
12059 code: ErrorCode::TemporarilyUnavailable,
12060 when_not_submitted: Some("not_submitted"),
12061 when_submitted: Some("submitted"),
12062 retry_safe: "retry_after_when_safe",
12063 retry_after_limit_id: Some("retry_after_millis"),
12064 recovery_identity: "request_identity",
12065 },
12066 ErrorOutcomeContract {
12067 code: ErrorCode::Internal,
12068 when_not_submitted: Some("not_submitted"),
12069 when_submitted: Some("indeterminate"),
12070 retry_safe: "resolve_or_stop",
12071 retry_after_limit_id: None,
12072 recovery_identity: "request_identity",
12073 },
12074];
12075#[derive(Clone, Copy, Debug, Eq, PartialEq)]
12076pub struct Limit {
12077 pub id: &'static str,
12078 pub default: u64,
12079 pub maximum: u64,
12080 pub unit: &'static str,
12081}
12082pub const LODESTONE_API_LIMITS: &[Limit] = &[
12083 Limit {
12084 id: "request_bytes",
12085 default: 2097152,
12086 maximum: 2097152,
12087 unit: "bytes",
12088 },
12089 Limit {
12090 id: "response_bytes",
12091 default: 2097152,
12092 maximum: 2097152,
12093 unit: "bytes",
12094 },
12095 Limit {
12096 id: "page_size",
12097 default: 100,
12098 maximum: 1000,
12099 unit: "items",
12100 },
12101 Limit {
12102 id: "catalog_page_size",
12103 default: 100,
12104 maximum: 100,
12105 unit: "items",
12106 },
12107 Limit {
12108 id: "catalog_restart_budget",
12109 default: 8,
12110 maximum: 8,
12111 unit: "restarts",
12112 },
12113 Limit {
12114 id: "query_clauses",
12115 default: 256,
12116 maximum: 1024,
12117 unit: "clauses",
12118 },
12119 Limit {
12120 id: "text_query_bytes",
12121 default: 16384,
12122 maximum: 16384,
12123 unit: "bytes",
12124 },
12125 Limit {
12126 id: "text_query_fields",
12127 default: 64,
12128 maximum: 64,
12129 unit: "fields",
12130 },
12131 Limit {
12132 id: "text_query_slop",
12133 default: 64,
12134 maximum: 64,
12135 unit: "positions",
12136 },
12137 Limit {
12138 id: "text_query_boost",
12139 default: 1024,
12140 maximum: 1024,
12141 unit: "multiplier",
12142 },
12143 Limit {
12144 id: "text_query_fuzzy_expansions",
12145 default: 1024,
12146 maximum: 1024,
12147 unit: "terms",
12148 },
12149 Limit {
12150 id: "text_query_fuzzy_distance",
12151 default: 2,
12152 maximum: 2,
12153 unit: "edits",
12154 },
12155 Limit {
12156 id: "text_query_dictionary_scan_terms",
12157 default: 65536,
12158 maximum: 65536,
12159 unit: "terms",
12160 },
12161 Limit {
12162 id: "text_query_dictionary_scan_bytes",
12163 default: 16777216,
12164 maximum: 16777216,
12165 unit: "bytes",
12166 },
12167 Limit {
12168 id: "text_query_fuzzy_work_units",
12169 default: 2000000,
12170 maximum: 2000000,
12171 unit: "distance_cells",
12172 },
12173 Limit {
12174 id: "aggregation_nodes",
12175 default: 64,
12176 maximum: 256,
12177 unit: "nodes",
12178 },
12179 Limit {
12180 id: "aggregation_buckets",
12181 default: 65536,
12182 maximum: 65536,
12183 unit: "buckets",
12184 },
12185 Limit {
12186 id: "approximate_cardinality_precision",
12187 default: 12,
12188 maximum: 16,
12189 unit: "index_bits",
12190 },
12191 Limit {
12192 id: "approximate_percentile_precision",
12193 default: 10,
12194 maximum: 12,
12195 unit: "index_bits",
12196 },
12197 Limit {
12198 id: "operation_page_authorities",
12199 default: 6,
12200 maximum: 6,
12201 unit: "authorities",
12202 },
12203 Limit {
12204 id: "artifact_chunk_bytes",
12205 default: 262144,
12206 maximum: 1048576,
12207 unit: "bytes",
12208 },
12209 Limit {
12210 id: "bulk_document_items",
12211 default: 128,
12212 maximum: 1024,
12213 unit: "items",
12214 },
12215 Limit {
12216 id: "bulk_document_bytes",
12217 default: 2097152,
12218 maximum: 2097152,
12219 unit: "bytes",
12220 },
12221 Limit {
12222 id: "state_command_keys",
12223 default: 128,
12224 maximum: 128,
12225 unit: "keys",
12226 },
12227 Limit {
12228 id: "state_command_value_bytes",
12229 default: 1048576,
12230 maximum: 1048576,
12231 unit: "bytes",
12232 },
12233 Limit {
12234 id: "state_write_outcomes",
12235 default: 4096,
12236 maximum: 4096,
12237 unit: "entries",
12238 },
12239 Limit {
12240 id: "exact_decimal_scale",
12241 default: 18,
12242 maximum: 1024,
12243 unit: "decimal_places",
12244 },
12245 Limit {
12246 id: "retry_after_millis",
12247 default: 1000,
12248 maximum: 60000,
12249 unit: "milliseconds",
12250 },
12251 Limit {
12252 id: "mapping_fields",
12253 default: 16384,
12254 maximum: 16384,
12255 unit: "fields",
12256 },
12257 Limit {
12258 id: "search_result_window",
12259 default: 10000,
12260 maximum: 10000,
12261 unit: "items",
12262 },
12263 Limit {
12264 id: "routing_values",
12265 default: 1024,
12266 maximum: 1024,
12267 unit: "items",
12268 },
12269 Limit {
12270 id: "routing_value_bytes",
12271 default: 4096,
12272 maximum: 4096,
12273 unit: "bytes",
12274 },
12275 Limit {
12276 id: "query_recursion_depth",
12277 default: 64,
12278 maximum: 64,
12279 unit: "levels",
12280 },
12281 Limit {
12282 id: "vector_dimensions",
12283 default: 16384,
12284 maximum: 16384,
12285 unit: "dimensions",
12286 },
12287 Limit {
12288 id: "vector_query_bytes",
12289 default: 65536,
12290 maximum: 65536,
12291 unit: "bytes",
12292 },
12293 Limit {
12294 id: "vector_request_bytes",
12295 default: 1048576,
12296 maximum: 1048576,
12297 unit: "bytes",
12298 },
12299 Limit {
12300 id: "vector_candidates",
12301 default: 10000,
12302 maximum: 10000,
12303 unit: "items",
12304 },
12305 Limit {
12306 id: "vector_set_document_vectors",
12307 default: 128,
12308 maximum: 128,
12309 unit: "vectors",
12310 },
12311 Limit {
12312 id: "vector_set_document_bytes",
12313 default: 65536,
12314 maximum: 65536,
12315 unit: "bytes",
12316 },
12317 Limit {
12318 id: "vector_set_query_vectors",
12319 default: 32,
12320 maximum: 32,
12321 unit: "vectors",
12322 },
12323 Limit {
12324 id: "vector_set_query_bytes",
12325 default: 65536,
12326 maximum: 65536,
12327 unit: "bytes",
12328 },
12329 Limit {
12330 id: "retrieval_branches",
12331 default: 16,
12332 maximum: 16,
12333 unit: "branches",
12334 },
12335 Limit {
12336 id: "retrieval_branch_name_bytes",
12337 default: 64,
12338 maximum: 64,
12339 unit: "bytes",
12340 },
12341 Limit {
12342 id: "retrieval_window",
12343 default: 10000,
12344 maximum: 10000,
12345 unit: "items",
12346 },
12347 Limit {
12348 id: "fragment_fields",
12349 default: 4,
12350 maximum: 16,
12351 unit: "fields",
12352 },
12353 Limit {
12354 id: "fragments_per_field",
12355 default: 1,
12356 maximum: 8,
12357 unit: "items",
12358 },
12359 Limit {
12360 id: "fragment_bytes",
12361 default: 150,
12362 maximum: 8192,
12363 unit: "bytes",
12364 },
12365 Limit {
12366 id: "fragment_total_bytes",
12367 default: 65536,
12368 maximum: 65536,
12369 unit: "bytes",
12370 },
12371 Limit {
12372 id: "result_feature_hits",
12373 default: 10,
12374 maximum: 100,
12375 unit: "items",
12376 },
12377 Limit {
12378 id: "result_features",
12379 default: 4,
12380 maximum: 16,
12381 unit: "features",
12382 },
12383 Limit {
12384 id: "diversification_fields",
12385 default: 1,
12386 maximum: 4,
12387 unit: "fields",
12388 },
12389 Limit {
12390 id: "diversification_per_group",
12391 default: 1,
12392 maximum: 64,
12393 unit: "items",
12394 },
12395 Limit {
12396 id: "vector_evaluation_queries",
12397 default: 64,
12398 maximum: 256,
12399 unit: "queries",
12400 },
12401 Limit {
12402 id: "vector_evaluation_k",
12403 default: 10,
12404 maximum: 1000,
12405 unit: "items",
12406 },
12407 Limit {
12408 id: "vector_evaluation_profiles",
12409 default: 3,
12410 maximum: 3,
12411 unit: "profiles",
12412 },
12413 Limit {
12414 id: "vector_evaluation_artifact_bytes",
12415 default: 1048576,
12416 maximum: 1048576,
12417 unit: "bytes",
12418 },
12419 Limit {
12420 id: "vector_warm_components",
12421 default: 2,
12422 maximum: 3,
12423 unit: "components",
12424 },
12425 Limit {
12426 id: "vector_warm_requests",
12427 default: 1024,
12428 maximum: 65536,
12429 unit: "requests",
12430 },
12431 Limit {
12432 id: "vector_warm_bytes",
12433 default: 268435456,
12434 maximum: 1073741824,
12435 unit: "bytes",
12436 },
12437 Limit {
12438 id: "vector_warm_achievements",
12439 default: 1024,
12440 maximum: 10000,
12441 unit: "items",
12442 },
12443 Limit {
12444 id: "vector_warm_ttl_millis",
12445 default: 300000,
12446 maximum: 900000,
12447 unit: "milliseconds",
12448 },
12449 Limit {
12450 id: "operation_page_size",
12451 default: 100,
12452 maximum: 100,
12453 unit: "items",
12454 },
12455 Limit {
12456 id: "resource_initial_shards",
12457 default: 1,
12458 maximum: 4096,
12459 unit: "shards",
12460 },
12461 Limit {
12462 id: "resource_target_shard_bytes",
12463 default: 536870912,
12464 maximum: 1125899906842624,
12465 unit: "bytes",
12466 },
12467 Limit {
12468 id: "resource_admission_weight",
12469 default: 1,
12470 maximum: 1000000,
12471 unit: "weight",
12472 },
12473 Limit {
12474 id: "resource_ram_bytes",
12475 default: 1073741824,
12476 maximum: 1125899906842624,
12477 unit: "bytes",
12478 },
12479 Limit {
12480 id: "resource_nvme_bytes",
12481 default: 2147483648,
12482 maximum: 1125899906842624,
12483 unit: "bytes",
12484 },
12485 Limit {
12486 id: "resource_refresh_millis",
12487 default: 200,
12488 maximum: 604800000,
12489 unit: "milliseconds",
12490 },
12491 Limit {
12492 id: "resource_memtable_bytes",
12493 default: 268435456,
12494 maximum: 1125899906842624,
12495 unit: "bytes",
12496 },
12497 Limit {
12498 id: "resource_parallelism",
12499 default: 1,
12500 maximum: 4096,
12501 unit: "workers",
12502 },
12503];
12504#[derive(Clone, Copy, Debug, Eq, PartialEq)]
12505pub enum JsonError {
12506 DuplicateObjectField,
12507 InvalidScalar,
12508}
12509pub fn validate_semantic_json(value: &JsonValue) -> Result<(), JsonError> {
12510 match value {
12511 JsonValue::I64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
12512 JsonValue::U64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
12513 JsonValue::ExactDecimal(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
12514 JsonValue::Approximate(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
12515 JsonValue::Array(items) => items.iter().try_for_each(validate_semantic_json),
12516 JsonValue::Object(fields) => {
12517 let mut names = std::collections::BTreeSet::new();
12518 for field in fields {
12519 if !names.insert(field.name.as_str()) {
12520 return Err(JsonError::DuplicateObjectField);
12521 }
12522 validate_semantic_json(&field.value)?;
12523 }
12524 Ok(())
12525 }
12526 JsonValue::Null | JsonValue::Bool(_) | JsonValue::String(_) => Ok(()),
12527 }
12528}
12529#[cfg(test)]
12530mod tests {
12531 use super::*;
12532 fn assert_fixture<T>(value: &serde_json::Value) -> Result<(), Box<dyn std::error::Error>>
12533 where
12534 T: serde::de::DeserializeOwned + Serialize,
12535 {
12536 let decoded: T = serde_json::from_value(value.clone())?;
12537 assert_eq!(serde_json::to_value(decoded)?, *value);
12538 Ok(())
12539 }
12540 #[test]
12541 fn every_named_type_has_a_canonical_round_trip_fixture() -> Result<(), Box<dyn std::error::Error>> {
12542 let document: serde_json::Value =
12543 serde_json::from_str(include_str!("../../../tests/p10/lodestone-api-closed-schema.json"))?;
12544 assert_eq!(document["spec_sha256"], LODESTONE_API_SPEC_SHA256);
12545 let fixtures = document["named_types"]
12546 .as_object()
12547 .ok_or("named type fixtures are not an object")?;
12548 assert_eq!(fixtures.len(), LODESTONE_API_TYPE_CONTRACTS.len());
12549 for (name, value) in fixtures {
12550 match name.as_str() {
12551 "cursor" => assert_fixture::<Cursor>(value)?,
12552 "locator" => assert_fixture::<Locator>(value)?,
12553 "resource" => assert_fixture::<Resource>(value)?,
12554 "field_promotion_configuration" => assert_fixture::<FieldPromotionConfiguration>(value)?,
12555 "overload_configuration" => assert_fixture::<OverloadConfiguration>(value)?,
12556 "index_policies" => assert_fixture::<IndexPolicies>(value)?,
12557 "maintenance_budgets" => assert_fixture::<MaintenanceBudgets>(value)?,
12558 "resource_durability_class" => assert_fixture::<ResourceDurabilityClass>(value)?,
12559 "resource_storage_class" => assert_fixture::<ResourceStorageClass>(value)?,
12560 "vector_quality_objective" => assert_fixture::<VectorQualityObjective>(value)?,
12561 "vector_indexing_objective" => assert_fixture::<VectorIndexingObjective>(value)?,
12562 "vector_residency_intent" => assert_fixture::<VectorResidencyIntent>(value)?,
12563 "vector_calibration_binding" => assert_fixture::<VectorCalibrationBinding>(value)?,
12564 "vector_resource_policy" => assert_fixture::<VectorResourcePolicy>(value)?,
12565 "workload_class" => assert_fixture::<WorkloadClass>(value)?,
12566 "index_resource_spec" => assert_fixture::<IndexResourceSpec>(value)?,
12567 "index_summary" => assert_fixture::<IndexSummary>(value)?,
12568 "mapping_mode" => assert_fixture::<MappingMode>(value)?,
12569 "dynamic_mapping_policy" => assert_fixture::<DynamicMappingPolicy>(value)?,
12570 "mapping_analyzer" => assert_fixture::<MappingAnalyzer>(value)?,
12571 "keyword_normalizer" => assert_fixture::<KeywordNormalizer>(value)?,
12572 "vector_metric" => assert_fixture::<VectorMetric>(value)?,
12573 "mapping_scalar" => assert_fixture::<MappingScalar>(value)?,
12574 "sparse_vector_weight_type" => assert_fixture::<SparseVectorWeightType>(value)?,
12575 "mapping_field_type" => assert_fixture::<MappingFieldType>(value)?,
12576 "mapping_field" => assert_fixture::<MappingField>(value)?,
12577 "multi_field_projection" => assert_fixture::<MultiFieldProjection>(value)?,
12578 "analyzer_identity" => assert_fixture::<AnalyzerIdentity>(value)?,
12579 "keyword_limit" => assert_fixture::<KeywordLimit>(value)?,
12580 "mapping" => assert_fixture::<Mapping>(value)?,
12581 "index_detail" => assert_fixture::<IndexDetail>(value)?,
12582 "source_provider" => assert_fixture::<SourceProvider>(value)?,
12583 "source_decoder" => assert_fixture::<SourceDecoder>(value)?,
12584 "source_replay_guarantees" => assert_fixture::<SourceReplayGuarantees>(value)?,
12585 "source_partition_configuration" => assert_fixture::<SourcePartitionConfiguration>(value)?,
12586 "replayable_source_configuration" => assert_fixture::<ReplayableSourceConfiguration>(value)?,
12587 "source_partition_status" => assert_fixture::<SourcePartitionStatus>(value)?,
12588 "replayable_source_status" => assert_fixture::<ReplayableSourceStatus>(value)?,
12589 "source_control_transition" => assert_fixture::<SourceControlTransition>(value)?,
12590 "history_ledger_precondition" => assert_fixture::<HistoryLedgerPrecondition>(value)?,
12591 "history_retention_policy" => assert_fixture::<HistoryRetentionPolicy>(value)?,
12592 "history_selector" => assert_fixture::<HistorySelector>(value)?,
12593 "history_hold" => assert_fixture::<HistoryHold>(value)?,
12594 "history_status" => assert_fixture::<HistoryStatus>(value)?,
12595 "history_resolution" => assert_fixture::<HistoryResolution>(value)?,
12596 "index_reference" => assert_fixture::<IndexReference>(value)?,
12597 "alias_target" => assert_fixture::<AliasTarget>(value)?,
12598 "alias_summary" => assert_fixture::<AliasSummary>(value)?,
12599 "alias_detail" => assert_fixture::<AliasDetail>(value)?,
12600 "data_stream_summary" => assert_fixture::<DataStreamSummary>(value)?,
12601 "component_template_binding" => assert_fixture::<ComponentTemplateBinding>(value)?,
12602 "index_template_binding" => assert_fixture::<IndexTemplateBinding>(value)?,
12603 "lifecycle_policy_binding" => assert_fixture::<LifecyclePolicyBinding>(value)?,
12604 "data_stream_detail" => assert_fixture::<DataStreamDetail>(value)?,
12605 "component_template_summary" => assert_fixture::<ComponentTemplateSummary>(value)?,
12606 "component_template_detail" => assert_fixture::<ComponentTemplateDetail>(value)?,
12607 "index_template_summary" => assert_fixture::<IndexTemplateSummary>(value)?,
12608 "index_template_detail" => assert_fixture::<IndexTemplateDetail>(value)?,
12609 "ingest_pipeline_summary" => assert_fixture::<IngestPipelineSummary>(value)?,
12610 "ingest_pipeline_detail" => assert_fixture::<IngestPipelineDetail>(value)?,
12611 "ingest_pipeline_selection" => assert_fixture::<IngestPipelineSelection>(value)?,
12612 "lifecycle_policy_summary" => assert_fixture::<LifecyclePolicySummary>(value)?,
12613 "rollover_thresholds" => assert_fixture::<RolloverThresholds>(value)?,
12614 "retention_policy" => assert_fixture::<RetentionPolicy>(value)?,
12615 "lifecycle_policy_detail" => assert_fixture::<LifecyclePolicyDetail>(value)?,
12616 "text_query_operator" => assert_fixture::<TextQueryOperator>(value)?,
12617 "text_query_analyzer" => assert_fixture::<TextQueryAnalyzer>(value)?,
12618 "zero_terms_query" => assert_fixture::<ZeroTermsQuery>(value)?,
12619 "text_query_options" => assert_fixture::<TextQueryOptions>(value)?,
12620 "multi_match_mode" => assert_fixture::<MultiMatchMode>(value)?,
12621 "multi_match_field" => assert_fixture::<MultiMatchField>(value)?,
12622 "multi_match_options" => assert_fixture::<MultiMatchOptions>(value)?,
12623 "sort_order" => assert_fixture::<SortOrder>(value)?,
12624 "sort_mode" => assert_fixture::<SortMode>(value)?,
12625 "missing_order" => assert_fixture::<MissingOrder>(value)?,
12626 "nested_score_mode" => assert_fixture::<NestedScoreMode>(value)?,
12627 "nested_inner_hits" => assert_fixture::<NestedInnerHits>(value)?,
12628 "sort_spec" => assert_fixture::<SortSpec>(value)?,
12629 "query" => assert_fixture::<Query>(value)?,
12630 "dense_retrieval_mode" => assert_fixture::<DenseRetrievalMode>(value)?,
12631 "vector_achieved_mode" => assert_fixture::<VectorAchievedMode>(value)?,
12632 "vector_branch_diagnostics" => assert_fixture::<VectorBranchDiagnostics>(value)?,
12633 "dense_vector_element_type" => assert_fixture::<DenseVectorElementType>(value)?,
12634 "dense_vector_byte_order" => assert_fixture::<DenseVectorByteOrder>(value)?,
12635 "vector_value" => assert_fixture::<VectorValue>(value)?,
12636 "sparse_vector_entry" => assert_fixture::<SparseVectorEntry>(value)?,
12637 "sparse_vector_value" => assert_fixture::<SparseVectorValue>(value)?,
12638 "vector_set_value" => assert_fixture::<VectorSetValue>(value)?,
12639 "vector_evaluation_snapshot" => assert_fixture::<VectorEvaluationSnapshot>(value)?,
12640 "vector_evaluation_query_set" => assert_fixture::<VectorEvaluationQuerySet>(value)?,
12641 "vector_evaluation_budget" => assert_fixture::<VectorEvaluationBudget>(value)?,
12642 "vector_candidate_policy" => assert_fixture::<VectorCandidatePolicy>(value)?,
12643 "vector_calibration_objective" => assert_fixture::<VectorCalibrationObjective>(value)?,
12644 "vector_strategy_profile" => assert_fixture::<VectorStrategyProfile>(value)?,
12645 "vector_evaluation_work" => assert_fixture::<VectorEvaluationWork>(value)?,
12646 "vector_evaluation_error_code" => assert_fixture::<VectorEvaluationErrorCode>(value)?,
12647 "vector_evaluation_error" => assert_fixture::<VectorEvaluationError>(value)?,
12648 "vector_recall_result" => assert_fixture::<VectorRecallResult>(value)?,
12649 "vector_calibration_candidate" => assert_fixture::<VectorCalibrationCandidate>(value)?,
12650 "vector_calibration_result" => assert_fixture::<VectorCalibrationResult>(value)?,
12651 "vector_diagnostic_result" => assert_fixture::<VectorDiagnosticResult>(value)?,
12652 "vector_warm_component" => assert_fixture::<VectorWarmComponent>(value)?,
12653 "vector_warm_state" => assert_fixture::<VectorWarmState>(value)?,
12654 "vector_warm_achievement" => assert_fixture::<VectorWarmAchievement>(value)?,
12655 "vector_warm_result" => assert_fixture::<VectorWarmResult>(value)?,
12656 "dense_retrieval_threshold" => assert_fixture::<DenseRetrievalThreshold>(value)?,
12657 "retrieval_branch" => assert_fixture::<RetrievalBranch>(value)?,
12658 "weighted_rrf_fusion" => assert_fixture::<WeightedRrfFusion>(value)?,
12659 "retrieval_plan" => assert_fixture::<RetrievalPlan>(value)?,
12660 "histogram_bounds" => assert_fixture::<HistogramBounds>(value)?,
12661 "date_histogram_bounds" => assert_fixture::<DateHistogramBounds>(value)?,
12662 "approximation_algorithm" => assert_fixture::<ApproximationAlgorithm>(value)?,
12663 "approximation" => assert_fixture::<Approximation>(value)?,
12664 "percentile_value" => assert_fixture::<PercentileValue>(value)?,
12665 "approximate_percentile_value" => assert_fixture::<ApproximatePercentileValue>(value)?,
12666 "aggregation" => assert_fixture::<Aggregation>(value)?,
12667 "nested_search_hit" => assert_fixture::<NestedSearchHit>(value)?,
12668 "named_nested_inner_hits_result" => assert_fixture::<NamedNestedInnerHitsResult>(value)?,
12669 "fragment_boundary" => assert_fixture::<FragmentBoundary>(value)?,
12670 "fragment_offset_encoding" => assert_fixture::<FragmentOffsetEncoding>(value)?,
12671 "fragment_ranker" => assert_fixture::<FragmentRanker>(value)?,
12672 "fragment_request" => assert_fixture::<FragmentRequest>(value)?,
12673 "search_fragment" => assert_fixture::<SearchFragment>(value)?,
12674 "numeric_feature_transform" => assert_fixture::<NumericFeatureTransform>(value)?,
12675 "numeric_result_feature" => assert_fixture::<NumericResultFeature>(value)?,
12676 "result_feature_request" => assert_fixture::<ResultFeatureRequest>(value)?,
12677 "result_diversification" => assert_fixture::<ResultDiversification>(value)?,
12678 "branch_score_kind" => assert_fixture::<BranchScoreKind>(value)?,
12679 "result_feature" => assert_fixture::<ResultFeature>(value)?,
12680 "search_hit" => assert_fixture::<SearchHit>(value)?,
12681 "aggregation_bucket" => assert_fixture::<AggregationBucket>(value)?,
12682 "aggregation_result" => assert_fixture::<AggregationResult>(value)?,
12683 "shard_counts" => assert_fixture::<ShardCounts>(value)?,
12684 "total_hits_relation" => assert_fixture::<TotalHitsRelation>(value)?,
12685 "search_total" => assert_fixture::<SearchTotal>(value)?,
12686 "artifact" => assert_fixture::<Artifact>(value)?,
12687 "operation" => assert_fixture::<Operation>(value)?,
12688 "submission_state" => assert_fixture::<SubmissionState>(value)?,
12689 "expected_binding" => assert_fixture::<ExpectedBinding>(value)?,
12690 "administration_alias_action" => assert_fixture::<AdministrationAliasAction>(value)?,
12691 "administration_mutation" => assert_fixture::<AdministrationMutation>(value)?,
12692 "administration_outcome" => assert_fixture::<AdministrationOutcome>(value)?,
12693 "index_change_apply_receipt" => assert_fixture::<IndexChangeApplyReceipt>(value)?,
12694 "backup_encryption_policy" => assert_fixture::<BackupEncryptionPolicy>(value)?,
12695 "backup_create_outcome" => assert_fixture::<BackupCreateOutcome>(value)?,
12696 "bulk_document_item" => assert_fixture::<BulkDocumentItem>(value)?,
12697 "bulk_document_item_outcome" => assert_fixture::<BulkDocumentItemOutcome>(value)?,
12698 "bulk_document_outcome" => assert_fixture::<BulkDocumentOutcome>(value)?,
12699 "retained_append_item" => assert_fixture::<RetainedAppendItem>(value)?,
12700 "retained_append_state" => assert_fixture::<RetainedAppendState>(value)?,
12701 "retained_append_retry_safety" => assert_fixture::<RetainedAppendRetrySafety>(value)?,
12702 "retained_append_item_outcome" => assert_fixture::<RetainedAppendItemOutcome>(value)?,
12703 "retained_append_bulk_outcome" => assert_fixture::<RetainedAppendBulkOutcome>(value)?,
12704 "retained_append_observation_state" => assert_fixture::<RetainedAppendObservationState>(value)?,
12705 "retained_append_observation_outcome" => assert_fixture::<RetainedAppendObservationOutcome>(value)?,
12706 "binary_value" => assert_fixture::<BinaryValue>(value)?,
12707 "state_hash_field" => assert_fixture::<StateHashField>(value)?,
12708 "state_set_entry" => assert_fixture::<StateSetEntry>(value)?,
12709 "state_set_condition" => assert_fixture::<StateSetCondition>(value)?,
12710 "state_operation" => assert_fixture::<StateOperation>(value)?,
12711 "state_optional_value" => assert_fixture::<StateOptionalValue>(value)?,
12712 "state_command_result" => assert_fixture::<StateCommandResult>(value)?,
12713 "state_write_resolution" => assert_fixture::<StateWriteResolution>(value)?,
12714 "service_credential_reservation" => assert_fixture::<ServiceCredentialReservation>(value)?,
12715 "subscription_metadata_field" => assert_fixture::<SubscriptionMetadataField>(value)?,
12716 "subscription_field" => assert_fixture::<SubscriptionField>(value)?,
12717 "subscription_filter" => assert_fixture::<SubscriptionFilter>(value)?,
12718 "subscription_cursor_entry" => assert_fixture::<SubscriptionCursorEntry>(value)?,
12719 "subscription_route" => assert_fixture::<SubscriptionRoute>(value)?,
12720 "subscription_start_position" => assert_fixture::<SubscriptionStartPosition>(value)?,
12721 "subscription_start" => assert_fixture::<SubscriptionStart>(value)?,
12722 "subscription_accepted" => assert_fixture::<SubscriptionAccepted>(value)?,
12723 "subscription_writer_fence" => assert_fixture::<SubscriptionWriterFence>(value)?,
12724 "subscription_event" => assert_fixture::<SubscriptionEvent>(value)?,
12725 "subscription_heartbeat" => assert_fixture::<SubscriptionHeartbeat>(value)?,
12726 "subscription_gap" => assert_fixture::<SubscriptionGap>(value)?,
12727 "subscription_terminal" => assert_fixture::<SubscriptionTerminal>(value)?,
12728 "subscription_frame" => assert_fixture::<SubscriptionFrame>(value)?,
12729 "stream_binding" => assert_fixture::<StreamBinding>(value)?,
12730 "capability_grant" => assert_fixture::<CapabilityGrant>(value)?,
12731 "protocol_limit" => assert_fixture::<ProtocolLimit>(value)?,
12732 "document_mutation_condition" => assert_fixture::<DocumentMutationCondition>(value)?,
12733 "audit_event" => assert_fixture::<AuditEvent>(value)?,
12734 "audit_gap" => assert_fixture::<AuditGap>(value)?,
12735 "service_credential_grant" => assert_fixture::<ServiceCredentialGrant>(value)?,
12736 "service_credential_summary" => assert_fixture::<ServiceCredentialSummary>(value)?,
12737 "security_role" => assert_fixture::<SecurityRole>(value)?,
12738 "role_append_scope_change" => assert_fixture::<RoleAppendScopeChange>(value)?,
12739 "role_append_access_preparation" => assert_fixture::<RoleAppendAccessPreparation>(value)?,
12740 "security_action_outcome" => assert_fixture::<SecurityActionOutcome>(value)?,
12741 "maintenance_work_state" => assert_fixture::<MaintenanceWorkState>(value)?,
12742 "maintenance_attempt_state" => assert_fixture::<MaintenanceAttemptState>(value)?,
12743 "maintenance_failure_class" => assert_fixture::<MaintenanceFailureClass>(value)?,
12744 "maintenance_failure_class_count" => assert_fixture::<MaintenanceFailureClassCount>(value)?,
12745 "maintenance_attempt_observation" => assert_fixture::<MaintenanceAttemptObservation>(value)?,
12746 "maintenance_task_scope" => assert_fixture::<MaintenanceTaskScope>(value)?,
12747 "maintenance_task_status" => assert_fixture::<MaintenanceTaskStatus>(value)?,
12748 "maintenance_status_aggregate" => assert_fixture::<MaintenanceStatusAggregate>(value)?,
12749 "runtime_status_detail" => assert_fixture::<RuntimeStatusDetail>(value)?,
12750 "result_cache_status" => assert_fixture::<ResultCacheStatus>(value)?,
12751 "field_promotion_status" => assert_fixture::<FieldPromotionStatus>(value)?,
12752 "overload_shard_status" => assert_fixture::<OverloadShardStatus>(value)?,
12753 "external_key_binding" => assert_fixture::<ExternalKeyBinding>(value)?,
12754 "rollup_measure" => assert_fixture::<RollupMeasure>(value)?,
12755 "aggregate_then_delete_policy" => assert_fixture::<AggregateThenDeletePolicy>(value)?,
12756 "lifecycle_binding_status" => assert_fixture::<LifecycleBindingStatus>(value)?,
12757 "lifecycle_rollup_status" => assert_fixture::<LifecycleRollupStatus>(value)?,
12758 "lifecycle_status" => assert_fixture::<LifecycleStatus>(value)?,
12759 "quota_limit" => assert_fixture::<QuotaLimit>(value)?,
12760 "quota_consumption" => assert_fixture::<QuotaConsumption>(value)?,
12761 "quota_update" => assert_fixture::<QuotaUpdate>(value)?,
12762 "core_binding" => assert_fixture::<CoreBinding>(value)?,
12763 "readiness_observation" => assert_fixture::<ReadinessObservation>(value)?,
12764 "usage_dimension" => assert_fixture::<UsageDimension>(value)?,
12765 "physical_usage_value" => assert_fixture::<PhysicalUsageValue>(value)?,
12766 "core_usage_units" => assert_fixture::<CoreUsageUnits>(value)?,
12767 "core_usage_correction" => assert_fixture::<CoreUsageCorrection>(value)?,
12768 "error_detail" => assert_fixture::<ErrorDetail>(value)?,
12769 "connection_profile" => assert_fixture::<ConnectionProfile>(value)?,
12770 _ => return Err("fixture names an unknown generated type".into()),
12771 }
12772 }
12773 Ok(())
12774 }
12775 #[test]
12776 fn every_aggregation_variant_has_a_canonical_fixture() -> Result<(), Box<dyn std::error::Error>> {
12777 let document: serde_json::Value =
12778 serde_json::from_str(include_str!("../../../tests/p10/lodestone-api-closed-schema.json"))?;
12779 let fixtures = document["aggregation_variants"]
12780 .as_object()
12781 .ok_or("aggregation fixtures are not an object")?;
12782 assert_eq!(fixtures.len(), 16);
12783 for value in fixtures.values() {
12784 assert_fixture::<Aggregation>(value)?;
12785 }
12786 Ok(())
12787 }
12788 #[test]
12789 fn exact_scalar_canonicality_is_closed() {
12790 assert_eq!(
12791 U64 {
12792 value: u64::MAX.to_string()
12793 }
12794 .validate(),
12795 Ok(())
12796 );
12797 assert_eq!(
12798 I64 {
12799 value: i64::MIN.to_string()
12800 }
12801 .validate(),
12802 Ok(())
12803 );
12804 assert_eq!(U64 { value: "01".to_owned() }.validate(), Err(ScalarError::InvalidU64));
12805 assert_eq!(
12806 ExactDecimal {
12807 coefficient: "12345".to_owned(),
12808 scale: 2
12809 }
12810 .validate(),
12811 Ok(())
12812 );
12813 assert_eq!(
12814 ExactDecimal {
12815 coefficient: "123450".to_owned(),
12816 scale: 3
12817 }
12818 .validate(),
12819 Err(ScalarError::InvalidDecimal)
12820 );
12821 assert_eq!(
12822 ExactDecimal {
12823 coefficient: "1".to_owned(),
12824 scale: 1_025
12825 }
12826 .validate(),
12827 Err(ScalarError::InvalidDecimal)
12828 );
12829 }
12830 #[test]
12831 fn scalar_decoders_refuse_numbers_and_noncanonical_strings() {
12832 assert!(serde_json::from_str::<U64>("9007199254740993").is_err());
12833 assert!(serde_json::from_str::<U64>(r#""01""#).is_err());
12834 assert!(serde_json::from_str::<Identity>(r#""0123456789ABCDEF0123456789ABCDEF""#).is_err());
12835 assert!(serde_json::from_str::<Digest>(r#""0123456789abcdef0123456789abcdef""#).is_err());
12836 assert!(serde_json::from_str::<ExactDecimal>(r#"{"coefficient":"123450","scale":3}"#).is_err());
12837 assert!(serde_json::from_str::<ApproximateNumber>(r#""1.0""#).is_err());
12838 }
12839 #[test]
12840 fn semantic_json_rejects_duplicate_fields() {
12841 let value = JsonValue::Object(vec![
12842 JsonField {
12843 name: "x".to_owned(),
12844 value: JsonValue::Null,
12845 },
12846 JsonField {
12847 name: "x".to_owned(),
12848 value: JsonValue::Bool(true),
12849 },
12850 ]);
12851 assert_eq!(validate_semantic_json(&value), Err(JsonError::DuplicateObjectField));
12852 }
12853 #[test]
12854 fn strict_generated_shapes_refuse_malformed_duplicate_unknown_field_and_tag() {
12855 assert!(serde_json::from_str::<DiscoverRequest>(r#"{"unexpected":true}"#).is_err());
12856 assert!(serde_json::from_str::<Cursor>(r#"{"value":"a","value":"b"}"#).is_err());
12857 assert!(serde_json::from_str::<Query>(r#"{"kind":"future_query"}"#).is_err());
12858 assert!(serde_json::from_str::<Cursor>(r#"{"value":1}"#).is_err());
12859 }
12860 #[test]
12861 fn registries_match_the_idl() {
12862 assert_eq!(LODESTONE_API_COMMAND_CONTRACTS.len(), 99);
12863 assert_eq!(LODESTONE_API_COMMAND_SEMANTICS.len(), 99);
12864 assert_eq!(LODESTONE_API_COMMAND_OUTCOMES.len(), 99);
12865 assert_eq!(LODESTONE_API_ERROR_OUTCOMES.len(), 21);
12866 assert_eq!(LODESTONE_API_TYPE_CONTRACTS.len(), 219);
12867 assert_eq!(LODESTONE_API_STREAM_CONTRACTS.len(), 1);
12868 assert_eq!(LODESTONE_API_LIMITS.len(), 70);
12869 }
12870 #[test]
12871 fn mutation_outcome_metadata_matches_submission_boundaries() {
12872 for (command, outcome) in LODESTONE_API_COMMAND_CONTRACTS
12873 .iter()
12874 .zip(LODESTONE_API_COMMAND_OUTCOMES)
12875 {
12876 assert_eq!(command.command, outcome.command);
12877 let submits = !matches!(command.mutation, "read_only" | "read_only_prepare" | "catalog_prepare");
12878 assert_eq!(outcome.possible_submission_states.contains(&"submitted"), submits);
12879 assert_eq!(outcome.possible_submission_states.contains(&"indeterminate"), submits);
12880 assert_eq!(
12881 outcome.cancellation == "per_call_until_submission_then_resolve",
12882 submits
12883 );
12884 }
12885 for command in [
12886 Command::ReserveServiceCredential,
12887 Command::ReserveServiceCredentialRotation,
12888 ] {
12889 let outcome = LODESTONE_API_COMMAND_OUTCOMES
12890 .iter()
12891 .find(|outcome| outcome.command == command);
12892 assert!(
12893 matches!(outcome, Some(value) if value.identity_requirement == "caller_action_id" && value.resolver_command == Some(Command::ResolveServiceCredentialReservation))
12894 );
12895 }
12896 }
12897}