reactive_graph/client/types/entities/
commands.rs1use crate::client::types::entities::args::add_extension::EntityTypeAddExtensionArgs;
2use crate::client::types::entities::args::add_property::EntityTypeAddPropertyArgs;
3use crate::client::types::entities::args::create::CreateEntityTypeArgs;
4use crate::client::types::entities::args::entity_component_type::EntityComponentTypeIdArgs;
5use crate::client::types::entities::args::entity_extension_type::EntityExtensionTypeIdArgs;
6use crate::client::types::entities::args::entity_type_property::EntityTypePropertyArgs;
7use crate::client::types::entities::args::parse_entity_ty;
8use crate::client::types::entities::args::update_description::EntityTypeUpdateDescriptionArgs;
9use clap::Subcommand;
10use reactive_graph_graph::EntityTypeId;
11
12#[derive(Subcommand, Debug, Clone)]
13pub(crate) enum EntityTypesCommands {
14 #[non_exhaustive]
16 List,
17 #[non_exhaustive]
19 Get {
20 #[arg(name = "entity_type", value_parser = parse_entity_ty)]
21 entity_ty: EntityTypeId,
22 },
23 #[non_exhaustive]
25 ListProperties {
26 #[arg(name = "entity_type", value_parser = parse_entity_ty)]
27 entity_ty: EntityTypeId,
28 },
29 #[non_exhaustive]
31 ListExtensions {
32 #[arg(name = "entity_type", value_parser = parse_entity_ty)]
33 entity_ty: EntityTypeId,
34 },
35 #[non_exhaustive]
37 ListComponents {
38 #[arg(name = "entity_type", value_parser = parse_entity_ty)]
39 entity_ty: EntityTypeId,
40 },
41 #[non_exhaustive]
43 GetJsonSchema {
44 #[arg(name = "entity_type", value_parser = parse_entity_ty)]
45 entity_ty: EntityTypeId,
46 },
47 #[non_exhaustive]
49 Create(CreateEntityTypeArgs),
50 #[non_exhaustive]
52 Delete {
53 #[arg(name = "entity_type", value_parser = parse_entity_ty)]
54 entity_ty: EntityTypeId,
55 },
56 #[non_exhaustive]
58 AddProperty(EntityTypeAddPropertyArgs),
59 #[non_exhaustive]
61 RemoveProperty(EntityTypePropertyArgs),
62 #[non_exhaustive]
64 AddExtension(EntityTypeAddExtensionArgs),
65 #[non_exhaustive]
67 RemoveExtension(EntityExtensionTypeIdArgs),
68 #[non_exhaustive]
70 AddComponent(EntityComponentTypeIdArgs),
71 #[non_exhaustive]
73 RemoveComponent(EntityComponentTypeIdArgs),
74 #[non_exhaustive]
76 UpdateDescription(EntityTypeUpdateDescriptionArgs),
77 #[non_exhaustive]
79 JsonSchema,
80}