prost_types/
protobuf.rs

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