reactive_graph/client/types/relations/
commands.rs1use crate::client::types::relations::args::add_extension::RelationTypeAddExtensionArgs;
2use crate::client::types::relations::args::add_property::RelationTypeAddPropertyArgs;
3use crate::client::types::relations::args::create::CreateRelationTypeArgs;
4use crate::client::types::relations::args::parse_relation_ty;
5use crate::client::types::relations::args::relation_component_type::RelationComponentTypeIdArgs;
6use crate::client::types::relations::args::relation_extension_type::RelationExtensionTypeIdArgs;
7use crate::client::types::relations::args::relation_type_property::RelationTypePropertyArgs;
8use crate::client::types::relations::args::update_description::RelationTypeUpdateDescriptionArgs;
9use clap::Subcommand;
10use reactive_graph_graph::RelationTypeId;
11
12#[derive(Subcommand, Debug, Clone)]
13pub(crate) enum RelationTypesCommands {
14 #[non_exhaustive]
16 List,
17 #[non_exhaustive]
19 Get {
20 #[arg(name = "relation_type", value_parser = parse_relation_ty)]
21 relation_ty: RelationTypeId,
22 },
23 #[non_exhaustive]
25 ListProperties {
26 #[arg(name = "relation_type", value_parser = parse_relation_ty)]
27 relation_ty: RelationTypeId,
28 },
29 #[non_exhaustive]
31 ListExtensions {
32 #[arg(name = "relation_type", value_parser = parse_relation_ty)]
33 relation_ty: RelationTypeId,
34 },
35 #[non_exhaustive]
37 ListComponents {
38 #[arg(name = "relation_type", value_parser = parse_relation_ty)]
39 relation_ty: RelationTypeId,
40 },
41 #[non_exhaustive]
43 GetJsonSchema {
44 #[arg(name = "relation_type", value_parser = parse_relation_ty)]
45 relation_ty: RelationTypeId,
46 },
47 #[non_exhaustive]
49 Create(CreateRelationTypeArgs),
50 #[non_exhaustive]
52 Delete {
53 #[arg(name = "relation_type", value_parser = parse_relation_ty)]
54 relation_ty: RelationTypeId,
55 },
56 #[non_exhaustive]
58 AddProperty(RelationTypeAddPropertyArgs),
59 #[non_exhaustive]
61 RemoveProperty(RelationTypePropertyArgs),
62 #[non_exhaustive]
64 AddExtension(RelationTypeAddExtensionArgs),
65 #[non_exhaustive]
67 RemoveExtension(RelationExtensionTypeIdArgs),
68 #[non_exhaustive]
70 AddComponent(RelationComponentTypeIdArgs),
71 #[non_exhaustive]
73 RemoveComponent(RelationComponentTypeIdArgs),
74 #[non_exhaustive]
76 UpdateDescription(RelationTypeUpdateDescriptionArgs),
77 #[non_exhaustive]
79 JsonSchema,
80}