Skip to main content

viam_rust_utils/gen/
google.api.rs

1// @generated
2/// Defines the HTTP configuration for an API service. It contains a list of
3/// \[HttpRule][google.api.HttpRule\], each specifying the mapping of an RPC method
4/// to one or more HTTP REST API methods.
5#[allow(clippy::derive_partial_eq_without_eq)]
6#[derive(Clone, PartialEq, ::prost::Message)]
7pub struct Http {
8    /// A list of HTTP configuration rules that apply to individual API methods.
9    ///
10    /// **NOTE:** All service configuration rules follow "last one wins" order.
11    #[prost(message, repeated, tag="1")]
12    pub rules: ::prost::alloc::vec::Vec<HttpRule>,
13    /// When set to true, URL path parameters will be fully URI-decoded except in
14    /// cases of single segment matches in reserved expansion, where "%2F" will be
15    /// left encoded.
16    ///
17    /// The default behavior is to not decode RFC 6570 reserved characters in multi
18    /// segment matches.
19    #[prost(bool, tag="2")]
20    pub fully_decode_reserved_expansion: bool,
21}
22/// gRPC Transcoding
23///
24/// gRPC Transcoding is a feature for mapping between a gRPC method and one or
25/// more HTTP REST endpoints. It allows developers to build a single API service
26/// that supports both gRPC APIs and REST APIs. Many systems, including [Google
27/// APIs](<https://github.com/googleapis/googleapis>),
28/// [Cloud Endpoints](<https://cloud.google.com/endpoints>), [gRPC
29/// Gateway](<https://github.com/grpc-ecosystem/grpc-gateway>),
30/// and \[Envoy\](<https://github.com/envoyproxy/envoy>) proxy support this feature
31/// and use it for large scale production services.
32///
33/// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
34/// how different portions of the gRPC request message are mapped to the URL
35/// path, URL query parameters, and HTTP request body. It also controls how the
36/// gRPC response message is mapped to the HTTP response body. `HttpRule` is
37/// typically specified as an `google.api.http` annotation on the gRPC method.
38///
39/// Each mapping specifies a URL path template and an HTTP method. The path
40/// template may refer to one or more fields in the gRPC request message, as long
41/// as each field is a non-repeated field with a primitive (non-message) type.
42/// The path template controls how fields of the request message are mapped to
43/// the URL path.
44///
45/// Example:
46///
47///      service Messaging {
48///        rpc GetMessage(GetMessageRequest) returns (Message) {
49///          option (google.api.http) = {
50///              get: "/v1/{name=messages/*}"
51///          };
52///        }
53///      }
54///      message GetMessageRequest {
55///        string name = 1; // Mapped to URL path.
56///      }
57///      message Message {
58///        string text = 1; // The resource content.
59///      }
60///
61/// This enables an HTTP REST to gRPC mapping as below:
62///
63/// - HTTP: `GET /v1/messages/123456`
64/// - gRPC: `GetMessage(name: "messages/123456")`
65///
66/// Any fields in the request message which are not bound by the path template
67/// automatically become HTTP query parameters if there is no HTTP request body.
68/// For example:
69///
70///      service Messaging {
71///        rpc GetMessage(GetMessageRequest) returns (Message) {
72///          option (google.api.http) = {
73///              get:"/v1/messages/{message_id}"
74///          };
75///        }
76///      }
77///      message GetMessageRequest {
78///        message SubMessage {
79///          string subfield = 1;
80///        }
81///        string message_id = 1; // Mapped to URL path.
82///        int64 revision = 2;    // Mapped to URL query parameter `revision`.
83///        SubMessage sub = 3;    // Mapped to URL query parameter `sub.subfield`.
84///      }
85///
86/// This enables a HTTP JSON to RPC mapping as below:
87///
88/// - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
89/// - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
90/// SubMessage(subfield: "foo"))`
91///
92/// Note that fields which are mapped to URL query parameters must have a
93/// primitive type or a repeated primitive type or a non-repeated message type.
94/// In the case of a repeated type, the parameter can be repeated in the URL
95/// as `...?param=A&param=B`. In the case of a message type, each field of the
96/// message is mapped to a separate parameter, such as
97/// `...?foo.a=A&foo.b=B&foo.c=C`.
98///
99/// For HTTP methods that allow a request body, the `body` field
100/// specifies the mapping. Consider a REST update method on the
101/// message resource collection:
102///
103///      service Messaging {
104///        rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
105///          option (google.api.http) = {
106///            patch: "/v1/messages/{message_id}"
107///            body: "message"
108///          };
109///        }
110///      }
111///      message UpdateMessageRequest {
112///        string message_id = 1; // mapped to the URL
113///        Message message = 2;   // mapped to the body
114///      }
115///
116/// The following HTTP JSON to RPC mapping is enabled, where the
117/// representation of the JSON in the request body is determined by
118/// protos JSON encoding:
119///
120/// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
121/// - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
122///
123/// The special name `*` can be used in the body mapping to define that
124/// every field not bound by the path template should be mapped to the
125/// request body.  This enables the following alternative definition of
126/// the update method:
127///
128///      service Messaging {
129///        rpc UpdateMessage(Message) returns (Message) {
130///          option (google.api.http) = {
131///            patch: "/v1/messages/{message_id}"
132///            body: "*"
133///          };
134///        }
135///      }
136///      message Message {
137///        string message_id = 1;
138///        string text = 2;
139///      }
140///
141///
142/// The following HTTP JSON to RPC mapping is enabled:
143///
144/// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
145/// - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
146///
147/// Note that when using `*` in the body mapping, it is not possible to
148/// have HTTP parameters, as all fields not bound by the path end in
149/// the body. This makes this option more rarely used in practice when
150/// defining REST APIs. The common usage of `*` is in custom methods
151/// which don't use the URL at all for transferring data.
152///
153/// It is possible to define multiple HTTP methods for one RPC by using
154/// the `additional_bindings` option. Example:
155///
156///      service Messaging {
157///        rpc GetMessage(GetMessageRequest) returns (Message) {
158///          option (google.api.http) = {
159///            get: "/v1/messages/{message_id}"
160///            additional_bindings {
161///              get: "/v1/users/{user_id}/messages/{message_id}"
162///            }
163///          };
164///        }
165///      }
166///      message GetMessageRequest {
167///        string message_id = 1;
168///        string user_id = 2;
169///      }
170///
171/// This enables the following two alternative HTTP JSON to RPC mappings:
172///
173/// - HTTP: `GET /v1/messages/123456`
174/// - gRPC: `GetMessage(message_id: "123456")`
175///
176/// - HTTP: `GET /v1/users/me/messages/123456`
177/// - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
178///
179/// Rules for HTTP mapping
180///
181/// 1. Leaf request fields (recursive expansion nested messages in the request
182///     message) are classified into three categories:
183///     - Fields referred by the path template. They are passed via the URL path.
184///     - Fields referred by the \[HttpRule.body][google.api.HttpRule.body\]. They
185///     are passed via the HTTP
186///       request body.
187///     - All other fields are passed via the URL query parameters, and the
188///       parameter name is the field path in the request message. A repeated
189///       field can be represented as multiple query parameters under the same
190///       name.
191///   2. If \[HttpRule.body][google.api.HttpRule.body\] is "*", there is no URL
192///   query parameter, all fields
193///      are passed via URL path and HTTP request body.
194///   3. If \[HttpRule.body][google.api.HttpRule.body\] is omitted, there is no HTTP
195///   request body, all
196///      fields are passed via URL path and URL query parameters.
197///
198/// Path template syntax
199///
200///      Template = "/" Segments [ Verb ] ;
201///      Segments = Segment { "/" Segment } ;
202///      Segment  = "*" | "**" | LITERAL | Variable ;
203///      Variable = "{" FieldPath [ "=" Segments ] "}" ;
204///      FieldPath = IDENT { "." IDENT } ;
205///      Verb     = ":" LITERAL ;
206///
207/// The syntax `*` matches a single URL path segment. The syntax `**` matches
208/// zero or more URL path segments, which must be the last part of the URL path
209/// except the `Verb`.
210///
211/// The syntax `Variable` matches part of the URL path as specified by its
212/// template. A variable template must not contain other variables. If a variable
213/// matches a single path segment, its template may be omitted, e.g. `{var}`
214/// is equivalent to `{var=*}`.
215///
216/// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
217/// contains any reserved character, such characters should be percent-encoded
218/// before the matching.
219///
220/// If a variable contains exactly one path segment, such as `"{var}"` or
221/// `"{var=*}"`, when such a variable is expanded into a URL path on the client
222/// side, all characters except `\[-_.~0-9a-zA-Z\]` are percent-encoded. The
223/// server side does the reverse decoding. Such variables show up in the
224/// [Discovery
225/// Document](<https://developers.google.com/discovery/v1/reference/apis>) as
226/// `{var}`.
227///
228/// If a variable contains multiple path segments, such as `"{var=foo/*}"`
229/// or `"{var=**}"`, when such a variable is expanded into a URL path on the
230/// client side, all characters except `\[-_.~/0-9a-zA-Z\]` are percent-encoded.
231/// The server side does the reverse decoding, except "%2F" and "%2f" are left
232/// unchanged. Such variables show up in the
233/// [Discovery
234/// Document](<https://developers.google.com/discovery/v1/reference/apis>) as
235/// `{+var}`.
236///
237/// Using gRPC API Service Configuration
238///
239/// gRPC API Service Configuration (service config) is a configuration language
240/// for configuring a gRPC service to become a user-facing product. The
241/// service config is simply the YAML representation of the `google.api.Service`
242/// proto message.
243///
244/// As an alternative to annotating your proto file, you can configure gRPC
245/// transcoding in your service config YAML files. You do this by specifying a
246/// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
247/// effect as the proto annotation. This can be particularly useful if you
248/// have a proto that is reused in multiple services. Note that any transcoding
249/// specified in the service config will override any matching transcoding
250/// configuration in the proto.
251///
252/// The following example selects a gRPC method and applies an `HttpRule` to it:
253///
254///      http:
255///        rules:
256///          - selector: example.v1.Messaging.GetMessage
257///            get: /v1/messages/{message_id}/{sub.subfield}
258///
259/// Special notes
260///
261/// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
262/// proto to JSON conversion must follow the [proto3
263/// specification](<https://developers.google.com/protocol-buffers/docs/proto3#json>).
264///
265/// While the single segment variable follows the semantics of
266/// [RFC 6570](<https://tools.ietf.org/html/rfc6570>) Section 3.2.2 Simple String
267/// Expansion, the multi segment variable **does not** follow RFC 6570 Section
268/// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
269/// does not expand special characters like `?` and `#`, which would lead
270/// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
271/// for multi segment variables.
272///
273/// The path variables **must not** refer to any repeated or mapped field,
274/// because client libraries are not capable of handling such variable expansion.
275///
276/// The path variables **must not** capture the leading "/" character. The reason
277/// is that the most common use case "{var}" does not capture the leading "/"
278/// character. For consistency, all path variables must share the same behavior.
279///
280/// Repeated message fields must not be mapped to URL query parameters, because
281/// no client library can support such complicated mapping.
282///
283/// If an API needs to use a JSON array for request or response body, it can map
284/// the request or response body to a repeated field. However, some gRPC
285/// Transcoding implementations may not support this feature.
286#[allow(clippy::derive_partial_eq_without_eq)]
287#[derive(Clone, PartialEq, ::prost::Message)]
288pub struct HttpRule {
289    /// Selects a method to which this rule applies.
290    ///
291    /// Refer to \[selector][google.api.DocumentationRule.selector\] for syntax
292    /// details.
293    #[prost(string, tag="1")]
294    pub selector: ::prost::alloc::string::String,
295    /// The name of the request field whose value is mapped to the HTTP request
296    /// body, or `*` for mapping all request fields not captured by the path
297    /// pattern to the HTTP body, or omitted for not having any HTTP request body.
298    ///
299    /// NOTE: the referred field must be present at the top-level of the request
300    /// message type.
301    #[prost(string, tag="7")]
302    pub body: ::prost::alloc::string::String,
303    /// Optional. The name of the response field whose value is mapped to the HTTP
304    /// response body. When omitted, the entire response message will be used
305    /// as the HTTP response body.
306    ///
307    /// NOTE: The referred field must be present at the top-level of the response
308    /// message type.
309    #[prost(string, tag="12")]
310    pub response_body: ::prost::alloc::string::String,
311    /// Additional HTTP bindings for the selector. Nested bindings must
312    /// not contain an `additional_bindings` field themselves (that is,
313    /// the nesting may only be one level deep).
314    #[prost(message, repeated, tag="11")]
315    pub additional_bindings: ::prost::alloc::vec::Vec<HttpRule>,
316    /// Determines the URL pattern is matched by this rules. This pattern can be
317    /// used with any of the {get|put|post|delete|patch} methods. A custom method
318    /// can be defined using the 'custom' field.
319    #[prost(oneof="http_rule::Pattern", tags="2, 3, 4, 5, 6, 8")]
320    pub pattern: ::core::option::Option<http_rule::Pattern>,
321}
322/// Nested message and enum types in `HttpRule`.
323pub mod http_rule {
324    /// Determines the URL pattern is matched by this rules. This pattern can be
325    /// used with any of the {get|put|post|delete|patch} methods. A custom method
326    /// can be defined using the 'custom' field.
327    #[allow(clippy::derive_partial_eq_without_eq)]
328#[derive(Clone, PartialEq, ::prost::Oneof)]
329    pub enum Pattern {
330        /// Maps to HTTP GET. Used for listing and getting information about
331        /// resources.
332        #[prost(string, tag="2")]
333        Get(::prost::alloc::string::String),
334        /// Maps to HTTP PUT. Used for replacing a resource.
335        #[prost(string, tag="3")]
336        Put(::prost::alloc::string::String),
337        /// Maps to HTTP POST. Used for creating a resource or performing an action.
338        #[prost(string, tag="4")]
339        Post(::prost::alloc::string::String),
340        /// Maps to HTTP DELETE. Used for deleting a resource.
341        #[prost(string, tag="5")]
342        Delete(::prost::alloc::string::String),
343        /// Maps to HTTP PATCH. Used for updating a resource.
344        #[prost(string, tag="6")]
345        Patch(::prost::alloc::string::String),
346        /// The custom pattern is used for specifying an HTTP method that is not
347        /// included in the `pattern` field, such as HEAD, or "*" to leave the
348        /// HTTP method unspecified for this rule. The wild-card rule is useful
349        /// for services that provide content to Web (HTML) clients.
350        #[prost(message, tag="8")]
351        Custom(super::CustomHttpPattern),
352    }
353}
354/// A custom pattern is used for defining custom HTTP verb.
355#[allow(clippy::derive_partial_eq_without_eq)]
356#[derive(Clone, PartialEq, ::prost::Message)]
357pub struct CustomHttpPattern {
358    /// The name of this custom HTTP verb.
359    #[prost(string, tag="1")]
360    pub kind: ::prost::alloc::string::String,
361    /// The path matched by this custom verb.
362    #[prost(string, tag="2")]
363    pub path: ::prost::alloc::string::String,
364}
365/// The launch stage as defined by [Google Cloud Platform
366/// Launch Stages](<https://cloud.google.com/terms/launch-stages>).
367#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
368#[repr(i32)]
369pub enum LaunchStage {
370    /// Do not use this default value.
371    Unspecified = 0,
372    /// The feature is not yet implemented. Users can not use it.
373    Unimplemented = 6,
374    /// Prelaunch features are hidden from users and are only visible internally.
375    Prelaunch = 7,
376    /// Early Access features are limited to a closed group of testers. To use
377    /// these features, you must sign up in advance and sign a Trusted Tester
378    /// agreement (which includes confidentiality provisions). These features may
379    /// be unstable, changed in backward-incompatible ways, and are not
380    /// guaranteed to be released.
381    EarlyAccess = 1,
382    /// Alpha is a limited availability test for releases before they are cleared
383    /// for widespread use. By Alpha, all significant design issues are resolved
384    /// and we are in the process of verifying functionality. Alpha customers
385    /// need to apply for access, agree to applicable terms, and have their
386    /// projects allowlisted. Alpha releases don't have to be feature complete,
387    /// no SLAs are provided, and there are no technical support obligations, but
388    /// they will be far enough along that customers can actually use them in
389    /// test environments or for limited-use tests -- just like they would in
390    /// normal production cases.
391    Alpha = 2,
392    /// Beta is the point at which we are ready to open a release for any
393    /// customer to use. There are no SLA or technical support obligations in a
394    /// Beta release. Products will be complete from a feature perspective, but
395    /// may have some open outstanding issues. Beta releases are suitable for
396    /// limited production use cases.
397    Beta = 3,
398    /// GA features are open to all developers and are considered stable and
399    /// fully qualified for production use.
400    Ga = 4,
401    /// Deprecated features are scheduled to be shut down and removed. For more
402    /// information, see the "Deprecation Policy" section of our [Terms of
403    /// Service](<https://cloud.google.com/terms/>)
404    /// and the [Google Cloud Platform Subject to the Deprecation
405    /// Policy](<https://cloud.google.com/terms/deprecation>) documentation.
406    Deprecated = 5,
407}
408impl LaunchStage {
409    /// String value of the enum field names used in the ProtoBuf definition.
410    ///
411    /// The values are not transformed in any way and thus are considered stable
412    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
413    pub fn as_str_name(&self) -> &'static str {
414        match self {
415            LaunchStage::Unspecified => "LAUNCH_STAGE_UNSPECIFIED",
416            LaunchStage::Unimplemented => "UNIMPLEMENTED",
417            LaunchStage::Prelaunch => "PRELAUNCH",
418            LaunchStage::EarlyAccess => "EARLY_ACCESS",
419            LaunchStage::Alpha => "ALPHA",
420            LaunchStage::Beta => "BETA",
421            LaunchStage::Ga => "GA",
422            LaunchStage::Deprecated => "DEPRECATED",
423        }
424    }
425    /// Creates an enum from field names used in the ProtoBuf definition.
426    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
427        match value {
428            "LAUNCH_STAGE_UNSPECIFIED" => Some(Self::Unspecified),
429            "UNIMPLEMENTED" => Some(Self::Unimplemented),
430            "PRELAUNCH" => Some(Self::Prelaunch),
431            "EARLY_ACCESS" => Some(Self::EarlyAccess),
432            "ALPHA" => Some(Self::Alpha),
433            "BETA" => Some(Self::Beta),
434            "GA" => Some(Self::Ga),
435            "DEPRECATED" => Some(Self::Deprecated),
436            _ => None,
437        }
438    }
439}
440/// Required information for every language.
441#[allow(clippy::derive_partial_eq_without_eq)]
442#[derive(Clone, PartialEq, ::prost::Message)]
443pub struct CommonLanguageSettings {
444    /// Link to automatically generated reference documentation.  Example:
445    /// <https://cloud.google.com/nodejs/docs/reference/asset/latest>
446    #[deprecated]
447    #[prost(string, tag="1")]
448    pub reference_docs_uri: ::prost::alloc::string::String,
449    /// The destination where API teams want this client library to be published.
450    #[prost(enumeration="ClientLibraryDestination", repeated, tag="2")]
451    pub destinations: ::prost::alloc::vec::Vec<i32>,
452    /// Configuration for which RPCs should be generated in the GAPIC client.
453    ///
454    /// Note: This field should not be used in most cases.
455    #[prost(message, optional, tag="3")]
456    pub selective_gapic_generation: ::core::option::Option<SelectiveGapicGeneration>,
457}
458/// Details about how and where to publish client libraries.
459#[allow(clippy::derive_partial_eq_without_eq)]
460#[derive(Clone, PartialEq, ::prost::Message)]
461pub struct ClientLibrarySettings {
462    /// Version of the API to apply these settings to. This is the full protobuf
463    /// package for the API, ending in the version element.
464    /// Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
465    #[prost(string, tag="1")]
466    pub version: ::prost::alloc::string::String,
467    /// Launch stage of this version of the API.
468    #[prost(enumeration="LaunchStage", tag="2")]
469    pub launch_stage: i32,
470    /// When using transport=rest, the client request will encode enums as
471    /// numbers rather than strings.
472    #[prost(bool, tag="3")]
473    pub rest_numeric_enums: bool,
474    /// Settings for legacy Java features, supported in the Service YAML.
475    #[prost(message, optional, tag="21")]
476    pub java_settings: ::core::option::Option<JavaSettings>,
477    /// Settings for C++ client libraries.
478    #[prost(message, optional, tag="22")]
479    pub cpp_settings: ::core::option::Option<CppSettings>,
480    /// Settings for PHP client libraries.
481    #[prost(message, optional, tag="23")]
482    pub php_settings: ::core::option::Option<PhpSettings>,
483    /// Settings for Python client libraries.
484    #[prost(message, optional, tag="24")]
485    pub python_settings: ::core::option::Option<PythonSettings>,
486    /// Settings for Node client libraries.
487    #[prost(message, optional, tag="25")]
488    pub node_settings: ::core::option::Option<NodeSettings>,
489    /// Settings for .NET client libraries.
490    #[prost(message, optional, tag="26")]
491    pub dotnet_settings: ::core::option::Option<DotnetSettings>,
492    /// Settings for Ruby client libraries.
493    #[prost(message, optional, tag="27")]
494    pub ruby_settings: ::core::option::Option<RubySettings>,
495    /// Settings for Go client libraries.
496    #[prost(message, optional, tag="28")]
497    pub go_settings: ::core::option::Option<GoSettings>,
498}
499/// This message configures the settings for publishing [Google Cloud Client
500/// libraries](<https://cloud.google.com/apis/docs/cloud-client-libraries>)
501/// generated from the service config.
502#[allow(clippy::derive_partial_eq_without_eq)]
503#[derive(Clone, PartialEq, ::prost::Message)]
504pub struct Publishing {
505    /// A list of API method settings, e.g. the behavior for methods that use the
506    /// long-running operation pattern.
507    #[prost(message, repeated, tag="2")]
508    pub method_settings: ::prost::alloc::vec::Vec<MethodSettings>,
509    /// Link to a *public* URI where users can report issues.  Example:
510    /// <https://issuetracker.google.com/issues/new?component=190865&template=1161103>
511    #[prost(string, tag="101")]
512    pub new_issue_uri: ::prost::alloc::string::String,
513    /// Link to product home page.  Example:
514    /// <https://cloud.google.com/asset-inventory/docs/overview>
515    #[prost(string, tag="102")]
516    pub documentation_uri: ::prost::alloc::string::String,
517    /// Used as a tracking tag when collecting data about the APIs developer
518    /// relations artifacts like docs, packages delivered to package managers,
519    /// etc.  Example: "speech".
520    #[prost(string, tag="103")]
521    pub api_short_name: ::prost::alloc::string::String,
522    /// GitHub label to apply to issues and pull requests opened for this API.
523    #[prost(string, tag="104")]
524    pub github_label: ::prost::alloc::string::String,
525    /// GitHub teams to be added to CODEOWNERS in the directory in GitHub
526    /// containing source code for the client libraries for this API.
527    #[prost(string, repeated, tag="105")]
528    pub codeowner_github_teams: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
529    /// A prefix used in sample code when demarking regions to be included in
530    /// documentation.
531    #[prost(string, tag="106")]
532    pub doc_tag_prefix: ::prost::alloc::string::String,
533    /// For whom the client library is being published.
534    #[prost(enumeration="ClientLibraryOrganization", tag="107")]
535    pub organization: i32,
536    /// Client library settings.  If the same version string appears multiple
537    /// times in this list, then the last one wins.  Settings from earlier
538    /// settings with the same version string are discarded.
539    #[prost(message, repeated, tag="109")]
540    pub library_settings: ::prost::alloc::vec::Vec<ClientLibrarySettings>,
541    /// Optional link to proto reference documentation.  Example:
542    /// <https://cloud.google.com/pubsub/lite/docs/reference/rpc>
543    #[prost(string, tag="110")]
544    pub proto_reference_documentation_uri: ::prost::alloc::string::String,
545    /// Optional link to REST reference documentation.  Example:
546    /// <https://cloud.google.com/pubsub/lite/docs/reference/rest>
547    #[prost(string, tag="111")]
548    pub rest_reference_documentation_uri: ::prost::alloc::string::String,
549}
550/// Settings for Java client libraries.
551#[allow(clippy::derive_partial_eq_without_eq)]
552#[derive(Clone, PartialEq, ::prost::Message)]
553pub struct JavaSettings {
554    /// The package name to use in Java. Clobbers the java_package option
555    /// set in the protobuf. This should be used **only** by APIs
556    /// who have already set the language_settings.java.package_name" field
557    /// in gapic.yaml. API teams should use the protobuf java_package option
558    /// where possible.
559    ///
560    /// Example of a YAML configuration::
561    ///
562    ///      publishing:
563    ///        library_settings:
564    ///          java_settings:
565    ///            library_package: com.google.cloud.pubsub.v1
566    #[prost(string, tag="1")]
567    pub library_package: ::prost::alloc::string::String,
568    /// Configure the Java class name to use instead of the service's for its
569    /// corresponding generated GAPIC client. Keys are fully-qualified
570    /// service names as they appear in the protobuf (including the full
571    /// the language_settings.java.interface_names" field in gapic.yaml. API
572    /// teams should otherwise use the service name as it appears in the
573    /// protobuf.
574    ///
575    /// Example of a YAML configuration::
576    ///
577    ///      publishing:
578    ///        java_settings:
579    ///          service_class_names:
580    ///            - google.pubsub.v1.Publisher: TopicAdmin
581    ///            - google.pubsub.v1.Subscriber: SubscriptionAdmin
582    #[prost(map="string, string", tag="2")]
583    pub service_class_names: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
584    /// Some settings.
585    #[prost(message, optional, tag="3")]
586    pub common: ::core::option::Option<CommonLanguageSettings>,
587}
588/// Settings for C++ client libraries.
589#[allow(clippy::derive_partial_eq_without_eq)]
590#[derive(Clone, PartialEq, ::prost::Message)]
591pub struct CppSettings {
592    /// Some settings.
593    #[prost(message, optional, tag="1")]
594    pub common: ::core::option::Option<CommonLanguageSettings>,
595}
596/// Settings for Php client libraries.
597#[allow(clippy::derive_partial_eq_without_eq)]
598#[derive(Clone, PartialEq, ::prost::Message)]
599pub struct PhpSettings {
600    /// Some settings.
601    #[prost(message, optional, tag="1")]
602    pub common: ::core::option::Option<CommonLanguageSettings>,
603    /// The package name to use in Php. Clobbers the php_namespace option
604    /// set in the protobuf. This should be used **only** by APIs
605    /// who have already set the language_settings.php.package_name" field
606    /// in gapic.yaml. API teams should use the protobuf php_namespace option
607    /// where possible.
608    ///
609    /// Example of a YAML configuration::
610    ///
611    ///      publishing:
612    ///        library_settings:
613    ///          php_settings:
614    ///            library_package: Google\Cloud\PubSub\V1
615    #[prost(string, tag="2")]
616    pub library_package: ::prost::alloc::string::String,
617}
618/// Settings for Python client libraries.
619#[allow(clippy::derive_partial_eq_without_eq)]
620#[derive(Clone, PartialEq, ::prost::Message)]
621pub struct PythonSettings {
622    /// Some settings.
623    #[prost(message, optional, tag="1")]
624    pub common: ::core::option::Option<CommonLanguageSettings>,
625    /// Experimental features to be included during client library generation.
626    #[prost(message, optional, tag="2")]
627    pub experimental_features: ::core::option::Option<python_settings::ExperimentalFeatures>,
628}
629/// Nested message and enum types in `PythonSettings`.
630pub mod python_settings {
631    /// Experimental features to be included during client library generation.
632    /// These fields will be deprecated once the feature graduates and is enabled
633    /// by default.
634    #[allow(clippy::derive_partial_eq_without_eq)]
635#[derive(Clone, PartialEq, ::prost::Message)]
636    pub struct ExperimentalFeatures {
637        /// Enables generation of asynchronous REST clients if `rest` transport is
638        /// enabled. By default, asynchronous REST clients will not be generated.
639        /// This feature will be enabled by default 1 month after launching the
640        /// feature in preview packages.
641        #[prost(bool, tag="1")]
642        pub rest_async_io_enabled: bool,
643        /// Enables generation of protobuf code using new types that are more
644        /// Pythonic which are included in `protobuf>=5.29.x`. This feature will be
645        /// enabled by default 1 month after launching the feature in preview
646        /// packages.
647        #[prost(bool, tag="2")]
648        pub protobuf_pythonic_types_enabled: bool,
649        /// Disables generation of an unversioned Python package for this client
650        /// library. This means that the module names will need to be versioned in
651        /// import statements. For example `import google.cloud.library_v2` instead
652        /// of `import google.cloud.library`.
653        #[prost(bool, tag="3")]
654        pub unversioned_package_disabled: bool,
655    }
656}
657/// Settings for Node client libraries.
658#[allow(clippy::derive_partial_eq_without_eq)]
659#[derive(Clone, PartialEq, ::prost::Message)]
660pub struct NodeSettings {
661    /// Some settings.
662    #[prost(message, optional, tag="1")]
663    pub common: ::core::option::Option<CommonLanguageSettings>,
664}
665/// Settings for Dotnet client libraries.
666#[allow(clippy::derive_partial_eq_without_eq)]
667#[derive(Clone, PartialEq, ::prost::Message)]
668pub struct DotnetSettings {
669    /// Some settings.
670    #[prost(message, optional, tag="1")]
671    pub common: ::core::option::Option<CommonLanguageSettings>,
672    /// Map from original service names to renamed versions.
673    /// This is used when the default generated types
674    /// would cause a naming conflict. (Neither name is
675    /// fully-qualified.)
676    /// Example: Subscriber to SubscriberServiceApi.
677    #[prost(map="string, string", tag="2")]
678    pub renamed_services: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
679    /// Map from full resource types to the effective short name
680    /// for the resource. This is used when otherwise resource
681    /// named from different services would cause naming collisions.
682    /// Example entry:
683    /// "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
684    #[prost(map="string, string", tag="3")]
685    pub renamed_resources: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
686    /// List of full resource types to ignore during generation.
687    /// This is typically used for API-specific Location resources,
688    /// which should be handled by the generator as if they were actually
689    /// the common Location resources.
690    /// Example entry: "documentai.googleapis.com/Location"
691    #[prost(string, repeated, tag="4")]
692    pub ignored_resources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
693    /// Namespaces which must be aliased in snippets due to
694    /// a known (but non-generator-predictable) naming collision
695    #[prost(string, repeated, tag="5")]
696    pub forced_namespace_aliases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
697    /// Method signatures (in the form "service.method(signature)")
698    /// which are provided separately, so shouldn't be generated.
699    /// Snippets *calling* these methods are still generated, however.
700    #[prost(string, repeated, tag="6")]
701    pub handwritten_signatures: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
702}
703/// Settings for Ruby client libraries.
704#[allow(clippy::derive_partial_eq_without_eq)]
705#[derive(Clone, PartialEq, ::prost::Message)]
706pub struct RubySettings {
707    /// Some settings.
708    #[prost(message, optional, tag="1")]
709    pub common: ::core::option::Option<CommonLanguageSettings>,
710}
711/// Settings for Go client libraries.
712#[allow(clippy::derive_partial_eq_without_eq)]
713#[derive(Clone, PartialEq, ::prost::Message)]
714pub struct GoSettings {
715    /// Some settings.
716    #[prost(message, optional, tag="1")]
717    pub common: ::core::option::Option<CommonLanguageSettings>,
718    /// Map of service names to renamed services. Keys are the package relative
719    /// service names and values are the name to be used for the service client
720    /// and call options.
721    ///
722    /// Example:
723    ///
724    ///      publishing:
725    ///        go_settings:
726    ///          renamed_services:
727    ///            Publisher: TopicAdmin
728    #[prost(map="string, string", tag="2")]
729    pub renamed_services: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
730}
731/// Describes the generator configuration for a method.
732#[allow(clippy::derive_partial_eq_without_eq)]
733#[derive(Clone, PartialEq, ::prost::Message)]
734pub struct MethodSettings {
735    /// The fully qualified name of the method, for which the options below apply.
736    /// This is used to find the method to apply the options.
737    ///
738    /// Example:
739    ///
740    ///      publishing:
741    ///        method_settings:
742    ///        - selector: google.storage.control.v2.StorageControl.CreateFolder
743    ///          # method settings for CreateFolder...
744    #[prost(string, tag="1")]
745    pub selector: ::prost::alloc::string::String,
746    /// Describes settings to use for long-running operations when generating
747    /// API methods for RPCs. Complements RPCs that use the annotations in
748    /// google/longrunning/operations.proto.
749    ///
750    /// Example of a YAML configuration::
751    ///
752    ///      publishing:
753    ///        method_settings:
754    ///        - selector: google.cloud.speech.v2.Speech.BatchRecognize
755    ///          long_running:
756    ///            initial_poll_delay: 60s # 1 minute
757    ///            poll_delay_multiplier: 1.5
758    ///            max_poll_delay: 360s # 6 minutes
759    ///            total_poll_timeout: 54000s # 90 minutes
760    #[prost(message, optional, tag="2")]
761    pub long_running: ::core::option::Option<method_settings::LongRunning>,
762    /// List of top-level fields of the request message, that should be
763    /// automatically populated by the client libraries based on their
764    /// (google.api.field_info).format. Currently supported format: UUID4.
765    ///
766    /// Example of a YAML configuration:
767    ///
768    ///      publishing:
769    ///        method_settings:
770    ///        - selector: google.example.v1.ExampleService.CreateExample
771    ///          auto_populated_fields:
772    ///          - request_id
773    #[prost(string, repeated, tag="3")]
774    pub auto_populated_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
775    /// Batching configuration for an API method in client libraries.
776    ///
777    /// Example of a YAML configuration:
778    ///
779    ///      publishing:
780    ///        method_settings:
781    ///        - selector: google.example.v1.ExampleService.BatchCreateExample
782    ///          batching:
783    ///            element_count_threshold: 1000
784    ///            request_byte_threshold: 100000000
785    ///            delay_threshold_millis: 10
786    #[prost(message, optional, tag="4")]
787    pub batching: ::core::option::Option<BatchingConfigProto>,
788}
789/// Nested message and enum types in `MethodSettings`.
790pub mod method_settings {
791    /// Describes settings to use when generating API methods that use the
792    /// long-running operation pattern.
793    /// All default values below are from those used in the client library
794    /// generators (e.g.
795    /// \[Java\](<https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java>)).
796    #[allow(clippy::derive_partial_eq_without_eq)]
797#[derive(Clone, PartialEq, ::prost::Message)]
798    pub struct LongRunning {
799        /// Initial delay after which the first poll request will be made.
800        /// Default value: 5 seconds.
801        #[prost(message, optional, tag="1")]
802        pub initial_poll_delay: ::core::option::Option<::prost_types::Duration>,
803        /// Multiplier to gradually increase delay between subsequent polls until it
804        /// reaches max_poll_delay.
805        /// Default value: 1.5.
806        #[prost(float, tag="2")]
807        pub poll_delay_multiplier: f32,
808        /// Maximum time between two subsequent poll requests.
809        /// Default value: 45 seconds.
810        #[prost(message, optional, tag="3")]
811        pub max_poll_delay: ::core::option::Option<::prost_types::Duration>,
812        /// Total polling timeout.
813        /// Default value: 5 minutes.
814        #[prost(message, optional, tag="4")]
815        pub total_poll_timeout: ::core::option::Option<::prost_types::Duration>,
816    }
817}
818/// This message is used to configure the generation of a subset of the RPCs in
819/// a service for client libraries.
820///
821/// Note: This feature should not be used in most cases.
822#[allow(clippy::derive_partial_eq_without_eq)]
823#[derive(Clone, PartialEq, ::prost::Message)]
824pub struct SelectiveGapicGeneration {
825    /// An allowlist of the fully qualified names of RPCs that should be included
826    /// on public client surfaces.
827    #[prost(string, repeated, tag="1")]
828    pub methods: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
829    /// Setting this to true indicates to the client generators that methods
830    /// that would be excluded from the generation should instead be generated
831    /// in a way that indicates these methods should not be consumed by
832    /// end users. How this is expressed is up to individual language
833    /// implementations to decide. Some examples may be: added annotations,
834    /// obfuscated identifiers, or other language idiomatic patterns.
835    #[prost(bool, tag="2")]
836    pub generate_omitted_as_internal: bool,
837}
838/// `BatchingConfigProto` defines the batching configuration for an API method.
839#[allow(clippy::derive_partial_eq_without_eq)]
840#[derive(Clone, PartialEq, ::prost::Message)]
841pub struct BatchingConfigProto {
842    /// The thresholds which trigger a batched request to be sent.
843    #[prost(message, optional, tag="1")]
844    pub thresholds: ::core::option::Option<BatchingSettingsProto>,
845    /// The request and response fields used in batching.
846    #[prost(message, optional, tag="2")]
847    pub batch_descriptor: ::core::option::Option<BatchingDescriptorProto>,
848}
849/// `BatchingSettingsProto` specifies a set of batching thresholds, each of
850/// which acts as a trigger to send a batch of messages as a request. At least
851/// one threshold must be positive nonzero.
852#[allow(clippy::derive_partial_eq_without_eq)]
853#[derive(Clone, PartialEq, ::prost::Message)]
854pub struct BatchingSettingsProto {
855    /// The number of elements of a field collected into a batch which, if
856    /// exceeded, causes the batch to be sent.
857    #[prost(int32, tag="1")]
858    pub element_count_threshold: i32,
859    /// The aggregated size of the batched field which, if exceeded, causes the
860    /// batch to be sent. This size is computed by aggregating the sizes of the
861    /// request field to be batched, not of the entire request message.
862    #[prost(int64, tag="2")]
863    pub request_byte_threshold: i64,
864    /// The duration after which a batch should be sent, starting from the addition
865    /// of the first message to that batch.
866    #[prost(message, optional, tag="3")]
867    pub delay_threshold: ::core::option::Option<::prost_types::Duration>,
868    /// The maximum number of elements collected in a batch that could be accepted
869    /// by server.
870    #[prost(int32, tag="4")]
871    pub element_count_limit: i32,
872    /// The maximum size of the request that could be accepted by server.
873    #[prost(int32, tag="5")]
874    pub request_byte_limit: i32,
875    /// The maximum number of elements allowed by flow control.
876    #[prost(int32, tag="6")]
877    pub flow_control_element_limit: i32,
878    /// The maximum size of data allowed by flow control.
879    #[prost(int32, tag="7")]
880    pub flow_control_byte_limit: i32,
881    /// The behavior to take when the flow control limit is exceeded.
882    #[prost(enumeration="FlowControlLimitExceededBehaviorProto", tag="8")]
883    pub flow_control_limit_exceeded_behavior: i32,
884}
885/// `BatchingDescriptorProto` specifies the fields of the request message to be
886/// used for batching, and, optionally, the fields of the response message to be
887/// used for demultiplexing.
888#[allow(clippy::derive_partial_eq_without_eq)]
889#[derive(Clone, PartialEq, ::prost::Message)]
890pub struct BatchingDescriptorProto {
891    /// The repeated field in the request message to be aggregated by batching.
892    #[prost(string, tag="1")]
893    pub batched_field: ::prost::alloc::string::String,
894    /// A list of the fields in the request message. Two requests will be batched
895    /// together only if the values of every field specified in
896    /// `request_discriminator_fields` is equal between the two requests.
897    #[prost(string, repeated, tag="2")]
898    pub discriminator_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
899    /// Optional. When present, indicates the field in the response message to be
900    /// used to demultiplex the response into multiple response messages, in
901    /// correspondence with the multiple request messages originally batched
902    /// together.
903    #[prost(string, tag="3")]
904    pub subresponse_field: ::prost::alloc::string::String,
905}
906/// The organization for which the client libraries are being published.
907/// Affects the url where generated docs are published, etc.
908#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
909#[repr(i32)]
910pub enum ClientLibraryOrganization {
911    /// Not useful.
912    Unspecified = 0,
913    /// Google Cloud Platform Org.
914    Cloud = 1,
915    /// Ads (Advertising) Org.
916    Ads = 2,
917    /// Photos Org.
918    Photos = 3,
919    /// Street View Org.
920    StreetView = 4,
921    /// Shopping Org.
922    Shopping = 5,
923    /// Geo Org.
924    Geo = 6,
925    /// Generative AI - <https://developers.generativeai.google>
926    GenerativeAi = 7,
927}
928impl ClientLibraryOrganization {
929    /// String value of the enum field names used in the ProtoBuf definition.
930    ///
931    /// The values are not transformed in any way and thus are considered stable
932    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
933    pub fn as_str_name(&self) -> &'static str {
934        match self {
935            ClientLibraryOrganization::Unspecified => "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED",
936            ClientLibraryOrganization::Cloud => "CLOUD",
937            ClientLibraryOrganization::Ads => "ADS",
938            ClientLibraryOrganization::Photos => "PHOTOS",
939            ClientLibraryOrganization::StreetView => "STREET_VIEW",
940            ClientLibraryOrganization::Shopping => "SHOPPING",
941            ClientLibraryOrganization::Geo => "GEO",
942            ClientLibraryOrganization::GenerativeAi => "GENERATIVE_AI",
943        }
944    }
945    /// Creates an enum from field names used in the ProtoBuf definition.
946    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
947        match value {
948            "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" => Some(Self::Unspecified),
949            "CLOUD" => Some(Self::Cloud),
950            "ADS" => Some(Self::Ads),
951            "PHOTOS" => Some(Self::Photos),
952            "STREET_VIEW" => Some(Self::StreetView),
953            "SHOPPING" => Some(Self::Shopping),
954            "GEO" => Some(Self::Geo),
955            "GENERATIVE_AI" => Some(Self::GenerativeAi),
956            _ => None,
957        }
958    }
959}
960/// To where should client libraries be published?
961#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
962#[repr(i32)]
963pub enum ClientLibraryDestination {
964    /// Client libraries will neither be generated nor published to package
965    /// managers.
966    Unspecified = 0,
967    /// Generate the client library in a repo under github.com/googleapis,
968    /// but don't publish it to package managers.
969    Github = 10,
970    /// Publish the library to package managers like nuget.org and npmjs.com.
971    PackageManager = 20,
972}
973impl ClientLibraryDestination {
974    /// String value of the enum field names used in the ProtoBuf definition.
975    ///
976    /// The values are not transformed in any way and thus are considered stable
977    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
978    pub fn as_str_name(&self) -> &'static str {
979        match self {
980            ClientLibraryDestination::Unspecified => "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED",
981            ClientLibraryDestination::Github => "GITHUB",
982            ClientLibraryDestination::PackageManager => "PACKAGE_MANAGER",
983        }
984    }
985    /// Creates an enum from field names used in the ProtoBuf definition.
986    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
987        match value {
988            "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" => Some(Self::Unspecified),
989            "GITHUB" => Some(Self::Github),
990            "PACKAGE_MANAGER" => Some(Self::PackageManager),
991            _ => None,
992        }
993    }
994}
995/// The behavior to take when the flow control limit is exceeded.
996#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
997#[repr(i32)]
998pub enum FlowControlLimitExceededBehaviorProto {
999    /// Default behavior, system-defined.
1000    UnsetBehavior = 0,
1001    /// Stop operation, raise error.
1002    ThrowException = 1,
1003    /// Pause operation until limit clears.
1004    Block = 2,
1005    /// Continue operation, disregard limit.
1006    Ignore = 3,
1007}
1008impl FlowControlLimitExceededBehaviorProto {
1009    /// String value of the enum field names used in the ProtoBuf definition.
1010    ///
1011    /// The values are not transformed in any way and thus are considered stable
1012    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1013    pub fn as_str_name(&self) -> &'static str {
1014        match self {
1015            FlowControlLimitExceededBehaviorProto::UnsetBehavior => "UNSET_BEHAVIOR",
1016            FlowControlLimitExceededBehaviorProto::ThrowException => "THROW_EXCEPTION",
1017            FlowControlLimitExceededBehaviorProto::Block => "BLOCK",
1018            FlowControlLimitExceededBehaviorProto::Ignore => "IGNORE",
1019        }
1020    }
1021    /// Creates an enum from field names used in the ProtoBuf definition.
1022    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1023        match value {
1024            "UNSET_BEHAVIOR" => Some(Self::UnsetBehavior),
1025            "THROW_EXCEPTION" => Some(Self::ThrowException),
1026            "BLOCK" => Some(Self::Block),
1027            "IGNORE" => Some(Self::Ignore),
1028            _ => None,
1029        }
1030    }
1031}
1032/// An indicator of the behavior of a given field (for example, that a field
1033/// is required in requests, or given as output but ignored as input).
1034/// This **does not** change the behavior in protocol buffers itself; it only
1035/// denotes the behavior and may affect how API tooling handles the field.
1036///
1037/// Note: This enum **may** receive new values in the future.
1038#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1039#[repr(i32)]
1040pub enum FieldBehavior {
1041    /// Conventional default for enums. Do not use this.
1042    Unspecified = 0,
1043    /// Specifically denotes a field as optional.
1044    /// While all fields in protocol buffers are optional, this may be specified
1045    /// for emphasis if appropriate.
1046    Optional = 1,
1047    /// Denotes a field as required.
1048    /// This indicates that the field **must** be provided as part of the request,
1049    /// and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
1050    Required = 2,
1051    /// Denotes a field as output only.
1052    /// This indicates that the field is provided in responses, but including the
1053    /// field in a request does nothing (the server *must* ignore it and
1054    /// *must not* throw an error as a result of the field's presence).
1055    OutputOnly = 3,
1056    /// Denotes a field as input only.
1057    /// This indicates that the field is provided in requests, and the
1058    /// corresponding field is not included in output.
1059    InputOnly = 4,
1060    /// Denotes a field as immutable.
1061    /// This indicates that the field may be set once in a request to create a
1062    /// resource, but may not be changed thereafter.
1063    Immutable = 5,
1064    /// Denotes that a (repeated) field is an unordered list.
1065    /// This indicates that the service may provide the elements of the list
1066    /// in any arbitrary  order, rather than the order the user originally
1067    /// provided. Additionally, the list's order may or may not be stable.
1068    UnorderedList = 6,
1069    /// Denotes that this field returns a non-empty default value if not set.
1070    /// This indicates that if the user provides the empty value in a request,
1071    /// a non-empty value will be returned. The user will not be aware of what
1072    /// non-empty value to expect.
1073    NonEmptyDefault = 7,
1074    /// Denotes that the field in a resource (a message annotated with
1075    /// google.api.resource) is used in the resource name to uniquely identify the
1076    /// resource. For AIP-compliant APIs, this should only be applied to the
1077    /// `name` field on the resource.
1078    ///
1079    /// This behavior should not be applied to references to other resources within
1080    /// the message.
1081    ///
1082    /// The identifier field of resources often have different field behavior
1083    /// depending on the request it is embedded in (e.g. for Create methods name
1084    /// is optional and unused, while for Update methods it is required). Instead
1085    /// of method-specific annotations, only `IDENTIFIER` is required.
1086    Identifier = 8,
1087}
1088impl FieldBehavior {
1089    /// String value of the enum field names used in the ProtoBuf definition.
1090    ///
1091    /// The values are not transformed in any way and thus are considered stable
1092    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1093    pub fn as_str_name(&self) -> &'static str {
1094        match self {
1095            FieldBehavior::Unspecified => "FIELD_BEHAVIOR_UNSPECIFIED",
1096            FieldBehavior::Optional => "OPTIONAL",
1097            FieldBehavior::Required => "REQUIRED",
1098            FieldBehavior::OutputOnly => "OUTPUT_ONLY",
1099            FieldBehavior::InputOnly => "INPUT_ONLY",
1100            FieldBehavior::Immutable => "IMMUTABLE",
1101            FieldBehavior::UnorderedList => "UNORDERED_LIST",
1102            FieldBehavior::NonEmptyDefault => "NON_EMPTY_DEFAULT",
1103            FieldBehavior::Identifier => "IDENTIFIER",
1104        }
1105    }
1106    /// Creates an enum from field names used in the ProtoBuf definition.
1107    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1108        match value {
1109            "FIELD_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
1110            "OPTIONAL" => Some(Self::Optional),
1111            "REQUIRED" => Some(Self::Required),
1112            "OUTPUT_ONLY" => Some(Self::OutputOnly),
1113            "INPUT_ONLY" => Some(Self::InputOnly),
1114            "IMMUTABLE" => Some(Self::Immutable),
1115            "UNORDERED_LIST" => Some(Self::UnorderedList),
1116            "NON_EMPTY_DEFAULT" => Some(Self::NonEmptyDefault),
1117            "IDENTIFIER" => Some(Self::Identifier),
1118            _ => None,
1119        }
1120    }
1121}
1122/// Rich semantic information of an API field beyond basic typing.
1123#[allow(clippy::derive_partial_eq_without_eq)]
1124#[derive(Clone, PartialEq, ::prost::Message)]
1125pub struct FieldInfo {
1126    /// The standard format of a field value. This does not explicitly configure
1127    /// any API consumer, just documents the API's format for the field it is
1128    /// applied to.
1129    #[prost(enumeration="field_info::Format", tag="1")]
1130    pub format: i32,
1131    /// The type(s) that the annotated, generic field may represent.
1132    ///
1133    /// Currently, this must only be used on fields of type `google.protobuf.Any`.
1134    /// Supporting other generic types may be considered in the future.
1135    #[prost(message, repeated, tag="2")]
1136    pub referenced_types: ::prost::alloc::vec::Vec<TypeReference>,
1137}
1138/// Nested message and enum types in `FieldInfo`.
1139pub mod field_info {
1140    /// The standard format of a field value. The supported formats are all backed
1141    /// by either an RFC defined by the IETF or a Google-defined AIP.
1142    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1143    #[repr(i32)]
1144    pub enum Format {
1145        /// Default, unspecified value.
1146        Unspecified = 0,
1147        /// Universally Unique Identifier, version 4, value as defined by
1148        /// <https://datatracker.ietf.org/doc/html/rfc4122.> The value may be
1149        /// normalized to entirely lowercase letters. For example, the value
1150        /// `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to
1151        /// `f47ac10b-58cc-0372-8567-0e02b2c3d479`.
1152        Uuid4 = 1,
1153        /// Internet Protocol v4 value as defined by [RFC
1154        /// 791](<https://datatracker.ietf.org/doc/html/rfc791>). The value may be
1155        /// condensed, with leading zeros in each octet stripped. For example,
1156        /// `001.022.233.040` would be condensed to `1.22.233.40`.
1157        Ipv4 = 2,
1158        /// Internet Protocol v6 value as defined by [RFC
1159        /// 2460](<https://datatracker.ietf.org/doc/html/rfc2460>). The value may be
1160        /// normalized to entirely lowercase letters with zeros compressed, following
1161        /// [RFC 5952](<https://datatracker.ietf.org/doc/html/rfc5952>). For example,
1162        /// the value `2001:0DB8:0::0` would be normalized to `2001:db8::`.
1163        Ipv6 = 3,
1164        /// An IP address in either v4 or v6 format as described by the individual
1165        /// values defined herein. See the comments on the IPV4 and IPV6 types for
1166        /// allowed normalizations of each.
1167        Ipv4OrIpv6 = 4,
1168    }
1169    impl Format {
1170        /// String value of the enum field names used in the ProtoBuf definition.
1171        ///
1172        /// The values are not transformed in any way and thus are considered stable
1173        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1174        pub fn as_str_name(&self) -> &'static str {
1175            match self {
1176                Format::Unspecified => "FORMAT_UNSPECIFIED",
1177                Format::Uuid4 => "UUID4",
1178                Format::Ipv4 => "IPV4",
1179                Format::Ipv6 => "IPV6",
1180                Format::Ipv4OrIpv6 => "IPV4_OR_IPV6",
1181            }
1182        }
1183        /// Creates an enum from field names used in the ProtoBuf definition.
1184        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1185            match value {
1186                "FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
1187                "UUID4" => Some(Self::Uuid4),
1188                "IPV4" => Some(Self::Ipv4),
1189                "IPV6" => Some(Self::Ipv6),
1190                "IPV4_OR_IPV6" => Some(Self::Ipv4OrIpv6),
1191                _ => None,
1192            }
1193        }
1194    }
1195}
1196/// A reference to a message type, for use in \[FieldInfo][google.api.FieldInfo\].
1197#[allow(clippy::derive_partial_eq_without_eq)]
1198#[derive(Clone, PartialEq, ::prost::Message)]
1199pub struct TypeReference {
1200    /// The name of the type that the annotated, generic field may represent.
1201    /// If the type is in the same protobuf package, the value can be the simple
1202    /// message name e.g., `"MyMessage"`. Otherwise, the value must be the
1203    /// fully-qualified message name e.g., `"google.library.v1.Book"`.
1204    ///
1205    /// If the type(s) are unknown to the service (e.g. the field accepts generic
1206    /// user input), use the wildcard `"*"` to denote this behavior.
1207    ///
1208    /// See \[AIP-202\](<https://google.aip.dev/202#type-references>) for more details.
1209    #[prost(string, tag="1")]
1210    pub type_name: ::prost::alloc::string::String,
1211}
1212/// Message that represents an arbitrary HTTP body. It should only be used for
1213/// payload formats that can't be represented as JSON, such as raw binary or
1214/// an HTML page.
1215///
1216///
1217/// This message can be used both in streaming and non-streaming API methods in
1218/// the request as well as the response.
1219///
1220/// It can be used as a top-level request field, which is convenient if one
1221/// wants to extract parameters from either the URL or HTTP template into the
1222/// request fields and also want access to the raw HTTP body.
1223///
1224/// Example:
1225///
1226///      message GetResourceRequest {
1227///        // A unique request id.
1228///        string request_id = 1;
1229///
1230///        // The raw HTTP body is bound to this field.
1231///        google.api.HttpBody http_body = 2;
1232///
1233///      }
1234///
1235///      service ResourceService {
1236///        rpc GetResource(GetResourceRequest)
1237///          returns (google.api.HttpBody);
1238///        rpc UpdateResource(google.api.HttpBody)
1239///          returns (google.protobuf.Empty);
1240///
1241///      }
1242///
1243/// Example with streaming methods:
1244///
1245///      service CaldavService {
1246///        rpc GetCalendar(stream google.api.HttpBody)
1247///          returns (stream google.api.HttpBody);
1248///        rpc UpdateCalendar(stream google.api.HttpBody)
1249///          returns (stream google.api.HttpBody);
1250///
1251///      }
1252///
1253/// Use of this type only changes how the request and response bodies are
1254/// handled, all other features will continue to work unchanged.
1255#[allow(clippy::derive_partial_eq_without_eq)]
1256#[derive(Clone, PartialEq, ::prost::Message)]
1257pub struct HttpBody {
1258    /// The HTTP Content-Type header value specifying the content type of the body.
1259    #[prost(string, tag="1")]
1260    pub content_type: ::prost::alloc::string::String,
1261    /// The HTTP request/response body as raw binary.
1262    #[prost(bytes="vec", tag="2")]
1263    pub data: ::prost::alloc::vec::Vec<u8>,
1264    /// Application specific response metadata. Must be set in the first response
1265    /// for streaming APIs.
1266    #[prost(message, repeated, tag="3")]
1267    pub extensions: ::prost::alloc::vec::Vec<::prost_types::Any>,
1268}
1269/// A simple descriptor of a resource type.
1270///
1271/// ResourceDescriptor annotates a resource message (either by means of a
1272/// protobuf annotation or use in the service config), and associates the
1273/// resource's schema, the resource type, and the pattern of the resource name.
1274///
1275/// Example:
1276///
1277///      message Topic {
1278///        // Indicates this message defines a resource schema.
1279///        // Declares the resource type in the format of {service}/{kind}.
1280///        // For Kubernetes resources, the format is {api group}/{kind}.
1281///        option (google.api.resource) = {
1282///          type: "pubsub.googleapis.com/Topic"
1283///          pattern: "projects/{project}/topics/{topic}"
1284///        };
1285///      }
1286///
1287/// The ResourceDescriptor Yaml config will look like:
1288///
1289///      resources:
1290///      - type: "pubsub.googleapis.com/Topic"
1291///        pattern: "projects/{project}/topics/{topic}"
1292///
1293/// Sometimes, resources have multiple patterns, typically because they can
1294/// live under multiple parents.
1295///
1296/// Example:
1297///
1298///      message LogEntry {
1299///        option (google.api.resource) = {
1300///          type: "logging.googleapis.com/LogEntry"
1301///          pattern: "projects/{project}/logs/{log}"
1302///          pattern: "folders/{folder}/logs/{log}"
1303///          pattern: "organizations/{organization}/logs/{log}"
1304///          pattern: "billingAccounts/{billing_account}/logs/{log}"
1305///        };
1306///      }
1307///
1308/// The ResourceDescriptor Yaml config will look like:
1309///
1310///      resources:
1311///      - type: 'logging.googleapis.com/LogEntry'
1312///        pattern: "projects/{project}/logs/{log}"
1313///        pattern: "folders/{folder}/logs/{log}"
1314///        pattern: "organizations/{organization}/logs/{log}"
1315///        pattern: "billingAccounts/{billing_account}/logs/{log}"
1316#[allow(clippy::derive_partial_eq_without_eq)]
1317#[derive(Clone, PartialEq, ::prost::Message)]
1318pub struct ResourceDescriptor {
1319    /// The resource type. It must be in the format of
1320    /// {service_name}/{resource_type_kind}. The `resource_type_kind` must be
1321    /// singular and must not include version numbers.
1322    ///
1323    /// Example: `storage.googleapis.com/Bucket`
1324    ///
1325    /// The value of the resource_type_kind must follow the regular expression
1326    /// /\[A-Za-z][a-zA-Z0-9\]+/. It should start with an upper case character and
1327    /// should use PascalCase (UpperCamelCase). The maximum number of
1328    /// characters allowed for the `resource_type_kind` is 100.
1329    #[prost(string, tag="1")]
1330    pub r#type: ::prost::alloc::string::String,
1331    /// Optional. The relative resource name pattern associated with this resource
1332    /// type. The DNS prefix of the full resource name shouldn't be specified here.
1333    ///
1334    /// The path pattern must follow the syntax, which aligns with HTTP binding
1335    /// syntax:
1336    ///
1337    ///      Template = Segment { "/" Segment } ;
1338    ///      Segment = LITERAL | Variable ;
1339    ///      Variable = "{" LITERAL "}" ;
1340    ///
1341    /// Examples:
1342    ///
1343    ///      - "projects/{project}/topics/{topic}"
1344    ///      - "projects/{project}/knowledgeBases/{knowledge_base}"
1345    ///
1346    /// The components in braces correspond to the IDs for each resource in the
1347    /// hierarchy. It is expected that, if multiple patterns are provided,
1348    /// the same component name (e.g. "project") refers to IDs of the same
1349    /// type of resource.
1350    #[prost(string, repeated, tag="2")]
1351    pub pattern: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1352    /// Optional. The field on the resource that designates the resource name
1353    /// field. If omitted, this is assumed to be "name".
1354    #[prost(string, tag="3")]
1355    pub name_field: ::prost::alloc::string::String,
1356    /// Optional. The historical or future-looking state of the resource pattern.
1357    ///
1358    /// Example:
1359    ///
1360    ///      // The InspectTemplate message originally only supported resource
1361    ///      // names with organization, and project was added later.
1362    ///      message InspectTemplate {
1363    ///        option (google.api.resource) = {
1364    ///          type: "dlp.googleapis.com/InspectTemplate"
1365    ///          pattern:
1366    ///          "organizations/{organization}/inspectTemplates/{inspect_template}"
1367    ///          pattern: "projects/{project}/inspectTemplates/{inspect_template}"
1368    ///          history: ORIGINALLY_SINGLE_PATTERN
1369    ///        };
1370    ///      }
1371    #[prost(enumeration="resource_descriptor::History", tag="4")]
1372    pub history: i32,
1373    /// The plural name used in the resource name and permission names, such as
1374    /// 'projects' for the resource name of 'projects/{project}' and the permission
1375    /// name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
1376    /// to this is for Nested Collections that have stuttering names, as defined
1377    /// in \[AIP-122\](<https://google.aip.dev/122#nested-collections>), where the
1378    /// collection ID in the resource name pattern does not necessarily directly
1379    /// match the `plural` value.
1380    ///
1381    /// It is the same concept of the `plural` field in k8s CRD spec
1382    /// <https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/>
1383    ///
1384    /// Note: The plural form is required even for singleton resources. See
1385    /// <https://aip.dev/156>
1386    #[prost(string, tag="5")]
1387    pub plural: ::prost::alloc::string::String,
1388    /// The same concept of the `singular` field in k8s CRD spec
1389    /// <https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/>
1390    /// Such as "project" for the `resourcemanager.googleapis.com/Project` type.
1391    #[prost(string, tag="6")]
1392    pub singular: ::prost::alloc::string::String,
1393    /// Style flag(s) for this resource.
1394    /// These indicate that a resource is expected to conform to a given
1395    /// style. See the specific style flags for additional information.
1396    #[prost(enumeration="resource_descriptor::Style", repeated, tag="10")]
1397    pub style: ::prost::alloc::vec::Vec<i32>,
1398}
1399/// Nested message and enum types in `ResourceDescriptor`.
1400pub mod resource_descriptor {
1401    /// A description of the historical or future-looking state of the
1402    /// resource pattern.
1403    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1404    #[repr(i32)]
1405    pub enum History {
1406        /// The "unset" value.
1407        Unspecified = 0,
1408        /// The resource originally had one pattern and launched as such, and
1409        /// additional patterns were added later.
1410        OriginallySinglePattern = 1,
1411        /// The resource has one pattern, but the API owner expects to add more
1412        /// later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
1413        /// that from being necessary once there are multiple patterns.)
1414        FutureMultiPattern = 2,
1415    }
1416    impl History {
1417        /// String value of the enum field names used in the ProtoBuf definition.
1418        ///
1419        /// The values are not transformed in any way and thus are considered stable
1420        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1421        pub fn as_str_name(&self) -> &'static str {
1422            match self {
1423                History::Unspecified => "HISTORY_UNSPECIFIED",
1424                History::OriginallySinglePattern => "ORIGINALLY_SINGLE_PATTERN",
1425                History::FutureMultiPattern => "FUTURE_MULTI_PATTERN",
1426            }
1427        }
1428        /// Creates an enum from field names used in the ProtoBuf definition.
1429        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1430            match value {
1431                "HISTORY_UNSPECIFIED" => Some(Self::Unspecified),
1432                "ORIGINALLY_SINGLE_PATTERN" => Some(Self::OriginallySinglePattern),
1433                "FUTURE_MULTI_PATTERN" => Some(Self::FutureMultiPattern),
1434                _ => None,
1435            }
1436        }
1437    }
1438    /// A flag representing a specific style that a resource claims to conform to.
1439    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1440    #[repr(i32)]
1441    pub enum Style {
1442        /// The unspecified value. Do not use.
1443        Unspecified = 0,
1444        /// This resource is intended to be "declarative-friendly".
1445        ///
1446        /// Declarative-friendly resources must be more strictly consistent, and
1447        /// setting this to true communicates to tools that this resource should
1448        /// adhere to declarative-friendly expectations.
1449        ///
1450        /// Note: This is used by the API linter (linter.aip.dev) to enable
1451        /// additional checks.
1452        DeclarativeFriendly = 1,
1453    }
1454    impl Style {
1455        /// String value of the enum field names used in the ProtoBuf definition.
1456        ///
1457        /// The values are not transformed in any way and thus are considered stable
1458        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1459        pub fn as_str_name(&self) -> &'static str {
1460            match self {
1461                Style::Unspecified => "STYLE_UNSPECIFIED",
1462                Style::DeclarativeFriendly => "DECLARATIVE_FRIENDLY",
1463            }
1464        }
1465        /// Creates an enum from field names used in the ProtoBuf definition.
1466        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1467            match value {
1468                "STYLE_UNSPECIFIED" => Some(Self::Unspecified),
1469                "DECLARATIVE_FRIENDLY" => Some(Self::DeclarativeFriendly),
1470                _ => None,
1471            }
1472        }
1473    }
1474}
1475/// Defines a proto annotation that describes a string field that refers to
1476/// an API resource.
1477#[allow(clippy::derive_partial_eq_without_eq)]
1478#[derive(Clone, PartialEq, ::prost::Message)]
1479pub struct ResourceReference {
1480    /// The resource type that the annotated field references.
1481    ///
1482    /// Example:
1483    ///
1484    ///      message Subscription {
1485    ///        string topic = 2 [(google.api.resource_reference) = {
1486    ///          type: "pubsub.googleapis.com/Topic"
1487    ///        }];
1488    ///      }
1489    ///
1490    /// Occasionally, a field may reference an arbitrary resource. In this case,
1491    /// APIs use the special value * in their resource reference.
1492    ///
1493    /// Example:
1494    ///
1495    ///      message GetIamPolicyRequest {
1496    ///        string resource = 2 [(google.api.resource_reference) = {
1497    ///          type: "*"
1498    ///        }];
1499    ///      }
1500    #[prost(string, tag="1")]
1501    pub r#type: ::prost::alloc::string::String,
1502    /// The resource type of a child collection that the annotated field
1503    /// references. This is useful for annotating the `parent` field that
1504    /// doesn't have a fixed resource type.
1505    ///
1506    /// Example:
1507    ///
1508    ///      message ListLogEntriesRequest {
1509    ///        string parent = 1 [(google.api.resource_reference) = {
1510    ///          child_type: "logging.googleapis.com/LogEntry"
1511    ///        };
1512    ///      }
1513    #[prost(string, tag="2")]
1514    pub child_type: ::prost::alloc::string::String,
1515}
1516/// Specifies the routing information that should be sent along with the request
1517/// in the form of routing header.
1518/// **NOTE:** All service configuration rules follow the "last one wins" order.
1519///
1520/// The examples below will apply to an RPC which has the following request type:
1521///
1522/// Message Definition:
1523///
1524///      message Request {
1525///        // The name of the Table
1526///        // Values can be of the following formats:
1527///        // - `projects/<project>/tables/<table>`
1528///        // - `projects/<project>/instances/<instance>/tables/<table>`
1529///        // - `region/<region>/zones/<zone>/tables/<table>`
1530///        string table_name = 1;
1531///
1532///        // This value specifies routing for replication.
1533///        // It can be in the following formats:
1534///        // - `profiles/<profile_id>`
1535///        // - a legacy `profile_id` that can be any string
1536///        string app_profile_id = 2;
1537///      }
1538///
1539/// Example message:
1540///
1541///      {
1542///        table_name: projects/proj_foo/instances/instance_bar/table/table_baz,
1543///        app_profile_id: profiles/prof_qux
1544///      }
1545///
1546/// The routing header consists of one or multiple key-value pairs. The order of
1547/// the key-value pairs is undefined, the order of the `routing_parameters` in
1548/// the `RoutingRule` only matters for the evaluation order of the path
1549/// templates when `field` is the same. See the examples below for more details.
1550///
1551/// Every key and value in the routing header must be percent-encoded,
1552/// and joined together in the following format: `key1=value1&key2=value2`.
1553/// The examples below skip the percent-encoding for readability.
1554///
1555/// Example 1
1556///
1557/// Extracting a field from the request to put into the routing header
1558/// unchanged, with the key equal to the field name.
1559///
1560/// annotation:
1561///
1562///      option (google.api.routing) = {
1563///        // Take the `app_profile_id`.
1564///        routing_parameters {
1565///          field: "app_profile_id"
1566///        }
1567///      };
1568///
1569/// result:
1570///
1571///      x-goog-request-params: app_profile_id=profiles/prof_qux
1572///
1573/// Example 2
1574///
1575/// Extracting a field from the request to put into the routing header
1576/// unchanged, with the key different from the field name.
1577///
1578/// annotation:
1579///
1580///      option (google.api.routing) = {
1581///        // Take the `app_profile_id`, but name it `routing_id` in the header.
1582///        routing_parameters {
1583///          field: "app_profile_id"
1584///          path_template: "{routing_id=**}"
1585///        }
1586///      };
1587///
1588/// result:
1589///
1590///      x-goog-request-params: routing_id=profiles/prof_qux
1591///
1592/// Example 3
1593///
1594/// Extracting a field from the request to put into the routing
1595/// header, while matching a path template syntax on the field's value.
1596///
1597/// NB: it is more useful to send nothing than to send garbage for the purpose
1598/// of dynamic routing, since garbage pollutes cache. Thus the matching.
1599///
1600/// Sub-example 3a
1601///
1602/// The field matches the template.
1603///
1604/// annotation:
1605///
1606///      option (google.api.routing) = {
1607///        // Take the `table_name`, if it's well-formed (with project-based
1608///        // syntax).
1609///        routing_parameters {
1610///          field: "table_name"
1611///          path_template: "{table_name=projects/*/instances/*/**}"
1612///        }
1613///      };
1614///
1615/// result:
1616///
1617///      x-goog-request-params:
1618///      table_name=projects/proj_foo/instances/instance_bar/table/table_baz
1619///
1620/// Sub-example 3b
1621///
1622/// The field does not match the template.
1623///
1624/// annotation:
1625///
1626///      option (google.api.routing) = {
1627///        // Take the `table_name`, if it's well-formed (with region-based
1628///        // syntax).
1629///        routing_parameters {
1630///          field: "table_name"
1631///          path_template: "{table_name=regions/*/zones/*/**}"
1632///        }
1633///      };
1634///
1635/// result:
1636///
1637///      <no routing header will be sent>
1638///
1639/// Sub-example 3c
1640///
1641/// Multiple alternative conflictingly named path templates are
1642/// specified. The one that matches is used to construct the header.
1643///
1644/// annotation:
1645///
1646///      option (google.api.routing) = {
1647///        // Take the `table_name`, if it's well-formed, whether
1648///        // using the region- or projects-based syntax.
1649///
1650///        routing_parameters {
1651///          field: "table_name"
1652///          path_template: "{table_name=regions/*/zones/*/**}"
1653///        }
1654///        routing_parameters {
1655///          field: "table_name"
1656///          path_template: "{table_name=projects/*/instances/*/**}"
1657///        }
1658///      };
1659///
1660/// result:
1661///
1662///      x-goog-request-params:
1663///      table_name=projects/proj_foo/instances/instance_bar/table/table_baz
1664///
1665/// Example 4
1666///
1667/// Extracting a single routing header key-value pair by matching a
1668/// template syntax on (a part of) a single request field.
1669///
1670/// annotation:
1671///
1672///      option (google.api.routing) = {
1673///        // Take just the project id from the `table_name` field.
1674///        routing_parameters {
1675///          field: "table_name"
1676///          path_template: "{routing_id=projects/*}/**"
1677///        }
1678///      };
1679///
1680/// result:
1681///
1682///      x-goog-request-params: routing_id=projects/proj_foo
1683///
1684/// Example 5
1685///
1686/// Extracting a single routing header key-value pair by matching
1687/// several conflictingly named path templates on (parts of) a single request
1688/// field. The last template to match "wins" the conflict.
1689///
1690/// annotation:
1691///
1692///      option (google.api.routing) = {
1693///        // If the `table_name` does not have instances information,
1694///        // take just the project id for routing.
1695///        // Otherwise take project + instance.
1696///
1697///        routing_parameters {
1698///          field: "table_name"
1699///          path_template: "{routing_id=projects/*}/**"
1700///        }
1701///        routing_parameters {
1702///          field: "table_name"
1703///          path_template: "{routing_id=projects/*/instances/*}/**"
1704///        }
1705///      };
1706///
1707/// result:
1708///
1709///      x-goog-request-params:
1710///      routing_id=projects/proj_foo/instances/instance_bar
1711///
1712/// Example 6
1713///
1714/// Extracting multiple routing header key-value pairs by matching
1715/// several non-conflicting path templates on (parts of) a single request field.
1716///
1717/// Sub-example 6a
1718///
1719/// Make the templates strict, so that if the `table_name` does not
1720/// have an instance information, nothing is sent.
1721///
1722/// annotation:
1723///
1724///      option (google.api.routing) = {
1725///        // The routing code needs two keys instead of one composite
1726///        // but works only for the tables with the "project-instance" name
1727///        // syntax.
1728///
1729///        routing_parameters {
1730///          field: "table_name"
1731///          path_template: "{project_id=projects/*}/instances/*/**"
1732///        }
1733///        routing_parameters {
1734///          field: "table_name"
1735///          path_template: "projects/*/{instance_id=instances/*}/**"
1736///        }
1737///      };
1738///
1739/// result:
1740///
1741///      x-goog-request-params:
1742///      project_id=projects/proj_foo&instance_id=instances/instance_bar
1743///
1744/// Sub-example 6b
1745///
1746/// Make the templates loose, so that if the `table_name` does not
1747/// have an instance information, just the project id part is sent.
1748///
1749/// annotation:
1750///
1751///      option (google.api.routing) = {
1752///        // The routing code wants two keys instead of one composite
1753///        // but will work with just the `project_id` for tables without
1754///        // an instance in the `table_name`.
1755///
1756///        routing_parameters {
1757///          field: "table_name"
1758///          path_template: "{project_id=projects/*}/**"
1759///        }
1760///        routing_parameters {
1761///          field: "table_name"
1762///          path_template: "projects/*/{instance_id=instances/*}/**"
1763///        }
1764///      };
1765///
1766/// result (is the same as 6a for our example message because it has the instance
1767/// information):
1768///
1769///      x-goog-request-params:
1770///      project_id=projects/proj_foo&instance_id=instances/instance_bar
1771///
1772/// Example 7
1773///
1774/// Extracting multiple routing header key-value pairs by matching
1775/// several path templates on multiple request fields.
1776///
1777/// NB: note that here there is no way to specify sending nothing if one of the
1778/// fields does not match its template. E.g. if the `table_name` is in the wrong
1779/// format, the `project_id` will not be sent, but the `routing_id` will be.
1780/// The backend routing code has to be aware of that and be prepared to not
1781/// receive a full complement of keys if it expects multiple.
1782///
1783/// annotation:
1784///
1785///      option (google.api.routing) = {
1786///        // The routing needs both `project_id` and `routing_id`
1787///        // (from the `app_profile_id` field) for routing.
1788///
1789///        routing_parameters {
1790///          field: "table_name"
1791///          path_template: "{project_id=projects/*}/**"
1792///        }
1793///        routing_parameters {
1794///          field: "app_profile_id"
1795///          path_template: "{routing_id=**}"
1796///        }
1797///      };
1798///
1799/// result:
1800///
1801///      x-goog-request-params:
1802///      project_id=projects/proj_foo&routing_id=profiles/prof_qux
1803///
1804/// Example 8
1805///
1806/// Extracting a single routing header key-value pair by matching
1807/// several conflictingly named path templates on several request fields. The
1808/// last template to match "wins" the conflict.
1809///
1810/// annotation:
1811///
1812///      option (google.api.routing) = {
1813///        // The `routing_id` can be a project id or a region id depending on
1814///        // the table name format, but only if the `app_profile_id` is not set.
1815///        // If `app_profile_id` is set it should be used instead.
1816///
1817///        routing_parameters {
1818///          field: "table_name"
1819///          path_template: "{routing_id=projects/*}/**"
1820///        }
1821///        routing_parameters {
1822///           field: "table_name"
1823///           path_template: "{routing_id=regions/*}/**"
1824///        }
1825///        routing_parameters {
1826///          field: "app_profile_id"
1827///          path_template: "{routing_id=**}"
1828///        }
1829///      };
1830///
1831/// result:
1832///
1833///      x-goog-request-params: routing_id=profiles/prof_qux
1834///
1835/// Example 9
1836///
1837/// Bringing it all together.
1838///
1839/// annotation:
1840///
1841///      option (google.api.routing) = {
1842///        // For routing both `table_location` and a `routing_id` are needed.
1843///        //
1844///        // table_location can be either an instance id or a region+zone id.
1845///        //
1846///        // For `routing_id`, take the value of `app_profile_id`
1847///        // - If it's in the format `profiles/<profile_id>`, send
1848///        // just the `<profile_id>` part.
1849///        // - If it's any other literal, send it as is.
1850///        // If the `app_profile_id` is empty, and the `table_name` starts with
1851///        // the project_id, send that instead.
1852///
1853///        routing_parameters {
1854///          field: "table_name"
1855///          path_template: "projects/*/{table_location=instances/*}/tables/*"
1856///        }
1857///        routing_parameters {
1858///          field: "table_name"
1859///          path_template: "{table_location=regions/*/zones/*}/tables/*"
1860///        }
1861///        routing_parameters {
1862///          field: "table_name"
1863///          path_template: "{routing_id=projects/*}/**"
1864///        }
1865///        routing_parameters {
1866///          field: "app_profile_id"
1867///          path_template: "{routing_id=**}"
1868///        }
1869///        routing_parameters {
1870///          field: "app_profile_id"
1871///          path_template: "profiles/{routing_id=*}"
1872///        }
1873///      };
1874///
1875/// result:
1876///
1877///      x-goog-request-params:
1878///      table_location=instances/instance_bar&routing_id=prof_qux
1879#[allow(clippy::derive_partial_eq_without_eq)]
1880#[derive(Clone, PartialEq, ::prost::Message)]
1881pub struct RoutingRule {
1882    /// A collection of Routing Parameter specifications.
1883    /// **NOTE:** If multiple Routing Parameters describe the same key
1884    /// (via the `path_template` field or via the `field` field when
1885    /// `path_template` is not provided), "last one wins" rule
1886    /// determines which Parameter gets used.
1887    /// See the examples for more details.
1888    #[prost(message, repeated, tag="2")]
1889    pub routing_parameters: ::prost::alloc::vec::Vec<RoutingParameter>,
1890}
1891/// A projection from an input message to the GRPC or REST header.
1892#[allow(clippy::derive_partial_eq_without_eq)]
1893#[derive(Clone, PartialEq, ::prost::Message)]
1894pub struct RoutingParameter {
1895    /// A request field to extract the header key-value pair from.
1896    #[prost(string, tag="1")]
1897    pub field: ::prost::alloc::string::String,
1898    /// A pattern matching the key-value field. Optional.
1899    /// If not specified, the whole field specified in the `field` field will be
1900    /// taken as value, and its name used as key. If specified, it MUST contain
1901    /// exactly one named segment (along with any number of unnamed segments) The
1902    /// pattern will be matched over the field specified in the `field` field, then
1903    /// if the match is successful:
1904    /// - the name of the single named segment will be used as a header name,
1905    /// - the match value of the segment will be used as a header value;
1906    /// if the match is NOT successful, nothing will be sent.
1907    ///
1908    /// Example:
1909    ///
1910    ///                -- This is a field in the request message
1911    ///               |   that the header value will be extracted from.
1912    ///               |
1913    ///               |                     -- This is the key name in the
1914    ///               |                    |   routing header.
1915    ///               V                    |
1916    ///      field: "table_name"           v
1917    ///      path_template: "projects/*/{table_location=instances/*}/tables/*"
1918    ///                                                 ^            ^
1919    ///                                                 |            |
1920    ///        In the {} brackets is the pattern that --             |
1921    ///        specifies what to extract from the                    |
1922    ///        field as a value to be sent.                          |
1923    ///                                                              |
1924    ///       The string in the field must match the whole pattern --
1925    ///       before brackets, inside brackets, after brackets.
1926    ///
1927    /// When looking at this specific example, we can see that:
1928    /// - A key-value pair with the key `table_location`
1929    ///    and the value matching `instances/*` should be added
1930    ///    to the x-goog-request-params routing header.
1931    /// - The value is extracted from the request message's `table_name` field
1932    ///    if it matches the full pattern specified:
1933    ///    `projects/*/instances/*/tables/*`.
1934    ///
1935    /// **NB:** If the `path_template` field is not provided, the key name is
1936    /// equal to the field name, and the whole field should be sent as a value.
1937    /// This makes the pattern for the field and the value functionally equivalent
1938    /// to `**`, and the configuration
1939    ///
1940    ///      {
1941    ///        field: "table_name"
1942    ///      }
1943    ///
1944    /// is a functionally equivalent shorthand to:
1945    ///
1946    ///      {
1947    ///        field: "table_name"
1948    ///        path_template: "{table_name=**}"
1949    ///      }
1950    ///
1951    /// See Example 1 for more details.
1952    #[prost(string, tag="2")]
1953    pub path_template: ::prost::alloc::string::String,
1954}
1955/// `Visibility` restricts service consumer's access to service elements,
1956/// such as whether an application can call a visibility-restricted method.
1957/// The restriction is expressed by applying visibility labels on service
1958/// elements. The visibility labels are elsewhere linked to service consumers.
1959///
1960/// A service can define multiple visibility labels, but a service consumer
1961/// should be granted at most one visibility label. Multiple visibility
1962/// labels for a single service consumer are not supported.
1963///
1964/// If an element and all its parents have no visibility label, its visibility
1965/// is unconditionally granted.
1966///
1967/// Example:
1968///
1969///      visibility:
1970///        rules:
1971///        - selector: google.calendar.Calendar.EnhancedSearch
1972///          restriction: PREVIEW
1973///        - selector: google.calendar.Calendar.Delegate
1974///          restriction: INTERNAL
1975///
1976/// Here, all methods are publicly visible except for the restricted methods
1977/// EnhancedSearch and Delegate.
1978#[allow(clippy::derive_partial_eq_without_eq)]
1979#[derive(Clone, PartialEq, ::prost::Message)]
1980pub struct Visibility {
1981    /// A list of visibility rules that apply to individual API elements.
1982    ///
1983    /// **NOTE:** All service configuration rules follow "last one wins" order.
1984    #[prost(message, repeated, tag="1")]
1985    pub rules: ::prost::alloc::vec::Vec<VisibilityRule>,
1986}
1987/// A visibility rule provides visibility configuration for an individual API
1988/// element.
1989#[allow(clippy::derive_partial_eq_without_eq)]
1990#[derive(Clone, PartialEq, ::prost::Message)]
1991pub struct VisibilityRule {
1992    /// Selects methods, messages, fields, enums, etc. to which this rule applies.
1993    ///
1994    /// Refer to \[selector][google.api.DocumentationRule.selector\] for syntax
1995    /// details.
1996    #[prost(string, tag="1")]
1997    pub selector: ::prost::alloc::string::String,
1998    /// A comma-separated list of visibility labels that apply to the `selector`.
1999    /// Any of the listed labels can be used to grant the visibility.
2000    ///
2001    /// If a rule has multiple labels, removing one of the labels but not all of
2002    /// them can break clients.
2003    ///
2004    /// Example:
2005    ///
2006    ///      visibility:
2007    ///        rules:
2008    ///        - selector: google.calendar.Calendar.EnhancedSearch
2009    ///          restriction: INTERNAL, PREVIEW
2010    ///
2011    /// Removing INTERNAL from this restriction will break clients that rely on
2012    /// this method and only had access to it through INTERNAL.
2013    #[prost(string, tag="2")]
2014    pub restriction: ::prost::alloc::string::String,
2015}
2016// @@protoc_insertion_point(module)