googleapis / googleapis/gapic-generator-php
snippet gen feature request: add UpdateMask to update samples
- Dominant language
- PHP
- Stars
- 14
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Many of the `update` RPC methods require a `FieldMask` in order to have an effect. This is conveyed in the samples like [VideoStitcherServiceClient::updateCdnKey](https://cloud.google.com/php/docs/reference/cloud-video-stitcher/latest/V1.VideoStitcherServiceClient#_Google_Cloud_Video_Stitcher_V1_VideoStitcherServiceClient__updateCdnKey__) where the parameter is required, but in other RPCs such as [LivestreamServiceClient::updateInput](https://cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.LivestreamServiceClient#_Google_Cloud_Video_LiveStream_V1_LivestreamServiceClient__updateInput__), it's not obvious to the user that this is required. And the effect of not knowing this is that the RPC call has no effect (no fields are updated), even though the request is successful.
When the `updateMask` parameter is marked optional, it would be more useful if we included creating the `updateMask` as part of the sample.
This may be addressed once we release support in PHP for `method_signature` annotations (see https://google.aip.dev/134)
Contributor guide
Assessment
This issue has not been assessed yet.