/src/connectedhomeip/zzz_generated/app-common/clusters/AccountLogin/Commands.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * |
3 | | * Copyright (c) 2022 Project CHIP Authors |
4 | | * |
5 | | * Licensed under the Apache License, Version 2.0 (the "License"); |
6 | | * you may not use this file except in compliance with the License. |
7 | | * You may obtain a copy of the License at |
8 | | * |
9 | | * http://www.apache.org/licenses/LICENSE-2.0 |
10 | | * |
11 | | * Unless required by applicable law or agreed to in writing, software |
12 | | * distributed under the License is distributed on an "AS IS" BASIS, |
13 | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
14 | | * See the License for the specific language governing permissions and |
15 | | * limitations under the License. |
16 | | */ |
17 | | |
18 | | // THIS FILE IS GENERATED BY ZAP |
19 | | // This file is generated from clusters-Commands.h.zapt |
20 | | |
21 | | #pragma once |
22 | | |
23 | | #include <app/data-model/DecodableList.h> |
24 | | #include <app/data-model/Encode.h> |
25 | | #include <app/data-model/List.h> |
26 | | #include <app/data-model/NullObject.h> |
27 | | #include <app/data-model/Nullable.h> |
28 | | #include <lib/core/DataModelTypes.h> |
29 | | #include <lib/core/Optional.h> |
30 | | #include <lib/core/TLV.h> |
31 | | #include <lib/support/BitMask.h> |
32 | | |
33 | | #include <clusters/shared/Enums.h> |
34 | | #include <clusters/shared/Structs.h> |
35 | | |
36 | | #include <clusters/AccountLogin/ClusterId.h> |
37 | | #include <clusters/AccountLogin/CommandIds.h> |
38 | | #include <clusters/AccountLogin/Enums.h> |
39 | | #include <clusters/AccountLogin/Structs.h> |
40 | | |
41 | | #include <cstdint> |
42 | | |
43 | | namespace chip { |
44 | | namespace app { |
45 | | namespace Clusters { |
46 | | namespace AccountLogin { |
47 | | namespace Commands { |
48 | | // Forward-declarations so we can reference these later. |
49 | | |
50 | | namespace GetSetupPIN { |
51 | | struct Type; |
52 | | struct DecodableType; |
53 | | } // namespace GetSetupPIN |
54 | | |
55 | | namespace GetSetupPINResponse { |
56 | | struct Type; |
57 | | struct DecodableType; |
58 | | } // namespace GetSetupPINResponse |
59 | | |
60 | | namespace Login { |
61 | | struct Type; |
62 | | struct DecodableType; |
63 | | } // namespace Login |
64 | | |
65 | | namespace Logout { |
66 | | struct Type; |
67 | | struct DecodableType; |
68 | | } // namespace Logout |
69 | | |
70 | | } // namespace Commands |
71 | | |
72 | | namespace Commands { |
73 | | namespace GetSetupPIN { |
74 | | enum class Fields : uint8_t |
75 | | { |
76 | | kTempAccountIdentifier = 0, |
77 | | }; |
78 | | |
79 | | struct Type |
80 | | { |
81 | | public: |
82 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
83 | 0 | static constexpr CommandId GetCommandId() { return Commands::GetSetupPIN::Id; } |
84 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } |
85 | | |
86 | | chip::CharSpan tempAccountIdentifier; |
87 | | |
88 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
89 | | |
90 | | using ResponseType = Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType; |
91 | | |
92 | 0 | static constexpr bool MustUseTimedInvoke() { return true; } |
93 | | }; |
94 | | |
95 | | struct DecodableType |
96 | | { |
97 | | public: |
98 | 0 | static constexpr CommandId GetCommandId() { return Commands::GetSetupPIN::Id; } |
99 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } |
100 | | static constexpr bool kIsFabricScoped = true; |
101 | | |
102 | | chip::CharSpan tempAccountIdentifier; |
103 | | |
104 | | CHIP_ERROR Decode(TLV::TLVReader & reader, FabricIndex aAccessingFabricIndex); |
105 | | }; |
106 | | }; // namespace GetSetupPIN |
107 | | namespace GetSetupPINResponse { |
108 | | enum class Fields : uint8_t |
109 | | { |
110 | | kSetupPIN = 0, |
111 | | }; |
112 | | |
113 | | struct Type |
114 | | { |
115 | | public: |
116 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
117 | 0 | static constexpr CommandId GetCommandId() { return Commands::GetSetupPINResponse::Id; } |
118 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } |
119 | | |
120 | | chip::CharSpan setupPIN; |
121 | | |
122 | | CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const; |
123 | | |
124 | | using ResponseType = DataModel::NullObjectType; |
125 | | |
126 | 0 | static constexpr bool MustUseTimedInvoke() { return false; } |
127 | | }; |
128 | | |
129 | | struct DecodableType |
130 | | { |
131 | | public: |
132 | 0 | static constexpr CommandId GetCommandId() { return Commands::GetSetupPINResponse::Id; } |
133 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } |
134 | | |
135 | | chip::CharSpan setupPIN; |
136 | | |
137 | | CHIP_ERROR Decode(TLV::TLVReader & reader); |
138 | | }; |
139 | | }; // namespace GetSetupPINResponse |
140 | | namespace Login { |
141 | | enum class Fields : uint8_t |
142 | | { |
143 | | kTempAccountIdentifier = 0, |
144 | | kSetupPIN = 1, |
145 | | kNode = 2, |
146 | | }; |
147 | | |
148 | | struct Type |
149 | | { |
150 | | public: |
151 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
152 | 0 | static constexpr CommandId GetCommandId() { return Commands::Login::Id; } |
153 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } |
154 | | |
155 | | chip::CharSpan tempAccountIdentifier; |
156 | | chip::CharSpan setupPIN; |
157 | | Optional<chip::NodeId> node; |
158 | | |
159 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
160 | | |
161 | | using ResponseType = DataModel::NullObjectType; |
162 | | |
163 | 0 | static constexpr bool MustUseTimedInvoke() { return true; } |
164 | | }; |
165 | | |
166 | | struct DecodableType |
167 | | { |
168 | | public: |
169 | 0 | static constexpr CommandId GetCommandId() { return Commands::Login::Id; } |
170 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } |
171 | | static constexpr bool kIsFabricScoped = true; |
172 | | |
173 | | chip::CharSpan tempAccountIdentifier; |
174 | | chip::CharSpan setupPIN; |
175 | | Optional<chip::NodeId> node; |
176 | | |
177 | | CHIP_ERROR Decode(TLV::TLVReader & reader, FabricIndex aAccessingFabricIndex); |
178 | | }; |
179 | | }; // namespace Login |
180 | | namespace Logout { |
181 | | enum class Fields : uint8_t |
182 | | { |
183 | | kNode = 0, |
184 | | }; |
185 | | |
186 | | struct Type |
187 | | { |
188 | | public: |
189 | | // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
190 | 0 | static constexpr CommandId GetCommandId() { return Commands::Logout::Id; } |
191 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } |
192 | | |
193 | | Optional<chip::NodeId> node; |
194 | | |
195 | | CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
196 | | |
197 | | using ResponseType = DataModel::NullObjectType; |
198 | | |
199 | 0 | static constexpr bool MustUseTimedInvoke() { return true; } |
200 | | }; |
201 | | |
202 | | struct DecodableType |
203 | | { |
204 | | public: |
205 | 0 | static constexpr CommandId GetCommandId() { return Commands::Logout::Id; } |
206 | 0 | static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } |
207 | | static constexpr bool kIsFabricScoped = true; |
208 | | |
209 | | Optional<chip::NodeId> node; |
210 | | |
211 | | CHIP_ERROR Decode(TLV::TLVReader & reader, FabricIndex aAccessingFabricIndex); |
212 | | }; |
213 | | }; // namespace Logout |
214 | | } // namespace Commands |
215 | | } // namespace AccountLogin |
216 | | } // namespace Clusters |
217 | | } // namespace app |
218 | | } // namespace chip |