From aca517aa1d175c92e32ae588d984fb0c42f4537d Mon Sep 17 00:00:00 2001 From: marcos <15697303+gmarcosb@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:17:09 -0700 Subject: [PATCH] Re-generated after merge using ./scripts/tools/zap_regen_all.py --- .../data_model/controller-clusters.matter | 6 +-- .../chip/devicecontroller/ChipClusters.java | 12 ++--- .../chip/devicecontroller/ChipStructs.java | 22 ++++----- .../devicecontroller/ClusterInfoMapping.java | 8 ++-- ...ClusterTLSClientCertificateDetailStruct.kt | 16 +++---- ...ClusterTLSClientCertificateDetailStruct.kt | 16 +++---- .../python/chip/clusters/Objects.py | 12 ++--- .../CHIP/zap-generated/MTRBaseClusters.h | 4 +- .../CHIP/zap-generated/MTRBaseClusters.mm | 6 +-- .../CHIP/zap-generated/MTRClusters.h | 4 +- .../CHIP/zap-generated/MTRClusters.mm | 6 +-- .../zap-generated/MTRCommandPayloadsObjc.mm | 46 ++++++++----------- .../CHIP/zap-generated/MTRStructsObjc.h | 2 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 6 +-- .../zap-generated/cluster-objects.cpp | 6 +-- .../zap-generated/cluster-objects.h | 18 ++++---- .../cluster/ComplexArgumentParser.cpp | 14 +++--- .../cluster/logging/DataModelLogger.cpp | 4 +- 18 files changed, 96 insertions(+), 112 deletions(-) diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 6ba9965f5e501a..5318b0c3454324 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -10260,7 +10260,7 @@ provisional cluster TlsCertificateManagement = 2049 { struct TLSClientCertificateDetailStruct { int16u ccdid = 0; long_octet_string<3000> clientCertificate = 1; - octet_string intermediateCerts[] = 2; + octet_string intermediateCertificates[] = 2; } readonly attribute int8u maxRootCertificates = 0; @@ -10276,7 +10276,7 @@ provisional cluster TlsCertificateManagement = 2049 { request struct ProvisionRootCertificateRequest { long_octet_string<3000> certificate = 0; - optional nullable int16u caid = 1; + nullable int16u caid = 1; } response struct ProvisionRootCertificateResponse = 1 { @@ -10284,7 +10284,7 @@ provisional cluster TlsCertificateManagement = 2049 { } request struct FindRootCertificateRequest { - optional nullable int16u caid = 0; + nullable int16u caid = 0; } response struct FindRootCertificateResponse = 3 { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index a9b519f94f6087..0181b844681aea 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -63895,11 +63895,11 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void provisionRootCertificate(ProvisionRootCertificateResponseCallback callback, byte[] certificate, @Nullable Optional caid) { + public void provisionRootCertificate(ProvisionRootCertificateResponseCallback callback, byte[] certificate, @Nullable Integer caid) { provisionRootCertificate(callback, certificate, caid, 0); } - public void provisionRootCertificate(ProvisionRootCertificateResponseCallback callback, byte[] certificate, @Nullable Optional caid, int timedInvokeTimeoutMs) { + public void provisionRootCertificate(ProvisionRootCertificateResponseCallback callback, byte[] certificate, @Nullable Integer caid, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); @@ -63908,7 +63908,7 @@ public void provisionRootCertificate(ProvisionRootCertificateResponseCallback ca elements.add(new StructElement(certificateFieldID, certificatetlvValue)); final long caidFieldID = 1L; - BaseTLVType caidtlvValue = caid != null ? caid.map((nonOptionalcaid) -> new UIntType(nonOptionalcaid)).orElse(new EmptyType()) : new NullType(); + BaseTLVType caidtlvValue = caid != null ? new UIntType(caid) : new NullType(); elements.add(new StructElement(caidFieldID, caidtlvValue)); StructType commandArgs = new StructType(elements); @@ -63929,16 +63929,16 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void findRootCertificate(FindRootCertificateResponseCallback callback, @Nullable Optional caid) { + public void findRootCertificate(FindRootCertificateResponseCallback callback, @Nullable Integer caid) { findRootCertificate(callback, caid, 0); } - public void findRootCertificate(FindRootCertificateResponseCallback callback, @Nullable Optional caid, int timedInvokeTimeoutMs) { + public void findRootCertificate(FindRootCertificateResponseCallback callback, @Nullable Integer caid, int timedInvokeTimeoutMs) { final long commandId = 2L; ArrayList elements = new ArrayList<>(); final long caidFieldID = 0L; - BaseTLVType caidtlvValue = caid != null ? caid.map((nonOptionalcaid) -> new UIntType(nonOptionalcaid)).orElse(new EmptyType()) : new NullType(); + BaseTLVType caidtlvValue = caid != null ? new UIntType(caid) : new NullType(); elements.add(new StructElement(caidFieldID, caidtlvValue)); StructType commandArgs = new StructType(elements); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index bf6f5e2c03ddb9..cdb24f312135b9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -15303,26 +15303,26 @@ public String toString() { public static class TlsCertificateManagementClusterTLSClientCertificateDetailStruct { public Integer ccdid; public byte[] clientCertificate; - public ArrayList intermediateCerts; + public ArrayList intermediateCertificates; private static final long CCDID_ID = 0L; private static final long CLIENT_CERTIFICATE_ID = 1L; - private static final long INTERMEDIATE_CERTS_ID = 2L; + private static final long INTERMEDIATE_CERTIFICATES_ID = 2L; public TlsCertificateManagementClusterTLSClientCertificateDetailStruct( Integer ccdid, byte[] clientCertificate, - ArrayList intermediateCerts + ArrayList intermediateCertificates ) { this.ccdid = ccdid; this.clientCertificate = clientCertificate; - this.intermediateCerts = intermediateCerts; + this.intermediateCertificates = intermediateCertificates; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(CCDID_ID, new UIntType(ccdid))); values.add(new StructElement(CLIENT_CERTIFICATE_ID, new ByteArrayType(clientCertificate))); - values.add(new StructElement(INTERMEDIATE_CERTS_ID, ArrayType.generateArrayType(intermediateCerts, (elementintermediateCerts) -> new ByteArrayType(elementintermediateCerts)))); + values.add(new StructElement(INTERMEDIATE_CERTIFICATES_ID, ArrayType.generateArrayType(intermediateCertificates, (elementintermediateCertificates) -> new ByteArrayType(elementintermediateCertificates)))); return new StructType(values); } @@ -15333,7 +15333,7 @@ public static TlsCertificateManagementClusterTLSClientCertificateDetailStruct de } Integer ccdid = null; byte[] clientCertificate = null; - ArrayList intermediateCerts = null; + ArrayList intermediateCertificates = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == CCDID_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -15345,17 +15345,17 @@ public static TlsCertificateManagementClusterTLSClientCertificateDetailStruct de ByteArrayType castingValue = element.value(ByteArrayType.class); clientCertificate = castingValue.value(byte[].class); } - } else if (element.contextTagNum() == INTERMEDIATE_CERTS_ID) { + } else if (element.contextTagNum() == INTERMEDIATE_CERTIFICATES_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Array) { ArrayType castingValue = element.value(ArrayType.class); - intermediateCerts = castingValue.map((elementcastingValue) -> elementcastingValue.value(byte[].class)); + intermediateCertificates = castingValue.map((elementcastingValue) -> elementcastingValue.value(byte[].class)); } } } return new TlsCertificateManagementClusterTLSClientCertificateDetailStruct( ccdid, clientCertificate, - intermediateCerts + intermediateCertificates ); } @@ -15369,8 +15369,8 @@ public String toString() { output.append("\tclientCertificate: "); output.append(Arrays.toString(clientCertificate)); output.append("\n"); - output.append("\tintermediateCerts: "); - output.append(intermediateCerts); + output.append("\tintermediateCertificates: "); + output.append(intermediateCertificates); output.append("\n"); output.append("}\n"); return output.toString(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index f837fe7926c417..f547b452ee0015 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -30813,7 +30813,7 @@ public Map> getCommandMap() { CommandParameterInfo tlsCertificateManagementprovisionRootCertificatecertificateCommandParameterInfo = new CommandParameterInfo("certificate", byte[].class, byte[].class); tlsCertificateManagementprovisionRootCertificateCommandParams.put("certificate",tlsCertificateManagementprovisionRootCertificatecertificateCommandParameterInfo); - CommandParameterInfo tlsCertificateManagementprovisionRootCertificatecaidCommandParameterInfo = new CommandParameterInfo("caid", Optional.class, Integer.class); + CommandParameterInfo tlsCertificateManagementprovisionRootCertificatecaidCommandParameterInfo = new CommandParameterInfo("caid", Integer.class, Integer.class); tlsCertificateManagementprovisionRootCertificateCommandParams.put("caid",tlsCertificateManagementprovisionRootCertificatecaidCommandParameterInfo); InteractionInfo tlsCertificateManagementprovisionRootCertificateInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -30822,7 +30822,7 @@ public Map> getCommandMap() { , (byte[]) commandArguments.get("certificate") - , (Optional) + , (Integer) commandArguments.get("caid") ); @@ -30834,13 +30834,13 @@ public Map> getCommandMap() { Map tlsCertificateManagementfindRootCertificateCommandParams = new LinkedHashMap(); - CommandParameterInfo tlsCertificateManagementfindRootCertificatecaidCommandParameterInfo = new CommandParameterInfo("caid", Optional.class, Integer.class); + CommandParameterInfo tlsCertificateManagementfindRootCertificatecaidCommandParameterInfo = new CommandParameterInfo("caid", Integer.class, Integer.class); tlsCertificateManagementfindRootCertificateCommandParams.put("caid",tlsCertificateManagementfindRootCertificatecaidCommandParameterInfo); InteractionInfo tlsCertificateManagementfindRootCertificateInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.TlsCertificateManagementCluster) cluster) .findRootCertificate((ChipClusters.TlsCertificateManagementCluster.FindRootCertificateResponseCallback) callback - , (Optional) + , (Integer) commandArguments.get("caid") ); diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt index bc248f23194310..eb53f1ebc03d66 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt @@ -26,13 +26,13 @@ import matter.tlv.TlvWriter class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( val ccdid: UInt, val clientCertificate: ByteArray, - val intermediateCerts: List, + val intermediateCertificates: List, ) { override fun toString(): String = buildString { append("TlsCertificateManagementClusterTLSClientCertificateDetailStruct {\n") append("\tccdid : $ccdid\n") append("\tclientCertificate : $clientCertificate\n") - append("\tintermediateCerts : $intermediateCerts\n") + append("\tintermediateCertificates : $intermediateCertificates\n") append("}\n") } @@ -41,8 +41,8 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_CCDID), ccdid) put(ContextSpecificTag(TAG_CLIENT_CERTIFICATE), clientCertificate) - startArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTS)) - for (item in intermediateCerts.iterator()) { + startArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES)) + for (item in intermediateCertificates.iterator()) { put(AnonymousTag, item) } endArray() @@ -53,7 +53,7 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( companion object { private const val TAG_CCDID = 0 private const val TAG_CLIENT_CERTIFICATE = 1 - private const val TAG_INTERMEDIATE_CERTS = 2 + private const val TAG_INTERMEDIATE_CERTIFICATES = 2 fun fromTlv( tlvTag: Tag, @@ -62,9 +62,9 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( tlvReader.enterStructure(tlvTag) val ccdid = tlvReader.getUInt(ContextSpecificTag(TAG_CCDID)) val clientCertificate = tlvReader.getByteArray(ContextSpecificTag(TAG_CLIENT_CERTIFICATE)) - val intermediateCerts = + val intermediateCertificates = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTS)) + tlvReader.enterArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES)) while (!tlvReader.isEndOfContainer()) { add(tlvReader.getByteArray(AnonymousTag)) } @@ -76,7 +76,7 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( return TlsCertificateManagementClusterTLSClientCertificateDetailStruct( ccdid, clientCertificate, - intermediateCerts, + intermediateCertificates, ) } } diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt index 3360c9ab7cdc20..17382492b9260b 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt @@ -26,13 +26,13 @@ import matter.tlv.TlvWriter class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( val ccdid: UShort, val clientCertificate: ByteArray, - val intermediateCerts: List, + val intermediateCertificates: List, ) { override fun toString(): String = buildString { append("TlsCertificateManagementClusterTLSClientCertificateDetailStruct {\n") append("\tccdid : $ccdid\n") append("\tclientCertificate : $clientCertificate\n") - append("\tintermediateCerts : $intermediateCerts\n") + append("\tintermediateCertificates : $intermediateCertificates\n") append("}\n") } @@ -41,8 +41,8 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_CCDID), ccdid) put(ContextSpecificTag(TAG_CLIENT_CERTIFICATE), clientCertificate) - startArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTS)) - for (item in intermediateCerts.iterator()) { + startArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES)) + for (item in intermediateCertificates.iterator()) { put(AnonymousTag, item) } endArray() @@ -53,7 +53,7 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( companion object { private const val TAG_CCDID = 0 private const val TAG_CLIENT_CERTIFICATE = 1 - private const val TAG_INTERMEDIATE_CERTS = 2 + private const val TAG_INTERMEDIATE_CERTIFICATES = 2 fun fromTlv( tlvTag: Tag, @@ -62,9 +62,9 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( tlvReader.enterStructure(tlvTag) val ccdid = tlvReader.getUShort(ContextSpecificTag(TAG_CCDID)) val clientCertificate = tlvReader.getByteArray(ContextSpecificTag(TAG_CLIENT_CERTIFICATE)) - val intermediateCerts = + val intermediateCertificates = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTS)) + tlvReader.enterArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES)) while (!tlvReader.isEndOfContainer()) { add(tlvReader.getByteArray(AnonymousTag)) } @@ -76,7 +76,7 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( return TlsCertificateManagementClusterTLSClientCertificateDetailStruct( ccdid, clientCertificate, - intermediateCerts, + intermediateCertificates, ) } } diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 210e0e51e98748..56962ed979bfb5 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -47953,12 +47953,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="ccdid", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="clientCertificate", Tag=1, Type=bytes), - ClusterObjectFieldDescriptor(Label="intermediateCerts", Tag=2, Type=typing.List[bytes]), + ClusterObjectFieldDescriptor(Label="intermediateCertificates", Tag=2, Type=typing.List[bytes]), ]) ccdid: 'uint' = 0 clientCertificate: 'bytes' = b"" - intermediateCerts: 'typing.List[bytes]' = field(default_factory=lambda: []) + intermediateCertificates: 'typing.List[bytes]' = field(default_factory=lambda: []) class Commands: @dataclass @@ -47973,11 +47973,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="certificate", Tag=0, Type=bytes), - ClusterObjectFieldDescriptor(Label="caid", Tag=1, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="caid", Tag=1, Type=typing.Union[Nullable, uint]), ]) certificate: bytes = b"" - caid: typing.Union[None, Nullable, uint] = None + caid: typing.Union[Nullable, uint] = NullValue @dataclass class ProvisionRootCertificateResponse(ClusterCommand): @@ -48006,10 +48006,10 @@ class FindRootCertificate(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="caid", Tag=0, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="caid", Tag=0, Type=typing.Union[Nullable, uint]), ]) - caid: typing.Union[None, Nullable, uint] = None + caid: typing.Union[Nullable, uint] = NullValue @dataclass class FindRootCertificateResponse(ClusterCommand): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 08ed47e9a583f7..f97af6e1f9d195 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -15030,9 +15030,7 @@ MTR_PROVISIONALLY_AVAILABLE * * This command SHALL return the TLSCertStruct for the passed in CAID. */ -- (void)findRootCertificateWithParams:(MTRTLSCertificateManagementClusterFindRootCertificateParams * _Nullable)params completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)findRootCertificateWithCompletion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; +- (void)findRootCertificateWithParams:(MTRTLSCertificateManagementClusterFindRootCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; /** * Command LookupRootCertificate * diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 6bbe704dde909a..784e5175288cff 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -102176,11 +102176,7 @@ - (void)provisionRootCertificateWithParams:(MTRTLSCertificateManagementClusterPr queue:self.callbackQueue completion:responseHandler]; } -- (void)findRootCertificateWithCompletion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self findRootCertificateWithParams:nil completion:completion]; -} -- (void)findRootCertificateWithParams:(MTRTLSCertificateManagementClusterFindRootCertificateParams * _Nullable)params completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)findRootCertificateWithParams:(MTRTLSCertificateManagementClusterFindRootCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { params = [[MTRTLSCertificateManagementClusterFindRootCertificateParams diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index aa9f3cc1a5d06d..0c0d83b02fb075 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -7032,9 +7032,7 @@ MTR_PROVISIONALLY_AVAILABLE @interface MTRClusterTLSCertificateManagement : MTRGenericCluster - (void)provisionRootCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterProvisionRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)findRootCertificateWithParams:(MTRTLSCertificateManagementClusterFindRootCertificateParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)findRootCertificateWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; +- (void)findRootCertificateWithParams:(MTRTLSCertificateManagementClusterFindRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)lookupRootCertificateWithParams:(MTRTLSCertificateManagementClusterLookupRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterLookupRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)removeRootCertificateWithParams:(MTRTLSCertificateManagementClusterRemoveRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)TLSClientCSRWithParams:(MTRTLSCertificateManagementClusterTLSClientCSRParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterTLSClientCSRResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 2a9c67057a7592..143b7c2045a842 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -20391,11 +20391,7 @@ - (void)provisionRootCertificateWithParams:(MTRTLSCertificateManagementClusterPr completion:responseHandler]; } -- (void)findRootCertificateWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self findRootCertificateWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)findRootCertificateWithParams:(MTRTLSCertificateManagementClusterFindRootCertificateParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)findRootCertificateWithParams:(MTRTLSCertificateManagementClusterFindRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { params = [[MTRTLSCertificateManagementClusterFindRootCertificateParams diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 2ed68542500933..de680158dc31fd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -35350,14 +35350,11 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.certificate = AsByteSpan(self.certificate); } { - if (self.caid != nil) { - auto & definedValue_0 = encodableStruct.caid.Emplace(); - if (self.caid == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = self.caid.unsignedShortValue; - } + if (self.caid == nil) { + encodableStruct.caid.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.caid.SetNonNull(); + nonNullValue_0 = self.caid.unsignedShortValue; } } @@ -35516,14 +35513,11 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader chip::app::Clusters::TlsCertificateManagement::Commands::FindRootCertificate::Type encodableStruct; ListFreer listFreer; { - if (self.caid != nil) { - auto & definedValue_0 = encodableStruct.caid.Emplace(); - if (self.caid == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = self.caid.unsignedShortValue; - } + if (self.caid == nil) { + encodableStruct.caid.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.caid.SetNonNull(); + nonNullValue_0 = self.caid.unsignedShortValue; } } @@ -36114,26 +36108,26 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.clientCertificateDetails.ccdid = self.clientCertificateDetails.ccdid.unsignedShortValue; encodableStruct.clientCertificateDetails.clientCertificate = AsByteSpan(self.clientCertificateDetails.clientCertificate); { - using ListType_1 = std::remove_reference_t; + using ListType_1 = std::remove_reference_t; using ListMemberType_1 = ListMemberTypeGetter::Type; - if (self.clientCertificateDetails.intermediateCerts.count != 0) { - auto * listHolder_1 = new ListHolder(self.clientCertificateDetails.intermediateCerts.count); + if (self.clientCertificateDetails.intermediateCertificates.count != 0) { + auto * listHolder_1 = new ListHolder(self.clientCertificateDetails.intermediateCertificates.count); if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < self.clientCertificateDetails.intermediateCerts.count; ++i_1) { - auto element_1 = MTR_SAFE_CAST(self.clientCertificateDetails.intermediateCerts[i_1], NSData); + for (size_t i_1 = 0; i_1 < self.clientCertificateDetails.intermediateCertificates.count; ++i_1) { + auto element_1 = MTR_SAFE_CAST(self.clientCertificateDetails.intermediateCertificates[i_1], NSData); if (!element_1) { // Wrong kind of value. - MTR_LOG_ERROR("%@ incorrectly present in list of %@", self.clientCertificateDetails.intermediateCerts[i_1], NSStringFromClass(NSData.class)); + MTR_LOG_ERROR("%@ incorrectly present in list of %@", self.clientCertificateDetails.intermediateCertificates[i_1], NSStringFromClass(NSData.class)); return CHIP_ERROR_INVALID_ARGUMENT; } listHolder_1->mList[i_1] = AsByteSpan(element_1); } - encodableStruct.clientCertificateDetails.intermediateCerts = ListType_1(listHolder_1->mList, self.clientCertificateDetails.intermediateCerts.count); + encodableStruct.clientCertificateDetails.intermediateCertificates = ListType_1(listHolder_1->mList, self.clientCertificateDetails.intermediateCertificates.count); } else { - encodableStruct.clientCertificateDetails.intermediateCerts = ListType_1(); + encodableStruct.clientCertificateDetails.intermediateCertificates = ListType_1(); } } } @@ -36417,7 +36411,7 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::TlsCerti newElement_0.clientCertificate = AsData(entry_0.clientCertificate); { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.intermediateCerts.begin(); + auto iter_2 = entry_0.intermediateCertificates.begin(); while (iter_2.Next()) { auto & entry_2 = iter_2.GetValue(); NSData * newElement_2; @@ -36428,7 +36422,7 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::TlsCerti if (err != CHIP_NO_ERROR) { return err; } - newElement_0.intermediateCerts = array_2; + newElement_0.intermediateCertificates = array_2; } [array_0 addObject:newElement_0]; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 2ee7c2ad2002ce..42fe914871a62f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -2393,7 +2393,7 @@ MTR_PROVISIONALLY_AVAILABLE @interface MTRTLSCertificateManagementClusterTLSClientCertificateDetailStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull ccdid MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSData * _Nonnull clientCertificate MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull intermediateCerts MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull intermediateCertificates MTR_PROVISIONALLY_AVAILABLE; @end MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 686aeafb37f0ef..167ab8c7aefb5d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -9965,7 +9965,7 @@ - (instancetype)init _clientCertificate = [NSData data]; - _intermediateCerts = [NSArray array]; + _intermediateCertificates = [NSArray array]; } return self; } @@ -9976,14 +9976,14 @@ - (id)copyWithZone:(NSZone * _Nullable)zone other.ccdid = self.ccdid; other.clientCertificate = self.clientCertificate; - other.intermediateCerts = self.intermediateCerts; + other.intermediateCertificates = self.intermediateCertificates; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: ccdid:%@; clientCertificate:%@; intermediateCerts:%@; >", NSStringFromClass([self class]), _ccdid, [_clientCertificate base64EncodedStringWithOptions:0], _intermediateCerts]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: ccdid:%@; clientCertificate:%@; intermediateCertificates:%@; >", NSStringFromClass([self class]), _ccdid, [_clientCertificate base64EncodedStringWithOptions:0], _intermediateCertificates]; return descriptionString; } diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 2eb363ddf4a3ef..e5ba4ff5735379 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -31891,7 +31891,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kCcdid), ccdid); encoder.Encode(to_underlying(Fields::kClientCertificate), clientCertificate); - encoder.Encode(to_underlying(Fields::kIntermediateCerts), intermediateCerts); + encoder.Encode(to_underlying(Fields::kIntermediateCertificates), intermediateCertificates); return encoder.Finalize(); } @@ -31917,9 +31917,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, clientCertificate); } - else if (__context_tag == to_underlying(Fields::kIntermediateCerts)) + else if (__context_tag == to_underlying(Fields::kIntermediateCertificates)) { - err = DataModel::Decode(reader, intermediateCerts); + err = DataModel::Decode(reader, intermediateCertificates); } else { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index f5d7d2b84bdfbe..065ccbcff7c955 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -44307,9 +44307,9 @@ using DecodableType = Type; namespace TLSClientCertificateDetailStruct { enum class Fields : uint8_t { - kCcdid = 0, - kClientCertificate = 1, - kIntermediateCerts = 2, + kCcdid = 0, + kClientCertificate = 1, + kIntermediateCertificates = 2, }; struct Type @@ -44317,7 +44317,7 @@ struct Type public: uint16_t ccdid = static_cast(0); chip::ByteSpan clientCertificate; - DataModel::List intermediateCerts; + DataModel::List intermediateCertificates; static constexpr bool kIsFabricScoped = false; @@ -44329,7 +44329,7 @@ struct DecodableType public: uint16_t ccdid = static_cast(0); chip::ByteSpan clientCertificate; - DataModel::DecodableList intermediateCerts; + DataModel::DecodableList intermediateCertificates; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -44440,7 +44440,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::TlsCertificateManagement::Id; } chip::ByteSpan certificate; - Optional> caid; + DataModel::Nullable caid; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -44456,7 +44456,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::TlsCertificateManagement::Id; } chip::ByteSpan certificate; - Optional> caid; + DataModel::Nullable caid; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ProvisionRootCertificate @@ -44505,7 +44505,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::FindRootCertificate::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TlsCertificateManagement::Id; } - Optional> caid; + DataModel::Nullable caid; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -44520,7 +44520,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::FindRootCertificate::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TlsCertificateManagement::Id; } - Optional> caid; + DataModel::Nullable caid; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace FindRootCertificate diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 477846ed176d83..126948907651c4 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -6762,8 +6762,9 @@ CHIP_ERROR ComplexArgumentParser::Setup( ComplexArgumentParser::EnsureMemberExist("TLSClientCertificateDetailStruct.ccdid", "ccdid", value.isMember("ccdid"))); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TLSClientCertificateDetailStruct.clientCertificate", "clientCertificate", value.isMember("clientCertificate"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TLSClientCertificateDetailStruct.intermediateCerts", - "intermediateCerts", value.isMember("intermediateCerts"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TLSClientCertificateDetailStruct.intermediateCertificates", + "intermediateCertificates", + value.isMember("intermediateCertificates"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "ccdid"); @@ -6774,9 +6775,10 @@ CHIP_ERROR ComplexArgumentParser::Setup( ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.clientCertificate, value["clientCertificate"])); valueCopy.removeMember("clientCertificate"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "intermediateCerts"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.intermediateCerts, value["intermediateCerts"])); - valueCopy.removeMember("intermediateCerts"); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "intermediateCertificates"); + ReturnErrorOnFailure( + ComplexArgumentParser::Setup(labelWithMember, request.intermediateCertificates, value["intermediateCertificates"])); + valueCopy.removeMember("intermediateCertificates"); return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); } @@ -6786,7 +6788,7 @@ void ComplexArgumentParser::Finalize( { ComplexArgumentParser::Finalize(request.ccdid); ComplexArgumentParser::Finalize(request.clientCertificate); - ComplexArgumentParser::Finalize(request.intermediateCerts); + ComplexArgumentParser::Finalize(request.intermediateCertificates); } CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type & request, diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 7a8b13ac40b069..9d32af2ea0b369 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -6009,10 +6009,10 @@ CHIP_ERROR DataModelLogger::LogValue( } } { - CHIP_ERROR err = LogValue("IntermediateCerts", indent + 1, value.intermediateCerts); + CHIP_ERROR err = LogValue("IntermediateCertificates", indent + 1, value.intermediateCertificates); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'IntermediateCerts'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'IntermediateCertificates'"); return err; } }