vaultrs/api/identity/group/
responses.rs

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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
use std::collections::HashMap;

use serde::{Deserialize, Serialize};

/// Response from executing
/// [CreateGroupRequest](crate::api::identity::group::requests::CreateGroupRequest)
#[derive(Deserialize, Debug, Serialize)]
pub struct CreateGroupResponse {
    pub id: String,
    pub name: String,
}

/// Response from executing
/// [ReadGroupByIdRequest](crate::api::identity::group::requests::ReadGroupByIdRequest)
#[derive(Deserialize, Debug, Serialize)]
pub struct ReadGroupByIdResponse {
    // TODO What's the type of Alias?
    // pub alias: Option<String>,
    pub creation_time: String,
    pub id: String,
    pub last_update_time: String,
    pub member_entity_ids: Option<Vec<String>>,
    pub member_group_ids: Option<Vec<String>>,
    pub parent_group_ids: Option<Vec<String>>,
    pub metadata: Option<HashMap<String, String>>,
    pub modify_index: u64,
    pub namespace_id: String,
    pub name: String,
    pub policies: Option<Vec<String>>,
    #[serde(rename = "type")]
    pub group_type: String,
}

/// Response from executing
/// [ListGroupsById](crate::api::identity::group::requests::ListGroupsByIdRequest)
#[derive(Deserialize, Debug, Serialize)]
pub struct ListGroupsByIdResponse {
    pub keys: Vec<String>,
}

/// Response from executing
/// [ReadGroupByNameRequest](crate::api::identity::group::requests::ReadGroupByNameRequest)
#[derive(Deserialize, Debug, Serialize)]
pub struct ReadGroupByNameResponse {
    // TODO What's the type of Alias?
    // pub alias: Option<String>,
    pub creation_time: String,
    pub id: String,
    pub last_update_time: String,
    pub member_entity_ids: Option<Vec<String>>,
    pub member_group_ids: Option<Vec<String>>,
    pub parent_group_ids: Option<Vec<String>>,
    pub metadata: Option<HashMap<String, String>>,
    pub modify_index: u64,
    pub namespace_id: String,
    pub name: String,
    pub policies: Option<Vec<String>>,
    #[serde(rename = "type")]
    pub group_type: String,
}

/// Response from executing
/// [ListGroupsByName](crate::api::identity::group::requests::ListGroupsByNameRequest)
#[derive(Deserialize, Debug, Serialize)]
pub struct ListGroupsByNameResponse {
    pub keys: Vec<String>,
}