1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
use clap::Subcommand;
use crate::types::ProductListType;
#[derive(Subcommand)]
pub enum ProductAction {
/// List products
List {
/// Product type: accessible (default), selectable, or enterable
#[arg(long, default_value = "accessible")]
r#type: ProductListType,
},
/// View product details (components, versions, milestones)
View {
/// Product name
name: String,
},
/// Create a new product
Create {
/// Product name
#[arg(long)]
name: String,
/// Product description
#[arg(long)]
description: String,
/// Initial version
#[arg(long, default_value = "unspecified")]
version: String,
/// Whether the product is open for bugs
#[arg(long, default_value = "true")]
is_open: bool,
},
/// Update an existing product
Update {
/// Product name
name: String,
/// New description
#[arg(long)]
description: Option<String>,
/// Default milestone
#[arg(long)]
default_milestone: Option<String>,
/// Whether the product is open for bugs
#[arg(long)]
is_open: Option<bool>,
},
}