18
18
import com .google .firebase .firestore .model .DatabaseId ;
19
19
import com .google .firebase .firestore .model .DocumentKey ;
20
20
import com .google .firestore .v1 .ArrayValue ;
21
+ import com .google .firestore .v1 .MapValue ;
21
22
import com .google .firestore .v1 .Value ;
22
23
import com .google .protobuf .NullValue ;
23
24
import com .google .type .LatLng ;
@@ -75,8 +76,7 @@ public static Value valueOf(Object o) {
75
76
}
76
77
return Value .newBuilder ().setArrayValue (list ).build ();
77
78
} else if (o instanceof Map ) {
78
- com .google .firestore .v1 .MapValue .Builder builder =
79
- com .google .firestore .v1 .MapValue .newBuilder ();
79
+ MapValue .Builder builder = MapValue .newBuilder ();
80
80
for (Map .Entry <String , Object > entry : ((Map <String , Object >) o ).entrySet ()) {
81
81
builder .putFields (entry .getKey (), valueOf (entry .getValue ()));
82
82
}
@@ -88,8 +88,7 @@ public static Value valueOf(Object o) {
88
88
89
89
/** Creates a MapValue from a list of key/value arguments. */
90
90
public static Value map (Object ... entries ) {
91
- com .google .firestore .v1 .MapValue .Builder builder =
92
- com .google .firestore .v1 .MapValue .newBuilder ();
91
+ MapValue .Builder builder = MapValue .newBuilder ();
93
92
for (int i = 0 ; i < entries .length ; i += 2 ) {
94
93
builder .putFields ((String ) entries [i ], valueOf (entries [i + 1 ]));
95
94
}
0 commit comments