Skip to content

Commit c372c07

Browse files
committed
add UserProfile objects
1 parent 5db1b93 commit c372c07

File tree

3 files changed

+102
-0
lines changed

3 files changed

+102
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.anotherdev.firebase.auth;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
5+
import org.immutables.gson.Gson;
6+
import org.immutables.value.Value;
7+
8+
@Value.Immutable
9+
@Value.Style(
10+
strictBuilder = true,
11+
visibility = Value.Style.ImplementationVisibility.PACKAGE
12+
)
13+
@Gson.TypeAdapters
14+
public interface UserInfo {
15+
16+
@SerializedName("displayName")
17+
String getDisplayName();
18+
19+
@SerializedName("email")
20+
String getEmail();
21+
22+
@SerializedName("photoUrl")
23+
String getPhotoUrl();
24+
25+
@SerializedName("providerId")
26+
String getProviderId();
27+
28+
@SerializedName("rawId")
29+
String getUid();
30+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
package com.anotherdev.firebase.auth.data.model;
2+
3+
import com.anotherdev.firebase.auth.UserInfo;
4+
import com.google.gson.annotations.SerializedName;
5+
6+
import org.immutables.gson.Gson;
7+
import org.immutables.value.Value;
8+
9+
import java.util.List;
10+
11+
@Value.Immutable
12+
@Value.Style(
13+
strictBuilder = true,
14+
visibility = Value.Style.ImplementationVisibility.PACKAGE
15+
)
16+
@Gson.TypeAdapters
17+
public interface UserProfile {
18+
19+
@SerializedName("localId")
20+
String getLocalId();
21+
22+
@SerializedName("email")
23+
String getEmail();
24+
25+
@SerializedName("emailVerified")
26+
boolean isEmailVerified();
27+
28+
@SerializedName("disabled")
29+
boolean isDisabled();
30+
31+
@SerializedName("customAuth")
32+
boolean isCustomAuth();
33+
34+
@SerializedName("displayName")
35+
String getDisplayName();
36+
37+
@SerializedName("providerUserInfo")
38+
List<UserInfo> providerUserInfo();
39+
40+
@SerializedName("photoUrl")
41+
String getPhotoUrl();
42+
43+
@SerializedName("validSince")
44+
String getValidSince();
45+
46+
@SerializedName("lastLoginAt")
47+
String getLastLoginAt();
48+
49+
@SerializedName("createdAt")
50+
String getCreatedAt();
51+
52+
@SerializedName("lastRefreshAt")
53+
String getLastRefreshAt();
54+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.anotherdev.firebase.auth.rest.api.model;
2+
3+
import com.anotherdev.firebase.auth.data.model.UserProfile;
4+
import com.google.gson.annotations.SerializedName;
5+
6+
import org.immutables.gson.Gson;
7+
import org.immutables.value.Value;
8+
9+
import java.util.List;
10+
11+
@Value.Immutable
12+
@Value.Style(strictBuilder = true)
13+
@Gson.TypeAdapters
14+
public interface GetAccountInfoResponse {
15+
16+
@SerializedName("users")
17+
List<UserProfile> getUsers();
18+
}

0 commit comments

Comments
 (0)