googleapis_tonic_google_api/vec_u8_hash_map/
google.api.rs

1// This file is @generated by prost-build.
2/// An indicator of the behavior of a given field (for example, that a field
3/// is required in requests, or given as output but ignored as input).
4/// This **does not** change the behavior in protocol buffers itself; it only
5/// denotes the behavior and may affect how API tooling handles the field.
6///
7/// Note: This enum **may** receive new values in the future.
8#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
9#[repr(i32)]
10pub enum FieldBehavior {
11    /// Conventional default for enums. Do not use this.
12    Unspecified = 0,
13    /// Specifically denotes a field as optional.
14    /// While all fields in protocol buffers are optional, this may be specified
15    /// for emphasis if appropriate.
16    Optional = 1,
17    /// Denotes a field as required.
18    /// This indicates that the field **must** be provided as part of the request,
19    /// and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
20    Required = 2,
21    /// Denotes a field as output only.
22    /// This indicates that the field is provided in responses, but including the
23    /// field in a request does nothing (the server *must* ignore it and
24    /// *must not* throw an error as a result of the field's presence).
25    OutputOnly = 3,
26    /// Denotes a field as input only.
27    /// This indicates that the field is provided in requests, and the
28    /// corresponding field is not included in output.
29    InputOnly = 4,
30    /// Denotes a field as immutable.
31    /// This indicates that the field may be set once in a request to create a
32    /// resource, but may not be changed thereafter.
33    Immutable = 5,
34    /// Denotes that a (repeated) field is an unordered list.
35    /// This indicates that the service may provide the elements of the list
36    /// in any arbitrary  order, rather than the order the user originally
37    /// provided. Additionally, the list's order may or may not be stable.
38    UnorderedList = 6,
39    /// Denotes that this field returns a non-empty default value if not set.
40    /// This indicates that if the user provides the empty value in a request,
41    /// a non-empty value will be returned. The user will not be aware of what
42    /// non-empty value to expect.
43    NonEmptyDefault = 7,
44    /// Denotes that the field in a resource (a message annotated with
45    /// google.api.resource) is used in the resource name to uniquely identify the
46    /// resource. For AIP-compliant APIs, this should only be applied to the
47    /// `name` field on the resource.
48    ///
49    /// This behavior should not be applied to references to other resources within
50    /// the message.
51    ///
52    /// The identifier field of resources often have different field behavior
53    /// depending on the request it is embedded in (e.g. for Create methods name
54    /// is optional and unused, while for Update methods it is required). Instead
55    /// of method-specific annotations, only `IDENTIFIER` is required.
56    Identifier = 8,
57}
58impl FieldBehavior {
59    /// String value of the enum field names used in the ProtoBuf definition.
60    ///
61    /// The values are not transformed in any way and thus are considered stable
62    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
63    pub fn as_str_name(&self) -> &'static str {
64        match self {
65            Self::Unspecified => "FIELD_BEHAVIOR_UNSPECIFIED",
66            Self::Optional => "OPTIONAL",
67            Self::Required => "REQUIRED",
68            Self::OutputOnly => "OUTPUT_ONLY",
69            Self::InputOnly => "INPUT_ONLY",
70            Self::Immutable => "IMMUTABLE",
71            Self::UnorderedList => "UNORDERED_LIST",
72            Self::NonEmptyDefault => "NON_EMPTY_DEFAULT",
73            Self::Identifier => "IDENTIFIER",
74        }
75    }
76    /// Creates an enum from field names used in the ProtoBuf definition.
77    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
78        match value {
79            "FIELD_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
80            "OPTIONAL" => Some(Self::Optional),
81            "REQUIRED" => Some(Self::Required),
82            "OUTPUT_ONLY" => Some(Self::OutputOnly),
83            "INPUT_ONLY" => Some(Self::InputOnly),
84            "IMMUTABLE" => Some(Self::Immutable),
85            "UNORDERED_LIST" => Some(Self::UnorderedList),
86            "NON_EMPTY_DEFAULT" => Some(Self::NonEmptyDefault),
87            "IDENTIFIER" => Some(Self::Identifier),
88            _ => None,
89        }
90    }
91}
92/// A simple descriptor of a resource type.
93///
94/// ResourceDescriptor annotates a resource message (either by means of a
95/// protobuf annotation or use in the service config), and associates the
96/// resource's schema, the resource type, and the pattern of the resource name.
97///
98/// Example:
99///
100///      message Topic {
101///        // Indicates this message defines a resource schema.
102///        // Declares the resource type in the format of {service}/{kind}.
103///        // For Kubernetes resources, the format is {api group}/{kind}.
104///        option (google.api.resource) = {
105///          type: "pubsub.googleapis.com/Topic"
106///          pattern: "projects/{project}/topics/{topic}"
107///        };
108///      }
109///
110/// The ResourceDescriptor Yaml config will look like:
111///
112///      resources:
113///      - type: "pubsub.googleapis.com/Topic"
114///        pattern: "projects/{project}/topics/{topic}"
115///
116/// Sometimes, resources have multiple patterns, typically because they can
117/// live under multiple parents.
118///
119/// Example:
120///
121///      message LogEntry {
122///        option (google.api.resource) = {
123///          type: "logging.googleapis.com/LogEntry"
124///          pattern: "projects/{project}/logs/{log}"
125///          pattern: "folders/{folder}/logs/{log}"
126///          pattern: "organizations/{organization}/logs/{log}"
127///          pattern: "billingAccounts/{billing_account}/logs/{log}"
128///        };
129///      }
130///
131/// The ResourceDescriptor Yaml config will look like:
132///
133///      resources:
134///      - type: 'logging.googleapis.com/LogEntry'
135///        pattern: "projects/{project}/logs/{log}"
136///        pattern: "folders/{folder}/logs/{log}"
137///        pattern: "organizations/{organization}/logs/{log}"
138///        pattern: "billingAccounts/{billing_account}/logs/{log}"
139#[derive(Clone, PartialEq, ::prost::Message)]
140pub struct ResourceDescriptor {
141    /// The resource type. It must be in the format of
142    /// {service_name}/{resource_type_kind}. The `resource_type_kind` must be
143    /// singular and must not include version numbers.
144    ///
145    /// Example: `storage.googleapis.com/Bucket`
146    ///
147    /// The value of the resource_type_kind must follow the regular expression
148    /// /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
149    /// should use PascalCase (UpperCamelCase). The maximum number of
150    /// characters allowed for the `resource_type_kind` is 100.
151    #[prost(string, tag = "1")]
152    pub r#type: ::prost::alloc::string::String,
153    /// Optional. The relative resource name pattern associated with this resource
154    /// type. The DNS prefix of the full resource name shouldn't be specified here.
155    ///
156    /// The path pattern must follow the syntax, which aligns with HTTP binding
157    /// syntax:
158    ///
159    ///      Template = Segment { "/" Segment } ;
160    ///      Segment = LITERAL | Variable ;
161    ///      Variable = "{" LITERAL "}" ;
162    ///
163    /// Examples:
164    ///
165    ///      - "projects/{project}/topics/{topic}"
166    ///      - "projects/{project}/knowledgeBases/{knowledge_base}"
167    ///
168    /// The components in braces correspond to the IDs for each resource in the
169    /// hierarchy. It is expected that, if multiple patterns are provided,
170    /// the same component name (e.g. "project") refers to IDs of the same
171    /// type of resource.
172    #[prost(string, repeated, tag = "2")]
173    pub pattern: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
174    /// Optional. The field on the resource that designates the resource name
175    /// field. If omitted, this is assumed to be "name".
176    #[prost(string, tag = "3")]
177    pub name_field: ::prost::alloc::string::String,
178    /// Optional. The historical or future-looking state of the resource pattern.
179    ///
180    /// Example:
181    ///
182    ///      // The InspectTemplate message originally only supported resource
183    ///      // names with organization, and project was added later.
184    ///      message InspectTemplate {
185    ///        option (google.api.resource) = {
186    ///          type: "dlp.googleapis.com/InspectTemplate"
187    ///          pattern:
188    ///          "organizations/{organization}/inspectTemplates/{inspect_template}"
189    ///          pattern: "projects/{project}/inspectTemplates/{inspect_template}"
190    ///          history: ORIGINALLY_SINGLE_PATTERN
191    ///        };
192    ///      }
193    #[prost(enumeration = "resource_descriptor::History", tag = "4")]
194    pub history: i32,
195    /// The plural name used in the resource name and permission names, such as
196    /// 'projects' for the resource name of 'projects/{project}' and the permission
197    /// name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
198    /// to this is for Nested Collections that have stuttering names, as defined
199    /// in [AIP-122](<https://google.aip.dev/122#nested-collections>), where the
200    /// collection ID in the resource name pattern does not necessarily directly
201    /// match the `plural` value.
202    ///
203    /// It is the same concept of the `plural` field in k8s CRD spec
204    /// <https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/>
205    ///
206    /// Note: The plural form is required even for singleton resources. See
207    /// <https://aip.dev/156>
208    #[prost(string, tag = "5")]
209    pub plural: ::prost::alloc::string::String,
210    /// The same concept of the `singular` field in k8s CRD spec
211    /// <https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/>
212    /// Such as "project" for the `resourcemanager.googleapis.com/Project` type.
213    #[prost(string, tag = "6")]
214    pub singular: ::prost::alloc::string::String,
215    /// Style flag(s) for this resource.
216    /// These indicate that a resource is expected to conform to a given
217    /// style. See the specific style flags for additional information.
218    #[prost(enumeration = "resource_descriptor::Style", repeated, tag = "10")]
219    pub style: ::prost::alloc::vec::Vec<i32>,
220}
221/// Nested message and enum types in `ResourceDescriptor`.
222pub mod resource_descriptor {
223    /// A description of the historical or future-looking state of the
224    /// resource pattern.
225    #[derive(
226        Clone,
227        Copy,
228        Debug,
229        PartialEq,
230        Eq,
231        Hash,
232        PartialOrd,
233        Ord,
234        ::prost::Enumeration
235    )]
236    #[repr(i32)]
237    pub enum History {
238        /// The "unset" value.
239        Unspecified = 0,
240        /// The resource originally had one pattern and launched as such, and
241        /// additional patterns were added later.
242        OriginallySinglePattern = 1,
243        /// The resource has one pattern, but the API owner expects to add more
244        /// later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
245        /// that from being necessary once there are multiple patterns.)
246        FutureMultiPattern = 2,
247    }
248    impl History {
249        /// String value of the enum field names used in the ProtoBuf definition.
250        ///
251        /// The values are not transformed in any way and thus are considered stable
252        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
253        pub fn as_str_name(&self) -> &'static str {
254            match self {
255                Self::Unspecified => "HISTORY_UNSPECIFIED",
256                Self::OriginallySinglePattern => "ORIGINALLY_SINGLE_PATTERN",
257                Self::FutureMultiPattern => "FUTURE_MULTI_PATTERN",
258            }
259        }
260        /// Creates an enum from field names used in the ProtoBuf definition.
261        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
262            match value {
263                "HISTORY_UNSPECIFIED" => Some(Self::Unspecified),
264                "ORIGINALLY_SINGLE_PATTERN" => Some(Self::OriginallySinglePattern),
265                "FUTURE_MULTI_PATTERN" => Some(Self::FutureMultiPattern),
266                _ => None,
267            }
268        }
269    }
270    /// A flag representing a specific style that a resource claims to conform to.
271    #[derive(
272        Clone,
273        Copy,
274        Debug,
275        PartialEq,
276        Eq,
277        Hash,
278        PartialOrd,
279        Ord,
280        ::prost::Enumeration
281    )]
282    #[repr(i32)]
283    pub enum Style {
284        /// The unspecified value. Do not use.
285        Unspecified = 0,
286        /// This resource is intended to be "declarative-friendly".
287        ///
288        /// Declarative-friendly resources must be more strictly consistent, and
289        /// setting this to true communicates to tools that this resource should
290        /// adhere to declarative-friendly expectations.
291        ///
292        /// Note: This is used by the API linter (linter.aip.dev) to enable
293        /// additional checks.
294        DeclarativeFriendly = 1,
295    }
296    impl Style {
297        /// String value of the enum field names used in the ProtoBuf definition.
298        ///
299        /// The values are not transformed in any way and thus are considered stable
300        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
301        pub fn as_str_name(&self) -> &'static str {
302            match self {
303                Self::Unspecified => "STYLE_UNSPECIFIED",
304                Self::DeclarativeFriendly => "DECLARATIVE_FRIENDLY",
305            }
306        }
307        /// Creates an enum from field names used in the ProtoBuf definition.
308        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
309            match value {
310                "STYLE_UNSPECIFIED" => Some(Self::Unspecified),
311                "DECLARATIVE_FRIENDLY" => Some(Self::DeclarativeFriendly),
312                _ => None,
313            }
314        }
315    }
316}
317/// Defines a proto annotation that describes a string field that refers to
318/// an API resource.
319#[derive(Clone, PartialEq, ::prost::Message)]
320pub struct ResourceReference {
321    /// The resource type that the annotated field references.
322    ///
323    /// Example:
324    ///
325    ///      message Subscription {
326    ///        string topic = 2 [(google.api.resource_reference) = {
327    ///          type: "pubsub.googleapis.com/Topic"
328    ///        }];
329    ///      }
330    ///
331    /// Occasionally, a field may reference an arbitrary resource. In this case,
332    /// APIs use the special value * in their resource reference.
333    ///
334    /// Example:
335    ///
336    ///      message GetIamPolicyRequest {
337    ///        string resource = 2 [(google.api.resource_reference) = {
338    ///          type: "*"
339    ///        }];
340    ///      }
341    #[prost(string, tag = "1")]
342    pub r#type: ::prost::alloc::string::String,
343    /// The resource type of a child collection that the annotated field
344    /// references. This is useful for annotating the `parent` field that
345    /// doesn't have a fixed resource type.
346    ///
347    /// Example:
348    ///
349    ///      message ListLogEntriesRequest {
350    ///        string parent = 1 [(google.api.resource_reference) = {
351    ///          child_type: "logging.googleapis.com/LogEntry"
352    ///        };
353    ///      }
354    #[prost(string, tag = "2")]
355    pub child_type: ::prost::alloc::string::String,
356}
357/// Defines the HTTP configuration for an API service. It contains a list of
358/// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
359/// to one or more HTTP REST API methods.
360#[derive(Clone, PartialEq, ::prost::Message)]
361pub struct Http {
362    /// A list of HTTP configuration rules that apply to individual API methods.
363    ///
364    /// **NOTE:** All service configuration rules follow "last one wins" order.
365    #[prost(message, repeated, tag = "1")]
366    pub rules: ::prost::alloc::vec::Vec<HttpRule>,
367    /// When set to true, URL path parameters will be fully URI-decoded except in
368    /// cases of single segment matches in reserved expansion, where "%2F" will be
369    /// left encoded.
370    ///
371    /// The default behavior is to not decode RFC 6570 reserved characters in multi
372    /// segment matches.
373    #[prost(bool, tag = "2")]
374    pub fully_decode_reserved_expansion: bool,
375}
376/// gRPC Transcoding
377///
378/// gRPC Transcoding is a feature for mapping between a gRPC method and one or
379/// more HTTP REST endpoints. It allows developers to build a single API service
380/// that supports both gRPC APIs and REST APIs. Many systems, including [Google
381/// APIs](<https://github.com/googleapis/googleapis>),
382/// [Cloud Endpoints](<https://cloud.google.com/endpoints>), [gRPC
383/// Gateway](<https://github.com/grpc-ecosystem/grpc-gateway>),
384/// and [Envoy](<https://github.com/envoyproxy/envoy>) proxy support this feature
385/// and use it for large scale production services.
386///
387/// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
388/// how different portions of the gRPC request message are mapped to the URL
389/// path, URL query parameters, and HTTP request body. It also controls how the
390/// gRPC response message is mapped to the HTTP response body. `HttpRule` is
391/// typically specified as an `google.api.http` annotation on the gRPC method.
392///
393/// Each mapping specifies a URL path template and an HTTP method. The path
394/// template may refer to one or more fields in the gRPC request message, as long
395/// as each field is a non-repeated field with a primitive (non-message) type.
396/// The path template controls how fields of the request message are mapped to
397/// the URL path.
398///
399/// Example:
400///
401///      service Messaging {
402///        rpc GetMessage(GetMessageRequest) returns (Message) {
403///          option (google.api.http) = {
404///              get: "/v1/{name=messages/*}"
405///          };
406///        }
407///      }
408///      message GetMessageRequest {
409///        string name = 1; // Mapped to URL path.
410///      }
411///      message Message {
412///        string text = 1; // The resource content.
413///      }
414///
415/// This enables an HTTP REST to gRPC mapping as below:
416///
417/// - HTTP: `GET /v1/messages/123456`
418/// - gRPC: `GetMessage(name: "messages/123456")`
419///
420/// Any fields in the request message which are not bound by the path template
421/// automatically become HTTP query parameters if there is no HTTP request body.
422/// For example:
423///
424///      service Messaging {
425///        rpc GetMessage(GetMessageRequest) returns (Message) {
426///          option (google.api.http) = {
427///              get:"/v1/messages/{message_id}"
428///          };
429///        }
430///      }
431///      message GetMessageRequest {
432///        message SubMessage {
433///          string subfield = 1;
434///        }
435///        string message_id = 1; // Mapped to URL path.
436///        int64 revision = 2;    // Mapped to URL query parameter `revision`.
437///        SubMessage sub = 3;    // Mapped to URL query parameter `sub.subfield`.
438///      }
439///
440/// This enables a HTTP JSON to RPC mapping as below:
441///
442/// - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
443/// - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
444/// SubMessage(subfield: "foo"))`
445///
446/// Note that fields which are mapped to URL query parameters must have a
447/// primitive type or a repeated primitive type or a non-repeated message type.
448/// In the case of a repeated type, the parameter can be repeated in the URL
449/// as `...?param=A&param=B`. In the case of a message type, each field of the
450/// message is mapped to a separate parameter, such as
451/// `...?foo.a=A&foo.b=B&foo.c=C`.
452///
453/// For HTTP methods that allow a request body, the `body` field
454/// specifies the mapping. Consider a REST update method on the
455/// message resource collection:
456///
457///      service Messaging {
458///        rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
459///          option (google.api.http) = {
460///            patch: "/v1/messages/{message_id}"
461///            body: "message"
462///          };
463///        }
464///      }
465///      message UpdateMessageRequest {
466///        string message_id = 1; // mapped to the URL
467///        Message message = 2;   // mapped to the body
468///      }
469///
470/// The following HTTP JSON to RPC mapping is enabled, where the
471/// representation of the JSON in the request body is determined by
472/// protos JSON encoding:
473///
474/// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
475/// - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
476///
477/// The special name `*` can be used in the body mapping to define that
478/// every field not bound by the path template should be mapped to the
479/// request body.  This enables the following alternative definition of
480/// the update method:
481///
482///      service Messaging {
483///        rpc UpdateMessage(Message) returns (Message) {
484///          option (google.api.http) = {
485///            patch: "/v1/messages/{message_id}"
486///            body: "*"
487///          };
488///        }
489///      }
490///      message Message {
491///        string message_id = 1;
492///        string text = 2;
493///      }
494///
495///
496/// The following HTTP JSON to RPC mapping is enabled:
497///
498/// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
499/// - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
500///
501/// Note that when using `*` in the body mapping, it is not possible to
502/// have HTTP parameters, as all fields not bound by the path end in
503/// the body. This makes this option more rarely used in practice when
504/// defining REST APIs. The common usage of `*` is in custom methods
505/// which don't use the URL at all for transferring data.
506///
507/// It is possible to define multiple HTTP methods for one RPC by using
508/// the `additional_bindings` option. Example:
509///
510///      service Messaging {
511///        rpc GetMessage(GetMessageRequest) returns (Message) {
512///          option (google.api.http) = {
513///            get: "/v1/messages/{message_id}"
514///            additional_bindings {
515///              get: "/v1/users/{user_id}/messages/{message_id}"
516///            }
517///          };
518///        }
519///      }
520///      message GetMessageRequest {
521///        string message_id = 1;
522///        string user_id = 2;
523///      }
524///
525/// This enables the following two alternative HTTP JSON to RPC mappings:
526///
527/// - HTTP: `GET /v1/messages/123456`
528/// - gRPC: `GetMessage(message_id: "123456")`
529///
530/// - HTTP: `GET /v1/users/me/messages/123456`
531/// - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
532///
533/// Rules for HTTP mapping
534///
535/// 1. Leaf request fields (recursive expansion nested messages in the request
536///     message) are classified into three categories:
537///     - Fields referred by the path template. They are passed via the URL path.
538///     - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
539///     are passed via the HTTP
540///       request body.
541///     - All other fields are passed via the URL query parameters, and the
542///       parameter name is the field path in the request message. A repeated
543///       field can be represented as multiple query parameters under the same
544///       name.
545///   2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
546///   query parameter, all fields
547///      are passed via URL path and HTTP request body.
548///   3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
549///   request body, all
550///      fields are passed via URL path and URL query parameters.
551///
552/// Path template syntax
553///
554///      Template = "/" Segments \[ Verb \] ;
555///      Segments = Segment { "/" Segment } ;
556///      Segment  = "*" | "**" | LITERAL | Variable ;
557///      Variable = "{" FieldPath \[ "=" Segments \] "}" ;
558///      FieldPath = IDENT { "." IDENT } ;
559///      Verb     = ":" LITERAL ;
560///
561/// The syntax `*` matches a single URL path segment. The syntax `**` matches
562/// zero or more URL path segments, which must be the last part of the URL path
563/// except the `Verb`.
564///
565/// The syntax `Variable` matches part of the URL path as specified by its
566/// template. A variable template must not contain other variables. If a variable
567/// matches a single path segment, its template may be omitted, e.g. `{var}`
568/// is equivalent to `{var=*}`.
569///
570/// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
571/// contains any reserved character, such characters should be percent-encoded
572/// before the matching.
573///
574/// If a variable contains exactly one path segment, such as `"{var}"` or
575/// `"{var=*}"`, when such a variable is expanded into a URL path on the client
576/// side, all characters except `\[-_.~0-9a-zA-Z\]` are percent-encoded. The
577/// server side does the reverse decoding. Such variables show up in the
578/// [Discovery
579/// Document](<https://developers.google.com/discovery/v1/reference/apis>) as
580/// `{var}`.
581///
582/// If a variable contains multiple path segments, such as `"{var=foo/*}"`
583/// or `"{var=**}"`, when such a variable is expanded into a URL path on the
584/// client side, all characters except `\[-_.~/0-9a-zA-Z\]` are percent-encoded.
585/// The server side does the reverse decoding, except "%2F" and "%2f" are left
586/// unchanged. Such variables show up in the
587/// [Discovery
588/// Document](<https://developers.google.com/discovery/v1/reference/apis>) as
589/// `{+var}`.
590///
591/// Using gRPC API Service Configuration
592///
593/// gRPC API Service Configuration (service config) is a configuration language
594/// for configuring a gRPC service to become a user-facing product. The
595/// service config is simply the YAML representation of the `google.api.Service`
596/// proto message.
597///
598/// As an alternative to annotating your proto file, you can configure gRPC
599/// transcoding in your service config YAML files. You do this by specifying a
600/// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
601/// effect as the proto annotation. This can be particularly useful if you
602/// have a proto that is reused in multiple services. Note that any transcoding
603/// specified in the service config will override any matching transcoding
604/// configuration in the proto.
605///
606/// The following example selects a gRPC method and applies an `HttpRule` to it:
607///
608///      http:
609///        rules:
610///          - selector: example.v1.Messaging.GetMessage
611///            get: /v1/messages/{message_id}/{sub.subfield}
612///
613/// Special notes
614///
615/// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
616/// proto to JSON conversion must follow the [proto3
617/// specification](<https://developers.google.com/protocol-buffers/docs/proto3#json>).
618///
619/// While the single segment variable follows the semantics of
620/// [RFC 6570](<https://tools.ietf.org/html/rfc6570>) Section 3.2.2 Simple String
621/// Expansion, the multi segment variable **does not** follow RFC 6570 Section
622/// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
623/// does not expand special characters like `?` and `#`, which would lead
624/// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
625/// for multi segment variables.
626///
627/// The path variables **must not** refer to any repeated or mapped field,
628/// because client libraries are not capable of handling such variable expansion.
629///
630/// The path variables **must not** capture the leading "/" character. The reason
631/// is that the most common use case "{var}" does not capture the leading "/"
632/// character. For consistency, all path variables must share the same behavior.
633///
634/// Repeated message fields must not be mapped to URL query parameters, because
635/// no client library can support such complicated mapping.
636///
637/// If an API needs to use a JSON array for request or response body, it can map
638/// the request or response body to a repeated field. However, some gRPC
639/// Transcoding implementations may not support this feature.
640#[derive(Clone, PartialEq, ::prost::Message)]
641pub struct HttpRule {
642    /// Selects a method to which this rule applies.
643    ///
644    /// Refer to [selector][google.api.DocumentationRule.selector] for syntax
645    /// details.
646    #[prost(string, tag = "1")]
647    pub selector: ::prost::alloc::string::String,
648    /// The name of the request field whose value is mapped to the HTTP request
649    /// body, or `*` for mapping all request fields not captured by the path
650    /// pattern to the HTTP body, or omitted for not having any HTTP request body.
651    ///
652    /// NOTE: the referred field must be present at the top-level of the request
653    /// message type.
654    #[prost(string, tag = "7")]
655    pub body: ::prost::alloc::string::String,
656    /// Optional. The name of the response field whose value is mapped to the HTTP
657    /// response body. When omitted, the entire response message will be used
658    /// as the HTTP response body.
659    ///
660    /// NOTE: The referred field must be present at the top-level of the response
661    /// message type.
662    #[prost(string, tag = "12")]
663    pub response_body: ::prost::alloc::string::String,
664    /// Additional HTTP bindings for the selector. Nested bindings must
665    /// not contain an `additional_bindings` field themselves (that is,
666    /// the nesting may only be one level deep).
667    #[prost(message, repeated, tag = "11")]
668    pub additional_bindings: ::prost::alloc::vec::Vec<HttpRule>,
669    /// Determines the URL pattern is matched by this rules. This pattern can be
670    /// used with any of the {get|put|post|delete|patch} methods. A custom method
671    /// can be defined using the 'custom' field.
672    #[prost(oneof = "http_rule::Pattern", tags = "2, 3, 4, 5, 6, 8")]
673    pub pattern: ::core::option::Option<http_rule::Pattern>,
674}
675/// Nested message and enum types in `HttpRule`.
676pub mod http_rule {
677    /// Determines the URL pattern is matched by this rules. This pattern can be
678    /// used with any of the {get|put|post|delete|patch} methods. A custom method
679    /// can be defined using the 'custom' field.
680    #[derive(Clone, PartialEq, ::prost::Oneof)]
681    pub enum Pattern {
682        /// Maps to HTTP GET. Used for listing and getting information about
683        /// resources.
684        #[prost(string, tag = "2")]
685        Get(::prost::alloc::string::String),
686        /// Maps to HTTP PUT. Used for replacing a resource.
687        #[prost(string, tag = "3")]
688        Put(::prost::alloc::string::String),
689        /// Maps to HTTP POST. Used for creating a resource or performing an action.
690        #[prost(string, tag = "4")]
691        Post(::prost::alloc::string::String),
692        /// Maps to HTTP DELETE. Used for deleting a resource.
693        #[prost(string, tag = "5")]
694        Delete(::prost::alloc::string::String),
695        /// Maps to HTTP PATCH. Used for updating a resource.
696        #[prost(string, tag = "6")]
697        Patch(::prost::alloc::string::String),
698        /// The custom pattern is used for specifying an HTTP method that is not
699        /// included in the `pattern` field, such as HEAD, or "*" to leave the
700        /// HTTP method unspecified for this rule. The wild-card rule is useful
701        /// for services that provide content to Web (HTML) clients.
702        #[prost(message, tag = "8")]
703        Custom(super::CustomHttpPattern),
704    }
705}
706/// A custom pattern is used for defining custom HTTP verb.
707#[derive(Clone, PartialEq, ::prost::Message)]
708pub struct CustomHttpPattern {
709    /// The name of this custom HTTP verb.
710    #[prost(string, tag = "1")]
711    pub kind: ::prost::alloc::string::String,
712    /// The path matched by this custom verb.
713    #[prost(string, tag = "2")]
714    pub path: ::prost::alloc::string::String,
715}
716/// The launch stage as defined by [Google Cloud Platform
717/// Launch Stages](<https://cloud.google.com/terms/launch-stages>).
718#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
719#[repr(i32)]
720pub enum LaunchStage {
721    /// Do not use this default value.
722    Unspecified = 0,
723    /// The feature is not yet implemented. Users can not use it.
724    Unimplemented = 6,
725    /// Prelaunch features are hidden from users and are only visible internally.
726    Prelaunch = 7,
727    /// Early Access features are limited to a closed group of testers. To use
728    /// these features, you must sign up in advance and sign a Trusted Tester
729    /// agreement (which includes confidentiality provisions). These features may
730    /// be unstable, changed in backward-incompatible ways, and are not
731    /// guaranteed to be released.
732    EarlyAccess = 1,
733    /// Alpha is a limited availability test for releases before they are cleared
734    /// for widespread use. By Alpha, all significant design issues are resolved
735    /// and we are in the process of verifying functionality. Alpha customers
736    /// need to apply for access, agree to applicable terms, and have their
737    /// projects allowlisted. Alpha releases don't have to be feature complete,
738    /// no SLAs are provided, and there are no technical support obligations, but
739    /// they will be far enough along that customers can actually use them in
740    /// test environments or for limited-use tests -- just like they would in
741    /// normal production cases.
742    Alpha = 2,
743    /// Beta is the point at which we are ready to open a release for any
744    /// customer to use. There are no SLA or technical support obligations in a
745    /// Beta release. Products will be complete from a feature perspective, but
746    /// may have some open outstanding issues. Beta releases are suitable for
747    /// limited production use cases.
748    Beta = 3,
749    /// GA features are open to all developers and are considered stable and
750    /// fully qualified for production use.
751    Ga = 4,
752    /// Deprecated features are scheduled to be shut down and removed. For more
753    /// information, see the "Deprecation Policy" section of our [Terms of
754    /// Service](<https://cloud.google.com/terms/>)
755    /// and the [Google Cloud Platform Subject to the Deprecation
756    /// Policy](<https://cloud.google.com/terms/deprecation>) documentation.
757    Deprecated = 5,
758}
759impl LaunchStage {
760    /// String value of the enum field names used in the ProtoBuf definition.
761    ///
762    /// The values are not transformed in any way and thus are considered stable
763    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
764    pub fn as_str_name(&self) -> &'static str {
765        match self {
766            Self::Unspecified => "LAUNCH_STAGE_UNSPECIFIED",
767            Self::Unimplemented => "UNIMPLEMENTED",
768            Self::Prelaunch => "PRELAUNCH",
769            Self::EarlyAccess => "EARLY_ACCESS",
770            Self::Alpha => "ALPHA",
771            Self::Beta => "BETA",
772            Self::Ga => "GA",
773            Self::Deprecated => "DEPRECATED",
774        }
775    }
776    /// Creates an enum from field names used in the ProtoBuf definition.
777    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
778        match value {
779            "LAUNCH_STAGE_UNSPECIFIED" => Some(Self::Unspecified),
780            "UNIMPLEMENTED" => Some(Self::Unimplemented),
781            "PRELAUNCH" => Some(Self::Prelaunch),
782            "EARLY_ACCESS" => Some(Self::EarlyAccess),
783            "ALPHA" => Some(Self::Alpha),
784            "BETA" => Some(Self::Beta),
785            "GA" => Some(Self::Ga),
786            "DEPRECATED" => Some(Self::Deprecated),
787            _ => None,
788        }
789    }
790}
791/// Required information for every language.
792#[derive(Clone, PartialEq, ::prost::Message)]
793pub struct CommonLanguageSettings {
794    /// Link to automatically generated reference documentation.  Example:
795    /// <https://cloud.google.com/nodejs/docs/reference/asset/latest>
796    #[deprecated]
797    #[prost(string, tag = "1")]
798    pub reference_docs_uri: ::prost::alloc::string::String,
799    /// The destination where API teams want this client library to be published.
800    #[prost(enumeration = "ClientLibraryDestination", repeated, tag = "2")]
801    pub destinations: ::prost::alloc::vec::Vec<i32>,
802    /// Configuration for which RPCs should be generated in the GAPIC client.
803    #[prost(message, optional, tag = "3")]
804    pub selective_gapic_generation: ::core::option::Option<SelectiveGapicGeneration>,
805}
806/// Details about how and where to publish client libraries.
807#[derive(Clone, PartialEq, ::prost::Message)]
808pub struct ClientLibrarySettings {
809    /// Version of the API to apply these settings to. This is the full protobuf
810    /// package for the API, ending in the version element.
811    /// Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
812    #[prost(string, tag = "1")]
813    pub version: ::prost::alloc::string::String,
814    /// Launch stage of this version of the API.
815    #[prost(enumeration = "LaunchStage", tag = "2")]
816    pub launch_stage: i32,
817    /// When using transport=rest, the client request will encode enums as
818    /// numbers rather than strings.
819    #[prost(bool, tag = "3")]
820    pub rest_numeric_enums: bool,
821    /// Settings for legacy Java features, supported in the Service YAML.
822    #[prost(message, optional, tag = "21")]
823    pub java_settings: ::core::option::Option<JavaSettings>,
824    /// Settings for C++ client libraries.
825    #[prost(message, optional, tag = "22")]
826    pub cpp_settings: ::core::option::Option<CppSettings>,
827    /// Settings for PHP client libraries.
828    #[prost(message, optional, tag = "23")]
829    pub php_settings: ::core::option::Option<PhpSettings>,
830    /// Settings for Python client libraries.
831    #[prost(message, optional, tag = "24")]
832    pub python_settings: ::core::option::Option<PythonSettings>,
833    /// Settings for Node client libraries.
834    #[prost(message, optional, tag = "25")]
835    pub node_settings: ::core::option::Option<NodeSettings>,
836    /// Settings for .NET client libraries.
837    #[prost(message, optional, tag = "26")]
838    pub dotnet_settings: ::core::option::Option<DotnetSettings>,
839    /// Settings for Ruby client libraries.
840    #[prost(message, optional, tag = "27")]
841    pub ruby_settings: ::core::option::Option<RubySettings>,
842    /// Settings for Go client libraries.
843    #[prost(message, optional, tag = "28")]
844    pub go_settings: ::core::option::Option<GoSettings>,
845}
846/// This message configures the settings for publishing [Google Cloud Client
847/// libraries](<https://cloud.google.com/apis/docs/cloud-client-libraries>)
848/// generated from the service config.
849#[derive(Clone, PartialEq, ::prost::Message)]
850pub struct Publishing {
851    /// A list of API method settings, e.g. the behavior for methods that use the
852    /// long-running operation pattern.
853    #[prost(message, repeated, tag = "2")]
854    pub method_settings: ::prost::alloc::vec::Vec<MethodSettings>,
855    /// Link to a *public* URI where users can report issues.  Example:
856    /// <https://issuetracker.google.com/issues/new?component=190865&template=1161103>
857    #[prost(string, tag = "101")]
858    pub new_issue_uri: ::prost::alloc::string::String,
859    /// Link to product home page.  Example:
860    /// <https://cloud.google.com/asset-inventory/docs/overview>
861    #[prost(string, tag = "102")]
862    pub documentation_uri: ::prost::alloc::string::String,
863    /// Used as a tracking tag when collecting data about the APIs developer
864    /// relations artifacts like docs, packages delivered to package managers,
865    /// etc.  Example: "speech".
866    #[prost(string, tag = "103")]
867    pub api_short_name: ::prost::alloc::string::String,
868    /// GitHub label to apply to issues and pull requests opened for this API.
869    #[prost(string, tag = "104")]
870    pub github_label: ::prost::alloc::string::String,
871    /// GitHub teams to be added to CODEOWNERS in the directory in GitHub
872    /// containing source code for the client libraries for this API.
873    #[prost(string, repeated, tag = "105")]
874    pub codeowner_github_teams: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
875    /// A prefix used in sample code when demarking regions to be included in
876    /// documentation.
877    #[prost(string, tag = "106")]
878    pub doc_tag_prefix: ::prost::alloc::string::String,
879    /// For whom the client library is being published.
880    #[prost(enumeration = "ClientLibraryOrganization", tag = "107")]
881    pub organization: i32,
882    /// Client library settings.  If the same version string appears multiple
883    /// times in this list, then the last one wins.  Settings from earlier
884    /// settings with the same version string are discarded.
885    #[prost(message, repeated, tag = "109")]
886    pub library_settings: ::prost::alloc::vec::Vec<ClientLibrarySettings>,
887    /// Optional link to proto reference documentation.  Example:
888    /// <https://cloud.google.com/pubsub/lite/docs/reference/rpc>
889    #[prost(string, tag = "110")]
890    pub proto_reference_documentation_uri: ::prost::alloc::string::String,
891    /// Optional link to REST reference documentation.  Example:
892    /// <https://cloud.google.com/pubsub/lite/docs/reference/rest>
893    #[prost(string, tag = "111")]
894    pub rest_reference_documentation_uri: ::prost::alloc::string::String,
895}
896/// Settings for Java client libraries.
897#[derive(Clone, PartialEq, ::prost::Message)]
898pub struct JavaSettings {
899    /// The package name to use in Java. Clobbers the java_package option
900    /// set in the protobuf. This should be used **only** by APIs
901    /// who have already set the language_settings.java.package_name" field
902    /// in gapic.yaml. API teams should use the protobuf java_package option
903    /// where possible.
904    ///
905    /// Example of a YAML configuration::
906    ///
907    ///   publishing:
908    ///     java_settings:
909    ///       library_package: com.google.cloud.pubsub.v1
910    #[prost(string, tag = "1")]
911    pub library_package: ::prost::alloc::string::String,
912    /// Configure the Java class name to use instead of the service's for its
913    /// corresponding generated GAPIC client. Keys are fully-qualified
914    /// service names as they appear in the protobuf (including the full
915    /// the language_settings.java.interface_names" field in gapic.yaml. API
916    /// teams should otherwise use the service name as it appears in the
917    /// protobuf.
918    ///
919    /// Example of a YAML configuration::
920    ///
921    ///   publishing:
922    ///     java_settings:
923    ///       service_class_names:
924    ///         - google.pubsub.v1.Publisher: TopicAdmin
925    ///         - google.pubsub.v1.Subscriber: SubscriptionAdmin
926    #[prost(map = "string, string", tag = "2")]
927    pub service_class_names: ::std::collections::HashMap<
928        ::prost::alloc::string::String,
929        ::prost::alloc::string::String,
930    >,
931    /// Some settings.
932    #[prost(message, optional, tag = "3")]
933    pub common: ::core::option::Option<CommonLanguageSettings>,
934}
935/// Settings for C++ client libraries.
936#[derive(Clone, PartialEq, ::prost::Message)]
937pub struct CppSettings {
938    /// Some settings.
939    #[prost(message, optional, tag = "1")]
940    pub common: ::core::option::Option<CommonLanguageSettings>,
941}
942/// Settings for Php client libraries.
943#[derive(Clone, PartialEq, ::prost::Message)]
944pub struct PhpSettings {
945    /// Some settings.
946    #[prost(message, optional, tag = "1")]
947    pub common: ::core::option::Option<CommonLanguageSettings>,
948}
949/// Settings for Python client libraries.
950#[derive(Clone, PartialEq, ::prost::Message)]
951pub struct PythonSettings {
952    /// Some settings.
953    #[prost(message, optional, tag = "1")]
954    pub common: ::core::option::Option<CommonLanguageSettings>,
955    /// Experimental features to be included during client library generation.
956    #[prost(message, optional, tag = "2")]
957    pub experimental_features: ::core::option::Option<
958        python_settings::ExperimentalFeatures,
959    >,
960}
961/// Nested message and enum types in `PythonSettings`.
962pub mod python_settings {
963    /// Experimental features to be included during client library generation.
964    /// These fields will be deprecated once the feature graduates and is enabled
965    /// by default.
966    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
967    pub struct ExperimentalFeatures {
968        /// Enables generation of asynchronous REST clients if `rest` transport is
969        /// enabled. By default, asynchronous REST clients will not be generated.
970        /// This feature will be enabled by default 1 month after launching the
971        /// feature in preview packages.
972        #[prost(bool, tag = "1")]
973        pub rest_async_io_enabled: bool,
974        /// Enables generation of protobuf code using new types that are more
975        /// Pythonic which are included in `protobuf>=5.29.x`. This feature will be
976        /// enabled by default 1 month after launching the feature in preview
977        /// packages.
978        #[prost(bool, tag = "2")]
979        pub protobuf_pythonic_types_enabled: bool,
980        /// Disables generation of an unversioned Python package for this client
981        /// library. This means that the module names will need to be versioned in
982        /// import statements. For example `import google.cloud.library_v2` instead
983        /// of `import google.cloud.library`.
984        #[prost(bool, tag = "3")]
985        pub unversioned_package_disabled: bool,
986    }
987}
988/// Settings for Node client libraries.
989#[derive(Clone, PartialEq, ::prost::Message)]
990pub struct NodeSettings {
991    /// Some settings.
992    #[prost(message, optional, tag = "1")]
993    pub common: ::core::option::Option<CommonLanguageSettings>,
994}
995/// Settings for Dotnet client libraries.
996#[derive(Clone, PartialEq, ::prost::Message)]
997pub struct DotnetSettings {
998    /// Some settings.
999    #[prost(message, optional, tag = "1")]
1000    pub common: ::core::option::Option<CommonLanguageSettings>,
1001    /// Map from original service names to renamed versions.
1002    /// This is used when the default generated types
1003    /// would cause a naming conflict. (Neither name is
1004    /// fully-qualified.)
1005    /// Example: Subscriber to SubscriberServiceApi.
1006    #[prost(map = "string, string", tag = "2")]
1007    pub renamed_services: ::std::collections::HashMap<
1008        ::prost::alloc::string::String,
1009        ::prost::alloc::string::String,
1010    >,
1011    /// Map from full resource types to the effective short name
1012    /// for the resource. This is used when otherwise resource
1013    /// named from different services would cause naming collisions.
1014    /// Example entry:
1015    /// "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
1016    #[prost(map = "string, string", tag = "3")]
1017    pub renamed_resources: ::std::collections::HashMap<
1018        ::prost::alloc::string::String,
1019        ::prost::alloc::string::String,
1020    >,
1021    /// List of full resource types to ignore during generation.
1022    /// This is typically used for API-specific Location resources,
1023    /// which should be handled by the generator as if they were actually
1024    /// the common Location resources.
1025    /// Example entry: "documentai.googleapis.com/Location"
1026    #[prost(string, repeated, tag = "4")]
1027    pub ignored_resources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1028    /// Namespaces which must be aliased in snippets due to
1029    /// a known (but non-generator-predictable) naming collision
1030    #[prost(string, repeated, tag = "5")]
1031    pub forced_namespace_aliases: ::prost::alloc::vec::Vec<
1032        ::prost::alloc::string::String,
1033    >,
1034    /// Method signatures (in the form "service.method(signature)")
1035    /// which are provided separately, so shouldn't be generated.
1036    /// Snippets *calling* these methods are still generated, however.
1037    #[prost(string, repeated, tag = "6")]
1038    pub handwritten_signatures: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1039}
1040/// Settings for Ruby client libraries.
1041#[derive(Clone, PartialEq, ::prost::Message)]
1042pub struct RubySettings {
1043    /// Some settings.
1044    #[prost(message, optional, tag = "1")]
1045    pub common: ::core::option::Option<CommonLanguageSettings>,
1046}
1047/// Settings for Go client libraries.
1048#[derive(Clone, PartialEq, ::prost::Message)]
1049pub struct GoSettings {
1050    /// Some settings.
1051    #[prost(message, optional, tag = "1")]
1052    pub common: ::core::option::Option<CommonLanguageSettings>,
1053    /// Map of service names to renamed services. Keys are the package relative
1054    /// service names and values are the name to be used for the service client
1055    /// and call options.
1056    ///
1057    /// publishing:
1058    ///    go_settings:
1059    ///      renamed_services:
1060    ///        Publisher: TopicAdmin
1061    #[prost(map = "string, string", tag = "2")]
1062    pub renamed_services: ::std::collections::HashMap<
1063        ::prost::alloc::string::String,
1064        ::prost::alloc::string::String,
1065    >,
1066}
1067/// Describes the generator configuration for a method.
1068#[derive(Clone, PartialEq, ::prost::Message)]
1069pub struct MethodSettings {
1070    /// The fully qualified name of the method, for which the options below apply.
1071    /// This is used to find the method to apply the options.
1072    ///
1073    /// Example:
1074    ///
1075    ///     publishing:
1076    ///       method_settings:
1077    ///       - selector: google.storage.control.v2.StorageControl.CreateFolder
1078    ///         # method settings for CreateFolder...
1079    #[prost(string, tag = "1")]
1080    pub selector: ::prost::alloc::string::String,
1081    /// Describes settings to use for long-running operations when generating
1082    /// API methods for RPCs. Complements RPCs that use the annotations in
1083    /// google/longrunning/operations.proto.
1084    ///
1085    /// Example of a YAML configuration::
1086    ///
1087    ///     publishing:
1088    ///       method_settings:
1089    ///       - selector: google.cloud.speech.v2.Speech.BatchRecognize
1090    ///         long_running:
1091    ///           initial_poll_delay: 60s # 1 minute
1092    ///           poll_delay_multiplier: 1.5
1093    ///           max_poll_delay: 360s # 6 minutes
1094    ///           total_poll_timeout: 54000s # 90 minutes
1095    #[prost(message, optional, tag = "2")]
1096    pub long_running: ::core::option::Option<method_settings::LongRunning>,
1097    /// List of top-level fields of the request message, that should be
1098    /// automatically populated by the client libraries based on their
1099    /// (google.api.field_info).format. Currently supported format: UUID4.
1100    ///
1101    /// Example of a YAML configuration:
1102    ///
1103    ///     publishing:
1104    ///       method_settings:
1105    ///       - selector: google.example.v1.ExampleService.CreateExample
1106    ///         auto_populated_fields:
1107    ///         - request_id
1108    #[prost(string, repeated, tag = "3")]
1109    pub auto_populated_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1110}
1111/// Nested message and enum types in `MethodSettings`.
1112pub mod method_settings {
1113    /// Describes settings to use when generating API methods that use the
1114    /// long-running operation pattern.
1115    /// All default values below are from those used in the client library
1116    /// generators (e.g.
1117    /// [Java](<https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java>)).
1118    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1119    pub struct LongRunning {
1120        /// Initial delay after which the first poll request will be made.
1121        /// Default value: 5 seconds.
1122        #[prost(message, optional, tag = "1")]
1123        pub initial_poll_delay: ::core::option::Option<::prost_types::Duration>,
1124        /// Multiplier to gradually increase delay between subsequent polls until it
1125        /// reaches max_poll_delay.
1126        /// Default value: 1.5.
1127        #[prost(float, tag = "2")]
1128        pub poll_delay_multiplier: f32,
1129        /// Maximum time between two subsequent poll requests.
1130        /// Default value: 45 seconds.
1131        #[prost(message, optional, tag = "3")]
1132        pub max_poll_delay: ::core::option::Option<::prost_types::Duration>,
1133        /// Total polling timeout.
1134        /// Default value: 5 minutes.
1135        #[prost(message, optional, tag = "4")]
1136        pub total_poll_timeout: ::core::option::Option<::prost_types::Duration>,
1137    }
1138}
1139/// This message is used to configure the generation of a subset of the RPCs in
1140/// a service for client libraries.
1141#[derive(Clone, PartialEq, ::prost::Message)]
1142pub struct SelectiveGapicGeneration {
1143    /// An allowlist of the fully qualified names of RPCs that should be included
1144    /// on public client surfaces.
1145    #[prost(string, repeated, tag = "1")]
1146    pub methods: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1147    /// Setting this to true indicates to the client generators that methods
1148    /// that would be excluded from the generation should instead be generated
1149    /// in a way that indicates these methods should not be consumed by
1150    /// end users. How this is expressed is up to individual language
1151    /// implementations to decide. Some examples may be: added annotations,
1152    /// obfuscated identifiers, or other language idiomatic patterns.
1153    #[prost(bool, tag = "2")]
1154    pub generate_omitted_as_internal: bool,
1155}
1156/// The organization for which the client libraries are being published.
1157/// Affects the url where generated docs are published, etc.
1158#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1159#[repr(i32)]
1160pub enum ClientLibraryOrganization {
1161    /// Not useful.
1162    Unspecified = 0,
1163    /// Google Cloud Platform Org.
1164    Cloud = 1,
1165    /// Ads (Advertising) Org.
1166    Ads = 2,
1167    /// Photos Org.
1168    Photos = 3,
1169    /// Street View Org.
1170    StreetView = 4,
1171    /// Shopping Org.
1172    Shopping = 5,
1173    /// Geo Org.
1174    Geo = 6,
1175    /// Generative AI - <https://developers.generativeai.google>
1176    GenerativeAi = 7,
1177}
1178impl ClientLibraryOrganization {
1179    /// String value of the enum field names used in the ProtoBuf definition.
1180    ///
1181    /// The values are not transformed in any way and thus are considered stable
1182    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1183    pub fn as_str_name(&self) -> &'static str {
1184        match self {
1185            Self::Unspecified => "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED",
1186            Self::Cloud => "CLOUD",
1187            Self::Ads => "ADS",
1188            Self::Photos => "PHOTOS",
1189            Self::StreetView => "STREET_VIEW",
1190            Self::Shopping => "SHOPPING",
1191            Self::Geo => "GEO",
1192            Self::GenerativeAi => "GENERATIVE_AI",
1193        }
1194    }
1195    /// Creates an enum from field names used in the ProtoBuf definition.
1196    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1197        match value {
1198            "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" => Some(Self::Unspecified),
1199            "CLOUD" => Some(Self::Cloud),
1200            "ADS" => Some(Self::Ads),
1201            "PHOTOS" => Some(Self::Photos),
1202            "STREET_VIEW" => Some(Self::StreetView),
1203            "SHOPPING" => Some(Self::Shopping),
1204            "GEO" => Some(Self::Geo),
1205            "GENERATIVE_AI" => Some(Self::GenerativeAi),
1206            _ => None,
1207        }
1208    }
1209}
1210/// To where should client libraries be published?
1211#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1212#[repr(i32)]
1213pub enum ClientLibraryDestination {
1214    /// Client libraries will neither be generated nor published to package
1215    /// managers.
1216    Unspecified = 0,
1217    /// Generate the client library in a repo under github.com/googleapis,
1218    /// but don't publish it to package managers.
1219    Github = 10,
1220    /// Publish the library to package managers like nuget.org and npmjs.com.
1221    PackageManager = 20,
1222}
1223impl ClientLibraryDestination {
1224    /// String value of the enum field names used in the ProtoBuf definition.
1225    ///
1226    /// The values are not transformed in any way and thus are considered stable
1227    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1228    pub fn as_str_name(&self) -> &'static str {
1229        match self {
1230            Self::Unspecified => "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED",
1231            Self::Github => "GITHUB",
1232            Self::PackageManager => "PACKAGE_MANAGER",
1233        }
1234    }
1235    /// Creates an enum from field names used in the ProtoBuf definition.
1236    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1237        match value {
1238            "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" => Some(Self::Unspecified),
1239            "GITHUB" => Some(Self::Github),
1240            "PACKAGE_MANAGER" => Some(Self::PackageManager),
1241            _ => None,
1242        }
1243    }
1244}
1245/// `Authentication` defines the authentication configuration for API methods
1246/// provided by an API service.
1247///
1248/// Example:
1249///
1250///      name: calendar.googleapis.com
1251///      authentication:
1252///        providers:
1253///        - id: google_calendar_auth
1254///          jwks_uri: <https://www.googleapis.com/oauth2/v1/certs>
1255///          issuer: <https://securetoken.google.com>
1256///        rules:
1257///        - selector: "*"
1258///          requirements:
1259///            provider_id: google_calendar_auth
1260///        - selector: google.calendar.Delegate
1261///          oauth:
1262///            canonical_scopes: <https://www.googleapis.com/auth/calendar.read>
1263#[derive(Clone, PartialEq, ::prost::Message)]
1264pub struct Authentication {
1265    /// A list of authentication rules that apply to individual API methods.
1266    ///
1267    /// **NOTE:** All service configuration rules follow "last one wins" order.
1268    #[prost(message, repeated, tag = "3")]
1269    pub rules: ::prost::alloc::vec::Vec<AuthenticationRule>,
1270    /// Defines a set of authentication providers that a service supports.
1271    #[prost(message, repeated, tag = "4")]
1272    pub providers: ::prost::alloc::vec::Vec<AuthProvider>,
1273}
1274/// Authentication rules for the service.
1275///
1276/// By default, if a method has any authentication requirements, every request
1277/// must include a valid credential matching one of the requirements.
1278/// It's an error to include more than one kind of credential in a single
1279/// request.
1280///
1281/// If a method doesn't have any auth requirements, request credentials will be
1282/// ignored.
1283#[derive(Clone, PartialEq, ::prost::Message)]
1284pub struct AuthenticationRule {
1285    /// Selects the methods to which this rule applies.
1286    ///
1287    /// Refer to [selector][google.api.DocumentationRule.selector] for syntax
1288    /// details.
1289    #[prost(string, tag = "1")]
1290    pub selector: ::prost::alloc::string::String,
1291    /// The requirements for OAuth credentials.
1292    #[prost(message, optional, tag = "2")]
1293    pub oauth: ::core::option::Option<OAuthRequirements>,
1294    /// If true, the service accepts API keys without any other credential.
1295    /// This flag only applies to HTTP and gRPC requests.
1296    #[prost(bool, tag = "5")]
1297    pub allow_without_credential: bool,
1298    /// Requirements for additional authentication providers.
1299    #[prost(message, repeated, tag = "7")]
1300    pub requirements: ::prost::alloc::vec::Vec<AuthRequirement>,
1301}
1302/// Specifies a location to extract JWT from an API request.
1303#[derive(Clone, PartialEq, ::prost::Message)]
1304pub struct JwtLocation {
1305    /// The value prefix. The value format is "value_prefix{token}"
1306    /// Only applies to "in" header type. Must be empty for "in" query type.
1307    /// If not empty, the header value has to match (case sensitive) this prefix.
1308    /// If not matched, JWT will not be extracted. If matched, JWT will be
1309    /// extracted after the prefix is removed.
1310    ///
1311    /// For example, for "Authorization: Bearer {JWT}",
1312    /// value_prefix="Bearer " with a space at the end.
1313    #[prost(string, tag = "3")]
1314    pub value_prefix: ::prost::alloc::string::String,
1315    #[prost(oneof = "jwt_location::In", tags = "1, 2, 4")]
1316    pub r#in: ::core::option::Option<jwt_location::In>,
1317}
1318/// Nested message and enum types in `JwtLocation`.
1319pub mod jwt_location {
1320    #[derive(Clone, PartialEq, ::prost::Oneof)]
1321    pub enum In {
1322        /// Specifies HTTP header name to extract JWT token.
1323        #[prost(string, tag = "1")]
1324        Header(::prost::alloc::string::String),
1325        /// Specifies URL query parameter name to extract JWT token.
1326        #[prost(string, tag = "2")]
1327        Query(::prost::alloc::string::String),
1328        /// Specifies cookie name to extract JWT token.
1329        #[prost(string, tag = "4")]
1330        Cookie(::prost::alloc::string::String),
1331    }
1332}
1333/// Configuration for an authentication provider, including support for
1334/// [JSON Web Token
1335/// (JWT)](<https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32>).
1336#[derive(Clone, PartialEq, ::prost::Message)]
1337pub struct AuthProvider {
1338    /// The unique identifier of the auth provider. It will be referred to by
1339    /// `AuthRequirement.provider_id`.
1340    ///
1341    /// Example: "bookstore_auth".
1342    #[prost(string, tag = "1")]
1343    pub id: ::prost::alloc::string::String,
1344    /// Identifies the principal that issued the JWT. See
1345    /// <https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1>
1346    /// Usually a URL or an email address.
1347    ///
1348    /// Example: <https://securetoken.google.com>
1349    /// Example: 1234567-compute@developer.gserviceaccount.com
1350    #[prost(string, tag = "2")]
1351    pub issuer: ::prost::alloc::string::String,
1352    /// URL of the provider's public key set to validate signature of the JWT. See
1353    /// [OpenID
1354    /// Discovery](<https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata>).
1355    /// Optional if the key set document:
1356    ///   - can be retrieved from
1357    ///     [OpenID
1358    ///     Discovery](<https://openid.net/specs/openid-connect-discovery-1_0.html>)
1359    ///     of the issuer.
1360    ///   - can be inferred from the email domain of the issuer (e.g. a Google
1361    ///   service account).
1362    ///
1363    /// Example: <https://www.googleapis.com/oauth2/v1/certs>
1364    #[prost(string, tag = "3")]
1365    pub jwks_uri: ::prost::alloc::string::String,
1366    /// The list of JWT
1367    /// [audiences](<https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3>).
1368    /// that are allowed to access. A JWT containing any of these audiences will
1369    /// be accepted. When this setting is absent, JWTs with audiences:
1370    ///    - "<https://\[service.name\]/[google.protobuf.Api.name]">
1371    ///    - "<https://\[service.name\]/">
1372    /// will be accepted.
1373    /// For example, if no audiences are in the setting, LibraryService API will
1374    /// accept JWTs with the following audiences:
1375    ///    -
1376    ///    <https://library-example.googleapis.com/google.example.library.v1.LibraryService>
1377    ///    - <https://library-example.googleapis.com/>
1378    ///
1379    /// Example:
1380    ///
1381    ///      audiences: bookstore_android.apps.googleusercontent.com,
1382    ///                 bookstore_web.apps.googleusercontent.com
1383    #[prost(string, tag = "4")]
1384    pub audiences: ::prost::alloc::string::String,
1385    /// Redirect URL if JWT token is required but not present or is expired.
1386    /// Implement authorizationUrl of securityDefinitions in OpenAPI spec.
1387    #[prost(string, tag = "5")]
1388    pub authorization_url: ::prost::alloc::string::String,
1389    /// Defines the locations to extract the JWT.  For now it is only used by the
1390    /// Cloud Endpoints to store the OpenAPI extension \[x-google-jwt-locations\]
1391    /// (<https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations>)
1392    ///
1393    /// JWT locations can be one of HTTP headers, URL query parameters or
1394    /// cookies. The rule is that the first match wins.
1395    ///
1396    /// If not specified,  default to use following 3 locations:
1397    ///     1) Authorization: Bearer
1398    ///     2) x-goog-iap-jwt-assertion
1399    ///     3) access_token query parameter
1400    ///
1401    /// Default locations can be specified as followings:
1402    ///     jwt_locations:
1403    ///     - header: Authorization
1404    ///       value_prefix: "Bearer "
1405    ///     - header: x-goog-iap-jwt-assertion
1406    ///     - query: access_token
1407    #[prost(message, repeated, tag = "6")]
1408    pub jwt_locations: ::prost::alloc::vec::Vec<JwtLocation>,
1409}
1410/// OAuth scopes are a way to define data and permissions on data. For example,
1411/// there are scopes defined for "Read-only access to Google Calendar" and
1412/// "Access to Cloud Platform". Users can consent to a scope for an application,
1413/// giving it permission to access that data on their behalf.
1414///
1415/// OAuth scope specifications should be fairly coarse grained; a user will need
1416/// to see and understand the text description of what your scope means.
1417///
1418/// In most cases: use one or at most two OAuth scopes for an entire family of
1419/// products. If your product has multiple APIs, you should probably be sharing
1420/// the OAuth scope across all of those APIs.
1421///
1422/// When you need finer grained OAuth consent screens: talk with your product
1423/// management about how developers will use them in practice.
1424///
1425/// Please note that even though each of the canonical scopes is enough for a
1426/// request to be accepted and passed to the backend, a request can still fail
1427/// due to the backend requiring additional scopes or permissions.
1428#[derive(Clone, PartialEq, ::prost::Message)]
1429pub struct OAuthRequirements {
1430    /// The list of publicly documented OAuth scopes that are allowed access. An
1431    /// OAuth token containing any of these scopes will be accepted.
1432    ///
1433    /// Example:
1434    ///
1435    ///       canonical_scopes: <https://www.googleapis.com/auth/calendar,>
1436    ///                         <https://www.googleapis.com/auth/calendar.read>
1437    #[prost(string, tag = "1")]
1438    pub canonical_scopes: ::prost::alloc::string::String,
1439}
1440/// User-defined authentication requirements, including support for
1441/// [JSON Web Token
1442/// (JWT)](<https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32>).
1443#[derive(Clone, PartialEq, ::prost::Message)]
1444pub struct AuthRequirement {
1445    /// [id][google.api.AuthProvider.id] from authentication provider.
1446    ///
1447    /// Example:
1448    ///
1449    ///      provider_id: bookstore_auth
1450    #[prost(string, tag = "1")]
1451    pub provider_id: ::prost::alloc::string::String,
1452    /// NOTE: This will be deprecated soon, once AuthProvider.audiences is
1453    /// implemented and accepted in all the runtime components.
1454    ///
1455    /// The list of JWT
1456    /// [audiences](<https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3>).
1457    /// that are allowed to access. A JWT containing any of these audiences will
1458    /// be accepted. When this setting is absent, only JWTs with audience
1459    /// "<https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]">
1460    /// will be accepted. For example, if no audiences are in the setting,
1461    /// LibraryService API will only accept JWTs with the following audience
1462    /// "<https://library-example.googleapis.com/google.example.library.v1.LibraryService".>
1463    ///
1464    /// Example:
1465    ///
1466    ///      audiences: bookstore_android.apps.googleusercontent.com,
1467    ///                 bookstore_web.apps.googleusercontent.com
1468    #[prost(string, tag = "2")]
1469    pub audiences: ::prost::alloc::string::String,
1470}
1471/// `Backend` defines the backend configuration for a service.
1472#[derive(Clone, PartialEq, ::prost::Message)]
1473pub struct Backend {
1474    /// A list of API backend rules that apply to individual API methods.
1475    ///
1476    /// **NOTE:** All service configuration rules follow "last one wins" order.
1477    #[prost(message, repeated, tag = "1")]
1478    pub rules: ::prost::alloc::vec::Vec<BackendRule>,
1479}
1480/// A backend rule provides configuration for an individual API element.
1481#[derive(Clone, PartialEq, ::prost::Message)]
1482pub struct BackendRule {
1483    /// Selects the methods to which this rule applies.
1484    ///
1485    /// Refer to [selector][google.api.DocumentationRule.selector] for syntax
1486    /// details.
1487    #[prost(string, tag = "1")]
1488    pub selector: ::prost::alloc::string::String,
1489    /// The address of the API backend.
1490    ///
1491    /// The scheme is used to determine the backend protocol and security.
1492    /// The following schemes are accepted:
1493    ///
1494    ///     SCHEME        PROTOCOL    SECURITY
1495    ///     http://       HTTP        None
1496    ///     https://      HTTP        TLS
1497    ///     grpc://       gRPC        None
1498    ///     grpcs://      gRPC        TLS
1499    ///
1500    /// It is recommended to explicitly include a scheme. Leaving out the scheme
1501    /// may cause constrasting behaviors across platforms.
1502    ///
1503    /// If the port is unspecified, the default is:
1504    /// - 80 for schemes without TLS
1505    /// - 443 for schemes with TLS
1506    ///
1507    /// For HTTP backends, use [protocol][google.api.BackendRule.protocol]
1508    /// to specify the protocol version.
1509    #[prost(string, tag = "2")]
1510    pub address: ::prost::alloc::string::String,
1511    /// The number of seconds to wait for a response from a request. The default
1512    /// varies based on the request protocol and deployment environment.
1513    #[prost(double, tag = "3")]
1514    pub deadline: f64,
1515    /// Deprecated, do not use.
1516    #[deprecated]
1517    #[prost(double, tag = "4")]
1518    pub min_deadline: f64,
1519    /// The number of seconds to wait for the completion of a long running
1520    /// operation. The default is no deadline.
1521    #[prost(double, tag = "5")]
1522    pub operation_deadline: f64,
1523    #[prost(enumeration = "backend_rule::PathTranslation", tag = "6")]
1524    pub path_translation: i32,
1525    /// The protocol used for sending a request to the backend.
1526    /// The supported values are "http/1.1" and "h2".
1527    ///
1528    /// The default value is inferred from the scheme in the
1529    /// [address][google.api.BackendRule.address] field:
1530    ///
1531    ///     SCHEME        PROTOCOL
1532    ///     http://       http/1.1
1533    ///     https://      http/1.1
1534    ///     grpc://       h2
1535    ///     grpcs://      h2
1536    ///
1537    /// For secure HTTP backends (https://) that support HTTP/2, set this field
1538    /// to "h2" for improved performance.
1539    ///
1540    /// Configuring this field to non-default values is only supported for secure
1541    /// HTTP backends. This field will be ignored for all other backends.
1542    ///
1543    /// See
1544    /// <https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids>
1545    /// for more details on the supported values.
1546    #[prost(string, tag = "9")]
1547    pub protocol: ::prost::alloc::string::String,
1548    /// The map between request protocol and the backend address.
1549    #[prost(map = "string, message", tag = "10")]
1550    pub overrides_by_request_protocol: ::std::collections::HashMap<
1551        ::prost::alloc::string::String,
1552        BackendRule,
1553    >,
1554    /// Authentication settings used by the backend.
1555    ///
1556    /// These are typically used to provide service management functionality to
1557    /// a backend served on a publicly-routable URL. The `authentication`
1558    /// details should match the authentication behavior used by the backend.
1559    ///
1560    /// For example, specifying `jwt_audience` implies that the backend expects
1561    /// authentication via a JWT.
1562    ///
1563    /// When authentication is unspecified, the resulting behavior is the same
1564    /// as `disable_auth` set to `true`.
1565    ///
1566    /// Refer to <https://developers.google.com/identity/protocols/OpenIDConnect> for
1567    /// JWT ID token.
1568    #[prost(oneof = "backend_rule::Authentication", tags = "7, 8")]
1569    pub authentication: ::core::option::Option<backend_rule::Authentication>,
1570}
1571/// Nested message and enum types in `BackendRule`.
1572pub mod backend_rule {
1573    /// Path Translation specifies how to combine the backend address with the
1574    /// request path in order to produce the appropriate forwarding URL for the
1575    /// request.
1576    ///
1577    /// Path Translation is applicable only to HTTP-based backends. Backends which
1578    /// do not accept requests over HTTP/HTTPS should leave `path_translation`
1579    /// unspecified.
1580    #[derive(
1581        Clone,
1582        Copy,
1583        Debug,
1584        PartialEq,
1585        Eq,
1586        Hash,
1587        PartialOrd,
1588        Ord,
1589        ::prost::Enumeration
1590    )]
1591    #[repr(i32)]
1592    pub enum PathTranslation {
1593        Unspecified = 0,
1594        /// Use the backend address as-is, with no modification to the path. If the
1595        /// URL pattern contains variables, the variable names and values will be
1596        /// appended to the query string. If a query string parameter and a URL
1597        /// pattern variable have the same name, this may result in duplicate keys in
1598        /// the query string.
1599        ///
1600        /// # Examples
1601        ///
1602        /// Given the following operation config:
1603        ///
1604        ///      Method path:        /api/company/{cid}/user/{uid}
1605        ///      Backend address:    <https://example.cloudfunctions.net/getUser>
1606        ///
1607        /// Requests to the following request paths will call the backend at the
1608        /// translated path:
1609        ///
1610        ///      Request path: /api/company/widgetworks/user/johndoe
1611        ///      Translated:
1612        ///      <https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe>
1613        ///
1614        ///      Request path: /api/company/widgetworks/user/johndoe?timezone=EST
1615        ///      Translated:
1616        ///      <https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe>
1617        ConstantAddress = 1,
1618        /// The request path will be appended to the backend address.
1619        ///
1620        /// # Examples
1621        ///
1622        /// Given the following operation config:
1623        ///
1624        ///      Method path:        /api/company/{cid}/user/{uid}
1625        ///      Backend address:    <https://example.appspot.com>
1626        ///
1627        /// Requests to the following request paths will call the backend at the
1628        /// translated path:
1629        ///
1630        ///      Request path: /api/company/widgetworks/user/johndoe
1631        ///      Translated:
1632        ///      <https://example.appspot.com/api/company/widgetworks/user/johndoe>
1633        ///
1634        ///      Request path: /api/company/widgetworks/user/johndoe?timezone=EST
1635        ///      Translated:
1636        ///      <https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST>
1637        AppendPathToAddress = 2,
1638    }
1639    impl PathTranslation {
1640        /// String value of the enum field names used in the ProtoBuf definition.
1641        ///
1642        /// The values are not transformed in any way and thus are considered stable
1643        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1644        pub fn as_str_name(&self) -> &'static str {
1645            match self {
1646                Self::Unspecified => "PATH_TRANSLATION_UNSPECIFIED",
1647                Self::ConstantAddress => "CONSTANT_ADDRESS",
1648                Self::AppendPathToAddress => "APPEND_PATH_TO_ADDRESS",
1649            }
1650        }
1651        /// Creates an enum from field names used in the ProtoBuf definition.
1652        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1653            match value {
1654                "PATH_TRANSLATION_UNSPECIFIED" => Some(Self::Unspecified),
1655                "CONSTANT_ADDRESS" => Some(Self::ConstantAddress),
1656                "APPEND_PATH_TO_ADDRESS" => Some(Self::AppendPathToAddress),
1657                _ => None,
1658            }
1659        }
1660    }
1661    /// Authentication settings used by the backend.
1662    ///
1663    /// These are typically used to provide service management functionality to
1664    /// a backend served on a publicly-routable URL. The `authentication`
1665    /// details should match the authentication behavior used by the backend.
1666    ///
1667    /// For example, specifying `jwt_audience` implies that the backend expects
1668    /// authentication via a JWT.
1669    ///
1670    /// When authentication is unspecified, the resulting behavior is the same
1671    /// as `disable_auth` set to `true`.
1672    ///
1673    /// Refer to <https://developers.google.com/identity/protocols/OpenIDConnect> for
1674    /// JWT ID token.
1675    #[derive(Clone, PartialEq, ::prost::Oneof)]
1676    pub enum Authentication {
1677        /// The JWT audience is used when generating a JWT ID token for the backend.
1678        /// This ID token will be added in the HTTP "authorization" header, and sent
1679        /// to the backend.
1680        #[prost(string, tag = "7")]
1681        JwtAudience(::prost::alloc::string::String),
1682        /// When disable_auth is true, a JWT ID token won't be generated and the
1683        /// original "Authorization" HTTP header will be preserved. If the header is
1684        /// used to carry the original token and is expected by the backend, this
1685        /// field must be set to true to preserve the header.
1686        #[prost(bool, tag = "8")]
1687        DisableAuth(bool),
1688    }
1689}
1690/// Billing related configuration of the service.
1691///
1692/// The following example shows how to configure monitored resources and metrics
1693/// for billing, `consumer_destinations` is the only supported destination and
1694/// the monitored resources need at least one label key
1695/// `cloud.googleapis.com/location` to indicate the location of the billing
1696/// usage, using different monitored resources between monitoring and billing is
1697/// recommended so they can be evolved independently:
1698///
1699///
1700///      monitored_resources:
1701///      - type: library.googleapis.com/billing_branch
1702///        labels:
1703///        - key: cloud.googleapis.com/location
1704///          description: |
1705///            Predefined label to support billing location restriction.
1706///        - key: city
1707///          description: |
1708///            Custom label to define the city where the library branch is located
1709///            in.
1710///        - key: name
1711///          description: Custom label to define the name of the library branch.
1712///      metrics:
1713///      - name: library.googleapis.com/book/borrowed_count
1714///        metric_kind: DELTA
1715///        value_type: INT64
1716///        unit: "1"
1717///      billing:
1718///        consumer_destinations:
1719///        - monitored_resource: library.googleapis.com/billing_branch
1720///          metrics:
1721///          - library.googleapis.com/book/borrowed_count
1722#[derive(Clone, PartialEq, ::prost::Message)]
1723pub struct Billing {
1724    /// Billing configurations for sending metrics to the consumer project.
1725    /// There can be multiple consumer destinations per service, each one must have
1726    /// a different monitored resource type. A metric can be used in at most
1727    /// one consumer destination.
1728    #[prost(message, repeated, tag = "8")]
1729    pub consumer_destinations: ::prost::alloc::vec::Vec<billing::BillingDestination>,
1730}
1731/// Nested message and enum types in `Billing`.
1732pub mod billing {
1733    /// Configuration of a specific billing destination (Currently only support
1734    /// bill against consumer project).
1735    #[derive(Clone, PartialEq, ::prost::Message)]
1736    pub struct BillingDestination {
1737        /// The monitored resource type. The type must be defined in
1738        /// [Service.monitored_resources][google.api.Service.monitored_resources]
1739        /// section.
1740        #[prost(string, tag = "1")]
1741        pub monitored_resource: ::prost::alloc::string::String,
1742        /// Names of the metrics to report to this billing destination.
1743        /// Each name must be defined in
1744        /// [Service.metrics][google.api.Service.metrics] section.
1745        #[prost(string, repeated, tag = "2")]
1746        pub metrics: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1747    }
1748}
1749/// Output generated from semantically comparing two versions of a service
1750/// configuration.
1751///
1752/// Includes detailed information about a field that have changed with
1753/// applicable advice about potential consequences for the change, such as
1754/// backwards-incompatibility.
1755#[derive(Clone, PartialEq, ::prost::Message)]
1756pub struct ConfigChange {
1757    /// Object hierarchy path to the change, with levels separated by a '.'
1758    /// character. For repeated fields, an applicable unique identifier field is
1759    /// used for the index (usually selector, name, or id). For maps, the term
1760    /// 'key' is used. If the field has no unique identifier, the numeric index
1761    /// is used.
1762    /// Examples:
1763    /// - visibility.rules\[selector=="google.LibraryService.ListBooks"\].restriction
1764    /// - quota.metric_rules\[selector=="google"\].metric_costs\[key=="reads"\].value
1765    /// - logging.producer_destinations\[0\]
1766    #[prost(string, tag = "1")]
1767    pub element: ::prost::alloc::string::String,
1768    /// Value of the changed object in the old Service configuration,
1769    /// in JSON format. This field will not be populated if ChangeType == ADDED.
1770    #[prost(string, tag = "2")]
1771    pub old_value: ::prost::alloc::string::String,
1772    /// Value of the changed object in the new Service configuration,
1773    /// in JSON format. This field will not be populated if ChangeType == REMOVED.
1774    #[prost(string, tag = "3")]
1775    pub new_value: ::prost::alloc::string::String,
1776    /// The type for this change, either ADDED, REMOVED, or MODIFIED.
1777    #[prost(enumeration = "ChangeType", tag = "4")]
1778    pub change_type: i32,
1779    /// Collection of advice provided for this change, useful for determining the
1780    /// possible impact of this change.
1781    #[prost(message, repeated, tag = "5")]
1782    pub advices: ::prost::alloc::vec::Vec<Advice>,
1783}
1784/// Generated advice about this change, used for providing more
1785/// information about how a change will affect the existing service.
1786#[derive(Clone, PartialEq, ::prost::Message)]
1787pub struct Advice {
1788    /// Useful description for why this advice was applied and what actions should
1789    /// be taken to mitigate any implied risks.
1790    #[prost(string, tag = "2")]
1791    pub description: ::prost::alloc::string::String,
1792}
1793/// Classifies set of possible modifications to an object in the service
1794/// configuration.
1795#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1796#[repr(i32)]
1797pub enum ChangeType {
1798    /// No value was provided.
1799    Unspecified = 0,
1800    /// The changed object exists in the 'new' service configuration, but not
1801    /// in the 'old' service configuration.
1802    Added = 1,
1803    /// The changed object exists in the 'old' service configuration, but not
1804    /// in the 'new' service configuration.
1805    Removed = 2,
1806    /// The changed object exists in both service configurations, but its value
1807    /// is different.
1808    Modified = 3,
1809}
1810impl ChangeType {
1811    /// String value of the enum field names used in the ProtoBuf definition.
1812    ///
1813    /// The values are not transformed in any way and thus are considered stable
1814    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1815    pub fn as_str_name(&self) -> &'static str {
1816        match self {
1817            Self::Unspecified => "CHANGE_TYPE_UNSPECIFIED",
1818            Self::Added => "ADDED",
1819            Self::Removed => "REMOVED",
1820            Self::Modified => "MODIFIED",
1821        }
1822    }
1823    /// Creates an enum from field names used in the ProtoBuf definition.
1824    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1825        match value {
1826            "CHANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1827            "ADDED" => Some(Self::Added),
1828            "REMOVED" => Some(Self::Removed),
1829            "MODIFIED" => Some(Self::Modified),
1830            _ => None,
1831        }
1832    }
1833}
1834/// A descriptor for defining project properties for a service. One service may
1835/// have many consumer projects, and the service may want to behave differently
1836/// depending on some properties on the project. For example, a project may be
1837/// associated with a school, or a business, or a government agency, a business
1838/// type property on the project may affect how a service responds to the client.
1839/// This descriptor defines which properties are allowed to be set on a project.
1840///
1841/// Example:
1842///
1843///     project_properties:
1844///       properties:
1845///       - name: NO_WATERMARK
1846///         type: BOOL
1847///         description: Allows usage of the API without watermarks.
1848///       - name: EXTENDED_TILE_CACHE_PERIOD
1849///         type: INT64
1850#[derive(Clone, PartialEq, ::prost::Message)]
1851pub struct ProjectProperties {
1852    /// List of per consumer project-specific properties.
1853    #[prost(message, repeated, tag = "1")]
1854    pub properties: ::prost::alloc::vec::Vec<Property>,
1855}
1856/// Defines project properties.
1857///
1858/// API services can define properties that can be assigned to consumer projects
1859/// so that backends can perform response customization without having to make
1860/// additional calls or maintain additional storage. For example, Maps API
1861/// defines properties that controls map tile cache period, or whether to embed a
1862/// watermark in a result.
1863///
1864/// These values can be set via API producer console. Only API providers can
1865/// define and set these properties.
1866#[derive(Clone, PartialEq, ::prost::Message)]
1867pub struct Property {
1868    /// The name of the property (a.k.a key).
1869    #[prost(string, tag = "1")]
1870    pub name: ::prost::alloc::string::String,
1871    /// The type of this property.
1872    #[prost(enumeration = "property::PropertyType", tag = "2")]
1873    pub r#type: i32,
1874    /// The description of the property
1875    #[prost(string, tag = "3")]
1876    pub description: ::prost::alloc::string::String,
1877}
1878/// Nested message and enum types in `Property`.
1879pub mod property {
1880    /// Supported data type of the property values
1881    #[derive(
1882        Clone,
1883        Copy,
1884        Debug,
1885        PartialEq,
1886        Eq,
1887        Hash,
1888        PartialOrd,
1889        Ord,
1890        ::prost::Enumeration
1891    )]
1892    #[repr(i32)]
1893    pub enum PropertyType {
1894        /// The type is unspecified, and will result in an error.
1895        Unspecified = 0,
1896        /// The type is `int64`.
1897        Int64 = 1,
1898        /// The type is `bool`.
1899        Bool = 2,
1900        /// The type is `string`.
1901        String = 3,
1902        /// The type is 'double'.
1903        Double = 4,
1904    }
1905    impl PropertyType {
1906        /// String value of the enum field names used in the ProtoBuf definition.
1907        ///
1908        /// The values are not transformed in any way and thus are considered stable
1909        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1910        pub fn as_str_name(&self) -> &'static str {
1911            match self {
1912                Self::Unspecified => "UNSPECIFIED",
1913                Self::Int64 => "INT64",
1914                Self::Bool => "BOOL",
1915                Self::String => "STRING",
1916                Self::Double => "DOUBLE",
1917            }
1918        }
1919        /// Creates an enum from field names used in the ProtoBuf definition.
1920        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1921            match value {
1922                "UNSPECIFIED" => Some(Self::Unspecified),
1923                "INT64" => Some(Self::Int64),
1924                "BOOL" => Some(Self::Bool),
1925                "STRING" => Some(Self::String),
1926                "DOUBLE" => Some(Self::Double),
1927                _ => None,
1928            }
1929        }
1930    }
1931}
1932/// `Context` defines which contexts an API requests.
1933///
1934/// Example:
1935///
1936///      context:
1937///        rules:
1938///        - selector: "*"
1939///          requested:
1940///          - google.rpc.context.ProjectContext
1941///          - google.rpc.context.OriginContext
1942///
1943/// The above specifies that all methods in the API request
1944/// `google.rpc.context.ProjectContext` and
1945/// `google.rpc.context.OriginContext`.
1946///
1947/// Available context types are defined in package
1948/// `google.rpc.context`.
1949///
1950/// This also provides mechanism to allowlist any protobuf message extension that
1951/// can be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and
1952/// “x-goog-ext-<extension_id>-jspb” format. For example, list any service
1953/// specific protobuf types that can appear in grpc metadata as follows in your
1954/// yaml file:
1955///
1956/// Example:
1957///
1958///      context:
1959///        rules:
1960///         - selector: "google.example.library.v1.LibraryService.CreateBook"
1961///           allowed_request_extensions:
1962///           - google.foo.v1.NewExtension
1963///           allowed_response_extensions:
1964///           - google.foo.v1.NewExtension
1965///
1966/// You can also specify extension ID instead of fully qualified extension name
1967/// here.
1968#[derive(Clone, PartialEq, ::prost::Message)]
1969pub struct Context {
1970    /// A list of RPC context rules that apply to individual API methods.
1971    ///
1972    /// **NOTE:** All service configuration rules follow "last one wins" order.
1973    #[prost(message, repeated, tag = "1")]
1974    pub rules: ::prost::alloc::vec::Vec<ContextRule>,
1975}
1976/// A context rule provides information about the context for an individual API
1977/// element.
1978#[derive(Clone, PartialEq, ::prost::Message)]
1979pub struct ContextRule {
1980    /// Selects the methods to which this rule applies.
1981    ///
1982    /// Refer to [selector][google.api.DocumentationRule.selector] for syntax
1983    /// details.
1984    #[prost(string, tag = "1")]
1985    pub selector: ::prost::alloc::string::String,
1986    /// A list of full type names of requested contexts, only the requested context
1987    /// will be made available to the backend.
1988    #[prost(string, repeated, tag = "2")]
1989    pub requested: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1990    /// A list of full type names of provided contexts. It is used to support
1991    /// propagating HTTP headers and ETags from the response extension.
1992    #[prost(string, repeated, tag = "3")]
1993    pub provided: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1994    /// A list of full type names or extension IDs of extensions allowed in grpc
1995    /// side channel from client to backend.
1996    #[prost(string, repeated, tag = "4")]
1997    pub allowed_request_extensions: ::prost::alloc::vec::Vec<
1998        ::prost::alloc::string::String,
1999    >,
2000    /// A list of full type names or extension IDs of extensions allowed in grpc
2001    /// side channel from backend to client.
2002    #[prost(string, repeated, tag = "5")]
2003    pub allowed_response_extensions: ::prost::alloc::vec::Vec<
2004        ::prost::alloc::string::String,
2005    >,
2006}
2007/// Google API Policy Annotation
2008///
2009/// This message defines a simple API policy annotation that can be used to
2010/// annotate API request and response message fields with applicable policies.
2011/// One field may have multiple applicable policies that must all be satisfied
2012/// before a request can be processed. This policy annotation is used to
2013/// generate the overall policy that will be used for automatic runtime
2014/// policy enforcement and documentation generation.
2015#[derive(Clone, PartialEq, ::prost::Message)]
2016pub struct FieldPolicy {
2017    /// Selects one or more request or response message fields to apply this
2018    /// `FieldPolicy`.
2019    ///
2020    /// When a `FieldPolicy` is used in proto annotation, the selector must
2021    /// be left as empty. The service config generator will automatically fill
2022    /// the correct value.
2023    ///
2024    /// When a `FieldPolicy` is used in service config, the selector must be a
2025    /// comma-separated string with valid request or response field paths,
2026    /// such as "foo.bar" or "foo.bar,foo.baz".
2027    #[prost(string, tag = "1")]
2028    pub selector: ::prost::alloc::string::String,
2029    /// Specifies the required permission(s) for the resource referred to by the
2030    /// field. It requires the field contains a valid resource reference, and
2031    /// the request must pass the permission checks to proceed. For example,
2032    /// "resourcemanager.projects.get".
2033    #[prost(string, tag = "2")]
2034    pub resource_permission: ::prost::alloc::string::String,
2035    /// Specifies the resource type for the resource referred to by the field.
2036    #[prost(string, tag = "3")]
2037    pub resource_type: ::prost::alloc::string::String,
2038}
2039/// Defines policies applying to an RPC method.
2040#[derive(Clone, PartialEq, ::prost::Message)]
2041pub struct MethodPolicy {
2042    /// Selects a method to which these policies should be enforced, for example,
2043    /// "google.pubsub.v1.Subscriber.CreateSubscription".
2044    ///
2045    /// Refer to [selector][google.api.DocumentationRule.selector] for syntax
2046    /// details.
2047    ///
2048    /// NOTE: This field must not be set in the proto annotation. It will be
2049    /// automatically filled by the service config compiler .
2050    #[prost(string, tag = "9")]
2051    pub selector: ::prost::alloc::string::String,
2052    /// Policies that are applicable to the request message.
2053    #[prost(message, repeated, tag = "2")]
2054    pub request_policies: ::prost::alloc::vec::Vec<FieldPolicy>,
2055}
2056/// Selects and configures the service controller used by the service.
2057///
2058/// Example:
2059///
2060///      control:
2061///        environment: servicecontrol.googleapis.com
2062#[derive(Clone, PartialEq, ::prost::Message)]
2063pub struct Control {
2064    /// The service controller environment to use. If empty, no control plane
2065    /// feature (like quota and billing) will be enabled. The recommended value for
2066    /// most services is servicecontrol.googleapis.com
2067    #[prost(string, tag = "1")]
2068    pub environment: ::prost::alloc::string::String,
2069    /// Defines policies applying to the API methods of the service.
2070    #[prost(message, repeated, tag = "4")]
2071    pub method_policies: ::prost::alloc::vec::Vec<MethodPolicy>,
2072}
2073/// `Distribution` contains summary statistics for a population of values. It
2074/// optionally contains a histogram representing the distribution of those values
2075/// across a set of buckets.
2076///
2077/// The summary statistics are the count, mean, sum of the squared deviation from
2078/// the mean, the minimum, and the maximum of the set of population of values.
2079/// The histogram is based on a sequence of buckets and gives a count of values
2080/// that fall into each bucket. The boundaries of the buckets are given either
2081/// explicitly or by formulas for buckets of fixed or exponentially increasing
2082/// widths.
2083///
2084/// Although it is not forbidden, it is generally a bad idea to include
2085/// non-finite values (infinities or NaNs) in the population of values, as this
2086/// will render the `mean` and `sum_of_squared_deviation` fields meaningless.
2087#[derive(Clone, PartialEq, ::prost::Message)]
2088pub struct Distribution {
2089    /// The number of values in the population. Must be non-negative. This value
2090    /// must equal the sum of the values in `bucket_counts` if a histogram is
2091    /// provided.
2092    #[prost(int64, tag = "1")]
2093    pub count: i64,
2094    /// The arithmetic mean of the values in the population. If `count` is zero
2095    /// then this field must be zero.
2096    #[prost(double, tag = "2")]
2097    pub mean: f64,
2098    /// The sum of squared deviations from the mean of the values in the
2099    /// population. For values x_i this is:
2100    ///
2101    ///      Sum[i=1..n]((x_i - mean)^2)
2102    ///
2103    /// Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition
2104    /// describes Welford's method for accumulating this sum in one pass.
2105    ///
2106    /// If `count` is zero then this field must be zero.
2107    #[prost(double, tag = "3")]
2108    pub sum_of_squared_deviation: f64,
2109    /// If specified, contains the range of the population values. The field
2110    /// must not be present if the `count` is zero.
2111    #[prost(message, optional, tag = "4")]
2112    pub range: ::core::option::Option<distribution::Range>,
2113    /// Defines the histogram bucket boundaries. If the distribution does not
2114    /// contain a histogram, then omit this field.
2115    #[prost(message, optional, tag = "6")]
2116    pub bucket_options: ::core::option::Option<distribution::BucketOptions>,
2117    /// The number of values in each bucket of the histogram, as described in
2118    /// `bucket_options`. If the distribution does not have a histogram, then omit
2119    /// this field. If there is a histogram, then the sum of the values in
2120    /// `bucket_counts` must equal the value in the `count` field of the
2121    /// distribution.
2122    ///
2123    /// If present, `bucket_counts` should contain N values, where N is the number
2124    /// of buckets specified in `bucket_options`. If you supply fewer than N
2125    /// values, the remaining values are assumed to be 0.
2126    ///
2127    /// The order of the values in `bucket_counts` follows the bucket numbering
2128    /// schemes described for the three bucket types. The first value must be the
2129    /// count for the underflow bucket (number 0). The next N-2 values are the
2130    /// counts for the finite buckets (number 1 through N-2). The N'th value in
2131    /// `bucket_counts` is the count for the overflow bucket (number N-1).
2132    #[prost(int64, repeated, tag = "7")]
2133    pub bucket_counts: ::prost::alloc::vec::Vec<i64>,
2134    /// Must be in increasing order of `value` field.
2135    #[prost(message, repeated, tag = "10")]
2136    pub exemplars: ::prost::alloc::vec::Vec<distribution::Exemplar>,
2137}
2138/// Nested message and enum types in `Distribution`.
2139pub mod distribution {
2140    /// The range of the population values.
2141    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2142    pub struct Range {
2143        /// The minimum of the population values.
2144        #[prost(double, tag = "1")]
2145        pub min: f64,
2146        /// The maximum of the population values.
2147        #[prost(double, tag = "2")]
2148        pub max: f64,
2149    }
2150    /// `BucketOptions` describes the bucket boundaries used to create a histogram
2151    /// for the distribution. The buckets can be in a linear sequence, an
2152    /// exponential sequence, or each bucket can be specified explicitly.
2153    /// `BucketOptions` does not include the number of values in each bucket.
2154    ///
2155    /// A bucket has an inclusive lower bound and exclusive upper bound for the
2156    /// values that are counted for that bucket. The upper bound of a bucket must
2157    /// be strictly greater than the lower bound. The sequence of N buckets for a
2158    /// distribution consists of an underflow bucket (number 0), zero or more
2159    /// finite buckets (number 1 through N - 2) and an overflow bucket (number N -
2160    /// 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the
2161    /// same as the upper bound of bucket i - 1. The buckets span the whole range
2162    /// of finite values: lower bound of the underflow bucket is -infinity and the
2163    /// upper bound of the overflow bucket is +infinity. The finite buckets are
2164    /// so-called because both bounds are finite.
2165    #[derive(Clone, PartialEq, ::prost::Message)]
2166    pub struct BucketOptions {
2167        /// Exactly one of these three fields must be set.
2168        #[prost(oneof = "bucket_options::Options", tags = "1, 2, 3")]
2169        pub options: ::core::option::Option<bucket_options::Options>,
2170    }
2171    /// Nested message and enum types in `BucketOptions`.
2172    pub mod bucket_options {
2173        /// Specifies a linear sequence of buckets that all have the same width
2174        /// (except overflow and underflow). Each bucket represents a constant
2175        /// absolute uncertainty on the specific value in the bucket.
2176        ///
2177        /// There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
2178        /// following boundaries:
2179        ///
2180        ///     Upper bound (0 <= i < N-1):     offset + (width * i).
2181        ///
2182        ///     Lower bound (1 <= i < N):       offset + (width * (i - 1)).
2183        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2184        pub struct Linear {
2185            /// Must be greater than 0.
2186            #[prost(int32, tag = "1")]
2187            pub num_finite_buckets: i32,
2188            /// Must be greater than 0.
2189            #[prost(double, tag = "2")]
2190            pub width: f64,
2191            /// Lower bound of the first bucket.
2192            #[prost(double, tag = "3")]
2193            pub offset: f64,
2194        }
2195        /// Specifies an exponential sequence of buckets that have a width that is
2196        /// proportional to the value of the lower bound. Each bucket represents a
2197        /// constant relative uncertainty on a specific value in the bucket.
2198        ///
2199        /// There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
2200        /// following boundaries:
2201        ///
2202        ///     Upper bound (0 <= i < N-1):     scale * (growth_factor ^ i).
2203        ///
2204        ///     Lower bound (1 <= i < N):       scale * (growth_factor ^ (i - 1)).
2205        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2206        pub struct Exponential {
2207            /// Must be greater than 0.
2208            #[prost(int32, tag = "1")]
2209            pub num_finite_buckets: i32,
2210            /// Must be greater than 1.
2211            #[prost(double, tag = "2")]
2212            pub growth_factor: f64,
2213            /// Must be greater than 0.
2214            #[prost(double, tag = "3")]
2215            pub scale: f64,
2216        }
2217        /// Specifies a set of buckets with arbitrary widths.
2218        ///
2219        /// There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following
2220        /// boundaries:
2221        ///
2222        ///     Upper bound (0 <= i < N-1):     bounds\[i\]
2223        ///     Lower bound (1 <= i < N);       bounds\[i - 1\]
2224        ///
2225        /// The `bounds` field must contain at least one element. If `bounds` has
2226        /// only one element, then there are no finite buckets, and that single
2227        /// element is the common boundary of the overflow and underflow buckets.
2228        #[derive(Clone, PartialEq, ::prost::Message)]
2229        pub struct Explicit {
2230            /// The values must be monotonically increasing.
2231            #[prost(double, repeated, tag = "1")]
2232            pub bounds: ::prost::alloc::vec::Vec<f64>,
2233        }
2234        /// Exactly one of these three fields must be set.
2235        #[derive(Clone, PartialEq, ::prost::Oneof)]
2236        pub enum Options {
2237            /// The linear bucket.
2238            #[prost(message, tag = "1")]
2239            LinearBuckets(Linear),
2240            /// The exponential buckets.
2241            #[prost(message, tag = "2")]
2242            ExponentialBuckets(Exponential),
2243            /// The explicit buckets.
2244            #[prost(message, tag = "3")]
2245            ExplicitBuckets(Explicit),
2246        }
2247    }
2248    /// Exemplars are example points that may be used to annotate aggregated
2249    /// distribution values. They are metadata that gives information about a
2250    /// particular value added to a Distribution bucket, such as a trace ID that
2251    /// was active when a value was added. They may contain further information,
2252    /// such as a example values and timestamps, origin, etc.
2253    #[derive(Clone, PartialEq, ::prost::Message)]
2254    pub struct Exemplar {
2255        /// Value of the exemplar point. This value determines to which bucket the
2256        /// exemplar belongs.
2257        #[prost(double, tag = "1")]
2258        pub value: f64,
2259        /// The observation (sampling) time of the above value.
2260        #[prost(message, optional, tag = "2")]
2261        pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
2262        /// Contextual information about the example value. Examples are:
2263        ///
2264        ///    Trace: type.googleapis.com/google.monitoring.v3.SpanContext
2265        ///
2266        ///    Literal string: type.googleapis.com/google.protobuf.StringValue
2267        ///
2268        ///    Labels dropped during aggregation:
2269        ///      type.googleapis.com/google.monitoring.v3.DroppedLabels
2270        ///
2271        /// There may be only a single attachment of any given message type in a
2272        /// single exemplar, and this is enforced by the system.
2273        #[prost(message, repeated, tag = "3")]
2274        pub attachments: ::prost::alloc::vec::Vec<::prost_types::Any>,
2275    }
2276}
2277/// `Documentation` provides the information for describing a service.
2278///
2279/// Example:
2280/// <pre><code>documentation:
2281///    summary: >
2282///      The Google Calendar API gives access
2283///      to most calendar features.
2284///    pages:
2285///    - name: Overview
2286///      content: &#40;== include google/foo/overview.md ==&#41;
2287///    - name: Tutorial
2288///      content: &#40;== include google/foo/tutorial.md ==&#41;
2289///      subpages:
2290///      - name: Java
2291///        content: &#40;== include google/foo/tutorial_java.md ==&#41;
2292///    rules:
2293///    - selector: google.calendar.Calendar.Get
2294///      description: >
2295///        ...
2296///    - selector: google.calendar.Calendar.Put
2297///      description: >
2298///        ...
2299/// </code></pre>
2300/// Documentation is provided in markdown syntax. In addition to
2301/// standard markdown features, definition lists, tables and fenced
2302/// code blocks are supported. Section headers can be provided and are
2303/// interpreted relative to the section nesting of the context where
2304/// a documentation fragment is embedded.
2305///
2306/// Documentation from the IDL is merged with documentation defined
2307/// via the config at normalization time, where documentation provided
2308/// by config rules overrides IDL provided.
2309///
2310/// A number of constructs specific to the API platform are supported
2311/// in documentation text.
2312///
2313/// In order to reference a proto element, the following
2314/// notation can be used:
2315/// <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre>
2316/// To override the display text used for the link, this can be used:
2317/// <pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre>
2318/// Text can be excluded from doc using the following notation:
2319/// <pre><code>&#40;-- internal comment --&#41;</code></pre>
2320///
2321/// A few directives are available in documentation. Note that
2322/// directives must appear on a single line to be properly
2323/// identified. The `include` directive includes a markdown file from
2324/// an external source:
2325/// <pre><code>&#40;== include path/to/file ==&#41;</code></pre>
2326/// The `resource_for` directive marks a message to be the resource of
2327/// a collection in REST view. If it is not specified, tools attempt
2328/// to infer the resource from the operations in a collection:
2329/// <pre><code>&#40;== resource_for v1.shelves.books ==&#41;</code></pre>
2330/// The directive `suppress_warning` does not directly affect documentation
2331/// and is documented together with service config validation.
2332#[derive(Clone, PartialEq, ::prost::Message)]
2333pub struct Documentation {
2334    /// A short description of what the service does. The summary must be plain
2335    /// text. It becomes the overview of the service displayed in Google Cloud
2336    /// Console.
2337    /// NOTE: This field is equivalent to the standard field `description`.
2338    #[prost(string, tag = "1")]
2339    pub summary: ::prost::alloc::string::String,
2340    /// The top level pages for the documentation set.
2341    #[prost(message, repeated, tag = "5")]
2342    pub pages: ::prost::alloc::vec::Vec<Page>,
2343    /// A list of documentation rules that apply to individual API elements.
2344    ///
2345    /// **NOTE:** All service configuration rules follow "last one wins" order.
2346    #[prost(message, repeated, tag = "3")]
2347    pub rules: ::prost::alloc::vec::Vec<DocumentationRule>,
2348    /// The URL to the root of documentation.
2349    #[prost(string, tag = "4")]
2350    pub documentation_root_url: ::prost::alloc::string::String,
2351    /// Specifies the service root url if the default one (the service name
2352    /// from the yaml file) is not suitable. This can be seen in any fully
2353    /// specified service urls as well as sections that show a base that other
2354    /// urls are relative to.
2355    #[prost(string, tag = "6")]
2356    pub service_root_url: ::prost::alloc::string::String,
2357    /// Declares a single overview page. For example:
2358    /// <pre><code>documentation:
2359    ///    summary: ...
2360    ///    overview: &#40;== include overview.md ==&#41;
2361    /// </code></pre>
2362    /// This is a shortcut for the following declaration (using pages style):
2363    /// <pre><code>documentation:
2364    ///    summary: ...
2365    ///    pages:
2366    ///    - name: Overview
2367    ///      content: &#40;== include overview.md ==&#41;
2368    /// </code></pre>
2369    /// Note: you cannot specify both `overview` field and `pages` field.
2370    #[prost(string, tag = "2")]
2371    pub overview: ::prost::alloc::string::String,
2372}
2373/// A documentation rule provides information about individual API elements.
2374#[derive(Clone, PartialEq, ::prost::Message)]
2375pub struct DocumentationRule {
2376    /// The selector is a comma-separated list of patterns for any element such as
2377    /// a method, a field, an enum value. Each pattern is a qualified name of the
2378    /// element which may end in "*", indicating a wildcard. Wildcards are only
2379    /// allowed at the end and for a whole component of the qualified name,
2380    /// i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
2381    /// one or more components. To specify a default for all applicable elements,
2382    /// the whole pattern "*" is used.
2383    #[prost(string, tag = "1")]
2384    pub selector: ::prost::alloc::string::String,
2385    /// Description of the selected proto element (e.g. a message, a method, a
2386    /// 'service' definition, or a field). Defaults to leading & trailing comments
2387    /// taken from the proto source definition of the proto element.
2388    #[prost(string, tag = "2")]
2389    pub description: ::prost::alloc::string::String,
2390    /// Deprecation description of the selected element(s). It can be provided if
2391    /// an element is marked as `deprecated`.
2392    #[prost(string, tag = "3")]
2393    pub deprecation_description: ::prost::alloc::string::String,
2394}
2395/// Represents a documentation page. A page can contain subpages to represent
2396/// nested documentation set structure.
2397#[derive(Clone, PartialEq, ::prost::Message)]
2398pub struct Page {
2399    /// The name of the page. It will be used as an identity of the page to
2400    /// generate URI of the page, text of the link to this page in navigation,
2401    /// etc. The full page name (start from the root page name to this page
2402    /// concatenated with `.`) can be used as reference to the page in your
2403    /// documentation. For example:
2404    /// <pre><code>pages:
2405    /// - name: Tutorial
2406    ///    content: &#40;== include tutorial.md ==&#41;
2407    ///    subpages:
2408    ///    - name: Java
2409    ///      content: &#40;== include tutorial_java.md ==&#41;
2410    /// </code></pre>
2411    /// You can reference `Java` page using Markdown reference link syntax:
2412    /// `[Java][Tutorial.Java]`.
2413    #[prost(string, tag = "1")]
2414    pub name: ::prost::alloc::string::String,
2415    /// The Markdown content of the page. You can use ```(== include {path}
2416    /// ==)``` to include content from a Markdown file. The content can be used
2417    /// to produce the documentation page such as HTML format page.
2418    #[prost(string, tag = "2")]
2419    pub content: ::prost::alloc::string::String,
2420    /// Subpages of this page. The order of subpages specified here will be
2421    /// honored in the generated docset.
2422    #[prost(message, repeated, tag = "3")]
2423    pub subpages: ::prost::alloc::vec::Vec<Page>,
2424}
2425/// `Endpoint` describes a network address of a service that serves a set of
2426/// APIs. It is commonly known as a service endpoint. A service may expose
2427/// any number of service endpoints, and all service endpoints share the same
2428/// service definition, such as quota limits and monitoring metrics.
2429///
2430/// Example:
2431///
2432///      type: google.api.Service
2433///      name: library-example.googleapis.com
2434///      endpoints:
2435///        # Declares network address `<https://library-example.googleapis.com`>
2436///        # for service `library-example.googleapis.com`. The `https` scheme
2437///        # is implicit for all service endpoints. Other schemes may be
2438///        # supported in the future.
2439///      - name: library-example.googleapis.com
2440///        allow_cors: false
2441///      - name: content-staging-library-example.googleapis.com
2442///        # Allows HTTP OPTIONS calls to be passed to the API frontend, for it
2443///        # to decide whether the subsequent cross-origin request is allowed
2444///        # to proceed.
2445///        allow_cors: true
2446#[derive(Clone, PartialEq, ::prost::Message)]
2447pub struct Endpoint {
2448    /// The canonical name of this endpoint.
2449    #[prost(string, tag = "1")]
2450    pub name: ::prost::alloc::string::String,
2451    /// Aliases for this endpoint, these will be served by the same UrlMap as the
2452    /// parent endpoint, and will be provisioned in the GCP stack for the Regional
2453    /// Endpoints.
2454    #[prost(string, repeated, tag = "2")]
2455    pub aliases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2456    /// The specification of an Internet routable address of API frontend that will
2457    /// handle requests to this [API
2458    /// Endpoint](<https://cloud.google.com/apis/design/glossary>). It should be
2459    /// either a valid IPv4 address or a fully-qualified domain name. For example,
2460    /// "8.8.8.8" or "myservice.appspot.com".
2461    #[prost(string, tag = "101")]
2462    pub target: ::prost::alloc::string::String,
2463    /// Allowing
2464    /// [CORS](<https://en.wikipedia.org/wiki/Cross-origin_resource_sharing>), aka
2465    /// cross-domain traffic, would allow the backends served from this endpoint to
2466    /// receive and respond to HTTP OPTIONS requests. The response will be used by
2467    /// the browser to determine whether the subsequent cross-origin request is
2468    /// allowed to proceed.
2469    #[prost(bool, tag = "5")]
2470    pub allow_cors: bool,
2471}
2472/// Defines the supported values for `google.rpc.ErrorInfo.reason` for the
2473/// `googleapis.com` error domain. This error domain is reserved for [Service
2474/// Infrastructure](<https://cloud.google.com/service-infrastructure/docs/overview>).
2475/// For each error info of this domain, the metadata key "service" refers to the
2476/// logical identifier of an API service, such as "pubsub.googleapis.com". The
2477/// "consumer" refers to the entity that consumes an API Service. It typically is
2478/// a Google project that owns the client application or the server resource,
2479/// such as "projects/123". Other metadata keys are specific to each error
2480/// reason. For more information, see the definition of the specific error
2481/// reason.
2482#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2483#[repr(i32)]
2484pub enum ErrorReason {
2485    /// Do not use this default value.
2486    Unspecified = 0,
2487    /// The request is calling a disabled service for a consumer.
2488    ///
2489    /// Example of an ErrorInfo when the consumer "projects/123" contacting
2490    /// "pubsub.googleapis.com" service which is disabled:
2491    ///
2492    ///      { "reason": "SERVICE_DISABLED",
2493    ///        "domain": "googleapis.com",
2494    ///        "metadata": {
2495    ///          "consumer": "projects/123",
2496    ///          "service": "pubsub.googleapis.com"
2497    ///        }
2498    ///      }
2499    ///
2500    /// This response indicates the "pubsub.googleapis.com" has been disabled in
2501    /// "projects/123".
2502    ServiceDisabled = 1,
2503    /// The request whose associated billing account is disabled.
2504    ///
2505    /// Example of an ErrorInfo when the consumer "projects/123" fails to contact
2506    /// "pubsub.googleapis.com" service because the associated billing account is
2507    /// disabled:
2508    ///
2509    ///      { "reason": "BILLING_DISABLED",
2510    ///        "domain": "googleapis.com",
2511    ///        "metadata": {
2512    ///          "consumer": "projects/123",
2513    ///          "service": "pubsub.googleapis.com"
2514    ///        }
2515    ///      }
2516    ///
2517    /// This response indicates the billing account associated has been disabled.
2518    BillingDisabled = 2,
2519    /// The request is denied because the provided [API
2520    /// key](<https://cloud.google.com/docs/authentication/api-keys>) is invalid. It
2521    /// may be in a bad format, cannot be found, or has been expired).
2522    ///
2523    /// Example of an ErrorInfo when the request is contacting
2524    /// "storage.googleapis.com" service with an invalid API key:
2525    ///
2526    ///      { "reason": "API_KEY_INVALID",
2527    ///        "domain": "googleapis.com",
2528    ///        "metadata": {
2529    ///          "service": "storage.googleapis.com",
2530    ///        }
2531    ///      }
2532    ApiKeyInvalid = 3,
2533    /// The request is denied because it violates [API key API
2534    /// restrictions](<https://cloud.google.com/docs/authentication/api-keys#adding_api_restrictions>).
2535    ///
2536    /// Example of an ErrorInfo when the consumer "projects/123" fails to call the
2537    /// "storage.googleapis.com" service because this service is restricted in the
2538    /// API key:
2539    ///
2540    ///      { "reason": "API_KEY_SERVICE_BLOCKED",
2541    ///        "domain": "googleapis.com",
2542    ///        "metadata": {
2543    ///          "consumer": "projects/123",
2544    ///          "service": "storage.googleapis.com"
2545    ///        }
2546    ///      }
2547    ApiKeyServiceBlocked = 4,
2548    /// The request is denied because it violates [API key HTTP
2549    /// restrictions](<https://cloud.google.com/docs/authentication/api-keys#adding_http_restrictions>).
2550    ///
2551    /// Example of an ErrorInfo when the consumer "projects/123" fails to call
2552    /// "storage.googleapis.com" service because the http referrer of the request
2553    /// violates API key HTTP restrictions:
2554    ///
2555    ///      { "reason": "API_KEY_HTTP_REFERRER_BLOCKED",
2556    ///        "domain": "googleapis.com",
2557    ///        "metadata": {
2558    ///          "consumer": "projects/123",
2559    ///          "service": "storage.googleapis.com",
2560    ///        }
2561    ///      }
2562    ApiKeyHttpReferrerBlocked = 7,
2563    /// The request is denied because it violates [API key IP address
2564    /// restrictions](<https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions>).
2565    ///
2566    /// Example of an ErrorInfo when the consumer "projects/123" fails to call
2567    /// "storage.googleapis.com" service because the caller IP of the request
2568    /// violates API key IP address restrictions:
2569    ///
2570    ///      { "reason": "API_KEY_IP_ADDRESS_BLOCKED",
2571    ///        "domain": "googleapis.com",
2572    ///        "metadata": {
2573    ///          "consumer": "projects/123",
2574    ///          "service": "storage.googleapis.com",
2575    ///        }
2576    ///      }
2577    ApiKeyIpAddressBlocked = 8,
2578    /// The request is denied because it violates [API key Android application
2579    /// restrictions](<https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions>).
2580    ///
2581    /// Example of an ErrorInfo when the consumer "projects/123" fails to call
2582    /// "storage.googleapis.com" service because the request from the Android apps
2583    /// violates the API key Android application restrictions:
2584    ///
2585    ///      { "reason": "API_KEY_ANDROID_APP_BLOCKED",
2586    ///        "domain": "googleapis.com",
2587    ///        "metadata": {
2588    ///          "consumer": "projects/123",
2589    ///          "service": "storage.googleapis.com"
2590    ///        }
2591    ///      }
2592    ApiKeyAndroidAppBlocked = 9,
2593    /// The request is denied because it violates [API key iOS application
2594    /// restrictions](<https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions>).
2595    ///
2596    /// Example of an ErrorInfo when the consumer "projects/123" fails to call
2597    /// "storage.googleapis.com" service because the request from the iOS apps
2598    /// violates the API key iOS application restrictions:
2599    ///
2600    ///      { "reason": "API_KEY_IOS_APP_BLOCKED",
2601    ///        "domain": "googleapis.com",
2602    ///        "metadata": {
2603    ///          "consumer": "projects/123",
2604    ///          "service": "storage.googleapis.com"
2605    ///        }
2606    ///      }
2607    ApiKeyIosAppBlocked = 13,
2608    /// The request is denied because there is not enough rate quota for the
2609    /// consumer.
2610    ///
2611    /// Example of an ErrorInfo when the consumer "projects/123" fails to contact
2612    /// "pubsub.googleapis.com" service because consumer's rate quota usage has
2613    /// reached the maximum value set for the quota limit
2614    /// "ReadsPerMinutePerProject" on the quota metric
2615    /// "pubsub.googleapis.com/read_requests":
2616    ///
2617    ///      { "reason": "RATE_LIMIT_EXCEEDED",
2618    ///        "domain": "googleapis.com",
2619    ///        "metadata": {
2620    ///          "consumer": "projects/123",
2621    ///          "service": "pubsub.googleapis.com",
2622    ///          "quota_metric": "pubsub.googleapis.com/read_requests",
2623    ///          "quota_limit": "ReadsPerMinutePerProject"
2624    ///        }
2625    ///      }
2626    ///
2627    /// Example of an ErrorInfo when the consumer "projects/123" checks quota on
2628    /// the service "dataflow.googleapis.com" and hits the organization quota
2629    /// limit "DefaultRequestsPerMinutePerOrganization" on the metric
2630    /// "dataflow.googleapis.com/default_requests".
2631    ///
2632    ///      { "reason": "RATE_LIMIT_EXCEEDED",
2633    ///        "domain": "googleapis.com",
2634    ///        "metadata": {
2635    ///          "consumer": "projects/123",
2636    ///          "service": "dataflow.googleapis.com",
2637    ///          "quota_metric": "dataflow.googleapis.com/default_requests",
2638    ///          "quota_limit": "DefaultRequestsPerMinutePerOrganization"
2639    ///        }
2640    ///      }
2641    RateLimitExceeded = 5,
2642    /// The request is denied because there is not enough resource quota for the
2643    /// consumer.
2644    ///
2645    /// Example of an ErrorInfo when the consumer "projects/123" fails to contact
2646    /// "compute.googleapis.com" service because consumer's resource quota usage
2647    /// has reached the maximum value set for the quota limit "VMsPerProject"
2648    /// on the quota metric "compute.googleapis.com/vms":
2649    ///
2650    ///      { "reason": "RESOURCE_QUOTA_EXCEEDED",
2651    ///        "domain": "googleapis.com",
2652    ///        "metadata": {
2653    ///          "consumer": "projects/123",
2654    ///          "service": "compute.googleapis.com",
2655    ///          "quota_metric": "compute.googleapis.com/vms",
2656    ///          "quota_limit": "VMsPerProject"
2657    ///        }
2658    ///      }
2659    ///
2660    /// Example of an ErrorInfo when the consumer "projects/123" checks resource
2661    /// quota on the service "dataflow.googleapis.com" and hits the organization
2662    /// quota limit "jobs-per-organization" on the metric
2663    /// "dataflow.googleapis.com/job_count".
2664    ///
2665    ///      { "reason": "RESOURCE_QUOTA_EXCEEDED",
2666    ///        "domain": "googleapis.com",
2667    ///        "metadata": {
2668    ///          "consumer": "projects/123",
2669    ///          "service": "dataflow.googleapis.com",
2670    ///          "quota_metric": "dataflow.googleapis.com/job_count",
2671    ///          "quota_limit": "jobs-per-organization"
2672    ///        }
2673    ///      }
2674    ResourceQuotaExceeded = 6,
2675    /// The request whose associated billing account address is in a tax restricted
2676    /// location, violates the local tax restrictions when creating resources in
2677    /// the restricted region.
2678    ///
2679    /// Example of an ErrorInfo when creating the Cloud Storage Bucket in the
2680    /// container "projects/123" under a tax restricted region
2681    /// "locations/asia-northeast3":
2682    ///
2683    ///      { "reason": "LOCATION_TAX_POLICY_VIOLATED",
2684    ///        "domain": "googleapis.com",
2685    ///        "metadata": {
2686    ///          "consumer": "projects/123",
2687    ///          "service": "storage.googleapis.com",
2688    ///          "location": "locations/asia-northeast3"
2689    ///        }
2690    ///      }
2691    ///
2692    /// This response indicates creating the Cloud Storage Bucket in
2693    /// "locations/asia-northeast3" violates the location tax restriction.
2694    LocationTaxPolicyViolated = 10,
2695    /// The request is denied because the caller does not have required permission
2696    /// on the user project "projects/123" or the user project is invalid. For more
2697    /// information, check the [userProject System
2698    /// Parameters](<https://cloud.google.com/apis/docs/system-parameters>).
2699    ///
2700    /// Example of an ErrorInfo when the caller is calling Cloud Storage service
2701    /// with insufficient permissions on the user project:
2702    ///
2703    ///      { "reason": "USER_PROJECT_DENIED",
2704    ///        "domain": "googleapis.com",
2705    ///        "metadata": {
2706    ///          "consumer": "projects/123",
2707    ///          "service": "storage.googleapis.com"
2708    ///        }
2709    ///      }
2710    UserProjectDenied = 11,
2711    /// The request is denied because the consumer "projects/123" is suspended due
2712    /// to Terms of Service(Tos) violations. Check [Project suspension
2713    /// guidelines](<https://cloud.google.com/resource-manager/docs/project-suspension-guidelines>)
2714    /// for more information.
2715    ///
2716    /// Example of an ErrorInfo when calling Cloud Storage service with the
2717    /// suspended consumer "projects/123":
2718    ///
2719    ///      { "reason": "CONSUMER_SUSPENDED",
2720    ///        "domain": "googleapis.com",
2721    ///        "metadata": {
2722    ///          "consumer": "projects/123",
2723    ///          "service": "storage.googleapis.com"
2724    ///        }
2725    ///      }
2726    ConsumerSuspended = 12,
2727    /// The request is denied because the associated consumer is invalid. It may be
2728    /// in a bad format, cannot be found, or have been deleted.
2729    ///
2730    /// Example of an ErrorInfo when calling Cloud Storage service with the
2731    /// invalid consumer "projects/123":
2732    ///
2733    ///      { "reason": "CONSUMER_INVALID",
2734    ///        "domain": "googleapis.com",
2735    ///        "metadata": {
2736    ///          "consumer": "projects/123",
2737    ///          "service": "storage.googleapis.com"
2738    ///        }
2739    ///      }
2740    ConsumerInvalid = 14,
2741    /// The request is denied because it violates [VPC Service
2742    /// Controls](<https://cloud.google.com/vpc-service-controls/docs/overview>).
2743    /// The 'uid' field is a random generated identifier that customer can use it
2744    /// to search the audit log for a request rejected by VPC Service Controls. For
2745    /// more information, please refer [VPC Service Controls
2746    /// Troubleshooting](<https://cloud.google.com/vpc-service-controls/docs/troubleshooting#unique-id>)
2747    ///
2748    /// Example of an ErrorInfo when the consumer "projects/123" fails to call
2749    /// Cloud Storage service because the request is prohibited by the VPC Service
2750    /// Controls.
2751    ///
2752    ///      { "reason": "SECURITY_POLICY_VIOLATED",
2753    ///        "domain": "googleapis.com",
2754    ///        "metadata": {
2755    ///          "uid": "123456789abcde",
2756    ///          "consumer": "projects/123",
2757    ///          "service": "storage.googleapis.com"
2758    ///        }
2759    ///      }
2760    SecurityPolicyViolated = 15,
2761    /// The request is denied because the provided access token has expired.
2762    ///
2763    /// Example of an ErrorInfo when the request is calling Cloud Storage service
2764    /// with an expired access token:
2765    ///
2766    ///      { "reason": "ACCESS_TOKEN_EXPIRED",
2767    ///        "domain": "googleapis.com",
2768    ///        "metadata": {
2769    ///          "service": "storage.googleapis.com",
2770    ///          "method": "google.storage.v1.Storage.GetObject"
2771    ///        }
2772    ///      }
2773    AccessTokenExpired = 16,
2774    /// The request is denied because the provided access token doesn't have at
2775    /// least one of the acceptable scopes required for the API. Please check
2776    /// [OAuth 2.0 Scopes for Google
2777    /// APIs](<https://developers.google.com/identity/protocols/oauth2/scopes>) for
2778    /// the list of the OAuth 2.0 scopes that you might need to request to access
2779    /// the API.
2780    ///
2781    /// Example of an ErrorInfo when the request is calling Cloud Storage service
2782    /// with an access token that is missing required scopes:
2783    ///
2784    ///      { "reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
2785    ///        "domain": "googleapis.com",
2786    ///        "metadata": {
2787    ///          "service": "storage.googleapis.com",
2788    ///          "method": "google.storage.v1.Storage.GetObject"
2789    ///        }
2790    ///      }
2791    AccessTokenScopeInsufficient = 17,
2792    /// The request is denied because the account associated with the provided
2793    /// access token is in an invalid state, such as disabled or deleted.
2794    /// For more information, see <https://cloud.google.com/docs/authentication.>
2795    ///
2796    /// Warning: For privacy reasons, the server may not be able to disclose the
2797    /// email address for some accounts. The client MUST NOT depend on the
2798    /// availability of the `email` attribute.
2799    ///
2800    /// Example of an ErrorInfo when the request is to the Cloud Storage API with
2801    /// an access token that is associated with a disabled or deleted [service
2802    /// account](<http://cloud/iam/docs/service-accounts>):
2803    ///
2804    ///      { "reason": "ACCOUNT_STATE_INVALID",
2805    ///        "domain": "googleapis.com",
2806    ///        "metadata": {
2807    ///          "service": "storage.googleapis.com",
2808    ///          "method": "google.storage.v1.Storage.GetObject",
2809    ///          "email": "user@123.iam.gserviceaccount.com"
2810    ///        }
2811    ///      }
2812    AccountStateInvalid = 18,
2813    /// The request is denied because the type of the provided access token is not
2814    /// supported by the API being called.
2815    ///
2816    /// Example of an ErrorInfo when the request is to the Cloud Storage API with
2817    /// an unsupported token type.
2818    ///
2819    ///      { "reason": "ACCESS_TOKEN_TYPE_UNSUPPORTED",
2820    ///        "domain": "googleapis.com",
2821    ///        "metadata": {
2822    ///          "service": "storage.googleapis.com",
2823    ///          "method": "google.storage.v1.Storage.GetObject"
2824    ///        }
2825    ///      }
2826    AccessTokenTypeUnsupported = 19,
2827    /// The request is denied because the request doesn't have any authentication
2828    /// credentials. For more information regarding the supported authentication
2829    /// strategies for Google Cloud APIs, see
2830    /// <https://cloud.google.com/docs/authentication.>
2831    ///
2832    /// Example of an ErrorInfo when the request is to the Cloud Storage API
2833    /// without any authentication credentials.
2834    ///
2835    ///      { "reason": "CREDENTIALS_MISSING",
2836    ///        "domain": "googleapis.com",
2837    ///        "metadata": {
2838    ///          "service": "storage.googleapis.com",
2839    ///          "method": "google.storage.v1.Storage.GetObject"
2840    ///        }
2841    ///      }
2842    CredentialsMissing = 20,
2843    /// The request is denied because the provided project owning the resource
2844    /// which acts as the [API
2845    /// consumer](<https://cloud.google.com/apis/design/glossary#api_consumer>) is
2846    /// invalid. It may be in a bad format or empty.
2847    ///
2848    /// Example of an ErrorInfo when the request is to the Cloud Functions API,
2849    /// but the offered resource project in the request in a bad format which can't
2850    /// perform the ListFunctions method.
2851    ///
2852    ///      { "reason": "RESOURCE_PROJECT_INVALID",
2853    ///        "domain": "googleapis.com",
2854    ///        "metadata": {
2855    ///          "service": "cloudfunctions.googleapis.com",
2856    ///          "method":
2857    ///          "google.cloud.functions.v1.CloudFunctionsService.ListFunctions"
2858    ///        }
2859    ///      }
2860    ResourceProjectInvalid = 21,
2861    /// The request is denied because the provided session cookie is missing,
2862    /// invalid or failed to decode.
2863    ///
2864    /// Example of an ErrorInfo when the request is calling Cloud Storage service
2865    /// with a SID cookie which can't be decoded.
2866    ///
2867    ///      { "reason": "SESSION_COOKIE_INVALID",
2868    ///        "domain": "googleapis.com",
2869    ///        "metadata": {
2870    ///          "service": "storage.googleapis.com",
2871    ///          "method": "google.storage.v1.Storage.GetObject",
2872    ///          "cookie": "SID"
2873    ///        }
2874    ///      }
2875    SessionCookieInvalid = 23,
2876    /// The request is denied because the user is from a Google Workspace customer
2877    /// that blocks their users from accessing a particular service.
2878    ///
2879    /// Example scenario: <https://support.google.com/a/answer/9197205?hl=en>
2880    ///
2881    /// Example of an ErrorInfo when access to Google Cloud Storage service is
2882    /// blocked by the Google Workspace administrator:
2883    ///
2884    ///      { "reason": "USER_BLOCKED_BY_ADMIN",
2885    ///        "domain": "googleapis.com",
2886    ///        "metadata": {
2887    ///          "service": "storage.googleapis.com",
2888    ///          "method": "google.storage.v1.Storage.GetObject",
2889    ///        }
2890    ///      }
2891    UserBlockedByAdmin = 24,
2892    /// The request is denied because the resource service usage is restricted
2893    /// by administrators according to the organization policy constraint.
2894    /// For more information see
2895    /// <https://cloud.google.com/resource-manager/docs/organization-policy/restricting-services.>
2896    ///
2897    /// Example of an ErrorInfo when access to Google Cloud Storage service is
2898    /// restricted by Resource Usage Restriction policy:
2899    ///
2900    ///      { "reason": "RESOURCE_USAGE_RESTRICTION_VIOLATED",
2901    ///        "domain": "googleapis.com",
2902    ///        "metadata": {
2903    ///          "consumer": "projects/project-123",
2904    ///          "service": "storage.googleapis.com"
2905    ///        }
2906    ///      }
2907    ResourceUsageRestrictionViolated = 25,
2908    /// Unimplemented. Do not use.
2909    ///
2910    /// The request is denied because it contains unsupported system parameters in
2911    /// URL query parameters or HTTP headers. For more information,
2912    /// see <https://cloud.google.com/apis/docs/system-parameters>
2913    ///
2914    /// Example of an ErrorInfo when access "pubsub.googleapis.com" service with
2915    /// a request header of "x-goog-user-ip":
2916    ///
2917    ///      { "reason": "SYSTEM_PARAMETER_UNSUPPORTED",
2918    ///        "domain": "googleapis.com",
2919    ///        "metadata": {
2920    ///          "service": "pubsub.googleapis.com"
2921    ///          "parameter": "x-goog-user-ip"
2922    ///        }
2923    ///      }
2924    SystemParameterUnsupported = 26,
2925    /// The request is denied because it violates Org Restriction: the requested
2926    /// resource does not belong to allowed organizations specified in
2927    /// "X-Goog-Allowed-Resources" header.
2928    ///
2929    /// Example of an ErrorInfo when accessing a GCP resource that is restricted by
2930    /// Org Restriction for "pubsub.googleapis.com" service.
2931    ///
2932    /// {
2933    ///    reason: "ORG_RESTRICTION_VIOLATION"
2934    ///    domain: "googleapis.com"
2935    ///    metadata {
2936    ///      "consumer":"projects/123456"
2937    ///      "service": "pubsub.googleapis.com"
2938    ///    }
2939    /// }
2940    OrgRestrictionViolation = 27,
2941    /// The request is denied because "X-Goog-Allowed-Resources" header is in a bad
2942    /// format.
2943    ///
2944    /// Example of an ErrorInfo when
2945    /// accessing "pubsub.googleapis.com" service with an invalid
2946    /// "X-Goog-Allowed-Resources" request header.
2947    ///
2948    /// {
2949    ///    reason: "ORG_RESTRICTION_HEADER_INVALID"
2950    ///    domain: "googleapis.com"
2951    ///    metadata {
2952    ///      "consumer":"projects/123456"
2953    ///      "service": "pubsub.googleapis.com"
2954    ///    }
2955    /// }
2956    OrgRestrictionHeaderInvalid = 28,
2957    /// Unimplemented. Do not use.
2958    ///
2959    /// The request is calling a service that is not visible to the consumer.
2960    ///
2961    /// Example of an ErrorInfo when the consumer "projects/123" contacting
2962    ///   "pubsub.googleapis.com" service which is not visible to the consumer.
2963    ///
2964    ///      { "reason": "SERVICE_NOT_VISIBLE",
2965    ///        "domain": "googleapis.com",
2966    ///        "metadata": {
2967    ///          "consumer": "projects/123",
2968    ///          "service": "pubsub.googleapis.com"
2969    ///        }
2970    ///      }
2971    ///
2972    /// This response indicates the "pubsub.googleapis.com" is not visible to
2973    /// "projects/123" (or it may not exist).
2974    ServiceNotVisible = 29,
2975    /// The request is related to a project for which GCP access is suspended.
2976    ///
2977    /// Example of an ErrorInfo when the consumer "projects/123" fails to contact
2978    /// "pubsub.googleapis.com" service because GCP access is suspended:
2979    ///
2980    ///      { "reason": "GCP_SUSPENDED",
2981    ///        "domain": "googleapis.com",
2982    ///        "metadata": {
2983    ///          "consumer": "projects/123",
2984    ///          "service": "pubsub.googleapis.com"
2985    ///        }
2986    ///      }
2987    ///
2988    /// This response indicates the associated GCP account has been suspended.
2989    GcpSuspended = 30,
2990    /// The request violates the location policies when creating resources in
2991    /// the restricted region.
2992    ///
2993    /// Example of an ErrorInfo when creating the Cloud Storage Bucket by
2994    /// "projects/123" for service storage.googleapis.com:
2995    ///
2996    ///      { "reason": "LOCATION_POLICY_VIOLATED",
2997    ///        "domain": "googleapis.com",
2998    ///        "metadata": {
2999    ///          "consumer": "projects/123",
3000    ///          "service": "storage.googleapis.com",
3001    ///        }
3002    ///      }
3003    ///
3004    /// This response indicates creating the Cloud Storage Bucket in
3005    /// "locations/asia-northeast3" violates at least one location policy.
3006    /// The troubleshooting guidance is provided in the Help links.
3007    LocationPolicyViolated = 31,
3008    /// The request is denied because origin request header is missing.
3009    ///
3010    /// Example of an ErrorInfo when
3011    /// accessing "pubsub.googleapis.com" service with an empty "Origin" request
3012    /// header.
3013    ///
3014    /// {
3015    ///    reason: "MISSING_ORIGIN"
3016    ///    domain: "googleapis.com"
3017    ///    metadata {
3018    ///      "consumer":"projects/123456"
3019    ///      "service": "pubsub.googleapis.com"
3020    ///    }
3021    /// }
3022    MissingOrigin = 33,
3023    /// The request is denied because the request contains more than one credential
3024    /// type that are individually acceptable, but not together. The customer
3025    /// should retry their request with only one set of credentials.
3026    ///
3027    /// Example of an ErrorInfo when
3028    /// accessing "pubsub.googleapis.com" service with overloaded credentials.
3029    ///
3030    /// {
3031    ///    reason: "OVERLOADED_CREDENTIALS"
3032    ///    domain: "googleapis.com"
3033    ///    metadata {
3034    ///      "consumer":"projects/123456"
3035    ///      "service": "pubsub.googleapis.com"
3036    ///    }
3037    /// }
3038    OverloadedCredentials = 34,
3039}
3040impl ErrorReason {
3041    /// String value of the enum field names used in the ProtoBuf definition.
3042    ///
3043    /// The values are not transformed in any way and thus are considered stable
3044    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3045    pub fn as_str_name(&self) -> &'static str {
3046        match self {
3047            Self::Unspecified => "ERROR_REASON_UNSPECIFIED",
3048            Self::ServiceDisabled => "SERVICE_DISABLED",
3049            Self::BillingDisabled => "BILLING_DISABLED",
3050            Self::ApiKeyInvalid => "API_KEY_INVALID",
3051            Self::ApiKeyServiceBlocked => "API_KEY_SERVICE_BLOCKED",
3052            Self::ApiKeyHttpReferrerBlocked => "API_KEY_HTTP_REFERRER_BLOCKED",
3053            Self::ApiKeyIpAddressBlocked => "API_KEY_IP_ADDRESS_BLOCKED",
3054            Self::ApiKeyAndroidAppBlocked => "API_KEY_ANDROID_APP_BLOCKED",
3055            Self::ApiKeyIosAppBlocked => "API_KEY_IOS_APP_BLOCKED",
3056            Self::RateLimitExceeded => "RATE_LIMIT_EXCEEDED",
3057            Self::ResourceQuotaExceeded => "RESOURCE_QUOTA_EXCEEDED",
3058            Self::LocationTaxPolicyViolated => "LOCATION_TAX_POLICY_VIOLATED",
3059            Self::UserProjectDenied => "USER_PROJECT_DENIED",
3060            Self::ConsumerSuspended => "CONSUMER_SUSPENDED",
3061            Self::ConsumerInvalid => "CONSUMER_INVALID",
3062            Self::SecurityPolicyViolated => "SECURITY_POLICY_VIOLATED",
3063            Self::AccessTokenExpired => "ACCESS_TOKEN_EXPIRED",
3064            Self::AccessTokenScopeInsufficient => "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
3065            Self::AccountStateInvalid => "ACCOUNT_STATE_INVALID",
3066            Self::AccessTokenTypeUnsupported => "ACCESS_TOKEN_TYPE_UNSUPPORTED",
3067            Self::CredentialsMissing => "CREDENTIALS_MISSING",
3068            Self::ResourceProjectInvalid => "RESOURCE_PROJECT_INVALID",
3069            Self::SessionCookieInvalid => "SESSION_COOKIE_INVALID",
3070            Self::UserBlockedByAdmin => "USER_BLOCKED_BY_ADMIN",
3071            Self::ResourceUsageRestrictionViolated => {
3072                "RESOURCE_USAGE_RESTRICTION_VIOLATED"
3073            }
3074            Self::SystemParameterUnsupported => "SYSTEM_PARAMETER_UNSUPPORTED",
3075            Self::OrgRestrictionViolation => "ORG_RESTRICTION_VIOLATION",
3076            Self::OrgRestrictionHeaderInvalid => "ORG_RESTRICTION_HEADER_INVALID",
3077            Self::ServiceNotVisible => "SERVICE_NOT_VISIBLE",
3078            Self::GcpSuspended => "GCP_SUSPENDED",
3079            Self::LocationPolicyViolated => "LOCATION_POLICY_VIOLATED",
3080            Self::MissingOrigin => "MISSING_ORIGIN",
3081            Self::OverloadedCredentials => "OVERLOADED_CREDENTIALS",
3082        }
3083    }
3084    /// Creates an enum from field names used in the ProtoBuf definition.
3085    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3086        match value {
3087            "ERROR_REASON_UNSPECIFIED" => Some(Self::Unspecified),
3088            "SERVICE_DISABLED" => Some(Self::ServiceDisabled),
3089            "BILLING_DISABLED" => Some(Self::BillingDisabled),
3090            "API_KEY_INVALID" => Some(Self::ApiKeyInvalid),
3091            "API_KEY_SERVICE_BLOCKED" => Some(Self::ApiKeyServiceBlocked),
3092            "API_KEY_HTTP_REFERRER_BLOCKED" => Some(Self::ApiKeyHttpReferrerBlocked),
3093            "API_KEY_IP_ADDRESS_BLOCKED" => Some(Self::ApiKeyIpAddressBlocked),
3094            "API_KEY_ANDROID_APP_BLOCKED" => Some(Self::ApiKeyAndroidAppBlocked),
3095            "API_KEY_IOS_APP_BLOCKED" => Some(Self::ApiKeyIosAppBlocked),
3096            "RATE_LIMIT_EXCEEDED" => Some(Self::RateLimitExceeded),
3097            "RESOURCE_QUOTA_EXCEEDED" => Some(Self::ResourceQuotaExceeded),
3098            "LOCATION_TAX_POLICY_VIOLATED" => Some(Self::LocationTaxPolicyViolated),
3099            "USER_PROJECT_DENIED" => Some(Self::UserProjectDenied),
3100            "CONSUMER_SUSPENDED" => Some(Self::ConsumerSuspended),
3101            "CONSUMER_INVALID" => Some(Self::ConsumerInvalid),
3102            "SECURITY_POLICY_VIOLATED" => Some(Self::SecurityPolicyViolated),
3103            "ACCESS_TOKEN_EXPIRED" => Some(Self::AccessTokenExpired),
3104            "ACCESS_TOKEN_SCOPE_INSUFFICIENT" => Some(Self::AccessTokenScopeInsufficient),
3105            "ACCOUNT_STATE_INVALID" => Some(Self::AccountStateInvalid),
3106            "ACCESS_TOKEN_TYPE_UNSUPPORTED" => Some(Self::AccessTokenTypeUnsupported),
3107            "CREDENTIALS_MISSING" => Some(Self::CredentialsMissing),
3108            "RESOURCE_PROJECT_INVALID" => Some(Self::ResourceProjectInvalid),
3109            "SESSION_COOKIE_INVALID" => Some(Self::SessionCookieInvalid),
3110            "USER_BLOCKED_BY_ADMIN" => Some(Self::UserBlockedByAdmin),
3111            "RESOURCE_USAGE_RESTRICTION_VIOLATED" => {
3112                Some(Self::ResourceUsageRestrictionViolated)
3113            }
3114            "SYSTEM_PARAMETER_UNSUPPORTED" => Some(Self::SystemParameterUnsupported),
3115            "ORG_RESTRICTION_VIOLATION" => Some(Self::OrgRestrictionViolation),
3116            "ORG_RESTRICTION_HEADER_INVALID" => Some(Self::OrgRestrictionHeaderInvalid),
3117            "SERVICE_NOT_VISIBLE" => Some(Self::ServiceNotVisible),
3118            "GCP_SUSPENDED" => Some(Self::GcpSuspended),
3119            "LOCATION_POLICY_VIOLATED" => Some(Self::LocationPolicyViolated),
3120            "MISSING_ORIGIN" => Some(Self::MissingOrigin),
3121            "OVERLOADED_CREDENTIALS" => Some(Self::OverloadedCredentials),
3122            _ => None,
3123        }
3124    }
3125}
3126/// Rich semantic information of an API field beyond basic typing.
3127#[derive(Clone, PartialEq, ::prost::Message)]
3128pub struct FieldInfo {
3129    /// The standard format of a field value. This does not explicitly configure
3130    /// any API consumer, just documents the API's format for the field it is
3131    /// applied to.
3132    #[prost(enumeration = "field_info::Format", tag = "1")]
3133    pub format: i32,
3134    /// The type(s) that the annotated, generic field may represent.
3135    ///
3136    /// Currently, this must only be used on fields of type `google.protobuf.Any`.
3137    /// Supporting other generic types may be considered in the future.
3138    #[prost(message, repeated, tag = "2")]
3139    pub referenced_types: ::prost::alloc::vec::Vec<TypeReference>,
3140}
3141/// Nested message and enum types in `FieldInfo`.
3142pub mod field_info {
3143    /// The standard format of a field value. The supported formats are all backed
3144    /// by either an RFC defined by the IETF or a Google-defined AIP.
3145    #[derive(
3146        Clone,
3147        Copy,
3148        Debug,
3149        PartialEq,
3150        Eq,
3151        Hash,
3152        PartialOrd,
3153        Ord,
3154        ::prost::Enumeration
3155    )]
3156    #[repr(i32)]
3157    pub enum Format {
3158        /// Default, unspecified value.
3159        Unspecified = 0,
3160        /// Universally Unique Identifier, version 4, value as defined by
3161        /// <https://datatracker.ietf.org/doc/html/rfc4122.> The value may be
3162        /// normalized to entirely lowercase letters. For example, the value
3163        /// `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to
3164        /// `f47ac10b-58cc-0372-8567-0e02b2c3d479`.
3165        Uuid4 = 1,
3166        /// Internet Protocol v4 value as defined by [RFC
3167        /// 791](<https://datatracker.ietf.org/doc/html/rfc791>). The value may be
3168        /// condensed, with leading zeros in each octet stripped. For example,
3169        /// `001.022.233.040` would be condensed to `1.22.233.40`.
3170        Ipv4 = 2,
3171        /// Internet Protocol v6 value as defined by [RFC
3172        /// 2460](<https://datatracker.ietf.org/doc/html/rfc2460>). The value may be
3173        /// normalized to entirely lowercase letters with zeros compressed, following
3174        /// [RFC 5952](<https://datatracker.ietf.org/doc/html/rfc5952>). For example,
3175        /// the value `2001:0DB8:0::0` would be normalized to `2001:db8::`.
3176        Ipv6 = 3,
3177        /// An IP address in either v4 or v6 format as described by the individual
3178        /// values defined herein. See the comments on the IPV4 and IPV6 types for
3179        /// allowed normalizations of each.
3180        Ipv4OrIpv6 = 4,
3181    }
3182    impl Format {
3183        /// String value of the enum field names used in the ProtoBuf definition.
3184        ///
3185        /// The values are not transformed in any way and thus are considered stable
3186        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3187        pub fn as_str_name(&self) -> &'static str {
3188            match self {
3189                Self::Unspecified => "FORMAT_UNSPECIFIED",
3190                Self::Uuid4 => "UUID4",
3191                Self::Ipv4 => "IPV4",
3192                Self::Ipv6 => "IPV6",
3193                Self::Ipv4OrIpv6 => "IPV4_OR_IPV6",
3194            }
3195        }
3196        /// Creates an enum from field names used in the ProtoBuf definition.
3197        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3198            match value {
3199                "FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
3200                "UUID4" => Some(Self::Uuid4),
3201                "IPV4" => Some(Self::Ipv4),
3202                "IPV6" => Some(Self::Ipv6),
3203                "IPV4_OR_IPV6" => Some(Self::Ipv4OrIpv6),
3204                _ => None,
3205            }
3206        }
3207    }
3208}
3209/// A reference to a message type, for use in [FieldInfo][google.api.FieldInfo].
3210#[derive(Clone, PartialEq, ::prost::Message)]
3211pub struct TypeReference {
3212    /// The name of the type that the annotated, generic field may represent.
3213    /// If the type is in the same protobuf package, the value can be the simple
3214    /// message name e.g., `"MyMessage"`. Otherwise, the value must be the
3215    /// fully-qualified message name e.g., `"google.library.v1.Book"`.
3216    ///
3217    /// If the type(s) are unknown to the service (e.g. the field accepts generic
3218    /// user input), use the wildcard `"*"` to denote this behavior.
3219    ///
3220    /// See [AIP-202](<https://google.aip.dev/202#type-references>) for more details.
3221    #[prost(string, tag = "1")]
3222    pub type_name: ::prost::alloc::string::String,
3223}
3224/// Message that represents an arbitrary HTTP body. It should only be used for
3225/// payload formats that can't be represented as JSON, such as raw binary or
3226/// an HTML page.
3227///
3228///
3229/// This message can be used both in streaming and non-streaming API methods in
3230/// the request as well as the response.
3231///
3232/// It can be used as a top-level request field, which is convenient if one
3233/// wants to extract parameters from either the URL or HTTP template into the
3234/// request fields and also want access to the raw HTTP body.
3235///
3236/// Example:
3237///
3238///      message GetResourceRequest {
3239///        // A unique request id.
3240///        string request_id = 1;
3241///
3242///        // The raw HTTP body is bound to this field.
3243///        google.api.HttpBody http_body = 2;
3244///
3245///      }
3246///
3247///      service ResourceService {
3248///        rpc GetResource(GetResourceRequest)
3249///          returns (google.api.HttpBody);
3250///        rpc UpdateResource(google.api.HttpBody)
3251///          returns (google.protobuf.Empty);
3252///
3253///      }
3254///
3255/// Example with streaming methods:
3256///
3257///      service CaldavService {
3258///        rpc GetCalendar(stream google.api.HttpBody)
3259///          returns (stream google.api.HttpBody);
3260///        rpc UpdateCalendar(stream google.api.HttpBody)
3261///          returns (stream google.api.HttpBody);
3262///
3263///      }
3264///
3265/// Use of this type only changes how the request and response bodies are
3266/// handled, all other features will continue to work unchanged.
3267#[derive(Clone, PartialEq, ::prost::Message)]
3268pub struct HttpBody {
3269    /// The HTTP Content-Type header value specifying the content type of the body.
3270    #[prost(string, tag = "1")]
3271    pub content_type: ::prost::alloc::string::String,
3272    /// The HTTP request/response body as raw binary.
3273    #[prost(bytes = "vec", tag = "2")]
3274    pub data: ::prost::alloc::vec::Vec<u8>,
3275    /// Application specific response metadata. Must be set in the first response
3276    /// for streaming APIs.
3277    #[prost(message, repeated, tag = "3")]
3278    pub extensions: ::prost::alloc::vec::Vec<::prost_types::Any>,
3279}
3280/// A description of a label.
3281#[derive(Clone, PartialEq, ::prost::Message)]
3282pub struct LabelDescriptor {
3283    /// The label key.
3284    #[prost(string, tag = "1")]
3285    pub key: ::prost::alloc::string::String,
3286    /// The type of data that can be assigned to the label.
3287    #[prost(enumeration = "label_descriptor::ValueType", tag = "2")]
3288    pub value_type: i32,
3289    /// A human-readable description for the label.
3290    #[prost(string, tag = "3")]
3291    pub description: ::prost::alloc::string::String,
3292}
3293/// Nested message and enum types in `LabelDescriptor`.
3294pub mod label_descriptor {
3295    /// Value types that can be used as label values.
3296    #[derive(
3297        Clone,
3298        Copy,
3299        Debug,
3300        PartialEq,
3301        Eq,
3302        Hash,
3303        PartialOrd,
3304        Ord,
3305        ::prost::Enumeration
3306    )]
3307    #[repr(i32)]
3308    pub enum ValueType {
3309        /// A variable-length string. This is the default.
3310        String = 0,
3311        /// Boolean; true or false.
3312        Bool = 1,
3313        /// A 64-bit signed integer.
3314        Int64 = 2,
3315    }
3316    impl ValueType {
3317        /// String value of the enum field names used in the ProtoBuf definition.
3318        ///
3319        /// The values are not transformed in any way and thus are considered stable
3320        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3321        pub fn as_str_name(&self) -> &'static str {
3322            match self {
3323                Self::String => "STRING",
3324                Self::Bool => "BOOL",
3325                Self::Int64 => "INT64",
3326            }
3327        }
3328        /// Creates an enum from field names used in the ProtoBuf definition.
3329        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3330            match value {
3331                "STRING" => Some(Self::String),
3332                "BOOL" => Some(Self::Bool),
3333                "INT64" => Some(Self::Int64),
3334                _ => None,
3335            }
3336        }
3337    }
3338}
3339/// A description of a log type. Example in YAML format:
3340///
3341///      - name: library.googleapis.com/activity_history
3342///        description: The history of borrowing and returning library items.
3343///        display_name: Activity
3344///        labels:
3345///        - key: /customer_id
3346///          description: Identifier of a library customer
3347#[derive(Clone, PartialEq, ::prost::Message)]
3348pub struct LogDescriptor {
3349    /// The name of the log. It must be less than 512 characters long and can
3350    /// include the following characters: upper- and lower-case alphanumeric
3351    /// characters \[A-Za-z0-9\], and punctuation characters including
3352    /// slash, underscore, hyphen, period \[/_-.\].
3353    #[prost(string, tag = "1")]
3354    pub name: ::prost::alloc::string::String,
3355    /// The set of labels that are available to describe a specific log entry.
3356    /// Runtime requests that contain labels not specified here are
3357    /// considered invalid.
3358    #[prost(message, repeated, tag = "2")]
3359    pub labels: ::prost::alloc::vec::Vec<LabelDescriptor>,
3360    /// A human-readable description of this log. This information appears in
3361    /// the documentation and can contain details.
3362    #[prost(string, tag = "3")]
3363    pub description: ::prost::alloc::string::String,
3364    /// The human-readable name for this log. This information appears on
3365    /// the user interface and should be concise.
3366    #[prost(string, tag = "4")]
3367    pub display_name: ::prost::alloc::string::String,
3368}
3369/// Logging configuration of the service.
3370///
3371/// The following example shows how to configure logs to be sent to the
3372/// producer and consumer projects. In the example, the `activity_history`
3373/// log is sent to both the producer and consumer projects, whereas the
3374/// `purchase_history` log is only sent to the producer project.
3375///
3376///      monitored_resources:
3377///      - type: library.googleapis.com/branch
3378///        labels:
3379///        - key: /city
3380///          description: The city where the library branch is located in.
3381///        - key: /name
3382///          description: The name of the branch.
3383///      logs:
3384///      - name: activity_history
3385///        labels:
3386///        - key: /customer_id
3387///      - name: purchase_history
3388///      logging:
3389///        producer_destinations:
3390///        - monitored_resource: library.googleapis.com/branch
3391///          logs:
3392///          - activity_history
3393///          - purchase_history
3394///        consumer_destinations:
3395///        - monitored_resource: library.googleapis.com/branch
3396///          logs:
3397///          - activity_history
3398#[derive(Clone, PartialEq, ::prost::Message)]
3399pub struct Logging {
3400    /// Logging configurations for sending logs to the producer project.
3401    /// There can be multiple producer destinations, each one must have a
3402    /// different monitored resource type. A log can be used in at most
3403    /// one producer destination.
3404    #[prost(message, repeated, tag = "1")]
3405    pub producer_destinations: ::prost::alloc::vec::Vec<logging::LoggingDestination>,
3406    /// Logging configurations for sending logs to the consumer project.
3407    /// There can be multiple consumer destinations, each one must have a
3408    /// different monitored resource type. A log can be used in at most
3409    /// one consumer destination.
3410    #[prost(message, repeated, tag = "2")]
3411    pub consumer_destinations: ::prost::alloc::vec::Vec<logging::LoggingDestination>,
3412}
3413/// Nested message and enum types in `Logging`.
3414pub mod logging {
3415    /// Configuration of a specific logging destination (the producer project
3416    /// or the consumer project).
3417    #[derive(Clone, PartialEq, ::prost::Message)]
3418    pub struct LoggingDestination {
3419        /// The monitored resource type. The type must be defined in the
3420        /// [Service.monitored_resources][google.api.Service.monitored_resources]
3421        /// section.
3422        #[prost(string, tag = "3")]
3423        pub monitored_resource: ::prost::alloc::string::String,
3424        /// Names of the logs to be sent to this destination. Each name must
3425        /// be defined in the [Service.logs][google.api.Service.logs] section. If the
3426        /// log name is not a domain scoped name, it will be automatically prefixed
3427        /// with the service name followed by "/".
3428        #[prost(string, repeated, tag = "1")]
3429        pub logs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3430    }
3431}
3432/// Defines a metric type and its schema. Once a metric descriptor is created,
3433/// deleting or altering it stops data collection and makes the metric type's
3434/// existing data unusable.
3435///
3436#[derive(Clone, PartialEq, ::prost::Message)]
3437pub struct MetricDescriptor {
3438    /// The resource name of the metric descriptor.
3439    #[prost(string, tag = "1")]
3440    pub name: ::prost::alloc::string::String,
3441    /// The metric type, including its DNS name prefix. The type is not
3442    /// URL-encoded. All user-defined metric types have the DNS name
3443    /// `custom.googleapis.com` or `external.googleapis.com`. Metric types should
3444    /// use a natural hierarchical grouping. For example:
3445    ///
3446    ///      "custom.googleapis.com/invoice/paid/amount"
3447    ///      "external.googleapis.com/prometheus/up"
3448    ///      "appengine.googleapis.com/http/server/response_latencies"
3449    #[prost(string, tag = "8")]
3450    pub r#type: ::prost::alloc::string::String,
3451    /// The set of labels that can be used to describe a specific
3452    /// instance of this metric type. For example, the
3453    /// `appengine.googleapis.com/http/server/response_latencies` metric
3454    /// type has a label for the HTTP response code, `response_code`, so
3455    /// you can look at latencies for successful responses or just
3456    /// for responses that failed.
3457    #[prost(message, repeated, tag = "2")]
3458    pub labels: ::prost::alloc::vec::Vec<LabelDescriptor>,
3459    /// Whether the metric records instantaneous values, changes to a value, etc.
3460    /// Some combinations of `metric_kind` and `value_type` might not be supported.
3461    #[prost(enumeration = "metric_descriptor::MetricKind", tag = "3")]
3462    pub metric_kind: i32,
3463    /// Whether the measurement is an integer, a floating-point number, etc.
3464    /// Some combinations of `metric_kind` and `value_type` might not be supported.
3465    #[prost(enumeration = "metric_descriptor::ValueType", tag = "4")]
3466    pub value_type: i32,
3467    /// The units in which the metric value is reported. It is only applicable
3468    /// if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
3469    /// defines the representation of the stored metric values.
3470    ///
3471    /// Different systems might scale the values to be more easily displayed (so a
3472    /// value of `0.02kBy` _might_ be displayed as `20By`, and a value of
3473    /// `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
3474    /// `kBy`, then the value of the metric is always in thousands of bytes, no
3475    /// matter how it might be displayed.
3476    ///
3477    /// If you want a custom metric to record the exact number of CPU-seconds used
3478    /// by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
3479    /// `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
3480    /// CPU-seconds, then the value is written as `12005`.
3481    ///
3482    /// Alternatively, if you want a custom metric to record data in a more
3483    /// granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
3484    /// `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
3485    /// or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
3486    ///
3487    /// The supported units are a subset of [The Unified Code for Units of
3488    /// Measure](<https://unitsofmeasure.org/ucum.html>) standard:
3489    ///
3490    /// **Basic units (UNIT)**
3491    ///
3492    /// * `bit`   bit
3493    /// * `By`    byte
3494    /// * `s`     second
3495    /// * `min`   minute
3496    /// * `h`     hour
3497    /// * `d`     day
3498    /// * `1`     dimensionless
3499    ///
3500    /// **Prefixes (PREFIX)**
3501    ///
3502    /// * `k`     kilo    (10^3)
3503    /// * `M`     mega    (10^6)
3504    /// * `G`     giga    (10^9)
3505    /// * `T`     tera    (10^12)
3506    /// * `P`     peta    (10^15)
3507    /// * `E`     exa     (10^18)
3508    /// * `Z`     zetta   (10^21)
3509    /// * `Y`     yotta   (10^24)
3510    ///
3511    /// * `m`     milli   (10^-3)
3512    /// * `u`     micro   (10^-6)
3513    /// * `n`     nano    (10^-9)
3514    /// * `p`     pico    (10^-12)
3515    /// * `f`     femto   (10^-15)
3516    /// * `a`     atto    (10^-18)
3517    /// * `z`     zepto   (10^-21)
3518    /// * `y`     yocto   (10^-24)
3519    ///
3520    /// * `Ki`    kibi    (2^10)
3521    /// * `Mi`    mebi    (2^20)
3522    /// * `Gi`    gibi    (2^30)
3523    /// * `Ti`    tebi    (2^40)
3524    /// * `Pi`    pebi    (2^50)
3525    ///
3526    /// **Grammar**
3527    ///
3528    /// The grammar also includes these connectors:
3529    ///
3530    /// * `/`    division or ratio (as an infix operator). For examples,
3531    ///           `kBy/{email}` or `MiBy/10ms` (although you should almost never
3532    ///           have `/s` in a metric `unit`; rates should always be computed at
3533    ///           query time from the underlying cumulative or delta value).
3534    /// * `.`    multiplication or composition (as an infix operator). For
3535    ///           examples, `GBy.d` or `k{watt}.h`.
3536    ///
3537    /// The grammar for a unit is as follows:
3538    ///
3539    ///      Expression = Component { "." Component } { "/" Component } ;
3540    ///
3541    ///      Component = ( \[ PREFIX \] UNIT | "%" ) \[ Annotation \]
3542    ///                | Annotation
3543    ///                | "1"
3544    ///                ;
3545    ///
3546    ///      Annotation = "{" NAME "}" ;
3547    ///
3548    /// Notes:
3549    ///
3550    /// * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
3551    ///     is used alone, then the unit is equivalent to `1`. For examples,
3552    ///     `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
3553    /// * `NAME` is a sequence of non-blank printable ASCII characters not
3554    ///     containing `{` or `}`.
3555    /// * `1` represents a unitary [dimensionless
3556    ///     unit](<https://en.wikipedia.org/wiki/Dimensionless_quantity>) of 1, such
3557    ///     as in `1/s`. It is typically used when none of the basic units are
3558    ///     appropriate. For example, "new users per day" can be represented as
3559    ///     `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
3560    ///     users). Alternatively, "thousands of page views per day" would be
3561    ///     represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
3562    ///     value of `5.3` would mean "5300 page views per day").
3563    /// * `%` represents dimensionless value of 1/100, and annotates values giving
3564    ///     a percentage (so the metric values are typically in the range of 0..100,
3565    ///     and a metric value `3` means "3 percent").
3566    /// * `10^2.%` indicates a metric contains a ratio, typically in the range
3567    ///     0..1, that will be multiplied by 100 and displayed as a percentage
3568    ///     (so a metric value `0.03` means "3 percent").
3569    #[prost(string, tag = "5")]
3570    pub unit: ::prost::alloc::string::String,
3571    /// A detailed description of the metric, which can be used in documentation.
3572    #[prost(string, tag = "6")]
3573    pub description: ::prost::alloc::string::String,
3574    /// A concise name for the metric, which can be displayed in user interfaces.
3575    /// Use sentence case without an ending period, for example "Request count".
3576    /// This field is optional but it is recommended to be set for any metrics
3577    /// associated with user-visible concepts, such as Quota.
3578    #[prost(string, tag = "7")]
3579    pub display_name: ::prost::alloc::string::String,
3580    /// Optional. Metadata which can be used to guide usage of the metric.
3581    #[prost(message, optional, tag = "10")]
3582    pub metadata: ::core::option::Option<metric_descriptor::MetricDescriptorMetadata>,
3583    /// Optional. The launch stage of the metric definition.
3584    #[prost(enumeration = "LaunchStage", tag = "12")]
3585    pub launch_stage: i32,
3586    /// Read-only. If present, then a [time
3587    /// series][google.monitoring.v3.TimeSeries], which is identified partially by
3588    /// a metric type and a
3589    /// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
3590    /// is associated with this metric type can only be associated with one of the
3591    /// monitored resource types listed here.
3592    #[prost(string, repeated, tag = "13")]
3593    pub monitored_resource_types: ::prost::alloc::vec::Vec<
3594        ::prost::alloc::string::String,
3595    >,
3596}
3597/// Nested message and enum types in `MetricDescriptor`.
3598pub mod metric_descriptor {
3599    /// Additional annotations that can be used to guide the usage of a metric.
3600    #[derive(Clone, PartialEq, ::prost::Message)]
3601    pub struct MetricDescriptorMetadata {
3602        /// Deprecated. Must use the
3603        /// [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
3604        /// instead.
3605        #[deprecated]
3606        #[prost(enumeration = "super::LaunchStage", tag = "1")]
3607        pub launch_stage: i32,
3608        /// The sampling period of metric data points. For metrics which are written
3609        /// periodically, consecutive data points are stored at this time interval,
3610        /// excluding data loss due to errors. Metrics with a higher granularity have
3611        /// a smaller sampling period.
3612        #[prost(message, optional, tag = "2")]
3613        pub sample_period: ::core::option::Option<::prost_types::Duration>,
3614        /// The delay of data points caused by ingestion. Data points older than this
3615        /// age are guaranteed to be ingested and available to be read, excluding
3616        /// data loss due to errors.
3617        #[prost(message, optional, tag = "3")]
3618        pub ingest_delay: ::core::option::Option<::prost_types::Duration>,
3619        /// The scope of the timeseries data of the metric.
3620        #[prost(
3621            enumeration = "metric_descriptor_metadata::TimeSeriesResourceHierarchyLevel",
3622            repeated,
3623            tag = "4"
3624        )]
3625        pub time_series_resource_hierarchy_level: ::prost::alloc::vec::Vec<i32>,
3626    }
3627    /// Nested message and enum types in `MetricDescriptorMetadata`.
3628    pub mod metric_descriptor_metadata {
3629        /// The resource hierarchy level of the timeseries data of a metric.
3630        #[derive(
3631            Clone,
3632            Copy,
3633            Debug,
3634            PartialEq,
3635            Eq,
3636            Hash,
3637            PartialOrd,
3638            Ord,
3639            ::prost::Enumeration
3640        )]
3641        #[repr(i32)]
3642        pub enum TimeSeriesResourceHierarchyLevel {
3643            /// Do not use this default value.
3644            Unspecified = 0,
3645            /// Scopes a metric to a project.
3646            Project = 1,
3647            /// Scopes a metric to an organization.
3648            Organization = 2,
3649            /// Scopes a metric to a folder.
3650            Folder = 3,
3651        }
3652        impl TimeSeriesResourceHierarchyLevel {
3653            /// String value of the enum field names used in the ProtoBuf definition.
3654            ///
3655            /// The values are not transformed in any way and thus are considered stable
3656            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3657            pub fn as_str_name(&self) -> &'static str {
3658                match self {
3659                    Self::Unspecified => {
3660                        "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED"
3661                    }
3662                    Self::Project => "PROJECT",
3663                    Self::Organization => "ORGANIZATION",
3664                    Self::Folder => "FOLDER",
3665                }
3666            }
3667            /// Creates an enum from field names used in the ProtoBuf definition.
3668            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3669                match value {
3670                    "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED" => {
3671                        Some(Self::Unspecified)
3672                    }
3673                    "PROJECT" => Some(Self::Project),
3674                    "ORGANIZATION" => Some(Self::Organization),
3675                    "FOLDER" => Some(Self::Folder),
3676                    _ => None,
3677                }
3678            }
3679        }
3680    }
3681    /// The kind of measurement. It describes how the data is reported.
3682    /// For information on setting the start time and end time based on
3683    /// the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval].
3684    #[derive(
3685        Clone,
3686        Copy,
3687        Debug,
3688        PartialEq,
3689        Eq,
3690        Hash,
3691        PartialOrd,
3692        Ord,
3693        ::prost::Enumeration
3694    )]
3695    #[repr(i32)]
3696    pub enum MetricKind {
3697        /// Do not use this default value.
3698        Unspecified = 0,
3699        /// An instantaneous measurement of a value.
3700        Gauge = 1,
3701        /// The change in a value during a time interval.
3702        Delta = 2,
3703        /// A value accumulated over a time interval.  Cumulative
3704        /// measurements in a time series should have the same start time
3705        /// and increasing end times, until an event resets the cumulative
3706        /// value to zero and sets a new start time for the following
3707        /// points.
3708        Cumulative = 3,
3709    }
3710    impl MetricKind {
3711        /// String value of the enum field names used in the ProtoBuf definition.
3712        ///
3713        /// The values are not transformed in any way and thus are considered stable
3714        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3715        pub fn as_str_name(&self) -> &'static str {
3716            match self {
3717                Self::Unspecified => "METRIC_KIND_UNSPECIFIED",
3718                Self::Gauge => "GAUGE",
3719                Self::Delta => "DELTA",
3720                Self::Cumulative => "CUMULATIVE",
3721            }
3722        }
3723        /// Creates an enum from field names used in the ProtoBuf definition.
3724        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3725            match value {
3726                "METRIC_KIND_UNSPECIFIED" => Some(Self::Unspecified),
3727                "GAUGE" => Some(Self::Gauge),
3728                "DELTA" => Some(Self::Delta),
3729                "CUMULATIVE" => Some(Self::Cumulative),
3730                _ => None,
3731            }
3732        }
3733    }
3734    /// The value type of a metric.
3735    #[derive(
3736        Clone,
3737        Copy,
3738        Debug,
3739        PartialEq,
3740        Eq,
3741        Hash,
3742        PartialOrd,
3743        Ord,
3744        ::prost::Enumeration
3745    )]
3746    #[repr(i32)]
3747    pub enum ValueType {
3748        /// Do not use this default value.
3749        Unspecified = 0,
3750        /// The value is a boolean.
3751        /// This value type can be used only if the metric kind is `GAUGE`.
3752        Bool = 1,
3753        /// The value is a signed 64-bit integer.
3754        Int64 = 2,
3755        /// The value is a double precision floating point number.
3756        Double = 3,
3757        /// The value is a text string.
3758        /// This value type can be used only if the metric kind is `GAUGE`.
3759        String = 4,
3760        /// The value is a [`Distribution`][google.api.Distribution].
3761        Distribution = 5,
3762        /// The value is money.
3763        Money = 6,
3764    }
3765    impl ValueType {
3766        /// String value of the enum field names used in the ProtoBuf definition.
3767        ///
3768        /// The values are not transformed in any way and thus are considered stable
3769        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3770        pub fn as_str_name(&self) -> &'static str {
3771            match self {
3772                Self::Unspecified => "VALUE_TYPE_UNSPECIFIED",
3773                Self::Bool => "BOOL",
3774                Self::Int64 => "INT64",
3775                Self::Double => "DOUBLE",
3776                Self::String => "STRING",
3777                Self::Distribution => "DISTRIBUTION",
3778                Self::Money => "MONEY",
3779            }
3780        }
3781        /// Creates an enum from field names used in the ProtoBuf definition.
3782        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3783            match value {
3784                "VALUE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
3785                "BOOL" => Some(Self::Bool),
3786                "INT64" => Some(Self::Int64),
3787                "DOUBLE" => Some(Self::Double),
3788                "STRING" => Some(Self::String),
3789                "DISTRIBUTION" => Some(Self::Distribution),
3790                "MONEY" => Some(Self::Money),
3791                _ => None,
3792            }
3793        }
3794    }
3795}
3796/// A specific metric, identified by specifying values for all of the
3797/// labels of a [`MetricDescriptor`][google.api.MetricDescriptor].
3798#[derive(Clone, PartialEq, ::prost::Message)]
3799pub struct Metric {
3800    /// An existing metric type, see
3801    /// [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
3802    /// `custom.googleapis.com/invoice/paid/amount`.
3803    #[prost(string, tag = "3")]
3804    pub r#type: ::prost::alloc::string::String,
3805    /// The set of label values that uniquely identify this metric. All
3806    /// labels listed in the `MetricDescriptor` must be assigned values.
3807    #[prost(map = "string, string", tag = "2")]
3808    pub labels: ::std::collections::HashMap<
3809        ::prost::alloc::string::String,
3810        ::prost::alloc::string::String,
3811    >,
3812}
3813/// An object that describes the schema of a
3814/// [MonitoredResource][google.api.MonitoredResource] object using a type name
3815/// and a set of labels.  For example, the monitored resource descriptor for
3816/// Google Compute Engine VM instances has a type of
3817/// `"gce_instance"` and specifies the use of the labels `"instance_id"` and
3818/// `"zone"` to identify particular VM instances.
3819///
3820/// Different APIs can support different monitored resource types. APIs generally
3821/// provide a `list` method that returns the monitored resource descriptors used
3822/// by the API.
3823///
3824#[derive(Clone, PartialEq, ::prost::Message)]
3825pub struct MonitoredResourceDescriptor {
3826    /// Optional. The resource name of the monitored resource descriptor:
3827    /// `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
3828    /// {type} is the value of the `type` field in this object and
3829    /// {project_id} is a project ID that provides API-specific context for
3830    /// accessing the type.  APIs that do not use project information can use the
3831    /// resource name format `"monitoredResourceDescriptors/{type}"`.
3832    #[prost(string, tag = "5")]
3833    pub name: ::prost::alloc::string::String,
3834    /// Required. The monitored resource type. For example, the type
3835    /// `"cloudsql_database"` represents databases in Google Cloud SQL.
3836    ///   For a list of types, see [Monitored resource
3837    ///   types](<https://cloud.google.com/monitoring/api/resources>)
3838    /// and [Logging resource
3839    /// types](<https://cloud.google.com/logging/docs/api/v2/resource-list>).
3840    #[prost(string, tag = "1")]
3841    pub r#type: ::prost::alloc::string::String,
3842    /// Optional. A concise name for the monitored resource type that might be
3843    /// displayed in user interfaces. It should be a Title Cased Noun Phrase,
3844    /// without any article or other determiners. For example,
3845    /// `"Google Cloud SQL Database"`.
3846    #[prost(string, tag = "2")]
3847    pub display_name: ::prost::alloc::string::String,
3848    /// Optional. A detailed description of the monitored resource type that might
3849    /// be used in documentation.
3850    #[prost(string, tag = "3")]
3851    pub description: ::prost::alloc::string::String,
3852    /// Required. A set of labels used to describe instances of this monitored
3853    /// resource type. For example, an individual Google Cloud SQL database is
3854    /// identified by values for the labels `"database_id"` and `"zone"`.
3855    #[prost(message, repeated, tag = "4")]
3856    pub labels: ::prost::alloc::vec::Vec<LabelDescriptor>,
3857    /// Optional. The launch stage of the monitored resource definition.
3858    #[prost(enumeration = "LaunchStage", tag = "7")]
3859    pub launch_stage: i32,
3860}
3861/// An object representing a resource that can be used for monitoring, logging,
3862/// billing, or other purposes. Examples include virtual machine instances,
3863/// databases, and storage devices such as disks. The `type` field identifies a
3864/// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object
3865/// that describes the resource's schema. Information in the `labels` field
3866/// identifies the actual resource and its attributes according to the schema.
3867/// For example, a particular Compute Engine VM instance could be represented by
3868/// the following object, because the
3869/// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for
3870/// `"gce_instance"` has labels
3871/// `"project_id"`, `"instance_id"` and `"zone"`:
3872///
3873///      { "type": "gce_instance",
3874///        "labels": { "project_id": "my-project",
3875///                    "instance_id": "12345678901234",
3876///                    "zone": "us-central1-a" }}
3877#[derive(Clone, PartialEq, ::prost::Message)]
3878pub struct MonitoredResource {
3879    /// Required. The monitored resource type. This field must match
3880    /// the `type` field of a
3881    /// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
3882    /// object. For example, the type of a Compute Engine VM instance is
3883    /// `gce_instance`. Some descriptors include the service name in the type; for
3884    /// example, the type of a Datastream stream is
3885    /// `datastream.googleapis.com/Stream`.
3886    #[prost(string, tag = "1")]
3887    pub r#type: ::prost::alloc::string::String,
3888    /// Required. Values for all of the labels listed in the associated monitored
3889    /// resource descriptor. For example, Compute Engine VM instances use the
3890    /// labels `"project_id"`, `"instance_id"`, and `"zone"`.
3891    #[prost(map = "string, string", tag = "2")]
3892    pub labels: ::std::collections::HashMap<
3893        ::prost::alloc::string::String,
3894        ::prost::alloc::string::String,
3895    >,
3896}
3897/// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource]
3898/// object. [MonitoredResource][google.api.MonitoredResource] objects contain the
3899/// minimum set of information to uniquely identify a monitored resource
3900/// instance. There is some other useful auxiliary metadata. Monitoring and
3901/// Logging use an ingestion pipeline to extract metadata for cloud resources of
3902/// all types, and store the metadata in this message.
3903#[derive(Clone, PartialEq, ::prost::Message)]
3904pub struct MonitoredResourceMetadata {
3905    /// Output only. Values for predefined system metadata labels.
3906    /// System labels are a kind of metadata extracted by Google, including
3907    /// "machine_image", "vpc", "subnet_id",
3908    /// "security_group", "name", etc.
3909    /// System label values can be only strings, Boolean values, or a list of
3910    /// strings. For example:
3911    ///
3912    ///      { "name": "my-test-instance",
3913    ///        "security_group": \["a", "b", "c"\],
3914    ///        "spot_instance": false }
3915    #[prost(message, optional, tag = "1")]
3916    pub system_labels: ::core::option::Option<::prost_types::Struct>,
3917    /// Output only. A map of user-defined metadata labels.
3918    #[prost(map = "string, string", tag = "2")]
3919    pub user_labels: ::std::collections::HashMap<
3920        ::prost::alloc::string::String,
3921        ::prost::alloc::string::String,
3922    >,
3923}
3924/// Monitoring configuration of the service.
3925///
3926/// The example below shows how to configure monitored resources and metrics
3927/// for monitoring. In the example, a monitored resource and two metrics are
3928/// defined. The `library.googleapis.com/book/returned_count` metric is sent
3929/// to both producer and consumer projects, whereas the
3930/// `library.googleapis.com/book/num_overdue` metric is only sent to the
3931/// consumer project.
3932///
3933///      monitored_resources:
3934///      - type: library.googleapis.com/Branch
3935///        display_name: "Library Branch"
3936///        description: "A branch of a library."
3937///        launch_stage: GA
3938///        labels:
3939///        - key: resource_container
3940///          description: "The Cloud container (ie. project id) for the Branch."
3941///        - key: location
3942///          description: "The location of the library branch."
3943///        - key: branch_id
3944///          description: "The id of the branch."
3945///      metrics:
3946///      - name: library.googleapis.com/book/returned_count
3947///        display_name: "Books Returned"
3948///        description: "The count of books that have been returned."
3949///        launch_stage: GA
3950///        metric_kind: DELTA
3951///        value_type: INT64
3952///        unit: "1"
3953///        labels:
3954///        - key: customer_id
3955///          description: "The id of the customer."
3956///      - name: library.googleapis.com/book/num_overdue
3957///        display_name: "Books Overdue"
3958///        description: "The current number of overdue books."
3959///        launch_stage: GA
3960///        metric_kind: GAUGE
3961///        value_type: INT64
3962///        unit: "1"
3963///        labels:
3964///        - key: customer_id
3965///          description: "The id of the customer."
3966///      monitoring:
3967///        producer_destinations:
3968///        - monitored_resource: library.googleapis.com/Branch
3969///          metrics:
3970///          - library.googleapis.com/book/returned_count
3971///        consumer_destinations:
3972///        - monitored_resource: library.googleapis.com/Branch
3973///          metrics:
3974///          - library.googleapis.com/book/returned_count
3975///          - library.googleapis.com/book/num_overdue
3976#[derive(Clone, PartialEq, ::prost::Message)]
3977pub struct Monitoring {
3978    /// Monitoring configurations for sending metrics to the producer project.
3979    /// There can be multiple producer destinations. A monitored resource type may
3980    /// appear in multiple monitoring destinations if different aggregations are
3981    /// needed for different sets of metrics associated with that monitored
3982    /// resource type. A monitored resource and metric pair may only be used once
3983    /// in the Monitoring configuration.
3984    #[prost(message, repeated, tag = "1")]
3985    pub producer_destinations: ::prost::alloc::vec::Vec<
3986        monitoring::MonitoringDestination,
3987    >,
3988    /// Monitoring configurations for sending metrics to the consumer project.
3989    /// There can be multiple consumer destinations. A monitored resource type may
3990    /// appear in multiple monitoring destinations if different aggregations are
3991    /// needed for different sets of metrics associated with that monitored
3992    /// resource type. A monitored resource and metric pair may only be used once
3993    /// in the Monitoring configuration.
3994    #[prost(message, repeated, tag = "2")]
3995    pub consumer_destinations: ::prost::alloc::vec::Vec<
3996        monitoring::MonitoringDestination,
3997    >,
3998}
3999/// Nested message and enum types in `Monitoring`.
4000pub mod monitoring {
4001    /// Configuration of a specific monitoring destination (the producer project
4002    /// or the consumer project).
4003    #[derive(Clone, PartialEq, ::prost::Message)]
4004    pub struct MonitoringDestination {
4005        /// The monitored resource type. The type must be defined in
4006        /// [Service.monitored_resources][google.api.Service.monitored_resources]
4007        /// section.
4008        #[prost(string, tag = "1")]
4009        pub monitored_resource: ::prost::alloc::string::String,
4010        /// Types of the metrics to report to this monitoring destination.
4011        /// Each type must be defined in
4012        /// [Service.metrics][google.api.Service.metrics] section.
4013        #[prost(string, repeated, tag = "2")]
4014        pub metrics: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4015    }
4016}
4017/// Quota configuration helps to achieve fairness and budgeting in service
4018/// usage.
4019///
4020/// The metric based quota configuration works this way:
4021/// - The service configuration defines a set of metrics.
4022/// - For API calls, the quota.metric_rules maps methods to metrics with
4023///    corresponding costs.
4024/// - The quota.limits defines limits on the metrics, which will be used for
4025///    quota checks at runtime.
4026///
4027/// An example quota configuration in yaml format:
4028///
4029///     quota:
4030///       limits:
4031///
4032///       - name: apiWriteQpsPerProject
4033///         metric: library.googleapis.com/write_calls
4034///         unit: "1/min/{project}"  # rate limit for consumer projects
4035///         values:
4036///           STANDARD: 10000
4037///
4038///
4039///       (The metric rules bind all methods to the read_calls metric,
4040///        except for the UpdateBook and DeleteBook methods. These two methods
4041///        are mapped to the write_calls metric, with the UpdateBook method
4042///        consuming at twice rate as the DeleteBook method.)
4043///       metric_rules:
4044///       - selector: "*"
4045///         metric_costs:
4046///           library.googleapis.com/read_calls: 1
4047///       - selector: google.example.library.v1.LibraryService.UpdateBook
4048///         metric_costs:
4049///           library.googleapis.com/write_calls: 2
4050///       - selector: google.example.library.v1.LibraryService.DeleteBook
4051///         metric_costs:
4052///           library.googleapis.com/write_calls: 1
4053///
4054///   Corresponding Metric definition:
4055///
4056///       metrics:
4057///       - name: library.googleapis.com/read_calls
4058///         display_name: Read requests
4059///         metric_kind: DELTA
4060///         value_type: INT64
4061///
4062///       - name: library.googleapis.com/write_calls
4063///         display_name: Write requests
4064///         metric_kind: DELTA
4065///         value_type: INT64
4066///
4067///
4068#[derive(Clone, PartialEq, ::prost::Message)]
4069pub struct Quota {
4070    /// List of QuotaLimit definitions for the service.
4071    #[prost(message, repeated, tag = "3")]
4072    pub limits: ::prost::alloc::vec::Vec<QuotaLimit>,
4073    /// List of MetricRule definitions, each one mapping a selected method to one
4074    /// or more metrics.
4075    #[prost(message, repeated, tag = "4")]
4076    pub metric_rules: ::prost::alloc::vec::Vec<MetricRule>,
4077}
4078/// Bind API methods to metrics. Binding a method to a metric causes that
4079/// metric's configured quota behaviors to apply to the method call.
4080#[derive(Clone, PartialEq, ::prost::Message)]
4081pub struct MetricRule {
4082    /// Selects the methods to which this rule applies.
4083    ///
4084    /// Refer to [selector][google.api.DocumentationRule.selector] for syntax
4085    /// details.
4086    #[prost(string, tag = "1")]
4087    pub selector: ::prost::alloc::string::String,
4088    /// Metrics to update when the selected methods are called, and the associated
4089    /// cost applied to each metric.
4090    ///
4091    /// The key of the map is the metric name, and the values are the amount
4092    /// increased for the metric against which the quota limits are defined.
4093    /// The value must not be negative.
4094    #[prost(map = "string, int64", tag = "2")]
4095    pub metric_costs: ::std::collections::HashMap<::prost::alloc::string::String, i64>,
4096}
4097/// `QuotaLimit` defines a specific limit that applies over a specified duration
4098/// for a limit type. There can be at most one limit for a duration and limit
4099/// type combination defined within a `QuotaGroup`.
4100#[derive(Clone, PartialEq, ::prost::Message)]
4101pub struct QuotaLimit {
4102    /// Name of the quota limit.
4103    ///
4104    /// The name must be provided, and it must be unique within the service. The
4105    /// name can only include alphanumeric characters as well as '-'.
4106    ///
4107    /// The maximum length of the limit name is 64 characters.
4108    #[prost(string, tag = "6")]
4109    pub name: ::prost::alloc::string::String,
4110    /// Optional. User-visible, extended description for this quota limit.
4111    /// Should be used only when more context is needed to understand this limit
4112    /// than provided by the limit's display name (see: `display_name`).
4113    #[prost(string, tag = "2")]
4114    pub description: ::prost::alloc::string::String,
4115    /// Default number of tokens that can be consumed during the specified
4116    /// duration. This is the number of tokens assigned when a client
4117    /// application developer activates the service for his/her project.
4118    ///
4119    /// Specifying a value of 0 will block all requests. This can be used if you
4120    /// are provisioning quota to selected consumers and blocking others.
4121    /// Similarly, a value of -1 will indicate an unlimited quota. No other
4122    /// negative values are allowed.
4123    ///
4124    /// Used by group-based quotas only.
4125    #[prost(int64, tag = "3")]
4126    pub default_limit: i64,
4127    /// Maximum number of tokens that can be consumed during the specified
4128    /// duration. Client application developers can override the default limit up
4129    /// to this maximum. If specified, this value cannot be set to a value less
4130    /// than the default limit. If not specified, it is set to the default limit.
4131    ///
4132    /// To allow clients to apply overrides with no upper bound, set this to -1,
4133    /// indicating unlimited maximum quota.
4134    ///
4135    /// Used by group-based quotas only.
4136    #[prost(int64, tag = "4")]
4137    pub max_limit: i64,
4138    /// Free tier value displayed in the Developers Console for this limit.
4139    /// The free tier is the number of tokens that will be subtracted from the
4140    /// billed amount when billing is enabled.
4141    /// This field can only be set on a limit with duration "1d", in a billable
4142    /// group; it is invalid on any other limit. If this field is not set, it
4143    /// defaults to 0, indicating that there is no free tier for this service.
4144    ///
4145    /// Used by group-based quotas only.
4146    #[prost(int64, tag = "7")]
4147    pub free_tier: i64,
4148    /// Duration of this limit in textual notation. Must be "100s" or "1d".
4149    ///
4150    /// Used by group-based quotas only.
4151    #[prost(string, tag = "5")]
4152    pub duration: ::prost::alloc::string::String,
4153    /// The name of the metric this quota limit applies to. The quota limits with
4154    /// the same metric will be checked together during runtime. The metric must be
4155    /// defined within the service config.
4156    #[prost(string, tag = "8")]
4157    pub metric: ::prost::alloc::string::String,
4158    /// Specify the unit of the quota limit. It uses the same syntax as
4159    /// [MetricDescriptor.unit][google.api.MetricDescriptor.unit]. The supported
4160    /// unit kinds are determined by the quota backend system.
4161    ///
4162    /// Here are some examples:
4163    /// * "1/min/{project}" for quota per minute per project.
4164    ///
4165    /// Note: the order of unit components is insignificant.
4166    /// The "1" at the beginning is required to follow the metric unit syntax.
4167    #[prost(string, tag = "9")]
4168    pub unit: ::prost::alloc::string::String,
4169    /// Tiered limit values. You must specify this as a key:value pair, with an
4170    /// integer value that is the maximum number of requests allowed for the
4171    /// specified unit. Currently only STANDARD is supported.
4172    #[prost(map = "string, int64", tag = "10")]
4173    pub values: ::std::collections::HashMap<::prost::alloc::string::String, i64>,
4174    /// User-visible display name for this limit.
4175    /// Optional. If not set, the UI will provide a default display name based on
4176    /// the quota configuration. This field can be used to override the default
4177    /// display name generated from the configuration.
4178    #[prost(string, tag = "12")]
4179    pub display_name: ::prost::alloc::string::String,
4180}
4181/// Specifies the routing information that should be sent along with the request
4182/// in the form of routing header.
4183/// **NOTE:** All service configuration rules follow the "last one wins" order.
4184///
4185/// The examples below will apply to an RPC which has the following request type:
4186///
4187/// Message Definition:
4188///
4189///      message Request {
4190///        // The name of the Table
4191///        // Values can be of the following formats:
4192///        // - `projects/<project>/tables/<table>`
4193///        // - `projects/<project>/instances/<instance>/tables/<table>`
4194///        // - `region/<region>/zones/<zone>/tables/<table>`
4195///        string table_name = 1;
4196///
4197///        // This value specifies routing for replication.
4198///        // It can be in the following formats:
4199///        // - `profiles/<profile_id>`
4200///        // - a legacy `profile_id` that can be any string
4201///        string app_profile_id = 2;
4202///      }
4203///
4204/// Example message:
4205///
4206///      {
4207///        table_name: projects/proj_foo/instances/instance_bar/table/table_baz,
4208///        app_profile_id: profiles/prof_qux
4209///      }
4210///
4211/// The routing header consists of one or multiple key-value pairs. Every key
4212/// and value must be percent-encoded, and joined together in the format of
4213/// `key1=value1&key2=value2`.
4214/// The examples below skip the percent-encoding for readability.
4215///
4216/// Example 1
4217///
4218/// Extracting a field from the request to put into the routing header
4219/// unchanged, with the key equal to the field name.
4220///
4221/// annotation:
4222///
4223///      option (google.api.routing) = {
4224///        // Take the `app_profile_id`.
4225///        routing_parameters {
4226///          field: "app_profile_id"
4227///        }
4228///      };
4229///
4230/// result:
4231///
4232///      x-goog-request-params: app_profile_id=profiles/prof_qux
4233///
4234/// Example 2
4235///
4236/// Extracting a field from the request to put into the routing header
4237/// unchanged, with the key different from the field name.
4238///
4239/// annotation:
4240///
4241///      option (google.api.routing) = {
4242///        // Take the `app_profile_id`, but name it `routing_id` in the header.
4243///        routing_parameters {
4244///          field: "app_profile_id"
4245///          path_template: "{routing_id=**}"
4246///        }
4247///      };
4248///
4249/// result:
4250///
4251///      x-goog-request-params: routing_id=profiles/prof_qux
4252///
4253/// Example 3
4254///
4255/// Extracting a field from the request to put into the routing
4256/// header, while matching a path template syntax on the field's value.
4257///
4258/// NB: it is more useful to send nothing than to send garbage for the purpose
4259/// of dynamic routing, since garbage pollutes cache. Thus the matching.
4260///
4261/// Sub-example 3a
4262///
4263/// The field matches the template.
4264///
4265/// annotation:
4266///
4267///      option (google.api.routing) = {
4268///        // Take the `table_name`, if it's well-formed (with project-based
4269///        // syntax).
4270///        routing_parameters {
4271///          field: "table_name"
4272///          path_template: "{table_name=projects/*/instances/*/**}"
4273///        }
4274///      };
4275///
4276/// result:
4277///
4278///      x-goog-request-params:
4279///      table_name=projects/proj_foo/instances/instance_bar/table/table_baz
4280///
4281/// Sub-example 3b
4282///
4283/// The field does not match the template.
4284///
4285/// annotation:
4286///
4287///      option (google.api.routing) = {
4288///        // Take the `table_name`, if it's well-formed (with region-based
4289///        // syntax).
4290///        routing_parameters {
4291///          field: "table_name"
4292///          path_template: "{table_name=regions/*/zones/*/**}"
4293///        }
4294///      };
4295///
4296/// result:
4297///
4298///      <no routing header will be sent>
4299///
4300/// Sub-example 3c
4301///
4302/// Multiple alternative conflictingly named path templates are
4303/// specified. The one that matches is used to construct the header.
4304///
4305/// annotation:
4306///
4307///      option (google.api.routing) = {
4308///        // Take the `table_name`, if it's well-formed, whether
4309///        // using the region- or projects-based syntax.
4310///
4311///        routing_parameters {
4312///          field: "table_name"
4313///          path_template: "{table_name=regions/*/zones/*/**}"
4314///        }
4315///        routing_parameters {
4316///          field: "table_name"
4317///          path_template: "{table_name=projects/*/instances/*/**}"
4318///        }
4319///      };
4320///
4321/// result:
4322///
4323///      x-goog-request-params:
4324///      table_name=projects/proj_foo/instances/instance_bar/table/table_baz
4325///
4326/// Example 4
4327///
4328/// Extracting a single routing header key-value pair by matching a
4329/// template syntax on (a part of) a single request field.
4330///
4331/// annotation:
4332///
4333///      option (google.api.routing) = {
4334///        // Take just the project id from the `table_name` field.
4335///        routing_parameters {
4336///          field: "table_name"
4337///          path_template: "{routing_id=projects/*}/**"
4338///        }
4339///      };
4340///
4341/// result:
4342///
4343///      x-goog-request-params: routing_id=projects/proj_foo
4344///
4345/// Example 5
4346///
4347/// Extracting a single routing header key-value pair by matching
4348/// several conflictingly named path templates on (parts of) a single request
4349/// field. The last template to match "wins" the conflict.
4350///
4351/// annotation:
4352///
4353///      option (google.api.routing) = {
4354///        // If the `table_name` does not have instances information,
4355///        // take just the project id for routing.
4356///        // Otherwise take project + instance.
4357///
4358///        routing_parameters {
4359///          field: "table_name"
4360///          path_template: "{routing_id=projects/*}/**"
4361///        }
4362///        routing_parameters {
4363///          field: "table_name"
4364///          path_template: "{routing_id=projects/*/instances/*}/**"
4365///        }
4366///      };
4367///
4368/// result:
4369///
4370///      x-goog-request-params:
4371///      routing_id=projects/proj_foo/instances/instance_bar
4372///
4373/// Example 6
4374///
4375/// Extracting multiple routing header key-value pairs by matching
4376/// several non-conflicting path templates on (parts of) a single request field.
4377///
4378/// Sub-example 6a
4379///
4380/// Make the templates strict, so that if the `table_name` does not
4381/// have an instance information, nothing is sent.
4382///
4383/// annotation:
4384///
4385///      option (google.api.routing) = {
4386///        // The routing code needs two keys instead of one composite
4387///        // but works only for the tables with the "project-instance" name
4388///        // syntax.
4389///
4390///        routing_parameters {
4391///          field: "table_name"
4392///          path_template: "{project_id=projects/*}/instances/*/**"
4393///        }
4394///        routing_parameters {
4395///          field: "table_name"
4396///          path_template: "projects/*/{instance_id=instances/*}/**"
4397///        }
4398///      };
4399///
4400/// result:
4401///
4402///      x-goog-request-params:
4403///      project_id=projects/proj_foo&instance_id=instances/instance_bar
4404///
4405/// Sub-example 6b
4406///
4407/// Make the templates loose, so that if the `table_name` does not
4408/// have an instance information, just the project id part is sent.
4409///
4410/// annotation:
4411///
4412///      option (google.api.routing) = {
4413///        // The routing code wants two keys instead of one composite
4414///        // but will work with just the `project_id` for tables without
4415///        // an instance in the `table_name`.
4416///
4417///        routing_parameters {
4418///          field: "table_name"
4419///          path_template: "{project_id=projects/*}/**"
4420///        }
4421///        routing_parameters {
4422///          field: "table_name"
4423///          path_template: "projects/*/{instance_id=instances/*}/**"
4424///        }
4425///      };
4426///
4427/// result (is the same as 6a for our example message because it has the instance
4428/// information):
4429///
4430///      x-goog-request-params:
4431///      project_id=projects/proj_foo&instance_id=instances/instance_bar
4432///
4433/// Example 7
4434///
4435/// Extracting multiple routing header key-value pairs by matching
4436/// several path templates on multiple request fields.
4437///
4438/// NB: note that here there is no way to specify sending nothing if one of the
4439/// fields does not match its template. E.g. if the `table_name` is in the wrong
4440/// format, the `project_id` will not be sent, but the `routing_id` will be.
4441/// The backend routing code has to be aware of that and be prepared to not
4442/// receive a full complement of keys if it expects multiple.
4443///
4444/// annotation:
4445///
4446///      option (google.api.routing) = {
4447///        // The routing needs both `project_id` and `routing_id`
4448///        // (from the `app_profile_id` field) for routing.
4449///
4450///        routing_parameters {
4451///          field: "table_name"
4452///          path_template: "{project_id=projects/*}/**"
4453///        }
4454///        routing_parameters {
4455///          field: "app_profile_id"
4456///          path_template: "{routing_id=**}"
4457///        }
4458///      };
4459///
4460/// result:
4461///
4462///      x-goog-request-params:
4463///      project_id=projects/proj_foo&routing_id=profiles/prof_qux
4464///
4465/// Example 8
4466///
4467/// Extracting a single routing header key-value pair by matching
4468/// several conflictingly named path templates on several request fields. The
4469/// last template to match "wins" the conflict.
4470///
4471/// annotation:
4472///
4473///      option (google.api.routing) = {
4474///        // The `routing_id` can be a project id or a region id depending on
4475///        // the table name format, but only if the `app_profile_id` is not set.
4476///        // If `app_profile_id` is set it should be used instead.
4477///
4478///        routing_parameters {
4479///          field: "table_name"
4480///          path_template: "{routing_id=projects/*}/**"
4481///        }
4482///        routing_parameters {
4483///           field: "table_name"
4484///           path_template: "{routing_id=regions/*}/**"
4485///        }
4486///        routing_parameters {
4487///          field: "app_profile_id"
4488///          path_template: "{routing_id=**}"
4489///        }
4490///      };
4491///
4492/// result:
4493///
4494///      x-goog-request-params: routing_id=profiles/prof_qux
4495///
4496/// Example 9
4497///
4498/// Bringing it all together.
4499///
4500/// annotation:
4501///
4502///      option (google.api.routing) = {
4503///        // For routing both `table_location` and a `routing_id` are needed.
4504///        //
4505///        // table_location can be either an instance id or a region+zone id.
4506///        //
4507///        // For `routing_id`, take the value of `app_profile_id`
4508///        // - If it's in the format `profiles/<profile_id>`, send
4509///        // just the `<profile_id>` part.
4510///        // - If it's any other literal, send it as is.
4511///        // If the `app_profile_id` is empty, and the `table_name` starts with
4512///        // the project_id, send that instead.
4513///
4514///        routing_parameters {
4515///          field: "table_name"
4516///          path_template: "projects/*/{table_location=instances/*}/tables/*"
4517///        }
4518///        routing_parameters {
4519///          field: "table_name"
4520///          path_template: "{table_location=regions/*/zones/*}/tables/*"
4521///        }
4522///        routing_parameters {
4523///          field: "table_name"
4524///          path_template: "{routing_id=projects/*}/**"
4525///        }
4526///        routing_parameters {
4527///          field: "app_profile_id"
4528///          path_template: "{routing_id=**}"
4529///        }
4530///        routing_parameters {
4531///          field: "app_profile_id"
4532///          path_template: "profiles/{routing_id=*}"
4533///        }
4534///      };
4535///
4536/// result:
4537///
4538///      x-goog-request-params:
4539///      table_location=instances/instance_bar&routing_id=prof_qux
4540#[derive(Clone, PartialEq, ::prost::Message)]
4541pub struct RoutingRule {
4542    /// A collection of Routing Parameter specifications.
4543    /// **NOTE:** If multiple Routing Parameters describe the same key
4544    /// (via the `path_template` field or via the `field` field when
4545    /// `path_template` is not provided), "last one wins" rule
4546    /// determines which Parameter gets used.
4547    /// See the examples for more details.
4548    #[prost(message, repeated, tag = "2")]
4549    pub routing_parameters: ::prost::alloc::vec::Vec<RoutingParameter>,
4550}
4551/// A projection from an input message to the GRPC or REST header.
4552#[derive(Clone, PartialEq, ::prost::Message)]
4553pub struct RoutingParameter {
4554    /// A request field to extract the header key-value pair from.
4555    #[prost(string, tag = "1")]
4556    pub field: ::prost::alloc::string::String,
4557    /// A pattern matching the key-value field. Optional.
4558    /// If not specified, the whole field specified in the `field` field will be
4559    /// taken as value, and its name used as key. If specified, it MUST contain
4560    /// exactly one named segment (along with any number of unnamed segments) The
4561    /// pattern will be matched over the field specified in the `field` field, then
4562    /// if the match is successful:
4563    /// - the name of the single named segment will be used as a header name,
4564    /// - the match value of the segment will be used as a header value;
4565    /// if the match is NOT successful, nothing will be sent.
4566    ///
4567    /// Example:
4568    ///
4569    ///                -- This is a field in the request message
4570    ///               |   that the header value will be extracted from.
4571    ///               |
4572    ///               |                     -- This is the key name in the
4573    ///               |                    |   routing header.
4574    ///               V                    |
4575    ///      field: "table_name"           v
4576    ///      path_template: "projects/*/{table_location=instances/*}/tables/*"
4577    ///                                                 ^            ^
4578    ///                                                 |            |
4579    ///        In the {} brackets is the pattern that --             |
4580    ///        specifies what to extract from the                    |
4581    ///        field as a value to be sent.                          |
4582    ///                                                              |
4583    ///       The string in the field must match the whole pattern --
4584    ///       before brackets, inside brackets, after brackets.
4585    ///
4586    /// When looking at this specific example, we can see that:
4587    /// - A key-value pair with the key `table_location`
4588    ///    and the value matching `instances/*` should be added
4589    ///    to the x-goog-request-params routing header.
4590    /// - The value is extracted from the request message's `table_name` field
4591    ///    if it matches the full pattern specified:
4592    ///    `projects/*/instances/*/tables/*`.
4593    ///
4594    /// **NB:** If the `path_template` field is not provided, the key name is
4595    /// equal to the field name, and the whole field should be sent as a value.
4596    /// This makes the pattern for the field and the value functionally equivalent
4597    /// to `**`, and the configuration
4598    ///
4599    ///      {
4600    ///        field: "table_name"
4601    ///      }
4602    ///
4603    /// is a functionally equivalent shorthand to:
4604    ///
4605    ///      {
4606    ///        field: "table_name"
4607    ///        path_template: "{table_name=**}"
4608    ///      }
4609    ///
4610    /// See Example 1 for more details.
4611    #[prost(string, tag = "2")]
4612    pub path_template: ::prost::alloc::string::String,
4613}
4614/// Source information used to create a Service Config
4615#[derive(Clone, PartialEq, ::prost::Message)]
4616pub struct SourceInfo {
4617    /// All files used during config generation.
4618    #[prost(message, repeated, tag = "1")]
4619    pub source_files: ::prost::alloc::vec::Vec<::prost_types::Any>,
4620}
4621/// ### System parameter configuration
4622///
4623/// A system parameter is a special kind of parameter defined by the API
4624/// system, not by an individual API. It is typically mapped to an HTTP header
4625/// and/or a URL query parameter. This configuration specifies which methods
4626/// change the names of the system parameters.
4627#[derive(Clone, PartialEq, ::prost::Message)]
4628pub struct SystemParameters {
4629    /// Define system parameters.
4630    ///
4631    /// The parameters defined here will override the default parameters
4632    /// implemented by the system. If this field is missing from the service
4633    /// config, default system parameters will be used. Default system parameters
4634    /// and names is implementation-dependent.
4635    ///
4636    /// Example: define api key for all methods
4637    ///
4638    ///      system_parameters
4639    ///        rules:
4640    ///          - selector: "*"
4641    ///            parameters:
4642    ///              - name: api_key
4643    ///                url_query_parameter: api_key
4644    ///
4645    ///
4646    /// Example: define 2 api key names for a specific method.
4647    ///
4648    ///      system_parameters
4649    ///        rules:
4650    ///          - selector: "/ListShelves"
4651    ///            parameters:
4652    ///              - name: api_key
4653    ///                http_header: Api-Key1
4654    ///              - name: api_key
4655    ///                http_header: Api-Key2
4656    ///
4657    /// **NOTE:** All service configuration rules follow "last one wins" order.
4658    #[prost(message, repeated, tag = "1")]
4659    pub rules: ::prost::alloc::vec::Vec<SystemParameterRule>,
4660}
4661/// Define a system parameter rule mapping system parameter definitions to
4662/// methods.
4663#[derive(Clone, PartialEq, ::prost::Message)]
4664pub struct SystemParameterRule {
4665    /// Selects the methods to which this rule applies. Use '*' to indicate all
4666    /// methods in all APIs.
4667    ///
4668    /// Refer to [selector][google.api.DocumentationRule.selector] for syntax
4669    /// details.
4670    #[prost(string, tag = "1")]
4671    pub selector: ::prost::alloc::string::String,
4672    /// Define parameters. Multiple names may be defined for a parameter.
4673    /// For a given method call, only one of them should be used. If multiple
4674    /// names are used the behavior is implementation-dependent.
4675    /// If none of the specified names are present the behavior is
4676    /// parameter-dependent.
4677    #[prost(message, repeated, tag = "2")]
4678    pub parameters: ::prost::alloc::vec::Vec<SystemParameter>,
4679}
4680/// Define a parameter's name and location. The parameter may be passed as either
4681/// an HTTP header or a URL query parameter, and if both are passed the behavior
4682/// is implementation-dependent.
4683#[derive(Clone, PartialEq, ::prost::Message)]
4684pub struct SystemParameter {
4685    /// Define the name of the parameter, such as "api_key" . It is case sensitive.
4686    #[prost(string, tag = "1")]
4687    pub name: ::prost::alloc::string::String,
4688    /// Define the HTTP header name to use for the parameter. It is case
4689    /// insensitive.
4690    #[prost(string, tag = "2")]
4691    pub http_header: ::prost::alloc::string::String,
4692    /// Define the URL query parameter name to use for the parameter. It is case
4693    /// sensitive.
4694    #[prost(string, tag = "3")]
4695    pub url_query_parameter: ::prost::alloc::string::String,
4696}
4697/// Configuration controlling usage of a service.
4698#[derive(Clone, PartialEq, ::prost::Message)]
4699pub struct Usage {
4700    /// Requirements that must be satisfied before a consumer project can use the
4701    /// service. Each requirement is of the form <service.name>/<requirement-id>;
4702    /// for example 'serviceusage.googleapis.com/billing-enabled'.
4703    ///
4704    /// For Google APIs, a Terms of Service requirement must be included here.
4705    /// Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud".
4706    /// Other Google APIs should include
4707    /// "serviceusage.googleapis.com/tos/universal". Additional ToS can be
4708    /// included based on the business needs.
4709    #[prost(string, repeated, tag = "1")]
4710    pub requirements: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4711    /// A list of usage rules that apply to individual API methods.
4712    ///
4713    /// **NOTE:** All service configuration rules follow "last one wins" order.
4714    #[prost(message, repeated, tag = "6")]
4715    pub rules: ::prost::alloc::vec::Vec<UsageRule>,
4716    /// The full resource name of a channel used for sending notifications to the
4717    /// service producer.
4718    ///
4719    /// Google Service Management currently only supports
4720    /// [Google Cloud Pub/Sub](<https://cloud.google.com/pubsub>) as a notification
4721    /// channel. To use Google Cloud Pub/Sub as the channel, this must be the name
4722    /// of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format
4723    /// documented in <https://cloud.google.com/pubsub/docs/overview.>
4724    #[prost(string, tag = "7")]
4725    pub producer_notification_channel: ::prost::alloc::string::String,
4726}
4727/// Usage configuration rules for the service.
4728///
4729/// NOTE: Under development.
4730///
4731///
4732/// Use this rule to configure unregistered calls for the service. Unregistered
4733/// calls are calls that do not contain consumer project identity.
4734/// (Example: calls that do not contain an API key).
4735/// By default, API methods do not allow unregistered calls, and each method call
4736/// must be identified by a consumer project identity. Use this rule to
4737/// allow/disallow unregistered calls.
4738///
4739/// Example of an API that wants to allow unregistered calls for entire service.
4740///
4741///      usage:
4742///        rules:
4743///        - selector: "*"
4744///          allow_unregistered_calls: true
4745///
4746/// Example of a method that wants to allow unregistered calls.
4747///
4748///      usage:
4749///        rules:
4750///        - selector: "google.example.library.v1.LibraryService.CreateBook"
4751///          allow_unregistered_calls: true
4752#[derive(Clone, PartialEq, ::prost::Message)]
4753pub struct UsageRule {
4754    /// Selects the methods to which this rule applies. Use '*' to indicate all
4755    /// methods in all APIs.
4756    ///
4757    /// Refer to [selector][google.api.DocumentationRule.selector] for syntax
4758    /// details.
4759    #[prost(string, tag = "1")]
4760    pub selector: ::prost::alloc::string::String,
4761    /// If true, the selected method allows unregistered calls, e.g. calls
4762    /// that don't identify any user or application.
4763    #[prost(bool, tag = "2")]
4764    pub allow_unregistered_calls: bool,
4765    /// If true, the selected method should skip service control and the control
4766    /// plane features, such as quota and billing, will not be available.
4767    /// This flag is used by Google Cloud Endpoints to bypass checks for internal
4768    /// methods, such as service health check methods.
4769    #[prost(bool, tag = "3")]
4770    pub skip_service_control: bool,
4771}
4772/// `Service` is the root object of Google API service configuration (service
4773/// config). It describes the basic information about a logical service,
4774/// such as the service name and the user-facing title, and delegates other
4775/// aspects to sub-sections. Each sub-section is either a proto message or a
4776/// repeated proto message that configures a specific aspect, such as auth.
4777/// For more information, see each proto message definition.
4778///
4779/// Example:
4780///
4781///      type: google.api.Service
4782///      name: calendar.googleapis.com
4783///      title: Google Calendar API
4784///      apis:
4785///      - name: google.calendar.v3.Calendar
4786///
4787///      visibility:
4788///        rules:
4789///        - selector: "google.calendar.v3.*"
4790///          restriction: PREVIEW
4791///      backend:
4792///        rules:
4793///        - selector: "google.calendar.v3.*"
4794///          address: calendar.example.com
4795///
4796///      authentication:
4797///        providers:
4798///        - id: google_calendar_auth
4799///          jwks_uri: <https://www.googleapis.com/oauth2/v1/certs>
4800///          issuer: <https://securetoken.google.com>
4801///        rules:
4802///        - selector: "*"
4803///          requirements:
4804///            provider_id: google_calendar_auth
4805#[derive(Clone, PartialEq, ::prost::Message)]
4806pub struct Service {
4807    /// The service name, which is a DNS-like logical identifier for the
4808    /// service, such as `calendar.googleapis.com`. The service name
4809    /// typically goes through DNS verification to make sure the owner
4810    /// of the service also owns the DNS name.
4811    #[prost(string, tag = "1")]
4812    pub name: ::prost::alloc::string::String,
4813    /// The product title for this service, it is the name displayed in Google
4814    /// Cloud Console.
4815    #[prost(string, tag = "2")]
4816    pub title: ::prost::alloc::string::String,
4817    /// The Google project that owns this service.
4818    #[prost(string, tag = "22")]
4819    pub producer_project_id: ::prost::alloc::string::String,
4820    /// A unique ID for a specific instance of this message, typically assigned
4821    /// by the client for tracking purpose. Must be no longer than 63 characters
4822    /// and only lower case letters, digits, '.', '_' and '-' are allowed. If
4823    /// empty, the server may choose to generate one instead.
4824    #[prost(string, tag = "33")]
4825    pub id: ::prost::alloc::string::String,
4826    /// A list of API interfaces exported by this service. Only the `name` field
4827    /// of the [google.protobuf.Api][google.protobuf.Api] needs to be provided by
4828    /// the configuration author, as the remaining fields will be derived from the
4829    /// IDL during the normalization process. It is an error to specify an API
4830    /// interface here which cannot be resolved against the associated IDL files.
4831    #[prost(message, repeated, tag = "3")]
4832    pub apis: ::prost::alloc::vec::Vec<::prost_types::Api>,
4833    /// A list of all proto message types included in this API service.
4834    /// Types referenced directly or indirectly by the `apis` are automatically
4835    /// included.  Messages which are not referenced but shall be included, such as
4836    /// types used by the `google.protobuf.Any` type, should be listed here by
4837    /// name by the configuration author. Example:
4838    ///
4839    ///      types:
4840    ///      - name: google.protobuf.Int32
4841    #[prost(message, repeated, tag = "4")]
4842    pub types: ::prost::alloc::vec::Vec<::prost_types::Type>,
4843    /// A list of all enum types included in this API service.  Enums referenced
4844    /// directly or indirectly by the `apis` are automatically included.  Enums
4845    /// which are not referenced but shall be included should be listed here by
4846    /// name by the configuration author. Example:
4847    ///
4848    ///      enums:
4849    ///      - name: google.someapi.v1.SomeEnum
4850    #[prost(message, repeated, tag = "5")]
4851    pub enums: ::prost::alloc::vec::Vec<::prost_types::Enum>,
4852    /// Additional API documentation.
4853    #[prost(message, optional, tag = "6")]
4854    pub documentation: ::core::option::Option<Documentation>,
4855    /// API backend configuration.
4856    #[prost(message, optional, tag = "8")]
4857    pub backend: ::core::option::Option<Backend>,
4858    /// HTTP configuration.
4859    #[prost(message, optional, tag = "9")]
4860    pub http: ::core::option::Option<Http>,
4861    /// Quota configuration.
4862    #[prost(message, optional, tag = "10")]
4863    pub quota: ::core::option::Option<Quota>,
4864    /// Auth configuration.
4865    #[prost(message, optional, tag = "11")]
4866    pub authentication: ::core::option::Option<Authentication>,
4867    /// Context configuration.
4868    #[prost(message, optional, tag = "12")]
4869    pub context: ::core::option::Option<Context>,
4870    /// Configuration controlling usage of this service.
4871    #[prost(message, optional, tag = "15")]
4872    pub usage: ::core::option::Option<Usage>,
4873    /// Configuration for network endpoints.  If this is empty, then an endpoint
4874    /// with the same name as the service is automatically generated to service all
4875    /// defined APIs.
4876    #[prost(message, repeated, tag = "18")]
4877    pub endpoints: ::prost::alloc::vec::Vec<Endpoint>,
4878    /// Configuration for the service control plane.
4879    #[prost(message, optional, tag = "21")]
4880    pub control: ::core::option::Option<Control>,
4881    /// Defines the logs used by this service.
4882    #[prost(message, repeated, tag = "23")]
4883    pub logs: ::prost::alloc::vec::Vec<LogDescriptor>,
4884    /// Defines the metrics used by this service.
4885    #[prost(message, repeated, tag = "24")]
4886    pub metrics: ::prost::alloc::vec::Vec<MetricDescriptor>,
4887    /// Defines the monitored resources used by this service. This is required
4888    /// by the [Service.monitoring][google.api.Service.monitoring] and
4889    /// [Service.logging][google.api.Service.logging] configurations.
4890    #[prost(message, repeated, tag = "25")]
4891    pub monitored_resources: ::prost::alloc::vec::Vec<MonitoredResourceDescriptor>,
4892    /// Billing configuration.
4893    #[prost(message, optional, tag = "26")]
4894    pub billing: ::core::option::Option<Billing>,
4895    /// Logging configuration.
4896    #[prost(message, optional, tag = "27")]
4897    pub logging: ::core::option::Option<Logging>,
4898    /// Monitoring configuration.
4899    #[prost(message, optional, tag = "28")]
4900    pub monitoring: ::core::option::Option<Monitoring>,
4901    /// System parameter configuration.
4902    #[prost(message, optional, tag = "29")]
4903    pub system_parameters: ::core::option::Option<SystemParameters>,
4904    /// Output only. The source information for this configuration if available.
4905    #[prost(message, optional, tag = "37")]
4906    pub source_info: ::core::option::Option<SourceInfo>,
4907    /// Settings for [Google Cloud Client
4908    /// libraries](<https://cloud.google.com/apis/docs/cloud-client-libraries>)
4909    /// generated from APIs defined as protocol buffers.
4910    #[prost(message, optional, tag = "45")]
4911    pub publishing: ::core::option::Option<Publishing>,
4912    /// Obsolete. Do not use.
4913    ///
4914    /// This field has no semantic meaning. The service config compiler always
4915    /// sets this field to `3`.
4916    #[prost(message, optional, tag = "20")]
4917    pub config_version: ::core::option::Option<u32>,
4918}
4919/// `Visibility` restricts service consumer's access to service elements,
4920/// such as whether an application can call a visibility-restricted method.
4921/// The restriction is expressed by applying visibility labels on service
4922/// elements. The visibility labels are elsewhere linked to service consumers.
4923///
4924/// A service can define multiple visibility labels, but a service consumer
4925/// should be granted at most one visibility label. Multiple visibility
4926/// labels for a single service consumer are not supported.
4927///
4928/// If an element and all its parents have no visibility label, its visibility
4929/// is unconditionally granted.
4930///
4931/// Example:
4932///
4933///      visibility:
4934///        rules:
4935///        - selector: google.calendar.Calendar.EnhancedSearch
4936///          restriction: PREVIEW
4937///        - selector: google.calendar.Calendar.Delegate
4938///          restriction: INTERNAL
4939///
4940/// Here, all methods are publicly visible except for the restricted methods
4941/// EnhancedSearch and Delegate.
4942#[derive(Clone, PartialEq, ::prost::Message)]
4943pub struct Visibility {
4944    /// A list of visibility rules that apply to individual API elements.
4945    ///
4946    /// **NOTE:** All service configuration rules follow "last one wins" order.
4947    #[prost(message, repeated, tag = "1")]
4948    pub rules: ::prost::alloc::vec::Vec<VisibilityRule>,
4949}
4950/// A visibility rule provides visibility configuration for an individual API
4951/// element.
4952#[derive(Clone, PartialEq, ::prost::Message)]
4953pub struct VisibilityRule {
4954    /// Selects methods, messages, fields, enums, etc. to which this rule applies.
4955    ///
4956    /// Refer to [selector][google.api.DocumentationRule.selector] for syntax
4957    /// details.
4958    #[prost(string, tag = "1")]
4959    pub selector: ::prost::alloc::string::String,
4960    /// A comma-separated list of visibility labels that apply to the `selector`.
4961    /// Any of the listed labels can be used to grant the visibility.
4962    ///
4963    /// If a rule has multiple labels, removing one of the labels but not all of
4964    /// them can break clients.
4965    ///
4966    /// Example:
4967    ///
4968    ///      visibility:
4969    ///        rules:
4970    ///        - selector: google.calendar.Calendar.EnhancedSearch
4971    ///          restriction: INTERNAL, PREVIEW
4972    ///
4973    /// Removing INTERNAL from this restriction will break clients that rely on
4974    /// this method and only had access to it through INTERNAL.
4975    #[prost(string, tag = "2")]
4976    pub restriction: ::prost::alloc::string::String,
4977}