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