nominal_api/proto/google.protobuf.rs
1// This file is @generated by prost-build.
2/// The protocol compiler can output a FileDescriptorSet containing the .proto
3/// files it parses.
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct FileDescriptorSet {
6 #[prost(message, repeated, tag = "1")]
7 pub file: ::prost::alloc::vec::Vec<FileDescriptorProto>,
8}
9/// Describes a complete .proto file.
10#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct FileDescriptorProto {
12 /// file name, relative to root of source tree
13 #[prost(string, optional, tag = "1")]
14 pub name: ::core::option::Option<::prost::alloc::string::String>,
15 /// e.g. "foo", "foo.bar", etc.
16 #[prost(string, optional, tag = "2")]
17 pub package: ::core::option::Option<::prost::alloc::string::String>,
18 /// Names of files imported by this file.
19 #[prost(string, repeated, tag = "3")]
20 pub dependency: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
21 /// Indexes of the public imported files in the dependency list above.
22 #[prost(int32, repeated, packed = "false", tag = "10")]
23 pub public_dependency: ::prost::alloc::vec::Vec<i32>,
24 /// Indexes of the weak imported files in the dependency list.
25 /// For Google-internal migration only. Do not use.
26 #[prost(int32, repeated, packed = "false", tag = "11")]
27 pub weak_dependency: ::prost::alloc::vec::Vec<i32>,
28 /// Names of files imported by this file purely for the purpose of providing
29 /// option extensions. These are excluded from the dependency list above.
30 #[prost(string, repeated, tag = "15")]
31 pub option_dependency: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
32 /// All top-level definitions in this file.
33 #[prost(message, repeated, tag = "4")]
34 pub message_type: ::prost::alloc::vec::Vec<DescriptorProto>,
35 #[prost(message, repeated, tag = "5")]
36 pub enum_type: ::prost::alloc::vec::Vec<EnumDescriptorProto>,
37 #[prost(message, repeated, tag = "6")]
38 pub service: ::prost::alloc::vec::Vec<ServiceDescriptorProto>,
39 #[prost(message, repeated, tag = "7")]
40 pub extension: ::prost::alloc::vec::Vec<FieldDescriptorProto>,
41 #[prost(message, optional, tag = "8")]
42 pub options: ::core::option::Option<FileOptions>,
43 /// This field contains optional information about the original source code.
44 /// You may safely remove this entire field without harming runtime
45 /// functionality of the descriptors -- the information is needed only by
46 /// development tools.
47 #[prost(message, optional, tag = "9")]
48 pub source_code_info: ::core::option::Option<SourceCodeInfo>,
49 /// The syntax of the proto file.
50 /// The supported values are "proto2", "proto3", and "editions".
51 ///
52 /// If `edition` is present, this value must be "editions".
53 /// WARNING: This field should only be used by protobuf plugins or special
54 /// cases like the proto compiler. Other uses are discouraged and
55 /// developers should rely on the protoreflect APIs for their client language.
56 #[prost(string, optional, tag = "12")]
57 pub syntax: ::core::option::Option<::prost::alloc::string::String>,
58 /// The edition of the proto file.
59 /// WARNING: This field should only be used by protobuf plugins or special
60 /// cases like the proto compiler. Other uses are discouraged and
61 /// developers should rely on the protoreflect APIs for their client language.
62 #[prost(enumeration = "Edition", optional, tag = "14")]
63 pub edition: ::core::option::Option<i32>,
64}
65/// Describes a message type.
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct DescriptorProto {
68 #[prost(string, optional, tag = "1")]
69 pub name: ::core::option::Option<::prost::alloc::string::String>,
70 #[prost(message, repeated, tag = "2")]
71 pub field: ::prost::alloc::vec::Vec<FieldDescriptorProto>,
72 #[prost(message, repeated, tag = "6")]
73 pub extension: ::prost::alloc::vec::Vec<FieldDescriptorProto>,
74 #[prost(message, repeated, tag = "3")]
75 pub nested_type: ::prost::alloc::vec::Vec<DescriptorProto>,
76 #[prost(message, repeated, tag = "4")]
77 pub enum_type: ::prost::alloc::vec::Vec<EnumDescriptorProto>,
78 #[prost(message, repeated, tag = "5")]
79 pub extension_range: ::prost::alloc::vec::Vec<descriptor_proto::ExtensionRange>,
80 #[prost(message, repeated, tag = "8")]
81 pub oneof_decl: ::prost::alloc::vec::Vec<OneofDescriptorProto>,
82 #[prost(message, optional, tag = "7")]
83 pub options: ::core::option::Option<MessageOptions>,
84 #[prost(message, repeated, tag = "9")]
85 pub reserved_range: ::prost::alloc::vec::Vec<descriptor_proto::ReservedRange>,
86 /// Reserved field names, which may not be used by fields in the same message.
87 /// A given name may only be reserved once.
88 #[prost(string, repeated, tag = "10")]
89 pub reserved_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
90 /// Support for `export` and `local` keywords on enums.
91 #[prost(enumeration = "SymbolVisibility", optional, tag = "11")]
92 pub visibility: ::core::option::Option<i32>,
93}
94/// Nested message and enum types in `DescriptorProto`.
95pub mod descriptor_proto {
96 #[derive(Clone, PartialEq, ::prost::Message)]
97 pub struct ExtensionRange {
98 /// Inclusive.
99 #[prost(int32, optional, tag = "1")]
100 pub start: ::core::option::Option<i32>,
101 /// Exclusive.
102 #[prost(int32, optional, tag = "2")]
103 pub end: ::core::option::Option<i32>,
104 #[prost(message, optional, tag = "3")]
105 pub options: ::core::option::Option<super::ExtensionRangeOptions>,
106 }
107 /// Range of reserved tag numbers. Reserved tag numbers may not be used by
108 /// fields or extension ranges in the same message. Reserved ranges may
109 /// not overlap.
110 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
111 pub struct ReservedRange {
112 /// Inclusive.
113 #[prost(int32, optional, tag = "1")]
114 pub start: ::core::option::Option<i32>,
115 /// Exclusive.
116 #[prost(int32, optional, tag = "2")]
117 pub end: ::core::option::Option<i32>,
118 }
119}
120#[derive(Clone, PartialEq, ::prost::Message)]
121pub struct ExtensionRangeOptions {
122 /// The parser stores options it doesn't recognize here. See above.
123 #[prost(message, repeated, tag = "999")]
124 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
125 /// For external users: DO NOT USE. We are in the process of open sourcing
126 /// extension declaration and executing internal cleanups before it can be
127 /// used externally.
128 #[prost(message, repeated, tag = "2")]
129 pub declaration: ::prost::alloc::vec::Vec<extension_range_options::Declaration>,
130 /// Any features defined in the specific edition.
131 #[prost(message, optional, tag = "50")]
132 pub features: ::core::option::Option<FeatureSet>,
133 /// The verification state of the range.
134 /// TODO: flip the default to DECLARATION once all empty ranges
135 /// are marked as UNVERIFIED.
136 #[prost(
137 enumeration = "extension_range_options::VerificationState",
138 optional,
139 tag = "3",
140 default = "Unverified"
141 )]
142 pub verification: ::core::option::Option<i32>,
143}
144/// Nested message and enum types in `ExtensionRangeOptions`.
145pub mod extension_range_options {
146 #[derive(Clone, PartialEq, ::prost::Message)]
147 pub struct Declaration {
148 /// The extension number declared within the extension range.
149 #[prost(int32, optional, tag = "1")]
150 pub number: ::core::option::Option<i32>,
151 /// The fully-qualified name of the extension field. There must be a leading
152 /// dot in front of the full name.
153 #[prost(string, optional, tag = "2")]
154 pub full_name: ::core::option::Option<::prost::alloc::string::String>,
155 /// The fully-qualified type name of the extension field. Unlike
156 /// Metadata.type, Declaration.type must have a leading dot for messages
157 /// and enums.
158 #[prost(string, optional, tag = "3")]
159 pub r#type: ::core::option::Option<::prost::alloc::string::String>,
160 /// If true, indicates that the number is reserved in the extension range,
161 /// and any extension field with the number will fail to compile. Set this
162 /// when a declared extension field is deleted.
163 #[prost(bool, optional, tag = "5")]
164 pub reserved: ::core::option::Option<bool>,
165 /// If true, indicates that the extension must be defined as repeated.
166 /// Otherwise the extension must be defined as optional.
167 #[prost(bool, optional, tag = "6")]
168 pub repeated: ::core::option::Option<bool>,
169 }
170 /// The verification state of the extension range.
171 #[derive(
172 Clone,
173 Copy,
174 Debug,
175 PartialEq,
176 Eq,
177 Hash,
178 PartialOrd,
179 Ord,
180 ::prost::Enumeration
181 )]
182 #[repr(i32)]
183 pub enum VerificationState {
184 /// All the extensions of the range must be declared.
185 Declaration = 0,
186 Unverified = 1,
187 }
188 impl VerificationState {
189 /// String value of the enum field names used in the ProtoBuf definition.
190 ///
191 /// The values are not transformed in any way and thus are considered stable
192 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
193 pub fn as_str_name(&self) -> &'static str {
194 match self {
195 Self::Declaration => "DECLARATION",
196 Self::Unverified => "UNVERIFIED",
197 }
198 }
199 /// Creates an enum from field names used in the ProtoBuf definition.
200 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
201 match value {
202 "DECLARATION" => Some(Self::Declaration),
203 "UNVERIFIED" => Some(Self::Unverified),
204 _ => None,
205 }
206 }
207 }
208}
209/// Describes a field within a message.
210#[derive(Clone, PartialEq, ::prost::Message)]
211pub struct FieldDescriptorProto {
212 #[prost(string, optional, tag = "1")]
213 pub name: ::core::option::Option<::prost::alloc::string::String>,
214 #[prost(int32, optional, tag = "3")]
215 pub number: ::core::option::Option<i32>,
216 #[prost(enumeration = "field_descriptor_proto::Label", optional, tag = "4")]
217 pub label: ::core::option::Option<i32>,
218 /// If type_name is set, this need not be set. If both this and type_name
219 /// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
220 #[prost(enumeration = "field_descriptor_proto::Type", optional, tag = "5")]
221 pub r#type: ::core::option::Option<i32>,
222 /// For message and enum types, this is the name of the type. If the name
223 /// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
224 /// rules are used to find the type (i.e. first the nested types within this
225 /// message are searched, then within the parent, on up to the root
226 /// namespace).
227 #[prost(string, optional, tag = "6")]
228 pub type_name: ::core::option::Option<::prost::alloc::string::String>,
229 /// For extensions, this is the name of the type being extended. It is
230 /// resolved in the same manner as type_name.
231 #[prost(string, optional, tag = "2")]
232 pub extendee: ::core::option::Option<::prost::alloc::string::String>,
233 /// For numeric types, contains the original text representation of the value.
234 /// For booleans, "true" or "false".
235 /// For strings, contains the default text contents (not escaped in any way).
236 /// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
237 #[prost(string, optional, tag = "7")]
238 pub default_value: ::core::option::Option<::prost::alloc::string::String>,
239 /// If set, gives the index of a oneof in the containing type's oneof_decl
240 /// list. This field is a member of that oneof.
241 #[prost(int32, optional, tag = "9")]
242 pub oneof_index: ::core::option::Option<i32>,
243 /// JSON name of this field. The value is set by protocol compiler. If the
244 /// user has set a "json_name" option on this field, that option's value
245 /// will be used. Otherwise, it's deduced from the field's name by converting
246 /// it to camelCase.
247 #[prost(string, optional, tag = "10")]
248 pub json_name: ::core::option::Option<::prost::alloc::string::String>,
249 #[prost(message, optional, tag = "8")]
250 pub options: ::core::option::Option<FieldOptions>,
251 /// If true, this is a proto3 "optional". When a proto3 field is optional, it
252 /// tracks presence regardless of field type.
253 ///
254 /// When proto3_optional is true, this field must belong to a oneof to signal
255 /// to old proto3 clients that presence is tracked for this field. This oneof
256 /// is known as a "synthetic" oneof, and this field must be its sole member
257 /// (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
258 /// exist in the descriptor only, and do not generate any API. Synthetic oneofs
259 /// must be ordered after all "real" oneofs.
260 ///
261 /// For message fields, proto3_optional doesn't create any semantic change,
262 /// since non-repeated message fields always track presence. However it still
263 /// indicates the semantic detail of whether the user wrote "optional" or not.
264 /// This can be useful for round-tripping the .proto file. For consistency we
265 /// give message fields a synthetic oneof also, even though it is not required
266 /// to track presence. This is especially important because the parser can't
267 /// tell if a field is a message or an enum, so it must always create a
268 /// synthetic oneof.
269 ///
270 /// Proto2 optional fields do not set this flag, because they already indicate
271 /// optional with `LABEL_OPTIONAL`.
272 #[prost(bool, optional, tag = "17")]
273 pub proto3_optional: ::core::option::Option<bool>,
274}
275/// Nested message and enum types in `FieldDescriptorProto`.
276pub mod field_descriptor_proto {
277 #[derive(
278 Clone,
279 Copy,
280 Debug,
281 PartialEq,
282 Eq,
283 Hash,
284 PartialOrd,
285 Ord,
286 ::prost::Enumeration
287 )]
288 #[repr(i32)]
289 pub enum Type {
290 /// 0 is reserved for errors.
291 /// Order is weird for historical reasons.
292 Double = 1,
293 Float = 2,
294 /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
295 /// negative values are likely.
296 Int64 = 3,
297 Uint64 = 4,
298 /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
299 /// negative values are likely.
300 Int32 = 5,
301 Fixed64 = 6,
302 Fixed32 = 7,
303 Bool = 8,
304 String = 9,
305 /// Tag-delimited aggregate.
306 /// Group type is deprecated and not supported after google.protobuf. However, Proto3
307 /// implementations should still be able to parse the group wire format and
308 /// treat group fields as unknown fields. In Editions, the group wire format
309 /// can be enabled via the `message_encoding` feature.
310 Group = 10,
311 /// Length-delimited aggregate.
312 Message = 11,
313 /// New in version 2.
314 Bytes = 12,
315 Uint32 = 13,
316 Enum = 14,
317 Sfixed32 = 15,
318 Sfixed64 = 16,
319 /// Uses ZigZag encoding.
320 Sint32 = 17,
321 /// Uses ZigZag encoding.
322 Sint64 = 18,
323 }
324 impl Type {
325 /// String value of the enum field names used in the ProtoBuf definition.
326 ///
327 /// The values are not transformed in any way and thus are considered stable
328 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
329 pub fn as_str_name(&self) -> &'static str {
330 match self {
331 Self::Double => "TYPE_DOUBLE",
332 Self::Float => "TYPE_FLOAT",
333 Self::Int64 => "TYPE_INT64",
334 Self::Uint64 => "TYPE_UINT64",
335 Self::Int32 => "TYPE_INT32",
336 Self::Fixed64 => "TYPE_FIXED64",
337 Self::Fixed32 => "TYPE_FIXED32",
338 Self::Bool => "TYPE_BOOL",
339 Self::String => "TYPE_STRING",
340 Self::Group => "TYPE_GROUP",
341 Self::Message => "TYPE_MESSAGE",
342 Self::Bytes => "TYPE_BYTES",
343 Self::Uint32 => "TYPE_UINT32",
344 Self::Enum => "TYPE_ENUM",
345 Self::Sfixed32 => "TYPE_SFIXED32",
346 Self::Sfixed64 => "TYPE_SFIXED64",
347 Self::Sint32 => "TYPE_SINT32",
348 Self::Sint64 => "TYPE_SINT64",
349 }
350 }
351 /// Creates an enum from field names used in the ProtoBuf definition.
352 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
353 match value {
354 "TYPE_DOUBLE" => Some(Self::Double),
355 "TYPE_FLOAT" => Some(Self::Float),
356 "TYPE_INT64" => Some(Self::Int64),
357 "TYPE_UINT64" => Some(Self::Uint64),
358 "TYPE_INT32" => Some(Self::Int32),
359 "TYPE_FIXED64" => Some(Self::Fixed64),
360 "TYPE_FIXED32" => Some(Self::Fixed32),
361 "TYPE_BOOL" => Some(Self::Bool),
362 "TYPE_STRING" => Some(Self::String),
363 "TYPE_GROUP" => Some(Self::Group),
364 "TYPE_MESSAGE" => Some(Self::Message),
365 "TYPE_BYTES" => Some(Self::Bytes),
366 "TYPE_UINT32" => Some(Self::Uint32),
367 "TYPE_ENUM" => Some(Self::Enum),
368 "TYPE_SFIXED32" => Some(Self::Sfixed32),
369 "TYPE_SFIXED64" => Some(Self::Sfixed64),
370 "TYPE_SINT32" => Some(Self::Sint32),
371 "TYPE_SINT64" => Some(Self::Sint64),
372 _ => None,
373 }
374 }
375 }
376 #[derive(
377 Clone,
378 Copy,
379 Debug,
380 PartialEq,
381 Eq,
382 Hash,
383 PartialOrd,
384 Ord,
385 ::prost::Enumeration
386 )]
387 #[repr(i32)]
388 pub enum Label {
389 /// 0 is reserved for errors
390 Optional = 1,
391 Repeated = 3,
392 /// The required label is only allowed in google.protobuf. In proto3 and Editions
393 /// it's explicitly prohibited. In Editions, the `field_presence` feature
394 /// can be used to get this behavior.
395 Required = 2,
396 }
397 impl Label {
398 /// String value of the enum field names used in the ProtoBuf definition.
399 ///
400 /// The values are not transformed in any way and thus are considered stable
401 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
402 pub fn as_str_name(&self) -> &'static str {
403 match self {
404 Self::Optional => "LABEL_OPTIONAL",
405 Self::Repeated => "LABEL_REPEATED",
406 Self::Required => "LABEL_REQUIRED",
407 }
408 }
409 /// Creates an enum from field names used in the ProtoBuf definition.
410 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
411 match value {
412 "LABEL_OPTIONAL" => Some(Self::Optional),
413 "LABEL_REPEATED" => Some(Self::Repeated),
414 "LABEL_REQUIRED" => Some(Self::Required),
415 _ => None,
416 }
417 }
418 }
419}
420/// Describes a oneof.
421#[derive(Clone, PartialEq, ::prost::Message)]
422pub struct OneofDescriptorProto {
423 #[prost(string, optional, tag = "1")]
424 pub name: ::core::option::Option<::prost::alloc::string::String>,
425 #[prost(message, optional, tag = "2")]
426 pub options: ::core::option::Option<OneofOptions>,
427}
428/// Describes an enum type.
429#[derive(Clone, PartialEq, ::prost::Message)]
430pub struct EnumDescriptorProto {
431 #[prost(string, optional, tag = "1")]
432 pub name: ::core::option::Option<::prost::alloc::string::String>,
433 #[prost(message, repeated, tag = "2")]
434 pub value: ::prost::alloc::vec::Vec<EnumValueDescriptorProto>,
435 #[prost(message, optional, tag = "3")]
436 pub options: ::core::option::Option<EnumOptions>,
437 /// Range of reserved numeric values. Reserved numeric values may not be used
438 /// by enum values in the same enum declaration. Reserved ranges may not
439 /// overlap.
440 #[prost(message, repeated, tag = "4")]
441 pub reserved_range: ::prost::alloc::vec::Vec<
442 enum_descriptor_proto::EnumReservedRange,
443 >,
444 /// Reserved enum value names, which may not be reused. A given name may only
445 /// be reserved once.
446 #[prost(string, repeated, tag = "5")]
447 pub reserved_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
448 /// Support for `export` and `local` keywords on enums.
449 #[prost(enumeration = "SymbolVisibility", optional, tag = "6")]
450 pub visibility: ::core::option::Option<i32>,
451}
452/// Nested message and enum types in `EnumDescriptorProto`.
453pub mod enum_descriptor_proto {
454 /// Range of reserved numeric values. Reserved values may not be used by
455 /// entries in the same enum. Reserved ranges may not overlap.
456 ///
457 /// Note that this is distinct from DescriptorProto.ReservedRange in that it
458 /// is inclusive such that it can appropriately represent the entire int32
459 /// domain.
460 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
461 pub struct EnumReservedRange {
462 /// Inclusive.
463 #[prost(int32, optional, tag = "1")]
464 pub start: ::core::option::Option<i32>,
465 /// Inclusive.
466 #[prost(int32, optional, tag = "2")]
467 pub end: ::core::option::Option<i32>,
468 }
469}
470/// Describes a value within an enum.
471#[derive(Clone, PartialEq, ::prost::Message)]
472pub struct EnumValueDescriptorProto {
473 #[prost(string, optional, tag = "1")]
474 pub name: ::core::option::Option<::prost::alloc::string::String>,
475 #[prost(int32, optional, tag = "2")]
476 pub number: ::core::option::Option<i32>,
477 #[prost(message, optional, tag = "3")]
478 pub options: ::core::option::Option<EnumValueOptions>,
479}
480/// Describes a service.
481#[derive(Clone, PartialEq, ::prost::Message)]
482pub struct ServiceDescriptorProto {
483 #[prost(string, optional, tag = "1")]
484 pub name: ::core::option::Option<::prost::alloc::string::String>,
485 #[prost(message, repeated, tag = "2")]
486 pub method: ::prost::alloc::vec::Vec<MethodDescriptorProto>,
487 #[prost(message, optional, tag = "3")]
488 pub options: ::core::option::Option<ServiceOptions>,
489}
490/// Describes a method of a service.
491#[derive(Clone, PartialEq, ::prost::Message)]
492pub struct MethodDescriptorProto {
493 #[prost(string, optional, tag = "1")]
494 pub name: ::core::option::Option<::prost::alloc::string::String>,
495 /// Input and output type names. These are resolved in the same way as
496 /// FieldDescriptorProto.type_name, but must refer to a message type.
497 #[prost(string, optional, tag = "2")]
498 pub input_type: ::core::option::Option<::prost::alloc::string::String>,
499 #[prost(string, optional, tag = "3")]
500 pub output_type: ::core::option::Option<::prost::alloc::string::String>,
501 #[prost(message, optional, tag = "4")]
502 pub options: ::core::option::Option<MethodOptions>,
503 /// Identifies if client streams multiple client messages
504 #[prost(bool, optional, tag = "5", default = "false")]
505 pub client_streaming: ::core::option::Option<bool>,
506 /// Identifies if server streams multiple server messages
507 #[prost(bool, optional, tag = "6", default = "false")]
508 pub server_streaming: ::core::option::Option<bool>,
509}
510#[derive(Clone, PartialEq, ::prost::Message)]
511pub struct FileOptions {
512 /// Sets the Java package where classes generated from this .proto will be
513 /// placed. By default, the proto package is used, but this is often
514 /// inappropriate because proto packages do not normally start with backwards
515 /// domain names.
516 #[prost(string, optional, tag = "1")]
517 pub java_package: ::core::option::Option<::prost::alloc::string::String>,
518 /// Controls the name of the wrapper Java class generated for the .proto file.
519 /// That class will always contain the .proto file's getDescriptor() method as
520 /// well as any top-level extensions defined in the .proto file.
521 /// If java_multiple_files is disabled, then all the other classes from the
522 /// .proto file will be nested inside the single wrapper outer class.
523 #[prost(string, optional, tag = "8")]
524 pub java_outer_classname: ::core::option::Option<::prost::alloc::string::String>,
525 /// If enabled, then the Java code generator will generate a separate .java
526 /// file for each top-level message, enum, and service defined in the .proto
527 /// file. Thus, these types will *not* be nested inside the wrapper class
528 /// named by java_outer_classname. However, the wrapper class will still be
529 /// generated to contain the file's getDescriptor() method as well as any
530 /// top-level extensions defined in the file.
531 #[prost(bool, optional, tag = "10", default = "false")]
532 pub java_multiple_files: ::core::option::Option<bool>,
533 /// This option does nothing.
534 #[deprecated]
535 #[prost(bool, optional, tag = "20")]
536 pub java_generate_equals_and_hash: ::core::option::Option<bool>,
537 /// A proto2 file can set this to true to opt in to UTF-8 checking for Java,
538 /// which will throw an exception if invalid UTF-8 is parsed from the wire or
539 /// assigned to a string field.
540 ///
541 /// TODO: clarify exactly what kinds of field types this option
542 /// applies to, and update these docs accordingly.
543 ///
544 /// Proto3 files already perform these checks. Setting the option explicitly to
545 /// false has no effect: it cannot be used to opt proto3 files out of UTF-8
546 /// checks.
547 #[prost(bool, optional, tag = "27", default = "false")]
548 pub java_string_check_utf8: ::core::option::Option<bool>,
549 #[prost(
550 enumeration = "file_options::OptimizeMode",
551 optional,
552 tag = "9",
553 default = "Speed"
554 )]
555 pub optimize_for: ::core::option::Option<i32>,
556 /// Sets the Go package where structs generated from this .proto will be
557 /// placed. If omitted, the Go package will be derived from the following:
558 /// - The basename of the package import path, if provided.
559 /// - Otherwise, the package statement in the .proto file, if present.
560 /// - Otherwise, the basename of the .proto file, without extension.
561 #[prost(string, optional, tag = "11")]
562 pub go_package: ::core::option::Option<::prost::alloc::string::String>,
563 /// Should generic services be generated in each language? "Generic" services
564 /// are not specific to any particular RPC system. They are generated by the
565 /// main code generators in each language (without additional plugins).
566 /// Generic services were the only kind of service generation supported by
567 /// early versions of google.protobuf.
568 ///
569 /// Generic services are now considered deprecated in favor of using plugins
570 /// that generate code specific to your particular RPC system. Therefore,
571 /// these default to false. Old code which depends on generic services should
572 /// explicitly set them to true.
573 #[prost(bool, optional, tag = "16", default = "false")]
574 pub cc_generic_services: ::core::option::Option<bool>,
575 #[prost(bool, optional, tag = "17", default = "false")]
576 pub java_generic_services: ::core::option::Option<bool>,
577 #[prost(bool, optional, tag = "18", default = "false")]
578 pub py_generic_services: ::core::option::Option<bool>,
579 /// Is this file deprecated?
580 /// Depending on the target platform, this can emit Deprecated annotations
581 /// for everything in the file, or it will be completely ignored; in the very
582 /// least, this is a formalization for deprecating files.
583 #[prost(bool, optional, tag = "23", default = "false")]
584 pub deprecated: ::core::option::Option<bool>,
585 /// Enables the use of arenas for the proto messages in this file. This applies
586 /// only to generated classes for C++.
587 #[prost(bool, optional, tag = "31", default = "true")]
588 pub cc_enable_arenas: ::core::option::Option<bool>,
589 /// Sets the objective c class prefix which is prepended to all objective c
590 /// generated classes from this .proto. There is no default.
591 #[prost(string, optional, tag = "36")]
592 pub objc_class_prefix: ::core::option::Option<::prost::alloc::string::String>,
593 /// Namespace for generated classes; defaults to the package.
594 #[prost(string, optional, tag = "37")]
595 pub csharp_namespace: ::core::option::Option<::prost::alloc::string::String>,
596 /// By default Swift generators will take the proto package and CamelCase it
597 /// replacing '.' with underscore and use that to prefix the types/symbols
598 /// defined. When this options is provided, they will use this value instead
599 /// to prefix the types/symbols defined.
600 #[prost(string, optional, tag = "39")]
601 pub swift_prefix: ::core::option::Option<::prost::alloc::string::String>,
602 /// Sets the php class prefix which is prepended to all php generated classes
603 /// from this .proto. Default is empty.
604 #[prost(string, optional, tag = "40")]
605 pub php_class_prefix: ::core::option::Option<::prost::alloc::string::String>,
606 /// Use this option to change the namespace of php generated classes. Default
607 /// is empty. When this option is empty, the package name will be used for
608 /// determining the namespace.
609 #[prost(string, optional, tag = "41")]
610 pub php_namespace: ::core::option::Option<::prost::alloc::string::String>,
611 /// Use this option to change the namespace of php generated metadata classes.
612 /// Default is empty. When this option is empty, the proto file name will be
613 /// used for determining the namespace.
614 #[prost(string, optional, tag = "44")]
615 pub php_metadata_namespace: ::core::option::Option<::prost::alloc::string::String>,
616 /// Use this option to change the package of ruby generated classes. Default
617 /// is empty. When this option is not set, the package name will be used for
618 /// determining the ruby package.
619 #[prost(string, optional, tag = "45")]
620 pub ruby_package: ::core::option::Option<::prost::alloc::string::String>,
621 /// Any features defined in the specific edition.
622 /// WARNING: This field should only be used by protobuf plugins or special
623 /// cases like the proto compiler. Other uses are discouraged and
624 /// developers should rely on the protoreflect APIs for their client language.
625 #[prost(message, optional, tag = "50")]
626 pub features: ::core::option::Option<FeatureSet>,
627 /// The parser stores options it doesn't recognize here.
628 /// See the documentation for the "Options" section above.
629 #[prost(message, repeated, tag = "999")]
630 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
631}
632/// Nested message and enum types in `FileOptions`.
633pub mod file_options {
634 /// Generated classes can be optimized for speed or code size.
635 #[derive(
636 Clone,
637 Copy,
638 Debug,
639 PartialEq,
640 Eq,
641 Hash,
642 PartialOrd,
643 Ord,
644 ::prost::Enumeration
645 )]
646 #[repr(i32)]
647 pub enum OptimizeMode {
648 /// Generate complete code for parsing, serialization,
649 Speed = 1,
650 /// etc.
651 ///
652 /// Use ReflectionOps to implement these methods.
653 CodeSize = 2,
654 /// Generate code using MessageLite and the lite runtime.
655 LiteRuntime = 3,
656 }
657 impl OptimizeMode {
658 /// String value of the enum field names used in the ProtoBuf definition.
659 ///
660 /// The values are not transformed in any way and thus are considered stable
661 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
662 pub fn as_str_name(&self) -> &'static str {
663 match self {
664 Self::Speed => "SPEED",
665 Self::CodeSize => "CODE_SIZE",
666 Self::LiteRuntime => "LITE_RUNTIME",
667 }
668 }
669 /// Creates an enum from field names used in the ProtoBuf definition.
670 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
671 match value {
672 "SPEED" => Some(Self::Speed),
673 "CODE_SIZE" => Some(Self::CodeSize),
674 "LITE_RUNTIME" => Some(Self::LiteRuntime),
675 _ => None,
676 }
677 }
678 }
679}
680#[derive(Clone, PartialEq, ::prost::Message)]
681pub struct MessageOptions {
682 /// Set true to use the old proto1 MessageSet wire format for extensions.
683 /// This is provided for backwards-compatibility with the MessageSet wire
684 /// format. You should not use this for any other reason: It's less
685 /// efficient, has fewer features, and is more complicated.
686 ///
687 /// The message must be defined exactly as follows:
688 /// message Foo {
689 /// option message_set_wire_format = true;
690 /// extensions 4 to max;
691 /// }
692 /// Note that the message cannot have any defined fields; MessageSets only
693 /// have extensions.
694 ///
695 /// All extensions of your type must be singular messages; e.g. they cannot
696 /// be int32s, enums, or repeated messages.
697 ///
698 /// Because this is an option, the above two restrictions are not enforced by
699 /// the protocol compiler.
700 #[prost(bool, optional, tag = "1", default = "false")]
701 pub message_set_wire_format: ::core::option::Option<bool>,
702 /// Disables the generation of the standard "descriptor()" accessor, which can
703 /// conflict with a field of the same name. This is meant to make migration
704 /// from proto1 easier; new code should avoid fields named "descriptor".
705 #[prost(bool, optional, tag = "2", default = "false")]
706 pub no_standard_descriptor_accessor: ::core::option::Option<bool>,
707 /// Is this message deprecated?
708 /// Depending on the target platform, this can emit Deprecated annotations
709 /// for the message, or it will be completely ignored; in the very least,
710 /// this is a formalization for deprecating messages.
711 #[prost(bool, optional, tag = "3", default = "false")]
712 pub deprecated: ::core::option::Option<bool>,
713 /// Whether the message is an automatically generated map entry type for the
714 /// maps field.
715 ///
716 /// For maps fields:
717 /// map<KeyType, ValueType> map_field = 1;
718 /// The parsed descriptor looks like:
719 /// message MapFieldEntry {
720 /// option map_entry = true;
721 /// optional KeyType key = 1;
722 /// optional ValueType value = 2;
723 /// }
724 /// repeated MapFieldEntry map_field = 1;
725 ///
726 /// Implementations may choose not to generate the map_entry=true message, but
727 /// use a native map in the target language to hold the keys and values.
728 /// The reflection APIs in such implementations still need to work as
729 /// if the field is a repeated message field.
730 ///
731 /// NOTE: Do not set the option in .proto files. Always use the maps syntax
732 /// instead. The option should only be implicitly set by the proto compiler
733 /// parser.
734 #[prost(bool, optional, tag = "7")]
735 pub map_entry: ::core::option::Option<bool>,
736 /// Enable the legacy handling of JSON field name conflicts. This lowercases
737 /// and strips underscored from the fields before comparison in proto3 only.
738 /// The new behavior takes `json_name` into account and applies to proto2 as
739 /// well.
740 ///
741 /// This should only be used as a temporary measure against broken builds due
742 /// to the change in behavior for JSON field name conflicts.
743 ///
744 /// TODO This is legacy behavior we plan to remove once downstream
745 /// teams have had time to migrate.
746 #[deprecated]
747 #[prost(bool, optional, tag = "11")]
748 pub deprecated_legacy_json_field_conflicts: ::core::option::Option<bool>,
749 /// Any features defined in the specific edition.
750 /// WARNING: This field should only be used by protobuf plugins or special
751 /// cases like the proto compiler. Other uses are discouraged and
752 /// developers should rely on the protoreflect APIs for their client language.
753 #[prost(message, optional, tag = "12")]
754 pub features: ::core::option::Option<FeatureSet>,
755 /// The parser stores options it doesn't recognize here. See above.
756 #[prost(message, repeated, tag = "999")]
757 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
758}
759#[derive(Clone, PartialEq, ::prost::Message)]
760pub struct FieldOptions {
761 /// NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
762 /// The ctype option instructs the C++ code generator to use a different
763 /// representation of the field than it normally would. See the specific
764 /// options below. This option is only implemented to support use of
765 /// \[ctype=CORD\] and \[ctype=STRING\] (the default) on non-repeated fields of
766 /// type "bytes" in the open source release.
767 /// TODO: make ctype actually deprecated.
768 #[prost(
769 enumeration = "field_options::CType",
770 optional,
771 tag = "1",
772 default = "String"
773 )]
774 pub ctype: ::core::option::Option<i32>,
775 /// The packed option can be enabled for repeated primitive fields to enable
776 /// a more efficient representation on the wire. Rather than repeatedly
777 /// writing the tag and type for each element, the entire array is encoded as
778 /// a single length-delimited blob. In proto3, only explicit setting it to
779 /// false will avoid using packed encoding. This option is prohibited in
780 /// Editions, but the `repeated_field_encoding` feature can be used to control
781 /// the behavior.
782 #[prost(bool, optional, tag = "2")]
783 pub packed: ::core::option::Option<bool>,
784 /// The jstype option determines the JavaScript type used for values of the
785 /// field. The option is permitted only for 64 bit integral and fixed types
786 /// (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
787 /// is represented as JavaScript string, which avoids loss of precision that
788 /// can happen when a large value is converted to a floating point JavaScript.
789 /// Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
790 /// use the JavaScript "number" type. The behavior of the default option
791 /// JS_NORMAL is implementation dependent.
792 ///
793 /// This option is an enum to permit additional types to be added, e.g.
794 /// goog.math.Integer.
795 #[prost(
796 enumeration = "field_options::JsType",
797 optional,
798 tag = "6",
799 default = "JsNormal"
800 )]
801 pub jstype: ::core::option::Option<i32>,
802 /// Should this field be parsed lazily? Lazy applies only to message-type
803 /// fields. It means that when the outer message is initially parsed, the
804 /// inner message's contents will not be parsed but instead stored in encoded
805 /// form. The inner message will actually be parsed when it is first accessed.
806 ///
807 /// This is only a hint. Implementations are free to choose whether to use
808 /// eager or lazy parsing regardless of the value of this option. However,
809 /// setting this option true suggests that the protocol author believes that
810 /// using lazy parsing on this field is worth the additional bookkeeping
811 /// overhead typically needed to implement it.
812 ///
813 /// This option does not affect the public interface of any generated code;
814 /// all method signatures remain the same. Furthermore, thread-safety of the
815 /// interface is not affected by this option; const methods remain safe to
816 /// call from multiple threads concurrently, while non-const methods continue
817 /// to require exclusive access.
818 ///
819 /// Note that lazy message fields are still eagerly verified to check
820 /// ill-formed wireformat or missing required fields. Calling IsInitialized()
821 /// on the outer message would fail if the inner message has missing required
822 /// fields. Failed verification would result in parsing failure (except when
823 /// uninitialized messages are acceptable).
824 #[prost(bool, optional, tag = "5", default = "false")]
825 pub lazy: ::core::option::Option<bool>,
826 /// unverified_lazy does no correctness checks on the byte stream. This should
827 /// only be used where lazy with verification is prohibitive for performance
828 /// reasons.
829 #[prost(bool, optional, tag = "15", default = "false")]
830 pub unverified_lazy: ::core::option::Option<bool>,
831 /// Is this field deprecated?
832 /// Depending on the target platform, this can emit Deprecated annotations
833 /// for accessors, or it will be completely ignored; in the very least, this
834 /// is a formalization for deprecating fields.
835 #[prost(bool, optional, tag = "3", default = "false")]
836 pub deprecated: ::core::option::Option<bool>,
837 /// DEPRECATED. DO NOT USE!
838 /// For Google-internal migration only. Do not use.
839 #[deprecated]
840 #[prost(bool, optional, tag = "10", default = "false")]
841 pub weak: ::core::option::Option<bool>,
842 /// Indicate that the field value should not be printed out when using debug
843 /// formats, e.g. when the field contains sensitive credentials.
844 #[prost(bool, optional, tag = "16", default = "false")]
845 pub debug_redact: ::core::option::Option<bool>,
846 #[prost(enumeration = "field_options::OptionRetention", optional, tag = "17")]
847 pub retention: ::core::option::Option<i32>,
848 #[prost(
849 enumeration = "field_options::OptionTargetType",
850 repeated,
851 packed = "false",
852 tag = "19"
853 )]
854 pub targets: ::prost::alloc::vec::Vec<i32>,
855 #[prost(message, repeated, tag = "20")]
856 pub edition_defaults: ::prost::alloc::vec::Vec<field_options::EditionDefault>,
857 /// Any features defined in the specific edition.
858 /// WARNING: This field should only be used by protobuf plugins or special
859 /// cases like the proto compiler. Other uses are discouraged and
860 /// developers should rely on the protoreflect APIs for their client language.
861 #[prost(message, optional, tag = "21")]
862 pub features: ::core::option::Option<FeatureSet>,
863 #[prost(message, optional, tag = "22")]
864 pub feature_support: ::core::option::Option<field_options::FeatureSupport>,
865 /// The parser stores options it doesn't recognize here. See above.
866 #[prost(message, repeated, tag = "999")]
867 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
868}
869/// Nested message and enum types in `FieldOptions`.
870pub mod field_options {
871 #[derive(Clone, PartialEq, ::prost::Message)]
872 pub struct EditionDefault {
873 #[prost(enumeration = "super::Edition", optional, tag = "3")]
874 pub edition: ::core::option::Option<i32>,
875 /// Textproto value.
876 #[prost(string, optional, tag = "2")]
877 pub value: ::core::option::Option<::prost::alloc::string::String>,
878 }
879 /// Information about the support window of a feature.
880 #[derive(Clone, PartialEq, ::prost::Message)]
881 pub struct FeatureSupport {
882 /// The edition that this feature was first available in. In editions
883 /// earlier than this one, the default assigned to EDITION_LEGACY will be
884 /// used, and proto files will not be able to override it.
885 #[prost(enumeration = "super::Edition", optional, tag = "1")]
886 pub edition_introduced: ::core::option::Option<i32>,
887 /// The edition this feature becomes deprecated in. Using this after this
888 /// edition may trigger warnings.
889 #[prost(enumeration = "super::Edition", optional, tag = "2")]
890 pub edition_deprecated: ::core::option::Option<i32>,
891 /// The deprecation warning text if this feature is used after the edition it
892 /// was marked deprecated in.
893 #[prost(string, optional, tag = "3")]
894 pub deprecation_warning: ::core::option::Option<::prost::alloc::string::String>,
895 /// The edition this feature is no longer available in. In editions after
896 /// this one, the last default assigned will be used, and proto files will
897 /// not be able to override it.
898 #[prost(enumeration = "super::Edition", optional, tag = "4")]
899 pub edition_removed: ::core::option::Option<i32>,
900 }
901 #[derive(
902 Clone,
903 Copy,
904 Debug,
905 PartialEq,
906 Eq,
907 Hash,
908 PartialOrd,
909 Ord,
910 ::prost::Enumeration
911 )]
912 #[repr(i32)]
913 pub enum CType {
914 /// Default mode.
915 String = 0,
916 /// The option \[ctype=CORD\] may be applied to a non-repeated field of type
917 /// "bytes". It indicates that in C++, the data should be stored in a Cord
918 /// instead of a string. For very large strings, this may reduce memory
919 /// fragmentation. It may also allow better performance when parsing from a
920 /// Cord, or when parsing with aliasing enabled, as the parsed Cord may then
921 /// alias the original buffer.
922 Cord = 1,
923 StringPiece = 2,
924 }
925 impl CType {
926 /// String value of the enum field names used in the ProtoBuf definition.
927 ///
928 /// The values are not transformed in any way and thus are considered stable
929 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
930 pub fn as_str_name(&self) -> &'static str {
931 match self {
932 Self::String => "STRING",
933 Self::Cord => "CORD",
934 Self::StringPiece => "STRING_PIECE",
935 }
936 }
937 /// Creates an enum from field names used in the ProtoBuf definition.
938 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
939 match value {
940 "STRING" => Some(Self::String),
941 "CORD" => Some(Self::Cord),
942 "STRING_PIECE" => Some(Self::StringPiece),
943 _ => None,
944 }
945 }
946 }
947 #[derive(
948 Clone,
949 Copy,
950 Debug,
951 PartialEq,
952 Eq,
953 Hash,
954 PartialOrd,
955 Ord,
956 ::prost::Enumeration
957 )]
958 #[repr(i32)]
959 pub enum JsType {
960 /// Use the default type.
961 JsNormal = 0,
962 /// Use JavaScript strings.
963 JsString = 1,
964 /// Use JavaScript numbers.
965 JsNumber = 2,
966 }
967 impl JsType {
968 /// String value of the enum field names used in the ProtoBuf definition.
969 ///
970 /// The values are not transformed in any way and thus are considered stable
971 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
972 pub fn as_str_name(&self) -> &'static str {
973 match self {
974 Self::JsNormal => "JS_NORMAL",
975 Self::JsString => "JS_STRING",
976 Self::JsNumber => "JS_NUMBER",
977 }
978 }
979 /// Creates an enum from field names used in the ProtoBuf definition.
980 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
981 match value {
982 "JS_NORMAL" => Some(Self::JsNormal),
983 "JS_STRING" => Some(Self::JsString),
984 "JS_NUMBER" => Some(Self::JsNumber),
985 _ => None,
986 }
987 }
988 }
989 /// If set to RETENTION_SOURCE, the option will be omitted from the binary.
990 #[derive(
991 Clone,
992 Copy,
993 Debug,
994 PartialEq,
995 Eq,
996 Hash,
997 PartialOrd,
998 Ord,
999 ::prost::Enumeration
1000 )]
1001 #[repr(i32)]
1002 pub enum OptionRetention {
1003 RetentionUnknown = 0,
1004 RetentionRuntime = 1,
1005 RetentionSource = 2,
1006 }
1007 impl OptionRetention {
1008 /// String value of the enum field names used in the ProtoBuf definition.
1009 ///
1010 /// The values are not transformed in any way and thus are considered stable
1011 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1012 pub fn as_str_name(&self) -> &'static str {
1013 match self {
1014 Self::RetentionUnknown => "RETENTION_UNKNOWN",
1015 Self::RetentionRuntime => "RETENTION_RUNTIME",
1016 Self::RetentionSource => "RETENTION_SOURCE",
1017 }
1018 }
1019 /// Creates an enum from field names used in the ProtoBuf definition.
1020 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1021 match value {
1022 "RETENTION_UNKNOWN" => Some(Self::RetentionUnknown),
1023 "RETENTION_RUNTIME" => Some(Self::RetentionRuntime),
1024 "RETENTION_SOURCE" => Some(Self::RetentionSource),
1025 _ => None,
1026 }
1027 }
1028 }
1029 /// This indicates the types of entities that the field may apply to when used
1030 /// as an option. If it is unset, then the field may be freely used as an
1031 /// option on any kind of entity.
1032 #[derive(
1033 Clone,
1034 Copy,
1035 Debug,
1036 PartialEq,
1037 Eq,
1038 Hash,
1039 PartialOrd,
1040 Ord,
1041 ::prost::Enumeration
1042 )]
1043 #[repr(i32)]
1044 pub enum OptionTargetType {
1045 TargetTypeUnknown = 0,
1046 TargetTypeFile = 1,
1047 TargetTypeExtensionRange = 2,
1048 TargetTypeMessage = 3,
1049 TargetTypeField = 4,
1050 TargetTypeOneof = 5,
1051 TargetTypeEnum = 6,
1052 TargetTypeEnumEntry = 7,
1053 TargetTypeService = 8,
1054 TargetTypeMethod = 9,
1055 }
1056 impl OptionTargetType {
1057 /// String value of the enum field names used in the ProtoBuf definition.
1058 ///
1059 /// The values are not transformed in any way and thus are considered stable
1060 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1061 pub fn as_str_name(&self) -> &'static str {
1062 match self {
1063 Self::TargetTypeUnknown => "TARGET_TYPE_UNKNOWN",
1064 Self::TargetTypeFile => "TARGET_TYPE_FILE",
1065 Self::TargetTypeExtensionRange => "TARGET_TYPE_EXTENSION_RANGE",
1066 Self::TargetTypeMessage => "TARGET_TYPE_MESSAGE",
1067 Self::TargetTypeField => "TARGET_TYPE_FIELD",
1068 Self::TargetTypeOneof => "TARGET_TYPE_ONEOF",
1069 Self::TargetTypeEnum => "TARGET_TYPE_ENUM",
1070 Self::TargetTypeEnumEntry => "TARGET_TYPE_ENUM_ENTRY",
1071 Self::TargetTypeService => "TARGET_TYPE_SERVICE",
1072 Self::TargetTypeMethod => "TARGET_TYPE_METHOD",
1073 }
1074 }
1075 /// Creates an enum from field names used in the ProtoBuf definition.
1076 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1077 match value {
1078 "TARGET_TYPE_UNKNOWN" => Some(Self::TargetTypeUnknown),
1079 "TARGET_TYPE_FILE" => Some(Self::TargetTypeFile),
1080 "TARGET_TYPE_EXTENSION_RANGE" => Some(Self::TargetTypeExtensionRange),
1081 "TARGET_TYPE_MESSAGE" => Some(Self::TargetTypeMessage),
1082 "TARGET_TYPE_FIELD" => Some(Self::TargetTypeField),
1083 "TARGET_TYPE_ONEOF" => Some(Self::TargetTypeOneof),
1084 "TARGET_TYPE_ENUM" => Some(Self::TargetTypeEnum),
1085 "TARGET_TYPE_ENUM_ENTRY" => Some(Self::TargetTypeEnumEntry),
1086 "TARGET_TYPE_SERVICE" => Some(Self::TargetTypeService),
1087 "TARGET_TYPE_METHOD" => Some(Self::TargetTypeMethod),
1088 _ => None,
1089 }
1090 }
1091 }
1092}
1093#[derive(Clone, PartialEq, ::prost::Message)]
1094pub struct OneofOptions {
1095 /// Any features defined in the specific edition.
1096 /// WARNING: This field should only be used by protobuf plugins or special
1097 /// cases like the proto compiler. Other uses are discouraged and
1098 /// developers should rely on the protoreflect APIs for their client language.
1099 #[prost(message, optional, tag = "1")]
1100 pub features: ::core::option::Option<FeatureSet>,
1101 /// The parser stores options it doesn't recognize here. See above.
1102 #[prost(message, repeated, tag = "999")]
1103 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
1104}
1105#[derive(Clone, PartialEq, ::prost::Message)]
1106pub struct EnumOptions {
1107 /// Set this option to true to allow mapping different tag names to the same
1108 /// value.
1109 #[prost(bool, optional, tag = "2")]
1110 pub allow_alias: ::core::option::Option<bool>,
1111 /// Is this enum deprecated?
1112 /// Depending on the target platform, this can emit Deprecated annotations
1113 /// for the enum, or it will be completely ignored; in the very least, this
1114 /// is a formalization for deprecating enums.
1115 #[prost(bool, optional, tag = "3", default = "false")]
1116 pub deprecated: ::core::option::Option<bool>,
1117 /// Enable the legacy handling of JSON field name conflicts. This lowercases
1118 /// and strips underscored from the fields before comparison in proto3 only.
1119 /// The new behavior takes `json_name` into account and applies to proto2 as
1120 /// well.
1121 /// TODO Remove this legacy behavior once downstream teams have
1122 /// had time to migrate.
1123 #[deprecated]
1124 #[prost(bool, optional, tag = "6")]
1125 pub deprecated_legacy_json_field_conflicts: ::core::option::Option<bool>,
1126 /// Any features defined in the specific edition.
1127 /// WARNING: This field should only be used by protobuf plugins or special
1128 /// cases like the proto compiler. Other uses are discouraged and
1129 /// developers should rely on the protoreflect APIs for their client language.
1130 #[prost(message, optional, tag = "7")]
1131 pub features: ::core::option::Option<FeatureSet>,
1132 /// The parser stores options it doesn't recognize here. See above.
1133 #[prost(message, repeated, tag = "999")]
1134 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
1135}
1136#[derive(Clone, PartialEq, ::prost::Message)]
1137pub struct EnumValueOptions {
1138 /// Is this enum value deprecated?
1139 /// Depending on the target platform, this can emit Deprecated annotations
1140 /// for the enum value, or it will be completely ignored; in the very least,
1141 /// this is a formalization for deprecating enum values.
1142 #[prost(bool, optional, tag = "1", default = "false")]
1143 pub deprecated: ::core::option::Option<bool>,
1144 /// Any features defined in the specific edition.
1145 /// WARNING: This field should only be used by protobuf plugins or special
1146 /// cases like the proto compiler. Other uses are discouraged and
1147 /// developers should rely on the protoreflect APIs for their client language.
1148 #[prost(message, optional, tag = "2")]
1149 pub features: ::core::option::Option<FeatureSet>,
1150 /// Indicate that fields annotated with this enum value should not be printed
1151 /// out when using debug formats, e.g. when the field contains sensitive
1152 /// credentials.
1153 #[prost(bool, optional, tag = "3", default = "false")]
1154 pub debug_redact: ::core::option::Option<bool>,
1155 /// Information about the support window of a feature value.
1156 #[prost(message, optional, tag = "4")]
1157 pub feature_support: ::core::option::Option<field_options::FeatureSupport>,
1158 /// The parser stores options it doesn't recognize here. See above.
1159 #[prost(message, repeated, tag = "999")]
1160 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
1161}
1162#[derive(Clone, PartialEq, ::prost::Message)]
1163pub struct ServiceOptions {
1164 /// Any features defined in the specific edition.
1165 /// WARNING: This field should only be used by protobuf plugins or special
1166 /// cases like the proto compiler. Other uses are discouraged and
1167 /// developers should rely on the protoreflect APIs for their client language.
1168 #[prost(message, optional, tag = "34")]
1169 pub features: ::core::option::Option<FeatureSet>,
1170 /// Is this service deprecated?
1171 /// Depending on the target platform, this can emit Deprecated annotations
1172 /// for the service, or it will be completely ignored; in the very least,
1173 /// this is a formalization for deprecating services.
1174 #[prost(bool, optional, tag = "33", default = "false")]
1175 pub deprecated: ::core::option::Option<bool>,
1176 /// The parser stores options it doesn't recognize here. See above.
1177 #[prost(message, repeated, tag = "999")]
1178 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
1179}
1180#[derive(Clone, PartialEq, ::prost::Message)]
1181pub struct MethodOptions {
1182 /// Is this method deprecated?
1183 /// Depending on the target platform, this can emit Deprecated annotations
1184 /// for the method, or it will be completely ignored; in the very least,
1185 /// this is a formalization for deprecating methods.
1186 #[prost(bool, optional, tag = "33", default = "false")]
1187 pub deprecated: ::core::option::Option<bool>,
1188 #[prost(
1189 enumeration = "method_options::IdempotencyLevel",
1190 optional,
1191 tag = "34",
1192 default = "IdempotencyUnknown"
1193 )]
1194 pub idempotency_level: ::core::option::Option<i32>,
1195 /// Any features defined in the specific edition.
1196 /// WARNING: This field should only be used by protobuf plugins or special
1197 /// cases like the proto compiler. Other uses are discouraged and
1198 /// developers should rely on the protoreflect APIs for their client language.
1199 #[prost(message, optional, tag = "35")]
1200 pub features: ::core::option::Option<FeatureSet>,
1201 /// The parser stores options it doesn't recognize here. See above.
1202 #[prost(message, repeated, tag = "999")]
1203 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
1204}
1205/// Nested message and enum types in `MethodOptions`.
1206pub mod method_options {
1207 /// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
1208 /// or neither? HTTP based RPC implementation may choose GET verb for safe
1209 /// methods, and PUT verb for idempotent methods instead of the default POST.
1210 #[derive(
1211 Clone,
1212 Copy,
1213 Debug,
1214 PartialEq,
1215 Eq,
1216 Hash,
1217 PartialOrd,
1218 Ord,
1219 ::prost::Enumeration
1220 )]
1221 #[repr(i32)]
1222 pub enum IdempotencyLevel {
1223 IdempotencyUnknown = 0,
1224 /// implies idempotent
1225 NoSideEffects = 1,
1226 /// idempotent, but may have side effects
1227 Idempotent = 2,
1228 }
1229 impl IdempotencyLevel {
1230 /// String value of the enum field names used in the ProtoBuf definition.
1231 ///
1232 /// The values are not transformed in any way and thus are considered stable
1233 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1234 pub fn as_str_name(&self) -> &'static str {
1235 match self {
1236 Self::IdempotencyUnknown => "IDEMPOTENCY_UNKNOWN",
1237 Self::NoSideEffects => "NO_SIDE_EFFECTS",
1238 Self::Idempotent => "IDEMPOTENT",
1239 }
1240 }
1241 /// Creates an enum from field names used in the ProtoBuf definition.
1242 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1243 match value {
1244 "IDEMPOTENCY_UNKNOWN" => Some(Self::IdempotencyUnknown),
1245 "NO_SIDE_EFFECTS" => Some(Self::NoSideEffects),
1246 "IDEMPOTENT" => Some(Self::Idempotent),
1247 _ => None,
1248 }
1249 }
1250 }
1251}
1252/// A message representing a option the parser does not recognize. This only
1253/// appears in options protos created by the compiler::Parser class.
1254/// DescriptorPool resolves these when building Descriptor objects. Therefore,
1255/// options protos in descriptor objects (e.g. returned by Descriptor::options(),
1256/// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
1257/// in them.
1258#[derive(Clone, PartialEq, ::prost::Message)]
1259pub struct UninterpretedOption {
1260 #[prost(message, repeated, tag = "2")]
1261 pub name: ::prost::alloc::vec::Vec<uninterpreted_option::NamePart>,
1262 /// The value of the uninterpreted option, in whatever type the tokenizer
1263 /// identified it as during parsing. Exactly one of these should be set.
1264 #[prost(string, optional, tag = "3")]
1265 pub identifier_value: ::core::option::Option<::prost::alloc::string::String>,
1266 #[prost(uint64, optional, tag = "4")]
1267 pub positive_int_value: ::core::option::Option<u64>,
1268 #[prost(int64, optional, tag = "5")]
1269 pub negative_int_value: ::core::option::Option<i64>,
1270 #[prost(double, optional, tag = "6")]
1271 pub double_value: ::core::option::Option<f64>,
1272 #[prost(bytes = "vec", optional, tag = "7")]
1273 pub string_value: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
1274 #[prost(string, optional, tag = "8")]
1275 pub aggregate_value: ::core::option::Option<::prost::alloc::string::String>,
1276}
1277/// Nested message and enum types in `UninterpretedOption`.
1278pub mod uninterpreted_option {
1279 /// The name of the uninterpreted option. Each string represents a segment in
1280 /// a dot-separated name. is_extension is true iff a segment represents an
1281 /// extension (denoted with parentheses in options specs in .proto files).
1282 /// E.g.,{ \["foo", false\], \["bar.baz", true\], \["moo", false\] } represents
1283 /// "foo.(bar.baz).moo".
1284 #[derive(Clone, PartialEq, ::prost::Message)]
1285 pub struct NamePart {
1286 #[prost(string, required, tag = "1")]
1287 pub name_part: ::prost::alloc::string::String,
1288 #[prost(bool, required, tag = "2")]
1289 pub is_extension: bool,
1290 }
1291}
1292/// TODO Enums in C++ gencode (and potentially other languages) are
1293/// not well scoped. This means that each of the feature enums below can clash
1294/// with each other. The short names we've chosen maximize call-site
1295/// readability, but leave us very open to this scenario. A future feature will
1296/// be designed and implemented to handle this, hopefully before we ever hit a
1297/// conflict here.
1298#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1299pub struct FeatureSet {
1300 #[prost(enumeration = "feature_set::FieldPresence", optional, tag = "1")]
1301 pub field_presence: ::core::option::Option<i32>,
1302 #[prost(enumeration = "feature_set::EnumType", optional, tag = "2")]
1303 pub enum_type: ::core::option::Option<i32>,
1304 #[prost(enumeration = "feature_set::RepeatedFieldEncoding", optional, tag = "3")]
1305 pub repeated_field_encoding: ::core::option::Option<i32>,
1306 #[prost(enumeration = "feature_set::Utf8Validation", optional, tag = "4")]
1307 pub utf8_validation: ::core::option::Option<i32>,
1308 #[prost(enumeration = "feature_set::MessageEncoding", optional, tag = "5")]
1309 pub message_encoding: ::core::option::Option<i32>,
1310 #[prost(enumeration = "feature_set::JsonFormat", optional, tag = "6")]
1311 pub json_format: ::core::option::Option<i32>,
1312 #[prost(enumeration = "feature_set::EnforceNamingStyle", optional, tag = "7")]
1313 pub enforce_naming_style: ::core::option::Option<i32>,
1314 #[prost(
1315 enumeration = "feature_set::visibility_feature::DefaultSymbolVisibility",
1316 optional,
1317 tag = "8"
1318 )]
1319 pub default_symbol_visibility: ::core::option::Option<i32>,
1320}
1321/// Nested message and enum types in `FeatureSet`.
1322pub mod feature_set {
1323 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1324 pub struct VisibilityFeature {}
1325 /// Nested message and enum types in `VisibilityFeature`.
1326 pub mod visibility_feature {
1327 #[derive(
1328 Clone,
1329 Copy,
1330 Debug,
1331 PartialEq,
1332 Eq,
1333 Hash,
1334 PartialOrd,
1335 Ord,
1336 ::prost::Enumeration
1337 )]
1338 #[repr(i32)]
1339 pub enum DefaultSymbolVisibility {
1340 Unknown = 0,
1341 /// Default pre-EDITION_2024, all UNSET visibility are export.
1342 ExportAll = 1,
1343 /// All top-level symbols default to export, nested default to local.
1344 ExportTopLevel = 2,
1345 /// All symbols default to local.
1346 LocalAll = 3,
1347 /// All symbols local by default. Nested types cannot be exported.
1348 /// With special case caveat for message { enum {} reserved 1 to max; }
1349 /// This is the recommended setting for new protos.
1350 Strict = 4,
1351 }
1352 impl DefaultSymbolVisibility {
1353 /// String value of the enum field names used in the ProtoBuf definition.
1354 ///
1355 /// The values are not transformed in any way and thus are considered stable
1356 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1357 pub fn as_str_name(&self) -> &'static str {
1358 match self {
1359 Self::Unknown => "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN",
1360 Self::ExportAll => "EXPORT_ALL",
1361 Self::ExportTopLevel => "EXPORT_TOP_LEVEL",
1362 Self::LocalAll => "LOCAL_ALL",
1363 Self::Strict => "STRICT",
1364 }
1365 }
1366 /// Creates an enum from field names used in the ProtoBuf definition.
1367 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1368 match value {
1369 "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" => Some(Self::Unknown),
1370 "EXPORT_ALL" => Some(Self::ExportAll),
1371 "EXPORT_TOP_LEVEL" => Some(Self::ExportTopLevel),
1372 "LOCAL_ALL" => Some(Self::LocalAll),
1373 "STRICT" => Some(Self::Strict),
1374 _ => None,
1375 }
1376 }
1377 }
1378 }
1379 #[derive(
1380 Clone,
1381 Copy,
1382 Debug,
1383 PartialEq,
1384 Eq,
1385 Hash,
1386 PartialOrd,
1387 Ord,
1388 ::prost::Enumeration
1389 )]
1390 #[repr(i32)]
1391 pub enum FieldPresence {
1392 Unknown = 0,
1393 Explicit = 1,
1394 Implicit = 2,
1395 LegacyRequired = 3,
1396 }
1397 impl FieldPresence {
1398 /// String value of the enum field names used in the ProtoBuf definition.
1399 ///
1400 /// The values are not transformed in any way and thus are considered stable
1401 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1402 pub fn as_str_name(&self) -> &'static str {
1403 match self {
1404 Self::Unknown => "FIELD_PRESENCE_UNKNOWN",
1405 Self::Explicit => "EXPLICIT",
1406 Self::Implicit => "IMPLICIT",
1407 Self::LegacyRequired => "LEGACY_REQUIRED",
1408 }
1409 }
1410 /// Creates an enum from field names used in the ProtoBuf definition.
1411 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1412 match value {
1413 "FIELD_PRESENCE_UNKNOWN" => Some(Self::Unknown),
1414 "EXPLICIT" => Some(Self::Explicit),
1415 "IMPLICIT" => Some(Self::Implicit),
1416 "LEGACY_REQUIRED" => Some(Self::LegacyRequired),
1417 _ => None,
1418 }
1419 }
1420 }
1421 #[derive(
1422 Clone,
1423 Copy,
1424 Debug,
1425 PartialEq,
1426 Eq,
1427 Hash,
1428 PartialOrd,
1429 Ord,
1430 ::prost::Enumeration
1431 )]
1432 #[repr(i32)]
1433 pub enum EnumType {
1434 Unknown = 0,
1435 Open = 1,
1436 Closed = 2,
1437 }
1438 impl EnumType {
1439 /// String value of the enum field names used in the ProtoBuf definition.
1440 ///
1441 /// The values are not transformed in any way and thus are considered stable
1442 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1443 pub fn as_str_name(&self) -> &'static str {
1444 match self {
1445 Self::Unknown => "ENUM_TYPE_UNKNOWN",
1446 Self::Open => "OPEN",
1447 Self::Closed => "CLOSED",
1448 }
1449 }
1450 /// Creates an enum from field names used in the ProtoBuf definition.
1451 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1452 match value {
1453 "ENUM_TYPE_UNKNOWN" => Some(Self::Unknown),
1454 "OPEN" => Some(Self::Open),
1455 "CLOSED" => Some(Self::Closed),
1456 _ => None,
1457 }
1458 }
1459 }
1460 #[derive(
1461 Clone,
1462 Copy,
1463 Debug,
1464 PartialEq,
1465 Eq,
1466 Hash,
1467 PartialOrd,
1468 Ord,
1469 ::prost::Enumeration
1470 )]
1471 #[repr(i32)]
1472 pub enum RepeatedFieldEncoding {
1473 Unknown = 0,
1474 Packed = 1,
1475 Expanded = 2,
1476 }
1477 impl RepeatedFieldEncoding {
1478 /// String value of the enum field names used in the ProtoBuf definition.
1479 ///
1480 /// The values are not transformed in any way and thus are considered stable
1481 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1482 pub fn as_str_name(&self) -> &'static str {
1483 match self {
1484 Self::Unknown => "REPEATED_FIELD_ENCODING_UNKNOWN",
1485 Self::Packed => "PACKED",
1486 Self::Expanded => "EXPANDED",
1487 }
1488 }
1489 /// Creates an enum from field names used in the ProtoBuf definition.
1490 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1491 match value {
1492 "REPEATED_FIELD_ENCODING_UNKNOWN" => Some(Self::Unknown),
1493 "PACKED" => Some(Self::Packed),
1494 "EXPANDED" => Some(Self::Expanded),
1495 _ => None,
1496 }
1497 }
1498 }
1499 #[derive(
1500 Clone,
1501 Copy,
1502 Debug,
1503 PartialEq,
1504 Eq,
1505 Hash,
1506 PartialOrd,
1507 Ord,
1508 ::prost::Enumeration
1509 )]
1510 #[repr(i32)]
1511 pub enum Utf8Validation {
1512 Unknown = 0,
1513 Verify = 2,
1514 None = 3,
1515 }
1516 impl Utf8Validation {
1517 /// String value of the enum field names used in the ProtoBuf definition.
1518 ///
1519 /// The values are not transformed in any way and thus are considered stable
1520 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1521 pub fn as_str_name(&self) -> &'static str {
1522 match self {
1523 Self::Unknown => "UTF8_VALIDATION_UNKNOWN",
1524 Self::Verify => "VERIFY",
1525 Self::None => "NONE",
1526 }
1527 }
1528 /// Creates an enum from field names used in the ProtoBuf definition.
1529 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1530 match value {
1531 "UTF8_VALIDATION_UNKNOWN" => Some(Self::Unknown),
1532 "VERIFY" => Some(Self::Verify),
1533 "NONE" => Some(Self::None),
1534 _ => None,
1535 }
1536 }
1537 }
1538 #[derive(
1539 Clone,
1540 Copy,
1541 Debug,
1542 PartialEq,
1543 Eq,
1544 Hash,
1545 PartialOrd,
1546 Ord,
1547 ::prost::Enumeration
1548 )]
1549 #[repr(i32)]
1550 pub enum MessageEncoding {
1551 Unknown = 0,
1552 LengthPrefixed = 1,
1553 Delimited = 2,
1554 }
1555 impl MessageEncoding {
1556 /// String value of the enum field names used in the ProtoBuf definition.
1557 ///
1558 /// The values are not transformed in any way and thus are considered stable
1559 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1560 pub fn as_str_name(&self) -> &'static str {
1561 match self {
1562 Self::Unknown => "MESSAGE_ENCODING_UNKNOWN",
1563 Self::LengthPrefixed => "LENGTH_PREFIXED",
1564 Self::Delimited => "DELIMITED",
1565 }
1566 }
1567 /// Creates an enum from field names used in the ProtoBuf definition.
1568 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1569 match value {
1570 "MESSAGE_ENCODING_UNKNOWN" => Some(Self::Unknown),
1571 "LENGTH_PREFIXED" => Some(Self::LengthPrefixed),
1572 "DELIMITED" => Some(Self::Delimited),
1573 _ => None,
1574 }
1575 }
1576 }
1577 #[derive(
1578 Clone,
1579 Copy,
1580 Debug,
1581 PartialEq,
1582 Eq,
1583 Hash,
1584 PartialOrd,
1585 Ord,
1586 ::prost::Enumeration
1587 )]
1588 #[repr(i32)]
1589 pub enum JsonFormat {
1590 Unknown = 0,
1591 Allow = 1,
1592 LegacyBestEffort = 2,
1593 }
1594 impl JsonFormat {
1595 /// String value of the enum field names used in the ProtoBuf definition.
1596 ///
1597 /// The values are not transformed in any way and thus are considered stable
1598 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1599 pub fn as_str_name(&self) -> &'static str {
1600 match self {
1601 Self::Unknown => "JSON_FORMAT_UNKNOWN",
1602 Self::Allow => "ALLOW",
1603 Self::LegacyBestEffort => "LEGACY_BEST_EFFORT",
1604 }
1605 }
1606 /// Creates an enum from field names used in the ProtoBuf definition.
1607 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1608 match value {
1609 "JSON_FORMAT_UNKNOWN" => Some(Self::Unknown),
1610 "ALLOW" => Some(Self::Allow),
1611 "LEGACY_BEST_EFFORT" => Some(Self::LegacyBestEffort),
1612 _ => None,
1613 }
1614 }
1615 }
1616 #[derive(
1617 Clone,
1618 Copy,
1619 Debug,
1620 PartialEq,
1621 Eq,
1622 Hash,
1623 PartialOrd,
1624 Ord,
1625 ::prost::Enumeration
1626 )]
1627 #[repr(i32)]
1628 pub enum EnforceNamingStyle {
1629 Unknown = 0,
1630 Style2024 = 1,
1631 StyleLegacy = 2,
1632 }
1633 impl EnforceNamingStyle {
1634 /// String value of the enum field names used in the ProtoBuf definition.
1635 ///
1636 /// The values are not transformed in any way and thus are considered stable
1637 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1638 pub fn as_str_name(&self) -> &'static str {
1639 match self {
1640 Self::Unknown => "ENFORCE_NAMING_STYLE_UNKNOWN",
1641 Self::Style2024 => "STYLE2024",
1642 Self::StyleLegacy => "STYLE_LEGACY",
1643 }
1644 }
1645 /// Creates an enum from field names used in the ProtoBuf definition.
1646 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1647 match value {
1648 "ENFORCE_NAMING_STYLE_UNKNOWN" => Some(Self::Unknown),
1649 "STYLE2024" => Some(Self::Style2024),
1650 "STYLE_LEGACY" => Some(Self::StyleLegacy),
1651 _ => None,
1652 }
1653 }
1654 }
1655}
1656/// A compiled specification for the defaults of a set of features. These
1657/// messages are generated from FeatureSet extensions and can be used to seed
1658/// feature resolution. The resolution with this object becomes a simple search
1659/// for the closest matching edition, followed by proto merges.
1660#[derive(Clone, PartialEq, ::prost::Message)]
1661pub struct FeatureSetDefaults {
1662 #[prost(message, repeated, tag = "1")]
1663 pub defaults: ::prost::alloc::vec::Vec<
1664 feature_set_defaults::FeatureSetEditionDefault,
1665 >,
1666 /// The minimum supported edition (inclusive) when this was constructed.
1667 /// Editions before this will not have defaults.
1668 #[prost(enumeration = "Edition", optional, tag = "4")]
1669 pub minimum_edition: ::core::option::Option<i32>,
1670 /// The maximum known edition (inclusive) when this was constructed. Editions
1671 /// after this will not have reliable defaults.
1672 #[prost(enumeration = "Edition", optional, tag = "5")]
1673 pub maximum_edition: ::core::option::Option<i32>,
1674}
1675/// Nested message and enum types in `FeatureSetDefaults`.
1676pub mod feature_set_defaults {
1677 /// A map from every known edition with a unique set of defaults to its
1678 /// defaults. Not all editions may be contained here. For a given edition,
1679 /// the defaults at the closest matching edition ordered at or before it should
1680 /// be used. This field must be in strict ascending order by edition.
1681 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1682 pub struct FeatureSetEditionDefault {
1683 #[prost(enumeration = "super::Edition", optional, tag = "3")]
1684 pub edition: ::core::option::Option<i32>,
1685 /// Defaults of features that can be overridden in this edition.
1686 #[prost(message, optional, tag = "4")]
1687 pub overridable_features: ::core::option::Option<super::FeatureSet>,
1688 /// Defaults of features that can't be overridden in this edition.
1689 #[prost(message, optional, tag = "5")]
1690 pub fixed_features: ::core::option::Option<super::FeatureSet>,
1691 }
1692}
1693/// Encapsulates information about the original source file from which a
1694/// FileDescriptorProto was generated.
1695#[derive(Clone, PartialEq, ::prost::Message)]
1696pub struct SourceCodeInfo {
1697 /// A Location identifies a piece of source code in a .proto file which
1698 /// corresponds to a particular definition. This information is intended
1699 /// to be useful to IDEs, code indexers, documentation generators, and similar
1700 /// tools.
1701 ///
1702 /// For example, say we have a file like:
1703 /// message Foo {
1704 /// optional string foo = 1;
1705 /// }
1706 /// Let's look at just the field definition:
1707 /// optional string foo = 1;
1708 /// ^ ^^ ^^ ^ ^^^
1709 /// a bc de f ghi
1710 /// We have the following locations:
1711 /// span path represents
1712 /// \[a,i) [ 4, 0, 2, 0 \] The whole field definition.
1713 /// \[a,b) [ 4, 0, 2, 0, 4 \] The label (optional).
1714 /// \[c,d) [ 4, 0, 2, 0, 5 \] The type (string).
1715 /// \[e,f) [ 4, 0, 2, 0, 1 \] The name (foo).
1716 /// \[g,h) [ 4, 0, 2, 0, 3 \] The number (1).
1717 ///
1718 /// Notes:
1719 /// - A location may refer to a repeated field itself (i.e. not to any
1720 /// particular index within it). This is used whenever a set of elements are
1721 /// logically enclosed in a single code segment. For example, an entire
1722 /// extend block (possibly containing multiple extension definitions) will
1723 /// have an outer location whose path refers to the "extensions" repeated
1724 /// field without an index.
1725 /// - Multiple locations may have the same path. This happens when a single
1726 /// logical declaration is spread out across multiple places. The most
1727 /// obvious example is the "extend" block again -- there may be multiple
1728 /// extend blocks in the same scope, each of which will have the same path.
1729 /// - A location's span is not always a subset of its parent's span. For
1730 /// example, the "extendee" of an extension declaration appears at the
1731 /// beginning of the "extend" block and is shared by all extensions within
1732 /// the block.
1733 /// - Just because a location's span is a subset of some other location's span
1734 /// does not mean that it is a descendant. For example, a "group" defines
1735 /// both a type and a field in a single declaration. Thus, the locations
1736 /// corresponding to the type and field and their components will overlap.
1737 /// - Code which tries to interpret locations should probably be designed to
1738 /// ignore those that it doesn't understand, as more types of locations could
1739 /// be recorded in the future.
1740 #[prost(message, repeated, tag = "1")]
1741 pub location: ::prost::alloc::vec::Vec<source_code_info::Location>,
1742}
1743/// Nested message and enum types in `SourceCodeInfo`.
1744pub mod source_code_info {
1745 #[derive(Clone, PartialEq, ::prost::Message)]
1746 pub struct Location {
1747 /// Identifies which part of the FileDescriptorProto was defined at this
1748 /// location.
1749 ///
1750 /// Each element is a field number or an index. They form a path from
1751 /// the root FileDescriptorProto to the place where the definition appears.
1752 /// For example, this path:
1753 /// \[ 4, 3, 2, 7, 1 \]
1754 /// refers to:
1755 /// file.message_type(3) // 4, 3
1756 /// .field(7) // 2, 7
1757 /// .name() // 1
1758 /// This is because FileDescriptorProto.message_type has field number 4:
1759 /// repeated DescriptorProto message_type = 4;
1760 /// and DescriptorProto.field has field number 2:
1761 /// repeated FieldDescriptorProto field = 2;
1762 /// and FieldDescriptorProto.name has field number 1:
1763 /// optional string name = 1;
1764 ///
1765 /// Thus, the above path gives the location of a field name. If we removed
1766 /// the last element:
1767 /// \[ 4, 3, 2, 7 \]
1768 /// this path refers to the whole field declaration (from the beginning
1769 /// of the label to the terminating semicolon).
1770 #[prost(int32, repeated, tag = "1")]
1771 pub path: ::prost::alloc::vec::Vec<i32>,
1772 /// Always has exactly three or four elements: start line, start column,
1773 /// end line (optional, otherwise assumed same as start line), end column.
1774 /// These are packed into a single field for efficiency. Note that line
1775 /// and column numbers are zero-based -- typically you will want to add
1776 /// 1 to each before displaying to a user.
1777 #[prost(int32, repeated, tag = "2")]
1778 pub span: ::prost::alloc::vec::Vec<i32>,
1779 /// If this SourceCodeInfo represents a complete declaration, these are any
1780 /// comments appearing before and after the declaration which appear to be
1781 /// attached to the declaration.
1782 ///
1783 /// A series of line comments appearing on consecutive lines, with no other
1784 /// tokens appearing on those lines, will be treated as a single comment.
1785 ///
1786 /// leading_detached_comments will keep paragraphs of comments that appear
1787 /// before (but not connected to) the current element. Each paragraph,
1788 /// separated by empty lines, will be one comment element in the repeated
1789 /// field.
1790 ///
1791 /// Only the comment content is provided; comment markers (e.g. //) are
1792 /// stripped out. For block comments, leading whitespace and an asterisk
1793 /// will be stripped from the beginning of each line other than the first.
1794 /// Newlines are included in the output.
1795 ///
1796 /// Examples:
1797 ///
1798 /// optional int32 foo = 1; // Comment attached to foo.
1799 /// // Comment attached to bar.
1800 /// optional int32 bar = 2;
1801 ///
1802 /// optional string baz = 3;
1803 /// // Comment attached to baz.
1804 /// // Another line attached to baz.
1805 ///
1806 /// // Comment attached to moo.
1807 /// //
1808 /// // Another line attached to moo.
1809 /// optional double moo = 4;
1810 ///
1811 /// // Detached comment for corge. This is not leading or trailing comments
1812 /// // to moo or corge because there are blank lines separating it from
1813 /// // both.
1814 ///
1815 /// // Detached comment for corge paragraph 2.
1816 ///
1817 /// optional string corge = 5;
1818 /// /* Block comment attached
1819 /// * to corge. Leading asterisks
1820 /// * will be removed. */
1821 /// /* Block comment attached to
1822 /// * grault. */
1823 /// optional int32 grault = 6;
1824 ///
1825 /// // ignored detached comments.
1826 #[prost(string, optional, tag = "3")]
1827 pub leading_comments: ::core::option::Option<::prost::alloc::string::String>,
1828 #[prost(string, optional, tag = "4")]
1829 pub trailing_comments: ::core::option::Option<::prost::alloc::string::String>,
1830 #[prost(string, repeated, tag = "6")]
1831 pub leading_detached_comments: ::prost::alloc::vec::Vec<
1832 ::prost::alloc::string::String,
1833 >,
1834 }
1835}
1836/// Describes the relationship between generated code and its original source
1837/// file. A GeneratedCodeInfo message is associated with only one generated
1838/// source file, but may contain references to different source .proto files.
1839#[derive(Clone, PartialEq, ::prost::Message)]
1840pub struct GeneratedCodeInfo {
1841 /// An Annotation connects some span of text in generated code to an element
1842 /// of its generating .proto file.
1843 #[prost(message, repeated, tag = "1")]
1844 pub annotation: ::prost::alloc::vec::Vec<generated_code_info::Annotation>,
1845}
1846/// Nested message and enum types in `GeneratedCodeInfo`.
1847pub mod generated_code_info {
1848 #[derive(Clone, PartialEq, ::prost::Message)]
1849 pub struct Annotation {
1850 /// Identifies the element in the original source .proto file. This field
1851 /// is formatted the same as SourceCodeInfo.Location.path.
1852 #[prost(int32, repeated, tag = "1")]
1853 pub path: ::prost::alloc::vec::Vec<i32>,
1854 /// Identifies the filesystem path to the original source .proto.
1855 #[prost(string, optional, tag = "2")]
1856 pub source_file: ::core::option::Option<::prost::alloc::string::String>,
1857 /// Identifies the starting offset in bytes in the generated code
1858 /// that relates to the identified object.
1859 #[prost(int32, optional, tag = "3")]
1860 pub begin: ::core::option::Option<i32>,
1861 /// Identifies the ending offset in bytes in the generated code that
1862 /// relates to the identified object. The end offset should be one past
1863 /// the last relevant byte (so the length of the text = end - begin).
1864 #[prost(int32, optional, tag = "4")]
1865 pub end: ::core::option::Option<i32>,
1866 #[prost(enumeration = "annotation::Semantic", optional, tag = "5")]
1867 pub semantic: ::core::option::Option<i32>,
1868 }
1869 /// Nested message and enum types in `Annotation`.
1870 pub mod annotation {
1871 /// Represents the identified object's effect on the element in the original
1872 /// .proto file.
1873 #[derive(
1874 Clone,
1875 Copy,
1876 Debug,
1877 PartialEq,
1878 Eq,
1879 Hash,
1880 PartialOrd,
1881 Ord,
1882 ::prost::Enumeration
1883 )]
1884 #[repr(i32)]
1885 pub enum Semantic {
1886 /// There is no effect or the effect is indescribable.
1887 None = 0,
1888 /// The element is set or otherwise mutated.
1889 Set = 1,
1890 /// An alias to the element is returned.
1891 Alias = 2,
1892 }
1893 impl Semantic {
1894 /// String value of the enum field names used in the ProtoBuf definition.
1895 ///
1896 /// The values are not transformed in any way and thus are considered stable
1897 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1898 pub fn as_str_name(&self) -> &'static str {
1899 match self {
1900 Self::None => "NONE",
1901 Self::Set => "SET",
1902 Self::Alias => "ALIAS",
1903 }
1904 }
1905 /// Creates an enum from field names used in the ProtoBuf definition.
1906 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1907 match value {
1908 "NONE" => Some(Self::None),
1909 "SET" => Some(Self::Set),
1910 "ALIAS" => Some(Self::Alias),
1911 _ => None,
1912 }
1913 }
1914 }
1915 }
1916}
1917/// The full set of known editions.
1918#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1919#[repr(i32)]
1920pub enum Edition {
1921 /// A placeholder for an unknown edition value.
1922 Unknown = 0,
1923 /// A placeholder edition for specifying default behaviors *before* a feature
1924 /// was first introduced. This is effectively an "infinite past".
1925 Legacy = 900,
1926 /// Legacy syntax "editions". These pre-date editions, but behave much like
1927 /// distinct editions. These can't be used to specify the edition of proto
1928 /// files, but feature definitions must supply proto2/proto3 defaults for
1929 /// backwards compatibility.
1930 Proto2 = 998,
1931 Proto3 = 999,
1932 /// Editions that have been released. The specific values are arbitrary and
1933 /// should not be depended on, but they will always be time-ordered for easy
1934 /// comparison.
1935 Edition2023 = 1000,
1936 Edition2024 = 1001,
1937 /// Placeholder editions for testing feature resolution. These should not be
1938 /// used or relied on outside of tests.
1939 Edition1TestOnly = 1,
1940 Edition2TestOnly = 2,
1941 Edition99997TestOnly = 99997,
1942 Edition99998TestOnly = 99998,
1943 Edition99999TestOnly = 99999,
1944 /// Placeholder for specifying unbounded edition support. This should only
1945 /// ever be used by plugins that can expect to never require any changes to
1946 /// support a new edition.
1947 Max = 2147483647,
1948}
1949impl Edition {
1950 /// String value of the enum field names used in the ProtoBuf definition.
1951 ///
1952 /// The values are not transformed in any way and thus are considered stable
1953 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1954 pub fn as_str_name(&self) -> &'static str {
1955 match self {
1956 Self::Unknown => "EDITION_UNKNOWN",
1957 Self::Legacy => "EDITION_LEGACY",
1958 Self::Proto2 => "EDITION_PROTO2",
1959 Self::Proto3 => "EDITION_PROTO3",
1960 Self::Edition2023 => "EDITION_2023",
1961 Self::Edition2024 => "EDITION_2024",
1962 Self::Edition1TestOnly => "EDITION_1_TEST_ONLY",
1963 Self::Edition2TestOnly => "EDITION_2_TEST_ONLY",
1964 Self::Edition99997TestOnly => "EDITION_99997_TEST_ONLY",
1965 Self::Edition99998TestOnly => "EDITION_99998_TEST_ONLY",
1966 Self::Edition99999TestOnly => "EDITION_99999_TEST_ONLY",
1967 Self::Max => "EDITION_MAX",
1968 }
1969 }
1970 /// Creates an enum from field names used in the ProtoBuf definition.
1971 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1972 match value {
1973 "EDITION_UNKNOWN" => Some(Self::Unknown),
1974 "EDITION_LEGACY" => Some(Self::Legacy),
1975 "EDITION_PROTO2" => Some(Self::Proto2),
1976 "EDITION_PROTO3" => Some(Self::Proto3),
1977 "EDITION_2023" => Some(Self::Edition2023),
1978 "EDITION_2024" => Some(Self::Edition2024),
1979 "EDITION_1_TEST_ONLY" => Some(Self::Edition1TestOnly),
1980 "EDITION_2_TEST_ONLY" => Some(Self::Edition2TestOnly),
1981 "EDITION_99997_TEST_ONLY" => Some(Self::Edition99997TestOnly),
1982 "EDITION_99998_TEST_ONLY" => Some(Self::Edition99998TestOnly),
1983 "EDITION_99999_TEST_ONLY" => Some(Self::Edition99999TestOnly),
1984 "EDITION_MAX" => Some(Self::Max),
1985 _ => None,
1986 }
1987 }
1988}
1989/// Describes the 'visibility' of a symbol with respect to the proto import
1990/// system. Symbols can only be imported when the visibility rules do not prevent
1991/// it (ex: local symbols cannot be imported). Visibility modifiers can only set
1992/// on `message` and `enum` as they are the only types available to be referenced
1993/// from other files.
1994#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1995#[repr(i32)]
1996pub enum SymbolVisibility {
1997 VisibilityUnset = 0,
1998 VisibilityLocal = 1,
1999 VisibilityExport = 2,
2000}
2001impl SymbolVisibility {
2002 /// String value of the enum field names used in the ProtoBuf definition.
2003 ///
2004 /// The values are not transformed in any way and thus are considered stable
2005 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2006 pub fn as_str_name(&self) -> &'static str {
2007 match self {
2008 Self::VisibilityUnset => "VISIBILITY_UNSET",
2009 Self::VisibilityLocal => "VISIBILITY_LOCAL",
2010 Self::VisibilityExport => "VISIBILITY_EXPORT",
2011 }
2012 }
2013 /// Creates an enum from field names used in the ProtoBuf definition.
2014 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2015 match value {
2016 "VISIBILITY_UNSET" => Some(Self::VisibilityUnset),
2017 "VISIBILITY_LOCAL" => Some(Self::VisibilityLocal),
2018 "VISIBILITY_EXPORT" => Some(Self::VisibilityExport),
2019 _ => None,
2020 }
2021 }
2022}
2023/// A Duration represents a signed, fixed-length span of time represented
2024/// as a count of seconds and fractions of seconds at nanosecond
2025/// resolution. It is independent of any calendar and concepts like "day"
2026/// or "month". It is related to Timestamp in that the difference between
2027/// two Timestamp values is a Duration and it can be added or subtracted
2028/// from a Timestamp. Range is approximately +-10,000 years.
2029///
2030/// # Examples
2031///
2032/// Example 1: Compute Duration from two Timestamps in pseudo code.
2033///
2034/// Timestamp start = ...;
2035/// Timestamp end = ...;
2036/// Duration duration = ...;
2037///
2038/// duration.seconds = end.seconds - start.seconds;
2039/// duration.nanos = end.nanos - start.nanos;
2040///
2041/// if (duration.seconds < 0 && duration.nanos > 0) {
2042/// duration.seconds += 1;
2043/// duration.nanos -= 1000000000;
2044/// } else if (duration.seconds > 0 && duration.nanos < 0) {
2045/// duration.seconds -= 1;
2046/// duration.nanos += 1000000000;
2047/// }
2048///
2049/// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
2050///
2051/// Timestamp start = ...;
2052/// Duration duration = ...;
2053/// Timestamp end = ...;
2054///
2055/// end.seconds = start.seconds + duration.seconds;
2056/// end.nanos = start.nanos + duration.nanos;
2057///
2058/// if (end.nanos < 0) {
2059/// end.seconds -= 1;
2060/// end.nanos += 1000000000;
2061/// } else if (end.nanos >= 1000000000) {
2062/// end.seconds += 1;
2063/// end.nanos -= 1000000000;
2064/// }
2065///
2066/// Example 3: Compute Duration from datetime.timedelta in Python.
2067///
2068/// td = datetime.timedelta(days=3, minutes=10)
2069/// duration = Duration()
2070/// duration.FromTimedelta(td)
2071///
2072/// # JSON Mapping
2073///
2074/// In JSON format, the Duration type is encoded as a string rather than an
2075/// object, where the string ends in the suffix "s" (indicating seconds) and
2076/// is preceded by the number of seconds, with nanoseconds expressed as
2077/// fractional seconds. For example, 3 seconds with 0 nanoseconds should be
2078/// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
2079/// be expressed in JSON format as "3.000000001s", and 3 seconds and 1
2080/// microsecond should be expressed in JSON format as "3.000001s".
2081///
2082#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2083pub struct Duration {
2084 /// Signed seconds of the span of time. Must be from -315,576,000,000
2085 /// to +315,576,000,000 inclusive. Note: these bounds are computed from:
2086 /// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2087 #[prost(int64, tag = "1")]
2088 pub seconds: i64,
2089 /// Signed fractions of a second at nanosecond resolution of the span
2090 /// of time. Durations less than one second are represented with a 0
2091 /// `seconds` field and a positive or negative `nanos` field. For durations
2092 /// of one second or more, a non-zero value for the `nanos` field must be
2093 /// of the same sign as the `seconds` field. Must be from -999,999,999
2094 /// to +999,999,999 inclusive.
2095 #[prost(int32, tag = "2")]
2096 pub nanos: i32,
2097}
2098/// A Timestamp represents a point in time independent of any time zone or local
2099/// calendar, encoded as a count of seconds and fractions of seconds at
2100/// nanosecond resolution. The count is relative to an epoch at UTC midnight on
2101/// January 1, 1970, in the proleptic Gregorian calendar which extends the
2102/// Gregorian calendar backwards to year one.
2103///
2104/// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
2105/// second table is needed for interpretation, using a [24-hour linear
2106/// smear](<https://developers.google.com/time/smear>).
2107///
2108/// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
2109/// restricting to that range, we ensure that we can convert to and from [RFC
2110/// 3339](<https://www.ietf.org/rfc/rfc3339.txt>) date strings.
2111///
2112/// # Examples
2113///
2114/// Example 1: Compute Timestamp from POSIX `time()`.
2115///
2116/// Timestamp timestamp;
2117/// timestamp.set_seconds(time(NULL));
2118/// timestamp.set_nanos(0);
2119///
2120/// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
2121///
2122/// struct timeval tv;
2123/// gettimeofday(&tv, NULL);
2124///
2125/// Timestamp timestamp;
2126/// timestamp.set_seconds(tv.tv_sec);
2127/// timestamp.set_nanos(tv.tv_usec * 1000);
2128///
2129/// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
2130///
2131/// FILETIME ft;
2132/// GetSystemTimeAsFileTime(&ft);
2133/// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
2134///
2135/// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
2136/// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
2137/// Timestamp timestamp;
2138/// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
2139/// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
2140///
2141/// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
2142///
2143/// long millis = System.currentTimeMillis();
2144///
2145/// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
2146/// .setNanos((int) ((millis % 1000) * 1000000)).build();
2147///
2148/// Example 5: Compute Timestamp from Java `Instant.now()`.
2149///
2150/// Instant now = Instant.now();
2151///
2152/// Timestamp timestamp =
2153/// Timestamp.newBuilder().setSeconds(now.getEpochSecond())
2154/// .setNanos(now.getNano()).build();
2155///
2156/// Example 6: Compute Timestamp from current time in Python.
2157///
2158/// timestamp = Timestamp()
2159/// timestamp.GetCurrentTime()
2160///
2161/// # JSON Mapping
2162///
2163/// In JSON format, the Timestamp type is encoded as a string in the
2164/// [RFC 3339](<https://www.ietf.org/rfc/rfc3339.txt>) format. That is, the
2165/// format is "{year}-{month}-{day}T{hour}:{min}:{sec}\[.{frac_sec}\]Z"
2166/// where {year} is always expressed using four digits while {month}, {day},
2167/// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
2168/// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
2169/// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
2170/// is required. A proto3 JSON serializer should always use UTC (as indicated by
2171/// "Z") when printing the Timestamp type and a proto3 JSON parser should be
2172/// able to accept both UTC and other timezones (as indicated by an offset).
2173///
2174/// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
2175/// 01:30 UTC on January 15, 2017.
2176///
2177/// In JavaScript, one can convert a Date object to this format using the
2178/// standard
2179/// [toISOString()](<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString>)
2180/// method. In Python, a standard `datetime.datetime` object can be converted
2181/// to this format using
2182/// [`strftime`](<https://docs.python.org/2/library/time.html#time.strftime>) with
2183/// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
2184/// the Joda Time's [`ISODateTimeFormat.dateTime()`](
2185/// <http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime(>)
2186/// ) to obtain a formatter capable of generating timestamps in this format.
2187///
2188#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2189pub struct Timestamp {
2190 /// Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
2191 /// be between -315576000000 and 315576000000 inclusive (which corresponds to
2192 /// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
2193 #[prost(int64, tag = "1")]
2194 pub seconds: i64,
2195 /// Non-negative fractions of a second at nanosecond resolution. This field is
2196 /// the nanosecond portion of the duration, not an alternative to seconds.
2197 /// Negative second values with fractions must still have non-negative nanos
2198 /// values that count forward in time. Must be between 0 and 999,999,999
2199 /// inclusive.
2200 #[prost(int32, tag = "2")]
2201 pub nanos: i32,
2202}
2203/// A generic empty message that you can re-use to avoid defining duplicated
2204/// empty messages in your APIs. A typical example is to use it as the request
2205/// or the response type of an API method. For instance:
2206///
2207/// service Foo {
2208/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
2209/// }
2210///
2211#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2212pub struct Empty {}