diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8eee375..6bd9d10 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -91,6 +91,7 @@ jobs: with: name: wheels-linux-${{ matrix.platform.target }} path: src/python/dist + retention-days: 1 musllinux: runs-on: ${{ matrix.platform.runner }} @@ -131,6 +132,7 @@ jobs: with: name: wheels-musllinux-${{ matrix.platform.target }} path: src/python/dist + retention-days: 1 windows: runs-on: ${{ matrix.platform.runner }} @@ -171,6 +173,7 @@ jobs: with: name: wheels-windows-${{ matrix.platform.target }} path: src/python/dist + retention-days: 1 macos: runs-on: ${{ matrix.platform.runner }} @@ -204,6 +207,7 @@ jobs: with: name: wheels-macos-${{ matrix.platform.target }} path: src/python/dist + retention-days: 1 sdist: runs-on: ubuntu-latest @@ -228,6 +232,7 @@ jobs: with: name: wheels-sdist path: src/python/dist + retention-days: 1 release: name: Release diff --git a/AGENTS.md b/AGENTS.md index d67458f..6ebcc2e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -3,7 +3,7 @@ ## Project Structure & Module Organization - `src/metamodel` (`linkml_meta`): Autogenerated metamodel types; optional Serde/PyO3. - `src/schemaview` (`schemaview`/`linkml_schemaview`): Schema loading/resolution and views (SchemaView, ClassView, SlotView, EnumView). -- `src/runtime` (`linkml_runtime`): Core runtime (LinkMLValue parse/validate, diff/patch, turtle). Pure Rust lib. +- `src/runtime` (`linkml_runtime`): Core runtime (LinkMLInstance parse/validate, diff/patch, turtle). Pure Rust lib. - `src/tools` (`linkml_tools`): CLI binaries: `linkml-validate`, `linkml-convert`, `linkml-diff`, `linkml-patch`, `linkml-schema-validate`. - `src/python` (`linkml_runtime_python`): PyO3 bindings and Python package `linkml_runtime_rust._native` plus helpers. - `src/wasm` (`linkml_wasm`): WASM build target. @@ -11,7 +11,7 @@ ## Build, Test, and Development Commands - Build workspace: `cargo build --workspace` - Run all tests: `cargo test --workspace` -- Format (check): `cargo fmt --all -- --check` | Fix: `cargo fmt --all` +- Format (check): `cargo +stable fmt --all -- --check` | Fix: `cargo +stable fmt --all` - Lint: `cargo clippy -p schemaview -p linkml_runtime -p linkml_tools -p linkml_runtime_python -p linkml_wasm --all-targets --all-features -- -D warnings --no-deps` (excludes autogenerated `linkml_meta`) - Run a CLI (example): - Validate: `cargo run -p linkml_tools --bin linkml-validate -- src/runtime/tests/data/schema.yaml Person src/runtime/tests/data/person_valid.yaml` @@ -25,17 +25,20 @@ - Python (bindings helpers): follow PEP 8; prefer type hints where feasible. ## Testing Guidelines +- When testing locally, always provide network access. never try to run the tests offline - Add integration tests under `src/runtime/tests/` when changing CLI/runtime behavior. - Prefer `assert_cmd` for CLI and `predicates` for output checks. Keep fixtures in `src/runtime/tests/data/`. - Run `cargo test --workspace` locally; ensure tests don’t rely on network input. + - Prefer modifying existing tests over adding new ones for new code paths. Extend current scenarios with extra assertions/fixtures to avoid redundant tests proliferating. For example, if adding null-handling in diff/patch, enhance the existing diff tests rather than introducing separate "basic diff works" tests that become redundant. ## Commit & Pull Request Guidelines -- Commits: short, imperative summary (e.g., “Add __repr__ for LinkMLValue”); group related changes. +- Commits: short, imperative summary (e.g., “Add __repr__ for LinkMLInstance”); group related changes. - PRs: include clear description, rationale, and usage examples; link issues; update docs/tests; ensure CI passes: fmt, clippy (no warnings), and tests. ### Pre-commit checklist - Run `cargo fmt --all` to format Rust code. - Run `cargo clippy -p schemaview -p linkml_runtime -p linkml_tools -p linkml_runtime_python -p linkml_wasm --all-targets --all-features -- -D warnings --no-deps` and address all warnings (the generated `linkml_meta` crate is excluded). +- Run `cargo run -p linkml_runtime_python --bin stub_gen --features stubgen -- --check` to ensure Python stubs are current. ## Notes - Network resolution is feature-gated; default builds include `resolve`. Only triggers when loading remote schemas. diff --git a/Cargo.lock b/Cargo.lock index 837e861..3098749 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -804,6 +804,15 @@ version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" +[[package]] +name = "inventory" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc61209c082fbeb19919bee74b176221b27223e27b65d781eb91af24eb1fb46e" +dependencies = [ + "rustversion", +] + [[package]] name = "io-uring" version = "0.7.10" @@ -846,6 +855,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.14.0" @@ -900,6 +918,7 @@ dependencies = [ "chrono", "merge", "pyo3", + "pyo3-stub-gen", "serde", "serde-value", "serde_path_to_error", @@ -935,6 +954,7 @@ dependencies = [ "linkml_meta", "linkml_runtime", "pyo3", + "pyo3-stub-gen", "schemaview", "serde_json", "serde_path_to_error", @@ -995,6 +1015,22 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + +[[package]] +name = "matrixmultiply" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08" +dependencies = [ + "autocfg", + "rawpointer", +] + [[package]] name = "memchr" version = "2.7.5" @@ -1075,12 +1111,45 @@ dependencies = [ "tempfile", ] +[[package]] +name = "ndarray" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841" +dependencies = [ + "matrixmultiply", + "num-complex", + "num-integer", + "num-traits", + "portable-atomic", + "portable-atomic-util", + "rawpointer", +] + [[package]] name = "normalize-line-endings" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -1090,6 +1159,22 @@ dependencies = [ "autocfg", ] +[[package]] +name = "numpy" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29f1dee9aa8d3f6f8e8b9af3803006101bb3653866ef056d530d53ae68587191" +dependencies = [ + "libc", + "ndarray", + "num-complex", + "num-integer", + "num-traits", + "pyo3", + "pyo3-build-config", + "rustc-hash", +] + [[package]] name = "object" version = "0.36.7" @@ -1234,6 +1319,15 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + [[package]] name = "potential_utf" version = "0.1.3" @@ -1393,6 +1487,40 @@ dependencies = [ "syn", ] +[[package]] +name = "pyo3-stub-gen" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93cd67bcfbf726f81cd5d5f2cc85a69e089b4eaa11bb41a6514ad1783fb9355" +dependencies = [ + "anyhow", + "chrono", + "either", + "indexmap", + "inventory", + "itertools 0.13.0", + "log", + "maplit", + "num-complex", + "numpy", + "pyo3", + "pyo3-stub-gen-derive", + "serde", + "toml", +] + +[[package]] +name = "pyo3-stub-gen-derive" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f2933be64abedb32a666273e843a1c949e957c18071cf52d543daf4adb2b4e9" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "quinn" version = "0.11.9" @@ -1522,6 +1650,12 @@ dependencies = [ "getrandom 0.3.3", ] +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + [[package]] name = "regex" version = "1.11.2" @@ -1799,6 +1933,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2179,6 +2322,47 @@ dependencies = [ "tokio", ] +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "toml_write", + "winnow", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + [[package]] name = "tower" version = "0.5.2" @@ -2663,6 +2847,15 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +[[package]] +name = "winnow" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +dependencies = [ + "memchr", +] + [[package]] name = "wit-bindgen" version = "0.45.0" diff --git a/README.md b/README.md index 5228669..51f72b9 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ # linkml-core -core linkml schema operations written in rust :) +core linkml schema operations written in rust ## Crates - linkml_meta (`src/metamodel`): Autogenerated LinkML metamodel types and helpers. Optional Serde/PyO3 features for serialization and Python interop. - schemaview (`src/schemaview`): Schema loading, CURIE/URI conversion, resolution (feature-gated), and view utilities: `SchemaView`, `ClassView`, `SlotView`, `EnumView`. -- linkml_runtime (`src/runtime`): Core runtime: `LinkMLValue` parsing (YAML/JSON), basic validation, diff/patch, and Turtle serialization. Pure Rust library. +- linkml_runtime (`src/runtime`): Core runtime: `LinkMLInstance` parsing (YAML/JSON), basic validation, diff/patch, and Turtle serialization. Pure Rust library. - linkml_tools (`src/tools`): CLI tools wrapping the runtime and schemaview: - `linkml-validate`, `linkml-convert`, `linkml-diff`, `linkml-patch`, `linkml-schema-validate`. -- linkml_runtime_python (`src/python`): PyO3 bindings and Python package (`linkml_runtime_rust._native`) exposing SchemaView and LinkMLValue to Python; includes small Python helpers. +- linkml_runtime_python (`src/python`): PyO3 bindings and Python package (`linkml_runtime_rust._native`) exposing SchemaView and LinkMLInstance to Python; includes small Python helpers. - linkml_wasm (`src/wasm`): WASM build target (experimental). ## Regenerating the metamodel diff --git a/src/metamodel/Cargo.toml b/src/metamodel/Cargo.toml index e22b693..bb0d810 100644 --- a/src/metamodel/Cargo.toml +++ b/src/metamodel/Cargo.toml @@ -13,6 +13,7 @@ serde = { version = "1.0", features = ["derive"] , optional = true } serde-value = "0.7.0" serde_yml = { version = "0.0.12", optional = true } serde_path_to_error = { version = "0.1.17", optional = true } +pyo3-stub-gen = { version = "0.13.1", optional = true } merge = "0.2.0" chrono = { version = "0.4.41", features = ["serde"] } @@ -21,3 +22,4 @@ chrono = { version = "0.4.41", features = ["serde"] } default = ["serde"] pyo3 = ["dep:pyo3"] serde = ["dep:serde", "dep:serde_yml", "dep:serde_path_to_error"] +stubgen = ["dep:pyo3-stub-gen", "pyo3"] diff --git a/src/metamodel/src/bin/stub_gen.rs b/src/metamodel/src/bin/stub_gen.rs new file mode 100644 index 0000000..3b458e3 --- /dev/null +++ b/src/metamodel/src/bin/stub_gen.rs @@ -0,0 +1,66 @@ +#[cfg(feature = "stubgen")] +fn main() -> pyo3_stub_gen::Result<()> { + let check_only = std::env::args().skip(1).any(|arg| arg == "--check"); + let stub = linkml_meta::stub_info()?; + + if check_only { + check_stubs(&stub) + } else { + stub.generate() + } +} + +#[cfg(feature = "stubgen")] +fn check_stubs(stub: &pyo3_stub_gen::StubInfo) -> pyo3_stub_gen::Result<()> { + use std::fs; + use std::io::ErrorKind; + + let mut issues = Vec::new(); + + for (name, module) in &stub.modules { + let normalized_name = name.replace('-', "_"); + let path = normalized_name.replace('.', "/"); + let dest = if module.submodules.is_empty() { + stub.python_root.join(format!("{path}.pyi")) + } else { + stub.python_root.join(&path).join("__init__.pyi") + }; + + let expected = module.to_string(); + match fs::read_to_string(&dest) { + Ok(actual) => { + if actual != expected { + issues.push(format!( + "updated content differs for `{}` (module `{name}`)", + dest.display() + )); + } + } + Err(err) if err.kind() == ErrorKind::NotFound => { + issues.push(format!( + "missing stub file `{}` for module `{name}`", + dest.display() + )); + } + Err(err) => return Err(err.into()), + } + } + + if issues.is_empty() { + Ok(()) + } else { + let mut msg = String::from("Stub files are out of date:\n"); + for issue in issues { + msg.push_str(" - "); + msg.push_str(&issue); + msg.push('\n'); + } + msg.push_str("Run `cargo run --bin stub_gen --features stubgen` to regenerate."); + Err(std::io::Error::new(ErrorKind::Other, msg).into()) + } +} + +#[cfg(not(feature = "stubgen"))] +fn main() { + eprintln!("Enable the `stubgen` feature (alongside `pyo3`) to run this generator."); +} diff --git a/src/metamodel/src/lib.rs b/src/metamodel/src/lib.rs index 25755e7..9d7c0b6 100644 --- a/src/metamodel/src/lib.rs +++ b/src/metamodel/src/lib.rs @@ -9,6 +9,10 @@ use chrono::NaiveDateTime; use merge::Merge; #[cfg(feature = "pyo3")] use pyo3::{prelude::*, FromPyObject}; +#[cfg(feature = "stubgen")] +use pyo3_stub_gen::{ + define_stub_info_gatherer, derive::gen_stub_pyclass, derive::gen_stub_pymethods, +}; #[cfg(feature = "serde")] use serde::{de::IntoDeserializer, Deserialize, Serialize}; #[cfg(feature = "serde")] @@ -342,6 +346,16 @@ impl<'py> FromPyObject<'py> for PvFormulaOptions { } } } + +#[cfg(feature = "stubgen")] +impl ::pyo3_stub_gen::PyStubType for PvFormulaOptions { + fn type_output() -> ::pyo3_stub_gen::TypeInfo { + ::pyo3_stub_gen::TypeInfo::with_module( + "typing.Literal['CODE', 'CURIE', 'URI', 'FHIRCODING', 'LABEL']", + "typing".into(), + ) + } +} #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum PresenceEnum { @@ -396,6 +410,16 @@ impl<'py> FromPyObject<'py> for PresenceEnum { } } } + +#[cfg(feature = "stubgen")] +impl ::pyo3_stub_gen::PyStubType for PresenceEnum { + fn type_output() -> ::pyo3_stub_gen::TypeInfo { + ::pyo3_stub_gen::TypeInfo::with_module( + "typing.Literal['UNCOMMITTED', 'PRESENT', 'ABSENT']", + "typing".into(), + ) + } +} #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum RelationalRoleEnum { @@ -458,6 +482,16 @@ impl<'py> FromPyObject<'py> for RelationalRoleEnum { } } } + +#[cfg(feature = "stubgen")] +impl ::pyo3_stub_gen::PyStubType for RelationalRoleEnum { + fn type_output() -> ::pyo3_stub_gen::TypeInfo { + ::pyo3_stub_gen::TypeInfo::with_module( + "typing.Literal['SUBJECT', 'OBJECT', 'PREDICATE', 'NODE', 'OTHERROLE']", + "typing".into(), + ) + } +} #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum AliasPredicateEnum { @@ -516,6 +550,16 @@ impl<'py> FromPyObject<'py> for AliasPredicateEnum { } } } + +#[cfg(feature = "stubgen")] +impl ::pyo3_stub_gen::PyStubType for AliasPredicateEnum { + fn type_output() -> ::pyo3_stub_gen::TypeInfo { + ::pyo3_stub_gen::TypeInfo::with_module( + "typing.Literal['EXACTSYNONYM', 'RELATEDSYNONYM', 'BROADSYNONYM', 'NARROWSYNONYM']", + "typing".into(), + ) + } +} #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum ObligationLevelEnum { @@ -579,12 +623,23 @@ impl<'py> FromPyObject<'py> for ObligationLevelEnum { } } +#[cfg(feature = "stubgen")] +impl ::pyo3_stub_gen::PyStubType for ObligationLevelEnum { + fn type_output() -> ::pyo3_stub_gen::TypeInfo { + ::pyo3_stub_gen::TypeInfo::with_module( + "typing.Literal['REQUIRED', 'RECOMMENDED', 'OPTIONAL', 'EXAMPLE', 'DISCOURAGED']", + "typing".into(), + ) + } +} + // Classes pub type AnyValue = Anything; #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct Extension { #[cfg_attr(feature = "serde", serde(alias = "tag"))] @@ -599,6 +654,7 @@ pub struct Extension { pub extensions: Option>>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl Extension { #[new] @@ -758,8 +814,12 @@ impl serde_utils::InlinedPair for ExtensionOrSubtype { } } +#[cfg(feature = "stubgen")] +::pyo3_stub_gen::impl_stub_type!(ExtensionOrSubtype = Annotation); + #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct Extensible { #[cfg_attr( @@ -770,6 +830,7 @@ pub struct Extensible { pub extensions: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl Extensible { #[new] @@ -1108,8 +1169,35 @@ impl<'py> FromPyObject<'py> for Box { } } +#[cfg(feature = "stubgen")] +::pyo3_stub_gen::impl_stub_type!( + ExtensibleOrSubtype = Element + | EnumBinding + | StructuredAlias + | AnonymousExpression + | PathExpression + | ClassRule + | ArrayExpression + | DimensionExpression + | PatternExpression + | ImportExpression + | PermissibleValue + | UniqueKey + | TypeMapping + | AnonymousSlotExpression + | AnonymousClassExpression + | SchemaDefinition + | TypeDefinition + | SubsetDefinition + | Definition + | EnumDefinition + | SlotDefinition + | ClassDefinition +); + #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct Annotatable { #[cfg_attr( @@ -1120,6 +1208,7 @@ pub struct Annotatable { pub annotations: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl Annotatable { #[new] @@ -1474,8 +1563,36 @@ impl<'py> FromPyObject<'py> for Box { } } +#[cfg(feature = "stubgen")] +::pyo3_stub_gen::impl_stub_type!( + AnnotatableOrSubtype = Annotation + | Element + | EnumBinding + | StructuredAlias + | AnonymousExpression + | PathExpression + | ClassRule + | ArrayExpression + | DimensionExpression + | PatternExpression + | ImportExpression + | PermissibleValue + | UniqueKey + | TypeMapping + | AnonymousSlotExpression + | AnonymousClassExpression + | SchemaDefinition + | TypeDefinition + | SubsetDefinition + | Definition + | EnumDefinition + | SlotDefinition + | ClassDefinition +); + #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct Annotation { #[cfg_attr( @@ -1496,6 +1613,7 @@ pub struct Annotation { pub extensions: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl Annotation { #[new] @@ -1573,6 +1691,7 @@ impl serde_utils::InlinedPair for Annotation { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct UnitOfMeasure { #[cfg_attr(feature = "serde", serde(default))] @@ -1599,6 +1718,7 @@ pub struct UnitOfMeasure { pub iec61360code: Option, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl UnitOfMeasure { #[new] @@ -1653,6 +1773,13 @@ pub struct Anything( #[cfg(not(feature = "serde"))] pub (), ); +#[cfg(feature = "stubgen")] +impl ::pyo3_stub_gen::PyStubType for Anything { + fn type_output() -> ::pyo3_stub_gen::TypeInfo { + ::pyo3_stub_gen::TypeInfo::any() + } +} + #[cfg(feature = "serde")] impl Serialize for Anything { fn serialize(&self, to_ser: S) -> Result @@ -1794,6 +1921,7 @@ impl std::fmt::Debug for Anything { } #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct CommonMetadata { #[cfg_attr(feature = "serde", serde(default))] @@ -1952,6 +2080,7 @@ pub struct CommonMetadata { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl CommonMetadata { #[new] @@ -2364,6 +2493,32 @@ impl<'py> FromPyObject<'py> for Box { } } +#[cfg(feature = "stubgen")] +::pyo3_stub_gen::impl_stub_type!( + CommonMetadataOrSubtype = Element + | EnumBinding + | StructuredAlias + | AnonymousExpression + | PathExpression + | ClassRule + | ArrayExpression + | DimensionExpression + | PatternExpression + | ImportExpression + | PermissibleValue + | UniqueKey + | TypeMapping + | AnonymousSlotExpression + | AnonymousClassExpression + | SchemaDefinition + | TypeDefinition + | SubsetDefinition + | Definition + | EnumDefinition + | SlotDefinition + | ClassDefinition +); + pub mod element_utl { use super::*; #[derive(Debug, Clone, PartialEq)] @@ -2427,10 +2582,14 @@ pub mod element_utl { )) } } + + #[cfg(feature = "stubgen")] + ::pyo3_stub_gen::impl_stub_type!(name_range = String | ncname); } #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct Element { pub name: String, @@ -2638,6 +2797,7 @@ pub struct Element { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl Element { #[new] @@ -2991,8 +3151,20 @@ impl serde_utils::InlinedPair for ElementOrSubtype { } } +#[cfg(feature = "stubgen")] +::pyo3_stub_gen::impl_stub_type!( + ElementOrSubtype = SchemaDefinition + | TypeDefinition + | SubsetDefinition + | Definition + | EnumDefinition + | SlotDefinition + | ClassDefinition +); + #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct SchemaDefinition { pub id: uri, @@ -3290,6 +3462,7 @@ pub struct SchemaDefinition { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl SchemaDefinition { #[new] @@ -3489,6 +3662,7 @@ impl serde_utils::InlinedPair for SchemaDefinition { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct AnonymousTypeExpression { #[cfg_attr(feature = "serde", serde(default))] @@ -3525,6 +3699,7 @@ pub struct AnonymousTypeExpression { pub all_of: Option>>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl AnonymousTypeExpression { #[new] @@ -3585,6 +3760,7 @@ impl<'py> FromPyObject<'py> for Box { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct TypeDefinition { #[cfg_attr(feature = "serde", serde(default))] @@ -3836,6 +4012,7 @@ pub struct TypeDefinition { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl TypeDefinition { #[new] @@ -4027,6 +4204,7 @@ impl serde_utils::InlinedPair for TypeDefinition { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct SubsetDefinition { pub name: String, @@ -4234,6 +4412,7 @@ pub struct SubsetDefinition { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl SubsetDefinition { #[new] @@ -4457,6 +4636,9 @@ pub mod definition_utl { )) } } + + #[cfg(feature = "stubgen")] + ::pyo3_stub_gen::impl_stub_type!(is_a_range = Definition | SlotDefinition | ClassDefinition); #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum mixins_range { @@ -4525,6 +4707,9 @@ pub mod definition_utl { )) } } + + #[cfg(feature = "stubgen")] + ::pyo3_stub_gen::impl_stub_type!(mixins_range = Definition | SlotDefinition | ClassDefinition); #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum apply_to_range { @@ -4593,10 +4778,16 @@ pub mod definition_utl { )) } } + + #[cfg(feature = "stubgen")] + ::pyo3_stub_gen::impl_stub_type!( + apply_to_range = Definition | SlotDefinition | ClassDefinition + ); } #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct Definition { #[cfg_attr(feature = "serde", serde(default))] @@ -4825,6 +5016,7 @@ pub struct Definition { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl Definition { #[new] @@ -5118,8 +5310,14 @@ impl serde_utils::InlinedPair for DefinitionOrSubtype { } } +#[cfg(feature = "stubgen")] +::pyo3_stub_gen::impl_stub_type!( + DefinitionOrSubtype = EnumDefinition | SlotDefinition | ClassDefinition +); + #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct AnonymousEnumExpression { #[cfg_attr(feature = "serde", serde(default))] @@ -5156,6 +5354,7 @@ pub struct AnonymousEnumExpression { pub concepts: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl AnonymousEnumExpression { #[new] @@ -5212,6 +5411,7 @@ impl<'py> FromPyObject<'py> for Box { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct EnumDefinition { #[cfg_attr(feature = "serde", serde(default))] @@ -5474,6 +5674,7 @@ pub struct EnumDefinition { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl EnumDefinition { #[new] @@ -5667,6 +5868,7 @@ impl serde_utils::InlinedPair for EnumDefinition { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct EnumBinding { #[cfg_attr(feature = "serde", serde(default))] @@ -5845,6 +6047,7 @@ pub struct EnumBinding { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl EnumBinding { #[new] @@ -5957,6 +6160,7 @@ impl<'py> FromPyObject<'py> for Box { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct MatchQuery { #[cfg_attr(feature = "serde", serde(default))] @@ -5965,6 +6169,7 @@ pub struct MatchQuery { pub source_ontology: Option, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl MatchQuery { #[new] @@ -6000,6 +6205,7 @@ impl<'py> FromPyObject<'py> for Box { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct ReachabilityQuery { #[cfg_attr(feature = "serde", serde(default))] @@ -6028,6 +6234,7 @@ pub struct ReachabilityQuery { pub traverse_up: Option, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl ReachabilityQuery { #[new] @@ -6074,6 +6281,7 @@ impl<'py> FromPyObject<'py> for Box { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct StructuredAlias { pub literal_form: String, @@ -6257,6 +6465,7 @@ pub struct StructuredAlias { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl StructuredAlias { #[new] @@ -6367,6 +6576,7 @@ impl<'py> FromPyObject<'py> for Box { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct Expression {} #[derive(Debug, Clone, PartialEq)] @@ -6575,8 +6785,26 @@ impl<'py> FromPyObject<'py> for Box { } } +#[cfg(feature = "stubgen")] +::pyo3_stub_gen::impl_stub_type!( + ExpressionOrSubtype = TypeExpression + | EnumExpression + | StructuredAlias + | AnonymousExpression + | PathExpression + | SlotExpression + | AnonymousSlotExpression + | SlotDefinition + | AnonymousClassExpression + | AnonymousEnumExpression + | EnumDefinition + | AnonymousTypeExpression + | TypeDefinition +); + #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct TypeExpression { #[cfg_attr(feature = "serde", serde(default))] @@ -6613,6 +6841,7 @@ pub struct TypeExpression { pub all_of: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl TypeExpression { #[new] @@ -6745,8 +6974,14 @@ impl<'py> FromPyObject<'py> for Box { } } +#[cfg(feature = "stubgen")] +::pyo3_stub_gen::impl_stub_type!( + TypeExpressionOrSubtype = AnonymousTypeExpression | TypeDefinition +); + #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct EnumExpression { #[cfg_attr(feature = "serde", serde(default))] @@ -6783,6 +7018,7 @@ pub struct EnumExpression { pub concepts: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl EnumExpression { #[new] @@ -6911,8 +7147,14 @@ impl<'py> FromPyObject<'py> for Box { } } +#[cfg(feature = "stubgen")] +::pyo3_stub_gen::impl_stub_type!( + EnumExpressionOrSubtype = AnonymousEnumExpression | EnumDefinition +); + #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct AnonymousExpression { #[cfg_attr( @@ -7083,6 +7325,7 @@ pub struct AnonymousExpression { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl AnonymousExpression { #[new] @@ -7259,8 +7502,14 @@ impl<'py> FromPyObject<'py> for Box { } } +#[cfg(feature = "stubgen")] +::pyo3_stub_gen::impl_stub_type!( + AnonymousExpressionOrSubtype = AnonymousSlotExpression | AnonymousClassExpression +); + #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct PathExpression { #[cfg_attr(feature = "serde", serde(default))] @@ -7447,6 +7696,7 @@ pub struct PathExpression { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl PathExpression { #[new] @@ -7567,6 +7817,7 @@ impl<'py> FromPyObject<'py> for Box { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct SlotExpression { #[cfg_attr(feature = "serde", serde(default))] @@ -7635,6 +7886,7 @@ pub struct SlotExpression { pub all_of: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl SlotExpression { #[new] @@ -7799,8 +8051,14 @@ impl<'py> FromPyObject<'py> for Box { } } +#[cfg(feature = "stubgen")] +::pyo3_stub_gen::impl_stub_type!( + SlotExpressionOrSubtype = AnonymousSlotExpression | SlotDefinition +); + #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct AnonymousSlotExpression { #[cfg_attr(feature = "serde", serde(default))] @@ -8035,6 +8293,7 @@ pub struct AnonymousSlotExpression { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl AnonymousSlotExpression { #[new] @@ -8197,179 +8456,180 @@ impl<'py> FromPyObject<'py> for Box { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] #[derive(Merge)] pub struct SlotDefinition { - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub singular_name: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub domain: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub slot_uri: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub array: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub inherited: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub readonly: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub ifabsent: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub list_elements_unique: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub list_elements_ordered: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub shared: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub key: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub identifier: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub designates_type: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub alias: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub owner: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub domain_of: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub subproperty_of: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub symmetric: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub reflexive: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub locally_reflexive: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub irreflexive: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub asymmetric: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub transitive: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub inverse: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub is_class_field: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub transitive_form_of: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub reflexive_transitive_form_of: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub role: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub is_usage_slot: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub usage_slot_name: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub relational_role: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub slot_group: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub is_grouping_slot: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub path_rule: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub disjoint_with: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub children_are_mutually_disjoint: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub union_of: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde(deserialize_with = "serde_utils::deserialize_inlined_dict_map_optional") )] #[cfg_attr(feature = "serde", serde(default))] pub type_mappings: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub range: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub range_expression: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub enum_range: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub bindings: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub required: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub recommended: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub multivalued: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub inlined: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub inlined_as_list: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub minimum_value: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub maximum_value: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub pattern: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub structured_pattern: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub unit: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub implicit_prefix: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub value_presence: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub equals_string: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8378,56 +8638,56 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub equals_string_in: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub equals_number: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub equals_expression: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub exact_cardinality: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub minimum_cardinality: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub maximum_cardinality: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub has_member: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub all_members: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub none_of: Option>>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub exactly_one_of: Option>>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub any_of: Option>>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub all_of: Option>>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub is_a: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] #[cfg_attr(feature = "serde", serde(alias = "abstract"))] pub abstract_: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub mixin: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub mixins: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub apply_to: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8436,12 +8696,12 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub values_from: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub string_serialization: Option, #[merge(skip)] pub name: String, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8450,23 +8710,23 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub id_prefixes: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub id_prefixes_are_closed: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub definition_uri: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde(deserialize_with = "serde_utils::deserialize_inlined_dict_map_optional") )] #[cfg_attr(feature = "serde", serde(default))] pub local_names: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub conforms_to: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8475,7 +8735,7 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub implements: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8484,37 +8744,37 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub instantiates: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde(deserialize_with = "serde_utils::deserialize_inlined_dict_map_optional") )] #[cfg_attr(feature = "serde", serde(default))] pub extensions: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde(deserialize_with = "serde_utils::deserialize_inlined_dict_map_optional") )] #[cfg_attr(feature = "serde", serde(default))] pub annotations: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub description: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde(deserialize_with = "serde_utils::deserialize_inlined_dict_map_optional") )] #[cfg_attr(feature = "serde", serde(default))] pub alt_descriptions: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub title: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub deprecated: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8523,7 +8783,7 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub todos: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8532,7 +8792,7 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub notes: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8541,25 +8801,25 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub comments: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub examples: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub in_subset: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub from_schema: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub imported_from: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub source: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub in_language: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8568,13 +8828,13 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub see_also: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub deprecated_element_has_exact_replacement: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub deprecated_element_has_possible_replacement: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8583,10 +8843,10 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub aliases: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub structured_aliases: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8595,7 +8855,7 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub mappings: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8604,7 +8864,7 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub exact_mappings: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8613,7 +8873,7 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub close_mappings: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8622,7 +8882,7 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub related_mappings: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8631,7 +8891,7 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub narrow_mappings: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8640,10 +8900,10 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub broad_mappings: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub created_by: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8652,22 +8912,22 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub contributors: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub created_on: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub last_updated_on: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub modified_by: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub status: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr(feature = "serde", serde(default))] pub rank: Option, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8676,7 +8936,7 @@ pub struct SlotDefinition { )] #[cfg_attr(feature = "serde", serde(default))] pub categories: Option>, - #[merge(strategy = merge::option::overwrite_none)] + #[merge(strategy = overwrite_except_none)] #[cfg_attr( feature = "serde", serde( @@ -8687,6 +8947,7 @@ pub struct SlotDefinition { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl SlotDefinition { #[new] @@ -8996,6 +9257,7 @@ impl serde_utils::InlinedPair for SlotDefinition { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct ClassExpression { #[cfg_attr(feature = "serde", serde(default))] @@ -9014,6 +9276,7 @@ pub struct ClassExpression { pub slot_conditions: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl ClassExpression { #[new] @@ -9130,8 +9393,14 @@ impl<'py> FromPyObject<'py> for Box { } } +#[cfg(feature = "stubgen")] +::pyo3_stub_gen::impl_stub_type!( + ClassExpressionOrSubtype = AnonymousClassExpression | ClassDefinition +); + #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct AnonymousClassExpression { #[cfg_attr(feature = "serde", serde(default))] @@ -9318,6 +9587,7 @@ pub struct AnonymousClassExpression { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl AnonymousClassExpression { #[new] @@ -9434,6 +9704,7 @@ impl<'py> FromPyObject<'py> for Box { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct ClassDefinition { #[cfg_attr(feature = "serde", serde(default))] @@ -9718,6 +9989,7 @@ pub struct ClassDefinition { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl ClassDefinition { #[new] @@ -9927,6 +10199,7 @@ impl serde_utils::InlinedPair for ClassDefinition { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct ClassLevelRule {} #[derive(Debug, Clone, PartialEq)] @@ -9991,8 +10264,12 @@ impl<'py> FromPyObject<'py> for Box { } } +#[cfg(feature = "stubgen")] +::pyo3_stub_gen::impl_stub_type!(ClassLevelRuleOrSubtype = ClassRule); + #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct ClassRule { #[cfg_attr(feature = "serde", serde(default))] @@ -10175,6 +10452,7 @@ pub struct ClassRule { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl ClassRule { #[new] @@ -10359,10 +10637,14 @@ pub mod array_expression_utl { )) } } + + #[cfg(feature = "stubgen")] + ::pyo3_stub_gen::impl_stub_type!(maximum_number_dimensions_range = Anything | isize | bool); } #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct ArrayExpression { #[cfg_attr(feature = "serde", serde(default))] @@ -10541,6 +10823,7 @@ pub struct ArrayExpression { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl ArrayExpression { #[new] @@ -10653,6 +10936,7 @@ impl<'py> FromPyObject<'py> for Box { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct DimensionExpression { #[cfg_attr(feature = "serde", serde(default))] @@ -10831,6 +11115,7 @@ pub struct DimensionExpression { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl DimensionExpression { #[new] @@ -10943,6 +11228,7 @@ impl<'py> FromPyObject<'py> for Box { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct PatternExpression { #[cfg_attr(feature = "serde", serde(default))] @@ -11119,6 +11405,7 @@ pub struct PatternExpression { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl PatternExpression { #[new] @@ -11229,6 +11516,7 @@ impl<'py> FromPyObject<'py> for Box { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct ImportExpression { pub import_from: uriorcurie, @@ -11408,6 +11696,7 @@ pub struct ImportExpression { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl ImportExpression { #[new] @@ -11518,12 +11807,14 @@ impl<'py> FromPyObject<'py> for Box { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct Setting { pub setting_key: ncname, pub setting_value: String, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl Setting { #[new] @@ -11594,12 +11885,14 @@ impl serde_utils::InlinedPair for Setting { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct Prefix { pub prefix_prefix: ncname, pub prefix_reference: uri, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl Prefix { #[new] @@ -11670,12 +11963,14 @@ impl serde_utils::InlinedPair for Prefix { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct LocalName { pub local_name_source: ncname, pub local_name_value: String, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl LocalName { #[new] @@ -11746,6 +12041,7 @@ impl serde_utils::InlinedPair for LocalName { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct Example { #[cfg_attr(feature = "serde", serde(default))] @@ -11758,6 +12054,7 @@ pub struct Example { pub value_object: Option, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl Example { #[new] @@ -11798,6 +12095,7 @@ impl<'py> FromPyObject<'py> for Box { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct AltDescription { #[cfg_attr(feature = "serde", serde(alias = "source"))] @@ -11806,6 +12104,7 @@ pub struct AltDescription { pub alt_description_text: String, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl AltDescription { #[new] @@ -11882,6 +12181,7 @@ impl serde_utils::InlinedPair for AltDescription { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct PermissibleValue { pub text: String, @@ -12077,6 +12377,7 @@ pub struct PermissibleValue { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl PermissibleValue { #[new] @@ -12230,6 +12531,7 @@ impl serde_utils::InlinedPair for PermissibleValue { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct UniqueKey { pub unique_key_name: String, @@ -12405,6 +12707,7 @@ pub struct UniqueKey { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl UniqueKey { #[new] @@ -12550,6 +12853,7 @@ impl serde_utils::InlinedPair for UniqueKey { #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[cfg_attr(feature = "pyo3", pyclass(subclass, get_all, set_all))] pub struct TypeMapping { #[cfg_attr(feature = "serde", serde(alias = "framework"))] @@ -12727,6 +13031,7 @@ pub struct TypeMapping { pub keywords: Option>, } #[cfg(feature = "pyo3")] +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl TypeMapping { #[new] @@ -12869,3 +13174,13 @@ impl serde_utils::InlinedPair for TypeMapping { } } } + +/// Overwrite `left` with `right` unless `right` is `None`. +fn overwrite_except_none(left: &mut Option, right: Option) { + if right.is_some() { + *left = right; + } +} + +#[cfg(feature = "stubgen")] +define_stub_info_gatherer!(stub_info); diff --git a/src/python/Cargo.toml b/src/python/Cargo.toml index 9845856..9e9cf34 100644 --- a/src/python/Cargo.toml +++ b/src/python/Cargo.toml @@ -9,6 +9,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] pyo3 = { version = "0.25.0" } +pyo3-stub-gen = { version = "0.13.1", optional = true } linkml_runtime = { path = "../runtime" } linkml_schemaview = { path = "../schemaview", package = "schemaview" } linkml_meta = { path = "../metamodel", features = ["pyo3"] } @@ -18,3 +19,4 @@ serde_path_to_error = "0.1.17" [features] default = [] +stubgen = ["dep:pyo3-stub-gen", "linkml_meta/stubgen"] diff --git a/src/python/python/linkml_runtime_rust/__init__.py b/src/python/python/linkml_runtime_rust/__init__.py index b4c6d91..8630a7b 100644 --- a/src/python/python/linkml_runtime_rust/__init__.py +++ b/src/python/python/linkml_runtime_rust/__init__.py @@ -3,6 +3,5 @@ from ._native import * # noqa: F401,F403 from ._resolver import resolve_schemas from .schemaview import SchemaView -from .debug_utils import pretty_linkml_value +from .debug_utils import pretty_linkml_instance __all__ = [name for name in globals() if not name.startswith("_")] - diff --git a/src/python/python/linkml_runtime_rust/_native.pyi b/src/python/python/linkml_runtime_rust/_native.pyi new file mode 100644 index 0000000..e231c3d --- /dev/null +++ b/src/python/python/linkml_runtime_rust/_native.pyi @@ -0,0 +1,5198 @@ +# This file is automatically generated by pyo3_stub_gen +# ruff: noqa: E501, F401 + +import builtins +import datetime +import typing + +class AltDescription: + @property + def alt_description_source(self) -> builtins.str: ... + @property + def alt_description_text(self) -> builtins.str: ... + @alt_description_source.setter + def alt_description_source(self, value: builtins.str) -> None: ... + @alt_description_text.setter + def alt_description_text(self, value: builtins.str) -> None: ... + def __new__(cls, alt_description_source:builtins.str, alt_description_text:builtins.str) -> AltDescription: ... + +class Annotatable: + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + def __new__(cls, annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]]) -> Annotatable: ... + +class Annotation: + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def extension_tag(self) -> builtins.str: ... + @property + def extension_value(self) -> typing.Any: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @extension_tag.setter + def extension_tag(self, value: builtins.str) -> None: ... + @extension_value.setter + def extension_value(self, value: typing.Any) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + def __new__(cls, annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], extension_tag:builtins.str, extension_value:typing.Any, extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]]) -> Annotation: ... + +class AnonymousClassExpression: + @property + def is_a(self) -> typing.Optional[builtins.str]: ... + @property + def any_of(self) -> typing.Optional[builtins.list[AnonymousClassExpression]]: ... + @property + def exactly_one_of(self) -> typing.Optional[builtins.list[AnonymousClassExpression]]: ... + @property + def none_of(self) -> typing.Optional[builtins.list[AnonymousClassExpression]]: ... + @property + def all_of(self) -> typing.Optional[builtins.list[AnonymousClassExpression]]: ... + @property + def slot_conditions(self) -> typing.Optional[builtins.dict[builtins.str, SlotDefinition]]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @is_a.setter + def is_a(self, value: typing.Optional[builtins.str]) -> None: ... + @any_of.setter + def any_of(self, value: typing.Optional[builtins.list[AnonymousClassExpression]]) -> None: ... + @exactly_one_of.setter + def exactly_one_of(self, value: typing.Optional[builtins.list[AnonymousClassExpression]]) -> None: ... + @none_of.setter + def none_of(self, value: typing.Optional[builtins.list[AnonymousClassExpression]]) -> None: ... + @all_of.setter + def all_of(self, value: typing.Optional[builtins.list[AnonymousClassExpression]]) -> None: ... + @slot_conditions.setter + def slot_conditions(self, value: typing.Optional[builtins.dict[builtins.str, SlotDefinition]]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, is_a:typing.Optional[builtins.str], any_of:typing.Optional[typing.Sequence[AnonymousClassExpression]], exactly_one_of:typing.Optional[typing.Sequence[AnonymousClassExpression]], none_of:typing.Optional[typing.Sequence[AnonymousClassExpression]], all_of:typing.Optional[typing.Sequence[AnonymousClassExpression]], slot_conditions:typing.Optional[typing.Mapping[builtins.str, SlotDefinition]], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> AnonymousClassExpression: ... + +class AnonymousEnumExpression: + @property + def code_set(self) -> typing.Optional[builtins.str]: ... + @property + def code_set_tag(self) -> typing.Optional[builtins.str]: ... + @property + def code_set_version(self) -> typing.Optional[builtins.str]: ... + @property + def pv_formula(self) -> typing.Optional[typing.Literal['CODE', 'CURIE', 'URI', 'FHIRCODING', 'LABEL']]: ... + @property + def permissible_values(self) -> typing.Optional[builtins.dict[builtins.str, PermissibleValue]]: ... + @property + def include(self) -> typing.Optional[builtins.list[AnonymousEnumExpression]]: ... + @property + def minus(self) -> typing.Optional[builtins.list[AnonymousEnumExpression]]: ... + @property + def inherits(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def reachable_from(self) -> typing.Optional[ReachabilityQuery]: ... + @property + def matches(self) -> typing.Optional[MatchQuery]: ... + @property + def concepts(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @code_set.setter + def code_set(self, value: typing.Optional[builtins.str]) -> None: ... + @code_set_tag.setter + def code_set_tag(self, value: typing.Optional[builtins.str]) -> None: ... + @code_set_version.setter + def code_set_version(self, value: typing.Optional[builtins.str]) -> None: ... + @pv_formula.setter + def pv_formula(self, value: typing.Optional[typing.Literal['CODE', 'CURIE', 'URI', 'FHIRCODING', 'LABEL']]) -> None: ... + @permissible_values.setter + def permissible_values(self, value: typing.Optional[builtins.dict[builtins.str, PermissibleValue]]) -> None: ... + @include.setter + def include(self, value: typing.Optional[builtins.list[AnonymousEnumExpression]]) -> None: ... + @minus.setter + def minus(self, value: typing.Optional[builtins.list[AnonymousEnumExpression]]) -> None: ... + @inherits.setter + def inherits(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @reachable_from.setter + def reachable_from(self, value: typing.Optional[ReachabilityQuery]) -> None: ... + @matches.setter + def matches(self, value: typing.Optional[MatchQuery]) -> None: ... + @concepts.setter + def concepts(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, code_set:typing.Optional[builtins.str], code_set_tag:typing.Optional[builtins.str], code_set_version:typing.Optional[builtins.str], pv_formula:typing.Optional[typing.Literal['CODE', 'CURIE', 'URI', 'FHIRCODING', 'LABEL']], permissible_values:typing.Optional[typing.Mapping[builtins.str, PermissibleValue]], include:typing.Optional[typing.Sequence[AnonymousEnumExpression]], minus:typing.Optional[typing.Sequence[AnonymousEnumExpression]], inherits:typing.Optional[typing.Sequence[builtins.str]], reachable_from:typing.Optional[ReachabilityQuery], matches:typing.Optional[MatchQuery], concepts:typing.Optional[typing.Sequence[builtins.str]]) -> AnonymousEnumExpression: ... + +class AnonymousExpression: + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> AnonymousExpression: ... + +class AnonymousSlotExpression: + @property + def range(self) -> typing.Optional[builtins.str]: ... + @property + def range_expression(self) -> typing.Optional[AnonymousClassExpression]: ... + @property + def enum_range(self) -> typing.Optional[AnonymousEnumExpression | EnumDefinition]: ... + @property + def bindings(self) -> typing.Optional[builtins.list[EnumBinding]]: ... + @property + def required(self) -> typing.Optional[builtins.bool]: ... + @property + def recommended(self) -> typing.Optional[builtins.bool]: ... + @property + def multivalued(self) -> typing.Optional[builtins.bool]: ... + @property + def inlined(self) -> typing.Optional[builtins.bool]: ... + @property + def inlined_as_list(self) -> typing.Optional[builtins.bool]: ... + @property + def minimum_value(self) -> typing.Optional[typing.Any]: ... + @property + def maximum_value(self) -> typing.Optional[typing.Any]: ... + @property + def pattern(self) -> typing.Optional[builtins.str]: ... + @property + def structured_pattern(self) -> typing.Optional[PatternExpression]: ... + @property + def unit(self) -> typing.Optional[UnitOfMeasure]: ... + @property + def implicit_prefix(self) -> typing.Optional[builtins.str]: ... + @property + def value_presence(self) -> typing.Optional[typing.Literal['UNCOMMITTED', 'PRESENT', 'ABSENT']]: ... + @property + def equals_string(self) -> typing.Optional[builtins.str]: ... + @property + def equals_string_in(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def equals_number(self) -> typing.Optional[builtins.int]: ... + @property + def equals_expression(self) -> typing.Optional[builtins.str]: ... + @property + def exact_cardinality(self) -> typing.Optional[builtins.int]: ... + @property + def minimum_cardinality(self) -> typing.Optional[builtins.int]: ... + @property + def maximum_cardinality(self) -> typing.Optional[builtins.int]: ... + @property + def has_member(self) -> typing.Optional[AnonymousSlotExpression]: ... + @property + def all_members(self) -> typing.Optional[AnonymousSlotExpression]: ... + @property + def none_of(self) -> typing.Optional[builtins.list[AnonymousSlotExpression]]: ... + @property + def exactly_one_of(self) -> typing.Optional[builtins.list[AnonymousSlotExpression]]: ... + @property + def any_of(self) -> typing.Optional[builtins.list[AnonymousSlotExpression]]: ... + @property + def all_of(self) -> typing.Optional[builtins.list[AnonymousSlotExpression]]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @range.setter + def range(self, value: typing.Optional[builtins.str]) -> None: ... + @range_expression.setter + def range_expression(self, value: typing.Optional[AnonymousClassExpression]) -> None: ... + @enum_range.setter + def enum_range(self, value: typing.Optional[AnonymousEnumExpression | EnumDefinition]) -> None: ... + @bindings.setter + def bindings(self, value: typing.Optional[builtins.list[EnumBinding]]) -> None: ... + @required.setter + def required(self, value: typing.Optional[builtins.bool]) -> None: ... + @recommended.setter + def recommended(self, value: typing.Optional[builtins.bool]) -> None: ... + @multivalued.setter + def multivalued(self, value: typing.Optional[builtins.bool]) -> None: ... + @inlined.setter + def inlined(self, value: typing.Optional[builtins.bool]) -> None: ... + @inlined_as_list.setter + def inlined_as_list(self, value: typing.Optional[builtins.bool]) -> None: ... + @minimum_value.setter + def minimum_value(self, value: typing.Optional[typing.Any]) -> None: ... + @maximum_value.setter + def maximum_value(self, value: typing.Optional[typing.Any]) -> None: ... + @pattern.setter + def pattern(self, value: typing.Optional[builtins.str]) -> None: ... + @structured_pattern.setter + def structured_pattern(self, value: typing.Optional[PatternExpression]) -> None: ... + @unit.setter + def unit(self, value: typing.Optional[UnitOfMeasure]) -> None: ... + @implicit_prefix.setter + def implicit_prefix(self, value: typing.Optional[builtins.str]) -> None: ... + @value_presence.setter + def value_presence(self, value: typing.Optional[typing.Literal['UNCOMMITTED', 'PRESENT', 'ABSENT']]) -> None: ... + @equals_string.setter + def equals_string(self, value: typing.Optional[builtins.str]) -> None: ... + @equals_string_in.setter + def equals_string_in(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @equals_number.setter + def equals_number(self, value: typing.Optional[builtins.int]) -> None: ... + @equals_expression.setter + def equals_expression(self, value: typing.Optional[builtins.str]) -> None: ... + @exact_cardinality.setter + def exact_cardinality(self, value: typing.Optional[builtins.int]) -> None: ... + @minimum_cardinality.setter + def minimum_cardinality(self, value: typing.Optional[builtins.int]) -> None: ... + @maximum_cardinality.setter + def maximum_cardinality(self, value: typing.Optional[builtins.int]) -> None: ... + @has_member.setter + def has_member(self, value: typing.Optional[AnonymousSlotExpression]) -> None: ... + @all_members.setter + def all_members(self, value: typing.Optional[AnonymousSlotExpression]) -> None: ... + @none_of.setter + def none_of(self, value: typing.Optional[builtins.list[AnonymousSlotExpression]]) -> None: ... + @exactly_one_of.setter + def exactly_one_of(self, value: typing.Optional[builtins.list[AnonymousSlotExpression]]) -> None: ... + @any_of.setter + def any_of(self, value: typing.Optional[builtins.list[AnonymousSlotExpression]]) -> None: ... + @all_of.setter + def all_of(self, value: typing.Optional[builtins.list[AnonymousSlotExpression]]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, range:typing.Optional[builtins.str], range_expression:typing.Optional[AnonymousClassExpression], enum_range:typing.Optional[AnonymousEnumExpression | EnumDefinition], bindings:typing.Optional[typing.Sequence[EnumBinding]], required:typing.Optional[builtins.bool], recommended:typing.Optional[builtins.bool], multivalued:typing.Optional[builtins.bool], inlined:typing.Optional[builtins.bool], inlined_as_list:typing.Optional[builtins.bool], minimum_value:typing.Optional[typing.Any], maximum_value:typing.Optional[typing.Any], pattern:typing.Optional[builtins.str], structured_pattern:typing.Optional[PatternExpression], unit:typing.Optional[UnitOfMeasure], implicit_prefix:typing.Optional[builtins.str], value_presence:typing.Optional[typing.Literal['UNCOMMITTED', 'PRESENT', 'ABSENT']], equals_string:typing.Optional[builtins.str], equals_string_in:typing.Optional[typing.Sequence[builtins.str]], equals_number:typing.Optional[builtins.int], equals_expression:typing.Optional[builtins.str], exact_cardinality:typing.Optional[builtins.int], minimum_cardinality:typing.Optional[builtins.int], maximum_cardinality:typing.Optional[builtins.int], has_member:typing.Optional[AnonymousSlotExpression], all_members:typing.Optional[AnonymousSlotExpression], none_of:typing.Optional[typing.Sequence[AnonymousSlotExpression]], exactly_one_of:typing.Optional[typing.Sequence[AnonymousSlotExpression]], any_of:typing.Optional[typing.Sequence[AnonymousSlotExpression]], all_of:typing.Optional[typing.Sequence[AnonymousSlotExpression]], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> AnonymousSlotExpression: ... + +class AnonymousTypeExpression: + @property + def pattern(self) -> typing.Optional[builtins.str]: ... + @property + def structured_pattern(self) -> typing.Optional[PatternExpression]: ... + @property + def unit(self) -> typing.Optional[UnitOfMeasure]: ... + @property + def implicit_prefix(self) -> typing.Optional[builtins.str]: ... + @property + def equals_string(self) -> typing.Optional[builtins.str]: ... + @property + def equals_string_in(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def equals_number(self) -> typing.Optional[builtins.int]: ... + @property + def minimum_value(self) -> typing.Optional[typing.Any]: ... + @property + def maximum_value(self) -> typing.Optional[typing.Any]: ... + @property + def none_of(self) -> typing.Optional[builtins.list[AnonymousTypeExpression]]: ... + @property + def exactly_one_of(self) -> typing.Optional[builtins.list[AnonymousTypeExpression]]: ... + @property + def any_of(self) -> typing.Optional[builtins.list[AnonymousTypeExpression]]: ... + @property + def all_of(self) -> typing.Optional[builtins.list[AnonymousTypeExpression]]: ... + @pattern.setter + def pattern(self, value: typing.Optional[builtins.str]) -> None: ... + @structured_pattern.setter + def structured_pattern(self, value: typing.Optional[PatternExpression]) -> None: ... + @unit.setter + def unit(self, value: typing.Optional[UnitOfMeasure]) -> None: ... + @implicit_prefix.setter + def implicit_prefix(self, value: typing.Optional[builtins.str]) -> None: ... + @equals_string.setter + def equals_string(self, value: typing.Optional[builtins.str]) -> None: ... + @equals_string_in.setter + def equals_string_in(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @equals_number.setter + def equals_number(self, value: typing.Optional[builtins.int]) -> None: ... + @minimum_value.setter + def minimum_value(self, value: typing.Optional[typing.Any]) -> None: ... + @maximum_value.setter + def maximum_value(self, value: typing.Optional[typing.Any]) -> None: ... + @none_of.setter + def none_of(self, value: typing.Optional[builtins.list[AnonymousTypeExpression]]) -> None: ... + @exactly_one_of.setter + def exactly_one_of(self, value: typing.Optional[builtins.list[AnonymousTypeExpression]]) -> None: ... + @any_of.setter + def any_of(self, value: typing.Optional[builtins.list[AnonymousTypeExpression]]) -> None: ... + @all_of.setter + def all_of(self, value: typing.Optional[builtins.list[AnonymousTypeExpression]]) -> None: ... + def __new__(cls, pattern:typing.Optional[builtins.str], structured_pattern:typing.Optional[PatternExpression], unit:typing.Optional[UnitOfMeasure], implicit_prefix:typing.Optional[builtins.str], equals_string:typing.Optional[builtins.str], equals_string_in:typing.Optional[typing.Sequence[builtins.str]], equals_number:typing.Optional[builtins.int], minimum_value:typing.Optional[typing.Any], maximum_value:typing.Optional[typing.Any], none_of:typing.Optional[typing.Sequence[AnonymousTypeExpression]], exactly_one_of:typing.Optional[typing.Sequence[AnonymousTypeExpression]], any_of:typing.Optional[typing.Sequence[AnonymousTypeExpression]], all_of:typing.Optional[typing.Sequence[AnonymousTypeExpression]]) -> AnonymousTypeExpression: ... + +class ArrayExpression: + @property + def exact_number_dimensions(self) -> typing.Optional[builtins.int]: ... + @property + def minimum_number_dimensions(self) -> typing.Optional[builtins.int]: ... + @property + def maximum_number_dimensions(self) -> typing.Optional[typing.Any | builtins.int | builtins.bool]: ... + @property + def dimensions(self) -> typing.Optional[builtins.list[DimensionExpression]]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @exact_number_dimensions.setter + def exact_number_dimensions(self, value: typing.Optional[builtins.int]) -> None: ... + @minimum_number_dimensions.setter + def minimum_number_dimensions(self, value: typing.Optional[builtins.int]) -> None: ... + @maximum_number_dimensions.setter + def maximum_number_dimensions(self, value: typing.Optional[typing.Any | builtins.int | builtins.bool]) -> None: ... + @dimensions.setter + def dimensions(self, value: typing.Optional[builtins.list[DimensionExpression]]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, exact_number_dimensions:typing.Optional[builtins.int], minimum_number_dimensions:typing.Optional[builtins.int], maximum_number_dimensions:typing.Optional[typing.Any | builtins.int | builtins.bool], dimensions:typing.Optional[typing.Sequence[DimensionExpression]], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> ArrayExpression: ... + +class ClassDefinition: + @property + def slots(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def slot_usage(self) -> typing.Optional[builtins.dict[builtins.str, SlotDefinition]]: ... + @property + def attributes(self) -> typing.Optional[builtins.dict[builtins.str, SlotDefinition]]: ... + @property + def class_uri(self) -> typing.Optional[builtins.str]: ... + @property + def subclass_of(self) -> typing.Optional[builtins.str]: ... + @property + def union_of(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def defining_slots(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def tree_root(self) -> typing.Optional[builtins.bool]: ... + @property + def unique_keys(self) -> typing.Optional[builtins.dict[builtins.str, UniqueKey]]: ... + @property + def rules(self) -> typing.Optional[builtins.list[ClassRule]]: ... + @property + def classification_rules(self) -> typing.Optional[builtins.list[AnonymousClassExpression]]: ... + @property + def slot_names_unique(self) -> typing.Optional[builtins.bool]: ... + @property + def represents_relationship(self) -> typing.Optional[builtins.bool]: ... + @property + def disjoint_with(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def children_are_mutually_disjoint(self) -> typing.Optional[builtins.bool]: ... + @property + def any_of(self) -> typing.Optional[builtins.list[AnonymousClassExpression]]: ... + @property + def exactly_one_of(self) -> typing.Optional[builtins.list[AnonymousClassExpression]]: ... + @property + def none_of(self) -> typing.Optional[builtins.list[AnonymousClassExpression]]: ... + @property + def all_of(self) -> typing.Optional[builtins.list[AnonymousClassExpression]]: ... + @property + def slot_conditions(self) -> typing.Optional[builtins.dict[builtins.str, SlotDefinition]]: ... + @property + def is_a(self) -> typing.Optional[builtins.str]: ... + @property + def abstract_(self) -> typing.Optional[builtins.bool]: ... + @property + def mixin(self) -> typing.Optional[builtins.bool]: ... + @property + def mixins(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def apply_to(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def values_from(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def string_serialization(self) -> typing.Optional[builtins.str]: ... + @property + def name(self) -> builtins.str: ... + @property + def id_prefixes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def id_prefixes_are_closed(self) -> typing.Optional[builtins.bool]: ... + @property + def definition_uri(self) -> typing.Optional[builtins.str]: ... + @property + def local_names(self) -> typing.Optional[builtins.dict[builtins.str, LocalName]]: ... + @property + def conforms_to(self) -> typing.Optional[builtins.str]: ... + @property + def implements(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def instantiates(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @slots.setter + def slots(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @slot_usage.setter + def slot_usage(self, value: typing.Optional[builtins.dict[builtins.str, SlotDefinition]]) -> None: ... + @attributes.setter + def attributes(self, value: typing.Optional[builtins.dict[builtins.str, SlotDefinition]]) -> None: ... + @class_uri.setter + def class_uri(self, value: typing.Optional[builtins.str]) -> None: ... + @subclass_of.setter + def subclass_of(self, value: typing.Optional[builtins.str]) -> None: ... + @union_of.setter + def union_of(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @defining_slots.setter + def defining_slots(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @tree_root.setter + def tree_root(self, value: typing.Optional[builtins.bool]) -> None: ... + @unique_keys.setter + def unique_keys(self, value: typing.Optional[builtins.dict[builtins.str, UniqueKey]]) -> None: ... + @rules.setter + def rules(self, value: typing.Optional[builtins.list[ClassRule]]) -> None: ... + @classification_rules.setter + def classification_rules(self, value: typing.Optional[builtins.list[AnonymousClassExpression]]) -> None: ... + @slot_names_unique.setter + def slot_names_unique(self, value: typing.Optional[builtins.bool]) -> None: ... + @represents_relationship.setter + def represents_relationship(self, value: typing.Optional[builtins.bool]) -> None: ... + @disjoint_with.setter + def disjoint_with(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @children_are_mutually_disjoint.setter + def children_are_mutually_disjoint(self, value: typing.Optional[builtins.bool]) -> None: ... + @any_of.setter + def any_of(self, value: typing.Optional[builtins.list[AnonymousClassExpression]]) -> None: ... + @exactly_one_of.setter + def exactly_one_of(self, value: typing.Optional[builtins.list[AnonymousClassExpression]]) -> None: ... + @none_of.setter + def none_of(self, value: typing.Optional[builtins.list[AnonymousClassExpression]]) -> None: ... + @all_of.setter + def all_of(self, value: typing.Optional[builtins.list[AnonymousClassExpression]]) -> None: ... + @slot_conditions.setter + def slot_conditions(self, value: typing.Optional[builtins.dict[builtins.str, SlotDefinition]]) -> None: ... + @is_a.setter + def is_a(self, value: typing.Optional[builtins.str]) -> None: ... + @abstract_.setter + def abstract_(self, value: typing.Optional[builtins.bool]) -> None: ... + @mixin.setter + def mixin(self, value: typing.Optional[builtins.bool]) -> None: ... + @mixins.setter + def mixins(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @apply_to.setter + def apply_to(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @values_from.setter + def values_from(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @string_serialization.setter + def string_serialization(self, value: typing.Optional[builtins.str]) -> None: ... + @name.setter + def name(self, value: builtins.str) -> None: ... + @id_prefixes.setter + def id_prefixes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @id_prefixes_are_closed.setter + def id_prefixes_are_closed(self, value: typing.Optional[builtins.bool]) -> None: ... + @definition_uri.setter + def definition_uri(self, value: typing.Optional[builtins.str]) -> None: ... + @local_names.setter + def local_names(self, value: typing.Optional[builtins.dict[builtins.str, LocalName]]) -> None: ... + @conforms_to.setter + def conforms_to(self, value: typing.Optional[builtins.str]) -> None: ... + @implements.setter + def implements(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @instantiates.setter + def instantiates(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, slots:typing.Optional[typing.Sequence[builtins.str]], slot_usage:typing.Optional[typing.Mapping[builtins.str, SlotDefinition]], attributes:typing.Optional[typing.Mapping[builtins.str, SlotDefinition]], class_uri:typing.Optional[builtins.str], subclass_of:typing.Optional[builtins.str], union_of:typing.Optional[typing.Sequence[builtins.str]], defining_slots:typing.Optional[typing.Sequence[builtins.str]], tree_root:typing.Optional[builtins.bool], unique_keys:typing.Optional[typing.Mapping[builtins.str, UniqueKey]], rules:typing.Optional[typing.Sequence[ClassRule]], classification_rules:typing.Optional[typing.Sequence[AnonymousClassExpression]], slot_names_unique:typing.Optional[builtins.bool], represents_relationship:typing.Optional[builtins.bool], disjoint_with:typing.Optional[typing.Sequence[builtins.str]], children_are_mutually_disjoint:typing.Optional[builtins.bool], any_of:typing.Optional[typing.Sequence[AnonymousClassExpression]], exactly_one_of:typing.Optional[typing.Sequence[AnonymousClassExpression]], none_of:typing.Optional[typing.Sequence[AnonymousClassExpression]], all_of:typing.Optional[typing.Sequence[AnonymousClassExpression]], slot_conditions:typing.Optional[typing.Mapping[builtins.str, SlotDefinition]], is_a:typing.Optional[builtins.str], abstract_:typing.Optional[builtins.bool], mixin:typing.Optional[builtins.bool], mixins:typing.Optional[typing.Sequence[builtins.str]], apply_to:typing.Optional[typing.Sequence[builtins.str]], values_from:typing.Optional[typing.Sequence[builtins.str]], string_serialization:typing.Optional[builtins.str], name:builtins.str, id_prefixes:typing.Optional[typing.Sequence[builtins.str]], id_prefixes_are_closed:typing.Optional[builtins.bool], definition_uri:typing.Optional[builtins.str], local_names:typing.Optional[typing.Mapping[builtins.str, LocalName]], conforms_to:typing.Optional[builtins.str], implements:typing.Optional[typing.Sequence[builtins.str]], instantiates:typing.Optional[typing.Sequence[builtins.str]], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> ClassDefinition: ... + +class ClassExpression: + @property + def any_of(self) -> typing.Optional[builtins.list[AnonymousClassExpression]]: ... + @property + def exactly_one_of(self) -> typing.Optional[builtins.list[AnonymousClassExpression]]: ... + @property + def none_of(self) -> typing.Optional[builtins.list[AnonymousClassExpression]]: ... + @property + def all_of(self) -> typing.Optional[builtins.list[AnonymousClassExpression]]: ... + @property + def slot_conditions(self) -> typing.Optional[builtins.dict[builtins.str, SlotDefinition]]: ... + @any_of.setter + def any_of(self, value: typing.Optional[builtins.list[AnonymousClassExpression]]) -> None: ... + @exactly_one_of.setter + def exactly_one_of(self, value: typing.Optional[builtins.list[AnonymousClassExpression]]) -> None: ... + @none_of.setter + def none_of(self, value: typing.Optional[builtins.list[AnonymousClassExpression]]) -> None: ... + @all_of.setter + def all_of(self, value: typing.Optional[builtins.list[AnonymousClassExpression]]) -> None: ... + @slot_conditions.setter + def slot_conditions(self, value: typing.Optional[builtins.dict[builtins.str, SlotDefinition]]) -> None: ... + def __new__(cls, any_of:typing.Optional[typing.Sequence[AnonymousClassExpression]], exactly_one_of:typing.Optional[typing.Sequence[AnonymousClassExpression]], none_of:typing.Optional[typing.Sequence[AnonymousClassExpression]], all_of:typing.Optional[typing.Sequence[AnonymousClassExpression]], slot_conditions:typing.Optional[typing.Mapping[builtins.str, SlotDefinition]]) -> ClassExpression: ... + +class ClassLevelRule: + ... + +class ClassRule: + @property + def preconditions(self) -> typing.Optional[AnonymousClassExpression]: ... + @property + def postconditions(self) -> typing.Optional[AnonymousClassExpression]: ... + @property + def elseconditions(self) -> typing.Optional[AnonymousClassExpression]: ... + @property + def bidirectional(self) -> typing.Optional[builtins.bool]: ... + @property + def open_world(self) -> typing.Optional[builtins.bool]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def deactivated(self) -> typing.Optional[builtins.bool]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @preconditions.setter + def preconditions(self, value: typing.Optional[AnonymousClassExpression]) -> None: ... + @postconditions.setter + def postconditions(self, value: typing.Optional[AnonymousClassExpression]) -> None: ... + @elseconditions.setter + def elseconditions(self, value: typing.Optional[AnonymousClassExpression]) -> None: ... + @bidirectional.setter + def bidirectional(self, value: typing.Optional[builtins.bool]) -> None: ... + @open_world.setter + def open_world(self, value: typing.Optional[builtins.bool]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @deactivated.setter + def deactivated(self, value: typing.Optional[builtins.bool]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, preconditions:typing.Optional[AnonymousClassExpression], postconditions:typing.Optional[AnonymousClassExpression], elseconditions:typing.Optional[AnonymousClassExpression], bidirectional:typing.Optional[builtins.bool], open_world:typing.Optional[builtins.bool], rank:typing.Optional[builtins.int], deactivated:typing.Optional[builtins.bool], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> ClassRule: ... + +class ClassView: + @property + def name(self) -> builtins.str: ... + @property + def definition(self) -> ClassDefinition: ... + def slots(self) -> builtins.list[SlotView]: ... + def parent_class(self) -> typing.Optional[ClassView]: ... + def identifier_slot(self) -> typing.Optional[SlotView]: ... + def key_or_identifier_slot(self) -> typing.Optional[SlotView]: ... + def get_descendants(self, recurse:builtins.bool, include_mixins:builtins.bool) -> builtins.list[ClassView]: ... + def schema_id(self) -> builtins.str: ... + def canonical_uri(self) -> builtins.str: ... + def __repr__(self) -> builtins.str: ... + def __str__(self) -> builtins.str: ... + +class CommonMetadata: + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> CommonMetadata: ... + +class Definition: + @property + def is_a(self) -> typing.Optional[builtins.str]: ... + @property + def abstract_(self) -> typing.Optional[builtins.bool]: ... + @property + def mixin(self) -> typing.Optional[builtins.bool]: ... + @property + def mixins(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def apply_to(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def values_from(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def string_serialization(self) -> typing.Optional[builtins.str]: ... + @property + def name(self) -> builtins.str: ... + @property + def id_prefixes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def id_prefixes_are_closed(self) -> typing.Optional[builtins.bool]: ... + @property + def definition_uri(self) -> typing.Optional[builtins.str]: ... + @property + def local_names(self) -> typing.Optional[builtins.dict[builtins.str, LocalName]]: ... + @property + def conforms_to(self) -> typing.Optional[builtins.str]: ... + @property + def implements(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def instantiates(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @is_a.setter + def is_a(self, value: typing.Optional[builtins.str]) -> None: ... + @abstract_.setter + def abstract_(self, value: typing.Optional[builtins.bool]) -> None: ... + @mixin.setter + def mixin(self, value: typing.Optional[builtins.bool]) -> None: ... + @mixins.setter + def mixins(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @apply_to.setter + def apply_to(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @values_from.setter + def values_from(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @string_serialization.setter + def string_serialization(self, value: typing.Optional[builtins.str]) -> None: ... + @name.setter + def name(self, value: builtins.str) -> None: ... + @id_prefixes.setter + def id_prefixes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @id_prefixes_are_closed.setter + def id_prefixes_are_closed(self, value: typing.Optional[builtins.bool]) -> None: ... + @definition_uri.setter + def definition_uri(self, value: typing.Optional[builtins.str]) -> None: ... + @local_names.setter + def local_names(self, value: typing.Optional[builtins.dict[builtins.str, LocalName]]) -> None: ... + @conforms_to.setter + def conforms_to(self, value: typing.Optional[builtins.str]) -> None: ... + @implements.setter + def implements(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @instantiates.setter + def instantiates(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, is_a:typing.Optional[builtins.str], abstract_:typing.Optional[builtins.bool], mixin:typing.Optional[builtins.bool], mixins:typing.Optional[typing.Sequence[builtins.str]], apply_to:typing.Optional[typing.Sequence[builtins.str]], values_from:typing.Optional[typing.Sequence[builtins.str]], string_serialization:typing.Optional[builtins.str], name:builtins.str, id_prefixes:typing.Optional[typing.Sequence[builtins.str]], id_prefixes_are_closed:typing.Optional[builtins.bool], definition_uri:typing.Optional[builtins.str], local_names:typing.Optional[typing.Mapping[builtins.str, LocalName]], conforms_to:typing.Optional[builtins.str], implements:typing.Optional[typing.Sequence[builtins.str]], instantiates:typing.Optional[typing.Sequence[builtins.str]], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> Definition: ... + +class DimensionExpression: + @property + def alias(self) -> typing.Optional[builtins.str]: ... + @property + def maximum_cardinality(self) -> typing.Optional[builtins.int]: ... + @property + def minimum_cardinality(self) -> typing.Optional[builtins.int]: ... + @property + def exact_cardinality(self) -> typing.Optional[builtins.int]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @alias.setter + def alias(self, value: typing.Optional[builtins.str]) -> None: ... + @maximum_cardinality.setter + def maximum_cardinality(self, value: typing.Optional[builtins.int]) -> None: ... + @minimum_cardinality.setter + def minimum_cardinality(self, value: typing.Optional[builtins.int]) -> None: ... + @exact_cardinality.setter + def exact_cardinality(self, value: typing.Optional[builtins.int]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, alias:typing.Optional[builtins.str], maximum_cardinality:typing.Optional[builtins.int], minimum_cardinality:typing.Optional[builtins.int], exact_cardinality:typing.Optional[builtins.int], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> DimensionExpression: ... + +class Element: + @property + def name(self) -> builtins.str: ... + @property + def id_prefixes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def id_prefixes_are_closed(self) -> typing.Optional[builtins.bool]: ... + @property + def definition_uri(self) -> typing.Optional[builtins.str]: ... + @property + def local_names(self) -> typing.Optional[builtins.dict[builtins.str, LocalName]]: ... + @property + def conforms_to(self) -> typing.Optional[builtins.str]: ... + @property + def implements(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def instantiates(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @name.setter + def name(self, value: builtins.str) -> None: ... + @id_prefixes.setter + def id_prefixes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @id_prefixes_are_closed.setter + def id_prefixes_are_closed(self, value: typing.Optional[builtins.bool]) -> None: ... + @definition_uri.setter + def definition_uri(self, value: typing.Optional[builtins.str]) -> None: ... + @local_names.setter + def local_names(self, value: typing.Optional[builtins.dict[builtins.str, LocalName]]) -> None: ... + @conforms_to.setter + def conforms_to(self, value: typing.Optional[builtins.str]) -> None: ... + @implements.setter + def implements(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @instantiates.setter + def instantiates(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, name:builtins.str, id_prefixes:typing.Optional[typing.Sequence[builtins.str]], id_prefixes_are_closed:typing.Optional[builtins.bool], definition_uri:typing.Optional[builtins.str], local_names:typing.Optional[typing.Mapping[builtins.str, LocalName]], conforms_to:typing.Optional[builtins.str], implements:typing.Optional[typing.Sequence[builtins.str]], instantiates:typing.Optional[typing.Sequence[builtins.str]], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> Element: ... + +class EnumBinding: + @property + def range(self) -> typing.Optional[builtins.str]: ... + @property + def obligation_level(self) -> typing.Optional[typing.Literal['REQUIRED', 'RECOMMENDED', 'OPTIONAL', 'EXAMPLE', 'DISCOURAGED']]: ... + @property + def binds_value_of(self) -> typing.Optional[builtins.str]: ... + @property + def pv_formula(self) -> typing.Optional[typing.Literal['CODE', 'CURIE', 'URI', 'FHIRCODING', 'LABEL']]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @range.setter + def range(self, value: typing.Optional[builtins.str]) -> None: ... + @obligation_level.setter + def obligation_level(self, value: typing.Optional[typing.Literal['REQUIRED', 'RECOMMENDED', 'OPTIONAL', 'EXAMPLE', 'DISCOURAGED']]) -> None: ... + @binds_value_of.setter + def binds_value_of(self, value: typing.Optional[builtins.str]) -> None: ... + @pv_formula.setter + def pv_formula(self, value: typing.Optional[typing.Literal['CODE', 'CURIE', 'URI', 'FHIRCODING', 'LABEL']]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, range:typing.Optional[builtins.str], obligation_level:typing.Optional[typing.Literal['REQUIRED', 'RECOMMENDED', 'OPTIONAL', 'EXAMPLE', 'DISCOURAGED']], binds_value_of:typing.Optional[builtins.str], pv_formula:typing.Optional[typing.Literal['CODE', 'CURIE', 'URI', 'FHIRCODING', 'LABEL']], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> EnumBinding: ... + +class EnumDefinition: + @property + def enum_uri(self) -> typing.Optional[builtins.str]: ... + @property + def code_set(self) -> typing.Optional[builtins.str]: ... + @property + def code_set_tag(self) -> typing.Optional[builtins.str]: ... + @property + def code_set_version(self) -> typing.Optional[builtins.str]: ... + @property + def pv_formula(self) -> typing.Optional[typing.Literal['CODE', 'CURIE', 'URI', 'FHIRCODING', 'LABEL']]: ... + @property + def permissible_values(self) -> typing.Optional[builtins.dict[builtins.str, PermissibleValue]]: ... + @property + def include(self) -> typing.Optional[builtins.list[AnonymousEnumExpression]]: ... + @property + def minus(self) -> typing.Optional[builtins.list[AnonymousEnumExpression]]: ... + @property + def inherits(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def reachable_from(self) -> typing.Optional[ReachabilityQuery]: ... + @property + def matches(self) -> typing.Optional[MatchQuery]: ... + @property + def concepts(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def is_a(self) -> typing.Optional[builtins.str]: ... + @property + def abstract_(self) -> typing.Optional[builtins.bool]: ... + @property + def mixin(self) -> typing.Optional[builtins.bool]: ... + @property + def mixins(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def apply_to(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def values_from(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def string_serialization(self) -> typing.Optional[builtins.str]: ... + @property + def name(self) -> builtins.str: ... + @property + def id_prefixes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def id_prefixes_are_closed(self) -> typing.Optional[builtins.bool]: ... + @property + def definition_uri(self) -> typing.Optional[builtins.str]: ... + @property + def local_names(self) -> typing.Optional[builtins.dict[builtins.str, LocalName]]: ... + @property + def conforms_to(self) -> typing.Optional[builtins.str]: ... + @property + def implements(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def instantiates(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @enum_uri.setter + def enum_uri(self, value: typing.Optional[builtins.str]) -> None: ... + @code_set.setter + def code_set(self, value: typing.Optional[builtins.str]) -> None: ... + @code_set_tag.setter + def code_set_tag(self, value: typing.Optional[builtins.str]) -> None: ... + @code_set_version.setter + def code_set_version(self, value: typing.Optional[builtins.str]) -> None: ... + @pv_formula.setter + def pv_formula(self, value: typing.Optional[typing.Literal['CODE', 'CURIE', 'URI', 'FHIRCODING', 'LABEL']]) -> None: ... + @permissible_values.setter + def permissible_values(self, value: typing.Optional[builtins.dict[builtins.str, PermissibleValue]]) -> None: ... + @include.setter + def include(self, value: typing.Optional[builtins.list[AnonymousEnumExpression]]) -> None: ... + @minus.setter + def minus(self, value: typing.Optional[builtins.list[AnonymousEnumExpression]]) -> None: ... + @inherits.setter + def inherits(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @reachable_from.setter + def reachable_from(self, value: typing.Optional[ReachabilityQuery]) -> None: ... + @matches.setter + def matches(self, value: typing.Optional[MatchQuery]) -> None: ... + @concepts.setter + def concepts(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @is_a.setter + def is_a(self, value: typing.Optional[builtins.str]) -> None: ... + @abstract_.setter + def abstract_(self, value: typing.Optional[builtins.bool]) -> None: ... + @mixin.setter + def mixin(self, value: typing.Optional[builtins.bool]) -> None: ... + @mixins.setter + def mixins(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @apply_to.setter + def apply_to(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @values_from.setter + def values_from(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @string_serialization.setter + def string_serialization(self, value: typing.Optional[builtins.str]) -> None: ... + @name.setter + def name(self, value: builtins.str) -> None: ... + @id_prefixes.setter + def id_prefixes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @id_prefixes_are_closed.setter + def id_prefixes_are_closed(self, value: typing.Optional[builtins.bool]) -> None: ... + @definition_uri.setter + def definition_uri(self, value: typing.Optional[builtins.str]) -> None: ... + @local_names.setter + def local_names(self, value: typing.Optional[builtins.dict[builtins.str, LocalName]]) -> None: ... + @conforms_to.setter + def conforms_to(self, value: typing.Optional[builtins.str]) -> None: ... + @implements.setter + def implements(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @instantiates.setter + def instantiates(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, enum_uri:typing.Optional[builtins.str], code_set:typing.Optional[builtins.str], code_set_tag:typing.Optional[builtins.str], code_set_version:typing.Optional[builtins.str], pv_formula:typing.Optional[typing.Literal['CODE', 'CURIE', 'URI', 'FHIRCODING', 'LABEL']], permissible_values:typing.Optional[typing.Mapping[builtins.str, PermissibleValue]], include:typing.Optional[typing.Sequence[AnonymousEnumExpression]], minus:typing.Optional[typing.Sequence[AnonymousEnumExpression]], inherits:typing.Optional[typing.Sequence[builtins.str]], reachable_from:typing.Optional[ReachabilityQuery], matches:typing.Optional[MatchQuery], concepts:typing.Optional[typing.Sequence[builtins.str]], is_a:typing.Optional[builtins.str], abstract_:typing.Optional[builtins.bool], mixin:typing.Optional[builtins.bool], mixins:typing.Optional[typing.Sequence[builtins.str]], apply_to:typing.Optional[typing.Sequence[builtins.str]], values_from:typing.Optional[typing.Sequence[builtins.str]], string_serialization:typing.Optional[builtins.str], name:builtins.str, id_prefixes:typing.Optional[typing.Sequence[builtins.str]], id_prefixes_are_closed:typing.Optional[builtins.bool], definition_uri:typing.Optional[builtins.str], local_names:typing.Optional[typing.Mapping[builtins.str, LocalName]], conforms_to:typing.Optional[builtins.str], implements:typing.Optional[typing.Sequence[builtins.str]], instantiates:typing.Optional[typing.Sequence[builtins.str]], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> EnumDefinition: ... + +class EnumExpression: + @property + def code_set(self) -> typing.Optional[builtins.str]: ... + @property + def code_set_tag(self) -> typing.Optional[builtins.str]: ... + @property + def code_set_version(self) -> typing.Optional[builtins.str]: ... + @property + def pv_formula(self) -> typing.Optional[typing.Literal['CODE', 'CURIE', 'URI', 'FHIRCODING', 'LABEL']]: ... + @property + def permissible_values(self) -> typing.Optional[builtins.dict[builtins.str, PermissibleValue]]: ... + @property + def include(self) -> typing.Optional[builtins.list[AnonymousEnumExpression]]: ... + @property + def minus(self) -> typing.Optional[builtins.list[AnonymousEnumExpression]]: ... + @property + def inherits(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def reachable_from(self) -> typing.Optional[ReachabilityQuery]: ... + @property + def matches(self) -> typing.Optional[MatchQuery]: ... + @property + def concepts(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @code_set.setter + def code_set(self, value: typing.Optional[builtins.str]) -> None: ... + @code_set_tag.setter + def code_set_tag(self, value: typing.Optional[builtins.str]) -> None: ... + @code_set_version.setter + def code_set_version(self, value: typing.Optional[builtins.str]) -> None: ... + @pv_formula.setter + def pv_formula(self, value: typing.Optional[typing.Literal['CODE', 'CURIE', 'URI', 'FHIRCODING', 'LABEL']]) -> None: ... + @permissible_values.setter + def permissible_values(self, value: typing.Optional[builtins.dict[builtins.str, PermissibleValue]]) -> None: ... + @include.setter + def include(self, value: typing.Optional[builtins.list[AnonymousEnumExpression]]) -> None: ... + @minus.setter + def minus(self, value: typing.Optional[builtins.list[AnonymousEnumExpression]]) -> None: ... + @inherits.setter + def inherits(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @reachable_from.setter + def reachable_from(self, value: typing.Optional[ReachabilityQuery]) -> None: ... + @matches.setter + def matches(self, value: typing.Optional[MatchQuery]) -> None: ... + @concepts.setter + def concepts(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, code_set:typing.Optional[builtins.str], code_set_tag:typing.Optional[builtins.str], code_set_version:typing.Optional[builtins.str], pv_formula:typing.Optional[typing.Literal['CODE', 'CURIE', 'URI', 'FHIRCODING', 'LABEL']], permissible_values:typing.Optional[typing.Mapping[builtins.str, PermissibleValue]], include:typing.Optional[typing.Sequence[AnonymousEnumExpression]], minus:typing.Optional[typing.Sequence[AnonymousEnumExpression]], inherits:typing.Optional[typing.Sequence[builtins.str]], reachable_from:typing.Optional[ReachabilityQuery], matches:typing.Optional[MatchQuery], concepts:typing.Optional[typing.Sequence[builtins.str]]) -> EnumExpression: ... + +class EnumView: + @property + def name(self) -> builtins.str: ... + @property + def definition(self) -> EnumDefinition: ... + def permissible_value_keys(self) -> builtins.list[builtins.str]: ... + def schema_id(self) -> builtins.str: ... + def __repr__(self) -> builtins.str: ... + def __str__(self) -> builtins.str: ... + +class Example: + @property + def value(self) -> typing.Optional[builtins.str]: ... + @property + def value_description(self) -> typing.Optional[builtins.str]: ... + @property + def value_object(self) -> typing.Optional[typing.Any]: ... + @value.setter + def value(self, value: typing.Optional[builtins.str]) -> None: ... + @value_description.setter + def value_description(self, value: typing.Optional[builtins.str]) -> None: ... + @value_object.setter + def value_object(self, value: typing.Optional[typing.Any]) -> None: ... + def __new__(cls, value:typing.Optional[builtins.str], value_description:typing.Optional[builtins.str], value_object:typing.Optional[typing.Any]) -> Example: ... + +class Expression: + ... + +class Extensible: + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + def __new__(cls, extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]]) -> Extensible: ... + +class Extension: + @property + def extension_tag(self) -> builtins.str: ... + @property + def extension_value(self) -> typing.Any: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @extension_tag.setter + def extension_tag(self, value: builtins.str) -> None: ... + @extension_value.setter + def extension_value(self, value: typing.Any) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + def __new__(cls, extension_tag:builtins.str, extension_value:typing.Any, extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]]) -> Extension: ... + +class ImportExpression: + @property + def import_from(self) -> builtins.str: ... + @property + def import_as(self) -> typing.Optional[builtins.str]: ... + @property + def import_map(self) -> typing.Optional[builtins.dict[builtins.str, Setting]]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @import_from.setter + def import_from(self, value: builtins.str) -> None: ... + @import_as.setter + def import_as(self, value: typing.Optional[builtins.str]) -> None: ... + @import_map.setter + def import_map(self, value: typing.Optional[builtins.dict[builtins.str, Setting]]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, import_from:builtins.str, import_as:typing.Optional[builtins.str], import_map:typing.Optional[typing.Mapping[builtins.str, Setting]], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> ImportExpression: ... + +class LinkMLInstance: + @property + def slot_name(self) -> typing.Optional[builtins.str]: ... + @property + def kind(self) -> builtins.str: ... + @property + def node_id(self) -> builtins.int: ... + @property + def slot_definition(self) -> typing.Optional[SlotDefinition]: ... + @property + def class_definition(self) -> typing.Optional[ClassDefinition]: ... + @property + def class_name(self) -> typing.Optional[builtins.str]: ... + def equals(self, other:LinkMLInstance, treat_missing_as_null:builtins.bool=False) -> builtins.bool: + r""" + Semantic equality per LinkML Instances spec. + Compares this value with another `LinkMLInstance`. + """ + def __len__(self) -> builtins.int: ... + def __getitem__(self, key:typing.Any) -> LinkMLInstance: ... + def navigate(self, path:typing.Any) -> typing.Optional[LinkMLInstance]: + r""" + Navigate by a path of strings (map keys or list indices). + Returns a new LinkMLInstance if found, otherwise None. + """ + def keys(self) -> builtins.list[builtins.str]: ... + def values(self) -> builtins.list[LinkMLInstance]: ... + def as_python(self) -> typing.Any: ... + def as_turtle(self, skolem:typing.Optional[builtins.bool]) -> builtins.str: ... + def __repr__(self) -> builtins.str: ... + def __str__(self) -> builtins.str: ... + +class LocalName: + @property + def local_name_source(self) -> builtins.str: ... + @property + def local_name_value(self) -> builtins.str: ... + @local_name_source.setter + def local_name_source(self, value: builtins.str) -> None: ... + @local_name_value.setter + def local_name_value(self, value: builtins.str) -> None: ... + def __new__(cls, local_name_source:builtins.str, local_name_value:builtins.str) -> LocalName: ... + +class MatchQuery: + @property + def identifier_pattern(self) -> typing.Optional[builtins.str]: ... + @property + def source_ontology(self) -> typing.Optional[builtins.str]: ... + @identifier_pattern.setter + def identifier_pattern(self, value: typing.Optional[builtins.str]) -> None: ... + @source_ontology.setter + def source_ontology(self, value: typing.Optional[builtins.str]) -> None: ... + def __new__(cls, identifier_pattern:typing.Optional[builtins.str], source_ontology:typing.Optional[builtins.str]) -> MatchQuery: ... + +class PatchResult: + @property + def value(self) -> LinkMLInstance: ... + @property + def trace(self) -> PatchTrace: ... + def __repr__(self) -> builtins.str: ... + def __str__(self) -> builtins.str: ... + +class PatchTrace: + @property + def added(self) -> builtins.list[builtins.int]: ... + @property + def deleted(self) -> builtins.list[builtins.int]: ... + @property + def updated(self) -> builtins.list[builtins.int]: ... + def __repr__(self) -> builtins.str: ... + def __str__(self) -> builtins.str: ... + +class PathExpression: + @property + def followed_by(self) -> typing.Optional[PathExpression]: ... + @property + def none_of(self) -> typing.Optional[builtins.list[PathExpression]]: ... + @property + def any_of(self) -> typing.Optional[builtins.list[PathExpression]]: ... + @property + def all_of(self) -> typing.Optional[builtins.list[PathExpression]]: ... + @property + def exactly_one_of(self) -> typing.Optional[builtins.list[PathExpression]]: ... + @property + def reversed(self) -> typing.Optional[builtins.bool]: ... + @property + def traverse(self) -> typing.Optional[builtins.str]: ... + @property + def range_expression(self) -> typing.Optional[AnonymousClassExpression]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @followed_by.setter + def followed_by(self, value: typing.Optional[PathExpression]) -> None: ... + @none_of.setter + def none_of(self, value: typing.Optional[builtins.list[PathExpression]]) -> None: ... + @any_of.setter + def any_of(self, value: typing.Optional[builtins.list[PathExpression]]) -> None: ... + @all_of.setter + def all_of(self, value: typing.Optional[builtins.list[PathExpression]]) -> None: ... + @exactly_one_of.setter + def exactly_one_of(self, value: typing.Optional[builtins.list[PathExpression]]) -> None: ... + @reversed.setter + def reversed(self, value: typing.Optional[builtins.bool]) -> None: ... + @traverse.setter + def traverse(self, value: typing.Optional[builtins.str]) -> None: ... + @range_expression.setter + def range_expression(self, value: typing.Optional[AnonymousClassExpression]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, followed_by:typing.Optional[PathExpression], none_of:typing.Optional[typing.Sequence[PathExpression]], any_of:typing.Optional[typing.Sequence[PathExpression]], all_of:typing.Optional[typing.Sequence[PathExpression]], exactly_one_of:typing.Optional[typing.Sequence[PathExpression]], reversed:typing.Optional[builtins.bool], traverse:typing.Optional[builtins.str], range_expression:typing.Optional[AnonymousClassExpression], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> PathExpression: ... + +class PatternExpression: + @property + def syntax(self) -> typing.Optional[builtins.str]: ... + @property + def interpolated(self) -> typing.Optional[builtins.bool]: ... + @property + def partial_match(self) -> typing.Optional[builtins.bool]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @syntax.setter + def syntax(self, value: typing.Optional[builtins.str]) -> None: ... + @interpolated.setter + def interpolated(self, value: typing.Optional[builtins.bool]) -> None: ... + @partial_match.setter + def partial_match(self, value: typing.Optional[builtins.bool]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, syntax:typing.Optional[builtins.str], interpolated:typing.Optional[builtins.bool], partial_match:typing.Optional[builtins.bool], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> PatternExpression: ... + +class PermissibleValue: + @property + def text(self) -> builtins.str: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def meaning(self) -> typing.Optional[builtins.str]: ... + @property + def unit(self) -> typing.Optional[UnitOfMeasure]: ... + @property + def instantiates(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def implements(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def is_a(self) -> typing.Optional[builtins.str]: ... + @property + def mixins(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @text.setter + def text(self, value: builtins.str) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @meaning.setter + def meaning(self, value: typing.Optional[builtins.str]) -> None: ... + @unit.setter + def unit(self, value: typing.Optional[UnitOfMeasure]) -> None: ... + @instantiates.setter + def instantiates(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @implements.setter + def implements(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @is_a.setter + def is_a(self, value: typing.Optional[builtins.str]) -> None: ... + @mixins.setter + def mixins(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, text:builtins.str, description:typing.Optional[builtins.str], meaning:typing.Optional[builtins.str], unit:typing.Optional[UnitOfMeasure], instantiates:typing.Optional[typing.Sequence[builtins.str]], implements:typing.Optional[typing.Sequence[builtins.str]], is_a:typing.Optional[builtins.str], mixins:typing.Optional[typing.Sequence[builtins.str]], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> PermissibleValue: ... + +class Prefix: + @property + def prefix_prefix(self) -> builtins.str: ... + @property + def prefix_reference(self) -> builtins.str: ... + @prefix_prefix.setter + def prefix_prefix(self, value: builtins.str) -> None: ... + @prefix_reference.setter + def prefix_reference(self, value: builtins.str) -> None: ... + def __new__(cls, prefix_prefix:builtins.str, prefix_reference:builtins.str) -> Prefix: ... + +class ReachabilityQuery: + @property + def source_ontology(self) -> typing.Optional[builtins.str]: ... + @property + def source_nodes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def relationship_types(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def is_direct(self) -> typing.Optional[builtins.bool]: ... + @property + def include_self(self) -> typing.Optional[builtins.bool]: ... + @property + def traverse_up(self) -> typing.Optional[builtins.bool]: ... + @source_ontology.setter + def source_ontology(self, value: typing.Optional[builtins.str]) -> None: ... + @source_nodes.setter + def source_nodes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @relationship_types.setter + def relationship_types(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @is_direct.setter + def is_direct(self, value: typing.Optional[builtins.bool]) -> None: ... + @include_self.setter + def include_self(self, value: typing.Optional[builtins.bool]) -> None: ... + @traverse_up.setter + def traverse_up(self, value: typing.Optional[builtins.bool]) -> None: ... + def __new__(cls, source_ontology:typing.Optional[builtins.str], source_nodes:typing.Optional[typing.Sequence[builtins.str]], relationship_types:typing.Optional[typing.Sequence[builtins.str]], is_direct:typing.Optional[builtins.bool], include_self:typing.Optional[builtins.bool], traverse_up:typing.Optional[builtins.bool]) -> ReachabilityQuery: ... + +class SchemaDefinition: + @property + def id(self) -> builtins.str: ... + @property + def version(self) -> typing.Optional[builtins.str]: ... + @property + def imports(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def license(self) -> typing.Optional[builtins.str]: ... + @property + def prefixes(self) -> typing.Optional[builtins.dict[builtins.str, Prefix]]: ... + @property + def emit_prefixes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def default_curi_maps(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def default_prefix(self) -> typing.Optional[builtins.str]: ... + @property + def default_range(self) -> typing.Optional[builtins.str]: ... + @property + def subsets(self) -> typing.Optional[builtins.dict[builtins.str, SubsetDefinition]]: ... + @property + def types(self) -> typing.Optional[builtins.dict[builtins.str, TypeDefinition]]: ... + @property + def enums(self) -> typing.Optional[builtins.dict[builtins.str, EnumDefinition]]: ... + @property + def slot_definitions(self) -> typing.Optional[builtins.dict[builtins.str, SlotDefinition]]: ... + @property + def classes(self) -> typing.Optional[builtins.dict[builtins.str, ClassDefinition]]: ... + @property + def metamodel_version(self) -> typing.Optional[builtins.str]: ... + @property + def source_file(self) -> typing.Optional[builtins.str]: ... + @property + def source_file_date(self) -> typing.Optional[datetime.datetime]: ... + @property + def source_file_size(self) -> typing.Optional[builtins.int]: ... + @property + def generation_date(self) -> typing.Optional[datetime.datetime]: ... + @property + def slot_names_unique(self) -> typing.Optional[builtins.bool]: ... + @property + def settings(self) -> typing.Optional[builtins.dict[builtins.str, Setting]]: ... + @property + def bindings(self) -> typing.Optional[builtins.list[EnumBinding]]: ... + @property + def name(self) -> builtins.str: ... + @property + def id_prefixes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def id_prefixes_are_closed(self) -> typing.Optional[builtins.bool]: ... + @property + def definition_uri(self) -> typing.Optional[builtins.str]: ... + @property + def local_names(self) -> typing.Optional[builtins.dict[builtins.str, LocalName]]: ... + @property + def conforms_to(self) -> typing.Optional[builtins.str]: ... + @property + def implements(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def instantiates(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @id.setter + def id(self, value: builtins.str) -> None: ... + @version.setter + def version(self, value: typing.Optional[builtins.str]) -> None: ... + @imports.setter + def imports(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @license.setter + def license(self, value: typing.Optional[builtins.str]) -> None: ... + @prefixes.setter + def prefixes(self, value: typing.Optional[builtins.dict[builtins.str, Prefix]]) -> None: ... + @emit_prefixes.setter + def emit_prefixes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @default_curi_maps.setter + def default_curi_maps(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @default_prefix.setter + def default_prefix(self, value: typing.Optional[builtins.str]) -> None: ... + @default_range.setter + def default_range(self, value: typing.Optional[builtins.str]) -> None: ... + @subsets.setter + def subsets(self, value: typing.Optional[builtins.dict[builtins.str, SubsetDefinition]]) -> None: ... + @types.setter + def types(self, value: typing.Optional[builtins.dict[builtins.str, TypeDefinition]]) -> None: ... + @enums.setter + def enums(self, value: typing.Optional[builtins.dict[builtins.str, EnumDefinition]]) -> None: ... + @slot_definitions.setter + def slot_definitions(self, value: typing.Optional[builtins.dict[builtins.str, SlotDefinition]]) -> None: ... + @classes.setter + def classes(self, value: typing.Optional[builtins.dict[builtins.str, ClassDefinition]]) -> None: ... + @metamodel_version.setter + def metamodel_version(self, value: typing.Optional[builtins.str]) -> None: ... + @source_file.setter + def source_file(self, value: typing.Optional[builtins.str]) -> None: ... + @source_file_date.setter + def source_file_date(self, value: typing.Optional[datetime.datetime]) -> None: ... + @source_file_size.setter + def source_file_size(self, value: typing.Optional[builtins.int]) -> None: ... + @generation_date.setter + def generation_date(self, value: typing.Optional[datetime.datetime]) -> None: ... + @slot_names_unique.setter + def slot_names_unique(self, value: typing.Optional[builtins.bool]) -> None: ... + @settings.setter + def settings(self, value: typing.Optional[builtins.dict[builtins.str, Setting]]) -> None: ... + @bindings.setter + def bindings(self, value: typing.Optional[builtins.list[EnumBinding]]) -> None: ... + @name.setter + def name(self, value: builtins.str) -> None: ... + @id_prefixes.setter + def id_prefixes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @id_prefixes_are_closed.setter + def id_prefixes_are_closed(self, value: typing.Optional[builtins.bool]) -> None: ... + @definition_uri.setter + def definition_uri(self, value: typing.Optional[builtins.str]) -> None: ... + @local_names.setter + def local_names(self, value: typing.Optional[builtins.dict[builtins.str, LocalName]]) -> None: ... + @conforms_to.setter + def conforms_to(self, value: typing.Optional[builtins.str]) -> None: ... + @implements.setter + def implements(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @instantiates.setter + def instantiates(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, id:builtins.str, version:typing.Optional[builtins.str], imports:typing.Optional[typing.Sequence[builtins.str]], license:typing.Optional[builtins.str], prefixes:typing.Optional[typing.Mapping[builtins.str, Prefix]], emit_prefixes:typing.Optional[typing.Sequence[builtins.str]], default_curi_maps:typing.Optional[typing.Sequence[builtins.str]], default_prefix:typing.Optional[builtins.str], default_range:typing.Optional[builtins.str], subsets:typing.Optional[typing.Mapping[builtins.str, SubsetDefinition]], types:typing.Optional[typing.Mapping[builtins.str, TypeDefinition]], enums:typing.Optional[typing.Mapping[builtins.str, EnumDefinition]], slot_definitions:typing.Optional[typing.Mapping[builtins.str, SlotDefinition]], classes:typing.Optional[typing.Mapping[builtins.str, ClassDefinition]], metamodel_version:typing.Optional[builtins.str], source_file:typing.Optional[builtins.str], source_file_date:typing.Optional[datetime.datetime], source_file_size:typing.Optional[builtins.int], generation_date:typing.Optional[datetime.datetime], slot_names_unique:typing.Optional[builtins.bool], settings:typing.Optional[typing.Mapping[builtins.str, Setting]], bindings:typing.Optional[typing.Sequence[EnumBinding]], name:builtins.str, id_prefixes:typing.Optional[typing.Sequence[builtins.str]], id_prefixes_are_closed:typing.Optional[builtins.bool], definition_uri:typing.Optional[builtins.str], local_names:typing.Optional[typing.Mapping[builtins.str, LocalName]], conforms_to:typing.Optional[builtins.str], implements:typing.Optional[typing.Sequence[builtins.str]], instantiates:typing.Optional[typing.Sequence[builtins.str]], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> SchemaDefinition: ... + +class SchemaView: + def __new__(cls, source:typing.Optional[typing.Any]=None) -> SchemaView: ... + def _get_resolved_schema_imports(self) -> builtins.dict[tuple[builtins.str, builtins.str], builtins.str]: ... + def get_default_prefix_for_schema(self, schema_id:builtins.str, expand:builtins.bool) -> typing.Optional[builtins.str]: ... + def add_schema_from_path(self, path:builtins.str) -> builtins.bool: ... + def add_schema_str(self, data:builtins.str) -> builtins.bool: ... + def get_unresolved_schemas(self) -> builtins.list[builtins.str]: ... + def get_unresolved_schema_refs(self) -> builtins.list[tuple[builtins.str, builtins.str]]: ... + def get_resolution_uri_of_schema(self, id:builtins.str) -> typing.Optional[builtins.str]: ... + def add_schema_str_with_import_ref(self, data:builtins.str, schema_id:builtins.str, uri:builtins.str) -> None: ... + def get_schema(self, uri:builtins.str) -> typing.Optional[SchemaDefinition]: ... + def get_class_view(self, id:builtins.str) -> typing.Optional[ClassView]: ... + def get_slot_view(self, id:builtins.str) -> typing.Optional[SlotView]: ... + def get_enum_view(self, id:builtins.str) -> typing.Optional[EnumView]: ... + def schema_ids(self) -> builtins.list[builtins.str]: ... + def get_class_ids(self) -> builtins.list[builtins.str]: ... + def get_slot_ids(self) -> builtins.list[builtins.str]: ... + def __repr__(self) -> builtins.str: ... + def __str__(self) -> builtins.str: ... + +class Setting: + @property + def setting_key(self) -> builtins.str: ... + @property + def setting_value(self) -> builtins.str: ... + @setting_key.setter + def setting_key(self, value: builtins.str) -> None: ... + @setting_value.setter + def setting_value(self, value: builtins.str) -> None: ... + def __new__(cls, setting_key:builtins.str, setting_value:builtins.str) -> Setting: ... + +class SlotDefinition: + @property + def singular_name(self) -> typing.Optional[builtins.str]: ... + @property + def domain(self) -> typing.Optional[builtins.str]: ... + @property + def slot_uri(self) -> typing.Optional[builtins.str]: ... + @property + def array(self) -> typing.Optional[ArrayExpression]: ... + @property + def inherited(self) -> typing.Optional[builtins.bool]: ... + @property + def readonly(self) -> typing.Optional[builtins.str]: ... + @property + def ifabsent(self) -> typing.Optional[builtins.str]: ... + @property + def list_elements_unique(self) -> typing.Optional[builtins.bool]: ... + @property + def list_elements_ordered(self) -> typing.Optional[builtins.bool]: ... + @property + def shared(self) -> typing.Optional[builtins.bool]: ... + @property + def key(self) -> typing.Optional[builtins.bool]: ... + @property + def identifier(self) -> typing.Optional[builtins.bool]: ... + @property + def designates_type(self) -> typing.Optional[builtins.bool]: ... + @property + def alias(self) -> typing.Optional[builtins.str]: ... + @property + def owner(self) -> typing.Optional[builtins.str]: ... + @property + def domain_of(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def subproperty_of(self) -> typing.Optional[builtins.str]: ... + @property + def symmetric(self) -> typing.Optional[builtins.bool]: ... + @property + def reflexive(self) -> typing.Optional[builtins.bool]: ... + @property + def locally_reflexive(self) -> typing.Optional[builtins.bool]: ... + @property + def irreflexive(self) -> typing.Optional[builtins.bool]: ... + @property + def asymmetric(self) -> typing.Optional[builtins.bool]: ... + @property + def transitive(self) -> typing.Optional[builtins.bool]: ... + @property + def inverse(self) -> typing.Optional[builtins.str]: ... + @property + def is_class_field(self) -> typing.Optional[builtins.bool]: ... + @property + def transitive_form_of(self) -> typing.Optional[builtins.str]: ... + @property + def reflexive_transitive_form_of(self) -> typing.Optional[builtins.str]: ... + @property + def role(self) -> typing.Optional[builtins.str]: ... + @property + def is_usage_slot(self) -> typing.Optional[builtins.bool]: ... + @property + def usage_slot_name(self) -> typing.Optional[builtins.str]: ... + @property + def relational_role(self) -> typing.Optional[typing.Literal['SUBJECT', 'OBJECT', 'PREDICATE', 'NODE', 'OTHERROLE']]: ... + @property + def slot_group(self) -> typing.Optional[builtins.str]: ... + @property + def is_grouping_slot(self) -> typing.Optional[builtins.bool]: ... + @property + def path_rule(self) -> typing.Optional[PathExpression]: ... + @property + def disjoint_with(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def children_are_mutually_disjoint(self) -> typing.Optional[builtins.bool]: ... + @property + def union_of(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def type_mappings(self) -> typing.Optional[builtins.dict[builtins.str, TypeMapping]]: ... + @property + def range(self) -> typing.Optional[builtins.str]: ... + @property + def range_expression(self) -> typing.Optional[AnonymousClassExpression]: ... + @property + def enum_range(self) -> typing.Optional[AnonymousEnumExpression | EnumDefinition]: ... + @property + def bindings(self) -> typing.Optional[builtins.list[EnumBinding]]: ... + @property + def required(self) -> typing.Optional[builtins.bool]: ... + @property + def recommended(self) -> typing.Optional[builtins.bool]: ... + @property + def multivalued(self) -> typing.Optional[builtins.bool]: ... + @property + def inlined(self) -> typing.Optional[builtins.bool]: ... + @property + def inlined_as_list(self) -> typing.Optional[builtins.bool]: ... + @property + def minimum_value(self) -> typing.Optional[typing.Any]: ... + @property + def maximum_value(self) -> typing.Optional[typing.Any]: ... + @property + def pattern(self) -> typing.Optional[builtins.str]: ... + @property + def structured_pattern(self) -> typing.Optional[PatternExpression]: ... + @property + def unit(self) -> typing.Optional[UnitOfMeasure]: ... + @property + def implicit_prefix(self) -> typing.Optional[builtins.str]: ... + @property + def value_presence(self) -> typing.Optional[typing.Literal['UNCOMMITTED', 'PRESENT', 'ABSENT']]: ... + @property + def equals_string(self) -> typing.Optional[builtins.str]: ... + @property + def equals_string_in(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def equals_number(self) -> typing.Optional[builtins.int]: ... + @property + def equals_expression(self) -> typing.Optional[builtins.str]: ... + @property + def exact_cardinality(self) -> typing.Optional[builtins.int]: ... + @property + def minimum_cardinality(self) -> typing.Optional[builtins.int]: ... + @property + def maximum_cardinality(self) -> typing.Optional[builtins.int]: ... + @property + def has_member(self) -> typing.Optional[AnonymousSlotExpression]: ... + @property + def all_members(self) -> typing.Optional[AnonymousSlotExpression]: ... + @property + def none_of(self) -> typing.Optional[builtins.list[AnonymousSlotExpression]]: ... + @property + def exactly_one_of(self) -> typing.Optional[builtins.list[AnonymousSlotExpression]]: ... + @property + def any_of(self) -> typing.Optional[builtins.list[AnonymousSlotExpression]]: ... + @property + def all_of(self) -> typing.Optional[builtins.list[AnonymousSlotExpression]]: ... + @property + def is_a(self) -> typing.Optional[builtins.str]: ... + @property + def abstract_(self) -> typing.Optional[builtins.bool]: ... + @property + def mixin(self) -> typing.Optional[builtins.bool]: ... + @property + def mixins(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def apply_to(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def values_from(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def string_serialization(self) -> typing.Optional[builtins.str]: ... + @property + def name(self) -> builtins.str: ... + @property + def id_prefixes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def id_prefixes_are_closed(self) -> typing.Optional[builtins.bool]: ... + @property + def definition_uri(self) -> typing.Optional[builtins.str]: ... + @property + def local_names(self) -> typing.Optional[builtins.dict[builtins.str, LocalName]]: ... + @property + def conforms_to(self) -> typing.Optional[builtins.str]: ... + @property + def implements(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def instantiates(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @singular_name.setter + def singular_name(self, value: typing.Optional[builtins.str]) -> None: ... + @domain.setter + def domain(self, value: typing.Optional[builtins.str]) -> None: ... + @slot_uri.setter + def slot_uri(self, value: typing.Optional[builtins.str]) -> None: ... + @array.setter + def array(self, value: typing.Optional[ArrayExpression]) -> None: ... + @inherited.setter + def inherited(self, value: typing.Optional[builtins.bool]) -> None: ... + @readonly.setter + def readonly(self, value: typing.Optional[builtins.str]) -> None: ... + @ifabsent.setter + def ifabsent(self, value: typing.Optional[builtins.str]) -> None: ... + @list_elements_unique.setter + def list_elements_unique(self, value: typing.Optional[builtins.bool]) -> None: ... + @list_elements_ordered.setter + def list_elements_ordered(self, value: typing.Optional[builtins.bool]) -> None: ... + @shared.setter + def shared(self, value: typing.Optional[builtins.bool]) -> None: ... + @key.setter + def key(self, value: typing.Optional[builtins.bool]) -> None: ... + @identifier.setter + def identifier(self, value: typing.Optional[builtins.bool]) -> None: ... + @designates_type.setter + def designates_type(self, value: typing.Optional[builtins.bool]) -> None: ... + @alias.setter + def alias(self, value: typing.Optional[builtins.str]) -> None: ... + @owner.setter + def owner(self, value: typing.Optional[builtins.str]) -> None: ... + @domain_of.setter + def domain_of(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @subproperty_of.setter + def subproperty_of(self, value: typing.Optional[builtins.str]) -> None: ... + @symmetric.setter + def symmetric(self, value: typing.Optional[builtins.bool]) -> None: ... + @reflexive.setter + def reflexive(self, value: typing.Optional[builtins.bool]) -> None: ... + @locally_reflexive.setter + def locally_reflexive(self, value: typing.Optional[builtins.bool]) -> None: ... + @irreflexive.setter + def irreflexive(self, value: typing.Optional[builtins.bool]) -> None: ... + @asymmetric.setter + def asymmetric(self, value: typing.Optional[builtins.bool]) -> None: ... + @transitive.setter + def transitive(self, value: typing.Optional[builtins.bool]) -> None: ... + @inverse.setter + def inverse(self, value: typing.Optional[builtins.str]) -> None: ... + @is_class_field.setter + def is_class_field(self, value: typing.Optional[builtins.bool]) -> None: ... + @transitive_form_of.setter + def transitive_form_of(self, value: typing.Optional[builtins.str]) -> None: ... + @reflexive_transitive_form_of.setter + def reflexive_transitive_form_of(self, value: typing.Optional[builtins.str]) -> None: ... + @role.setter + def role(self, value: typing.Optional[builtins.str]) -> None: ... + @is_usage_slot.setter + def is_usage_slot(self, value: typing.Optional[builtins.bool]) -> None: ... + @usage_slot_name.setter + def usage_slot_name(self, value: typing.Optional[builtins.str]) -> None: ... + @relational_role.setter + def relational_role(self, value: typing.Optional[typing.Literal['SUBJECT', 'OBJECT', 'PREDICATE', 'NODE', 'OTHERROLE']]) -> None: ... + @slot_group.setter + def slot_group(self, value: typing.Optional[builtins.str]) -> None: ... + @is_grouping_slot.setter + def is_grouping_slot(self, value: typing.Optional[builtins.bool]) -> None: ... + @path_rule.setter + def path_rule(self, value: typing.Optional[PathExpression]) -> None: ... + @disjoint_with.setter + def disjoint_with(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @children_are_mutually_disjoint.setter + def children_are_mutually_disjoint(self, value: typing.Optional[builtins.bool]) -> None: ... + @union_of.setter + def union_of(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @type_mappings.setter + def type_mappings(self, value: typing.Optional[builtins.dict[builtins.str, TypeMapping]]) -> None: ... + @range.setter + def range(self, value: typing.Optional[builtins.str]) -> None: ... + @range_expression.setter + def range_expression(self, value: typing.Optional[AnonymousClassExpression]) -> None: ... + @enum_range.setter + def enum_range(self, value: typing.Optional[AnonymousEnumExpression | EnumDefinition]) -> None: ... + @bindings.setter + def bindings(self, value: typing.Optional[builtins.list[EnumBinding]]) -> None: ... + @required.setter + def required(self, value: typing.Optional[builtins.bool]) -> None: ... + @recommended.setter + def recommended(self, value: typing.Optional[builtins.bool]) -> None: ... + @multivalued.setter + def multivalued(self, value: typing.Optional[builtins.bool]) -> None: ... + @inlined.setter + def inlined(self, value: typing.Optional[builtins.bool]) -> None: ... + @inlined_as_list.setter + def inlined_as_list(self, value: typing.Optional[builtins.bool]) -> None: ... + @minimum_value.setter + def minimum_value(self, value: typing.Optional[typing.Any]) -> None: ... + @maximum_value.setter + def maximum_value(self, value: typing.Optional[typing.Any]) -> None: ... + @pattern.setter + def pattern(self, value: typing.Optional[builtins.str]) -> None: ... + @structured_pattern.setter + def structured_pattern(self, value: typing.Optional[PatternExpression]) -> None: ... + @unit.setter + def unit(self, value: typing.Optional[UnitOfMeasure]) -> None: ... + @implicit_prefix.setter + def implicit_prefix(self, value: typing.Optional[builtins.str]) -> None: ... + @value_presence.setter + def value_presence(self, value: typing.Optional[typing.Literal['UNCOMMITTED', 'PRESENT', 'ABSENT']]) -> None: ... + @equals_string.setter + def equals_string(self, value: typing.Optional[builtins.str]) -> None: ... + @equals_string_in.setter + def equals_string_in(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @equals_number.setter + def equals_number(self, value: typing.Optional[builtins.int]) -> None: ... + @equals_expression.setter + def equals_expression(self, value: typing.Optional[builtins.str]) -> None: ... + @exact_cardinality.setter + def exact_cardinality(self, value: typing.Optional[builtins.int]) -> None: ... + @minimum_cardinality.setter + def minimum_cardinality(self, value: typing.Optional[builtins.int]) -> None: ... + @maximum_cardinality.setter + def maximum_cardinality(self, value: typing.Optional[builtins.int]) -> None: ... + @has_member.setter + def has_member(self, value: typing.Optional[AnonymousSlotExpression]) -> None: ... + @all_members.setter + def all_members(self, value: typing.Optional[AnonymousSlotExpression]) -> None: ... + @none_of.setter + def none_of(self, value: typing.Optional[builtins.list[AnonymousSlotExpression]]) -> None: ... + @exactly_one_of.setter + def exactly_one_of(self, value: typing.Optional[builtins.list[AnonymousSlotExpression]]) -> None: ... + @any_of.setter + def any_of(self, value: typing.Optional[builtins.list[AnonymousSlotExpression]]) -> None: ... + @all_of.setter + def all_of(self, value: typing.Optional[builtins.list[AnonymousSlotExpression]]) -> None: ... + @is_a.setter + def is_a(self, value: typing.Optional[builtins.str]) -> None: ... + @abstract_.setter + def abstract_(self, value: typing.Optional[builtins.bool]) -> None: ... + @mixin.setter + def mixin(self, value: typing.Optional[builtins.bool]) -> None: ... + @mixins.setter + def mixins(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @apply_to.setter + def apply_to(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @values_from.setter + def values_from(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @string_serialization.setter + def string_serialization(self, value: typing.Optional[builtins.str]) -> None: ... + @name.setter + def name(self, value: builtins.str) -> None: ... + @id_prefixes.setter + def id_prefixes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @id_prefixes_are_closed.setter + def id_prefixes_are_closed(self, value: typing.Optional[builtins.bool]) -> None: ... + @definition_uri.setter + def definition_uri(self, value: typing.Optional[builtins.str]) -> None: ... + @local_names.setter + def local_names(self, value: typing.Optional[builtins.dict[builtins.str, LocalName]]) -> None: ... + @conforms_to.setter + def conforms_to(self, value: typing.Optional[builtins.str]) -> None: ... + @implements.setter + def implements(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @instantiates.setter + def instantiates(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, singular_name:typing.Optional[builtins.str], domain:typing.Optional[builtins.str], slot_uri:typing.Optional[builtins.str], array:typing.Optional[ArrayExpression], inherited:typing.Optional[builtins.bool], readonly:typing.Optional[builtins.str], ifabsent:typing.Optional[builtins.str], list_elements_unique:typing.Optional[builtins.bool], list_elements_ordered:typing.Optional[builtins.bool], shared:typing.Optional[builtins.bool], key:typing.Optional[builtins.bool], identifier:typing.Optional[builtins.bool], designates_type:typing.Optional[builtins.bool], alias:typing.Optional[builtins.str], owner:typing.Optional[builtins.str], domain_of:typing.Optional[typing.Sequence[builtins.str]], subproperty_of:typing.Optional[builtins.str], symmetric:typing.Optional[builtins.bool], reflexive:typing.Optional[builtins.bool], locally_reflexive:typing.Optional[builtins.bool], irreflexive:typing.Optional[builtins.bool], asymmetric:typing.Optional[builtins.bool], transitive:typing.Optional[builtins.bool], inverse:typing.Optional[builtins.str], is_class_field:typing.Optional[builtins.bool], transitive_form_of:typing.Optional[builtins.str], reflexive_transitive_form_of:typing.Optional[builtins.str], role:typing.Optional[builtins.str], is_usage_slot:typing.Optional[builtins.bool], usage_slot_name:typing.Optional[builtins.str], relational_role:typing.Optional[typing.Literal['SUBJECT', 'OBJECT', 'PREDICATE', 'NODE', 'OTHERROLE']], slot_group:typing.Optional[builtins.str], is_grouping_slot:typing.Optional[builtins.bool], path_rule:typing.Optional[PathExpression], disjoint_with:typing.Optional[typing.Sequence[builtins.str]], children_are_mutually_disjoint:typing.Optional[builtins.bool], union_of:typing.Optional[typing.Sequence[builtins.str]], type_mappings:typing.Optional[typing.Mapping[builtins.str, TypeMapping]], range:typing.Optional[builtins.str], range_expression:typing.Optional[AnonymousClassExpression], enum_range:typing.Optional[AnonymousEnumExpression | EnumDefinition], bindings:typing.Optional[typing.Sequence[EnumBinding]], required:typing.Optional[builtins.bool], recommended:typing.Optional[builtins.bool], multivalued:typing.Optional[builtins.bool], inlined:typing.Optional[builtins.bool], inlined_as_list:typing.Optional[builtins.bool], minimum_value:typing.Optional[typing.Any], maximum_value:typing.Optional[typing.Any], pattern:typing.Optional[builtins.str], structured_pattern:typing.Optional[PatternExpression], unit:typing.Optional[UnitOfMeasure], implicit_prefix:typing.Optional[builtins.str], value_presence:typing.Optional[typing.Literal['UNCOMMITTED', 'PRESENT', 'ABSENT']], equals_string:typing.Optional[builtins.str], equals_string_in:typing.Optional[typing.Sequence[builtins.str]], equals_number:typing.Optional[builtins.int], equals_expression:typing.Optional[builtins.str], exact_cardinality:typing.Optional[builtins.int], minimum_cardinality:typing.Optional[builtins.int], maximum_cardinality:typing.Optional[builtins.int], has_member:typing.Optional[AnonymousSlotExpression], all_members:typing.Optional[AnonymousSlotExpression], none_of:typing.Optional[typing.Sequence[AnonymousSlotExpression]], exactly_one_of:typing.Optional[typing.Sequence[AnonymousSlotExpression]], any_of:typing.Optional[typing.Sequence[AnonymousSlotExpression]], all_of:typing.Optional[typing.Sequence[AnonymousSlotExpression]], is_a:typing.Optional[builtins.str], abstract_:typing.Optional[builtins.bool], mixin:typing.Optional[builtins.bool], mixins:typing.Optional[typing.Sequence[builtins.str]], apply_to:typing.Optional[typing.Sequence[builtins.str]], values_from:typing.Optional[typing.Sequence[builtins.str]], string_serialization:typing.Optional[builtins.str], name:builtins.str, id_prefixes:typing.Optional[typing.Sequence[builtins.str]], id_prefixes_are_closed:typing.Optional[builtins.bool], definition_uri:typing.Optional[builtins.str], local_names:typing.Optional[typing.Mapping[builtins.str, LocalName]], conforms_to:typing.Optional[builtins.str], implements:typing.Optional[typing.Sequence[builtins.str]], instantiates:typing.Optional[typing.Sequence[builtins.str]], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> SlotDefinition: ... + +class SlotExpression: + @property + def range(self) -> typing.Optional[builtins.str]: ... + @property + def range_expression(self) -> typing.Optional[AnonymousClassExpression]: ... + @property + def enum_range(self) -> typing.Optional[AnonymousEnumExpression | EnumDefinition]: ... + @property + def bindings(self) -> typing.Optional[builtins.list[EnumBinding]]: ... + @property + def required(self) -> typing.Optional[builtins.bool]: ... + @property + def recommended(self) -> typing.Optional[builtins.bool]: ... + @property + def multivalued(self) -> typing.Optional[builtins.bool]: ... + @property + def inlined(self) -> typing.Optional[builtins.bool]: ... + @property + def inlined_as_list(self) -> typing.Optional[builtins.bool]: ... + @property + def minimum_value(self) -> typing.Optional[typing.Any]: ... + @property + def maximum_value(self) -> typing.Optional[typing.Any]: ... + @property + def pattern(self) -> typing.Optional[builtins.str]: ... + @property + def structured_pattern(self) -> typing.Optional[PatternExpression]: ... + @property + def unit(self) -> typing.Optional[UnitOfMeasure]: ... + @property + def implicit_prefix(self) -> typing.Optional[builtins.str]: ... + @property + def value_presence(self) -> typing.Optional[typing.Literal['UNCOMMITTED', 'PRESENT', 'ABSENT']]: ... + @property + def equals_string(self) -> typing.Optional[builtins.str]: ... + @property + def equals_string_in(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def equals_number(self) -> typing.Optional[builtins.int]: ... + @property + def equals_expression(self) -> typing.Optional[builtins.str]: ... + @property + def exact_cardinality(self) -> typing.Optional[builtins.int]: ... + @property + def minimum_cardinality(self) -> typing.Optional[builtins.int]: ... + @property + def maximum_cardinality(self) -> typing.Optional[builtins.int]: ... + @property + def has_member(self) -> typing.Optional[AnonymousSlotExpression]: ... + @property + def all_members(self) -> typing.Optional[AnonymousSlotExpression]: ... + @property + def none_of(self) -> typing.Optional[builtins.list[AnonymousSlotExpression]]: ... + @property + def exactly_one_of(self) -> typing.Optional[builtins.list[AnonymousSlotExpression]]: ... + @property + def any_of(self) -> typing.Optional[builtins.list[AnonymousSlotExpression]]: ... + @property + def all_of(self) -> typing.Optional[builtins.list[AnonymousSlotExpression]]: ... + @range.setter + def range(self, value: typing.Optional[builtins.str]) -> None: ... + @range_expression.setter + def range_expression(self, value: typing.Optional[AnonymousClassExpression]) -> None: ... + @enum_range.setter + def enum_range(self, value: typing.Optional[AnonymousEnumExpression | EnumDefinition]) -> None: ... + @bindings.setter + def bindings(self, value: typing.Optional[builtins.list[EnumBinding]]) -> None: ... + @required.setter + def required(self, value: typing.Optional[builtins.bool]) -> None: ... + @recommended.setter + def recommended(self, value: typing.Optional[builtins.bool]) -> None: ... + @multivalued.setter + def multivalued(self, value: typing.Optional[builtins.bool]) -> None: ... + @inlined.setter + def inlined(self, value: typing.Optional[builtins.bool]) -> None: ... + @inlined_as_list.setter + def inlined_as_list(self, value: typing.Optional[builtins.bool]) -> None: ... + @minimum_value.setter + def minimum_value(self, value: typing.Optional[typing.Any]) -> None: ... + @maximum_value.setter + def maximum_value(self, value: typing.Optional[typing.Any]) -> None: ... + @pattern.setter + def pattern(self, value: typing.Optional[builtins.str]) -> None: ... + @structured_pattern.setter + def structured_pattern(self, value: typing.Optional[PatternExpression]) -> None: ... + @unit.setter + def unit(self, value: typing.Optional[UnitOfMeasure]) -> None: ... + @implicit_prefix.setter + def implicit_prefix(self, value: typing.Optional[builtins.str]) -> None: ... + @value_presence.setter + def value_presence(self, value: typing.Optional[typing.Literal['UNCOMMITTED', 'PRESENT', 'ABSENT']]) -> None: ... + @equals_string.setter + def equals_string(self, value: typing.Optional[builtins.str]) -> None: ... + @equals_string_in.setter + def equals_string_in(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @equals_number.setter + def equals_number(self, value: typing.Optional[builtins.int]) -> None: ... + @equals_expression.setter + def equals_expression(self, value: typing.Optional[builtins.str]) -> None: ... + @exact_cardinality.setter + def exact_cardinality(self, value: typing.Optional[builtins.int]) -> None: ... + @minimum_cardinality.setter + def minimum_cardinality(self, value: typing.Optional[builtins.int]) -> None: ... + @maximum_cardinality.setter + def maximum_cardinality(self, value: typing.Optional[builtins.int]) -> None: ... + @has_member.setter + def has_member(self, value: typing.Optional[AnonymousSlotExpression]) -> None: ... + @all_members.setter + def all_members(self, value: typing.Optional[AnonymousSlotExpression]) -> None: ... + @none_of.setter + def none_of(self, value: typing.Optional[builtins.list[AnonymousSlotExpression]]) -> None: ... + @exactly_one_of.setter + def exactly_one_of(self, value: typing.Optional[builtins.list[AnonymousSlotExpression]]) -> None: ... + @any_of.setter + def any_of(self, value: typing.Optional[builtins.list[AnonymousSlotExpression]]) -> None: ... + @all_of.setter + def all_of(self, value: typing.Optional[builtins.list[AnonymousSlotExpression]]) -> None: ... + def __new__(cls, range:typing.Optional[builtins.str], range_expression:typing.Optional[AnonymousClassExpression], enum_range:typing.Optional[AnonymousEnumExpression | EnumDefinition], bindings:typing.Optional[typing.Sequence[EnumBinding]], required:typing.Optional[builtins.bool], recommended:typing.Optional[builtins.bool], multivalued:typing.Optional[builtins.bool], inlined:typing.Optional[builtins.bool], inlined_as_list:typing.Optional[builtins.bool], minimum_value:typing.Optional[typing.Any], maximum_value:typing.Optional[typing.Any], pattern:typing.Optional[builtins.str], structured_pattern:typing.Optional[PatternExpression], unit:typing.Optional[UnitOfMeasure], implicit_prefix:typing.Optional[builtins.str], value_presence:typing.Optional[typing.Literal['UNCOMMITTED', 'PRESENT', 'ABSENT']], equals_string:typing.Optional[builtins.str], equals_string_in:typing.Optional[typing.Sequence[builtins.str]], equals_number:typing.Optional[builtins.int], equals_expression:typing.Optional[builtins.str], exact_cardinality:typing.Optional[builtins.int], minimum_cardinality:typing.Optional[builtins.int], maximum_cardinality:typing.Optional[builtins.int], has_member:typing.Optional[AnonymousSlotExpression], all_members:typing.Optional[AnonymousSlotExpression], none_of:typing.Optional[typing.Sequence[AnonymousSlotExpression]], exactly_one_of:typing.Optional[typing.Sequence[AnonymousSlotExpression]], any_of:typing.Optional[typing.Sequence[AnonymousSlotExpression]], all_of:typing.Optional[typing.Sequence[AnonymousSlotExpression]]) -> SlotExpression: ... + +class SlotView: + @property + def name(self) -> builtins.str: ... + @property + def definition(self) -> SlotDefinition: ... + def range_class(self) -> typing.Optional[ClassView]: ... + def range_enum(self) -> typing.Optional[EnumView]: ... + def is_range_scalar(self) -> builtins.bool: ... + def container_mode(self) -> builtins.str: ... + def inline_mode(self) -> builtins.str: ... + def __repr__(self) -> builtins.str: ... + def __str__(self) -> builtins.str: ... + +class StructuredAlias: + @property + def literal_form(self) -> builtins.str: ... + @property + def alias_predicate(self) -> typing.Optional[typing.Literal['EXACTSYNONYM', 'RELATEDSYNONYM', 'BROADSYNONYM', 'NARROWSYNONYM']]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def alias_contexts(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @literal_form.setter + def literal_form(self, value: builtins.str) -> None: ... + @alias_predicate.setter + def alias_predicate(self, value: typing.Optional[typing.Literal['EXACTSYNONYM', 'RELATEDSYNONYM', 'BROADSYNONYM', 'NARROWSYNONYM']]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @alias_contexts.setter + def alias_contexts(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, literal_form:builtins.str, alias_predicate:typing.Optional[typing.Literal['EXACTSYNONYM', 'RELATEDSYNONYM', 'BROADSYNONYM', 'NARROWSYNONYM']], categories:typing.Optional[typing.Sequence[builtins.str]], alias_contexts:typing.Optional[typing.Sequence[builtins.str]], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> StructuredAlias: ... + +class SubsetDefinition: + @property + def name(self) -> builtins.str: ... + @property + def id_prefixes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def id_prefixes_are_closed(self) -> typing.Optional[builtins.bool]: ... + @property + def definition_uri(self) -> typing.Optional[builtins.str]: ... + @property + def local_names(self) -> typing.Optional[builtins.dict[builtins.str, LocalName]]: ... + @property + def conforms_to(self) -> typing.Optional[builtins.str]: ... + @property + def implements(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def instantiates(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @name.setter + def name(self, value: builtins.str) -> None: ... + @id_prefixes.setter + def id_prefixes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @id_prefixes_are_closed.setter + def id_prefixes_are_closed(self, value: typing.Optional[builtins.bool]) -> None: ... + @definition_uri.setter + def definition_uri(self, value: typing.Optional[builtins.str]) -> None: ... + @local_names.setter + def local_names(self, value: typing.Optional[builtins.dict[builtins.str, LocalName]]) -> None: ... + @conforms_to.setter + def conforms_to(self, value: typing.Optional[builtins.str]) -> None: ... + @implements.setter + def implements(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @instantiates.setter + def instantiates(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, name:builtins.str, id_prefixes:typing.Optional[typing.Sequence[builtins.str]], id_prefixes_are_closed:typing.Optional[builtins.bool], definition_uri:typing.Optional[builtins.str], local_names:typing.Optional[typing.Mapping[builtins.str, LocalName]], conforms_to:typing.Optional[builtins.str], implements:typing.Optional[typing.Sequence[builtins.str]], instantiates:typing.Optional[typing.Sequence[builtins.str]], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> SubsetDefinition: ... + +class TypeDefinition: + @property + def typeof_(self) -> typing.Optional[builtins.str]: ... + @property + def base(self) -> typing.Optional[builtins.str]: ... + @property + def type_uri(self) -> typing.Optional[builtins.str]: ... + @property + def repr(self) -> typing.Optional[builtins.str]: ... + @property + def union_of(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def pattern(self) -> typing.Optional[builtins.str]: ... + @property + def structured_pattern(self) -> typing.Optional[PatternExpression]: ... + @property + def unit(self) -> typing.Optional[UnitOfMeasure]: ... + @property + def implicit_prefix(self) -> typing.Optional[builtins.str]: ... + @property + def equals_string(self) -> typing.Optional[builtins.str]: ... + @property + def equals_string_in(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def equals_number(self) -> typing.Optional[builtins.int]: ... + @property + def minimum_value(self) -> typing.Optional[typing.Any]: ... + @property + def maximum_value(self) -> typing.Optional[typing.Any]: ... + @property + def none_of(self) -> typing.Optional[builtins.list[AnonymousTypeExpression]]: ... + @property + def exactly_one_of(self) -> typing.Optional[builtins.list[AnonymousTypeExpression]]: ... + @property + def any_of(self) -> typing.Optional[builtins.list[AnonymousTypeExpression]]: ... + @property + def all_of(self) -> typing.Optional[builtins.list[AnonymousTypeExpression]]: ... + @property + def name(self) -> builtins.str: ... + @property + def id_prefixes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def id_prefixes_are_closed(self) -> typing.Optional[builtins.bool]: ... + @property + def definition_uri(self) -> typing.Optional[builtins.str]: ... + @property + def local_names(self) -> typing.Optional[builtins.dict[builtins.str, LocalName]]: ... + @property + def conforms_to(self) -> typing.Optional[builtins.str]: ... + @property + def implements(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def instantiates(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @typeof_.setter + def typeof_(self, value: typing.Optional[builtins.str]) -> None: ... + @base.setter + def base(self, value: typing.Optional[builtins.str]) -> None: ... + @type_uri.setter + def type_uri(self, value: typing.Optional[builtins.str]) -> None: ... + @repr.setter + def repr(self, value: typing.Optional[builtins.str]) -> None: ... + @union_of.setter + def union_of(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @pattern.setter + def pattern(self, value: typing.Optional[builtins.str]) -> None: ... + @structured_pattern.setter + def structured_pattern(self, value: typing.Optional[PatternExpression]) -> None: ... + @unit.setter + def unit(self, value: typing.Optional[UnitOfMeasure]) -> None: ... + @implicit_prefix.setter + def implicit_prefix(self, value: typing.Optional[builtins.str]) -> None: ... + @equals_string.setter + def equals_string(self, value: typing.Optional[builtins.str]) -> None: ... + @equals_string_in.setter + def equals_string_in(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @equals_number.setter + def equals_number(self, value: typing.Optional[builtins.int]) -> None: ... + @minimum_value.setter + def minimum_value(self, value: typing.Optional[typing.Any]) -> None: ... + @maximum_value.setter + def maximum_value(self, value: typing.Optional[typing.Any]) -> None: ... + @none_of.setter + def none_of(self, value: typing.Optional[builtins.list[AnonymousTypeExpression]]) -> None: ... + @exactly_one_of.setter + def exactly_one_of(self, value: typing.Optional[builtins.list[AnonymousTypeExpression]]) -> None: ... + @any_of.setter + def any_of(self, value: typing.Optional[builtins.list[AnonymousTypeExpression]]) -> None: ... + @all_of.setter + def all_of(self, value: typing.Optional[builtins.list[AnonymousTypeExpression]]) -> None: ... + @name.setter + def name(self, value: builtins.str) -> None: ... + @id_prefixes.setter + def id_prefixes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @id_prefixes_are_closed.setter + def id_prefixes_are_closed(self, value: typing.Optional[builtins.bool]) -> None: ... + @definition_uri.setter + def definition_uri(self, value: typing.Optional[builtins.str]) -> None: ... + @local_names.setter + def local_names(self, value: typing.Optional[builtins.dict[builtins.str, LocalName]]) -> None: ... + @conforms_to.setter + def conforms_to(self, value: typing.Optional[builtins.str]) -> None: ... + @implements.setter + def implements(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @instantiates.setter + def instantiates(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, typeof_:typing.Optional[builtins.str], base:typing.Optional[builtins.str], type_uri:typing.Optional[builtins.str], repr:typing.Optional[builtins.str], union_of:typing.Optional[typing.Sequence[builtins.str]], pattern:typing.Optional[builtins.str], structured_pattern:typing.Optional[PatternExpression], unit:typing.Optional[UnitOfMeasure], implicit_prefix:typing.Optional[builtins.str], equals_string:typing.Optional[builtins.str], equals_string_in:typing.Optional[typing.Sequence[builtins.str]], equals_number:typing.Optional[builtins.int], minimum_value:typing.Optional[typing.Any], maximum_value:typing.Optional[typing.Any], none_of:typing.Optional[typing.Sequence[AnonymousTypeExpression]], exactly_one_of:typing.Optional[typing.Sequence[AnonymousTypeExpression]], any_of:typing.Optional[typing.Sequence[AnonymousTypeExpression]], all_of:typing.Optional[typing.Sequence[AnonymousTypeExpression]], name:builtins.str, id_prefixes:typing.Optional[typing.Sequence[builtins.str]], id_prefixes_are_closed:typing.Optional[builtins.bool], definition_uri:typing.Optional[builtins.str], local_names:typing.Optional[typing.Mapping[builtins.str, LocalName]], conforms_to:typing.Optional[builtins.str], implements:typing.Optional[typing.Sequence[builtins.str]], instantiates:typing.Optional[typing.Sequence[builtins.str]], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> TypeDefinition: ... + +class TypeExpression: + @property + def pattern(self) -> typing.Optional[builtins.str]: ... + @property + def structured_pattern(self) -> typing.Optional[PatternExpression]: ... + @property + def unit(self) -> typing.Optional[UnitOfMeasure]: ... + @property + def implicit_prefix(self) -> typing.Optional[builtins.str]: ... + @property + def equals_string(self) -> typing.Optional[builtins.str]: ... + @property + def equals_string_in(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def equals_number(self) -> typing.Optional[builtins.int]: ... + @property + def minimum_value(self) -> typing.Optional[typing.Any]: ... + @property + def maximum_value(self) -> typing.Optional[typing.Any]: ... + @property + def none_of(self) -> typing.Optional[builtins.list[AnonymousTypeExpression]]: ... + @property + def exactly_one_of(self) -> typing.Optional[builtins.list[AnonymousTypeExpression]]: ... + @property + def any_of(self) -> typing.Optional[builtins.list[AnonymousTypeExpression]]: ... + @property + def all_of(self) -> typing.Optional[builtins.list[AnonymousTypeExpression]]: ... + @pattern.setter + def pattern(self, value: typing.Optional[builtins.str]) -> None: ... + @structured_pattern.setter + def structured_pattern(self, value: typing.Optional[PatternExpression]) -> None: ... + @unit.setter + def unit(self, value: typing.Optional[UnitOfMeasure]) -> None: ... + @implicit_prefix.setter + def implicit_prefix(self, value: typing.Optional[builtins.str]) -> None: ... + @equals_string.setter + def equals_string(self, value: typing.Optional[builtins.str]) -> None: ... + @equals_string_in.setter + def equals_string_in(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @equals_number.setter + def equals_number(self, value: typing.Optional[builtins.int]) -> None: ... + @minimum_value.setter + def minimum_value(self, value: typing.Optional[typing.Any]) -> None: ... + @maximum_value.setter + def maximum_value(self, value: typing.Optional[typing.Any]) -> None: ... + @none_of.setter + def none_of(self, value: typing.Optional[builtins.list[AnonymousTypeExpression]]) -> None: ... + @exactly_one_of.setter + def exactly_one_of(self, value: typing.Optional[builtins.list[AnonymousTypeExpression]]) -> None: ... + @any_of.setter + def any_of(self, value: typing.Optional[builtins.list[AnonymousTypeExpression]]) -> None: ... + @all_of.setter + def all_of(self, value: typing.Optional[builtins.list[AnonymousTypeExpression]]) -> None: ... + def __new__(cls, pattern:typing.Optional[builtins.str], structured_pattern:typing.Optional[PatternExpression], unit:typing.Optional[UnitOfMeasure], implicit_prefix:typing.Optional[builtins.str], equals_string:typing.Optional[builtins.str], equals_string_in:typing.Optional[typing.Sequence[builtins.str]], equals_number:typing.Optional[builtins.int], minimum_value:typing.Optional[typing.Any], maximum_value:typing.Optional[typing.Any], none_of:typing.Optional[typing.Sequence[AnonymousTypeExpression]], exactly_one_of:typing.Optional[typing.Sequence[AnonymousTypeExpression]], any_of:typing.Optional[typing.Sequence[AnonymousTypeExpression]], all_of:typing.Optional[typing.Sequence[AnonymousTypeExpression]]) -> TypeExpression: ... + +class TypeMapping: + @property + def framework_key(self) -> builtins.str: ... + @property + def mapped_type(self) -> typing.Optional[builtins.str]: ... + @property + def string_serialization(self) -> typing.Optional[builtins.str]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @framework_key.setter + def framework_key(self, value: builtins.str) -> None: ... + @mapped_type.setter + def mapped_type(self, value: typing.Optional[builtins.str]) -> None: ... + @string_serialization.setter + def string_serialization(self, value: typing.Optional[builtins.str]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, framework_key:builtins.str, mapped_type:typing.Optional[builtins.str], string_serialization:typing.Optional[builtins.str], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> TypeMapping: ... + +class UniqueKey: + @property + def unique_key_name(self) -> builtins.str: ... + @property + def unique_key_slots(self) -> builtins.list[builtins.str]: ... + @property + def consider_nulls_inequal(self) -> typing.Optional[builtins.bool]: ... + @property + def extensions(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def annotations(self) -> typing.Optional[builtins.dict[builtins.str, Annotation]]: ... + @property + def description(self) -> typing.Optional[builtins.str]: ... + @property + def alt_descriptions(self) -> typing.Optional[builtins.dict[builtins.str, AltDescription]]: ... + @property + def title(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated(self) -> typing.Optional[builtins.str]: ... + @property + def todos(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def notes(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def comments(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def examples(self) -> typing.Optional[builtins.list[Example]]: ... + @property + def in_subset(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def from_schema(self) -> typing.Optional[builtins.str]: ... + @property + def imported_from(self) -> typing.Optional[builtins.str]: ... + @property + def source(self) -> typing.Optional[builtins.str]: ... + @property + def in_language(self) -> typing.Optional[builtins.str]: ... + @property + def see_also(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def deprecated_element_has_exact_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def deprecated_element_has_possible_replacement(self) -> typing.Optional[builtins.str]: ... + @property + def aliases(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def structured_aliases(self) -> typing.Optional[builtins.list[StructuredAlias]]: ... + @property + def mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def close_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def related_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def narrow_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def broad_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_by(self) -> typing.Optional[builtins.str]: ... + @property + def contributors(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def created_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def last_updated_on(self) -> typing.Optional[datetime.datetime]: ... + @property + def modified_by(self) -> typing.Optional[builtins.str]: ... + @property + def status(self) -> typing.Optional[builtins.str]: ... + @property + def rank(self) -> typing.Optional[builtins.int]: ... + @property + def categories(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def keywords(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @unique_key_name.setter + def unique_key_name(self, value: builtins.str) -> None: ... + @unique_key_slots.setter + def unique_key_slots(self, value: builtins.list[builtins.str]) -> None: ... + @consider_nulls_inequal.setter + def consider_nulls_inequal(self, value: typing.Optional[builtins.bool]) -> None: ... + @extensions.setter + def extensions(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @annotations.setter + def annotations(self, value: typing.Optional[builtins.dict[builtins.str, Annotation]]) -> None: ... + @description.setter + def description(self, value: typing.Optional[builtins.str]) -> None: ... + @alt_descriptions.setter + def alt_descriptions(self, value: typing.Optional[builtins.dict[builtins.str, AltDescription]]) -> None: ... + @title.setter + def title(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated.setter + def deprecated(self, value: typing.Optional[builtins.str]) -> None: ... + @todos.setter + def todos(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @notes.setter + def notes(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @comments.setter + def comments(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @examples.setter + def examples(self, value: typing.Optional[builtins.list[Example]]) -> None: ... + @in_subset.setter + def in_subset(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @from_schema.setter + def from_schema(self, value: typing.Optional[builtins.str]) -> None: ... + @imported_from.setter + def imported_from(self, value: typing.Optional[builtins.str]) -> None: ... + @source.setter + def source(self, value: typing.Optional[builtins.str]) -> None: ... + @in_language.setter + def in_language(self, value: typing.Optional[builtins.str]) -> None: ... + @see_also.setter + def see_also(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @deprecated_element_has_exact_replacement.setter + def deprecated_element_has_exact_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @deprecated_element_has_possible_replacement.setter + def deprecated_element_has_possible_replacement(self, value: typing.Optional[builtins.str]) -> None: ... + @aliases.setter + def aliases(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @structured_aliases.setter + def structured_aliases(self, value: typing.Optional[builtins.list[StructuredAlias]]) -> None: ... + @mappings.setter + def mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @close_mappings.setter + def close_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @related_mappings.setter + def related_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @narrow_mappings.setter + def narrow_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @broad_mappings.setter + def broad_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_by.setter + def created_by(self, value: typing.Optional[builtins.str]) -> None: ... + @contributors.setter + def contributors(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @created_on.setter + def created_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @last_updated_on.setter + def last_updated_on(self, value: typing.Optional[datetime.datetime]) -> None: ... + @modified_by.setter + def modified_by(self, value: typing.Optional[builtins.str]) -> None: ... + @status.setter + def status(self, value: typing.Optional[builtins.str]) -> None: ... + @rank.setter + def rank(self, value: typing.Optional[builtins.int]) -> None: ... + @categories.setter + def categories(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @keywords.setter + def keywords(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + def __new__(cls, unique_key_name:builtins.str, unique_key_slots:typing.Sequence[builtins.str], consider_nulls_inequal:typing.Optional[builtins.bool], extensions:typing.Optional[typing.Mapping[builtins.str, Annotation]], annotations:typing.Optional[typing.Mapping[builtins.str, Annotation]], description:typing.Optional[builtins.str], alt_descriptions:typing.Optional[typing.Mapping[builtins.str, AltDescription]], title:typing.Optional[builtins.str], deprecated:typing.Optional[builtins.str], todos:typing.Optional[typing.Sequence[builtins.str]], notes:typing.Optional[typing.Sequence[builtins.str]], comments:typing.Optional[typing.Sequence[builtins.str]], examples:typing.Optional[typing.Sequence[Example]], in_subset:typing.Optional[typing.Sequence[builtins.str]], from_schema:typing.Optional[builtins.str], imported_from:typing.Optional[builtins.str], source:typing.Optional[builtins.str], in_language:typing.Optional[builtins.str], see_also:typing.Optional[typing.Sequence[builtins.str]], deprecated_element_has_exact_replacement:typing.Optional[builtins.str], deprecated_element_has_possible_replacement:typing.Optional[builtins.str], aliases:typing.Optional[typing.Sequence[builtins.str]], structured_aliases:typing.Optional[typing.Sequence[StructuredAlias]], mappings:typing.Optional[typing.Sequence[builtins.str]], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], close_mappings:typing.Optional[typing.Sequence[builtins.str]], related_mappings:typing.Optional[typing.Sequence[builtins.str]], narrow_mappings:typing.Optional[typing.Sequence[builtins.str]], broad_mappings:typing.Optional[typing.Sequence[builtins.str]], created_by:typing.Optional[builtins.str], contributors:typing.Optional[typing.Sequence[builtins.str]], created_on:typing.Optional[datetime.datetime], last_updated_on:typing.Optional[datetime.datetime], modified_by:typing.Optional[builtins.str], status:typing.Optional[builtins.str], rank:typing.Optional[builtins.int], categories:typing.Optional[typing.Sequence[builtins.str]], keywords:typing.Optional[typing.Sequence[builtins.str]]) -> UniqueKey: ... + +class UnitOfMeasure: + @property + def symbol(self) -> typing.Optional[builtins.str]: ... + @property + def abbreviation(self) -> typing.Optional[builtins.str]: ... + @property + def descriptive_name(self) -> typing.Optional[builtins.str]: ... + @property + def exact_mappings(self) -> typing.Optional[builtins.list[builtins.str]]: ... + @property + def ucum_code(self) -> typing.Optional[builtins.str]: ... + @property + def derivation(self) -> typing.Optional[builtins.str]: ... + @property + def has_quantity_kind(self) -> typing.Optional[builtins.str]: ... + @property + def iec61360code(self) -> typing.Optional[builtins.str]: ... + @symbol.setter + def symbol(self, value: typing.Optional[builtins.str]) -> None: ... + @abbreviation.setter + def abbreviation(self, value: typing.Optional[builtins.str]) -> None: ... + @descriptive_name.setter + def descriptive_name(self, value: typing.Optional[builtins.str]) -> None: ... + @exact_mappings.setter + def exact_mappings(self, value: typing.Optional[builtins.list[builtins.str]]) -> None: ... + @ucum_code.setter + def ucum_code(self, value: typing.Optional[builtins.str]) -> None: ... + @derivation.setter + def derivation(self, value: typing.Optional[builtins.str]) -> None: ... + @has_quantity_kind.setter + def has_quantity_kind(self, value: typing.Optional[builtins.str]) -> None: ... + @iec61360code.setter + def iec61360code(self, value: typing.Optional[builtins.str]) -> None: ... + def __new__(cls, symbol:typing.Optional[builtins.str], abbreviation:typing.Optional[builtins.str], descriptive_name:typing.Optional[builtins.str], exact_mappings:typing.Optional[typing.Sequence[builtins.str]], ucum_code:typing.Optional[builtins.str], derivation:typing.Optional[builtins.str], has_quantity_kind:typing.Optional[builtins.str], iec61360code:typing.Optional[builtins.str]) -> UnitOfMeasure: ... + +def diff(source:LinkMLInstance, target:LinkMLInstance, treat_missing_as_null:typing.Optional[builtins.bool]=None) -> typing.Any: ... + +def load_json(source:typing.Any, sv:SchemaView, class:typing.Optional[ClassView]) -> LinkMLInstance: ... + +def load_yaml(source:typing.Any, sv:SchemaView, class:typing.Optional[ClassView]) -> LinkMLInstance: ... + +def make_schema_view(source:typing.Optional[typing.Any]=None) -> SchemaView: ... + +def patch(source:LinkMLInstance, deltas:typing.Any, treat_missing_as_null:builtins.bool=True, ignore_no_ops:builtins.bool=True) -> PatchResult: ... + +def sum_as_string(a:builtins.int, b:builtins.int) -> builtins.str: ... + +def to_turtle(value:LinkMLInstance, skolem:typing.Optional[builtins.bool]=None) -> builtins.str: ... + diff --git a/src/python/python/linkml_runtime_rust/debug_utils.py b/src/python/python/linkml_runtime_rust/debug_utils.py index 00cd9af..e74fb4f 100644 --- a/src/python/python/linkml_runtime_rust/debug_utils.py +++ b/src/python/python/linkml_runtime_rust/debug_utils.py @@ -1,6 +1,6 @@ -"""Utilities for pretty-printing LinkMLValue trees. +"""Utilities for pretty-printing LinkMLInstance trees. -This module provides a pure Python helper to render a :class:`LinkMLValue` +This module provides a pure Python helper to render a :class:`LinkMLInstance` as a human readable tree. It is intended for debugging and diagnostic use. """ @@ -9,19 +9,19 @@ from typing import Any, List try: # pragma: no cover - runtime optional during type checking - from . import LinkMLValue + from . import LinkMLInstance except Exception: # pragma: no cover - fallback when extension missing - LinkMLValue = Any # type: ignore[misc] + LinkMLInstance = Any # type: ignore[misc] -__all__ = ["pretty_linkml_value"] +__all__ = ["pretty_linkml_instance"] -def pretty_linkml_value(value: "LinkMLValue", prefix: str = '', nofirstline: bool = False) -> str: +def pretty_linkml_instance(value: "LinkMLInstance", prefix: str = '', nofirstline: bool = False) -> str: """Return a tree-style string representation of ``value``. Parameters ---------- - value: LinkMLValue + value: LinkMLInstance The value to render. indent: int, optional Starting indentation (number of spaces). @@ -35,10 +35,10 @@ def pretty_linkml_value(value: "LinkMLValue", prefix: str = '', nofirstline: boo if rval.kind == "scalar": txt += f"{prefix} | {key}={rval.as_python()}\n" elif rval.kind == "list": - txt += f"{prefix} | {key}:\n{pretty_linkml_value(rval, prefix + ' | ')}" + txt += f"{prefix} | {key}:\n{pretty_linkml_instance(rval, prefix + ' | ')}" else: pfx = f"{prefix} | " + ' ' * len(key) - txt += f"{prefix} | {key}: {pretty_linkml_value(rval, pfx, nofirstline=True)}" + txt += f"{prefix} | {key}: {pretty_linkml_instance(rval, pfx, nofirstline=True)}" txt += f"{prefix} |\n" elif value.kind == "list": for idx in range(len(value)): @@ -46,7 +46,7 @@ def pretty_linkml_value(value: "LinkMLValue", prefix: str = '', nofirstline: boo if rval.kind == "scalar": txt = f"{prefix} - {rval.as_python()}\n" else: - txt = f"{prefix} - {pretty_linkml_value(rval, prefix + ' ', nofirstline=True)}" + txt = f"{prefix} - {pretty_linkml_instance(rval, prefix + ' ', nofirstline=True)}" elif value.kind == "scalar": txt = f"{prefix}{value.as_python()}\n" else: diff --git a/src/python/src/bin/stub_gen.rs b/src/python/src/bin/stub_gen.rs new file mode 100644 index 0000000..bb1819c --- /dev/null +++ b/src/python/src/bin/stub_gen.rs @@ -0,0 +1,66 @@ +#[cfg(feature = "stubgen")] +fn main() -> pyo3_stub_gen::Result<()> { + let check_only = std::env::args().skip(1).any(|arg| arg == "--check"); + let stub = linkml_runtime_python::stub_info()?; + + if check_only { + check_stubs(&stub) + } else { + stub.generate() + } +} + +#[cfg(feature = "stubgen")] +fn check_stubs(stub: &pyo3_stub_gen::StubInfo) -> pyo3_stub_gen::Result<()> { + use std::fs; + use std::io::ErrorKind; + + let mut issues = Vec::new(); + + for (name, module) in &stub.modules { + let normalized_name = name.replace('-', "_"); + let path = normalized_name.replace('.', "/"); + let dest = if module.submodules.is_empty() { + stub.python_root.join(format!("{path}.pyi")) + } else { + stub.python_root.join(&path).join("__init__.pyi") + }; + + let expected = module.to_string(); + match fs::read_to_string(&dest) { + Ok(actual) => { + if actual != expected { + issues.push(format!( + "updated content differs for `{}` (module `{name}`)", + dest.display() + )); + } + } + Err(err) if err.kind() == ErrorKind::NotFound => { + issues.push(format!( + "missing stub file `{}` for module `{name}`", + dest.display() + )); + } + Err(err) => return Err(err.into()), + } + } + + if issues.is_empty() { + Ok(()) + } else { + let mut msg = String::from("Stub files are out of date:\n"); + for issue in issues { + msg.push_str(" - "); + msg.push_str(&issue); + msg.push('\n'); + } + msg.push_str("Run `cargo run --bin stub_gen --features stubgen` to regenerate."); + Err(std::io::Error::new(ErrorKind::Other, msg).into()) + } +} + +#[cfg(not(feature = "stubgen"))] +fn main() { + eprintln!("Enable the `stubgen` feature (alongside `pyo3`) to run this generator."); +} diff --git a/src/python/src/lib.rs b/src/python/src/lib.rs index cbfe6b5..d3f3dd1 100644 --- a/src/python/src/lib.rs +++ b/src/python/src/lib.rs @@ -1,7 +1,7 @@ use linkml_meta::{ClassDefinition, EnumDefinition, SchemaDefinition, SlotDefinition}; -use linkml_runtime::diff::{diff as diff_internal, patch as patch_internal, Delta}; +use linkml_runtime::diff::{diff as diff_internal, patch as patch_internal, Delta, PatchTrace}; use linkml_runtime::turtle::{turtle_to_string, TurtleOptions}; -use linkml_runtime::{load_json_str, load_yaml_str, LinkMLValue}; +use linkml_runtime::{load_json_str, load_yaml_str, LinkMLInstance}; use linkml_schemaview::identifier::Identifier; use linkml_schemaview::io; use linkml_schemaview::schemaview::SchemaView; @@ -12,6 +12,11 @@ use pyo3::types::PyAnyMethods; use pyo3::types::{PyAny, PyModule}; use pyo3::Bound; use pyo3::{wrap_pyfunction, wrap_pymodule}; +#[cfg(feature = "stubgen")] +use pyo3_stub_gen::{ + define_stub_info_gatherer, + derive::{gen_stub_pyclass, gen_stub_pyfunction, gen_stub_pymethods}, +}; use serde_json::Value as JsonValue; use std::collections::HashMap; use std::fs; @@ -38,11 +43,13 @@ fn py_filelike_or_string_to_string(obj: &Bound<'_, PyAny>) -> PyResult<(String, Err(PyException::new_err("expected string or file-like object")) } +#[cfg_attr(feature = "stubgen", gen_stub_pyfunction)] #[pyfunction] fn sum_as_string(a: usize, b: usize) -> PyResult { Ok((a + b).to_string()) } +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[pyclass(name = "SchemaView")] pub struct PySchemaView { inner: Arc, @@ -54,6 +61,7 @@ impl PySchemaView { } } +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[pyclass(name = "ClassView")] #[derive(Clone)] pub struct PyClassView { @@ -66,6 +74,7 @@ impl PyClassView { } } +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[pyclass(name = "SlotView")] #[derive(Clone)] pub struct PySlotView { @@ -78,6 +87,7 @@ impl PySlotView { } } +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] #[pyclass(name = "EnumView")] #[derive(Clone)] pub struct PyEnumView { @@ -90,6 +100,7 @@ impl PyEnumView { } } +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl PySchemaView { #[new] @@ -252,6 +263,7 @@ impl PySchemaView { } } +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl PyClassView { #[getter] @@ -321,6 +333,7 @@ impl PyClassView { } } +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl PySlotView { #[getter] @@ -376,6 +389,7 @@ impl PySlotView { } } +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] impl PyEnumView { #[getter] @@ -429,6 +443,7 @@ pub fn schemaview_module(m: &Bound<'_, PyModule>) -> PyResult<()> { Ok(()) } +#[cfg_attr(feature = "stubgen", gen_stub_pyfunction)] #[pyfunction] #[pyo3(signature = (source=None))] fn make_schema_view(source: Option<&Bound<'_, PyAny>>) -> PyResult { @@ -445,18 +460,21 @@ pub fn runtime_module(m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_function(wrap_pyfunction!(py_diff, m)?)?; m.add_function(wrap_pyfunction!(py_patch, m)?)?; m.add_function(wrap_pyfunction!(py_to_turtle, m)?)?; - m.add_class::()?; + m.add_class::()?; + m.add_class::()?; + m.add_class::()?; Ok(()) } -#[pyclass(name = "LinkMLValue")] -pub struct PyLinkMLValue { - value: LinkMLValue, +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] +#[pyclass(name = "LinkMLInstance")] +pub struct PyLinkMLInstance { + value: LinkMLInstance, sv: Py, } -impl PyLinkMLValue { - fn new(value: LinkMLValue, sv: Py) -> Self { +impl PyLinkMLInstance { + fn new(value: LinkMLInstance, sv: Py) -> Self { Self { value, sv } } } @@ -467,7 +485,7 @@ fn json_value_to_py(py: Python<'_>, v: &JsonValue) -> PyObject { json_mod.call_method1("loads", (s,)).unwrap().unbind() } -impl Clone for PyLinkMLValue { +impl Clone for PyLinkMLInstance { fn clone(&self) -> Self { Python::with_gil(|py| Self { value: self.value.clone(), @@ -476,13 +494,21 @@ impl Clone for PyLinkMLValue { } } +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] #[pymethods] -impl PyLinkMLValue { +impl PyLinkMLInstance { + /// Semantic equality per LinkML Instances spec. + /// Compares this value with another `LinkMLInstance`. + #[pyo3(signature = (other, treat_missing_as_null = false))] + fn equals(&self, other: &PyLinkMLInstance, treat_missing_as_null: bool) -> bool { + self.value.equals(&other.value, treat_missing_as_null) + } #[getter] fn slot_name(&self) -> Option { match &self.value { - LinkMLValue::Scalar { slot, .. } => Some(slot.name.clone()), - LinkMLValue::List { slot, .. } => Some(slot.name.clone()), + LinkMLInstance::Scalar { slot, .. } => Some(slot.name.clone()), + LinkMLInstance::List { slot, .. } => Some(slot.name.clone()), + LinkMLInstance::Null { slot, .. } => Some(slot.name.clone()), _ => None, } } @@ -490,18 +516,25 @@ impl PyLinkMLValue { #[getter] fn kind(&self) -> String { match &self.value { - LinkMLValue::Scalar { .. } => "scalar".to_string(), - LinkMLValue::List { .. } => "list".to_string(), - LinkMLValue::Mapping { .. } => "mapping".to_string(), - LinkMLValue::Object { .. } => "object".to_string(), + LinkMLInstance::Scalar { .. } => "scalar".to_string(), + LinkMLInstance::Null { .. } => "null".to_string(), + LinkMLInstance::List { .. } => "list".to_string(), + LinkMLInstance::Mapping { .. } => "mapping".to_string(), + LinkMLInstance::Object { .. } => "object".to_string(), } } + #[getter] + fn node_id(&self) -> u64 { + self.value.node_id() + } + #[getter] fn slot_definition(&self) -> Option { match &self.value { - LinkMLValue::Scalar { slot, .. } => Some(slot.definition().clone()), - LinkMLValue::List { slot, .. } => Some(slot.definition().clone()), + LinkMLInstance::Scalar { slot, .. } => Some(slot.definition().clone()), + LinkMLInstance::List { slot, .. } => Some(slot.definition().clone()), + LinkMLInstance::Null { slot, .. } => Some(slot.definition().clone()), _ => None, } } @@ -509,9 +542,10 @@ impl PyLinkMLValue { #[getter] fn class_definition(&self) -> Option { match &self.value { - LinkMLValue::Object { class, .. } => Some(class.def().clone()), - LinkMLValue::Scalar { class: Some(c), .. } => Some(c.def().clone()), - LinkMLValue::List { class: Some(c), .. } => Some(c.def().clone()), + LinkMLInstance::Object { class, .. } => Some(class.def().clone()), + LinkMLInstance::Scalar { class: Some(c), .. } => Some(c.def().clone()), + LinkMLInstance::List { class: Some(c), .. } => Some(c.def().clone()), + LinkMLInstance::Null { class: Some(c), .. } => Some(c.def().clone()), _ => None, } } @@ -519,19 +553,21 @@ impl PyLinkMLValue { #[getter] fn class_name(&self) -> Option { match &self.value { - LinkMLValue::Object { class, .. } => Some(class.def().name.clone()), - LinkMLValue::Scalar { class: Some(c), .. } => Some(c.def().name.clone()), - LinkMLValue::List { class: Some(c), .. } => Some(c.def().name.clone()), + LinkMLInstance::Object { class, .. } => Some(class.def().name.clone()), + LinkMLInstance::Scalar { class: Some(c), .. } => Some(c.def().name.clone()), + LinkMLInstance::List { class: Some(c), .. } => Some(c.def().name.clone()), + LinkMLInstance::Null { class: Some(c), .. } => Some(c.def().name.clone()), _ => None, } } fn __len__(&self) -> PyResult { Ok(match &self.value { - LinkMLValue::Scalar { .. } => 0, - LinkMLValue::List { values, .. } => values.len(), - LinkMLValue::Mapping { values, .. } => values.len(), - LinkMLValue::Object { values, .. } => values.len(), + LinkMLInstance::Scalar { .. } => 0, + LinkMLInstance::Null { .. } => 0, + LinkMLInstance::List { values, .. } => values.len(), + LinkMLInstance::Mapping { values, .. } => values.len(), + LinkMLInstance::Object { values, .. } => values.len(), }) } @@ -539,27 +575,27 @@ impl PyLinkMLValue { &self, py: Python<'py>, key: &Bound<'py, PyAny>, - ) -> PyResult { + ) -> PyResult { match &self.value { - LinkMLValue::List { values, .. } => { + LinkMLInstance::List { values, .. } => { let idx: usize = key.extract()?; values .get(idx) - .map(|v| PyLinkMLValue::new(v.clone(), self.sv.clone_ref(py))) + .map(|v| PyLinkMLInstance::new(v.clone(), self.sv.clone_ref(py))) .ok_or_else(|| PyException::new_err("index out of range")) } - LinkMLValue::Object { values, .. } => { + LinkMLInstance::Object { values, .. } => { let k: String = key.extract()?; values .get(&k) - .map(|v| PyLinkMLValue::new(v.clone(), self.sv.clone_ref(py))) + .map(|v| PyLinkMLInstance::new(v.clone(), self.sv.clone_ref(py))) .ok_or_else(|| PyException::new_err("key not found")) } - LinkMLValue::Mapping { values, .. } => { + LinkMLInstance::Mapping { values, .. } => { let k: String = key.extract()?; values .get(&k) - .map(|v| PyLinkMLValue::new(v.clone(), self.sv.clone_ref(py))) + .map(|v| PyLinkMLInstance::new(v.clone(), self.sv.clone_ref(py))) .ok_or_else(|| PyException::new_err("key not found")) } _ => Err(PyException::new_err("not indexable")), @@ -567,19 +603,19 @@ impl PyLinkMLValue { } /// Navigate by a path of strings (map keys or list indices). - /// Returns a new LinkMLValue if found, otherwise None. + /// Returns a new LinkMLInstance if found, otherwise None. #[pyo3(name = "navigate")] fn py_navigate<'py>( &self, py: Python<'py>, path: &Bound<'py, PyAny>, - ) -> PyResult> { + ) -> PyResult> { // Expect any iterable of strings let path_vec: Vec = path .extract() .map_err(|_| PyException::new_err("path must be a sequence of strings"))?; if let Some(found) = self.value.navigate_path(&path_vec) { - Ok(Some(PyLinkMLValue::new( + Ok(Some(PyLinkMLInstance::new( found.clone(), self.sv.clone_ref(py), ))) @@ -590,28 +626,28 @@ impl PyLinkMLValue { fn keys(&self) -> PyResult> { match &self.value { - LinkMLValue::Object { values, .. } => Ok(values.keys().cloned().collect()), - LinkMLValue::Mapping { values, .. } => Ok(values.keys().cloned().collect()), + LinkMLInstance::Object { values, .. } => Ok(values.keys().cloned().collect()), + LinkMLInstance::Mapping { values, .. } => Ok(values.keys().cloned().collect()), _ => Ok(Vec::new()), } } - fn values<'py>(&self, py: Python<'py>) -> PyResult> { + fn values<'py>(&self, py: Python<'py>) -> PyResult> { match &self.value { - LinkMLValue::Object { values, .. } => Ok(values + LinkMLInstance::Object { values, .. } => Ok(values .values() .cloned() - .map(|v| PyLinkMLValue::new(v, self.sv.clone_ref(py))) + .map(|v| PyLinkMLInstance::new(v, self.sv.clone_ref(py))) .collect()), - LinkMLValue::Mapping { values, .. } => Ok(values + LinkMLInstance::Mapping { values, .. } => Ok(values .values() .cloned() - .map(|v| PyLinkMLValue::new(v, self.sv.clone_ref(py))) + .map(|v| PyLinkMLInstance::new(v, self.sv.clone_ref(py))) .collect()), - LinkMLValue::List { values, .. } => Ok(values + LinkMLInstance::List { values, .. } => Ok(values .iter() .cloned() - .map(|v| PyLinkMLValue::new(v, self.sv.clone_ref(py))) + .map(|v| PyLinkMLInstance::new(v, self.sv.clone_ref(py))) .collect()), _ => Ok(Vec::new()), } @@ -642,27 +678,33 @@ impl PyLinkMLValue { fn __repr__(&self) -> PyResult { Ok(match &self.value { - LinkMLValue::Scalar { value, slot, .. } => { - format!("LinkMLValue.Scalar(slot='{}', value={})", slot.name, value) + LinkMLInstance::Scalar { value, slot, .. } => { + format!( + "LinkMLInstance.Scalar(slot='{}', value={})", + slot.name, value + ) + } + LinkMLInstance::Null { slot, .. } => { + format!("LinkMLInstance.Null(slot='{}')", slot.name) } - LinkMLValue::List { values, slot, .. } => { + LinkMLInstance::List { values, slot, .. } => { format!( - "LinkMLValue.List(slot='{}', len={})", + "LinkMLInstance.List(slot='{}', len={})", slot.name, values.len() ) } - LinkMLValue::Mapping { values, slot, .. } => { + LinkMLInstance::Mapping { values, slot, .. } => { format!( - "LinkMLValue.Mapping(slot='{}', keys={:?})", + "LinkMLInstance.Mapping(slot='{}', keys={:?})", slot.name, values.keys().collect::>() ) } - LinkMLValue::Object { values, class, .. } => { + LinkMLInstance::Object { values, class, .. } => { let keys: Vec<&String> = values.keys().collect(); format!( - "LinkMLValue.Object(class='{}', keys={:?})", + "LinkMLInstance.Object(class='{}', keys={:?})", class.def().name.clone(), keys ) @@ -675,13 +717,102 @@ impl PyLinkMLValue { } } +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] +#[pyclass(name = "PatchTrace")] +pub struct PyPatchTrace { + added: Vec, + deleted: Vec, + updated: Vec, +} + +impl From for PyPatchTrace { + fn from(trace: PatchTrace) -> Self { + Self { + added: trace.added, + deleted: trace.deleted, + updated: trace.updated, + } + } +} + +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] +#[pymethods] +impl PyPatchTrace { + #[getter] + fn added(&self) -> Vec { + self.added.clone() + } + + #[getter] + fn deleted(&self) -> Vec { + self.deleted.clone() + } + + #[getter] + fn updated(&self) -> Vec { + self.updated.clone() + } + + fn __repr__(&self) -> String { + format!( + "PatchTrace(added={:?}, deleted={:?}, updated={:?})", + self.added, self.deleted, self.updated + ) + } + + fn __str__(&self) -> String { + self.__repr__() + } +} + +#[cfg_attr(feature = "stubgen", gen_stub_pyclass)] +#[pyclass(name = "PatchResult")] +pub struct PyPatchResult { + value: Py, + trace: Py, +} + +impl PyPatchResult { + fn new(value: Py, trace: Py) -> Self { + Self { value, trace } + } +} + +#[cfg_attr(feature = "stubgen", gen_stub_pymethods)] +#[pymethods] +impl PyPatchResult { + #[getter] + fn value(&self, py: Python<'_>) -> Py { + self.value.clone_ref(py) + } + + #[getter] + fn trace(&self, py: Python<'_>) -> Py { + self.trace.clone_ref(py) + } + + fn __repr__(&self, py: Python<'_>) -> PyResult { + let value_repr: String = self.value.bind(py).repr()?.extract()?; + let trace_repr: String = self.trace.bind(py).repr()?.extract()?; + Ok(format!( + "PatchResult(value={}, trace={})", + value_repr, trace_repr + )) + } + + fn __str__(&self, py: Python<'_>) -> PyResult { + self.__repr__(py) + } +} + +#[cfg_attr(feature = "stubgen", gen_stub_pyfunction)] #[pyfunction] fn load_yaml( py: Python<'_>, source: &Bound<'_, PyAny>, sv: Py, class: Option>, -) -> PyResult { +) -> PyResult { let sv_ref = sv.bind(py).borrow(); let rust_sv = sv_ref.as_rust(); let conv = rust_sv.converter(); @@ -697,16 +828,17 @@ fn load_yaml( .ok_or_else(|| PyException::new_err("class not found, please provide a valid class"))?; let v = load_yaml_str(&text, rust_sv, cv.as_rust(), &conv) .map_err(|e| PyException::new_err(e.to_string()))?; - Ok(PyLinkMLValue::new(v, sv)) + Ok(PyLinkMLInstance::new(v, sv)) } +#[cfg_attr(feature = "stubgen", gen_stub_pyfunction)] #[pyfunction] fn load_json( py: Python<'_>, source: &Bound<'_, PyAny>, sv: Py, class: Option>, -) -> PyResult { +) -> PyResult { let sv_ref = sv.bind(py).borrow(); let rust_sv = sv_ref.as_rust(); let conv = rust_sv.converter(); @@ -722,20 +854,21 @@ fn load_json( let (text, _) = py_filelike_or_string_to_string(source)?; let v = load_json_str(&text, rust_sv, cv.as_rust(), &conv) .map_err(|e| PyException::new_err(e.to_string()))?; - Ok(PyLinkMLValue::new(v, sv)) + Ok(PyLinkMLInstance::new(v, sv)) } -#[pyfunction(name = "diff", signature = (source, target, ignore_missing_target=None))] +#[cfg_attr(feature = "stubgen", gen_stub_pyfunction)] +#[pyfunction(name = "diff", signature = (source, target, treat_missing_as_null=None))] fn py_diff( py: Python<'_>, - source: &PyLinkMLValue, - target: &PyLinkMLValue, - ignore_missing_target: Option, + source: &PyLinkMLInstance, + target: &PyLinkMLInstance, + treat_missing_as_null: Option, ) -> PyResult { let deltas = diff_internal( &source.value, &target.value, - ignore_missing_target.unwrap_or(false), + treat_missing_as_null.unwrap_or(false), ); let vals: Vec = deltas .iter() @@ -744,23 +877,49 @@ fn py_diff( Ok(json_value_to_py(py, &JsonValue::Array(vals))) } -#[pyfunction(name = "patch")] +#[cfg_attr(feature = "stubgen", gen_stub_pyfunction)] +#[pyfunction(name = "patch", signature = (source, deltas, treat_missing_as_null = true, ignore_no_ops = true))] fn py_patch( py: Python<'_>, - source: &PyLinkMLValue, + source: &PyLinkMLInstance, deltas: &Bound<'_, PyAny>, -) -> PyResult { + treat_missing_as_null: bool, + ignore_no_ops: bool, +) -> PyResult> { let json_mod = PyModule::import(py, "json")?; let deltas_str: String = json_mod.call_method1("dumps", (deltas,))?.extract()?; let deltas_vec: Vec = serde_json::from_str(&deltas_str).map_err(|e| PyException::new_err(e.to_string()))?; let sv_ref = source.sv.bind(py).borrow(); let rust_sv = sv_ref.as_rust(); - let new_value = patch_internal(&source.value, &deltas_vec, rust_sv); - Ok(PyLinkMLValue::new(new_value, source.sv.clone_ref(py))) + let (new_value, trace) = patch_internal( + &source.value, + &deltas_vec, + rust_sv, + linkml_runtime::diff::PatchOptions { + ignore_no_ops, + treat_missing_as_null, + }, + ) + .map_err(|e| PyException::new_err(e.to_string()))?; + let py_val = Py::new( + py, + PyLinkMLInstance::new(new_value, source.sv.clone_ref(py)), + )?; + let py_trace = Py::new(py, PyPatchTrace::from(trace))?; + let result = PyPatchResult::new(py_val, py_trace); + Py::new(py, result) } +#[cfg_attr(feature = "stubgen", gen_stub_pyfunction)] #[pyfunction(name = "to_turtle", signature = (value, skolem=None))] -fn py_to_turtle(py: Python<'_>, value: &PyLinkMLValue, skolem: Option) -> PyResult { +fn py_to_turtle( + py: Python<'_>, + value: &PyLinkMLInstance, + skolem: Option, +) -> PyResult { value.as_turtle(py, skolem) } + +#[cfg(feature = "stubgen")] +define_stub_info_gatherer!(stub_info); diff --git a/src/python/tests/python_equals.rs b/src/python/tests/python_equals.rs new file mode 100644 index 0000000..eb51043 --- /dev/null +++ b/src/python/tests/python_equals.rs @@ -0,0 +1,75 @@ +use linkml_runtime_python::runtime_module; +use pyo3::prelude::*; +use pyo3::types::PyDict; +use std::path::PathBuf; + +fn data_path(name: &str) -> PathBuf { + let base = PathBuf::from(env!("CARGO_MANIFEST_DIR")); + let candidates = [ + base.join("../runtime/tests/data").join(name), + base.join("../schemaview/tests/data").join(name), + base.join("tests/data").join(name), + ]; + for c in candidates { + if c.exists() { + return c; + } + } + panic!("test data not found: {}", name); +} + +#[test] +fn python_equals_api() { + pyo3::prepare_freethreaded_python(); + Python::with_gil(|py| { + let module = PyModule::new(py, "linkml_runtime").unwrap(); + runtime_module(&module).unwrap(); + let sys = py.import("sys").unwrap(); + let modules = sys.getattr("modules").unwrap(); + let sys_modules = modules.downcast::().unwrap(); + sys_modules.set_item("linkml_runtime", module).unwrap(); + + let locals = PyDict::new(py); + locals + .set_item( + "schema_path", + data_path("personinfo.yaml").to_str().unwrap(), + ) + .unwrap(); + + pyo3::py_run!( + py, + *locals, + r#" +import linkml_runtime as lr +import json +sv = lr.make_schema_view(schema_path) +cls = sv.get_class_view('Container') + +doc1 = { + 'objects': [ + { + 'objecttype': 'personinfo:Person', + 'id': 'P:1', + 'name': 'Alice', + 'current_address': None + } + ] +} +doc2 = { + 'objects': [ + { + 'objecttype': 'personinfo:Person', + 'id': 'P:1', + 'name': 'Alice' + } + ] +} + +v1 = lr.load_json(json.dumps(doc1), sv, cls) +v2 = lr.load_json(json.dumps(doc2), sv, cls) +assert v1['objects'][0].equals(v2['objects'][0], True) +"# + ); + }); +} diff --git a/src/runtime/src/diff.rs b/src/runtime/src/diff.rs index a64068e..115c859 100644 --- a/src/runtime/src/diff.rs +++ b/src/runtime/src/diff.rs @@ -1,7 +1,7 @@ -use crate::{load_json_str, LinkMLValue}; +use crate::{LResult, LinkMLInstance, NodeId}; use linkml_schemaview::schemaview::{SchemaView, SlotView}; use serde::{Deserialize, Serialize}; -use serde_json::{Map, Value as JsonValue}; +use serde_json::Value as JsonValue; const IGNORE_ANNOTATION: &str = "diff.linkml.io/ignore"; @@ -23,20 +23,21 @@ pub struct Delta { pub new: Option, } -impl LinkMLValue { +impl LinkMLInstance { pub fn to_json(&self) -> JsonValue { match self { - LinkMLValue::Scalar { value, .. } => value.clone(), - LinkMLValue::List { values, .. } => { + LinkMLInstance::Scalar { value, .. } => value.clone(), + LinkMLInstance::Null { .. } => JsonValue::Null, + LinkMLInstance::List { values, .. } => { JsonValue::Array(values.iter().map(|v| v.to_json()).collect()) } - LinkMLValue::Mapping { values, .. } => JsonValue::Object( + LinkMLInstance::Mapping { values, .. } => JsonValue::Object( values .iter() .map(|(k, v)| (k.clone(), v.to_json())) .collect(), ), - LinkMLValue::Object { values, .. } => JsonValue::Object( + LinkMLInstance::Object { values, .. } => JsonValue::Object( values .iter() .map(|(k, v)| (k.clone(), v.to_json())) @@ -46,13 +47,24 @@ impl LinkMLValue { } } -pub fn diff(source: &LinkMLValue, target: &LinkMLValue, ignore_missing_target: bool) -> Vec { +/// Compute a semantic diff between two LinkMLInstance trees. +/// +/// Semantics of nulls and missing values: +/// - X -> null: update to null (old = X, new = null). +/// - null -> X: update from null (old = null, new = X). +/// - missing -> X: add (old = None, new = X). +/// - X -> missing: ignored by default; if `treat_missing_as_null` is true, update to null (old = X, new = null). +pub fn diff( + source: &LinkMLInstance, + target: &LinkMLInstance, + treat_missing_as_null: bool, +) -> Vec { fn inner( path: &mut Vec, slot: Option<&SlotView>, - s: &LinkMLValue, - t: &LinkMLValue, - ignore_missing: bool, + s: &LinkMLInstance, + t: &LinkMLInstance, + treat_missing_as_null: bool, out: &mut Vec, ) { if let Some(sl) = slot { @@ -62,17 +74,41 @@ pub fn diff(source: &LinkMLValue, target: &LinkMLValue, ignore_missing_target: b } match (s, t) { ( - LinkMLValue::Object { + LinkMLInstance::Object { values: sm, class: sc, .. }, - LinkMLValue::Object { + LinkMLInstance::Object { values: tm, class: tc, .. }, ) => { + // If objects have an identifier or key slot and it changed, treat as whole-object replacement + // This applies for single-valued and list-valued inlined objects. + let key_slot_name = sc + .key_or_identifier_slot() + .or_else(|| tc.key_or_identifier_slot()) + .map(|s| s.name.clone()); + if let Some(ks) = key_slot_name { + let sid = sm.get(&ks); + let tid = tm.get(&ks); + if let ( + Some(LinkMLInstance::Scalar { value: s_id, .. }), + Some(LinkMLInstance::Scalar { value: t_id, .. }), + ) = (sid, tid) + { + if s_id != t_id { + out.push(Delta { + path: path.clone(), + old: Some(s.to_json()), + new: Some(t.to_json()), + }); + return; + } + } + } for (k, sv) in sm { let slot_view = sc .slots() @@ -81,14 +117,17 @@ pub fn diff(source: &LinkMLValue, target: &LinkMLValue, ignore_missing_target: b .or_else(|| tc.slots().iter().find(|s| s.name == *k)); path.push(k.clone()); match tm.get(k) { - Some(tv) => inner(path, slot_view, sv, tv, ignore_missing, out), + Some(tv) => inner(path, slot_view, sv, tv, treat_missing_as_null, out), None => { - if !ignore_missing && !slot_view.is_some_and(slot_is_ignored) { - out.push(Delta { - path: path.clone(), - old: Some(sv.to_json()), - new: None, - }); + if !slot_view.is_some_and(slot_is_ignored) { + // Missing target slot: either ignore (default) or treat as update to null + if treat_missing_as_null { + out.push(Delta { + path: path.clone(), + old: Some(sv.to_json()), + new: Some(JsonValue::Null), + }); + } } } } @@ -113,12 +152,37 @@ pub fn diff(source: &LinkMLValue, target: &LinkMLValue, ignore_missing_target: b } } } - (LinkMLValue::List { values: sl, .. }, LinkMLValue::List { values: tl, .. }) => { + (LinkMLInstance::List { values: sl, .. }, LinkMLInstance::List { values: tl, .. }) => { + // Prefer identifier-based addressing when possible, fall back to index let max_len = std::cmp::max(sl.len(), tl.len()); for i in 0..max_len { - path.push(i.to_string()); + let label = |v: &LinkMLInstance| -> Option { + if let LinkMLInstance::Object { values, class, .. } = v { + if let Some(id_slot) = class.key_or_identifier_slot() { + if let Some(LinkMLInstance::Scalar { value, .. }) = + values.get(&id_slot.name) + { + return match value { + JsonValue::String(s) => Some(s.clone()), + other => Some(other.to_string()), + }; + } + } + } + None + }; + let step = if let Some(sv) = sl.get(i) { + label(sv) + .or_else(|| tl.get(i).and_then(label)) + .unwrap_or_else(|| i.to_string()) + } else { + tl.get(i).and_then(label).unwrap_or_else(|| i.to_string()) + }; + path.push(step); match (sl.get(i), tl.get(i)) { - (Some(sv), Some(tv)) => inner(path, None, sv, tv, ignore_missing, out), + (Some(sv), Some(tv)) => { + inner(path, None, sv, tv, treat_missing_as_null, out) + } (Some(sv), None) => out.push(Delta { path: path.clone(), old: Some(sv.to_json()), @@ -134,13 +198,18 @@ pub fn diff(source: &LinkMLValue, target: &LinkMLValue, ignore_missing_target: b path.pop(); } } - (LinkMLValue::Mapping { values: sm, .. }, LinkMLValue::Mapping { values: tm, .. }) => { + ( + LinkMLInstance::Mapping { values: sm, .. }, + LinkMLInstance::Mapping { values: tm, .. }, + ) => { use std::collections::BTreeSet; let keys: BTreeSet<_> = sm.keys().chain(tm.keys()).cloned().collect(); for k in keys { path.push(k.clone()); match (sm.get(&k), tm.get(&k)) { - (Some(sv), Some(tv)) => inner(path, None, sv, tv, ignore_missing, out), + (Some(sv), Some(tv)) => { + inner(path, None, sv, tv, treat_missing_as_null, out) + } (Some(sv), None) => out.push(Delta { path: path.clone(), old: Some(sv.to_json()), @@ -156,14 +225,29 @@ pub fn diff(source: &LinkMLValue, target: &LinkMLValue, ignore_missing_target: b path.pop(); } } - _ => { - let sv = s.to_json(); - let tv = t.to_json(); - if sv != tv { + (LinkMLInstance::Null { .. }, LinkMLInstance::Null { .. }) => {} + (LinkMLInstance::Null { .. }, tv) => { + out.push(Delta { + path: path.clone(), + old: Some(JsonValue::Null), + new: Some(tv.to_json()), + }); + } + (sv, LinkMLInstance::Null { .. }) => { + out.push(Delta { + path: path.clone(), + old: Some(sv.to_json()), + new: Some(JsonValue::Null), + }); + } + (sv, tv) => { + let sj = sv.to_json(); + let tj = tv.to_json(); + if sj != tj { out.push(Delta { path: path.clone(), - old: Some(sv), - new: Some(tv), + old: Some(sj), + new: Some(tj), }); } } @@ -175,90 +259,323 @@ pub fn diff(source: &LinkMLValue, target: &LinkMLValue, ignore_missing_target: b None, source, target, - ignore_missing_target, + treat_missing_as_null, &mut out, ); out } -pub fn patch(source: &LinkMLValue, deltas: &[Delta], sv: &SchemaView) -> LinkMLValue { - let mut json = source.to_json(); +#[derive(Debug, Clone, Default)] +pub struct PatchTrace { + /// Node IDs of subtrees that were newly created by the patch. + /// + /// See [`crate::NodeId`] for semantics: these are internal, ephemeral IDs + /// that are useful for tooling and provenance, not object identifiers. + pub added: Vec, + /// Node IDs of subtrees that were removed by the patch. + pub deleted: Vec, + /// Node IDs of nodes that were directly updated (e.g., parent containers, scalars). + pub updated: Vec, +} + +#[derive(Debug, Clone, Copy)] +pub struct PatchOptions { + pub ignore_no_ops: bool, + pub treat_missing_as_null: bool, +} + +impl Default for PatchOptions { + fn default() -> Self { + Self { + ignore_no_ops: true, + treat_missing_as_null: true, + } + } +} + +pub fn patch( + source: &LinkMLInstance, + deltas: &[Delta], + sv: &SchemaView, + opts: PatchOptions, +) -> LResult<(LinkMLInstance, PatchTrace)> { + let mut out = source.clone(); + let mut trace = PatchTrace::default(); for d in deltas { - apply_delta(&mut json, d); + apply_delta_linkml(&mut out, &d.path, &d.new, sv, &mut trace, opts)?; } - let json_str = serde_json::to_string(&json).unwrap(); - let conv = sv.converter(); - match source { - LinkMLValue::Object { class: ref c, .. } => load_json_str(&json_str, sv, c, &conv).unwrap(), - _ => panic!("patching non-map values is not supported here"), + Ok((out, trace)) +} + +fn collect_all_ids(value: &LinkMLInstance, ids: &mut Vec) { + ids.push(value.node_id()); + match value { + LinkMLInstance::Scalar { .. } => {} + LinkMLInstance::Null { .. } => {} + LinkMLInstance::List { values, .. } => { + for v in values { + collect_all_ids(v, ids); + } + } + LinkMLInstance::Mapping { values, .. } | LinkMLInstance::Object { values, .. } => { + for v in values.values() { + collect_all_ids(v, ids); + } + } } } -fn apply_delta(value: &mut JsonValue, delta: &Delta) { - apply_delta_inner(value, &delta.path, &delta.new); +fn mark_added_subtree(v: &LinkMLInstance, trace: &mut PatchTrace) { + collect_all_ids(v, &mut trace.added); +} + +fn mark_deleted_subtree(v: &LinkMLInstance, trace: &mut PatchTrace) { + collect_all_ids(v, &mut trace.deleted); } -fn apply_delta_inner(value: &mut JsonValue, path: &[String], newv: &Option) { +// Removed thin wrappers; call LinkMLInstance builders directly at call sites. + +fn apply_delta_linkml( + current: &mut LinkMLInstance, + path: &[String], + newv: &Option, + sv: &SchemaView, + trace: &mut PatchTrace, + opts: PatchOptions, +) -> LResult<()> { if path.is_empty() { if let Some(v) = newv { - *value = v.clone(); + let (class_opt, slot_opt) = match current { + LinkMLInstance::Object { class, .. } => (Some(class.clone()), None), + LinkMLInstance::List { class, slot, .. } => (class.clone(), Some(slot.clone())), + LinkMLInstance::Mapping { class, slot, .. } => (class.clone(), Some(slot.clone())), + LinkMLInstance::Scalar { class, slot, .. } => (class.clone(), Some(slot.clone())), + LinkMLInstance::Null { class, slot, .. } => (class.clone(), Some(slot.clone())), + }; + let conv = sv.converter(); + if let Some(cls) = class_opt { + let new_node = + LinkMLInstance::from_json(v.clone(), cls, slot_opt, sv, &conv, false)?; + if opts.ignore_no_ops && current.equals(&new_node, opts.treat_missing_as_null) { + // No-op delta; skip to preserve node IDs + return Ok(()); + } + mark_deleted_subtree(current, trace); + mark_added_subtree(&new_node, trace); + *current = new_node; + } } - return; + return Ok(()); } - match value { - JsonValue::Object(map) => { + + match current { + LinkMLInstance::Object { values, class, .. } => { let key = &path[0]; if path.len() == 1 { match newv { Some(v) => { - map.insert(key.clone(), v.clone()); + let conv = sv.converter(); + let slot = class.slots().iter().find(|s| s.name == *key).cloned(); + let new_child = LinkMLInstance::from_json( + v.clone(), + class.clone(), + slot.clone(), + sv, + &conv, + false, + )?; + if let Some(old_child) = values.get_mut(key) { + if opts.ignore_no_ops + && old_child.equals(&new_child, opts.treat_missing_as_null) + { + // no-op; skip + return Ok(()); + } + match (&mut *old_child, &new_child) { + ( + LinkMLInstance::Scalar { value: ov, .. }, + LinkMLInstance::Scalar { value: nv, .. }, + ) if !v.is_object() && !v.is_array() => { + // In-place scalar update: keep node_id stable and mark child node + *ov = nv.clone(); + trace.updated.push(old_child.node_id()); + } + _ => { + let old_snapshot = std::mem::replace(old_child, new_child); + mark_deleted_subtree(&old_snapshot, trace); + mark_added_subtree(old_child, trace); + trace.updated.push(current.node_id()); + } + } + } else { + // adding a Null assignment may be a no-op when treating missing as null + if opts.ignore_no_ops + && opts.treat_missing_as_null + && matches!(new_child, LinkMLInstance::Null { .. }) + { + return Ok(()); + } + // mark before insert + mark_added_subtree(&new_child, trace); + values.insert(key.clone(), new_child); + trace.updated.push(current.node_id()); + } } None => { - map.remove(key); + if let Some(old_child) = values.get(key) { + if opts.ignore_no_ops + && opts.treat_missing_as_null + && matches!(old_child, LinkMLInstance::Null { .. }) + { + // deleting a Null assignment: no-op + return Ok(()); + } + } + if let Some(old_child) = values.remove(key) { + mark_deleted_subtree(&old_child, trace); + trace.updated.push(current.node_id()); + } } } - } else { - let entry = map - .entry(key.clone()) - .or_insert(JsonValue::Object(Map::new())); - apply_delta_inner(entry, &path[1..], newv); + } else if let Some(child) = values.get_mut(key) { + apply_delta_linkml(child, &path[1..], newv, sv, trace, opts)?; } } - JsonValue::Array(arr) => { - let idx: usize = path[0].parse().unwrap(); + LinkMLInstance::Mapping { values, slot, .. } => { + let key = &path[0]; if path.len() == 1 { match newv { Some(v) => { - if idx < arr.len() { - arr[idx] = v.clone(); - } else if idx == arr.len() { - arr.push(v.clone()); - } else { - while arr.len() < idx { - arr.push(JsonValue::Null); + let conv = sv.converter(); + let new_child = LinkMLInstance::build_mapping_entry_for_slot( + slot, + v.clone(), + sv, + &conv, + Vec::new(), + )?; + if let Some(old_child) = values.get(key) { + if opts.ignore_no_ops + && old_child.equals(&new_child, opts.treat_missing_as_null) + { + return Ok(()); } - arr.push(v.clone()); + mark_deleted_subtree(old_child, trace); } + // mark before insert + mark_added_subtree(&new_child, trace); + values.insert(key.clone(), new_child); + trace.updated.push(current.node_id()); } None => { - if idx < arr.len() { - arr.remove(idx); + if let Some(old_child) = values.remove(key) { + mark_deleted_subtree(&old_child, trace); + trace.updated.push(current.node_id()); } } } - } else { - if idx >= arr.len() { - arr.resize(idx + 1, JsonValue::Null); - } - apply_delta_inner(&mut arr[idx], &path[1..], newv); + } else if let Some(child) = values.get_mut(key) { + apply_delta_linkml(child, &path[1..], newv, sv, trace, opts)?; } } - _ => { - if path.is_empty() { - if let Some(v) = newv { - *value = v.clone(); + LinkMLInstance::List { + values, + slot, + class, + .. + } => { + // Support index or identifier-based list addressing + let key = &path[0]; + let idx_opt = key + .parse::() + .ok() + .filter(|i| *i < values.len()) + .or_else(|| { + // Attempt identifier-based lookup + values.iter().enumerate().find_map(|(i, v)| { + if let LinkMLInstance::Object { + values: mv, class, .. + } = v + { + class + .key_or_identifier_slot() + .and_then(|id_slot| mv.get(&id_slot.name)) + .and_then(|child| match child { + LinkMLInstance::Scalar { value, .. } => Some(match value { + serde_json::Value::String(s) => s.clone(), + other => other.to_string(), + }), + _ => None, + }) + .and_then(|s| if &s == key { Some(i) } else { None }) + } else { + None + } + }) + }); + if path.len() == 1 { + match newv { + Some(v) => { + if let Some(idx) = idx_opt.filter(|i| *i < values.len()) { + let conv = sv.converter(); + let new_child = LinkMLInstance::build_list_item_for_slot( + slot, + class.as_ref(), + v.clone(), + sv, + &conv, + Vec::new(), + )?; + if opts.ignore_no_ops + && values[idx].equals(&new_child, opts.treat_missing_as_null) + { + return Ok(()); + } + match (&mut values[idx], &new_child) { + ( + LinkMLInstance::Scalar { value: ov, .. }, + LinkMLInstance::Scalar { value: nv, .. }, + ) if !v.is_object() && !v.is_array() => { + *ov = nv.clone(); + trace.updated.push(values[idx].node_id()); + } + _ => { + let old = std::mem::replace(&mut values[idx], new_child); + mark_deleted_subtree(&old, trace); + mark_added_subtree(&values[idx], trace); + trace.updated.push(current.node_id()); + } + } + } else { + let conv = sv.converter(); + let new_child = LinkMLInstance::build_list_item_for_slot( + slot, + class.as_ref(), + v.clone(), + sv, + &conv, + Vec::new(), + )?; + // mark before push + mark_added_subtree(&new_child, trace); + values.push(new_child); + trace.updated.push(current.node_id()); + } + } + None => { + if let Some(idx) = idx_opt.filter(|i| *i < values.len()) { + let old = values.remove(idx); + mark_deleted_subtree(&old, trace); + trace.updated.push(current.node_id()); + } + } } + } else if let Some(idx) = idx_opt.filter(|i| *i < values.len()) { + apply_delta_linkml(&mut values[idx], &path[1..], newv, sv, trace, opts)?; } } + LinkMLInstance::Scalar { .. } => {} + LinkMLInstance::Null { .. } => {} } + Ok(()) } diff --git a/src/runtime/src/lib.rs b/src/runtime/src/lib.rs index a8cd2c9..0874705 100644 --- a/src/runtime/src/lib.rs +++ b/src/runtime/src/lib.rs @@ -5,10 +5,11 @@ use serde_json::Value as JsonValue; use std::collections::HashMap; use std::fs; use std::path::Path; +use std::sync::atomic::{AtomicU64, Ordering}; pub mod diff; pub mod turtle; -pub use diff::{diff, patch, Delta}; +pub use diff::{diff, patch, Delta, PatchTrace}; #[derive(Debug)] pub struct LinkMLError(pub String); @@ -54,60 +55,299 @@ fn slot_matches_key(slot: &SlotView, key: &str) -> bool { } #[derive(Clone)] -pub enum LinkMLValue { +pub enum LinkMLInstance { Scalar { + node_id: NodeId, value: JsonValue, slot: SlotView, class: Option, sv: SchemaView, }, + Null { + node_id: NodeId, + slot: SlotView, + class: Option, + sv: SchemaView, + }, List { - values: Vec, + node_id: NodeId, + values: Vec, slot: SlotView, class: Option, sv: SchemaView, }, Mapping { - values: HashMap, + node_id: NodeId, + values: HashMap, slot: SlotView, class: Option, sv: SchemaView, }, Object { - values: HashMap, + node_id: NodeId, + values: HashMap, class: ClassView, sv: SchemaView, }, } -impl LinkMLValue { +/// Internal node identifier used for provenance and update tracking. +/// +/// Node IDs are assigned to every `LinkMLInstance` node when values are constructed or +/// transformed. They exist solely as technical identifiers to help with patching and +/// provenance (for example, `PatchTrace.added`/`deleted` collect `NodeId`s of affected +/// subtrees). They are not intended to identify domain objects — for that, use LinkML +/// identifier or key slots as defined in the schema. +/// +/// Important properties: +/// - Local and ephemeral: loading the same data twice will yield different `NodeId`s. +/// - Non-persistent: never serialize or expose as a model identifier. +/// - Useful for tracking modifications within a single in-memory value. +pub type NodeId = u64; + +static NEXT_NODE_ID: AtomicU64 = AtomicU64::new(1); + +fn new_node_id() -> NodeId { + NEXT_NODE_ID.fetch_add(1, Ordering::Relaxed) +} + +impl LinkMLInstance { + /// Returns the internal [`NodeId`] of this node. + /// + /// This ID is only for internal provenance/update tracking and is not a + /// semantic identifier of the represented object. + pub fn node_id(&self) -> NodeId { + match self { + LinkMLInstance::Scalar { node_id, .. } + | LinkMLInstance::List { node_id, .. } + | LinkMLInstance::Mapping { node_id, .. } + | LinkMLInstance::Object { node_id, .. } + | LinkMLInstance::Null { node_id, .. } => *node_id, + } + } /// Navigate the value by a path of strings, where each element is either /// a dictionary key (for maps) or a list index (for lists). - /// Returns `Some(&LinkMLValue)` if the full path can be resolved, otherwise `None`. - pub fn navigate_path(&self, path: I) -> Option<&LinkMLValue> + /// Returns `Some(&LinkMLInstance)` if the full path can be resolved, otherwise `None`. + pub fn navigate_path(&self, path: I) -> Option<&LinkMLInstance> where I: IntoIterator, S: AsRef, { - let mut current: &LinkMLValue = self; + let mut current: &LinkMLInstance = self; for seg in path { let key = seg.as_ref(); match current { - LinkMLValue::Object { values, .. } => { + LinkMLInstance::Object { values, .. } => { current = values.get(key)?; } - LinkMLValue::List { values, .. } => { - let idx: usize = key.parse().ok()?; - current = values.get(idx)?; + LinkMLInstance::List { values, .. } => { + // Support either numeric index or identifier/key-based selection + if let Ok(idx) = key.parse::() { + current = values.get(idx)?; + } else { + // Attempt identifier-based lookup for object elements + let mut found: Option<&LinkMLInstance> = None; + for v in values.iter() { + if let LinkMLInstance::Object { + values: mv, class, .. + } = v + { + if let Some(id_slot) = class.key_or_identifier_slot() { + if let Some(LinkMLInstance::Scalar { value, .. }) = + mv.get(&id_slot.name) + { + match value { + JsonValue::String(sv) => { + if sv == key { + found = Some(v); + break; + } + } + other => { + let sv = other.to_string(); + if sv == key { + found = Some(v); + break; + } + } + } + } + } + } + } + current = found?; + } } - LinkMLValue::Mapping { values, .. } => { + LinkMLInstance::Mapping { values, .. } => { current = values.get(key)?; } - LinkMLValue::Scalar { .. } => return None, + LinkMLInstance::Scalar { .. } => return None, + LinkMLInstance::Null { .. } => return None, } } Some(current) } + + /// Compare two LinkMLInstance instances for semantic equality per the + /// LinkML Instances specification (Identity conditions). + /// + /// Key points implemented: + /// - Null equals Null. + /// - Scalars: equal iff same underlying atomic value and compatible typed context + /// (same Enum range when present; otherwise same TypeDefinition range name when present). + /// - Lists: equal iff same length and pairwise equal in order. + /// - Mappings: equal iff same keys and values equal for each key (order-insensitive). + /// - Objects: equal iff same instantiated class (by identity) and slot assignments match; when + /// `treat_missing_as_null` is true, Null is treated as omitted (normalized), otherwise Null is + /// distinct from missing. + pub fn equals(&self, other: &LinkMLInstance, treat_missing_as_null: bool) -> bool { + use LinkMLInstance::*; + match (self, other) { + (Null { .. }, Null { .. }) => true, + ( + Scalar { + value: v1, + slot: s1, + .. + }, + Scalar { + value: v2, + slot: s2, + .. + }, + ) => { + // If either slot has an enum range, both must and enum names must match + let e1 = s1.get_range_enum(); + let e2 = s2.get_range_enum(); + if e1.is_some() || e2.is_some() { + match (e1, e2) { + (Some(ev1), Some(ev2)) => { + if ev1.schema_id() != ev2.schema_id() || ev1.name() != ev2.name() { + return false; + } + } + _ => return false, + } + } else { + // Compare type ranges if explicitly set on both + let t1 = s1.definition().range.as_ref(); + let t2 = s2.definition().range.as_ref(); + if let (Some(r1), Some(r2)) = (t1, t2) { + if r1 != r2 { + return false; + } + } + } + v1 == v2 + } + (List { values: a, .. }, List { values: b, .. }) => { + if a.len() != b.len() { + return false; + } + for (x, y) in a.iter().zip(b.iter()) { + if !x.equals(y, treat_missing_as_null) { + return false; + } + } + true + } + (Mapping { values: a, .. }, Mapping { values: b, .. }) => { + if a.len() != b.len() { + return false; + } + for (k, va) in a.iter() { + match b.get(k) { + Some(vb) => { + if !va.equals(vb, treat_missing_as_null) { + return false; + } + } + None => return false, + } + } + true + } + ( + Object { + values: a, + class: ca, + sv: sva, + .. + }, + Object { + values: b, + class: cb, + sv: svb, + .. + }, + ) => { + // Compare class identity via canonical URIs if possible + let ida = ca.canonical_uri(); + let idb = cb.canonical_uri(); + let class_equal = if let Some(conv) = sva.converter_for_schema(ca.schema_id()) { + // Use 'sva' for comparison; identifiers are global across schemas + sva.identifier_equals(&ida, &idb, conv).unwrap_or(false) + } else if let Some(conv) = svb.converter_for_schema(cb.schema_id()) { + svb.identifier_equals(&ida, &idb, conv).unwrap_or(false) + } else { + ca.name() == cb.name() + }; + if !class_equal { + return false; + } + + if treat_missing_as_null { + // Normalize conceptually by ignoring entries whose value is Null + let count_a = a.iter().filter(|(_, v)| !matches!(v, Null { .. })).count(); + let count_b = b.iter().filter(|(_, v)| !matches!(v, Null { .. })).count(); + if count_a != count_b { + return false; + } + for (k, va) in a.iter().filter(|(_, v)| !matches!(v, Null { .. })) { + match b.get(k) { + Some(vb) => { + if matches!(vb, Null { .. }) { + return false; + } + if !va.equals(vb, treat_missing_as_null) { + return false; + } + } + None => return false, + } + } + // Ensure b has no extra non-null keys not in a + for (k, _vb) in b.iter().filter(|(_, v)| !matches!(v, Null { .. })) { + match a.get(k) { + Some(va) => { + if matches!(va, Null { .. }) { + return false; + } + } + None => return false, + } + } + true + } else { + if a.len() != b.len() { + return false; + } + for (k, va) in a.iter() { + match b.get(k) { + Some(vb) => { + if !va.equals(vb, treat_missing_as_null) { + return false; + } + } + None => return false, + } + } + true + } + } + _ => false, + } + } fn find_scalar_slot_for_inlined_map( class: &ClassView, key_slot_name: &str, @@ -196,7 +436,8 @@ impl LinkMLValue { Self::from_json_internal(v, class.clone(), slot_ref, sv, conv, false, p)?, ); } - Ok(LinkMLValue::Object { + Ok(LinkMLInstance::Object { + node_id: new_node_id(), values, class: class.clone(), sv: sv.clone(), @@ -215,51 +456,41 @@ impl LinkMLValue { match (inside_list, value) { (false, JsonValue::Array(arr)) => { let mut values = Vec::new(); - let class_range: Option = sl.get_range_class(); - let slot_for_item = if class_range.is_some() { - None - } else { - Some(sl.clone()) - }; for (i, v) in arr.into_iter().enumerate() { let mut p = path.clone(); p.push(format!("{}[{}]", sl.name, i)); - let v_transformed = - if let (Some(cr), JsonValue::String(s)) = (class_range.as_ref(), &v) { - if let Some(id_slot) = cr.identifier_slot() { - let mut m = serde_json::Map::new(); - m.insert(id_slot.name.clone(), JsonValue::String(s.clone())); - JsonValue::Object(m) - } else { - v - } - } else { - v - }; - values.push(Self::from_json_internal( - v_transformed, - class_range.as_ref().unwrap_or(&class).clone(), - slot_for_item.clone(), + values.push(Self::build_list_item_for_slot( + &sl, + Some(&class), + v, sv, conv, - true, p, )?); } - Ok(LinkMLValue::List { + Ok(LinkMLInstance::List { + node_id: new_node_id(), values, slot: sl.clone(), class: Some(class.clone()), sv: sv.clone(), }) } + // Preserve explicit null as a Null value for list-valued slot + (false, JsonValue::Null) => Ok(LinkMLInstance::Null { + node_id: new_node_id(), + slot: sl.clone(), + class: Some(class.clone()), + sv: sv.clone(), + }), (false, other) => Err(LinkMLError(format!( "expected list for slot `{}`, found {:?} at {}", sl.name, other, path_to_string(&path) ))), - (true, other) => Ok(LinkMLValue::Scalar { + (true, other) => Ok(LinkMLInstance::Scalar { + node_id: new_node_id(), value: other, slot: sl.clone(), class: Some(class.clone()), @@ -278,101 +509,30 @@ impl LinkMLValue { ) -> LResult { match value { JsonValue::Object(map) => { - let range_cv = sl - .definition() - .range - .as_ref() - .and_then(|r| sv.get_class(&Identifier::new(r), conv).ok().flatten()) - .ok_or_else(|| { - LinkMLError(format!( - "mapping slot must have class range at {}", - path_to_string(&path) - )) - })?; let mut values = HashMap::new(); for (k, v) in map.into_iter() { - let base = sv - .get_class(&Identifier::new(range_cv.name()), conv) - .ok() - .flatten() - .unwrap_or_else(|| range_cv.clone()); - let child = match v { - JsonValue::Object(m) => { - // Select the most specific subclass using any type designator in the map - let selected = Self::select_class(&m, &base, sv, conv); - let mut child_values = HashMap::new(); - for (ck, cv) in m.into_iter() { - let slot_tmp = selected - .slots() - .iter() - .find(|s| slot_matches_key(s, &ck)) - .cloned(); - let mut p = path.clone(); - p.push(format!("{}:{}", k, ck)); - let key_name = slot_tmp - .as_ref() - .map(|s| s.name.clone()) - .unwrap_or_else(|| ck.clone()); - child_values.insert( - key_name, - Self::from_json_internal( - cv, - selected.clone(), - slot_tmp, - sv, - conv, - false, - p, - )?, - ); - } - LinkMLValue::Object { - values: child_values, - class: selected, - sv: sv.clone(), - } - } - other => { - // Scalar mapping value: attach it to a chosen scalar slot if any - let scalar_slot = Self::find_scalar_slot_for_inlined_map( - &base, - range_cv - .key_or_identifier_slot() - .map(|s| s.name.as_str()) - .unwrap_or(""), - ) - .ok_or_else(|| { - LinkMLError(format!( - "no scalar slot available for inlined mapping at {}", - path_to_string(&path) - )) - })?; - let mut child_values = HashMap::new(); - child_values.insert( - scalar_slot.name.clone(), - LinkMLValue::Scalar { - value: other, - slot: scalar_slot.clone(), - class: Some(base.clone()), - sv: sv.clone(), - }, - ); - LinkMLValue::Object { - values: child_values, - class: base.clone(), - sv: sv.clone(), - } - } - }; + let child = Self::build_mapping_entry_for_slot(sl, v, sv, conv, { + let mut p = path.clone(); + p.push(k.clone()); + p + })?; values.insert(k, child); } - Ok(LinkMLValue::Mapping { + Ok(LinkMLInstance::Mapping { + node_id: new_node_id(), values, slot: sl.clone(), class: class.clone(), sv: sv.clone(), }) } + // Preserve explicit null as a Null value for mapping-valued slot + JsonValue::Null => Ok(LinkMLInstance::Null { + node_id: new_node_id(), + slot: sl.clone(), + class: class.clone(), + sv: sv.clone(), + }), other => Err(LinkMLError(format!( "expected mapping for slot `{}`, found {:?} at {}", sl.name, @@ -397,27 +557,21 @@ impl LinkMLValue { class.name() )) })?; - let class_range: Option = sl.get_range_class(); - let slot_for_item = if class_range.is_some() { - None - } else { - Some(sl.clone()) - }; let mut values = Vec::new(); for (i, v) in arr.into_iter().enumerate() { let mut p = path.clone(); p.push(format!("[{}]", i)); - values.push(Self::from_json_internal( + values.push(Self::build_list_item_for_slot( + &sl, + Some(&class), v, - class_range.as_ref().unwrap_or(&class).clone(), - slot_for_item.clone(), sv, conv, - false, p, )?); } - Ok(LinkMLValue::List { + Ok(LinkMLInstance::List { + node_id: new_node_id(), values, slot: sl, class: Some(class), @@ -463,7 +617,8 @@ impl LinkMLValue { Self::from_json_internal(v, chosen.clone(), slot_tmp, sv, conv, false, p)?, ); } - Ok(LinkMLValue::Object { + Ok(LinkMLInstance::Object { + node_id: new_node_id(), values, class: chosen, sv: sv.clone(), @@ -485,12 +640,22 @@ impl LinkMLValue { classview_name )) })?; - Ok(LinkMLValue::Scalar { - value, - slot: sl, - class: Some(class.clone()), - sv: sv.clone(), - }) + if value.is_null() { + Ok(LinkMLInstance::Null { + node_id: new_node_id(), + slot: sl, + class: Some(class.clone()), + sv: sv.clone(), + }) + } else { + Ok(LinkMLInstance::Scalar { + node_id: new_node_id(), + value, + slot: sl, + class: Some(class.clone()), + sv: sv.clone(), + }) + } } fn from_json_internal( @@ -542,6 +707,135 @@ impl LinkMLValue { ) -> LResult { Self::from_json_internal(value, class, slot, sv, conv, inside_list, Vec::new()) } + + // Shared builders (used by loaders and patch logic) + pub(crate) fn build_list_item_for_slot( + list_slot: &SlotView, + list_class: Option<&ClassView>, + value: JsonValue, + sv: &SchemaView, + conv: &Converter, + path: Vec, + ) -> LResult { + let class_range: Option = list_slot.get_range_class(); + let slot_for_item = if class_range.is_some() { + None + } else { + Some(list_slot.clone()) + }; + let v_transformed = if let (Some(cr), JsonValue::String(s)) = (class_range.as_ref(), &value) + { + if let Some(id_slot) = cr.identifier_slot() { + let mut m = serde_json::Map::new(); + m.insert(id_slot.name.clone(), JsonValue::String(s.clone())); + JsonValue::Object(m) + } else { + value + } + } else { + value + }; + Self::from_json_internal( + v_transformed, + class_range + .as_ref() + .or(list_class) + .cloned() + .ok_or_else(|| LinkMLError("list item class context".to_string()))?, + slot_for_item, + sv, + conv, + true, + path, + ) + } + + pub(crate) fn build_mapping_entry_for_slot( + map_slot: &SlotView, + value: JsonValue, + sv: &SchemaView, + conv: &Converter, + path: Vec, + ) -> LResult { + let range_cv = map_slot + .definition() + .range + .as_ref() + .and_then(|r| sv.get_class(&Identifier::new(r), conv).ok().flatten()) + .ok_or_else(|| { + LinkMLError(format!( + "mapping slot must have class range at {}", + path_to_string(&path) + )) + })?; + match value { + JsonValue::Object(m) => { + let selected = Self::select_class(&m, &range_cv, sv, conv); + let mut child_values = HashMap::new(); + for (ck, cv) in m.into_iter() { + let slot_tmp = selected + .slots() + .iter() + .find(|s| slot_matches_key(s, &ck)) + .cloned(); + let mut p = path.clone(); + p.push(ck.clone()); + let key_name = slot_tmp + .as_ref() + .map(|s| s.name.clone()) + .unwrap_or_else(|| ck.clone()); + child_values.insert( + key_name, + Self::from_json_internal( + cv, + selected.clone(), + slot_tmp, + sv, + conv, + false, + p, + )?, + ); + } + Ok(LinkMLInstance::Object { + node_id: new_node_id(), + values: child_values, + class: selected, + sv: sv.clone(), + }) + } + other => { + let key_slot_name = range_cv + .key_or_identifier_slot() + .map(|s| s.name.as_str()) + .unwrap_or(""); + let scalar_slot = Self::find_scalar_slot_for_inlined_map(&range_cv, key_slot_name) + .ok_or_else(|| { + LinkMLError(format!( + "no scalar slot available for inlined mapping at {}", + path_to_string(&path) + )) + })?; + let mut child_values = HashMap::new(); + child_values.insert( + scalar_slot.name.clone(), + LinkMLInstance::Scalar { + node_id: new_node_id(), + value: other, + slot: scalar_slot.clone(), + class: Some(range_cv.clone()), + sv: sv.clone(), + }, + ); + Ok(LinkMLInstance::Object { + node_id: new_node_id(), + values: child_values, + class: range_cv, + sv: sv.clone(), + }) + } + } + } } pub fn load_yaml_file( @@ -549,7 +843,7 @@ pub fn load_yaml_file( sv: &SchemaView, class: &ClassView, conv: &Converter, -) -> std::result::Result> { +) -> std::result::Result> { let text = fs::read_to_string(path)?; load_yaml_str(&text, sv, class, conv) } @@ -559,10 +853,10 @@ pub fn load_yaml_str( sv: &SchemaView, class: &ClassView, conv: &Converter, -) -> std::result::Result> { +) -> std::result::Result> { let value: serde_yaml::Value = serde_yaml::from_str(data)?; let json = serde_json::to_value(value)?; - LinkMLValue::from_json(json, class.clone(), None, sv, conv, false) + LinkMLInstance::from_json(json, class.clone(), None, sv, conv, false) .map_err(|e| Box::new(e) as Box) } @@ -571,7 +865,7 @@ pub fn load_json_file( sv: &SchemaView, class: &ClassView, conv: &Converter, -) -> std::result::Result> { +) -> std::result::Result> { let text = fs::read_to_string(path)?; load_json_str(&text, sv, class, conv) } @@ -581,15 +875,15 @@ pub fn load_json_str( sv: &SchemaView, class: &ClassView, conv: &Converter, -) -> std::result::Result> { +) -> std::result::Result> { let value: JsonValue = serde_json::from_str(data)?; - LinkMLValue::from_json(value, class.clone(), None, sv, conv, false) + LinkMLInstance::from_json(value, class.clone(), None, sv, conv, false) .map_err(|e| Box::new(e) as Box) } -fn validate_inner(value: &LinkMLValue) -> std::result::Result<(), String> { +fn validate_inner(value: &LinkMLInstance) -> std::result::Result<(), String> { match value { - LinkMLValue::Scalar { + LinkMLInstance::Scalar { value: jv, slot, .. } => { if let Some(ev) = slot.get_range_enum() { @@ -618,19 +912,20 @@ fn validate_inner(value: &LinkMLValue) -> std::result::Result<(), String> { } Ok(()) } - LinkMLValue::List { values, .. } => { + LinkMLInstance::Null { .. } => Ok(()), + LinkMLInstance::List { values, .. } => { for v in values { validate_inner(v)?; } Ok(()) } - LinkMLValue::Mapping { values, .. } => { + LinkMLInstance::Mapping { values, .. } => { for v in values.values() { validate_inner(v)?; } Ok(()) } - LinkMLValue::Object { values, class, .. } => { + LinkMLInstance::Object { values, class, .. } => { for (k, v) in values { if class.slots().iter().all(|s| s.name != *k) { return Err(format!("unknown slot `{}` for class `{}`", k, class.name())); @@ -642,24 +937,25 @@ fn validate_inner(value: &LinkMLValue) -> std::result::Result<(), String> { } } -pub fn validate(value: &LinkMLValue) -> std::result::Result<(), String> { +pub fn validate(value: &LinkMLInstance) -> std::result::Result<(), String> { validate_inner(value) } -fn validate_collect(value: &LinkMLValue, errors: &mut Vec) { +fn validate_collect(value: &LinkMLInstance, errors: &mut Vec) { match value { - LinkMLValue::Scalar { .. } => {} - LinkMLValue::List { values, .. } => { + LinkMLInstance::Scalar { .. } => {} + LinkMLInstance::Null { .. } => {} + LinkMLInstance::List { values, .. } => { for v in values { validate_collect(v, errors); } } - LinkMLValue::Mapping { values, .. } => { + LinkMLInstance::Mapping { values, .. } => { for v in values.values() { validate_collect(v, errors); } } - LinkMLValue::Object { values, class, .. } => { + LinkMLInstance::Object { values, class, .. } => { for (k, v) in values { if class.slots().iter().all(|s| s.name != *k) { errors.push(format!("unknown slot `{}` for class `{}`", k, class.name())); @@ -670,7 +966,7 @@ fn validate_collect(value: &LinkMLValue, errors: &mut Vec) { } } -pub fn validate_errors(value: &LinkMLValue) -> Vec { +pub fn validate_errors(value: &LinkMLInstance) -> Vec { let mut errs = Vec::new(); validate_collect(value, &mut errs); errs diff --git a/src/runtime/src/turtle.rs b/src/runtime/src/turtle.rs index 073dcfc..ef99314 100644 --- a/src/runtime/src/turtle.rs +++ b/src/runtime/src/turtle.rs @@ -13,7 +13,7 @@ use oxttl::TurtleSerializer; use percent_encoding::{utf8_percent_encode, NON_ALPHANUMERIC}; use regex::Regex; -use crate::LinkMLValue; +use crate::LinkMLInstance; pub struct TurtleOptions { pub skolem: bool, @@ -99,7 +99,7 @@ fn literal_and_type(value: &JsonValue, slot: &SlotView) -> (String, Option, + map: &std::collections::HashMap, class: &ClassView, conv: &Converter, state: &mut State, @@ -107,7 +107,7 @@ fn identifier_node( index: Option, ) -> (Node, Option) { if let Some(id_slot) = class.identifier_slot() { - if let Some(LinkMLValue::Scalar { value, .. }) = map.get(&id_slot.name) { + if let Some(LinkMLInstance::Scalar { value, .. }) = map.get(&id_slot.name) { let lit = literal_value(value); if let Ok(iri) = Identifier::new(&lit).to_uri(conv) { return (Node::Named(iri.0), Some(id_slot.name.clone())); @@ -120,7 +120,7 @@ fn identifier_node( if let Some(p) = parent { let part_opt = class.key_or_identifier_slot().and_then(|ks| { map.get(&ks.name).and_then(|v| match v { - LinkMLValue::Scalar { value, .. } => { + LinkMLInstance::Scalar { value, .. } => { if let JsonValue::String(s) = value { Some(encode_path_part(s)) } else { @@ -146,7 +146,7 @@ fn identifier_node( #[allow(clippy::too_many_arguments)] fn serialize_map( subject: &Node, - map: &std::collections::HashMap, + map: &std::collections::HashMap, class: Option<&ClassView>, formatter: &mut WriterTurtleSerializer, _sv: &SchemaView, @@ -177,8 +177,10 @@ fn serialize_map( continue; } let skip = match v { - LinkMLValue::Scalar { slot, .. } => slot.definition().designates_type.unwrap_or(false), - LinkMLValue::List { slot, .. } => slot.definition().designates_type.unwrap_or(false), + LinkMLInstance::Scalar { slot, .. } => { + slot.definition().designates_type.unwrap_or(false) + } + LinkMLInstance::List { slot, .. } => slot.definition().designates_type.unwrap_or(false), _ => false, }; if skip { @@ -187,7 +189,7 @@ fn serialize_map( let pred_iri = format!("{}:{}", state.default_prefix, k); let predicate = NamedNode::new_unchecked(pred_iri.clone()); match v { - LinkMLValue::Scalar { value, slot, .. } => { + LinkMLInstance::Scalar { value, slot, .. } => { let inline_mode = slot.determine_slot_inline_mode(); if inline_mode == SlotInlineMode::Reference { let lit = literal_value(value); @@ -225,7 +227,10 @@ fn serialize_map( } } } - LinkMLValue::Object { values, class, .. } => { + LinkMLInstance::Null { .. } => { + // Null is treated as absent; emit nothing + } + LinkMLInstance::Object { values, class, .. } => { let class_ref = &class; let (obj, child_id) = identifier_node(values, class_ref, conv, state, Some(subject), None); @@ -246,10 +251,10 @@ fn serialize_map( child_id.as_deref(), )?; } - LinkMLValue::List { values, slot, .. } => { + LinkMLInstance::List { values, slot, .. } => { for (idx, item) in values.iter().enumerate() { match item { - LinkMLValue::Scalar { value, .. } => { + LinkMLInstance::Scalar { value, .. } => { let inline_mode = slot.determine_slot_inline_mode(); if inline_mode == SlotInlineMode::Reference { let lit = literal_value(value); @@ -288,7 +293,10 @@ fn serialize_map( } } } - LinkMLValue::Object { + LinkMLInstance::Null { .. } => { + // Skip null items + } + LinkMLInstance::Object { values: mv, class, .. } => { let class_ref = &class; @@ -317,15 +325,15 @@ fn serialize_map( child_id.as_deref(), )?; } - LinkMLValue::List { .. } => {} - LinkMLValue::Mapping { .. } => {} + LinkMLInstance::List { .. } => {} + LinkMLInstance::Mapping { .. } => {} } } } - LinkMLValue::Mapping { values, .. } => { + LinkMLInstance::Mapping { values, .. } => { for (idx, item) in values.values().enumerate() { match item { - LinkMLValue::Scalar { value: v, slot, .. } => { + LinkMLInstance::Scalar { value: v, slot, .. } => { let inline_mode = slot.determine_slot_inline_mode(); if inline_mode == SlotInlineMode::Reference { let lit = literal_value(v); @@ -364,7 +372,10 @@ fn serialize_map( } } } - LinkMLValue::Object { + LinkMLInstance::Null { .. } => { + // nothing + } + LinkMLInstance::Object { values: mv, class, .. } => { let class_ref = class; @@ -393,8 +404,8 @@ fn serialize_map( child_id.as_deref(), )?; } - LinkMLValue::List { .. } => {} - LinkMLValue::Mapping { .. } => {} + LinkMLInstance::List { .. } => {} + LinkMLInstance::Mapping { .. } => {} } } } @@ -404,7 +415,7 @@ fn serialize_map( } pub fn write_turtle( - value: &LinkMLValue, + value: &LinkMLInstance, sv: &SchemaView, schema: &SchemaDefinition, conv: &Converter, @@ -444,11 +455,11 @@ pub fn write_turtle( }; let mut formatter = TurtleSerializer::new().for_writer(Vec::new()); match value { - LinkMLValue::Object { values, class, .. } => { + LinkMLInstance::Object { values, class, .. } => { let cv = &class; let mut id_slot_name = None; let subj = if let Some(id_slot) = cv.identifier_slot() { - if let Some(LinkMLValue::Scalar { value, .. }) = values.get(&id_slot.name) { + if let Some(LinkMLInstance::Scalar { value, .. }) = values.get(&id_slot.name) { let lit = literal_value(value); let iri = Identifier::new(&lit) .to_uri(conv) @@ -473,7 +484,7 @@ pub fn write_turtle( id_slot_name.as_deref(), )?; } - LinkMLValue::Mapping { values, .. } => { + LinkMLInstance::Mapping { values, .. } => { for (idx, item) in values.values().enumerate() { let subj = if options.skolem { Node::Named(format!("{}root/{}", state.base, idx)) @@ -481,7 +492,7 @@ pub fn write_turtle( state.next_subject() }; match item { - LinkMLValue::Object { + LinkMLInstance::Object { values: mv, class, .. } => { let class = Some(class); @@ -496,7 +507,7 @@ pub fn write_turtle( None, )?; } - LinkMLValue::Scalar { value: v, slot, .. } => { + LinkMLInstance::Scalar { value: v, slot, .. } => { let (lit, dt_opt) = literal_and_type(v, slot); if let Some(dt) = dt_opt { let object = Term::Literal(Literal::new_typed_literal( @@ -523,12 +534,13 @@ pub fn write_turtle( formatter.serialize_triple(triple.as_ref())?; } } - LinkMLValue::List { .. } => {} - LinkMLValue::Mapping { .. } => {} + LinkMLInstance::Null { .. } => {} + LinkMLInstance::List { .. } => {} + LinkMLInstance::Mapping { .. } => {} } } } - LinkMLValue::List { values, .. } => { + LinkMLInstance::List { values, .. } => { for (idx, item) in values.iter().enumerate() { let subj = if options.skolem { Node::Named(format!("{}root/{}", state.base, idx)) @@ -536,7 +548,7 @@ pub fn write_turtle( state.next_subject() }; match item { - LinkMLValue::Object { + LinkMLInstance::Object { values: mv, class, .. } => { let class = Some(class); @@ -551,7 +563,7 @@ pub fn write_turtle( None, )?; } - LinkMLValue::Scalar { value, slot, .. } => { + LinkMLInstance::Scalar { value, slot, .. } => { let (lit, dt_opt) = literal_and_type(value, slot); if let Some(dt) = dt_opt { let object = Term::Literal(Literal::new_typed_literal( @@ -578,12 +590,16 @@ pub fn write_turtle( formatter.serialize_triple(triple.as_ref())?; } } - LinkMLValue::List { .. } => {} - LinkMLValue::Mapping { .. } => {} + LinkMLInstance::Null { .. } => { + // nothing + } + LinkMLInstance::List { .. } => {} + LinkMLInstance::Mapping { .. } => {} } } } - LinkMLValue::Scalar { .. } => {} + LinkMLInstance::Scalar { .. } => {} + LinkMLInstance::Null { .. } => {} } let out_buf = formatter.finish()?; let mut out = String::from_utf8(out_buf).unwrap_or_default(); @@ -606,7 +622,7 @@ pub fn write_turtle( } pub fn turtle_to_string( - value: &LinkMLValue, + value: &LinkMLInstance, sv: &SchemaView, schema: &SchemaDefinition, conv: &Converter, diff --git a/src/runtime/tests/alias.rs b/src/runtime/tests/alias.rs index 24730f3..2833ae1 100644 --- a/src/runtime/tests/alias.rs +++ b/src/runtime/tests/alias.rs @@ -33,20 +33,20 @@ fn parse_alias_fields() { println!("JSON: {:?}", v.to_json()); panic!("validation failed: {}", e); } - if let linkml_runtime::LinkMLValue::Object { values, .. } = &v { + if let linkml_runtime::LinkMLInstance::Object { values, .. } = &v { let desc = values.get("description").expect("desc"); - if let linkml_runtime::LinkMLValue::Object { values: item, .. } = desc { + if let linkml_runtime::LinkMLInstance::Object { values: item, .. } = desc { println!("json: {:?}", v.to_json()); let desc_v = item.get("alt_description_text"); assert!(desc_v.is_some(), "desc field missing"); - if let linkml_runtime::LinkMLValue::Scalar { slot, .. } = desc_v.unwrap() { + if let linkml_runtime::LinkMLInstance::Scalar { slot, .. } = desc_v.unwrap() { assert_eq!(slot.name, "alt_description_text"); } else { panic!("wrong type for description"); } let src_v = item.get("alt_description_source"); assert!(src_v.is_some(), "src field missing"); - if let linkml_runtime::LinkMLValue::Scalar { slot, .. } = src_v.unwrap() { + if let linkml_runtime::LinkMLInstance::Scalar { slot, .. } = src_v.unwrap() { assert_eq!(slot.name, "alt_description_source"); } else { panic!("wrong type for source"); diff --git a/src/runtime/tests/data/example_personinfo_data_nulls.yaml b/src/runtime/tests/data/example_personinfo_data_nulls.yaml new file mode 100644 index 0000000..0921942 --- /dev/null +++ b/src/runtime/tests/data/example_personinfo_data_nulls.yaml @@ -0,0 +1,11 @@ +objects: + - id: P:100 + objecttype: https://w3id.org/linkml/examples/personinfo/Person + name: Null Collections Person + # multivalued scalar list + aliases: null + # inlined-as-list of class instances + has_employment_history: null + # inlined-as-dict of class instances + has_familial_relationships: null + diff --git a/src/runtime/tests/diff.rs b/src/runtime/tests/diff.rs index 2df1971..b46adf4 100644 --- a/src/runtime/tests/diff.rs +++ b/src/runtime/tests/diff.rs @@ -1,4 +1,4 @@ -use linkml_runtime::{diff, load_yaml_file, patch}; +use linkml_runtime::{diff, load_json_str, load_yaml_file, patch}; use linkml_schemaview::identifier::{converter_from_schema, Identifier}; use linkml_schemaview::io::from_yaml; use linkml_schemaview::schemaview::SchemaView; @@ -57,7 +57,16 @@ fn diff_and_patch_person() { } } - let patched = patch(&src, &deltas, &sv); + let (patched, _trace) = patch( + &src, + &deltas, + &sv, + linkml_runtime::diff::PatchOptions { + ignore_no_ops: true, + treat_missing_as_null: false, + }, + ) + .unwrap(); let patched_json = patched.to_json(); let target_json = tgt.to_json(); let src_json = src.to_json(); @@ -91,9 +100,18 @@ fn diff_ignore_missing_target() { ) .unwrap(); - let deltas = diff(&src, &tgt, true); + let deltas = diff(&src, &tgt, false); assert!(deltas.is_empty()); - let patched = patch(&src, &deltas, &sv); + let (patched, _trace) = patch( + &src, + &deltas, + &sv, + linkml_runtime::diff::PatchOptions { + ignore_no_ops: true, + treat_missing_as_null: false, + }, + ) + .unwrap(); let patched_json = patched.to_json(); let src_json = src.to_json(); assert_eq!(patched_json, src_json); @@ -135,10 +153,118 @@ fn diff_and_patch_personinfo() { assert!(tgt.navigate_path(&d.path).is_some()); } } - let patched = patch(&src, &deltas, &sv); + let (patched, _trace) = patch( + &src, + &deltas, + &sv, + linkml_runtime::diff::PatchOptions { + ignore_no_ops: true, + treat_missing_as_null: false, + }, + ) + .unwrap(); assert_eq!(patched.to_json(), tgt.to_json()); } +#[test] +fn diff_null_and_missing_semantics() { + use linkml_runtime::LinkMLInstance; + let schema = from_yaml(Path::new(&data_path("schema.yaml"))).unwrap(); + let mut sv = SchemaView::new(); + sv.add_schema(schema.clone()).unwrap(); + let conv = converter_from_schema(&schema); + let class = sv + .get_class(&Identifier::new("Person"), &conv) + .unwrap() + .expect("class not found"); + + let src = load_yaml_file( + Path::new(&data_path("person_valid.yaml")), + &sv, + &class, + &conv, + ) + .unwrap(); + + // X -> null => update to null + if let LinkMLInstance::Object { .. } = src.clone() { + let mut tgt_json = src.to_json(); + if let serde_json::Value::Object(ref mut m) = tgt_json { + m.insert("age".to_string(), serde_json::Value::Null); + } + let tgt = load_json_str( + &serde_json::to_string(&tgt_json).unwrap(), + &sv, + &class, + &conv, + ) + .unwrap(); + let deltas = diff(&src, &tgt, false); + assert!(deltas + .iter() + .any(|d| d.path == vec!["age".to_string()] && d.new == Some(serde_json::Value::Null))); + } + + // null -> X => update from null + if let LinkMLInstance::Object { .. } = src.clone() { + let mut src_json = src.to_json(); + if let serde_json::Value::Object(ref mut m) = src_json { + m.insert("age".to_string(), serde_json::Value::Null); + } + let src_with_null = load_json_str( + &serde_json::to_string(&src_json).unwrap(), + &sv, + &class, + &conv, + ) + .unwrap(); + let deltas = diff(&src_with_null, &src, false); + assert!(deltas.iter().any(|d| d.path == vec!["age".to_string()] + && d.old == Some(serde_json::Value::Null) + && d.new.is_some())); + } + + // missing -> X => add + if let LinkMLInstance::Object { .. } = src.clone() { + let mut src_json = src.to_json(); + if let serde_json::Value::Object(ref mut m) = src_json { + m.remove("age"); + } + let src_missing = load_json_str( + &serde_json::to_string(&src_json).unwrap(), + &sv, + &class, + &conv, + ) + .unwrap(); + let deltas = diff(&src_missing, &src, false); + assert!(deltas + .iter() + .any(|d| d.path == vec!["age".to_string()] && d.old.is_none() && d.new.is_some())); + } + + // X -> missing: ignored by default; produce update-to-null when treat_missing_as_null=true + if let LinkMLInstance::Object { .. } = src.clone() { + let mut tgt_json = src.to_json(); + if let serde_json::Value::Object(ref mut m) = tgt_json { + m.remove("age"); + } + let tgt_missing = load_json_str( + &serde_json::to_string(&tgt_json).unwrap(), + &sv, + &class, + &conv, + ) + .unwrap(); + let deltas = diff(&src, &tgt_missing, false); + assert!(deltas.iter().all(|d| d.path != vec!["age".to_string()])); + let deltas2 = diff(&src, &tgt_missing, true); + assert!(deltas2 + .iter() + .any(|d| d.path == vec!["age".to_string()] && d.new == Some(serde_json::Value::Null))) + } +} + #[test] fn personinfo_invalid_fails() { let schema = from_yaml(Path::new(&info_path("personinfo.yaml"))).unwrap(); diff --git a/src/runtime/tests/diff_identifier.rs b/src/runtime/tests/diff_identifier.rs new file mode 100644 index 0000000..330a3e3 --- /dev/null +++ b/src/runtime/tests/diff_identifier.rs @@ -0,0 +1,283 @@ +use linkml_runtime::{diff, load_json_str, load_yaml_file, patch}; +use linkml_schemaview::identifier::{converter_from_schema, Identifier}; +use linkml_schemaview::io::from_yaml; +use linkml_schemaview::schemaview::SchemaView; +use serde_json::Value as JsonValue; +use std::path::{Path, PathBuf}; + +fn data_path(name: &str) -> PathBuf { + let mut p = PathBuf::from(env!("CARGO_MANIFEST_DIR")); + p.push("tests"); + p.push("data"); + p.push(name); + p +} + +#[test] +fn single_inlined_object_identifier_change_is_replacement() { + // Use personinfo schema; diagnosis is an inlined object with identifier (via NamedThing) + let schema = from_yaml(Path::new(&data_path("personinfo.yaml"))).unwrap(); + let mut sv = SchemaView::new(); + sv.add_schema(schema.clone()).unwrap(); + let conv = converter_from_schema(&schema); + let container = sv + .get_class(&Identifier::new("Container"), &conv) + .unwrap() + .expect("class not found"); + + let src = load_yaml_file( + Path::new(&data_path("example_personinfo_data.yaml")), + &sv, + &container, + &conv, + ) + .unwrap(); + + // Modify diagnosis.id of the first medical history event for P:002 + let mut tgt_json = src.to_json(); + if let JsonValue::Object(ref mut root) = tgt_json { + if let Some(JsonValue::Array(objects)) = root.get_mut("objects") { + if let Some(JsonValue::Object(p2)) = objects.get_mut(2) { + if let Some(JsonValue::Array(mh)) = p2.get_mut("has_medical_history") { + if let Some(JsonValue::Object(ev0)) = mh.get_mut(0) { + if let Some(JsonValue::Object(diag)) = ev0.get_mut("diagnosis") { + diag.insert( + "id".to_string(), + JsonValue::String("CODE:D9999".to_string()), + ); + } + } + } + } + } + } + let tgt = load_json_str( + &serde_json::to_string(&tgt_json).unwrap(), + &sv, + &container, + &conv, + ) + .unwrap(); + + let deltas = diff(&src, &tgt, false); + // Expect a single replacement at the diagnosis object path + assert_eq!(deltas.len(), 1); + let d = &deltas[0]; + assert_eq!( + d.path, + vec![ + "objects".to_string(), + "P:002".to_string(), + "has_medical_history".to_string(), + "0".to_string(), + "diagnosis".to_string() + ] + ); + assert!(d.old.is_some() && d.new.is_some()); + + // Patch should yield target + let (patched, _trace) = patch( + &src, + &deltas, + &sv, + linkml_runtime::diff::PatchOptions { + ignore_no_ops: true, + treat_missing_as_null: false, + }, + ) + .unwrap(); + assert_eq!(patched.to_json(), tgt.to_json()); +} + +#[test] +fn single_inlined_object_non_identifier_change_is_field_delta() { + let schema = from_yaml(Path::new(&data_path("personinfo.yaml"))).unwrap(); + let mut sv = SchemaView::new(); + sv.add_schema(schema.clone()).unwrap(); + let conv = converter_from_schema(&schema); + let container = sv + .get_class(&Identifier::new("Container"), &conv) + .unwrap() + .expect("class not found"); + + let src = load_yaml_file( + Path::new(&data_path("example_personinfo_data.yaml")), + &sv, + &container, + &conv, + ) + .unwrap(); + + // Modify diagnosis.name only + let mut tgt_json = src.to_json(); + if let JsonValue::Object(ref mut root) = tgt_json { + if let Some(JsonValue::Array(objects)) = root.get_mut("objects") { + if let Some(JsonValue::Object(p2)) = objects.get_mut(2) { + if let Some(JsonValue::Array(mh)) = p2.get_mut("has_medical_history") { + if let Some(JsonValue::Object(ev0)) = mh.get_mut(0) { + if let Some(JsonValue::Object(diag)) = ev0.get_mut("diagnosis") { + diag.insert( + "name".to_string(), + JsonValue::String("new name".to_string()), + ); + } + } + } + } + } + } + let tgt = load_json_str( + &serde_json::to_string(&tgt_json).unwrap(), + &sv, + &container, + &conv, + ) + .unwrap(); + + let deltas = diff(&src, &tgt, false); + assert!(deltas.iter().any(|d| d.path + == vec![ + "objects".to_string(), + "P:002".to_string(), + "has_medical_history".to_string(), + "0".to_string(), + "diagnosis".to_string(), + "name".to_string() + ])); + // Must not collapse to whole-object replacement here + assert!(!deltas.iter().any(|d| d.path + == vec![ + "objects".to_string(), + "P:002".to_string(), + "has_medical_history".to_string(), + "0".to_string(), + "diagnosis".to_string() + ])); + + let (patched, _trace) = patch( + &src, + &deltas, + &sv, + linkml_runtime::diff::PatchOptions { + ignore_no_ops: true, + treat_missing_as_null: false, + }, + ) + .unwrap(); + assert_eq!(patched.to_json(), tgt.to_json()); +} + +#[test] +fn list_inlined_object_identifier_change_is_replacement() { + let schema = from_yaml(Path::new(&data_path("personinfo.yaml"))).unwrap(); + let mut sv = SchemaView::new(); + sv.add_schema(schema.clone()).unwrap(); + let conv = converter_from_schema(&schema); + let container = sv + .get_class(&Identifier::new("Container"), &conv) + .unwrap() + .expect("class not found"); + + let src = load_yaml_file( + Path::new(&data_path("example_personinfo_data.yaml")), + &sv, + &container, + &conv, + ) + .unwrap(); + + // Change the id of the third object (P:002) + let mut tgt_json = src.to_json(); + if let JsonValue::Object(ref mut root) = tgt_json { + if let Some(JsonValue::Array(objects)) = root.get_mut("objects") { + if let Some(JsonValue::Object(p2)) = objects.get_mut(2) { + p2.insert("id".to_string(), JsonValue::String("P:099".to_string())); + } + } + } + let tgt = load_json_str( + &serde_json::to_string(&tgt_json).unwrap(), + &sv, + &container, + &conv, + ) + .unwrap(); + + let deltas = diff(&src, &tgt, false); + // Expect a single replacement at the list item path + assert!(deltas.iter().any(|d| { + d.path == vec!["objects".to_string(), "P:002".to_string()] + || d.path == vec!["objects".to_string(), "P:099".to_string()] + })); + assert!(!deltas + .iter() + .any(|d| { d.path == vec!["objects".to_string(), "P:002".to_string(), "id".to_string()] })); + + let (patched, _trace) = patch( + &src, + &deltas, + &sv, + linkml_runtime::diff::PatchOptions { + ignore_no_ops: true, + treat_missing_as_null: false, + }, + ) + .unwrap(); + assert_eq!(patched.to_json(), tgt.to_json()); +} + +#[test] +fn mapping_inlined_identifier_change_is_add_delete() { + // Use mapping schema with inlined_as_dict keyed by 'key' + let schema = from_yaml(Path::new(&data_path("mapping_schema.yaml"))).unwrap(); + let mut sv = SchemaView::new(); + sv.add_schema(schema.clone()).unwrap(); + let conv = converter_from_schema(&schema); + let bag = sv + .get_class(&Identifier::new("Bag"), &conv) + .unwrap() + .expect("class not found"); + + let src = linkml_runtime::load_json_file( + Path::new(&data_path("mapping_data.json")), + &sv, + &bag, + &conv, + ) + .unwrap(); + + // Rename mapping key 'alpha' to 'alpha2' + let mut tgt_json = src.to_json(); + if let JsonValue::Object(ref mut root) = tgt_json { + if let Some(JsonValue::Object(things)) = root.get_mut("things") { + if let Some(alpha) = things.remove("alpha") { + things.insert("alpha2".to_string(), alpha); + } + } + } + let tgt = load_json_str(&serde_json::to_string(&tgt_json).unwrap(), &sv, &bag, &conv).unwrap(); + + let deltas = diff(&src, &tgt, false); + // Expect one delete and one add at mapping keys; no inner key-slot deltas + assert!(deltas + .iter() + .any(|d| d.path == vec!["things".to_string(), "alpha".to_string()] && d.new.is_none())); + assert!(deltas + .iter() + .any(|d| d.path == vec!["things".to_string(), "alpha2".to_string()] && d.old.is_none())); + assert!(!deltas + .iter() + .any(|d| d.path == vec!["things".to_string(), "alpha".to_string(), "key".to_string()])); + + let (patched, _trace) = patch( + &src, + &deltas, + &sv, + linkml_runtime::diff::PatchOptions { + ignore_no_ops: true, + treat_missing_as_null: false, + }, + ) + .unwrap(); + assert_eq!(patched.to_json(), tgt.to_json()); +} diff --git a/src/runtime/tests/enum.rs b/src/runtime/tests/enum.rs index 6f2ffd9..0d7d158 100644 --- a/src/runtime/tests/enum.rs +++ b/src/runtime/tests/enum.rs @@ -1,4 +1,4 @@ -use linkml_runtime::{load_yaml_file, validate, LinkMLValue}; +use linkml_runtime::{load_yaml_file, validate, LinkMLInstance}; use linkml_schemaview::identifier::{converter_from_schema, Identifier}; use linkml_schemaview::io::from_yaml; use linkml_schemaview::schemaview::SchemaView; @@ -33,10 +33,10 @@ fn enum_valid_value() { assert!(validate(&v).is_ok()); // Sanity check parsed value shape - if let LinkMLValue::Object { values, .. } = v { + if let LinkMLInstance::Object { values, .. } = v { let status = values.get("status").expect("status not found"); match status { - LinkMLValue::Scalar { value, .. } => { + LinkMLInstance::Scalar { value, .. } => { assert_eq!(value.as_str(), Some("active")); } _ => panic!("expected scalar for status"), diff --git a/src/runtime/tests/equality.rs b/src/runtime/tests/equality.rs new file mode 100644 index 0000000..7e1dfa3 --- /dev/null +++ b/src/runtime/tests/equality.rs @@ -0,0 +1,180 @@ +use linkml_runtime::{load_json_str, load_yaml_str, LinkMLInstance}; +use linkml_schemaview::identifier::converter_from_schema; +use linkml_schemaview::io::from_yaml; +use linkml_schemaview::schemaview::SchemaView; +use std::path::Path; + +fn data_path(name: &str) -> std::path::PathBuf { + let mut p = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")); + p.push("tests"); + p.push("data"); + p.push(name); + p +} + +#[test] +fn object_equality_ignores_null_assignments() { + // Load personinfo schema and Container class + let schema = from_yaml(Path::new(&data_path("personinfo.yaml"))).unwrap(); + let mut sv = SchemaView::new(); + sv.add_schema(schema.clone()).unwrap(); + let conv = converter_from_schema(&schema); + let container = sv + .get_class( + &linkml_schemaview::identifier::Identifier::new("Container"), + &conv, + ) + .unwrap() + .expect("class not found"); + + let doc_with_null = r#" +objects: + - objecttype: personinfo:Person + id: "P:1" + name: "Alice" + current_address: null +"#; + let doc_without_slot = r#" +objects: + - objecttype: personinfo:Person + id: "P:1" + name: "Alice" +"#; + let v1 = load_yaml_str(doc_with_null, &sv, &container, &conv).unwrap(); + let v2 = load_yaml_str(doc_without_slot, &sv, &container, &conv).unwrap(); + let p1 = v1.navigate_path(["objects", "0"]).unwrap(); + let p2 = v2.navigate_path(["objects", "0"]).unwrap(); + assert!( + p1.equals(p2, true), + "Person with null assignment should equal omission" + ); +} + +#[test] +fn list_identity_is_order_sensitive() { + let schema = from_yaml(Path::new(&data_path("personinfo.yaml"))).unwrap(); + let mut sv = SchemaView::new(); + sv.add_schema(schema.clone()).unwrap(); + let conv = converter_from_schema(&schema); + let container = sv + .get_class( + &linkml_schemaview::identifier::Identifier::new("Container"), + &conv, + ) + .unwrap() + .expect("class not found"); + + let doc_a = r#" +objects: + - objecttype: personinfo:Person + id: "P:1" + name: "Alice" + has_employment_history: + - started_at_time: 2019-01-01 + is_current: true + - started_at_time: 2020-01-01 + is_current: false +"#; + let doc_b = r#" +objects: + - objecttype: personinfo:Person + id: "P:1" + name: "Alice" + has_employment_history: + - started_at_time: 2020-01-01 + is_current: false + - started_at_time: 2019-01-01 + is_current: true +"#; + let v1 = load_yaml_str(doc_a, &sv, &container, &conv).unwrap(); + let v2 = load_yaml_str(doc_b, &sv, &container, &conv).unwrap(); + let p1 = v1.navigate_path(["objects", "0"]).unwrap(); + let p2 = v2.navigate_path(["objects", "0"]).unwrap(); + assert!(matches!(p1, LinkMLInstance::Object { .. })); + assert!(matches!(p2, LinkMLInstance::Object { .. })); + assert!(!p1.equals(p2, true), "List order must affect equality"); +} + +#[test] +fn mapping_equality_is_key_based_not_ordered() { + // Load mapping schema and Bag class + let schema = from_yaml(Path::new(&data_path("mapping_schema.yaml"))).unwrap(); + let mut sv = SchemaView::new(); + sv.add_schema(schema.clone()).unwrap(); + let conv = converter_from_schema(&schema); + let bag = sv + .get_class( + &linkml_schemaview::identifier::Identifier::new("Bag"), + &conv, + ) + .unwrap() + .expect("class not found"); + + let doc1 = r#"{ + "things": { + "alpha": {"typeURI": "ThingA", "a_only": "foo", "common": "shared"}, + "beta": {"typeURI": "ThingB", "b_only": true, "common": "shared"} + } +}"#; + let doc2 = r#"{ + "things": { + "beta": {"typeURI": "ThingB", "b_only": true, "common": "shared"}, + "alpha": {"typeURI": "ThingA", "a_only": "foo", "common": "shared"} + } +}"#; + let v1 = load_json_str(doc1, &sv, &bag, &conv).unwrap(); + let v2 = load_json_str(doc2, &sv, &bag, &conv).unwrap(); + let m1 = v1.navigate_path(["things"]).unwrap(); + let m2 = v2.navigate_path(["things"]).unwrap(); + assert!(matches!(m1, LinkMLInstance::Mapping { .. })); + assert!(matches!(m2, LinkMLInstance::Mapping { .. })); + assert!( + m1.equals(m2, true), + "Mapping equality should ignore key order" + ); +} + +#[test] +fn enum_scalar_equality_respects_value_and_range() { + let schema = from_yaml(Path::new(&data_path("personinfo.yaml"))).unwrap(); + let mut sv = SchemaView::new(); + sv.add_schema(schema.clone()).unwrap(); + let conv = converter_from_schema(&schema); + let container = sv + .get_class( + &linkml_schemaview::identifier::Identifier::new("Container"), + &conv, + ) + .unwrap() + .expect("class not found"); + + let doc1 = r#" +objects: + - objecttype: personinfo:Person + id: "P:1" + name: "Alice" + gender: "cisgender man" +"#; + let doc2 = r#" +objects: + - objecttype: personinfo:Person + id: "P:2" + name: "Bob" + gender: "cisgender man" +"#; + let doc3 = r#" +objects: + - objecttype: personinfo:Person + id: "P:3" + name: "Carol" + gender: "cisgender woman" +"#; + let v1 = load_yaml_str(doc1, &sv, &container, &conv).unwrap(); + let v2 = load_yaml_str(doc2, &sv, &container, &conv).unwrap(); + let v3 = load_yaml_str(doc3, &sv, &container, &conv).unwrap(); + let g1 = v1.navigate_path(["objects", "0", "gender"]).unwrap(); + let g2 = v2.navigate_path(["objects", "0", "gender"]).unwrap(); + let g3 = v3.navigate_path(["objects", "0", "gender"]).unwrap(); + assert!(g1.equals(g2, true)); + assert!(!g1.equals(g3, true)); +} diff --git a/src/runtime/tests/inlined_mapping_subclass.rs b/src/runtime/tests/inlined_mapping_subclass.rs index e16803a..1d3752e 100644 --- a/src/runtime/tests/inlined_mapping_subclass.rs +++ b/src/runtime/tests/inlined_mapping_subclass.rs @@ -1,4 +1,4 @@ -use linkml_runtime::{load_json_file, validate, LinkMLValue}; +use linkml_runtime::{load_json_file, validate, LinkMLInstance}; use linkml_schemaview::identifier::{converter_from_schema, Identifier}; use linkml_schemaview::io::from_yaml; use linkml_schemaview::schemaview::SchemaView; @@ -34,16 +34,16 @@ fn inlined_mapping_selects_subclass_by_typeuri() { // Ensure inlined mapping children select subclasses based on typeURI match v { - LinkMLValue::Object { values, .. } => { + LinkMLInstance::Object { values, .. } => { let things = values.get("things").expect("things slot missing"); match things { - LinkMLValue::Mapping { values, .. } => { + LinkMLInstance::Mapping { values, .. } => { match values.get("alpha").expect("alpha missing") { - LinkMLValue::Object { class, .. } => assert_eq!(class.name(), "ThingA"), + LinkMLInstance::Object { class, .. } => assert_eq!(class.name(), "ThingA"), _ => panic!("alpha should be an object"), } match values.get("beta").expect("beta missing") { - LinkMLValue::Object { class, .. } => assert_eq!(class.name(), "ThingB"), + LinkMLInstance::Object { class, .. } => assert_eq!(class.name(), "ThingB"), _ => panic!("beta should be an object"), } } diff --git a/src/runtime/tests/navigate.rs b/src/runtime/tests/navigate.rs index b4e18aa..da4dc5f 100644 --- a/src/runtime/tests/navigate.rs +++ b/src/runtime/tests/navigate.rs @@ -31,7 +31,7 @@ fn navigate_basic() { .unwrap(); // Map root should have key 'objects' match &v { - linkml_runtime::LinkMLValue::Object { values, .. } => { + linkml_runtime::LinkMLInstance::Object { values, .. } => { assert!(values.contains_key("objects")); let inner = v.navigate_path([ "objects", diff --git a/src/runtime/tests/polymorphic.rs b/src/runtime/tests/polymorphic.rs index c0c5f43..5652365 100644 --- a/src/runtime/tests/polymorphic.rs +++ b/src/runtime/tests/polymorphic.rs @@ -1,4 +1,4 @@ -use linkml_runtime::LinkMLValue; +use linkml_runtime::LinkMLInstance; use linkml_runtime::{load_yaml_file, validate}; use linkml_schemaview::identifier::{converter_from_schema, Identifier}; use linkml_schemaview::io::from_yaml; @@ -105,20 +105,20 @@ fn array_polymorphism() { .expect("class not found"); let v = load_yaml_file(Path::new(&data_path("poly_array.yaml")), &sv, &class, &conv).unwrap(); assert!(validate(&v).is_ok()); - if let LinkMLValue::Object { values, .. } = v { + if let LinkMLInstance::Object { values, .. } = v { let objs = values.get("objs").expect("objs not found"); - if let LinkMLValue::List { values: arr, .. } = objs { + if let LinkMLInstance::List { values: arr, .. } = objs { assert_eq!(arr.len(), 3); match &arr[0] { - LinkMLValue::Object { class, .. } => assert_eq!(class.name(), "Child"), + LinkMLInstance::Object { class, .. } => assert_eq!(class.name(), "Child"), _ => panic!("expected map"), } match &arr[1] { - LinkMLValue::Object { class, .. } => assert_eq!(class.name(), "Child"), + LinkMLInstance::Object { class, .. } => assert_eq!(class.name(), "Child"), _ => panic!("expected map"), } match &arr[2] { - LinkMLValue::Object { class, .. } => assert_eq!(class.name(), "Parent"), + LinkMLInstance::Object { class, .. } => assert_eq!(class.name(), "Parent"), _ => panic!("expected map"), } } else { diff --git a/src/runtime/tests/trace.rs b/src/runtime/tests/trace.rs new file mode 100644 index 0000000..13ccbfc --- /dev/null +++ b/src/runtime/tests/trace.rs @@ -0,0 +1,228 @@ +use linkml_runtime::{diff, load_json_str, load_yaml_file}; +use linkml_schemaview::identifier::{converter_from_schema, Identifier}; +use linkml_schemaview::io::from_yaml; +use linkml_schemaview::schemaview::SchemaView; +use std::collections::HashSet; +use std::path::{Path, PathBuf}; + +fn data_path(name: &str) -> PathBuf { + let mut p = PathBuf::from(env!("CARGO_MANIFEST_DIR")); + p.push("tests"); + p.push("data"); + p.push(name); + p +} + +fn info_path(name: &str) -> PathBuf { + let mut p = PathBuf::from(env!("CARGO_MANIFEST_DIR")); + p.push("tests"); + p.push("data"); + p.push(name); + p +} + +fn collect_ids(v: &linkml_runtime::LinkMLInstance, out: &mut Vec) { + out.push(v.node_id()); + match v { + linkml_runtime::LinkMLInstance::Scalar { .. } => {} + linkml_runtime::LinkMLInstance::Null { .. } => {} + linkml_runtime::LinkMLInstance::List { values, .. } => { + for c in values { + collect_ids(c, out); + } + } + linkml_runtime::LinkMLInstance::Mapping { values, .. } + | linkml_runtime::LinkMLInstance::Object { values, .. } => { + for c in values.values() { + collect_ids(c, out); + } + } + } +} + +#[test] +fn node_ids_preserved_scalar_update() { + let schema = from_yaml(Path::new(&data_path("schema.yaml"))).unwrap(); + let mut sv = SchemaView::new(); + sv.add_schema(schema.clone()).unwrap(); + let conv = converter_from_schema(&schema); + let class = sv + .get_class(&Identifier::new("Person"), &conv) + .unwrap() + .expect("class not found"); + let src = load_yaml_file( + Path::new(&data_path("person_valid.yaml")), + &sv, + &class, + &conv, + ) + .unwrap(); + let mut tgt_json = src.to_json(); + if let serde_json::Value::Object(ref mut m) = tgt_json { + m.insert("age".to_string(), serde_json::json!(99)); + } + let tgt = load_json_str( + &serde_json::to_string(&tgt_json).unwrap(), + &sv, + &class, + &conv, + ) + .unwrap(); + + let deltas = diff(&src, &tgt, false); + let (patched, trace) = linkml_runtime::patch( + &src, + &deltas, + &sv, + linkml_runtime::diff::PatchOptions { + ignore_no_ops: true, + treat_missing_as_null: false, + }, + ) + .unwrap(); + + assert!(trace.added.is_empty()); + assert!(trace.deleted.is_empty()); + assert!(!trace.updated.is_empty()); + + let src_age = src.navigate_path(["age"]).unwrap(); + let pat_age = patched.navigate_path(["age"]).unwrap(); + assert_eq!(src_age.node_id(), pat_age.node_id()); + assert!(trace.updated.contains(&pat_age.node_id())); +} + +#[test] +fn patch_trace_add_in_list() { + let schema = from_yaml(Path::new(&info_path("personinfo.yaml"))).unwrap(); + let mut sv = SchemaView::new(); + sv.add_schema(schema.clone()).unwrap(); + let conv = converter_from_schema(&schema); + let container = sv + .get_class(&Identifier::new("Container"), &conv) + .unwrap() + .expect("class not found"); + let base = load_yaml_file( + Path::new(&info_path("example_personinfo_data.yaml")), + &sv, + &container, + &conv, + ) + .unwrap(); + + // Add a new object to the 'objects' list + let mut base_json = base.to_json(); + if let serde_json::Value::Object(ref mut root) = base_json { + if let Some(serde_json::Value::Array(ref mut arr)) = root.get_mut("objects") { + let new_obj = serde_json::json!({ + "id": "P:999", + "name": "Added Person", + "objecttype": "https://w3id.org/linkml/examples/personinfo/Person" + }); + arr.push(new_obj); + } + } + let target = load_json_str( + &serde_json::to_string(&base_json).unwrap(), + &sv, + &container, + &conv, + ) + .unwrap(); + + let deltas = diff(&base, &target, false); + let mut pre = Vec::new(); + collect_ids(&base, &mut pre); + let (patched, trace) = linkml_runtime::patch( + &base, + &deltas, + &sv, + linkml_runtime::diff::PatchOptions { + ignore_no_ops: true, + treat_missing_as_null: false, + }, + ) + .unwrap(); + let mut post = Vec::new(); + collect_ids(&patched, &mut post); + + let pre_set: HashSet = pre.into_iter().collect(); + let post_set: HashSet = post.into_iter().collect(); + let added: HashSet = post_set.difference(&pre_set).copied().collect(); + let trace_added: HashSet = trace.added.iter().copied().collect(); + assert_eq!(added, trace_added); + assert!(!added.is_empty()); +} + +#[test] +fn patch_missing_to_null_semantics() { + // Use simple schema + let schema = from_yaml(Path::new(&data_path("schema.yaml"))).unwrap(); + let mut sv = SchemaView::new(); + sv.add_schema(schema.clone()).unwrap(); + let conv = converter_from_schema(&schema); + let class = sv + .get_class(&Identifier::new("Person"), &conv) + .unwrap() + .expect("class not found"); + + let src = load_yaml_file( + Path::new(&data_path("person_partial.yaml")), + &sv, + &class, + &conv, + ) + .unwrap(); + // Build delta: set age to explicit null + let deltas = vec![linkml_runtime::Delta { + path: vec!["age".to_string()], + old: None, + new: Some(serde_json::Value::Null), + }]; + + // treat_missing_as_null = true => no-op; no trace changes, no node id changes + let pre_id = src.node_id(); + let (patched_same, trace_same) = linkml_runtime::patch( + &src, + &deltas, + &sv, + linkml_runtime::diff::PatchOptions { + ignore_no_ops: true, + treat_missing_as_null: true, + }, + ) + .unwrap(); + assert!( + trace_same.added.is_empty() + && trace_same.deleted.is_empty() + && trace_same.updated.is_empty() + ); + assert_eq!(pre_id, patched_same.node_id()); + // Equality under treat_missing_as_null=true must hold + assert!(src.equals(&patched_same, true)); + // And age remains absent (since explicit null is treated as omitted) + if let linkml_runtime::LinkMLInstance::Object { values, .. } = &patched_same { + assert!(!values.contains_key("age")); + } + + // treat_missing_as_null = false => apply explicit null + let (patched_null, trace_applied) = linkml_runtime::patch( + &src, + &deltas, + &sv, + linkml_runtime::diff::PatchOptions { + ignore_no_ops: true, + treat_missing_as_null: false, + }, + ) + .unwrap(); + assert!(trace_applied.updated.contains(&patched_null.node_id())); + // age present as Null + if let linkml_runtime::LinkMLInstance::Object { values, .. } = &patched_null { + assert!(matches!( + values.get("age"), + Some(linkml_runtime::LinkMLInstance::Null { .. }) + )); + } else { + panic!("expected object root"); + } +} diff --git a/src/runtime/tests/validation.rs b/src/runtime/tests/validation.rs index b91163a..1cd9e1b 100644 --- a/src/runtime/tests/validation.rs +++ b/src/runtime/tests/validation.rs @@ -51,3 +51,52 @@ fn validate_personinfo_example2() { .unwrap(); assert!(validate(&v).is_ok()); } + +#[test] +fn validate_personinfo_null_collections() { + let schema = from_yaml(Path::new(&info_path("personinfo.yaml"))).unwrap(); + let mut sv = SchemaView::new(); + sv.add_schema(schema.clone()).unwrap(); + let conv = converter_from_schema(&schema); + let container = sv + .get_class(&Identifier::new("Container"), &conv) + .unwrap() + .expect("class not found"); + let v = load_yaml_file( + Path::new(&info_path("example_personinfo_data_nulls.yaml")), + &sv, + &container, + &conv, + ) + .unwrap(); + assert!(validate(&v).is_ok()); + // Assert that nulls are preserved as LinkMLInstance::Null (not empty collections) + if let linkml_runtime::LinkMLInstance::Object { values, .. } = &v { + if let Some(linkml_runtime::LinkMLInstance::List { values: objs, .. }) = + values.get("objects") + { + if let Some(linkml_runtime::LinkMLInstance::Object { values: person, .. }) = + objs.first() + { + assert!(matches!( + person.get("aliases"), + Some(linkml_runtime::LinkMLInstance::Null { .. }) + )); + assert!(matches!( + person.get("has_employment_history"), + Some(linkml_runtime::LinkMLInstance::Null { .. }) + )); + assert!(matches!( + person.get("has_familial_relationships"), + Some(linkml_runtime::LinkMLInstance::Null { .. }) + )); + } else { + panic!("expected first object to be an Object"); + } + } else { + panic!("expected Container.objects to be a List"); + } + } else { + panic!("expected root to be an Object"); + } +} diff --git a/src/schemaview/src/classview.rs b/src/schemaview/src/classview.rs index be3878b..c692f85 100644 --- a/src/schemaview/src/classview.rs +++ b/src/schemaview/src/classview.rs @@ -90,6 +90,7 @@ impl ClassView { } if let Some(cu) = &class_def.slot_usage { if let Some(usage) = cu.get(slot_ref) { + slot_schema_uri = schema_uri.to_owned(); defs.push(*usage.clone()); } } diff --git a/src/schemaview/src/schemaview.rs b/src/schemaview/src/schemaview.rs index 4a59bfe..0728bbc 100644 --- a/src/schemaview/src/schemaview.rs +++ b/src/schemaview/src/schemaview.rs @@ -228,6 +228,12 @@ impl SchemaView { self.data.schema_definitions.iter() } + /// Returns a converter built from every schema loaded into this view. + /// + /// Note that prefix collisions across schemas will resolve to whichever + /// expansion appears last; avoid this helper if you expect conflicting + /// CURIE mappings and instead use `converter_for_schema` with a specific + /// schema URI. pub fn converter(&self) -> Converter { converter_from_schemas(self.data.schema_definitions.values()) } diff --git a/src/schemaview/src/slotview.rs b/src/schemaview/src/slotview.rs index d432a38..ff92bdc 100644 --- a/src/schemaview/src/slotview.rs +++ b/src/schemaview/src/slotview.rs @@ -53,22 +53,32 @@ impl RangeInfo { e: &SlotExpressionOrSubtype, slotview: &SlotView, ) -> Option { - let conv = slotview.sv.converter_for_schema(&slotview.schema_uri)?; e.range().and_then(|r| { + if let Some(conv) = slotview.sv.converter_for_schema(&slotview.schema_uri) { + if let Ok(Some(cv)) = slotview.sv.get_class(&Identifier::new(r), conv) { + return Some(cv); + } + } + let conv = slotview.sv.converter(); slotview .sv - .get_class(&Identifier::new(r), conv) + .get_class(&Identifier::new(r), &conv) .ok() .flatten() }) } fn determine_range_enum(e: &SlotExpressionOrSubtype, slotview: &SlotView) -> Option { - let conv = slotview.sv.converter_for_schema(&slotview.schema_uri)?; e.range().and_then(|r| { + if let Some(conv) = slotview.sv.converter_for_schema(&slotview.schema_uri) { + if let Ok(Some(ev)) = slotview.sv.get_enum(&Identifier::new(r), conv) { + return Some(ev); + } + } + let conv = slotview.sv.converter(); slotview .sv - .get_enum(&Identifier::new(r), conv) + .get_enum(&Identifier::new(r), &conv) .ok() .flatten() }) @@ -196,6 +206,18 @@ impl SlotView { let mut b = self.data.definitions[0].clone(); for d in self.data.definitions.iter().skip(1) { b.merge_with(d); + // the merge crate only provides `option::overwrite_none`, so specialized + // slot_usage ranges would be dropped without manually copying them here; + // replace once we have an official overwrite_except_none strategy upstream + if let Some(range) = &d.range { + b.range = Some(range.clone()); + } + if let Some(expr) = &d.range_expression { + b.range_expression = Some(expr.clone()); + } + if let Some(enum_range) = &d.enum_range { + b.enum_range = Some(enum_range.clone()); + } } b }) diff --git a/src/schemaview/tests/data/slot_usage_base.yaml b/src/schemaview/tests/data/slot_usage_base.yaml new file mode 100644 index 0000000..3e71135 --- /dev/null +++ b/src/schemaview/tests/data/slot_usage_base.yaml @@ -0,0 +1,15 @@ +id: http://example.org/base +name: base +prefixes: + base: http://example.org/base/ +default_prefix: base +default_range: string + +classes: + BaseThing: + slots: + - shared_slot + +slots: + shared_slot: + range: string diff --git a/src/schemaview/tests/data/slot_usage_specialized.yaml b/src/schemaview/tests/data/slot_usage_specialized.yaml new file mode 100644 index 0000000..8d07a5c --- /dev/null +++ b/src/schemaview/tests/data/slot_usage_specialized.yaml @@ -0,0 +1,26 @@ +id: http://example.org/specialized +name: specialized +prefixes: + specialized: http://example.org/specialized/ + base: http://example.org/base/ +default_prefix: specialized +default_range: string +imports: + - http://example.org/base + +classes: + TargetClass: + slots: + - target_slot + + SpecializedThing: + is_a: base:BaseThing + slots: + - shared_slot + slot_usage: + shared_slot: + range: specialized:TargetClass + +slots: + target_slot: + range: string diff --git a/src/schemaview/tests/slot_view.rs b/src/schemaview/tests/slot_view.rs index 084f7be..de2c3f8 100644 --- a/src/schemaview/tests/slot_view.rs +++ b/src/schemaview/tests/slot_view.rs @@ -41,3 +41,47 @@ fn slot_lookup_and_class_slots() { assert_eq!(map.get("symbol"), Some(&1usize)); assert_eq!(map.get("exact mappings"), Some(&2usize)); } + +#[test] +fn slot_usage_overrides_range_across_schemas() { + let base_schema = from_yaml(Path::new(&data_path("slot_usage_base.yaml"))).unwrap(); + let specialized_schema = + from_yaml(Path::new(&data_path("slot_usage_specialized.yaml"))).unwrap(); + + let mut sv = SchemaView::new(); + sv.add_schema(base_schema.clone()).unwrap(); + sv.add_schema(specialized_schema.clone()).unwrap(); + + let conv = converter_from_schemas([&base_schema, &specialized_schema]); + + let base_class = sv + .get_class(&Identifier::new("base:BaseThing"), &conv) + .unwrap() + .unwrap(); + let base_slot = base_class + .slots() + .iter() + .find(|s| s.name == "shared_slot") + .expect("shared_slot not found"); + + assert_eq!(base_slot.definition().range.as_deref(), Some("string")); + + let class = sv + .get_class(&Identifier::new("specialized:SpecializedThing"), &conv) + .unwrap() + .unwrap(); + let slot = class + .slots() + .iter() + .find(|s| s.name == "shared_slot") + .expect("shared_slot not found"); + + assert_eq!( + slot.definition().range.as_deref(), + Some("specialized:TargetClass") + ); + assert_eq!( + slot.get_range_class().map(|cv| cv.name().to_string()), + Some("TargetClass".to_string()) + ); +} diff --git a/src/tools/src/bin/linkml_diff.rs b/src/tools/src/bin/linkml_diff.rs index 8aee75c..8c2d0b3 100644 --- a/src/tools/src/bin/linkml_diff.rs +++ b/src/tools/src/bin/linkml_diff.rs @@ -30,7 +30,7 @@ fn load_value( sv: &SchemaView, class: &ClassView, conv: &curies::Converter, -) -> Result> { +) -> Result> { if let Some(ext) = path.extension().and_then(|s| s.to_str()) { if ext == "json" { load_json_file(path, sv, class, conv) diff --git a/src/tools/src/bin/linkml_patch.rs b/src/tools/src/bin/linkml_patch.rs index cf1555a..50157a9 100644 --- a/src/tools/src/bin/linkml_patch.rs +++ b/src/tools/src/bin/linkml_patch.rs @@ -23,6 +23,12 @@ struct Args { /// Output patched file; defaults to stdout #[arg(short, long)] output: Option, + /// Treat missing assignments as equivalent to explicit null for equality + #[arg(long, default_value_t = true)] + treat_missing_as_null: bool, + /// Skip deltas that do not change the value (no-ops) + #[arg(long, default_value_t = true)] + ignore_noop: bool, } fn load_value( @@ -30,7 +36,7 @@ fn load_value( sv: &SchemaView, class: &ClassView, conv: &curies::Converter, -) -> Result> { +) -> Result> { if let Some(ext) = path.extension().and_then(|s| s.to_str()) { if ext == "json" { load_json_file(path, sv, class, conv) @@ -44,7 +50,7 @@ fn load_value( fn write_value( path: Option<&Path>, - value: &linkml_runtime::LinkMLValue, + value: &linkml_runtime::LinkMLInstance, ) -> Result<(), Box> { let json = value.to_json(); let mut writer: Box = if let Some(p) = path { @@ -92,7 +98,15 @@ fn main() -> Result<(), Box> { } else { serde_yaml::from_str(&delta_text)? }; - let patched = patch(&src, &deltas, &sv); + let (patched, _trace) = patch( + &src, + &deltas, + &sv, + linkml_runtime::diff::PatchOptions { + ignore_no_ops: args.ignore_noop, + treat_missing_as_null: args.treat_missing_as_null, + }, + )?; write_value(args.output.as_deref(), &patched)?; Ok(()) }