Skip to content

Commit da705de

Browse files
committed
add default values
1 parent 9233d63 commit da705de

File tree

1 file changed

+20
-11
lines changed
  • firebase-auth-rest/core/src/main/java/com/anotherdev/firebase/auth

1 file changed

+20
-11
lines changed

firebase-auth-rest/core/src/main/java/com/anotherdev/firebase/auth/UserInfo.java

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,34 @@
66
import org.immutables.value.Value;
77

88
@Value.Immutable
9-
@Value.Style(
10-
strictBuilder = true,
11-
visibility = Value.Style.ImplementationVisibility.PACKAGE
12-
)
9+
@Value.Style(strictBuilder = true)
1310
@Gson.TypeAdapters
1411
public interface UserInfo {
1512

13+
@SerializedName("rawId")
14+
String getUid();
15+
16+
@Value.Default
1617
@SerializedName("displayName")
17-
String getDisplayName();
18+
default String getDisplayName() {
19+
return "";
20+
}
1821

22+
@Value.Default
1923
@SerializedName("email")
20-
String getEmail();
24+
default String getEmail() {
25+
return "";
26+
}
2127

28+
@Value.Default
2229
@SerializedName("photoUrl")
23-
String getPhotoUrl();
30+
default String getPhotoUrl() {
31+
return "";
32+
}
2433

34+
@Value.Default
2535
@SerializedName("providerId")
26-
String getProviderId();
27-
28-
@SerializedName("rawId")
29-
String getUid();
36+
default String getProviderId() {
37+
return "";
38+
}
3039
}

0 commit comments

Comments
 (0)