reactive_graph_client/client/instances/entities/args/
id_and_component.rs1use crate::client::error::CommandError;
2use crate::client::error::CommandError::NotFound;
3use crate::client::types::components::args::type_id::ComponentTypeIdArgs;
4use clap::Args;
5use uuid::Uuid;
6
7#[derive(Args, Debug, Clone)]
9pub(crate) struct IdAndComponentArgs {
10 pub id: Uuid,
12
13 #[clap(flatten)]
15 pub component_ty: ComponentTypeIdArgs,
16}
17
18impl IdAndComponentArgs {
19 pub fn id_not_found(&self) -> CommandError {
20 NotFound(format!("The instance with the id {} was not found", &self.id))
21 }
22}