Skip to main content

matter_kit/clusters/generated/
groups.rs

1// Generated by `cargo xtask` from the CSA data model 1.6. Do not edit.
2//
3// Groups — cluster 0x0004.
4//
5// Regenerate with `cargo xtask clusters --dm <checkout>/data_model/1.6`; `cargo xtask check`
6// is the CI gate that keeps this file honest. The XML itself is not vendored here — it
7// carries the CSA's own copyright notice and is not redistributable.
8
9//! Groups (cluster `0x0004`, revision 4).
10//!
11//! 11 identifiers, 1 feature bits, and the specification's own conformance for
12//! every element. `CLUSTER` is the whole table.
13
14#![allow(unused_imports)]
15
16use crate::dm::conformance::{Clause, Condition, Conform, Conformance};
17use crate::dm::meta::{EventPriority, Reporting};
18use crate::dm::spec::{Attribute, Cluster, Command, Event, Feature};
19use crate::dm::{Access, AccessQualities, AttributeQualities, Privilege};
20use crate::error::Result;
21use crate::im::{AttributeId, ClusterId, CommandId, EventId};
22use crate::tlv::{
23    ContainerKind, Element, FromTlv, Nullable, Tag, TlvList, TlvReader, TlvWriter, ToTlv, Value,
24};
25
26/// The cluster id.
27pub const ID: ClusterId = 0x0004;
28
29/// The highest revision the specification's history defines — what `ClusterRevision`
30/// must report (Core §7.13.1).
31pub const REVISION: u16 = 4;
32
33/// The PICS code, which a certification declaration names the cluster by.
34pub const PICS: &str = "G";
35
36/// The `FeatureMap` bits (Core §7.13.2).
37///
38/// A feature has conformance of its own: a device may not claim one the
39/// specification forbids it alongside another.
40pub mod feature {
41    /// The ability to store a name for a group.
42    ///
43    /// Code `GN`, bit 0.
44    pub const GROUP_NAMES: u32 = 1 << 0;
45}
46
47/// Every feature bit, with its conformance.
48pub const FEATURES: &[Feature] = &[Feature {
49    bit: 0,
50    code: "GN",
51    name: "GroupNames",
52    conform: Conform::OPTIONAL,
53}];
54
55/// The attribute ids.
56pub mod attribute {
57    use crate::im::AttributeId;
58
59    /// `NameSupport`.
60    pub const NAME_SUPPORT: AttributeId = 0x00;
61}
62
63/// The command ids.
64pub mod command {
65    use crate::im::CommandId;
66
67    /// `AddGroup`.
68    pub const ADD_GROUP: CommandId = 0x00;
69    /// `AddGroupResponse`.
70    pub const ADD_GROUP_RESPONSE: CommandId = 0x00;
71    /// `ViewGroup`.
72    pub const VIEW_GROUP: CommandId = 0x01;
73    /// `ViewGroupResponse`.
74    pub const VIEW_GROUP_RESPONSE: CommandId = 0x01;
75    /// `GetGroupMembership`.
76    pub const GET_GROUP_MEMBERSHIP: CommandId = 0x02;
77    /// `GetGroupMembershipResponse`.
78    pub const GET_GROUP_MEMBERSHIP_RESPONSE: CommandId = 0x02;
79    /// `RemoveGroup`.
80    pub const REMOVE_GROUP: CommandId = 0x03;
81    /// `RemoveGroupResponse`.
82    pub const REMOVE_GROUP_RESPONSE: CommandId = 0x03;
83    /// `RemoveAllGroups`.
84    pub const REMOVE_ALL_GROUPS: CommandId = 0x04;
85    /// `AddGroupIfIdentifying`.
86    pub const ADD_GROUP_IF_IDENTIFYING: CommandId = 0x05;
87}
88
89bitflags::bitflags! {
90    /// `NameSupportBitmap`.
91    #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
92    pub struct NameSupportBitmap: u8 {
93        /// The ability to store a name for a group.
94        const GROUP_NAMES = 1 << 7;
95    }
96}
97
98impl ToTlv for NameSupportBitmap {
99    fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
100        self.bits().to_tlv(w, tag)
101    }
102}
103
104impl<'a> FromTlv<'a> for NameSupportBitmap {
105    fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
106        let bits = <u8 as FromTlv<'a>>::from_tlv(reader, element)?;
107        Self::from_bits(bits).ok_or(crate::Error::new(crate::ErrorCode::TlvOutOfRange))
108    }
109}
110
111/// The fields of `AddGroup` (command `0x00`).
112#[derive(Debug, Clone, Copy, PartialEq)]
113pub struct AddGroupFields<'a> {
114    /// `GroupID`, field 0.
115    pub group_id: crate::msg::GroupId,
116    /// `GroupName`, field 1.
117    pub group_name: &'a str,
118}
119
120impl<'a> ToTlv for AddGroupFields<'a> {
121    fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
122        w.start_structure(tag)?;
123        self.group_id.to_tlv(w, Tag::Context(0))?;
124        self.group_name.to_tlv(w, Tag::Context(1))?;
125        w.end_container()
126    }
127}
128
129impl<'a> FromTlv<'a> for AddGroupFields<'a> {
130    fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
131        if element.value.container() != Some(ContainerKind::Structure) {
132            return Err(crate::Error::new(crate::ErrorCode::TlvWrongType));
133        }
134        let mut group_id = None;
135        let mut group_name = None;
136        loop {
137            let Some(field) = reader.next_element()? else {
138                return Err(crate::Error::new(crate::ErrorCode::TlvTruncated));
139            };
140            if field.value == Value::EndOfContainer {
141                break;
142            }
143            match field.tag.context() {
144                Some(0) => group_id = Some(<crate::msg::GroupId>::from_tlv(reader, &field)?),
145                Some(1) => group_name = Some(<&'a str>::from_tlv(reader, &field)?),
146                // A field this revision does not define. §7.19.2: a receiver
147                // ignores what it does not know rather than refusing the whole
148                // structure, which is what lets a newer peer talk to an older one.
149                _ => reader.skip_value(&field)?,
150            }
151        }
152        Ok(Self {
153            group_id: group_id.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
154            group_name: group_name.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
155        })
156    }
157}
158
159/// The fields of `AddGroupResponse` (command `0x00`).
160#[derive(Debug, Clone, Copy, PartialEq)]
161pub struct AddGroupResponseFields {
162    /// `Status`, field 0.
163    pub status: u8,
164    /// `GroupID`, field 1.
165    pub group_id: crate::msg::GroupId,
166}
167
168impl ToTlv for AddGroupResponseFields {
169    fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
170        w.start_structure(tag)?;
171        self.status.to_tlv(w, Tag::Context(0))?;
172        self.group_id.to_tlv(w, Tag::Context(1))?;
173        w.end_container()
174    }
175}
176
177impl<'a> FromTlv<'a> for AddGroupResponseFields {
178    fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
179        if element.value.container() != Some(ContainerKind::Structure) {
180            return Err(crate::Error::new(crate::ErrorCode::TlvWrongType));
181        }
182        let mut status = None;
183        let mut group_id = None;
184        loop {
185            let Some(field) = reader.next_element()? else {
186                return Err(crate::Error::new(crate::ErrorCode::TlvTruncated));
187            };
188            if field.value == Value::EndOfContainer {
189                break;
190            }
191            match field.tag.context() {
192                Some(0) => status = Some(<u8>::from_tlv(reader, &field)?),
193                Some(1) => group_id = Some(<crate::msg::GroupId>::from_tlv(reader, &field)?),
194                // A field this revision does not define. §7.19.2: a receiver
195                // ignores what it does not know rather than refusing the whole
196                // structure, which is what lets a newer peer talk to an older one.
197                _ => reader.skip_value(&field)?,
198            }
199        }
200        Ok(Self {
201            status: status.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
202            group_id: group_id.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
203        })
204    }
205}
206
207/// The fields of `ViewGroup` (command `0x01`).
208#[derive(Debug, Clone, Copy, PartialEq)]
209pub struct ViewGroupFields {
210    /// `GroupID`, field 0.
211    pub group_id: crate::msg::GroupId,
212}
213
214impl ToTlv for ViewGroupFields {
215    fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
216        w.start_structure(tag)?;
217        self.group_id.to_tlv(w, Tag::Context(0))?;
218        w.end_container()
219    }
220}
221
222impl<'a> FromTlv<'a> for ViewGroupFields {
223    fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
224        if element.value.container() != Some(ContainerKind::Structure) {
225            return Err(crate::Error::new(crate::ErrorCode::TlvWrongType));
226        }
227        let mut group_id = None;
228        loop {
229            let Some(field) = reader.next_element()? else {
230                return Err(crate::Error::new(crate::ErrorCode::TlvTruncated));
231            };
232            if field.value == Value::EndOfContainer {
233                break;
234            }
235            match field.tag.context() {
236                Some(0) => group_id = Some(<crate::msg::GroupId>::from_tlv(reader, &field)?),
237                // A field this revision does not define. §7.19.2: a receiver
238                // ignores what it does not know rather than refusing the whole
239                // structure, which is what lets a newer peer talk to an older one.
240                _ => reader.skip_value(&field)?,
241            }
242        }
243        Ok(Self {
244            group_id: group_id.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
245        })
246    }
247}
248
249/// The fields of `ViewGroupResponse` (command `0x01`).
250#[derive(Debug, Clone, Copy, PartialEq)]
251pub struct ViewGroupResponseFields<'a> {
252    /// `Status`, field 0.
253    pub status: u8,
254    /// `GroupID`, field 1.
255    pub group_id: crate::msg::GroupId,
256    /// `GroupName`, field 2.
257    pub group_name: &'a str,
258}
259
260impl<'a> ToTlv for ViewGroupResponseFields<'a> {
261    fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
262        w.start_structure(tag)?;
263        self.status.to_tlv(w, Tag::Context(0))?;
264        self.group_id.to_tlv(w, Tag::Context(1))?;
265        self.group_name.to_tlv(w, Tag::Context(2))?;
266        w.end_container()
267    }
268}
269
270impl<'a> FromTlv<'a> for ViewGroupResponseFields<'a> {
271    fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
272        if element.value.container() != Some(ContainerKind::Structure) {
273            return Err(crate::Error::new(crate::ErrorCode::TlvWrongType));
274        }
275        let mut status = None;
276        let mut group_id = None;
277        let mut group_name = None;
278        loop {
279            let Some(field) = reader.next_element()? else {
280                return Err(crate::Error::new(crate::ErrorCode::TlvTruncated));
281            };
282            if field.value == Value::EndOfContainer {
283                break;
284            }
285            match field.tag.context() {
286                Some(0) => status = Some(<u8>::from_tlv(reader, &field)?),
287                Some(1) => group_id = Some(<crate::msg::GroupId>::from_tlv(reader, &field)?),
288                Some(2) => group_name = Some(<&'a str>::from_tlv(reader, &field)?),
289                // A field this revision does not define. §7.19.2: a receiver
290                // ignores what it does not know rather than refusing the whole
291                // structure, which is what lets a newer peer talk to an older one.
292                _ => reader.skip_value(&field)?,
293            }
294        }
295        Ok(Self {
296            status: status.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
297            group_id: group_id.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
298            group_name: group_name.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
299        })
300    }
301}
302
303/// The fields of `GetGroupMembership` (command `0x02`).
304#[derive(Debug, Clone, Copy, PartialEq)]
305pub struct GetGroupMembershipFields<'a> {
306    /// `GroupList`, field 0.
307    pub group_list: TlvList<'a, crate::msg::GroupId>,
308}
309
310impl<'a> ToTlv for GetGroupMembershipFields<'a> {
311    fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
312        w.start_structure(tag)?;
313        self.group_list.to_tlv(w, Tag::Context(0))?;
314        w.end_container()
315    }
316}
317
318impl<'a> FromTlv<'a> for GetGroupMembershipFields<'a> {
319    fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
320        if element.value.container() != Some(ContainerKind::Structure) {
321            return Err(crate::Error::new(crate::ErrorCode::TlvWrongType));
322        }
323        let mut group_list = None;
324        loop {
325            let Some(field) = reader.next_element()? else {
326                return Err(crate::Error::new(crate::ErrorCode::TlvTruncated));
327            };
328            if field.value == Value::EndOfContainer {
329                break;
330            }
331            match field.tag.context() {
332                Some(0) => {
333                    group_list = Some(<TlvList<'a, crate::msg::GroupId>>::from_tlv(
334                        reader, &field,
335                    )?)
336                }
337                // A field this revision does not define. §7.19.2: a receiver
338                // ignores what it does not know rather than refusing the whole
339                // structure, which is what lets a newer peer talk to an older one.
340                _ => reader.skip_value(&field)?,
341            }
342        }
343        Ok(Self {
344            group_list: group_list.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
345        })
346    }
347}
348
349/// The fields of `GetGroupMembershipResponse` (command `0x02`).
350#[derive(Debug, Clone, Copy, PartialEq)]
351pub struct GetGroupMembershipResponseFields<'a> {
352    /// `Capacity`, field 0.
353    pub capacity: Nullable<u8>,
354    /// `GroupList`, field 1.
355    pub group_list: TlvList<'a, crate::msg::GroupId>,
356}
357
358impl<'a> ToTlv for GetGroupMembershipResponseFields<'a> {
359    fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
360        w.start_structure(tag)?;
361        self.capacity.to_tlv(w, Tag::Context(0))?;
362        self.group_list.to_tlv(w, Tag::Context(1))?;
363        w.end_container()
364    }
365}
366
367impl<'a> FromTlv<'a> for GetGroupMembershipResponseFields<'a> {
368    fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
369        if element.value.container() != Some(ContainerKind::Structure) {
370            return Err(crate::Error::new(crate::ErrorCode::TlvWrongType));
371        }
372        let mut capacity = None;
373        let mut group_list = None;
374        loop {
375            let Some(field) = reader.next_element()? else {
376                return Err(crate::Error::new(crate::ErrorCode::TlvTruncated));
377            };
378            if field.value == Value::EndOfContainer {
379                break;
380            }
381            match field.tag.context() {
382                Some(0) => capacity = Some(<Nullable<u8>>::from_tlv(reader, &field)?),
383                Some(1) => {
384                    group_list = Some(<TlvList<'a, crate::msg::GroupId>>::from_tlv(
385                        reader, &field,
386                    )?)
387                }
388                // A field this revision does not define. §7.19.2: a receiver
389                // ignores what it does not know rather than refusing the whole
390                // structure, which is what lets a newer peer talk to an older one.
391                _ => reader.skip_value(&field)?,
392            }
393        }
394        Ok(Self {
395            capacity: capacity.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
396            group_list: group_list.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
397        })
398    }
399}
400
401/// The fields of `RemoveGroup` (command `0x03`).
402#[derive(Debug, Clone, Copy, PartialEq)]
403pub struct RemoveGroupFields {
404    /// `GroupID`, field 0.
405    pub group_id: crate::msg::GroupId,
406}
407
408impl ToTlv for RemoveGroupFields {
409    fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
410        w.start_structure(tag)?;
411        self.group_id.to_tlv(w, Tag::Context(0))?;
412        w.end_container()
413    }
414}
415
416impl<'a> FromTlv<'a> for RemoveGroupFields {
417    fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
418        if element.value.container() != Some(ContainerKind::Structure) {
419            return Err(crate::Error::new(crate::ErrorCode::TlvWrongType));
420        }
421        let mut group_id = None;
422        loop {
423            let Some(field) = reader.next_element()? else {
424                return Err(crate::Error::new(crate::ErrorCode::TlvTruncated));
425            };
426            if field.value == Value::EndOfContainer {
427                break;
428            }
429            match field.tag.context() {
430                Some(0) => group_id = Some(<crate::msg::GroupId>::from_tlv(reader, &field)?),
431                // A field this revision does not define. §7.19.2: a receiver
432                // ignores what it does not know rather than refusing the whole
433                // structure, which is what lets a newer peer talk to an older one.
434                _ => reader.skip_value(&field)?,
435            }
436        }
437        Ok(Self {
438            group_id: group_id.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
439        })
440    }
441}
442
443/// The fields of `RemoveGroupResponse` (command `0x03`).
444#[derive(Debug, Clone, Copy, PartialEq)]
445pub struct RemoveGroupResponseFields {
446    /// `Status`, field 0.
447    pub status: u8,
448    /// `GroupID`, field 1.
449    pub group_id: crate::msg::GroupId,
450}
451
452impl ToTlv for RemoveGroupResponseFields {
453    fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
454        w.start_structure(tag)?;
455        self.status.to_tlv(w, Tag::Context(0))?;
456        self.group_id.to_tlv(w, Tag::Context(1))?;
457        w.end_container()
458    }
459}
460
461impl<'a> FromTlv<'a> for RemoveGroupResponseFields {
462    fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
463        if element.value.container() != Some(ContainerKind::Structure) {
464            return Err(crate::Error::new(crate::ErrorCode::TlvWrongType));
465        }
466        let mut status = None;
467        let mut group_id = None;
468        loop {
469            let Some(field) = reader.next_element()? else {
470                return Err(crate::Error::new(crate::ErrorCode::TlvTruncated));
471            };
472            if field.value == Value::EndOfContainer {
473                break;
474            }
475            match field.tag.context() {
476                Some(0) => status = Some(<u8>::from_tlv(reader, &field)?),
477                Some(1) => group_id = Some(<crate::msg::GroupId>::from_tlv(reader, &field)?),
478                // A field this revision does not define. §7.19.2: a receiver
479                // ignores what it does not know rather than refusing the whole
480                // structure, which is what lets a newer peer talk to an older one.
481                _ => reader.skip_value(&field)?,
482            }
483        }
484        Ok(Self {
485            status: status.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
486            group_id: group_id.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
487        })
488    }
489}
490
491/// The fields of `AddGroupIfIdentifying` (command `0x05`).
492#[derive(Debug, Clone, Copy, PartialEq)]
493pub struct AddGroupIfIdentifyingFields<'a> {
494    /// `GroupID`, field 0.
495    pub group_id: crate::msg::GroupId,
496    /// `GroupName`, field 1.
497    pub group_name: &'a str,
498}
499
500impl<'a> ToTlv for AddGroupIfIdentifyingFields<'a> {
501    fn to_tlv(&self, w: &mut TlvWriter<'_>, tag: Tag) -> Result<()> {
502        w.start_structure(tag)?;
503        self.group_id.to_tlv(w, Tag::Context(0))?;
504        self.group_name.to_tlv(w, Tag::Context(1))?;
505        w.end_container()
506    }
507}
508
509impl<'a> FromTlv<'a> for AddGroupIfIdentifyingFields<'a> {
510    fn from_tlv(reader: &mut TlvReader<'a>, element: &Element<'a>) -> Result<Self> {
511        if element.value.container() != Some(ContainerKind::Structure) {
512            return Err(crate::Error::new(crate::ErrorCode::TlvWrongType));
513        }
514        let mut group_id = None;
515        let mut group_name = None;
516        loop {
517            let Some(field) = reader.next_element()? else {
518                return Err(crate::Error::new(crate::ErrorCode::TlvTruncated));
519            };
520            if field.value == Value::EndOfContainer {
521                break;
522            }
523            match field.tag.context() {
524                Some(0) => group_id = Some(<crate::msg::GroupId>::from_tlv(reader, &field)?),
525                Some(1) => group_name = Some(<&'a str>::from_tlv(reader, &field)?),
526                // A field this revision does not define. §7.19.2: a receiver
527                // ignores what it does not know rather than refusing the whole
528                // structure, which is what lets a newer peer talk to an older one.
529                _ => reader.skip_value(&field)?,
530            }
531        }
532        Ok(Self {
533            group_id: group_id.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
534            group_name: group_name.ok_or(crate::Error::new(crate::ErrorCode::TlvNotFound))?,
535        })
536    }
537}
538
539/// Every attribute the specification defines, with its conformance.
540pub const ATTRIBUTES: &[Attribute] = &[Attribute {
541    id: 0x0000,
542    name: "NameSupport",
543    kind: "NameSupportBitmap",
544    access: Access::read_only(Privilege::View),
545    qualities: AttributeQualities::FIXED,
546    reporting: Reporting::OnChange,
547    conform: Conform::MANDATORY,
548}];
549
550/// Every command, with its conformance.
551pub const COMMANDS: &[Command] = &[
552    Command {
553        id: 0x00,
554        name: "AddGroup",
555        to_server: true,
556        response: Some(0x00),
557        access: Access::invoke(Privilege::Manage).with_qualities(AccessQualities::FABRIC_SCOPED),
558        conform: Conform::MANDATORY,
559    },
560    Command {
561        id: 0x00,
562        name: "AddGroupResponse",
563        to_server: false,
564        response: None,
565        access: Access::invoke(Privilege::Operate),
566        conform: Conform::MANDATORY,
567    },
568    Command {
569        id: 0x01,
570        name: "ViewGroup",
571        to_server: true,
572        response: Some(0x01),
573        access: Access::invoke(Privilege::Operate).with_qualities(AccessQualities::FABRIC_SCOPED),
574        conform: Conform::MANDATORY,
575    },
576    Command {
577        id: 0x01,
578        name: "ViewGroupResponse",
579        to_server: false,
580        response: None,
581        access: Access::invoke(Privilege::Operate),
582        conform: Conform::MANDATORY,
583    },
584    Command {
585        id: 0x02,
586        name: "GetGroupMembership",
587        to_server: true,
588        response: Some(0x02),
589        access: Access::invoke(Privilege::Operate).with_qualities(AccessQualities::FABRIC_SCOPED),
590        conform: Conform::MANDATORY,
591    },
592    Command {
593        id: 0x02,
594        name: "GetGroupMembershipResponse",
595        to_server: false,
596        response: None,
597        access: Access::invoke(Privilege::Operate),
598        conform: Conform::MANDATORY,
599    },
600    Command {
601        id: 0x03,
602        name: "RemoveGroup",
603        to_server: true,
604        response: Some(0x03),
605        access: Access::invoke(Privilege::Manage).with_qualities(AccessQualities::FABRIC_SCOPED),
606        conform: Conform::MANDATORY,
607    },
608    Command {
609        id: 0x03,
610        name: "RemoveGroupResponse",
611        to_server: false,
612        response: None,
613        access: Access::invoke(Privilege::Operate),
614        conform: Conform::MANDATORY,
615    },
616    Command {
617        id: 0x04,
618        name: "RemoveAllGroups",
619        to_server: true,
620        response: None,
621        access: Access::invoke(Privilege::Manage).with_qualities(AccessQualities::FABRIC_SCOPED),
622        conform: Conform::MANDATORY,
623    },
624    Command {
625        id: 0x05,
626        name: "AddGroupIfIdentifying",
627        to_server: true,
628        response: None,
629        access: Access::invoke(Privilege::Manage).with_qualities(AccessQualities::FABRIC_SCOPED),
630        conform: Conform::MANDATORY,
631    },
632];
633
634/// Every event, with its conformance.
635pub const EVENTS: &[Event] = &[];
636
637/// The whole cluster, as the specification defines it.
638pub const CLUSTER: Cluster = Cluster {
639    id: ID,
640    name: "Groups",
641    revision: REVISION,
642    pics: "G",
643    derived_from: None,
644    features: FEATURES,
645    attributes: ATTRIBUTES,
646    commands: COMMANDS,
647    events: EVENTS,
648};