{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/60","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/60/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/60/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/issues/60","id":76056390,"number":60,"title":"The result of a patch metadata is a union rather than replacement.","user":{"login":"aozarov","id":8921691,"avatar_url":"https://avatars.githubusercontent.com/u/8921691?v=3","gravatar_id":"","url":"https://api.github.com/users/aozarov","html_url":"https://github.com/aozarov","followers_url":"https://api.github.com/users/aozarov/followers","following_url":"https://api.github.com/users/aozarov/following{/other_user}","gists_url":"https://api.github.com/users/aozarov/gists{/gist_id}","starred_url":"https://api.github.com/users/aozarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aozarov/subscriptions","organizations_url":"https://api.github.com/users/aozarov/orgs","repos_url":"https://api.github.com/users/aozarov/repos","events_url":"https://api.github.com/users/aozarov/events{/privacy}","received_events_url":"https://api.github.com/users/aozarov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/labels/storage","name":"storage","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/milestones/10","html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/milestones/Needed%20for%20public%20announcement","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/milestones/10/labels","id":1143457,"number":10,"title":"Needed for public announcement","description":"","creator":{"login":"jgeewax","id":112928,"avatar_url":"https://avatars.githubusercontent.com/u/112928?v=3","gravatar_id":"","url":"https://api.github.com/users/jgeewax","html_url":"https://github.com/jgeewax","followers_url":"https://api.github.com/users/jgeewax/followers","following_url":"https://api.github.com/users/jgeewax/following{/other_user}","gists_url":"https://api.github.com/users/jgeewax/gists{/gist_id}","starred_url":"https://api.github.com/users/jgeewax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgeewax/subscriptions","organizations_url":"https://api.github.com/users/jgeewax/orgs","repos_url":"https://api.github.com/users/jgeewax/repos","events_url":"https://api.github.com/users/jgeewax/events{/privacy}","received_events_url":"https://api.github.com/users/jgeewax/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":11,"state":"open","created_at":"2015-06-01T17:59:37Z","updated_at":"2015-10-13T21:01:54Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-05-13T17:06:44Z","updated_at":"2015-10-14T08:18:48Z","closed_at":null,"body":"It looks like patch operations do not work well with Map attributes (such as metadata) and instead of replacing the map content (which is backed by repeated message) it merges it."},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/comments/147970571","html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/issues/60#issuecomment-147970571","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/60","id":147970571,"user":{"login":"mziccard","id":450933,"avatar_url":"https://avatars.githubusercontent.com/u/450933?v=3","gravatar_id":"","url":"https://api.github.com/users/mziccard","html_url":"https://github.com/mziccard","followers_url":"https://api.github.com/users/mziccard/followers","following_url":"https://api.github.com/users/mziccard/following{/other_user}","gists_url":"https://api.github.com/users/mziccard/gists{/gist_id}","starred_url":"https://api.github.com/users/mziccard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mziccard/subscriptions","organizations_url":"https://api.github.com/users/mziccard/orgs","repos_url":"https://api.github.com/users/mziccard/repos","events_url":"https://api.github.com/users/mziccard/events{/privacy}","received_events_url":"https://api.github.com/users/mziccard/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T08:18:48Z","updated_at":"2015-10-14T08:18:48Z","body":"I double checked and this \"problem\" persists.\r\ngcloud-node guys ended up documenting that the `setMetadata` method actually merges metadata. \r\n> Merge the given metadata with the current remote file's metadata. This will set metadata if it was previously unset or update previously set metadata. To unset previously set metadata, set its value to null.\r\n\r\nWe could do something similar for `update`. Notice that in our case setting metadata to `null` does not unset remote metadata.\r\n"}}