protobuf/well_known_types/
field_mask.rs1#![allow(unknown_lints)]
6#![allow(clippy::all)]
7
8#![allow(unused_attributes)]
9#![cfg_attr(rustfmt, rustfmt::skip)]
10
11#![allow(box_pointers)]
12#![allow(dead_code)]
13#![allow(missing_docs)]
14#![allow(non_camel_case_types)]
15#![allow(non_snake_case)]
16#![allow(non_upper_case_globals)]
17#![allow(trivial_casts)]
18#![allow(unused_imports)]
19#![allow(unused_results)]
20#[derive(PartialEq,Clone,Default)]
23#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
24pub struct FieldMask {
25 pub paths: crate::RepeatedField<::std::string::String>,
27 #[cfg_attr(feature = "with-serde", serde(skip))]
29 pub unknown_fields: crate::UnknownFields,
30 #[cfg_attr(feature = "with-serde", serde(skip))]
31 pub cached_size: crate::CachedSize,
32}
33
34impl<'a> ::std::default::Default for &'a FieldMask {
35 fn default() -> &'a FieldMask {
36 <FieldMask as crate::Message>::default_instance()
37 }
38}
39
40impl FieldMask {
41 pub fn new() -> FieldMask {
42 ::std::default::Default::default()
43 }
44
45 pub fn get_paths(&self) -> &[::std::string::String] {
49 &self.paths
50 }
51 pub fn clear_paths(&mut self) {
52 self.paths.clear();
53 }
54
55 pub fn set_paths(&mut self, v: crate::RepeatedField<::std::string::String>) {
57 self.paths = v;
58 }
59
60 pub fn mut_paths(&mut self) -> &mut crate::RepeatedField<::std::string::String> {
62 &mut self.paths
63 }
64
65 pub fn take_paths(&mut self) -> crate::RepeatedField<::std::string::String> {
67 ::std::mem::replace(&mut self.paths, crate::RepeatedField::new())
68 }
69}
70
71impl crate::Message for FieldMask {
72 fn is_initialized(&self) -> bool {
73 true
74 }
75
76 fn merge_from(&mut self, is: &mut crate::CodedInputStream<'_>) -> crate::ProtobufResult<()> {
77 while !is.eof()? {
78 let (field_number, wire_type) = is.read_tag_unpack()?;
79 match field_number {
80 1 => {
81 crate::rt::read_repeated_string_into(wire_type, is, &mut self.paths)?;
82 },
83 _ => {
84 crate::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
85 },
86 };
87 }
88 ::std::result::Result::Ok(())
89 }
90
91 #[allow(unused_variables)]
93 fn compute_size(&self) -> u32 {
94 let mut my_size = 0;
95 for value in &self.paths {
96 my_size += crate::rt::string_size(1, &value);
97 };
98 my_size += crate::rt::unknown_fields_size(self.get_unknown_fields());
99 self.cached_size.set(my_size);
100 my_size
101 }
102
103 fn write_to_with_cached_sizes(&self, os: &mut crate::CodedOutputStream<'_>) -> crate::ProtobufResult<()> {
104 for v in &self.paths {
105 os.write_string(1, &v)?;
106 };
107 os.write_unknown_fields(self.get_unknown_fields())?;
108 ::std::result::Result::Ok(())
109 }
110
111 fn get_cached_size(&self) -> u32 {
112 self.cached_size.get()
113 }
114
115 fn get_unknown_fields(&self) -> &crate::UnknownFields {
116 &self.unknown_fields
117 }
118
119 fn mut_unknown_fields(&mut self) -> &mut crate::UnknownFields {
120 &mut self.unknown_fields
121 }
122
123 fn as_any(&self) -> &dyn (::std::any::Any) {
124 self as &dyn (::std::any::Any)
125 }
126 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
127 self as &mut dyn (::std::any::Any)
128 }
129 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
130 self
131 }
132
133 fn descriptor(&self) -> &'static crate::reflect::MessageDescriptor {
134 Self::descriptor_static()
135 }
136
137 fn new() -> FieldMask {
138 FieldMask::new()
139 }
140
141 fn descriptor_static() -> &'static crate::reflect::MessageDescriptor {
142 static descriptor: crate::rt::LazyV2<crate::reflect::MessageDescriptor> = crate::rt::LazyV2::INIT;
143 descriptor.get(|| {
144 let mut fields = ::std::vec::Vec::new();
145 fields.push(crate::reflect::accessor::make_repeated_field_accessor::<_, crate::types::ProtobufTypeString>(
146 "paths",
147 |m: &FieldMask| { &m.paths },
148 |m: &mut FieldMask| { &mut m.paths },
149 ));
150 crate::reflect::MessageDescriptor::new_pb_name::<FieldMask>(
151 "FieldMask",
152 fields,
153 file_descriptor_proto()
154 )
155 })
156 }
157
158 fn default_instance() -> &'static FieldMask {
159 static instance: crate::rt::LazyV2<FieldMask> = crate::rt::LazyV2::INIT;
160 instance.get(FieldMask::new)
161 }
162}
163
164impl crate::Clear for FieldMask {
165 fn clear(&mut self) {
166 self.paths.clear();
167 self.unknown_fields.clear();
168 }
169}
170
171impl ::std::fmt::Debug for FieldMask {
172 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
173 crate::text_format::fmt(self, f)
174 }
175}
176
177impl crate::reflect::ProtobufValue for FieldMask {
178 fn as_ref(&self) -> crate::reflect::ReflectValueRef {
179 crate::reflect::ReflectValueRef::Message(self)
180 }
181}
182
183static file_descriptor_proto_data: &'static [u8] = b"\
184 \n\x20google/protobuf/field_mask.proto\x12\x0fgoogle.protobuf\"!\n\tFiel\
185 dMask\x12\x14\n\x05paths\x18\x01\x20\x03(\tR\x05pathsB\x85\x01\n\x13com.\
186 google.protobufB\x0eFieldMaskProtoP\x01Z2google.golang.org/protobuf/type\
187 s/known/fieldmaskpb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobu\
188 f.WellKnownTypesJ\xa1;\n\x07\x12\x05\x1e\0\xf4\x01\x01\n\xcc\x0c\n\x01\
189 \x0c\x12\x03\x1e\0\x122\xc1\x0c\x20Protocol\x20Buffers\x20-\x20Google's\
190 \x20data\x20interchange\x20format\n\x20Copyright\x202008\x20Google\x20In\
191 c.\x20\x20All\x20rights\x20reserved.\n\x20https://developers.google.com/\
192 protocol-buffers/\n\n\x20Redistribution\x20and\x20use\x20in\x20source\
193 \x20and\x20binary\x20forms,\x20with\x20or\x20without\n\x20modification,\
194 \x20are\x20permitted\x20provided\x20that\x20the\x20following\x20conditio\
195 ns\x20are\n\x20met:\n\n\x20\x20\x20\x20\x20*\x20Redistributions\x20of\
196 \x20source\x20code\x20must\x20retain\x20the\x20above\x20copyright\n\x20n\
197 otice,\x20this\x20list\x20of\x20conditions\x20and\x20the\x20following\
198 \x20disclaimer.\n\x20\x20\x20\x20\x20*\x20Redistributions\x20in\x20binar\
199 y\x20form\x20must\x20reproduce\x20the\x20above\n\x20copyright\x20notice,\
200 \x20this\x20list\x20of\x20conditions\x20and\x20the\x20following\x20discl\
201 aimer\n\x20in\x20the\x20documentation\x20and/or\x20other\x20materials\
202 \x20provided\x20with\x20the\n\x20distribution.\n\x20\x20\x20\x20\x20*\
203 \x20Neither\x20the\x20name\x20of\x20Google\x20Inc.\x20nor\x20the\x20name\
204 s\x20of\x20its\n\x20contributors\x20may\x20be\x20used\x20to\x20endorse\
205 \x20or\x20promote\x20products\x20derived\x20from\n\x20this\x20software\
206 \x20without\x20specific\x20prior\x20written\x20permission.\n\n\x20THIS\
207 \x20SOFTWARE\x20IS\x20PROVIDED\x20BY\x20THE\x20COPYRIGHT\x20HOLDERS\x20A\
208 ND\x20CONTRIBUTORS\n\x20\"AS\x20IS\"\x20AND\x20ANY\x20EXPRESS\x20OR\x20I\
209 MPLIED\x20WARRANTIES,\x20INCLUDING,\x20BUT\x20NOT\n\x20LIMITED\x20TO,\
210 \x20THE\x20IMPLIED\x20WARRANTIES\x20OF\x20MERCHANTABILITY\x20AND\x20FITN\
211 ESS\x20FOR\n\x20A\x20PARTICULAR\x20PURPOSE\x20ARE\x20DISCLAIMED.\x20IN\
212 \x20NO\x20EVENT\x20SHALL\x20THE\x20COPYRIGHT\n\x20OWNER\x20OR\x20CONTRIB\
213 UTORS\x20BE\x20LIABLE\x20FOR\x20ANY\x20DIRECT,\x20INDIRECT,\x20INCIDENTA\
214 L,\n\x20SPECIAL,\x20EXEMPLARY,\x20OR\x20CONSEQUENTIAL\x20DAMAGES\x20(INC\
215 LUDING,\x20BUT\x20NOT\n\x20LIMITED\x20TO,\x20PROCUREMENT\x20OF\x20SUBSTI\
216 TUTE\x20GOODS\x20OR\x20SERVICES;\x20LOSS\x20OF\x20USE,\n\x20DATA,\x20OR\
217 \x20PROFITS;\x20OR\x20BUSINESS\x20INTERRUPTION)\x20HOWEVER\x20CAUSED\x20\
218 AND\x20ON\x20ANY\n\x20THEORY\x20OF\x20LIABILITY,\x20WHETHER\x20IN\x20CON\
219 TRACT,\x20STRICT\x20LIABILITY,\x20OR\x20TORT\n\x20(INCLUDING\x20NEGLIGEN\
220 CE\x20OR\x20OTHERWISE)\x20ARISING\x20IN\x20ANY\x20WAY\x20OUT\x20OF\x20TH\
221 E\x20USE\n\x20OF\x20THIS\x20SOFTWARE,\x20EVEN\x20IF\x20ADVISED\x20OF\x20\
222 THE\x20POSSIBILITY\x20OF\x20SUCH\x20DAMAGE.\n\n\x08\n\x01\x02\x12\x03\
223 \x20\0\x18\n\x08\n\x01\x08\x12\x03\"\0;\n\t\n\x02\x08%\x12\x03\"\0;\n\
224 \x08\n\x01\x08\x12\x03#\0,\n\t\n\x02\x08\x01\x12\x03#\0,\n\x08\n\x01\x08\
225 \x12\x03$\0/\n\t\n\x02\x08\x08\x12\x03$\0/\n\x08\n\x01\x08\x12\x03%\0\"\
226 \n\t\n\x02\x08\n\x12\x03%\0\"\n\x08\n\x01\x08\x12\x03&\0!\n\t\n\x02\x08$\
227 \x12\x03&\0!\n\x08\n\x01\x08\x12\x03'\0I\n\t\n\x02\x08\x0b\x12\x03'\0I\n\
228 \x08\n\x01\x08\x12\x03(\0\x1f\n\t\n\x02\x08\x1f\x12\x03(\0\x1f\n\xb2,\n\
229 \x02\x04\0\x12\x06\xf1\x01\0\xf4\x01\x01\x1a\xa3,\x20`FieldMask`\x20repr\
230 esents\x20a\x20set\x20of\x20symbolic\x20field\x20paths,\x20for\x20exampl\
231 e:\n\n\x20\x20\x20\x20\x20paths:\x20\"f.a\"\n\x20\x20\x20\x20\x20paths:\
232 \x20\"f.b.d\"\n\n\x20Here\x20`f`\x20represents\x20a\x20field\x20in\x20so\
233 me\x20root\x20message,\x20`a`\x20and\x20`b`\n\x20fields\x20in\x20the\x20\
234 message\x20found\x20in\x20`f`,\x20and\x20`d`\x20a\x20field\x20found\x20i\
235 n\x20the\n\x20message\x20in\x20`f.b`.\n\n\x20Field\x20masks\x20are\x20us\
236 ed\x20to\x20specify\x20a\x20subset\x20of\x20fields\x20that\x20should\x20\
237 be\n\x20returned\x20by\x20a\x20get\x20operation\x20or\x20modified\x20by\
238 \x20an\x20update\x20operation.\n\x20Field\x20masks\x20also\x20have\x20a\
239 \x20custom\x20JSON\x20encoding\x20(see\x20below).\n\n\x20#\x20Field\x20M\
240 asks\x20in\x20Projections\n\n\x20When\x20used\x20in\x20the\x20context\
241 \x20of\x20a\x20projection,\x20a\x20response\x20message\x20or\n\x20sub-me\
242 ssage\x20is\x20filtered\x20by\x20the\x20API\x20to\x20only\x20contain\x20\
243 those\x20fields\x20as\n\x20specified\x20in\x20the\x20mask.\x20For\x20exa\
244 mple,\x20if\x20the\x20mask\x20in\x20the\x20previous\n\x20example\x20is\
245 \x20applied\x20to\x20a\x20response\x20message\x20as\x20follows:\n\n\x20\
246 \x20\x20\x20\x20f\x20{\n\x20\x20\x20\x20\x20\x20\x20a\x20:\x2022\n\x20\
247 \x20\x20\x20\x20\x20\x20b\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20d\
248 \x20:\x201\n\x20\x20\x20\x20\x20\x20\x20\x20\x20x\x20:\x202\n\x20\x20\
249 \x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20\x20\x20y\x20:\x2013\n\x20\
250 \x20\x20\x20\x20}\n\x20\x20\x20\x20\x20z:\x208\n\n\x20The\x20result\x20w\
251 ill\x20not\x20contain\x20specific\x20values\x20for\x20fields\x20x,y\x20a\
252 nd\x20z\n\x20(their\x20value\x20will\x20be\x20set\x20to\x20the\x20defaul\
253 t,\x20and\x20omitted\x20in\x20proto\x20text\n\x20output):\n\n\n\x20\x20\
254 \x20\x20\x20f\x20{\n\x20\x20\x20\x20\x20\x20\x20a\x20:\x2022\n\x20\x20\
255 \x20\x20\x20\x20\x20b\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20d\x20:\
256 \x201\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20}\n\n\x20A\x20\
257 repeated\x20field\x20is\x20not\x20allowed\x20except\x20at\x20the\x20last\
258 \x20position\x20of\x20a\n\x20paths\x20string.\n\n\x20If\x20a\x20FieldMas\
259 k\x20object\x20is\x20not\x20present\x20in\x20a\x20get\x20operation,\x20t\
260 he\n\x20operation\x20applies\x20to\x20all\x20fields\x20(as\x20if\x20a\
261 \x20FieldMask\x20of\x20all\x20fields\n\x20had\x20been\x20specified).\n\n\
262 \x20Note\x20that\x20a\x20field\x20mask\x20does\x20not\x20necessarily\x20\
263 apply\x20to\x20the\n\x20top-level\x20response\x20message.\x20In\x20case\
264 \x20of\x20a\x20REST\x20get\x20operation,\x20the\n\x20field\x20mask\x20ap\
265 plies\x20directly\x20to\x20the\x20response,\x20but\x20in\x20case\x20of\
266 \x20a\x20REST\n\x20list\x20operation,\x20the\x20mask\x20instead\x20appli\
267 es\x20to\x20each\x20individual\x20message\n\x20in\x20the\x20returned\x20\
268 resource\x20list.\x20In\x20case\x20of\x20a\x20REST\x20custom\x20method,\
269 \n\x20other\x20definitions\x20may\x20be\x20used.\x20Where\x20the\x20mask\
270 \x20applies\x20will\x20be\n\x20clearly\x20documented\x20together\x20with\
271 \x20its\x20declaration\x20in\x20the\x20API.\x20\x20In\n\x20any\x20case,\
272 \x20the\x20effect\x20on\x20the\x20returned\x20resource/resources\x20is\
273 \x20required\n\x20behavior\x20for\x20APIs.\n\n\x20#\x20Field\x20Masks\
274 \x20in\x20Update\x20Operations\n\n\x20A\x20field\x20mask\x20in\x20update\
275 \x20operations\x20specifies\x20which\x20fields\x20of\x20the\n\x20targete\
276 d\x20resource\x20are\x20going\x20to\x20be\x20updated.\x20The\x20API\x20i\
277 s\x20required\n\x20to\x20only\x20change\x20the\x20values\x20of\x20the\
278 \x20fields\x20as\x20specified\x20in\x20the\x20mask\n\x20and\x20leave\x20\
279 the\x20others\x20untouched.\x20If\x20a\x20resource\x20is\x20passed\x20in\
280 \x20to\n\x20describe\x20the\x20updated\x20values,\x20the\x20API\x20ignor\
281 es\x20the\x20values\x20of\x20all\n\x20fields\x20not\x20covered\x20by\x20\
282 the\x20mask.\n\n\x20If\x20a\x20repeated\x20field\x20is\x20specified\x20f\
283 or\x20an\x20update\x20operation,\x20new\x20values\x20will\n\x20be\x20app\
284 ended\x20to\x20the\x20existing\x20repeated\x20field\x20in\x20the\x20targ\
285 et\x20resource.\x20Note\x20that\n\x20a\x20repeated\x20field\x20is\x20onl\
286 y\x20allowed\x20in\x20the\x20last\x20position\x20of\x20a\x20`paths`\x20s\
287 tring.\n\n\x20If\x20a\x20sub-message\x20is\x20specified\x20in\x20the\x20\
288 last\x20position\x20of\x20the\x20field\x20mask\x20for\x20an\n\x20update\
289 \x20operation,\x20then\x20new\x20value\x20will\x20be\x20merged\x20into\
290 \x20the\x20existing\x20sub-message\n\x20in\x20the\x20target\x20resource.\
291 \n\n\x20For\x20example,\x20given\x20the\x20target\x20message:\n\n\x20\
292 \x20\x20\x20\x20f\x20{\n\x20\x20\x20\x20\x20\x20\x20b\x20{\n\x20\x20\x20\
293 \x20\x20\x20\x20\x20\x20d:\x201\n\x20\x20\x20\x20\x20\x20\x20\x20\x20x:\
294 \x202\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20\x20\x20c:\x20\
295 [1]\n\x20\x20\x20\x20\x20}\n\n\x20And\x20an\x20update\x20message:\n\n\
296 \x20\x20\x20\x20\x20f\x20{\n\x20\x20\x20\x20\x20\x20\x20b\x20{\n\x20\x20\
297 \x20\x20\x20\x20\x20\x20\x20d:\x2010\n\x20\x20\x20\x20\x20\x20\x20}\n\
298 \x20\x20\x20\x20\x20\x20\x20c:\x20[2]\n\x20\x20\x20\x20\x20}\n\n\x20then\
299 \x20if\x20the\x20field\x20mask\x20is:\n\n\x20\x20paths:\x20[\"f.b\",\x20\
300 \"f.c\"]\n\n\x20then\x20the\x20result\x20will\x20be:\n\n\x20\x20\x20\x20\
301 \x20f\x20{\n\x20\x20\x20\x20\x20\x20\x20b\x20{\n\x20\x20\x20\x20\x20\x20\
302 \x20\x20\x20d:\x2010\n\x20\x20\x20\x20\x20\x20\x20\x20\x20x:\x202\n\x20\
303 \x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20\x20\x20c:\x20[1,\x202]\n\
304 \x20\x20\x20\x20\x20}\n\n\x20An\x20implementation\x20may\x20provide\x20o\
305 ptions\x20to\x20override\x20this\x20default\x20behavior\x20for\n\x20repe\
306 ated\x20and\x20message\x20fields.\n\n\x20In\x20order\x20to\x20reset\x20a\
307 \x20field's\x20value\x20to\x20the\x20default,\x20the\x20field\x20must\n\
308 \x20be\x20in\x20the\x20mask\x20and\x20set\x20to\x20the\x20default\x20val\
309 ue\x20in\x20the\x20provided\x20resource.\n\x20Hence,\x20in\x20order\x20t\
310 o\x20reset\x20all\x20fields\x20of\x20a\x20resource,\x20provide\x20a\x20d\
311 efault\n\x20instance\x20of\x20the\x20resource\x20and\x20set\x20all\x20fi\
312 elds\x20in\x20the\x20mask,\x20or\x20do\n\x20not\x20provide\x20a\x20mask\
313 \x20as\x20described\x20below.\n\n\x20If\x20a\x20field\x20mask\x20is\x20n\
314 ot\x20present\x20on\x20update,\x20the\x20operation\x20applies\x20to\n\
315 \x20all\x20fields\x20(as\x20if\x20a\x20field\x20mask\x20of\x20all\x20fie\
316 lds\x20has\x20been\x20specified).\n\x20Note\x20that\x20in\x20the\x20pres\
317 ence\x20of\x20schema\x20evolution,\x20this\x20may\x20mean\x20that\n\x20f\
318 ields\x20the\x20client\x20does\x20not\x20know\x20and\x20has\x20therefore\
319 \x20not\x20filled\x20into\n\x20the\x20request\x20will\x20be\x20reset\x20\
320 to\x20their\x20default.\x20If\x20this\x20is\x20unwanted\n\x20behavior,\
321 \x20a\x20specific\x20service\x20may\x20require\x20a\x20client\x20to\x20a\
322 lways\x20specify\n\x20a\x20field\x20mask,\x20producing\x20an\x20error\
323 \x20if\x20not.\n\n\x20As\x20with\x20get\x20operations,\x20the\x20locatio\
324 n\x20of\x20the\x20resource\x20which\n\x20describes\x20the\x20updated\x20\
325 values\x20in\x20the\x20request\x20message\x20depends\x20on\x20the\n\x20o\
326 peration\x20kind.\x20In\x20any\x20case,\x20the\x20effect\x20of\x20the\
327 \x20field\x20mask\x20is\n\x20required\x20to\x20be\x20honored\x20by\x20th\
328 e\x20API.\n\n\x20##\x20Considerations\x20for\x20HTTP\x20REST\n\n\x20The\
329 \x20HTTP\x20kind\x20of\x20an\x20update\x20operation\x20which\x20uses\x20\
330 a\x20field\x20mask\x20must\n\x20be\x20set\x20to\x20PATCH\x20instead\x20o\
331 f\x20PUT\x20in\x20order\x20to\x20satisfy\x20HTTP\x20semantics\n\x20(PUT\
332 \x20must\x20only\x20be\x20used\x20for\x20full\x20updates).\n\n\x20#\x20J\
333 SON\x20Encoding\x20of\x20Field\x20Masks\n\n\x20In\x20JSON,\x20a\x20field\
334 \x20mask\x20is\x20encoded\x20as\x20a\x20single\x20string\x20where\x20pat\
335 hs\x20are\n\x20separated\x20by\x20a\x20comma.\x20Fields\x20name\x20in\
336 \x20each\x20path\x20are\x20converted\n\x20to/from\x20lower-camel\x20nami\
337 ng\x20conventions.\n\n\x20As\x20an\x20example,\x20consider\x20the\x20fol\
338 lowing\x20message\x20declarations:\n\n\x20\x20\x20\x20\x20message\x20Pro\
339 file\x20{\n\x20\x20\x20\x20\x20\x20\x20User\x20user\x20=\x201;\n\x20\x20\
340 \x20\x20\x20\x20\x20Photo\x20photo\x20=\x202;\n\x20\x20\x20\x20\x20}\n\
341 \x20\x20\x20\x20\x20message\x20User\x20{\n\x20\x20\x20\x20\x20\x20\x20st\
342 ring\x20display_name\x20=\x201;\n\x20\x20\x20\x20\x20\x20\x20string\x20a\
343 ddress\x20=\x202;\n\x20\x20\x20\x20\x20}\n\n\x20In\x20proto\x20a\x20fiel\
344 d\x20mask\x20for\x20`Profile`\x20may\x20look\x20as\x20such:\n\n\x20\x20\
345 \x20\x20\x20mask\x20{\n\x20\x20\x20\x20\x20\x20\x20paths:\x20\"user.disp\
346 lay_name\"\n\x20\x20\x20\x20\x20\x20\x20paths:\x20\"photo\"\n\x20\x20\
347 \x20\x20\x20}\n\n\x20In\x20JSON,\x20the\x20same\x20mask\x20is\x20represe\
348 nted\x20as\x20below:\n\n\x20\x20\x20\x20\x20{\n\x20\x20\x20\x20\x20\x20\
349 \x20mask:\x20\"user.displayName,photo\"\n\x20\x20\x20\x20\x20}\n\n\x20#\
350 \x20Field\x20Masks\x20and\x20Oneof\x20Fields\n\n\x20Field\x20masks\x20tr\
351 eat\x20fields\x20in\x20oneofs\x20just\x20as\x20regular\x20fields.\x20Con\
352 sider\x20the\n\x20following\x20message:\n\n\x20\x20\x20\x20\x20message\
353 \x20SampleMessage\x20{\n\x20\x20\x20\x20\x20\x20\x20oneof\x20test_oneof\
354 \x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20string\x20name\x20=\x204;\n\
355 \x20\x20\x20\x20\x20\x20\x20\x20\x20SubMessage\x20sub_message\x20=\x209;\
356 \n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20}\n\n\x20The\x20fie\
357 ld\x20mask\x20can\x20be:\n\n\x20\x20\x20\x20\x20mask\x20{\n\x20\x20\x20\
358 \x20\x20\x20\x20paths:\x20\"name\"\n\x20\x20\x20\x20\x20}\n\n\x20Or:\n\n\
359 \x20\x20\x20\x20\x20mask\x20{\n\x20\x20\x20\x20\x20\x20\x20paths:\x20\"s\
360 ub_message\"\n\x20\x20\x20\x20\x20}\n\n\x20Note\x20that\x20oneof\x20type\
361 \x20names\x20(\"test_oneof\"\x20in\x20this\x20case)\x20cannot\x20be\x20u\
362 sed\x20in\n\x20paths.\n\n\x20##\x20Field\x20Mask\x20Verification\n\n\x20\
363 The\x20implementation\x20of\x20any\x20API\x20method\x20which\x20has\x20a\
364 \x20FieldMask\x20type\x20field\x20in\x20the\n\x20request\x20should\x20ve\
365 rify\x20the\x20included\x20field\x20paths,\x20and\x20return\x20an\n\x20`\
366 INVALID_ARGUMENT`\x20error\x20if\x20any\x20path\x20is\x20unmappable.\n\n\
367 \x0b\n\x03\x04\0\x01\x12\x04\xf1\x01\x08\x11\n,\n\x04\x04\0\x02\0\x12\
368 \x04\xf3\x01\x02\x1c\x1a\x1e\x20The\x20set\x20of\x20field\x20mask\x20pat\
369 hs.\n\n\r\n\x05\x04\0\x02\0\x04\x12\x04\xf3\x01\x02\n\n\r\n\x05\x04\0\
370 \x02\0\x05\x12\x04\xf3\x01\x0b\x11\n\r\n\x05\x04\0\x02\0\x01\x12\x04\xf3\
371 \x01\x12\x17\n\r\n\x05\x04\0\x02\0\x03\x12\x04\xf3\x01\x1a\x1bb\x06proto\
372 3\
373";
374
375static file_descriptor_proto_lazy: crate::rt::LazyV2<crate::descriptor::FileDescriptorProto> = crate::rt::LazyV2::INIT;
376
377fn parse_descriptor_proto() -> crate::descriptor::FileDescriptorProto {
378 crate::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
379}
380
381pub fn file_descriptor_proto() -> &'static crate::descriptor::FileDescriptorProto {
382 file_descriptor_proto_lazy.get(|| {
383 parse_descriptor_proto()
384 })
385}