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