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