You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
+16-16
Original file line number
Diff line number
Diff line change
@@ -8382,20 +8382,20 @@ public String toString() {
8382
8382
}
8383
8383
}
8384
8384
public static class EnergyCalendarClusterDate {
8385
-
public Optional<Integer> year;
8386
-
public Optional<Integer> month;
8387
-
public Optional<Integer> day;
8388
-
public Optional<Integer> dayOfWeek;
8385
+
public @Nullable Optional<Integer> year;
8386
+
public @Nullable Optional<Integer> month;
8387
+
public @Nullable Optional<Integer> day;
8388
+
public @Nullable Optional<Integer> dayOfWeek;
8389
8389
private static final long YEAR_ID = 0L;
8390
8390
private static final long MONTH_ID = 1L;
8391
8391
private static final long DAY_ID = 2L;
8392
8392
private static final long DAY_OF_WEEK_ID = 3L;
8393
8393
8394
8394
public EnergyCalendarClusterDate(
8395
-
Optional<Integer> year,
8396
-
Optional<Integer> month,
8397
-
Optional<Integer> day,
8398
-
Optional<Integer> dayOfWeek
8395
+
@Nullable Optional<Integer> year,
8396
+
@Nullable Optional<Integer> month,
8397
+
@Nullable Optional<Integer> day,
8398
+
@Nullable Optional<Integer> dayOfWeek
8399
8399
) {
8400
8400
this.year = year;
8401
8401
this.month = month;
@@ -8405,10 +8405,10 @@ public EnergyCalendarClusterDate(
8405
8405
8406
8406
public StructType encodeTlv() {
8407
8407
ArrayList<StructElement> values = new ArrayList<>();
8408
-
values.add(new StructElement(YEAR_ID, year.<BaseTLVType>map((nonOptionalyear) -> new UIntType(nonOptionalyear)).orElse(new EmptyType())));
8409
-
values.add(new StructElement(MONTH_ID, month.<BaseTLVType>map((nonOptionalmonth) -> new UIntType(nonOptionalmonth)).orElse(new EmptyType())));
8410
-
values.add(new StructElement(DAY_ID, day.<BaseTLVType>map((nonOptionalday) -> new UIntType(nonOptionalday)).orElse(new EmptyType())));
8411
-
values.add(new StructElement(DAY_OF_WEEK_ID, dayOfWeek.<BaseTLVType>map((nonOptionaldayOfWeek) -> new UIntType(nonOptionaldayOfWeek)).orElse(new EmptyType())));
8408
+
values.add(new StructElement(YEAR_ID, year != null ? year.<BaseTLVType>map((nonOptionalyear) -> new UIntType(nonOptionalyear)).orElse(new EmptyType()) : new NullType()));
8409
+
values.add(new StructElement(MONTH_ID, month != null ? month.<BaseTLVType>map((nonOptionalmonth) -> new UIntType(nonOptionalmonth)).orElse(new EmptyType()) : new NullType()));
8410
+
values.add(new StructElement(DAY_ID, day != null ? day.<BaseTLVType>map((nonOptionalday) -> new UIntType(nonOptionalday)).orElse(new EmptyType()) : new NullType()));
8411
+
values.add(new StructElement(DAY_OF_WEEK_ID, dayOfWeek != null ? dayOfWeek.<BaseTLVType>map((nonOptionaldayOfWeek) -> new UIntType(nonOptionaldayOfWeek)).orElse(new EmptyType()) : new NullType()));
8412
8412
8413
8413
return new StructType(values);
8414
8414
}
@@ -8417,10 +8417,10 @@ public static EnergyCalendarClusterDate decodeTlv(BaseTLVType tlvValue) {
8417
8417
if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
8418
8418
return null;
8419
8419
}
8420
-
Optional<Integer> year = Optional.empty();
8421
-
Optional<Integer> month = Optional.empty();
8422
-
Optional<Integer> day = Optional.empty();
8423
-
Optional<Integer> dayOfWeek = Optional.empty();
8420
+
@Nullable Optional<Integer> year = null;
8421
+
@Nullable Optional<Integer> month = null;
8422
+
@Nullable Optional<Integer> day = null;
8423
+
@Nullable Optional<Integer> dayOfWeek = null;
8424
8424
for (StructElement element: ((StructType)tlvValue).value()) {
8425
8425
if (element.contextTagNum() == YEAR_ID) {
8426
8426
if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
0 commit comments