rclone/vendor/cloud.google.com/go/firestore/testdata/update-st-multi.textproto
2018-01-16 13:20:59 +00:00

50 lines
1.5 KiB
Plaintext

# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A document can have more than one ServerTimestamp field. Since all the
# ServerTimestamp fields are removed, the only field in the update is "a".
# b is not in the mask because it will be set in the transform. c must be in the
# mask: it should be replaced entirely. The transform will set c.d to the
# timestamp, but the update will delete the rest of c.
description: "update: multiple ServerTimestamp fields"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\", \"c\": {\"d\": \"ServerTimestamp\"}}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
field_paths: "c"
>
current_document: <
exists: true
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "b"
set_to_server_value: REQUEST_TIME
>
field_transforms: <
field_path: "c.d"
set_to_server_value: REQUEST_TIME
>
>
>
>
>