reactive_graph/client/instances/relations/
commands.rs

1use crate::client::instances::relations::args::add_property::AddPropertyArgs;
2use crate::client::instances::relations::args::create::CreateRelationInstanceArgs;
3use crate::client::instances::relations::args::id::RelationInstanceIdArgs;
4use crate::client::instances::relations::args::id_and_component::RelationInstanceIdAndComponentArgs;
5use crate::client::instances::relations::args::id_and_property::RelationInstanceIdAndPropertyArgs;
6use crate::client::instances::relations::args::search::SearchRelationInstancesArgs;
7use crate::client::instances::relations::args::set_property::SetPropertyArgs;
8use clap::Subcommand;
9
10#[derive(Subcommand, Debug, Clone)]
11pub(crate) enum RelationInstancesCommands {
12    /// List all relation instances.
13    #[non_exhaustive]
14    List(SearchRelationInstancesArgs),
15    /// Prints a single relation instance.
16    #[non_exhaustive]
17    Get(RelationInstanceIdArgs),
18    /// Lists the properties of a relation instance.
19    #[non_exhaustive]
20    ListProperties(RelationInstanceIdArgs),
21    /// Prints the value of a property of a relation instance.
22    #[non_exhaustive]
23    GetProperty(RelationInstanceIdAndPropertyArgs),
24    /// Sets the value of a property of a relation instance.
25    #[non_exhaustive]
26    SetProperty(SetPropertyArgs),
27    /// Adds a new property to a relation instance.
28    #[non_exhaustive]
29    AddProperty(AddPropertyArgs),
30    /// Removes a property from a relation instance.
31    #[non_exhaustive]
32    RemoveProperty(RelationInstanceIdAndPropertyArgs),
33    /// Lists the components of a relation instance.
34    #[non_exhaustive]
35    ListComponents(RelationInstanceIdArgs),
36    /// Adds a component to a relation instance.
37    #[non_exhaustive]
38    AddComponent(RelationInstanceIdAndComponentArgs),
39    /// Removes a component from a relation instance.
40    #[non_exhaustive]
41    RemoveComponent(RelationInstanceIdAndComponentArgs),
42    /// Creates a new relation type.
43    #[non_exhaustive]
44    Create(CreateRelationInstanceArgs),
45    // Deletes a relation instance.
46    #[non_exhaustive]
47    Delete(RelationInstanceIdArgs),
48    /// Prints the JSON Schema of relation instances.
49    #[non_exhaustive]
50    JsonSchema,
51}