googleapis / google-cloud-dotnet

Google Cloud Client Libraries for .NET
https://cloud.google.com/dotnet/docs/reference/
Apache License 2.0
924 stars 362 forks source link

Use of Fieldmask in some APIs #2410

Closed lx223 closed 6 years ago

lx223 commented 6 years ago

Hi there, probably a very simple question. There are many APIs with UpdateMask of Fieldmask type. I don't see a way to instantiate a Fieldmask object with Path field set. Am I missing something obvious?

jskeet commented 6 years ago

Path is a repeated field - you can populate it with a collection initializer:

var mask = new FieldMask { Path = { "a", "b", "c" } };

(Hopefully that's all you need - let me know, and I'll close the issue.)

lx223 commented 6 years ago

ah, thanks!