Line data Source code
1 : /*
2 : * Famedly Matrix SDK
3 : * Copyright (C) 2021 Famedly GmbH
4 : *
5 : * This program is free software: you can redistribute it and/or modify
6 : * it under the terms of the GNU Affero General Public License as
7 : * published by the Free Software Foundation, either version 3 of the
8 : * License, or (at your option) any later version.
9 : *
10 : * This program is distributed in the hope that it will be useful,
11 : * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 : * GNU Affero General Public License for more details.
14 : *
15 : * You should have received a copy of the GNU Affero General Public License
16 : * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 : */
18 :
19 : class SSSSCache {
20 : final String? type;
21 : final String? keyId;
22 : final String? ciphertext;
23 : final String? content;
24 :
25 8 : const SSSSCache({this.type, this.keyId, this.ciphertext, this.content});
26 :
27 16 : factory SSSSCache.fromJson(Map<String, dynamic> json) => SSSSCache(
28 8 : type: json['type'],
29 8 : keyId: json['key_id'],
30 8 : ciphertext: json['ciphertext'],
31 8 : content: json['content'],
32 : );
33 :
34 16 : Map<String, dynamic> toJson() => {
35 8 : 'type': type,
36 8 : 'key_id': keyId,
37 8 : 'ciphertext': ciphertext,
38 8 : 'content': content,
39 : };
40 : }
|