Coverage Report

Created: 2026-04-09 06:56

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/connectedhomeip/zzz_generated/app-common/clusters/TlsCertificateManagement/Structs.h
Line
Count
Source
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-Structs.h.zapt
20
21
#pragma once
22
23
#include <app/data-model/DecodableList.h>
24
#include <app/data-model/List.h>
25
#include <app/data-model/Nullable.h>
26
#include <lib/core/DataModelTypes.h>
27
#include <lib/core/Optional.h>
28
#include <lib/core/TLV.h>
29
#include <lib/support/BitMask.h>
30
31
#include <clusters/shared/Structs.h>
32
33
#include <cstdint>
34
35
namespace chip {
36
namespace app {
37
namespace Clusters {
38
namespace TlsCertificateManagement {
39
namespace Structs {
40
namespace TLSCertStruct {
41
enum class Fields : uint8_t
42
{
43
    kCaid        = 0,
44
    kCertificate = 1,
45
    kFabricIndex = 254,
46
};
47
48
struct Type
49
{
50
public:
51
    uint16_t caid = static_cast<uint16_t>(0);
52
    Optional<chip::ByteSpan> certificate;
53
    chip::FabricIndex fabricIndex = static_cast<chip::FabricIndex>(0);
54
55
    CHIP_ERROR Decode(TLV::TLVReader & reader);
56
57
    static constexpr bool kIsFabricScoped = true;
58
59
0
    auto GetFabricIndex() const { return fabricIndex; }
60
61
0
    void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; }
62
63
    CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
64
    CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const;
65
66
private:
67
    CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional<FabricIndex> & aAccessingFabricIndex) const;
68
};
69
70
using DecodableType = Type;
71
72
} // namespace TLSCertStruct
73
namespace TLSClientCertificateDetailStruct {
74
enum class Fields : uint8_t
75
{
76
    kCcdid                    = 0,
77
    kClientCertificate        = 1,
78
    kIntermediateCertificates = 2,
79
    kFabricIndex              = 254,
80
};
81
82
struct Type
83
{
84
public:
85
    uint16_t ccdid = static_cast<uint16_t>(0);
86
    Optional<DataModel::Nullable<chip::ByteSpan>> clientCertificate;
87
    Optional<DataModel::List<const chip::ByteSpan>> intermediateCertificates;
88
    chip::FabricIndex fabricIndex = static_cast<chip::FabricIndex>(0);
89
90
    static constexpr bool kIsFabricScoped = true;
91
92
0
    auto GetFabricIndex() const { return fabricIndex; }
93
94
0
    void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; }
95
96
    CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
97
    CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const;
98
99
private:
100
    CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional<FabricIndex> & aAccessingFabricIndex) const;
101
};
102
103
struct DecodableType
104
{
105
public:
106
    uint16_t ccdid = static_cast<uint16_t>(0);
107
    Optional<DataModel::Nullable<chip::ByteSpan>> clientCertificate;
108
    Optional<DataModel::DecodableList<chip::ByteSpan>> intermediateCertificates;
109
    chip::FabricIndex fabricIndex = static_cast<chip::FabricIndex>(0);
110
111
    CHIP_ERROR Decode(TLV::TLVReader & reader);
112
113
    static constexpr bool kIsFabricScoped = true;
114
115
0
    auto GetFabricIndex() const { return fabricIndex; }
116
117
0
    void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; }
118
};
119
120
} // namespace TLSClientCertificateDetailStruct
121
} // namespace Structs
122
} // namespace TlsCertificateManagement
123
} // namespace Clusters
124
} // namespace app
125
} // namespace chip