reactive_graph/client/instances/relations/args/
add_property.rs

1use crate::client::error::CommandError;
2use crate::client::instances::relations::args::id::RelationInstanceIdArgs;
3use crate::client::types::property_type::args::PropertyTypeDefinitionArgs;
4use clap::Args;
5
6#[derive(Args, Debug, Clone)]
7pub(crate) struct AddPropertyArgs {
8    /// The id of the relation instance.
9    #[clap(flatten)]
10    pub id: RelationInstanceIdArgs,
11
12    /// The property to add to the relation instance.
13    #[clap(flatten)]
14    pub property_type: PropertyTypeDefinitionArgs,
15}
16
17impl AddPropertyArgs {
18    pub fn id_not_found(&self) -> CommandError {
19        self.id.not_found()
20    }
21}