mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
feat(mobile): add three-state field serialization (#27231)
* bump to v7.22.0 and update patching * gen client * migrate mobile call sites
This commit is contained in:
parent
1bb7517da0
commit
96d521e149
161 changed files with 3531 additions and 3369 deletions
26
mobile/openapi/lib/model/pin_code_reset_dto.dart
generated
26
mobile/openapi/lib/model/pin_code_reset_dto.dart
generated
|
|
@ -13,8 +13,8 @@ part of openapi.api;
|
|||
class PinCodeResetDto {
|
||||
/// Returns a new [PinCodeResetDto] instance.
|
||||
PinCodeResetDto({
|
||||
this.password,
|
||||
this.pinCode,
|
||||
this.password = const Optional.absent(),
|
||||
this.pinCode = const Optional.absent(),
|
||||
});
|
||||
|
||||
/// User password (required if PIN code is not provided)
|
||||
|
|
@ -24,7 +24,7 @@ class PinCodeResetDto {
|
|||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? password;
|
||||
Optional<String?> password;
|
||||
|
||||
/// New PIN code (4-6 digits)
|
||||
///
|
||||
|
|
@ -33,7 +33,7 @@ class PinCodeResetDto {
|
|||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? pinCode;
|
||||
Optional<String?> pinCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is PinCodeResetDto &&
|
||||
|
|
@ -51,15 +51,13 @@ class PinCodeResetDto {
|
|||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.password != null) {
|
||||
json[r'password'] = this.password;
|
||||
} else {
|
||||
// json[r'password'] = null;
|
||||
if (this.password.isPresent) {
|
||||
final value = this.password.value;
|
||||
json[r'password'] = value;
|
||||
}
|
||||
if (this.pinCode != null) {
|
||||
json[r'pinCode'] = this.pinCode;
|
||||
} else {
|
||||
// json[r'pinCode'] = null;
|
||||
if (this.pinCode.isPresent) {
|
||||
final value = this.pinCode.value;
|
||||
json[r'pinCode'] = value;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
|
@ -73,8 +71,8 @@ class PinCodeResetDto {
|
|||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return PinCodeResetDto(
|
||||
password: mapValueOfType<String>(json, r'password'),
|
||||
pinCode: mapValueOfType<String>(json, r'pinCode'),
|
||||
password: json.containsKey(r'password') ? Optional.present(mapValueOfType<String>(json, r'password')) : const Optional.absent(),
|
||||
pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType<String>(json, r'pinCode')) : const Optional.absent(),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue