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 /// For Google-internal migration only. Do not use.
838 #[prost(bool, optional, tag = "10", default = "false")]
839 pub weak: ::core::option::Option<bool>,
840 /// Indicate that the field value should not be printed out when using debug
841 /// formats, e.g. when the field contains sensitive credentials.
842 #[prost(bool, optional, tag = "16", default = "false")]
843 pub debug_redact: ::core::option::Option<bool>,
844 #[prost(enumeration = "field_options::OptionRetention", optional, tag = "17")]
845 pub retention: ::core::option::Option<i32>,
846 #[prost(
847 enumeration = "field_options::OptionTargetType",
848 repeated,
849 packed = "false",
850 tag = "19"
851 )]
852 pub targets: ::prost::alloc::vec::Vec<i32>,
853 #[prost(message, repeated, tag = "20")]
854 pub edition_defaults: ::prost::alloc::vec::Vec<field_options::EditionDefault>,
855 /// Any features defined in the specific edition.
856 /// WARNING: This field should only be used by protobuf plugins or special
857 /// cases like the proto compiler. Other uses are discouraged and
858 /// developers should rely on the protoreflect APIs for their client language.
859 #[prost(message, optional, tag = "21")]
860 pub features: ::core::option::Option<FeatureSet>,
861 #[prost(message, optional, tag = "22")]
862 pub feature_support: ::core::option::Option<field_options::FeatureSupport>,
863 /// The parser stores options it doesn't recognize here. See above.
864 #[prost(message, repeated, tag = "999")]
865 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
866}
867/// Nested message and enum types in `FieldOptions`.
868pub mod field_options {
869 #[derive(Clone, PartialEq, ::prost::Message)]
870 pub struct EditionDefault {
871 #[prost(enumeration = "super::Edition", optional, tag = "3")]
872 pub edition: ::core::option::Option<i32>,
873 /// Textproto value.
874 #[prost(string, optional, tag = "2")]
875 pub value: ::core::option::Option<::prost::alloc::string::String>,
876 }
877 /// Information about the support window of a feature.
878 #[derive(Clone, PartialEq, ::prost::Message)]
879 pub struct FeatureSupport {
880 /// The edition that this feature was first available in. In editions
881 /// earlier than this one, the default assigned to EDITION_LEGACY will be
882 /// used, and proto files will not be able to override it.
883 #[prost(enumeration = "super::Edition", optional, tag = "1")]
884 pub edition_introduced: ::core::option::Option<i32>,
885 /// The edition this feature becomes deprecated in. Using this after this
886 /// edition may trigger warnings.
887 #[prost(enumeration = "super::Edition", optional, tag = "2")]
888 pub edition_deprecated: ::core::option::Option<i32>,
889 /// The deprecation warning text if this feature is used after the edition it
890 /// was marked deprecated in.
891 #[prost(string, optional, tag = "3")]
892 pub deprecation_warning: ::core::option::Option<::prost::alloc::string::String>,
893 /// The edition this feature is no longer available in. In editions after
894 /// this one, the last default assigned will be used, and proto files will
895 /// not be able to override it.
896 #[prost(enumeration = "super::Edition", optional, tag = "4")]
897 pub edition_removed: ::core::option::Option<i32>,
898 }
899 #[derive(
900 Clone,
901 Copy,
902 Debug,
903 PartialEq,
904 Eq,
905 Hash,
906 PartialOrd,
907 Ord,
908 ::prost::Enumeration
909 )]
910 #[repr(i32)]
911 pub enum CType {
912 /// Default mode.
913 String = 0,
914 /// The option \[ctype=CORD\] may be applied to a non-repeated field of type
915 /// "bytes". It indicates that in C++, the data should be stored in a Cord
916 /// instead of a string. For very large strings, this may reduce memory
917 /// fragmentation. It may also allow better performance when parsing from a
918 /// Cord, or when parsing with aliasing enabled, as the parsed Cord may then
919 /// alias the original buffer.
920 Cord = 1,
921 StringPiece = 2,
922 }
923 impl CType {
924 /// String value of the enum field names used in the ProtoBuf definition.
925 ///
926 /// The values are not transformed in any way and thus are considered stable
927 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
928 pub fn as_str_name(&self) -> &'static str {
929 match self {
930 Self::String => "STRING",
931 Self::Cord => "CORD",
932 Self::StringPiece => "STRING_PIECE",
933 }
934 }
935 /// Creates an enum from field names used in the ProtoBuf definition.
936 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
937 match value {
938 "STRING" => Some(Self::String),
939 "CORD" => Some(Self::Cord),
940 "STRING_PIECE" => Some(Self::StringPiece),
941 _ => None,
942 }
943 }
944 }
945 #[derive(
946 Clone,
947 Copy,
948 Debug,
949 PartialEq,
950 Eq,
951 Hash,
952 PartialOrd,
953 Ord,
954 ::prost::Enumeration
955 )]
956 #[repr(i32)]
957 pub enum JsType {
958 /// Use the default type.
959 JsNormal = 0,
960 /// Use JavaScript strings.
961 JsString = 1,
962 /// Use JavaScript numbers.
963 JsNumber = 2,
964 }
965 impl JsType {
966 /// String value of the enum field names used in the ProtoBuf definition.
967 ///
968 /// The values are not transformed in any way and thus are considered stable
969 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
970 pub fn as_str_name(&self) -> &'static str {
971 match self {
972 Self::JsNormal => "JS_NORMAL",
973 Self::JsString => "JS_STRING",
974 Self::JsNumber => "JS_NUMBER",
975 }
976 }
977 /// Creates an enum from field names used in the ProtoBuf definition.
978 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
979 match value {
980 "JS_NORMAL" => Some(Self::JsNormal),
981 "JS_STRING" => Some(Self::JsString),
982 "JS_NUMBER" => Some(Self::JsNumber),
983 _ => None,
984 }
985 }
986 }
987 /// If set to RETENTION_SOURCE, the option will be omitted from the binary.
988 #[derive(
989 Clone,
990 Copy,
991 Debug,
992 PartialEq,
993 Eq,
994 Hash,
995 PartialOrd,
996 Ord,
997 ::prost::Enumeration
998 )]
999 #[repr(i32)]
1000 pub enum OptionRetention {
1001 RetentionUnknown = 0,
1002 RetentionRuntime = 1,
1003 RetentionSource = 2,
1004 }
1005 impl OptionRetention {
1006 /// String value of the enum field names used in the ProtoBuf definition.
1007 ///
1008 /// The values are not transformed in any way and thus are considered stable
1009 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1010 pub fn as_str_name(&self) -> &'static str {
1011 match self {
1012 Self::RetentionUnknown => "RETENTION_UNKNOWN",
1013 Self::RetentionRuntime => "RETENTION_RUNTIME",
1014 Self::RetentionSource => "RETENTION_SOURCE",
1015 }
1016 }
1017 /// Creates an enum from field names used in the ProtoBuf definition.
1018 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1019 match value {
1020 "RETENTION_UNKNOWN" => Some(Self::RetentionUnknown),
1021 "RETENTION_RUNTIME" => Some(Self::RetentionRuntime),
1022 "RETENTION_SOURCE" => Some(Self::RetentionSource),
1023 _ => None,
1024 }
1025 }
1026 }
1027 /// This indicates the types of entities that the field may apply to when used
1028 /// as an option. If it is unset, then the field may be freely used as an
1029 /// option on any kind of entity.
1030 #[derive(
1031 Clone,
1032 Copy,
1033 Debug,
1034 PartialEq,
1035 Eq,
1036 Hash,
1037 PartialOrd,
1038 Ord,
1039 ::prost::Enumeration
1040 )]
1041 #[repr(i32)]
1042 pub enum OptionTargetType {
1043 TargetTypeUnknown = 0,
1044 TargetTypeFile = 1,
1045 TargetTypeExtensionRange = 2,
1046 TargetTypeMessage = 3,
1047 TargetTypeField = 4,
1048 TargetTypeOneof = 5,
1049 TargetTypeEnum = 6,
1050 TargetTypeEnumEntry = 7,
1051 TargetTypeService = 8,
1052 TargetTypeMethod = 9,
1053 }
1054 impl OptionTargetType {
1055 /// String value of the enum field names used in the ProtoBuf definition.
1056 ///
1057 /// The values are not transformed in any way and thus are considered stable
1058 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1059 pub fn as_str_name(&self) -> &'static str {
1060 match self {
1061 Self::TargetTypeUnknown => "TARGET_TYPE_UNKNOWN",
1062 Self::TargetTypeFile => "TARGET_TYPE_FILE",
1063 Self::TargetTypeExtensionRange => "TARGET_TYPE_EXTENSION_RANGE",
1064 Self::TargetTypeMessage => "TARGET_TYPE_MESSAGE",
1065 Self::TargetTypeField => "TARGET_TYPE_FIELD",
1066 Self::TargetTypeOneof => "TARGET_TYPE_ONEOF",
1067 Self::TargetTypeEnum => "TARGET_TYPE_ENUM",
1068 Self::TargetTypeEnumEntry => "TARGET_TYPE_ENUM_ENTRY",
1069 Self::TargetTypeService => "TARGET_TYPE_SERVICE",
1070 Self::TargetTypeMethod => "TARGET_TYPE_METHOD",
1071 }
1072 }
1073 /// Creates an enum from field names used in the ProtoBuf definition.
1074 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1075 match value {
1076 "TARGET_TYPE_UNKNOWN" => Some(Self::TargetTypeUnknown),
1077 "TARGET_TYPE_FILE" => Some(Self::TargetTypeFile),
1078 "TARGET_TYPE_EXTENSION_RANGE" => Some(Self::TargetTypeExtensionRange),
1079 "TARGET_TYPE_MESSAGE" => Some(Self::TargetTypeMessage),
1080 "TARGET_TYPE_FIELD" => Some(Self::TargetTypeField),
1081 "TARGET_TYPE_ONEOF" => Some(Self::TargetTypeOneof),
1082 "TARGET_TYPE_ENUM" => Some(Self::TargetTypeEnum),
1083 "TARGET_TYPE_ENUM_ENTRY" => Some(Self::TargetTypeEnumEntry),
1084 "TARGET_TYPE_SERVICE" => Some(Self::TargetTypeService),
1085 "TARGET_TYPE_METHOD" => Some(Self::TargetTypeMethod),
1086 _ => None,
1087 }
1088 }
1089 }
1090}
1091#[derive(Clone, PartialEq, ::prost::Message)]
1092pub struct OneofOptions {
1093 /// Any features defined in the specific edition.
1094 /// WARNING: This field should only be used by protobuf plugins or special
1095 /// cases like the proto compiler. Other uses are discouraged and
1096 /// developers should rely on the protoreflect APIs for their client language.
1097 #[prost(message, optional, tag = "1")]
1098 pub features: ::core::option::Option<FeatureSet>,
1099 /// The parser stores options it doesn't recognize here. See above.
1100 #[prost(message, repeated, tag = "999")]
1101 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
1102}
1103#[derive(Clone, PartialEq, ::prost::Message)]
1104pub struct EnumOptions {
1105 /// Set this option to true to allow mapping different tag names to the same
1106 /// value.
1107 #[prost(bool, optional, tag = "2")]
1108 pub allow_alias: ::core::option::Option<bool>,
1109 /// Is this enum deprecated?
1110 /// Depending on the target platform, this can emit Deprecated annotations
1111 /// for the enum, or it will be completely ignored; in the very least, this
1112 /// is a formalization for deprecating enums.
1113 #[prost(bool, optional, tag = "3", default = "false")]
1114 pub deprecated: ::core::option::Option<bool>,
1115 /// Enable the legacy handling of JSON field name conflicts. This lowercases
1116 /// and strips underscored from the fields before comparison in proto3 only.
1117 /// The new behavior takes `json_name` into account and applies to proto2 as
1118 /// well.
1119 /// TODO Remove this legacy behavior once downstream teams have
1120 /// had time to migrate.
1121 #[deprecated]
1122 #[prost(bool, optional, tag = "6")]
1123 pub deprecated_legacy_json_field_conflicts: ::core::option::Option<bool>,
1124 /// Any features defined in the specific edition.
1125 /// WARNING: This field should only be used by protobuf plugins or special
1126 /// cases like the proto compiler. Other uses are discouraged and
1127 /// developers should rely on the protoreflect APIs for their client language.
1128 #[prost(message, optional, tag = "7")]
1129 pub features: ::core::option::Option<FeatureSet>,
1130 /// The parser stores options it doesn't recognize here. See above.
1131 #[prost(message, repeated, tag = "999")]
1132 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
1133}
1134#[derive(Clone, PartialEq, ::prost::Message)]
1135pub struct EnumValueOptions {
1136 /// Is this enum value deprecated?
1137 /// Depending on the target platform, this can emit Deprecated annotations
1138 /// for the enum value, or it will be completely ignored; in the very least,
1139 /// this is a formalization for deprecating enum values.
1140 #[prost(bool, optional, tag = "1", default = "false")]
1141 pub deprecated: ::core::option::Option<bool>,
1142 /// Any features defined in the specific edition.
1143 /// WARNING: This field should only be used by protobuf plugins or special
1144 /// cases like the proto compiler. Other uses are discouraged and
1145 /// developers should rely on the protoreflect APIs for their client language.
1146 #[prost(message, optional, tag = "2")]
1147 pub features: ::core::option::Option<FeatureSet>,
1148 /// Indicate that fields annotated with this enum value should not be printed
1149 /// out when using debug formats, e.g. when the field contains sensitive
1150 /// credentials.
1151 #[prost(bool, optional, tag = "3", default = "false")]
1152 pub debug_redact: ::core::option::Option<bool>,
1153 /// Information about the support window of a feature value.
1154 #[prost(message, optional, tag = "4")]
1155 pub feature_support: ::core::option::Option<field_options::FeatureSupport>,
1156 /// The parser stores options it doesn't recognize here. See above.
1157 #[prost(message, repeated, tag = "999")]
1158 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
1159}
1160#[derive(Clone, PartialEq, ::prost::Message)]
1161pub struct ServiceOptions {
1162 /// Any features defined in the specific edition.
1163 /// WARNING: This field should only be used by protobuf plugins or special
1164 /// cases like the proto compiler. Other uses are discouraged and
1165 /// developers should rely on the protoreflect APIs for their client language.
1166 #[prost(message, optional, tag = "34")]
1167 pub features: ::core::option::Option<FeatureSet>,
1168 /// Is this service deprecated?
1169 /// Depending on the target platform, this can emit Deprecated annotations
1170 /// for the service, or it will be completely ignored; in the very least,
1171 /// this is a formalization for deprecating services.
1172 #[prost(bool, optional, tag = "33", default = "false")]
1173 pub deprecated: ::core::option::Option<bool>,
1174 /// The parser stores options it doesn't recognize here. See above.
1175 #[prost(message, repeated, tag = "999")]
1176 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
1177}
1178#[derive(Clone, PartialEq, ::prost::Message)]
1179pub struct MethodOptions {
1180 /// Is this method deprecated?
1181 /// Depending on the target platform, this can emit Deprecated annotations
1182 /// for the method, or it will be completely ignored; in the very least,
1183 /// this is a formalization for deprecating methods.
1184 #[prost(bool, optional, tag = "33", default = "false")]
1185 pub deprecated: ::core::option::Option<bool>,
1186 #[prost(
1187 enumeration = "method_options::IdempotencyLevel",
1188 optional,
1189 tag = "34",
1190 default = "IdempotencyUnknown"
1191 )]
1192 pub idempotency_level: ::core::option::Option<i32>,
1193 /// Any features defined in the specific edition.
1194 /// WARNING: This field should only be used by protobuf plugins or special
1195 /// cases like the proto compiler. Other uses are discouraged and
1196 /// developers should rely on the protoreflect APIs for their client language.
1197 #[prost(message, optional, tag = "35")]
1198 pub features: ::core::option::Option<FeatureSet>,
1199 /// The parser stores options it doesn't recognize here. See above.
1200 #[prost(message, repeated, tag = "999")]
1201 pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
1202}
1203/// Nested message and enum types in `MethodOptions`.
1204pub mod method_options {
1205 /// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
1206 /// or neither? HTTP based RPC implementation may choose GET verb for safe
1207 /// methods, and PUT verb for idempotent methods instead of the default POST.
1208 #[derive(
1209 Clone,
1210 Copy,
1211 Debug,
1212 PartialEq,
1213 Eq,
1214 Hash,
1215 PartialOrd,
1216 Ord,
1217 ::prost::Enumeration
1218 )]
1219 #[repr(i32)]
1220 pub enum IdempotencyLevel {
1221 IdempotencyUnknown = 0,
1222 /// implies idempotent
1223 NoSideEffects = 1,
1224 /// idempotent, but may have side effects
1225 Idempotent = 2,
1226 }
1227 impl IdempotencyLevel {
1228 /// String value of the enum field names used in the ProtoBuf definition.
1229 ///
1230 /// The values are not transformed in any way and thus are considered stable
1231 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1232 pub fn as_str_name(&self) -> &'static str {
1233 match self {
1234 Self::IdempotencyUnknown => "IDEMPOTENCY_UNKNOWN",
1235 Self::NoSideEffects => "NO_SIDE_EFFECTS",
1236 Self::Idempotent => "IDEMPOTENT",
1237 }
1238 }
1239 /// Creates an enum from field names used in the ProtoBuf definition.
1240 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1241 match value {
1242 "IDEMPOTENCY_UNKNOWN" => Some(Self::IdempotencyUnknown),
1243 "NO_SIDE_EFFECTS" => Some(Self::NoSideEffects),
1244 "IDEMPOTENT" => Some(Self::Idempotent),
1245 _ => None,
1246 }
1247 }
1248 }
1249}
1250/// A message representing a option the parser does not recognize. This only
1251/// appears in options protos created by the compiler::Parser class.
1252/// DescriptorPool resolves these when building Descriptor objects. Therefore,
1253/// options protos in descriptor objects (e.g. returned by Descriptor::options(),
1254/// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
1255/// in them.
1256#[derive(Clone, PartialEq, ::prost::Message)]
1257pub struct UninterpretedOption {
1258 #[prost(message, repeated, tag = "2")]
1259 pub name: ::prost::alloc::vec::Vec<uninterpreted_option::NamePart>,
1260 /// The value of the uninterpreted option, in whatever type the tokenizer
1261 /// identified it as during parsing. Exactly one of these should be set.
1262 #[prost(string, optional, tag = "3")]
1263 pub identifier_value: ::core::option::Option<::prost::alloc::string::String>,
1264 #[prost(uint64, optional, tag = "4")]
1265 pub positive_int_value: ::core::option::Option<u64>,
1266 #[prost(int64, optional, tag = "5")]
1267 pub negative_int_value: ::core::option::Option<i64>,
1268 #[prost(double, optional, tag = "6")]
1269 pub double_value: ::core::option::Option<f64>,
1270 #[prost(bytes = "vec", optional, tag = "7")]
1271 pub string_value: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
1272 #[prost(string, optional, tag = "8")]
1273 pub aggregate_value: ::core::option::Option<::prost::alloc::string::String>,
1274}
1275/// Nested message and enum types in `UninterpretedOption`.
1276pub mod uninterpreted_option {
1277 /// The name of the uninterpreted option. Each string represents a segment in
1278 /// a dot-separated name. is_extension is true iff a segment represents an
1279 /// extension (denoted with parentheses in options specs in .proto files).
1280 /// E.g.,{ \["foo", false\], \["bar.baz", true\], \["moo", false\] } represents
1281 /// "foo.(bar.baz).moo".
1282 #[derive(Clone, PartialEq, ::prost::Message)]
1283 pub struct NamePart {
1284 #[prost(string, required, tag = "1")]
1285 pub name_part: ::prost::alloc::string::String,
1286 #[prost(bool, required, tag = "2")]
1287 pub is_extension: bool,
1288 }
1289}
1290/// TODO Enums in C++ gencode (and potentially other languages) are
1291/// not well scoped. This means that each of the feature enums below can clash
1292/// with each other. The short names we've chosen maximize call-site
1293/// readability, but leave us very open to this scenario. A future feature will
1294/// be designed and implemented to handle this, hopefully before we ever hit a
1295/// conflict here.
1296#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1297pub struct FeatureSet {
1298 #[prost(enumeration = "feature_set::FieldPresence", optional, tag = "1")]
1299 pub field_presence: ::core::option::Option<i32>,
1300 #[prost(enumeration = "feature_set::EnumType", optional, tag = "2")]
1301 pub enum_type: ::core::option::Option<i32>,
1302 #[prost(enumeration = "feature_set::RepeatedFieldEncoding", optional, tag = "3")]
1303 pub repeated_field_encoding: ::core::option::Option<i32>,
1304 #[prost(enumeration = "feature_set::Utf8Validation", optional, tag = "4")]
1305 pub utf8_validation: ::core::option::Option<i32>,
1306 #[prost(enumeration = "feature_set::MessageEncoding", optional, tag = "5")]
1307 pub message_encoding: ::core::option::Option<i32>,
1308 #[prost(enumeration = "feature_set::JsonFormat", optional, tag = "6")]
1309 pub json_format: ::core::option::Option<i32>,
1310 #[prost(enumeration = "feature_set::EnforceNamingStyle", optional, tag = "7")]
1311 pub enforce_naming_style: ::core::option::Option<i32>,
1312 #[prost(
1313 enumeration = "feature_set::visibility_feature::DefaultSymbolVisibility",
1314 optional,
1315 tag = "8"
1316 )]
1317 pub default_symbol_visibility: ::core::option::Option<i32>,
1318}
1319/// Nested message and enum types in `FeatureSet`.
1320pub mod feature_set {
1321 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1322 pub struct VisibilityFeature {}
1323 /// Nested message and enum types in `VisibilityFeature`.
1324 pub mod visibility_feature {
1325 #[derive(
1326 Clone,
1327 Copy,
1328 Debug,
1329 PartialEq,
1330 Eq,
1331 Hash,
1332 PartialOrd,
1333 Ord,
1334 ::prost::Enumeration
1335 )]
1336 #[repr(i32)]
1337 pub enum DefaultSymbolVisibility {
1338 Unknown = 0,
1339 /// Default pre-EDITION_2024, all UNSET visibility are export.
1340 ExportAll = 1,
1341 /// All top-level symbols default to export, nested default to local.
1342 ExportTopLevel = 2,
1343 /// All symbols default to local.
1344 LocalAll = 3,
1345 /// All symbols local by default. Nested types cannot be exported.
1346 /// With special case caveat for message { enum {} reserved 1 to max; }
1347 /// This is the recommended setting for new protos.
1348 Strict = 4,
1349 }
1350 impl DefaultSymbolVisibility {
1351 /// String value of the enum field names used in the ProtoBuf definition.
1352 ///
1353 /// The values are not transformed in any way and thus are considered stable
1354 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1355 pub fn as_str_name(&self) -> &'static str {
1356 match self {
1357 Self::Unknown => "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN",
1358 Self::ExportAll => "EXPORT_ALL",
1359 Self::ExportTopLevel => "EXPORT_TOP_LEVEL",
1360 Self::LocalAll => "LOCAL_ALL",
1361 Self::Strict => "STRICT",
1362 }
1363 }
1364 /// Creates an enum from field names used in the ProtoBuf definition.
1365 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1366 match value {
1367 "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" => Some(Self::Unknown),
1368 "EXPORT_ALL" => Some(Self::ExportAll),
1369 "EXPORT_TOP_LEVEL" => Some(Self::ExportTopLevel),
1370 "LOCAL_ALL" => Some(Self::LocalAll),
1371 "STRICT" => Some(Self::Strict),
1372 _ => None,
1373 }
1374 }
1375 }
1376 }
1377 #[derive(
1378 Clone,
1379 Copy,
1380 Debug,
1381 PartialEq,
1382 Eq,
1383 Hash,
1384 PartialOrd,
1385 Ord,
1386 ::prost::Enumeration
1387 )]
1388 #[repr(i32)]
1389 pub enum FieldPresence {
1390 Unknown = 0,
1391 Explicit = 1,
1392 Implicit = 2,
1393 LegacyRequired = 3,
1394 }
1395 impl FieldPresence {
1396 /// String value of the enum field names used in the ProtoBuf definition.
1397 ///
1398 /// The values are not transformed in any way and thus are considered stable
1399 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1400 pub fn as_str_name(&self) -> &'static str {
1401 match self {
1402 Self::Unknown => "FIELD_PRESENCE_UNKNOWN",
1403 Self::Explicit => "EXPLICIT",
1404 Self::Implicit => "IMPLICIT",
1405 Self::LegacyRequired => "LEGACY_REQUIRED",
1406 }
1407 }
1408 /// Creates an enum from field names used in the ProtoBuf definition.
1409 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1410 match value {
1411 "FIELD_PRESENCE_UNKNOWN" => Some(Self::Unknown),
1412 "EXPLICIT" => Some(Self::Explicit),
1413 "IMPLICIT" => Some(Self::Implicit),
1414 "LEGACY_REQUIRED" => Some(Self::LegacyRequired),
1415 _ => None,
1416 }
1417 }
1418 }
1419 #[derive(
1420 Clone,
1421 Copy,
1422 Debug,
1423 PartialEq,
1424 Eq,
1425 Hash,
1426 PartialOrd,
1427 Ord,
1428 ::prost::Enumeration
1429 )]
1430 #[repr(i32)]
1431 pub enum EnumType {
1432 Unknown = 0,
1433 Open = 1,
1434 Closed = 2,
1435 }
1436 impl EnumType {
1437 /// String value of the enum field names used in the ProtoBuf definition.
1438 ///
1439 /// The values are not transformed in any way and thus are considered stable
1440 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1441 pub fn as_str_name(&self) -> &'static str {
1442 match self {
1443 Self::Unknown => "ENUM_TYPE_UNKNOWN",
1444 Self::Open => "OPEN",
1445 Self::Closed => "CLOSED",
1446 }
1447 }
1448 /// Creates an enum from field names used in the ProtoBuf definition.
1449 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1450 match value {
1451 "ENUM_TYPE_UNKNOWN" => Some(Self::Unknown),
1452 "OPEN" => Some(Self::Open),
1453 "CLOSED" => Some(Self::Closed),
1454 _ => None,
1455 }
1456 }
1457 }
1458 #[derive(
1459 Clone,
1460 Copy,
1461 Debug,
1462 PartialEq,
1463 Eq,
1464 Hash,
1465 PartialOrd,
1466 Ord,
1467 ::prost::Enumeration
1468 )]
1469 #[repr(i32)]
1470 pub enum RepeatedFieldEncoding {
1471 Unknown = 0,
1472 Packed = 1,
1473 Expanded = 2,
1474 }
1475 impl RepeatedFieldEncoding {
1476 /// String value of the enum field names used in the ProtoBuf definition.
1477 ///
1478 /// The values are not transformed in any way and thus are considered stable
1479 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1480 pub fn as_str_name(&self) -> &'static str {
1481 match self {
1482 Self::Unknown => "REPEATED_FIELD_ENCODING_UNKNOWN",
1483 Self::Packed => "PACKED",
1484 Self::Expanded => "EXPANDED",
1485 }
1486 }
1487 /// Creates an enum from field names used in the ProtoBuf definition.
1488 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1489 match value {
1490 "REPEATED_FIELD_ENCODING_UNKNOWN" => Some(Self::Unknown),
1491 "PACKED" => Some(Self::Packed),
1492 "EXPANDED" => Some(Self::Expanded),
1493 _ => None,
1494 }
1495 }
1496 }
1497 #[derive(
1498 Clone,
1499 Copy,
1500 Debug,
1501 PartialEq,
1502 Eq,
1503 Hash,
1504 PartialOrd,
1505 Ord,
1506 ::prost::Enumeration
1507 )]
1508 #[repr(i32)]
1509 pub enum Utf8Validation {
1510 Unknown = 0,
1511 Verify = 2,
1512 None = 3,
1513 }
1514 impl Utf8Validation {
1515 /// String value of the enum field names used in the ProtoBuf definition.
1516 ///
1517 /// The values are not transformed in any way and thus are considered stable
1518 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1519 pub fn as_str_name(&self) -> &'static str {
1520 match self {
1521 Self::Unknown => "UTF8_VALIDATION_UNKNOWN",
1522 Self::Verify => "VERIFY",
1523 Self::None => "NONE",
1524 }
1525 }
1526 /// Creates an enum from field names used in the ProtoBuf definition.
1527 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1528 match value {
1529 "UTF8_VALIDATION_UNKNOWN" => Some(Self::Unknown),
1530 "VERIFY" => Some(Self::Verify),
1531 "NONE" => Some(Self::None),
1532 _ => None,
1533 }
1534 }
1535 }
1536 #[derive(
1537 Clone,
1538 Copy,
1539 Debug,
1540 PartialEq,
1541 Eq,
1542 Hash,
1543 PartialOrd,
1544 Ord,
1545 ::prost::Enumeration
1546 )]
1547 #[repr(i32)]
1548 pub enum MessageEncoding {
1549 Unknown = 0,
1550 LengthPrefixed = 1,
1551 Delimited = 2,
1552 }
1553 impl MessageEncoding {
1554 /// String value of the enum field names used in the ProtoBuf definition.
1555 ///
1556 /// The values are not transformed in any way and thus are considered stable
1557 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1558 pub fn as_str_name(&self) -> &'static str {
1559 match self {
1560 Self::Unknown => "MESSAGE_ENCODING_UNKNOWN",
1561 Self::LengthPrefixed => "LENGTH_PREFIXED",
1562 Self::Delimited => "DELIMITED",
1563 }
1564 }
1565 /// Creates an enum from field names used in the ProtoBuf definition.
1566 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1567 match value {
1568 "MESSAGE_ENCODING_UNKNOWN" => Some(Self::Unknown),
1569 "LENGTH_PREFIXED" => Some(Self::LengthPrefixed),
1570 "DELIMITED" => Some(Self::Delimited),
1571 _ => None,
1572 }
1573 }
1574 }
1575 #[derive(
1576 Clone,
1577 Copy,
1578 Debug,
1579 PartialEq,
1580 Eq,
1581 Hash,
1582 PartialOrd,
1583 Ord,
1584 ::prost::Enumeration
1585 )]
1586 #[repr(i32)]
1587 pub enum JsonFormat {
1588 Unknown = 0,
1589 Allow = 1,
1590 LegacyBestEffort = 2,
1591 }
1592 impl JsonFormat {
1593 /// String value of the enum field names used in the ProtoBuf definition.
1594 ///
1595 /// The values are not transformed in any way and thus are considered stable
1596 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1597 pub fn as_str_name(&self) -> &'static str {
1598 match self {
1599 Self::Unknown => "JSON_FORMAT_UNKNOWN",
1600 Self::Allow => "ALLOW",
1601 Self::LegacyBestEffort => "LEGACY_BEST_EFFORT",
1602 }
1603 }
1604 /// Creates an enum from field names used in the ProtoBuf definition.
1605 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1606 match value {
1607 "JSON_FORMAT_UNKNOWN" => Some(Self::Unknown),
1608 "ALLOW" => Some(Self::Allow),
1609 "LEGACY_BEST_EFFORT" => Some(Self::LegacyBestEffort),
1610 _ => None,
1611 }
1612 }
1613 }
1614 #[derive(
1615 Clone,
1616 Copy,
1617 Debug,
1618 PartialEq,
1619 Eq,
1620 Hash,
1621 PartialOrd,
1622 Ord,
1623 ::prost::Enumeration
1624 )]
1625 #[repr(i32)]
1626 pub enum EnforceNamingStyle {
1627 Unknown = 0,
1628 Style2024 = 1,
1629 StyleLegacy = 2,
1630 }
1631 impl EnforceNamingStyle {
1632 /// String value of the enum field names used in the ProtoBuf definition.
1633 ///
1634 /// The values are not transformed in any way and thus are considered stable
1635 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1636 pub fn as_str_name(&self) -> &'static str {
1637 match self {
1638 Self::Unknown => "ENFORCE_NAMING_STYLE_UNKNOWN",
1639 Self::Style2024 => "STYLE2024",
1640 Self::StyleLegacy => "STYLE_LEGACY",
1641 }
1642 }
1643 /// Creates an enum from field names used in the ProtoBuf definition.
1644 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1645 match value {
1646 "ENFORCE_NAMING_STYLE_UNKNOWN" => Some(Self::Unknown),
1647 "STYLE2024" => Some(Self::Style2024),
1648 "STYLE_LEGACY" => Some(Self::StyleLegacy),
1649 _ => None,
1650 }
1651 }
1652 }
1653}
1654/// A compiled specification for the defaults of a set of features. These
1655/// messages are generated from FeatureSet extensions and can be used to seed
1656/// feature resolution. The resolution with this object becomes a simple search
1657/// for the closest matching edition, followed by proto merges.
1658#[derive(Clone, PartialEq, ::prost::Message)]
1659pub struct FeatureSetDefaults {
1660 #[prost(message, repeated, tag = "1")]
1661 pub defaults: ::prost::alloc::vec::Vec<
1662 feature_set_defaults::FeatureSetEditionDefault,
1663 >,
1664 /// The minimum supported edition (inclusive) when this was constructed.
1665 /// Editions before this will not have defaults.
1666 #[prost(enumeration = "Edition", optional, tag = "4")]
1667 pub minimum_edition: ::core::option::Option<i32>,
1668 /// The maximum known edition (inclusive) when this was constructed. Editions
1669 /// after this will not have reliable defaults.
1670 #[prost(enumeration = "Edition", optional, tag = "5")]
1671 pub maximum_edition: ::core::option::Option<i32>,
1672}
1673/// Nested message and enum types in `FeatureSetDefaults`.
1674pub mod feature_set_defaults {
1675 /// A map from every known edition with a unique set of defaults to its
1676 /// defaults. Not all editions may be contained here. For a given edition,
1677 /// the defaults at the closest matching edition ordered at or before it should
1678 /// be used. This field must be in strict ascending order by edition.
1679 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1680 pub struct FeatureSetEditionDefault {
1681 #[prost(enumeration = "super::Edition", optional, tag = "3")]
1682 pub edition: ::core::option::Option<i32>,
1683 /// Defaults of features that can be overridden in this edition.
1684 #[prost(message, optional, tag = "4")]
1685 pub overridable_features: ::core::option::Option<super::FeatureSet>,
1686 /// Defaults of features that can't be overridden in this edition.
1687 #[prost(message, optional, tag = "5")]
1688 pub fixed_features: ::core::option::Option<super::FeatureSet>,
1689 }
1690}
1691/// Encapsulates information about the original source file from which a
1692/// FileDescriptorProto was generated.
1693#[derive(Clone, PartialEq, ::prost::Message)]
1694pub struct SourceCodeInfo {
1695 /// A Location identifies a piece of source code in a .proto file which
1696 /// corresponds to a particular definition. This information is intended
1697 /// to be useful to IDEs, code indexers, documentation generators, and similar
1698 /// tools.
1699 ///
1700 /// For example, say we have a file like:
1701 /// message Foo {
1702 /// optional string foo = 1;
1703 /// }
1704 /// Let's look at just the field definition:
1705 /// optional string foo = 1;
1706 /// ^ ^^ ^^ ^ ^^^
1707 /// a bc de f ghi
1708 /// We have the following locations:
1709 /// span path represents
1710 /// \[a,i) [ 4, 0, 2, 0 \] The whole field definition.
1711 /// \[a,b) [ 4, 0, 2, 0, 4 \] The label (optional).
1712 /// \[c,d) [ 4, 0, 2, 0, 5 \] The type (string).
1713 /// \[e,f) [ 4, 0, 2, 0, 1 \] The name (foo).
1714 /// \[g,h) [ 4, 0, 2, 0, 3 \] The number (1).
1715 ///
1716 /// Notes:
1717 /// - A location may refer to a repeated field itself (i.e. not to any
1718 /// particular index within it). This is used whenever a set of elements are
1719 /// logically enclosed in a single code segment. For example, an entire
1720 /// extend block (possibly containing multiple extension definitions) will
1721 /// have an outer location whose path refers to the "extensions" repeated
1722 /// field without an index.
1723 /// - Multiple locations may have the same path. This happens when a single
1724 /// logical declaration is spread out across multiple places. The most
1725 /// obvious example is the "extend" block again -- there may be multiple
1726 /// extend blocks in the same scope, each of which will have the same path.
1727 /// - A location's span is not always a subset of its parent's span. For
1728 /// example, the "extendee" of an extension declaration appears at the
1729 /// beginning of the "extend" block and is shared by all extensions within
1730 /// the block.
1731 /// - Just because a location's span is a subset of some other location's span
1732 /// does not mean that it is a descendant. For example, a "group" defines
1733 /// both a type and a field in a single declaration. Thus, the locations
1734 /// corresponding to the type and field and their components will overlap.
1735 /// - Code which tries to interpret locations should probably be designed to
1736 /// ignore those that it doesn't understand, as more types of locations could
1737 /// be recorded in the future.
1738 #[prost(message, repeated, tag = "1")]
1739 pub location: ::prost::alloc::vec::Vec<source_code_info::Location>,
1740}
1741/// Nested message and enum types in `SourceCodeInfo`.
1742pub mod source_code_info {
1743 #[derive(Clone, PartialEq, ::prost::Message)]
1744 pub struct Location {
1745 /// Identifies which part of the FileDescriptorProto was defined at this
1746 /// location.
1747 ///
1748 /// Each element is a field number or an index. They form a path from
1749 /// the root FileDescriptorProto to the place where the definition appears.
1750 /// For example, this path:
1751 /// \[ 4, 3, 2, 7, 1 \]
1752 /// refers to:
1753 /// file.message_type(3) // 4, 3
1754 /// .field(7) // 2, 7
1755 /// .name() // 1
1756 /// This is because FileDescriptorProto.message_type has field number 4:
1757 /// repeated DescriptorProto message_type = 4;
1758 /// and DescriptorProto.field has field number 2:
1759 /// repeated FieldDescriptorProto field = 2;
1760 /// and FieldDescriptorProto.name has field number 1:
1761 /// optional string name = 1;
1762 ///
1763 /// Thus, the above path gives the location of a field name. If we removed
1764 /// the last element:
1765 /// \[ 4, 3, 2, 7 \]
1766 /// this path refers to the whole field declaration (from the beginning
1767 /// of the label to the terminating semicolon).
1768 #[prost(int32, repeated, tag = "1")]
1769 pub path: ::prost::alloc::vec::Vec<i32>,
1770 /// Always has exactly three or four elements: start line, start column,
1771 /// end line (optional, otherwise assumed same as start line), end column.
1772 /// These are packed into a single field for efficiency. Note that line
1773 /// and column numbers are zero-based -- typically you will want to add
1774 /// 1 to each before displaying to a user.
1775 #[prost(int32, repeated, tag = "2")]
1776 pub span: ::prost::alloc::vec::Vec<i32>,
1777 /// If this SourceCodeInfo represents a complete declaration, these are any
1778 /// comments appearing before and after the declaration which appear to be
1779 /// attached to the declaration.
1780 ///
1781 /// A series of line comments appearing on consecutive lines, with no other
1782 /// tokens appearing on those lines, will be treated as a single comment.
1783 ///
1784 /// leading_detached_comments will keep paragraphs of comments that appear
1785 /// before (but not connected to) the current element. Each paragraph,
1786 /// separated by empty lines, will be one comment element in the repeated
1787 /// field.
1788 ///
1789 /// Only the comment content is provided; comment markers (e.g. //) are
1790 /// stripped out. For block comments, leading whitespace and an asterisk
1791 /// will be stripped from the beginning of each line other than the first.
1792 /// Newlines are included in the output.
1793 ///
1794 /// Examples:
1795 ///
1796 /// optional int32 foo = 1; // Comment attached to foo.
1797 /// // Comment attached to bar.
1798 /// optional int32 bar = 2;
1799 ///
1800 /// optional string baz = 3;
1801 /// // Comment attached to baz.
1802 /// // Another line attached to baz.
1803 ///
1804 /// // Comment attached to moo.
1805 /// //
1806 /// // Another line attached to moo.
1807 /// optional double moo = 4;
1808 ///
1809 /// // Detached comment for corge. This is not leading or trailing comments
1810 /// // to moo or corge because there are blank lines separating it from
1811 /// // both.
1812 ///
1813 /// // Detached comment for corge paragraph 2.
1814 ///
1815 /// optional string corge = 5;
1816 /// /* Block comment attached
1817 /// * to corge. Leading asterisks
1818 /// * will be removed. */
1819 /// /* Block comment attached to
1820 /// * grault. */
1821 /// optional int32 grault = 6;
1822 ///
1823 /// // ignored detached comments.
1824 #[prost(string, optional, tag = "3")]
1825 pub leading_comments: ::core::option::Option<::prost::alloc::string::String>,
1826 #[prost(string, optional, tag = "4")]
1827 pub trailing_comments: ::core::option::Option<::prost::alloc::string::String>,
1828 #[prost(string, repeated, tag = "6")]
1829 pub leading_detached_comments: ::prost::alloc::vec::Vec<
1830 ::prost::alloc::string::String,
1831 >,
1832 }
1833}
1834/// Describes the relationship between generated code and its original source
1835/// file. A GeneratedCodeInfo message is associated with only one generated
1836/// source file, but may contain references to different source .proto files.
1837#[derive(Clone, PartialEq, ::prost::Message)]
1838pub struct GeneratedCodeInfo {
1839 /// An Annotation connects some span of text in generated code to an element
1840 /// of its generating .proto file.
1841 #[prost(message, repeated, tag = "1")]
1842 pub annotation: ::prost::alloc::vec::Vec<generated_code_info::Annotation>,
1843}
1844/// Nested message and enum types in `GeneratedCodeInfo`.
1845pub mod generated_code_info {
1846 #[derive(Clone, PartialEq, ::prost::Message)]
1847 pub struct Annotation {
1848 /// Identifies the element in the original source .proto file. This field
1849 /// is formatted the same as SourceCodeInfo.Location.path.
1850 #[prost(int32, repeated, tag = "1")]
1851 pub path: ::prost::alloc::vec::Vec<i32>,
1852 /// Identifies the filesystem path to the original source .proto.
1853 #[prost(string, optional, tag = "2")]
1854 pub source_file: ::core::option::Option<::prost::alloc::string::String>,
1855 /// Identifies the starting offset in bytes in the generated code
1856 /// that relates to the identified object.
1857 #[prost(int32, optional, tag = "3")]
1858 pub begin: ::core::option::Option<i32>,
1859 /// Identifies the ending offset in bytes in the generated code that
1860 /// relates to the identified object. The end offset should be one past
1861 /// the last relevant byte (so the length of the text = end - begin).
1862 #[prost(int32, optional, tag = "4")]
1863 pub end: ::core::option::Option<i32>,
1864 #[prost(enumeration = "annotation::Semantic", optional, tag = "5")]
1865 pub semantic: ::core::option::Option<i32>,
1866 }
1867 /// Nested message and enum types in `Annotation`.
1868 pub mod annotation {
1869 /// Represents the identified object's effect on the element in the original
1870 /// .proto file.
1871 #[derive(
1872 Clone,
1873 Copy,
1874 Debug,
1875 PartialEq,
1876 Eq,
1877 Hash,
1878 PartialOrd,
1879 Ord,
1880 ::prost::Enumeration
1881 )]
1882 #[repr(i32)]
1883 pub enum Semantic {
1884 /// There is no effect or the effect is indescribable.
1885 None = 0,
1886 /// The element is set or otherwise mutated.
1887 Set = 1,
1888 /// An alias to the element is returned.
1889 Alias = 2,
1890 }
1891 impl Semantic {
1892 /// String value of the enum field names used in the ProtoBuf definition.
1893 ///
1894 /// The values are not transformed in any way and thus are considered stable
1895 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1896 pub fn as_str_name(&self) -> &'static str {
1897 match self {
1898 Self::None => "NONE",
1899 Self::Set => "SET",
1900 Self::Alias => "ALIAS",
1901 }
1902 }
1903 /// Creates an enum from field names used in the ProtoBuf definition.
1904 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1905 match value {
1906 "NONE" => Some(Self::None),
1907 "SET" => Some(Self::Set),
1908 "ALIAS" => Some(Self::Alias),
1909 _ => None,
1910 }
1911 }
1912 }
1913 }
1914}
1915/// The full set of known editions.
1916#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1917#[repr(i32)]
1918pub enum Edition {
1919 /// A placeholder for an unknown edition value.
1920 Unknown = 0,
1921 /// A placeholder edition for specifying default behaviors *before* a feature
1922 /// was first introduced. This is effectively an "infinite past".
1923 Legacy = 900,
1924 /// Legacy syntax "editions". These pre-date editions, but behave much like
1925 /// distinct editions. These can't be used to specify the edition of proto
1926 /// files, but feature definitions must supply proto2/proto3 defaults for
1927 /// backwards compatibility.
1928 Proto2 = 998,
1929 Proto3 = 999,
1930 /// Editions that have been released. The specific values are arbitrary and
1931 /// should not be depended on, but they will always be time-ordered for easy
1932 /// comparison.
1933 Edition2023 = 1000,
1934 Edition2024 = 1001,
1935 /// Placeholder editions for testing feature resolution. These should not be
1936 /// used or relied on outside of tests.
1937 Edition1TestOnly = 1,
1938 Edition2TestOnly = 2,
1939 Edition99997TestOnly = 99997,
1940 Edition99998TestOnly = 99998,
1941 Edition99999TestOnly = 99999,
1942 /// Placeholder for specifying unbounded edition support. This should only
1943 /// ever be used by plugins that can expect to never require any changes to
1944 /// support a new edition.
1945 Max = 2147483647,
1946}
1947impl Edition {
1948 /// String value of the enum field names used in the ProtoBuf definition.
1949 ///
1950 /// The values are not transformed in any way and thus are considered stable
1951 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1952 pub fn as_str_name(&self) -> &'static str {
1953 match self {
1954 Self::Unknown => "EDITION_UNKNOWN",
1955 Self::Legacy => "EDITION_LEGACY",
1956 Self::Proto2 => "EDITION_PROTO2",
1957 Self::Proto3 => "EDITION_PROTO3",
1958 Self::Edition2023 => "EDITION_2023",
1959 Self::Edition2024 => "EDITION_2024",
1960 Self::Edition1TestOnly => "EDITION_1_TEST_ONLY",
1961 Self::Edition2TestOnly => "EDITION_2_TEST_ONLY",
1962 Self::Edition99997TestOnly => "EDITION_99997_TEST_ONLY",
1963 Self::Edition99998TestOnly => "EDITION_99998_TEST_ONLY",
1964 Self::Edition99999TestOnly => "EDITION_99999_TEST_ONLY",
1965 Self::Max => "EDITION_MAX",
1966 }
1967 }
1968 /// Creates an enum from field names used in the ProtoBuf definition.
1969 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1970 match value {
1971 "EDITION_UNKNOWN" => Some(Self::Unknown),
1972 "EDITION_LEGACY" => Some(Self::Legacy),
1973 "EDITION_PROTO2" => Some(Self::Proto2),
1974 "EDITION_PROTO3" => Some(Self::Proto3),
1975 "EDITION_2023" => Some(Self::Edition2023),
1976 "EDITION_2024" => Some(Self::Edition2024),
1977 "EDITION_1_TEST_ONLY" => Some(Self::Edition1TestOnly),
1978 "EDITION_2_TEST_ONLY" => Some(Self::Edition2TestOnly),
1979 "EDITION_99997_TEST_ONLY" => Some(Self::Edition99997TestOnly),
1980 "EDITION_99998_TEST_ONLY" => Some(Self::Edition99998TestOnly),
1981 "EDITION_99999_TEST_ONLY" => Some(Self::Edition99999TestOnly),
1982 "EDITION_MAX" => Some(Self::Max),
1983 _ => None,
1984 }
1985 }
1986}
1987/// Describes the 'visibility' of a symbol with respect to the proto import
1988/// system. Symbols can only be imported when the visibility rules do not prevent
1989/// it (ex: local symbols cannot be imported). Visibility modifiers can only set
1990/// on `message` and `enum` as they are the only types available to be referenced
1991/// from other files.
1992#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1993#[repr(i32)]
1994pub enum SymbolVisibility {
1995 VisibilityUnset = 0,
1996 VisibilityLocal = 1,
1997 VisibilityExport = 2,
1998}
1999impl SymbolVisibility {
2000 /// String value of the enum field names used in the ProtoBuf definition.
2001 ///
2002 /// The values are not transformed in any way and thus are considered stable
2003 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2004 pub fn as_str_name(&self) -> &'static str {
2005 match self {
2006 Self::VisibilityUnset => "VISIBILITY_UNSET",
2007 Self::VisibilityLocal => "VISIBILITY_LOCAL",
2008 Self::VisibilityExport => "VISIBILITY_EXPORT",
2009 }
2010 }
2011 /// Creates an enum from field names used in the ProtoBuf definition.
2012 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2013 match value {
2014 "VISIBILITY_UNSET" => Some(Self::VisibilityUnset),
2015 "VISIBILITY_LOCAL" => Some(Self::VisibilityLocal),
2016 "VISIBILITY_EXPORT" => Some(Self::VisibilityExport),
2017 _ => None,
2018 }
2019 }
2020}
2021/// A Duration represents a signed, fixed-length span of time represented
2022/// as a count of seconds and fractions of seconds at nanosecond
2023/// resolution. It is independent of any calendar and concepts like "day"
2024/// or "month". It is related to Timestamp in that the difference between
2025/// two Timestamp values is a Duration and it can be added or subtracted
2026/// from a Timestamp. Range is approximately +-10,000 years.
2027///
2028/// # Examples
2029///
2030/// Example 1: Compute Duration from two Timestamps in pseudo code.
2031///
2032/// Timestamp start = ...;
2033/// Timestamp end = ...;
2034/// Duration duration = ...;
2035///
2036/// duration.seconds = end.seconds - start.seconds;
2037/// duration.nanos = end.nanos - start.nanos;
2038///
2039/// if (duration.seconds < 0 && duration.nanos > 0) {
2040/// duration.seconds += 1;
2041/// duration.nanos -= 1000000000;
2042/// } else if (duration.seconds > 0 && duration.nanos < 0) {
2043/// duration.seconds -= 1;
2044/// duration.nanos += 1000000000;
2045/// }
2046///
2047/// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
2048///
2049/// Timestamp start = ...;
2050/// Duration duration = ...;
2051/// Timestamp end = ...;
2052///
2053/// end.seconds = start.seconds + duration.seconds;
2054/// end.nanos = start.nanos + duration.nanos;
2055///
2056/// if (end.nanos < 0) {
2057/// end.seconds -= 1;
2058/// end.nanos += 1000000000;
2059/// } else if (end.nanos >= 1000000000) {
2060/// end.seconds += 1;
2061/// end.nanos -= 1000000000;
2062/// }
2063///
2064/// Example 3: Compute Duration from datetime.timedelta in Python.
2065///
2066/// td = datetime.timedelta(days=3, minutes=10)
2067/// duration = Duration()
2068/// duration.FromTimedelta(td)
2069///
2070/// # JSON Mapping
2071///
2072/// In JSON format, the Duration type is encoded as a string rather than an
2073/// object, where the string ends in the suffix "s" (indicating seconds) and
2074/// is preceded by the number of seconds, with nanoseconds expressed as
2075/// fractional seconds. For example, 3 seconds with 0 nanoseconds should be
2076/// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
2077/// be expressed in JSON format as "3.000000001s", and 3 seconds and 1
2078/// microsecond should be expressed in JSON format as "3.000001s".
2079///
2080#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2081pub struct Duration {
2082 /// Signed seconds of the span of time. Must be from -315,576,000,000
2083 /// to +315,576,000,000 inclusive. Note: these bounds are computed from:
2084 /// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2085 #[prost(int64, tag = "1")]
2086 pub seconds: i64,
2087 /// Signed fractions of a second at nanosecond resolution of the span
2088 /// of time. Durations less than one second are represented with a 0
2089 /// `seconds` field and a positive or negative `nanos` field. For durations
2090 /// of one second or more, a non-zero value for the `nanos` field must be
2091 /// of the same sign as the `seconds` field. Must be from -999,999,999
2092 /// to +999,999,999 inclusive.
2093 #[prost(int32, tag = "2")]
2094 pub nanos: i32,
2095}
2096/// A Timestamp represents a point in time independent of any time zone or local
2097/// calendar, encoded as a count of seconds and fractions of seconds at
2098/// nanosecond resolution. The count is relative to an epoch at UTC midnight on
2099/// January 1, 1970, in the proleptic Gregorian calendar which extends the
2100/// Gregorian calendar backwards to year one.
2101///
2102/// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
2103/// second table is needed for interpretation, using a [24-hour linear
2104/// smear](<https://developers.google.com/time/smear>).
2105///
2106/// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
2107/// restricting to that range, we ensure that we can convert to and from [RFC
2108/// 3339](<https://www.ietf.org/rfc/rfc3339.txt>) date strings.
2109///
2110/// # Examples
2111///
2112/// Example 1: Compute Timestamp from POSIX `time()`.
2113///
2114/// Timestamp timestamp;
2115/// timestamp.set_seconds(time(NULL));
2116/// timestamp.set_nanos(0);
2117///
2118/// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
2119///
2120/// struct timeval tv;
2121/// gettimeofday(&tv, NULL);
2122///
2123/// Timestamp timestamp;
2124/// timestamp.set_seconds(tv.tv_sec);
2125/// timestamp.set_nanos(tv.tv_usec * 1000);
2126///
2127/// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
2128///
2129/// FILETIME ft;
2130/// GetSystemTimeAsFileTime(&ft);
2131/// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
2132///
2133/// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
2134/// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
2135/// Timestamp timestamp;
2136/// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
2137/// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
2138///
2139/// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
2140///
2141/// long millis = System.currentTimeMillis();
2142///
2143/// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
2144/// .setNanos((int) ((millis % 1000) * 1000000)).build();
2145///
2146/// Example 5: Compute Timestamp from Java `Instant.now()`.
2147///
2148/// Instant now = Instant.now();
2149///
2150/// Timestamp timestamp =
2151/// Timestamp.newBuilder().setSeconds(now.getEpochSecond())
2152/// .setNanos(now.getNano()).build();
2153///
2154/// Example 6: Compute Timestamp from current time in Python.
2155///
2156/// timestamp = Timestamp()
2157/// timestamp.GetCurrentTime()
2158///
2159/// # JSON Mapping
2160///
2161/// In JSON format, the Timestamp type is encoded as a string in the
2162/// [RFC 3339](<https://www.ietf.org/rfc/rfc3339.txt>) format. That is, the
2163/// format is "{year}-{month}-{day}T{hour}:{min}:{sec}\[.{frac_sec}\]Z"
2164/// where {year} is always expressed using four digits while {month}, {day},
2165/// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
2166/// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
2167/// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
2168/// is required. A proto3 JSON serializer should always use UTC (as indicated by
2169/// "Z") when printing the Timestamp type and a proto3 JSON parser should be
2170/// able to accept both UTC and other timezones (as indicated by an offset).
2171///
2172/// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
2173/// 01:30 UTC on January 15, 2017.
2174///
2175/// In JavaScript, one can convert a Date object to this format using the
2176/// standard
2177/// [toISOString()](<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString>)
2178/// method. In Python, a standard `datetime.datetime` object can be converted
2179/// to this format using
2180/// [`strftime`](<https://docs.python.org/2/library/time.html#time.strftime>) with
2181/// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
2182/// the Joda Time's [`ISODateTimeFormat.dateTime()`](
2183/// <http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime(>)
2184/// ) to obtain a formatter capable of generating timestamps in this format.
2185///
2186#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2187pub struct Timestamp {
2188 /// Represents seconds of UTC time since Unix epoch
2189 /// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
2190 /// 9999-12-31T23:59:59Z inclusive.
2191 #[prost(int64, tag = "1")]
2192 pub seconds: i64,
2193 /// Non-negative fractions of a second at nanosecond resolution. Negative
2194 /// second values with fractions must still have non-negative nanos values
2195 /// that count forward in time. Must be from 0 to 999,999,999
2196 /// inclusive.
2197 #[prost(int32, tag = "2")]
2198 pub nanos: i32,
2199}
2200/// A generic empty message that you can re-use to avoid defining duplicated
2201/// empty messages in your APIs. A typical example is to use it as the request
2202/// or the response type of an API method. For instance:
2203///
2204/// service Foo {
2205/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
2206/// }
2207///
2208#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2209pub struct Empty {}