vaultrs/api/identity/group/
responses.rs

1use std::collections::HashMap;
2
3use serde::{Deserialize, Serialize};
4
5/// Response from executing
6/// [CreateGroupRequest](crate::api::identity::group::requests::CreateGroupRequest)
7#[derive(Deserialize, Debug, Serialize)]
8pub struct CreateGroupResponse {
9    pub id: String,
10    pub name: String,
11}
12
13/// Response from executing
14/// [ReadGroupByIdRequest](crate::api::identity::group::requests::ReadGroupByIdRequest)
15#[derive(Deserialize, Debug, Serialize)]
16pub struct ReadGroupByIdResponse {
17    // TODO What's the type of Alias?
18    // pub alias: Option<String>,
19    pub creation_time: String,
20    pub id: String,
21    pub last_update_time: String,
22    pub member_entity_ids: Option<Vec<String>>,
23    pub member_group_ids: Option<Vec<String>>,
24    pub parent_group_ids: Option<Vec<String>>,
25    pub metadata: Option<HashMap<String, String>>,
26    pub modify_index: u64,
27    pub namespace_id: String,
28    pub name: String,
29    pub policies: Option<Vec<String>>,
30    #[serde(rename = "type")]
31    pub group_type: String,
32}
33
34/// Response from executing
35/// [ListGroupsById](crate::api::identity::group::requests::ListGroupsByIdRequest)
36#[derive(Deserialize, Debug, Serialize)]
37pub struct ListGroupsByIdResponse {
38    pub keys: Vec<String>,
39}
40
41/// Response from executing
42/// [ReadGroupByNameRequest](crate::api::identity::group::requests::ReadGroupByNameRequest)
43#[derive(Deserialize, Debug, Serialize)]
44pub struct ReadGroupByNameResponse {
45    // TODO What's the type of Alias?
46    // pub alias: Option<String>,
47    pub creation_time: String,
48    pub id: String,
49    pub last_update_time: String,
50    pub member_entity_ids: Option<Vec<String>>,
51    pub member_group_ids: Option<Vec<String>>,
52    pub parent_group_ids: Option<Vec<String>>,
53    pub metadata: Option<HashMap<String, String>>,
54    pub modify_index: u64,
55    pub namespace_id: String,
56    pub name: String,
57    pub policies: Option<Vec<String>>,
58    #[serde(rename = "type")]
59    pub group_type: String,
60}
61
62/// Response from executing
63/// [ListGroupsByName](crate::api::identity::group::requests::ListGroupsByNameRequest)
64#[derive(Deserialize, Debug, Serialize)]
65pub struct ListGroupsByNameResponse {
66    pub keys: Vec<String>,
67}