/** * * * <pre> * An array value. * Cannot directly contain another array value, though can contain an * map which contains another array. * </pre> * * <code>.google.firestore.v1beta1.ArrayValue array_value = 9;</code> */ public Builder setArrayValue(com.google.firestore.v1beta1.ArrayValue.Builder builderForValue) { if (arrayValueBuilder_ == null) { valueType_ = builderForValue.build(); onChanged(); } else { arrayValueBuilder_.setMessage(builderForValue.build()); } valueTypeCase_ = 9; return this; } /**
/** * * * <pre> * Remove all of the given elements from the array in the field. * If the field is not an array, or if the field does not yet exist, it is * set to the empty array. * Equivalent numbers of the different types (e.g. 3L and 3.0) are * considered equal when deciding whether an element should be removed. * NaN is equal to NaN, and Null is equal to Null. * This will remove all equivalent values if there are duplicates. * The corresponding transform_result will be the null value. * </pre> * * <code>.google.firestore.v1beta1.ArrayValue remove_all_from_array = 7;</code> */ public Builder setRemoveAllFromArray( com.google.firestore.v1beta1.ArrayValue.Builder builderForValue) { if (removeAllFromArrayBuilder_ == null) { transformType_ = builderForValue.build(); onChanged(); } else { removeAllFromArrayBuilder_.setMessage(builderForValue.build()); } transformTypeCase_ = 7; return this; } /**
/** * * * <pre> * Append the given elements in order if they are not already present in * the current field value. * If the field is not an array, or if the field does not yet exist, it is * first set to the empty array. * Equivalent numbers of different types (e.g. 3L and 3.0) are * considered equal when checking if a value is missing. * NaN is equal to NaN, and Null is equal to Null. * If the input contains multiple equivalent values, only the first will * be considered. * The corresponding transform_result will be the null value. * </pre> * * <code>.google.firestore.v1beta1.ArrayValue append_missing_elements = 6;</code> */ public Builder setAppendMissingElements( com.google.firestore.v1beta1.ArrayValue.Builder builderForValue) { if (appendMissingElementsBuilder_ == null) { transformType_ = builderForValue.build(); onChanged(); } else { appendMissingElementsBuilder_.setMessage(builderForValue.build()); } transformTypeCase_ = 6; return this; } /**
return Value.newBuilder().setArrayValue(res.build()).build(); } else if (sanitizedObject instanceof GeoPoint) { GeoPoint geopoint = (GeoPoint) sanitizedObject;
return Value.newBuilder().setArrayValue(res.build()).build(); } else if (sanitizedObject instanceof GeoPoint) { GeoPoint geopoint = (GeoPoint) sanitizedObject;
private Value arrayValue(Value... values) { return Value.newBuilder() .setArrayValue(ArrayValue.newBuilder().addAllValues(Arrays.asList(values)).build()) .build(); }