reactive_graph_client/client/instances/entities/
commands.rs

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