Skip to main content

lodestone_wire/
lib.rs

1//! @generated by scripts/generate-lodestone-api.py; do not edit by hand.
2//! Active Lodestone API public DTOs; predecessor public reachability is absent.
3
4use 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 = "4dc12f675d78837cbbc8b17f3abe7d8819fc8bbc9af3a137aefa1d9e0819997e";
10pub const LODESTONE_API_FORMAT_VERSION: u16 = 4;
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";
14pub const LODESTONE_API_MAX_OPERATION_WAIT_ATTEMPTS: u32 = 100;
15pub const LODESTONE_API_MAX_OPERATION_WAIT_INTERVAL_MILLIS: u64 = 60000;
16
17#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
18#[serde(transparent)]
19pub struct I64 {
20    pub value: String,
21}
22#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
23#[serde(transparent)]
24pub struct U64 {
25    pub value: String,
26}
27#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
28#[serde(transparent)]
29pub struct Identity {
30    pub value: String,
31}
32#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
33#[serde(transparent)]
34pub struct Digest {
35    pub value: String,
36}
37#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
38pub struct ExactDecimal {
39    pub coefficient: String,
40    pub scale: u32,
41}
42#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
43#[serde(transparent)]
44pub struct ApproximateNumber {
45    pub canonical_value: String,
46}
47#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
48#[serde(deny_unknown_fields)]
49pub struct RawJson {
50    pub bytes_base64: String,
51}
52#[derive(Clone, Copy, Debug, Eq, PartialEq)]
53pub enum ScalarError {
54    InvalidI64,
55    InvalidU64,
56    InvalidIdentity,
57    InvalidDigest,
58    InvalidDecimal,
59    InvalidApproximateNumber,
60}
61impl std::fmt::Display for ScalarError {
62    fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
63        write!(formatter, "invalid Lodestone API scalar: {self:?}")
64    }
65}
66impl I64 {
67    pub fn validate(&self) -> Result<(), ScalarError> {
68        self.value
69            .parse::<i64>()
70            .ok()
71            .filter(|parsed| parsed.to_string() == self.value)
72            .map(|_| ())
73            .ok_or(ScalarError::InvalidI64)
74    }
75}
76impl U64 {
77    pub fn validate(&self) -> Result<(), ScalarError> {
78        self.value
79            .parse::<u64>()
80            .ok()
81            .filter(|parsed| parsed.to_string() == self.value)
82            .map(|_| ())
83            .ok_or(ScalarError::InvalidU64)
84    }
85}
86impl Identity {
87    pub fn validate(&self) -> Result<(), ScalarError> {
88        (self.value.len() == 32
89            && self
90                .value
91                .bytes()
92                .all(|byte| byte.is_ascii_digit() || (b'a'..=b'f').contains(&byte)))
93        .then_some(())
94        .ok_or(ScalarError::InvalidIdentity)
95    }
96}
97impl Digest {
98    pub fn validate(&self) -> Result<(), ScalarError> {
99        (self.value.len() == 64
100            && self
101                .value
102                .bytes()
103                .all(|byte| byte.is_ascii_digit() || (b'a'..=b'f').contains(&byte)))
104        .then_some(())
105        .ok_or(ScalarError::InvalidDigest)
106    }
107}
108impl ExactDecimal {
109    pub fn validate(&self) -> Result<(), ScalarError> {
110        let unsigned = self.coefficient.strip_prefix('-').unwrap_or(&self.coefficient);
111        let canonical = self.coefficient == "0"
112            || (!unsigned.is_empty()
113                && !unsigned.starts_with('0')
114                && unsigned.bytes().all(|byte| byte.is_ascii_digit()));
115        (canonical
116            && self.coefficient != "-0"
117            && self.scale <= 1024
118            && (self.scale == 0 || !self.coefficient.ends_with('0')))
119        .then_some(())
120        .ok_or(ScalarError::InvalidDecimal)
121    }
122}
123impl ApproximateNumber {
124    pub fn validate(&self) -> Result<(), ScalarError> {
125        self.canonical_value
126            .parse::<f64>()
127            .ok()
128            .filter(|parsed| {
129                parsed.is_finite() && self.canonical_value != "-0" && parsed.to_string() == self.canonical_value
130            })
131            .map(|_| ())
132            .ok_or(ScalarError::InvalidApproximateNumber)
133    }
134}
135macro_rules! deserialize_validated_string_scalar {
136    ($type:ty) => {
137        impl<'de> Deserialize<'de> for $type {
138            fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
139            where
140                D: serde::Deserializer<'de>,
141            {
142                let value = String::deserialize(deserializer)?;
143                let scalar = Self { value };
144                scalar.validate().map_err(serde::de::Error::custom)?;
145                Ok(scalar)
146            }
147        }
148    };
149}
150deserialize_validated_string_scalar!(I64);
151deserialize_validated_string_scalar!(U64);
152deserialize_validated_string_scalar!(Identity);
153deserialize_validated_string_scalar!(Digest);
154impl<'de> Deserialize<'de> for ExactDecimal {
155    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
156    where
157        D: serde::Deserializer<'de>,
158    {
159        #[derive(Deserialize)]
160        #[serde(deny_unknown_fields)]
161        struct Wire {
162            coefficient: String,
163            scale: u32,
164        }
165        let wire = Wire::deserialize(deserializer)?;
166        let scalar = Self {
167            coefficient: wire.coefficient,
168            scale: wire.scale,
169        };
170        scalar.validate().map_err(serde::de::Error::custom)?;
171        Ok(scalar)
172    }
173}
174impl<'de> Deserialize<'de> for ApproximateNumber {
175    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
176    where
177        D: serde::Deserializer<'de>,
178    {
179        let canonical_value = String::deserialize(deserializer)?;
180        let scalar = Self { canonical_value };
181        scalar.validate().map_err(serde::de::Error::custom)?;
182        Ok(scalar)
183    }
184}
185#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
186#[serde(tag = "kind", content = "value", rename_all = "snake_case")]
187pub enum JsonValue {
188    Null,
189    Bool(bool),
190    String(String),
191    I64(I64),
192    U64(U64),
193    ExactDecimal(ExactDecimal),
194    Approximate(ApproximateNumber),
195    Array(Vec<JsonValue>),
196    Object(Vec<JsonField>),
197}
198#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
199#[serde(deny_unknown_fields)]
200pub struct JsonField {
201    pub name: String,
202    pub value: JsonValue,
203}
204#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
205#[serde(rename_all = "snake_case")]
206pub enum Action {
207    IdentityDiscovery,
208    DataRead,
209    DataWrite,
210    Append,
211    ResolveAppend,
212    IndexAdmin,
213    CatalogRead,
214    TaskRead,
215    SubscriptionRead,
216    DiagnosticsRead,
217    DiagnosticsCreate,
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    CollectionExport,
231    CollectionRestore,
232    IndexExport,
233    IndexImport,
234}
235
236#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
237#[serde(rename_all = "snake_case")]
238pub enum ErrorCode {
239    Aborted,
240    DeadlineExceeded,
241    InvalidRequest,
242    UnsupportedVersion,
243    Unauthenticated,
244    PermissionDenied,
245    NotFound,
246    Conflict,
247    StaleCursor,
248    RestartBudgetExhausted,
249    LimitExceeded,
250    CapabilityUnavailable,
251    NotSubmitted,
252    SubmittedIndeterminate,
253    ExpiredUnknown,
254    SecretNotEscrowed,
255    RetentionGap,
256    ArtifactRangeInvalid,
257    ChecksumMismatch,
258    TemporarilyUnavailable,
259    Internal,
260}
261
262#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
263#[serde(rename_all = "snake_case")]
264pub enum Command {
265    Discover,
266    ListIndexes,
267    GetIndex,
268    ValidateIndexChange,
269    ApplyIndexChange,
270    ApplyAdministrationMutation,
271    ListAliases,
272    GetAlias,
273    ListDataStreams,
274    GetDataStream,
275    ListComponentTemplates,
276    GetComponentTemplate,
277    ListIndexTemplates,
278    GetIndexTemplate,
279    ListIngestPipelines,
280    GetIngestPipeline,
281    SimulateIngestPipeline,
282    ReprocessByQuery,
283    ListLifecyclePolicies,
284    GetLifecyclePolicy,
285    PrepareCreateIndex,
286    PrepareDeleteIndex,
287    SubmitCatalogAction,
288    ResolveCatalogAction,
289    PrepareReplayableSourceIndex,
290    SubmitReplayableSourceIndex,
291    GetReplayableSource,
292    ControlReplayableSource,
293    CloneIndex,
294    ConfigureHistory,
295    GetHistory,
296    ResolveHistory,
297    PlaceHistoryHold,
298    ReleaseHistoryHold,
299    PrepareDocumentMutation,
300    SubmitDocumentMutation,
301    PrepareDocumentBulk,
302    SubmitDocumentBulk,
303    ResolveDocumentBulk,
304    PrepareAppendBulk,
305    SubmitAppendBulk,
306    ResolveAppendBulk,
307    ObserveAppendCommitted,
308    ResolveDocumentMutation,
309    GetDocument,
310    Search,
311    TraverseRelationships,
312    QueryProfiles,
313    EvaluateTemporalEvidence,
314    CreateContinuousTemporalEvaluation,
315    GetContinuousTemporalEvaluation,
316    PauseContinuousTemporalEvaluation,
317    ResumeContinuousTemporalEvaluation,
318    ReplaceContinuousTemporalEvaluation,
319    RetireContinuousTemporalEvaluation,
320    ReadContinuousTemporalEvidence,
321    ValidateSearch,
322    OpenPit,
323    RenewPit,
324    ClosePit,
325    ListOperations,
326    GetOperation,
327    WaitOperation,
328    CancelOperation,
329    ListAuditEvents,
330    ExportAuditEvents,
331    ReserveServiceCredential,
332    ReserveServiceCredentialRotation,
333    ActivateServiceCredential,
334    ResolveServiceCredentialReservation,
335    PrepareRevokeServiceCredential,
336    RevokeServiceCredential,
337    ResolveSecurityAction,
338    GetSecurityRole,
339    PrepareRoleAppendAccessChange,
340    SubmitRoleAppendAccessChange,
341    ListServiceCredentials,
342    GetRuntimeStatus,
343    GetResultCacheStatus,
344    GetFieldPromotionStatus,
345    GetOverloadStatus,
346    ConfigureExternalKey,
347    RotateExternalKeyBinding,
348    ConfigureAggregateThenDelete,
349    GetLifecycleStatus,
350    GetQuota,
351    UpdateQuota,
352    GetBinding,
353    GetAdmissionStatus,
354    SetAdmission,
355    GetQuiesceStatus,
356    GetDecommissionReadiness,
357    GetUpgradeReadiness,
358    GetMaintenanceStatus,
359    WarmVectorIndex,
360    EvaluateVectorRecall,
361    CalibrateVectorStrategy,
362    GetVectorDiagnostic,
363    CreateDiagnostic,
364    GetDiagnostic,
365    PrepareCollectionExport,
366    StartCollectionExport,
367    ResolveCollectionExport,
368    VerifyCollectionExport,
369    PrepareCollectionRestore,
370    StartCollectionRestore,
371    ResolveCollectionRestore,
372    PrepareIndexExport,
373    StartIndexExport,
374    ResolveIndexExport,
375    VerifyIndexExport,
376    PrepareIndexImport,
377    StartIndexImport,
378    ResolveIndexImport,
379    ReadArtifactChunk,
380    ExportUsage,
381    ExecuteStateRead,
382    PrepareStateWrite,
383    SubmitStateWrite,
384    ResolveStateWrite,
385}
386
387pub const LODESTONE_API_ERROR_CODES: &[ErrorCode] = &[
388    ErrorCode::Aborted,
389    ErrorCode::DeadlineExceeded,
390    ErrorCode::InvalidRequest,
391    ErrorCode::UnsupportedVersion,
392    ErrorCode::Unauthenticated,
393    ErrorCode::PermissionDenied,
394    ErrorCode::NotFound,
395    ErrorCode::Conflict,
396    ErrorCode::StaleCursor,
397    ErrorCode::RestartBudgetExhausted,
398    ErrorCode::LimitExceeded,
399    ErrorCode::CapabilityUnavailable,
400    ErrorCode::NotSubmitted,
401    ErrorCode::SubmittedIndeterminate,
402    ErrorCode::ExpiredUnknown,
403    ErrorCode::SecretNotEscrowed,
404    ErrorCode::RetentionGap,
405    ErrorCode::ArtifactRangeInvalid,
406    ErrorCode::ChecksumMismatch,
407    ErrorCode::TemporarilyUnavailable,
408    ErrorCode::Internal,
409];
410
411#[derive(Clone, Copy, Debug, Eq, PartialEq)]
412pub struct ActionAuthorizationContract {
413    pub action: Action,
414    pub any_of_permission_ids: &'static [&'static str],
415}
416pub const LODESTONE_API_ACTION_AUTHORIZATION: &[ActionAuthorizationContract] = &[
417    ActionAuthorizationContract {
418        action: Action::IdentityDiscovery,
419        any_of_permission_ids: &["security_read"],
420    },
421    ActionAuthorizationContract {
422        action: Action::DataRead,
423        any_of_permission_ids: &["data_read"],
424    },
425    ActionAuthorizationContract {
426        action: Action::DataWrite,
427        any_of_permission_ids: &["data_write"],
428    },
429    ActionAuthorizationContract {
430        action: Action::Append,
431        any_of_permission_ids: &["append"],
432    },
433    ActionAuthorizationContract {
434        action: Action::ResolveAppend,
435        any_of_permission_ids: &["resolve_append"],
436    },
437    ActionAuthorizationContract {
438        action: Action::IndexAdmin,
439        any_of_permission_ids: &["index_admin"],
440    },
441    ActionAuthorizationContract {
442        action: Action::CatalogRead,
443        any_of_permission_ids: &["catalog_read"],
444    },
445    ActionAuthorizationContract {
446        action: Action::TaskRead,
447        any_of_permission_ids: &["task_read"],
448    },
449    ActionAuthorizationContract {
450        action: Action::SubscriptionRead,
451        any_of_permission_ids: &["subscription_read"],
452    },
453    ActionAuthorizationContract {
454        action: Action::DiagnosticsRead,
455        any_of_permission_ids: &["diagnostics_read"],
456    },
457    ActionAuthorizationContract {
458        action: Action::DiagnosticsCreate,
459        any_of_permission_ids: &["diagnostics_create"],
460    },
461    ActionAuthorizationContract {
462        action: Action::SecurityRead,
463        any_of_permission_ids: &["security_read"],
464    },
465    ActionAuthorizationContract {
466        action: Action::SecurityAdmin,
467        any_of_permission_ids: &["security_admin"],
468    },
469    ActionAuthorizationContract {
470        action: Action::AuditRead,
471        any_of_permission_ids: &["audit_read"],
472    },
473    ActionAuthorizationContract {
474        action: Action::QuotaRead,
475        any_of_permission_ids: &["quota_read"],
476    },
477    ActionAuthorizationContract {
478        action: Action::QuotaAdmin,
479        any_of_permission_ids: &["quota_admin"],
480    },
481    ActionAuthorizationContract {
482        action: Action::BindingRead,
483        any_of_permission_ids: &["binding_read"],
484    },
485    ActionAuthorizationContract {
486        action: Action::LifecycleAdmin,
487        any_of_permission_ids: &["lifecycle_admin"],
488    },
489    ActionAuthorizationContract {
490        action: Action::AdmissionRead,
491        any_of_permission_ids: &["admission_read"],
492    },
493    ActionAuthorizationContract {
494        action: Action::AdmissionAdmin,
495        any_of_permission_ids: &["admission_admin"],
496    },
497    ActionAuthorizationContract {
498        action: Action::UsageRead,
499        any_of_permission_ids: &["usage_read"],
500    },
501    ActionAuthorizationContract {
502        action: Action::OperationRead,
503        any_of_permission_ids: &[
504            "catalog_read",
505            "task_read",
506            "security_read",
507            "diagnostics_read",
508            "collection_export",
509            "collection_restore",
510            "index_export",
511            "index_import",
512        ],
513    },
514    ActionAuthorizationContract {
515        action: Action::OperationCancel,
516        any_of_permission_ids: &[
517            "index_admin",
518            "task_admin",
519            "security_admin",
520            "diagnostics_create",
521            "collection_export",
522            "index_export",
523        ],
524    },
525    ActionAuthorizationContract {
526        action: Action::CollectionExport,
527        any_of_permission_ids: &["collection_export"],
528    },
529    ActionAuthorizationContract {
530        action: Action::CollectionRestore,
531        any_of_permission_ids: &["collection_restore"],
532    },
533    ActionAuthorizationContract {
534        action: Action::IndexExport,
535        any_of_permission_ids: &["index_export"],
536    },
537    ActionAuthorizationContract {
538        action: Action::IndexImport,
539        any_of_permission_ids: &["index_import"],
540    },
541];
542pub fn action_authorization(action: Action) -> Option<&'static ActionAuthorizationContract> {
543    LODESTONE_API_ACTION_AUTHORIZATION
544        .iter()
545        .find(|contract| contract.action == action)
546}
547
548#[derive(Clone, Copy, Debug, Eq, PartialEq)]
549pub struct RuntimeCapabilityAuthorizationContract {
550    pub capability_id: &'static str,
551    pub required_permission_ids: &'static [&'static str],
552}
553pub const LODESTONE_API_RUNTIME_CAPABILITY_AUTHORIZATION: &[RuntimeCapabilityAuthorizationContract] = &[
554    RuntimeCapabilityAuthorizationContract {
555        capability_id: "search_and_append_log",
556        required_permission_ids: &["data_read", "data_write"],
557    },
558    RuntimeCapabilityAuthorizationContract {
559        capability_id: "native_metric_records_and_time_series",
560        required_permission_ids: &["data_read", "append"],
561    },
562    RuntimeCapabilityAuthorizationContract {
563        capability_id: "historical_temporal_evidence",
564        required_permission_ids: &["data_read"],
565    },
566    RuntimeCapabilityAuthorizationContract {
567        capability_id: "continuous_temporal_evidence",
568        required_permission_ids: &["data_read", "lifecycle_admin"],
569    },
570    RuntimeCapabilityAuthorizationContract {
571        capability_id: "bounded_relationship_traversal",
572        required_permission_ids: &["data_read", "data_write", "append"],
573    },
574    RuntimeCapabilityAuthorizationContract {
575        capability_id: "native_continuous_profiles",
576        required_permission_ids: &["data_read", "append"],
577    },
578    RuntimeCapabilityAuthorizationContract {
579        capability_id: "committed_vector_and_hybrid",
580        required_permission_ids: &["data_read"],
581    },
582    RuntimeCapabilityAuthorizationContract {
583        capability_id: "realtime_or_pit_vector",
584        required_permission_ids: &["data_read"],
585    },
586    RuntimeCapabilityAuthorizationContract {
587        capability_id: "state_standard_express_ephemeral",
588        required_permission_ids: &["data_read", "data_write"],
589    },
590    RuntimeCapabilityAuthorizationContract {
591        capability_id: "state_relaxed",
592        required_permission_ids: &[],
593    },
594    RuntimeCapabilityAuthorizationContract {
595        capability_id: "bounded_resp",
596        required_permission_ids: &["data_read", "data_write"],
597    },
598    RuntimeCapabilityAuthorizationContract {
599        capability_id: "lodestone_rust_client",
600        required_permission_ids: &[],
601    },
602    RuntimeCapabilityAuthorizationContract {
603        capability_id: "replayable_source_indexes",
604        required_permission_ids: &["index_admin"],
605    },
606    RuntimeCapabilityAuthorizationContract {
607        capability_id: "zero_copy_clones",
608        required_permission_ids: &["index_admin"],
609    },
610    RuntimeCapabilityAuthorizationContract {
611        capability_id: "retained_history",
612        required_permission_ids: &["data_read"],
613    },
614    RuntimeCapabilityAuthorizationContract {
615        capability_id: "generation_result_cache",
616        required_permission_ids: &["data_read"],
617    },
618    RuntimeCapabilityAuthorizationContract {
619        capability_id: "adaptive_field_promotion",
620        required_permission_ids: &["index_admin"],
621    },
622    RuntimeCapabilityAuthorizationContract {
623        capability_id: "durable_overload_buffering",
624        required_permission_ids: &["data_read", "data_write"],
625    },
626    RuntimeCapabilityAuthorizationContract {
627        capability_id: "current_table_reader",
628        required_permission_ids: &["data_read"],
629    },
630    RuntimeCapabilityAuthorizationContract {
631        capability_id: "crypto_shred_and_rollup_lifecycle",
632        required_permission_ids: &["lifecycle_admin"],
633    },
634];
635pub fn runtime_capability_authorization(
636    capability_id: &str,
637) -> Option<&'static RuntimeCapabilityAuthorizationContract> {
638    LODESTONE_API_RUNTIME_CAPABILITY_AUTHORIZATION
639        .iter()
640        .find(|contract| contract.capability_id == capability_id)
641}
642
643#[derive(Clone, Copy, Debug, Eq, PartialEq)]
644pub struct ClusterControlActionContract {
645    pub credential_kind: &'static str,
646    pub action: &'static str,
647}
648pub const LODESTONE_API_CLUSTER_CONTROL_FORMAT_VERSION: u16 = 2;
649pub const LODESTONE_API_CLUSTER_CONTROL_TRANSPORT: &str = "isolated_tls_u32_be_length_then_canonical_json";
650pub const LODESTONE_API_CLUSTER_CONTROL_ACTIONS: &[ClusterControlActionContract] = &[
651    ClusterControlActionContract {
652        credential_kind: "collection_provisioner",
653        action: "initialize_collection_authority",
654    },
655    ClusterControlActionContract {
656        credential_kind: "collection_provisioner",
657        action: "activate_collection_authority",
658    },
659    ClusterControlActionContract {
660        credential_kind: "collection_provisioner",
661        action: "resolve_collection_authority",
662    },
663    ClusterControlActionContract {
664        credential_kind: "collection_provisioner",
665        action: "inspect_collection_retirement",
666    },
667    ClusterControlActionContract {
668        credential_kind: "collection_provisioner",
669        action: "retire_collection_authority",
670    },
671    ClusterControlActionContract {
672        credential_kind: "collection_provisioner",
673        action: "reserve_cluster_control_credential_rotation",
674    },
675    ClusterControlActionContract {
676        credential_kind: "collection_provisioner",
677        action: "activate_cluster_control_credential_rotation",
678    },
679    ClusterControlActionContract {
680        credential_kind: "collection_provisioner",
681        action: "revoke_cluster_control_credential",
682    },
683    ClusterControlActionContract {
684        credential_kind: "collection_provisioner",
685        action: "resolve_cluster_control_credential",
686    },
687    ClusterControlActionContract {
688        credential_kind: "capacity_observer",
689        action: "observe_cluster_capacity",
690    },
691    ClusterControlActionContract {
692        credential_kind: "capacity_observer",
693        action: "observe_resource_diagnostics",
694    },
695    ClusterControlActionContract {
696        credential_kind: "recovery_operator",
697        action: "list_cluster_backups",
698    },
699    ClusterControlActionContract {
700        credential_kind: "recovery_operator",
701        action: "get_cluster_backup",
702    },
703    ClusterControlActionContract {
704        credential_kind: "recovery_operator",
705        action: "create_cluster_backup",
706    },
707    ClusterControlActionContract {
708        credential_kind: "recovery_operator",
709        action: "resolve_cluster_backup",
710    },
711    ClusterControlActionContract {
712        credential_kind: "recovery_operator",
713        action: "delete_cluster_backup",
714    },
715    ClusterControlActionContract {
716        credential_kind: "recovery_operator",
717        action: "resolve_cluster_backup_deletion",
718    },
719    ClusterControlActionContract {
720        credential_kind: "recovery_operator",
721        action: "get_cluster_restore_readiness",
722    },
723    ClusterControlActionContract {
724        credential_kind: "recovery_operator",
725        action: "prepare_offline_recovery",
726    },
727    ClusterControlActionContract {
728        credential_kind: "recovery_operator",
729        action: "reserve_cluster_control_credential_rotation",
730    },
731    ClusterControlActionContract {
732        credential_kind: "recovery_operator",
733        action: "activate_cluster_control_credential_rotation",
734    },
735    ClusterControlActionContract {
736        credential_kind: "recovery_operator",
737        action: "revoke_cluster_control_credential",
738    },
739    ClusterControlActionContract {
740        credential_kind: "recovery_operator",
741        action: "resolve_cluster_control_credential",
742    },
743];
744pub const LODESTONE_API_CLUSTER_CONTROL_TYPES: &[&str] = &[
745    "cluster_control_session",
746    "cluster_control_request",
747    "cluster_control_response",
748    "collection_authority_operation",
749    "collection_retirement_blockers",
750    "core_capacity_observation",
751    "core_resource_diagnostic_page",
752    "cluster_control_credential_rotation",
753    "cluster_backup_operation",
754    "cluster_restore_readiness",
755];
756
757pub const LODESTONE_API_CURSOR_FORMAT_VERSION: u16 = 1;
758#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
759#[serde(deny_unknown_fields)]
760pub struct Cursor {
761    pub value: String,
762}
763
764pub const LODESTONE_API_LOCATOR_FORMAT_VERSION: u16 = 1;
765#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
766#[serde(deny_unknown_fields)]
767pub struct Locator {
768    pub authority: String,
769    pub value: String,
770}
771
772pub const LODESTONE_API_RESOURCE_FORMAT_VERSION: u16 = 1;
773#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
774#[serde(deny_unknown_fields)]
775pub struct Resource {
776    pub kind: String,
777    pub name: String,
778    pub incarnation: Identity,
779}
780
781pub const LODESTONE_API_FIELD_PROMOTION_CONFIGURATION_SHAPE_VERSION: u16 = 1;
782pub const LODESTONE_API_FIELD_PROMOTION_CONFIGURATION_FORMAT_VERSION: u16 = 3;
783#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
784#[serde(deny_unknown_fields)]
785pub struct FieldPromotionConfiguration {
786    pub format_version: u32,
787    pub enabled: bool,
788    pub minimum_query_count: u32,
789    pub maximum_promoted_fields: u32,
790    pub maximum_cardinality: U64,
791    pub maximum_extra_bytes: U64,
792    pub allow_sensitive: bool,
793}
794
795pub const LODESTONE_API_OVERLOAD_CONFIGURATION_SHAPE_VERSION: u16 = 2;
796pub const LODESTONE_API_OVERLOAD_CONFIGURATION_FORMAT_VERSION: u16 = 3;
797#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
798#[serde(deny_unknown_fields)]
799pub struct OverloadConfiguration {
800    pub format_version: u32,
801    pub mode: String,
802    pub maximum_backlog_bytes: U64,
803    pub maximum_backlog_age_millis: U64,
804    pub maximum_collection_share_bytes: U64,
805    pub maximum_recovery_ops_per_pass: u32,
806    pub maximum_pending_overlay_documents: U64,
807}
808
809pub const LODESTONE_API_INDEX_POLICIES_FORMAT_VERSION: u16 = 1;
810#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
811#[serde(deny_unknown_fields)]
812pub struct IndexPolicies {
813    pub durability: String,
814    pub storage: String,
815    pub cache: String,
816    #[serde(default, skip_serializing_if = "Option::is_none")]
817    pub default_visibility: Option<String>,
818    pub field_promotion: FieldPromotionConfiguration,
819    pub overload: OverloadConfiguration,
820}
821
822pub const LODESTONE_API_MAINTENANCE_BUDGETS_FORMAT_VERSION: u16 = 1;
823#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
824#[serde(deny_unknown_fields)]
825pub struct MaintenanceBudgets {
826    pub memtable_max_bytes: U64,
827    pub refresh_max_millis: U64,
828    pub seal_max_bytes: U64,
829    pub seal_max_millis: U64,
830    pub merge_max_bytes: U64,
831    pub delete_resolution_max_bytes: U64,
832    pub wal_retention_max_bytes: U64,
833    pub gc_max_keys: u32,
834    pub fsck_max_objects: u32,
835    pub deleted_tombstone_retention_millis: U64,
836}
837
838pub const LODESTONE_API_RESOURCE_DURABILITY_CLASS_FORMAT_VERSION: u16 = 1;
839#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
840#[serde(rename_all = "snake_case")]
841pub enum ResourceDurabilityClass {
842    RegionalObject,
843    ZonalLowLatency,
844    Relaxed,
845    Ephemeral,
846}
847
848pub const LODESTONE_API_RESOURCE_STORAGE_CLASS_FORMAT_VERSION: u16 = 1;
849#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
850#[serde(rename_all = "snake_case")]
851pub enum ResourceStorageClass {
852    Standard,
853    Cold,
854}
855
856pub const LODESTONE_API_VECTOR_QUALITY_OBJECTIVE_FORMAT_VERSION: u16 = 1;
857#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
858#[serde(rename_all = "snake_case")]
859pub enum VectorQualityObjective {
860    Balanced,
861    HighRecall,
862    MemoryEfficient,
863}
864
865pub const LODESTONE_API_VECTOR_INDEXING_OBJECTIVE_FORMAT_VERSION: u16 = 1;
866#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
867#[serde(rename_all = "snake_case")]
868pub enum VectorIndexingObjective {
869    FastBuild,
870    Balanced,
871    Compact,
872}
873
874pub const LODESTONE_API_VECTOR_RESIDENCY_INTENT_FORMAT_VERSION: u16 = 1;
875#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
876#[serde(rename_all = "snake_case")]
877pub enum VectorResidencyIntent {
878    Automatic,
879    PreferResident,
880    RequireResident,
881}
882
883pub const LODESTONE_API_VECTOR_CALIBRATION_BINDING_FORMAT_VERSION: u16 = 1;
884#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
885#[serde(deny_unknown_fields)]
886pub struct VectorCalibrationBinding {
887    pub profile: VectorStrategyProfile,
888    pub evidence_digest: Digest,
889}
890
891pub const LODESTONE_API_VECTOR_RESOURCE_POLICY_FORMAT_VERSION: u16 = 2;
892#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
893#[serde(deny_unknown_fields)]
894pub struct VectorResourcePolicy {
895    pub quality: VectorQualityObjective,
896    pub indexing: VectorIndexingObjective,
897    #[serde(default, skip_serializing_if = "Option::is_none")]
898    pub residency: Option<VectorResidencyIntent>,
899    #[serde(default, skip_serializing_if = "Option::is_none")]
900    pub calibration: Option<VectorCalibrationBinding>,
901}
902
903pub const LODESTONE_API_WORKLOAD_CLASS_FORMAT_VERSION: u16 = 1;
904#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
905#[serde(rename_all = "snake_case")]
906pub enum WorkloadClass {
907    InteractiveSearch,
908    BatchAnalytics,
909    StreamingIngest,
910    BulkBackfill,
911    InternalMaintenance,
912}
913
914pub const LODESTONE_API_INDEX_RESOURCE_SPEC_SHAPE_VERSION: u16 = 3;
915pub const LODESTONE_API_INDEX_RESOURCE_SPEC_FORMAT_VERSION: u16 = 3;
916#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
917#[serde(deny_unknown_fields)]
918pub struct IndexResourceSpec {
919    pub format_version: u32,
920    pub revision: U64,
921    pub initial_shards: u32,
922    pub target_shard_bytes: U64,
923    pub durability: ResourceDurabilityClass,
924    pub storage_class: ResourceStorageClass,
925    pub ram_admission_weight: u32,
926    pub ram_hard_max_bytes: U64,
927    pub nvme_admission_weight: u32,
928    pub nvme_hard_max_bytes: U64,
929    pub refresh_objective_millis: u32,
930    pub memtable_hard_max_bytes: U64,
931    pub seal_parallelism: u32,
932    pub merge_parallelism: u32,
933    pub vector: VectorResourcePolicy,
934    #[serde(default, skip_serializing_if = "Option::is_none")]
935    pub lifecycle_binding: Option<Identity>,
936    pub encryption_required: bool,
937    #[serde(default, skip_serializing_if = "Option::is_none")]
938    pub resolver_capability: Option<Identity>,
939}
940
941pub const LODESTONE_API_INDEX_SUMMARY_FORMAT_VERSION: u16 = 1;
942#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
943#[serde(deny_unknown_fields)]
944pub struct IndexSummary {
945    pub name: String,
946    pub incarnation: Identity,
947    pub revision: U64,
948    pub mode: String,
949    pub retained_event_identity: bool,
950    pub state: String,
951    pub schema_generation: U64,
952    pub routing_revision: U64,
953    pub shard_count: u32,
954    pub policies: IndexPolicies,
955    pub management_mode: String,
956}
957
958pub const LODESTONE_API_MAPPING_MODE_FORMAT_VERSION: u16 = 1;
959#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
960#[serde(rename_all = "snake_case")]
961pub enum MappingMode {
962    Mutable,
963    AppendLog,
964    State,
965}
966
967pub const LODESTONE_API_DYNAMIC_MAPPING_POLICY_FORMAT_VERSION: u16 = 1;
968#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
969#[serde(rename_all = "snake_case")]
970pub enum DynamicMappingPolicy {
971    True,
972    False,
973    Strict,
974}
975
976pub const LODESTONE_API_MAPPING_ANALYZER_FORMAT_VERSION: u16 = 1;
977#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
978#[serde(rename_all = "snake_case")]
979pub enum MappingAnalyzer {
980    Keyword,
981    Simple,
982    Standard,
983    Whitespace,
984}
985
986pub const LODESTONE_API_KEYWORD_NORMALIZER_FORMAT_VERSION: u16 = 1;
987#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
988#[serde(rename_all = "snake_case")]
989pub enum KeywordNormalizer {
990    Keyword,
991    Lowercase,
992}
993
994pub const LODESTONE_API_VECTOR_METRIC_FORMAT_VERSION: u16 = 1;
995#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
996#[serde(rename_all = "snake_case")]
997pub enum VectorMetric {
998    Cosine,
999    DotProduct,
1000    SquaredL2,
1001}
1002
1003pub const LODESTONE_API_MAPPING_SCALAR_FORMAT_VERSION: u16 = 1;
1004#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1005#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1006pub enum MappingScalar {
1007    Boolean { value: bool },
1008    I64 { value: I64 },
1009    U64 { value: U64 },
1010    F64Bits { value: U64 },
1011    Keyword { value: String },
1012}
1013
1014pub const LODESTONE_API_SPARSE_VECTOR_WEIGHT_TYPE_FORMAT_VERSION: u16 = 1;
1015#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1016#[serde(rename_all = "snake_case")]
1017pub enum SparseVectorWeightType {
1018    F32,
1019    F16,
1020}
1021
1022pub const LODESTONE_API_MAPPING_FIELD_TYPE_SHAPE_VERSION: u16 = 3;
1023pub const LODESTONE_API_MAPPING_FIELD_TYPE_VECTOR_FORMAT_VERSION: u16 = 2;
1024pub const LODESTONE_API_MAPPING_FIELD_TYPE_SPARSE_VECTOR_FORMAT_VERSION: u16 = 1;
1025pub const LODESTONE_API_MAPPING_FIELD_TYPE_VECTOR_SET_FORMAT_VERSION: u16 = 1;
1026#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1027#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1028pub enum MappingFieldType {
1029    Text,
1030    Keyword,
1031    U64,
1032    Date,
1033    I64,
1034    F64,
1035    Bool,
1036    Nested,
1037    Vector {
1038        format_version: u32,
1039        field_id: u32,
1040        dimensions: u32,
1041        metric: VectorMetric,
1042        element_type: DenseVectorElementType,
1043        #[serde(default, skip_serializing_if = "Option::is_none")]
1044        quantization_scale: Option<ApproximateNumber>,
1045    },
1046    SparseVector {
1047        format_version: u32,
1048        field_id: u32,
1049        maximum_dimension: u32,
1050        weight_type: SparseVectorWeightType,
1051    },
1052    VectorSet {
1053        format_version: u32,
1054        field_id: u32,
1055        dimensions: u32,
1056        metric: VectorMetric,
1057        element_type: DenseVectorElementType,
1058        #[serde(default, skip_serializing_if = "Option::is_none")]
1059        quantization_scale: Option<ApproximateNumber>,
1060        maximum_vectors: u32,
1061    },
1062}
1063
1064pub const LODESTONE_API_MAPPING_FIELD_FORMAT_VERSION: u16 = 1;
1065#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1066#[serde(deny_unknown_fields)]
1067pub struct MappingField {
1068    pub path: String,
1069    pub field_type: MappingFieldType,
1070    pub stored: bool,
1071    #[serde(default, skip_serializing_if = "Option::is_none")]
1072    pub null_value: Option<MappingScalar>,
1073}
1074
1075pub const LODESTONE_API_MULTI_FIELD_PROJECTION_FORMAT_VERSION: u16 = 1;
1076#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1077#[serde(deny_unknown_fields)]
1078pub struct MultiFieldProjection {
1079    pub parent: String,
1080    pub child: String,
1081}
1082
1083pub const LODESTONE_API_ANALYZER_IDENTITY_FORMAT_VERSION: u16 = 1;
1084#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1085#[serde(deny_unknown_fields)]
1086pub struct AnalyzerIdentity {
1087    pub field: String,
1088    pub index_analyzer: MappingAnalyzer,
1089    pub search_analyzer: MappingAnalyzer,
1090}
1091
1092pub const LODESTONE_API_KEYWORD_LIMIT_FORMAT_VERSION: u16 = 1;
1093#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1094#[serde(deny_unknown_fields)]
1095pub struct KeywordLimit {
1096    pub field: String,
1097    pub max_bytes: u32,
1098    pub normalizer: KeywordNormalizer,
1099}
1100
1101pub const LODESTONE_API_PROFILE_PRIVACY_ACTION_FORMAT_VERSION: u16 = 1;
1102#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1103#[serde(rename_all = "snake_case")]
1104pub enum ProfilePrivacyAction {
1105    Allow,
1106    Drop,
1107    Redact,
1108    Reject,
1109}
1110
1111pub const LODESTONE_API_PROFILE_PRIVACY_FIELD_FORMAT_VERSION: u16 = 1;
1112#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1113#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1114pub enum ProfilePrivacyField {
1115    ResourceAttribute { key: String },
1116    ScopeAttribute { key: String },
1117    SampleLabel { key: String },
1118    FunctionName,
1119    FunctionSystemName,
1120    FunctionFilename,
1121    MappingFilename,
1122}
1123
1124pub const LODESTONE_API_PROFILE_PRIVACY_RULE_FORMAT_VERSION: u16 = 1;
1125#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1126#[serde(deny_unknown_fields)]
1127pub struct ProfilePrivacyRule {
1128    pub field: ProfilePrivacyField,
1129    pub action: ProfilePrivacyAction,
1130}
1131
1132pub const LODESTONE_API_PROFILE_PRIVACY_POLICY_SHAPE_VERSION: u16 = 1;
1133pub const LODESTONE_API_PROFILE_PRIVACY_POLICY_FORMAT_VERSION: u16 = 1;
1134#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1135#[serde(deny_unknown_fields)]
1136pub struct ProfilePrivacyPolicy {
1137    pub format_version: u32,
1138    pub rules: Vec<ProfilePrivacyRule>,
1139}
1140
1141pub const LODESTONE_API_MAPPING_RECORD_MODEL_SHAPE_VERSION: u16 = 3;
1142pub const LODESTONE_API_MAPPING_RECORD_MODEL_METRIC_V1_FORMAT_VERSION: u16 = 1;
1143pub const LODESTONE_API_MAPPING_RECORD_MODEL_RELATIONSHIP_V1_FORMAT_VERSION: u16 = 1;
1144pub const LODESTONE_API_MAPPING_RECORD_MODEL_PROFILE_V1_FORMAT_VERSION: u16 = 1;
1145#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1146#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1147pub enum MappingRecordModel {
1148    Document,
1149    MetricV1 {
1150        format_version: u32,
1151        grouping_attributes: Vec<String>,
1152    },
1153    RelationshipV1 {
1154        format_version: u32,
1155    },
1156    ProfileV1 {
1157        format_version: u32,
1158        privacy: ProfilePrivacyPolicy,
1159    },
1160}
1161
1162pub const LODESTONE_API_MAPPING_SHAPE_VERSION: u16 = 4;
1163pub const LODESTONE_API_MAPPING_FORMAT_VERSION: u16 = 10;
1164#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1165#[serde(deny_unknown_fields)]
1166pub struct Mapping {
1167    pub format_version: u32,
1168    pub generation: U64,
1169    pub mode: MappingMode,
1170    pub record_model: MappingRecordModel,
1171    pub dynamic_policy: DynamicMappingPolicy,
1172    pub fields: Vec<MappingField>,
1173    pub multi_field_projections: Vec<MultiFieldProjection>,
1174    pub analyzer_identities: Vec<AnalyzerIdentity>,
1175    pub keyword_limits: Vec<KeywordLimit>,
1176    pub nested_paths: Vec<String>,
1177}
1178
1179pub const LODESTONE_API_INDEX_DETAIL_FORMAT_VERSION: u16 = 1;
1180#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1181#[serde(deny_unknown_fields)]
1182pub struct IndexDetail {
1183    pub summary: IndexSummary,
1184    pub current_mapping: Mapping,
1185    pub budgets: MaintenanceBudgets,
1186    pub resource_spec: IndexResourceSpec,
1187    pub aliases: Vec<String>,
1188    pub data_streams: Vec<String>,
1189}
1190
1191pub const LODESTONE_API_SOURCE_PROVIDER_FORMAT_VERSION: u16 = 1;
1192#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1193#[serde(rename_all = "snake_case")]
1194pub enum SourceProvider {
1195    Kafka,
1196    ObjectLog,
1197    HttpReplay,
1198    GrpcReplay,
1199}
1200
1201pub const LODESTONE_API_SOURCE_DECODER_FORMAT_VERSION: u16 = 1;
1202#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1203#[serde(rename_all = "snake_case")]
1204pub enum SourceDecoder {
1205    LodestoneDocumentJson,
1206    DebeziumPostgresJson,
1207}
1208
1209pub const LODESTONE_API_SOURCE_REPLAY_GUARANTEES_FORMAT_VERSION: u16 = 1;
1210#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1211#[serde(deny_unknown_fields)]
1212pub struct SourceReplayGuarantees {
1213    pub durable_replay: bool,
1214    pub stable_partition_identity: bool,
1215    pub stable_operation_identity: bool,
1216    pub ordered_positions: bool,
1217    pub bounded_reads: bool,
1218    pub explicit_retention: bool,
1219    pub explicit_rewind: bool,
1220    pub minimum_replay_window_millis: U64,
1221}
1222
1223pub const LODESTONE_API_SOURCE_PARTITION_CONFIGURATION_FORMAT_VERSION: u16 = 1;
1224#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1225#[serde(deny_unknown_fields)]
1226pub struct SourcePartitionConfiguration {
1227    pub partition_id: u32,
1228    pub partition_incarnation: U64,
1229    pub initial_next_ordinal: U64,
1230    pub initial_resume_token_base64: String,
1231}
1232
1233pub const LODESTONE_API_REPLAYABLE_SOURCE_CONFIGURATION_FORMAT_VERSION: u16 = 1;
1234#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1235#[serde(deny_unknown_fields)]
1236pub struct ReplayableSourceConfiguration {
1237    pub source_incarnation: U64,
1238    pub source_identity_digest: Digest,
1239    pub provider: SourceProvider,
1240    pub decoder: SourceDecoder,
1241    pub partitions: Vec<SourcePartitionConfiguration>,
1242    pub guarantees: SourceReplayGuarantees,
1243}
1244
1245pub const LODESTONE_API_SOURCE_PARTITION_STATUS_FORMAT_VERSION: u16 = 1;
1246#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1247#[serde(deny_unknown_fields)]
1248pub struct SourcePartitionStatus {
1249    pub partition_id: u32,
1250    pub partition_incarnation: U64,
1251    pub indexed_next_ordinal: U64,
1252    #[serde(default, skip_serializing_if = "Option::is_none")]
1253    pub provider_high_watermark_next_ordinal: Option<U64>,
1254    #[serde(default, skip_serializing_if = "Option::is_none")]
1255    pub retention_floor_next_ordinal: Option<U64>,
1256    #[serde(default, skip_serializing_if = "Option::is_none")]
1257    pub lag_records: Option<U64>,
1258}
1259
1260pub const LODESTONE_API_REPLAYABLE_SOURCE_STATUS_FORMAT_VERSION: u16 = 1;
1261#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1262#[serde(deny_unknown_fields)]
1263pub struct ReplayableSourceStatus {
1264    pub index: Resource,
1265    pub provider: SourceProvider,
1266    pub decoder: SourceDecoder,
1267    pub source_incarnation: U64,
1268    pub source_identity_digest: Digest,
1269    pub lifecycle: String,
1270    pub lifecycle_generation: U64,
1271    #[serde(default, skip_serializing_if = "Option::is_none")]
1272    pub pause_reason: Option<String>,
1273    #[serde(default, skip_serializing_if = "Option::is_none")]
1274    pub rebuild_reason: Option<String>,
1275    pub retry_state: String,
1276    pub retention_risk: String,
1277    #[serde(default, skip_serializing_if = "Option::is_none")]
1278    pub last_batch_identity: Option<Identity>,
1279    pub partitions: Vec<SourcePartitionStatus>,
1280}
1281
1282pub const LODESTONE_API_SOURCE_CONTROL_TRANSITION_FORMAT_VERSION: u16 = 1;
1283#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1284#[serde(rename_all = "snake_case")]
1285pub enum SourceControlTransition {
1286    Pause,
1287    Resume,
1288    RequireRebuild,
1289}
1290
1291pub const LODESTONE_API_HISTORY_LEDGER_PRECONDITION_FORMAT_VERSION: u16 = 1;
1292#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1293#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1294pub enum HistoryLedgerPrecondition {
1295    Absent,
1296    Exact { revision: U64 },
1297}
1298
1299pub const LODESTONE_API_HISTORY_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1300#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1301#[serde(deny_unknown_fields)]
1302pub struct HistoryRetentionPolicy {
1303    pub keep_for_millis: U64,
1304    pub capture_interval_millis: U64,
1305    pub maximum_cuts: u32,
1306    pub privacy_overlay_identity_limit: u32,
1307}
1308
1309pub const LODESTONE_API_HISTORY_SELECTOR_FORMAT_VERSION: u16 = 1;
1310#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1311#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1312pub enum HistorySelector {
1313    ExactCut { cut_id: Identity },
1314    AtOrBeforeCommitTime { unix_millis: U64 },
1315}
1316
1317pub const LODESTONE_API_HISTORY_HOLD_FORMAT_VERSION: u16 = 1;
1318#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1319#[serde(deny_unknown_fields)]
1320pub struct HistoryHold {
1321    pub hold_id: Identity,
1322    pub cut_ids: Vec<Identity>,
1323}
1324
1325pub const LODESTONE_API_HISTORY_STATUS_FORMAT_VERSION: u16 = 1;
1326#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1327#[serde(deny_unknown_fields)]
1328pub struct HistoryStatus {
1329    pub index: Resource,
1330    pub revision: U64,
1331    pub policy: HistoryRetentionPolicy,
1332    pub page_count: u32,
1333    pub cut_count: u32,
1334    pub holds: Vec<HistoryHold>,
1335}
1336
1337pub const LODESTONE_API_HISTORY_RESOLUTION_FORMAT_VERSION: u16 = 1;
1338#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1339#[serde(deny_unknown_fields)]
1340pub struct HistoryResolution {
1341    pub index: Resource,
1342    pub selector: HistorySelector,
1343    pub cut_id: Identity,
1344    pub committed_at_unix_millis: U64,
1345    pub uncertainty_millis: U64,
1346    pub shard_count: u32,
1347    pub security_policy_revision: U64,
1348}
1349
1350pub const LODESTONE_API_INDEX_REFERENCE_FORMAT_VERSION: u16 = 1;
1351#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1352#[serde(deny_unknown_fields)]
1353pub struct IndexReference {
1354    pub name: String,
1355    pub incarnation: Identity,
1356}
1357
1358pub const LODESTONE_API_ALIAS_TARGET_FORMAT_VERSION: u16 = 1;
1359#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1360#[serde(deny_unknown_fields)]
1361pub struct AliasTarget {
1362    pub index: IndexReference,
1363    pub write_index: bool,
1364}
1365
1366pub const LODESTONE_API_ALIAS_SUMMARY_FORMAT_VERSION: u16 = 1;
1367#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1368#[serde(deny_unknown_fields)]
1369pub struct AliasSummary {
1370    pub name: String,
1371    pub revision: U64,
1372    pub visible_target_count: u32,
1373}
1374
1375pub const LODESTONE_API_ALIAS_DETAIL_FORMAT_VERSION: u16 = 1;
1376#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1377#[serde(deny_unknown_fields)]
1378pub struct AliasDetail {
1379    pub summary: AliasSummary,
1380    pub visible_targets: Vec<AliasTarget>,
1381    #[serde(default, skip_serializing_if = "Option::is_none")]
1382    pub filter: Option<RawJson>,
1383    #[serde(default, skip_serializing_if = "Option::is_none")]
1384    pub index_routing: Option<String>,
1385    #[serde(default, skip_serializing_if = "Option::is_none")]
1386    pub search_routing: Option<String>,
1387}
1388
1389pub const LODESTONE_API_DATA_STREAM_SUMMARY_FORMAT_VERSION: u16 = 1;
1390#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1391#[serde(deny_unknown_fields)]
1392pub struct DataStreamSummary {
1393    pub name: String,
1394    pub incarnation: Identity,
1395    pub revision: U64,
1396    pub generation: U64,
1397    pub state: String,
1398    pub visible_backing_count: u32,
1399}
1400
1401pub const LODESTONE_API_COMPONENT_TEMPLATE_BINDING_FORMAT_VERSION: u16 = 1;
1402#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1403#[serde(deny_unknown_fields)]
1404pub struct ComponentTemplateBinding {
1405    pub name: String,
1406    pub incarnation: Identity,
1407    pub revision: U64,
1408}
1409
1410pub const LODESTONE_API_INDEX_TEMPLATE_BINDING_FORMAT_VERSION: u16 = 1;
1411#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1412#[serde(deny_unknown_fields)]
1413pub struct IndexTemplateBinding {
1414    pub name: String,
1415    pub incarnation: Identity,
1416    pub revision: U64,
1417}
1418
1419pub const LODESTONE_API_LIFECYCLE_POLICY_BINDING_FORMAT_VERSION: u16 = 1;
1420#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1421#[serde(deny_unknown_fields)]
1422pub struct LifecyclePolicyBinding {
1423    pub name: String,
1424    pub incarnation: Identity,
1425    pub revision: U64,
1426}
1427
1428pub const LODESTONE_API_DATA_STREAM_DETAIL_FORMAT_VERSION: u16 = 1;
1429#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1430#[serde(deny_unknown_fields)]
1431pub struct DataStreamDetail {
1432    pub summary: DataStreamSummary,
1433    pub visible_backing_indices: Vec<IndexReference>,
1434    #[serde(default, skip_serializing_if = "Option::is_none")]
1435    pub write_index: Option<IndexReference>,
1436    pub timestamp_field: String,
1437    pub index_template: IndexTemplateBinding,
1438    #[serde(default, skip_serializing_if = "Option::is_none")]
1439    pub lifecycle_policy: Option<LifecyclePolicyBinding>,
1440}
1441
1442pub const LODESTONE_API_COMPONENT_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1443#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1444#[serde(deny_unknown_fields)]
1445pub struct ComponentTemplateSummary {
1446    pub name: String,
1447    pub incarnation: Identity,
1448    pub revision: U64,
1449}
1450
1451pub const LODESTONE_API_COMPONENT_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1452#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1453#[serde(deny_unknown_fields)]
1454pub struct ComponentTemplateDetail {
1455    pub summary: ComponentTemplateSummary,
1456    pub mapping: Mapping,
1457    pub settings: RawJson,
1458    #[serde(default, skip_serializing_if = "Option::is_none")]
1459    pub resource_spec: Option<IndexResourceSpec>,
1460}
1461
1462pub const LODESTONE_API_INDEX_TEMPLATE_SUMMARY_FORMAT_VERSION: u16 = 1;
1463#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1464#[serde(deny_unknown_fields)]
1465pub struct IndexTemplateSummary {
1466    pub name: String,
1467    pub incarnation: Identity,
1468    pub revision: U64,
1469    pub priority: i32,
1470    pub data_stream: bool,
1471}
1472
1473pub const LODESTONE_API_INDEX_TEMPLATE_DETAIL_FORMAT_VERSION: u16 = 1;
1474#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1475#[serde(deny_unknown_fields)]
1476pub struct IndexTemplateDetail {
1477    pub summary: IndexTemplateSummary,
1478    pub index_patterns: Vec<String>,
1479    pub components: Vec<ComponentTemplateBinding>,
1480    pub mapping: Mapping,
1481    pub settings: RawJson,
1482    #[serde(default, skip_serializing_if = "Option::is_none")]
1483    pub resource_spec: Option<IndexResourceSpec>,
1484}
1485
1486pub const LODESTONE_API_INGEST_PIPELINE_SUMMARY_FORMAT_VERSION: u16 = 1;
1487#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1488#[serde(deny_unknown_fields)]
1489pub struct IngestPipelineSummary {
1490    pub name: String,
1491    pub incarnation: Identity,
1492    pub revision: U64,
1493    pub digest: Digest,
1494}
1495
1496pub const LODESTONE_API_INGEST_PIPELINE_DETAIL_FORMAT_VERSION: u16 = 1;
1497#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1498#[serde(deny_unknown_fields)]
1499pub struct IngestPipelineDetail {
1500    pub summary: IngestPipelineSummary,
1501    pub definition: RawJson,
1502}
1503
1504pub const LODESTONE_API_INGEST_PIPELINE_SELECTION_FORMAT_VERSION: u16 = 1;
1505#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1506#[serde(deny_unknown_fields)]
1507pub struct IngestPipelineSelection {
1508    pub name: String,
1509    pub expected: ExpectedBinding,
1510}
1511
1512pub const LODESTONE_API_LIFECYCLE_POLICY_SUMMARY_FORMAT_VERSION: u16 = 1;
1513#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1514#[serde(deny_unknown_fields)]
1515pub struct LifecyclePolicySummary {
1516    pub name: String,
1517    pub incarnation: Identity,
1518    pub revision: U64,
1519}
1520
1521pub const LODESTONE_API_ROLLOVER_THRESHOLDS_FORMAT_VERSION: u16 = 1;
1522#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1523#[serde(deny_unknown_fields)]
1524pub struct RolloverThresholds {
1525    #[serde(default, skip_serializing_if = "Option::is_none")]
1526    pub max_primary_docs: Option<U64>,
1527    #[serde(default, skip_serializing_if = "Option::is_none")]
1528    pub max_primary_bytes: Option<U64>,
1529    #[serde(default, skip_serializing_if = "Option::is_none")]
1530    pub max_age_millis: Option<U64>,
1531}
1532
1533pub const LODESTONE_API_RETENTION_POLICY_FORMAT_VERSION: u16 = 1;
1534#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1535#[serde(deny_unknown_fields)]
1536pub struct RetentionPolicy {
1537    #[serde(default, skip_serializing_if = "Option::is_none")]
1538    pub document_max_age_millis: Option<U64>,
1539    #[serde(default, skip_serializing_if = "Option::is_none")]
1540    pub backing_index_max_age_millis: Option<U64>,
1541}
1542
1543pub const LODESTONE_API_LIFECYCLE_POLICY_DETAIL_FORMAT_VERSION: u16 = 1;
1544#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1545#[serde(deny_unknown_fields)]
1546pub struct LifecyclePolicyDetail {
1547    pub summary: LifecyclePolicySummary,
1548    pub rollover: RolloverThresholds,
1549    pub retention: RetentionPolicy,
1550    pub merge_hint: bool,
1551    pub freeze_hint: bool,
1552    pub delete_expired: bool,
1553}
1554
1555pub const LODESTONE_API_TEXT_QUERY_OPERATOR_FORMAT_VERSION: u16 = 1;
1556#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1557#[serde(rename_all = "snake_case")]
1558pub enum TextQueryOperator {
1559    Or,
1560    And,
1561}
1562
1563pub const LODESTONE_API_TEXT_QUERY_ANALYZER_FORMAT_VERSION: u16 = 1;
1564#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1565#[serde(rename_all = "snake_case")]
1566pub enum TextQueryAnalyzer {
1567    Mapping,
1568    Standard,
1569    Simple,
1570    Whitespace,
1571    Keyword,
1572}
1573
1574pub const LODESTONE_API_ZERO_TERMS_QUERY_FORMAT_VERSION: u16 = 1;
1575#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1576#[serde(rename_all = "snake_case")]
1577pub enum ZeroTermsQuery {
1578    None,
1579    All,
1580}
1581
1582pub const LODESTONE_API_TEXT_QUERY_OPTIONS_FORMAT_VERSION: u16 = 1;
1583#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1584#[serde(deny_unknown_fields)]
1585pub struct TextQueryOptions {
1586    pub operator: TextQueryOperator,
1587    #[serde(default, skip_serializing_if = "Option::is_none")]
1588    pub minimum_should_match: Option<u32>,
1589    pub analyzer: TextQueryAnalyzer,
1590    pub zero_terms_query: ZeroTermsQuery,
1591}
1592
1593pub const LODESTONE_API_MULTI_MATCH_MODE_FORMAT_VERSION: u16 = 1;
1594#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1595#[serde(rename_all = "snake_case")]
1596pub enum MultiMatchMode {
1597    BestFields,
1598    MostFields,
1599    Phrase,
1600    PhrasePrefix,
1601    CrossFields,
1602}
1603
1604pub const LODESTONE_API_MULTI_MATCH_FIELD_FORMAT_VERSION: u16 = 1;
1605#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1606#[serde(deny_unknown_fields)]
1607pub struct MultiMatchField {
1608    pub field: String,
1609    pub boost: ApproximateNumber,
1610}
1611
1612pub const LODESTONE_API_MULTI_MATCH_OPTIONS_FORMAT_VERSION: u16 = 1;
1613#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1614#[serde(deny_unknown_fields)]
1615pub struct MultiMatchOptions {
1616    pub mode: MultiMatchMode,
1617    pub operator: TextQueryOperator,
1618    #[serde(default, skip_serializing_if = "Option::is_none")]
1619    pub minimum_should_match: Option<u32>,
1620    pub analyzer: TextQueryAnalyzer,
1621    pub zero_terms_query: ZeroTermsQuery,
1622    pub slop: u32,
1623}
1624
1625pub const LODESTONE_API_SORT_ORDER_FORMAT_VERSION: u16 = 1;
1626#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1627#[serde(rename_all = "snake_case")]
1628pub enum SortOrder {
1629    Asc,
1630    Desc,
1631}
1632
1633pub const LODESTONE_API_SORT_MODE_FORMAT_VERSION: u16 = 1;
1634#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1635#[serde(rename_all = "snake_case")]
1636pub enum SortMode {
1637    Auto,
1638    Min,
1639    Max,
1640}
1641
1642pub const LODESTONE_API_MISSING_ORDER_FORMAT_VERSION: u16 = 1;
1643#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1644#[serde(rename_all = "snake_case")]
1645pub enum MissingOrder {
1646    First,
1647    Last,
1648}
1649
1650pub const LODESTONE_API_NESTED_SCORE_MODE_FORMAT_VERSION: u16 = 1;
1651#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1652#[serde(rename_all = "snake_case")]
1653pub enum NestedScoreMode {
1654    Avg,
1655    Max,
1656    Min,
1657    None,
1658    Sum,
1659}
1660
1661pub const LODESTONE_API_NESTED_INNER_HITS_FORMAT_VERSION: u16 = 1;
1662#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1663#[serde(deny_unknown_fields)]
1664pub struct NestedInnerHits {
1665    #[serde(default, skip_serializing_if = "Option::is_none")]
1666    pub name: Option<String>,
1667    pub from: u32,
1668    pub size: u32,
1669    pub sort: Vec<SortSpec>,
1670}
1671
1672pub const LODESTONE_API_SORT_SPEC_FORMAT_VERSION: u16 = 1;
1673#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1674#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1675pub enum SortSpec {
1676    Score {
1677        order: SortOrder,
1678    },
1679    Field {
1680        field: String,
1681        order: SortOrder,
1682        #[serde(default, skip_serializing_if = "Option::is_none")]
1683        missing: Option<MissingOrder>,
1684        mode: SortMode,
1685    },
1686    NestedField {
1687        path: String,
1688        field: String,
1689        #[serde(default, skip_serializing_if = "Option::is_none")]
1690        filter: Option<Box<Query>>,
1691        order: SortOrder,
1692        #[serde(default, skip_serializing_if = "Option::is_none")]
1693        missing: Option<MissingOrder>,
1694        mode: SortMode,
1695    },
1696}
1697
1698pub const LODESTONE_API_QUERY_FORMAT_VERSION: u16 = 1;
1699#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1700#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1701pub enum Query {
1702    MatchAll,
1703    Term {
1704        field: String,
1705        value: JsonValue,
1706    },
1707    Terms {
1708        field: String,
1709        values: Vec<JsonValue>,
1710    },
1711    Range {
1712        field: String,
1713        #[serde(default, skip_serializing_if = "Option::is_none")]
1714        lower: Option<JsonValue>,
1715        #[serde(default, skip_serializing_if = "Option::is_none")]
1716        upper: Option<JsonValue>,
1717        include_lower: bool,
1718        include_upper: bool,
1719    },
1720    Text {
1721        field: String,
1722        text: String,
1723        #[serde(default, skip_serializing_if = "Option::is_none")]
1724        options: Option<TextQueryOptions>,
1725    },
1726    MultiMatch {
1727        fields: Vec<MultiMatchField>,
1728        text: String,
1729        #[serde(default, skip_serializing_if = "Option::is_none")]
1730        options: Option<MultiMatchOptions>,
1731    },
1732    Exists {
1733        field: String,
1734    },
1735    Prefix {
1736        field: String,
1737        prefix: String,
1738        #[serde(default, skip_serializing_if = "Option::is_none")]
1739        analyzer: Option<TextQueryAnalyzer>,
1740        analyze_wildcard: bool,
1741    },
1742    Fuzzy {
1743        field: String,
1744        value: String,
1745        distance: u32,
1746        #[serde(default, skip_serializing_if = "Option::is_none")]
1747        analyzer: Option<TextQueryAnalyzer>,
1748    },
1749    Boost {
1750        query: Box<Query>,
1751        boost: ApproximateNumber,
1752    },
1753    Bool {
1754        must: Vec<Query>,
1755        filter: Vec<Query>,
1756        should: Vec<Query>,
1757        must_not: Vec<Query>,
1758        minimum_should_match: u32,
1759    },
1760    Nested {
1761        path: String,
1762        query: Box<Query>,
1763        score_mode: NestedScoreMode,
1764        ignore_unmapped: bool,
1765        #[serde(default, skip_serializing_if = "Option::is_none")]
1766        inner_hits: Option<NestedInnerHits>,
1767    },
1768}
1769
1770pub const LODESTONE_API_DENSE_RETRIEVAL_MODE_FORMAT_VERSION: u16 = 1;
1771#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1772#[serde(rename_all = "snake_case")]
1773pub enum DenseRetrievalMode {
1774    Auto,
1775    Ann,
1776    Exact,
1777}
1778
1779pub const LODESTONE_API_VECTOR_ACHIEVED_MODE_FORMAT_VERSION: u16 = 1;
1780#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1781#[serde(rename_all = "snake_case")]
1782pub enum VectorAchievedMode {
1783    Exact,
1784    Ann,
1785    Mixed,
1786}
1787
1788pub const LODESTONE_API_VECTOR_BRANCH_DIAGNOSTICS_FORMAT_VERSION: u16 = 2;
1789#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1790#[serde(deny_unknown_fields)]
1791pub struct VectorBranchDiagnostics {
1792    pub name: String,
1793    pub requested_mode: DenseRetrievalMode,
1794    pub achieved_mode: VectorAchievedMode,
1795    pub result_count: U64,
1796    pub exact_segments: U64,
1797    pub ann_segments: U64,
1798    pub exact_fallback_segments: U64,
1799    pub distance_evaluations: U64,
1800    pub peak_scratch_bytes: U64,
1801    pub fresh_vectors_scanned: U64,
1802    pub realtime_overlay_queries: U64,
1803    pub realtime_overlay_candidates: U64,
1804    pub bundle_roots: U64,
1805    pub object_read_requests: U64,
1806    pub object_bytes_read: U64,
1807    pub cache_hits: U64,
1808    pub cache_misses: U64,
1809    pub snapshot_digests: Vec<Digest>,
1810}
1811
1812pub const LODESTONE_API_DENSE_VECTOR_ELEMENT_TYPE_FORMAT_VERSION: u16 = 1;
1813#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1814#[serde(rename_all = "snake_case")]
1815pub enum DenseVectorElementType {
1816    F32,
1817    F16,
1818    I8,
1819}
1820
1821pub const LODESTONE_API_DENSE_VECTOR_BYTE_ORDER_FORMAT_VERSION: u16 = 1;
1822#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1823#[serde(rename_all = "snake_case")]
1824pub enum DenseVectorByteOrder {
1825    LittleEndian,
1826}
1827
1828pub const LODESTONE_API_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
1829#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1830#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1831pub enum VectorValue {
1832    Numeric {
1833        values: Vec<ApproximateNumber>,
1834    },
1835    Binary {
1836        element_type: DenseVectorElementType,
1837        byte_order: DenseVectorByteOrder,
1838        data_base64: String,
1839        #[serde(default, skip_serializing_if = "Option::is_none")]
1840        quantization_scale: Option<ApproximateNumber>,
1841    },
1842}
1843
1844pub const LODESTONE_API_SPARSE_VECTOR_ENTRY_FORMAT_VERSION: u16 = 1;
1845#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1846#[serde(deny_unknown_fields)]
1847pub struct SparseVectorEntry {
1848    pub dimension: u32,
1849    pub weight: ApproximateNumber,
1850}
1851
1852pub const LODESTONE_API_SPARSE_VECTOR_VALUE_FORMAT_VERSION: u16 = 1;
1853#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1854#[serde(deny_unknown_fields)]
1855pub struct SparseVectorValue {
1856    pub entries: Vec<SparseVectorEntry>,
1857}
1858
1859pub const LODESTONE_API_VECTOR_SET_VALUE_FORMAT_VERSION: u16 = 1;
1860#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1861#[serde(deny_unknown_fields)]
1862pub struct VectorSetValue {
1863    pub vectors: Vec<VectorValue>,
1864}
1865
1866pub const LODESTONE_API_VECTOR_EVALUATION_SNAPSHOT_FORMAT_VERSION: u16 = 1;
1867#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1868#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1869pub enum VectorEvaluationSnapshot {
1870    CommittedCut { digest: Digest },
1871    Pit { pit: Cursor },
1872}
1873
1874pub const LODESTONE_API_VECTOR_EVALUATION_QUERY_SET_FORMAT_VERSION: u16 = 1;
1875#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1876#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
1877pub enum VectorEvaluationQuerySet {
1878    Sample { seed: U64, sample_count: u32 },
1879    Supplied { digest: Digest, queries: Vec<VectorValue> },
1880}
1881
1882pub const LODESTONE_API_VECTOR_EVALUATION_BUDGET_FORMAT_VERSION: u16 = 1;
1883#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1884#[serde(deny_unknown_fields)]
1885pub struct VectorEvaluationBudget {
1886    pub maximum_distance_evaluations: U64,
1887    pub maximum_elapsed_work_units: U64,
1888    pub maximum_peak_memory_bytes: U64,
1889    pub maximum_object_reads: U64,
1890    pub maximum_object_bytes: U64,
1891    pub maximum_build_scratch_bytes: U64,
1892    pub maximum_profile_comparisons: u32,
1893}
1894
1895pub const LODESTONE_API_VECTOR_CANDIDATE_POLICY_FORMAT_VERSION: u16 = 1;
1896#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1897#[serde(rename_all = "snake_case")]
1898pub enum VectorCandidatePolicy {
1899    Balanced,
1900    HighRecall,
1901    MemoryEfficient,
1902}
1903
1904pub const LODESTONE_API_VECTOR_CALIBRATION_OBJECTIVE_FORMAT_VERSION: u16 = 1;
1905#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1906#[serde(rename_all = "snake_case")]
1907pub enum VectorCalibrationObjective {
1908    Balanced,
1909    HighRecall,
1910    MemoryEfficient,
1911}
1912
1913pub const LODESTONE_API_VECTOR_STRATEGY_PROFILE_FORMAT_VERSION: u16 = 1;
1914#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1915#[serde(rename_all = "snake_case")]
1916pub enum VectorStrategyProfile {
1917    BalancedV1,
1918    HighRecallV1,
1919    MemoryEfficientV1,
1920}
1921
1922pub const LODESTONE_API_VECTOR_EVALUATION_WORK_FORMAT_VERSION: u16 = 1;
1923#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1924#[serde(deny_unknown_fields)]
1925pub struct VectorEvaluationWork {
1926    pub distance_evaluations: U64,
1927    pub elapsed_work_units: U64,
1928    pub peak_memory_bytes: U64,
1929    pub object_reads: U64,
1930    pub object_bytes: U64,
1931}
1932
1933pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_CODE_FORMAT_VERSION: u16 = 1;
1934#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
1935#[serde(rename_all = "snake_case")]
1936pub enum VectorEvaluationErrorCode {
1937    AnnRefused,
1938    ExhaustiveRefused,
1939    TimedOut,
1940    Cancelled,
1941    Internal,
1942}
1943
1944pub const LODESTONE_API_VECTOR_EVALUATION_ERROR_FORMAT_VERSION: u16 = 1;
1945#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1946#[serde(deny_unknown_fields)]
1947pub struct VectorEvaluationError {
1948    pub sample_ordinal: u32,
1949    pub code: VectorEvaluationErrorCode,
1950}
1951
1952pub const LODESTONE_API_VECTOR_RECALL_RESULT_SHAPE_VERSION: u16 = 1;
1953pub const LODESTONE_API_VECTOR_RECALL_RESULT_FORMAT_VERSION: u16 = 1;
1954#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1955#[serde(deny_unknown_fields)]
1956pub struct VectorRecallResult {
1957    pub format_version: u32,
1958    pub index: Resource,
1959    pub field: String,
1960    pub mapping_generation: U64,
1961    pub snapshot_digest: Digest,
1962    pub query_set_digest: Digest,
1963    pub metric: VectorMetric,
1964    pub k: u32,
1965    pub candidate_policy: VectorCandidatePolicy,
1966    pub strategy_identity: String,
1967    pub completed_samples: u32,
1968    pub ann_result_count: U64,
1969    pub exhaustive_result_count: U64,
1970    pub mean_recall_basis_points: u32,
1971    pub minimum_recall_basis_points: u32,
1972    pub p05_recall_basis_points: u32,
1973    pub p50_recall_basis_points: u32,
1974    pub p90_recall_basis_points: u32,
1975    pub p99_recall_basis_points: u32,
1976    pub ann_work: VectorEvaluationWork,
1977    pub exhaustive_work: VectorEvaluationWork,
1978    pub errors: Vec<VectorEvaluationError>,
1979}
1980
1981pub const LODESTONE_API_VECTOR_CALIBRATION_CANDIDATE_FORMAT_VERSION: u16 = 1;
1982#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1983#[serde(deny_unknown_fields)]
1984pub struct VectorCalibrationCandidate {
1985    pub profile: VectorStrategyProfile,
1986    pub recall: VectorRecallResult,
1987    pub build_scratch_bytes: U64,
1988    pub resident_bytes: U64,
1989    pub evidence_digest: Digest,
1990}
1991
1992pub const LODESTONE_API_VECTOR_CALIBRATION_RESULT_SHAPE_VERSION: u16 = 1;
1993pub const LODESTONE_API_VECTOR_CALIBRATION_RESULT_FORMAT_VERSION: u16 = 1;
1994#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
1995#[serde(deny_unknown_fields)]
1996pub struct VectorCalibrationResult {
1997    pub format_version: u32,
1998    pub objective: VectorCalibrationObjective,
1999    pub candidates: Vec<VectorCalibrationCandidate>,
2000    pub recommended_profile: VectorStrategyProfile,
2001    pub recommended_evidence_digest: Digest,
2002    pub requires_explicit_resource_revision_and_rebuild: bool,
2003}
2004
2005pub const LODESTONE_API_VECTOR_DIAGNOSTIC_RESULT_FORMAT_VERSION: u16 = 1;
2006#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2007#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2008pub enum VectorDiagnosticResult {
2009    Recall { result: Box<VectorRecallResult> },
2010    Calibration { result: Box<VectorCalibrationResult> },
2011}
2012
2013pub const LODESTONE_API_VECTOR_WARM_COMPONENT_FORMAT_VERSION: u16 = 1;
2014#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2015#[serde(rename_all = "snake_case")]
2016pub enum VectorWarmComponent {
2017    Directory,
2018    Approximate,
2019    Exact,
2020}
2021
2022pub const LODESTONE_API_VECTOR_WARM_STATE_FORMAT_VERSION: u16 = 1;
2023#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2024#[serde(rename_all = "snake_case")]
2025pub enum VectorWarmState {
2026    Warmed,
2027    Partial,
2028    Stale,
2029}
2030
2031pub const LODESTONE_API_VECTOR_WARM_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
2032#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2033#[serde(deny_unknown_fields)]
2034pub struct VectorWarmAchievement {
2035    pub component: VectorWarmComponent,
2036    pub cache_identity: Digest,
2037    pub resident_bytes: U64,
2038}
2039
2040pub const LODESTONE_API_VECTOR_WARM_RESULT_SHAPE_VERSION: u16 = 1;
2041pub const LODESTONE_API_VECTOR_WARM_RESULT_FORMAT_VERSION: u16 = 1;
2042#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2043#[serde(deny_unknown_fields)]
2044pub struct VectorWarmResult {
2045    pub format_version: u32,
2046    pub operation_identity: Digest,
2047    pub index: Resource,
2048    pub root_digest: Digest,
2049    pub state: VectorWarmState,
2050    pub progress: ExactDecimal,
2051    pub achieved: Vec<VectorWarmAchievement>,
2052    pub object_requests: U64,
2053    pub object_bytes: U64,
2054    pub cache_hits: U64,
2055    pub cache_misses: U64,
2056    pub started_at: U64,
2057    pub completed_at: U64,
2058    pub expires_at: U64,
2059    #[serde(default, skip_serializing_if = "Option::is_none")]
2060    pub residency_intent: Option<VectorResidencyIntent>,
2061}
2062
2063pub const LODESTONE_API_DENSE_RETRIEVAL_THRESHOLD_FORMAT_VERSION: u16 = 1;
2064#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2065#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2066pub enum DenseRetrievalThreshold {
2067    MinimumScore { value: ApproximateNumber },
2068    MaximumDistance { value: ApproximateNumber },
2069}
2070
2071pub const LODESTONE_API_RETRIEVAL_BRANCH_FORMAT_VERSION: u16 = 3;
2072#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2073#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2074pub enum RetrievalBranch {
2075    Lexical {
2076        name: String,
2077        query: Box<Query>,
2078        #[serde(default, skip_serializing_if = "Option::is_none")]
2079        filter: Option<Box<Query>>,
2080        window: u32,
2081        weight: ApproximateNumber,
2082    },
2083    Dense {
2084        name: String,
2085        field: String,
2086        query_vector: VectorValue,
2087        #[serde(default, skip_serializing_if = "Option::is_none")]
2088        filter: Option<Box<Query>>,
2089        window: u32,
2090        #[serde(default, skip_serializing_if = "Option::is_none")]
2091        candidates: Option<u32>,
2092        weight: ApproximateNumber,
2093        mode: DenseRetrievalMode,
2094        #[serde(default, skip_serializing_if = "Option::is_none")]
2095        threshold: Option<DenseRetrievalThreshold>,
2096    },
2097    Sparse {
2098        name: String,
2099        field: String,
2100        query_vector: SparseVectorValue,
2101        #[serde(default, skip_serializing_if = "Option::is_none")]
2102        filter: Option<Box<Query>>,
2103        window: u32,
2104        weight: ApproximateNumber,
2105    },
2106    LateInteraction {
2107        name: String,
2108        field: String,
2109        query_vectors: VectorSetValue,
2110        #[serde(default, skip_serializing_if = "Option::is_none")]
2111        filter: Option<Box<Query>>,
2112        window: u32,
2113        candidates: u32,
2114        weight: ApproximateNumber,
2115    },
2116}
2117
2118pub const LODESTONE_API_WEIGHTED_RRF_FUSION_FORMAT_VERSION: u16 = 1;
2119#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2120#[serde(deny_unknown_fields)]
2121pub struct WeightedRrfFusion {
2122    pub rank_constant: u32,
2123}
2124
2125pub const LODESTONE_API_RETRIEVAL_PLAN_SHAPE_VERSION: u16 = 1;
2126pub const LODESTONE_API_RETRIEVAL_PLAN_FORMAT_VERSION: u16 = 1;
2127#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2128#[serde(deny_unknown_fields)]
2129pub struct RetrievalPlan {
2130    pub format_version: u32,
2131    #[serde(default, skip_serializing_if = "Option::is_none")]
2132    pub global_filter: Option<Box<Query>>,
2133    pub branches: Vec<RetrievalBranch>,
2134    pub fusion: WeightedRrfFusion,
2135    pub result_window: u32,
2136}
2137
2138pub const LODESTONE_API_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
2139#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2140#[serde(deny_unknown_fields)]
2141pub struct HistogramBounds {
2142    #[serde(default, skip_serializing_if = "Option::is_none")]
2143    pub min: Option<ApproximateNumber>,
2144    #[serde(default, skip_serializing_if = "Option::is_none")]
2145    pub max: Option<ApproximateNumber>,
2146}
2147
2148pub const LODESTONE_API_DATE_HISTOGRAM_BOUNDS_FORMAT_VERSION: u16 = 1;
2149#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2150#[serde(deny_unknown_fields)]
2151pub struct DateHistogramBounds {
2152    #[serde(default, skip_serializing_if = "Option::is_none")]
2153    pub min: Option<I64>,
2154    #[serde(default, skip_serializing_if = "Option::is_none")]
2155    pub max: Option<I64>,
2156}
2157
2158pub const LODESTONE_API_APPROXIMATION_ALGORITHM_FORMAT_VERSION: u16 = 1;
2159#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2160#[serde(rename_all = "snake_case")]
2161pub enum ApproximationAlgorithm {
2162    HyperloglogV1,
2163    FloatPrefixHistogramV1,
2164}
2165
2166pub const LODESTONE_API_APPROXIMATION_FORMAT_VERSION: u16 = 1;
2167#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2168#[serde(deny_unknown_fields)]
2169pub struct Approximation {
2170    pub algorithm: ApproximationAlgorithm,
2171    pub algorithm_version: u32,
2172    pub precision: u32,
2173    pub state_bytes: U64,
2174    #[serde(default, skip_serializing_if = "Option::is_none")]
2175    pub relative_standard_error: Option<ApproximateNumber>,
2176    #[serde(default, skip_serializing_if = "Option::is_none")]
2177    pub maximum_rank_error: Option<ApproximateNumber>,
2178}
2179
2180pub const LODESTONE_API_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
2181#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2182#[serde(deny_unknown_fields)]
2183pub struct PercentileValue {
2184    pub percent: ApproximateNumber,
2185    #[serde(default, skip_serializing_if = "Option::is_none")]
2186    pub value: Option<ApproximateNumber>,
2187}
2188
2189pub const LODESTONE_API_APPROXIMATE_PERCENTILE_VALUE_FORMAT_VERSION: u16 = 1;
2190#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2191#[serde(deny_unknown_fields)]
2192pub struct ApproximatePercentileValue {
2193    pub percent: ApproximateNumber,
2194    pub value: ApproximateNumber,
2195    pub lower_bound: ApproximateNumber,
2196    pub upper_bound: ApproximateNumber,
2197    pub maximum_rank_error: ApproximateNumber,
2198}
2199
2200pub const LODESTONE_API_TIME_SERIES_OPERATOR_FORMAT_VERSION: u16 = 1;
2201#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2202#[serde(rename_all = "snake_case")]
2203pub enum TimeSeriesOperator {
2204    Raw,
2205    Sum,
2206    Count,
2207    Min,
2208    Max,
2209    Average,
2210    Delta,
2211    Increase,
2212    Rate,
2213    HistogramMerge,
2214    Quantiles,
2215}
2216
2217pub const LODESTONE_API_TIME_SERIES_MISSING_DATA_FORMAT_VERSION: u16 = 1;
2218#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2219#[serde(rename_all = "snake_case")]
2220pub enum TimeSeriesMissingData {
2221    Omit,
2222    ExplicitEmpty,
2223}
2224
2225pub const LODESTONE_API_TIME_SERIES_QUANTILE_MODE_FORMAT_VERSION: u16 = 1;
2226#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2227#[serde(rename_all = "snake_case")]
2228pub enum TimeSeriesQuantileMode {
2229    Exact,
2230    Approximate,
2231}
2232
2233pub const LODESTONE_API_TIME_SERIES_BUCKET_STATE_FORMAT_VERSION: u16 = 1;
2234#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2235#[serde(rename_all = "snake_case")]
2236pub enum TimeSeriesBucketState {
2237    Observed,
2238    ExplicitEmpty,
2239}
2240
2241pub const LODESTONE_API_TIME_SERIES_QUANTILE_VALUE_FORMAT_VERSION: u16 = 1;
2242#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2243#[serde(deny_unknown_fields)]
2244pub struct TimeSeriesQuantileValue {
2245    pub quantile: ApproximateNumber,
2246    #[serde(default, skip_serializing_if = "Option::is_none")]
2247    pub value: Option<MetricNumber>,
2248    #[serde(default, skip_serializing_if = "Option::is_none")]
2249    pub lower_bound: Option<MetricNumber>,
2250    #[serde(default, skip_serializing_if = "Option::is_none")]
2251    pub upper_bound: Option<MetricNumber>,
2252    #[serde(default, skip_serializing_if = "Option::is_none")]
2253    pub maximum_rank_error: Option<ApproximateNumber>,
2254}
2255
2256pub const LODESTONE_API_TIME_SERIES_VALUE_FORMAT_VERSION: u16 = 1;
2257#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2258#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2259pub enum TimeSeriesValue {
2260    Raw {
2261        values: Vec<MetricNumber>,
2262    },
2263    Number {
2264        value: MetricNumber,
2265        algorithm: String,
2266    },
2267    Count {
2268        value: U64,
2269    },
2270    ExplicitHistogram {
2271        count: U64,
2272        #[serde(default, skip_serializing_if = "Option::is_none")]
2273        sum: Option<MetricNumber>,
2274        bounds_f64_bits: Vec<U64>,
2275        bucket_counts: Vec<U64>,
2276    },
2277    ExponentialHistogram {
2278        count: U64,
2279        #[serde(default, skip_serializing_if = "Option::is_none")]
2280        sum: Option<MetricNumber>,
2281        scale: i32,
2282        zero_count: U64,
2283        positive: MetricExponentialBuckets,
2284        negative: MetricExponentialBuckets,
2285    },
2286    Quantiles {
2287        values: Vec<TimeSeriesQuantileValue>,
2288        exact: bool,
2289        algorithm: String,
2290        algorithm_version: u32,
2291        state_bytes: U64,
2292    },
2293}
2294
2295pub const LODESTONE_API_TIME_SERIES_BUCKET_FORMAT_VERSION: u16 = 1;
2296#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2297#[serde(deny_unknown_fields)]
2298pub struct TimeSeriesBucket {
2299    pub start_unix_nanos: U64,
2300    pub end_unix_nanos: U64,
2301    pub group: Vec<MetricAttribute>,
2302    pub state: TimeSeriesBucketState,
2303    pub reset: bool,
2304    #[serde(default, skip_serializing_if = "Option::is_none")]
2305    pub value: Option<TimeSeriesValue>,
2306    pub exemplars: Vec<MetricExemplar>,
2307}
2308
2309pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_DIRECTION_FORMAT_VERSION: u16 = 1;
2310#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2311#[serde(rename_all = "snake_case")]
2312pub enum RelationshipTraversalDirection {
2313    Inbound,
2314    Outbound,
2315    Both,
2316}
2317
2318pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_FILTER_FORMAT_VERSION: u16 = 1;
2319#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2320#[serde(deny_unknown_fields)]
2321pub struct RelationshipTraversalFilter {
2322    pub relationship_types: Vec<String>,
2323    pub assertion_classes: Vec<String>,
2324    pub provenance: Vec<String>,
2325    #[serde(default, skip_serializing_if = "Option::is_none")]
2326    pub valid_from_unix_nanos: Option<U64>,
2327    #[serde(default, skip_serializing_if = "Option::is_none")]
2328    pub valid_through_unix_nanos: Option<U64>,
2329}
2330
2331pub const LODESTONE_API_RELATIONSHIP_TRAVERSAL_BUDGET_FORMAT_VERSION: u16 = 1;
2332#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2333#[serde(deny_unknown_fields)]
2334pub struct RelationshipTraversalBudget {
2335    pub maximum_depth: u32,
2336    pub maximum_fan_out: u32,
2337    pub maximum_visited_entities: u32,
2338    pub maximum_visited_relationships: u32,
2339    pub maximum_returned_relationships: u32,
2340    pub maximum_memory_bytes: U64,
2341}
2342
2343pub const LODESTONE_API_TRAVERSED_RELATIONSHIP_FORMAT_VERSION: u16 = 1;
2344#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2345#[serde(deny_unknown_fields)]
2346pub struct TraversedRelationship {
2347    pub depth: u32,
2348    pub from: EntityRef,
2349    pub to: EntityRef,
2350    pub relationship: RelationshipRecord,
2351}
2352
2353pub const LODESTONE_API_PROFILE_QUERY_OPERATION_FORMAT_VERSION: u16 = 1;
2354#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2355#[serde(rename_all = "snake_case")]
2356pub enum ProfileQueryOperation {
2357    Flamegraph,
2358    TopStacks,
2359    TopFunctions,
2360    SampleTable,
2361}
2362
2363pub const LODESTONE_API_PROFILE_GROUP_BY_FORMAT_VERSION: u16 = 1;
2364#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2365#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2366pub enum ProfileGroupBy {
2367    ResourceAttribute { key: String },
2368    SampleLabel { key: String },
2369    BuildId,
2370    ModuleId,
2371}
2372
2373pub const LODESTONE_API_PROFILE_QUERY_FILTER_FORMAT_VERSION: u16 = 1;
2374#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2375#[serde(deny_unknown_fields)]
2376pub struct ProfileQueryFilter {
2377    pub profile_ids: Vec<String>,
2378    pub build_ids: Vec<String>,
2379    pub module_ids: Vec<String>,
2380    pub function_ids: Vec<String>,
2381    pub trace_ids: Vec<String>,
2382    pub span_ids: Vec<String>,
2383}
2384
2385pub const LODESTONE_API_PROFILE_QUERY_BUDGET_FORMAT_VERSION: u16 = 1;
2386#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2387#[serde(deny_unknown_fields)]
2388pub struct ProfileQueryBudget {
2389    pub maximum_batches: u32,
2390    pub maximum_samples: u32,
2391    pub maximum_results: u32,
2392    pub maximum_memory_bytes: U64,
2393}
2394
2395pub const LODESTONE_API_PROFILE_QUERY_ROW_FORMAT_VERSION: u16 = 1;
2396#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2397#[serde(deny_unknown_fields)]
2398pub struct ProfileQueryRow {
2399    pub key: String,
2400    pub stack: Vec<String>,
2401    pub value: MetricNumber,
2402    pub sample_count: U64,
2403}
2404
2405pub const LODESTONE_API_TEMPORAL_INPUT_FORMAT_VERSION: u16 = 1;
2406#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2407#[serde(deny_unknown_fields)]
2408pub struct TemporalInput {
2409    pub index: Resource,
2410    pub schema_generation: U64,
2411}
2412
2413pub const LODESTONE_API_TEMPORAL_PATTERN_FORMAT_VERSION: u16 = 1;
2414#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2415#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2416pub enum TemporalPattern {
2417    Event {
2418        node_id: String,
2419        query: Box<Query>,
2420    },
2421    Sequence {
2422        node_id: String,
2423        branches: Vec<TemporalPattern>,
2424        within_nanos: U64,
2425    },
2426    AllOf {
2427        node_id: String,
2428        branches: Vec<TemporalPattern>,
2429        within_nanos: U64,
2430    },
2431    AnyOf {
2432        node_id: String,
2433        branches: Vec<TemporalPattern>,
2434    },
2435    Count {
2436        node_id: String,
2437        pattern: Box<TemporalPattern>,
2438        minimum: u32,
2439        within_nanos: U64,
2440    },
2441    Repetition {
2442        node_id: String,
2443        pattern: Box<TemporalPattern>,
2444        count: u32,
2445        within_nanos: U64,
2446    },
2447    NotFollowedBy {
2448        node_id: String,
2449        anchor: Box<TemporalPattern>,
2450        forbidden: Box<TemporalPattern>,
2451        within_nanos: U64,
2452    },
2453}
2454
2455pub const LODESTONE_API_HISTORICAL_TEMPORAL_DEFINITION_SHAPE_VERSION: u16 = 1;
2456pub const LODESTONE_API_HISTORICAL_TEMPORAL_DEFINITION_FORMAT_VERSION: u16 = 1;
2457#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2458#[serde(deny_unknown_fields)]
2459pub struct HistoricalTemporalDefinition {
2460    pub format_version: u32,
2461    pub pattern_generation: U64,
2462    pub inputs: Vec<TemporalInput>,
2463    pub event_time_field: String,
2464    pub correlation_fields: Vec<String>,
2465    pub pattern: TemporalPattern,
2466    pub watermark_unix_nanos: U64,
2467    pub maximum_events: u32,
2468    pub maximum_states: u32,
2469    pub maximum_captured_events: u32,
2470    pub maximum_results: u32,
2471    pub maximum_state_bytes: U64,
2472}
2473
2474pub const LODESTONE_API_TEMPORAL_EVIDENCE_STATUS_FORMAT_VERSION: u16 = 2;
2475#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2476#[serde(rename_all = "snake_case")]
2477pub enum TemporalEvidenceStatus {
2478    Provisional,
2479    Final,
2480    Correction,
2481    Retraction,
2482}
2483
2484pub const LODESTONE_API_TEMPORAL_SOURCE_EVENT_FORMAT_VERSION: u16 = 1;
2485#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2486#[serde(deny_unknown_fields)]
2487pub struct TemporalSourceEvent {
2488    pub index: Resource,
2489    pub shard_id: u32,
2490    pub recovery_era: Identity,
2491    pub sequence: U64,
2492    pub document_id: String,
2493}
2494
2495pub const LODESTONE_API_TEMPORAL_EVIDENCE_FORMAT_VERSION: u16 = 2;
2496#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2497#[serde(deny_unknown_fields)]
2498pub struct TemporalEvidence {
2499    pub evidence_id: Digest,
2500    pub pattern_generation: U64,
2501    pub pattern_digest: Digest,
2502    pub correlation_key: Vec<JsonValue>,
2503    pub matched_node_id: String,
2504    pub interval_start_unix_nanos: U64,
2505    pub interval_end_unix_nanos: U64,
2506    pub watermark_unix_nanos: U64,
2507    pub source_events: Vec<TemporalSourceEvent>,
2508    pub input_cut_digest: Digest,
2509    pub status: TemporalEvidenceStatus,
2510    #[serde(default, skip_serializing_if = "Option::is_none")]
2511    pub predecessor_evidence_id: Option<Digest>,
2512}
2513
2514pub const LODESTONE_API_CONTINUOUS_TEMPORAL_START_FORMAT_VERSION: u16 = 1;
2515#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2516#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2517pub enum ContinuousTemporalStart {
2518    FromCurrentHeads,
2519    HistoricalThenFollow { pit: Cursor },
2520}
2521
2522pub const LODESTONE_API_CONTINUOUS_TEMPORAL_WATERMARK_POLICY_FORMAT_VERSION: u16 = 1;
2523#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2524#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2525pub enum ContinuousTemporalWatermarkPolicy {
2526    MaximumObservedMinusOutOfOrder {
2527        allowed_out_of_orderness_nanos: U64,
2528    },
2529    MappingBoundEvent {
2530        allowed_out_of_orderness_nanos: U64,
2531        predicate: Box<Query>,
2532        timestamp_field: String,
2533    },
2534}
2535
2536pub const LODESTONE_API_CONTINUOUS_TEMPORAL_LATE_DATA_POLICY_FORMAT_VERSION: u16 = 1;
2537#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2538#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2539pub enum ContinuousTemporalLateDataPolicy {
2540    RecomputeWithinHorizon { correction_horizon_nanos: U64 },
2541    PauseWithGap,
2542}
2543
2544pub const LODESTONE_API_CONTINUOUS_TEMPORAL_OUTPUT_FORMAT_VERSION: u16 = 1;
2545#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2546#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2547pub enum ContinuousTemporalOutput {
2548    InternalResults {
2549        maximum_retained_records: U64,
2550        maximum_retained_bytes: U64,
2551        maximum_retained_event_age_nanos: U64,
2552    },
2553    MaterializedIndex {
2554        index: Resource,
2555        schema_generation: U64,
2556    },
2557}
2558
2559pub const LODESTONE_API_CONTINUOUS_TEMPORAL_DEFINITION_SHAPE_VERSION: u16 = 1;
2560pub const LODESTONE_API_CONTINUOUS_TEMPORAL_DEFINITION_FORMAT_VERSION: u16 = 1;
2561#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2562#[serde(deny_unknown_fields)]
2563pub struct ContinuousTemporalDefinition {
2564    pub format_version: u32,
2565    pub evaluation_id: Identity,
2566    pub pattern_generation: U64,
2567    pub inputs: Vec<TemporalInput>,
2568    pub event_time_field: String,
2569    pub correlation_fields: Vec<String>,
2570    pub pattern: TemporalPattern,
2571    pub start: ContinuousTemporalStart,
2572    pub watermark_policy: ContinuousTemporalWatermarkPolicy,
2573    pub late_data_policy: ContinuousTemporalLateDataPolicy,
2574    pub maximum_events_per_step: u32,
2575    pub maximum_states: u32,
2576    pub maximum_captured_events: u32,
2577    pub maximum_results: u32,
2578    pub maximum_state_bytes: U64,
2579    pub maximum_lag_bytes: U64,
2580    pub maximum_lag_events: U64,
2581    pub maximum_lag_event_age_nanos: U64,
2582    pub output: ContinuousTemporalOutput,
2583}
2584
2585pub const LODESTONE_API_CONTINUOUS_TEMPORAL_FRONTIER_FORMAT_VERSION: u16 = 1;
2586#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2587#[serde(deny_unknown_fields)]
2588pub struct ContinuousTemporalFrontier {
2589    pub index: Resource,
2590    pub shard_id: u32,
2591    pub recovery_era: Identity,
2592    pub routing_revision: U64,
2593    pub registered_wal_frontier: U64,
2594    #[serde(default, skip_serializing_if = "Option::is_none")]
2595    pub watermark_unix_nanos: Option<U64>,
2596}
2597
2598pub const LODESTONE_API_CONTINUOUS_TEMPORAL_AVAILABLE_FRONTIER_FORMAT_VERSION: u16 = 1;
2599#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2600#[serde(deny_unknown_fields)]
2601pub struct ContinuousTemporalAvailableFrontier {
2602    pub index: Resource,
2603    pub shard_id: u32,
2604    pub sequence: U64,
2605}
2606
2607pub const LODESTONE_API_CONTINUOUS_TEMPORAL_GAP_REASON_FORMAT_VERSION: u16 = 1;
2608#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2609#[serde(rename_all = "snake_case")]
2610pub enum ContinuousTemporalGapReason {
2611    RetentionGap,
2612    LateDataGap,
2613    SchemaGap,
2614    RouteGap,
2615    OutputGap,
2616}
2617
2618pub const LODESTONE_API_CONTINUOUS_TEMPORAL_GAP_FORMAT_VERSION: u16 = 1;
2619#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2620#[serde(deny_unknown_fields)]
2621pub struct ContinuousTemporalGap {
2622    pub reason: ContinuousTemporalGapReason,
2623    pub last_complete_frontiers: Vec<ContinuousTemporalFrontier>,
2624    pub earliest_available_frontiers: Vec<ContinuousTemporalAvailableFrontier>,
2625}
2626
2627pub const LODESTONE_API_CONTINUOUS_TEMPORAL_EVALUATION_SHAPE_VERSION: u16 = 1;
2628pub const LODESTONE_API_CONTINUOUS_TEMPORAL_EVALUATION_FORMAT_VERSION: u16 = 1;
2629#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2630#[serde(deny_unknown_fields)]
2631pub struct ContinuousTemporalEvaluation {
2632    pub format_version: u32,
2633    pub evaluation_id: Identity,
2634    pub generation: U64,
2635    pub revision: U64,
2636    pub definition_digest: Digest,
2637    pub definition: ContinuousTemporalDefinition,
2638    pub lifecycle: String,
2639    pub frontiers: Vec<ContinuousTemporalFrontier>,
2640    #[serde(default, skip_serializing_if = "Option::is_none")]
2641    pub global_watermark_unix_nanos: Option<U64>,
2642    pub state_bytes: U64,
2643    pub active_states: U64,
2644    pub active_timers: U64,
2645    pub retained_results: U64,
2646    pub pending_emissions: U64,
2647    #[serde(default, skip_serializing_if = "Option::is_none")]
2648    pub last_materialized_frontier_digest: Option<Digest>,
2649    pub retry_count: u32,
2650    #[serde(default, skip_serializing_if = "Option::is_none")]
2651    pub gap: Option<ContinuousTemporalGap>,
2652}
2653
2654pub const LODESTONE_API_COMPOSITE_ORDER_FORMAT_VERSION: u16 = 1;
2655#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2656#[serde(rename_all = "snake_case")]
2657pub enum CompositeOrder {
2658    Asc,
2659    Desc,
2660}
2661
2662pub const LODESTONE_API_COMPOSITE_SOURCE_FORMAT_VERSION: u16 = 1;
2663#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2664#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2665pub enum CompositeSource {
2666    Terms {
2667        name: String,
2668        field: String,
2669        order: CompositeOrder,
2670    },
2671    DateHistogram {
2672        name: String,
2673        field: String,
2674        #[serde(default, skip_serializing_if = "Option::is_none")]
2675        fixed_interval_millis: Option<U64>,
2676        #[serde(default, skip_serializing_if = "Option::is_none")]
2677        calendar_interval: Option<String>,
2678        #[serde(default, skip_serializing_if = "Option::is_none")]
2679        time_zone: Option<String>,
2680        offset_millis: I64,
2681        order: CompositeOrder,
2682    },
2683}
2684
2685pub const LODESTONE_API_AGGREGATION_FORMAT_VERSION: u16 = 3;
2686#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2687#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2688pub enum Aggregation {
2689    Terms {
2690        name: String,
2691        field: String,
2692        size: u32,
2693        sub_aggregations: Vec<Aggregation>,
2694    },
2695    Histogram {
2696        name: String,
2697        field: String,
2698        interval: ApproximateNumber,
2699        min_doc_count: U64,
2700        #[serde(default, skip_serializing_if = "Option::is_none")]
2701        extended_bounds: Option<HistogramBounds>,
2702        #[serde(default, skip_serializing_if = "Option::is_none")]
2703        hard_bounds: Option<HistogramBounds>,
2704        offset: ApproximateNumber,
2705        #[serde(default, skip_serializing_if = "Option::is_none")]
2706        missing: Option<ApproximateNumber>,
2707        sub_aggregations: Vec<Aggregation>,
2708    },
2709    Cardinality {
2710        name: String,
2711        field: String,
2712    },
2713    Percentiles {
2714        name: String,
2715        field: String,
2716        percents: Vec<ApproximateNumber>,
2717    },
2718    ApproximateCardinality {
2719        name: String,
2720        field: String,
2721        precision: u32,
2722    },
2723    ApproximatePercentiles {
2724        name: String,
2725        field: String,
2726        percents: Vec<ApproximateNumber>,
2727        precision: u32,
2728    },
2729    Sum {
2730        name: String,
2731        field: String,
2732    },
2733    Avg {
2734        name: String,
2735        field: String,
2736    },
2737    Min {
2738        name: String,
2739        field: String,
2740    },
2741    Max {
2742        name: String,
2743        field: String,
2744    },
2745    Stats {
2746        name: String,
2747        field: String,
2748    },
2749    DateHistogram {
2750        name: String,
2751        field: String,
2752        #[serde(default, skip_serializing_if = "Option::is_none")]
2753        fixed_interval_millis: Option<U64>,
2754        #[serde(default, skip_serializing_if = "Option::is_none")]
2755        calendar_interval: Option<String>,
2756        #[serde(default, skip_serializing_if = "Option::is_none")]
2757        time_zone: Option<String>,
2758        min_doc_count: U64,
2759        #[serde(default, skip_serializing_if = "Option::is_none")]
2760        extended_bounds: Option<DateHistogramBounds>,
2761        #[serde(default, skip_serializing_if = "Option::is_none")]
2762        hard_bounds: Option<DateHistogramBounds>,
2763        offset_millis: I64,
2764        #[serde(default, skip_serializing_if = "Option::is_none")]
2765        missing: Option<I64>,
2766        sub_aggregations: Vec<Aggregation>,
2767    },
2768    Composite {
2769        name: String,
2770        size: u32,
2771        sources: Vec<CompositeSource>,
2772        #[serde(default, skip_serializing_if = "Option::is_none")]
2773        after: Option<Cursor>,
2774        sub_aggregations: Vec<Aggregation>,
2775    },
2776    Filter {
2777        name: String,
2778        query: Box<Query>,
2779        sub_aggregations: Vec<Aggregation>,
2780    },
2781    Nested {
2782        name: String,
2783        path: String,
2784        sub_aggregations: Vec<Aggregation>,
2785    },
2786    ReverseNested {
2787        name: String,
2788        #[serde(default, skip_serializing_if = "Option::is_none")]
2789        path: Option<String>,
2790        sub_aggregations: Vec<Aggregation>,
2791    },
2792    TimeSeriesV1 {
2793        name: String,
2794        metric_name: String,
2795        unit: String,
2796        point_kind: MetricPointKind,
2797        #[serde(default, skip_serializing_if = "Option::is_none")]
2798        temporality: Option<MetricTemporality>,
2799        #[serde(default, skip_serializing_if = "Option::is_none")]
2800        monotonic: Option<bool>,
2801        range_start_unix_nanos: U64,
2802        range_end_unix_nanos: U64,
2803        bucket_width_nanos: U64,
2804        alignment_origin_unix_nanos: U64,
2805        group_by: Vec<String>,
2806        operator: TimeSeriesOperator,
2807        missing_data: TimeSeriesMissingData,
2808        quantiles: Vec<ApproximateNumber>,
2809        quantile_mode: TimeSeriesQuantileMode,
2810        maximum_exemplars: u32,
2811        maximum_points: u32,
2812        maximum_series: u32,
2813        maximum_buckets: u32,
2814        maximum_results: u32,
2815        maximum_state_bytes: U64,
2816    },
2817}
2818
2819pub const LODESTONE_API_NESTED_SEARCH_HIT_FORMAT_VERSION: u16 = 1;
2820#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2821#[serde(deny_unknown_fields)]
2822pub struct NestedSearchHit {
2823    pub path: String,
2824    pub ordinal: u32,
2825    #[serde(default, skip_serializing_if = "Option::is_none")]
2826    pub score: Option<ApproximateNumber>,
2827    pub source: RawJson,
2828    pub sort: Vec<JsonValue>,
2829}
2830
2831pub const LODESTONE_API_NAMED_NESTED_INNER_HITS_RESULT_FORMAT_VERSION: u16 = 1;
2832#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2833#[serde(deny_unknown_fields)]
2834pub struct NamedNestedInnerHitsResult {
2835    pub name: String,
2836    pub total: U64,
2837    pub hits: Vec<NestedSearchHit>,
2838}
2839
2840pub const LODESTONE_API_FRAGMENT_BOUNDARY_FORMAT_VERSION: u16 = 1;
2841#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2842#[serde(rename_all = "snake_case")]
2843pub enum FragmentBoundary {
2844    Word,
2845    Sentence,
2846    Paragraph,
2847    WholeField,
2848}
2849
2850pub const LODESTONE_API_FRAGMENT_OFFSET_ENCODING_FORMAT_VERSION: u16 = 1;
2851#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2852#[serde(rename_all = "snake_case")]
2853pub enum FragmentOffsetEncoding {
2854    Utf8Bytes,
2855    Utf16CodeUnits,
2856    UnicodeCodepoints,
2857}
2858
2859pub const LODESTONE_API_FRAGMENT_RANKER_FORMAT_VERSION: u16 = 1;
2860#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2861#[serde(rename_all = "snake_case")]
2862pub enum FragmentRanker {
2863    LexicalMatchCountV1,
2864}
2865
2866pub const LODESTONE_API_FRAGMENT_REQUEST_FORMAT_VERSION: u16 = 1;
2867#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2868#[serde(deny_unknown_fields)]
2869pub struct FragmentRequest {
2870    pub fields: Vec<String>,
2871    pub max_fragment_bytes: u32,
2872    pub max_fragments: u32,
2873    pub boundary: FragmentBoundary,
2874    pub offset_encoding: FragmentOffsetEncoding,
2875    pub ranker: FragmentRanker,
2876}
2877
2878pub const LODESTONE_API_SEARCH_FRAGMENT_FORMAT_VERSION: u16 = 1;
2879#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2880#[serde(deny_unknown_fields)]
2881pub struct SearchFragment {
2882    pub field: String,
2883    pub text: String,
2884    pub start: u32,
2885    pub end: u32,
2886    pub offset_encoding: FragmentOffsetEncoding,
2887    pub rank: u32,
2888    pub match_count: u32,
2889    pub truncated: bool,
2890    pub partial: bool,
2891}
2892
2893pub const LODESTONE_API_NUMERIC_FEATURE_TRANSFORM_FORMAT_VERSION: u16 = 1;
2894#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2895#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2896pub enum NumericFeatureTransform {
2897    Identity,
2898    Log1p,
2899    Clamp {
2900        minimum: ApproximateNumber,
2901        maximum: ApproximateNumber,
2902    },
2903}
2904
2905pub const LODESTONE_API_NUMERIC_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
2906#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2907#[serde(deny_unknown_fields)]
2908pub struct NumericResultFeature {
2909    pub name: String,
2910    pub field: String,
2911    pub transform: NumericFeatureTransform,
2912}
2913
2914pub const LODESTONE_API_RESULT_FEATURE_REQUEST_FORMAT_VERSION: u16 = 1;
2915#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2916#[serde(deny_unknown_fields)]
2917pub struct ResultFeatureRequest {
2918    pub top_n: u32,
2919    pub include_branch_components: bool,
2920    pub numeric: Vec<NumericResultFeature>,
2921}
2922
2923pub const LODESTONE_API_RESULT_DIVERSIFICATION_FORMAT_VERSION: u16 = 1;
2924#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2925#[serde(deny_unknown_fields)]
2926pub struct ResultDiversification {
2927    pub fields: Vec<String>,
2928    pub max_per_group: u32,
2929}
2930
2931pub const LODESTONE_API_BRANCH_SCORE_KIND_FORMAT_VERSION: u16 = 2;
2932#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
2933#[serde(rename_all = "snake_case")]
2934pub enum BranchScoreKind {
2935    LexicalScore,
2936    DenseSimilarity,
2937    SparseDotProduct,
2938    LateInteractionMaxsim,
2939}
2940
2941pub const LODESTONE_API_RESULT_FEATURE_FORMAT_VERSION: u16 = 1;
2942#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2943#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2944pub enum ResultFeature {
2945    Branch {
2946        branch: String,
2947        score_kind: BranchScoreKind,
2948        rank: u32,
2949        score: ApproximateNumber,
2950    },
2951    Numeric {
2952        name: String,
2953        field: String,
2954        value: ApproximateNumber,
2955    },
2956}
2957
2958pub const LODESTONE_API_SEARCH_HIT_FORMAT_VERSION: u16 = 2;
2959#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2960#[serde(deny_unknown_fields)]
2961pub struct SearchHit {
2962    pub index: Resource,
2963    pub document_id: String,
2964    #[serde(default, skip_serializing_if = "Option::is_none")]
2965    pub score: Option<ApproximateNumber>,
2966    #[serde(default, skip_serializing_if = "Option::is_none")]
2967    pub source: Option<RawJson>,
2968    pub sort: Vec<JsonValue>,
2969    pub fragments: Vec<SearchFragment>,
2970    pub features: Vec<ResultFeature>,
2971    pub group_values: Vec<JsonValue>,
2972    pub inner_hits: Vec<NamedNestedInnerHitsResult>,
2973}
2974
2975pub const LODESTONE_API_AGGREGATION_BUCKET_FORMAT_VERSION: u16 = 1;
2976#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2977#[serde(deny_unknown_fields)]
2978pub struct AggregationBucket {
2979    pub key: JsonValue,
2980    pub document_count: U64,
2981    pub sub_aggregations: Vec<AggregationResult>,
2982}
2983
2984pub const LODESTONE_API_AGGREGATION_RESULT_FORMAT_VERSION: u16 = 3;
2985#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
2986#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
2987pub enum AggregationResult {
2988    Terms {
2989        name: String,
2990        buckets: Vec<AggregationBucket>,
2991        partial: bool,
2992    },
2993    Histogram {
2994        name: String,
2995        buckets: Vec<AggregationBucket>,
2996        partial: bool,
2997    },
2998    DateHistogram {
2999        name: String,
3000        buckets: Vec<AggregationBucket>,
3001        partial: bool,
3002    },
3003    Composite {
3004        name: String,
3005        buckets: Vec<AggregationBucket>,
3006        #[serde(default, skip_serializing_if = "Option::is_none")]
3007        after: Option<Cursor>,
3008        partial: bool,
3009    },
3010    Filter {
3011        name: String,
3012        buckets: Vec<AggregationBucket>,
3013        partial: bool,
3014    },
3015    SingleBucket {
3016        name: String,
3017        document_count: U64,
3018        sub_aggregations: Vec<AggregationResult>,
3019        partial: bool,
3020    },
3021    Cardinality {
3022        name: String,
3023        #[serde(default, skip_serializing_if = "Option::is_none")]
3024        value: Option<ApproximateNumber>,
3025        partial: bool,
3026    },
3027    Percentiles {
3028        name: String,
3029        values: Vec<PercentileValue>,
3030        partial: bool,
3031    },
3032    ApproximateCardinality {
3033        name: String,
3034        value: ApproximateNumber,
3035        approximation: Approximation,
3036        partial: bool,
3037    },
3038    ApproximatePercentiles {
3039        name: String,
3040        values: Vec<ApproximatePercentileValue>,
3041        approximation: Approximation,
3042        partial: bool,
3043    },
3044    Sum {
3045        name: String,
3046        #[serde(default, skip_serializing_if = "Option::is_none")]
3047        value: Option<ApproximateNumber>,
3048        partial: bool,
3049    },
3050    Avg {
3051        name: String,
3052        #[serde(default, skip_serializing_if = "Option::is_none")]
3053        value: Option<ApproximateNumber>,
3054        partial: bool,
3055    },
3056    Min {
3057        name: String,
3058        #[serde(default, skip_serializing_if = "Option::is_none")]
3059        value: Option<ApproximateNumber>,
3060        partial: bool,
3061    },
3062    Max {
3063        name: String,
3064        #[serde(default, skip_serializing_if = "Option::is_none")]
3065        value: Option<ApproximateNumber>,
3066        partial: bool,
3067    },
3068    Stats {
3069        name: String,
3070        count: U64,
3071        #[serde(default, skip_serializing_if = "Option::is_none")]
3072        min: Option<ApproximateNumber>,
3073        #[serde(default, skip_serializing_if = "Option::is_none")]
3074        max: Option<ApproximateNumber>,
3075        #[serde(default, skip_serializing_if = "Option::is_none")]
3076        avg: Option<ApproximateNumber>,
3077        sum: ApproximateNumber,
3078        partial: bool,
3079    },
3080    TimeSeriesV1 {
3081        name: String,
3082        buckets: Vec<TimeSeriesBucket>,
3083        partial: bool,
3084    },
3085}
3086
3087pub const LODESTONE_API_SHARD_COUNTS_FORMAT_VERSION: u16 = 1;
3088#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3089#[serde(deny_unknown_fields)]
3090pub struct ShardCounts {
3091    pub total: u32,
3092    pub successful: u32,
3093    pub skipped: u32,
3094    pub failed: u32,
3095}
3096
3097pub const LODESTONE_API_TOTAL_HITS_RELATION_FORMAT_VERSION: u16 = 1;
3098#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3099#[serde(rename_all = "snake_case")]
3100pub enum TotalHitsRelation {
3101    Exact,
3102    LowerBound,
3103    Incomplete,
3104}
3105
3106pub const LODESTONE_API_SEARCH_TOTAL_FORMAT_VERSION: u16 = 1;
3107#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3108#[serde(deny_unknown_fields)]
3109pub struct SearchTotal {
3110    pub value: U64,
3111    pub relation: TotalHitsRelation,
3112    pub partial: bool,
3113}
3114
3115pub const LODESTONE_API_SEARCH_EXECUTION_FRESHNESS_FORMAT_VERSION: u16 = 1;
3116#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3117#[serde(rename_all = "snake_case")]
3118pub enum SearchExecutionFreshness {
3119    Realtime,
3120    Committed,
3121}
3122
3123pub const LODESTONE_API_SEARCH_FRESHNESS_FORMAT_VERSION: u16 = 1;
3124#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3125#[serde(rename_all = "snake_case")]
3126pub enum SearchFreshness {
3127    Auto,
3128    Realtime,
3129    Committed,
3130}
3131
3132pub const LODESTONE_API_SEARCH_DEGRADATION_REASON_FORMAT_VERSION: u16 = 1;
3133#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3134#[serde(rename_all = "snake_case")]
3135pub enum SearchDegradationReason {
3136    WriterUnavailable,
3137}
3138
3139pub const LODESTONE_API_SEARCH_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
3140#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3141#[serde(deny_unknown_fields)]
3142pub struct SearchAchievement {
3143    pub freshness: SearchExecutionFreshness,
3144    pub degradation_reasons: Vec<SearchDegradationReason>,
3145}
3146
3147pub const LODESTONE_API_SEARCH_FAILURE_STAGE_FORMAT_VERSION: u16 = 1;
3148#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3149#[serde(rename_all = "snake_case")]
3150pub enum SearchFailureStage {
3151    Preflight,
3152    Dispatch,
3153}
3154
3155pub const LODESTONE_API_SEARCH_FAILURE_REASON_FORMAT_VERSION: u16 = 1;
3156#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3157#[serde(rename_all = "snake_case")]
3158pub enum SearchFailureReason {
3159    Cancelled,
3160    Overloaded,
3161    ResourceLimit,
3162    DeadlineExceeded,
3163    Unavailable,
3164    InvalidResponse,
3165}
3166
3167pub const LODESTONE_API_COLLECTION_SHARD_FORMAT_VERSION: u16 = 1;
3168#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3169#[serde(deny_unknown_fields)]
3170pub struct CollectionShard {
3171    pub collection_id: Identity,
3172    pub index_id: Identity,
3173    pub shard_id: u32,
3174}
3175
3176pub const LODESTONE_API_SEARCH_PARTIAL_FAILURE_FORMAT_VERSION: u16 = 1;
3177#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3178#[serde(deny_unknown_fields)]
3179pub struct SearchPartialFailure {
3180    pub shard: CollectionShard,
3181    pub stage: SearchFailureStage,
3182    pub reason: SearchFailureReason,
3183    pub recovery: RecoveryAction,
3184}
3185
3186pub const LODESTONE_API_ARTIFACT_FORMAT_VERSION: u16 = 1;
3187#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3188#[serde(deny_unknown_fields)]
3189pub struct Artifact {
3190    pub locator: Locator,
3191    pub bytes: U64,
3192    pub sha256: Digest,
3193    pub expires_at: U64,
3194}
3195
3196pub const LODESTONE_API_PORTABILITY_STORAGE_CAPABILITY_FORMAT_VERSION: u16 = 1;
3197#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3198#[serde(deny_unknown_fields)]
3199pub struct PortabilityStorageCapability {
3200    pub backend_authority: String,
3201    pub object_prefix: String,
3202    pub maximum_bytes: U64,
3203    #[serde(default, skip_serializing_if = "Option::is_none")]
3204    pub key_capability_digest: Option<Digest>,
3205}
3206
3207pub const LODESTONE_API_COLLECTION_EXPORT_ARTIFACT_FORMAT_VERSION: u16 = 1;
3208#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3209#[serde(deny_unknown_fields)]
3210pub struct CollectionExportArtifact {
3211    pub artifact: Artifact,
3212    pub backend_authority: String,
3213    pub object_key: String,
3214    pub source_collection_id: Identity,
3215    pub source_catalog_revision: U64,
3216}
3217
3218pub const LODESTONE_API_INDEX_TRANSFER_PAGE_FORMAT_VERSION: u16 = 1;
3219#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3220#[serde(deny_unknown_fields)]
3221pub struct IndexTransferPage {
3222    pub ordinal: u32,
3223    pub object_key: String,
3224    pub bytes: U64,
3225    pub content_digest: Digest,
3226    pub record_count: u32,
3227}
3228
3229pub const LODESTONE_API_INDEX_TRANSFER_ARTIFACT_FORMAT_VERSION: u16 = 1;
3230#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3231#[serde(deny_unknown_fields)]
3232pub struct IndexTransferArtifact {
3233    pub manifest: Artifact,
3234    pub manifest_object_key: String,
3235    pub transfer_identity: Digest,
3236    pub source_cluster_storage_id: Identity,
3237    pub source_collection_id: Identity,
3238    pub source_index: Resource,
3239    pub source_catalog_revision: U64,
3240    pub source_cut_digest: Digest,
3241    pub pages: Vec<IndexTransferPage>,
3242    pub record_count: u32,
3243}
3244
3245pub const LODESTONE_API_SEARCH_VALIDATION_BOUND_FORMAT_VERSION: u16 = 1;
3246#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3247#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3248pub enum SearchValidationBound {
3249    Exact { value: U64 },
3250    UpperBound { value: U64 },
3251    Unknown { reason: String },
3252}
3253
3254pub const LODESTONE_API_SEARCH_VALIDATION_ESTIMATES_FORMAT_VERSION: u16 = 1;
3255#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3256#[serde(deny_unknown_fields)]
3257pub struct SearchValidationEstimates {
3258    pub shard_fanout: SearchValidationBound,
3259    pub candidate_documents: SearchValidationBound,
3260    pub segments: SearchValidationBound,
3261    pub buckets: SearchValidationBound,
3262    pub memory_bytes: SearchValidationBound,
3263    pub object_reads: SearchValidationBound,
3264    pub object_bytes: SearchValidationBound,
3265    pub response_bytes: SearchValidationBound,
3266    pub planning_work: SearchValidationBound,
3267}
3268
3269pub const LODESTONE_API_SEARCH_VALIDATION_LIMIT_FORMAT_VERSION: u16 = 1;
3270#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3271#[serde(deny_unknown_fields)]
3272pub struct SearchValidationLimit {
3273    pub id: String,
3274    pub applied: U64,
3275    pub unit: String,
3276}
3277
3278pub const LODESTONE_API_OPERATION_KIND_FORMAT_VERSION: u16 = 2;
3279#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3280#[serde(rename_all = "snake_case")]
3281pub enum OperationKind {
3282    Catalog,
3283    MaintenanceTask,
3284    Security,
3285    Diagnostic,
3286    CollectionExport,
3287    CollectionRestore,
3288    IndexExport,
3289    IndexImport,
3290    VectorEvaluation,
3291    VectorWarm,
3292    Lifecycle,
3293    Quota,
3294    Admission,
3295}
3296
3297pub const LODESTONE_API_OPERATION_AUTHORITY_FORMAT_VERSION: u16 = 1;
3298#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3299#[serde(rename_all = "snake_case")]
3300pub enum OperationAuthority {
3301    Catalog,
3302    Tasks,
3303    Security,
3304    Diagnostics,
3305    Portability,
3306    Lifecycle,
3307    Quota,
3308    Admission,
3309}
3310
3311pub const LODESTONE_API_OPERATION_TARGET_FORMAT_VERSION: u16 = 1;
3312#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3313#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3314pub enum OperationTarget {
3315    Collection { collection_id: Identity },
3316    Resource { resource: Resource },
3317    Artifact { locator: Locator },
3318    None,
3319}
3320
3321pub const LODESTONE_API_OPERATION_STATE_FORMAT_VERSION: u16 = 1;
3322#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3323#[serde(rename_all = "snake_case")]
3324pub enum OperationState {
3325    Pending,
3326    Succeeded,
3327    Failed,
3328    Cancelled,
3329}
3330
3331pub const LODESTONE_API_OPERATION_PENDING_STATE_FORMAT_VERSION: u16 = 1;
3332#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3333#[serde(rename_all = "snake_case")]
3334pub enum OperationPendingState {
3335    Queued,
3336    Running,
3337    CancelRequested,
3338}
3339
3340pub const LODESTONE_API_OPERATION_PROGRESS_UNIT_FORMAT_VERSION: u16 = 1;
3341#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3342#[serde(rename_all = "snake_case")]
3343pub enum OperationProgressUnit {
3344    BasisPoints,
3345    Items,
3346    Bytes,
3347    WorkUnits,
3348}
3349
3350pub const LODESTONE_API_OPERATION_PROGRESS_FORMAT_VERSION: u16 = 1;
3351#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3352#[serde(deny_unknown_fields)]
3353pub struct OperationProgress {
3354    pub completed: U64,
3355    pub total: U64,
3356    pub unit: OperationProgressUnit,
3357}
3358
3359pub const LODESTONE_API_OPERATION_RESULT_FORMAT_VERSION: u16 = 1;
3360#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3361#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3362pub enum OperationResult {
3363    None,
3364    Artifacts { items: Vec<Artifact> },
3365}
3366
3367pub const LODESTONE_API_OPERATION_FAILURE_FORMAT_VERSION: u16 = 1;
3368#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3369#[serde(deny_unknown_fields)]
3370pub struct OperationFailure {
3371    pub error: ErrorBody,
3372}
3373
3374pub const LODESTONE_API_OPERATION_CANCELLATION_FORMAT_VERSION: u16 = 1;
3375#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3376#[serde(rename_all = "snake_case")]
3377pub enum OperationCancellation {
3378    NotCancellable,
3379    Cancellable,
3380    CancelRequested,
3381    Cancelled,
3382}
3383
3384pub const LODESTONE_API_OPERATION_RETENTION_STATE_FORMAT_VERSION: u16 = 1;
3385#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3386#[serde(rename_all = "snake_case")]
3387pub enum OperationRetentionState {
3388    Active,
3389    Retired,
3390}
3391
3392pub const LODESTONE_API_OPERATION_RETENTION_FORMAT_VERSION: u16 = 1;
3393#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3394#[serde(deny_unknown_fields)]
3395pub struct OperationRetention {
3396    pub state: OperationRetentionState,
3397    #[serde(default, skip_serializing_if = "Option::is_none")]
3398    pub retire_after: Option<U64>,
3399}
3400
3401pub const LODESTONE_API_OPERATION_FORMAT_VERSION: u16 = 2;
3402#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3403#[serde(deny_unknown_fields)]
3404pub struct Operation {
3405    pub locator: Locator,
3406    pub kind: OperationKind,
3407    pub authority: OperationAuthority,
3408    pub target: OperationTarget,
3409    pub authority_revision: U64,
3410    pub current_state: OperationState,
3411    #[serde(default, skip_serializing_if = "Option::is_none")]
3412    pub pending_state: Option<OperationPendingState>,
3413    #[serde(default, skip_serializing_if = "Option::is_none")]
3414    pub progress: Option<OperationProgress>,
3415    #[serde(default, skip_serializing_if = "Option::is_none")]
3416    pub result: Option<OperationResult>,
3417    #[serde(default, skip_serializing_if = "Option::is_none")]
3418    pub failure: Option<OperationFailure>,
3419    pub cancellation: OperationCancellation,
3420    pub retention: OperationRetention,
3421    pub submitted_at: U64,
3422    #[serde(default, skip_serializing_if = "Option::is_none")]
3423    pub terminal_at: Option<U64>,
3424}
3425
3426pub const LODESTONE_API_WRITE_DURABILITY_BOUNDARY_FORMAT_VERSION: u16 = 1;
3427#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3428#[serde(rename_all = "snake_case")]
3429pub enum WriteDurabilityBoundary {
3430    Registered,
3431    IncarnationMemory,
3432}
3433
3434pub const LODESTONE_API_WRITE_VISIBILITY_MODE_FORMAT_VERSION: u16 = 1;
3435#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3436#[serde(rename_all = "snake_case")]
3437pub enum WriteVisibilityMode {
3438    Applied,
3439    WaitFor,
3440}
3441
3442pub const LODESTONE_API_WRITE_RESPONSE_STAGE_FORMAT_VERSION: u16 = 1;
3443#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3444#[serde(rename_all = "snake_case")]
3445pub enum WriteResponseStage {
3446    Validated,
3447    Admitted,
3448    Sequenced,
3449    ObjectPut,
3450    Registered,
3451    AppliedToActiveMemtable,
3452    MicroCommitted,
3453    Sealed,
3454}
3455
3456pub const LODESTONE_API_WRITE_ACHIEVEMENT_FORMAT_VERSION: u16 = 1;
3457#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3458#[serde(deny_unknown_fields)]
3459pub struct WriteAchievement {
3460    pub durability_class: ResourceDurabilityClass,
3461    pub durability_boundary: WriteDurabilityBoundary,
3462    pub visibility_mode: WriteVisibilityMode,
3463    pub response_stage: WriteResponseStage,
3464}
3465
3466pub const LODESTONE_API_MUTATION_RESOLVER_FORMAT_VERSION: u16 = 1;
3467#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3468#[serde(rename_all = "snake_case")]
3469pub enum MutationResolver {
3470    CloneIndex,
3471    GetHistory,
3472    ResolveAppendBulk,
3473    ResolveCatalogAction,
3474    ResolveDocumentBulk,
3475    ResolveDocumentMutation,
3476    ResolveSecurityAction,
3477    ResolveServiceCredentialReservation,
3478    ResolveStateWrite,
3479}
3480
3481pub const LODESTONE_API_MUTATION_OUTCOME_FORMAT_VERSION: u16 = 1;
3482#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3483#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
3484pub enum MutationOutcome {
3485    Terminal,
3486    Pending {
3487        #[serde(default, skip_serializing_if = "Option::is_none")]
3488        resolver: Option<MutationResolver>,
3489    },
3490    Indeterminate {
3491        #[serde(default, skip_serializing_if = "Option::is_none")]
3492        resolver: Option<MutationResolver>,
3493    },
3494    ResolutionRequired {
3495        resolver: MutationResolver,
3496    },
3497}
3498
3499pub const LODESTONE_API_SUBMISSION_STATE_FORMAT_VERSION: u16 = 1;
3500#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3501#[serde(rename_all = "snake_case")]
3502pub enum SubmissionState {
3503    NotSubmitted,
3504    Submitted,
3505    Resolved,
3506    KnownRetired,
3507    Indeterminate,
3508}
3509
3510pub const LODESTONE_API_EXPECTED_BINDING_FORMAT_VERSION: u16 = 1;
3511#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3512#[serde(deny_unknown_fields)]
3513pub struct ExpectedBinding {
3514    pub incarnation: Identity,
3515    pub revision: U64,
3516}
3517
3518pub const LODESTONE_API_ADMINISTRATION_ALIAS_ACTION_FORMAT_VERSION: u16 = 1;
3519#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3520#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3521pub enum AdministrationAliasAction {
3522    Put {
3523        name: String,
3524        #[serde(default, skip_serializing_if = "Option::is_none")]
3525        expected_revision: Option<U64>,
3526        targets: Vec<AliasTarget>,
3527        #[serde(default, skip_serializing_if = "Option::is_none")]
3528        filter: Option<RawJson>,
3529        #[serde(default, skip_serializing_if = "Option::is_none")]
3530        index_routing: Option<String>,
3531        #[serde(default, skip_serializing_if = "Option::is_none")]
3532        search_routing: Option<String>,
3533    },
3534    Delete {
3535        name: String,
3536        expected_revision: U64,
3537    },
3538}
3539
3540pub const LODESTONE_API_ADMINISTRATION_MUTATION_FORMAT_VERSION: u16 = 1;
3541#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3542#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3543pub enum AdministrationMutation {
3544    ApplyAliasActions {
3545        actions: Vec<AdministrationAliasAction>,
3546    },
3547    PutComponentTemplate {
3548        name: String,
3549        #[serde(default, skip_serializing_if = "Option::is_none")]
3550        expected: Option<ExpectedBinding>,
3551        mapping: Mapping,
3552        settings: RawJson,
3553        #[serde(default, skip_serializing_if = "Option::is_none")]
3554        resource_spec: Option<IndexResourceSpec>,
3555    },
3556    DeleteComponentTemplate {
3557        name: String,
3558        expected: ExpectedBinding,
3559    },
3560    PutIndexTemplate {
3561        name: String,
3562        #[serde(default, skip_serializing_if = "Option::is_none")]
3563        expected: Option<ExpectedBinding>,
3564        priority: i32,
3565        data_stream: bool,
3566        index_patterns: Vec<String>,
3567        components: Vec<ExpectedBinding>,
3568        mapping: Mapping,
3569        settings: RawJson,
3570        #[serde(default, skip_serializing_if = "Option::is_none")]
3571        resource_spec: Option<IndexResourceSpec>,
3572    },
3573    DeleteIndexTemplate {
3574        name: String,
3575        expected: ExpectedBinding,
3576    },
3577    PutIngestPipeline {
3578        name: String,
3579        #[serde(default, skip_serializing_if = "Option::is_none")]
3580        expected: Option<ExpectedBinding>,
3581        definition: RawJson,
3582    },
3583    DeleteIngestPipeline {
3584        name: String,
3585        expected: ExpectedBinding,
3586    },
3587    PutLifecyclePolicy {
3588        name: String,
3589        #[serde(default, skip_serializing_if = "Option::is_none")]
3590        expected: Option<ExpectedBinding>,
3591        rollover: RolloverThresholds,
3592        retention: RetentionPolicy,
3593        merge_hint: bool,
3594        freeze_hint: bool,
3595        delete_expired: bool,
3596    },
3597    DeleteLifecyclePolicy {
3598        name: String,
3599        expected: ExpectedBinding,
3600    },
3601    CreateDataStream {
3602        name: String,
3603        timestamp_field: String,
3604        index_template: ExpectedBinding,
3605        #[serde(default, skip_serializing_if = "Option::is_none")]
3606        lifecycle_policy: Option<ExpectedBinding>,
3607    },
3608    DeleteDataStream {
3609        name: String,
3610        expected_revision: U64,
3611    },
3612    RolloverDataStream {
3613        name: String,
3614        expected_revision: U64,
3615    },
3616}
3617
3618pub const LODESTONE_API_ADMINISTRATION_OUTCOME_FORMAT_VERSION: u16 = 1;
3619#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3620#[serde(deny_unknown_fields)]
3621pub struct AdministrationOutcome {
3622    pub action_id: Digest,
3623    pub authority_revision: U64,
3624    pub state: String,
3625    #[serde(default, skip_serializing_if = "Option::is_none")]
3626    pub resource: Option<Resource>,
3627}
3628
3629pub const LODESTONE_API_INDEX_CHANGE_APPLY_RECEIPT_FORMAT_VERSION: u16 = 1;
3630#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3631#[serde(deny_unknown_fields)]
3632pub struct IndexChangeApplyReceipt {
3633    pub action_id: Digest,
3634    pub semantic_digest: Digest,
3635    pub index: Resource,
3636    pub revision: U64,
3637    pub schema_generation: U64,
3638    pub state: String,
3639}
3640
3641pub const LODESTONE_API_BULK_DOCUMENT_ITEM_FORMAT_VERSION: u16 = 2;
3642#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3643#[serde(deny_unknown_fields)]
3644pub struct BulkDocumentItem {
3645    pub item_action_id: Digest,
3646    pub document_id: String,
3647    pub operation: String,
3648    #[serde(default, skip_serializing_if = "Option::is_none")]
3649    pub source: Option<RawJson>,
3650    #[serde(default, skip_serializing_if = "Option::is_none")]
3651    pub record: Option<NativeRecord>,
3652    #[serde(default, skip_serializing_if = "Option::is_none")]
3653    pub routing: Option<String>,
3654    #[serde(default, skip_serializing_if = "Option::is_none")]
3655    pub condition: Option<DocumentMutationCondition>,
3656    #[serde(default, skip_serializing_if = "Option::is_none")]
3657    pub pipeline: Option<IngestPipelineSelection>,
3658    pub semantic_digest: Digest,
3659}
3660
3661pub const LODESTONE_API_BULK_DOCUMENT_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
3662#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3663#[serde(deny_unknown_fields)]
3664pub struct BulkDocumentItemOutcome {
3665    pub item_action_id: Digest,
3666    #[serde(default, skip_serializing_if = "Option::is_none")]
3667    pub locator: Option<Locator>,
3668    pub state: SubmissionState,
3669    #[serde(default, skip_serializing_if = "Option::is_none")]
3670    pub sequence: Option<U64>,
3671    #[serde(default, skip_serializing_if = "Option::is_none")]
3672    pub mapping_generation: Option<U64>,
3673    pub mapping_adopted: bool,
3674    pub no_document_effect: bool,
3675    #[serde(default, skip_serializing_if = "Option::is_none")]
3676    pub error: Option<ErrorBody>,
3677}
3678
3679pub const LODESTONE_API_BULK_DOCUMENT_OUTCOME_FORMAT_VERSION: u16 = 1;
3680#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3681#[serde(deny_unknown_fields)]
3682pub struct BulkDocumentOutcome {
3683    pub batch_id: Digest,
3684    pub index: Resource,
3685    pub items: Vec<BulkDocumentItemOutcome>,
3686    pub complete: bool,
3687    #[serde(default, skip_serializing_if = "Option::is_none")]
3688    pub achievement: Option<WriteAchievement>,
3689}
3690
3691pub const LODESTONE_API_METRIC_ATTRIBUTE_VALUE_FORMAT_VERSION: u16 = 1;
3692#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3693#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3694pub enum MetricAttributeValue {
3695    String { value: String },
3696    Boolean { value: bool },
3697    I64 { value: I64 },
3698    U64 { value: U64 },
3699    F64Bits { value: U64 },
3700}
3701
3702pub const LODESTONE_API_METRIC_ATTRIBUTE_FORMAT_VERSION: u16 = 1;
3703#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3704#[serde(deny_unknown_fields)]
3705pub struct MetricAttribute {
3706    pub key: String,
3707    pub value: MetricAttributeValue,
3708}
3709
3710pub const LODESTONE_API_METRIC_NUMBER_FORMAT_VERSION: u16 = 1;
3711#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3712#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3713pub enum MetricNumber {
3714    I64 { value: I64 },
3715    F64Bits { value: U64 },
3716}
3717
3718pub const LODESTONE_API_METRIC_TEMPORALITY_FORMAT_VERSION: u16 = 1;
3719#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3720#[serde(rename_all = "snake_case")]
3721pub enum MetricTemporality {
3722    Cumulative,
3723    Delta,
3724}
3725
3726pub const LODESTONE_API_METRIC_POINT_KIND_FORMAT_VERSION: u16 = 1;
3727#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3728#[serde(rename_all = "snake_case")]
3729pub enum MetricPointKind {
3730    Gauge,
3731    Sum,
3732    ExplicitHistogram,
3733    ExponentialHistogram,
3734}
3735
3736pub const LODESTONE_API_METRIC_EXPONENTIAL_BUCKETS_FORMAT_VERSION: u16 = 1;
3737#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3738#[serde(deny_unknown_fields)]
3739pub struct MetricExponentialBuckets {
3740    pub offset: i32,
3741    pub counts: Vec<U64>,
3742}
3743
3744pub const LODESTONE_API_METRIC_DATA_FORMAT_VERSION: u16 = 1;
3745#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3746#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3747pub enum MetricData {
3748    Gauge {
3749        value: MetricNumber,
3750    },
3751    Sum {
3752        value: MetricNumber,
3753        temporality: MetricTemporality,
3754        monotonic: bool,
3755    },
3756    ExplicitHistogram {
3757        temporality: MetricTemporality,
3758        count: U64,
3759        #[serde(default, skip_serializing_if = "Option::is_none")]
3760        sum: Option<MetricNumber>,
3761        bounds_f64_bits: Vec<U64>,
3762        bucket_counts: Vec<U64>,
3763    },
3764    ExponentialHistogram {
3765        temporality: MetricTemporality,
3766        count: U64,
3767        #[serde(default, skip_serializing_if = "Option::is_none")]
3768        sum: Option<MetricNumber>,
3769        scale: i32,
3770        zero_count: U64,
3771        positive: MetricExponentialBuckets,
3772        negative: MetricExponentialBuckets,
3773    },
3774}
3775
3776pub const LODESTONE_API_METRIC_INSTRUMENTATION_SCOPE_FORMAT_VERSION: u16 = 1;
3777#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3778#[serde(deny_unknown_fields)]
3779pub struct MetricInstrumentationScope {
3780    pub name: String,
3781    #[serde(default, skip_serializing_if = "Option::is_none")]
3782    pub version: Option<String>,
3783    #[serde(default, skip_serializing_if = "Option::is_none")]
3784    pub schema_url: Option<String>,
3785    pub attributes: Vec<MetricAttribute>,
3786}
3787
3788pub const LODESTONE_API_METRIC_EXEMPLAR_FORMAT_VERSION: u16 = 1;
3789#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3790#[serde(deny_unknown_fields)]
3791pub struct MetricExemplar {
3792    pub timestamp_unix_nanos: U64,
3793    pub value: MetricNumber,
3794    #[serde(default, skip_serializing_if = "Option::is_none")]
3795    pub trace_id: Option<String>,
3796    #[serde(default, skip_serializing_if = "Option::is_none")]
3797    pub span_id: Option<String>,
3798    pub filtered_attributes: Vec<MetricAttribute>,
3799}
3800
3801pub const LODESTONE_API_METRIC_POINT_SHAPE_VERSION: u16 = 1;
3802pub const LODESTONE_API_METRIC_POINT_FORMAT_VERSION: u16 = 1;
3803#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3804#[serde(deny_unknown_fields)]
3805pub struct MetricPoint {
3806    pub format_version: u32,
3807    pub resource_attributes: Vec<MetricAttribute>,
3808    pub instrumentation_scope: MetricInstrumentationScope,
3809    pub metric_name: String,
3810    #[serde(default, skip_serializing_if = "Option::is_none")]
3811    pub description: Option<String>,
3812    pub unit: String,
3813    pub series_attributes: Vec<MetricAttribute>,
3814    pub timestamp_unix_nanos: U64,
3815    #[serde(default, skip_serializing_if = "Option::is_none")]
3816    pub start_timestamp_unix_nanos: Option<U64>,
3817    pub data: MetricData,
3818    pub exemplars: Vec<MetricExemplar>,
3819}
3820
3821pub const LODESTONE_API_ENTITY_REF_FORMAT_VERSION: u16 = 1;
3822#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3823#[serde(deny_unknown_fields)]
3824pub struct EntityRef {
3825    pub entity_kind: String,
3826    pub entity_id: String,
3827}
3828
3829pub const LODESTONE_API_RELATIONSHIP_EVIDENCE_REF_FORMAT_VERSION: u16 = 1;
3830#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3831#[serde(deny_unknown_fields)]
3832pub struct RelationshipEvidenceRef {
3833    pub index: Resource,
3834    pub record_id: String,
3835}
3836
3837pub const LODESTONE_API_RELATIONSHIP_DIRECTIONALITY_FORMAT_VERSION: u16 = 1;
3838#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
3839#[serde(rename_all = "snake_case")]
3840pub enum RelationshipDirectionality {
3841    Directed,
3842    Undirected,
3843}
3844
3845pub const LODESTONE_API_RELATIONSHIP_RECORD_SHAPE_VERSION: u16 = 1;
3846pub const LODESTONE_API_RELATIONSHIP_RECORD_FORMAT_VERSION: u16 = 1;
3847#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3848#[serde(deny_unknown_fields)]
3849pub struct RelationshipRecord {
3850    pub format_version: u32,
3851    pub relationship_id: String,
3852    pub source: EntityRef,
3853    pub target: EntityRef,
3854    pub relationship_type: String,
3855    pub directionality: RelationshipDirectionality,
3856    #[serde(default, skip_serializing_if = "Option::is_none")]
3857    pub valid_from_unix_nanos: Option<U64>,
3858    #[serde(default, skip_serializing_if = "Option::is_none")]
3859    pub valid_through_unix_nanos: Option<U64>,
3860    pub provenance: Vec<String>,
3861    pub evidence: Vec<RelationshipEvidenceRef>,
3862    pub assertion_class: String,
3863}
3864
3865pub const LODESTONE_API_PROFILE_LABEL_FORMAT_VERSION: u16 = 1;
3866#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3867#[serde(deny_unknown_fields)]
3868pub struct ProfileLabel {
3869    pub key: String,
3870    pub value: String,
3871}
3872
3873pub const LODESTONE_API_PROFILE_SAMPLE_TYPE_FORMAT_VERSION: u16 = 1;
3874#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3875#[serde(deny_unknown_fields)]
3876pub struct ProfileSampleType {
3877    pub sample_type: String,
3878    pub unit: String,
3879}
3880
3881pub const LODESTONE_API_PROFILE_MAPPING_FORMAT_VERSION: u16 = 1;
3882#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3883#[serde(deny_unknown_fields)]
3884pub struct ProfileMapping {
3885    pub mapping_id: String,
3886    pub build_id: String,
3887    pub module_id: String,
3888    #[serde(default, skip_serializing_if = "Option::is_none")]
3889    pub filename: Option<String>,
3890}
3891
3892pub const LODESTONE_API_PROFILE_FUNCTION_FORMAT_VERSION: u16 = 1;
3893#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3894#[serde(deny_unknown_fields)]
3895pub struct ProfileFunction {
3896    pub function_id: String,
3897    #[serde(default, skip_serializing_if = "Option::is_none")]
3898    pub name: Option<String>,
3899    #[serde(default, skip_serializing_if = "Option::is_none")]
3900    pub system_name: Option<String>,
3901    #[serde(default, skip_serializing_if = "Option::is_none")]
3902    pub filename: Option<String>,
3903    #[serde(default, skip_serializing_if = "Option::is_none")]
3904    pub start_line: Option<U64>,
3905    #[serde(default, skip_serializing_if = "Option::is_none")]
3906    pub symbol_observation_id: Option<String>,
3907}
3908
3909pub const LODESTONE_API_PROFILE_LINE_FORMAT_VERSION: u16 = 1;
3910#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3911#[serde(deny_unknown_fields)]
3912pub struct ProfileLine {
3913    pub function_id: String,
3914    pub line: U64,
3915}
3916
3917pub const LODESTONE_API_PROFILE_LOCATION_FORMAT_VERSION: u16 = 1;
3918#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3919#[serde(deny_unknown_fields)]
3920pub struct ProfileLocation {
3921    pub location_id: String,
3922    #[serde(default, skip_serializing_if = "Option::is_none")]
3923    pub mapping_id: Option<String>,
3924    pub address: U64,
3925    pub lines: Vec<ProfileLine>,
3926}
3927
3928pub const LODESTONE_API_PROFILE_STACK_FORMAT_VERSION: u16 = 1;
3929#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3930#[serde(deny_unknown_fields)]
3931pub struct ProfileStack {
3932    pub stack_id: String,
3933    #[serde(default, skip_serializing_if = "Option::is_none")]
3934    pub parent_stack_id: Option<String>,
3935    pub location_id: String,
3936}
3937
3938pub const LODESTONE_API_PROFILE_SAMPLE_FORMAT_VERSION: u16 = 1;
3939#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3940#[serde(deny_unknown_fields)]
3941pub struct ProfileSample {
3942    pub sample_id: String,
3943    pub stack_id: String,
3944    pub values: Vec<MetricNumber>,
3945    pub labels: Vec<ProfileLabel>,
3946    #[serde(default, skip_serializing_if = "Option::is_none")]
3947    pub trace_id: Option<String>,
3948    #[serde(default, skip_serializing_if = "Option::is_none")]
3949    pub span_id: Option<String>,
3950}
3951
3952pub const LODESTONE_API_PROFILE_INSTRUMENTATION_SCOPE_FORMAT_VERSION: u16 = 1;
3953#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3954#[serde(deny_unknown_fields)]
3955pub struct ProfileInstrumentationScope {
3956    pub name: String,
3957    #[serde(default, skip_serializing_if = "Option::is_none")]
3958    pub version: Option<String>,
3959    pub attributes: Vec<ProfileLabel>,
3960}
3961
3962pub const LODESTONE_API_PROFILE_BATCH_SHAPE_VERSION: u16 = 1;
3963pub const LODESTONE_API_PROFILE_BATCH_FORMAT_VERSION: u16 = 1;
3964#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3965#[serde(deny_unknown_fields)]
3966pub struct ProfileBatch {
3967    pub format_version: u32,
3968    pub profile_id: String,
3969    pub batch_id: String,
3970    pub start_unix_nanos: U64,
3971    pub end_unix_nanos: U64,
3972    pub duration_nanos: U64,
3973    pub period_nanos: U64,
3974    pub sample_types: Vec<ProfileSampleType>,
3975    pub resource_attributes: Vec<ProfileLabel>,
3976    pub instrumentation_scope: ProfileInstrumentationScope,
3977    pub mappings: Vec<ProfileMapping>,
3978    pub functions: Vec<ProfileFunction>,
3979    pub locations: Vec<ProfileLocation>,
3980    pub stacks: Vec<ProfileStack>,
3981    pub samples: Vec<ProfileSample>,
3982}
3983
3984pub const LODESTONE_API_NATIVE_RECORD_FORMAT_VERSION: u16 = 3;
3985#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3986#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
3987pub enum NativeRecord {
3988    Document { source: RawJson },
3989    MetricPoint { point: Box<MetricPoint> },
3990    Relationship { relationship: Box<RelationshipRecord> },
3991    ProfileBatch { batch: Box<ProfileBatch> },
3992}
3993
3994pub const LODESTONE_API_RETAINED_APPEND_ITEM_FORMAT_VERSION: u16 = 4;
3995#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
3996#[serde(deny_unknown_fields)]
3997pub struct RetainedAppendItem {
3998    pub item_action_id: Digest,
3999    pub document_id: String,
4000    pub record: NativeRecord,
4001}
4002
4003pub const LODESTONE_API_RETAINED_APPEND_STATE_FORMAT_VERSION: u16 = 1;
4004#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4005#[serde(rename_all = "snake_case")]
4006pub enum RetainedAppendState {
4007    Prepared,
4008    Committed,
4009    Replayed,
4010    Conflict,
4011    NotSubmittedRetryable,
4012    NotSubmittedTerminal,
4013    SubmittedIndeterminate,
4014    Retired,
4015}
4016
4017pub const LODESTONE_API_RETAINED_APPEND_RETRY_SAFETY_FORMAT_VERSION: u16 = 1;
4018#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4019#[serde(rename_all = "snake_case")]
4020pub enum RetainedAppendRetrySafety {
4021    Safe,
4022    ResolveOnly,
4023    Terminal,
4024}
4025
4026pub const LODESTONE_API_RETAINED_APPEND_ITEM_OUTCOME_FORMAT_VERSION: u16 = 1;
4027#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4028#[serde(deny_unknown_fields)]
4029pub struct RetainedAppendItemOutcome {
4030    pub item_action_id: Digest,
4031    #[serde(default, skip_serializing_if = "Option::is_none")]
4032    pub locator: Option<Locator>,
4033    #[serde(default, skip_serializing_if = "Option::is_none")]
4034    pub semantic_digest: Option<Digest>,
4035    pub state: RetainedAppendState,
4036    pub retry_safety: RetainedAppendRetrySafety,
4037    #[serde(default, skip_serializing_if = "Option::is_none")]
4038    pub sequence: Option<U64>,
4039    #[serde(default, skip_serializing_if = "Option::is_none")]
4040    pub primary_term: Option<U64>,
4041    #[serde(default, skip_serializing_if = "Option::is_none")]
4042    pub error: Option<ErrorBody>,
4043}
4044
4045pub const LODESTONE_API_RETAINED_APPEND_BULK_OUTCOME_FORMAT_VERSION: u16 = 1;
4046#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4047#[serde(deny_unknown_fields)]
4048pub struct RetainedAppendBulkOutcome {
4049    pub batch_id: Digest,
4050    pub index: Resource,
4051    pub items: Vec<RetainedAppendItemOutcome>,
4052    pub complete: bool,
4053    #[serde(default, skip_serializing_if = "Option::is_none")]
4054    pub achievement: Option<WriteAchievement>,
4055}
4056
4057pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_STATE_FORMAT_VERSION: u16 = 1;
4058#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4059#[serde(rename_all = "snake_case")]
4060pub enum RetainedAppendObservationState {
4061    Visible,
4062    Pending,
4063    SubmittedIndeterminate,
4064    Conflict,
4065    Retired,
4066}
4067
4068pub const LODESTONE_API_RETAINED_APPEND_OBSERVATION_OUTCOME_FORMAT_VERSION: u16 = 1;
4069#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4070#[serde(deny_unknown_fields)]
4071pub struct RetainedAppendObservationOutcome {
4072    pub index: Resource,
4073    pub locator: Locator,
4074    pub state: RetainedAppendObservationState,
4075    #[serde(default, skip_serializing_if = "Option::is_none")]
4076    pub sequence: Option<U64>,
4077    #[serde(default, skip_serializing_if = "Option::is_none")]
4078    pub primary_term: Option<U64>,
4079}
4080
4081pub const LODESTONE_API_BINARY_VALUE_FORMAT_VERSION: u16 = 1;
4082#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4083#[serde(deny_unknown_fields)]
4084pub struct BinaryValue {
4085    pub bytes_base64: String,
4086}
4087
4088pub const LODESTONE_API_STATE_HASH_FIELD_FORMAT_VERSION: u16 = 1;
4089#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4090#[serde(deny_unknown_fields)]
4091pub struct StateHashField {
4092    pub field: BinaryValue,
4093    pub value: BinaryValue,
4094}
4095
4096pub const LODESTONE_API_STATE_SET_ENTRY_FORMAT_VERSION: u16 = 1;
4097#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4098#[serde(deny_unknown_fields)]
4099pub struct StateSetEntry {
4100    pub key: BinaryValue,
4101    pub value: BinaryValue,
4102}
4103
4104pub const LODESTONE_API_STATE_SET_CONDITION_FORMAT_VERSION: u16 = 1;
4105#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4106#[serde(rename_all = "snake_case")]
4107pub enum StateSetCondition {
4108    Always,
4109    IfAbsent,
4110    IfPresent,
4111}
4112
4113pub const LODESTONE_API_STATE_OPERATION_FORMAT_VERSION: u16 = 1;
4114#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4115#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4116pub enum StateOperation {
4117    Get {
4118        key: BinaryValue,
4119    },
4120    Set {
4121        key: BinaryValue,
4122        value: BinaryValue,
4123        condition: StateSetCondition,
4124        #[serde(default, skip_serializing_if = "Option::is_none")]
4125        expires_at_millis: Option<U64>,
4126    },
4127    Delete {
4128        keys: Vec<BinaryValue>,
4129    },
4130    Exists {
4131        keys: Vec<BinaryValue>,
4132    },
4133    ExpireAt {
4134        key: BinaryValue,
4135        absolute_millis: U64,
4136    },
4137    TtlStatus {
4138        key: BinaryValue,
4139    },
4140    Persist {
4141        key: BinaryValue,
4142    },
4143    MultiGet {
4144        keys: Vec<BinaryValue>,
4145    },
4146    MultiSet {
4147        entries: Vec<StateSetEntry>,
4148    },
4149    Increment {
4150        key: BinaryValue,
4151        delta: I64,
4152    },
4153    HashGet {
4154        key: BinaryValue,
4155        field: BinaryValue,
4156    },
4157    HashSet {
4158        key: BinaryValue,
4159        fields: Vec<StateHashField>,
4160    },
4161    HashGetAll {
4162        key: BinaryValue,
4163    },
4164}
4165
4166pub const LODESTONE_API_STATE_OPTIONAL_VALUE_FORMAT_VERSION: u16 = 1;
4167#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4168#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4169pub enum StateOptionalValue {
4170    Missing,
4171    Value { value: BinaryValue },
4172}
4173
4174pub const LODESTONE_API_STATE_COMMAND_RESULT_FORMAT_VERSION: u16 = 1;
4175#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4176#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4177pub enum StateCommandResult {
4178    Get {
4179        value: StateOptionalValue,
4180    },
4181    Set {
4182        applied: bool,
4183    },
4184    Delete {
4185        removed: u32,
4186    },
4187    Exists {
4188        count: u32,
4189    },
4190    Expire {
4191        changed: bool,
4192    },
4193    TtlStatus {
4194        state: String,
4195        #[serde(default, skip_serializing_if = "Option::is_none")]
4196        remaining_millis: Option<U64>,
4197    },
4198    Persist {
4199        changed: bool,
4200    },
4201    MultiGet {
4202        values: Vec<StateOptionalValue>,
4203    },
4204    MultiSet {
4205        written: u32,
4206    },
4207    Increment {
4208        value: I64,
4209    },
4210    HashGet {
4211        value: StateOptionalValue,
4212    },
4213    HashSet {
4214        fields_added: u32,
4215    },
4216    HashGetAll {
4217        fields: Vec<StateHashField>,
4218    },
4219}
4220
4221pub const LODESTONE_API_STATE_WRITE_RESOLUTION_FORMAT_VERSION: u16 = 1;
4222#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4223#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4224pub enum StateWriteResolution {
4225    NotSubmitted,
4226    Resolved {
4227        result: StateCommandResult,
4228        sequence: U64,
4229    },
4230    KnownRetired {
4231        retired_through: U64,
4232    },
4233    StateReset {
4234        submitted_reset_epoch: U64,
4235        current_reset_epoch: U64,
4236    },
4237    Indeterminate {
4238        #[serde(default, skip_serializing_if = "Option::is_none")]
4239        observed_high_water: Option<U64>,
4240        #[serde(default, skip_serializing_if = "Option::is_none")]
4241        current_high_water: Option<U64>,
4242        #[serde(default, skip_serializing_if = "Option::is_none")]
4243        retired_through: Option<U64>,
4244    },
4245}
4246
4247pub const LODESTONE_API_SERVICE_CREDENTIAL_RESERVATION_FORMAT_VERSION: u16 = 1;
4248#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4249#[serde(deny_unknown_fields)]
4250pub struct ServiceCredentialReservation {
4251    pub locator: Locator,
4252    pub reservation_action_id: Digest,
4253    pub activation_action_id: Digest,
4254    pub principal_id: Identity,
4255    pub api_key_id: Identity,
4256    pub generation: U64,
4257    pub reservation_expires_at: U64,
4258    pub credential_expires_at: U64,
4259    pub verifier_algorithm: String,
4260    pub verifier_algorithm_version: u32,
4261    pub required_secret_bytes: u32,
4262}
4263
4264pub const LODESTONE_API_SUBSCRIPTION_METADATA_FIELD_FORMAT_VERSION: u16 = 1;
4265#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4266#[serde(rename_all = "snake_case")]
4267pub enum SubscriptionMetadataField {
4268    Id,
4269    RoutingHash,
4270    Operation,
4271    Shard,
4272    Sequence,
4273}
4274
4275pub const LODESTONE_API_SUBSCRIPTION_FIELD_FORMAT_VERSION: u16 = 1;
4276#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4277#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4278pub enum SubscriptionField {
4279    Source { path: String },
4280    Metadata { field: SubscriptionMetadataField },
4281}
4282
4283pub const LODESTONE_API_SUBSCRIPTION_FILTER_FORMAT_VERSION: u16 = 1;
4284#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4285#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4286pub enum SubscriptionFilter {
4287    All,
4288    Bool {
4289        must: Vec<SubscriptionFilter>,
4290        should: Vec<SubscriptionFilter>,
4291        must_not: Vec<SubscriptionFilter>,
4292        minimum_should_match: u32,
4293    },
4294    Term {
4295        field: SubscriptionField,
4296        value: JsonValue,
4297    },
4298    Terms {
4299        field: SubscriptionField,
4300        values: Vec<JsonValue>,
4301    },
4302    Range {
4303        field: SubscriptionField,
4304        #[serde(default, skip_serializing_if = "Option::is_none")]
4305        gt: Option<JsonValue>,
4306        #[serde(default, skip_serializing_if = "Option::is_none")]
4307        gte: Option<JsonValue>,
4308        #[serde(default, skip_serializing_if = "Option::is_none")]
4309        lt: Option<JsonValue>,
4310        #[serde(default, skip_serializing_if = "Option::is_none")]
4311        lte: Option<JsonValue>,
4312    },
4313    Exists {
4314        field: SubscriptionField,
4315    },
4316    Prefix {
4317        field: SubscriptionField,
4318        value: String,
4319    },
4320}
4321
4322pub const LODESTONE_API_SUBSCRIPTION_CURSOR_ENTRY_FORMAT_VERSION: u16 = 1;
4323#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4324#[serde(deny_unknown_fields)]
4325pub struct SubscriptionCursorEntry {
4326    pub index: Resource,
4327    pub routing_revision: U64,
4328    pub recovery_era: Identity,
4329    pub shard_id: U64,
4330    pub sequence: U64,
4331}
4332
4333pub const LODESTONE_API_SUBSCRIPTION_ROUTE_FORMAT_VERSION: u16 = 1;
4334#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4335#[serde(deny_unknown_fields)]
4336pub struct SubscriptionRoute {
4337    pub index: Resource,
4338    pub routing_revision: U64,
4339    pub shard_ids: Vec<U64>,
4340}
4341
4342pub const LODESTONE_API_SUBSCRIPTION_START_POSITION_FORMAT_VERSION: u16 = 1;
4343#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4344#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4345pub enum SubscriptionStartPosition {
4346    FromNow,
4347    Resume {
4348        routes: Vec<SubscriptionRoute>,
4349        cut: Vec<SubscriptionCursorEntry>,
4350    },
4351}
4352
4353pub const LODESTONE_API_SUBSCRIPTION_START_SHAPE_VERSION: u16 = 1;
4354pub const LODESTONE_API_SUBSCRIPTION_START_FORMAT_VERSION: u16 = 1;
4355#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4356#[serde(deny_unknown_fields)]
4357pub struct SubscriptionStart {
4358    pub format_version: u32,
4359    pub request_id: String,
4360    pub index: Resource,
4361    #[serde(default, skip_serializing_if = "Option::is_none")]
4362    pub filter: Option<SubscriptionFilter>,
4363    pub include_deletes: bool,
4364    pub source_projection: Vec<String>,
4365    pub reconnect_attempt: u32,
4366    pub start: SubscriptionStartPosition,
4367    pub heartbeat_millis: U64,
4368    pub schema_digest: Digest,
4369}
4370
4371pub const LODESTONE_API_SUBSCRIPTION_ACCEPTED_SHAPE_VERSION: u16 = 1;
4372pub const LODESTONE_API_SUBSCRIPTION_ACCEPTED_FORMAT_VERSION: u16 = 1;
4373#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4374#[serde(deny_unknown_fields)]
4375pub struct SubscriptionAccepted {
4376    pub format_version: u32,
4377    pub routes: Vec<SubscriptionRoute>,
4378    pub accepted_cut: Vec<SubscriptionCursorEntry>,
4379    pub schema_digest: Digest,
4380}
4381
4382pub const LODESTONE_API_SUBSCRIPTION_WRITER_FENCE_FORMAT_VERSION: u16 = 1;
4383#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4384#[serde(deny_unknown_fields)]
4385pub struct SubscriptionWriterFence {
4386    pub recovery_era: Identity,
4387    pub epoch: u32,
4388}
4389
4390pub const LODESTONE_API_SUBSCRIPTION_EVENT_SHAPE_VERSION: u16 = 1;
4391pub const LODESTONE_API_SUBSCRIPTION_EVENT_FORMAT_VERSION: u16 = 1;
4392#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4393#[serde(deny_unknown_fields)]
4394pub struct SubscriptionEvent {
4395    pub format_version: u32,
4396    pub event_id: Digest,
4397    pub index: Resource,
4398    pub shard_id: U64,
4399    pub recovery_era: Identity,
4400    pub writer_fence: SubscriptionWriterFence,
4401    pub routing_revision: U64,
4402    pub sequence: U64,
4403    pub operation: String,
4404    pub document_id: String,
4405    pub routing_hash: u32,
4406    #[serde(default, skip_serializing_if = "Option::is_none")]
4407    pub source: Option<RawJson>,
4408}
4409
4410pub const LODESTONE_API_SUBSCRIPTION_HEARTBEAT_SHAPE_VERSION: u16 = 1;
4411pub const LODESTONE_API_SUBSCRIPTION_HEARTBEAT_FORMAT_VERSION: u16 = 1;
4412#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4413#[serde(deny_unknown_fields)]
4414pub struct SubscriptionHeartbeat {
4415    pub format_version: u32,
4416    pub confirmed_cut: Vec<SubscriptionCursorEntry>,
4417    pub route_revision: U64,
4418    pub authorization_revision: U64,
4419    pub authorization_valid_until_millis: U64,
4420}
4421
4422pub const LODESTONE_API_SUBSCRIPTION_GAP_SHAPE_VERSION: u16 = 1;
4423pub const LODESTONE_API_SUBSCRIPTION_GAP_FORMAT_VERSION: u16 = 1;
4424#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4425#[serde(deny_unknown_fields)]
4426pub struct SubscriptionGap {
4427    pub format_version: u32,
4428    pub affected: Vec<SubscriptionCursorEntry>,
4429    pub last_confirmed: Vec<SubscriptionCursorEntry>,
4430    pub earliest_available: Vec<SubscriptionCursorEntry>,
4431    pub reason: String,
4432    pub terminal: bool,
4433}
4434
4435pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_REASON_FORMAT_VERSION: u16 = 1;
4436#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4437#[serde(rename_all = "snake_case")]
4438pub enum SubscriptionTerminalReason {
4439    Completed,
4440    Cancelled,
4441    DeadlineExceeded,
4442    StaleCursor,
4443    RetentionGap,
4444    Unavailable,
4445    Internal,
4446}
4447
4448pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_SHAPE_VERSION: u16 = 2;
4449pub const LODESTONE_API_SUBSCRIPTION_TERMINAL_FORMAT_VERSION: u16 = 2;
4450#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4451#[serde(deny_unknown_fields)]
4452pub struct SubscriptionTerminal {
4453    pub format_version: u32,
4454    pub reason: SubscriptionTerminalReason,
4455    pub recovery: RecoveryAction,
4456}
4457
4458pub const LODESTONE_API_SUBSCRIPTION_FRAME_FORMAT_VERSION: u16 = 1;
4459#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4460#[serde(tag = "frame", rename_all = "snake_case", deny_unknown_fields)]
4461pub enum SubscriptionFrame {
4462    Accepted { body: SubscriptionAccepted },
4463    Event { body: SubscriptionEvent },
4464    Heartbeat { body: SubscriptionHeartbeat },
4465    Gap { body: SubscriptionGap },
4466    Terminal { body: SubscriptionTerminal },
4467}
4468
4469pub const LODESTONE_API_STREAM_BINDING_FORMAT_VERSION: u16 = 1;
4470#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4471#[serde(deny_unknown_fields)]
4472pub struct StreamBinding {
4473    pub name: String,
4474    pub transport: String,
4475    pub service: String,
4476    pub method: String,
4477    pub endpoint: String,
4478    pub auth_metadata: String,
4479    pub auth_scheme: String,
4480    pub semantic_format_version: u32,
4481    pub schema_digest: Digest,
4482}
4483
4484pub const LODESTONE_API_CAPABILITY_GRANT_FORMAT_VERSION: u16 = 1;
4485#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4486#[serde(deny_unknown_fields)]
4487pub struct CapabilityGrant {
4488    pub command: String,
4489    pub action: String,
4490    pub state: String,
4491    pub reason: String,
4492    pub mutation_class: String,
4493    pub cancellable: bool,
4494    pub workload_classes: Vec<WorkloadClass>,
4495    pub possible_submission_states: Vec<String>,
4496    pub capability_family: String,
4497    pub effect_class: String,
4498    pub risk_flags: Vec<String>,
4499    pub admissible_errors: Vec<String>,
4500    pub referenced_limits: Vec<String>,
4501    pub retry_safety: String,
4502    pub identity_requirement: String,
4503    #[serde(default, skip_serializing_if = "Option::is_none")]
4504    pub resolver_command: Option<String>,
4505    pub cancellation: String,
4506    pub side_effects: Vec<String>,
4507    pub recovery: String,
4508    pub index_patterns: Vec<String>,
4509    pub exact_index_incarnations: Vec<Identity>,
4510}
4511
4512pub const LODESTONE_API_PROTOCOL_LIMIT_FORMAT_VERSION: u16 = 1;
4513#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4514#[serde(deny_unknown_fields)]
4515pub struct ProtocolLimit {
4516    pub id: String,
4517    pub default: U64,
4518    pub maximum: U64,
4519    pub unit: String,
4520}
4521
4522pub const LODESTONE_API_DOCUMENT_MUTATION_CONDITION_FORMAT_VERSION: u16 = 1;
4523#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4524#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4525pub enum DocumentMutationCondition {
4526    Any,
4527    MustNotExist,
4528    IfSeqNo { seq_no: U64 },
4529    IfSeqNoAndPrimaryTerm { seq_no: U64, primary_term: U64 },
4530}
4531
4532pub const LODESTONE_API_AUDIT_ADAPTER_FORMAT_VERSION: u16 = 1;
4533#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4534#[serde(rename_all = "snake_case")]
4535pub enum AuditAdapter {
4536    Native,
4537    Elasticsearch,
4538    Otlp,
4539    Jaeger,
4540    Grpc,
4541    WebSocket,
4542    Resp,
4543    InternalRpc,
4544    ControlPlane,
4545}
4546
4547pub const LODESTONE_API_AUDIT_DECISION_FORMAT_VERSION: u16 = 1;
4548#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4549#[serde(rename_all = "snake_case")]
4550pub enum AuditDecision {
4551    Allowed,
4552    DeniedAuthentication,
4553    DeniedAuthorization,
4554    DeniedQuota,
4555    DeniedStalePolicy,
4556}
4557
4558pub const LODESTONE_API_AUDIT_OUTCOME_FORMAT_VERSION: u16 = 1;
4559#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4560#[serde(rename_all = "snake_case")]
4561pub enum AuditOutcome {
4562    AdmissionAccepted,
4563    AuthenticationRefused,
4564    AuthorizationRefused,
4565    QuotaRefused,
4566    PolicyUnavailable,
4567    DecodeFailed,
4568    OperationSucceeded,
4569    OperationFailed,
4570    OperationIndeterminate,
4571    FailedRedacted,
4572}
4573
4574pub const LODESTONE_API_AUDIT_DETAIL_FORMAT_VERSION: u16 = 1;
4575#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4576#[serde(rename_all = "snake_case")]
4577pub enum AuditDetail {
4578    PolicyMutation,
4579    CredentialRotation,
4580    CredentialRevocation,
4581    QuotaAdmission,
4582    RequestAdmission,
4583    ExplicitCrashGap,
4584    BackupLifecycle,
4585    RetentionLifecycle,
4586    FieldPromotion,
4587}
4588
4589pub const LODESTONE_API_AUDIT_GAP_REASON_FORMAT_VERSION: u16 = 1;
4590#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4591#[serde(rename_all = "snake_case")]
4592pub enum AuditGapReason {
4593    ExplicitCrashGap,
4594    Retention,
4595}
4596
4597pub const LODESTONE_API_AUDIT_EVENT_FORMAT_VERSION: u16 = 2;
4598#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4599#[serde(deny_unknown_fields)]
4600pub struct AuditEvent {
4601    pub event_id: Digest,
4602    pub recovery_era: Identity,
4603    pub sequence: U64,
4604    pub server_time: U64,
4605    #[serde(default, skip_serializing_if = "Option::is_none")]
4606    pub principal_id: Option<Identity>,
4607    #[serde(default, skip_serializing_if = "Option::is_none")]
4608    pub api_key_id: Option<Identity>,
4609    pub policy_revision: U64,
4610    pub adapter: AuditAdapter,
4611    pub action: String,
4612    pub resource_digest: Digest,
4613    pub request_digest: Digest,
4614    #[serde(default, skip_serializing_if = "Option::is_none")]
4615    pub correlation_id: Option<Identity>,
4616    #[serde(default, skip_serializing_if = "Option::is_none")]
4617    pub diagnostic_id: Option<Identity>,
4618    pub decision: AuditDecision,
4619    pub outcome: AuditOutcome,
4620    pub detail: AuditDetail,
4621}
4622
4623pub const LODESTONE_API_AUDIT_GAP_FORMAT_VERSION: u16 = 2;
4624#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4625#[serde(deny_unknown_fields)]
4626pub struct AuditGap {
4627    pub recovery_era: Identity,
4628    pub first_sequence: U64,
4629    pub last_sequence: U64,
4630    pub reason: AuditGapReason,
4631}
4632
4633pub const LODESTONE_API_AUDIT_STREAM_STATE_FORMAT_VERSION: u16 = 1;
4634#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4635#[serde(deny_unknown_fields)]
4636pub struct AuditStreamState {
4637    pub recovery_era: Identity,
4638    pub earliest_available_sequence: U64,
4639    pub snapshot_through: U64,
4640}
4641
4642pub const LODESTONE_API_SERVICE_CREDENTIAL_GRANT_FORMAT_VERSION: u16 = 1;
4643#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4644#[serde(deny_unknown_fields)]
4645pub struct ServiceCredentialGrant {
4646    pub role_name: String,
4647    pub role_version: U64,
4648}
4649
4650pub const LODESTONE_API_SERVICE_CREDENTIAL_SUMMARY_FORMAT_VERSION: u16 = 1;
4651#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4652#[serde(deny_unknown_fields)]
4653pub struct ServiceCredentialSummary {
4654    pub principal_id: Identity,
4655    pub api_key_id: Identity,
4656    pub generation: U64,
4657    pub state: String,
4658    #[serde(default, skip_serializing_if = "Option::is_none")]
4659    pub expires_at: Option<U64>,
4660    pub grants: Vec<ServiceCredentialGrant>,
4661}
4662
4663pub const LODESTONE_API_SECURITY_ROLE_FORMAT_VERSION: u16 = 1;
4664#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4665#[serde(deny_unknown_fields)]
4666pub struct SecurityRole {
4667    pub role_name: String,
4668    pub version: U64,
4669    pub permissions: Vec<String>,
4670    pub delegable_permissions: Vec<String>,
4671    pub allowed_workload_classes: Vec<WorkloadClass>,
4672    pub index_patterns: Vec<String>,
4673    pub append_index_incarnations: Vec<Identity>,
4674}
4675
4676pub const LODESTONE_API_ROLE_APPEND_SCOPE_CHANGE_FORMAT_VERSION: u16 = 1;
4677#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4678#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4679pub enum RoleAppendScopeChange {
4680    Add { index: Resource },
4681    Remove { index_incarnation: Identity },
4682}
4683
4684pub const LODESTONE_API_ROLE_APPEND_ACCESS_PREPARATION_FORMAT_VERSION: u16 = 1;
4685#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4686#[serde(tag = "state", rename_all = "snake_case", deny_unknown_fields)]
4687pub enum RoleAppendAccessPreparation {
4688    Prepared {
4689        locator: Locator,
4690        semantic_digest: Digest,
4691        expires_at: U64,
4692        predecessor_role_version: U64,
4693        successor_role_version: U64,
4694    },
4695    AlreadySatisfied {
4696        role: SecurityRole,
4697    },
4698}
4699
4700pub const LODESTONE_API_SECURITY_ACTION_OUTCOME_FORMAT_VERSION: u16 = 1;
4701#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4702#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4703pub enum SecurityActionOutcome {
4704    Reserved {
4705        principal_id: Identity,
4706        api_key_id: Identity,
4707        generation: U64,
4708    },
4709    Activated {
4710        principal_id: Identity,
4711        api_key_id: Identity,
4712        generation: U64,
4713    },
4714    Revoked {
4715        principal_id: Identity,
4716        api_key_id: Identity,
4717        generation: U64,
4718    },
4719    Retired {
4720        principal_id: Identity,
4721        api_key_id: Identity,
4722        generation: U64,
4723    },
4724}
4725
4726pub const LODESTONE_API_MAINTENANCE_WORK_STATE_FORMAT_VERSION: u16 = 1;
4727#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4728#[serde(rename_all = "snake_case")]
4729pub enum MaintenanceWorkState {
4730    ParkedOperatorRequired,
4731    RetryWait,
4732    RetryReady,
4733    Leased,
4734    Deferred,
4735    Runnable,
4736}
4737
4738pub const LODESTONE_API_MAINTENANCE_ATTEMPT_STATE_FORMAT_VERSION: u16 = 1;
4739#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4740#[serde(rename_all = "snake_case")]
4741pub enum MaintenanceAttemptState {
4742    Running,
4743    DeadlineExceededDraining,
4744    DeadlineExceededReclaimPending,
4745    CancellationDraining,
4746    ClaimRecoveryPending,
4747}
4748
4749pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_FORMAT_VERSION: u16 = 1;
4750#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
4751#[serde(rename_all = "snake_case")]
4752pub enum MaintenanceFailureClass {
4753    Corruption,
4754    AttemptBudget,
4755    StructuralLimit,
4756    Execution,
4757    Other,
4758}
4759
4760pub const LODESTONE_API_MAINTENANCE_FAILURE_CLASS_COUNT_FORMAT_VERSION: u16 = 1;
4761#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4762#[serde(deny_unknown_fields)]
4763pub struct MaintenanceFailureClassCount {
4764    pub class: MaintenanceFailureClass,
4765    pub count: U64,
4766}
4767
4768pub const LODESTONE_API_MAINTENANCE_ATTEMPT_OBSERVATION_FORMAT_VERSION: u16 = 1;
4769#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4770#[serde(deny_unknown_fields)]
4771pub struct MaintenanceAttemptObservation {
4772    pub state: MaintenanceAttemptState,
4773    pub lease_epoch: U64,
4774    pub lease_expires_at: U64,
4775    pub observed_at_millis: U64,
4776}
4777
4778pub const LODESTONE_API_MAINTENANCE_TASK_SCOPE_FORMAT_VERSION: u16 = 1;
4779#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4780#[serde(deny_unknown_fields)]
4781pub struct MaintenanceTaskScope {
4782    pub kind: String,
4783    #[serde(default, skip_serializing_if = "Option::is_none")]
4784    pub index: Option<Resource>,
4785    #[serde(default, skip_serializing_if = "Option::is_none")]
4786    pub shard_id: Option<u32>,
4787}
4788
4789pub const LODESTONE_API_MAINTENANCE_TASK_STATUS_FORMAT_VERSION: u16 = 1;
4790#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4791#[serde(deny_unknown_fields)]
4792pub struct MaintenanceTaskStatus {
4793    pub task_id: Identity,
4794    pub kind: String,
4795    pub scope: MaintenanceTaskScope,
4796    pub checkpoint_generation: U64,
4797    pub attempt_count: u32,
4798    pub admitted_at: U64,
4799    pub last_transition_at: U64,
4800    pub last_progress_at: U64,
4801    pub work_state: MaintenanceWorkState,
4802    pub state_since: U64,
4803    #[serde(default, skip_serializing_if = "Option::is_none")]
4804    pub defer_reason: Option<String>,
4805    pub cancellation_requested: bool,
4806    #[serde(default, skip_serializing_if = "Option::is_none")]
4807    pub retry_not_before: Option<U64>,
4808    #[serde(default, skip_serializing_if = "Option::is_none")]
4809    pub failure_at: Option<U64>,
4810    #[serde(default, skip_serializing_if = "Option::is_none")]
4811    pub lease_acquired_at: Option<U64>,
4812    #[serde(default, skip_serializing_if = "Option::is_none")]
4813    pub lease_expires_at: Option<U64>,
4814    #[serde(default, skip_serializing_if = "Option::is_none")]
4815    pub failure_class: Option<MaintenanceFailureClass>,
4816    #[serde(default, skip_serializing_if = "Option::is_none")]
4817    pub failure_code: Option<String>,
4818    pub operator_action_required: bool,
4819    #[serde(default, skip_serializing_if = "Option::is_none")]
4820    pub local_attempt: Option<MaintenanceAttemptObservation>,
4821}
4822
4823pub const LODESTONE_API_MAINTENANCE_STATUS_AGGREGATE_SHAPE_VERSION: u16 = 1;
4824pub const LODESTONE_API_MAINTENANCE_STATUS_AGGREGATE_FORMAT_VERSION: u16 = 2;
4825#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4826#[serde(deny_unknown_fields)]
4827pub struct MaintenanceStatusAggregate {
4828    pub format_version: u32,
4829    pub recovery_era: Identity,
4830    pub source_revision: U64,
4831    pub root_revision: U64,
4832    pub logical_observation_time: U64,
4833    #[serde(default, skip_serializing_if = "Option::is_none")]
4834    pub local_observation_millis: Option<U64>,
4835    pub total_incomplete: U64,
4836    pub parked_operator_required: U64,
4837    pub retry_wait: U64,
4838    pub retry_ready: U64,
4839    pub leased: U64,
4840    pub deferred: U64,
4841    pub runnable: U64,
4842    pub eligible_backlog: U64,
4843    pub cancellation_requested: U64,
4844    #[serde(default, skip_serializing_if = "Option::is_none")]
4845    pub oldest_backlog_age: Option<U64>,
4846    #[serde(default, skip_serializing_if = "Option::is_none")]
4847    pub oldest_runnable_age: Option<U64>,
4848    #[serde(default, skip_serializing_if = "Option::is_none")]
4849    pub oldest_retry_wait_age: Option<U64>,
4850    #[serde(default, skip_serializing_if = "Option::is_none")]
4851    pub oldest_parked_age: Option<U64>,
4852    #[serde(default, skip_serializing_if = "Option::is_none")]
4853    pub oldest_no_progress_age: Option<U64>,
4854    pub current_action_capacity: u32,
4855    pub maximum_action_capacity: u32,
4856    pub active_passes: U64,
4857    pub local_in_flight: U64,
4858    pub deadline_draining: U64,
4859    pub cancellation_draining: U64,
4860    pub claim_recovery_pending: U64,
4861    pub projection_refresh_pending: bool,
4862    #[serde(default, skip_serializing_if = "Option::is_none")]
4863    pub durable_last_progress_at: Option<U64>,
4864    pub tasks_claimed_total: U64,
4865    pub tasks_progressed_total: U64,
4866    pub tasks_completed_total: U64,
4867    pub task_retries_total: U64,
4868    pub task_failures_total: U64,
4869    pub deadline_failures_total: U64,
4870    pub cancellations_total: U64,
4871    pub overlay_capacity_exhaustions_total: U64,
4872    pub failure_classes: Vec<MaintenanceFailureClassCount>,
4873}
4874
4875pub const LODESTONE_API_RUNTIME_STATUS_DETAIL_FORMAT_VERSION: u16 = 1;
4876#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4877#[serde(deny_unknown_fields)]
4878pub struct RuntimeStatusDetail {
4879    pub metastore_revision: U64,
4880    pub root_revision: U64,
4881    pub logical_time: U64,
4882    pub degraded_dependencies: Vec<String>,
4883}
4884
4885pub const LODESTONE_API_RESULT_CACHE_STATUS_SHAPE_VERSION: u16 = 2;
4886pub const LODESTONE_API_RESULT_CACHE_STATUS_FORMAT_VERSION: u16 = 3;
4887#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4888#[serde(deny_unknown_fields)]
4889pub struct ResultCacheStatus {
4890    pub format_version: u32,
4891    pub hits: U64,
4892    pub misses: U64,
4893    pub admissions: U64,
4894    pub bypasses: U64,
4895    pub evictions: U64,
4896    pub collection_bytes: U64,
4897    pub collection_entries: u32,
4898}
4899
4900pub const LODESTONE_API_FIELD_PROMOTION_STATUS_SHAPE_VERSION: u16 = 1;
4901pub const LODESTONE_API_FIELD_PROMOTION_STATUS_FORMAT_VERSION: u16 = 3;
4902#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4903#[serde(deny_unknown_fields)]
4904pub struct FieldPromotionStatus {
4905    pub format_version: u32,
4906    pub index: Resource,
4907    pub mapping_generation: U64,
4908    pub policy_generation: U64,
4909    #[serde(default, skip_serializing_if = "Option::is_none")]
4910    pub last_decision_generation: Option<U64>,
4911    pub heat_records: u32,
4912    pub promoted_fields: u32,
4913    pub extra_bytes: U64,
4914    pub enabled: bool,
4915}
4916
4917pub const LODESTONE_API_OVERLOAD_SHARD_STATUS_SHAPE_VERSION: u16 = 2;
4918pub const LODESTONE_API_OVERLOAD_SHARD_STATUS_FORMAT_VERSION: u16 = 3;
4919#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4920#[serde(deny_unknown_fields)]
4921pub struct OverloadShardStatus {
4922    pub format_version: u32,
4923    pub shard_id: u32,
4924    pub writer_epoch: U64,
4925    pub configured_mode: String,
4926    pub effective_disposition: String,
4927    pub registered_through: U64,
4928    pub indexed_through: U64,
4929    pub lag_operations: U64,
4930    pub backlog_bytes: U64,
4931    pub oldest_age_millis: U64,
4932    pub collection_share_bytes: U64,
4933    pub recovery_ops_this_pass: u32,
4934    pub pending_overlay_documents: U64,
4935    #[serde(default, skip_serializing_if = "Option::is_none")]
4936    pub shed_reason: Option<String>,
4937}
4938
4939pub const LODESTONE_API_EXTERNAL_KEY_BINDING_FORMAT_VERSION: u16 = 1;
4940#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4941#[serde(deny_unknown_fields)]
4942pub struct ExternalKeyBinding {
4943    pub content_key_id: Identity,
4944    pub content_key_generation: U64,
4945    pub binding_id: Identity,
4946    pub binding_generation: U64,
4947    pub access_generation: U64,
4948    pub opaque_binding_base64: String,
4949    pub object_context_digest: Digest,
4950}
4951
4952pub const LODESTONE_API_ROLLUP_MEASURE_FORMAT_VERSION: u16 = 1;
4953#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4954#[serde(tag = "kind", rename_all = "snake_case", deny_unknown_fields)]
4955pub enum RollupMeasure {
4956    Count,
4957    Sum { field_path_digest: Digest },
4958    Min { field_path_digest: Digest },
4959    Max { field_path_digest: Digest },
4960}
4961
4962pub const LODESTONE_API_AGGREGATE_THEN_DELETE_POLICY_FORMAT_VERSION: u16 = 1;
4963#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4964#[serde(deny_unknown_fields)]
4965pub struct AggregateThenDeletePolicy {
4966    pub policy_id: Identity,
4967    pub policy_generation: U64,
4968    pub detail_retirement_acknowledged: bool,
4969    #[serde(default, skip_serializing_if = "Option::is_none")]
4970    pub expected_policy_generation: Option<U64>,
4971    pub timestamp_field_digest: Digest,
4972    pub bucket_width_millis: U64,
4973    pub bucket_alignment_millis: U64,
4974    pub dimensions: Vec<Digest>,
4975    pub measures: Vec<RollupMeasure>,
4976}
4977
4978pub const LODESTONE_API_LIFECYCLE_BINDING_STATUS_FORMAT_VERSION: u16 = 1;
4979#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4980#[serde(deny_unknown_fields)]
4981pub struct LifecycleBindingStatus {
4982    pub content_key_id: Identity,
4983    pub content_key_generation: U64,
4984    pub binding_id: Identity,
4985    pub binding_generation: U64,
4986    pub access_generation: U64,
4987}
4988
4989pub const LODESTONE_API_LIFECYCLE_ROLLUP_STATUS_FORMAT_VERSION: u16 = 1;
4990#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
4991#[serde(deny_unknown_fields)]
4992pub struct LifecycleRollupStatus {
4993    pub policy_id: Identity,
4994    pub policy_generation: U64,
4995    pub ledger_revision: U64,
4996    pub coverages: u32,
4997    pub raw_retired_coverages: u32,
4998    pub detail_retirement_acknowledged: bool,
4999    pub query_contract_version: u32,
5000    pub timestamp_field_digest: Digest,
5001    pub bucket_width_millis: U64,
5002    pub bucket_alignment_millis: U64,
5003    pub dimensions: Vec<Digest>,
5004    pub measures: Vec<RollupMeasure>,
5005}
5006
5007pub const LODESTONE_API_LIFECYCLE_STATUS_SHAPE_VERSION: u16 = 2;
5008pub const LODESTONE_API_LIFECYCLE_STATUS_FORMAT_VERSION: u16 = 4;
5009#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5010#[serde(deny_unknown_fields)]
5011pub struct LifecycleStatus {
5012    pub format_version: u32,
5013    pub index: Resource,
5014    pub authority_revision: U64,
5015    pub active_bindings: Vec<LifecycleBindingStatus>,
5016    #[serde(default, skip_serializing_if = "Option::is_none")]
5017    pub rollup: Option<LifecycleRollupStatus>,
5018}
5019
5020pub const LODESTONE_API_QUOTA_LIMIT_FORMAT_VERSION: u16 = 1;
5021#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5022#[serde(deny_unknown_fields)]
5023pub struct QuotaLimit {
5024    pub dimension: String,
5025    pub maximum: U64,
5026    pub window_millis: U64,
5027}
5028
5029pub const LODESTONE_API_QUOTA_CONSUMPTION_FORMAT_VERSION: u16 = 1;
5030#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5031#[serde(deny_unknown_fields)]
5032pub struct QuotaConsumption {
5033    pub dimension: String,
5034    pub consumed: U64,
5035    pub window_millis: U64,
5036}
5037
5038pub const LODESTONE_API_QUOTA_UPDATE_FORMAT_VERSION: u16 = 1;
5039#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5040#[serde(deny_unknown_fields)]
5041pub struct QuotaUpdate {
5042    pub revision: U64,
5043    pub state: String,
5044}
5045
5046pub const LODESTONE_API_STORAGE_OVERALL_POSTURE_FORMAT_VERSION: u16 = 1;
5047#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5048#[serde(rename_all = "snake_case")]
5049pub enum StorageOverallPosture {
5050    FilesystemDevelopment,
5051    ProviderObjectStorage,
5052    S3CompatibleDevelopment,
5053    Mixed,
5054}
5055
5056pub const LODESTONE_API_STORAGE_PROFILE_ROLE_FORMAT_VERSION: u16 = 1;
5057#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5058#[serde(rename_all = "snake_case")]
5059pub enum StorageProfileRole {
5060    Control,
5061    DefaultWal,
5062    DefaultData,
5063}
5064
5065pub const LODESTONE_API_STORAGE_PROVIDER_POSTURE_FORMAT_VERSION: u16 = 1;
5066#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5067#[serde(rename_all = "snake_case")]
5068pub enum StorageProviderPosture {
5069    Aws,
5070    GoogleCloudStorage,
5071    AzureBlob,
5072    S3CompatibleDevelopment,
5073    FilesystemDevelopment,
5074}
5075
5076pub const LODESTONE_API_STORAGE_BACKEND_SERVICE_CLASS_FORMAT_VERSION: u16 = 1;
5077#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5078#[serde(rename_all = "snake_case")]
5079pub enum StorageBackendServiceClass {
5080    RegionalObject,
5081    ZonalLowLatency,
5082}
5083
5084pub const LODESTONE_API_STORAGE_PROFILE_ROLE_BINDING_FORMAT_VERSION: u16 = 1;
5085#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5086#[serde(deny_unknown_fields)]
5087pub struct StorageProfileRoleBinding {
5088    pub role: StorageProfileRole,
5089    pub authority_group: u32,
5090    pub provider: StorageProviderPosture,
5091    pub service_class: StorageBackendServiceClass,
5092}
5093
5094pub const LODESTONE_API_STORAGE_PROFILE_ATTESTATION_SHAPE_VERSION: u16 = 1;
5095pub const LODESTONE_API_STORAGE_PROFILE_ATTESTATION_FORMAT_VERSION: u16 = 1;
5096#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5097#[serde(deny_unknown_fields)]
5098pub struct StorageProfileAttestation {
5099    pub format_version: u32,
5100    pub configuration_generation: U64,
5101    pub overall_posture: StorageOverallPosture,
5102    pub roles: Vec<StorageProfileRoleBinding>,
5103    pub default_durability: ResourceDurabilityClass,
5104    pub default_storage: ResourceStorageClass,
5105    pub default_policy_digest: Digest,
5106    pub storage_profile_digest: Digest,
5107    pub attestation_digest: Digest,
5108}
5109
5110pub const LODESTONE_API_STORAGE_PROFILE_EXPECTATION_SHAPE_VERSION: u16 = 1;
5111pub const LODESTONE_API_STORAGE_PROFILE_EXPECTATION_FORMAT_VERSION: u16 = 1;
5112#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5113#[serde(deny_unknown_fields)]
5114pub struct StorageProfileExpectation {
5115    pub format_version: u32,
5116    #[serde(default, skip_serializing_if = "Option::is_none")]
5117    pub required_posture: Option<StorageOverallPosture>,
5118    #[serde(default, skip_serializing_if = "Option::is_none")]
5119    pub expected_storage_profile_digest: Option<Digest>,
5120}
5121
5122pub const LODESTONE_API_CORE_BINDING_FORMAT_VERSION: u16 = 3;
5123#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5124#[serde(deny_unknown_fields)]
5125pub struct CoreBinding {
5126    pub cluster_id: Identity,
5127    pub collection_id: Identity,
5128    pub configuration_generation: U64,
5129    pub native_endpoints: Vec<String>,
5130    pub selected_stream_endpoint: String,
5131    pub schema_id: String,
5132    pub schema_digest: Digest,
5133    pub storage_profile: StorageProfileAttestation,
5134}
5135
5136pub const LODESTONE_API_READINESS_OBSERVATION_FORMAT_VERSION: u16 = 1;
5137#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5138#[serde(deny_unknown_fields)]
5139pub struct ReadinessObservation {
5140    pub subject: String,
5141    pub state: String,
5142    #[serde(default, skip_serializing_if = "Option::is_none")]
5143    pub reason: Option<String>,
5144    pub revision: U64,
5145    pub observed_cut: U64,
5146}
5147
5148pub const LODESTONE_API_USAGE_DIMENSION_FORMAT_VERSION: u16 = 1;
5149#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5150#[serde(deny_unknown_fields)]
5151pub struct UsageDimension {
5152    pub name: String,
5153    pub value: String,
5154}
5155
5156pub const LODESTONE_API_PHYSICAL_USAGE_VALUE_FORMAT_VERSION: u16 = 2;
5157#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5158#[serde(deny_unknown_fields)]
5159pub struct PhysicalUsageValue {
5160    pub meter: String,
5161    pub unit: String,
5162    pub value: ExactDecimal,
5163}
5164
5165pub const LODESTONE_API_CORE_USAGE_UNITS_FORMAT_VERSION: u16 = 2;
5166#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5167#[serde(deny_unknown_fields)]
5168pub struct CoreUsageUnits {
5169    pub sequence: U64,
5170    pub record_identity: Digest,
5171    pub index_id: Identity,
5172    pub workload_class: WorkloadClass,
5173    pub window_start: U64,
5174    pub window_end: U64,
5175    pub meter_set_version: u32,
5176    pub dimensions: Vec<UsageDimension>,
5177    pub values: Vec<PhysicalUsageValue>,
5178    pub authority_revision: U64,
5179    pub source_digest: Digest,
5180}
5181
5182pub const LODESTONE_API_CORE_USAGE_CORRECTION_FORMAT_VERSION: u16 = 2;
5183#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5184#[serde(deny_unknown_fields)]
5185pub struct CoreUsageCorrection {
5186    pub sequence: U64,
5187    pub correction_sequence: U64,
5188    pub correction_identity: Digest,
5189    pub target_record_identity: Digest,
5190    pub index_id: Identity,
5191    pub workload_class: WorkloadClass,
5192    pub window_start: U64,
5193    pub window_end: U64,
5194    pub meter_set_version: u32,
5195    pub dimensions: Vec<UsageDimension>,
5196    pub values: Vec<PhysicalUsageValue>,
5197    pub reason_digest: Digest,
5198    pub authority_revision: U64,
5199    pub source_digest: Digest,
5200}
5201
5202pub const LODESTONE_API_RESPONSE_META_SHAPE_VERSION: u16 = 1;
5203pub const LODESTONE_API_RESPONSE_META_FORMAT_VERSION: u16 = 1;
5204#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5205#[serde(deny_unknown_fields)]
5206pub struct ResponseMeta {
5207    pub format_version: u32,
5208    pub request_id: String,
5209    pub correlation_id: Identity,
5210    pub diagnostic_id: Identity,
5211}
5212
5213pub const LODESTONE_API_ERROR_DISPOSITION_FORMAT_VERSION: u16 = 1;
5214#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5215#[serde(rename_all = "snake_case")]
5216pub enum ErrorDisposition {
5217    NotSubmitted,
5218    Submitted,
5219    Resolved,
5220    KnownRetired,
5221    Indeterminate,
5222}
5223
5224pub const LODESTONE_API_RECOVERY_ACTION_FORMAT_VERSION: u16 = 1;
5225#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5226#[serde(rename_all = "snake_case")]
5227pub enum RecoveryAction {
5228    Retry,
5229    RetryAfter,
5230    RefreshCredential,
5231    RestartPage,
5232    ReduceRequest,
5233    Resolve,
5234    RefreshPrecondition,
5235    CorrectRange,
5236    Stop,
5237}
5238
5239pub const LODESTONE_API_LIMIT_CLASS_FORMAT_VERSION: u16 = 1;
5240#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5241#[serde(rename_all = "snake_case")]
5242pub enum LimitClass {
5243    RequestBound,
5244    CollectionQuota,
5245    EngineSafety,
5246}
5247
5248pub const LODESTONE_API_ERROR_DETAIL_FORMAT_VERSION: u16 = 3;
5249#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5250#[serde(tag = "code", rename_all = "snake_case", deny_unknown_fields)]
5251pub enum ErrorDetail {
5252    Aborted {
5253        reason: String,
5254    },
5255    DeadlineExceeded,
5256    InvalidRequest {
5257        #[serde(default, skip_serializing_if = "Option::is_none")]
5258        field: Option<String>,
5259        reason: String,
5260    },
5261    UnsupportedVersion {
5262        observed: u32,
5263        maximum_supported: u32,
5264    },
5265    Unauthenticated,
5266    PermissionDenied {
5267        #[serde(default, skip_serializing_if = "Option::is_none")]
5268        action: Option<String>,
5269        #[serde(default, skip_serializing_if = "Option::is_none")]
5270        workload_class: Option<WorkloadClass>,
5271    },
5272    NotFound {
5273        #[serde(default, skip_serializing_if = "Option::is_none")]
5274        resource: Option<String>,
5275    },
5276    Conflict {
5277        #[serde(default, skip_serializing_if = "Option::is_none")]
5278        expected_revision: Option<U64>,
5279        #[serde(default, skip_serializing_if = "Option::is_none")]
5280        observed_revision: Option<U64>,
5281    },
5282    StaleCursor {
5283        restart_count: u32,
5284    },
5285    RestartBudgetExhausted {
5286        maximum_restarts: u32,
5287    },
5288    LimitExceeded {
5289        class: LimitClass,
5290        limit_id: String,
5291        maximum: U64,
5292    },
5293    CapabilityUnavailable {
5294        #[serde(default, skip_serializing_if = "Option::is_none")]
5295        capability: Option<String>,
5296    },
5297    NotSubmitted {
5298        #[serde(default, skip_serializing_if = "Option::is_none")]
5299        retry_after_millis: Option<U64>,
5300    },
5301    SubmittedIndeterminate {
5302        #[serde(default, skip_serializing_if = "Option::is_none")]
5303        locator: Option<Locator>,
5304    },
5305    ExpiredUnknown {
5306        #[serde(default, skip_serializing_if = "Option::is_none")]
5307        locator: Option<Locator>,
5308    },
5309    SecretNotEscrowed,
5310    RetentionGap {
5311        retired_through: U64,
5312    },
5313    ArtifactRangeInvalid {
5314        maximum_bytes: U64,
5315    },
5316    ChecksumMismatch {
5317        expected: Digest,
5318        observed: Digest,
5319    },
5320    TemporarilyUnavailable {
5321        #[serde(default, skip_serializing_if = "Option::is_none")]
5322        retry_after_millis: Option<U64>,
5323    },
5324    Internal,
5325}
5326
5327pub const LODESTONE_API_CONNECTION_PROFILE_SHAPE_VERSION: u16 = 4;
5328pub const LODESTONE_API_CONNECTION_PROFILE_FORMAT_VERSION: u16 = 4;
5329#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5330#[serde(deny_unknown_fields)]
5331pub struct ConnectionProfile {
5332    pub format_version: u32,
5333    pub profile_generation: U64,
5334    pub native_endpoints: Vec<String>,
5335    pub selected_stream_endpoint: String,
5336    pub tls_server_name: String,
5337    pub tls_trust_sha256: Digest,
5338    pub expected_cluster_id: Identity,
5339    pub expected_collection_id: Identity,
5340    pub expected_principal_id: Identity,
5341    pub schema_id: String,
5342    pub schema_digest: Digest,
5343    pub credential_id: Identity,
5344    pub credential_generation: U64,
5345    #[serde(default, skip_serializing_if = "Option::is_none")]
5346    pub credential_expires_at: Option<U64>,
5347    pub secret_reference: String,
5348    #[serde(default, skip_serializing_if = "Option::is_none")]
5349    pub storage_profile_expectation: Option<StorageProfileExpectation>,
5350}
5351
5352#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5353pub enum TypeKind {
5354    Enum,
5355    Struct,
5356    TaggedUnion,
5357}
5358#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5359pub struct TypeContract {
5360    pub name: &'static str,
5361    pub shape_version: u16,
5362    pub instance_format_version: Option<u16>,
5363    pub kind: TypeKind,
5364    pub wire: bool,
5365}
5366pub const LODESTONE_API_TYPE_CONTRACTS: &[TypeContract] = &[
5367    TypeContract {
5368        name: "cursor",
5369        shape_version: 1,
5370        instance_format_version: None,
5371        kind: TypeKind::Struct,
5372        wire: true,
5373    },
5374    TypeContract {
5375        name: "locator",
5376        shape_version: 1,
5377        instance_format_version: None,
5378        kind: TypeKind::Struct,
5379        wire: true,
5380    },
5381    TypeContract {
5382        name: "resource",
5383        shape_version: 1,
5384        instance_format_version: None,
5385        kind: TypeKind::Struct,
5386        wire: true,
5387    },
5388    TypeContract {
5389        name: "field_promotion_configuration",
5390        shape_version: 1,
5391        instance_format_version: Some(3),
5392        kind: TypeKind::Struct,
5393        wire: true,
5394    },
5395    TypeContract {
5396        name: "overload_configuration",
5397        shape_version: 2,
5398        instance_format_version: Some(3),
5399        kind: TypeKind::Struct,
5400        wire: true,
5401    },
5402    TypeContract {
5403        name: "index_policies",
5404        shape_version: 1,
5405        instance_format_version: None,
5406        kind: TypeKind::Struct,
5407        wire: true,
5408    },
5409    TypeContract {
5410        name: "maintenance_budgets",
5411        shape_version: 1,
5412        instance_format_version: None,
5413        kind: TypeKind::Struct,
5414        wire: true,
5415    },
5416    TypeContract {
5417        name: "resource_durability_class",
5418        shape_version: 1,
5419        instance_format_version: None,
5420        kind: TypeKind::Enum,
5421        wire: true,
5422    },
5423    TypeContract {
5424        name: "resource_storage_class",
5425        shape_version: 1,
5426        instance_format_version: None,
5427        kind: TypeKind::Enum,
5428        wire: true,
5429    },
5430    TypeContract {
5431        name: "vector_quality_objective",
5432        shape_version: 1,
5433        instance_format_version: None,
5434        kind: TypeKind::Enum,
5435        wire: true,
5436    },
5437    TypeContract {
5438        name: "vector_indexing_objective",
5439        shape_version: 1,
5440        instance_format_version: None,
5441        kind: TypeKind::Enum,
5442        wire: true,
5443    },
5444    TypeContract {
5445        name: "vector_residency_intent",
5446        shape_version: 1,
5447        instance_format_version: None,
5448        kind: TypeKind::Enum,
5449        wire: true,
5450    },
5451    TypeContract {
5452        name: "vector_calibration_binding",
5453        shape_version: 1,
5454        instance_format_version: None,
5455        kind: TypeKind::Struct,
5456        wire: true,
5457    },
5458    TypeContract {
5459        name: "vector_resource_policy",
5460        shape_version: 2,
5461        instance_format_version: None,
5462        kind: TypeKind::Struct,
5463        wire: true,
5464    },
5465    TypeContract {
5466        name: "workload_class",
5467        shape_version: 1,
5468        instance_format_version: None,
5469        kind: TypeKind::Enum,
5470        wire: true,
5471    },
5472    TypeContract {
5473        name: "index_resource_spec",
5474        shape_version: 3,
5475        instance_format_version: Some(3),
5476        kind: TypeKind::Struct,
5477        wire: true,
5478    },
5479    TypeContract {
5480        name: "index_summary",
5481        shape_version: 1,
5482        instance_format_version: None,
5483        kind: TypeKind::Struct,
5484        wire: true,
5485    },
5486    TypeContract {
5487        name: "mapping_mode",
5488        shape_version: 1,
5489        instance_format_version: None,
5490        kind: TypeKind::Enum,
5491        wire: true,
5492    },
5493    TypeContract {
5494        name: "dynamic_mapping_policy",
5495        shape_version: 1,
5496        instance_format_version: None,
5497        kind: TypeKind::Enum,
5498        wire: true,
5499    },
5500    TypeContract {
5501        name: "mapping_analyzer",
5502        shape_version: 1,
5503        instance_format_version: None,
5504        kind: TypeKind::Enum,
5505        wire: true,
5506    },
5507    TypeContract {
5508        name: "keyword_normalizer",
5509        shape_version: 1,
5510        instance_format_version: None,
5511        kind: TypeKind::Enum,
5512        wire: true,
5513    },
5514    TypeContract {
5515        name: "vector_metric",
5516        shape_version: 1,
5517        instance_format_version: None,
5518        kind: TypeKind::Enum,
5519        wire: true,
5520    },
5521    TypeContract {
5522        name: "mapping_scalar",
5523        shape_version: 1,
5524        instance_format_version: None,
5525        kind: TypeKind::TaggedUnion,
5526        wire: true,
5527    },
5528    TypeContract {
5529        name: "sparse_vector_weight_type",
5530        shape_version: 1,
5531        instance_format_version: None,
5532        kind: TypeKind::Enum,
5533        wire: true,
5534    },
5535    TypeContract {
5536        name: "mapping_field_type",
5537        shape_version: 3,
5538        instance_format_version: None,
5539        kind: TypeKind::TaggedUnion,
5540        wire: true,
5541    },
5542    TypeContract {
5543        name: "mapping_field",
5544        shape_version: 1,
5545        instance_format_version: None,
5546        kind: TypeKind::Struct,
5547        wire: true,
5548    },
5549    TypeContract {
5550        name: "multi_field_projection",
5551        shape_version: 1,
5552        instance_format_version: None,
5553        kind: TypeKind::Struct,
5554        wire: true,
5555    },
5556    TypeContract {
5557        name: "analyzer_identity",
5558        shape_version: 1,
5559        instance_format_version: None,
5560        kind: TypeKind::Struct,
5561        wire: true,
5562    },
5563    TypeContract {
5564        name: "keyword_limit",
5565        shape_version: 1,
5566        instance_format_version: None,
5567        kind: TypeKind::Struct,
5568        wire: true,
5569    },
5570    TypeContract {
5571        name: "profile_privacy_action",
5572        shape_version: 1,
5573        instance_format_version: None,
5574        kind: TypeKind::Enum,
5575        wire: true,
5576    },
5577    TypeContract {
5578        name: "profile_privacy_field",
5579        shape_version: 1,
5580        instance_format_version: None,
5581        kind: TypeKind::TaggedUnion,
5582        wire: true,
5583    },
5584    TypeContract {
5585        name: "profile_privacy_rule",
5586        shape_version: 1,
5587        instance_format_version: None,
5588        kind: TypeKind::Struct,
5589        wire: true,
5590    },
5591    TypeContract {
5592        name: "profile_privacy_policy",
5593        shape_version: 1,
5594        instance_format_version: Some(1),
5595        kind: TypeKind::Struct,
5596        wire: true,
5597    },
5598    TypeContract {
5599        name: "mapping_record_model",
5600        shape_version: 3,
5601        instance_format_version: None,
5602        kind: TypeKind::TaggedUnion,
5603        wire: true,
5604    },
5605    TypeContract {
5606        name: "mapping",
5607        shape_version: 4,
5608        instance_format_version: Some(10),
5609        kind: TypeKind::Struct,
5610        wire: true,
5611    },
5612    TypeContract {
5613        name: "index_detail",
5614        shape_version: 1,
5615        instance_format_version: None,
5616        kind: TypeKind::Struct,
5617        wire: true,
5618    },
5619    TypeContract {
5620        name: "source_provider",
5621        shape_version: 1,
5622        instance_format_version: None,
5623        kind: TypeKind::Enum,
5624        wire: true,
5625    },
5626    TypeContract {
5627        name: "source_decoder",
5628        shape_version: 1,
5629        instance_format_version: None,
5630        kind: TypeKind::Enum,
5631        wire: true,
5632    },
5633    TypeContract {
5634        name: "source_replay_guarantees",
5635        shape_version: 1,
5636        instance_format_version: None,
5637        kind: TypeKind::Struct,
5638        wire: true,
5639    },
5640    TypeContract {
5641        name: "source_partition_configuration",
5642        shape_version: 1,
5643        instance_format_version: None,
5644        kind: TypeKind::Struct,
5645        wire: true,
5646    },
5647    TypeContract {
5648        name: "replayable_source_configuration",
5649        shape_version: 1,
5650        instance_format_version: None,
5651        kind: TypeKind::Struct,
5652        wire: true,
5653    },
5654    TypeContract {
5655        name: "source_partition_status",
5656        shape_version: 1,
5657        instance_format_version: None,
5658        kind: TypeKind::Struct,
5659        wire: true,
5660    },
5661    TypeContract {
5662        name: "replayable_source_status",
5663        shape_version: 1,
5664        instance_format_version: None,
5665        kind: TypeKind::Struct,
5666        wire: true,
5667    },
5668    TypeContract {
5669        name: "source_control_transition",
5670        shape_version: 1,
5671        instance_format_version: None,
5672        kind: TypeKind::Enum,
5673        wire: true,
5674    },
5675    TypeContract {
5676        name: "history_ledger_precondition",
5677        shape_version: 1,
5678        instance_format_version: None,
5679        kind: TypeKind::TaggedUnion,
5680        wire: true,
5681    },
5682    TypeContract {
5683        name: "history_retention_policy",
5684        shape_version: 1,
5685        instance_format_version: None,
5686        kind: TypeKind::Struct,
5687        wire: true,
5688    },
5689    TypeContract {
5690        name: "history_selector",
5691        shape_version: 1,
5692        instance_format_version: None,
5693        kind: TypeKind::TaggedUnion,
5694        wire: true,
5695    },
5696    TypeContract {
5697        name: "history_hold",
5698        shape_version: 1,
5699        instance_format_version: None,
5700        kind: TypeKind::Struct,
5701        wire: true,
5702    },
5703    TypeContract {
5704        name: "history_status",
5705        shape_version: 1,
5706        instance_format_version: None,
5707        kind: TypeKind::Struct,
5708        wire: true,
5709    },
5710    TypeContract {
5711        name: "history_resolution",
5712        shape_version: 1,
5713        instance_format_version: None,
5714        kind: TypeKind::Struct,
5715        wire: true,
5716    },
5717    TypeContract {
5718        name: "index_reference",
5719        shape_version: 1,
5720        instance_format_version: None,
5721        kind: TypeKind::Struct,
5722        wire: true,
5723    },
5724    TypeContract {
5725        name: "alias_target",
5726        shape_version: 1,
5727        instance_format_version: None,
5728        kind: TypeKind::Struct,
5729        wire: true,
5730    },
5731    TypeContract {
5732        name: "alias_summary",
5733        shape_version: 1,
5734        instance_format_version: None,
5735        kind: TypeKind::Struct,
5736        wire: true,
5737    },
5738    TypeContract {
5739        name: "alias_detail",
5740        shape_version: 1,
5741        instance_format_version: None,
5742        kind: TypeKind::Struct,
5743        wire: true,
5744    },
5745    TypeContract {
5746        name: "data_stream_summary",
5747        shape_version: 1,
5748        instance_format_version: None,
5749        kind: TypeKind::Struct,
5750        wire: true,
5751    },
5752    TypeContract {
5753        name: "component_template_binding",
5754        shape_version: 1,
5755        instance_format_version: None,
5756        kind: TypeKind::Struct,
5757        wire: true,
5758    },
5759    TypeContract {
5760        name: "index_template_binding",
5761        shape_version: 1,
5762        instance_format_version: None,
5763        kind: TypeKind::Struct,
5764        wire: true,
5765    },
5766    TypeContract {
5767        name: "lifecycle_policy_binding",
5768        shape_version: 1,
5769        instance_format_version: None,
5770        kind: TypeKind::Struct,
5771        wire: true,
5772    },
5773    TypeContract {
5774        name: "data_stream_detail",
5775        shape_version: 1,
5776        instance_format_version: None,
5777        kind: TypeKind::Struct,
5778        wire: true,
5779    },
5780    TypeContract {
5781        name: "component_template_summary",
5782        shape_version: 1,
5783        instance_format_version: None,
5784        kind: TypeKind::Struct,
5785        wire: true,
5786    },
5787    TypeContract {
5788        name: "component_template_detail",
5789        shape_version: 1,
5790        instance_format_version: None,
5791        kind: TypeKind::Struct,
5792        wire: true,
5793    },
5794    TypeContract {
5795        name: "index_template_summary",
5796        shape_version: 1,
5797        instance_format_version: None,
5798        kind: TypeKind::Struct,
5799        wire: true,
5800    },
5801    TypeContract {
5802        name: "index_template_detail",
5803        shape_version: 1,
5804        instance_format_version: None,
5805        kind: TypeKind::Struct,
5806        wire: true,
5807    },
5808    TypeContract {
5809        name: "ingest_pipeline_summary",
5810        shape_version: 1,
5811        instance_format_version: None,
5812        kind: TypeKind::Struct,
5813        wire: true,
5814    },
5815    TypeContract {
5816        name: "ingest_pipeline_detail",
5817        shape_version: 1,
5818        instance_format_version: None,
5819        kind: TypeKind::Struct,
5820        wire: true,
5821    },
5822    TypeContract {
5823        name: "ingest_pipeline_selection",
5824        shape_version: 1,
5825        instance_format_version: None,
5826        kind: TypeKind::Struct,
5827        wire: true,
5828    },
5829    TypeContract {
5830        name: "lifecycle_policy_summary",
5831        shape_version: 1,
5832        instance_format_version: None,
5833        kind: TypeKind::Struct,
5834        wire: true,
5835    },
5836    TypeContract {
5837        name: "rollover_thresholds",
5838        shape_version: 1,
5839        instance_format_version: None,
5840        kind: TypeKind::Struct,
5841        wire: true,
5842    },
5843    TypeContract {
5844        name: "retention_policy",
5845        shape_version: 1,
5846        instance_format_version: None,
5847        kind: TypeKind::Struct,
5848        wire: true,
5849    },
5850    TypeContract {
5851        name: "lifecycle_policy_detail",
5852        shape_version: 1,
5853        instance_format_version: None,
5854        kind: TypeKind::Struct,
5855        wire: true,
5856    },
5857    TypeContract {
5858        name: "text_query_operator",
5859        shape_version: 1,
5860        instance_format_version: None,
5861        kind: TypeKind::Enum,
5862        wire: true,
5863    },
5864    TypeContract {
5865        name: "text_query_analyzer",
5866        shape_version: 1,
5867        instance_format_version: None,
5868        kind: TypeKind::Enum,
5869        wire: true,
5870    },
5871    TypeContract {
5872        name: "zero_terms_query",
5873        shape_version: 1,
5874        instance_format_version: None,
5875        kind: TypeKind::Enum,
5876        wire: true,
5877    },
5878    TypeContract {
5879        name: "text_query_options",
5880        shape_version: 1,
5881        instance_format_version: None,
5882        kind: TypeKind::Struct,
5883        wire: true,
5884    },
5885    TypeContract {
5886        name: "multi_match_mode",
5887        shape_version: 1,
5888        instance_format_version: None,
5889        kind: TypeKind::Enum,
5890        wire: true,
5891    },
5892    TypeContract {
5893        name: "multi_match_field",
5894        shape_version: 1,
5895        instance_format_version: None,
5896        kind: TypeKind::Struct,
5897        wire: true,
5898    },
5899    TypeContract {
5900        name: "multi_match_options",
5901        shape_version: 1,
5902        instance_format_version: None,
5903        kind: TypeKind::Struct,
5904        wire: true,
5905    },
5906    TypeContract {
5907        name: "sort_order",
5908        shape_version: 1,
5909        instance_format_version: None,
5910        kind: TypeKind::Enum,
5911        wire: true,
5912    },
5913    TypeContract {
5914        name: "sort_mode",
5915        shape_version: 1,
5916        instance_format_version: None,
5917        kind: TypeKind::Enum,
5918        wire: true,
5919    },
5920    TypeContract {
5921        name: "missing_order",
5922        shape_version: 1,
5923        instance_format_version: None,
5924        kind: TypeKind::Enum,
5925        wire: true,
5926    },
5927    TypeContract {
5928        name: "nested_score_mode",
5929        shape_version: 1,
5930        instance_format_version: None,
5931        kind: TypeKind::Enum,
5932        wire: true,
5933    },
5934    TypeContract {
5935        name: "nested_inner_hits",
5936        shape_version: 1,
5937        instance_format_version: None,
5938        kind: TypeKind::Struct,
5939        wire: true,
5940    },
5941    TypeContract {
5942        name: "sort_spec",
5943        shape_version: 1,
5944        instance_format_version: None,
5945        kind: TypeKind::TaggedUnion,
5946        wire: true,
5947    },
5948    TypeContract {
5949        name: "query",
5950        shape_version: 1,
5951        instance_format_version: None,
5952        kind: TypeKind::TaggedUnion,
5953        wire: true,
5954    },
5955    TypeContract {
5956        name: "dense_retrieval_mode",
5957        shape_version: 1,
5958        instance_format_version: None,
5959        kind: TypeKind::Enum,
5960        wire: true,
5961    },
5962    TypeContract {
5963        name: "vector_achieved_mode",
5964        shape_version: 1,
5965        instance_format_version: None,
5966        kind: TypeKind::Enum,
5967        wire: true,
5968    },
5969    TypeContract {
5970        name: "vector_branch_diagnostics",
5971        shape_version: 2,
5972        instance_format_version: None,
5973        kind: TypeKind::Struct,
5974        wire: true,
5975    },
5976    TypeContract {
5977        name: "dense_vector_element_type",
5978        shape_version: 1,
5979        instance_format_version: None,
5980        kind: TypeKind::Enum,
5981        wire: true,
5982    },
5983    TypeContract {
5984        name: "dense_vector_byte_order",
5985        shape_version: 1,
5986        instance_format_version: None,
5987        kind: TypeKind::Enum,
5988        wire: true,
5989    },
5990    TypeContract {
5991        name: "vector_value",
5992        shape_version: 1,
5993        instance_format_version: None,
5994        kind: TypeKind::TaggedUnion,
5995        wire: true,
5996    },
5997    TypeContract {
5998        name: "sparse_vector_entry",
5999        shape_version: 1,
6000        instance_format_version: None,
6001        kind: TypeKind::Struct,
6002        wire: true,
6003    },
6004    TypeContract {
6005        name: "sparse_vector_value",
6006        shape_version: 1,
6007        instance_format_version: None,
6008        kind: TypeKind::Struct,
6009        wire: true,
6010    },
6011    TypeContract {
6012        name: "vector_set_value",
6013        shape_version: 1,
6014        instance_format_version: None,
6015        kind: TypeKind::Struct,
6016        wire: true,
6017    },
6018    TypeContract {
6019        name: "vector_evaluation_snapshot",
6020        shape_version: 1,
6021        instance_format_version: None,
6022        kind: TypeKind::TaggedUnion,
6023        wire: true,
6024    },
6025    TypeContract {
6026        name: "vector_evaluation_query_set",
6027        shape_version: 1,
6028        instance_format_version: None,
6029        kind: TypeKind::TaggedUnion,
6030        wire: true,
6031    },
6032    TypeContract {
6033        name: "vector_evaluation_budget",
6034        shape_version: 1,
6035        instance_format_version: None,
6036        kind: TypeKind::Struct,
6037        wire: true,
6038    },
6039    TypeContract {
6040        name: "vector_candidate_policy",
6041        shape_version: 1,
6042        instance_format_version: None,
6043        kind: TypeKind::Enum,
6044        wire: true,
6045    },
6046    TypeContract {
6047        name: "vector_calibration_objective",
6048        shape_version: 1,
6049        instance_format_version: None,
6050        kind: TypeKind::Enum,
6051        wire: true,
6052    },
6053    TypeContract {
6054        name: "vector_strategy_profile",
6055        shape_version: 1,
6056        instance_format_version: None,
6057        kind: TypeKind::Enum,
6058        wire: true,
6059    },
6060    TypeContract {
6061        name: "vector_evaluation_work",
6062        shape_version: 1,
6063        instance_format_version: None,
6064        kind: TypeKind::Struct,
6065        wire: true,
6066    },
6067    TypeContract {
6068        name: "vector_evaluation_error_code",
6069        shape_version: 1,
6070        instance_format_version: None,
6071        kind: TypeKind::Enum,
6072        wire: true,
6073    },
6074    TypeContract {
6075        name: "vector_evaluation_error",
6076        shape_version: 1,
6077        instance_format_version: None,
6078        kind: TypeKind::Struct,
6079        wire: true,
6080    },
6081    TypeContract {
6082        name: "vector_recall_result",
6083        shape_version: 1,
6084        instance_format_version: Some(1),
6085        kind: TypeKind::Struct,
6086        wire: true,
6087    },
6088    TypeContract {
6089        name: "vector_calibration_candidate",
6090        shape_version: 1,
6091        instance_format_version: None,
6092        kind: TypeKind::Struct,
6093        wire: true,
6094    },
6095    TypeContract {
6096        name: "vector_calibration_result",
6097        shape_version: 1,
6098        instance_format_version: Some(1),
6099        kind: TypeKind::Struct,
6100        wire: true,
6101    },
6102    TypeContract {
6103        name: "vector_diagnostic_result",
6104        shape_version: 1,
6105        instance_format_version: None,
6106        kind: TypeKind::TaggedUnion,
6107        wire: true,
6108    },
6109    TypeContract {
6110        name: "vector_warm_component",
6111        shape_version: 1,
6112        instance_format_version: None,
6113        kind: TypeKind::Enum,
6114        wire: true,
6115    },
6116    TypeContract {
6117        name: "vector_warm_state",
6118        shape_version: 1,
6119        instance_format_version: None,
6120        kind: TypeKind::Enum,
6121        wire: true,
6122    },
6123    TypeContract {
6124        name: "vector_warm_achievement",
6125        shape_version: 1,
6126        instance_format_version: None,
6127        kind: TypeKind::Struct,
6128        wire: true,
6129    },
6130    TypeContract {
6131        name: "vector_warm_result",
6132        shape_version: 1,
6133        instance_format_version: Some(1),
6134        kind: TypeKind::Struct,
6135        wire: true,
6136    },
6137    TypeContract {
6138        name: "dense_retrieval_threshold",
6139        shape_version: 1,
6140        instance_format_version: None,
6141        kind: TypeKind::TaggedUnion,
6142        wire: true,
6143    },
6144    TypeContract {
6145        name: "retrieval_branch",
6146        shape_version: 3,
6147        instance_format_version: None,
6148        kind: TypeKind::TaggedUnion,
6149        wire: true,
6150    },
6151    TypeContract {
6152        name: "weighted_rrf_fusion",
6153        shape_version: 1,
6154        instance_format_version: None,
6155        kind: TypeKind::Struct,
6156        wire: true,
6157    },
6158    TypeContract {
6159        name: "retrieval_plan",
6160        shape_version: 1,
6161        instance_format_version: Some(1),
6162        kind: TypeKind::Struct,
6163        wire: true,
6164    },
6165    TypeContract {
6166        name: "histogram_bounds",
6167        shape_version: 1,
6168        instance_format_version: None,
6169        kind: TypeKind::Struct,
6170        wire: true,
6171    },
6172    TypeContract {
6173        name: "date_histogram_bounds",
6174        shape_version: 1,
6175        instance_format_version: None,
6176        kind: TypeKind::Struct,
6177        wire: true,
6178    },
6179    TypeContract {
6180        name: "approximation_algorithm",
6181        shape_version: 1,
6182        instance_format_version: None,
6183        kind: TypeKind::Enum,
6184        wire: true,
6185    },
6186    TypeContract {
6187        name: "approximation",
6188        shape_version: 1,
6189        instance_format_version: None,
6190        kind: TypeKind::Struct,
6191        wire: true,
6192    },
6193    TypeContract {
6194        name: "percentile_value",
6195        shape_version: 1,
6196        instance_format_version: None,
6197        kind: TypeKind::Struct,
6198        wire: true,
6199    },
6200    TypeContract {
6201        name: "approximate_percentile_value",
6202        shape_version: 1,
6203        instance_format_version: None,
6204        kind: TypeKind::Struct,
6205        wire: true,
6206    },
6207    TypeContract {
6208        name: "time_series_operator",
6209        shape_version: 1,
6210        instance_format_version: None,
6211        kind: TypeKind::Enum,
6212        wire: true,
6213    },
6214    TypeContract {
6215        name: "time_series_missing_data",
6216        shape_version: 1,
6217        instance_format_version: None,
6218        kind: TypeKind::Enum,
6219        wire: true,
6220    },
6221    TypeContract {
6222        name: "time_series_quantile_mode",
6223        shape_version: 1,
6224        instance_format_version: None,
6225        kind: TypeKind::Enum,
6226        wire: true,
6227    },
6228    TypeContract {
6229        name: "time_series_bucket_state",
6230        shape_version: 1,
6231        instance_format_version: None,
6232        kind: TypeKind::Enum,
6233        wire: true,
6234    },
6235    TypeContract {
6236        name: "time_series_quantile_value",
6237        shape_version: 1,
6238        instance_format_version: None,
6239        kind: TypeKind::Struct,
6240        wire: true,
6241    },
6242    TypeContract {
6243        name: "time_series_value",
6244        shape_version: 1,
6245        instance_format_version: None,
6246        kind: TypeKind::TaggedUnion,
6247        wire: true,
6248    },
6249    TypeContract {
6250        name: "time_series_bucket",
6251        shape_version: 1,
6252        instance_format_version: None,
6253        kind: TypeKind::Struct,
6254        wire: true,
6255    },
6256    TypeContract {
6257        name: "relationship_traversal_direction",
6258        shape_version: 1,
6259        instance_format_version: None,
6260        kind: TypeKind::Enum,
6261        wire: true,
6262    },
6263    TypeContract {
6264        name: "relationship_traversal_filter",
6265        shape_version: 1,
6266        instance_format_version: None,
6267        kind: TypeKind::Struct,
6268        wire: true,
6269    },
6270    TypeContract {
6271        name: "relationship_traversal_budget",
6272        shape_version: 1,
6273        instance_format_version: None,
6274        kind: TypeKind::Struct,
6275        wire: true,
6276    },
6277    TypeContract {
6278        name: "traversed_relationship",
6279        shape_version: 1,
6280        instance_format_version: None,
6281        kind: TypeKind::Struct,
6282        wire: true,
6283    },
6284    TypeContract {
6285        name: "profile_query_operation",
6286        shape_version: 1,
6287        instance_format_version: None,
6288        kind: TypeKind::Enum,
6289        wire: true,
6290    },
6291    TypeContract {
6292        name: "profile_group_by",
6293        shape_version: 1,
6294        instance_format_version: None,
6295        kind: TypeKind::TaggedUnion,
6296        wire: true,
6297    },
6298    TypeContract {
6299        name: "profile_query_filter",
6300        shape_version: 1,
6301        instance_format_version: None,
6302        kind: TypeKind::Struct,
6303        wire: true,
6304    },
6305    TypeContract {
6306        name: "profile_query_budget",
6307        shape_version: 1,
6308        instance_format_version: None,
6309        kind: TypeKind::Struct,
6310        wire: true,
6311    },
6312    TypeContract {
6313        name: "profile_query_row",
6314        shape_version: 1,
6315        instance_format_version: None,
6316        kind: TypeKind::Struct,
6317        wire: true,
6318    },
6319    TypeContract {
6320        name: "temporal_input",
6321        shape_version: 1,
6322        instance_format_version: None,
6323        kind: TypeKind::Struct,
6324        wire: true,
6325    },
6326    TypeContract {
6327        name: "temporal_pattern",
6328        shape_version: 1,
6329        instance_format_version: None,
6330        kind: TypeKind::TaggedUnion,
6331        wire: true,
6332    },
6333    TypeContract {
6334        name: "historical_temporal_definition",
6335        shape_version: 1,
6336        instance_format_version: Some(1),
6337        kind: TypeKind::Struct,
6338        wire: true,
6339    },
6340    TypeContract {
6341        name: "temporal_evidence_status",
6342        shape_version: 2,
6343        instance_format_version: None,
6344        kind: TypeKind::Enum,
6345        wire: true,
6346    },
6347    TypeContract {
6348        name: "temporal_source_event",
6349        shape_version: 1,
6350        instance_format_version: None,
6351        kind: TypeKind::Struct,
6352        wire: true,
6353    },
6354    TypeContract {
6355        name: "temporal_evidence",
6356        shape_version: 2,
6357        instance_format_version: None,
6358        kind: TypeKind::Struct,
6359        wire: true,
6360    },
6361    TypeContract {
6362        name: "continuous_temporal_start",
6363        shape_version: 1,
6364        instance_format_version: None,
6365        kind: TypeKind::TaggedUnion,
6366        wire: true,
6367    },
6368    TypeContract {
6369        name: "continuous_temporal_watermark_policy",
6370        shape_version: 1,
6371        instance_format_version: None,
6372        kind: TypeKind::TaggedUnion,
6373        wire: true,
6374    },
6375    TypeContract {
6376        name: "continuous_temporal_late_data_policy",
6377        shape_version: 1,
6378        instance_format_version: None,
6379        kind: TypeKind::TaggedUnion,
6380        wire: true,
6381    },
6382    TypeContract {
6383        name: "continuous_temporal_output",
6384        shape_version: 1,
6385        instance_format_version: None,
6386        kind: TypeKind::TaggedUnion,
6387        wire: true,
6388    },
6389    TypeContract {
6390        name: "continuous_temporal_definition",
6391        shape_version: 1,
6392        instance_format_version: Some(1),
6393        kind: TypeKind::Struct,
6394        wire: true,
6395    },
6396    TypeContract {
6397        name: "continuous_temporal_frontier",
6398        shape_version: 1,
6399        instance_format_version: None,
6400        kind: TypeKind::Struct,
6401        wire: true,
6402    },
6403    TypeContract {
6404        name: "continuous_temporal_available_frontier",
6405        shape_version: 1,
6406        instance_format_version: None,
6407        kind: TypeKind::Struct,
6408        wire: true,
6409    },
6410    TypeContract {
6411        name: "continuous_temporal_gap_reason",
6412        shape_version: 1,
6413        instance_format_version: None,
6414        kind: TypeKind::Enum,
6415        wire: true,
6416    },
6417    TypeContract {
6418        name: "continuous_temporal_gap",
6419        shape_version: 1,
6420        instance_format_version: None,
6421        kind: TypeKind::Struct,
6422        wire: true,
6423    },
6424    TypeContract {
6425        name: "continuous_temporal_evaluation",
6426        shape_version: 1,
6427        instance_format_version: Some(1),
6428        kind: TypeKind::Struct,
6429        wire: true,
6430    },
6431    TypeContract {
6432        name: "composite_order",
6433        shape_version: 1,
6434        instance_format_version: None,
6435        kind: TypeKind::Enum,
6436        wire: true,
6437    },
6438    TypeContract {
6439        name: "composite_source",
6440        shape_version: 1,
6441        instance_format_version: None,
6442        kind: TypeKind::TaggedUnion,
6443        wire: true,
6444    },
6445    TypeContract {
6446        name: "aggregation",
6447        shape_version: 3,
6448        instance_format_version: None,
6449        kind: TypeKind::TaggedUnion,
6450        wire: true,
6451    },
6452    TypeContract {
6453        name: "nested_search_hit",
6454        shape_version: 1,
6455        instance_format_version: None,
6456        kind: TypeKind::Struct,
6457        wire: true,
6458    },
6459    TypeContract {
6460        name: "named_nested_inner_hits_result",
6461        shape_version: 1,
6462        instance_format_version: None,
6463        kind: TypeKind::Struct,
6464        wire: true,
6465    },
6466    TypeContract {
6467        name: "fragment_boundary",
6468        shape_version: 1,
6469        instance_format_version: None,
6470        kind: TypeKind::Enum,
6471        wire: true,
6472    },
6473    TypeContract {
6474        name: "fragment_offset_encoding",
6475        shape_version: 1,
6476        instance_format_version: None,
6477        kind: TypeKind::Enum,
6478        wire: true,
6479    },
6480    TypeContract {
6481        name: "fragment_ranker",
6482        shape_version: 1,
6483        instance_format_version: None,
6484        kind: TypeKind::Enum,
6485        wire: true,
6486    },
6487    TypeContract {
6488        name: "fragment_request",
6489        shape_version: 1,
6490        instance_format_version: None,
6491        kind: TypeKind::Struct,
6492        wire: true,
6493    },
6494    TypeContract {
6495        name: "search_fragment",
6496        shape_version: 1,
6497        instance_format_version: None,
6498        kind: TypeKind::Struct,
6499        wire: true,
6500    },
6501    TypeContract {
6502        name: "numeric_feature_transform",
6503        shape_version: 1,
6504        instance_format_version: None,
6505        kind: TypeKind::TaggedUnion,
6506        wire: true,
6507    },
6508    TypeContract {
6509        name: "numeric_result_feature",
6510        shape_version: 1,
6511        instance_format_version: None,
6512        kind: TypeKind::Struct,
6513        wire: true,
6514    },
6515    TypeContract {
6516        name: "result_feature_request",
6517        shape_version: 1,
6518        instance_format_version: None,
6519        kind: TypeKind::Struct,
6520        wire: true,
6521    },
6522    TypeContract {
6523        name: "result_diversification",
6524        shape_version: 1,
6525        instance_format_version: None,
6526        kind: TypeKind::Struct,
6527        wire: true,
6528    },
6529    TypeContract {
6530        name: "branch_score_kind",
6531        shape_version: 2,
6532        instance_format_version: None,
6533        kind: TypeKind::Enum,
6534        wire: true,
6535    },
6536    TypeContract {
6537        name: "result_feature",
6538        shape_version: 1,
6539        instance_format_version: None,
6540        kind: TypeKind::TaggedUnion,
6541        wire: true,
6542    },
6543    TypeContract {
6544        name: "search_hit",
6545        shape_version: 2,
6546        instance_format_version: None,
6547        kind: TypeKind::Struct,
6548        wire: true,
6549    },
6550    TypeContract {
6551        name: "aggregation_bucket",
6552        shape_version: 1,
6553        instance_format_version: None,
6554        kind: TypeKind::Struct,
6555        wire: true,
6556    },
6557    TypeContract {
6558        name: "aggregation_result",
6559        shape_version: 3,
6560        instance_format_version: None,
6561        kind: TypeKind::TaggedUnion,
6562        wire: true,
6563    },
6564    TypeContract {
6565        name: "shard_counts",
6566        shape_version: 1,
6567        instance_format_version: None,
6568        kind: TypeKind::Struct,
6569        wire: true,
6570    },
6571    TypeContract {
6572        name: "total_hits_relation",
6573        shape_version: 1,
6574        instance_format_version: None,
6575        kind: TypeKind::Enum,
6576        wire: true,
6577    },
6578    TypeContract {
6579        name: "search_total",
6580        shape_version: 1,
6581        instance_format_version: None,
6582        kind: TypeKind::Struct,
6583        wire: true,
6584    },
6585    TypeContract {
6586        name: "search_execution_freshness",
6587        shape_version: 1,
6588        instance_format_version: None,
6589        kind: TypeKind::Enum,
6590        wire: true,
6591    },
6592    TypeContract {
6593        name: "search_freshness",
6594        shape_version: 1,
6595        instance_format_version: None,
6596        kind: TypeKind::Enum,
6597        wire: true,
6598    },
6599    TypeContract {
6600        name: "search_degradation_reason",
6601        shape_version: 1,
6602        instance_format_version: None,
6603        kind: TypeKind::Enum,
6604        wire: true,
6605    },
6606    TypeContract {
6607        name: "search_achievement",
6608        shape_version: 1,
6609        instance_format_version: None,
6610        kind: TypeKind::Struct,
6611        wire: true,
6612    },
6613    TypeContract {
6614        name: "search_failure_stage",
6615        shape_version: 1,
6616        instance_format_version: None,
6617        kind: TypeKind::Enum,
6618        wire: true,
6619    },
6620    TypeContract {
6621        name: "search_failure_reason",
6622        shape_version: 1,
6623        instance_format_version: None,
6624        kind: TypeKind::Enum,
6625        wire: true,
6626    },
6627    TypeContract {
6628        name: "collection_shard",
6629        shape_version: 1,
6630        instance_format_version: None,
6631        kind: TypeKind::Struct,
6632        wire: true,
6633    },
6634    TypeContract {
6635        name: "search_partial_failure",
6636        shape_version: 1,
6637        instance_format_version: None,
6638        kind: TypeKind::Struct,
6639        wire: true,
6640    },
6641    TypeContract {
6642        name: "artifact",
6643        shape_version: 1,
6644        instance_format_version: None,
6645        kind: TypeKind::Struct,
6646        wire: true,
6647    },
6648    TypeContract {
6649        name: "portability_storage_capability",
6650        shape_version: 1,
6651        instance_format_version: None,
6652        kind: TypeKind::Struct,
6653        wire: true,
6654    },
6655    TypeContract {
6656        name: "collection_export_artifact",
6657        shape_version: 1,
6658        instance_format_version: None,
6659        kind: TypeKind::Struct,
6660        wire: true,
6661    },
6662    TypeContract {
6663        name: "index_transfer_page",
6664        shape_version: 1,
6665        instance_format_version: None,
6666        kind: TypeKind::Struct,
6667        wire: true,
6668    },
6669    TypeContract {
6670        name: "index_transfer_artifact",
6671        shape_version: 1,
6672        instance_format_version: None,
6673        kind: TypeKind::Struct,
6674        wire: true,
6675    },
6676    TypeContract {
6677        name: "search_validation_bound",
6678        shape_version: 1,
6679        instance_format_version: None,
6680        kind: TypeKind::TaggedUnion,
6681        wire: true,
6682    },
6683    TypeContract {
6684        name: "search_validation_estimates",
6685        shape_version: 1,
6686        instance_format_version: None,
6687        kind: TypeKind::Struct,
6688        wire: true,
6689    },
6690    TypeContract {
6691        name: "search_validation_limit",
6692        shape_version: 1,
6693        instance_format_version: None,
6694        kind: TypeKind::Struct,
6695        wire: true,
6696    },
6697    TypeContract {
6698        name: "operation_kind",
6699        shape_version: 2,
6700        instance_format_version: None,
6701        kind: TypeKind::Enum,
6702        wire: true,
6703    },
6704    TypeContract {
6705        name: "operation_authority",
6706        shape_version: 1,
6707        instance_format_version: None,
6708        kind: TypeKind::Enum,
6709        wire: true,
6710    },
6711    TypeContract {
6712        name: "operation_target",
6713        shape_version: 1,
6714        instance_format_version: None,
6715        kind: TypeKind::TaggedUnion,
6716        wire: true,
6717    },
6718    TypeContract {
6719        name: "operation_state",
6720        shape_version: 1,
6721        instance_format_version: None,
6722        kind: TypeKind::Enum,
6723        wire: true,
6724    },
6725    TypeContract {
6726        name: "operation_pending_state",
6727        shape_version: 1,
6728        instance_format_version: None,
6729        kind: TypeKind::Enum,
6730        wire: true,
6731    },
6732    TypeContract {
6733        name: "operation_progress_unit",
6734        shape_version: 1,
6735        instance_format_version: None,
6736        kind: TypeKind::Enum,
6737        wire: true,
6738    },
6739    TypeContract {
6740        name: "operation_progress",
6741        shape_version: 1,
6742        instance_format_version: None,
6743        kind: TypeKind::Struct,
6744        wire: true,
6745    },
6746    TypeContract {
6747        name: "operation_result",
6748        shape_version: 1,
6749        instance_format_version: None,
6750        kind: TypeKind::TaggedUnion,
6751        wire: true,
6752    },
6753    TypeContract {
6754        name: "operation_failure",
6755        shape_version: 1,
6756        instance_format_version: None,
6757        kind: TypeKind::Struct,
6758        wire: true,
6759    },
6760    TypeContract {
6761        name: "operation_cancellation",
6762        shape_version: 1,
6763        instance_format_version: None,
6764        kind: TypeKind::Enum,
6765        wire: true,
6766    },
6767    TypeContract {
6768        name: "operation_retention_state",
6769        shape_version: 1,
6770        instance_format_version: None,
6771        kind: TypeKind::Enum,
6772        wire: true,
6773    },
6774    TypeContract {
6775        name: "operation_retention",
6776        shape_version: 1,
6777        instance_format_version: None,
6778        kind: TypeKind::Struct,
6779        wire: true,
6780    },
6781    TypeContract {
6782        name: "operation",
6783        shape_version: 2,
6784        instance_format_version: None,
6785        kind: TypeKind::Struct,
6786        wire: true,
6787    },
6788    TypeContract {
6789        name: "write_durability_boundary",
6790        shape_version: 1,
6791        instance_format_version: None,
6792        kind: TypeKind::Enum,
6793        wire: true,
6794    },
6795    TypeContract {
6796        name: "write_visibility_mode",
6797        shape_version: 1,
6798        instance_format_version: None,
6799        kind: TypeKind::Enum,
6800        wire: true,
6801    },
6802    TypeContract {
6803        name: "write_response_stage",
6804        shape_version: 1,
6805        instance_format_version: None,
6806        kind: TypeKind::Enum,
6807        wire: true,
6808    },
6809    TypeContract {
6810        name: "write_achievement",
6811        shape_version: 1,
6812        instance_format_version: None,
6813        kind: TypeKind::Struct,
6814        wire: true,
6815    },
6816    TypeContract {
6817        name: "mutation_resolver",
6818        shape_version: 1,
6819        instance_format_version: None,
6820        kind: TypeKind::Enum,
6821        wire: true,
6822    },
6823    TypeContract {
6824        name: "mutation_outcome",
6825        shape_version: 1,
6826        instance_format_version: None,
6827        kind: TypeKind::TaggedUnion,
6828        wire: true,
6829    },
6830    TypeContract {
6831        name: "submission_state",
6832        shape_version: 1,
6833        instance_format_version: None,
6834        kind: TypeKind::Enum,
6835        wire: true,
6836    },
6837    TypeContract {
6838        name: "expected_binding",
6839        shape_version: 1,
6840        instance_format_version: None,
6841        kind: TypeKind::Struct,
6842        wire: true,
6843    },
6844    TypeContract {
6845        name: "administration_alias_action",
6846        shape_version: 1,
6847        instance_format_version: None,
6848        kind: TypeKind::TaggedUnion,
6849        wire: true,
6850    },
6851    TypeContract {
6852        name: "administration_mutation",
6853        shape_version: 1,
6854        instance_format_version: None,
6855        kind: TypeKind::TaggedUnion,
6856        wire: true,
6857    },
6858    TypeContract {
6859        name: "administration_outcome",
6860        shape_version: 1,
6861        instance_format_version: None,
6862        kind: TypeKind::Struct,
6863        wire: true,
6864    },
6865    TypeContract {
6866        name: "index_change_apply_receipt",
6867        shape_version: 1,
6868        instance_format_version: None,
6869        kind: TypeKind::Struct,
6870        wire: true,
6871    },
6872    TypeContract {
6873        name: "bulk_document_item",
6874        shape_version: 2,
6875        instance_format_version: None,
6876        kind: TypeKind::Struct,
6877        wire: true,
6878    },
6879    TypeContract {
6880        name: "bulk_document_item_outcome",
6881        shape_version: 1,
6882        instance_format_version: None,
6883        kind: TypeKind::Struct,
6884        wire: true,
6885    },
6886    TypeContract {
6887        name: "bulk_document_outcome",
6888        shape_version: 1,
6889        instance_format_version: None,
6890        kind: TypeKind::Struct,
6891        wire: true,
6892    },
6893    TypeContract {
6894        name: "metric_attribute_value",
6895        shape_version: 1,
6896        instance_format_version: None,
6897        kind: TypeKind::TaggedUnion,
6898        wire: true,
6899    },
6900    TypeContract {
6901        name: "metric_attribute",
6902        shape_version: 1,
6903        instance_format_version: None,
6904        kind: TypeKind::Struct,
6905        wire: true,
6906    },
6907    TypeContract {
6908        name: "metric_number",
6909        shape_version: 1,
6910        instance_format_version: None,
6911        kind: TypeKind::TaggedUnion,
6912        wire: true,
6913    },
6914    TypeContract {
6915        name: "metric_temporality",
6916        shape_version: 1,
6917        instance_format_version: None,
6918        kind: TypeKind::Enum,
6919        wire: true,
6920    },
6921    TypeContract {
6922        name: "metric_point_kind",
6923        shape_version: 1,
6924        instance_format_version: None,
6925        kind: TypeKind::Enum,
6926        wire: true,
6927    },
6928    TypeContract {
6929        name: "metric_exponential_buckets",
6930        shape_version: 1,
6931        instance_format_version: None,
6932        kind: TypeKind::Struct,
6933        wire: true,
6934    },
6935    TypeContract {
6936        name: "metric_data",
6937        shape_version: 1,
6938        instance_format_version: None,
6939        kind: TypeKind::TaggedUnion,
6940        wire: true,
6941    },
6942    TypeContract {
6943        name: "metric_instrumentation_scope",
6944        shape_version: 1,
6945        instance_format_version: None,
6946        kind: TypeKind::Struct,
6947        wire: true,
6948    },
6949    TypeContract {
6950        name: "metric_exemplar",
6951        shape_version: 1,
6952        instance_format_version: None,
6953        kind: TypeKind::Struct,
6954        wire: true,
6955    },
6956    TypeContract {
6957        name: "metric_point",
6958        shape_version: 1,
6959        instance_format_version: Some(1),
6960        kind: TypeKind::Struct,
6961        wire: true,
6962    },
6963    TypeContract {
6964        name: "entity_ref",
6965        shape_version: 1,
6966        instance_format_version: None,
6967        kind: TypeKind::Struct,
6968        wire: true,
6969    },
6970    TypeContract {
6971        name: "relationship_evidence_ref",
6972        shape_version: 1,
6973        instance_format_version: None,
6974        kind: TypeKind::Struct,
6975        wire: true,
6976    },
6977    TypeContract {
6978        name: "relationship_directionality",
6979        shape_version: 1,
6980        instance_format_version: None,
6981        kind: TypeKind::Enum,
6982        wire: true,
6983    },
6984    TypeContract {
6985        name: "relationship_record",
6986        shape_version: 1,
6987        instance_format_version: Some(1),
6988        kind: TypeKind::Struct,
6989        wire: true,
6990    },
6991    TypeContract {
6992        name: "profile_label",
6993        shape_version: 1,
6994        instance_format_version: None,
6995        kind: TypeKind::Struct,
6996        wire: true,
6997    },
6998    TypeContract {
6999        name: "profile_sample_type",
7000        shape_version: 1,
7001        instance_format_version: None,
7002        kind: TypeKind::Struct,
7003        wire: true,
7004    },
7005    TypeContract {
7006        name: "profile_mapping",
7007        shape_version: 1,
7008        instance_format_version: None,
7009        kind: TypeKind::Struct,
7010        wire: true,
7011    },
7012    TypeContract {
7013        name: "profile_function",
7014        shape_version: 1,
7015        instance_format_version: None,
7016        kind: TypeKind::Struct,
7017        wire: true,
7018    },
7019    TypeContract {
7020        name: "profile_line",
7021        shape_version: 1,
7022        instance_format_version: None,
7023        kind: TypeKind::Struct,
7024        wire: true,
7025    },
7026    TypeContract {
7027        name: "profile_location",
7028        shape_version: 1,
7029        instance_format_version: None,
7030        kind: TypeKind::Struct,
7031        wire: true,
7032    },
7033    TypeContract {
7034        name: "profile_stack",
7035        shape_version: 1,
7036        instance_format_version: None,
7037        kind: TypeKind::Struct,
7038        wire: true,
7039    },
7040    TypeContract {
7041        name: "profile_sample",
7042        shape_version: 1,
7043        instance_format_version: None,
7044        kind: TypeKind::Struct,
7045        wire: true,
7046    },
7047    TypeContract {
7048        name: "profile_instrumentation_scope",
7049        shape_version: 1,
7050        instance_format_version: None,
7051        kind: TypeKind::Struct,
7052        wire: true,
7053    },
7054    TypeContract {
7055        name: "profile_batch",
7056        shape_version: 1,
7057        instance_format_version: Some(1),
7058        kind: TypeKind::Struct,
7059        wire: true,
7060    },
7061    TypeContract {
7062        name: "native_record",
7063        shape_version: 3,
7064        instance_format_version: None,
7065        kind: TypeKind::TaggedUnion,
7066        wire: true,
7067    },
7068    TypeContract {
7069        name: "retained_append_item",
7070        shape_version: 4,
7071        instance_format_version: None,
7072        kind: TypeKind::Struct,
7073        wire: true,
7074    },
7075    TypeContract {
7076        name: "retained_append_state",
7077        shape_version: 1,
7078        instance_format_version: None,
7079        kind: TypeKind::Enum,
7080        wire: true,
7081    },
7082    TypeContract {
7083        name: "retained_append_retry_safety",
7084        shape_version: 1,
7085        instance_format_version: None,
7086        kind: TypeKind::Enum,
7087        wire: true,
7088    },
7089    TypeContract {
7090        name: "retained_append_item_outcome",
7091        shape_version: 1,
7092        instance_format_version: None,
7093        kind: TypeKind::Struct,
7094        wire: true,
7095    },
7096    TypeContract {
7097        name: "retained_append_bulk_outcome",
7098        shape_version: 1,
7099        instance_format_version: None,
7100        kind: TypeKind::Struct,
7101        wire: true,
7102    },
7103    TypeContract {
7104        name: "retained_append_observation_state",
7105        shape_version: 1,
7106        instance_format_version: None,
7107        kind: TypeKind::Enum,
7108        wire: true,
7109    },
7110    TypeContract {
7111        name: "retained_append_observation_outcome",
7112        shape_version: 1,
7113        instance_format_version: None,
7114        kind: TypeKind::Struct,
7115        wire: true,
7116    },
7117    TypeContract {
7118        name: "binary_value",
7119        shape_version: 1,
7120        instance_format_version: None,
7121        kind: TypeKind::Struct,
7122        wire: true,
7123    },
7124    TypeContract {
7125        name: "state_hash_field",
7126        shape_version: 1,
7127        instance_format_version: None,
7128        kind: TypeKind::Struct,
7129        wire: true,
7130    },
7131    TypeContract {
7132        name: "state_set_entry",
7133        shape_version: 1,
7134        instance_format_version: None,
7135        kind: TypeKind::Struct,
7136        wire: true,
7137    },
7138    TypeContract {
7139        name: "state_set_condition",
7140        shape_version: 1,
7141        instance_format_version: None,
7142        kind: TypeKind::Enum,
7143        wire: true,
7144    },
7145    TypeContract {
7146        name: "state_operation",
7147        shape_version: 1,
7148        instance_format_version: None,
7149        kind: TypeKind::TaggedUnion,
7150        wire: true,
7151    },
7152    TypeContract {
7153        name: "state_optional_value",
7154        shape_version: 1,
7155        instance_format_version: None,
7156        kind: TypeKind::TaggedUnion,
7157        wire: true,
7158    },
7159    TypeContract {
7160        name: "state_command_result",
7161        shape_version: 1,
7162        instance_format_version: None,
7163        kind: TypeKind::TaggedUnion,
7164        wire: true,
7165    },
7166    TypeContract {
7167        name: "state_write_resolution",
7168        shape_version: 1,
7169        instance_format_version: None,
7170        kind: TypeKind::TaggedUnion,
7171        wire: true,
7172    },
7173    TypeContract {
7174        name: "service_credential_reservation",
7175        shape_version: 1,
7176        instance_format_version: None,
7177        kind: TypeKind::Struct,
7178        wire: true,
7179    },
7180    TypeContract {
7181        name: "subscription_metadata_field",
7182        shape_version: 1,
7183        instance_format_version: None,
7184        kind: TypeKind::Enum,
7185        wire: true,
7186    },
7187    TypeContract {
7188        name: "subscription_field",
7189        shape_version: 1,
7190        instance_format_version: None,
7191        kind: TypeKind::TaggedUnion,
7192        wire: true,
7193    },
7194    TypeContract {
7195        name: "subscription_filter",
7196        shape_version: 1,
7197        instance_format_version: None,
7198        kind: TypeKind::TaggedUnion,
7199        wire: true,
7200    },
7201    TypeContract {
7202        name: "subscription_cursor_entry",
7203        shape_version: 1,
7204        instance_format_version: None,
7205        kind: TypeKind::Struct,
7206        wire: true,
7207    },
7208    TypeContract {
7209        name: "subscription_route",
7210        shape_version: 1,
7211        instance_format_version: None,
7212        kind: TypeKind::Struct,
7213        wire: true,
7214    },
7215    TypeContract {
7216        name: "subscription_start_position",
7217        shape_version: 1,
7218        instance_format_version: None,
7219        kind: TypeKind::TaggedUnion,
7220        wire: true,
7221    },
7222    TypeContract {
7223        name: "subscription_start",
7224        shape_version: 1,
7225        instance_format_version: Some(1),
7226        kind: TypeKind::Struct,
7227        wire: true,
7228    },
7229    TypeContract {
7230        name: "subscription_accepted",
7231        shape_version: 1,
7232        instance_format_version: Some(1),
7233        kind: TypeKind::Struct,
7234        wire: true,
7235    },
7236    TypeContract {
7237        name: "subscription_writer_fence",
7238        shape_version: 1,
7239        instance_format_version: None,
7240        kind: TypeKind::Struct,
7241        wire: true,
7242    },
7243    TypeContract {
7244        name: "subscription_event",
7245        shape_version: 1,
7246        instance_format_version: Some(1),
7247        kind: TypeKind::Struct,
7248        wire: true,
7249    },
7250    TypeContract {
7251        name: "subscription_heartbeat",
7252        shape_version: 1,
7253        instance_format_version: Some(1),
7254        kind: TypeKind::Struct,
7255        wire: true,
7256    },
7257    TypeContract {
7258        name: "subscription_gap",
7259        shape_version: 1,
7260        instance_format_version: Some(1),
7261        kind: TypeKind::Struct,
7262        wire: true,
7263    },
7264    TypeContract {
7265        name: "subscription_terminal_reason",
7266        shape_version: 1,
7267        instance_format_version: None,
7268        kind: TypeKind::Enum,
7269        wire: true,
7270    },
7271    TypeContract {
7272        name: "subscription_terminal",
7273        shape_version: 2,
7274        instance_format_version: Some(2),
7275        kind: TypeKind::Struct,
7276        wire: true,
7277    },
7278    TypeContract {
7279        name: "subscription_frame",
7280        shape_version: 1,
7281        instance_format_version: None,
7282        kind: TypeKind::TaggedUnion,
7283        wire: true,
7284    },
7285    TypeContract {
7286        name: "stream_binding",
7287        shape_version: 1,
7288        instance_format_version: None,
7289        kind: TypeKind::Struct,
7290        wire: true,
7291    },
7292    TypeContract {
7293        name: "capability_grant",
7294        shape_version: 1,
7295        instance_format_version: None,
7296        kind: TypeKind::Struct,
7297        wire: true,
7298    },
7299    TypeContract {
7300        name: "protocol_limit",
7301        shape_version: 1,
7302        instance_format_version: None,
7303        kind: TypeKind::Struct,
7304        wire: true,
7305    },
7306    TypeContract {
7307        name: "document_mutation_condition",
7308        shape_version: 1,
7309        instance_format_version: None,
7310        kind: TypeKind::TaggedUnion,
7311        wire: true,
7312    },
7313    TypeContract {
7314        name: "audit_adapter",
7315        shape_version: 1,
7316        instance_format_version: None,
7317        kind: TypeKind::Enum,
7318        wire: true,
7319    },
7320    TypeContract {
7321        name: "audit_decision",
7322        shape_version: 1,
7323        instance_format_version: None,
7324        kind: TypeKind::Enum,
7325        wire: true,
7326    },
7327    TypeContract {
7328        name: "audit_outcome",
7329        shape_version: 1,
7330        instance_format_version: None,
7331        kind: TypeKind::Enum,
7332        wire: true,
7333    },
7334    TypeContract {
7335        name: "audit_detail",
7336        shape_version: 1,
7337        instance_format_version: None,
7338        kind: TypeKind::Enum,
7339        wire: true,
7340    },
7341    TypeContract {
7342        name: "audit_gap_reason",
7343        shape_version: 1,
7344        instance_format_version: None,
7345        kind: TypeKind::Enum,
7346        wire: true,
7347    },
7348    TypeContract {
7349        name: "audit_event",
7350        shape_version: 2,
7351        instance_format_version: None,
7352        kind: TypeKind::Struct,
7353        wire: true,
7354    },
7355    TypeContract {
7356        name: "audit_gap",
7357        shape_version: 2,
7358        instance_format_version: None,
7359        kind: TypeKind::Struct,
7360        wire: true,
7361    },
7362    TypeContract {
7363        name: "audit_stream_state",
7364        shape_version: 1,
7365        instance_format_version: None,
7366        kind: TypeKind::Struct,
7367        wire: true,
7368    },
7369    TypeContract {
7370        name: "service_credential_grant",
7371        shape_version: 1,
7372        instance_format_version: None,
7373        kind: TypeKind::Struct,
7374        wire: true,
7375    },
7376    TypeContract {
7377        name: "service_credential_summary",
7378        shape_version: 1,
7379        instance_format_version: None,
7380        kind: TypeKind::Struct,
7381        wire: true,
7382    },
7383    TypeContract {
7384        name: "security_role",
7385        shape_version: 1,
7386        instance_format_version: None,
7387        kind: TypeKind::Struct,
7388        wire: true,
7389    },
7390    TypeContract {
7391        name: "role_append_scope_change",
7392        shape_version: 1,
7393        instance_format_version: None,
7394        kind: TypeKind::TaggedUnion,
7395        wire: true,
7396    },
7397    TypeContract {
7398        name: "role_append_access_preparation",
7399        shape_version: 1,
7400        instance_format_version: None,
7401        kind: TypeKind::TaggedUnion,
7402        wire: true,
7403    },
7404    TypeContract {
7405        name: "security_action_outcome",
7406        shape_version: 1,
7407        instance_format_version: None,
7408        kind: TypeKind::TaggedUnion,
7409        wire: true,
7410    },
7411    TypeContract {
7412        name: "maintenance_work_state",
7413        shape_version: 1,
7414        instance_format_version: None,
7415        kind: TypeKind::Enum,
7416        wire: true,
7417    },
7418    TypeContract {
7419        name: "maintenance_attempt_state",
7420        shape_version: 1,
7421        instance_format_version: None,
7422        kind: TypeKind::Enum,
7423        wire: true,
7424    },
7425    TypeContract {
7426        name: "maintenance_failure_class",
7427        shape_version: 1,
7428        instance_format_version: None,
7429        kind: TypeKind::Enum,
7430        wire: true,
7431    },
7432    TypeContract {
7433        name: "maintenance_failure_class_count",
7434        shape_version: 1,
7435        instance_format_version: None,
7436        kind: TypeKind::Struct,
7437        wire: true,
7438    },
7439    TypeContract {
7440        name: "maintenance_attempt_observation",
7441        shape_version: 1,
7442        instance_format_version: None,
7443        kind: TypeKind::Struct,
7444        wire: true,
7445    },
7446    TypeContract {
7447        name: "maintenance_task_scope",
7448        shape_version: 1,
7449        instance_format_version: None,
7450        kind: TypeKind::Struct,
7451        wire: true,
7452    },
7453    TypeContract {
7454        name: "maintenance_task_status",
7455        shape_version: 1,
7456        instance_format_version: None,
7457        kind: TypeKind::Struct,
7458        wire: true,
7459    },
7460    TypeContract {
7461        name: "maintenance_status_aggregate",
7462        shape_version: 1,
7463        instance_format_version: Some(2),
7464        kind: TypeKind::Struct,
7465        wire: true,
7466    },
7467    TypeContract {
7468        name: "runtime_status_detail",
7469        shape_version: 1,
7470        instance_format_version: None,
7471        kind: TypeKind::Struct,
7472        wire: true,
7473    },
7474    TypeContract {
7475        name: "result_cache_status",
7476        shape_version: 2,
7477        instance_format_version: Some(3),
7478        kind: TypeKind::Struct,
7479        wire: true,
7480    },
7481    TypeContract {
7482        name: "field_promotion_status",
7483        shape_version: 1,
7484        instance_format_version: Some(3),
7485        kind: TypeKind::Struct,
7486        wire: true,
7487    },
7488    TypeContract {
7489        name: "overload_shard_status",
7490        shape_version: 2,
7491        instance_format_version: Some(3),
7492        kind: TypeKind::Struct,
7493        wire: true,
7494    },
7495    TypeContract {
7496        name: "external_key_binding",
7497        shape_version: 1,
7498        instance_format_version: None,
7499        kind: TypeKind::Struct,
7500        wire: true,
7501    },
7502    TypeContract {
7503        name: "rollup_measure",
7504        shape_version: 1,
7505        instance_format_version: None,
7506        kind: TypeKind::TaggedUnion,
7507        wire: true,
7508    },
7509    TypeContract {
7510        name: "aggregate_then_delete_policy",
7511        shape_version: 1,
7512        instance_format_version: None,
7513        kind: TypeKind::Struct,
7514        wire: true,
7515    },
7516    TypeContract {
7517        name: "lifecycle_binding_status",
7518        shape_version: 1,
7519        instance_format_version: None,
7520        kind: TypeKind::Struct,
7521        wire: true,
7522    },
7523    TypeContract {
7524        name: "lifecycle_rollup_status",
7525        shape_version: 1,
7526        instance_format_version: None,
7527        kind: TypeKind::Struct,
7528        wire: true,
7529    },
7530    TypeContract {
7531        name: "lifecycle_status",
7532        shape_version: 2,
7533        instance_format_version: Some(4),
7534        kind: TypeKind::Struct,
7535        wire: true,
7536    },
7537    TypeContract {
7538        name: "quota_limit",
7539        shape_version: 1,
7540        instance_format_version: None,
7541        kind: TypeKind::Struct,
7542        wire: true,
7543    },
7544    TypeContract {
7545        name: "quota_consumption",
7546        shape_version: 1,
7547        instance_format_version: None,
7548        kind: TypeKind::Struct,
7549        wire: true,
7550    },
7551    TypeContract {
7552        name: "quota_update",
7553        shape_version: 1,
7554        instance_format_version: None,
7555        kind: TypeKind::Struct,
7556        wire: true,
7557    },
7558    TypeContract {
7559        name: "storage_overall_posture",
7560        shape_version: 1,
7561        instance_format_version: None,
7562        kind: TypeKind::Enum,
7563        wire: true,
7564    },
7565    TypeContract {
7566        name: "storage_profile_role",
7567        shape_version: 1,
7568        instance_format_version: None,
7569        kind: TypeKind::Enum,
7570        wire: true,
7571    },
7572    TypeContract {
7573        name: "storage_provider_posture",
7574        shape_version: 1,
7575        instance_format_version: None,
7576        kind: TypeKind::Enum,
7577        wire: true,
7578    },
7579    TypeContract {
7580        name: "storage_backend_service_class",
7581        shape_version: 1,
7582        instance_format_version: None,
7583        kind: TypeKind::Enum,
7584        wire: true,
7585    },
7586    TypeContract {
7587        name: "storage_profile_role_binding",
7588        shape_version: 1,
7589        instance_format_version: None,
7590        kind: TypeKind::Struct,
7591        wire: true,
7592    },
7593    TypeContract {
7594        name: "storage_profile_attestation",
7595        shape_version: 1,
7596        instance_format_version: Some(1),
7597        kind: TypeKind::Struct,
7598        wire: true,
7599    },
7600    TypeContract {
7601        name: "storage_profile_expectation",
7602        shape_version: 1,
7603        instance_format_version: Some(1),
7604        kind: TypeKind::Struct,
7605        wire: true,
7606    },
7607    TypeContract {
7608        name: "core_binding",
7609        shape_version: 3,
7610        instance_format_version: None,
7611        kind: TypeKind::Struct,
7612        wire: true,
7613    },
7614    TypeContract {
7615        name: "readiness_observation",
7616        shape_version: 1,
7617        instance_format_version: None,
7618        kind: TypeKind::Struct,
7619        wire: true,
7620    },
7621    TypeContract {
7622        name: "usage_dimension",
7623        shape_version: 1,
7624        instance_format_version: None,
7625        kind: TypeKind::Struct,
7626        wire: true,
7627    },
7628    TypeContract {
7629        name: "physical_usage_value",
7630        shape_version: 2,
7631        instance_format_version: None,
7632        kind: TypeKind::Struct,
7633        wire: true,
7634    },
7635    TypeContract {
7636        name: "core_usage_units",
7637        shape_version: 2,
7638        instance_format_version: None,
7639        kind: TypeKind::Struct,
7640        wire: true,
7641    },
7642    TypeContract {
7643        name: "core_usage_correction",
7644        shape_version: 2,
7645        instance_format_version: None,
7646        kind: TypeKind::Struct,
7647        wire: true,
7648    },
7649    TypeContract {
7650        name: "response_meta",
7651        shape_version: 1,
7652        instance_format_version: Some(1),
7653        kind: TypeKind::Struct,
7654        wire: true,
7655    },
7656    TypeContract {
7657        name: "error_disposition",
7658        shape_version: 1,
7659        instance_format_version: None,
7660        kind: TypeKind::Enum,
7661        wire: true,
7662    },
7663    TypeContract {
7664        name: "recovery_action",
7665        shape_version: 1,
7666        instance_format_version: None,
7667        kind: TypeKind::Enum,
7668        wire: true,
7669    },
7670    TypeContract {
7671        name: "limit_class",
7672        shape_version: 1,
7673        instance_format_version: None,
7674        kind: TypeKind::Enum,
7675        wire: true,
7676    },
7677    TypeContract {
7678        name: "error_detail",
7679        shape_version: 3,
7680        instance_format_version: None,
7681        kind: TypeKind::TaggedUnion,
7682        wire: true,
7683    },
7684    TypeContract {
7685        name: "connection_profile",
7686        shape_version: 4,
7687        instance_format_version: Some(4),
7688        kind: TypeKind::Struct,
7689        wire: false,
7690    },
7691];
7692#[derive(Clone, Copy, Debug, Eq, PartialEq)]
7693pub struct StreamContract {
7694    pub name: &'static str,
7695    pub action: Action,
7696    pub transport: &'static str,
7697    pub service: &'static str,
7698    pub method: &'static str,
7699    pub auth_metadata: &'static str,
7700    pub auth_scheme: &'static str,
7701    pub semantic_format_version: u16,
7702    pub start_type: &'static str,
7703    pub frame_type: &'static str,
7704}
7705pub const LODESTONE_API_STREAM_CONTRACTS: &[StreamContract] = &[StreamContract {
7706    name: "subscription",
7707    action: Action::SubscriptionRead,
7708    transport: "grpc_tls",
7709    service: "lodestone.api.FilterSubscription",
7710    method: "/lodestone.api.FilterSubscription/Subscribe",
7711    auth_metadata: "authorization",
7712    auth_scheme: "ApiKey",
7713    semantic_format_version: 1,
7714    start_type: "subscription_start",
7715    frame_type: "subscription_frame",
7716}];
7717#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7718#[serde(deny_unknown_fields)]
7719pub struct ErrorBody {
7720    pub code: ErrorCode,
7721    pub message: String,
7722    pub disposition: ErrorDisposition,
7723    pub recovery: RecoveryAction,
7724    pub details: ErrorDetail,
7725}
7726#[derive(Clone, Copy, Debug, Eq, PartialEq)]
7727pub enum ErrorShapeError {
7728    DetailCodeMismatch,
7729    OutcomeMismatch,
7730    RetryAfterOutOfRange,
7731}
7732impl ErrorBody {
7733    pub fn try_new(
7734        code: ErrorCode,
7735        message: String,
7736        disposition: ErrorDisposition,
7737        recovery: RecoveryAction,
7738        details: ErrorDetail,
7739    ) -> Result<Self, ErrorShapeError> {
7740        let body = Self {
7741            code,
7742            message,
7743            disposition,
7744            recovery,
7745            details,
7746        };
7747        validate_error_body(&body)?;
7748        Ok(body)
7749    }
7750    pub fn retry_safe(&self) -> bool {
7751        self.disposition == ErrorDisposition::NotSubmitted
7752            && matches!(
7753                self.recovery,
7754                RecoveryAction::Retry
7755                    | RecoveryAction::RetryAfter
7756                    | RecoveryAction::RefreshCredential
7757                    | RecoveryAction::RestartPage
7758                    | RecoveryAction::ReduceRequest
7759                    | RecoveryAction::RefreshPrecondition
7760                    | RecoveryAction::CorrectRange
7761            )
7762    }
7763    pub fn submitted(&self) -> bool {
7764        self.disposition != ErrorDisposition::NotSubmitted
7765    }
7766}
7767pub fn validate_error_body(body: &ErrorBody) -> Result<(), ErrorShapeError> {
7768    let detail_matches = matches!(
7769        (&body.code, &body.details),
7770        (ErrorCode::Aborted, ErrorDetail::Aborted { .. })
7771            | (ErrorCode::DeadlineExceeded, ErrorDetail::DeadlineExceeded)
7772            | (ErrorCode::InvalidRequest, ErrorDetail::InvalidRequest { .. })
7773            | (ErrorCode::UnsupportedVersion, ErrorDetail::UnsupportedVersion { .. })
7774            | (ErrorCode::Unauthenticated, ErrorDetail::Unauthenticated)
7775            | (ErrorCode::PermissionDenied, ErrorDetail::PermissionDenied { .. })
7776            | (ErrorCode::NotFound, ErrorDetail::NotFound { .. })
7777            | (ErrorCode::Conflict, ErrorDetail::Conflict { .. })
7778            | (ErrorCode::StaleCursor, ErrorDetail::StaleCursor { .. })
7779            | (
7780                ErrorCode::RestartBudgetExhausted,
7781                ErrorDetail::RestartBudgetExhausted { .. }
7782            )
7783            | (ErrorCode::LimitExceeded, ErrorDetail::LimitExceeded { .. })
7784            | (
7785                ErrorCode::CapabilityUnavailable,
7786                ErrorDetail::CapabilityUnavailable { .. }
7787            )
7788            | (ErrorCode::NotSubmitted, ErrorDetail::NotSubmitted { .. })
7789            | (
7790                ErrorCode::SubmittedIndeterminate,
7791                ErrorDetail::SubmittedIndeterminate { .. }
7792            )
7793            | (ErrorCode::ExpiredUnknown, ErrorDetail::ExpiredUnknown { .. })
7794            | (ErrorCode::SecretNotEscrowed, ErrorDetail::SecretNotEscrowed)
7795            | (ErrorCode::RetentionGap, ErrorDetail::RetentionGap { .. })
7796            | (
7797                ErrorCode::ArtifactRangeInvalid,
7798                ErrorDetail::ArtifactRangeInvalid { .. }
7799            )
7800            | (ErrorCode::ChecksumMismatch, ErrorDetail::ChecksumMismatch { .. })
7801            | (
7802                ErrorCode::TemporarilyUnavailable,
7803                ErrorDetail::TemporarilyUnavailable { .. }
7804            )
7805            | (ErrorCode::Internal, ErrorDetail::Internal)
7806    );
7807    if !detail_matches {
7808        return Err(ErrorShapeError::DetailCodeMismatch);
7809    }
7810    if !LODESTONE_API_ERROR_OUTCOMES.iter().any(|contract| {
7811        contract.code == body.code && contract.disposition == body.disposition && contract.recovery == body.recovery
7812    }) {
7813        return Err(ErrorShapeError::OutcomeMismatch);
7814    }
7815    let retry_after = match &body.details {
7816        ErrorDetail::NotSubmitted { retry_after_millis }
7817        | ErrorDetail::TemporarilyUnavailable { retry_after_millis } => retry_after_millis.as_ref(),
7818        _ => None,
7819    };
7820    if retry_after
7821        .and_then(|value| value.value.parse::<u64>().ok())
7822        .is_some_and(|value| value > 60000)
7823    {
7824        return Err(ErrorShapeError::RetryAfterOutOfRange);
7825    }
7826    Ok(())
7827}
7828#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
7829#[serde(deny_unknown_fields)]
7830pub struct RequestMeta {
7831    pub format_version: u16,
7832    pub request_id: String,
7833    pub correlation_id: Identity,
7834    pub absolute_deadline_unix_millis: U64,
7835    pub workload_class: WorkloadClass,
7836}
7837
7838#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7839#[serde(deny_unknown_fields)]
7840pub struct DiscoverRequest {}
7841
7842#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7843#[serde(deny_unknown_fields)]
7844pub struct DiscoverResult {
7845    pub principal_id: Identity,
7846    pub collection_id: Identity,
7847    pub policy_revision: U64,
7848    pub artifact_version: String,
7849    pub schema_id: String,
7850    pub schema_digest: Digest,
7851    pub streams: Vec<StreamBinding>,
7852    pub capabilities: Vec<CapabilityGrant>,
7853    pub limits: Vec<ProtocolLimit>,
7854}
7855
7856#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7857#[serde(deny_unknown_fields)]
7858pub struct ListIndexesRequest {
7859    pub page_size: u32,
7860    #[serde(default, skip_serializing_if = "Option::is_none")]
7861    pub cursor: Option<Cursor>,
7862    #[serde(default, skip_serializing_if = "Option::is_none")]
7863    pub name_prefix: Option<String>,
7864    #[serde(default, skip_serializing_if = "Option::is_none")]
7865    pub mode: Option<String>,
7866    #[serde(default, skip_serializing_if = "Option::is_none")]
7867    pub state: Option<String>,
7868    pub restart_count: u32,
7869}
7870
7871#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7872#[serde(deny_unknown_fields)]
7873pub struct ListIndexesResult {
7874    pub items: Vec<IndexSummary>,
7875    #[serde(default, skip_serializing_if = "Option::is_none")]
7876    pub next_cursor: Option<Cursor>,
7877    pub restart_count: u32,
7878}
7879
7880#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7881#[serde(deny_unknown_fields)]
7882pub struct GetIndexRequest {
7883    pub name: String,
7884    #[serde(default, skip_serializing_if = "Option::is_none")]
7885    pub expected_incarnation: Option<Identity>,
7886}
7887
7888#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7889#[serde(deny_unknown_fields)]
7890pub struct GetIndexResult {
7891    pub resource: IndexDetail,
7892}
7893
7894#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7895#[serde(deny_unknown_fields)]
7896pub struct ValidateIndexChangeRequest {
7897    pub action_kind: String,
7898    pub name: String,
7899    #[serde(default, skip_serializing_if = "Option::is_none")]
7900    pub expected_incarnation: Option<Identity>,
7901    #[serde(default, skip_serializing_if = "Option::is_none")]
7902    pub expected_revision: Option<U64>,
7903    #[serde(default, skip_serializing_if = "Option::is_none")]
7904    pub mode: Option<String>,
7905    #[serde(default, skip_serializing_if = "Option::is_none")]
7906    pub mapping: Option<Mapping>,
7907    #[serde(default, skip_serializing_if = "Option::is_none")]
7908    pub policies: Option<IndexPolicies>,
7909}
7910
7911#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7912#[serde(deny_unknown_fields)]
7913pub struct ValidateIndexChangeResult {
7914    pub change_kind: String,
7915    pub fields_added: Vec<String>,
7916    pub policy_axes_changed: Vec<String>,
7917    pub required_capabilities: Vec<String>,
7918    pub catalog_revision: U64,
7919    pub policy_revision: U64,
7920}
7921
7922#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7923#[serde(deny_unknown_fields)]
7924pub struct ApplyIndexChangeRequest {
7925    pub action_id: Digest,
7926    pub index: Resource,
7927    pub expected_revision: U64,
7928    #[serde(default, skip_serializing_if = "Option::is_none")]
7929    pub mapping: Option<Mapping>,
7930    #[serde(default, skip_serializing_if = "Option::is_none")]
7931    pub policies: Option<IndexPolicies>,
7932}
7933
7934#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7935#[serde(deny_unknown_fields)]
7936pub struct ApplyIndexChangeResult {
7937    pub receipt: IndexChangeApplyReceipt,
7938}
7939
7940#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7941#[serde(deny_unknown_fields)]
7942pub struct ApplyAdministrationMutationRequest {
7943    pub action_id: Digest,
7944    pub expected_revision: U64,
7945    pub mutation: AdministrationMutation,
7946}
7947
7948#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7949#[serde(deny_unknown_fields)]
7950pub struct ApplyAdministrationMutationResult {
7951    pub outcome: AdministrationOutcome,
7952}
7953
7954#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7955#[serde(deny_unknown_fields)]
7956pub struct ListAliasesRequest {
7957    pub page_size: u32,
7958    #[serde(default, skip_serializing_if = "Option::is_none")]
7959    pub cursor: Option<Cursor>,
7960    #[serde(default, skip_serializing_if = "Option::is_none")]
7961    pub name_prefix: Option<String>,
7962    pub restart_count: u32,
7963}
7964
7965#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7966#[serde(deny_unknown_fields)]
7967pub struct ListAliasesResult {
7968    pub items: Vec<AliasSummary>,
7969    #[serde(default, skip_serializing_if = "Option::is_none")]
7970    pub next_cursor: Option<Cursor>,
7971    pub restart_count: u32,
7972}
7973
7974#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7975#[serde(deny_unknown_fields)]
7976pub struct GetAliasRequest {
7977    pub name: String,
7978}
7979
7980#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7981#[serde(deny_unknown_fields)]
7982pub struct GetAliasResult {
7983    pub resource: AliasDetail,
7984}
7985
7986#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7987#[serde(deny_unknown_fields)]
7988pub struct ListDataStreamsRequest {
7989    pub page_size: u32,
7990    #[serde(default, skip_serializing_if = "Option::is_none")]
7991    pub cursor: Option<Cursor>,
7992    #[serde(default, skip_serializing_if = "Option::is_none")]
7993    pub name_prefix: Option<String>,
7994    pub restart_count: u32,
7995}
7996
7997#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7998#[serde(deny_unknown_fields)]
7999pub struct ListDataStreamsResult {
8000    pub items: Vec<DataStreamSummary>,
8001    #[serde(default, skip_serializing_if = "Option::is_none")]
8002    pub next_cursor: Option<Cursor>,
8003    pub restart_count: u32,
8004}
8005
8006#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8007#[serde(deny_unknown_fields)]
8008pub struct GetDataStreamRequest {
8009    pub name: String,
8010}
8011
8012#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8013#[serde(deny_unknown_fields)]
8014pub struct GetDataStreamResult {
8015    pub resource: DataStreamDetail,
8016}
8017
8018#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8019#[serde(deny_unknown_fields)]
8020pub struct ListComponentTemplatesRequest {
8021    pub page_size: u32,
8022    #[serde(default, skip_serializing_if = "Option::is_none")]
8023    pub cursor: Option<Cursor>,
8024    #[serde(default, skip_serializing_if = "Option::is_none")]
8025    pub name_prefix: Option<String>,
8026    pub restart_count: u32,
8027}
8028
8029#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8030#[serde(deny_unknown_fields)]
8031pub struct ListComponentTemplatesResult {
8032    pub items: Vec<ComponentTemplateSummary>,
8033    #[serde(default, skip_serializing_if = "Option::is_none")]
8034    pub next_cursor: Option<Cursor>,
8035    pub restart_count: u32,
8036}
8037
8038#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8039#[serde(deny_unknown_fields)]
8040pub struct GetComponentTemplateRequest {
8041    pub name: String,
8042    #[serde(default, skip_serializing_if = "Option::is_none")]
8043    pub expected_incarnation: Option<Identity>,
8044}
8045
8046#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8047#[serde(deny_unknown_fields)]
8048pub struct GetComponentTemplateResult {
8049    pub resource: ComponentTemplateDetail,
8050}
8051
8052#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8053#[serde(deny_unknown_fields)]
8054pub struct ListIndexTemplatesRequest {
8055    pub page_size: u32,
8056    #[serde(default, skip_serializing_if = "Option::is_none")]
8057    pub cursor: Option<Cursor>,
8058    #[serde(default, skip_serializing_if = "Option::is_none")]
8059    pub name_prefix: Option<String>,
8060    pub restart_count: u32,
8061}
8062
8063#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8064#[serde(deny_unknown_fields)]
8065pub struct ListIndexTemplatesResult {
8066    pub items: Vec<IndexTemplateSummary>,
8067    #[serde(default, skip_serializing_if = "Option::is_none")]
8068    pub next_cursor: Option<Cursor>,
8069    pub restart_count: u32,
8070}
8071
8072#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8073#[serde(deny_unknown_fields)]
8074pub struct GetIndexTemplateRequest {
8075    pub name: String,
8076    #[serde(default, skip_serializing_if = "Option::is_none")]
8077    pub expected_incarnation: Option<Identity>,
8078}
8079
8080#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8081#[serde(deny_unknown_fields)]
8082pub struct GetIndexTemplateResult {
8083    pub resource: IndexTemplateDetail,
8084}
8085
8086#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8087#[serde(deny_unknown_fields)]
8088pub struct ListIngestPipelinesRequest {
8089    pub page_size: u32,
8090    #[serde(default, skip_serializing_if = "Option::is_none")]
8091    pub cursor: Option<Cursor>,
8092    #[serde(default, skip_serializing_if = "Option::is_none")]
8093    pub name_prefix: Option<String>,
8094    pub restart_count: u32,
8095}
8096
8097#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8098#[serde(deny_unknown_fields)]
8099pub struct ListIngestPipelinesResult {
8100    pub items: Vec<IngestPipelineSummary>,
8101    #[serde(default, skip_serializing_if = "Option::is_none")]
8102    pub next_cursor: Option<Cursor>,
8103    pub restart_count: u32,
8104}
8105
8106#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8107#[serde(deny_unknown_fields)]
8108pub struct GetIngestPipelineRequest {
8109    pub name: String,
8110    #[serde(default, skip_serializing_if = "Option::is_none")]
8111    pub expected_incarnation: Option<Identity>,
8112}
8113
8114#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8115#[serde(deny_unknown_fields)]
8116pub struct GetIngestPipelineResult {
8117    pub resource: IngestPipelineDetail,
8118}
8119
8120#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8121#[serde(deny_unknown_fields)]
8122pub struct SimulateIngestPipelineRequest {
8123    #[serde(default, skip_serializing_if = "Option::is_none")]
8124    pub name: Option<String>,
8125    #[serde(default, skip_serializing_if = "Option::is_none")]
8126    pub expected: Option<ExpectedBinding>,
8127    #[serde(default, skip_serializing_if = "Option::is_none")]
8128    pub definition: Option<RawJson>,
8129    pub source: RawJson,
8130}
8131
8132#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8133#[serde(deny_unknown_fields)]
8134pub struct SimulateIngestPipelineResult {
8135    #[serde(default, skip_serializing_if = "Option::is_none")]
8136    pub source: Option<RawJson>,
8137    pub dropped: bool,
8138    pub changed: bool,
8139}
8140
8141#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8142#[serde(deny_unknown_fields)]
8143pub struct ReprocessByQueryRequest {
8144    pub action_id: Digest,
8145    pub index: Resource,
8146    pub query: Query,
8147    #[serde(default, skip_serializing_if = "Option::is_none")]
8148    pub pipeline: Option<IngestPipelineSelection>,
8149    pub batch_size: u32,
8150    pub max_docs: U64,
8151    pub proceed_on_conflict: bool,
8152    pub slices: u32,
8153    pub requests_per_second: u32,
8154    pub wait_for_completion: bool,
8155}
8156
8157#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8158#[serde(deny_unknown_fields)]
8159pub struct ReprocessByQueryResult {
8160    pub task_id: Identity,
8161    pub scanned: U64,
8162    pub updated: U64,
8163    pub noops: U64,
8164    pub version_conflicts: U64,
8165    pub batches: U64,
8166    pub completed: bool,
8167}
8168
8169#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8170#[serde(deny_unknown_fields)]
8171pub struct ListLifecyclePoliciesRequest {
8172    pub page_size: u32,
8173    #[serde(default, skip_serializing_if = "Option::is_none")]
8174    pub cursor: Option<Cursor>,
8175    #[serde(default, skip_serializing_if = "Option::is_none")]
8176    pub name_prefix: Option<String>,
8177    pub restart_count: u32,
8178}
8179
8180#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8181#[serde(deny_unknown_fields)]
8182pub struct ListLifecyclePoliciesResult {
8183    pub items: Vec<LifecyclePolicySummary>,
8184    #[serde(default, skip_serializing_if = "Option::is_none")]
8185    pub next_cursor: Option<Cursor>,
8186    pub restart_count: u32,
8187}
8188
8189#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8190#[serde(deny_unknown_fields)]
8191pub struct GetLifecyclePolicyRequest {
8192    pub name: String,
8193}
8194
8195#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8196#[serde(deny_unknown_fields)]
8197pub struct GetLifecyclePolicyResult {
8198    pub resource: LifecyclePolicyDetail,
8199}
8200
8201#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8202#[serde(deny_unknown_fields)]
8203pub struct PrepareCreateIndexRequest {
8204    pub name: String,
8205    pub mapping: Mapping,
8206    #[serde(default, skip_serializing_if = "Option::is_none")]
8207    pub resource_spec: Option<IndexResourceSpec>,
8208    #[serde(default, skip_serializing_if = "Option::is_none")]
8209    pub retained_event_identity: Option<bool>,
8210}
8211
8212#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8213#[serde(deny_unknown_fields)]
8214pub struct PrepareCreateIndexResult {
8215    pub locator: Locator,
8216    pub expires_at: U64,
8217    pub semantic_digest: Digest,
8218    pub resource_spec: IndexResourceSpec,
8219}
8220
8221#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8222#[serde(deny_unknown_fields)]
8223pub struct PrepareDeleteIndexRequest {
8224    pub name: String,
8225    pub expected_incarnation: Identity,
8226}
8227
8228#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8229#[serde(deny_unknown_fields)]
8230pub struct PrepareDeleteIndexResult {
8231    #[serde(default, skip_serializing_if = "Option::is_none")]
8232    pub locator: Option<Locator>,
8233    #[serde(default, skip_serializing_if = "Option::is_none")]
8234    pub expires_at: Option<U64>,
8235    #[serde(default, skip_serializing_if = "Option::is_none")]
8236    pub semantic_digest: Option<Digest>,
8237    pub impact_digest: Digest,
8238    pub blockers: Vec<String>,
8239    pub scheduled_effects: Vec<String>,
8240    #[serde(default, skip_serializing_if = "Option::is_none")]
8241    pub estimated_documents: Option<U64>,
8242    #[serde(default, skip_serializing_if = "Option::is_none")]
8243    pub estimated_logical_bytes: Option<U64>,
8244}
8245
8246#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8247#[serde(deny_unknown_fields)]
8248pub struct SubmitCatalogActionRequest {
8249    pub locator: Locator,
8250    pub semantic_digest: Digest,
8251    pub action_kind: String,
8252    pub name: String,
8253    #[serde(default, skip_serializing_if = "Option::is_none")]
8254    pub mapping: Option<Mapping>,
8255    #[serde(default, skip_serializing_if = "Option::is_none")]
8256    pub resource_spec: Option<IndexResourceSpec>,
8257    #[serde(default, skip_serializing_if = "Option::is_none")]
8258    pub expected_incarnation: Option<Identity>,
8259}
8260
8261#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8262#[serde(deny_unknown_fields)]
8263pub struct SubmitCatalogActionResult {
8264    pub locator: Locator,
8265    pub state: String,
8266    pub mutation_outcome: MutationOutcome,
8267}
8268
8269#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8270#[serde(deny_unknown_fields)]
8271pub struct ResolveCatalogActionRequest {
8272    pub locator: Locator,
8273}
8274
8275#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8276#[serde(deny_unknown_fields)]
8277pub struct ResolveCatalogActionResult {
8278    pub locator: Locator,
8279    pub state: String,
8280    #[serde(default, skip_serializing_if = "Option::is_none")]
8281    pub resource: Option<Resource>,
8282}
8283
8284#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8285#[serde(deny_unknown_fields)]
8286pub struct PrepareReplayableSourceIndexRequest {
8287    pub name: String,
8288    pub mapping: Mapping,
8289    #[serde(default, skip_serializing_if = "Option::is_none")]
8290    pub resource_spec: Option<IndexResourceSpec>,
8291    pub source: ReplayableSourceConfiguration,
8292}
8293
8294#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8295#[serde(deny_unknown_fields)]
8296pub struct PrepareReplayableSourceIndexResult {
8297    pub locator: Locator,
8298    pub expires_at: U64,
8299    pub semantic_digest: Digest,
8300    pub resource_spec: IndexResourceSpec,
8301}
8302
8303#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8304#[serde(deny_unknown_fields)]
8305pub struct SubmitReplayableSourceIndexRequest {
8306    pub locator: Locator,
8307    pub semantic_digest: Digest,
8308    pub name: String,
8309    pub mapping: Mapping,
8310    pub resource_spec: IndexResourceSpec,
8311    pub source: ReplayableSourceConfiguration,
8312}
8313
8314#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8315#[serde(deny_unknown_fields)]
8316pub struct SubmitReplayableSourceIndexResult {
8317    pub locator: Locator,
8318    pub state: String,
8319    pub mutation_outcome: MutationOutcome,
8320}
8321
8322#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8323#[serde(deny_unknown_fields)]
8324pub struct GetReplayableSourceRequest {
8325    pub index: Resource,
8326}
8327
8328#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8329#[serde(deny_unknown_fields)]
8330pub struct GetReplayableSourceResult {
8331    pub status: ReplayableSourceStatus,
8332}
8333
8334#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8335#[serde(deny_unknown_fields)]
8336pub struct ControlReplayableSourceRequest {
8337    pub index: Resource,
8338    pub expected_generation: U64,
8339    pub transition: SourceControlTransition,
8340}
8341
8342#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8343#[serde(deny_unknown_fields)]
8344pub struct ControlReplayableSourceResult {
8345    pub status: ReplayableSourceStatus,
8346    pub mutation_outcome: MutationOutcome,
8347}
8348
8349#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8350#[serde(deny_unknown_fields)]
8351pub struct CloneIndexRequest {
8352    pub source: Resource,
8353    pub destination_name: String,
8354    pub operation_id: Identity,
8355    pub source_cut_id: Identity,
8356}
8357
8358#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8359#[serde(deny_unknown_fields)]
8360pub struct CloneIndexResult {
8361    pub destination: Resource,
8362    pub source_cut_id: Identity,
8363    pub mutation_outcome: MutationOutcome,
8364}
8365
8366#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8367#[serde(deny_unknown_fields)]
8368pub struct ConfigureHistoryRequest {
8369    pub index: Resource,
8370    pub precondition: HistoryLedgerPrecondition,
8371    pub policy: HistoryRetentionPolicy,
8372}
8373
8374#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8375#[serde(deny_unknown_fields)]
8376pub struct ConfigureHistoryResult {
8377    pub status: HistoryStatus,
8378    pub mutation_outcome: MutationOutcome,
8379}
8380
8381#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8382#[serde(deny_unknown_fields)]
8383pub struct GetHistoryRequest {
8384    pub index: Resource,
8385}
8386
8387#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8388#[serde(deny_unknown_fields)]
8389pub struct GetHistoryResult {
8390    pub status: HistoryStatus,
8391}
8392
8393#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8394#[serde(deny_unknown_fields)]
8395pub struct ResolveHistoryRequest {
8396    pub index: Resource,
8397    pub selector: HistorySelector,
8398}
8399
8400#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8401#[serde(deny_unknown_fields)]
8402pub struct ResolveHistoryResult {
8403    pub resolution: HistoryResolution,
8404}
8405
8406#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8407#[serde(deny_unknown_fields)]
8408pub struct PlaceHistoryHoldRequest {
8409    pub index: Resource,
8410    pub expected_ledger_revision: U64,
8411    pub hold: HistoryHold,
8412}
8413
8414#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8415#[serde(deny_unknown_fields)]
8416pub struct PlaceHistoryHoldResult {
8417    pub status: HistoryStatus,
8418    pub mutation_outcome: MutationOutcome,
8419}
8420
8421#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8422#[serde(deny_unknown_fields)]
8423pub struct ReleaseHistoryHoldRequest {
8424    pub index: Resource,
8425    pub expected_ledger_revision: U64,
8426    pub hold_id: Identity,
8427}
8428
8429#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8430#[serde(deny_unknown_fields)]
8431pub struct ReleaseHistoryHoldResult {
8432    pub status: HistoryStatus,
8433    pub mutation_outcome: MutationOutcome,
8434}
8435
8436#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8437#[serde(deny_unknown_fields)]
8438pub struct PrepareDocumentMutationRequest {
8439    pub index: Resource,
8440    pub document_id: String,
8441    pub operation: String,
8442    #[serde(default, skip_serializing_if = "Option::is_none")]
8443    pub source: Option<RawJson>,
8444    #[serde(default, skip_serializing_if = "Option::is_none")]
8445    pub record: Option<NativeRecord>,
8446    #[serde(default, skip_serializing_if = "Option::is_none")]
8447    pub routing: Option<String>,
8448    #[serde(default, skip_serializing_if = "Option::is_none")]
8449    pub condition: Option<DocumentMutationCondition>,
8450    #[serde(default, skip_serializing_if = "Option::is_none")]
8451    pub pipeline: Option<IngestPipelineSelection>,
8452}
8453
8454#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8455#[serde(deny_unknown_fields)]
8456pub struct PrepareDocumentMutationResult {
8457    pub locator: Locator,
8458    pub semantic_digest: Digest,
8459    pub retention_max_entries: U64,
8460    pub retention_sequence_window: U64,
8461}
8462
8463#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8464#[serde(deny_unknown_fields)]
8465pub struct SubmitDocumentMutationRequest {
8466    pub locator: Locator,
8467    pub semantic_digest: Digest,
8468    pub index: Resource,
8469    pub document_id: String,
8470    pub operation: String,
8471    #[serde(default, skip_serializing_if = "Option::is_none")]
8472    pub source: Option<RawJson>,
8473    #[serde(default, skip_serializing_if = "Option::is_none")]
8474    pub record: Option<NativeRecord>,
8475    #[serde(default, skip_serializing_if = "Option::is_none")]
8476    pub routing: Option<String>,
8477    #[serde(default, skip_serializing_if = "Option::is_none")]
8478    pub condition: Option<DocumentMutationCondition>,
8479    #[serde(default, skip_serializing_if = "Option::is_none")]
8480    pub pipeline: Option<IngestPipelineSelection>,
8481}
8482
8483#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8484#[serde(deny_unknown_fields)]
8485pub struct SubmitDocumentMutationResult {
8486    pub locator: Locator,
8487    pub state: String,
8488    pub mutation_outcome: MutationOutcome,
8489    #[serde(default, skip_serializing_if = "Option::is_none")]
8490    pub achievement: Option<WriteAchievement>,
8491    #[serde(default, skip_serializing_if = "Option::is_none")]
8492    pub sequence: Option<U64>,
8493    #[serde(default, skip_serializing_if = "Option::is_none")]
8494    pub mapping_generation: Option<U64>,
8495    pub mapping_adopted: bool,
8496}
8497
8498#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8499#[serde(deny_unknown_fields)]
8500pub struct PrepareDocumentBulkRequest {
8501    pub batch_id: Digest,
8502    pub index: Resource,
8503    pub items: Vec<BulkDocumentItem>,
8504}
8505
8506#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8507#[serde(deny_unknown_fields)]
8508pub struct PrepareDocumentBulkResult {
8509    pub outcome: BulkDocumentOutcome,
8510}
8511
8512#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8513#[serde(deny_unknown_fields)]
8514pub struct SubmitDocumentBulkRequest {
8515    pub batch_id: Digest,
8516    pub index: Resource,
8517    pub items: Vec<BulkDocumentItem>,
8518    pub preparations: Vec<BulkDocumentItemOutcome>,
8519}
8520
8521#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8522#[serde(deny_unknown_fields)]
8523pub struct SubmitDocumentBulkResult {
8524    pub outcome: BulkDocumentOutcome,
8525}
8526
8527#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8528#[serde(deny_unknown_fields)]
8529pub struct ResolveDocumentBulkRequest {
8530    pub batch_id: Digest,
8531    pub index: Resource,
8532    pub items: Vec<BulkDocumentItemOutcome>,
8533}
8534
8535#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8536#[serde(deny_unknown_fields)]
8537pub struct ResolveDocumentBulkResult {
8538    pub outcome: BulkDocumentOutcome,
8539}
8540
8541#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8542#[serde(deny_unknown_fields)]
8543pub struct PrepareAppendBulkRequest {
8544    pub batch_id: Digest,
8545    pub index: Resource,
8546    pub items: Vec<RetainedAppendItem>,
8547}
8548
8549#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8550#[serde(deny_unknown_fields)]
8551pub struct PrepareAppendBulkResult {
8552    pub outcome: RetainedAppendBulkOutcome,
8553}
8554
8555#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8556#[serde(deny_unknown_fields)]
8557pub struct SubmitAppendBulkRequest {
8558    pub batch_id: Digest,
8559    pub index: Resource,
8560    pub items: Vec<RetainedAppendItem>,
8561    pub preparations: Vec<RetainedAppendItemOutcome>,
8562}
8563
8564#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8565#[serde(deny_unknown_fields)]
8566pub struct SubmitAppendBulkResult {
8567    pub outcome: RetainedAppendBulkOutcome,
8568}
8569
8570#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8571#[serde(deny_unknown_fields)]
8572pub struct ResolveAppendBulkRequest {
8573    pub batch_id: Digest,
8574    pub index: Resource,
8575    pub items: Vec<RetainedAppendItemOutcome>,
8576}
8577
8578#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8579#[serde(deny_unknown_fields)]
8580pub struct ResolveAppendBulkResult {
8581    pub outcome: RetainedAppendBulkOutcome,
8582}
8583
8584#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8585#[serde(deny_unknown_fields)]
8586pub struct ObserveAppendCommittedRequest {
8587    pub index: Resource,
8588    pub locator: Locator,
8589}
8590
8591#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8592#[serde(deny_unknown_fields)]
8593pub struct ObserveAppendCommittedResult {
8594    pub outcome: RetainedAppendObservationOutcome,
8595}
8596
8597#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8598#[serde(deny_unknown_fields)]
8599pub struct ResolveDocumentMutationRequest {
8600    pub locator: Locator,
8601}
8602
8603#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8604#[serde(deny_unknown_fields)]
8605pub struct ResolveDocumentMutationResult {
8606    pub locator: Locator,
8607    pub state: String,
8608    #[serde(default, skip_serializing_if = "Option::is_none")]
8609    pub sequence: Option<U64>,
8610    #[serde(default, skip_serializing_if = "Option::is_none")]
8611    pub mapping_generation: Option<U64>,
8612    pub mapping_adopted: bool,
8613    #[serde(default, skip_serializing_if = "Option::is_none")]
8614    pub source: Option<RawJson>,
8615}
8616
8617#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8618#[serde(deny_unknown_fields)]
8619pub struct GetDocumentRequest {
8620    pub index: Resource,
8621    pub document_id: String,
8622    #[serde(default, skip_serializing_if = "Option::is_none")]
8623    pub routing: Option<String>,
8624}
8625
8626#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8627#[serde(deny_unknown_fields)]
8628pub struct GetDocumentResult {
8629    pub found: bool,
8630    #[serde(default, skip_serializing_if = "Option::is_none")]
8631    pub source: Option<RawJson>,
8632    #[serde(default, skip_serializing_if = "Option::is_none")]
8633    pub sequence: Option<U64>,
8634    #[serde(default, skip_serializing_if = "Option::is_none")]
8635    pub primary_term: Option<U64>,
8636}
8637
8638#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8639#[serde(deny_unknown_fields)]
8640pub struct SearchRequest {
8641    #[serde(default, skip_serializing_if = "Option::is_none")]
8642    pub indexes: Option<Vec<Resource>>,
8643    #[serde(default, skip_serializing_if = "Option::is_none")]
8644    pub query: Option<Query>,
8645    #[serde(default, skip_serializing_if = "Option::is_none")]
8646    pub retrieval: Option<RetrievalPlan>,
8647    #[serde(default, skip_serializing_if = "Option::is_none")]
8648    pub aggregations: Option<Vec<Aggregation>>,
8649    pub sort: Vec<SortSpec>,
8650    #[serde(default, skip_serializing_if = "Option::is_none")]
8651    pub routing: Option<Vec<String>>,
8652    pub freshness: SearchFreshness,
8653    pub page_size: u32,
8654    #[serde(default, skip_serializing_if = "Option::is_none")]
8655    pub cursor: Option<Cursor>,
8656    #[serde(default, skip_serializing_if = "Option::is_none")]
8657    pub pit: Option<Cursor>,
8658    pub allow_partial: bool,
8659    #[serde(default, skip_serializing_if = "Option::is_none")]
8660    pub total_hits_threshold: Option<U64>,
8661    pub diagnostics: bool,
8662    #[serde(default, skip_serializing_if = "Option::is_none")]
8663    pub fragments: Option<FragmentRequest>,
8664    #[serde(default, skip_serializing_if = "Option::is_none")]
8665    pub features: Option<ResultFeatureRequest>,
8666    #[serde(default, skip_serializing_if = "Option::is_none")]
8667    pub diversification: Option<ResultDiversification>,
8668}
8669
8670#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8671#[serde(deny_unknown_fields)]
8672pub struct SearchResult {
8673    pub hits: Vec<SearchHit>,
8674    pub aggregations: Vec<AggregationResult>,
8675    #[serde(default, skip_serializing_if = "Option::is_none")]
8676    pub next_cursor: Option<Cursor>,
8677    pub timed_out: bool,
8678    pub partial: bool,
8679    pub achieved: SearchAchievement,
8680    pub shards: ShardCounts,
8681    pub total: SearchTotal,
8682    pub failures: Vec<SearchPartialFailure>,
8683    pub vector_diagnostics: Vec<VectorBranchDiagnostics>,
8684}
8685
8686#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8687#[serde(deny_unknown_fields)]
8688pub struct TraverseRelationshipsRequest {
8689    pub pit: Cursor,
8690    pub indexes: Vec<Resource>,
8691    pub seeds: Vec<EntityRef>,
8692    pub direction: RelationshipTraversalDirection,
8693    pub filter: RelationshipTraversalFilter,
8694    pub budget: RelationshipTraversalBudget,
8695    pub allow_partial: bool,
8696}
8697
8698#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8699#[serde(deny_unknown_fields)]
8700pub struct TraverseRelationshipsResult {
8701    pub relationships: Vec<TraversedRelationship>,
8702    pub visited_entities: Vec<EntityRef>,
8703    pub input_cut_digest: Digest,
8704    pub partial: bool,
8705    pub incomplete_frontier: Vec<EntityRef>,
8706    pub failures: Vec<SearchPartialFailure>,
8707}
8708
8709#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8710#[serde(deny_unknown_fields)]
8711pub struct QueryProfilesRequest {
8712    pub pit: Cursor,
8713    pub indexes: Vec<Resource>,
8714    pub operation: ProfileQueryOperation,
8715    pub start_unix_nanos: U64,
8716    pub end_unix_nanos: U64,
8717    pub sample_type: String,
8718    pub unit: String,
8719    pub filter: ProfileQueryFilter,
8720    #[serde(default, skip_serializing_if = "Option::is_none")]
8721    pub group_by: Option<ProfileGroupBy>,
8722    pub budget: ProfileQueryBudget,
8723    pub allow_partial: bool,
8724}
8725
8726#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8727#[serde(deny_unknown_fields)]
8728pub struct QueryProfilesResult {
8729    pub rows: Vec<ProfileQueryRow>,
8730    pub evaluated_batches: u32,
8731    pub evaluated_samples: u32,
8732    pub input_cut_digest: Digest,
8733    pub partial: bool,
8734    pub approximate: bool,
8735    pub failures: Vec<SearchPartialFailure>,
8736}
8737
8738#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8739#[serde(deny_unknown_fields)]
8740pub struct EvaluateTemporalEvidenceRequest {
8741    pub pit: Cursor,
8742    pub definition: HistoricalTemporalDefinition,
8743}
8744
8745#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8746#[serde(deny_unknown_fields)]
8747pub struct EvaluateTemporalEvidenceResult {
8748    pub evidence: Vec<TemporalEvidence>,
8749    pub input_cut_digest: Digest,
8750    pub pattern_digest: Digest,
8751    pub evaluated_events: u32,
8752}
8753
8754#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8755#[serde(deny_unknown_fields)]
8756pub struct CreateContinuousTemporalEvaluationRequest {
8757    pub action_id: Digest,
8758    pub definition: ContinuousTemporalDefinition,
8759}
8760
8761#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8762#[serde(deny_unknown_fields)]
8763pub struct CreateContinuousTemporalEvaluationResult {
8764    pub evaluation: ContinuousTemporalEvaluation,
8765    pub mutation_outcome: MutationOutcome,
8766}
8767
8768#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8769#[serde(deny_unknown_fields)]
8770pub struct GetContinuousTemporalEvaluationRequest {
8771    pub evaluation_id: Identity,
8772}
8773
8774#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8775#[serde(deny_unknown_fields)]
8776pub struct GetContinuousTemporalEvaluationResult {
8777    pub evaluation: ContinuousTemporalEvaluation,
8778}
8779
8780#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8781#[serde(deny_unknown_fields)]
8782pub struct PauseContinuousTemporalEvaluationRequest {
8783    pub action_id: Digest,
8784    pub evaluation_id: Identity,
8785    pub expected_revision: U64,
8786}
8787
8788#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8789#[serde(deny_unknown_fields)]
8790pub struct PauseContinuousTemporalEvaluationResult {
8791    pub evaluation: ContinuousTemporalEvaluation,
8792    pub mutation_outcome: MutationOutcome,
8793}
8794
8795#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8796#[serde(deny_unknown_fields)]
8797pub struct ResumeContinuousTemporalEvaluationRequest {
8798    pub action_id: Digest,
8799    pub evaluation_id: Identity,
8800    pub expected_revision: U64,
8801}
8802
8803#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8804#[serde(deny_unknown_fields)]
8805pub struct ResumeContinuousTemporalEvaluationResult {
8806    pub evaluation: ContinuousTemporalEvaluation,
8807    pub mutation_outcome: MutationOutcome,
8808}
8809
8810#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8811#[serde(deny_unknown_fields)]
8812pub struct ReplaceContinuousTemporalEvaluationRequest {
8813    pub action_id: Digest,
8814    pub expected_revision: U64,
8815    pub definition: ContinuousTemporalDefinition,
8816}
8817
8818#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8819#[serde(deny_unknown_fields)]
8820pub struct ReplaceContinuousTemporalEvaluationResult {
8821    pub evaluation: ContinuousTemporalEvaluation,
8822    pub mutation_outcome: MutationOutcome,
8823}
8824
8825#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8826#[serde(deny_unknown_fields)]
8827pub struct RetireContinuousTemporalEvaluationRequest {
8828    pub action_id: Digest,
8829    pub evaluation_id: Identity,
8830    pub expected_revision: U64,
8831}
8832
8833#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8834#[serde(deny_unknown_fields)]
8835pub struct RetireContinuousTemporalEvaluationResult {
8836    #[serde(default, skip_serializing_if = "Option::is_none")]
8837    pub evaluation: Option<ContinuousTemporalEvaluation>,
8838    pub mutation_outcome: MutationOutcome,
8839}
8840
8841#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8842#[serde(deny_unknown_fields)]
8843pub struct ReadContinuousTemporalEvidenceRequest {
8844    pub evaluation_id: Identity,
8845    pub expected_revision: U64,
8846    pub minimum_event_time_unix_nanos: U64,
8847    pub page_size: u32,
8848    #[serde(default, skip_serializing_if = "Option::is_none")]
8849    pub cursor: Option<Cursor>,
8850}
8851
8852#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8853#[serde(deny_unknown_fields)]
8854pub struct ReadContinuousTemporalEvidenceResult {
8855    pub evidence: Vec<TemporalEvidence>,
8856    #[serde(default, skip_serializing_if = "Option::is_none")]
8857    pub next_cursor: Option<Cursor>,
8858    pub retained_floor_unix_nanos: U64,
8859    pub evaluation_revision: U64,
8860}
8861
8862#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8863#[serde(deny_unknown_fields)]
8864pub struct ValidateSearchRequest {
8865    pub indexes: Vec<Resource>,
8866    #[serde(default, skip_serializing_if = "Option::is_none")]
8867    pub query: Option<Query>,
8868    #[serde(default, skip_serializing_if = "Option::is_none")]
8869    pub retrieval: Option<RetrievalPlan>,
8870    #[serde(default, skip_serializing_if = "Option::is_none")]
8871    pub aggregations: Option<Vec<Aggregation>>,
8872    pub sort: Vec<SortSpec>,
8873    #[serde(default, skip_serializing_if = "Option::is_none")]
8874    pub routing: Option<Vec<String>>,
8875    pub freshness: SearchFreshness,
8876    pub page_size: u32,
8877    pub allow_partial: bool,
8878    #[serde(default, skip_serializing_if = "Option::is_none")]
8879    pub total_hits_threshold: Option<U64>,
8880    #[serde(default, skip_serializing_if = "Option::is_none")]
8881    pub fragments: Option<FragmentRequest>,
8882    #[serde(default, skip_serializing_if = "Option::is_none")]
8883    pub features: Option<ResultFeatureRequest>,
8884    #[serde(default, skip_serializing_if = "Option::is_none")]
8885    pub diversification: Option<ResultDiversification>,
8886}
8887
8888#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8889#[serde(deny_unknown_fields)]
8890pub struct ValidateSearchResult {
8891    pub catalog_revision: U64,
8892    pub resolved_indexes: Vec<Resource>,
8893    pub authorized: bool,
8894    pub capabilities: Vec<String>,
8895    pub shape_digest: Digest,
8896    pub warnings: Vec<String>,
8897    pub refusals: Vec<String>,
8898    pub limits: Vec<SearchValidationLimit>,
8899    pub estimates: SearchValidationEstimates,
8900}
8901
8902#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8903#[serde(deny_unknown_fields)]
8904pub struct OpenPitRequest {
8905    pub indexes: Vec<Resource>,
8906    pub keep_alive_millis: U64,
8907}
8908
8909#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8910#[serde(deny_unknown_fields)]
8911pub struct OpenPitResult {
8912    pub pit: Cursor,
8913    pub expires_at: U64,
8914    pub shard_count: u32,
8915}
8916
8917#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8918#[serde(deny_unknown_fields)]
8919pub struct RenewPitRequest {
8920    pub pit: Cursor,
8921    pub keep_alive_millis: U64,
8922}
8923
8924#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8925#[serde(deny_unknown_fields)]
8926pub struct RenewPitResult {
8927    pub pit: Cursor,
8928    pub expires_at: U64,
8929    pub shard_count: u32,
8930}
8931
8932#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8933#[serde(deny_unknown_fields)]
8934pub struct ClosePitRequest {
8935    pub pit: Cursor,
8936}
8937
8938#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8939#[serde(deny_unknown_fields)]
8940pub struct ClosePitResult {
8941    pub removed: bool,
8942}
8943
8944#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8945#[serde(deny_unknown_fields)]
8946pub struct ListOperationsRequest {
8947    pub page_size: u32,
8948    #[serde(default, skip_serializing_if = "Option::is_none")]
8949    pub cursor: Option<Cursor>,
8950}
8951
8952#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8953#[serde(deny_unknown_fields)]
8954pub struct ListOperationsResult {
8955    pub items: Vec<Operation>,
8956    #[serde(default, skip_serializing_if = "Option::is_none")]
8957    pub next_cursor: Option<Cursor>,
8958}
8959
8960#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8961#[serde(deny_unknown_fields)]
8962pub struct GetOperationRequest {
8963    pub locator: Locator,
8964}
8965
8966#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8967#[serde(deny_unknown_fields)]
8968pub struct GetOperationResult {
8969    pub operation: Operation,
8970}
8971
8972#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8973#[serde(deny_unknown_fields)]
8974pub struct WaitOperationRequest {
8975    pub locator: Locator,
8976    pub after_authority_revision: U64,
8977    pub maximum_attempts: u32,
8978    pub interval_millis: U64,
8979}
8980
8981#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8982#[serde(deny_unknown_fields)]
8983pub struct WaitOperationResult {
8984    pub operation: Operation,
8985    pub attempts: u32,
8986}
8987
8988#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8989#[serde(deny_unknown_fields)]
8990pub struct CancelOperationRequest {
8991    pub locator: Locator,
8992    pub expected_authority_revision: U64,
8993    pub cancel_action: Identity,
8994}
8995
8996#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
8997#[serde(deny_unknown_fields)]
8998pub struct CancelOperationResult {
8999    pub locator: Locator,
9000    pub cancel_generation: U64,
9001    pub mutation_outcome: MutationOutcome,
9002}
9003
9004#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9005#[serde(deny_unknown_fields)]
9006pub struct ListAuditEventsRequest {
9007    pub start_time: U64,
9008    pub end_time: U64,
9009    pub actions: Vec<String>,
9010    pub page_size: u32,
9011    #[serde(default, skip_serializing_if = "Option::is_none")]
9012    pub cursor: Option<Cursor>,
9013}
9014
9015#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9016#[serde(deny_unknown_fields)]
9017pub struct ListAuditEventsResult {
9018    pub stream: AuditStreamState,
9019    pub events: Vec<AuditEvent>,
9020    #[serde(default, skip_serializing_if = "Option::is_none")]
9021    pub next_cursor: Option<Cursor>,
9022    pub gaps: Vec<AuditGap>,
9023    pub object_reads: u32,
9024}
9025
9026#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9027#[serde(deny_unknown_fields)]
9028pub struct ExportAuditEventsRequest {
9029    pub start_time: U64,
9030    pub end_time: U64,
9031    pub actions: Vec<String>,
9032    pub page_size: u32,
9033    #[serde(default, skip_serializing_if = "Option::is_none")]
9034    pub cursor: Option<Cursor>,
9035}
9036
9037#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9038#[serde(deny_unknown_fields)]
9039pub struct ExportAuditEventsResult {
9040    pub stream: AuditStreamState,
9041    pub events: Vec<AuditEvent>,
9042    #[serde(default, skip_serializing_if = "Option::is_none")]
9043    pub next_cursor: Option<Cursor>,
9044    pub gaps: Vec<AuditGap>,
9045    pub object_reads: u32,
9046}
9047
9048#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9049#[serde(deny_unknown_fields)]
9050pub struct ReserveServiceCredentialRequest {
9051    pub reservation_action_id: Digest,
9052    pub activation_action_id: Digest,
9053    pub role_grants: Vec<ServiceCredentialGrant>,
9054    pub credential_expires_at: U64,
9055    pub reservation_expires_at: U64,
9056}
9057
9058#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9059#[serde(deny_unknown_fields)]
9060pub struct ReserveServiceCredentialResult {
9061    pub reservation: ServiceCredentialReservation,
9062}
9063
9064#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9065#[serde(deny_unknown_fields)]
9066pub struct ReserveServiceCredentialRotationRequest {
9067    pub reservation_action_id: Digest,
9068    pub activation_action_id: Digest,
9069    pub current_api_key_id: Identity,
9070    pub expected_generation: U64,
9071    pub credential_expires_at: U64,
9072    pub overlap_until: U64,
9073    pub reservation_expires_at: U64,
9074}
9075
9076#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9077#[serde(deny_unknown_fields)]
9078pub struct ReserveServiceCredentialRotationResult {
9079    pub reservation: ServiceCredentialReservation,
9080}
9081
9082#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9083#[serde(deny_unknown_fields)]
9084pub struct ActivateServiceCredentialRequest {
9085    pub reservation: ServiceCredentialReservation,
9086    pub verifier: Digest,
9087}
9088
9089#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9090#[serde(deny_unknown_fields)]
9091pub struct ActivateServiceCredentialResult {
9092    pub locator: Locator,
9093    pub outcome: SecurityActionOutcome,
9094    pub secret_escrowed: bool,
9095}
9096
9097#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9098#[serde(deny_unknown_fields)]
9099pub struct ResolveServiceCredentialReservationRequest {
9100    pub reservation_action_id: Digest,
9101}
9102
9103#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9104#[serde(deny_unknown_fields)]
9105pub struct ResolveServiceCredentialReservationResult {
9106    pub state: String,
9107    #[serde(default, skip_serializing_if = "Option::is_none")]
9108    pub reservation: Option<ServiceCredentialReservation>,
9109    #[serde(default, skip_serializing_if = "Option::is_none")]
9110    pub outcome: Option<SecurityActionOutcome>,
9111}
9112
9113#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9114#[serde(deny_unknown_fields)]
9115pub struct PrepareRevokeServiceCredentialRequest {
9116    pub api_key_id: Identity,
9117    pub expected_generation: U64,
9118}
9119
9120#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9121#[serde(deny_unknown_fields)]
9122pub struct PrepareRevokeServiceCredentialResult {
9123    pub locator: Locator,
9124    pub semantic_digest: Digest,
9125    pub expires_at: U64,
9126}
9127
9128#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9129#[serde(deny_unknown_fields)]
9130pub struct RevokeServiceCredentialRequest {
9131    pub locator: Locator,
9132    pub api_key_id: Identity,
9133    pub expected_generation: U64,
9134}
9135
9136#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9137#[serde(deny_unknown_fields)]
9138pub struct RevokeServiceCredentialResult {
9139    pub locator: Locator,
9140    pub principal_id: Identity,
9141    pub api_key_id: Identity,
9142    pub state: String,
9143}
9144
9145#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9146#[serde(deny_unknown_fields)]
9147pub struct ResolveSecurityActionRequest {
9148    pub locator: Locator,
9149}
9150
9151#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9152#[serde(deny_unknown_fields)]
9153pub struct ResolveSecurityActionResult {
9154    pub locator: Locator,
9155    pub state: String,
9156    #[serde(default, skip_serializing_if = "Option::is_none")]
9157    pub result: Option<SecurityActionOutcome>,
9158    pub secret_escrowed: bool,
9159}
9160
9161#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9162#[serde(deny_unknown_fields)]
9163pub struct GetSecurityRoleRequest {
9164    pub role_name: String,
9165}
9166
9167#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9168#[serde(deny_unknown_fields)]
9169pub struct GetSecurityRoleResult {
9170    pub role: SecurityRole,
9171}
9172
9173#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9174#[serde(deny_unknown_fields)]
9175pub struct PrepareRoleAppendAccessChangeRequest {
9176    pub role_name: String,
9177    pub expected_role_version: U64,
9178    pub changes: Vec<RoleAppendScopeChange>,
9179}
9180
9181#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9182#[serde(deny_unknown_fields)]
9183pub struct PrepareRoleAppendAccessChangeResult {
9184    pub preparation: RoleAppendAccessPreparation,
9185}
9186
9187#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9188#[serde(deny_unknown_fields)]
9189pub struct SubmitRoleAppendAccessChangeRequest {
9190    pub locator: Locator,
9191    pub semantic_digest: Digest,
9192    pub role_name: String,
9193    pub expected_role_version: U64,
9194    pub changes: Vec<RoleAppendScopeChange>,
9195}
9196
9197#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9198#[serde(deny_unknown_fields)]
9199pub struct SubmitRoleAppendAccessChangeResult {
9200    pub locator: Locator,
9201    pub state: String,
9202    pub target_policy_revision: U64,
9203    pub role: SecurityRole,
9204}
9205
9206#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9207#[serde(deny_unknown_fields)]
9208pub struct ListServiceCredentialsRequest {
9209    pub page_size: u32,
9210    #[serde(default, skip_serializing_if = "Option::is_none")]
9211    pub cursor: Option<Cursor>,
9212}
9213
9214#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9215#[serde(deny_unknown_fields)]
9216pub struct ListServiceCredentialsResult {
9217    pub items: Vec<ServiceCredentialSummary>,
9218    #[serde(default, skip_serializing_if = "Option::is_none")]
9219    pub next_cursor: Option<Cursor>,
9220}
9221
9222#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9223#[serde(deny_unknown_fields)]
9224pub struct GetRuntimeStatusRequest {}
9225
9226#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9227#[serde(deny_unknown_fields)]
9228pub struct GetRuntimeStatusResult {
9229    pub ready: bool,
9230    pub recovery_era: Identity,
9231    pub catalog_revision: U64,
9232    pub policy_revision: U64,
9233    pub redacted: RuntimeStatusDetail,
9234}
9235
9236#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9237#[serde(deny_unknown_fields)]
9238pub struct GetResultCacheStatusRequest {}
9239
9240#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9241#[serde(deny_unknown_fields)]
9242pub struct GetResultCacheStatusResult {
9243    pub status: ResultCacheStatus,
9244}
9245
9246#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9247#[serde(deny_unknown_fields)]
9248pub struct GetFieldPromotionStatusRequest {
9249    pub index: Resource,
9250}
9251
9252#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9253#[serde(deny_unknown_fields)]
9254pub struct GetFieldPromotionStatusResult {
9255    pub status: FieldPromotionStatus,
9256}
9257
9258#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9259#[serde(deny_unknown_fields)]
9260pub struct GetOverloadStatusRequest {
9261    pub index: Resource,
9262}
9263
9264#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9265#[serde(deny_unknown_fields)]
9266pub struct GetOverloadStatusResult {
9267    pub runtime_observed: bool,
9268    pub shards: Vec<OverloadShardStatus>,
9269}
9270
9271#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9272#[serde(deny_unknown_fields)]
9273pub struct ConfigureExternalKeyRequest {
9274    pub index: Resource,
9275    pub expected_authority_revision: U64,
9276    pub binding: ExternalKeyBinding,
9277}
9278
9279#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9280#[serde(deny_unknown_fields)]
9281pub struct ConfigureExternalKeyResult {
9282    pub status: LifecycleStatus,
9283    pub mutation_outcome: MutationOutcome,
9284}
9285
9286#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9287#[serde(deny_unknown_fields)]
9288pub struct RotateExternalKeyBindingRequest {
9289    pub index: Resource,
9290    pub expected_authority_revision: U64,
9291    pub predecessor_binding_id: Identity,
9292    pub binding: ExternalKeyBinding,
9293}
9294
9295#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9296#[serde(deny_unknown_fields)]
9297pub struct RotateExternalKeyBindingResult {
9298    pub status: LifecycleStatus,
9299    pub mutation_outcome: MutationOutcome,
9300}
9301
9302#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9303#[serde(deny_unknown_fields)]
9304pub struct ConfigureAggregateThenDeleteRequest {
9305    pub index: Resource,
9306    pub expected_authority_revision: U64,
9307    pub policy: AggregateThenDeletePolicy,
9308}
9309
9310#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9311#[serde(deny_unknown_fields)]
9312pub struct ConfigureAggregateThenDeleteResult {
9313    pub status: LifecycleStatus,
9314    pub mutation_outcome: MutationOutcome,
9315}
9316
9317#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9318#[serde(deny_unknown_fields)]
9319pub struct GetLifecycleStatusRequest {
9320    pub index: Resource,
9321}
9322
9323#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9324#[serde(deny_unknown_fields)]
9325pub struct GetLifecycleStatusResult {
9326    pub status: LifecycleStatus,
9327}
9328
9329#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9330#[serde(deny_unknown_fields)]
9331pub struct GetQuotaRequest {}
9332
9333#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9334#[serde(deny_unknown_fields)]
9335pub struct GetQuotaResult {
9336    pub revision: U64,
9337    pub limits: Vec<QuotaLimit>,
9338    pub usage: Vec<QuotaConsumption>,
9339}
9340
9341#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9342#[serde(deny_unknown_fields)]
9343pub struct UpdateQuotaRequest {
9344    pub expected_revision: U64,
9345    pub limits: Vec<QuotaLimit>,
9346}
9347
9348#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9349#[serde(deny_unknown_fields)]
9350pub struct UpdateQuotaResult {
9351    pub update: QuotaUpdate,
9352}
9353
9354#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9355#[serde(deny_unknown_fields)]
9356pub struct GetBindingRequest {}
9357
9358#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9359#[serde(deny_unknown_fields)]
9360pub struct GetBindingResult {
9361    pub binding: CoreBinding,
9362    pub derived: bool,
9363    pub revision: U64,
9364}
9365
9366#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9367#[serde(deny_unknown_fields)]
9368pub struct GetAdmissionStatusRequest {}
9369
9370#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9371#[serde(deny_unknown_fields)]
9372pub struct GetAdmissionStatusResult {
9373    pub state: String,
9374    pub revision: U64,
9375    pub converged: bool,
9376}
9377
9378#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9379#[serde(deny_unknown_fields)]
9380pub struct SetAdmissionRequest {
9381    pub expected_revision: U64,
9382    pub state: String,
9383}
9384
9385#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9386#[serde(deny_unknown_fields)]
9387pub struct SetAdmissionResult {
9388    pub state: String,
9389    pub revision: U64,
9390    pub converged: bool,
9391}
9392
9393#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9394#[serde(deny_unknown_fields)]
9395pub struct GetQuiesceStatusRequest {}
9396
9397#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9398#[serde(deny_unknown_fields)]
9399pub struct GetQuiesceStatusResult {
9400    pub ready: bool,
9401    pub blockers: Vec<String>,
9402    pub observations: Vec<ReadinessObservation>,
9403    pub recovery_era: Identity,
9404    pub observed_at: U64,
9405    pub expires_at: U64,
9406}
9407
9408#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9409#[serde(deny_unknown_fields)]
9410pub struct GetDecommissionReadinessRequest {}
9411
9412#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9413#[serde(deny_unknown_fields)]
9414pub struct GetDecommissionReadinessResult {
9415    pub ready: bool,
9416    pub blockers: Vec<String>,
9417    pub observations: Vec<ReadinessObservation>,
9418    pub recovery_era: Identity,
9419    pub observed_at: U64,
9420    pub expires_at: U64,
9421}
9422
9423#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9424#[serde(deny_unknown_fields)]
9425pub struct GetUpgradeReadinessRequest {}
9426
9427#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9428#[serde(deny_unknown_fields)]
9429pub struct GetUpgradeReadinessResult {
9430    pub ready: bool,
9431    pub blockers: Vec<String>,
9432    pub observations: Vec<ReadinessObservation>,
9433    pub recovery_era: Identity,
9434    pub observed_at: U64,
9435    pub expires_at: U64,
9436}
9437
9438#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9439#[serde(deny_unknown_fields)]
9440pub struct GetMaintenanceStatusRequest {
9441    pub page_size: u32,
9442    #[serde(default, skip_serializing_if = "Option::is_none")]
9443    pub cursor: Option<Cursor>,
9444    #[serde(default, skip_serializing_if = "Option::is_none")]
9445    pub index: Option<Resource>,
9446}
9447
9448#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9449#[serde(deny_unknown_fields)]
9450pub struct GetMaintenanceStatusResult {
9451    pub aggregate: MaintenanceStatusAggregate,
9452    pub items: Vec<MaintenanceTaskStatus>,
9453    #[serde(default, skip_serializing_if = "Option::is_none")]
9454    pub next_cursor: Option<Cursor>,
9455}
9456
9457#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9458#[serde(deny_unknown_fields)]
9459pub struct WarmVectorIndexRequest {
9460    pub index: Resource,
9461    #[serde(default, skip_serializing_if = "Option::is_none")]
9462    pub expected_root_digest: Option<Digest>,
9463    pub components: Vec<VectorWarmComponent>,
9464    pub maximum_requests: u32,
9465    pub maximum_bytes: U64,
9466    pub maximum_achievements: u32,
9467    pub expires_at: U64,
9468}
9469
9470#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9471#[serde(deny_unknown_fields)]
9472pub struct WarmVectorIndexResult {
9473    pub result: VectorWarmResult,
9474}
9475
9476#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9477#[serde(deny_unknown_fields)]
9478pub struct EvaluateVectorRecallRequest {
9479    pub action_id: Digest,
9480    pub index: Resource,
9481    pub field: String,
9482    pub mapping_generation: U64,
9483    pub snapshot: VectorEvaluationSnapshot,
9484    pub query_set: VectorEvaluationQuerySet,
9485    #[serde(default, skip_serializing_if = "Option::is_none")]
9486    pub filter: Option<Query>,
9487    pub metric: VectorMetric,
9488    pub k: u32,
9489    pub candidate_policy: VectorCandidatePolicy,
9490    pub budget: VectorEvaluationBudget,
9491    pub maximum_bytes: U64,
9492}
9493
9494#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9495#[serde(deny_unknown_fields)]
9496pub struct EvaluateVectorRecallResult {
9497    pub operation: Operation,
9498}
9499
9500#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9501#[serde(deny_unknown_fields)]
9502pub struct CalibrateVectorStrategyRequest {
9503    pub action_id: Digest,
9504    pub index: Resource,
9505    pub field: String,
9506    pub mapping_generation: U64,
9507    pub snapshot: VectorEvaluationSnapshot,
9508    pub query_set: VectorEvaluationQuerySet,
9509    #[serde(default, skip_serializing_if = "Option::is_none")]
9510    pub filter: Option<Query>,
9511    pub metric: VectorMetric,
9512    pub k: u32,
9513    pub objective: VectorCalibrationObjective,
9514    pub minimum_recall_basis_points: u32,
9515    pub budget: VectorEvaluationBudget,
9516    pub maximum_bytes: U64,
9517}
9518
9519#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9520#[serde(deny_unknown_fields)]
9521pub struct CalibrateVectorStrategyResult {
9522    pub operation: Operation,
9523}
9524
9525#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9526#[serde(deny_unknown_fields)]
9527pub struct GetVectorDiagnosticRequest {
9528    pub locator: Locator,
9529}
9530
9531#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9532#[serde(deny_unknown_fields)]
9533pub struct GetVectorDiagnosticResult {
9534    pub operation: Operation,
9535    pub artifacts: Vec<Artifact>,
9536    #[serde(default, skip_serializing_if = "Option::is_none")]
9537    pub result: Option<VectorDiagnosticResult>,
9538}
9539
9540#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9541#[serde(deny_unknown_fields)]
9542pub struct CreateDiagnosticRequest {
9543    pub scope: String,
9544    pub maximum_bytes: U64,
9545}
9546
9547#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9548#[serde(deny_unknown_fields)]
9549pub struct CreateDiagnosticResult {
9550    pub operation: Operation,
9551}
9552
9553#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9554#[serde(deny_unknown_fields)]
9555pub struct GetDiagnosticRequest {
9556    pub locator: Locator,
9557}
9558
9559#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9560#[serde(deny_unknown_fields)]
9561pub struct GetDiagnosticResult {
9562    pub operation: Operation,
9563    pub artifacts: Vec<Artifact>,
9564}
9565
9566#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9567#[serde(deny_unknown_fields)]
9568pub struct PrepareCollectionExportRequest {
9569    pub action_id: Digest,
9570    pub storage: PortabilityStorageCapability,
9571}
9572
9573#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9574#[serde(deny_unknown_fields)]
9575pub struct PrepareCollectionExportResult {
9576    pub semantic_digest: Digest,
9577    pub maximum_bytes: U64,
9578}
9579
9580#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9581#[serde(deny_unknown_fields)]
9582pub struct StartCollectionExportRequest {
9583    pub action_id: Digest,
9584    pub semantic_digest: Digest,
9585    pub storage: PortabilityStorageCapability,
9586}
9587
9588#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9589#[serde(deny_unknown_fields)]
9590pub struct StartCollectionExportResult {
9591    pub operation: Operation,
9592}
9593
9594#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9595#[serde(deny_unknown_fields)]
9596pub struct ResolveCollectionExportRequest {
9597    pub action_id: Digest,
9598    pub semantic_digest: Digest,
9599    pub storage: PortabilityStorageCapability,
9600}
9601
9602#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9603#[serde(deny_unknown_fields)]
9604pub struct ResolveCollectionExportResult {
9605    #[serde(default, skip_serializing_if = "Option::is_none")]
9606    pub operation: Option<Operation>,
9607    #[serde(default, skip_serializing_if = "Option::is_none")]
9608    pub artifact: Option<CollectionExportArtifact>,
9609    pub expired_unknown: bool,
9610}
9611
9612#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9613#[serde(deny_unknown_fields)]
9614pub struct VerifyCollectionExportRequest {
9615    pub artifact: CollectionExportArtifact,
9616    pub storage: PortabilityStorageCapability,
9617}
9618
9619#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9620#[serde(deny_unknown_fields)]
9621pub struct VerifyCollectionExportResult {
9622    pub verified: bool,
9623    pub source_collection_id: Identity,
9624    pub source_catalog_revision: U64,
9625    pub index_count: u32,
9626    pub document_count: U64,
9627}
9628
9629#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9630#[serde(deny_unknown_fields)]
9631pub struct PrepareCollectionRestoreRequest {
9632    pub action_id: Digest,
9633    pub artifact: CollectionExportArtifact,
9634    pub storage: PortabilityStorageCapability,
9635}
9636
9637#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9638#[serde(deny_unknown_fields)]
9639pub struct PrepareCollectionRestoreResult {
9640    pub semantic_digest: Digest,
9641    pub source_collection_id: Identity,
9642    pub maximum_bytes: U64,
9643}
9644
9645#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9646#[serde(deny_unknown_fields)]
9647pub struct StartCollectionRestoreRequest {
9648    pub action_id: Digest,
9649    pub semantic_digest: Digest,
9650    pub artifact: CollectionExportArtifact,
9651    pub storage: PortabilityStorageCapability,
9652}
9653
9654#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9655#[serde(deny_unknown_fields)]
9656pub struct StartCollectionRestoreResult {
9657    pub operation: Operation,
9658}
9659
9660#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9661#[serde(deny_unknown_fields)]
9662pub struct ResolveCollectionRestoreRequest {
9663    pub action_id: Digest,
9664    pub semantic_digest: Digest,
9665    pub artifact: CollectionExportArtifact,
9666    pub storage: PortabilityStorageCapability,
9667}
9668
9669#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9670#[serde(deny_unknown_fields)]
9671pub struct ResolveCollectionRestoreResult {
9672    #[serde(default, skip_serializing_if = "Option::is_none")]
9673    pub operation: Option<Operation>,
9674    pub expired_unknown: bool,
9675}
9676
9677#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9678#[serde(deny_unknown_fields)]
9679pub struct PrepareIndexExportRequest {
9680    pub action_id: Digest,
9681    pub index: Resource,
9682    pub storage: PortabilityStorageCapability,
9683    pub maximum_records: u32,
9684    pub maximum_pages: u32,
9685    pub maximum_page_bytes: U64,
9686}
9687
9688#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9689#[serde(deny_unknown_fields)]
9690pub struct PrepareIndexExportResult {
9691    pub semantic_digest: Digest,
9692    pub maximum_bytes: U64,
9693}
9694
9695#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9696#[serde(deny_unknown_fields)]
9697pub struct StartIndexExportRequest {
9698    pub action_id: Digest,
9699    pub semantic_digest: Digest,
9700    pub index: Resource,
9701    pub storage: PortabilityStorageCapability,
9702    pub maximum_records: u32,
9703    pub maximum_pages: u32,
9704    pub maximum_page_bytes: U64,
9705}
9706
9707#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9708#[serde(deny_unknown_fields)]
9709pub struct StartIndexExportResult {
9710    pub operation: Operation,
9711}
9712
9713#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9714#[serde(deny_unknown_fields)]
9715pub struct ResolveIndexExportRequest {
9716    pub action_id: Digest,
9717    pub semantic_digest: Digest,
9718    pub index: Resource,
9719    pub storage: PortabilityStorageCapability,
9720    pub maximum_records: u32,
9721    pub maximum_pages: u32,
9722    pub maximum_page_bytes: U64,
9723}
9724
9725#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9726#[serde(deny_unknown_fields)]
9727pub struct ResolveIndexExportResult {
9728    #[serde(default, skip_serializing_if = "Option::is_none")]
9729    pub operation: Option<Operation>,
9730    #[serde(default, skip_serializing_if = "Option::is_none")]
9731    pub artifact: Option<IndexTransferArtifact>,
9732    pub expired_unknown: bool,
9733}
9734
9735#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9736#[serde(deny_unknown_fields)]
9737pub struct VerifyIndexExportRequest {
9738    pub artifact: IndexTransferArtifact,
9739    pub storage: PortabilityStorageCapability,
9740}
9741
9742#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9743#[serde(deny_unknown_fields)]
9744pub struct VerifyIndexExportResult {
9745    pub verified: bool,
9746    pub source_cluster_storage_id: Identity,
9747    pub source_collection_id: Identity,
9748    pub source_index: Resource,
9749    pub source_catalog_revision: U64,
9750    pub source_cut_digest: Digest,
9751    pub page_count: u32,
9752    pub record_count: u32,
9753}
9754
9755#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9756#[serde(deny_unknown_fields)]
9757pub struct PrepareIndexImportRequest {
9758    pub action_id: Digest,
9759    pub artifact: IndexTransferArtifact,
9760    pub storage: PortabilityStorageCapability,
9761    pub destination_name: String,
9762    pub expected_name_absent: bool,
9763    pub destination_policies: IndexPolicies,
9764    pub destination_resource_spec: IndexResourceSpec,
9765}
9766
9767#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9768#[serde(deny_unknown_fields)]
9769pub struct PrepareIndexImportResult {
9770    pub semantic_digest: Digest,
9771    pub source_cluster_storage_id: Identity,
9772    pub source_collection_id: Identity,
9773    pub source_index: Resource,
9774    pub maximum_bytes: U64,
9775}
9776
9777#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9778#[serde(deny_unknown_fields)]
9779pub struct StartIndexImportRequest {
9780    pub action_id: Digest,
9781    pub semantic_digest: Digest,
9782    pub artifact: IndexTransferArtifact,
9783    pub storage: PortabilityStorageCapability,
9784    pub destination_name: String,
9785    pub expected_name_absent: bool,
9786    pub destination_policies: IndexPolicies,
9787    pub destination_resource_spec: IndexResourceSpec,
9788}
9789
9790#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9791#[serde(deny_unknown_fields)]
9792pub struct StartIndexImportResult {
9793    pub operation: Operation,
9794}
9795
9796#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9797#[serde(deny_unknown_fields)]
9798pub struct ResolveIndexImportRequest {
9799    pub action_id: Digest,
9800    pub semantic_digest: Digest,
9801    pub artifact: IndexTransferArtifact,
9802    pub storage: PortabilityStorageCapability,
9803    pub destination_name: String,
9804    pub expected_name_absent: bool,
9805    pub destination_policies: IndexPolicies,
9806    pub destination_resource_spec: IndexResourceSpec,
9807}
9808
9809#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9810#[serde(deny_unknown_fields)]
9811pub struct ResolveIndexImportResult {
9812    #[serde(default, skip_serializing_if = "Option::is_none")]
9813    pub operation: Option<Operation>,
9814    #[serde(default, skip_serializing_if = "Option::is_none")]
9815    pub destination: Option<Resource>,
9816    pub expired_unknown: bool,
9817}
9818
9819#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9820#[serde(deny_unknown_fields)]
9821pub struct ReadArtifactChunkRequest {
9822    pub artifact: Artifact,
9823    pub offset: U64,
9824    pub length: u32,
9825}
9826
9827#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9828#[serde(deny_unknown_fields)]
9829pub struct ReadArtifactChunkResult {
9830    pub offset: U64,
9831    pub bytes_base64: String,
9832    pub chunk_sha256: String,
9833    pub artifact_sha256: String,
9834    pub complete: bool,
9835}
9836
9837#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9838#[serde(deny_unknown_fields)]
9839pub struct ExportUsageRequest {
9840    pub window_start: U64,
9841    pub window_end: U64,
9842    pub page_size: u32,
9843    #[serde(default, skip_serializing_if = "Option::is_none")]
9844    pub cursor: Option<Cursor>,
9845}
9846
9847#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9848#[serde(deny_unknown_fields)]
9849pub struct ExportUsageResult {
9850    pub units: Vec<CoreUsageUnits>,
9851    pub corrections: Vec<CoreUsageCorrection>,
9852    #[serde(default, skip_serializing_if = "Option::is_none")]
9853    pub next_cursor: Option<Cursor>,
9854    pub cumulative_through: U64,
9855}
9856
9857#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9858#[serde(deny_unknown_fields)]
9859pub struct ExecuteStateReadRequest {
9860    pub index: Resource,
9861    pub operation: StateOperation,
9862}
9863
9864#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9865#[serde(deny_unknown_fields)]
9866pub struct ExecuteStateReadResult {
9867    pub result: StateCommandResult,
9868}
9869
9870#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9871#[serde(deny_unknown_fields)]
9872pub struct PrepareStateWriteRequest {
9873    pub index: Resource,
9874    pub action_id: Digest,
9875    pub operation: StateOperation,
9876}
9877
9878#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9879#[serde(deny_unknown_fields)]
9880pub struct PrepareStateWriteResult {
9881    pub locator: Locator,
9882    pub semantic_digest: Digest,
9883    pub retention_max_entries: U64,
9884    pub retention_sequence_window: U64,
9885}
9886
9887#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9888#[serde(deny_unknown_fields)]
9889pub struct SubmitStateWriteRequest {
9890    pub index: Resource,
9891    pub action_id: Digest,
9892    pub operation: StateOperation,
9893    pub locator: Locator,
9894    pub semantic_digest: Digest,
9895}
9896
9897#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9898#[serde(deny_unknown_fields)]
9899pub struct SubmitStateWriteResult {
9900    #[serde(default, skip_serializing_if = "Option::is_none")]
9901    pub result: Option<StateCommandResult>,
9902    #[serde(default, skip_serializing_if = "Option::is_none")]
9903    pub resolution: Option<StateWriteResolution>,
9904    pub mutation_outcome: MutationOutcome,
9905    #[serde(default, skip_serializing_if = "Option::is_none")]
9906    pub achievement: Option<WriteAchievement>,
9907}
9908
9909#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9910#[serde(deny_unknown_fields)]
9911pub struct ResolveStateWriteRequest {
9912    pub index: Resource,
9913    pub action_id: Digest,
9914    pub operation: StateOperation,
9915    pub locator: Locator,
9916    pub semantic_digest: Digest,
9917}
9918
9919#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9920#[serde(deny_unknown_fields)]
9921pub struct ResolveStateWriteResult {
9922    pub resolution: StateWriteResolution,
9923}
9924
9925#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
9926#[serde(tag = "command", content = "body", rename_all = "snake_case")]
9927pub enum RequestBody {
9928    Discover(DiscoverRequest),
9929    ListIndexes(ListIndexesRequest),
9930    GetIndex(GetIndexRequest),
9931    ValidateIndexChange(ValidateIndexChangeRequest),
9932    ApplyIndexChange(ApplyIndexChangeRequest),
9933    ApplyAdministrationMutation(ApplyAdministrationMutationRequest),
9934    ListAliases(ListAliasesRequest),
9935    GetAlias(GetAliasRequest),
9936    ListDataStreams(ListDataStreamsRequest),
9937    GetDataStream(GetDataStreamRequest),
9938    ListComponentTemplates(ListComponentTemplatesRequest),
9939    GetComponentTemplate(GetComponentTemplateRequest),
9940    ListIndexTemplates(ListIndexTemplatesRequest),
9941    GetIndexTemplate(GetIndexTemplateRequest),
9942    ListIngestPipelines(ListIngestPipelinesRequest),
9943    GetIngestPipeline(GetIngestPipelineRequest),
9944    SimulateIngestPipeline(SimulateIngestPipelineRequest),
9945    ReprocessByQuery(ReprocessByQueryRequest),
9946    ListLifecyclePolicies(ListLifecyclePoliciesRequest),
9947    GetLifecyclePolicy(GetLifecyclePolicyRequest),
9948    PrepareCreateIndex(PrepareCreateIndexRequest),
9949    PrepareDeleteIndex(PrepareDeleteIndexRequest),
9950    SubmitCatalogAction(SubmitCatalogActionRequest),
9951    ResolveCatalogAction(ResolveCatalogActionRequest),
9952    PrepareReplayableSourceIndex(PrepareReplayableSourceIndexRequest),
9953    SubmitReplayableSourceIndex(SubmitReplayableSourceIndexRequest),
9954    GetReplayableSource(GetReplayableSourceRequest),
9955    ControlReplayableSource(ControlReplayableSourceRequest),
9956    CloneIndex(CloneIndexRequest),
9957    ConfigureHistory(ConfigureHistoryRequest),
9958    GetHistory(GetHistoryRequest),
9959    ResolveHistory(ResolveHistoryRequest),
9960    PlaceHistoryHold(PlaceHistoryHoldRequest),
9961    ReleaseHistoryHold(ReleaseHistoryHoldRequest),
9962    PrepareDocumentMutation(PrepareDocumentMutationRequest),
9963    SubmitDocumentMutation(SubmitDocumentMutationRequest),
9964    PrepareDocumentBulk(PrepareDocumentBulkRequest),
9965    SubmitDocumentBulk(SubmitDocumentBulkRequest),
9966    ResolveDocumentBulk(ResolveDocumentBulkRequest),
9967    PrepareAppendBulk(PrepareAppendBulkRequest),
9968    SubmitAppendBulk(SubmitAppendBulkRequest),
9969    ResolveAppendBulk(ResolveAppendBulkRequest),
9970    ObserveAppendCommitted(ObserveAppendCommittedRequest),
9971    ResolveDocumentMutation(ResolveDocumentMutationRequest),
9972    GetDocument(GetDocumentRequest),
9973    Search(SearchRequest),
9974    TraverseRelationships(TraverseRelationshipsRequest),
9975    QueryProfiles(QueryProfilesRequest),
9976    EvaluateTemporalEvidence(EvaluateTemporalEvidenceRequest),
9977    CreateContinuousTemporalEvaluation(CreateContinuousTemporalEvaluationRequest),
9978    GetContinuousTemporalEvaluation(GetContinuousTemporalEvaluationRequest),
9979    PauseContinuousTemporalEvaluation(PauseContinuousTemporalEvaluationRequest),
9980    ResumeContinuousTemporalEvaluation(ResumeContinuousTemporalEvaluationRequest),
9981    ReplaceContinuousTemporalEvaluation(ReplaceContinuousTemporalEvaluationRequest),
9982    RetireContinuousTemporalEvaluation(RetireContinuousTemporalEvaluationRequest),
9983    ReadContinuousTemporalEvidence(ReadContinuousTemporalEvidenceRequest),
9984    ValidateSearch(ValidateSearchRequest),
9985    OpenPit(OpenPitRequest),
9986    RenewPit(RenewPitRequest),
9987    ClosePit(ClosePitRequest),
9988    ListOperations(ListOperationsRequest),
9989    GetOperation(GetOperationRequest),
9990    WaitOperation(WaitOperationRequest),
9991    CancelOperation(CancelOperationRequest),
9992    ListAuditEvents(ListAuditEventsRequest),
9993    ExportAuditEvents(ExportAuditEventsRequest),
9994    ReserveServiceCredential(ReserveServiceCredentialRequest),
9995    ReserveServiceCredentialRotation(ReserveServiceCredentialRotationRequest),
9996    ActivateServiceCredential(ActivateServiceCredentialRequest),
9997    ResolveServiceCredentialReservation(ResolveServiceCredentialReservationRequest),
9998    PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialRequest),
9999    RevokeServiceCredential(RevokeServiceCredentialRequest),
10000    ResolveSecurityAction(ResolveSecurityActionRequest),
10001    GetSecurityRole(GetSecurityRoleRequest),
10002    PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeRequest),
10003    SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeRequest),
10004    ListServiceCredentials(ListServiceCredentialsRequest),
10005    GetRuntimeStatus(GetRuntimeStatusRequest),
10006    GetResultCacheStatus(GetResultCacheStatusRequest),
10007    GetFieldPromotionStatus(GetFieldPromotionStatusRequest),
10008    GetOverloadStatus(GetOverloadStatusRequest),
10009    ConfigureExternalKey(ConfigureExternalKeyRequest),
10010    RotateExternalKeyBinding(RotateExternalKeyBindingRequest),
10011    ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteRequest),
10012    GetLifecycleStatus(GetLifecycleStatusRequest),
10013    GetQuota(GetQuotaRequest),
10014    UpdateQuota(UpdateQuotaRequest),
10015    GetBinding(GetBindingRequest),
10016    GetAdmissionStatus(GetAdmissionStatusRequest),
10017    SetAdmission(SetAdmissionRequest),
10018    GetQuiesceStatus(GetQuiesceStatusRequest),
10019    GetDecommissionReadiness(GetDecommissionReadinessRequest),
10020    GetUpgradeReadiness(GetUpgradeReadinessRequest),
10021    GetMaintenanceStatus(GetMaintenanceStatusRequest),
10022    WarmVectorIndex(WarmVectorIndexRequest),
10023    EvaluateVectorRecall(EvaluateVectorRecallRequest),
10024    CalibrateVectorStrategy(CalibrateVectorStrategyRequest),
10025    GetVectorDiagnostic(GetVectorDiagnosticRequest),
10026    CreateDiagnostic(CreateDiagnosticRequest),
10027    GetDiagnostic(GetDiagnosticRequest),
10028    PrepareCollectionExport(PrepareCollectionExportRequest),
10029    StartCollectionExport(StartCollectionExportRequest),
10030    ResolveCollectionExport(ResolveCollectionExportRequest),
10031    VerifyCollectionExport(VerifyCollectionExportRequest),
10032    PrepareCollectionRestore(PrepareCollectionRestoreRequest),
10033    StartCollectionRestore(StartCollectionRestoreRequest),
10034    ResolveCollectionRestore(ResolveCollectionRestoreRequest),
10035    PrepareIndexExport(PrepareIndexExportRequest),
10036    StartIndexExport(StartIndexExportRequest),
10037    ResolveIndexExport(ResolveIndexExportRequest),
10038    VerifyIndexExport(VerifyIndexExportRequest),
10039    PrepareIndexImport(PrepareIndexImportRequest),
10040    StartIndexImport(StartIndexImportRequest),
10041    ResolveIndexImport(ResolveIndexImportRequest),
10042    ReadArtifactChunk(ReadArtifactChunkRequest),
10043    ExportUsage(ExportUsageRequest),
10044    ExecuteStateRead(ExecuteStateReadRequest),
10045    PrepareStateWrite(PrepareStateWriteRequest),
10046    SubmitStateWrite(SubmitStateWriteRequest),
10047    ResolveStateWrite(ResolveStateWriteRequest),
10048}
10049
10050// INVARIANT: the response envelope already boxes this closed wire union; boxing
10051// individual variants would add a second allocation without changing the wire.
10052#[allow(clippy::large_enum_variant)]
10053#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10054#[serde(tag = "command", content = "body", rename_all = "snake_case")]
10055pub enum ResultBody {
10056    Discover(DiscoverResult),
10057    ListIndexes(ListIndexesResult),
10058    GetIndex(GetIndexResult),
10059    ValidateIndexChange(ValidateIndexChangeResult),
10060    ApplyIndexChange(ApplyIndexChangeResult),
10061    ApplyAdministrationMutation(ApplyAdministrationMutationResult),
10062    ListAliases(ListAliasesResult),
10063    GetAlias(GetAliasResult),
10064    ListDataStreams(ListDataStreamsResult),
10065    GetDataStream(GetDataStreamResult),
10066    ListComponentTemplates(ListComponentTemplatesResult),
10067    GetComponentTemplate(GetComponentTemplateResult),
10068    ListIndexTemplates(ListIndexTemplatesResult),
10069    GetIndexTemplate(GetIndexTemplateResult),
10070    ListIngestPipelines(ListIngestPipelinesResult),
10071    GetIngestPipeline(GetIngestPipelineResult),
10072    SimulateIngestPipeline(SimulateIngestPipelineResult),
10073    ReprocessByQuery(ReprocessByQueryResult),
10074    ListLifecyclePolicies(ListLifecyclePoliciesResult),
10075    GetLifecyclePolicy(GetLifecyclePolicyResult),
10076    PrepareCreateIndex(PrepareCreateIndexResult),
10077    PrepareDeleteIndex(PrepareDeleteIndexResult),
10078    SubmitCatalogAction(SubmitCatalogActionResult),
10079    ResolveCatalogAction(ResolveCatalogActionResult),
10080    PrepareReplayableSourceIndex(PrepareReplayableSourceIndexResult),
10081    SubmitReplayableSourceIndex(SubmitReplayableSourceIndexResult),
10082    GetReplayableSource(GetReplayableSourceResult),
10083    ControlReplayableSource(ControlReplayableSourceResult),
10084    CloneIndex(CloneIndexResult),
10085    ConfigureHistory(ConfigureHistoryResult),
10086    GetHistory(GetHistoryResult),
10087    ResolveHistory(ResolveHistoryResult),
10088    PlaceHistoryHold(PlaceHistoryHoldResult),
10089    ReleaseHistoryHold(ReleaseHistoryHoldResult),
10090    PrepareDocumentMutation(PrepareDocumentMutationResult),
10091    SubmitDocumentMutation(SubmitDocumentMutationResult),
10092    PrepareDocumentBulk(PrepareDocumentBulkResult),
10093    SubmitDocumentBulk(SubmitDocumentBulkResult),
10094    ResolveDocumentBulk(ResolveDocumentBulkResult),
10095    PrepareAppendBulk(PrepareAppendBulkResult),
10096    SubmitAppendBulk(SubmitAppendBulkResult),
10097    ResolveAppendBulk(ResolveAppendBulkResult),
10098    ObserveAppendCommitted(ObserveAppendCommittedResult),
10099    ResolveDocumentMutation(ResolveDocumentMutationResult),
10100    GetDocument(GetDocumentResult),
10101    Search(SearchResult),
10102    TraverseRelationships(TraverseRelationshipsResult),
10103    QueryProfiles(QueryProfilesResult),
10104    EvaluateTemporalEvidence(EvaluateTemporalEvidenceResult),
10105    CreateContinuousTemporalEvaluation(CreateContinuousTemporalEvaluationResult),
10106    GetContinuousTemporalEvaluation(GetContinuousTemporalEvaluationResult),
10107    PauseContinuousTemporalEvaluation(PauseContinuousTemporalEvaluationResult),
10108    ResumeContinuousTemporalEvaluation(ResumeContinuousTemporalEvaluationResult),
10109    ReplaceContinuousTemporalEvaluation(ReplaceContinuousTemporalEvaluationResult),
10110    RetireContinuousTemporalEvaluation(RetireContinuousTemporalEvaluationResult),
10111    ReadContinuousTemporalEvidence(ReadContinuousTemporalEvidenceResult),
10112    ValidateSearch(ValidateSearchResult),
10113    OpenPit(OpenPitResult),
10114    RenewPit(RenewPitResult),
10115    ClosePit(ClosePitResult),
10116    ListOperations(ListOperationsResult),
10117    GetOperation(GetOperationResult),
10118    WaitOperation(WaitOperationResult),
10119    CancelOperation(CancelOperationResult),
10120    ListAuditEvents(ListAuditEventsResult),
10121    ExportAuditEvents(ExportAuditEventsResult),
10122    ReserveServiceCredential(ReserveServiceCredentialResult),
10123    ReserveServiceCredentialRotation(ReserveServiceCredentialRotationResult),
10124    ActivateServiceCredential(ActivateServiceCredentialResult),
10125    ResolveServiceCredentialReservation(ResolveServiceCredentialReservationResult),
10126    PrepareRevokeServiceCredential(PrepareRevokeServiceCredentialResult),
10127    RevokeServiceCredential(RevokeServiceCredentialResult),
10128    ResolveSecurityAction(ResolveSecurityActionResult),
10129    GetSecurityRole(GetSecurityRoleResult),
10130    PrepareRoleAppendAccessChange(PrepareRoleAppendAccessChangeResult),
10131    SubmitRoleAppendAccessChange(SubmitRoleAppendAccessChangeResult),
10132    ListServiceCredentials(ListServiceCredentialsResult),
10133    GetRuntimeStatus(GetRuntimeStatusResult),
10134    GetResultCacheStatus(GetResultCacheStatusResult),
10135    GetFieldPromotionStatus(GetFieldPromotionStatusResult),
10136    GetOverloadStatus(GetOverloadStatusResult),
10137    ConfigureExternalKey(ConfigureExternalKeyResult),
10138    RotateExternalKeyBinding(RotateExternalKeyBindingResult),
10139    ConfigureAggregateThenDelete(ConfigureAggregateThenDeleteResult),
10140    GetLifecycleStatus(GetLifecycleStatusResult),
10141    GetQuota(GetQuotaResult),
10142    UpdateQuota(UpdateQuotaResult),
10143    GetBinding(GetBindingResult),
10144    GetAdmissionStatus(GetAdmissionStatusResult),
10145    SetAdmission(SetAdmissionResult),
10146    GetQuiesceStatus(GetQuiesceStatusResult),
10147    GetDecommissionReadiness(GetDecommissionReadinessResult),
10148    GetUpgradeReadiness(GetUpgradeReadinessResult),
10149    GetMaintenanceStatus(GetMaintenanceStatusResult),
10150    WarmVectorIndex(WarmVectorIndexResult),
10151    EvaluateVectorRecall(EvaluateVectorRecallResult),
10152    CalibrateVectorStrategy(CalibrateVectorStrategyResult),
10153    GetVectorDiagnostic(GetVectorDiagnosticResult),
10154    CreateDiagnostic(CreateDiagnosticResult),
10155    GetDiagnostic(GetDiagnosticResult),
10156    PrepareCollectionExport(PrepareCollectionExportResult),
10157    StartCollectionExport(StartCollectionExportResult),
10158    ResolveCollectionExport(ResolveCollectionExportResult),
10159    VerifyCollectionExport(VerifyCollectionExportResult),
10160    PrepareCollectionRestore(PrepareCollectionRestoreResult),
10161    StartCollectionRestore(StartCollectionRestoreResult),
10162    ResolveCollectionRestore(ResolveCollectionRestoreResult),
10163    PrepareIndexExport(PrepareIndexExportResult),
10164    StartIndexExport(StartIndexExportResult),
10165    ResolveIndexExport(ResolveIndexExportResult),
10166    VerifyIndexExport(VerifyIndexExportResult),
10167    PrepareIndexImport(PrepareIndexImportResult),
10168    StartIndexImport(StartIndexImportResult),
10169    ResolveIndexImport(ResolveIndexImportResult),
10170    ReadArtifactChunk(ReadArtifactChunkResult),
10171    ExportUsage(ExportUsageResult),
10172    ExecuteStateRead(ExecuteStateReadResult),
10173    PrepareStateWrite(PrepareStateWriteResult),
10174    SubmitStateWrite(SubmitStateWriteResult),
10175    ResolveStateWrite(ResolveStateWriteResult),
10176}
10177
10178pub const fn command_for_request(value: &RequestBody) -> Command {
10179    match value {
10180        RequestBody::Discover(_) => Command::Discover,
10181        RequestBody::ListIndexes(_) => Command::ListIndexes,
10182        RequestBody::GetIndex(_) => Command::GetIndex,
10183        RequestBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
10184        RequestBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
10185        RequestBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
10186        RequestBody::ListAliases(_) => Command::ListAliases,
10187        RequestBody::GetAlias(_) => Command::GetAlias,
10188        RequestBody::ListDataStreams(_) => Command::ListDataStreams,
10189        RequestBody::GetDataStream(_) => Command::GetDataStream,
10190        RequestBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
10191        RequestBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
10192        RequestBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
10193        RequestBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
10194        RequestBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
10195        RequestBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
10196        RequestBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
10197        RequestBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
10198        RequestBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
10199        RequestBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
10200        RequestBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
10201        RequestBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
10202        RequestBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
10203        RequestBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
10204        RequestBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
10205        RequestBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
10206        RequestBody::GetReplayableSource(_) => Command::GetReplayableSource,
10207        RequestBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
10208        RequestBody::CloneIndex(_) => Command::CloneIndex,
10209        RequestBody::ConfigureHistory(_) => Command::ConfigureHistory,
10210        RequestBody::GetHistory(_) => Command::GetHistory,
10211        RequestBody::ResolveHistory(_) => Command::ResolveHistory,
10212        RequestBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
10213        RequestBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
10214        RequestBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
10215        RequestBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
10216        RequestBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
10217        RequestBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
10218        RequestBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
10219        RequestBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
10220        RequestBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
10221        RequestBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
10222        RequestBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
10223        RequestBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
10224        RequestBody::GetDocument(_) => Command::GetDocument,
10225        RequestBody::Search(_) => Command::Search,
10226        RequestBody::TraverseRelationships(_) => Command::TraverseRelationships,
10227        RequestBody::QueryProfiles(_) => Command::QueryProfiles,
10228        RequestBody::EvaluateTemporalEvidence(_) => Command::EvaluateTemporalEvidence,
10229        RequestBody::CreateContinuousTemporalEvaluation(_) => Command::CreateContinuousTemporalEvaluation,
10230        RequestBody::GetContinuousTemporalEvaluation(_) => Command::GetContinuousTemporalEvaluation,
10231        RequestBody::PauseContinuousTemporalEvaluation(_) => Command::PauseContinuousTemporalEvaluation,
10232        RequestBody::ResumeContinuousTemporalEvaluation(_) => Command::ResumeContinuousTemporalEvaluation,
10233        RequestBody::ReplaceContinuousTemporalEvaluation(_) => Command::ReplaceContinuousTemporalEvaluation,
10234        RequestBody::RetireContinuousTemporalEvaluation(_) => Command::RetireContinuousTemporalEvaluation,
10235        RequestBody::ReadContinuousTemporalEvidence(_) => Command::ReadContinuousTemporalEvidence,
10236        RequestBody::ValidateSearch(_) => Command::ValidateSearch,
10237        RequestBody::OpenPit(_) => Command::OpenPit,
10238        RequestBody::RenewPit(_) => Command::RenewPit,
10239        RequestBody::ClosePit(_) => Command::ClosePit,
10240        RequestBody::ListOperations(_) => Command::ListOperations,
10241        RequestBody::GetOperation(_) => Command::GetOperation,
10242        RequestBody::WaitOperation(_) => Command::WaitOperation,
10243        RequestBody::CancelOperation(_) => Command::CancelOperation,
10244        RequestBody::ListAuditEvents(_) => Command::ListAuditEvents,
10245        RequestBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
10246        RequestBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
10247        RequestBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
10248        RequestBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
10249        RequestBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
10250        RequestBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
10251        RequestBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
10252        RequestBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
10253        RequestBody::GetSecurityRole(_) => Command::GetSecurityRole,
10254        RequestBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
10255        RequestBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
10256        RequestBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
10257        RequestBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
10258        RequestBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
10259        RequestBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
10260        RequestBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
10261        RequestBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
10262        RequestBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
10263        RequestBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
10264        RequestBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
10265        RequestBody::GetQuota(_) => Command::GetQuota,
10266        RequestBody::UpdateQuota(_) => Command::UpdateQuota,
10267        RequestBody::GetBinding(_) => Command::GetBinding,
10268        RequestBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
10269        RequestBody::SetAdmission(_) => Command::SetAdmission,
10270        RequestBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
10271        RequestBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
10272        RequestBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
10273        RequestBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
10274        RequestBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
10275        RequestBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
10276        RequestBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
10277        RequestBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
10278        RequestBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
10279        RequestBody::GetDiagnostic(_) => Command::GetDiagnostic,
10280        RequestBody::PrepareCollectionExport(_) => Command::PrepareCollectionExport,
10281        RequestBody::StartCollectionExport(_) => Command::StartCollectionExport,
10282        RequestBody::ResolveCollectionExport(_) => Command::ResolveCollectionExport,
10283        RequestBody::VerifyCollectionExport(_) => Command::VerifyCollectionExport,
10284        RequestBody::PrepareCollectionRestore(_) => Command::PrepareCollectionRestore,
10285        RequestBody::StartCollectionRestore(_) => Command::StartCollectionRestore,
10286        RequestBody::ResolveCollectionRestore(_) => Command::ResolveCollectionRestore,
10287        RequestBody::PrepareIndexExport(_) => Command::PrepareIndexExport,
10288        RequestBody::StartIndexExport(_) => Command::StartIndexExport,
10289        RequestBody::ResolveIndexExport(_) => Command::ResolveIndexExport,
10290        RequestBody::VerifyIndexExport(_) => Command::VerifyIndexExport,
10291        RequestBody::PrepareIndexImport(_) => Command::PrepareIndexImport,
10292        RequestBody::StartIndexImport(_) => Command::StartIndexImport,
10293        RequestBody::ResolveIndexImport(_) => Command::ResolveIndexImport,
10294        RequestBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
10295        RequestBody::ExportUsage(_) => Command::ExportUsage,
10296        RequestBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
10297        RequestBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
10298        RequestBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
10299        RequestBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
10300    }
10301}
10302
10303pub const fn command_for_result(value: &ResultBody) -> Command {
10304    match value {
10305        ResultBody::Discover(_) => Command::Discover,
10306        ResultBody::ListIndexes(_) => Command::ListIndexes,
10307        ResultBody::GetIndex(_) => Command::GetIndex,
10308        ResultBody::ValidateIndexChange(_) => Command::ValidateIndexChange,
10309        ResultBody::ApplyIndexChange(_) => Command::ApplyIndexChange,
10310        ResultBody::ApplyAdministrationMutation(_) => Command::ApplyAdministrationMutation,
10311        ResultBody::ListAliases(_) => Command::ListAliases,
10312        ResultBody::GetAlias(_) => Command::GetAlias,
10313        ResultBody::ListDataStreams(_) => Command::ListDataStreams,
10314        ResultBody::GetDataStream(_) => Command::GetDataStream,
10315        ResultBody::ListComponentTemplates(_) => Command::ListComponentTemplates,
10316        ResultBody::GetComponentTemplate(_) => Command::GetComponentTemplate,
10317        ResultBody::ListIndexTemplates(_) => Command::ListIndexTemplates,
10318        ResultBody::GetIndexTemplate(_) => Command::GetIndexTemplate,
10319        ResultBody::ListIngestPipelines(_) => Command::ListIngestPipelines,
10320        ResultBody::GetIngestPipeline(_) => Command::GetIngestPipeline,
10321        ResultBody::SimulateIngestPipeline(_) => Command::SimulateIngestPipeline,
10322        ResultBody::ReprocessByQuery(_) => Command::ReprocessByQuery,
10323        ResultBody::ListLifecyclePolicies(_) => Command::ListLifecyclePolicies,
10324        ResultBody::GetLifecyclePolicy(_) => Command::GetLifecyclePolicy,
10325        ResultBody::PrepareCreateIndex(_) => Command::PrepareCreateIndex,
10326        ResultBody::PrepareDeleteIndex(_) => Command::PrepareDeleteIndex,
10327        ResultBody::SubmitCatalogAction(_) => Command::SubmitCatalogAction,
10328        ResultBody::ResolveCatalogAction(_) => Command::ResolveCatalogAction,
10329        ResultBody::PrepareReplayableSourceIndex(_) => Command::PrepareReplayableSourceIndex,
10330        ResultBody::SubmitReplayableSourceIndex(_) => Command::SubmitReplayableSourceIndex,
10331        ResultBody::GetReplayableSource(_) => Command::GetReplayableSource,
10332        ResultBody::ControlReplayableSource(_) => Command::ControlReplayableSource,
10333        ResultBody::CloneIndex(_) => Command::CloneIndex,
10334        ResultBody::ConfigureHistory(_) => Command::ConfigureHistory,
10335        ResultBody::GetHistory(_) => Command::GetHistory,
10336        ResultBody::ResolveHistory(_) => Command::ResolveHistory,
10337        ResultBody::PlaceHistoryHold(_) => Command::PlaceHistoryHold,
10338        ResultBody::ReleaseHistoryHold(_) => Command::ReleaseHistoryHold,
10339        ResultBody::PrepareDocumentMutation(_) => Command::PrepareDocumentMutation,
10340        ResultBody::SubmitDocumentMutation(_) => Command::SubmitDocumentMutation,
10341        ResultBody::PrepareDocumentBulk(_) => Command::PrepareDocumentBulk,
10342        ResultBody::SubmitDocumentBulk(_) => Command::SubmitDocumentBulk,
10343        ResultBody::ResolveDocumentBulk(_) => Command::ResolveDocumentBulk,
10344        ResultBody::PrepareAppendBulk(_) => Command::PrepareAppendBulk,
10345        ResultBody::SubmitAppendBulk(_) => Command::SubmitAppendBulk,
10346        ResultBody::ResolveAppendBulk(_) => Command::ResolveAppendBulk,
10347        ResultBody::ObserveAppendCommitted(_) => Command::ObserveAppendCommitted,
10348        ResultBody::ResolveDocumentMutation(_) => Command::ResolveDocumentMutation,
10349        ResultBody::GetDocument(_) => Command::GetDocument,
10350        ResultBody::Search(_) => Command::Search,
10351        ResultBody::TraverseRelationships(_) => Command::TraverseRelationships,
10352        ResultBody::QueryProfiles(_) => Command::QueryProfiles,
10353        ResultBody::EvaluateTemporalEvidence(_) => Command::EvaluateTemporalEvidence,
10354        ResultBody::CreateContinuousTemporalEvaluation(_) => Command::CreateContinuousTemporalEvaluation,
10355        ResultBody::GetContinuousTemporalEvaluation(_) => Command::GetContinuousTemporalEvaluation,
10356        ResultBody::PauseContinuousTemporalEvaluation(_) => Command::PauseContinuousTemporalEvaluation,
10357        ResultBody::ResumeContinuousTemporalEvaluation(_) => Command::ResumeContinuousTemporalEvaluation,
10358        ResultBody::ReplaceContinuousTemporalEvaluation(_) => Command::ReplaceContinuousTemporalEvaluation,
10359        ResultBody::RetireContinuousTemporalEvaluation(_) => Command::RetireContinuousTemporalEvaluation,
10360        ResultBody::ReadContinuousTemporalEvidence(_) => Command::ReadContinuousTemporalEvidence,
10361        ResultBody::ValidateSearch(_) => Command::ValidateSearch,
10362        ResultBody::OpenPit(_) => Command::OpenPit,
10363        ResultBody::RenewPit(_) => Command::RenewPit,
10364        ResultBody::ClosePit(_) => Command::ClosePit,
10365        ResultBody::ListOperations(_) => Command::ListOperations,
10366        ResultBody::GetOperation(_) => Command::GetOperation,
10367        ResultBody::WaitOperation(_) => Command::WaitOperation,
10368        ResultBody::CancelOperation(_) => Command::CancelOperation,
10369        ResultBody::ListAuditEvents(_) => Command::ListAuditEvents,
10370        ResultBody::ExportAuditEvents(_) => Command::ExportAuditEvents,
10371        ResultBody::ReserveServiceCredential(_) => Command::ReserveServiceCredential,
10372        ResultBody::ReserveServiceCredentialRotation(_) => Command::ReserveServiceCredentialRotation,
10373        ResultBody::ActivateServiceCredential(_) => Command::ActivateServiceCredential,
10374        ResultBody::ResolveServiceCredentialReservation(_) => Command::ResolveServiceCredentialReservation,
10375        ResultBody::PrepareRevokeServiceCredential(_) => Command::PrepareRevokeServiceCredential,
10376        ResultBody::RevokeServiceCredential(_) => Command::RevokeServiceCredential,
10377        ResultBody::ResolveSecurityAction(_) => Command::ResolveSecurityAction,
10378        ResultBody::GetSecurityRole(_) => Command::GetSecurityRole,
10379        ResultBody::PrepareRoleAppendAccessChange(_) => Command::PrepareRoleAppendAccessChange,
10380        ResultBody::SubmitRoleAppendAccessChange(_) => Command::SubmitRoleAppendAccessChange,
10381        ResultBody::ListServiceCredentials(_) => Command::ListServiceCredentials,
10382        ResultBody::GetRuntimeStatus(_) => Command::GetRuntimeStatus,
10383        ResultBody::GetResultCacheStatus(_) => Command::GetResultCacheStatus,
10384        ResultBody::GetFieldPromotionStatus(_) => Command::GetFieldPromotionStatus,
10385        ResultBody::GetOverloadStatus(_) => Command::GetOverloadStatus,
10386        ResultBody::ConfigureExternalKey(_) => Command::ConfigureExternalKey,
10387        ResultBody::RotateExternalKeyBinding(_) => Command::RotateExternalKeyBinding,
10388        ResultBody::ConfigureAggregateThenDelete(_) => Command::ConfigureAggregateThenDelete,
10389        ResultBody::GetLifecycleStatus(_) => Command::GetLifecycleStatus,
10390        ResultBody::GetQuota(_) => Command::GetQuota,
10391        ResultBody::UpdateQuota(_) => Command::UpdateQuota,
10392        ResultBody::GetBinding(_) => Command::GetBinding,
10393        ResultBody::GetAdmissionStatus(_) => Command::GetAdmissionStatus,
10394        ResultBody::SetAdmission(_) => Command::SetAdmission,
10395        ResultBody::GetQuiesceStatus(_) => Command::GetQuiesceStatus,
10396        ResultBody::GetDecommissionReadiness(_) => Command::GetDecommissionReadiness,
10397        ResultBody::GetUpgradeReadiness(_) => Command::GetUpgradeReadiness,
10398        ResultBody::GetMaintenanceStatus(_) => Command::GetMaintenanceStatus,
10399        ResultBody::WarmVectorIndex(_) => Command::WarmVectorIndex,
10400        ResultBody::EvaluateVectorRecall(_) => Command::EvaluateVectorRecall,
10401        ResultBody::CalibrateVectorStrategy(_) => Command::CalibrateVectorStrategy,
10402        ResultBody::GetVectorDiagnostic(_) => Command::GetVectorDiagnostic,
10403        ResultBody::CreateDiagnostic(_) => Command::CreateDiagnostic,
10404        ResultBody::GetDiagnostic(_) => Command::GetDiagnostic,
10405        ResultBody::PrepareCollectionExport(_) => Command::PrepareCollectionExport,
10406        ResultBody::StartCollectionExport(_) => Command::StartCollectionExport,
10407        ResultBody::ResolveCollectionExport(_) => Command::ResolveCollectionExport,
10408        ResultBody::VerifyCollectionExport(_) => Command::VerifyCollectionExport,
10409        ResultBody::PrepareCollectionRestore(_) => Command::PrepareCollectionRestore,
10410        ResultBody::StartCollectionRestore(_) => Command::StartCollectionRestore,
10411        ResultBody::ResolveCollectionRestore(_) => Command::ResolveCollectionRestore,
10412        ResultBody::PrepareIndexExport(_) => Command::PrepareIndexExport,
10413        ResultBody::StartIndexExport(_) => Command::StartIndexExport,
10414        ResultBody::ResolveIndexExport(_) => Command::ResolveIndexExport,
10415        ResultBody::VerifyIndexExport(_) => Command::VerifyIndexExport,
10416        ResultBody::PrepareIndexImport(_) => Command::PrepareIndexImport,
10417        ResultBody::StartIndexImport(_) => Command::StartIndexImport,
10418        ResultBody::ResolveIndexImport(_) => Command::ResolveIndexImport,
10419        ResultBody::ReadArtifactChunk(_) => Command::ReadArtifactChunk,
10420        ResultBody::ExportUsage(_) => Command::ExportUsage,
10421        ResultBody::ExecuteStateRead(_) => Command::ExecuteStateRead,
10422        ResultBody::PrepareStateWrite(_) => Command::PrepareStateWrite,
10423        ResultBody::SubmitStateWrite(_) => Command::SubmitStateWrite,
10424        ResultBody::ResolveStateWrite(_) => Command::ResolveStateWrite,
10425    }
10426}
10427
10428#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10429#[serde(deny_unknown_fields)]
10430pub struct RequestEnvelope {
10431    pub meta: RequestMeta,
10432    pub request: RequestBody,
10433}
10434#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
10435#[serde(tag = "outcome", rename_all = "snake_case")]
10436pub enum ResponseEnvelope {
10437    Success {
10438        meta: ResponseMeta,
10439        result: Box<ResultBody>,
10440    },
10441    Error {
10442        meta: ResponseMeta,
10443        error: ErrorBody,
10444    },
10445}
10446
10447#[derive(Clone, Copy, Debug, Eq, PartialEq)]
10448pub struct CommandContract {
10449    pub command: Command,
10450    pub action: Action,
10451    pub cancellable: bool,
10452    pub mutation: &'static str,
10453}
10454pub const LODESTONE_API_COMMAND_CONTRACTS: &[CommandContract] = &[
10455    CommandContract {
10456        command: Command::Discover,
10457        action: Action::IdentityDiscovery,
10458        cancellable: true,
10459        mutation: "read_only",
10460    },
10461    CommandContract {
10462        command: Command::ListIndexes,
10463        action: Action::CatalogRead,
10464        cancellable: true,
10465        mutation: "read_only",
10466    },
10467    CommandContract {
10468        command: Command::GetIndex,
10469        action: Action::CatalogRead,
10470        cancellable: true,
10471        mutation: "read_only",
10472    },
10473    CommandContract {
10474        command: Command::ValidateIndexChange,
10475        action: Action::IndexAdmin,
10476        cancellable: true,
10477        mutation: "read_only",
10478    },
10479    CommandContract {
10480        command: Command::ApplyIndexChange,
10481        action: Action::IndexAdmin,
10482        cancellable: true,
10483        mutation: "catalog_submit",
10484    },
10485    CommandContract {
10486        command: Command::ApplyAdministrationMutation,
10487        action: Action::LifecycleAdmin,
10488        cancellable: true,
10489        mutation: "administration_submit",
10490    },
10491    CommandContract {
10492        command: Command::ListAliases,
10493        action: Action::CatalogRead,
10494        cancellable: true,
10495        mutation: "read_only",
10496    },
10497    CommandContract {
10498        command: Command::GetAlias,
10499        action: Action::CatalogRead,
10500        cancellable: true,
10501        mutation: "read_only",
10502    },
10503    CommandContract {
10504        command: Command::ListDataStreams,
10505        action: Action::CatalogRead,
10506        cancellable: true,
10507        mutation: "read_only",
10508    },
10509    CommandContract {
10510        command: Command::GetDataStream,
10511        action: Action::CatalogRead,
10512        cancellable: true,
10513        mutation: "read_only",
10514    },
10515    CommandContract {
10516        command: Command::ListComponentTemplates,
10517        action: Action::CatalogRead,
10518        cancellable: true,
10519        mutation: "read_only",
10520    },
10521    CommandContract {
10522        command: Command::GetComponentTemplate,
10523        action: Action::CatalogRead,
10524        cancellable: true,
10525        mutation: "read_only",
10526    },
10527    CommandContract {
10528        command: Command::ListIndexTemplates,
10529        action: Action::CatalogRead,
10530        cancellable: true,
10531        mutation: "read_only",
10532    },
10533    CommandContract {
10534        command: Command::GetIndexTemplate,
10535        action: Action::CatalogRead,
10536        cancellable: true,
10537        mutation: "read_only",
10538    },
10539    CommandContract {
10540        command: Command::ListIngestPipelines,
10541        action: Action::LifecycleAdmin,
10542        cancellable: true,
10543        mutation: "read_only",
10544    },
10545    CommandContract {
10546        command: Command::GetIngestPipeline,
10547        action: Action::LifecycleAdmin,
10548        cancellable: true,
10549        mutation: "read_only",
10550    },
10551    CommandContract {
10552        command: Command::SimulateIngestPipeline,
10553        action: Action::LifecycleAdmin,
10554        cancellable: true,
10555        mutation: "read_only",
10556    },
10557    CommandContract {
10558        command: Command::ReprocessByQuery,
10559        action: Action::DataWrite,
10560        cancellable: true,
10561        mutation: "authority_submit",
10562    },
10563    CommandContract {
10564        command: Command::ListLifecyclePolicies,
10565        action: Action::CatalogRead,
10566        cancellable: true,
10567        mutation: "read_only",
10568    },
10569    CommandContract {
10570        command: Command::GetLifecyclePolicy,
10571        action: Action::CatalogRead,
10572        cancellable: true,
10573        mutation: "read_only",
10574    },
10575    CommandContract {
10576        command: Command::PrepareCreateIndex,
10577        action: Action::IndexAdmin,
10578        cancellable: true,
10579        mutation: "catalog_prepare",
10580    },
10581    CommandContract {
10582        command: Command::PrepareDeleteIndex,
10583        action: Action::IndexAdmin,
10584        cancellable: true,
10585        mutation: "catalog_prepare",
10586    },
10587    CommandContract {
10588        command: Command::SubmitCatalogAction,
10589        action: Action::IndexAdmin,
10590        cancellable: true,
10591        mutation: "catalog_submit",
10592    },
10593    CommandContract {
10594        command: Command::ResolveCatalogAction,
10595        action: Action::IndexAdmin,
10596        cancellable: true,
10597        mutation: "read_only",
10598    },
10599    CommandContract {
10600        command: Command::PrepareReplayableSourceIndex,
10601        action: Action::IndexAdmin,
10602        cancellable: true,
10603        mutation: "catalog_prepare",
10604    },
10605    CommandContract {
10606        command: Command::SubmitReplayableSourceIndex,
10607        action: Action::IndexAdmin,
10608        cancellable: true,
10609        mutation: "catalog_submit",
10610    },
10611    CommandContract {
10612        command: Command::GetReplayableSource,
10613        action: Action::CatalogRead,
10614        cancellable: true,
10615        mutation: "read_only",
10616    },
10617    CommandContract {
10618        command: Command::ControlReplayableSource,
10619        action: Action::IndexAdmin,
10620        cancellable: true,
10621        mutation: "catalog_submit",
10622    },
10623    CommandContract {
10624        command: Command::CloneIndex,
10625        action: Action::IndexAdmin,
10626        cancellable: true,
10627        mutation: "catalog_submit",
10628    },
10629    CommandContract {
10630        command: Command::ConfigureHistory,
10631        action: Action::IndexAdmin,
10632        cancellable: true,
10633        mutation: "catalog_submit",
10634    },
10635    CommandContract {
10636        command: Command::GetHistory,
10637        action: Action::CatalogRead,
10638        cancellable: true,
10639        mutation: "read_only",
10640    },
10641    CommandContract {
10642        command: Command::ResolveHistory,
10643        action: Action::DataRead,
10644        cancellable: true,
10645        mutation: "read_only",
10646    },
10647    CommandContract {
10648        command: Command::PlaceHistoryHold,
10649        action: Action::IndexAdmin,
10650        cancellable: true,
10651        mutation: "catalog_submit",
10652    },
10653    CommandContract {
10654        command: Command::ReleaseHistoryHold,
10655        action: Action::IndexAdmin,
10656        cancellable: true,
10657        mutation: "catalog_submit",
10658    },
10659    CommandContract {
10660        command: Command::PrepareDocumentMutation,
10661        action: Action::DataWrite,
10662        cancellable: true,
10663        mutation: "read_only_prepare",
10664    },
10665    CommandContract {
10666        command: Command::SubmitDocumentMutation,
10667        action: Action::DataWrite,
10668        cancellable: true,
10669        mutation: "wal_submit",
10670    },
10671    CommandContract {
10672        command: Command::PrepareDocumentBulk,
10673        action: Action::DataWrite,
10674        cancellable: true,
10675        mutation: "read_only_prepare",
10676    },
10677    CommandContract {
10678        command: Command::SubmitDocumentBulk,
10679        action: Action::DataWrite,
10680        cancellable: true,
10681        mutation: "wal_submit",
10682    },
10683    CommandContract {
10684        command: Command::ResolveDocumentBulk,
10685        action: Action::DataRead,
10686        cancellable: true,
10687        mutation: "read_only",
10688    },
10689    CommandContract {
10690        command: Command::PrepareAppendBulk,
10691        action: Action::Append,
10692        cancellable: true,
10693        mutation: "read_only_prepare",
10694    },
10695    CommandContract {
10696        command: Command::SubmitAppendBulk,
10697        action: Action::Append,
10698        cancellable: true,
10699        mutation: "wal_submit",
10700    },
10701    CommandContract {
10702        command: Command::ResolveAppendBulk,
10703        action: Action::ResolveAppend,
10704        cancellable: true,
10705        mutation: "read_only",
10706    },
10707    CommandContract {
10708        command: Command::ObserveAppendCommitted,
10709        action: Action::ResolveAppend,
10710        cancellable: true,
10711        mutation: "read_only",
10712    },
10713    CommandContract {
10714        command: Command::ResolveDocumentMutation,
10715        action: Action::DataRead,
10716        cancellable: true,
10717        mutation: "read_only",
10718    },
10719    CommandContract {
10720        command: Command::GetDocument,
10721        action: Action::DataRead,
10722        cancellable: true,
10723        mutation: "read_only",
10724    },
10725    CommandContract {
10726        command: Command::Search,
10727        action: Action::DataRead,
10728        cancellable: true,
10729        mutation: "read_only",
10730    },
10731    CommandContract {
10732        command: Command::TraverseRelationships,
10733        action: Action::DataRead,
10734        cancellable: true,
10735        mutation: "read_only",
10736    },
10737    CommandContract {
10738        command: Command::QueryProfiles,
10739        action: Action::DataRead,
10740        cancellable: true,
10741        mutation: "read_only",
10742    },
10743    CommandContract {
10744        command: Command::EvaluateTemporalEvidence,
10745        action: Action::DataRead,
10746        cancellable: true,
10747        mutation: "read_only",
10748    },
10749    CommandContract {
10750        command: Command::CreateContinuousTemporalEvaluation,
10751        action: Action::LifecycleAdmin,
10752        cancellable: true,
10753        mutation: "catalog_submit",
10754    },
10755    CommandContract {
10756        command: Command::GetContinuousTemporalEvaluation,
10757        action: Action::CatalogRead,
10758        cancellable: true,
10759        mutation: "read_only",
10760    },
10761    CommandContract {
10762        command: Command::PauseContinuousTemporalEvaluation,
10763        action: Action::LifecycleAdmin,
10764        cancellable: true,
10765        mutation: "catalog_submit",
10766    },
10767    CommandContract {
10768        command: Command::ResumeContinuousTemporalEvaluation,
10769        action: Action::LifecycleAdmin,
10770        cancellable: true,
10771        mutation: "catalog_submit",
10772    },
10773    CommandContract {
10774        command: Command::ReplaceContinuousTemporalEvaluation,
10775        action: Action::LifecycleAdmin,
10776        cancellable: true,
10777        mutation: "catalog_submit",
10778    },
10779    CommandContract {
10780        command: Command::RetireContinuousTemporalEvaluation,
10781        action: Action::LifecycleAdmin,
10782        cancellable: true,
10783        mutation: "catalog_submit",
10784    },
10785    CommandContract {
10786        command: Command::ReadContinuousTemporalEvidence,
10787        action: Action::DataRead,
10788        cancellable: true,
10789        mutation: "read_only",
10790    },
10791    CommandContract {
10792        command: Command::ValidateSearch,
10793        action: Action::DataRead,
10794        cancellable: true,
10795        mutation: "read_only",
10796    },
10797    CommandContract {
10798        command: Command::OpenPit,
10799        action: Action::DataRead,
10800        cancellable: true,
10801        mutation: "authority_submit",
10802    },
10803    CommandContract {
10804        command: Command::RenewPit,
10805        action: Action::DataRead,
10806        cancellable: true,
10807        mutation: "authority_submit",
10808    },
10809    CommandContract {
10810        command: Command::ClosePit,
10811        action: Action::DataRead,
10812        cancellable: true,
10813        mutation: "authority_submit",
10814    },
10815    CommandContract {
10816        command: Command::ListOperations,
10817        action: Action::OperationRead,
10818        cancellable: true,
10819        mutation: "read_only",
10820    },
10821    CommandContract {
10822        command: Command::GetOperation,
10823        action: Action::OperationRead,
10824        cancellable: true,
10825        mutation: "read_only",
10826    },
10827    CommandContract {
10828        command: Command::WaitOperation,
10829        action: Action::OperationRead,
10830        cancellable: true,
10831        mutation: "read_only",
10832    },
10833    CommandContract {
10834        command: Command::CancelOperation,
10835        action: Action::OperationCancel,
10836        cancellable: true,
10837        mutation: "authority_submit",
10838    },
10839    CommandContract {
10840        command: Command::ListAuditEvents,
10841        action: Action::AuditRead,
10842        cancellable: true,
10843        mutation: "read_only",
10844    },
10845    CommandContract {
10846        command: Command::ExportAuditEvents,
10847        action: Action::AuditRead,
10848        cancellable: true,
10849        mutation: "read_only",
10850    },
10851    CommandContract {
10852        command: Command::ReserveServiceCredential,
10853        action: Action::SecurityAdmin,
10854        cancellable: true,
10855        mutation: "security_reserve",
10856    },
10857    CommandContract {
10858        command: Command::ReserveServiceCredentialRotation,
10859        action: Action::SecurityAdmin,
10860        cancellable: true,
10861        mutation: "security_reserve",
10862    },
10863    CommandContract {
10864        command: Command::ActivateServiceCredential,
10865        action: Action::SecurityAdmin,
10866        cancellable: true,
10867        mutation: "security_submit",
10868    },
10869    CommandContract {
10870        command: Command::ResolveServiceCredentialReservation,
10871        action: Action::SecurityRead,
10872        cancellable: true,
10873        mutation: "read_only",
10874    },
10875    CommandContract {
10876        command: Command::PrepareRevokeServiceCredential,
10877        action: Action::SecurityAdmin,
10878        cancellable: true,
10879        mutation: "read_only_prepare",
10880    },
10881    CommandContract {
10882        command: Command::RevokeServiceCredential,
10883        action: Action::SecurityAdmin,
10884        cancellable: true,
10885        mutation: "security_submit",
10886    },
10887    CommandContract {
10888        command: Command::ResolveSecurityAction,
10889        action: Action::SecurityRead,
10890        cancellable: true,
10891        mutation: "read_only",
10892    },
10893    CommandContract {
10894        command: Command::GetSecurityRole,
10895        action: Action::SecurityRead,
10896        cancellable: true,
10897        mutation: "read_only",
10898    },
10899    CommandContract {
10900        command: Command::PrepareRoleAppendAccessChange,
10901        action: Action::SecurityAdmin,
10902        cancellable: true,
10903        mutation: "read_only_prepare",
10904    },
10905    CommandContract {
10906        command: Command::SubmitRoleAppendAccessChange,
10907        action: Action::SecurityAdmin,
10908        cancellable: true,
10909        mutation: "security_submit",
10910    },
10911    CommandContract {
10912        command: Command::ListServiceCredentials,
10913        action: Action::SecurityRead,
10914        cancellable: true,
10915        mutation: "read_only",
10916    },
10917    CommandContract {
10918        command: Command::GetRuntimeStatus,
10919        action: Action::CatalogRead,
10920        cancellable: true,
10921        mutation: "read_only",
10922    },
10923    CommandContract {
10924        command: Command::GetResultCacheStatus,
10925        action: Action::CatalogRead,
10926        cancellable: true,
10927        mutation: "read_only",
10928    },
10929    CommandContract {
10930        command: Command::GetFieldPromotionStatus,
10931        action: Action::CatalogRead,
10932        cancellable: true,
10933        mutation: "read_only",
10934    },
10935    CommandContract {
10936        command: Command::GetOverloadStatus,
10937        action: Action::CatalogRead,
10938        cancellable: true,
10939        mutation: "read_only",
10940    },
10941    CommandContract {
10942        command: Command::ConfigureExternalKey,
10943        action: Action::LifecycleAdmin,
10944        cancellable: true,
10945        mutation: "authority_submit",
10946    },
10947    CommandContract {
10948        command: Command::RotateExternalKeyBinding,
10949        action: Action::LifecycleAdmin,
10950        cancellable: true,
10951        mutation: "authority_submit",
10952    },
10953    CommandContract {
10954        command: Command::ConfigureAggregateThenDelete,
10955        action: Action::LifecycleAdmin,
10956        cancellable: true,
10957        mutation: "authority_submit",
10958    },
10959    CommandContract {
10960        command: Command::GetLifecycleStatus,
10961        action: Action::CatalogRead,
10962        cancellable: true,
10963        mutation: "read_only",
10964    },
10965    CommandContract {
10966        command: Command::GetQuota,
10967        action: Action::QuotaRead,
10968        cancellable: true,
10969        mutation: "read_only",
10970    },
10971    CommandContract {
10972        command: Command::UpdateQuota,
10973        action: Action::QuotaAdmin,
10974        cancellable: true,
10975        mutation: "quota_submit",
10976    },
10977    CommandContract {
10978        command: Command::GetBinding,
10979        action: Action::BindingRead,
10980        cancellable: true,
10981        mutation: "read_only",
10982    },
10983    CommandContract {
10984        command: Command::GetAdmissionStatus,
10985        action: Action::AdmissionRead,
10986        cancellable: true,
10987        mutation: "read_only",
10988    },
10989    CommandContract {
10990        command: Command::SetAdmission,
10991        action: Action::AdmissionAdmin,
10992        cancellable: true,
10993        mutation: "admission_submit",
10994    },
10995    CommandContract {
10996        command: Command::GetQuiesceStatus,
10997        action: Action::AdmissionRead,
10998        cancellable: true,
10999        mutation: "read_only",
11000    },
11001    CommandContract {
11002        command: Command::GetDecommissionReadiness,
11003        action: Action::AdmissionRead,
11004        cancellable: true,
11005        mutation: "read_only",
11006    },
11007    CommandContract {
11008        command: Command::GetUpgradeReadiness,
11009        action: Action::TaskRead,
11010        cancellable: true,
11011        mutation: "read_only",
11012    },
11013    CommandContract {
11014        command: Command::GetMaintenanceStatus,
11015        action: Action::TaskRead,
11016        cancellable: true,
11017        mutation: "read_only",
11018    },
11019    CommandContract {
11020        command: Command::WarmVectorIndex,
11021        action: Action::DataRead,
11022        cancellable: true,
11023        mutation: "read_only",
11024    },
11025    CommandContract {
11026        command: Command::EvaluateVectorRecall,
11027        action: Action::DiagnosticsCreate,
11028        cancellable: true,
11029        mutation: "diagnostic_submit",
11030    },
11031    CommandContract {
11032        command: Command::CalibrateVectorStrategy,
11033        action: Action::DiagnosticsCreate,
11034        cancellable: true,
11035        mutation: "diagnostic_submit",
11036    },
11037    CommandContract {
11038        command: Command::GetVectorDiagnostic,
11039        action: Action::DiagnosticsRead,
11040        cancellable: true,
11041        mutation: "read_only",
11042    },
11043    CommandContract {
11044        command: Command::CreateDiagnostic,
11045        action: Action::DiagnosticsCreate,
11046        cancellable: true,
11047        mutation: "diagnostic_submit",
11048    },
11049    CommandContract {
11050        command: Command::GetDiagnostic,
11051        action: Action::DiagnosticsRead,
11052        cancellable: true,
11053        mutation: "read_only",
11054    },
11055    CommandContract {
11056        command: Command::PrepareCollectionExport,
11057        action: Action::CollectionExport,
11058        cancellable: true,
11059        mutation: "read_only_prepare",
11060    },
11061    CommandContract {
11062        command: Command::StartCollectionExport,
11063        action: Action::CollectionExport,
11064        cancellable: true,
11065        mutation: "portability_submit",
11066    },
11067    CommandContract {
11068        command: Command::ResolveCollectionExport,
11069        action: Action::CollectionExport,
11070        cancellable: true,
11071        mutation: "read_only",
11072    },
11073    CommandContract {
11074        command: Command::VerifyCollectionExport,
11075        action: Action::CollectionExport,
11076        cancellable: true,
11077        mutation: "read_only",
11078    },
11079    CommandContract {
11080        command: Command::PrepareCollectionRestore,
11081        action: Action::CollectionRestore,
11082        cancellable: true,
11083        mutation: "read_only_prepare",
11084    },
11085    CommandContract {
11086        command: Command::StartCollectionRestore,
11087        action: Action::CollectionRestore,
11088        cancellable: true,
11089        mutation: "portability_submit",
11090    },
11091    CommandContract {
11092        command: Command::ResolveCollectionRestore,
11093        action: Action::CollectionRestore,
11094        cancellable: true,
11095        mutation: "read_only",
11096    },
11097    CommandContract {
11098        command: Command::PrepareIndexExport,
11099        action: Action::IndexExport,
11100        cancellable: true,
11101        mutation: "read_only_prepare",
11102    },
11103    CommandContract {
11104        command: Command::StartIndexExport,
11105        action: Action::IndexExport,
11106        cancellable: true,
11107        mutation: "portability_submit",
11108    },
11109    CommandContract {
11110        command: Command::ResolveIndexExport,
11111        action: Action::IndexExport,
11112        cancellable: true,
11113        mutation: "read_only",
11114    },
11115    CommandContract {
11116        command: Command::VerifyIndexExport,
11117        action: Action::IndexExport,
11118        cancellable: true,
11119        mutation: "read_only",
11120    },
11121    CommandContract {
11122        command: Command::PrepareIndexImport,
11123        action: Action::IndexImport,
11124        cancellable: true,
11125        mutation: "read_only_prepare",
11126    },
11127    CommandContract {
11128        command: Command::StartIndexImport,
11129        action: Action::IndexImport,
11130        cancellable: true,
11131        mutation: "portability_submit",
11132    },
11133    CommandContract {
11134        command: Command::ResolveIndexImport,
11135        action: Action::IndexImport,
11136        cancellable: true,
11137        mutation: "read_only",
11138    },
11139    CommandContract {
11140        command: Command::ReadArtifactChunk,
11141        action: Action::OperationRead,
11142        cancellable: true,
11143        mutation: "read_only",
11144    },
11145    CommandContract {
11146        command: Command::ExportUsage,
11147        action: Action::UsageRead,
11148        cancellable: true,
11149        mutation: "read_only",
11150    },
11151    CommandContract {
11152        command: Command::ExecuteStateRead,
11153        action: Action::DataRead,
11154        cancellable: true,
11155        mutation: "read_only",
11156    },
11157    CommandContract {
11158        command: Command::PrepareStateWrite,
11159        action: Action::DataWrite,
11160        cancellable: true,
11161        mutation: "read_only_prepare",
11162    },
11163    CommandContract {
11164        command: Command::SubmitStateWrite,
11165        action: Action::DataWrite,
11166        cancellable: true,
11167        mutation: "state_submit",
11168    },
11169    CommandContract {
11170        command: Command::ResolveStateWrite,
11171        action: Action::DataRead,
11172        cancellable: true,
11173        mutation: "read_only",
11174    },
11175];
11176#[derive(Clone, Copy, Debug, Eq, PartialEq)]
11177pub struct CommandSemanticContract {
11178    pub command: Command,
11179    pub admissible_errors: &'static [ErrorCode],
11180    pub limit_ids: &'static [&'static str],
11181    pub effect_class: &'static str,
11182    pub risk_flags: &'static [&'static str],
11183    pub capability_family: &'static str,
11184    pub retry_safety: &'static str,
11185    pub identity_requirement: &'static str,
11186    pub resolver: Option<Command>,
11187    pub cancellation: &'static str,
11188    pub side_effects: &'static [&'static str],
11189    pub recovery: &'static str,
11190    pub collection_index_ref: &'static str,
11191}
11192pub const LODESTONE_API_COMMAND_SEMANTICS: &[CommandSemanticContract] = &[
11193    CommandSemanticContract {
11194        command: Command::Discover,
11195        admissible_errors: &[
11196            ErrorCode::Aborted,
11197            ErrorCode::DeadlineExceeded,
11198            ErrorCode::InvalidRequest,
11199            ErrorCode::UnsupportedVersion,
11200            ErrorCode::Unauthenticated,
11201            ErrorCode::PermissionDenied,
11202            ErrorCode::NotFound,
11203            ErrorCode::LimitExceeded,
11204            ErrorCode::CapabilityUnavailable,
11205            ErrorCode::TemporarilyUnavailable,
11206            ErrorCode::Internal,
11207        ],
11208        limit_ids: &["request_bytes", "response_bytes"],
11209        effect_class: "read_only",
11210        risk_flags: &[],
11211        capability_family: "discovery",
11212        retry_safety: "safe",
11213        identity_requirement: "none",
11214        resolver: None,
11215        cancellation: "per_call",
11216        side_effects: &[],
11217        recovery: "retry",
11218        collection_index_ref: "none",
11219    },
11220    CommandSemanticContract {
11221        command: Command::ListIndexes,
11222        admissible_errors: &[
11223            ErrorCode::Aborted,
11224            ErrorCode::DeadlineExceeded,
11225            ErrorCode::InvalidRequest,
11226            ErrorCode::UnsupportedVersion,
11227            ErrorCode::Unauthenticated,
11228            ErrorCode::PermissionDenied,
11229            ErrorCode::NotFound,
11230            ErrorCode::StaleCursor,
11231            ErrorCode::RestartBudgetExhausted,
11232            ErrorCode::LimitExceeded,
11233            ErrorCode::CapabilityUnavailable,
11234            ErrorCode::TemporarilyUnavailable,
11235            ErrorCode::Internal,
11236        ],
11237        limit_ids: &[
11238            "request_bytes",
11239            "response_bytes",
11240            "page_size",
11241            "catalog_page_size",
11242            "catalog_restart_budget",
11243        ],
11244        effect_class: "read_only",
11245        risk_flags: &[],
11246        capability_family: "catalog",
11247        retry_safety: "safe",
11248        identity_requirement: "none",
11249        resolver: None,
11250        cancellation: "per_call",
11251        side_effects: &[],
11252        recovery: "retry",
11253        collection_index_ref: "none",
11254    },
11255    CommandSemanticContract {
11256        command: Command::GetIndex,
11257        admissible_errors: &[
11258            ErrorCode::Aborted,
11259            ErrorCode::DeadlineExceeded,
11260            ErrorCode::InvalidRequest,
11261            ErrorCode::UnsupportedVersion,
11262            ErrorCode::Unauthenticated,
11263            ErrorCode::PermissionDenied,
11264            ErrorCode::NotFound,
11265            ErrorCode::LimitExceeded,
11266            ErrorCode::CapabilityUnavailable,
11267            ErrorCode::TemporarilyUnavailable,
11268            ErrorCode::Internal,
11269        ],
11270        limit_ids: &["request_bytes", "response_bytes"],
11271        effect_class: "read_only",
11272        risk_flags: &[],
11273        capability_family: "catalog",
11274        retry_safety: "safe",
11275        identity_requirement: "none",
11276        resolver: None,
11277        cancellation: "per_call",
11278        side_effects: &[],
11279        recovery: "retry",
11280        collection_index_ref: "none",
11281    },
11282    CommandSemanticContract {
11283        command: Command::ValidateIndexChange,
11284        admissible_errors: &[
11285            ErrorCode::Aborted,
11286            ErrorCode::DeadlineExceeded,
11287            ErrorCode::InvalidRequest,
11288            ErrorCode::UnsupportedVersion,
11289            ErrorCode::Unauthenticated,
11290            ErrorCode::PermissionDenied,
11291            ErrorCode::NotFound,
11292            ErrorCode::LimitExceeded,
11293            ErrorCode::CapabilityUnavailable,
11294            ErrorCode::TemporarilyUnavailable,
11295            ErrorCode::Internal,
11296        ],
11297        limit_ids: &["request_bytes", "response_bytes"],
11298        effect_class: "read_only",
11299        risk_flags: &[],
11300        capability_family: "catalog",
11301        retry_safety: "safe",
11302        identity_requirement: "none",
11303        resolver: None,
11304        cancellation: "per_call",
11305        side_effects: &[],
11306        recovery: "retry",
11307        collection_index_ref: "request_name",
11308    },
11309    CommandSemanticContract {
11310        command: Command::ApplyIndexChange,
11311        admissible_errors: &[
11312            ErrorCode::Aborted,
11313            ErrorCode::DeadlineExceeded,
11314            ErrorCode::InvalidRequest,
11315            ErrorCode::UnsupportedVersion,
11316            ErrorCode::Unauthenticated,
11317            ErrorCode::PermissionDenied,
11318            ErrorCode::NotFound,
11319            ErrorCode::Conflict,
11320            ErrorCode::LimitExceeded,
11321            ErrorCode::CapabilityUnavailable,
11322            ErrorCode::NotSubmitted,
11323            ErrorCode::SubmittedIndeterminate,
11324            ErrorCode::ExpiredUnknown,
11325            ErrorCode::TemporarilyUnavailable,
11326            ErrorCode::Internal,
11327        ],
11328        limit_ids: &["request_bytes", "response_bytes"],
11329        effect_class: "durable_submit",
11330        risk_flags: &[],
11331        capability_family: "catalog",
11332        retry_safety: "pre_submit_only",
11333        identity_requirement: "caller_action_id",
11334        resolver: None,
11335        cancellation: "per_call_until_submission_then_resolve",
11336        side_effects: &["commits_authoritative_state"],
11337        recovery: "retry_if_not_submitted",
11338        collection_index_ref: "request_index",
11339    },
11340    CommandSemanticContract {
11341        command: Command::ApplyAdministrationMutation,
11342        admissible_errors: &[
11343            ErrorCode::Aborted,
11344            ErrorCode::DeadlineExceeded,
11345            ErrorCode::InvalidRequest,
11346            ErrorCode::UnsupportedVersion,
11347            ErrorCode::Unauthenticated,
11348            ErrorCode::PermissionDenied,
11349            ErrorCode::NotFound,
11350            ErrorCode::Conflict,
11351            ErrorCode::LimitExceeded,
11352            ErrorCode::CapabilityUnavailable,
11353            ErrorCode::NotSubmitted,
11354            ErrorCode::SubmittedIndeterminate,
11355            ErrorCode::ExpiredUnknown,
11356            ErrorCode::TemporarilyUnavailable,
11357            ErrorCode::Internal,
11358        ],
11359        limit_ids: &["request_bytes", "response_bytes"],
11360        effect_class: "control_write",
11361        risk_flags: &[],
11362        capability_family: "lifecycle",
11363        retry_safety: "pre_submit_only",
11364        identity_requirement: "caller_action_id",
11365        resolver: None,
11366        cancellation: "per_call_until_submission_then_resolve",
11367        side_effects: &["commits_authoritative_state"],
11368        recovery: "retry_if_not_submitted",
11369        collection_index_ref: "none",
11370    },
11371    CommandSemanticContract {
11372        command: Command::ListAliases,
11373        admissible_errors: &[
11374            ErrorCode::Aborted,
11375            ErrorCode::DeadlineExceeded,
11376            ErrorCode::InvalidRequest,
11377            ErrorCode::UnsupportedVersion,
11378            ErrorCode::Unauthenticated,
11379            ErrorCode::PermissionDenied,
11380            ErrorCode::NotFound,
11381            ErrorCode::StaleCursor,
11382            ErrorCode::RestartBudgetExhausted,
11383            ErrorCode::LimitExceeded,
11384            ErrorCode::CapabilityUnavailable,
11385            ErrorCode::TemporarilyUnavailable,
11386            ErrorCode::Internal,
11387        ],
11388        limit_ids: &[
11389            "request_bytes",
11390            "response_bytes",
11391            "page_size",
11392            "catalog_page_size",
11393            "catalog_restart_budget",
11394        ],
11395        effect_class: "read_only",
11396        risk_flags: &[],
11397        capability_family: "catalog",
11398        retry_safety: "safe",
11399        identity_requirement: "none",
11400        resolver: None,
11401        cancellation: "per_call",
11402        side_effects: &[],
11403        recovery: "retry",
11404        collection_index_ref: "none",
11405    },
11406    CommandSemanticContract {
11407        command: Command::GetAlias,
11408        admissible_errors: &[
11409            ErrorCode::Aborted,
11410            ErrorCode::DeadlineExceeded,
11411            ErrorCode::InvalidRequest,
11412            ErrorCode::UnsupportedVersion,
11413            ErrorCode::Unauthenticated,
11414            ErrorCode::PermissionDenied,
11415            ErrorCode::NotFound,
11416            ErrorCode::LimitExceeded,
11417            ErrorCode::CapabilityUnavailable,
11418            ErrorCode::TemporarilyUnavailable,
11419            ErrorCode::Internal,
11420        ],
11421        limit_ids: &["request_bytes", "response_bytes"],
11422        effect_class: "read_only",
11423        risk_flags: &[],
11424        capability_family: "catalog",
11425        retry_safety: "safe",
11426        identity_requirement: "none",
11427        resolver: None,
11428        cancellation: "per_call",
11429        side_effects: &[],
11430        recovery: "retry",
11431        collection_index_ref: "none",
11432    },
11433    CommandSemanticContract {
11434        command: Command::ListDataStreams,
11435        admissible_errors: &[
11436            ErrorCode::Aborted,
11437            ErrorCode::DeadlineExceeded,
11438            ErrorCode::InvalidRequest,
11439            ErrorCode::UnsupportedVersion,
11440            ErrorCode::Unauthenticated,
11441            ErrorCode::PermissionDenied,
11442            ErrorCode::NotFound,
11443            ErrorCode::StaleCursor,
11444            ErrorCode::RestartBudgetExhausted,
11445            ErrorCode::LimitExceeded,
11446            ErrorCode::CapabilityUnavailable,
11447            ErrorCode::TemporarilyUnavailable,
11448            ErrorCode::Internal,
11449        ],
11450        limit_ids: &[
11451            "request_bytes",
11452            "response_bytes",
11453            "page_size",
11454            "catalog_page_size",
11455            "catalog_restart_budget",
11456        ],
11457        effect_class: "read_only",
11458        risk_flags: &[],
11459        capability_family: "catalog",
11460        retry_safety: "safe",
11461        identity_requirement: "none",
11462        resolver: None,
11463        cancellation: "per_call",
11464        side_effects: &[],
11465        recovery: "retry",
11466        collection_index_ref: "none",
11467    },
11468    CommandSemanticContract {
11469        command: Command::GetDataStream,
11470        admissible_errors: &[
11471            ErrorCode::Aborted,
11472            ErrorCode::DeadlineExceeded,
11473            ErrorCode::InvalidRequest,
11474            ErrorCode::UnsupportedVersion,
11475            ErrorCode::Unauthenticated,
11476            ErrorCode::PermissionDenied,
11477            ErrorCode::NotFound,
11478            ErrorCode::LimitExceeded,
11479            ErrorCode::CapabilityUnavailable,
11480            ErrorCode::TemporarilyUnavailable,
11481            ErrorCode::Internal,
11482        ],
11483        limit_ids: &["request_bytes", "response_bytes"],
11484        effect_class: "read_only",
11485        risk_flags: &[],
11486        capability_family: "catalog",
11487        retry_safety: "safe",
11488        identity_requirement: "none",
11489        resolver: None,
11490        cancellation: "per_call",
11491        side_effects: &[],
11492        recovery: "retry",
11493        collection_index_ref: "none",
11494    },
11495    CommandSemanticContract {
11496        command: Command::ListComponentTemplates,
11497        admissible_errors: &[
11498            ErrorCode::Aborted,
11499            ErrorCode::DeadlineExceeded,
11500            ErrorCode::InvalidRequest,
11501            ErrorCode::UnsupportedVersion,
11502            ErrorCode::Unauthenticated,
11503            ErrorCode::PermissionDenied,
11504            ErrorCode::NotFound,
11505            ErrorCode::StaleCursor,
11506            ErrorCode::RestartBudgetExhausted,
11507            ErrorCode::LimitExceeded,
11508            ErrorCode::CapabilityUnavailable,
11509            ErrorCode::TemporarilyUnavailable,
11510            ErrorCode::Internal,
11511        ],
11512        limit_ids: &[
11513            "request_bytes",
11514            "response_bytes",
11515            "page_size",
11516            "catalog_page_size",
11517            "catalog_restart_budget",
11518        ],
11519        effect_class: "read_only",
11520        risk_flags: &[],
11521        capability_family: "catalog",
11522        retry_safety: "safe",
11523        identity_requirement: "none",
11524        resolver: None,
11525        cancellation: "per_call",
11526        side_effects: &[],
11527        recovery: "retry",
11528        collection_index_ref: "none",
11529    },
11530    CommandSemanticContract {
11531        command: Command::GetComponentTemplate,
11532        admissible_errors: &[
11533            ErrorCode::Aborted,
11534            ErrorCode::DeadlineExceeded,
11535            ErrorCode::InvalidRequest,
11536            ErrorCode::UnsupportedVersion,
11537            ErrorCode::Unauthenticated,
11538            ErrorCode::PermissionDenied,
11539            ErrorCode::NotFound,
11540            ErrorCode::LimitExceeded,
11541            ErrorCode::CapabilityUnavailable,
11542            ErrorCode::TemporarilyUnavailable,
11543            ErrorCode::Internal,
11544        ],
11545        limit_ids: &["request_bytes", "response_bytes"],
11546        effect_class: "read_only",
11547        risk_flags: &[],
11548        capability_family: "catalog",
11549        retry_safety: "safe",
11550        identity_requirement: "none",
11551        resolver: None,
11552        cancellation: "per_call",
11553        side_effects: &[],
11554        recovery: "retry",
11555        collection_index_ref: "none",
11556    },
11557    CommandSemanticContract {
11558        command: Command::ListIndexTemplates,
11559        admissible_errors: &[
11560            ErrorCode::Aborted,
11561            ErrorCode::DeadlineExceeded,
11562            ErrorCode::InvalidRequest,
11563            ErrorCode::UnsupportedVersion,
11564            ErrorCode::Unauthenticated,
11565            ErrorCode::PermissionDenied,
11566            ErrorCode::NotFound,
11567            ErrorCode::StaleCursor,
11568            ErrorCode::RestartBudgetExhausted,
11569            ErrorCode::LimitExceeded,
11570            ErrorCode::CapabilityUnavailable,
11571            ErrorCode::TemporarilyUnavailable,
11572            ErrorCode::Internal,
11573        ],
11574        limit_ids: &[
11575            "request_bytes",
11576            "response_bytes",
11577            "page_size",
11578            "catalog_page_size",
11579            "catalog_restart_budget",
11580        ],
11581        effect_class: "read_only",
11582        risk_flags: &[],
11583        capability_family: "catalog",
11584        retry_safety: "safe",
11585        identity_requirement: "none",
11586        resolver: None,
11587        cancellation: "per_call",
11588        side_effects: &[],
11589        recovery: "retry",
11590        collection_index_ref: "none",
11591    },
11592    CommandSemanticContract {
11593        command: Command::GetIndexTemplate,
11594        admissible_errors: &[
11595            ErrorCode::Aborted,
11596            ErrorCode::DeadlineExceeded,
11597            ErrorCode::InvalidRequest,
11598            ErrorCode::UnsupportedVersion,
11599            ErrorCode::Unauthenticated,
11600            ErrorCode::PermissionDenied,
11601            ErrorCode::NotFound,
11602            ErrorCode::LimitExceeded,
11603            ErrorCode::CapabilityUnavailable,
11604            ErrorCode::TemporarilyUnavailable,
11605            ErrorCode::Internal,
11606        ],
11607        limit_ids: &["request_bytes", "response_bytes"],
11608        effect_class: "read_only",
11609        risk_flags: &[],
11610        capability_family: "catalog",
11611        retry_safety: "safe",
11612        identity_requirement: "none",
11613        resolver: None,
11614        cancellation: "per_call",
11615        side_effects: &[],
11616        recovery: "retry",
11617        collection_index_ref: "none",
11618    },
11619    CommandSemanticContract {
11620        command: Command::ListIngestPipelines,
11621        admissible_errors: &[
11622            ErrorCode::Aborted,
11623            ErrorCode::DeadlineExceeded,
11624            ErrorCode::InvalidRequest,
11625            ErrorCode::UnsupportedVersion,
11626            ErrorCode::Unauthenticated,
11627            ErrorCode::PermissionDenied,
11628            ErrorCode::NotFound,
11629            ErrorCode::StaleCursor,
11630            ErrorCode::RestartBudgetExhausted,
11631            ErrorCode::LimitExceeded,
11632            ErrorCode::CapabilityUnavailable,
11633            ErrorCode::TemporarilyUnavailable,
11634            ErrorCode::Internal,
11635        ],
11636        limit_ids: &[
11637            "request_bytes",
11638            "response_bytes",
11639            "page_size",
11640            "catalog_page_size",
11641            "catalog_restart_budget",
11642        ],
11643        effect_class: "read_only",
11644        risk_flags: &[],
11645        capability_family: "lifecycle",
11646        retry_safety: "safe",
11647        identity_requirement: "none",
11648        resolver: None,
11649        cancellation: "per_call",
11650        side_effects: &[],
11651        recovery: "retry",
11652        collection_index_ref: "none",
11653    },
11654    CommandSemanticContract {
11655        command: Command::GetIngestPipeline,
11656        admissible_errors: &[
11657            ErrorCode::Aborted,
11658            ErrorCode::DeadlineExceeded,
11659            ErrorCode::InvalidRequest,
11660            ErrorCode::UnsupportedVersion,
11661            ErrorCode::Unauthenticated,
11662            ErrorCode::PermissionDenied,
11663            ErrorCode::NotFound,
11664            ErrorCode::LimitExceeded,
11665            ErrorCode::CapabilityUnavailable,
11666            ErrorCode::TemporarilyUnavailable,
11667            ErrorCode::Internal,
11668        ],
11669        limit_ids: &["request_bytes", "response_bytes"],
11670        effect_class: "read_only",
11671        risk_flags: &[],
11672        capability_family: "lifecycle",
11673        retry_safety: "safe",
11674        identity_requirement: "none",
11675        resolver: None,
11676        cancellation: "per_call",
11677        side_effects: &[],
11678        recovery: "retry",
11679        collection_index_ref: "none",
11680    },
11681    CommandSemanticContract {
11682        command: Command::SimulateIngestPipeline,
11683        admissible_errors: &[
11684            ErrorCode::Aborted,
11685            ErrorCode::DeadlineExceeded,
11686            ErrorCode::InvalidRequest,
11687            ErrorCode::UnsupportedVersion,
11688            ErrorCode::Unauthenticated,
11689            ErrorCode::PermissionDenied,
11690            ErrorCode::NotFound,
11691            ErrorCode::LimitExceeded,
11692            ErrorCode::CapabilityUnavailable,
11693            ErrorCode::TemporarilyUnavailable,
11694            ErrorCode::Internal,
11695        ],
11696        limit_ids: &["request_bytes", "response_bytes"],
11697        effect_class: "read_only",
11698        risk_flags: &[],
11699        capability_family: "lifecycle",
11700        retry_safety: "safe",
11701        identity_requirement: "none",
11702        resolver: None,
11703        cancellation: "per_call",
11704        side_effects: &[],
11705        recovery: "retry",
11706        collection_index_ref: "none",
11707    },
11708    CommandSemanticContract {
11709        command: Command::ReprocessByQuery,
11710        admissible_errors: &[
11711            ErrorCode::Aborted,
11712            ErrorCode::DeadlineExceeded,
11713            ErrorCode::InvalidRequest,
11714            ErrorCode::UnsupportedVersion,
11715            ErrorCode::Unauthenticated,
11716            ErrorCode::PermissionDenied,
11717            ErrorCode::NotFound,
11718            ErrorCode::Conflict,
11719            ErrorCode::LimitExceeded,
11720            ErrorCode::CapabilityUnavailable,
11721            ErrorCode::NotSubmitted,
11722            ErrorCode::SubmittedIndeterminate,
11723            ErrorCode::ExpiredUnknown,
11724            ErrorCode::TemporarilyUnavailable,
11725            ErrorCode::Internal,
11726        ],
11727        limit_ids: &["request_bytes", "response_bytes"],
11728        effect_class: "durable_submit",
11729        risk_flags: &[],
11730        capability_family: "data",
11731        retry_safety: "safe",
11732        identity_requirement: "caller_action_id",
11733        resolver: None,
11734        cancellation: "per_call_until_submission_then_resolve",
11735        side_effects: &["commits_authoritative_state"],
11736        recovery: "retry",
11737        collection_index_ref: "request_index",
11738    },
11739    CommandSemanticContract {
11740        command: Command::ListLifecyclePolicies,
11741        admissible_errors: &[
11742            ErrorCode::Aborted,
11743            ErrorCode::DeadlineExceeded,
11744            ErrorCode::InvalidRequest,
11745            ErrorCode::UnsupportedVersion,
11746            ErrorCode::Unauthenticated,
11747            ErrorCode::PermissionDenied,
11748            ErrorCode::NotFound,
11749            ErrorCode::StaleCursor,
11750            ErrorCode::RestartBudgetExhausted,
11751            ErrorCode::LimitExceeded,
11752            ErrorCode::CapabilityUnavailable,
11753            ErrorCode::TemporarilyUnavailable,
11754            ErrorCode::Internal,
11755        ],
11756        limit_ids: &[
11757            "request_bytes",
11758            "response_bytes",
11759            "page_size",
11760            "catalog_page_size",
11761            "catalog_restart_budget",
11762        ],
11763        effect_class: "read_only",
11764        risk_flags: &[],
11765        capability_family: "catalog",
11766        retry_safety: "safe",
11767        identity_requirement: "none",
11768        resolver: None,
11769        cancellation: "per_call",
11770        side_effects: &[],
11771        recovery: "retry",
11772        collection_index_ref: "none",
11773    },
11774    CommandSemanticContract {
11775        command: Command::GetLifecyclePolicy,
11776        admissible_errors: &[
11777            ErrorCode::Aborted,
11778            ErrorCode::DeadlineExceeded,
11779            ErrorCode::InvalidRequest,
11780            ErrorCode::UnsupportedVersion,
11781            ErrorCode::Unauthenticated,
11782            ErrorCode::PermissionDenied,
11783            ErrorCode::NotFound,
11784            ErrorCode::LimitExceeded,
11785            ErrorCode::CapabilityUnavailable,
11786            ErrorCode::TemporarilyUnavailable,
11787            ErrorCode::Internal,
11788        ],
11789        limit_ids: &["request_bytes", "response_bytes"],
11790        effect_class: "read_only",
11791        risk_flags: &[],
11792        capability_family: "catalog",
11793        retry_safety: "safe",
11794        identity_requirement: "none",
11795        resolver: None,
11796        cancellation: "per_call",
11797        side_effects: &[],
11798        recovery: "retry",
11799        collection_index_ref: "none",
11800    },
11801    CommandSemanticContract {
11802        command: Command::PrepareCreateIndex,
11803        admissible_errors: &[
11804            ErrorCode::Aborted,
11805            ErrorCode::DeadlineExceeded,
11806            ErrorCode::InvalidRequest,
11807            ErrorCode::UnsupportedVersion,
11808            ErrorCode::Unauthenticated,
11809            ErrorCode::PermissionDenied,
11810            ErrorCode::NotFound,
11811            ErrorCode::LimitExceeded,
11812            ErrorCode::CapabilityUnavailable,
11813            ErrorCode::TemporarilyUnavailable,
11814            ErrorCode::Internal,
11815        ],
11816        limit_ids: &[
11817            "request_bytes",
11818            "response_bytes",
11819            "resource_initial_shards",
11820            "resource_target_shard_bytes",
11821            "resource_admission_weight",
11822            "resource_ram_bytes",
11823            "resource_nvme_bytes",
11824            "resource_refresh_millis",
11825            "resource_memtable_bytes",
11826            "resource_parallelism",
11827        ],
11828        effect_class: "prepare",
11829        risk_flags: &[],
11830        capability_family: "catalog",
11831        retry_safety: "safe",
11832        identity_requirement: "server_locator",
11833        resolver: None,
11834        cancellation: "per_call",
11835        side_effects: &["creates_bounded_preparation"],
11836        recovery: "retry",
11837        collection_index_ref: "request_name",
11838    },
11839    CommandSemanticContract {
11840        command: Command::PrepareDeleteIndex,
11841        admissible_errors: &[
11842            ErrorCode::Aborted,
11843            ErrorCode::DeadlineExceeded,
11844            ErrorCode::InvalidRequest,
11845            ErrorCode::UnsupportedVersion,
11846            ErrorCode::Unauthenticated,
11847            ErrorCode::PermissionDenied,
11848            ErrorCode::NotFound,
11849            ErrorCode::LimitExceeded,
11850            ErrorCode::CapabilityUnavailable,
11851            ErrorCode::TemporarilyUnavailable,
11852            ErrorCode::Internal,
11853        ],
11854        limit_ids: &["request_bytes", "response_bytes"],
11855        effect_class: "prepare",
11856        risk_flags: &["destructive"],
11857        capability_family: "catalog",
11858        retry_safety: "safe",
11859        identity_requirement: "server_locator",
11860        resolver: None,
11861        cancellation: "per_call",
11862        side_effects: &["creates_bounded_preparation"],
11863        recovery: "retry",
11864        collection_index_ref: "request_name",
11865    },
11866    CommandSemanticContract {
11867        command: Command::SubmitCatalogAction,
11868        admissible_errors: &[
11869            ErrorCode::Aborted,
11870            ErrorCode::DeadlineExceeded,
11871            ErrorCode::InvalidRequest,
11872            ErrorCode::UnsupportedVersion,
11873            ErrorCode::Unauthenticated,
11874            ErrorCode::PermissionDenied,
11875            ErrorCode::NotFound,
11876            ErrorCode::Conflict,
11877            ErrorCode::LimitExceeded,
11878            ErrorCode::CapabilityUnavailable,
11879            ErrorCode::NotSubmitted,
11880            ErrorCode::SubmittedIndeterminate,
11881            ErrorCode::ExpiredUnknown,
11882            ErrorCode::TemporarilyUnavailable,
11883            ErrorCode::Internal,
11884        ],
11885        limit_ids: &[
11886            "request_bytes",
11887            "response_bytes",
11888            "resource_initial_shards",
11889            "resource_target_shard_bytes",
11890            "resource_admission_weight",
11891            "resource_ram_bytes",
11892            "resource_nvme_bytes",
11893            "resource_refresh_millis",
11894            "resource_memtable_bytes",
11895            "resource_parallelism",
11896        ],
11897        effect_class: "durable_submit",
11898        risk_flags: &[],
11899        capability_family: "catalog",
11900        retry_safety: "pre_submit_only",
11901        identity_requirement: "request_locator",
11902        resolver: Some(Command::ResolveCatalogAction),
11903        cancellation: "per_call_until_submission_then_resolve",
11904        side_effects: &["commits_authoritative_state"],
11905        recovery: "resolve_with_resolve_catalog_action",
11906        collection_index_ref: "request_name",
11907    },
11908    CommandSemanticContract {
11909        command: Command::ResolveCatalogAction,
11910        admissible_errors: &[
11911            ErrorCode::Aborted,
11912            ErrorCode::DeadlineExceeded,
11913            ErrorCode::InvalidRequest,
11914            ErrorCode::UnsupportedVersion,
11915            ErrorCode::Unauthenticated,
11916            ErrorCode::PermissionDenied,
11917            ErrorCode::NotFound,
11918            ErrorCode::LimitExceeded,
11919            ErrorCode::CapabilityUnavailable,
11920            ErrorCode::TemporarilyUnavailable,
11921            ErrorCode::Internal,
11922        ],
11923        limit_ids: &["request_bytes", "response_bytes"],
11924        effect_class: "read_only",
11925        risk_flags: &[],
11926        capability_family: "catalog",
11927        retry_safety: "safe",
11928        identity_requirement: "request_locator",
11929        resolver: None,
11930        cancellation: "per_call",
11931        side_effects: &[],
11932        recovery: "retry",
11933        collection_index_ref: "caller",
11934    },
11935    CommandSemanticContract {
11936        command: Command::PrepareReplayableSourceIndex,
11937        admissible_errors: &[
11938            ErrorCode::Aborted,
11939            ErrorCode::DeadlineExceeded,
11940            ErrorCode::InvalidRequest,
11941            ErrorCode::UnsupportedVersion,
11942            ErrorCode::Unauthenticated,
11943            ErrorCode::PermissionDenied,
11944            ErrorCode::NotFound,
11945            ErrorCode::LimitExceeded,
11946            ErrorCode::CapabilityUnavailable,
11947            ErrorCode::RetentionGap,
11948            ErrorCode::TemporarilyUnavailable,
11949            ErrorCode::Internal,
11950        ],
11951        limit_ids: &[
11952            "request_bytes",
11953            "response_bytes",
11954            "resource_initial_shards",
11955            "resource_target_shard_bytes",
11956            "resource_admission_weight",
11957            "resource_ram_bytes",
11958            "resource_nvme_bytes",
11959            "resource_refresh_millis",
11960            "resource_memtable_bytes",
11961            "resource_parallelism",
11962        ],
11963        effect_class: "prepare",
11964        risk_flags: &[],
11965        capability_family: "catalog",
11966        retry_safety: "safe",
11967        identity_requirement: "server_locator",
11968        resolver: None,
11969        cancellation: "per_call",
11970        side_effects: &["creates_bounded_preparation"],
11971        recovery: "retry",
11972        collection_index_ref: "request_name",
11973    },
11974    CommandSemanticContract {
11975        command: Command::SubmitReplayableSourceIndex,
11976        admissible_errors: &[
11977            ErrorCode::Aborted,
11978            ErrorCode::DeadlineExceeded,
11979            ErrorCode::InvalidRequest,
11980            ErrorCode::UnsupportedVersion,
11981            ErrorCode::Unauthenticated,
11982            ErrorCode::PermissionDenied,
11983            ErrorCode::NotFound,
11984            ErrorCode::Conflict,
11985            ErrorCode::LimitExceeded,
11986            ErrorCode::CapabilityUnavailable,
11987            ErrorCode::NotSubmitted,
11988            ErrorCode::SubmittedIndeterminate,
11989            ErrorCode::ExpiredUnknown,
11990            ErrorCode::RetentionGap,
11991            ErrorCode::TemporarilyUnavailable,
11992            ErrorCode::Internal,
11993        ],
11994        limit_ids: &[
11995            "request_bytes",
11996            "response_bytes",
11997            "resource_initial_shards",
11998            "resource_target_shard_bytes",
11999            "resource_admission_weight",
12000            "resource_ram_bytes",
12001            "resource_nvme_bytes",
12002            "resource_refresh_millis",
12003            "resource_memtable_bytes",
12004            "resource_parallelism",
12005        ],
12006        effect_class: "durable_submit",
12007        risk_flags: &[],
12008        capability_family: "catalog",
12009        retry_safety: "pre_submit_only",
12010        identity_requirement: "request_locator",
12011        resolver: Some(Command::ResolveCatalogAction),
12012        cancellation: "per_call_until_submission_then_resolve",
12013        side_effects: &["commits_authoritative_state"],
12014        recovery: "resolve_with_resolve_catalog_action",
12015        collection_index_ref: "request_name",
12016    },
12017    CommandSemanticContract {
12018        command: Command::GetReplayableSource,
12019        admissible_errors: &[
12020            ErrorCode::Aborted,
12021            ErrorCode::DeadlineExceeded,
12022            ErrorCode::InvalidRequest,
12023            ErrorCode::UnsupportedVersion,
12024            ErrorCode::Unauthenticated,
12025            ErrorCode::PermissionDenied,
12026            ErrorCode::NotFound,
12027            ErrorCode::LimitExceeded,
12028            ErrorCode::CapabilityUnavailable,
12029            ErrorCode::RetentionGap,
12030            ErrorCode::TemporarilyUnavailable,
12031            ErrorCode::Internal,
12032        ],
12033        limit_ids: &["request_bytes", "response_bytes"],
12034        effect_class: "read_only",
12035        risk_flags: &[],
12036        capability_family: "catalog",
12037        retry_safety: "safe",
12038        identity_requirement: "none",
12039        resolver: None,
12040        cancellation: "per_call",
12041        side_effects: &[],
12042        recovery: "retry",
12043        collection_index_ref: "none",
12044    },
12045    CommandSemanticContract {
12046        command: Command::ControlReplayableSource,
12047        admissible_errors: &[
12048            ErrorCode::Aborted,
12049            ErrorCode::DeadlineExceeded,
12050            ErrorCode::InvalidRequest,
12051            ErrorCode::UnsupportedVersion,
12052            ErrorCode::Unauthenticated,
12053            ErrorCode::PermissionDenied,
12054            ErrorCode::NotFound,
12055            ErrorCode::Conflict,
12056            ErrorCode::LimitExceeded,
12057            ErrorCode::CapabilityUnavailable,
12058            ErrorCode::NotSubmitted,
12059            ErrorCode::SubmittedIndeterminate,
12060            ErrorCode::ExpiredUnknown,
12061            ErrorCode::RetentionGap,
12062            ErrorCode::TemporarilyUnavailable,
12063            ErrorCode::Internal,
12064        ],
12065        limit_ids: &["request_bytes", "response_bytes"],
12066        effect_class: "durable_submit",
12067        risk_flags: &[],
12068        capability_family: "catalog",
12069        retry_safety: "pre_submit_only",
12070        identity_requirement: "none",
12071        resolver: None,
12072        cancellation: "per_call_until_submission_then_resolve",
12073        side_effects: &["commits_authoritative_state"],
12074        recovery: "retry_if_not_submitted",
12075        collection_index_ref: "request_index",
12076    },
12077    CommandSemanticContract {
12078        command: Command::CloneIndex,
12079        admissible_errors: &[
12080            ErrorCode::Aborted,
12081            ErrorCode::DeadlineExceeded,
12082            ErrorCode::InvalidRequest,
12083            ErrorCode::UnsupportedVersion,
12084            ErrorCode::Unauthenticated,
12085            ErrorCode::PermissionDenied,
12086            ErrorCode::NotFound,
12087            ErrorCode::Conflict,
12088            ErrorCode::LimitExceeded,
12089            ErrorCode::CapabilityUnavailable,
12090            ErrorCode::NotSubmitted,
12091            ErrorCode::SubmittedIndeterminate,
12092            ErrorCode::ExpiredUnknown,
12093            ErrorCode::TemporarilyUnavailable,
12094            ErrorCode::Internal,
12095        ],
12096        limit_ids: &["request_bytes", "response_bytes"],
12097        effect_class: "durable_submit",
12098        risk_flags: &[],
12099        capability_family: "catalog",
12100        retry_safety: "pre_submit_only",
12101        identity_requirement: "caller_action_id",
12102        resolver: Some(Command::CloneIndex),
12103        cancellation: "per_call_until_submission_then_resolve",
12104        side_effects: &["commits_authoritative_state"],
12105        recovery: "resolve_with_clone_index",
12106        collection_index_ref: "caller",
12107    },
12108    CommandSemanticContract {
12109        command: Command::ConfigureHistory,
12110        admissible_errors: &[
12111            ErrorCode::Aborted,
12112            ErrorCode::DeadlineExceeded,
12113            ErrorCode::InvalidRequest,
12114            ErrorCode::UnsupportedVersion,
12115            ErrorCode::Unauthenticated,
12116            ErrorCode::PermissionDenied,
12117            ErrorCode::NotFound,
12118            ErrorCode::Conflict,
12119            ErrorCode::LimitExceeded,
12120            ErrorCode::CapabilityUnavailable,
12121            ErrorCode::NotSubmitted,
12122            ErrorCode::SubmittedIndeterminate,
12123            ErrorCode::ExpiredUnknown,
12124            ErrorCode::TemporarilyUnavailable,
12125            ErrorCode::Internal,
12126        ],
12127        limit_ids: &["request_bytes", "response_bytes"],
12128        effect_class: "durable_submit",
12129        risk_flags: &[],
12130        capability_family: "catalog",
12131        retry_safety: "pre_submit_only",
12132        identity_requirement: "none",
12133        resolver: Some(Command::GetHistory),
12134        cancellation: "per_call_until_submission_then_resolve",
12135        side_effects: &["commits_authoritative_state"],
12136        recovery: "resolve_with_get_history",
12137        collection_index_ref: "request_index",
12138    },
12139    CommandSemanticContract {
12140        command: Command::GetHistory,
12141        admissible_errors: &[
12142            ErrorCode::Aborted,
12143            ErrorCode::DeadlineExceeded,
12144            ErrorCode::InvalidRequest,
12145            ErrorCode::UnsupportedVersion,
12146            ErrorCode::Unauthenticated,
12147            ErrorCode::PermissionDenied,
12148            ErrorCode::NotFound,
12149            ErrorCode::LimitExceeded,
12150            ErrorCode::CapabilityUnavailable,
12151            ErrorCode::TemporarilyUnavailable,
12152            ErrorCode::Internal,
12153        ],
12154        limit_ids: &["request_bytes", "response_bytes"],
12155        effect_class: "read_only",
12156        risk_flags: &[],
12157        capability_family: "catalog",
12158        retry_safety: "safe",
12159        identity_requirement: "none",
12160        resolver: None,
12161        cancellation: "per_call",
12162        side_effects: &[],
12163        recovery: "retry",
12164        collection_index_ref: "none",
12165    },
12166    CommandSemanticContract {
12167        command: Command::ResolveHistory,
12168        admissible_errors: &[
12169            ErrorCode::Aborted,
12170            ErrorCode::DeadlineExceeded,
12171            ErrorCode::InvalidRequest,
12172            ErrorCode::UnsupportedVersion,
12173            ErrorCode::Unauthenticated,
12174            ErrorCode::PermissionDenied,
12175            ErrorCode::NotFound,
12176            ErrorCode::LimitExceeded,
12177            ErrorCode::CapabilityUnavailable,
12178            ErrorCode::RetentionGap,
12179            ErrorCode::TemporarilyUnavailable,
12180            ErrorCode::Internal,
12181        ],
12182        limit_ids: &["request_bytes", "response_bytes"],
12183        effect_class: "read_only",
12184        risk_flags: &[],
12185        capability_family: "data",
12186        retry_safety: "safe",
12187        identity_requirement: "none",
12188        resolver: None,
12189        cancellation: "per_call",
12190        side_effects: &[],
12191        recovery: "retry",
12192        collection_index_ref: "request_index",
12193    },
12194    CommandSemanticContract {
12195        command: Command::PlaceHistoryHold,
12196        admissible_errors: &[
12197            ErrorCode::Aborted,
12198            ErrorCode::DeadlineExceeded,
12199            ErrorCode::InvalidRequest,
12200            ErrorCode::UnsupportedVersion,
12201            ErrorCode::Unauthenticated,
12202            ErrorCode::PermissionDenied,
12203            ErrorCode::NotFound,
12204            ErrorCode::Conflict,
12205            ErrorCode::LimitExceeded,
12206            ErrorCode::CapabilityUnavailable,
12207            ErrorCode::NotSubmitted,
12208            ErrorCode::SubmittedIndeterminate,
12209            ErrorCode::ExpiredUnknown,
12210            ErrorCode::TemporarilyUnavailable,
12211            ErrorCode::Internal,
12212        ],
12213        limit_ids: &["request_bytes", "response_bytes"],
12214        effect_class: "durable_submit",
12215        risk_flags: &[],
12216        capability_family: "catalog",
12217        retry_safety: "pre_submit_only",
12218        identity_requirement: "none",
12219        resolver: Some(Command::GetHistory),
12220        cancellation: "per_call_until_submission_then_resolve",
12221        side_effects: &["commits_authoritative_state"],
12222        recovery: "resolve_with_get_history",
12223        collection_index_ref: "request_index",
12224    },
12225    CommandSemanticContract {
12226        command: Command::ReleaseHistoryHold,
12227        admissible_errors: &[
12228            ErrorCode::Aborted,
12229            ErrorCode::DeadlineExceeded,
12230            ErrorCode::InvalidRequest,
12231            ErrorCode::UnsupportedVersion,
12232            ErrorCode::Unauthenticated,
12233            ErrorCode::PermissionDenied,
12234            ErrorCode::NotFound,
12235            ErrorCode::Conflict,
12236            ErrorCode::LimitExceeded,
12237            ErrorCode::CapabilityUnavailable,
12238            ErrorCode::NotSubmitted,
12239            ErrorCode::SubmittedIndeterminate,
12240            ErrorCode::ExpiredUnknown,
12241            ErrorCode::TemporarilyUnavailable,
12242            ErrorCode::Internal,
12243        ],
12244        limit_ids: &["request_bytes", "response_bytes"],
12245        effect_class: "durable_submit",
12246        risk_flags: &[],
12247        capability_family: "catalog",
12248        retry_safety: "pre_submit_only",
12249        identity_requirement: "none",
12250        resolver: Some(Command::GetHistory),
12251        cancellation: "per_call_until_submission_then_resolve",
12252        side_effects: &["commits_authoritative_state"],
12253        recovery: "resolve_with_get_history",
12254        collection_index_ref: "request_index",
12255    },
12256    CommandSemanticContract {
12257        command: Command::PrepareDocumentMutation,
12258        admissible_errors: &[
12259            ErrorCode::Aborted,
12260            ErrorCode::DeadlineExceeded,
12261            ErrorCode::InvalidRequest,
12262            ErrorCode::UnsupportedVersion,
12263            ErrorCode::Unauthenticated,
12264            ErrorCode::PermissionDenied,
12265            ErrorCode::NotFound,
12266            ErrorCode::LimitExceeded,
12267            ErrorCode::CapabilityUnavailable,
12268            ErrorCode::TemporarilyUnavailable,
12269            ErrorCode::Internal,
12270        ],
12271        limit_ids: &["request_bytes", "response_bytes"],
12272        effect_class: "prepare",
12273        risk_flags: &[],
12274        capability_family: "data",
12275        retry_safety: "safe",
12276        identity_requirement: "server_locator",
12277        resolver: None,
12278        cancellation: "per_call",
12279        side_effects: &["creates_bounded_preparation"],
12280        recovery: "retry",
12281        collection_index_ref: "request_index",
12282    },
12283    CommandSemanticContract {
12284        command: Command::SubmitDocumentMutation,
12285        admissible_errors: &[
12286            ErrorCode::Aborted,
12287            ErrorCode::DeadlineExceeded,
12288            ErrorCode::InvalidRequest,
12289            ErrorCode::UnsupportedVersion,
12290            ErrorCode::Unauthenticated,
12291            ErrorCode::PermissionDenied,
12292            ErrorCode::NotFound,
12293            ErrorCode::Conflict,
12294            ErrorCode::LimitExceeded,
12295            ErrorCode::CapabilityUnavailable,
12296            ErrorCode::NotSubmitted,
12297            ErrorCode::SubmittedIndeterminate,
12298            ErrorCode::ExpiredUnknown,
12299            ErrorCode::TemporarilyUnavailable,
12300            ErrorCode::Internal,
12301        ],
12302        limit_ids: &["request_bytes", "response_bytes"],
12303        effect_class: "durable_submit",
12304        risk_flags: &[],
12305        capability_family: "data",
12306        retry_safety: "pre_submit_only",
12307        identity_requirement: "request_locator",
12308        resolver: Some(Command::ResolveDocumentMutation),
12309        cancellation: "per_call_until_submission_then_resolve",
12310        side_effects: &["commits_authoritative_state"],
12311        recovery: "resolve_with_resolve_document_mutation",
12312        collection_index_ref: "request_index",
12313    },
12314    CommandSemanticContract {
12315        command: Command::PrepareDocumentBulk,
12316        admissible_errors: &[
12317            ErrorCode::Aborted,
12318            ErrorCode::DeadlineExceeded,
12319            ErrorCode::InvalidRequest,
12320            ErrorCode::UnsupportedVersion,
12321            ErrorCode::Unauthenticated,
12322            ErrorCode::PermissionDenied,
12323            ErrorCode::NotFound,
12324            ErrorCode::LimitExceeded,
12325            ErrorCode::CapabilityUnavailable,
12326            ErrorCode::TemporarilyUnavailable,
12327            ErrorCode::Internal,
12328        ],
12329        limit_ids: &[
12330            "request_bytes",
12331            "response_bytes",
12332            "bulk_document_items",
12333            "bulk_document_bytes",
12334        ],
12335        effect_class: "prepare",
12336        risk_flags: &[],
12337        capability_family: "data",
12338        retry_safety: "safe",
12339        identity_requirement: "caller_action_id",
12340        resolver: None,
12341        cancellation: "per_call",
12342        side_effects: &["creates_bounded_preparation"],
12343        recovery: "retry",
12344        collection_index_ref: "request_index",
12345    },
12346    CommandSemanticContract {
12347        command: Command::SubmitDocumentBulk,
12348        admissible_errors: &[
12349            ErrorCode::Aborted,
12350            ErrorCode::DeadlineExceeded,
12351            ErrorCode::InvalidRequest,
12352            ErrorCode::UnsupportedVersion,
12353            ErrorCode::Unauthenticated,
12354            ErrorCode::PermissionDenied,
12355            ErrorCode::NotFound,
12356            ErrorCode::Conflict,
12357            ErrorCode::LimitExceeded,
12358            ErrorCode::CapabilityUnavailable,
12359            ErrorCode::NotSubmitted,
12360            ErrorCode::SubmittedIndeterminate,
12361            ErrorCode::ExpiredUnknown,
12362            ErrorCode::TemporarilyUnavailable,
12363            ErrorCode::Internal,
12364        ],
12365        limit_ids: &[
12366            "request_bytes",
12367            "response_bytes",
12368            "bulk_document_items",
12369            "bulk_document_bytes",
12370        ],
12371        effect_class: "durable_submit",
12372        risk_flags: &[],
12373        capability_family: "data",
12374        retry_safety: "pre_submit_only",
12375        identity_requirement: "caller_action_id",
12376        resolver: Some(Command::ResolveDocumentBulk),
12377        cancellation: "per_call_until_submission_then_resolve",
12378        side_effects: &["commits_authoritative_state"],
12379        recovery: "resolve_with_resolve_document_bulk",
12380        collection_index_ref: "request_index",
12381    },
12382    CommandSemanticContract {
12383        command: Command::ResolveDocumentBulk,
12384        admissible_errors: &[
12385            ErrorCode::Aborted,
12386            ErrorCode::DeadlineExceeded,
12387            ErrorCode::InvalidRequest,
12388            ErrorCode::UnsupportedVersion,
12389            ErrorCode::Unauthenticated,
12390            ErrorCode::PermissionDenied,
12391            ErrorCode::NotFound,
12392            ErrorCode::LimitExceeded,
12393            ErrorCode::CapabilityUnavailable,
12394            ErrorCode::TemporarilyUnavailable,
12395            ErrorCode::Internal,
12396        ],
12397        limit_ids: &[
12398            "request_bytes",
12399            "response_bytes",
12400            "bulk_document_items",
12401            "bulk_document_bytes",
12402        ],
12403        effect_class: "read_only",
12404        risk_flags: &[],
12405        capability_family: "data",
12406        retry_safety: "safe",
12407        identity_requirement: "caller_action_id",
12408        resolver: None,
12409        cancellation: "per_call",
12410        side_effects: &[],
12411        recovery: "retry",
12412        collection_index_ref: "request_index",
12413    },
12414    CommandSemanticContract {
12415        command: Command::PrepareAppendBulk,
12416        admissible_errors: &[
12417            ErrorCode::Aborted,
12418            ErrorCode::DeadlineExceeded,
12419            ErrorCode::InvalidRequest,
12420            ErrorCode::UnsupportedVersion,
12421            ErrorCode::Unauthenticated,
12422            ErrorCode::PermissionDenied,
12423            ErrorCode::NotFound,
12424            ErrorCode::LimitExceeded,
12425            ErrorCode::CapabilityUnavailable,
12426            ErrorCode::TemporarilyUnavailable,
12427            ErrorCode::Internal,
12428        ],
12429        limit_ids: &[
12430            "request_bytes",
12431            "response_bytes",
12432            "bulk_document_items",
12433            "bulk_document_bytes",
12434        ],
12435        effect_class: "prepare",
12436        risk_flags: &[],
12437        capability_family: "data",
12438        retry_safety: "safe",
12439        identity_requirement: "caller_action_id",
12440        resolver: None,
12441        cancellation: "per_call",
12442        side_effects: &[],
12443        recovery: "retry",
12444        collection_index_ref: "request_index",
12445    },
12446    CommandSemanticContract {
12447        command: Command::SubmitAppendBulk,
12448        admissible_errors: &[
12449            ErrorCode::Aborted,
12450            ErrorCode::DeadlineExceeded,
12451            ErrorCode::InvalidRequest,
12452            ErrorCode::UnsupportedVersion,
12453            ErrorCode::Unauthenticated,
12454            ErrorCode::PermissionDenied,
12455            ErrorCode::NotFound,
12456            ErrorCode::Conflict,
12457            ErrorCode::LimitExceeded,
12458            ErrorCode::CapabilityUnavailable,
12459            ErrorCode::NotSubmitted,
12460            ErrorCode::SubmittedIndeterminate,
12461            ErrorCode::TemporarilyUnavailable,
12462            ErrorCode::Internal,
12463        ],
12464        limit_ids: &[
12465            "request_bytes",
12466            "response_bytes",
12467            "bulk_document_items",
12468            "bulk_document_bytes",
12469        ],
12470        effect_class: "durable_submit",
12471        risk_flags: &[],
12472        capability_family: "data",
12473        retry_safety: "pre_submit_only",
12474        identity_requirement: "request_locator",
12475        resolver: Some(Command::ResolveAppendBulk),
12476        cancellation: "per_call_until_submission_then_resolve",
12477        side_effects: &["commits_authoritative_state"],
12478        recovery: "resolve_with_resolve_append_bulk",
12479        collection_index_ref: "request_index",
12480    },
12481    CommandSemanticContract {
12482        command: Command::ResolveAppendBulk,
12483        admissible_errors: &[
12484            ErrorCode::Aborted,
12485            ErrorCode::DeadlineExceeded,
12486            ErrorCode::InvalidRequest,
12487            ErrorCode::UnsupportedVersion,
12488            ErrorCode::Unauthenticated,
12489            ErrorCode::PermissionDenied,
12490            ErrorCode::NotFound,
12491            ErrorCode::Conflict,
12492            ErrorCode::LimitExceeded,
12493            ErrorCode::CapabilityUnavailable,
12494            ErrorCode::TemporarilyUnavailable,
12495            ErrorCode::Internal,
12496        ],
12497        limit_ids: &[
12498            "request_bytes",
12499            "response_bytes",
12500            "bulk_document_items",
12501            "bulk_document_bytes",
12502        ],
12503        effect_class: "read_only",
12504        risk_flags: &[],
12505        capability_family: "data",
12506        retry_safety: "safe",
12507        identity_requirement: "request_locator",
12508        resolver: None,
12509        cancellation: "per_call",
12510        side_effects: &[],
12511        recovery: "retry",
12512        collection_index_ref: "request_index",
12513    },
12514    CommandSemanticContract {
12515        command: Command::ObserveAppendCommitted,
12516        admissible_errors: &[
12517            ErrorCode::Aborted,
12518            ErrorCode::DeadlineExceeded,
12519            ErrorCode::InvalidRequest,
12520            ErrorCode::UnsupportedVersion,
12521            ErrorCode::Unauthenticated,
12522            ErrorCode::PermissionDenied,
12523            ErrorCode::NotFound,
12524            ErrorCode::Conflict,
12525            ErrorCode::LimitExceeded,
12526            ErrorCode::CapabilityUnavailable,
12527            ErrorCode::TemporarilyUnavailable,
12528            ErrorCode::Internal,
12529        ],
12530        limit_ids: &["request_bytes", "response_bytes"],
12531        effect_class: "read_only",
12532        risk_flags: &[],
12533        capability_family: "data",
12534        retry_safety: "safe",
12535        identity_requirement: "request_locator",
12536        resolver: None,
12537        cancellation: "per_call",
12538        side_effects: &[],
12539        recovery: "retry",
12540        collection_index_ref: "request_index",
12541    },
12542    CommandSemanticContract {
12543        command: Command::ResolveDocumentMutation,
12544        admissible_errors: &[
12545            ErrorCode::Aborted,
12546            ErrorCode::DeadlineExceeded,
12547            ErrorCode::InvalidRequest,
12548            ErrorCode::UnsupportedVersion,
12549            ErrorCode::Unauthenticated,
12550            ErrorCode::PermissionDenied,
12551            ErrorCode::NotFound,
12552            ErrorCode::LimitExceeded,
12553            ErrorCode::CapabilityUnavailable,
12554            ErrorCode::TemporarilyUnavailable,
12555            ErrorCode::Internal,
12556        ],
12557        limit_ids: &["request_bytes", "response_bytes"],
12558        effect_class: "read_only",
12559        risk_flags: &[],
12560        capability_family: "data",
12561        retry_safety: "safe",
12562        identity_requirement: "request_locator",
12563        resolver: None,
12564        cancellation: "per_call",
12565        side_effects: &[],
12566        recovery: "retry",
12567        collection_index_ref: "caller",
12568    },
12569    CommandSemanticContract {
12570        command: Command::GetDocument,
12571        admissible_errors: &[
12572            ErrorCode::Aborted,
12573            ErrorCode::DeadlineExceeded,
12574            ErrorCode::InvalidRequest,
12575            ErrorCode::UnsupportedVersion,
12576            ErrorCode::Unauthenticated,
12577            ErrorCode::PermissionDenied,
12578            ErrorCode::NotFound,
12579            ErrorCode::LimitExceeded,
12580            ErrorCode::CapabilityUnavailable,
12581            ErrorCode::TemporarilyUnavailable,
12582            ErrorCode::Internal,
12583        ],
12584        limit_ids: &["request_bytes", "response_bytes"],
12585        effect_class: "read_only",
12586        risk_flags: &[],
12587        capability_family: "data",
12588        retry_safety: "safe",
12589        identity_requirement: "none",
12590        resolver: None,
12591        cancellation: "per_call",
12592        side_effects: &[],
12593        recovery: "retry",
12594        collection_index_ref: "request_index",
12595    },
12596    CommandSemanticContract {
12597        command: Command::Search,
12598        admissible_errors: &[
12599            ErrorCode::Aborted,
12600            ErrorCode::DeadlineExceeded,
12601            ErrorCode::InvalidRequest,
12602            ErrorCode::UnsupportedVersion,
12603            ErrorCode::Unauthenticated,
12604            ErrorCode::PermissionDenied,
12605            ErrorCode::NotFound,
12606            ErrorCode::StaleCursor,
12607            ErrorCode::RestartBudgetExhausted,
12608            ErrorCode::LimitExceeded,
12609            ErrorCode::CapabilityUnavailable,
12610            ErrorCode::TemporarilyUnavailable,
12611            ErrorCode::Internal,
12612        ],
12613        limit_ids: &[
12614            "request_bytes",
12615            "response_bytes",
12616            "page_size",
12617            "query_clauses",
12618            "aggregation_nodes",
12619            "aggregation_buckets",
12620            "routing_values",
12621            "routing_value_bytes",
12622            "query_recursion_depth",
12623            "text_query_bytes",
12624            "text_query_fields",
12625            "text_query_slop",
12626            "text_query_boost",
12627            "text_query_fuzzy_expansions",
12628            "text_query_fuzzy_distance",
12629            "text_query_dictionary_scan_terms",
12630            "text_query_dictionary_scan_bytes",
12631            "text_query_fuzzy_work_units",
12632            "vector_dimensions",
12633            "vector_query_bytes",
12634            "vector_request_bytes",
12635            "vector_candidates",
12636            "vector_set_query_vectors",
12637            "vector_set_query_bytes",
12638            "retrieval_branches",
12639            "retrieval_branch_name_bytes",
12640            "retrieval_window",
12641            "fragment_fields",
12642            "fragments_per_field",
12643            "fragment_bytes",
12644            "fragment_total_bytes",
12645            "result_feature_hits",
12646            "result_features",
12647            "diversification_fields",
12648            "diversification_per_group",
12649            "search_result_window",
12650        ],
12651        effect_class: "read_only",
12652        risk_flags: &[],
12653        capability_family: "data",
12654        retry_safety: "safe",
12655        identity_requirement: "none",
12656        resolver: None,
12657        cancellation: "per_call",
12658        side_effects: &[],
12659        recovery: "retry",
12660        collection_index_ref: "request_indexes_or_pit_authority",
12661    },
12662    CommandSemanticContract {
12663        command: Command::TraverseRelationships,
12664        admissible_errors: &[
12665            ErrorCode::Aborted,
12666            ErrorCode::DeadlineExceeded,
12667            ErrorCode::InvalidRequest,
12668            ErrorCode::UnsupportedVersion,
12669            ErrorCode::Unauthenticated,
12670            ErrorCode::PermissionDenied,
12671            ErrorCode::NotFound,
12672            ErrorCode::LimitExceeded,
12673            ErrorCode::CapabilityUnavailable,
12674            ErrorCode::TemporarilyUnavailable,
12675            ErrorCode::Internal,
12676        ],
12677        limit_ids: &[
12678            "request_bytes",
12679            "response_bytes",
12680            "relationship_indexes",
12681            "relationship_seeds",
12682            "relationship_filter_values",
12683            "relationship_depth",
12684            "relationship_fan_out",
12685            "relationship_visited_entities",
12686            "relationship_visited_records",
12687            "relationship_returned_records",
12688            "relationship_memory_bytes",
12689            "search_result_window",
12690        ],
12691        effect_class: "read_only",
12692        risk_flags: &[],
12693        capability_family: "data",
12694        retry_safety: "safe",
12695        identity_requirement: "none",
12696        resolver: None,
12697        cancellation: "per_call",
12698        side_effects: &[],
12699        recovery: "retry",
12700        collection_index_ref: "pit_authority",
12701    },
12702    CommandSemanticContract {
12703        command: Command::QueryProfiles,
12704        admissible_errors: &[
12705            ErrorCode::Aborted,
12706            ErrorCode::DeadlineExceeded,
12707            ErrorCode::InvalidRequest,
12708            ErrorCode::UnsupportedVersion,
12709            ErrorCode::Unauthenticated,
12710            ErrorCode::PermissionDenied,
12711            ErrorCode::NotFound,
12712            ErrorCode::LimitExceeded,
12713            ErrorCode::CapabilityUnavailable,
12714            ErrorCode::TemporarilyUnavailable,
12715            ErrorCode::Internal,
12716        ],
12717        limit_ids: &[
12718            "request_bytes",
12719            "response_bytes",
12720            "profile_indexes",
12721            "profile_filter_values",
12722            "profile_batches",
12723            "profile_samples",
12724            "profile_results",
12725            "profile_memory_bytes",
12726            "search_result_window",
12727        ],
12728        effect_class: "read_only",
12729        risk_flags: &[],
12730        capability_family: "data",
12731        retry_safety: "safe",
12732        identity_requirement: "none",
12733        resolver: None,
12734        cancellation: "per_call",
12735        side_effects: &[],
12736        recovery: "retry",
12737        collection_index_ref: "pit_authority",
12738    },
12739    CommandSemanticContract {
12740        command: Command::EvaluateTemporalEvidence,
12741        admissible_errors: &[
12742            ErrorCode::Aborted,
12743            ErrorCode::DeadlineExceeded,
12744            ErrorCode::InvalidRequest,
12745            ErrorCode::UnsupportedVersion,
12746            ErrorCode::Unauthenticated,
12747            ErrorCode::PermissionDenied,
12748            ErrorCode::NotFound,
12749            ErrorCode::LimitExceeded,
12750            ErrorCode::CapabilityUnavailable,
12751            ErrorCode::TemporarilyUnavailable,
12752            ErrorCode::Internal,
12753        ],
12754        limit_ids: &[
12755            "request_bytes",
12756            "response_bytes",
12757            "query_clauses",
12758            "query_recursion_depth",
12759            "search_result_window",
12760            "temporal_inputs",
12761            "temporal_pattern_nodes",
12762            "temporal_pattern_depth",
12763            "temporal_pattern_branches",
12764            "temporal_correlation_keys",
12765            "temporal_events",
12766            "temporal_states",
12767            "temporal_captured_events",
12768            "temporal_results",
12769            "temporal_state_bytes",
12770            "temporal_interval_nanos",
12771        ],
12772        effect_class: "read_only",
12773        risk_flags: &[],
12774        capability_family: "data",
12775        retry_safety: "safe",
12776        identity_requirement: "none",
12777        resolver: None,
12778        cancellation: "per_call",
12779        side_effects: &[],
12780        recovery: "retry",
12781        collection_index_ref: "pit_authority",
12782    },
12783    CommandSemanticContract {
12784        command: Command::CreateContinuousTemporalEvaluation,
12785        admissible_errors: &[
12786            ErrorCode::Aborted,
12787            ErrorCode::DeadlineExceeded,
12788            ErrorCode::InvalidRequest,
12789            ErrorCode::UnsupportedVersion,
12790            ErrorCode::Unauthenticated,
12791            ErrorCode::PermissionDenied,
12792            ErrorCode::NotFound,
12793            ErrorCode::Conflict,
12794            ErrorCode::LimitExceeded,
12795            ErrorCode::CapabilityUnavailable,
12796            ErrorCode::NotSubmitted,
12797            ErrorCode::SubmittedIndeterminate,
12798            ErrorCode::TemporarilyUnavailable,
12799            ErrorCode::Internal,
12800        ],
12801        limit_ids: &[
12802            "request_bytes",
12803            "response_bytes",
12804            "temporal_inputs",
12805            "temporal_pattern_nodes",
12806            "temporal_pattern_depth",
12807            "temporal_pattern_branches",
12808            "temporal_correlation_keys",
12809            "temporal_events",
12810            "temporal_states",
12811            "temporal_captured_events",
12812            "temporal_results",
12813            "temporal_state_bytes",
12814            "temporal_interval_nanos",
12815        ],
12816        effect_class: "durable_submit",
12817        risk_flags: &[],
12818        capability_family: "lifecycle",
12819        retry_safety: "pre_submit_only",
12820        identity_requirement: "caller_action_id",
12821        resolver: Some(Command::GetContinuousTemporalEvaluation),
12822        cancellation: "per_call_until_submission_then_resolve",
12823        side_effects: &["commits_authoritative_state"],
12824        recovery: "resolve_with_get_continuous_temporal_evaluation",
12825        collection_index_ref: "request_temporal_inputs",
12826    },
12827    CommandSemanticContract {
12828        command: Command::GetContinuousTemporalEvaluation,
12829        admissible_errors: &[
12830            ErrorCode::Aborted,
12831            ErrorCode::DeadlineExceeded,
12832            ErrorCode::InvalidRequest,
12833            ErrorCode::UnsupportedVersion,
12834            ErrorCode::Unauthenticated,
12835            ErrorCode::PermissionDenied,
12836            ErrorCode::NotFound,
12837            ErrorCode::LimitExceeded,
12838            ErrorCode::CapabilityUnavailable,
12839            ErrorCode::TemporarilyUnavailable,
12840            ErrorCode::Internal,
12841        ],
12842        limit_ids: &["request_bytes", "response_bytes"],
12843        effect_class: "read_only",
12844        risk_flags: &[],
12845        capability_family: "lifecycle",
12846        retry_safety: "safe",
12847        identity_requirement: "none",
12848        resolver: None,
12849        cancellation: "per_call",
12850        side_effects: &[],
12851        recovery: "retry",
12852        collection_index_ref: "request_evaluation",
12853    },
12854    CommandSemanticContract {
12855        command: Command::PauseContinuousTemporalEvaluation,
12856        admissible_errors: &[
12857            ErrorCode::Aborted,
12858            ErrorCode::DeadlineExceeded,
12859            ErrorCode::InvalidRequest,
12860            ErrorCode::UnsupportedVersion,
12861            ErrorCode::Unauthenticated,
12862            ErrorCode::PermissionDenied,
12863            ErrorCode::NotFound,
12864            ErrorCode::Conflict,
12865            ErrorCode::LimitExceeded,
12866            ErrorCode::CapabilityUnavailable,
12867            ErrorCode::NotSubmitted,
12868            ErrorCode::SubmittedIndeterminate,
12869            ErrorCode::TemporarilyUnavailable,
12870            ErrorCode::Internal,
12871        ],
12872        limit_ids: &["request_bytes", "response_bytes"],
12873        effect_class: "durable_submit",
12874        risk_flags: &[],
12875        capability_family: "lifecycle",
12876        retry_safety: "pre_submit_only",
12877        identity_requirement: "caller_action_id",
12878        resolver: Some(Command::GetContinuousTemporalEvaluation),
12879        cancellation: "per_call_until_submission_then_resolve",
12880        side_effects: &["commits_authoritative_state"],
12881        recovery: "resolve_with_get_continuous_temporal_evaluation",
12882        collection_index_ref: "request_evaluation",
12883    },
12884    CommandSemanticContract {
12885        command: Command::ResumeContinuousTemporalEvaluation,
12886        admissible_errors: &[
12887            ErrorCode::Aborted,
12888            ErrorCode::DeadlineExceeded,
12889            ErrorCode::InvalidRequest,
12890            ErrorCode::UnsupportedVersion,
12891            ErrorCode::Unauthenticated,
12892            ErrorCode::PermissionDenied,
12893            ErrorCode::NotFound,
12894            ErrorCode::Conflict,
12895            ErrorCode::LimitExceeded,
12896            ErrorCode::CapabilityUnavailable,
12897            ErrorCode::NotSubmitted,
12898            ErrorCode::SubmittedIndeterminate,
12899            ErrorCode::TemporarilyUnavailable,
12900            ErrorCode::Internal,
12901        ],
12902        limit_ids: &["request_bytes", "response_bytes"],
12903        effect_class: "durable_submit",
12904        risk_flags: &[],
12905        capability_family: "lifecycle",
12906        retry_safety: "pre_submit_only",
12907        identity_requirement: "caller_action_id",
12908        resolver: Some(Command::GetContinuousTemporalEvaluation),
12909        cancellation: "per_call_until_submission_then_resolve",
12910        side_effects: &["commits_authoritative_state"],
12911        recovery: "resolve_with_get_continuous_temporal_evaluation",
12912        collection_index_ref: "request_evaluation",
12913    },
12914    CommandSemanticContract {
12915        command: Command::ReplaceContinuousTemporalEvaluation,
12916        admissible_errors: &[
12917            ErrorCode::Aborted,
12918            ErrorCode::DeadlineExceeded,
12919            ErrorCode::InvalidRequest,
12920            ErrorCode::UnsupportedVersion,
12921            ErrorCode::Unauthenticated,
12922            ErrorCode::PermissionDenied,
12923            ErrorCode::NotFound,
12924            ErrorCode::Conflict,
12925            ErrorCode::LimitExceeded,
12926            ErrorCode::CapabilityUnavailable,
12927            ErrorCode::NotSubmitted,
12928            ErrorCode::SubmittedIndeterminate,
12929            ErrorCode::TemporarilyUnavailable,
12930            ErrorCode::Internal,
12931        ],
12932        limit_ids: &[
12933            "request_bytes",
12934            "response_bytes",
12935            "temporal_inputs",
12936            "temporal_pattern_nodes",
12937            "temporal_pattern_depth",
12938            "temporal_pattern_branches",
12939            "temporal_correlation_keys",
12940            "temporal_events",
12941            "temporal_states",
12942            "temporal_captured_events",
12943            "temporal_results",
12944            "temporal_state_bytes",
12945            "temporal_interval_nanos",
12946        ],
12947        effect_class: "durable_submit",
12948        risk_flags: &[],
12949        capability_family: "lifecycle",
12950        retry_safety: "pre_submit_only",
12951        identity_requirement: "caller_action_id",
12952        resolver: Some(Command::GetContinuousTemporalEvaluation),
12953        cancellation: "per_call_until_submission_then_resolve",
12954        side_effects: &["commits_authoritative_state"],
12955        recovery: "resolve_with_get_continuous_temporal_evaluation",
12956        collection_index_ref: "request_temporal_inputs",
12957    },
12958    CommandSemanticContract {
12959        command: Command::RetireContinuousTemporalEvaluation,
12960        admissible_errors: &[
12961            ErrorCode::Aborted,
12962            ErrorCode::DeadlineExceeded,
12963            ErrorCode::InvalidRequest,
12964            ErrorCode::UnsupportedVersion,
12965            ErrorCode::Unauthenticated,
12966            ErrorCode::PermissionDenied,
12967            ErrorCode::NotFound,
12968            ErrorCode::Conflict,
12969            ErrorCode::LimitExceeded,
12970            ErrorCode::CapabilityUnavailable,
12971            ErrorCode::NotSubmitted,
12972            ErrorCode::SubmittedIndeterminate,
12973            ErrorCode::TemporarilyUnavailable,
12974            ErrorCode::Internal,
12975        ],
12976        limit_ids: &["request_bytes", "response_bytes"],
12977        effect_class: "durable_submit",
12978        risk_flags: &["destructive"],
12979        capability_family: "lifecycle",
12980        retry_safety: "pre_submit_only",
12981        identity_requirement: "caller_action_id",
12982        resolver: Some(Command::GetContinuousTemporalEvaluation),
12983        cancellation: "per_call_until_submission_then_resolve",
12984        side_effects: &["commits_authoritative_state"],
12985        recovery: "resolve_with_get_continuous_temporal_evaluation",
12986        collection_index_ref: "request_evaluation",
12987    },
12988    CommandSemanticContract {
12989        command: Command::ReadContinuousTemporalEvidence,
12990        admissible_errors: &[
12991            ErrorCode::Aborted,
12992            ErrorCode::DeadlineExceeded,
12993            ErrorCode::InvalidRequest,
12994            ErrorCode::UnsupportedVersion,
12995            ErrorCode::Unauthenticated,
12996            ErrorCode::PermissionDenied,
12997            ErrorCode::NotFound,
12998            ErrorCode::Conflict,
12999            ErrorCode::RetentionGap,
13000            ErrorCode::LimitExceeded,
13001            ErrorCode::CapabilityUnavailable,
13002            ErrorCode::TemporarilyUnavailable,
13003            ErrorCode::Internal,
13004        ],
13005        limit_ids: &["request_bytes", "response_bytes", "page_size", "temporal_results"],
13006        effect_class: "read_only",
13007        risk_flags: &[],
13008        capability_family: "data",
13009        retry_safety: "safe",
13010        identity_requirement: "none",
13011        resolver: None,
13012        cancellation: "per_call",
13013        side_effects: &[],
13014        recovery: "retry",
13015        collection_index_ref: "request_evaluation",
13016    },
13017    CommandSemanticContract {
13018        command: Command::ValidateSearch,
13019        admissible_errors: &[
13020            ErrorCode::Aborted,
13021            ErrorCode::DeadlineExceeded,
13022            ErrorCode::InvalidRequest,
13023            ErrorCode::UnsupportedVersion,
13024            ErrorCode::Unauthenticated,
13025            ErrorCode::PermissionDenied,
13026            ErrorCode::NotFound,
13027            ErrorCode::LimitExceeded,
13028            ErrorCode::CapabilityUnavailable,
13029            ErrorCode::TemporarilyUnavailable,
13030            ErrorCode::Internal,
13031        ],
13032        limit_ids: &[
13033            "request_bytes",
13034            "response_bytes",
13035            "page_size",
13036            "query_clauses",
13037            "aggregation_nodes",
13038            "aggregation_buckets",
13039            "routing_values",
13040            "routing_value_bytes",
13041            "query_recursion_depth",
13042            "search_result_window",
13043        ],
13044        effect_class: "read_only",
13045        risk_flags: &[],
13046        capability_family: "data",
13047        retry_safety: "safe",
13048        identity_requirement: "none",
13049        resolver: None,
13050        cancellation: "per_call",
13051        side_effects: &[],
13052        recovery: "retry",
13053        collection_index_ref: "request_indexes_uniform",
13054    },
13055    CommandSemanticContract {
13056        command: Command::OpenPit,
13057        admissible_errors: &[
13058            ErrorCode::Aborted,
13059            ErrorCode::DeadlineExceeded,
13060            ErrorCode::InvalidRequest,
13061            ErrorCode::UnsupportedVersion,
13062            ErrorCode::Unauthenticated,
13063            ErrorCode::PermissionDenied,
13064            ErrorCode::NotFound,
13065            ErrorCode::Conflict,
13066            ErrorCode::LimitExceeded,
13067            ErrorCode::CapabilityUnavailable,
13068            ErrorCode::NotSubmitted,
13069            ErrorCode::SubmittedIndeterminate,
13070            ErrorCode::ExpiredUnknown,
13071            ErrorCode::TemporarilyUnavailable,
13072            ErrorCode::Internal,
13073        ],
13074        limit_ids: &["request_bytes", "response_bytes"],
13075        effect_class: "lease_renewing_read",
13076        risk_flags: &[],
13077        capability_family: "data",
13078        retry_safety: "pre_submit_only",
13079        identity_requirement: "none",
13080        resolver: None,
13081        cancellation: "per_call_until_submission_then_resolve",
13082        side_effects: &["renews_or_closes_existing_lease"],
13083        recovery: "retry_if_not_submitted",
13084        collection_index_ref: "request_indexes_uniform",
13085    },
13086    CommandSemanticContract {
13087        command: Command::RenewPit,
13088        admissible_errors: &[
13089            ErrorCode::Aborted,
13090            ErrorCode::DeadlineExceeded,
13091            ErrorCode::InvalidRequest,
13092            ErrorCode::UnsupportedVersion,
13093            ErrorCode::Unauthenticated,
13094            ErrorCode::PermissionDenied,
13095            ErrorCode::NotFound,
13096            ErrorCode::Conflict,
13097            ErrorCode::LimitExceeded,
13098            ErrorCode::CapabilityUnavailable,
13099            ErrorCode::NotSubmitted,
13100            ErrorCode::SubmittedIndeterminate,
13101            ErrorCode::ExpiredUnknown,
13102            ErrorCode::TemporarilyUnavailable,
13103            ErrorCode::Internal,
13104        ],
13105        limit_ids: &["request_bytes", "response_bytes"],
13106        effect_class: "lease_renewing_read",
13107        risk_flags: &[],
13108        capability_family: "data",
13109        retry_safety: "pre_submit_only",
13110        identity_requirement: "none",
13111        resolver: None,
13112        cancellation: "per_call_until_submission_then_resolve",
13113        side_effects: &["renews_or_closes_existing_lease"],
13114        recovery: "retry_if_not_submitted",
13115        collection_index_ref: "pit_authority",
13116    },
13117    CommandSemanticContract {
13118        command: Command::ClosePit,
13119        admissible_errors: &[
13120            ErrorCode::Aborted,
13121            ErrorCode::DeadlineExceeded,
13122            ErrorCode::InvalidRequest,
13123            ErrorCode::UnsupportedVersion,
13124            ErrorCode::Unauthenticated,
13125            ErrorCode::PermissionDenied,
13126            ErrorCode::NotFound,
13127            ErrorCode::Conflict,
13128            ErrorCode::LimitExceeded,
13129            ErrorCode::CapabilityUnavailable,
13130            ErrorCode::NotSubmitted,
13131            ErrorCode::SubmittedIndeterminate,
13132            ErrorCode::ExpiredUnknown,
13133            ErrorCode::TemporarilyUnavailable,
13134            ErrorCode::Internal,
13135        ],
13136        limit_ids: &["request_bytes", "response_bytes"],
13137        effect_class: "lease_renewing_read",
13138        risk_flags: &[],
13139        capability_family: "data",
13140        retry_safety: "pre_submit_only",
13141        identity_requirement: "none",
13142        resolver: None,
13143        cancellation: "per_call_until_submission_then_resolve",
13144        side_effects: &["renews_or_closes_existing_lease"],
13145        recovery: "retry_if_not_submitted",
13146        collection_index_ref: "pit_authority",
13147    },
13148    CommandSemanticContract {
13149        command: Command::ListOperations,
13150        admissible_errors: &[
13151            ErrorCode::Aborted,
13152            ErrorCode::DeadlineExceeded,
13153            ErrorCode::InvalidRequest,
13154            ErrorCode::UnsupportedVersion,
13155            ErrorCode::Unauthenticated,
13156            ErrorCode::PermissionDenied,
13157            ErrorCode::NotFound,
13158            ErrorCode::StaleCursor,
13159            ErrorCode::RestartBudgetExhausted,
13160            ErrorCode::LimitExceeded,
13161            ErrorCode::CapabilityUnavailable,
13162            ErrorCode::TemporarilyUnavailable,
13163            ErrorCode::Internal,
13164        ],
13165        limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
13166        effect_class: "read_only",
13167        risk_flags: &[],
13168        capability_family: "operations",
13169        retry_safety: "safe",
13170        identity_requirement: "none",
13171        resolver: None,
13172        cancellation: "per_call",
13173        side_effects: &[],
13174        recovery: "retry",
13175        collection_index_ref: "none",
13176    },
13177    CommandSemanticContract {
13178        command: Command::GetOperation,
13179        admissible_errors: &[
13180            ErrorCode::Aborted,
13181            ErrorCode::DeadlineExceeded,
13182            ErrorCode::InvalidRequest,
13183            ErrorCode::UnsupportedVersion,
13184            ErrorCode::Unauthenticated,
13185            ErrorCode::PermissionDenied,
13186            ErrorCode::NotFound,
13187            ErrorCode::LimitExceeded,
13188            ErrorCode::CapabilityUnavailable,
13189            ErrorCode::TemporarilyUnavailable,
13190            ErrorCode::Internal,
13191        ],
13192        limit_ids: &["request_bytes", "response_bytes"],
13193        effect_class: "read_only",
13194        risk_flags: &[],
13195        capability_family: "operations",
13196        retry_safety: "safe",
13197        identity_requirement: "request_locator",
13198        resolver: None,
13199        cancellation: "per_call",
13200        side_effects: &[],
13201        recovery: "retry",
13202        collection_index_ref: "none",
13203    },
13204    CommandSemanticContract {
13205        command: Command::WaitOperation,
13206        admissible_errors: &[
13207            ErrorCode::Aborted,
13208            ErrorCode::DeadlineExceeded,
13209            ErrorCode::InvalidRequest,
13210            ErrorCode::UnsupportedVersion,
13211            ErrorCode::Unauthenticated,
13212            ErrorCode::PermissionDenied,
13213            ErrorCode::NotFound,
13214            ErrorCode::Conflict,
13215            ErrorCode::LimitExceeded,
13216            ErrorCode::CapabilityUnavailable,
13217            ErrorCode::TemporarilyUnavailable,
13218            ErrorCode::Internal,
13219        ],
13220        limit_ids: &[
13221            "request_bytes",
13222            "response_bytes",
13223            "operation_wait_attempts",
13224            "operation_wait_interval_millis",
13225        ],
13226        effect_class: "read_only",
13227        risk_flags: &[],
13228        capability_family: "operations",
13229        retry_safety: "safe",
13230        identity_requirement: "request_locator",
13231        resolver: None,
13232        cancellation: "per_call",
13233        side_effects: &[],
13234        recovery: "retry",
13235        collection_index_ref: "none",
13236    },
13237    CommandSemanticContract {
13238        command: Command::CancelOperation,
13239        admissible_errors: &[
13240            ErrorCode::Aborted,
13241            ErrorCode::DeadlineExceeded,
13242            ErrorCode::InvalidRequest,
13243            ErrorCode::UnsupportedVersion,
13244            ErrorCode::Unauthenticated,
13245            ErrorCode::PermissionDenied,
13246            ErrorCode::NotFound,
13247            ErrorCode::Conflict,
13248            ErrorCode::LimitExceeded,
13249            ErrorCode::CapabilityUnavailable,
13250            ErrorCode::NotSubmitted,
13251            ErrorCode::SubmittedIndeterminate,
13252            ErrorCode::ExpiredUnknown,
13253            ErrorCode::TemporarilyUnavailable,
13254            ErrorCode::Internal,
13255        ],
13256        limit_ids: &["request_bytes", "response_bytes"],
13257        effect_class: "control_write",
13258        risk_flags: &[],
13259        capability_family: "operations",
13260        retry_safety: "pre_submit_only",
13261        identity_requirement: "request_locator",
13262        resolver: None,
13263        cancellation: "per_call_until_submission_then_resolve",
13264        side_effects: &["commits_authoritative_state"],
13265        recovery: "retry_if_not_submitted",
13266        collection_index_ref: "none",
13267    },
13268    CommandSemanticContract {
13269        command: Command::ListAuditEvents,
13270        admissible_errors: &[
13271            ErrorCode::Aborted,
13272            ErrorCode::DeadlineExceeded,
13273            ErrorCode::InvalidRequest,
13274            ErrorCode::UnsupportedVersion,
13275            ErrorCode::Unauthenticated,
13276            ErrorCode::PermissionDenied,
13277            ErrorCode::NotFound,
13278            ErrorCode::StaleCursor,
13279            ErrorCode::RestartBudgetExhausted,
13280            ErrorCode::LimitExceeded,
13281            ErrorCode::CapabilityUnavailable,
13282            ErrorCode::TemporarilyUnavailable,
13283            ErrorCode::Internal,
13284        ],
13285        limit_ids: &["request_bytes", "response_bytes", "page_size"],
13286        effect_class: "read_only",
13287        risk_flags: &[],
13288        capability_family: "audit",
13289        retry_safety: "safe",
13290        identity_requirement: "none",
13291        resolver: None,
13292        cancellation: "per_call",
13293        side_effects: &[],
13294        recovery: "retry",
13295        collection_index_ref: "none",
13296    },
13297    CommandSemanticContract {
13298        command: Command::ExportAuditEvents,
13299        admissible_errors: &[
13300            ErrorCode::Aborted,
13301            ErrorCode::DeadlineExceeded,
13302            ErrorCode::InvalidRequest,
13303            ErrorCode::UnsupportedVersion,
13304            ErrorCode::Unauthenticated,
13305            ErrorCode::PermissionDenied,
13306            ErrorCode::NotFound,
13307            ErrorCode::StaleCursor,
13308            ErrorCode::RestartBudgetExhausted,
13309            ErrorCode::LimitExceeded,
13310            ErrorCode::CapabilityUnavailable,
13311            ErrorCode::TemporarilyUnavailable,
13312            ErrorCode::Internal,
13313        ],
13314        limit_ids: &["request_bytes", "response_bytes", "page_size"],
13315        effect_class: "read_only",
13316        risk_flags: &[],
13317        capability_family: "audit",
13318        retry_safety: "safe",
13319        identity_requirement: "none",
13320        resolver: None,
13321        cancellation: "per_call",
13322        side_effects: &[],
13323        recovery: "retry",
13324        collection_index_ref: "none",
13325    },
13326    CommandSemanticContract {
13327        command: Command::ReserveServiceCredential,
13328        admissible_errors: &[
13329            ErrorCode::Aborted,
13330            ErrorCode::DeadlineExceeded,
13331            ErrorCode::InvalidRequest,
13332            ErrorCode::UnsupportedVersion,
13333            ErrorCode::Unauthenticated,
13334            ErrorCode::PermissionDenied,
13335            ErrorCode::NotFound,
13336            ErrorCode::Conflict,
13337            ErrorCode::LimitExceeded,
13338            ErrorCode::CapabilityUnavailable,
13339            ErrorCode::NotSubmitted,
13340            ErrorCode::SubmittedIndeterminate,
13341            ErrorCode::ExpiredUnknown,
13342            ErrorCode::SecretNotEscrowed,
13343            ErrorCode::TemporarilyUnavailable,
13344            ErrorCode::Internal,
13345        ],
13346        limit_ids: &["request_bytes", "response_bytes"],
13347        effect_class: "durable_submit",
13348        risk_flags: &["credential_sensitive"],
13349        capability_family: "security",
13350        retry_safety: "pre_submit_only",
13351        identity_requirement: "caller_action_id",
13352        resolver: Some(Command::ResolveServiceCredentialReservation),
13353        cancellation: "per_call_until_submission_then_resolve",
13354        side_effects: &["commits_authoritative_state"],
13355        recovery: "resolve_with_resolve_service_credential_reservation",
13356        collection_index_ref: "none",
13357    },
13358    CommandSemanticContract {
13359        command: Command::ReserveServiceCredentialRotation,
13360        admissible_errors: &[
13361            ErrorCode::Aborted,
13362            ErrorCode::DeadlineExceeded,
13363            ErrorCode::InvalidRequest,
13364            ErrorCode::UnsupportedVersion,
13365            ErrorCode::Unauthenticated,
13366            ErrorCode::PermissionDenied,
13367            ErrorCode::NotFound,
13368            ErrorCode::Conflict,
13369            ErrorCode::LimitExceeded,
13370            ErrorCode::CapabilityUnavailable,
13371            ErrorCode::NotSubmitted,
13372            ErrorCode::SubmittedIndeterminate,
13373            ErrorCode::ExpiredUnknown,
13374            ErrorCode::SecretNotEscrowed,
13375            ErrorCode::TemporarilyUnavailable,
13376            ErrorCode::Internal,
13377        ],
13378        limit_ids: &["request_bytes", "response_bytes"],
13379        effect_class: "durable_submit",
13380        risk_flags: &["credential_sensitive"],
13381        capability_family: "security",
13382        retry_safety: "pre_submit_only",
13383        identity_requirement: "caller_action_id",
13384        resolver: Some(Command::ResolveServiceCredentialReservation),
13385        cancellation: "per_call_until_submission_then_resolve",
13386        side_effects: &["commits_authoritative_state"],
13387        recovery: "resolve_with_resolve_service_credential_reservation",
13388        collection_index_ref: "none",
13389    },
13390    CommandSemanticContract {
13391        command: Command::ActivateServiceCredential,
13392        admissible_errors: &[
13393            ErrorCode::Aborted,
13394            ErrorCode::DeadlineExceeded,
13395            ErrorCode::InvalidRequest,
13396            ErrorCode::UnsupportedVersion,
13397            ErrorCode::Unauthenticated,
13398            ErrorCode::PermissionDenied,
13399            ErrorCode::NotFound,
13400            ErrorCode::Conflict,
13401            ErrorCode::LimitExceeded,
13402            ErrorCode::CapabilityUnavailable,
13403            ErrorCode::NotSubmitted,
13404            ErrorCode::SubmittedIndeterminate,
13405            ErrorCode::ExpiredUnknown,
13406            ErrorCode::SecretNotEscrowed,
13407            ErrorCode::TemporarilyUnavailable,
13408            ErrorCode::Internal,
13409        ],
13410        limit_ids: &["request_bytes", "response_bytes"],
13411        effect_class: "durable_submit",
13412        risk_flags: &["credential_sensitive"],
13413        capability_family: "security",
13414        retry_safety: "pre_submit_only",
13415        identity_requirement: "server_locator",
13416        resolver: Some(Command::ResolveServiceCredentialReservation),
13417        cancellation: "per_call_until_submission_then_resolve",
13418        side_effects: &["commits_authoritative_state"],
13419        recovery: "resolve_with_resolve_service_credential_reservation",
13420        collection_index_ref: "none",
13421    },
13422    CommandSemanticContract {
13423        command: Command::ResolveServiceCredentialReservation,
13424        admissible_errors: &[
13425            ErrorCode::Aborted,
13426            ErrorCode::DeadlineExceeded,
13427            ErrorCode::InvalidRequest,
13428            ErrorCode::UnsupportedVersion,
13429            ErrorCode::Unauthenticated,
13430            ErrorCode::PermissionDenied,
13431            ErrorCode::NotFound,
13432            ErrorCode::LimitExceeded,
13433            ErrorCode::CapabilityUnavailable,
13434            ErrorCode::SecretNotEscrowed,
13435            ErrorCode::TemporarilyUnavailable,
13436            ErrorCode::Internal,
13437        ],
13438        limit_ids: &["request_bytes", "response_bytes"],
13439        effect_class: "read_only",
13440        risk_flags: &["credential_sensitive"],
13441        capability_family: "security",
13442        retry_safety: "safe",
13443        identity_requirement: "caller_action_id",
13444        resolver: None,
13445        cancellation: "per_call",
13446        side_effects: &[],
13447        recovery: "retry",
13448        collection_index_ref: "none",
13449    },
13450    CommandSemanticContract {
13451        command: Command::PrepareRevokeServiceCredential,
13452        admissible_errors: &[
13453            ErrorCode::Aborted,
13454            ErrorCode::DeadlineExceeded,
13455            ErrorCode::InvalidRequest,
13456            ErrorCode::UnsupportedVersion,
13457            ErrorCode::Unauthenticated,
13458            ErrorCode::PermissionDenied,
13459            ErrorCode::NotFound,
13460            ErrorCode::LimitExceeded,
13461            ErrorCode::CapabilityUnavailable,
13462            ErrorCode::SecretNotEscrowed,
13463            ErrorCode::TemporarilyUnavailable,
13464            ErrorCode::Internal,
13465        ],
13466        limit_ids: &["request_bytes", "response_bytes"],
13467        effect_class: "prepare",
13468        risk_flags: &["destructive", "credential_sensitive"],
13469        capability_family: "security",
13470        retry_safety: "safe",
13471        identity_requirement: "server_locator",
13472        resolver: None,
13473        cancellation: "per_call",
13474        side_effects: &["creates_bounded_preparation"],
13475        recovery: "retry",
13476        collection_index_ref: "none",
13477    },
13478    CommandSemanticContract {
13479        command: Command::RevokeServiceCredential,
13480        admissible_errors: &[
13481            ErrorCode::Aborted,
13482            ErrorCode::DeadlineExceeded,
13483            ErrorCode::InvalidRequest,
13484            ErrorCode::UnsupportedVersion,
13485            ErrorCode::Unauthenticated,
13486            ErrorCode::PermissionDenied,
13487            ErrorCode::NotFound,
13488            ErrorCode::Conflict,
13489            ErrorCode::LimitExceeded,
13490            ErrorCode::CapabilityUnavailable,
13491            ErrorCode::NotSubmitted,
13492            ErrorCode::SubmittedIndeterminate,
13493            ErrorCode::ExpiredUnknown,
13494            ErrorCode::SecretNotEscrowed,
13495            ErrorCode::TemporarilyUnavailable,
13496            ErrorCode::Internal,
13497        ],
13498        limit_ids: &["request_bytes", "response_bytes"],
13499        effect_class: "durable_submit",
13500        risk_flags: &["destructive", "credential_sensitive"],
13501        capability_family: "security",
13502        retry_safety: "pre_submit_only",
13503        identity_requirement: "request_locator",
13504        resolver: Some(Command::ResolveSecurityAction),
13505        cancellation: "per_call_until_submission_then_resolve",
13506        side_effects: &["commits_authoritative_state"],
13507        recovery: "resolve_with_resolve_security_action",
13508        collection_index_ref: "none",
13509    },
13510    CommandSemanticContract {
13511        command: Command::ResolveSecurityAction,
13512        admissible_errors: &[
13513            ErrorCode::Aborted,
13514            ErrorCode::DeadlineExceeded,
13515            ErrorCode::InvalidRequest,
13516            ErrorCode::UnsupportedVersion,
13517            ErrorCode::Unauthenticated,
13518            ErrorCode::PermissionDenied,
13519            ErrorCode::NotFound,
13520            ErrorCode::LimitExceeded,
13521            ErrorCode::CapabilityUnavailable,
13522            ErrorCode::SecretNotEscrowed,
13523            ErrorCode::TemporarilyUnavailable,
13524            ErrorCode::Internal,
13525        ],
13526        limit_ids: &["request_bytes", "response_bytes"],
13527        effect_class: "read_only",
13528        risk_flags: &[],
13529        capability_family: "security",
13530        retry_safety: "safe",
13531        identity_requirement: "request_locator",
13532        resolver: None,
13533        cancellation: "per_call",
13534        side_effects: &[],
13535        recovery: "retry",
13536        collection_index_ref: "none",
13537    },
13538    CommandSemanticContract {
13539        command: Command::GetSecurityRole,
13540        admissible_errors: &[
13541            ErrorCode::Aborted,
13542            ErrorCode::DeadlineExceeded,
13543            ErrorCode::InvalidRequest,
13544            ErrorCode::UnsupportedVersion,
13545            ErrorCode::Unauthenticated,
13546            ErrorCode::PermissionDenied,
13547            ErrorCode::NotFound,
13548            ErrorCode::LimitExceeded,
13549            ErrorCode::CapabilityUnavailable,
13550            ErrorCode::TemporarilyUnavailable,
13551            ErrorCode::Internal,
13552        ],
13553        limit_ids: &["request_bytes", "response_bytes"],
13554        effect_class: "read_only",
13555        risk_flags: &[],
13556        capability_family: "security",
13557        retry_safety: "safe",
13558        identity_requirement: "none",
13559        resolver: None,
13560        cancellation: "per_call",
13561        side_effects: &[],
13562        recovery: "retry",
13563        collection_index_ref: "none",
13564    },
13565    CommandSemanticContract {
13566        command: Command::PrepareRoleAppendAccessChange,
13567        admissible_errors: &[
13568            ErrorCode::Aborted,
13569            ErrorCode::DeadlineExceeded,
13570            ErrorCode::InvalidRequest,
13571            ErrorCode::UnsupportedVersion,
13572            ErrorCode::Unauthenticated,
13573            ErrorCode::PermissionDenied,
13574            ErrorCode::NotFound,
13575            ErrorCode::Conflict,
13576            ErrorCode::LimitExceeded,
13577            ErrorCode::CapabilityUnavailable,
13578            ErrorCode::TemporarilyUnavailable,
13579            ErrorCode::Internal,
13580        ],
13581        limit_ids: &["request_bytes", "response_bytes"],
13582        effect_class: "prepare",
13583        risk_flags: &["destructive"],
13584        capability_family: "security",
13585        retry_safety: "safe",
13586        identity_requirement: "server_locator",
13587        resolver: None,
13588        cancellation: "per_call",
13589        side_effects: &["creates_bounded_preparation"],
13590        recovery: "retry",
13591        collection_index_ref: "none",
13592    },
13593    CommandSemanticContract {
13594        command: Command::SubmitRoleAppendAccessChange,
13595        admissible_errors: &[
13596            ErrorCode::Aborted,
13597            ErrorCode::DeadlineExceeded,
13598            ErrorCode::InvalidRequest,
13599            ErrorCode::UnsupportedVersion,
13600            ErrorCode::Unauthenticated,
13601            ErrorCode::PermissionDenied,
13602            ErrorCode::NotFound,
13603            ErrorCode::Conflict,
13604            ErrorCode::LimitExceeded,
13605            ErrorCode::CapabilityUnavailable,
13606            ErrorCode::NotSubmitted,
13607            ErrorCode::SubmittedIndeterminate,
13608            ErrorCode::ExpiredUnknown,
13609            ErrorCode::TemporarilyUnavailable,
13610            ErrorCode::Internal,
13611        ],
13612        limit_ids: &["request_bytes", "response_bytes"],
13613        effect_class: "durable_submit",
13614        risk_flags: &["destructive"],
13615        capability_family: "security",
13616        retry_safety: "pre_submit_only",
13617        identity_requirement: "request_locator",
13618        resolver: Some(Command::ResolveSecurityAction),
13619        cancellation: "per_call_until_submission_then_resolve",
13620        side_effects: &["commits_authoritative_state"],
13621        recovery: "resolve_with_resolve_security_action",
13622        collection_index_ref: "none",
13623    },
13624    CommandSemanticContract {
13625        command: Command::ListServiceCredentials,
13626        admissible_errors: &[
13627            ErrorCode::Aborted,
13628            ErrorCode::DeadlineExceeded,
13629            ErrorCode::InvalidRequest,
13630            ErrorCode::UnsupportedVersion,
13631            ErrorCode::Unauthenticated,
13632            ErrorCode::PermissionDenied,
13633            ErrorCode::NotFound,
13634            ErrorCode::StaleCursor,
13635            ErrorCode::RestartBudgetExhausted,
13636            ErrorCode::LimitExceeded,
13637            ErrorCode::CapabilityUnavailable,
13638            ErrorCode::SecretNotEscrowed,
13639            ErrorCode::TemporarilyUnavailable,
13640            ErrorCode::Internal,
13641        ],
13642        limit_ids: &["request_bytes", "response_bytes", "page_size"],
13643        effect_class: "read_only",
13644        risk_flags: &["credential_sensitive"],
13645        capability_family: "security",
13646        retry_safety: "safe",
13647        identity_requirement: "none",
13648        resolver: None,
13649        cancellation: "per_call",
13650        side_effects: &[],
13651        recovery: "retry",
13652        collection_index_ref: "none",
13653    },
13654    CommandSemanticContract {
13655        command: Command::GetRuntimeStatus,
13656        admissible_errors: &[
13657            ErrorCode::Aborted,
13658            ErrorCode::DeadlineExceeded,
13659            ErrorCode::InvalidRequest,
13660            ErrorCode::UnsupportedVersion,
13661            ErrorCode::Unauthenticated,
13662            ErrorCode::PermissionDenied,
13663            ErrorCode::NotFound,
13664            ErrorCode::LimitExceeded,
13665            ErrorCode::CapabilityUnavailable,
13666            ErrorCode::TemporarilyUnavailable,
13667            ErrorCode::Internal,
13668        ],
13669        limit_ids: &["request_bytes", "response_bytes"],
13670        effect_class: "read_only",
13671        risk_flags: &[],
13672        capability_family: "catalog",
13673        retry_safety: "safe",
13674        identity_requirement: "none",
13675        resolver: None,
13676        cancellation: "per_call",
13677        side_effects: &[],
13678        recovery: "retry",
13679        collection_index_ref: "none",
13680    },
13681    CommandSemanticContract {
13682        command: Command::GetResultCacheStatus,
13683        admissible_errors: &[
13684            ErrorCode::Aborted,
13685            ErrorCode::DeadlineExceeded,
13686            ErrorCode::InvalidRequest,
13687            ErrorCode::UnsupportedVersion,
13688            ErrorCode::Unauthenticated,
13689            ErrorCode::PermissionDenied,
13690            ErrorCode::NotFound,
13691            ErrorCode::LimitExceeded,
13692            ErrorCode::CapabilityUnavailable,
13693            ErrorCode::TemporarilyUnavailable,
13694            ErrorCode::Internal,
13695        ],
13696        limit_ids: &["request_bytes", "response_bytes"],
13697        effect_class: "read_only",
13698        risk_flags: &[],
13699        capability_family: "catalog",
13700        retry_safety: "safe",
13701        identity_requirement: "none",
13702        resolver: None,
13703        cancellation: "per_call",
13704        side_effects: &[],
13705        recovery: "retry",
13706        collection_index_ref: "none",
13707    },
13708    CommandSemanticContract {
13709        command: Command::GetFieldPromotionStatus,
13710        admissible_errors: &[
13711            ErrorCode::Aborted,
13712            ErrorCode::DeadlineExceeded,
13713            ErrorCode::InvalidRequest,
13714            ErrorCode::UnsupportedVersion,
13715            ErrorCode::Unauthenticated,
13716            ErrorCode::PermissionDenied,
13717            ErrorCode::NotFound,
13718            ErrorCode::LimitExceeded,
13719            ErrorCode::CapabilityUnavailable,
13720            ErrorCode::TemporarilyUnavailable,
13721            ErrorCode::Internal,
13722        ],
13723        limit_ids: &["request_bytes", "response_bytes"],
13724        effect_class: "read_only",
13725        risk_flags: &[],
13726        capability_family: "catalog",
13727        retry_safety: "safe",
13728        identity_requirement: "none",
13729        resolver: None,
13730        cancellation: "per_call",
13731        side_effects: &[],
13732        recovery: "retry",
13733        collection_index_ref: "none",
13734    },
13735    CommandSemanticContract {
13736        command: Command::GetOverloadStatus,
13737        admissible_errors: &[
13738            ErrorCode::Aborted,
13739            ErrorCode::DeadlineExceeded,
13740            ErrorCode::InvalidRequest,
13741            ErrorCode::UnsupportedVersion,
13742            ErrorCode::Unauthenticated,
13743            ErrorCode::PermissionDenied,
13744            ErrorCode::NotFound,
13745            ErrorCode::LimitExceeded,
13746            ErrorCode::CapabilityUnavailable,
13747            ErrorCode::TemporarilyUnavailable,
13748            ErrorCode::Internal,
13749        ],
13750        limit_ids: &["request_bytes", "response_bytes"],
13751        effect_class: "read_only",
13752        risk_flags: &[],
13753        capability_family: "catalog",
13754        retry_safety: "safe",
13755        identity_requirement: "none",
13756        resolver: None,
13757        cancellation: "per_call",
13758        side_effects: &[],
13759        recovery: "retry",
13760        collection_index_ref: "none",
13761    },
13762    CommandSemanticContract {
13763        command: Command::ConfigureExternalKey,
13764        admissible_errors: &[
13765            ErrorCode::Aborted,
13766            ErrorCode::DeadlineExceeded,
13767            ErrorCode::InvalidRequest,
13768            ErrorCode::UnsupportedVersion,
13769            ErrorCode::Unauthenticated,
13770            ErrorCode::PermissionDenied,
13771            ErrorCode::NotFound,
13772            ErrorCode::Conflict,
13773            ErrorCode::LimitExceeded,
13774            ErrorCode::CapabilityUnavailable,
13775            ErrorCode::NotSubmitted,
13776            ErrorCode::SubmittedIndeterminate,
13777            ErrorCode::ExpiredUnknown,
13778            ErrorCode::TemporarilyUnavailable,
13779            ErrorCode::Internal,
13780        ],
13781        limit_ids: &["request_bytes", "response_bytes"],
13782        effect_class: "control_write",
13783        risk_flags: &[],
13784        capability_family: "lifecycle",
13785        retry_safety: "pre_submit_only",
13786        identity_requirement: "none",
13787        resolver: None,
13788        cancellation: "per_call_until_submission_then_resolve",
13789        side_effects: &["commits_authoritative_state"],
13790        recovery: "retry_if_not_submitted",
13791        collection_index_ref: "request_index",
13792    },
13793    CommandSemanticContract {
13794        command: Command::RotateExternalKeyBinding,
13795        admissible_errors: &[
13796            ErrorCode::Aborted,
13797            ErrorCode::DeadlineExceeded,
13798            ErrorCode::InvalidRequest,
13799            ErrorCode::UnsupportedVersion,
13800            ErrorCode::Unauthenticated,
13801            ErrorCode::PermissionDenied,
13802            ErrorCode::NotFound,
13803            ErrorCode::Conflict,
13804            ErrorCode::LimitExceeded,
13805            ErrorCode::CapabilityUnavailable,
13806            ErrorCode::NotSubmitted,
13807            ErrorCode::SubmittedIndeterminate,
13808            ErrorCode::ExpiredUnknown,
13809            ErrorCode::TemporarilyUnavailable,
13810            ErrorCode::Internal,
13811        ],
13812        limit_ids: &["request_bytes", "response_bytes"],
13813        effect_class: "control_write",
13814        risk_flags: &[],
13815        capability_family: "lifecycle",
13816        retry_safety: "pre_submit_only",
13817        identity_requirement: "none",
13818        resolver: None,
13819        cancellation: "per_call_until_submission_then_resolve",
13820        side_effects: &["commits_authoritative_state"],
13821        recovery: "retry_if_not_submitted",
13822        collection_index_ref: "request_index",
13823    },
13824    CommandSemanticContract {
13825        command: Command::ConfigureAggregateThenDelete,
13826        admissible_errors: &[
13827            ErrorCode::Aborted,
13828            ErrorCode::DeadlineExceeded,
13829            ErrorCode::InvalidRequest,
13830            ErrorCode::UnsupportedVersion,
13831            ErrorCode::Unauthenticated,
13832            ErrorCode::PermissionDenied,
13833            ErrorCode::NotFound,
13834            ErrorCode::Conflict,
13835            ErrorCode::LimitExceeded,
13836            ErrorCode::CapabilityUnavailable,
13837            ErrorCode::NotSubmitted,
13838            ErrorCode::SubmittedIndeterminate,
13839            ErrorCode::ExpiredUnknown,
13840            ErrorCode::TemporarilyUnavailable,
13841            ErrorCode::Internal,
13842        ],
13843        limit_ids: &["request_bytes", "response_bytes"],
13844        effect_class: "control_write",
13845        risk_flags: &["destructive"],
13846        capability_family: "lifecycle",
13847        retry_safety: "pre_submit_only",
13848        identity_requirement: "none",
13849        resolver: None,
13850        cancellation: "per_call_until_submission_then_resolve",
13851        side_effects: &["commits_authoritative_state"],
13852        recovery: "retry_if_not_submitted",
13853        collection_index_ref: "request_index",
13854    },
13855    CommandSemanticContract {
13856        command: Command::GetLifecycleStatus,
13857        admissible_errors: &[
13858            ErrorCode::Aborted,
13859            ErrorCode::DeadlineExceeded,
13860            ErrorCode::InvalidRequest,
13861            ErrorCode::UnsupportedVersion,
13862            ErrorCode::Unauthenticated,
13863            ErrorCode::PermissionDenied,
13864            ErrorCode::NotFound,
13865            ErrorCode::LimitExceeded,
13866            ErrorCode::CapabilityUnavailable,
13867            ErrorCode::TemporarilyUnavailable,
13868            ErrorCode::Internal,
13869        ],
13870        limit_ids: &["request_bytes", "response_bytes"],
13871        effect_class: "read_only",
13872        risk_flags: &[],
13873        capability_family: "catalog",
13874        retry_safety: "safe",
13875        identity_requirement: "none",
13876        resolver: None,
13877        cancellation: "per_call",
13878        side_effects: &[],
13879        recovery: "retry",
13880        collection_index_ref: "none",
13881    },
13882    CommandSemanticContract {
13883        command: Command::GetQuota,
13884        admissible_errors: &[
13885            ErrorCode::Aborted,
13886            ErrorCode::DeadlineExceeded,
13887            ErrorCode::InvalidRequest,
13888            ErrorCode::UnsupportedVersion,
13889            ErrorCode::Unauthenticated,
13890            ErrorCode::PermissionDenied,
13891            ErrorCode::NotFound,
13892            ErrorCode::LimitExceeded,
13893            ErrorCode::CapabilityUnavailable,
13894            ErrorCode::TemporarilyUnavailable,
13895            ErrorCode::Internal,
13896        ],
13897        limit_ids: &["request_bytes", "response_bytes"],
13898        effect_class: "read_only",
13899        risk_flags: &[],
13900        capability_family: "quota",
13901        retry_safety: "safe",
13902        identity_requirement: "none",
13903        resolver: None,
13904        cancellation: "per_call",
13905        side_effects: &[],
13906        recovery: "retry",
13907        collection_index_ref: "none",
13908    },
13909    CommandSemanticContract {
13910        command: Command::UpdateQuota,
13911        admissible_errors: &[
13912            ErrorCode::Aborted,
13913            ErrorCode::DeadlineExceeded,
13914            ErrorCode::InvalidRequest,
13915            ErrorCode::UnsupportedVersion,
13916            ErrorCode::Unauthenticated,
13917            ErrorCode::PermissionDenied,
13918            ErrorCode::NotFound,
13919            ErrorCode::Conflict,
13920            ErrorCode::LimitExceeded,
13921            ErrorCode::CapabilityUnavailable,
13922            ErrorCode::NotSubmitted,
13923            ErrorCode::SubmittedIndeterminate,
13924            ErrorCode::ExpiredUnknown,
13925            ErrorCode::TemporarilyUnavailable,
13926            ErrorCode::Internal,
13927        ],
13928        limit_ids: &["request_bytes", "response_bytes"],
13929        effect_class: "control_write",
13930        risk_flags: &[],
13931        capability_family: "quota",
13932        retry_safety: "pre_submit_only",
13933        identity_requirement: "none",
13934        resolver: None,
13935        cancellation: "per_call_until_submission_then_resolve",
13936        side_effects: &["commits_authoritative_state"],
13937        recovery: "retry_if_not_submitted",
13938        collection_index_ref: "none",
13939    },
13940    CommandSemanticContract {
13941        command: Command::GetBinding,
13942        admissible_errors: &[
13943            ErrorCode::Aborted,
13944            ErrorCode::DeadlineExceeded,
13945            ErrorCode::InvalidRequest,
13946            ErrorCode::UnsupportedVersion,
13947            ErrorCode::Unauthenticated,
13948            ErrorCode::PermissionDenied,
13949            ErrorCode::NotFound,
13950            ErrorCode::LimitExceeded,
13951            ErrorCode::CapabilityUnavailable,
13952            ErrorCode::TemporarilyUnavailable,
13953            ErrorCode::Internal,
13954        ],
13955        limit_ids: &["request_bytes", "response_bytes"],
13956        effect_class: "read_only",
13957        risk_flags: &[],
13958        capability_family: "runtime_control",
13959        retry_safety: "safe",
13960        identity_requirement: "none",
13961        resolver: None,
13962        cancellation: "per_call",
13963        side_effects: &[],
13964        recovery: "retry",
13965        collection_index_ref: "none",
13966    },
13967    CommandSemanticContract {
13968        command: Command::GetAdmissionStatus,
13969        admissible_errors: &[
13970            ErrorCode::Aborted,
13971            ErrorCode::DeadlineExceeded,
13972            ErrorCode::InvalidRequest,
13973            ErrorCode::UnsupportedVersion,
13974            ErrorCode::Unauthenticated,
13975            ErrorCode::PermissionDenied,
13976            ErrorCode::NotFound,
13977            ErrorCode::LimitExceeded,
13978            ErrorCode::CapabilityUnavailable,
13979            ErrorCode::TemporarilyUnavailable,
13980            ErrorCode::Internal,
13981        ],
13982        limit_ids: &["request_bytes", "response_bytes"],
13983        effect_class: "read_only",
13984        risk_flags: &[],
13985        capability_family: "runtime_control",
13986        retry_safety: "safe",
13987        identity_requirement: "none",
13988        resolver: None,
13989        cancellation: "per_call",
13990        side_effects: &[],
13991        recovery: "retry",
13992        collection_index_ref: "none",
13993    },
13994    CommandSemanticContract {
13995        command: Command::SetAdmission,
13996        admissible_errors: &[
13997            ErrorCode::Aborted,
13998            ErrorCode::DeadlineExceeded,
13999            ErrorCode::InvalidRequest,
14000            ErrorCode::UnsupportedVersion,
14001            ErrorCode::Unauthenticated,
14002            ErrorCode::PermissionDenied,
14003            ErrorCode::NotFound,
14004            ErrorCode::Conflict,
14005            ErrorCode::LimitExceeded,
14006            ErrorCode::CapabilityUnavailable,
14007            ErrorCode::NotSubmitted,
14008            ErrorCode::SubmittedIndeterminate,
14009            ErrorCode::ExpiredUnknown,
14010            ErrorCode::TemporarilyUnavailable,
14011            ErrorCode::Internal,
14012        ],
14013        limit_ids: &["request_bytes", "response_bytes"],
14014        effect_class: "control_write",
14015        risk_flags: &[],
14016        capability_family: "runtime_control",
14017        retry_safety: "pre_submit_only",
14018        identity_requirement: "none",
14019        resolver: None,
14020        cancellation: "per_call_until_submission_then_resolve",
14021        side_effects: &["commits_authoritative_state"],
14022        recovery: "retry_if_not_submitted",
14023        collection_index_ref: "none",
14024    },
14025    CommandSemanticContract {
14026        command: Command::GetQuiesceStatus,
14027        admissible_errors: &[
14028            ErrorCode::Aborted,
14029            ErrorCode::DeadlineExceeded,
14030            ErrorCode::InvalidRequest,
14031            ErrorCode::UnsupportedVersion,
14032            ErrorCode::Unauthenticated,
14033            ErrorCode::PermissionDenied,
14034            ErrorCode::NotFound,
14035            ErrorCode::LimitExceeded,
14036            ErrorCode::CapabilityUnavailable,
14037            ErrorCode::TemporarilyUnavailable,
14038            ErrorCode::Internal,
14039        ],
14040        limit_ids: &["request_bytes", "response_bytes"],
14041        effect_class: "read_only",
14042        risk_flags: &[],
14043        capability_family: "runtime_control",
14044        retry_safety: "safe",
14045        identity_requirement: "none",
14046        resolver: None,
14047        cancellation: "per_call",
14048        side_effects: &[],
14049        recovery: "retry",
14050        collection_index_ref: "none",
14051    },
14052    CommandSemanticContract {
14053        command: Command::GetDecommissionReadiness,
14054        admissible_errors: &[
14055            ErrorCode::Aborted,
14056            ErrorCode::DeadlineExceeded,
14057            ErrorCode::InvalidRequest,
14058            ErrorCode::UnsupportedVersion,
14059            ErrorCode::Unauthenticated,
14060            ErrorCode::PermissionDenied,
14061            ErrorCode::NotFound,
14062            ErrorCode::LimitExceeded,
14063            ErrorCode::CapabilityUnavailable,
14064            ErrorCode::TemporarilyUnavailable,
14065            ErrorCode::Internal,
14066        ],
14067        limit_ids: &["request_bytes", "response_bytes"],
14068        effect_class: "read_only",
14069        risk_flags: &[],
14070        capability_family: "runtime_control",
14071        retry_safety: "safe",
14072        identity_requirement: "none",
14073        resolver: None,
14074        cancellation: "per_call",
14075        side_effects: &[],
14076        recovery: "retry",
14077        collection_index_ref: "none",
14078    },
14079    CommandSemanticContract {
14080        command: Command::GetUpgradeReadiness,
14081        admissible_errors: &[
14082            ErrorCode::Aborted,
14083            ErrorCode::DeadlineExceeded,
14084            ErrorCode::InvalidRequest,
14085            ErrorCode::UnsupportedVersion,
14086            ErrorCode::Unauthenticated,
14087            ErrorCode::PermissionDenied,
14088            ErrorCode::NotFound,
14089            ErrorCode::LimitExceeded,
14090            ErrorCode::CapabilityUnavailable,
14091            ErrorCode::TemporarilyUnavailable,
14092            ErrorCode::Internal,
14093        ],
14094        limit_ids: &["request_bytes", "response_bytes"],
14095        effect_class: "read_only",
14096        risk_flags: &[],
14097        capability_family: "operations",
14098        retry_safety: "safe",
14099        identity_requirement: "none",
14100        resolver: None,
14101        cancellation: "per_call",
14102        side_effects: &[],
14103        recovery: "retry",
14104        collection_index_ref: "none",
14105    },
14106    CommandSemanticContract {
14107        command: Command::GetMaintenanceStatus,
14108        admissible_errors: &[
14109            ErrorCode::Aborted,
14110            ErrorCode::DeadlineExceeded,
14111            ErrorCode::InvalidRequest,
14112            ErrorCode::UnsupportedVersion,
14113            ErrorCode::Unauthenticated,
14114            ErrorCode::PermissionDenied,
14115            ErrorCode::NotFound,
14116            ErrorCode::StaleCursor,
14117            ErrorCode::LimitExceeded,
14118            ErrorCode::CapabilityUnavailable,
14119            ErrorCode::TemporarilyUnavailable,
14120            ErrorCode::Internal,
14121        ],
14122        limit_ids: &["request_bytes", "response_bytes", "page_size", "operation_page_size"],
14123        effect_class: "read_only",
14124        risk_flags: &[],
14125        capability_family: "operations",
14126        retry_safety: "safe",
14127        identity_requirement: "none",
14128        resolver: None,
14129        cancellation: "per_call",
14130        side_effects: &[],
14131        recovery: "retry",
14132        collection_index_ref: "optional_request_index",
14133    },
14134    CommandSemanticContract {
14135        command: Command::WarmVectorIndex,
14136        admissible_errors: &[
14137            ErrorCode::Aborted,
14138            ErrorCode::DeadlineExceeded,
14139            ErrorCode::InvalidRequest,
14140            ErrorCode::UnsupportedVersion,
14141            ErrorCode::Unauthenticated,
14142            ErrorCode::PermissionDenied,
14143            ErrorCode::NotFound,
14144            ErrorCode::Conflict,
14145            ErrorCode::LimitExceeded,
14146            ErrorCode::CapabilityUnavailable,
14147            ErrorCode::TemporarilyUnavailable,
14148            ErrorCode::Internal,
14149        ],
14150        limit_ids: &[
14151            "request_bytes",
14152            "response_bytes",
14153            "vector_warm_components",
14154            "vector_warm_requests",
14155            "vector_warm_bytes",
14156            "vector_warm_achievements",
14157            "vector_warm_ttl_millis",
14158        ],
14159        effect_class: "read_only",
14160        risk_flags: &[],
14161        capability_family: "data",
14162        retry_safety: "safe",
14163        identity_requirement: "exact_root",
14164        resolver: None,
14165        cancellation: "per_call",
14166        side_effects: &["populates_reconstructible_cache"],
14167        recovery: "retry",
14168        collection_index_ref: "request_index",
14169    },
14170    CommandSemanticContract {
14171        command: Command::EvaluateVectorRecall,
14172        admissible_errors: &[
14173            ErrorCode::Aborted,
14174            ErrorCode::DeadlineExceeded,
14175            ErrorCode::InvalidRequest,
14176            ErrorCode::UnsupportedVersion,
14177            ErrorCode::Unauthenticated,
14178            ErrorCode::PermissionDenied,
14179            ErrorCode::NotFound,
14180            ErrorCode::Conflict,
14181            ErrorCode::LimitExceeded,
14182            ErrorCode::CapabilityUnavailable,
14183            ErrorCode::NotSubmitted,
14184            ErrorCode::SubmittedIndeterminate,
14185            ErrorCode::ExpiredUnknown,
14186            ErrorCode::TemporarilyUnavailable,
14187            ErrorCode::Internal,
14188        ],
14189        limit_ids: &[
14190            "request_bytes",
14191            "response_bytes",
14192            "vector_dimensions",
14193            "vector_query_bytes",
14194            "vector_request_bytes",
14195            "vector_candidates",
14196            "vector_evaluation_queries",
14197            "vector_evaluation_k",
14198            "vector_evaluation_artifact_bytes",
14199        ],
14200        effect_class: "durable_submit",
14201        risk_flags: &[],
14202        capability_family: "diagnostics",
14203        retry_safety: "pre_submit_only",
14204        identity_requirement: "caller_action_id",
14205        resolver: None,
14206        cancellation: "per_call_until_submission_then_resolve",
14207        side_effects: &["commits_authoritative_state"],
14208        recovery: "retry_if_not_submitted",
14209        collection_index_ref: "request_index",
14210    },
14211    CommandSemanticContract {
14212        command: Command::CalibrateVectorStrategy,
14213        admissible_errors: &[
14214            ErrorCode::Aborted,
14215            ErrorCode::DeadlineExceeded,
14216            ErrorCode::InvalidRequest,
14217            ErrorCode::UnsupportedVersion,
14218            ErrorCode::Unauthenticated,
14219            ErrorCode::PermissionDenied,
14220            ErrorCode::NotFound,
14221            ErrorCode::Conflict,
14222            ErrorCode::LimitExceeded,
14223            ErrorCode::CapabilityUnavailable,
14224            ErrorCode::NotSubmitted,
14225            ErrorCode::SubmittedIndeterminate,
14226            ErrorCode::ExpiredUnknown,
14227            ErrorCode::TemporarilyUnavailable,
14228            ErrorCode::Internal,
14229        ],
14230        limit_ids: &[
14231            "request_bytes",
14232            "response_bytes",
14233            "vector_dimensions",
14234            "vector_query_bytes",
14235            "vector_request_bytes",
14236            "vector_candidates",
14237            "vector_evaluation_queries",
14238            "vector_evaluation_k",
14239            "vector_evaluation_profiles",
14240            "vector_evaluation_artifact_bytes",
14241        ],
14242        effect_class: "durable_submit",
14243        risk_flags: &[],
14244        capability_family: "diagnostics",
14245        retry_safety: "pre_submit_only",
14246        identity_requirement: "caller_action_id",
14247        resolver: None,
14248        cancellation: "per_call_until_submission_then_resolve",
14249        side_effects: &["commits_authoritative_state"],
14250        recovery: "retry_if_not_submitted",
14251        collection_index_ref: "request_index",
14252    },
14253    CommandSemanticContract {
14254        command: Command::GetVectorDiagnostic,
14255        admissible_errors: &[
14256            ErrorCode::Aborted,
14257            ErrorCode::DeadlineExceeded,
14258            ErrorCode::InvalidRequest,
14259            ErrorCode::UnsupportedVersion,
14260            ErrorCode::Unauthenticated,
14261            ErrorCode::PermissionDenied,
14262            ErrorCode::NotFound,
14263            ErrorCode::LimitExceeded,
14264            ErrorCode::CapabilityUnavailable,
14265            ErrorCode::TemporarilyUnavailable,
14266            ErrorCode::Internal,
14267        ],
14268        limit_ids: &["request_bytes", "response_bytes"],
14269        effect_class: "read_only",
14270        risk_flags: &[],
14271        capability_family: "diagnostics",
14272        retry_safety: "safe",
14273        identity_requirement: "request_locator",
14274        resolver: None,
14275        cancellation: "per_call",
14276        side_effects: &[],
14277        recovery: "retry",
14278        collection_index_ref: "none",
14279    },
14280    CommandSemanticContract {
14281        command: Command::CreateDiagnostic,
14282        admissible_errors: &[
14283            ErrorCode::Aborted,
14284            ErrorCode::DeadlineExceeded,
14285            ErrorCode::InvalidRequest,
14286            ErrorCode::UnsupportedVersion,
14287            ErrorCode::Unauthenticated,
14288            ErrorCode::PermissionDenied,
14289            ErrorCode::NotFound,
14290            ErrorCode::Conflict,
14291            ErrorCode::LimitExceeded,
14292            ErrorCode::CapabilityUnavailable,
14293            ErrorCode::NotSubmitted,
14294            ErrorCode::SubmittedIndeterminate,
14295            ErrorCode::ExpiredUnknown,
14296            ErrorCode::TemporarilyUnavailable,
14297            ErrorCode::Internal,
14298        ],
14299        limit_ids: &["request_bytes", "response_bytes"],
14300        effect_class: "durable_submit",
14301        risk_flags: &[],
14302        capability_family: "diagnostics",
14303        retry_safety: "pre_submit_only",
14304        identity_requirement: "none",
14305        resolver: None,
14306        cancellation: "per_call_until_submission_then_resolve",
14307        side_effects: &["commits_authoritative_state"],
14308        recovery: "retry_if_not_submitted",
14309        collection_index_ref: "none",
14310    },
14311    CommandSemanticContract {
14312        command: Command::GetDiagnostic,
14313        admissible_errors: &[
14314            ErrorCode::Aborted,
14315            ErrorCode::DeadlineExceeded,
14316            ErrorCode::InvalidRequest,
14317            ErrorCode::UnsupportedVersion,
14318            ErrorCode::Unauthenticated,
14319            ErrorCode::PermissionDenied,
14320            ErrorCode::NotFound,
14321            ErrorCode::LimitExceeded,
14322            ErrorCode::CapabilityUnavailable,
14323            ErrorCode::TemporarilyUnavailable,
14324            ErrorCode::Internal,
14325        ],
14326        limit_ids: &["request_bytes", "response_bytes"],
14327        effect_class: "read_only",
14328        risk_flags: &[],
14329        capability_family: "diagnostics",
14330        retry_safety: "safe",
14331        identity_requirement: "request_locator",
14332        resolver: None,
14333        cancellation: "per_call",
14334        side_effects: &[],
14335        recovery: "retry",
14336        collection_index_ref: "none",
14337    },
14338    CommandSemanticContract {
14339        command: Command::PrepareCollectionExport,
14340        admissible_errors: &[
14341            ErrorCode::Aborted,
14342            ErrorCode::DeadlineExceeded,
14343            ErrorCode::InvalidRequest,
14344            ErrorCode::UnsupportedVersion,
14345            ErrorCode::Unauthenticated,
14346            ErrorCode::PermissionDenied,
14347            ErrorCode::NotFound,
14348            ErrorCode::LimitExceeded,
14349            ErrorCode::CapabilityUnavailable,
14350            ErrorCode::TemporarilyUnavailable,
14351            ErrorCode::Internal,
14352        ],
14353        limit_ids: &[
14354            "request_bytes",
14355            "response_bytes",
14356            "collection_export_bytes",
14357            "portability_prefix_bytes",
14358        ],
14359        effect_class: "prepare",
14360        risk_flags: &[],
14361        capability_family: "portability",
14362        retry_safety: "safe",
14363        identity_requirement: "caller_action_id",
14364        resolver: None,
14365        cancellation: "per_call",
14366        side_effects: &[],
14367        recovery: "retry",
14368        collection_index_ref: "none",
14369    },
14370    CommandSemanticContract {
14371        command: Command::StartCollectionExport,
14372        admissible_errors: &[
14373            ErrorCode::Aborted,
14374            ErrorCode::DeadlineExceeded,
14375            ErrorCode::InvalidRequest,
14376            ErrorCode::UnsupportedVersion,
14377            ErrorCode::Unauthenticated,
14378            ErrorCode::PermissionDenied,
14379            ErrorCode::NotFound,
14380            ErrorCode::Conflict,
14381            ErrorCode::LimitExceeded,
14382            ErrorCode::CapabilityUnavailable,
14383            ErrorCode::NotSubmitted,
14384            ErrorCode::SubmittedIndeterminate,
14385            ErrorCode::ExpiredUnknown,
14386            ErrorCode::TemporarilyUnavailable,
14387            ErrorCode::Internal,
14388        ],
14389        limit_ids: &[
14390            "request_bytes",
14391            "response_bytes",
14392            "collection_export_bytes",
14393            "collection_export_documents",
14394            "portability_prefix_bytes",
14395        ],
14396        effect_class: "durable_submit",
14397        risk_flags: &[],
14398        capability_family: "portability",
14399        retry_safety: "pre_submit_only",
14400        identity_requirement: "caller_action_id",
14401        resolver: Some(Command::ResolveCollectionExport),
14402        cancellation: "per_call_until_submission_then_resolve",
14403        side_effects: &["commits_authoritative_state", "writes_external_artifact"],
14404        recovery: "resolve_with_resolve_collection_export",
14405        collection_index_ref: "none",
14406    },
14407    CommandSemanticContract {
14408        command: Command::ResolveCollectionExport,
14409        admissible_errors: &[
14410            ErrorCode::Aborted,
14411            ErrorCode::DeadlineExceeded,
14412            ErrorCode::InvalidRequest,
14413            ErrorCode::UnsupportedVersion,
14414            ErrorCode::Unauthenticated,
14415            ErrorCode::PermissionDenied,
14416            ErrorCode::NotFound,
14417            ErrorCode::LimitExceeded,
14418            ErrorCode::CapabilityUnavailable,
14419            ErrorCode::TemporarilyUnavailable,
14420            ErrorCode::Internal,
14421        ],
14422        limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
14423        effect_class: "read_only",
14424        risk_flags: &[],
14425        capability_family: "portability",
14426        retry_safety: "safe",
14427        identity_requirement: "caller_action_id",
14428        resolver: None,
14429        cancellation: "per_call",
14430        side_effects: &[],
14431        recovery: "retry",
14432        collection_index_ref: "none",
14433    },
14434    CommandSemanticContract {
14435        command: Command::VerifyCollectionExport,
14436        admissible_errors: &[
14437            ErrorCode::Aborted,
14438            ErrorCode::DeadlineExceeded,
14439            ErrorCode::InvalidRequest,
14440            ErrorCode::UnsupportedVersion,
14441            ErrorCode::Unauthenticated,
14442            ErrorCode::PermissionDenied,
14443            ErrorCode::NotFound,
14444            ErrorCode::LimitExceeded,
14445            ErrorCode::CapabilityUnavailable,
14446            ErrorCode::ChecksumMismatch,
14447            ErrorCode::TemporarilyUnavailable,
14448            ErrorCode::Internal,
14449        ],
14450        limit_ids: &[
14451            "request_bytes",
14452            "response_bytes",
14453            "collection_export_bytes",
14454            "portability_prefix_bytes",
14455        ],
14456        effect_class: "read_only",
14457        risk_flags: &[],
14458        capability_family: "portability",
14459        retry_safety: "safe",
14460        identity_requirement: "request_locator",
14461        resolver: None,
14462        cancellation: "per_call",
14463        side_effects: &[],
14464        recovery: "retry",
14465        collection_index_ref: "none",
14466    },
14467    CommandSemanticContract {
14468        command: Command::PrepareCollectionRestore,
14469        admissible_errors: &[
14470            ErrorCode::Aborted,
14471            ErrorCode::DeadlineExceeded,
14472            ErrorCode::InvalidRequest,
14473            ErrorCode::UnsupportedVersion,
14474            ErrorCode::Unauthenticated,
14475            ErrorCode::PermissionDenied,
14476            ErrorCode::NotFound,
14477            ErrorCode::Conflict,
14478            ErrorCode::LimitExceeded,
14479            ErrorCode::CapabilityUnavailable,
14480            ErrorCode::ChecksumMismatch,
14481            ErrorCode::TemporarilyUnavailable,
14482            ErrorCode::Internal,
14483        ],
14484        limit_ids: &[
14485            "request_bytes",
14486            "response_bytes",
14487            "collection_export_bytes",
14488            "portability_prefix_bytes",
14489        ],
14490        effect_class: "prepare",
14491        risk_flags: &[],
14492        capability_family: "portability",
14493        retry_safety: "safe",
14494        identity_requirement: "caller_action_id",
14495        resolver: None,
14496        cancellation: "per_call",
14497        side_effects: &[],
14498        recovery: "retry",
14499        collection_index_ref: "none",
14500    },
14501    CommandSemanticContract {
14502        command: Command::StartCollectionRestore,
14503        admissible_errors: &[
14504            ErrorCode::Aborted,
14505            ErrorCode::DeadlineExceeded,
14506            ErrorCode::InvalidRequest,
14507            ErrorCode::UnsupportedVersion,
14508            ErrorCode::Unauthenticated,
14509            ErrorCode::PermissionDenied,
14510            ErrorCode::NotFound,
14511            ErrorCode::Conflict,
14512            ErrorCode::LimitExceeded,
14513            ErrorCode::CapabilityUnavailable,
14514            ErrorCode::NotSubmitted,
14515            ErrorCode::SubmittedIndeterminate,
14516            ErrorCode::ExpiredUnknown,
14517            ErrorCode::ChecksumMismatch,
14518            ErrorCode::TemporarilyUnavailable,
14519            ErrorCode::Internal,
14520        ],
14521        limit_ids: &[
14522            "request_bytes",
14523            "response_bytes",
14524            "collection_export_bytes",
14525            "collection_export_documents",
14526            "portability_prefix_bytes",
14527        ],
14528        effect_class: "durable_submit",
14529        risk_flags: &[],
14530        capability_family: "portability",
14531        retry_safety: "pre_submit_only",
14532        identity_requirement: "caller_action_id",
14533        resolver: Some(Command::ResolveCollectionRestore),
14534        cancellation: "per_call_until_submission_then_resolve",
14535        side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
14536        recovery: "resolve_with_resolve_collection_restore",
14537        collection_index_ref: "none",
14538    },
14539    CommandSemanticContract {
14540        command: Command::ResolveCollectionRestore,
14541        admissible_errors: &[
14542            ErrorCode::Aborted,
14543            ErrorCode::DeadlineExceeded,
14544            ErrorCode::InvalidRequest,
14545            ErrorCode::UnsupportedVersion,
14546            ErrorCode::Unauthenticated,
14547            ErrorCode::PermissionDenied,
14548            ErrorCode::NotFound,
14549            ErrorCode::LimitExceeded,
14550            ErrorCode::CapabilityUnavailable,
14551            ErrorCode::TemporarilyUnavailable,
14552            ErrorCode::Internal,
14553        ],
14554        limit_ids: &["request_bytes", "response_bytes", "portability_prefix_bytes"],
14555        effect_class: "read_only",
14556        risk_flags: &[],
14557        capability_family: "portability",
14558        retry_safety: "safe",
14559        identity_requirement: "caller_action_id",
14560        resolver: None,
14561        cancellation: "per_call",
14562        side_effects: &[],
14563        recovery: "retry",
14564        collection_index_ref: "none",
14565    },
14566    CommandSemanticContract {
14567        command: Command::PrepareIndexExport,
14568        admissible_errors: &[
14569            ErrorCode::Aborted,
14570            ErrorCode::DeadlineExceeded,
14571            ErrorCode::InvalidRequest,
14572            ErrorCode::UnsupportedVersion,
14573            ErrorCode::Unauthenticated,
14574            ErrorCode::PermissionDenied,
14575            ErrorCode::NotFound,
14576            ErrorCode::LimitExceeded,
14577            ErrorCode::CapabilityUnavailable,
14578            ErrorCode::TemporarilyUnavailable,
14579            ErrorCode::Internal,
14580        ],
14581        limit_ids: &[
14582            "request_bytes",
14583            "response_bytes",
14584            "index_transfer_bytes",
14585            "index_transfer_records",
14586            "index_transfer_pages",
14587            "portability_prefix_bytes",
14588        ],
14589        effect_class: "prepare",
14590        risk_flags: &[],
14591        capability_family: "portability",
14592        retry_safety: "safe",
14593        identity_requirement: "caller_action_id",
14594        resolver: None,
14595        cancellation: "per_call",
14596        side_effects: &[],
14597        recovery: "retry",
14598        collection_index_ref: "request_index",
14599    },
14600    CommandSemanticContract {
14601        command: Command::StartIndexExport,
14602        admissible_errors: &[
14603            ErrorCode::Aborted,
14604            ErrorCode::DeadlineExceeded,
14605            ErrorCode::InvalidRequest,
14606            ErrorCode::UnsupportedVersion,
14607            ErrorCode::Unauthenticated,
14608            ErrorCode::PermissionDenied,
14609            ErrorCode::NotFound,
14610            ErrorCode::Conflict,
14611            ErrorCode::LimitExceeded,
14612            ErrorCode::CapabilityUnavailable,
14613            ErrorCode::NotSubmitted,
14614            ErrorCode::SubmittedIndeterminate,
14615            ErrorCode::ExpiredUnknown,
14616            ErrorCode::TemporarilyUnavailable,
14617            ErrorCode::Internal,
14618        ],
14619        limit_ids: &[
14620            "request_bytes",
14621            "response_bytes",
14622            "index_transfer_bytes",
14623            "index_transfer_records",
14624            "index_transfer_pages",
14625            "portability_prefix_bytes",
14626        ],
14627        effect_class: "durable_submit",
14628        risk_flags: &[],
14629        capability_family: "portability",
14630        retry_safety: "pre_submit_only",
14631        identity_requirement: "caller_action_id",
14632        resolver: Some(Command::ResolveIndexExport),
14633        cancellation: "per_call_until_submission_then_resolve",
14634        side_effects: &["commits_authoritative_state", "writes_external_artifact"],
14635        recovery: "resolve_with_resolve_index_export",
14636        collection_index_ref: "request_index",
14637    },
14638    CommandSemanticContract {
14639        command: Command::ResolveIndexExport,
14640        admissible_errors: &[
14641            ErrorCode::Aborted,
14642            ErrorCode::DeadlineExceeded,
14643            ErrorCode::InvalidRequest,
14644            ErrorCode::UnsupportedVersion,
14645            ErrorCode::Unauthenticated,
14646            ErrorCode::PermissionDenied,
14647            ErrorCode::NotFound,
14648            ErrorCode::LimitExceeded,
14649            ErrorCode::CapabilityUnavailable,
14650            ErrorCode::ChecksumMismatch,
14651            ErrorCode::TemporarilyUnavailable,
14652            ErrorCode::Internal,
14653        ],
14654        limit_ids: &[
14655            "request_bytes",
14656            "response_bytes",
14657            "index_transfer_bytes",
14658            "index_transfer_pages",
14659            "portability_prefix_bytes",
14660        ],
14661        effect_class: "read_only",
14662        risk_flags: &[],
14663        capability_family: "portability",
14664        retry_safety: "safe",
14665        identity_requirement: "caller_action_id",
14666        resolver: None,
14667        cancellation: "per_call",
14668        side_effects: &[],
14669        recovery: "retry",
14670        collection_index_ref: "request_index",
14671    },
14672    CommandSemanticContract {
14673        command: Command::VerifyIndexExport,
14674        admissible_errors: &[
14675            ErrorCode::Aborted,
14676            ErrorCode::DeadlineExceeded,
14677            ErrorCode::InvalidRequest,
14678            ErrorCode::UnsupportedVersion,
14679            ErrorCode::Unauthenticated,
14680            ErrorCode::PermissionDenied,
14681            ErrorCode::NotFound,
14682            ErrorCode::LimitExceeded,
14683            ErrorCode::CapabilityUnavailable,
14684            ErrorCode::ChecksumMismatch,
14685            ErrorCode::TemporarilyUnavailable,
14686            ErrorCode::Internal,
14687        ],
14688        limit_ids: &[
14689            "request_bytes",
14690            "response_bytes",
14691            "index_transfer_bytes",
14692            "index_transfer_pages",
14693            "portability_prefix_bytes",
14694        ],
14695        effect_class: "read_only",
14696        risk_flags: &[],
14697        capability_family: "portability",
14698        retry_safety: "safe",
14699        identity_requirement: "request_locator",
14700        resolver: None,
14701        cancellation: "per_call",
14702        side_effects: &[],
14703        recovery: "retry",
14704        collection_index_ref: "request_artifact_source_index",
14705    },
14706    CommandSemanticContract {
14707        command: Command::PrepareIndexImport,
14708        admissible_errors: &[
14709            ErrorCode::Aborted,
14710            ErrorCode::DeadlineExceeded,
14711            ErrorCode::InvalidRequest,
14712            ErrorCode::UnsupportedVersion,
14713            ErrorCode::Unauthenticated,
14714            ErrorCode::PermissionDenied,
14715            ErrorCode::NotFound,
14716            ErrorCode::Conflict,
14717            ErrorCode::LimitExceeded,
14718            ErrorCode::CapabilityUnavailable,
14719            ErrorCode::ChecksumMismatch,
14720            ErrorCode::TemporarilyUnavailable,
14721            ErrorCode::Internal,
14722        ],
14723        limit_ids: &[
14724            "request_bytes",
14725            "response_bytes",
14726            "index_transfer_bytes",
14727            "index_transfer_pages",
14728            "portability_prefix_bytes",
14729            "resource_initial_shards",
14730            "resource_target_shard_bytes",
14731            "resource_admission_weight",
14732            "resource_ram_bytes",
14733            "resource_nvme_bytes",
14734            "resource_refresh_millis",
14735            "resource_memtable_bytes",
14736            "resource_parallelism",
14737        ],
14738        effect_class: "prepare",
14739        risk_flags: &[],
14740        capability_family: "portability",
14741        retry_safety: "safe",
14742        identity_requirement: "caller_action_id",
14743        resolver: None,
14744        cancellation: "per_call",
14745        side_effects: &[],
14746        recovery: "retry",
14747        collection_index_ref: "request_destination_name",
14748    },
14749    CommandSemanticContract {
14750        command: Command::StartIndexImport,
14751        admissible_errors: &[
14752            ErrorCode::Aborted,
14753            ErrorCode::DeadlineExceeded,
14754            ErrorCode::InvalidRequest,
14755            ErrorCode::UnsupportedVersion,
14756            ErrorCode::Unauthenticated,
14757            ErrorCode::PermissionDenied,
14758            ErrorCode::NotFound,
14759            ErrorCode::Conflict,
14760            ErrorCode::LimitExceeded,
14761            ErrorCode::CapabilityUnavailable,
14762            ErrorCode::NotSubmitted,
14763            ErrorCode::SubmittedIndeterminate,
14764            ErrorCode::ExpiredUnknown,
14765            ErrorCode::ChecksumMismatch,
14766            ErrorCode::TemporarilyUnavailable,
14767            ErrorCode::Internal,
14768        ],
14769        limit_ids: &[
14770            "request_bytes",
14771            "response_bytes",
14772            "index_transfer_bytes",
14773            "index_transfer_pages",
14774            "portability_prefix_bytes",
14775            "resource_initial_shards",
14776            "resource_target_shard_bytes",
14777            "resource_admission_weight",
14778            "resource_ram_bytes",
14779            "resource_nvme_bytes",
14780            "resource_refresh_millis",
14781            "resource_memtable_bytes",
14782            "resource_parallelism",
14783        ],
14784        effect_class: "durable_submit",
14785        risk_flags: &[],
14786        capability_family: "portability",
14787        retry_safety: "pre_submit_only",
14788        identity_requirement: "caller_action_id",
14789        resolver: Some(Command::ResolveIndexImport),
14790        cancellation: "per_call_until_submission_then_resolve",
14791        side_effects: &["commits_authoritative_state", "creates_destination_owned_data"],
14792        recovery: "resolve_with_resolve_index_import",
14793        collection_index_ref: "request_destination_name",
14794    },
14795    CommandSemanticContract {
14796        command: Command::ResolveIndexImport,
14797        admissible_errors: &[
14798            ErrorCode::Aborted,
14799            ErrorCode::DeadlineExceeded,
14800            ErrorCode::InvalidRequest,
14801            ErrorCode::UnsupportedVersion,
14802            ErrorCode::Unauthenticated,
14803            ErrorCode::PermissionDenied,
14804            ErrorCode::NotFound,
14805            ErrorCode::LimitExceeded,
14806            ErrorCode::CapabilityUnavailable,
14807            ErrorCode::ChecksumMismatch,
14808            ErrorCode::TemporarilyUnavailable,
14809            ErrorCode::Internal,
14810        ],
14811        limit_ids: &[
14812            "request_bytes",
14813            "response_bytes",
14814            "index_transfer_bytes",
14815            "index_transfer_pages",
14816            "portability_prefix_bytes",
14817        ],
14818        effect_class: "read_only",
14819        risk_flags: &[],
14820        capability_family: "portability",
14821        retry_safety: "safe",
14822        identity_requirement: "caller_action_id",
14823        resolver: None,
14824        cancellation: "per_call",
14825        side_effects: &[],
14826        recovery: "retry",
14827        collection_index_ref: "request_destination_name",
14828    },
14829    CommandSemanticContract {
14830        command: Command::ReadArtifactChunk,
14831        admissible_errors: &[
14832            ErrorCode::Aborted,
14833            ErrorCode::DeadlineExceeded,
14834            ErrorCode::InvalidRequest,
14835            ErrorCode::UnsupportedVersion,
14836            ErrorCode::Unauthenticated,
14837            ErrorCode::PermissionDenied,
14838            ErrorCode::NotFound,
14839            ErrorCode::LimitExceeded,
14840            ErrorCode::CapabilityUnavailable,
14841            ErrorCode::ArtifactRangeInvalid,
14842            ErrorCode::ChecksumMismatch,
14843            ErrorCode::TemporarilyUnavailable,
14844            ErrorCode::Internal,
14845        ],
14846        limit_ids: &["request_bytes", "response_bytes", "artifact_chunk_bytes"],
14847        effect_class: "read_only",
14848        risk_flags: &[],
14849        capability_family: "operations",
14850        retry_safety: "safe",
14851        identity_requirement: "none",
14852        resolver: None,
14853        cancellation: "per_call",
14854        side_effects: &[],
14855        recovery: "retry",
14856        collection_index_ref: "none",
14857    },
14858    CommandSemanticContract {
14859        command: Command::ExportUsage,
14860        admissible_errors: &[
14861            ErrorCode::Aborted,
14862            ErrorCode::DeadlineExceeded,
14863            ErrorCode::InvalidRequest,
14864            ErrorCode::UnsupportedVersion,
14865            ErrorCode::Unauthenticated,
14866            ErrorCode::PermissionDenied,
14867            ErrorCode::NotFound,
14868            ErrorCode::StaleCursor,
14869            ErrorCode::RestartBudgetExhausted,
14870            ErrorCode::LimitExceeded,
14871            ErrorCode::CapabilityUnavailable,
14872            ErrorCode::TemporarilyUnavailable,
14873            ErrorCode::Internal,
14874        ],
14875        limit_ids: &["request_bytes", "response_bytes", "page_size"],
14876        effect_class: "read_only",
14877        risk_flags: &[],
14878        capability_family: "usage",
14879        retry_safety: "safe",
14880        identity_requirement: "none",
14881        resolver: None,
14882        cancellation: "per_call",
14883        side_effects: &[],
14884        recovery: "retry",
14885        collection_index_ref: "none",
14886    },
14887    CommandSemanticContract {
14888        command: Command::ExecuteStateRead,
14889        admissible_errors: &[
14890            ErrorCode::Aborted,
14891            ErrorCode::DeadlineExceeded,
14892            ErrorCode::InvalidRequest,
14893            ErrorCode::UnsupportedVersion,
14894            ErrorCode::Unauthenticated,
14895            ErrorCode::PermissionDenied,
14896            ErrorCode::NotFound,
14897            ErrorCode::LimitExceeded,
14898            ErrorCode::CapabilityUnavailable,
14899            ErrorCode::TemporarilyUnavailable,
14900            ErrorCode::Internal,
14901        ],
14902        limit_ids: &[
14903            "request_bytes",
14904            "response_bytes",
14905            "state_command_keys",
14906            "state_command_value_bytes",
14907        ],
14908        effect_class: "read_only",
14909        risk_flags: &[],
14910        capability_family: "data",
14911        retry_safety: "safe",
14912        identity_requirement: "none",
14913        resolver: None,
14914        cancellation: "per_call",
14915        side_effects: &[],
14916        recovery: "retry",
14917        collection_index_ref: "request_index",
14918    },
14919    CommandSemanticContract {
14920        command: Command::PrepareStateWrite,
14921        admissible_errors: &[
14922            ErrorCode::Aborted,
14923            ErrorCode::DeadlineExceeded,
14924            ErrorCode::InvalidRequest,
14925            ErrorCode::UnsupportedVersion,
14926            ErrorCode::Unauthenticated,
14927            ErrorCode::PermissionDenied,
14928            ErrorCode::NotFound,
14929            ErrorCode::LimitExceeded,
14930            ErrorCode::CapabilityUnavailable,
14931            ErrorCode::TemporarilyUnavailable,
14932            ErrorCode::Internal,
14933        ],
14934        limit_ids: &[
14935            "request_bytes",
14936            "response_bytes",
14937            "state_command_keys",
14938            "state_command_value_bytes",
14939        ],
14940        effect_class: "prepare",
14941        risk_flags: &[],
14942        capability_family: "data",
14943        retry_safety: "safe",
14944        identity_requirement: "caller_action_id",
14945        resolver: None,
14946        cancellation: "per_call",
14947        side_effects: &["creates_bounded_preparation"],
14948        recovery: "retry",
14949        collection_index_ref: "request_index",
14950    },
14951    CommandSemanticContract {
14952        command: Command::SubmitStateWrite,
14953        admissible_errors: &[
14954            ErrorCode::Aborted,
14955            ErrorCode::DeadlineExceeded,
14956            ErrorCode::InvalidRequest,
14957            ErrorCode::UnsupportedVersion,
14958            ErrorCode::Unauthenticated,
14959            ErrorCode::PermissionDenied,
14960            ErrorCode::NotFound,
14961            ErrorCode::Conflict,
14962            ErrorCode::LimitExceeded,
14963            ErrorCode::CapabilityUnavailable,
14964            ErrorCode::NotSubmitted,
14965            ErrorCode::SubmittedIndeterminate,
14966            ErrorCode::ExpiredUnknown,
14967            ErrorCode::TemporarilyUnavailable,
14968            ErrorCode::Internal,
14969        ],
14970        limit_ids: &[
14971            "request_bytes",
14972            "response_bytes",
14973            "state_command_keys",
14974            "state_command_value_bytes",
14975        ],
14976        effect_class: "durable_submit",
14977        risk_flags: &[],
14978        capability_family: "data",
14979        retry_safety: "pre_submit_only",
14980        identity_requirement: "request_locator",
14981        resolver: Some(Command::ResolveStateWrite),
14982        cancellation: "per_call_until_submission_then_resolve",
14983        side_effects: &["commits_authoritative_state"],
14984        recovery: "resolve_with_resolve_state_write",
14985        collection_index_ref: "request_index",
14986    },
14987    CommandSemanticContract {
14988        command: Command::ResolveStateWrite,
14989        admissible_errors: &[
14990            ErrorCode::Aborted,
14991            ErrorCode::DeadlineExceeded,
14992            ErrorCode::InvalidRequest,
14993            ErrorCode::UnsupportedVersion,
14994            ErrorCode::Unauthenticated,
14995            ErrorCode::PermissionDenied,
14996            ErrorCode::NotFound,
14997            ErrorCode::LimitExceeded,
14998            ErrorCode::CapabilityUnavailable,
14999            ErrorCode::TemporarilyUnavailable,
15000            ErrorCode::Internal,
15001        ],
15002        limit_ids: &[
15003            "request_bytes",
15004            "response_bytes",
15005            "state_command_keys",
15006            "state_command_value_bytes",
15007        ],
15008        effect_class: "read_only",
15009        risk_flags: &[],
15010        capability_family: "data",
15011        retry_safety: "safe",
15012        identity_requirement: "request_locator",
15013        resolver: None,
15014        cancellation: "per_call",
15015        side_effects: &[],
15016        recovery: "retry",
15017        collection_index_ref: "request_index",
15018    },
15019];
15020#[derive(Clone, Copy, Debug, Eq, PartialEq)]
15021pub struct CommandOutcomeContract {
15022    pub command: Command,
15023    pub possible_submission_states: &'static [&'static str],
15024    pub identity_requirement: &'static str,
15025    pub resolver_command: Option<Command>,
15026    pub cancellation: &'static str,
15027}
15028pub const LODESTONE_API_COMMAND_OUTCOMES: &[CommandOutcomeContract] = &[
15029    CommandOutcomeContract {
15030        command: Command::Discover,
15031        possible_submission_states: &["not_submitted", "resolved"],
15032        identity_requirement: "none",
15033        resolver_command: None,
15034        cancellation: "per_call",
15035    },
15036    CommandOutcomeContract {
15037        command: Command::ListIndexes,
15038        possible_submission_states: &["not_submitted", "resolved"],
15039        identity_requirement: "none",
15040        resolver_command: None,
15041        cancellation: "per_call",
15042    },
15043    CommandOutcomeContract {
15044        command: Command::GetIndex,
15045        possible_submission_states: &["not_submitted", "resolved"],
15046        identity_requirement: "none",
15047        resolver_command: None,
15048        cancellation: "per_call",
15049    },
15050    CommandOutcomeContract {
15051        command: Command::ValidateIndexChange,
15052        possible_submission_states: &["not_submitted", "resolved"],
15053        identity_requirement: "none",
15054        resolver_command: None,
15055        cancellation: "per_call",
15056    },
15057    CommandOutcomeContract {
15058        command: Command::ApplyIndexChange,
15059        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15060        identity_requirement: "caller_action_id",
15061        resolver_command: None,
15062        cancellation: "per_call_until_submission_then_resolve",
15063    },
15064    CommandOutcomeContract {
15065        command: Command::ApplyAdministrationMutation,
15066        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15067        identity_requirement: "caller_action_id",
15068        resolver_command: None,
15069        cancellation: "per_call_until_submission_then_resolve",
15070    },
15071    CommandOutcomeContract {
15072        command: Command::ListAliases,
15073        possible_submission_states: &["not_submitted", "resolved"],
15074        identity_requirement: "none",
15075        resolver_command: None,
15076        cancellation: "per_call",
15077    },
15078    CommandOutcomeContract {
15079        command: Command::GetAlias,
15080        possible_submission_states: &["not_submitted", "resolved"],
15081        identity_requirement: "none",
15082        resolver_command: None,
15083        cancellation: "per_call",
15084    },
15085    CommandOutcomeContract {
15086        command: Command::ListDataStreams,
15087        possible_submission_states: &["not_submitted", "resolved"],
15088        identity_requirement: "none",
15089        resolver_command: None,
15090        cancellation: "per_call",
15091    },
15092    CommandOutcomeContract {
15093        command: Command::GetDataStream,
15094        possible_submission_states: &["not_submitted", "resolved"],
15095        identity_requirement: "none",
15096        resolver_command: None,
15097        cancellation: "per_call",
15098    },
15099    CommandOutcomeContract {
15100        command: Command::ListComponentTemplates,
15101        possible_submission_states: &["not_submitted", "resolved"],
15102        identity_requirement: "none",
15103        resolver_command: None,
15104        cancellation: "per_call",
15105    },
15106    CommandOutcomeContract {
15107        command: Command::GetComponentTemplate,
15108        possible_submission_states: &["not_submitted", "resolved"],
15109        identity_requirement: "none",
15110        resolver_command: None,
15111        cancellation: "per_call",
15112    },
15113    CommandOutcomeContract {
15114        command: Command::ListIndexTemplates,
15115        possible_submission_states: &["not_submitted", "resolved"],
15116        identity_requirement: "none",
15117        resolver_command: None,
15118        cancellation: "per_call",
15119    },
15120    CommandOutcomeContract {
15121        command: Command::GetIndexTemplate,
15122        possible_submission_states: &["not_submitted", "resolved"],
15123        identity_requirement: "none",
15124        resolver_command: None,
15125        cancellation: "per_call",
15126    },
15127    CommandOutcomeContract {
15128        command: Command::ListIngestPipelines,
15129        possible_submission_states: &["not_submitted", "resolved"],
15130        identity_requirement: "none",
15131        resolver_command: None,
15132        cancellation: "per_call",
15133    },
15134    CommandOutcomeContract {
15135        command: Command::GetIngestPipeline,
15136        possible_submission_states: &["not_submitted", "resolved"],
15137        identity_requirement: "none",
15138        resolver_command: None,
15139        cancellation: "per_call",
15140    },
15141    CommandOutcomeContract {
15142        command: Command::SimulateIngestPipeline,
15143        possible_submission_states: &["not_submitted", "resolved"],
15144        identity_requirement: "none",
15145        resolver_command: None,
15146        cancellation: "per_call",
15147    },
15148    CommandOutcomeContract {
15149        command: Command::ReprocessByQuery,
15150        possible_submission_states: &[
15151            "not_submitted",
15152            "submitted",
15153            "known_retired",
15154            "indeterminate",
15155            "resolved",
15156        ],
15157        identity_requirement: "caller_action_id",
15158        resolver_command: None,
15159        cancellation: "per_call_until_submission_then_resolve",
15160    },
15161    CommandOutcomeContract {
15162        command: Command::ListLifecyclePolicies,
15163        possible_submission_states: &["not_submitted", "resolved"],
15164        identity_requirement: "none",
15165        resolver_command: None,
15166        cancellation: "per_call",
15167    },
15168    CommandOutcomeContract {
15169        command: Command::GetLifecyclePolicy,
15170        possible_submission_states: &["not_submitted", "resolved"],
15171        identity_requirement: "none",
15172        resolver_command: None,
15173        cancellation: "per_call",
15174    },
15175    CommandOutcomeContract {
15176        command: Command::PrepareCreateIndex,
15177        possible_submission_states: &["not_submitted", "resolved"],
15178        identity_requirement: "server_locator",
15179        resolver_command: None,
15180        cancellation: "per_call",
15181    },
15182    CommandOutcomeContract {
15183        command: Command::PrepareDeleteIndex,
15184        possible_submission_states: &["not_submitted", "resolved"],
15185        identity_requirement: "server_locator",
15186        resolver_command: None,
15187        cancellation: "per_call",
15188    },
15189    CommandOutcomeContract {
15190        command: Command::SubmitCatalogAction,
15191        possible_submission_states: &[
15192            "not_submitted",
15193            "submitted",
15194            "known_retired",
15195            "indeterminate",
15196            "resolved",
15197        ],
15198        identity_requirement: "request_locator",
15199        resolver_command: Some(Command::ResolveCatalogAction),
15200        cancellation: "per_call_until_submission_then_resolve",
15201    },
15202    CommandOutcomeContract {
15203        command: Command::ResolveCatalogAction,
15204        possible_submission_states: &["not_submitted", "resolved"],
15205        identity_requirement: "request_locator",
15206        resolver_command: None,
15207        cancellation: "per_call",
15208    },
15209    CommandOutcomeContract {
15210        command: Command::PrepareReplayableSourceIndex,
15211        possible_submission_states: &["not_submitted", "resolved"],
15212        identity_requirement: "server_locator",
15213        resolver_command: None,
15214        cancellation: "per_call",
15215    },
15216    CommandOutcomeContract {
15217        command: Command::SubmitReplayableSourceIndex,
15218        possible_submission_states: &[
15219            "not_submitted",
15220            "submitted",
15221            "known_retired",
15222            "indeterminate",
15223            "resolved",
15224        ],
15225        identity_requirement: "request_locator",
15226        resolver_command: Some(Command::ResolveCatalogAction),
15227        cancellation: "per_call_until_submission_then_resolve",
15228    },
15229    CommandOutcomeContract {
15230        command: Command::GetReplayableSource,
15231        possible_submission_states: &["not_submitted", "resolved"],
15232        identity_requirement: "none",
15233        resolver_command: None,
15234        cancellation: "per_call",
15235    },
15236    CommandOutcomeContract {
15237        command: Command::ControlReplayableSource,
15238        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15239        identity_requirement: "none",
15240        resolver_command: None,
15241        cancellation: "per_call_until_submission_then_resolve",
15242    },
15243    CommandOutcomeContract {
15244        command: Command::CloneIndex,
15245        possible_submission_states: &[
15246            "not_submitted",
15247            "submitted",
15248            "known_retired",
15249            "indeterminate",
15250            "resolved",
15251        ],
15252        identity_requirement: "caller_action_id",
15253        resolver_command: Some(Command::CloneIndex),
15254        cancellation: "per_call_until_submission_then_resolve",
15255    },
15256    CommandOutcomeContract {
15257        command: Command::ConfigureHistory,
15258        possible_submission_states: &[
15259            "not_submitted",
15260            "submitted",
15261            "known_retired",
15262            "indeterminate",
15263            "resolved",
15264        ],
15265        identity_requirement: "none",
15266        resolver_command: Some(Command::GetHistory),
15267        cancellation: "per_call_until_submission_then_resolve",
15268    },
15269    CommandOutcomeContract {
15270        command: Command::GetHistory,
15271        possible_submission_states: &["not_submitted", "resolved"],
15272        identity_requirement: "none",
15273        resolver_command: None,
15274        cancellation: "per_call",
15275    },
15276    CommandOutcomeContract {
15277        command: Command::ResolveHistory,
15278        possible_submission_states: &["not_submitted", "resolved"],
15279        identity_requirement: "none",
15280        resolver_command: None,
15281        cancellation: "per_call",
15282    },
15283    CommandOutcomeContract {
15284        command: Command::PlaceHistoryHold,
15285        possible_submission_states: &[
15286            "not_submitted",
15287            "submitted",
15288            "known_retired",
15289            "indeterminate",
15290            "resolved",
15291        ],
15292        identity_requirement: "none",
15293        resolver_command: Some(Command::GetHistory),
15294        cancellation: "per_call_until_submission_then_resolve",
15295    },
15296    CommandOutcomeContract {
15297        command: Command::ReleaseHistoryHold,
15298        possible_submission_states: &[
15299            "not_submitted",
15300            "submitted",
15301            "known_retired",
15302            "indeterminate",
15303            "resolved",
15304        ],
15305        identity_requirement: "none",
15306        resolver_command: Some(Command::GetHistory),
15307        cancellation: "per_call_until_submission_then_resolve",
15308    },
15309    CommandOutcomeContract {
15310        command: Command::PrepareDocumentMutation,
15311        possible_submission_states: &["not_submitted", "resolved"],
15312        identity_requirement: "server_locator",
15313        resolver_command: None,
15314        cancellation: "per_call",
15315    },
15316    CommandOutcomeContract {
15317        command: Command::SubmitDocumentMutation,
15318        possible_submission_states: &[
15319            "not_submitted",
15320            "submitted",
15321            "known_retired",
15322            "indeterminate",
15323            "resolved",
15324        ],
15325        identity_requirement: "request_locator",
15326        resolver_command: Some(Command::ResolveDocumentMutation),
15327        cancellation: "per_call_until_submission_then_resolve",
15328    },
15329    CommandOutcomeContract {
15330        command: Command::PrepareDocumentBulk,
15331        possible_submission_states: &["not_submitted", "resolved"],
15332        identity_requirement: "caller_action_id",
15333        resolver_command: None,
15334        cancellation: "per_call",
15335    },
15336    CommandOutcomeContract {
15337        command: Command::SubmitDocumentBulk,
15338        possible_submission_states: &[
15339            "not_submitted",
15340            "submitted",
15341            "known_retired",
15342            "indeterminate",
15343            "resolved",
15344        ],
15345        identity_requirement: "caller_action_id",
15346        resolver_command: Some(Command::ResolveDocumentBulk),
15347        cancellation: "per_call_until_submission_then_resolve",
15348    },
15349    CommandOutcomeContract {
15350        command: Command::ResolveDocumentBulk,
15351        possible_submission_states: &["not_submitted", "resolved"],
15352        identity_requirement: "caller_action_id",
15353        resolver_command: None,
15354        cancellation: "per_call",
15355    },
15356    CommandOutcomeContract {
15357        command: Command::PrepareAppendBulk,
15358        possible_submission_states: &["not_submitted", "resolved"],
15359        identity_requirement: "caller_action_id",
15360        resolver_command: None,
15361        cancellation: "per_call",
15362    },
15363    CommandOutcomeContract {
15364        command: Command::SubmitAppendBulk,
15365        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15366        identity_requirement: "request_locator",
15367        resolver_command: Some(Command::ResolveAppendBulk),
15368        cancellation: "per_call_until_submission_then_resolve",
15369    },
15370    CommandOutcomeContract {
15371        command: Command::ResolveAppendBulk,
15372        possible_submission_states: &["not_submitted", "resolved"],
15373        identity_requirement: "request_locator",
15374        resolver_command: None,
15375        cancellation: "per_call",
15376    },
15377    CommandOutcomeContract {
15378        command: Command::ObserveAppendCommitted,
15379        possible_submission_states: &["not_submitted", "resolved"],
15380        identity_requirement: "request_locator",
15381        resolver_command: None,
15382        cancellation: "per_call",
15383    },
15384    CommandOutcomeContract {
15385        command: Command::ResolveDocumentMutation,
15386        possible_submission_states: &["not_submitted", "resolved"],
15387        identity_requirement: "request_locator",
15388        resolver_command: None,
15389        cancellation: "per_call",
15390    },
15391    CommandOutcomeContract {
15392        command: Command::GetDocument,
15393        possible_submission_states: &["not_submitted", "resolved"],
15394        identity_requirement: "none",
15395        resolver_command: None,
15396        cancellation: "per_call",
15397    },
15398    CommandOutcomeContract {
15399        command: Command::Search,
15400        possible_submission_states: &["not_submitted", "resolved"],
15401        identity_requirement: "none",
15402        resolver_command: None,
15403        cancellation: "per_call",
15404    },
15405    CommandOutcomeContract {
15406        command: Command::TraverseRelationships,
15407        possible_submission_states: &["not_submitted", "resolved"],
15408        identity_requirement: "none",
15409        resolver_command: None,
15410        cancellation: "per_call",
15411    },
15412    CommandOutcomeContract {
15413        command: Command::QueryProfiles,
15414        possible_submission_states: &["not_submitted", "resolved"],
15415        identity_requirement: "none",
15416        resolver_command: None,
15417        cancellation: "per_call",
15418    },
15419    CommandOutcomeContract {
15420        command: Command::EvaluateTemporalEvidence,
15421        possible_submission_states: &["not_submitted", "resolved"],
15422        identity_requirement: "none",
15423        resolver_command: None,
15424        cancellation: "per_call",
15425    },
15426    CommandOutcomeContract {
15427        command: Command::CreateContinuousTemporalEvaluation,
15428        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15429        identity_requirement: "caller_action_id",
15430        resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15431        cancellation: "per_call_until_submission_then_resolve",
15432    },
15433    CommandOutcomeContract {
15434        command: Command::GetContinuousTemporalEvaluation,
15435        possible_submission_states: &["not_submitted", "resolved"],
15436        identity_requirement: "none",
15437        resolver_command: None,
15438        cancellation: "per_call",
15439    },
15440    CommandOutcomeContract {
15441        command: Command::PauseContinuousTemporalEvaluation,
15442        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15443        identity_requirement: "caller_action_id",
15444        resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15445        cancellation: "per_call_until_submission_then_resolve",
15446    },
15447    CommandOutcomeContract {
15448        command: Command::ResumeContinuousTemporalEvaluation,
15449        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15450        identity_requirement: "caller_action_id",
15451        resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15452        cancellation: "per_call_until_submission_then_resolve",
15453    },
15454    CommandOutcomeContract {
15455        command: Command::ReplaceContinuousTemporalEvaluation,
15456        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15457        identity_requirement: "caller_action_id",
15458        resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15459        cancellation: "per_call_until_submission_then_resolve",
15460    },
15461    CommandOutcomeContract {
15462        command: Command::RetireContinuousTemporalEvaluation,
15463        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15464        identity_requirement: "caller_action_id",
15465        resolver_command: Some(Command::GetContinuousTemporalEvaluation),
15466        cancellation: "per_call_until_submission_then_resolve",
15467    },
15468    CommandOutcomeContract {
15469        command: Command::ReadContinuousTemporalEvidence,
15470        possible_submission_states: &["not_submitted", "resolved"],
15471        identity_requirement: "none",
15472        resolver_command: None,
15473        cancellation: "per_call",
15474    },
15475    CommandOutcomeContract {
15476        command: Command::ValidateSearch,
15477        possible_submission_states: &["not_submitted", "resolved"],
15478        identity_requirement: "none",
15479        resolver_command: None,
15480        cancellation: "per_call",
15481    },
15482    CommandOutcomeContract {
15483        command: Command::OpenPit,
15484        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15485        identity_requirement: "none",
15486        resolver_command: None,
15487        cancellation: "per_call_until_submission_then_resolve",
15488    },
15489    CommandOutcomeContract {
15490        command: Command::RenewPit,
15491        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15492        identity_requirement: "none",
15493        resolver_command: None,
15494        cancellation: "per_call_until_submission_then_resolve",
15495    },
15496    CommandOutcomeContract {
15497        command: Command::ClosePit,
15498        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15499        identity_requirement: "none",
15500        resolver_command: None,
15501        cancellation: "per_call_until_submission_then_resolve",
15502    },
15503    CommandOutcomeContract {
15504        command: Command::ListOperations,
15505        possible_submission_states: &["not_submitted", "resolved"],
15506        identity_requirement: "none",
15507        resolver_command: None,
15508        cancellation: "per_call",
15509    },
15510    CommandOutcomeContract {
15511        command: Command::GetOperation,
15512        possible_submission_states: &["not_submitted", "resolved"],
15513        identity_requirement: "request_locator",
15514        resolver_command: None,
15515        cancellation: "per_call",
15516    },
15517    CommandOutcomeContract {
15518        command: Command::WaitOperation,
15519        possible_submission_states: &["not_submitted", "resolved"],
15520        identity_requirement: "request_locator",
15521        resolver_command: None,
15522        cancellation: "per_call",
15523    },
15524    CommandOutcomeContract {
15525        command: Command::CancelOperation,
15526        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15527        identity_requirement: "request_locator",
15528        resolver_command: None,
15529        cancellation: "per_call_until_submission_then_resolve",
15530    },
15531    CommandOutcomeContract {
15532        command: Command::ListAuditEvents,
15533        possible_submission_states: &["not_submitted", "resolved"],
15534        identity_requirement: "none",
15535        resolver_command: None,
15536        cancellation: "per_call",
15537    },
15538    CommandOutcomeContract {
15539        command: Command::ExportAuditEvents,
15540        possible_submission_states: &["not_submitted", "resolved"],
15541        identity_requirement: "none",
15542        resolver_command: None,
15543        cancellation: "per_call",
15544    },
15545    CommandOutcomeContract {
15546        command: Command::ReserveServiceCredential,
15547        possible_submission_states: &[
15548            "not_submitted",
15549            "submitted",
15550            "known_retired",
15551            "indeterminate",
15552            "resolved",
15553        ],
15554        identity_requirement: "caller_action_id",
15555        resolver_command: Some(Command::ResolveServiceCredentialReservation),
15556        cancellation: "per_call_until_submission_then_resolve",
15557    },
15558    CommandOutcomeContract {
15559        command: Command::ReserveServiceCredentialRotation,
15560        possible_submission_states: &[
15561            "not_submitted",
15562            "submitted",
15563            "known_retired",
15564            "indeterminate",
15565            "resolved",
15566        ],
15567        identity_requirement: "caller_action_id",
15568        resolver_command: Some(Command::ResolveServiceCredentialReservation),
15569        cancellation: "per_call_until_submission_then_resolve",
15570    },
15571    CommandOutcomeContract {
15572        command: Command::ActivateServiceCredential,
15573        possible_submission_states: &[
15574            "not_submitted",
15575            "submitted",
15576            "known_retired",
15577            "indeterminate",
15578            "resolved",
15579        ],
15580        identity_requirement: "server_locator",
15581        resolver_command: Some(Command::ResolveServiceCredentialReservation),
15582        cancellation: "per_call_until_submission_then_resolve",
15583    },
15584    CommandOutcomeContract {
15585        command: Command::ResolveServiceCredentialReservation,
15586        possible_submission_states: &["not_submitted", "resolved"],
15587        identity_requirement: "caller_action_id",
15588        resolver_command: None,
15589        cancellation: "per_call",
15590    },
15591    CommandOutcomeContract {
15592        command: Command::PrepareRevokeServiceCredential,
15593        possible_submission_states: &["not_submitted", "resolved"],
15594        identity_requirement: "server_locator",
15595        resolver_command: None,
15596        cancellation: "per_call",
15597    },
15598    CommandOutcomeContract {
15599        command: Command::RevokeServiceCredential,
15600        possible_submission_states: &[
15601            "not_submitted",
15602            "submitted",
15603            "known_retired",
15604            "indeterminate",
15605            "resolved",
15606        ],
15607        identity_requirement: "request_locator",
15608        resolver_command: Some(Command::ResolveSecurityAction),
15609        cancellation: "per_call_until_submission_then_resolve",
15610    },
15611    CommandOutcomeContract {
15612        command: Command::ResolveSecurityAction,
15613        possible_submission_states: &["not_submitted", "resolved"],
15614        identity_requirement: "request_locator",
15615        resolver_command: None,
15616        cancellation: "per_call",
15617    },
15618    CommandOutcomeContract {
15619        command: Command::GetSecurityRole,
15620        possible_submission_states: &["not_submitted", "resolved"],
15621        identity_requirement: "none",
15622        resolver_command: None,
15623        cancellation: "per_call",
15624    },
15625    CommandOutcomeContract {
15626        command: Command::PrepareRoleAppendAccessChange,
15627        possible_submission_states: &["not_submitted", "resolved"],
15628        identity_requirement: "server_locator",
15629        resolver_command: None,
15630        cancellation: "per_call",
15631    },
15632    CommandOutcomeContract {
15633        command: Command::SubmitRoleAppendAccessChange,
15634        possible_submission_states: &[
15635            "not_submitted",
15636            "submitted",
15637            "known_retired",
15638            "indeterminate",
15639            "resolved",
15640        ],
15641        identity_requirement: "request_locator",
15642        resolver_command: Some(Command::ResolveSecurityAction),
15643        cancellation: "per_call_until_submission_then_resolve",
15644    },
15645    CommandOutcomeContract {
15646        command: Command::ListServiceCredentials,
15647        possible_submission_states: &["not_submitted", "resolved"],
15648        identity_requirement: "none",
15649        resolver_command: None,
15650        cancellation: "per_call",
15651    },
15652    CommandOutcomeContract {
15653        command: Command::GetRuntimeStatus,
15654        possible_submission_states: &["not_submitted", "resolved"],
15655        identity_requirement: "none",
15656        resolver_command: None,
15657        cancellation: "per_call",
15658    },
15659    CommandOutcomeContract {
15660        command: Command::GetResultCacheStatus,
15661        possible_submission_states: &["not_submitted", "resolved"],
15662        identity_requirement: "none",
15663        resolver_command: None,
15664        cancellation: "per_call",
15665    },
15666    CommandOutcomeContract {
15667        command: Command::GetFieldPromotionStatus,
15668        possible_submission_states: &["not_submitted", "resolved"],
15669        identity_requirement: "none",
15670        resolver_command: None,
15671        cancellation: "per_call",
15672    },
15673    CommandOutcomeContract {
15674        command: Command::GetOverloadStatus,
15675        possible_submission_states: &["not_submitted", "resolved"],
15676        identity_requirement: "none",
15677        resolver_command: None,
15678        cancellation: "per_call",
15679    },
15680    CommandOutcomeContract {
15681        command: Command::ConfigureExternalKey,
15682        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15683        identity_requirement: "none",
15684        resolver_command: None,
15685        cancellation: "per_call_until_submission_then_resolve",
15686    },
15687    CommandOutcomeContract {
15688        command: Command::RotateExternalKeyBinding,
15689        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15690        identity_requirement: "none",
15691        resolver_command: None,
15692        cancellation: "per_call_until_submission_then_resolve",
15693    },
15694    CommandOutcomeContract {
15695        command: Command::ConfigureAggregateThenDelete,
15696        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15697        identity_requirement: "none",
15698        resolver_command: None,
15699        cancellation: "per_call_until_submission_then_resolve",
15700    },
15701    CommandOutcomeContract {
15702        command: Command::GetLifecycleStatus,
15703        possible_submission_states: &["not_submitted", "resolved"],
15704        identity_requirement: "none",
15705        resolver_command: None,
15706        cancellation: "per_call",
15707    },
15708    CommandOutcomeContract {
15709        command: Command::GetQuota,
15710        possible_submission_states: &["not_submitted", "resolved"],
15711        identity_requirement: "none",
15712        resolver_command: None,
15713        cancellation: "per_call",
15714    },
15715    CommandOutcomeContract {
15716        command: Command::UpdateQuota,
15717        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15718        identity_requirement: "none",
15719        resolver_command: None,
15720        cancellation: "per_call_until_submission_then_resolve",
15721    },
15722    CommandOutcomeContract {
15723        command: Command::GetBinding,
15724        possible_submission_states: &["not_submitted", "resolved"],
15725        identity_requirement: "none",
15726        resolver_command: None,
15727        cancellation: "per_call",
15728    },
15729    CommandOutcomeContract {
15730        command: Command::GetAdmissionStatus,
15731        possible_submission_states: &["not_submitted", "resolved"],
15732        identity_requirement: "none",
15733        resolver_command: None,
15734        cancellation: "per_call",
15735    },
15736    CommandOutcomeContract {
15737        command: Command::SetAdmission,
15738        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15739        identity_requirement: "none",
15740        resolver_command: None,
15741        cancellation: "per_call_until_submission_then_resolve",
15742    },
15743    CommandOutcomeContract {
15744        command: Command::GetQuiesceStatus,
15745        possible_submission_states: &["not_submitted", "resolved"],
15746        identity_requirement: "none",
15747        resolver_command: None,
15748        cancellation: "per_call",
15749    },
15750    CommandOutcomeContract {
15751        command: Command::GetDecommissionReadiness,
15752        possible_submission_states: &["not_submitted", "resolved"],
15753        identity_requirement: "none",
15754        resolver_command: None,
15755        cancellation: "per_call",
15756    },
15757    CommandOutcomeContract {
15758        command: Command::GetUpgradeReadiness,
15759        possible_submission_states: &["not_submitted", "resolved"],
15760        identity_requirement: "none",
15761        resolver_command: None,
15762        cancellation: "per_call",
15763    },
15764    CommandOutcomeContract {
15765        command: Command::GetMaintenanceStatus,
15766        possible_submission_states: &["not_submitted", "resolved"],
15767        identity_requirement: "none",
15768        resolver_command: None,
15769        cancellation: "per_call",
15770    },
15771    CommandOutcomeContract {
15772        command: Command::WarmVectorIndex,
15773        possible_submission_states: &["not_submitted", "resolved"],
15774        identity_requirement: "exact_root",
15775        resolver_command: None,
15776        cancellation: "per_call",
15777    },
15778    CommandOutcomeContract {
15779        command: Command::EvaluateVectorRecall,
15780        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15781        identity_requirement: "caller_action_id",
15782        resolver_command: None,
15783        cancellation: "per_call_until_submission_then_resolve",
15784    },
15785    CommandOutcomeContract {
15786        command: Command::CalibrateVectorStrategy,
15787        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15788        identity_requirement: "caller_action_id",
15789        resolver_command: None,
15790        cancellation: "per_call_until_submission_then_resolve",
15791    },
15792    CommandOutcomeContract {
15793        command: Command::GetVectorDiagnostic,
15794        possible_submission_states: &["not_submitted", "resolved"],
15795        identity_requirement: "request_locator",
15796        resolver_command: None,
15797        cancellation: "per_call",
15798    },
15799    CommandOutcomeContract {
15800        command: Command::CreateDiagnostic,
15801        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15802        identity_requirement: "none",
15803        resolver_command: None,
15804        cancellation: "per_call_until_submission_then_resolve",
15805    },
15806    CommandOutcomeContract {
15807        command: Command::GetDiagnostic,
15808        possible_submission_states: &["not_submitted", "resolved"],
15809        identity_requirement: "request_locator",
15810        resolver_command: None,
15811        cancellation: "per_call",
15812    },
15813    CommandOutcomeContract {
15814        command: Command::PrepareCollectionExport,
15815        possible_submission_states: &["not_submitted", "resolved"],
15816        identity_requirement: "caller_action_id",
15817        resolver_command: None,
15818        cancellation: "per_call",
15819    },
15820    CommandOutcomeContract {
15821        command: Command::StartCollectionExport,
15822        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15823        identity_requirement: "caller_action_id",
15824        resolver_command: Some(Command::ResolveCollectionExport),
15825        cancellation: "per_call_until_submission_then_resolve",
15826    },
15827    CommandOutcomeContract {
15828        command: Command::ResolveCollectionExport,
15829        possible_submission_states: &["not_submitted", "resolved", "known_retired"],
15830        identity_requirement: "caller_action_id",
15831        resolver_command: None,
15832        cancellation: "per_call",
15833    },
15834    CommandOutcomeContract {
15835        command: Command::VerifyCollectionExport,
15836        possible_submission_states: &["not_submitted", "resolved"],
15837        identity_requirement: "request_locator",
15838        resolver_command: None,
15839        cancellation: "per_call",
15840    },
15841    CommandOutcomeContract {
15842        command: Command::PrepareCollectionRestore,
15843        possible_submission_states: &["not_submitted", "resolved"],
15844        identity_requirement: "caller_action_id",
15845        resolver_command: None,
15846        cancellation: "per_call",
15847    },
15848    CommandOutcomeContract {
15849        command: Command::StartCollectionRestore,
15850        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15851        identity_requirement: "caller_action_id",
15852        resolver_command: Some(Command::ResolveCollectionRestore),
15853        cancellation: "per_call_until_submission_then_resolve",
15854    },
15855    CommandOutcomeContract {
15856        command: Command::ResolveCollectionRestore,
15857        possible_submission_states: &["not_submitted", "resolved", "known_retired"],
15858        identity_requirement: "caller_action_id",
15859        resolver_command: None,
15860        cancellation: "per_call",
15861    },
15862    CommandOutcomeContract {
15863        command: Command::PrepareIndexExport,
15864        possible_submission_states: &["not_submitted", "resolved"],
15865        identity_requirement: "caller_action_id",
15866        resolver_command: None,
15867        cancellation: "per_call",
15868    },
15869    CommandOutcomeContract {
15870        command: Command::StartIndexExport,
15871        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15872        identity_requirement: "caller_action_id",
15873        resolver_command: Some(Command::ResolveIndexExport),
15874        cancellation: "per_call_until_submission_then_resolve",
15875    },
15876    CommandOutcomeContract {
15877        command: Command::ResolveIndexExport,
15878        possible_submission_states: &["not_submitted", "resolved", "known_retired"],
15879        identity_requirement: "caller_action_id",
15880        resolver_command: None,
15881        cancellation: "per_call",
15882    },
15883    CommandOutcomeContract {
15884        command: Command::VerifyIndexExport,
15885        possible_submission_states: &["not_submitted", "resolved"],
15886        identity_requirement: "request_locator",
15887        resolver_command: None,
15888        cancellation: "per_call",
15889    },
15890    CommandOutcomeContract {
15891        command: Command::PrepareIndexImport,
15892        possible_submission_states: &["not_submitted", "resolved"],
15893        identity_requirement: "caller_action_id",
15894        resolver_command: None,
15895        cancellation: "per_call",
15896    },
15897    CommandOutcomeContract {
15898        command: Command::StartIndexImport,
15899        possible_submission_states: &["not_submitted", "submitted", "indeterminate", "resolved"],
15900        identity_requirement: "caller_action_id",
15901        resolver_command: Some(Command::ResolveIndexImport),
15902        cancellation: "per_call_until_submission_then_resolve",
15903    },
15904    CommandOutcomeContract {
15905        command: Command::ResolveIndexImport,
15906        possible_submission_states: &["not_submitted", "resolved", "known_retired"],
15907        identity_requirement: "caller_action_id",
15908        resolver_command: None,
15909        cancellation: "per_call",
15910    },
15911    CommandOutcomeContract {
15912        command: Command::ReadArtifactChunk,
15913        possible_submission_states: &["not_submitted", "resolved"],
15914        identity_requirement: "none",
15915        resolver_command: None,
15916        cancellation: "per_call",
15917    },
15918    CommandOutcomeContract {
15919        command: Command::ExportUsage,
15920        possible_submission_states: &["not_submitted", "resolved"],
15921        identity_requirement: "none",
15922        resolver_command: None,
15923        cancellation: "per_call",
15924    },
15925    CommandOutcomeContract {
15926        command: Command::ExecuteStateRead,
15927        possible_submission_states: &["not_submitted", "resolved"],
15928        identity_requirement: "none",
15929        resolver_command: None,
15930        cancellation: "per_call",
15931    },
15932    CommandOutcomeContract {
15933        command: Command::PrepareStateWrite,
15934        possible_submission_states: &["not_submitted", "resolved"],
15935        identity_requirement: "caller_action_id",
15936        resolver_command: None,
15937        cancellation: "per_call",
15938    },
15939    CommandOutcomeContract {
15940        command: Command::SubmitStateWrite,
15941        possible_submission_states: &[
15942            "not_submitted",
15943            "submitted",
15944            "known_retired",
15945            "indeterminate",
15946            "resolved",
15947        ],
15948        identity_requirement: "request_locator",
15949        resolver_command: Some(Command::ResolveStateWrite),
15950        cancellation: "per_call_until_submission_then_resolve",
15951    },
15952    CommandOutcomeContract {
15953        command: Command::ResolveStateWrite,
15954        possible_submission_states: &["not_submitted", "resolved"],
15955        identity_requirement: "request_locator",
15956        resolver_command: None,
15957        cancellation: "per_call",
15958    },
15959];
15960#[derive(Clone, Copy, Debug, Eq, PartialEq)]
15961pub struct ErrorOutcomeContract {
15962    pub code: ErrorCode,
15963    pub disposition: ErrorDisposition,
15964    pub recovery: RecoveryAction,
15965    pub retry_after_limit_id: Option<&'static str>,
15966    pub recovery_identity: &'static str,
15967}
15968pub const LODESTONE_API_ERROR_OUTCOMES: &[ErrorOutcomeContract] = &[
15969    ErrorOutcomeContract {
15970        code: ErrorCode::Aborted,
15971        disposition: ErrorDisposition::NotSubmitted,
15972        recovery: RecoveryAction::Retry,
15973        retry_after_limit_id: None,
15974        recovery_identity: "request_identity",
15975    },
15976    ErrorOutcomeContract {
15977        code: ErrorCode::Aborted,
15978        disposition: ErrorDisposition::Indeterminate,
15979        recovery: RecoveryAction::Resolve,
15980        retry_after_limit_id: None,
15981        recovery_identity: "request_identity",
15982    },
15983    ErrorOutcomeContract {
15984        code: ErrorCode::DeadlineExceeded,
15985        disposition: ErrorDisposition::NotSubmitted,
15986        recovery: RecoveryAction::Retry,
15987        retry_after_limit_id: None,
15988        recovery_identity: "request_identity",
15989    },
15990    ErrorOutcomeContract {
15991        code: ErrorCode::DeadlineExceeded,
15992        disposition: ErrorDisposition::Indeterminate,
15993        recovery: RecoveryAction::Resolve,
15994        retry_after_limit_id: None,
15995        recovery_identity: "request_identity",
15996    },
15997    ErrorOutcomeContract {
15998        code: ErrorCode::InvalidRequest,
15999        disposition: ErrorDisposition::NotSubmitted,
16000        recovery: RecoveryAction::Stop,
16001        retry_after_limit_id: None,
16002        recovery_identity: "none",
16003    },
16004    ErrorOutcomeContract {
16005        code: ErrorCode::UnsupportedVersion,
16006        disposition: ErrorDisposition::NotSubmitted,
16007        recovery: RecoveryAction::Stop,
16008        retry_after_limit_id: None,
16009        recovery_identity: "none",
16010    },
16011    ErrorOutcomeContract {
16012        code: ErrorCode::Unauthenticated,
16013        disposition: ErrorDisposition::NotSubmitted,
16014        recovery: RecoveryAction::RefreshCredential,
16015        retry_after_limit_id: None,
16016        recovery_identity: "none",
16017    },
16018    ErrorOutcomeContract {
16019        code: ErrorCode::PermissionDenied,
16020        disposition: ErrorDisposition::NotSubmitted,
16021        recovery: RecoveryAction::Stop,
16022        retry_after_limit_id: None,
16023        recovery_identity: "none",
16024    },
16025    ErrorOutcomeContract {
16026        code: ErrorCode::NotFound,
16027        disposition: ErrorDisposition::NotSubmitted,
16028        recovery: RecoveryAction::Stop,
16029        retry_after_limit_id: None,
16030        recovery_identity: "request_identity",
16031    },
16032    ErrorOutcomeContract {
16033        code: ErrorCode::NotFound,
16034        disposition: ErrorDisposition::Resolved,
16035        recovery: RecoveryAction::Stop,
16036        retry_after_limit_id: None,
16037        recovery_identity: "request_identity",
16038    },
16039    ErrorOutcomeContract {
16040        code: ErrorCode::Conflict,
16041        disposition: ErrorDisposition::NotSubmitted,
16042        recovery: RecoveryAction::RefreshPrecondition,
16043        retry_after_limit_id: None,
16044        recovery_identity: "request_identity",
16045    },
16046    ErrorOutcomeContract {
16047        code: ErrorCode::Conflict,
16048        disposition: ErrorDisposition::Resolved,
16049        recovery: RecoveryAction::Stop,
16050        retry_after_limit_id: None,
16051        recovery_identity: "request_identity",
16052    },
16053    ErrorOutcomeContract {
16054        code: ErrorCode::StaleCursor,
16055        disposition: ErrorDisposition::NotSubmitted,
16056        recovery: RecoveryAction::RestartPage,
16057        retry_after_limit_id: None,
16058        recovery_identity: "cursor",
16059    },
16060    ErrorOutcomeContract {
16061        code: ErrorCode::RestartBudgetExhausted,
16062        disposition: ErrorDisposition::NotSubmitted,
16063        recovery: RecoveryAction::Stop,
16064        retry_after_limit_id: None,
16065        recovery_identity: "cursor",
16066    },
16067    ErrorOutcomeContract {
16068        code: ErrorCode::LimitExceeded,
16069        disposition: ErrorDisposition::NotSubmitted,
16070        recovery: RecoveryAction::ReduceRequest,
16071        retry_after_limit_id: None,
16072        recovery_identity: "none",
16073    },
16074    ErrorOutcomeContract {
16075        code: ErrorCode::CapabilityUnavailable,
16076        disposition: ErrorDisposition::NotSubmitted,
16077        recovery: RecoveryAction::Stop,
16078        retry_after_limit_id: None,
16079        recovery_identity: "none",
16080    },
16081    ErrorOutcomeContract {
16082        code: ErrorCode::NotSubmitted,
16083        disposition: ErrorDisposition::NotSubmitted,
16084        recovery: RecoveryAction::RetryAfter,
16085        retry_after_limit_id: Some("retry_after_millis"),
16086        recovery_identity: "request_identity",
16087    },
16088    ErrorOutcomeContract {
16089        code: ErrorCode::SubmittedIndeterminate,
16090        disposition: ErrorDisposition::Indeterminate,
16091        recovery: RecoveryAction::Resolve,
16092        retry_after_limit_id: None,
16093        recovery_identity: "locator_or_caller_action_id",
16094    },
16095    ErrorOutcomeContract {
16096        code: ErrorCode::ExpiredUnknown,
16097        disposition: ErrorDisposition::KnownRetired,
16098        recovery: RecoveryAction::Stop,
16099        retry_after_limit_id: None,
16100        recovery_identity: "locator_or_caller_action_id",
16101    },
16102    ErrorOutcomeContract {
16103        code: ErrorCode::SecretNotEscrowed,
16104        disposition: ErrorDisposition::Resolved,
16105        recovery: RecoveryAction::Resolve,
16106        retry_after_limit_id: None,
16107        recovery_identity: "reservation_action_id",
16108    },
16109    ErrorOutcomeContract {
16110        code: ErrorCode::RetentionGap,
16111        disposition: ErrorDisposition::KnownRetired,
16112        recovery: RecoveryAction::Stop,
16113        retry_after_limit_id: None,
16114        recovery_identity: "cursor_or_locator",
16115    },
16116    ErrorOutcomeContract {
16117        code: ErrorCode::ArtifactRangeInvalid,
16118        disposition: ErrorDisposition::NotSubmitted,
16119        recovery: RecoveryAction::CorrectRange,
16120        retry_after_limit_id: None,
16121        recovery_identity: "artifact_identity",
16122    },
16123    ErrorOutcomeContract {
16124        code: ErrorCode::ChecksumMismatch,
16125        disposition: ErrorDisposition::Resolved,
16126        recovery: RecoveryAction::Stop,
16127        retry_after_limit_id: None,
16128        recovery_identity: "artifact_identity",
16129    },
16130    ErrorOutcomeContract {
16131        code: ErrorCode::TemporarilyUnavailable,
16132        disposition: ErrorDisposition::NotSubmitted,
16133        recovery: RecoveryAction::RetryAfter,
16134        retry_after_limit_id: Some("retry_after_millis"),
16135        recovery_identity: "request_identity",
16136    },
16137    ErrorOutcomeContract {
16138        code: ErrorCode::TemporarilyUnavailable,
16139        disposition: ErrorDisposition::Indeterminate,
16140        recovery: RecoveryAction::Resolve,
16141        retry_after_limit_id: Some("retry_after_millis"),
16142        recovery_identity: "request_identity",
16143    },
16144    ErrorOutcomeContract {
16145        code: ErrorCode::Internal,
16146        disposition: ErrorDisposition::NotSubmitted,
16147        recovery: RecoveryAction::Stop,
16148        retry_after_limit_id: None,
16149        recovery_identity: "request_identity",
16150    },
16151    ErrorOutcomeContract {
16152        code: ErrorCode::Internal,
16153        disposition: ErrorDisposition::Resolved,
16154        recovery: RecoveryAction::Stop,
16155        retry_after_limit_id: None,
16156        recovery_identity: "request_identity",
16157    },
16158    ErrorOutcomeContract {
16159        code: ErrorCode::Internal,
16160        disposition: ErrorDisposition::Indeterminate,
16161        recovery: RecoveryAction::Resolve,
16162        retry_after_limit_id: None,
16163        recovery_identity: "request_identity",
16164    },
16165];
16166#[derive(Clone, Copy, Debug, Eq, PartialEq)]
16167pub struct Limit {
16168    pub id: &'static str,
16169    pub default: u64,
16170    pub maximum: u64,
16171    pub unit: &'static str,
16172}
16173pub const LODESTONE_API_LIMITS: &[Limit] = &[
16174    Limit {
16175        id: "request_bytes",
16176        default: 2097152,
16177        maximum: 2097152,
16178        unit: "bytes",
16179    },
16180    Limit {
16181        id: "response_bytes",
16182        default: 2097152,
16183        maximum: 2097152,
16184        unit: "bytes",
16185    },
16186    Limit {
16187        id: "page_size",
16188        default: 100,
16189        maximum: 1000,
16190        unit: "items",
16191    },
16192    Limit {
16193        id: "catalog_page_size",
16194        default: 100,
16195        maximum: 100,
16196        unit: "items",
16197    },
16198    Limit {
16199        id: "catalog_restart_budget",
16200        default: 8,
16201        maximum: 8,
16202        unit: "restarts",
16203    },
16204    Limit {
16205        id: "query_clauses",
16206        default: 256,
16207        maximum: 1024,
16208        unit: "clauses",
16209    },
16210    Limit {
16211        id: "text_query_bytes",
16212        default: 16384,
16213        maximum: 16384,
16214        unit: "bytes",
16215    },
16216    Limit {
16217        id: "text_query_fields",
16218        default: 64,
16219        maximum: 64,
16220        unit: "fields",
16221    },
16222    Limit {
16223        id: "text_query_slop",
16224        default: 64,
16225        maximum: 64,
16226        unit: "positions",
16227    },
16228    Limit {
16229        id: "text_query_boost",
16230        default: 1024,
16231        maximum: 1024,
16232        unit: "multiplier",
16233    },
16234    Limit {
16235        id: "text_query_fuzzy_expansions",
16236        default: 1024,
16237        maximum: 1024,
16238        unit: "terms",
16239    },
16240    Limit {
16241        id: "text_query_fuzzy_distance",
16242        default: 2,
16243        maximum: 2,
16244        unit: "edits",
16245    },
16246    Limit {
16247        id: "text_query_dictionary_scan_terms",
16248        default: 65536,
16249        maximum: 65536,
16250        unit: "terms",
16251    },
16252    Limit {
16253        id: "text_query_dictionary_scan_bytes",
16254        default: 16777216,
16255        maximum: 16777216,
16256        unit: "bytes",
16257    },
16258    Limit {
16259        id: "text_query_fuzzy_work_units",
16260        default: 2000000,
16261        maximum: 2000000,
16262        unit: "distance_cells",
16263    },
16264    Limit {
16265        id: "aggregation_nodes",
16266        default: 64,
16267        maximum: 256,
16268        unit: "nodes",
16269    },
16270    Limit {
16271        id: "aggregation_buckets",
16272        default: 65536,
16273        maximum: 65536,
16274        unit: "buckets",
16275    },
16276    Limit {
16277        id: "metric_point_bytes",
16278        default: 1048576,
16279        maximum: 1048576,
16280        unit: "bytes",
16281    },
16282    Limit {
16283        id: "metric_attributes",
16284        default: 128,
16285        maximum: 128,
16286        unit: "items",
16287    },
16288    Limit {
16289        id: "metric_attribute_bytes",
16290        default: 65536,
16291        maximum: 65536,
16292        unit: "bytes",
16293    },
16294    Limit {
16295        id: "metric_exemplars",
16296        default: 8,
16297        maximum: 8,
16298        unit: "items",
16299    },
16300    Limit {
16301        id: "metric_histogram_buckets",
16302        default: 4097,
16303        maximum: 4097,
16304        unit: "buckets",
16305    },
16306    Limit {
16307        id: "time_series_grouping_keys",
16308        default: 4,
16309        maximum: 16,
16310        unit: "keys",
16311    },
16312    Limit {
16313        id: "time_series_points",
16314        default: 100000,
16315        maximum: 100000,
16316        unit: "points",
16317    },
16318    Limit {
16319        id: "time_series_series",
16320        default: 10000,
16321        maximum: 10000,
16322        unit: "series",
16323    },
16324    Limit {
16325        id: "time_series_buckets",
16326        default: 65536,
16327        maximum: 65536,
16328        unit: "buckets",
16329    },
16330    Limit {
16331        id: "time_series_results",
16332        default: 65536,
16333        maximum: 65536,
16334        unit: "results",
16335    },
16336    Limit {
16337        id: "time_series_quantiles",
16338        default: 10,
16339        maximum: 100,
16340        unit: "quantiles",
16341    },
16342    Limit {
16343        id: "time_series_state_bytes",
16344        default: 67108864,
16345        maximum: 67108864,
16346        unit: "bytes",
16347    },
16348    Limit {
16349        id: "temporal_inputs",
16350        default: 16,
16351        maximum: 16,
16352        unit: "indexes",
16353    },
16354    Limit {
16355        id: "temporal_pattern_nodes",
16356        default: 64,
16357        maximum: 64,
16358        unit: "nodes",
16359    },
16360    Limit {
16361        id: "temporal_pattern_depth",
16362        default: 16,
16363        maximum: 16,
16364        unit: "levels",
16365    },
16366    Limit {
16367        id: "temporal_pattern_branches",
16368        default: 16,
16369        maximum: 16,
16370        unit: "branches",
16371    },
16372    Limit {
16373        id: "temporal_correlation_keys",
16374        default: 4,
16375        maximum: 4,
16376        unit: "fields",
16377    },
16378    Limit {
16379        id: "temporal_events",
16380        default: 4096,
16381        maximum: 4096,
16382        unit: "events",
16383    },
16384    Limit {
16385        id: "temporal_states",
16386        default: 65536,
16387        maximum: 65536,
16388        unit: "states",
16389    },
16390    Limit {
16391        id: "temporal_captured_events",
16392        default: 256,
16393        maximum: 256,
16394        unit: "events",
16395    },
16396    Limit {
16397        id: "temporal_results",
16398        default: 4096,
16399        maximum: 4096,
16400        unit: "results",
16401    },
16402    Limit {
16403        id: "temporal_state_bytes",
16404        default: 67108864,
16405        maximum: 67108864,
16406        unit: "bytes",
16407    },
16408    Limit {
16409        id: "temporal_interval_nanos",
16410        default: 2678400000000000,
16411        maximum: 2678400000000000,
16412        unit: "nanoseconds",
16413    },
16414    Limit {
16415        id: "relationship_indexes",
16416        default: 4,
16417        maximum: 16,
16418        unit: "indexes",
16419    },
16420    Limit {
16421        id: "relationship_seeds",
16422        default: 16,
16423        maximum: 128,
16424        unit: "entities",
16425    },
16426    Limit {
16427        id: "relationship_filter_values",
16428        default: 16,
16429        maximum: 128,
16430        unit: "values",
16431    },
16432    Limit {
16433        id: "relationship_depth",
16434        default: 4,
16435        maximum: 16,
16436        unit: "levels",
16437    },
16438    Limit {
16439        id: "relationship_fan_out",
16440        default: 256,
16441        maximum: 4096,
16442        unit: "relationships",
16443    },
16444    Limit {
16445        id: "relationship_visited_entities",
16446        default: 10000,
16447        maximum: 65536,
16448        unit: "entities",
16449    },
16450    Limit {
16451        id: "relationship_visited_records",
16452        default: 10000,
16453        maximum: 10000,
16454        unit: "records",
16455    },
16456    Limit {
16457        id: "relationship_returned_records",
16458        default: 10000,
16459        maximum: 10000,
16460        unit: "records",
16461    },
16462    Limit {
16463        id: "relationship_memory_bytes",
16464        default: 67108864,
16465        maximum: 268435456,
16466        unit: "bytes",
16467    },
16468    Limit {
16469        id: "profile_indexes",
16470        default: 4,
16471        maximum: 16,
16472        unit: "indexes",
16473    },
16474    Limit {
16475        id: "profile_filter_values",
16476        default: 16,
16477        maximum: 128,
16478        unit: "values",
16479    },
16480    Limit {
16481        id: "profile_batches",
16482        default: 10000,
16483        maximum: 10000,
16484        unit: "batches",
16485    },
16486    Limit {
16487        id: "profile_samples",
16488        default: 100000,
16489        maximum: 100000,
16490        unit: "samples",
16491    },
16492    Limit {
16493        id: "profile_results",
16494        default: 10000,
16495        maximum: 10000,
16496        unit: "results",
16497    },
16498    Limit {
16499        id: "profile_memory_bytes",
16500        default: 67108864,
16501        maximum: 268435456,
16502        unit: "bytes",
16503    },
16504    Limit {
16505        id: "approximate_cardinality_precision",
16506        default: 12,
16507        maximum: 16,
16508        unit: "index_bits",
16509    },
16510    Limit {
16511        id: "approximate_percentile_precision",
16512        default: 10,
16513        maximum: 12,
16514        unit: "index_bits",
16515    },
16516    Limit {
16517        id: "operation_page_authorities",
16518        default: 7,
16519        maximum: 7,
16520        unit: "authorities",
16521    },
16522    Limit {
16523        id: "artifact_chunk_bytes",
16524        default: 262144,
16525        maximum: 1048576,
16526        unit: "bytes",
16527    },
16528    Limit {
16529        id: "bulk_document_items",
16530        default: 128,
16531        maximum: 1024,
16532        unit: "items",
16533    },
16534    Limit {
16535        id: "bulk_document_bytes",
16536        default: 2097152,
16537        maximum: 2097152,
16538        unit: "bytes",
16539    },
16540    Limit {
16541        id: "state_command_keys",
16542        default: 128,
16543        maximum: 128,
16544        unit: "keys",
16545    },
16546    Limit {
16547        id: "state_command_value_bytes",
16548        default: 1048576,
16549        maximum: 1048576,
16550        unit: "bytes",
16551    },
16552    Limit {
16553        id: "state_write_outcomes",
16554        default: 4096,
16555        maximum: 4096,
16556        unit: "entries",
16557    },
16558    Limit {
16559        id: "exact_decimal_scale",
16560        default: 18,
16561        maximum: 1024,
16562        unit: "decimal_places",
16563    },
16564    Limit {
16565        id: "retry_after_millis",
16566        default: 1000,
16567        maximum: 60000,
16568        unit: "milliseconds",
16569    },
16570    Limit {
16571        id: "mapping_fields",
16572        default: 16384,
16573        maximum: 16384,
16574        unit: "fields",
16575    },
16576    Limit {
16577        id: "search_result_window",
16578        default: 10000,
16579        maximum: 10000,
16580        unit: "items",
16581    },
16582    Limit {
16583        id: "routing_values",
16584        default: 1024,
16585        maximum: 1024,
16586        unit: "items",
16587    },
16588    Limit {
16589        id: "routing_value_bytes",
16590        default: 4096,
16591        maximum: 4096,
16592        unit: "bytes",
16593    },
16594    Limit {
16595        id: "query_recursion_depth",
16596        default: 64,
16597        maximum: 64,
16598        unit: "levels",
16599    },
16600    Limit {
16601        id: "vector_dimensions",
16602        default: 16384,
16603        maximum: 16384,
16604        unit: "dimensions",
16605    },
16606    Limit {
16607        id: "vector_query_bytes",
16608        default: 65536,
16609        maximum: 65536,
16610        unit: "bytes",
16611    },
16612    Limit {
16613        id: "vector_request_bytes",
16614        default: 1048576,
16615        maximum: 1048576,
16616        unit: "bytes",
16617    },
16618    Limit {
16619        id: "vector_candidates",
16620        default: 10000,
16621        maximum: 10000,
16622        unit: "items",
16623    },
16624    Limit {
16625        id: "vector_set_document_vectors",
16626        default: 128,
16627        maximum: 128,
16628        unit: "vectors",
16629    },
16630    Limit {
16631        id: "vector_set_document_bytes",
16632        default: 65536,
16633        maximum: 65536,
16634        unit: "bytes",
16635    },
16636    Limit {
16637        id: "vector_set_query_vectors",
16638        default: 32,
16639        maximum: 32,
16640        unit: "vectors",
16641    },
16642    Limit {
16643        id: "vector_set_query_bytes",
16644        default: 65536,
16645        maximum: 65536,
16646        unit: "bytes",
16647    },
16648    Limit {
16649        id: "retrieval_branches",
16650        default: 16,
16651        maximum: 16,
16652        unit: "branches",
16653    },
16654    Limit {
16655        id: "retrieval_branch_name_bytes",
16656        default: 64,
16657        maximum: 64,
16658        unit: "bytes",
16659    },
16660    Limit {
16661        id: "retrieval_window",
16662        default: 10000,
16663        maximum: 10000,
16664        unit: "items",
16665    },
16666    Limit {
16667        id: "fragment_fields",
16668        default: 4,
16669        maximum: 16,
16670        unit: "fields",
16671    },
16672    Limit {
16673        id: "fragments_per_field",
16674        default: 1,
16675        maximum: 8,
16676        unit: "items",
16677    },
16678    Limit {
16679        id: "fragment_bytes",
16680        default: 150,
16681        maximum: 8192,
16682        unit: "bytes",
16683    },
16684    Limit {
16685        id: "fragment_total_bytes",
16686        default: 65536,
16687        maximum: 65536,
16688        unit: "bytes",
16689    },
16690    Limit {
16691        id: "result_feature_hits",
16692        default: 10,
16693        maximum: 100,
16694        unit: "items",
16695    },
16696    Limit {
16697        id: "result_features",
16698        default: 4,
16699        maximum: 16,
16700        unit: "features",
16701    },
16702    Limit {
16703        id: "diversification_fields",
16704        default: 1,
16705        maximum: 4,
16706        unit: "fields",
16707    },
16708    Limit {
16709        id: "diversification_per_group",
16710        default: 1,
16711        maximum: 64,
16712        unit: "items",
16713    },
16714    Limit {
16715        id: "vector_evaluation_queries",
16716        default: 64,
16717        maximum: 256,
16718        unit: "queries",
16719    },
16720    Limit {
16721        id: "vector_evaluation_k",
16722        default: 10,
16723        maximum: 1000,
16724        unit: "items",
16725    },
16726    Limit {
16727        id: "vector_evaluation_profiles",
16728        default: 3,
16729        maximum: 3,
16730        unit: "profiles",
16731    },
16732    Limit {
16733        id: "vector_evaluation_artifact_bytes",
16734        default: 1048576,
16735        maximum: 1048576,
16736        unit: "bytes",
16737    },
16738    Limit {
16739        id: "vector_warm_components",
16740        default: 2,
16741        maximum: 3,
16742        unit: "components",
16743    },
16744    Limit {
16745        id: "vector_warm_requests",
16746        default: 1024,
16747        maximum: 65536,
16748        unit: "requests",
16749    },
16750    Limit {
16751        id: "vector_warm_bytes",
16752        default: 268435456,
16753        maximum: 1073741824,
16754        unit: "bytes",
16755    },
16756    Limit {
16757        id: "vector_warm_achievements",
16758        default: 1024,
16759        maximum: 10000,
16760        unit: "items",
16761    },
16762    Limit {
16763        id: "vector_warm_ttl_millis",
16764        default: 300000,
16765        maximum: 900000,
16766        unit: "milliseconds",
16767    },
16768    Limit {
16769        id: "operation_page_size",
16770        default: 100,
16771        maximum: 100,
16772        unit: "items",
16773    },
16774    Limit {
16775        id: "operation_wait_attempts",
16776        default: 20,
16777        maximum: 100,
16778        unit: "attempts",
16779    },
16780    Limit {
16781        id: "operation_wait_interval_millis",
16782        default: 100,
16783        maximum: 60000,
16784        unit: "milliseconds",
16785    },
16786    Limit {
16787        id: "resource_initial_shards",
16788        default: 1,
16789        maximum: 4096,
16790        unit: "shards",
16791    },
16792    Limit {
16793        id: "resource_target_shard_bytes",
16794        default: 536870912,
16795        maximum: 1125899906842624,
16796        unit: "bytes",
16797    },
16798    Limit {
16799        id: "resource_admission_weight",
16800        default: 1,
16801        maximum: 1000000,
16802        unit: "weight",
16803    },
16804    Limit {
16805        id: "resource_ram_bytes",
16806        default: 1073741824,
16807        maximum: 1125899906842624,
16808        unit: "bytes",
16809    },
16810    Limit {
16811        id: "resource_nvme_bytes",
16812        default: 2147483648,
16813        maximum: 1125899906842624,
16814        unit: "bytes",
16815    },
16816    Limit {
16817        id: "resource_refresh_millis",
16818        default: 200,
16819        maximum: 604800000,
16820        unit: "milliseconds",
16821    },
16822    Limit {
16823        id: "resource_memtable_bytes",
16824        default: 268435456,
16825        maximum: 1125899906842624,
16826        unit: "bytes",
16827    },
16828    Limit {
16829        id: "resource_parallelism",
16830        default: 1,
16831        maximum: 4096,
16832        unit: "workers",
16833    },
16834    Limit {
16835        id: "collection_export_bytes",
16836        default: 268435456,
16837        maximum: 268435456,
16838        unit: "bytes",
16839    },
16840    Limit {
16841        id: "collection_export_documents",
16842        default: 10000,
16843        maximum: 10000,
16844        unit: "documents",
16845    },
16846    Limit {
16847        id: "index_transfer_bytes",
16848        default: 268435456,
16849        maximum: 268435456,
16850        unit: "bytes",
16851    },
16852    Limit {
16853        id: "index_transfer_records",
16854        default: 10000,
16855        maximum: 10000,
16856        unit: "records",
16857    },
16858    Limit {
16859        id: "index_transfer_pages",
16860        default: 7,
16861        maximum: 7,
16862        unit: "pages",
16863    },
16864    Limit {
16865        id: "portability_prefix_bytes",
16866        default: 512,
16867        maximum: 512,
16868        unit: "bytes",
16869    },
16870];
16871#[derive(Clone, Copy, Debug, Eq, PartialEq)]
16872pub enum JsonError {
16873    DuplicateObjectField,
16874    InvalidScalar,
16875}
16876pub fn validate_semantic_json(value: &JsonValue) -> Result<(), JsonError> {
16877    match value {
16878        JsonValue::I64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
16879        JsonValue::U64(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
16880        JsonValue::ExactDecimal(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
16881        JsonValue::Approximate(item) => item.validate().map_err(|_| JsonError::InvalidScalar),
16882        JsonValue::Array(items) => items.iter().try_for_each(validate_semantic_json),
16883        JsonValue::Object(fields) => {
16884            let mut names = std::collections::BTreeSet::new();
16885            for field in fields {
16886                if !names.insert(field.name.as_str()) {
16887                    return Err(JsonError::DuplicateObjectField);
16888                }
16889                validate_semantic_json(&field.value)?;
16890            }
16891            Ok(())
16892        }
16893        JsonValue::Null | JsonValue::Bool(_) | JsonValue::String(_) => Ok(()),
16894    }
16895}
16896#[cfg(test)]
16897mod tests {
16898    use super::*;
16899    fn assert_fixture<T>(value: &serde_json::Value) -> Result<(), Box<dyn std::error::Error>>
16900    where
16901        T: serde::de::DeserializeOwned + Serialize,
16902    {
16903        let decoded: T = serde_json::from_value(value.clone())?;
16904        assert_eq!(serde_json::to_value(decoded)?, *value);
16905        Ok(())
16906    }
16907    #[test]
16908    fn every_named_type_has_a_canonical_round_trip_fixture() -> Result<(), Box<dyn std::error::Error>> {
16909        let document: serde_json::Value =
16910            serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
16911        assert_eq!(document["spec_sha256"], LODESTONE_API_SPEC_SHA256);
16912        let fixtures = document["named_types"]
16913            .as_object()
16914            .ok_or("named type fixtures are not an object")?;
16915        assert_eq!(fixtures.len(), LODESTONE_API_TYPE_CONTRACTS.len());
16916        for (name, value) in fixtures {
16917            match name.as_str() {
16918                "cursor" => assert_fixture::<Cursor>(value)?,
16919                "locator" => assert_fixture::<Locator>(value)?,
16920                "resource" => assert_fixture::<Resource>(value)?,
16921                "field_promotion_configuration" => assert_fixture::<FieldPromotionConfiguration>(value)?,
16922                "overload_configuration" => assert_fixture::<OverloadConfiguration>(value)?,
16923                "index_policies" => assert_fixture::<IndexPolicies>(value)?,
16924                "maintenance_budgets" => assert_fixture::<MaintenanceBudgets>(value)?,
16925                "resource_durability_class" => assert_fixture::<ResourceDurabilityClass>(value)?,
16926                "resource_storage_class" => assert_fixture::<ResourceStorageClass>(value)?,
16927                "vector_quality_objective" => assert_fixture::<VectorQualityObjective>(value)?,
16928                "vector_indexing_objective" => assert_fixture::<VectorIndexingObjective>(value)?,
16929                "vector_residency_intent" => assert_fixture::<VectorResidencyIntent>(value)?,
16930                "vector_calibration_binding" => assert_fixture::<VectorCalibrationBinding>(value)?,
16931                "vector_resource_policy" => assert_fixture::<VectorResourcePolicy>(value)?,
16932                "workload_class" => assert_fixture::<WorkloadClass>(value)?,
16933                "index_resource_spec" => assert_fixture::<IndexResourceSpec>(value)?,
16934                "index_summary" => assert_fixture::<IndexSummary>(value)?,
16935                "mapping_mode" => assert_fixture::<MappingMode>(value)?,
16936                "dynamic_mapping_policy" => assert_fixture::<DynamicMappingPolicy>(value)?,
16937                "mapping_analyzer" => assert_fixture::<MappingAnalyzer>(value)?,
16938                "keyword_normalizer" => assert_fixture::<KeywordNormalizer>(value)?,
16939                "vector_metric" => assert_fixture::<VectorMetric>(value)?,
16940                "mapping_scalar" => assert_fixture::<MappingScalar>(value)?,
16941                "sparse_vector_weight_type" => assert_fixture::<SparseVectorWeightType>(value)?,
16942                "mapping_field_type" => assert_fixture::<MappingFieldType>(value)?,
16943                "mapping_field" => assert_fixture::<MappingField>(value)?,
16944                "multi_field_projection" => assert_fixture::<MultiFieldProjection>(value)?,
16945                "analyzer_identity" => assert_fixture::<AnalyzerIdentity>(value)?,
16946                "keyword_limit" => assert_fixture::<KeywordLimit>(value)?,
16947                "profile_privacy_action" => assert_fixture::<ProfilePrivacyAction>(value)?,
16948                "profile_privacy_field" => assert_fixture::<ProfilePrivacyField>(value)?,
16949                "profile_privacy_rule" => assert_fixture::<ProfilePrivacyRule>(value)?,
16950                "profile_privacy_policy" => assert_fixture::<ProfilePrivacyPolicy>(value)?,
16951                "mapping_record_model" => assert_fixture::<MappingRecordModel>(value)?,
16952                "mapping" => assert_fixture::<Mapping>(value)?,
16953                "index_detail" => assert_fixture::<IndexDetail>(value)?,
16954                "source_provider" => assert_fixture::<SourceProvider>(value)?,
16955                "source_decoder" => assert_fixture::<SourceDecoder>(value)?,
16956                "source_replay_guarantees" => assert_fixture::<SourceReplayGuarantees>(value)?,
16957                "source_partition_configuration" => assert_fixture::<SourcePartitionConfiguration>(value)?,
16958                "replayable_source_configuration" => assert_fixture::<ReplayableSourceConfiguration>(value)?,
16959                "source_partition_status" => assert_fixture::<SourcePartitionStatus>(value)?,
16960                "replayable_source_status" => assert_fixture::<ReplayableSourceStatus>(value)?,
16961                "source_control_transition" => assert_fixture::<SourceControlTransition>(value)?,
16962                "history_ledger_precondition" => assert_fixture::<HistoryLedgerPrecondition>(value)?,
16963                "history_retention_policy" => assert_fixture::<HistoryRetentionPolicy>(value)?,
16964                "history_selector" => assert_fixture::<HistorySelector>(value)?,
16965                "history_hold" => assert_fixture::<HistoryHold>(value)?,
16966                "history_status" => assert_fixture::<HistoryStatus>(value)?,
16967                "history_resolution" => assert_fixture::<HistoryResolution>(value)?,
16968                "index_reference" => assert_fixture::<IndexReference>(value)?,
16969                "alias_target" => assert_fixture::<AliasTarget>(value)?,
16970                "alias_summary" => assert_fixture::<AliasSummary>(value)?,
16971                "alias_detail" => assert_fixture::<AliasDetail>(value)?,
16972                "data_stream_summary" => assert_fixture::<DataStreamSummary>(value)?,
16973                "component_template_binding" => assert_fixture::<ComponentTemplateBinding>(value)?,
16974                "index_template_binding" => assert_fixture::<IndexTemplateBinding>(value)?,
16975                "lifecycle_policy_binding" => assert_fixture::<LifecyclePolicyBinding>(value)?,
16976                "data_stream_detail" => assert_fixture::<DataStreamDetail>(value)?,
16977                "component_template_summary" => assert_fixture::<ComponentTemplateSummary>(value)?,
16978                "component_template_detail" => assert_fixture::<ComponentTemplateDetail>(value)?,
16979                "index_template_summary" => assert_fixture::<IndexTemplateSummary>(value)?,
16980                "index_template_detail" => assert_fixture::<IndexTemplateDetail>(value)?,
16981                "ingest_pipeline_summary" => assert_fixture::<IngestPipelineSummary>(value)?,
16982                "ingest_pipeline_detail" => assert_fixture::<IngestPipelineDetail>(value)?,
16983                "ingest_pipeline_selection" => assert_fixture::<IngestPipelineSelection>(value)?,
16984                "lifecycle_policy_summary" => assert_fixture::<LifecyclePolicySummary>(value)?,
16985                "rollover_thresholds" => assert_fixture::<RolloverThresholds>(value)?,
16986                "retention_policy" => assert_fixture::<RetentionPolicy>(value)?,
16987                "lifecycle_policy_detail" => assert_fixture::<LifecyclePolicyDetail>(value)?,
16988                "text_query_operator" => assert_fixture::<TextQueryOperator>(value)?,
16989                "text_query_analyzer" => assert_fixture::<TextQueryAnalyzer>(value)?,
16990                "zero_terms_query" => assert_fixture::<ZeroTermsQuery>(value)?,
16991                "text_query_options" => assert_fixture::<TextQueryOptions>(value)?,
16992                "multi_match_mode" => assert_fixture::<MultiMatchMode>(value)?,
16993                "multi_match_field" => assert_fixture::<MultiMatchField>(value)?,
16994                "multi_match_options" => assert_fixture::<MultiMatchOptions>(value)?,
16995                "sort_order" => assert_fixture::<SortOrder>(value)?,
16996                "sort_mode" => assert_fixture::<SortMode>(value)?,
16997                "missing_order" => assert_fixture::<MissingOrder>(value)?,
16998                "nested_score_mode" => assert_fixture::<NestedScoreMode>(value)?,
16999                "nested_inner_hits" => assert_fixture::<NestedInnerHits>(value)?,
17000                "sort_spec" => assert_fixture::<SortSpec>(value)?,
17001                "query" => assert_fixture::<Query>(value)?,
17002                "dense_retrieval_mode" => assert_fixture::<DenseRetrievalMode>(value)?,
17003                "vector_achieved_mode" => assert_fixture::<VectorAchievedMode>(value)?,
17004                "vector_branch_diagnostics" => assert_fixture::<VectorBranchDiagnostics>(value)?,
17005                "dense_vector_element_type" => assert_fixture::<DenseVectorElementType>(value)?,
17006                "dense_vector_byte_order" => assert_fixture::<DenseVectorByteOrder>(value)?,
17007                "vector_value" => assert_fixture::<VectorValue>(value)?,
17008                "sparse_vector_entry" => assert_fixture::<SparseVectorEntry>(value)?,
17009                "sparse_vector_value" => assert_fixture::<SparseVectorValue>(value)?,
17010                "vector_set_value" => assert_fixture::<VectorSetValue>(value)?,
17011                "vector_evaluation_snapshot" => assert_fixture::<VectorEvaluationSnapshot>(value)?,
17012                "vector_evaluation_query_set" => assert_fixture::<VectorEvaluationQuerySet>(value)?,
17013                "vector_evaluation_budget" => assert_fixture::<VectorEvaluationBudget>(value)?,
17014                "vector_candidate_policy" => assert_fixture::<VectorCandidatePolicy>(value)?,
17015                "vector_calibration_objective" => assert_fixture::<VectorCalibrationObjective>(value)?,
17016                "vector_strategy_profile" => assert_fixture::<VectorStrategyProfile>(value)?,
17017                "vector_evaluation_work" => assert_fixture::<VectorEvaluationWork>(value)?,
17018                "vector_evaluation_error_code" => assert_fixture::<VectorEvaluationErrorCode>(value)?,
17019                "vector_evaluation_error" => assert_fixture::<VectorEvaluationError>(value)?,
17020                "vector_recall_result" => assert_fixture::<VectorRecallResult>(value)?,
17021                "vector_calibration_candidate" => assert_fixture::<VectorCalibrationCandidate>(value)?,
17022                "vector_calibration_result" => assert_fixture::<VectorCalibrationResult>(value)?,
17023                "vector_diagnostic_result" => assert_fixture::<VectorDiagnosticResult>(value)?,
17024                "vector_warm_component" => assert_fixture::<VectorWarmComponent>(value)?,
17025                "vector_warm_state" => assert_fixture::<VectorWarmState>(value)?,
17026                "vector_warm_achievement" => assert_fixture::<VectorWarmAchievement>(value)?,
17027                "vector_warm_result" => assert_fixture::<VectorWarmResult>(value)?,
17028                "dense_retrieval_threshold" => assert_fixture::<DenseRetrievalThreshold>(value)?,
17029                "retrieval_branch" => assert_fixture::<RetrievalBranch>(value)?,
17030                "weighted_rrf_fusion" => assert_fixture::<WeightedRrfFusion>(value)?,
17031                "retrieval_plan" => assert_fixture::<RetrievalPlan>(value)?,
17032                "histogram_bounds" => assert_fixture::<HistogramBounds>(value)?,
17033                "date_histogram_bounds" => assert_fixture::<DateHistogramBounds>(value)?,
17034                "approximation_algorithm" => assert_fixture::<ApproximationAlgorithm>(value)?,
17035                "approximation" => assert_fixture::<Approximation>(value)?,
17036                "percentile_value" => assert_fixture::<PercentileValue>(value)?,
17037                "approximate_percentile_value" => assert_fixture::<ApproximatePercentileValue>(value)?,
17038                "time_series_operator" => assert_fixture::<TimeSeriesOperator>(value)?,
17039                "time_series_missing_data" => assert_fixture::<TimeSeriesMissingData>(value)?,
17040                "time_series_quantile_mode" => assert_fixture::<TimeSeriesQuantileMode>(value)?,
17041                "time_series_bucket_state" => assert_fixture::<TimeSeriesBucketState>(value)?,
17042                "time_series_quantile_value" => assert_fixture::<TimeSeriesQuantileValue>(value)?,
17043                "time_series_value" => assert_fixture::<TimeSeriesValue>(value)?,
17044                "time_series_bucket" => assert_fixture::<TimeSeriesBucket>(value)?,
17045                "relationship_traversal_direction" => assert_fixture::<RelationshipTraversalDirection>(value)?,
17046                "relationship_traversal_filter" => assert_fixture::<RelationshipTraversalFilter>(value)?,
17047                "relationship_traversal_budget" => assert_fixture::<RelationshipTraversalBudget>(value)?,
17048                "traversed_relationship" => assert_fixture::<TraversedRelationship>(value)?,
17049                "profile_query_operation" => assert_fixture::<ProfileQueryOperation>(value)?,
17050                "profile_group_by" => assert_fixture::<ProfileGroupBy>(value)?,
17051                "profile_query_filter" => assert_fixture::<ProfileQueryFilter>(value)?,
17052                "profile_query_budget" => assert_fixture::<ProfileQueryBudget>(value)?,
17053                "profile_query_row" => assert_fixture::<ProfileQueryRow>(value)?,
17054                "temporal_input" => assert_fixture::<TemporalInput>(value)?,
17055                "temporal_pattern" => assert_fixture::<TemporalPattern>(value)?,
17056                "historical_temporal_definition" => assert_fixture::<HistoricalTemporalDefinition>(value)?,
17057                "temporal_evidence_status" => assert_fixture::<TemporalEvidenceStatus>(value)?,
17058                "temporal_source_event" => assert_fixture::<TemporalSourceEvent>(value)?,
17059                "temporal_evidence" => assert_fixture::<TemporalEvidence>(value)?,
17060                "continuous_temporal_start" => assert_fixture::<ContinuousTemporalStart>(value)?,
17061                "continuous_temporal_watermark_policy" => assert_fixture::<ContinuousTemporalWatermarkPolicy>(value)?,
17062                "continuous_temporal_late_data_policy" => assert_fixture::<ContinuousTemporalLateDataPolicy>(value)?,
17063                "continuous_temporal_output" => assert_fixture::<ContinuousTemporalOutput>(value)?,
17064                "continuous_temporal_definition" => assert_fixture::<ContinuousTemporalDefinition>(value)?,
17065                "continuous_temporal_frontier" => assert_fixture::<ContinuousTemporalFrontier>(value)?,
17066                "continuous_temporal_available_frontier" => {
17067                    assert_fixture::<ContinuousTemporalAvailableFrontier>(value)?
17068                }
17069                "continuous_temporal_gap_reason" => assert_fixture::<ContinuousTemporalGapReason>(value)?,
17070                "continuous_temporal_gap" => assert_fixture::<ContinuousTemporalGap>(value)?,
17071                "continuous_temporal_evaluation" => assert_fixture::<ContinuousTemporalEvaluation>(value)?,
17072                "composite_order" => assert_fixture::<CompositeOrder>(value)?,
17073                "composite_source" => assert_fixture::<CompositeSource>(value)?,
17074                "aggregation" => assert_fixture::<Aggregation>(value)?,
17075                "nested_search_hit" => assert_fixture::<NestedSearchHit>(value)?,
17076                "named_nested_inner_hits_result" => assert_fixture::<NamedNestedInnerHitsResult>(value)?,
17077                "fragment_boundary" => assert_fixture::<FragmentBoundary>(value)?,
17078                "fragment_offset_encoding" => assert_fixture::<FragmentOffsetEncoding>(value)?,
17079                "fragment_ranker" => assert_fixture::<FragmentRanker>(value)?,
17080                "fragment_request" => assert_fixture::<FragmentRequest>(value)?,
17081                "search_fragment" => assert_fixture::<SearchFragment>(value)?,
17082                "numeric_feature_transform" => assert_fixture::<NumericFeatureTransform>(value)?,
17083                "numeric_result_feature" => assert_fixture::<NumericResultFeature>(value)?,
17084                "result_feature_request" => assert_fixture::<ResultFeatureRequest>(value)?,
17085                "result_diversification" => assert_fixture::<ResultDiversification>(value)?,
17086                "branch_score_kind" => assert_fixture::<BranchScoreKind>(value)?,
17087                "result_feature" => assert_fixture::<ResultFeature>(value)?,
17088                "search_hit" => assert_fixture::<SearchHit>(value)?,
17089                "aggregation_bucket" => assert_fixture::<AggregationBucket>(value)?,
17090                "aggregation_result" => assert_fixture::<AggregationResult>(value)?,
17091                "shard_counts" => assert_fixture::<ShardCounts>(value)?,
17092                "total_hits_relation" => assert_fixture::<TotalHitsRelation>(value)?,
17093                "search_total" => assert_fixture::<SearchTotal>(value)?,
17094                "search_execution_freshness" => assert_fixture::<SearchExecutionFreshness>(value)?,
17095                "search_freshness" => assert_fixture::<SearchFreshness>(value)?,
17096                "search_degradation_reason" => assert_fixture::<SearchDegradationReason>(value)?,
17097                "search_achievement" => assert_fixture::<SearchAchievement>(value)?,
17098                "search_failure_stage" => assert_fixture::<SearchFailureStage>(value)?,
17099                "search_failure_reason" => assert_fixture::<SearchFailureReason>(value)?,
17100                "collection_shard" => assert_fixture::<CollectionShard>(value)?,
17101                "search_partial_failure" => assert_fixture::<SearchPartialFailure>(value)?,
17102                "artifact" => assert_fixture::<Artifact>(value)?,
17103                "portability_storage_capability" => assert_fixture::<PortabilityStorageCapability>(value)?,
17104                "collection_export_artifact" => assert_fixture::<CollectionExportArtifact>(value)?,
17105                "index_transfer_page" => assert_fixture::<IndexTransferPage>(value)?,
17106                "index_transfer_artifact" => assert_fixture::<IndexTransferArtifact>(value)?,
17107                "search_validation_bound" => assert_fixture::<SearchValidationBound>(value)?,
17108                "search_validation_estimates" => assert_fixture::<SearchValidationEstimates>(value)?,
17109                "search_validation_limit" => assert_fixture::<SearchValidationLimit>(value)?,
17110                "operation_kind" => assert_fixture::<OperationKind>(value)?,
17111                "operation_authority" => assert_fixture::<OperationAuthority>(value)?,
17112                "operation_target" => assert_fixture::<OperationTarget>(value)?,
17113                "operation_state" => assert_fixture::<OperationState>(value)?,
17114                "operation_pending_state" => assert_fixture::<OperationPendingState>(value)?,
17115                "operation_progress_unit" => assert_fixture::<OperationProgressUnit>(value)?,
17116                "operation_progress" => assert_fixture::<OperationProgress>(value)?,
17117                "operation_result" => assert_fixture::<OperationResult>(value)?,
17118                "operation_failure" => assert_fixture::<OperationFailure>(value)?,
17119                "operation_cancellation" => assert_fixture::<OperationCancellation>(value)?,
17120                "operation_retention_state" => assert_fixture::<OperationRetentionState>(value)?,
17121                "operation_retention" => assert_fixture::<OperationRetention>(value)?,
17122                "operation" => assert_fixture::<Operation>(value)?,
17123                "write_durability_boundary" => assert_fixture::<WriteDurabilityBoundary>(value)?,
17124                "write_visibility_mode" => assert_fixture::<WriteVisibilityMode>(value)?,
17125                "write_response_stage" => assert_fixture::<WriteResponseStage>(value)?,
17126                "write_achievement" => assert_fixture::<WriteAchievement>(value)?,
17127                "mutation_resolver" => assert_fixture::<MutationResolver>(value)?,
17128                "mutation_outcome" => assert_fixture::<MutationOutcome>(value)?,
17129                "submission_state" => assert_fixture::<SubmissionState>(value)?,
17130                "expected_binding" => assert_fixture::<ExpectedBinding>(value)?,
17131                "administration_alias_action" => assert_fixture::<AdministrationAliasAction>(value)?,
17132                "administration_mutation" => assert_fixture::<AdministrationMutation>(value)?,
17133                "administration_outcome" => assert_fixture::<AdministrationOutcome>(value)?,
17134                "index_change_apply_receipt" => assert_fixture::<IndexChangeApplyReceipt>(value)?,
17135                "bulk_document_item" => assert_fixture::<BulkDocumentItem>(value)?,
17136                "bulk_document_item_outcome" => assert_fixture::<BulkDocumentItemOutcome>(value)?,
17137                "bulk_document_outcome" => assert_fixture::<BulkDocumentOutcome>(value)?,
17138                "metric_attribute_value" => assert_fixture::<MetricAttributeValue>(value)?,
17139                "metric_attribute" => assert_fixture::<MetricAttribute>(value)?,
17140                "metric_number" => assert_fixture::<MetricNumber>(value)?,
17141                "metric_temporality" => assert_fixture::<MetricTemporality>(value)?,
17142                "metric_point_kind" => assert_fixture::<MetricPointKind>(value)?,
17143                "metric_exponential_buckets" => assert_fixture::<MetricExponentialBuckets>(value)?,
17144                "metric_data" => assert_fixture::<MetricData>(value)?,
17145                "metric_instrumentation_scope" => assert_fixture::<MetricInstrumentationScope>(value)?,
17146                "metric_exemplar" => assert_fixture::<MetricExemplar>(value)?,
17147                "metric_point" => assert_fixture::<MetricPoint>(value)?,
17148                "entity_ref" => assert_fixture::<EntityRef>(value)?,
17149                "relationship_evidence_ref" => assert_fixture::<RelationshipEvidenceRef>(value)?,
17150                "relationship_directionality" => assert_fixture::<RelationshipDirectionality>(value)?,
17151                "relationship_record" => assert_fixture::<RelationshipRecord>(value)?,
17152                "profile_label" => assert_fixture::<ProfileLabel>(value)?,
17153                "profile_sample_type" => assert_fixture::<ProfileSampleType>(value)?,
17154                "profile_mapping" => assert_fixture::<ProfileMapping>(value)?,
17155                "profile_function" => assert_fixture::<ProfileFunction>(value)?,
17156                "profile_line" => assert_fixture::<ProfileLine>(value)?,
17157                "profile_location" => assert_fixture::<ProfileLocation>(value)?,
17158                "profile_stack" => assert_fixture::<ProfileStack>(value)?,
17159                "profile_sample" => assert_fixture::<ProfileSample>(value)?,
17160                "profile_instrumentation_scope" => assert_fixture::<ProfileInstrumentationScope>(value)?,
17161                "profile_batch" => assert_fixture::<ProfileBatch>(value)?,
17162                "native_record" => assert_fixture::<NativeRecord>(value)?,
17163                "retained_append_item" => assert_fixture::<RetainedAppendItem>(value)?,
17164                "retained_append_state" => assert_fixture::<RetainedAppendState>(value)?,
17165                "retained_append_retry_safety" => assert_fixture::<RetainedAppendRetrySafety>(value)?,
17166                "retained_append_item_outcome" => assert_fixture::<RetainedAppendItemOutcome>(value)?,
17167                "retained_append_bulk_outcome" => assert_fixture::<RetainedAppendBulkOutcome>(value)?,
17168                "retained_append_observation_state" => assert_fixture::<RetainedAppendObservationState>(value)?,
17169                "retained_append_observation_outcome" => assert_fixture::<RetainedAppendObservationOutcome>(value)?,
17170                "binary_value" => assert_fixture::<BinaryValue>(value)?,
17171                "state_hash_field" => assert_fixture::<StateHashField>(value)?,
17172                "state_set_entry" => assert_fixture::<StateSetEntry>(value)?,
17173                "state_set_condition" => assert_fixture::<StateSetCondition>(value)?,
17174                "state_operation" => assert_fixture::<StateOperation>(value)?,
17175                "state_optional_value" => assert_fixture::<StateOptionalValue>(value)?,
17176                "state_command_result" => assert_fixture::<StateCommandResult>(value)?,
17177                "state_write_resolution" => assert_fixture::<StateWriteResolution>(value)?,
17178                "service_credential_reservation" => assert_fixture::<ServiceCredentialReservation>(value)?,
17179                "subscription_metadata_field" => assert_fixture::<SubscriptionMetadataField>(value)?,
17180                "subscription_field" => assert_fixture::<SubscriptionField>(value)?,
17181                "subscription_filter" => assert_fixture::<SubscriptionFilter>(value)?,
17182                "subscription_cursor_entry" => assert_fixture::<SubscriptionCursorEntry>(value)?,
17183                "subscription_route" => assert_fixture::<SubscriptionRoute>(value)?,
17184                "subscription_start_position" => assert_fixture::<SubscriptionStartPosition>(value)?,
17185                "subscription_start" => assert_fixture::<SubscriptionStart>(value)?,
17186                "subscription_accepted" => assert_fixture::<SubscriptionAccepted>(value)?,
17187                "subscription_writer_fence" => assert_fixture::<SubscriptionWriterFence>(value)?,
17188                "subscription_event" => assert_fixture::<SubscriptionEvent>(value)?,
17189                "subscription_heartbeat" => assert_fixture::<SubscriptionHeartbeat>(value)?,
17190                "subscription_gap" => assert_fixture::<SubscriptionGap>(value)?,
17191                "subscription_terminal_reason" => assert_fixture::<SubscriptionTerminalReason>(value)?,
17192                "subscription_terminal" => assert_fixture::<SubscriptionTerminal>(value)?,
17193                "subscription_frame" => assert_fixture::<SubscriptionFrame>(value)?,
17194                "stream_binding" => assert_fixture::<StreamBinding>(value)?,
17195                "capability_grant" => assert_fixture::<CapabilityGrant>(value)?,
17196                "protocol_limit" => assert_fixture::<ProtocolLimit>(value)?,
17197                "document_mutation_condition" => assert_fixture::<DocumentMutationCondition>(value)?,
17198                "audit_adapter" => assert_fixture::<AuditAdapter>(value)?,
17199                "audit_decision" => assert_fixture::<AuditDecision>(value)?,
17200                "audit_outcome" => assert_fixture::<AuditOutcome>(value)?,
17201                "audit_detail" => assert_fixture::<AuditDetail>(value)?,
17202                "audit_gap_reason" => assert_fixture::<AuditGapReason>(value)?,
17203                "audit_event" => assert_fixture::<AuditEvent>(value)?,
17204                "audit_gap" => assert_fixture::<AuditGap>(value)?,
17205                "audit_stream_state" => assert_fixture::<AuditStreamState>(value)?,
17206                "service_credential_grant" => assert_fixture::<ServiceCredentialGrant>(value)?,
17207                "service_credential_summary" => assert_fixture::<ServiceCredentialSummary>(value)?,
17208                "security_role" => assert_fixture::<SecurityRole>(value)?,
17209                "role_append_scope_change" => assert_fixture::<RoleAppendScopeChange>(value)?,
17210                "role_append_access_preparation" => assert_fixture::<RoleAppendAccessPreparation>(value)?,
17211                "security_action_outcome" => assert_fixture::<SecurityActionOutcome>(value)?,
17212                "maintenance_work_state" => assert_fixture::<MaintenanceWorkState>(value)?,
17213                "maintenance_attempt_state" => assert_fixture::<MaintenanceAttemptState>(value)?,
17214                "maintenance_failure_class" => assert_fixture::<MaintenanceFailureClass>(value)?,
17215                "maintenance_failure_class_count" => assert_fixture::<MaintenanceFailureClassCount>(value)?,
17216                "maintenance_attempt_observation" => assert_fixture::<MaintenanceAttemptObservation>(value)?,
17217                "maintenance_task_scope" => assert_fixture::<MaintenanceTaskScope>(value)?,
17218                "maintenance_task_status" => assert_fixture::<MaintenanceTaskStatus>(value)?,
17219                "maintenance_status_aggregate" => assert_fixture::<MaintenanceStatusAggregate>(value)?,
17220                "runtime_status_detail" => assert_fixture::<RuntimeStatusDetail>(value)?,
17221                "result_cache_status" => assert_fixture::<ResultCacheStatus>(value)?,
17222                "field_promotion_status" => assert_fixture::<FieldPromotionStatus>(value)?,
17223                "overload_shard_status" => assert_fixture::<OverloadShardStatus>(value)?,
17224                "external_key_binding" => assert_fixture::<ExternalKeyBinding>(value)?,
17225                "rollup_measure" => assert_fixture::<RollupMeasure>(value)?,
17226                "aggregate_then_delete_policy" => assert_fixture::<AggregateThenDeletePolicy>(value)?,
17227                "lifecycle_binding_status" => assert_fixture::<LifecycleBindingStatus>(value)?,
17228                "lifecycle_rollup_status" => assert_fixture::<LifecycleRollupStatus>(value)?,
17229                "lifecycle_status" => assert_fixture::<LifecycleStatus>(value)?,
17230                "quota_limit" => assert_fixture::<QuotaLimit>(value)?,
17231                "quota_consumption" => assert_fixture::<QuotaConsumption>(value)?,
17232                "quota_update" => assert_fixture::<QuotaUpdate>(value)?,
17233                "storage_overall_posture" => assert_fixture::<StorageOverallPosture>(value)?,
17234                "storage_profile_role" => assert_fixture::<StorageProfileRole>(value)?,
17235                "storage_provider_posture" => assert_fixture::<StorageProviderPosture>(value)?,
17236                "storage_backend_service_class" => assert_fixture::<StorageBackendServiceClass>(value)?,
17237                "storage_profile_role_binding" => assert_fixture::<StorageProfileRoleBinding>(value)?,
17238                "storage_profile_attestation" => assert_fixture::<StorageProfileAttestation>(value)?,
17239                "storage_profile_expectation" => assert_fixture::<StorageProfileExpectation>(value)?,
17240                "core_binding" => assert_fixture::<CoreBinding>(value)?,
17241                "readiness_observation" => assert_fixture::<ReadinessObservation>(value)?,
17242                "usage_dimension" => assert_fixture::<UsageDimension>(value)?,
17243                "physical_usage_value" => assert_fixture::<PhysicalUsageValue>(value)?,
17244                "core_usage_units" => assert_fixture::<CoreUsageUnits>(value)?,
17245                "core_usage_correction" => assert_fixture::<CoreUsageCorrection>(value)?,
17246                "response_meta" => assert_fixture::<ResponseMeta>(value)?,
17247                "error_disposition" => assert_fixture::<ErrorDisposition>(value)?,
17248                "recovery_action" => assert_fixture::<RecoveryAction>(value)?,
17249                "limit_class" => assert_fixture::<LimitClass>(value)?,
17250                "error_detail" => assert_fixture::<ErrorDetail>(value)?,
17251                "connection_profile" => assert_fixture::<ConnectionProfile>(value)?,
17252                _ => return Err("fixture names an unknown generated type".into()),
17253            }
17254        }
17255        Ok(())
17256    }
17257    #[test]
17258    fn every_aggregation_variant_has_a_canonical_fixture() -> Result<(), Box<dyn std::error::Error>> {
17259        let document: serde_json::Value =
17260            serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
17261        let fixtures = document["aggregation_variants"]
17262            .as_object()
17263            .ok_or("aggregation fixtures are not an object")?;
17264        assert_eq!(fixtures.len(), 17);
17265        for value in fixtures.values() {
17266            assert_fixture::<Aggregation>(value)?;
17267        }
17268        Ok(())
17269    }
17270    #[test]
17271    fn every_versioned_union_variant_has_a_canonical_fixture() -> Result<(), Box<dyn std::error::Error>> {
17272        let document: serde_json::Value =
17273            serde_json::from_str(include_str!("../../../tests/native-api/closed-schema.json"))?;
17274        let fixtures = document["versioned_union_variants"]
17275            .as_object()
17276            .ok_or("versioned union fixtures are not an object")?;
17277        assert_eq!(fixtures.len(), 6);
17278        for (name, value) in fixtures {
17279            match name.as_str() {
17280                "mapping_field_type.vector" => assert_fixture::<MappingFieldType>(value)?,
17281                "mapping_field_type.sparse_vector" => assert_fixture::<MappingFieldType>(value)?,
17282                "mapping_field_type.vector_set" => assert_fixture::<MappingFieldType>(value)?,
17283                "mapping_record_model.metric_v1" => assert_fixture::<MappingRecordModel>(value)?,
17284                "mapping_record_model.relationship_v1" => assert_fixture::<MappingRecordModel>(value)?,
17285                "mapping_record_model.profile_v1" => assert_fixture::<MappingRecordModel>(value)?,
17286                _ => return Err("fixture names an unknown versioned union variant".into()),
17287            }
17288        }
17289        Ok(())
17290    }
17291    #[test]
17292    fn exact_scalar_canonicality_is_closed() {
17293        assert_eq!(
17294            U64 {
17295                value: u64::MAX.to_string()
17296            }
17297            .validate(),
17298            Ok(())
17299        );
17300        assert_eq!(
17301            I64 {
17302                value: i64::MIN.to_string()
17303            }
17304            .validate(),
17305            Ok(())
17306        );
17307        assert_eq!(U64 { value: "01".to_owned() }.validate(), Err(ScalarError::InvalidU64));
17308        assert_eq!(
17309            ExactDecimal {
17310                coefficient: "12345".to_owned(),
17311                scale: 2
17312            }
17313            .validate(),
17314            Ok(())
17315        );
17316        assert_eq!(
17317            ExactDecimal {
17318                coefficient: "123450".to_owned(),
17319                scale: 3
17320            }
17321            .validate(),
17322            Err(ScalarError::InvalidDecimal)
17323        );
17324        assert_eq!(
17325            ExactDecimal {
17326                coefficient: "1".to_owned(),
17327                scale: 1_025
17328            }
17329            .validate(),
17330            Err(ScalarError::InvalidDecimal)
17331        );
17332    }
17333    #[test]
17334    fn scalar_decoders_refuse_numbers_and_noncanonical_strings() {
17335        assert!(serde_json::from_str::<U64>("9007199254740993").is_err());
17336        assert!(serde_json::from_str::<U64>(r#""01""#).is_err());
17337        assert!(serde_json::from_str::<Identity>(r#""0123456789ABCDEF0123456789ABCDEF""#).is_err());
17338        assert!(serde_json::from_str::<Digest>(r#""0123456789abcdef0123456789abcdef""#).is_err());
17339        assert!(serde_json::from_str::<ExactDecimal>(r#"{"coefficient":"123450","scale":3}"#).is_err());
17340        assert!(serde_json::from_str::<ApproximateNumber>(r#""1.0""#).is_err());
17341    }
17342    #[test]
17343    fn semantic_json_rejects_duplicate_fields() {
17344        let value = JsonValue::Object(vec![
17345            JsonField {
17346                name: "x".to_owned(),
17347                value: JsonValue::Null,
17348            },
17349            JsonField {
17350                name: "x".to_owned(),
17351                value: JsonValue::Bool(true),
17352            },
17353        ]);
17354        assert_eq!(validate_semantic_json(&value), Err(JsonError::DuplicateObjectField));
17355    }
17356    #[test]
17357    fn strict_generated_shapes_refuse_malformed_duplicate_unknown_field_and_tag() {
17358        assert!(serde_json::from_str::<DiscoverRequest>(r#"{"unexpected":true}"#).is_err());
17359        assert!(serde_json::from_str::<Cursor>(r#"{"value":"a","value":"b"}"#).is_err());
17360        assert!(serde_json::from_str::<Query>(r#"{"kind":"future_query"}"#).is_err());
17361        assert!(serde_json::from_str::<Cursor>(r#"{"value":1}"#).is_err());
17362    }
17363    fn admitted_error_detail(code: ErrorCode) -> ErrorDetail {
17364        match code {
17365            ErrorCode::Aborted => ErrorDetail::Aborted {
17366                reason: "test".to_owned(),
17367            },
17368            ErrorCode::DeadlineExceeded => ErrorDetail::DeadlineExceeded,
17369            ErrorCode::InvalidRequest => ErrorDetail::InvalidRequest {
17370                field: None,
17371                reason: "test".to_owned(),
17372            },
17373            ErrorCode::UnsupportedVersion => ErrorDetail::UnsupportedVersion {
17374                observed: 1,
17375                maximum_supported: 1,
17376            },
17377            ErrorCode::Unauthenticated => ErrorDetail::Unauthenticated,
17378            ErrorCode::PermissionDenied => ErrorDetail::PermissionDenied {
17379                action: None,
17380                workload_class: None,
17381            },
17382            ErrorCode::NotFound => ErrorDetail::NotFound { resource: None },
17383            ErrorCode::Conflict => ErrorDetail::Conflict {
17384                expected_revision: None,
17385                observed_revision: None,
17386            },
17387            ErrorCode::StaleCursor => ErrorDetail::StaleCursor { restart_count: 0 },
17388            ErrorCode::RestartBudgetExhausted => ErrorDetail::RestartBudgetExhausted { maximum_restarts: 0 },
17389            ErrorCode::LimitExceeded => ErrorDetail::LimitExceeded {
17390                class: LimitClass::RequestBound,
17391                limit_id: "test".to_owned(),
17392                maximum: U64 { value: "0".to_owned() },
17393            },
17394            ErrorCode::CapabilityUnavailable => ErrorDetail::CapabilityUnavailable { capability: None },
17395            ErrorCode::NotSubmitted => ErrorDetail::NotSubmitted {
17396                retry_after_millis: None,
17397            },
17398            ErrorCode::SubmittedIndeterminate => ErrorDetail::SubmittedIndeterminate { locator: None },
17399            ErrorCode::ExpiredUnknown => ErrorDetail::ExpiredUnknown { locator: None },
17400            ErrorCode::SecretNotEscrowed => ErrorDetail::SecretNotEscrowed,
17401            ErrorCode::RetentionGap => ErrorDetail::RetentionGap {
17402                retired_through: U64 { value: "0".to_owned() },
17403            },
17404            ErrorCode::ArtifactRangeInvalid => ErrorDetail::ArtifactRangeInvalid {
17405                maximum_bytes: U64 { value: "0".to_owned() },
17406            },
17407            ErrorCode::ChecksumMismatch => ErrorDetail::ChecksumMismatch {
17408                expected: Digest { value: "0".repeat(64) },
17409                observed: Digest { value: "0".repeat(64) },
17410            },
17411            ErrorCode::TemporarilyUnavailable => ErrorDetail::TemporarilyUnavailable {
17412                retry_after_millis: None,
17413            },
17414            ErrorCode::Internal => ErrorDetail::Internal,
17415        }
17416    }
17417    #[test]
17418    fn every_admitted_error_outcome_is_constructible_and_invalid_combinations_fail_closed() {
17419        let mut codes = std::collections::BTreeSet::new();
17420        for contract in LODESTONE_API_ERROR_OUTCOMES {
17421            codes.insert(format!("{:?}", contract.code));
17422            assert_eq!(
17423                ErrorBody::try_new(
17424                    contract.code,
17425                    "test".to_owned(),
17426                    contract.disposition,
17427                    contract.recovery,
17428                    admitted_error_detail(contract.code)
17429                ),
17430                Ok(ErrorBody {
17431                    code: contract.code,
17432                    message: "test".to_owned(),
17433                    disposition: contract.disposition,
17434                    recovery: contract.recovery,
17435                    details: admitted_error_detail(contract.code)
17436                })
17437            );
17438        }
17439        assert_eq!(codes.len(), 21);
17440        assert_eq!(
17441            ErrorBody::try_new(
17442                ErrorCode::Aborted,
17443                "test".to_owned(),
17444                ErrorDisposition::NotSubmitted,
17445                RecoveryAction::Stop,
17446                admitted_error_detail(ErrorCode::Aborted)
17447            ),
17448            Err(ErrorShapeError::OutcomeMismatch)
17449        );
17450        assert_eq!(
17451            ErrorBody::try_new(
17452                ErrorCode::Aborted,
17453                "test".to_owned(),
17454                ErrorDisposition::NotSubmitted,
17455                RecoveryAction::Retry,
17456                ErrorDetail::Internal
17457            ),
17458            Err(ErrorShapeError::DetailCodeMismatch)
17459        );
17460        assert_eq!(
17461            ErrorBody::try_new(
17462                ErrorCode::TemporarilyUnavailable,
17463                "test".to_owned(),
17464                ErrorDisposition::NotSubmitted,
17465                RecoveryAction::RetryAfter,
17466                ErrorDetail::TemporarilyUnavailable {
17467                    retry_after_millis: Some(U64 {
17468                        value: "60001".to_owned()
17469                    })
17470                }
17471            ),
17472            Err(ErrorShapeError::RetryAfterOutOfRange)
17473        );
17474    }
17475    #[test]
17476    fn registries_match_the_idl() {
17477        assert_eq!(LODESTONE_API_COMMAND_CONTRACTS.len(), 120);
17478        assert_eq!(LODESTONE_API_COMMAND_SEMANTICS.len(), 120);
17479        assert_eq!(LODESTONE_API_COMMAND_OUTCOMES.len(), 120);
17480        assert_eq!(LODESTONE_API_ERROR_CODES.len(), 21);
17481        assert_eq!(LODESTONE_API_ERROR_OUTCOMES.len(), 28);
17482        assert_eq!(LODESTONE_API_TYPE_CONTRACTS.len(), 332);
17483        assert_eq!(LODESTONE_API_STREAM_CONTRACTS.len(), 1);
17484        assert_eq!(LODESTONE_API_LIMITS.len(), 116);
17485        assert_eq!(LODESTONE_API_CLUSTER_CONTROL_ACTIONS.len(), 23);
17486        assert_eq!(LODESTONE_API_CLUSTER_CONTROL_TYPES.len(), 10);
17487    }
17488    #[test]
17489    fn mutation_outcome_metadata_matches_submission_boundaries() {
17490        for (command, outcome) in LODESTONE_API_COMMAND_CONTRACTS
17491            .iter()
17492            .zip(LODESTONE_API_COMMAND_OUTCOMES)
17493        {
17494            assert_eq!(command.command, outcome.command);
17495            let submits = !matches!(command.mutation, "read_only" | "read_only_prepare" | "catalog_prepare");
17496            assert_eq!(outcome.possible_submission_states.contains(&"submitted"), submits);
17497            assert_eq!(outcome.possible_submission_states.contains(&"indeterminate"), submits);
17498            assert_eq!(
17499                outcome.cancellation == "per_call_until_submission_then_resolve",
17500                submits
17501            );
17502        }
17503        for command in [
17504            Command::ReserveServiceCredential,
17505            Command::ReserveServiceCredentialRotation,
17506        ] {
17507            let outcome = LODESTONE_API_COMMAND_OUTCOMES
17508                .iter()
17509                .find(|outcome| outcome.command == command);
17510            assert!(
17511                matches!(outcome, Some(value) if value.identity_requirement == "caller_action_id" && value.resolver_command == Some(Command::ResolveServiceCredentialReservation))
17512            );
17513        }
17514    }
17515}