pub struct GroupsParentsResource<'a> { /* private fields */ }Expand description
client.groups().parents()
Implementations§
Source§impl<'a> GroupsParentsResource<'a>
impl<'a> GroupsParentsResource<'a>
Sourcepub fn delete(
&self,
group_id: impl Display,
parent_group_id: impl Display,
) -> Result<()>
pub fn delete( &self, group_id: impl Display, parent_group_id: impl Display, ) -> Result<()>
Remove a direct parent-group relationship
DELETE /groups/{groupId}/parents/{parentGroupId}
Removes only the direct hierarchy edge from parentGroupId to groupId; both groups and their memberships remain. Other paths through the hierarchy are unaffected, so the parent may still be an indirect ancestor. Requires global group administration or hierarchy/group editing permission for both endpoints. A missing relationship is ignored and returns 204. Successful processing invalidates the authorization cache because hierarchy changes can affect inherited permissions.
§Example
client.groups().parents().delete(42, 12)?;Sourcepub fn list(&self, group_id: impl Display) -> Result<Vec<DomainObjectGroup>>
pub fn list(&self, group_id: impl Display) -> Result<Vec<DomainObjectGroup>>
Get child groups
GET /groups/{groupId}/parents
Use Self::list_with to pass query parameters.
§Example
for parent in client.groups().parents().list("abc123")? {
println!("{}", parent.title);
}Sourcepub fn list_with(
&self,
group_id: impl Display,
query: &GetGroupsGroupIdParentsQuery,
) -> Result<Vec<DomainObjectGroup>>
pub fn list_with( &self, group_id: impl Display, query: &GetGroupsGroupIdParentsQuery, ) -> Result<Vec<DomainObjectGroup>>
Sourcepub fn list_iter(
&self,
group_id: impl Display,
query: &GetGroupsGroupIdParentsQuery,
) -> Items<DomainObjectGroup> ⓘ
pub fn list_iter( &self, group_id: impl Display, query: &GetGroupsGroupIdParentsQuery, ) -> Items<DomainObjectGroup> ⓘ
Get child groups
Like Self::list_with, but lazy: each page is fetched only when the iteration reaches it.
Breaking off early saves the remaining requests.
Sourcepub fn update(
&self,
group_id: impl Display,
parent_group_id: impl Display,
body: &BTreeMap<String, Value>,
) -> Result<()>
pub fn update( &self, group_id: impl Display, parent_group_id: impl Display, body: &BTreeMap<String, Value>, ) -> Result<()>
Add a direct parent-group relationship
PUT /groups/{groupId}/parents/{parentGroupId}
Adds parentGroupId as a direct parent of groupId. Groups can have multiple parents; this adds an edge rather than replacing existing parents, and does not copy memberships. Requires global group administration or hierarchy/group editing permission for both groups. Self-parenting and a relationship that would create a cycle are rejected with 400. An existing direct relationship also returns 400, so repeating a successful PUT is not an idempotent success. Success returns 201 without a JSON body and invalidates the authorization cache because the hierarchy can affect inherited permissions.
§Example
let body: std::collections::BTreeMap<String, serde_json::Value> = Default::default();
client.groups().parents().update(42, 12, &body)?;