opentelemetry_stackdriver/proto/
api.rs

1// This file is @generated by prost-build.
2/// Defines the HTTP configuration for an API service. It contains a list of
3/// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
4/// to one or more HTTP REST API methods.
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct Http {
7    /// A list of HTTP configuration rules that apply to individual API methods.
8    ///
9    /// **NOTE:** All service configuration rules follow "last one wins" order.
10    #[prost(message, repeated, tag = "1")]
11    pub rules: ::prost::alloc::vec::Vec<HttpRule>,
12    /// When set to true, URL path parameters will be fully URI-decoded except in
13    /// cases of single segment matches in reserved expansion, where "%2F" will be
14    /// left encoded.
15    ///
16    /// The default behavior is to not decode RFC 6570 reserved characters in multi
17    /// segment matches.
18    #[prost(bool, tag = "2")]
19    pub fully_decode_reserved_expansion: bool,
20}
21/// gRPC Transcoding
22///
23/// gRPC Transcoding is a feature for mapping between a gRPC method and one or
24/// more HTTP REST endpoints. It allows developers to build a single API service
25/// that supports both gRPC APIs and REST APIs. Many systems, including [Google
26/// APIs](<https://github.com/googleapis/googleapis>),
27/// [Cloud Endpoints](<https://cloud.google.com/endpoints>), [gRPC
28/// Gateway](<https://github.com/grpc-ecosystem/grpc-gateway>),
29/// and [Envoy](<https://github.com/envoyproxy/envoy>) proxy support this feature
30/// and use it for large scale production services.
31///
32/// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
33/// how different portions of the gRPC request message are mapped to the URL
34/// path, URL query parameters, and HTTP request body. It also controls how the
35/// gRPC response message is mapped to the HTTP response body. `HttpRule` is
36/// typically specified as an `google.api.http` annotation on the gRPC method.
37///
38/// Each mapping specifies a URL path template and an HTTP method. The path
39/// template may refer to one or more fields in the gRPC request message, as long
40/// as each field is a non-repeated field with a primitive (non-message) type.
41/// The path template controls how fields of the request message are mapped to
42/// the URL path.
43///
44/// Example:
45///
46///      service Messaging {
47///        rpc GetMessage(GetMessageRequest) returns (Message) {
48///          option (google.api.http) = {
49///              get: "/v1/{name=messages/*}"
50///          };
51///        }
52///      }
53///      message GetMessageRequest {
54///        string name = 1; // Mapped to URL path.
55///      }
56///      message Message {
57///        string text = 1; // The resource content.
58///      }
59///
60/// This enables an HTTP REST to gRPC mapping as below:
61///
62/// - HTTP: `GET /v1/messages/123456`
63/// - gRPC: `GetMessage(name: "messages/123456")`
64///
65/// Any fields in the request message which are not bound by the path template
66/// automatically become HTTP query parameters if there is no HTTP request body.
67/// For example:
68///
69///      service Messaging {
70///        rpc GetMessage(GetMessageRequest) returns (Message) {
71///          option (google.api.http) = {
72///              get:"/v1/messages/{message_id}"
73///          };
74///        }
75///      }
76///      message GetMessageRequest {
77///        message SubMessage {
78///          string subfield = 1;
79///        }
80///        string message_id = 1; // Mapped to URL path.
81///        int64 revision = 2;    // Mapped to URL query parameter `revision`.
82///        SubMessage sub = 3;    // Mapped to URL query parameter `sub.subfield`.
83///      }
84///
85/// This enables a HTTP JSON to RPC mapping as below:
86///
87/// - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
88/// - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
89/// SubMessage(subfield: "foo"))`
90///
91/// Note that fields which are mapped to URL query parameters must have a
92/// primitive type or a repeated primitive type or a non-repeated message type.
93/// In the case of a repeated type, the parameter can be repeated in the URL
94/// as `...?param=A&param=B`. In the case of a message type, each field of the
95/// message is mapped to a separate parameter, such as
96/// `...?foo.a=A&foo.b=B&foo.c=C`.
97///
98/// For HTTP methods that allow a request body, the `body` field
99/// specifies the mapping. Consider a REST update method on the
100/// message resource collection:
101///
102///      service Messaging {
103///        rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
104///          option (google.api.http) = {
105///            patch: "/v1/messages/{message_id}"
106///            body: "message"
107///          };
108///        }
109///      }
110///      message UpdateMessageRequest {
111///        string message_id = 1; // mapped to the URL
112///        Message message = 2;   // mapped to the body
113///      }
114///
115/// The following HTTP JSON to RPC mapping is enabled, where the
116/// representation of the JSON in the request body is determined by
117/// protos JSON encoding:
118///
119/// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
120/// - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
121///
122/// The special name `*` can be used in the body mapping to define that
123/// every field not bound by the path template should be mapped to the
124/// request body.  This enables the following alternative definition of
125/// the update method:
126///
127///      service Messaging {
128///        rpc UpdateMessage(Message) returns (Message) {
129///          option (google.api.http) = {
130///            patch: "/v1/messages/{message_id}"
131///            body: "*"
132///          };
133///        }
134///      }
135///      message Message {
136///        string message_id = 1;
137///        string text = 2;
138///      }
139///
140///
141/// The following HTTP JSON to RPC mapping is enabled:
142///
143/// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
144/// - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
145///
146/// Note that when using `*` in the body mapping, it is not possible to
147/// have HTTP parameters, as all fields not bound by the path end in
148/// the body. This makes this option more rarely used in practice when
149/// defining REST APIs. The common usage of `*` is in custom methods
150/// which don't use the URL at all for transferring data.
151///
152/// It is possible to define multiple HTTP methods for one RPC by using
153/// the `additional_bindings` option. Example:
154///
155///      service Messaging {
156///        rpc GetMessage(GetMessageRequest) returns (Message) {
157///          option (google.api.http) = {
158///            get: "/v1/messages/{message_id}"
159///            additional_bindings {
160///              get: "/v1/users/{user_id}/messages/{message_id}"
161///            }
162///          };
163///        }
164///      }
165///      message GetMessageRequest {
166///        string message_id = 1;
167///        string user_id = 2;
168///      }
169///
170/// This enables the following two alternative HTTP JSON to RPC mappings:
171///
172/// - HTTP: `GET /v1/messages/123456`
173/// - gRPC: `GetMessage(message_id: "123456")`
174///
175/// - HTTP: `GET /v1/users/me/messages/123456`
176/// - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
177///
178/// Rules for HTTP mapping
179///
180/// 1. Leaf request fields (recursive expansion nested messages in the request
181///     message) are classified into three categories:
182///     - Fields referred by the path template. They are passed via the URL path.
183///     - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
184///     are passed via the HTTP
185///       request body.
186///     - All other fields are passed via the URL query parameters, and the
187///       parameter name is the field path in the request message. A repeated
188///       field can be represented as multiple query parameters under the same
189///       name.
190///   2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
191///   query parameter, all fields
192///      are passed via URL path and HTTP request body.
193///   3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
194///   request body, all
195///      fields are passed via URL path and URL query parameters.
196///
197/// Path template syntax
198///
199///      Template = "/" Segments \[ Verb \] ;
200///      Segments = Segment { "/" Segment } ;
201///      Segment  = "*" | "**" | LITERAL | Variable ;
202///      Variable = "{" FieldPath \[ "=" Segments \] "}" ;
203///      FieldPath = IDENT { "." IDENT } ;
204///      Verb     = ":" LITERAL ;
205///
206/// The syntax `*` matches a single URL path segment. The syntax `**` matches
207/// zero or more URL path segments, which must be the last part of the URL path
208/// except the `Verb`.
209///
210/// The syntax `Variable` matches part of the URL path as specified by its
211/// template. A variable template must not contain other variables. If a variable
212/// matches a single path segment, its template may be omitted, e.g. `{var}`
213/// is equivalent to `{var=*}`.
214///
215/// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
216/// contains any reserved character, such characters should be percent-encoded
217/// before the matching.
218///
219/// If a variable contains exactly one path segment, such as `"{var}"` or
220/// `"{var=*}"`, when such a variable is expanded into a URL path on the client
221/// side, all characters except `\[-_.~0-9a-zA-Z\]` are percent-encoded. The
222/// server side does the reverse decoding. Such variables show up in the
223/// [Discovery
224/// Document](<https://developers.google.com/discovery/v1/reference/apis>) as
225/// `{var}`.
226///
227/// If a variable contains multiple path segments, such as `"{var=foo/*}"`
228/// or `"{var=**}"`, when such a variable is expanded into a URL path on the
229/// client side, all characters except `\[-_.~/0-9a-zA-Z\]` are percent-encoded.
230/// The server side does the reverse decoding, except "%2F" and "%2f" are left
231/// unchanged. Such variables show up in the
232/// [Discovery
233/// Document](<https://developers.google.com/discovery/v1/reference/apis>) as
234/// `{+var}`.
235///
236/// Using gRPC API Service Configuration
237///
238/// gRPC API Service Configuration (service config) is a configuration language
239/// for configuring a gRPC service to become a user-facing product. The
240/// service config is simply the YAML representation of the `google.api.Service`
241/// proto message.
242///
243/// As an alternative to annotating your proto file, you can configure gRPC
244/// transcoding in your service config YAML files. You do this by specifying a
245/// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
246/// effect as the proto annotation. This can be particularly useful if you
247/// have a proto that is reused in multiple services. Note that any transcoding
248/// specified in the service config will override any matching transcoding
249/// configuration in the proto.
250///
251/// The following example selects a gRPC method and applies an `HttpRule` to it:
252///
253///      http:
254///        rules:
255///          - selector: example.v1.Messaging.GetMessage
256///            get: /v1/messages/{message_id}/{sub.subfield}
257///
258/// Special notes
259///
260/// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
261/// proto to JSON conversion must follow the [proto3
262/// specification](<https://developers.google.com/protocol-buffers/docs/proto3#json>).
263///
264/// While the single segment variable follows the semantics of
265/// [RFC 6570](<https://tools.ietf.org/html/rfc6570>) Section 3.2.2 Simple String
266/// Expansion, the multi segment variable **does not** follow RFC 6570 Section
267/// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
268/// does not expand special characters like `?` and `#`, which would lead
269/// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
270/// for multi segment variables.
271///
272/// The path variables **must not** refer to any repeated or mapped field,
273/// because client libraries are not capable of handling such variable expansion.
274///
275/// The path variables **must not** capture the leading "/" character. The reason
276/// is that the most common use case "{var}" does not capture the leading "/"
277/// character. For consistency, all path variables must share the same behavior.
278///
279/// Repeated message fields must not be mapped to URL query parameters, because
280/// no client library can support such complicated mapping.
281///
282/// If an API needs to use a JSON array for request or response body, it can map
283/// the request or response body to a repeated field. However, some gRPC
284/// Transcoding implementations may not support this feature.
285#[derive(Clone, PartialEq, ::prost::Message)]
286pub struct HttpRule {
287    /// Selects a method to which this rule applies.
288    ///
289    /// Refer to [selector][google.api.DocumentationRule.selector] for syntax
290    /// details.
291    #[prost(string, tag = "1")]
292    pub selector: ::prost::alloc::string::String,
293    /// The name of the request field whose value is mapped to the HTTP request
294    /// body, or `*` for mapping all request fields not captured by the path
295    /// pattern to the HTTP body, or omitted for not having any HTTP request body.
296    ///
297    /// NOTE: the referred field must be present at the top-level of the request
298    /// message type.
299    #[prost(string, tag = "7")]
300    pub body: ::prost::alloc::string::String,
301    /// Optional. The name of the response field whose value is mapped to the HTTP
302    /// response body. When omitted, the entire response message will be used
303    /// as the HTTP response body.
304    ///
305    /// NOTE: The referred field must be present at the top-level of the response
306    /// message type.
307    #[prost(string, tag = "12")]
308    pub response_body: ::prost::alloc::string::String,
309    /// Additional HTTP bindings for the selector. Nested bindings must
310    /// not contain an `additional_bindings` field themselves (that is,
311    /// the nesting may only be one level deep).
312    #[prost(message, repeated, tag = "11")]
313    pub additional_bindings: ::prost::alloc::vec::Vec<HttpRule>,
314    /// Determines the URL pattern is matched by this rules. This pattern can be
315    /// used with any of the {get|put|post|delete|patch} methods. A custom method
316    /// can be defined using the 'custom' field.
317    #[prost(oneof = "http_rule::Pattern", tags = "2, 3, 4, 5, 6, 8")]
318    pub pattern: ::core::option::Option<http_rule::Pattern>,
319}
320/// Nested message and enum types in `HttpRule`.
321pub mod http_rule {
322    /// Determines the URL pattern is matched by this rules. This pattern can be
323    /// used with any of the {get|put|post|delete|patch} methods. A custom method
324    /// can be defined using the 'custom' field.
325    #[derive(Clone, PartialEq, ::prost::Oneof)]
326    pub enum Pattern {
327        /// Maps to HTTP GET. Used for listing and getting information about
328        /// resources.
329        #[prost(string, tag = "2")]
330        Get(::prost::alloc::string::String),
331        /// Maps to HTTP PUT. Used for replacing a resource.
332        #[prost(string, tag = "3")]
333        Put(::prost::alloc::string::String),
334        /// Maps to HTTP POST. Used for creating a resource or performing an action.
335        #[prost(string, tag = "4")]
336        Post(::prost::alloc::string::String),
337        /// Maps to HTTP DELETE. Used for deleting a resource.
338        #[prost(string, tag = "5")]
339        Delete(::prost::alloc::string::String),
340        /// Maps to HTTP PATCH. Used for updating a resource.
341        #[prost(string, tag = "6")]
342        Patch(::prost::alloc::string::String),
343        /// The custom pattern is used for specifying an HTTP method that is not
344        /// included in the `pattern` field, such as HEAD, or "*" to leave the
345        /// HTTP method unspecified for this rule. The wild-card rule is useful
346        /// for services that provide content to Web (HTML) clients.
347        #[prost(message, tag = "8")]
348        Custom(super::CustomHttpPattern),
349    }
350}
351/// A custom pattern is used for defining custom HTTP verb.
352#[derive(Clone, PartialEq, ::prost::Message)]
353pub struct CustomHttpPattern {
354    /// The name of this custom HTTP verb.
355    #[prost(string, tag = "1")]
356    pub kind: ::prost::alloc::string::String,
357    /// The path matched by this custom verb.
358    #[prost(string, tag = "2")]
359    pub path: ::prost::alloc::string::String,
360}
361/// The launch stage as defined by [Google Cloud Platform
362/// Launch Stages](<https://cloud.google.com/terms/launch-stages>).
363#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
364#[repr(i32)]
365pub enum LaunchStage {
366    /// Do not use this default value.
367    Unspecified = 0,
368    /// The feature is not yet implemented. Users can not use it.
369    Unimplemented = 6,
370    /// Prelaunch features are hidden from users and are only visible internally.
371    Prelaunch = 7,
372    /// Early Access features are limited to a closed group of testers. To use
373    /// these features, you must sign up in advance and sign a Trusted Tester
374    /// agreement (which includes confidentiality provisions). These features may
375    /// be unstable, changed in backward-incompatible ways, and are not
376    /// guaranteed to be released.
377    EarlyAccess = 1,
378    /// Alpha is a limited availability test for releases before they are cleared
379    /// for widespread use. By Alpha, all significant design issues are resolved
380    /// and we are in the process of verifying functionality. Alpha customers
381    /// need to apply for access, agree to applicable terms, and have their
382    /// projects allowlisted. Alpha releases don't have to be feature complete,
383    /// no SLAs are provided, and there are no technical support obligations, but
384    /// they will be far enough along that customers can actually use them in
385    /// test environments or for limited-use tests -- just like they would in
386    /// normal production cases.
387    Alpha = 2,
388    /// Beta is the point at which we are ready to open a release for any
389    /// customer to use. There are no SLA or technical support obligations in a
390    /// Beta release. Products will be complete from a feature perspective, but
391    /// may have some open outstanding issues. Beta releases are suitable for
392    /// limited production use cases.
393    Beta = 3,
394    /// GA features are open to all developers and are considered stable and
395    /// fully qualified for production use.
396    Ga = 4,
397    /// Deprecated features are scheduled to be shut down and removed. For more
398    /// information, see the "Deprecation Policy" section of our [Terms of
399    /// Service](<https://cloud.google.com/terms/>)
400    /// and the [Google Cloud Platform Subject to the Deprecation
401    /// Policy](<https://cloud.google.com/terms/deprecation>) documentation.
402    Deprecated = 5,
403}
404impl LaunchStage {
405    /// String value of the enum field names used in the ProtoBuf definition.
406    ///
407    /// The values are not transformed in any way and thus are considered stable
408    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
409    pub fn as_str_name(&self) -> &'static str {
410        match self {
411            Self::Unspecified => "LAUNCH_STAGE_UNSPECIFIED",
412            Self::Unimplemented => "UNIMPLEMENTED",
413            Self::Prelaunch => "PRELAUNCH",
414            Self::EarlyAccess => "EARLY_ACCESS",
415            Self::Alpha => "ALPHA",
416            Self::Beta => "BETA",
417            Self::Ga => "GA",
418            Self::Deprecated => "DEPRECATED",
419        }
420    }
421    /// Creates an enum from field names used in the ProtoBuf definition.
422    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
423        match value {
424            "LAUNCH_STAGE_UNSPECIFIED" => Some(Self::Unspecified),
425            "UNIMPLEMENTED" => Some(Self::Unimplemented),
426            "PRELAUNCH" => Some(Self::Prelaunch),
427            "EARLY_ACCESS" => Some(Self::EarlyAccess),
428            "ALPHA" => Some(Self::Alpha),
429            "BETA" => Some(Self::Beta),
430            "GA" => Some(Self::Ga),
431            "DEPRECATED" => Some(Self::Deprecated),
432            _ => None,
433        }
434    }
435}
436/// Required information for every language.
437#[derive(Clone, PartialEq, ::prost::Message)]
438pub struct CommonLanguageSettings {
439    /// Link to automatically generated reference documentation.  Example:
440    /// <https://cloud.google.com/nodejs/docs/reference/asset/latest>
441    #[deprecated]
442    #[prost(string, tag = "1")]
443    pub reference_docs_uri: ::prost::alloc::string::String,
444    /// The destination where API teams want this client library to be published.
445    #[prost(enumeration = "ClientLibraryDestination", repeated, tag = "2")]
446    pub destinations: ::prost::alloc::vec::Vec<i32>,
447    /// Configuration for which RPCs should be generated in the GAPIC client.
448    #[prost(message, optional, tag = "3")]
449    pub selective_gapic_generation: ::core::option::Option<SelectiveGapicGeneration>,
450}
451/// Details about how and where to publish client libraries.
452#[derive(Clone, PartialEq, ::prost::Message)]
453pub struct ClientLibrarySettings {
454    /// Version of the API to apply these settings to. This is the full protobuf
455    /// package for the API, ending in the version element.
456    /// Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
457    #[prost(string, tag = "1")]
458    pub version: ::prost::alloc::string::String,
459    /// Launch stage of this version of the API.
460    #[prost(enumeration = "LaunchStage", tag = "2")]
461    pub launch_stage: i32,
462    /// When using transport=rest, the client request will encode enums as
463    /// numbers rather than strings.
464    #[prost(bool, tag = "3")]
465    pub rest_numeric_enums: bool,
466    /// Settings for legacy Java features, supported in the Service YAML.
467    #[prost(message, optional, tag = "21")]
468    pub java_settings: ::core::option::Option<JavaSettings>,
469    /// Settings for C++ client libraries.
470    #[prost(message, optional, tag = "22")]
471    pub cpp_settings: ::core::option::Option<CppSettings>,
472    /// Settings for PHP client libraries.
473    #[prost(message, optional, tag = "23")]
474    pub php_settings: ::core::option::Option<PhpSettings>,
475    /// Settings for Python client libraries.
476    #[prost(message, optional, tag = "24")]
477    pub python_settings: ::core::option::Option<PythonSettings>,
478    /// Settings for Node client libraries.
479    #[prost(message, optional, tag = "25")]
480    pub node_settings: ::core::option::Option<NodeSettings>,
481    /// Settings for .NET client libraries.
482    #[prost(message, optional, tag = "26")]
483    pub dotnet_settings: ::core::option::Option<DotnetSettings>,
484    /// Settings for Ruby client libraries.
485    #[prost(message, optional, tag = "27")]
486    pub ruby_settings: ::core::option::Option<RubySettings>,
487    /// Settings for Go client libraries.
488    #[prost(message, optional, tag = "28")]
489    pub go_settings: ::core::option::Option<GoSettings>,
490}
491/// This message configures the settings for publishing [Google Cloud Client
492/// libraries](<https://cloud.google.com/apis/docs/cloud-client-libraries>)
493/// generated from the service config.
494#[derive(Clone, PartialEq, ::prost::Message)]
495pub struct Publishing {
496    /// A list of API method settings, e.g. the behavior for methods that use the
497    /// long-running operation pattern.
498    #[prost(message, repeated, tag = "2")]
499    pub method_settings: ::prost::alloc::vec::Vec<MethodSettings>,
500    /// Link to a *public* URI where users can report issues.  Example:
501    /// <https://issuetracker.google.com/issues/new?component=190865&template=1161103>
502    #[prost(string, tag = "101")]
503    pub new_issue_uri: ::prost::alloc::string::String,
504    /// Link to product home page.  Example:
505    /// <https://cloud.google.com/asset-inventory/docs/overview>
506    #[prost(string, tag = "102")]
507    pub documentation_uri: ::prost::alloc::string::String,
508    /// Used as a tracking tag when collecting data about the APIs developer
509    /// relations artifacts like docs, packages delivered to package managers,
510    /// etc.  Example: "speech".
511    #[prost(string, tag = "103")]
512    pub api_short_name: ::prost::alloc::string::String,
513    /// GitHub label to apply to issues and pull requests opened for this API.
514    #[prost(string, tag = "104")]
515    pub github_label: ::prost::alloc::string::String,
516    /// GitHub teams to be added to CODEOWNERS in the directory in GitHub
517    /// containing source code for the client libraries for this API.
518    #[prost(string, repeated, tag = "105")]
519    pub codeowner_github_teams: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
520    /// A prefix used in sample code when demarking regions to be included in
521    /// documentation.
522    #[prost(string, tag = "106")]
523    pub doc_tag_prefix: ::prost::alloc::string::String,
524    /// For whom the client library is being published.
525    #[prost(enumeration = "ClientLibraryOrganization", tag = "107")]
526    pub organization: i32,
527    /// Client library settings.  If the same version string appears multiple
528    /// times in this list, then the last one wins.  Settings from earlier
529    /// settings with the same version string are discarded.
530    #[prost(message, repeated, tag = "109")]
531    pub library_settings: ::prost::alloc::vec::Vec<ClientLibrarySettings>,
532    /// Optional link to proto reference documentation.  Example:
533    /// <https://cloud.google.com/pubsub/lite/docs/reference/rpc>
534    #[prost(string, tag = "110")]
535    pub proto_reference_documentation_uri: ::prost::alloc::string::String,
536    /// Optional link to REST reference documentation.  Example:
537    /// <https://cloud.google.com/pubsub/lite/docs/reference/rest>
538    #[prost(string, tag = "111")]
539    pub rest_reference_documentation_uri: ::prost::alloc::string::String,
540}
541/// Settings for Java client libraries.
542#[derive(Clone, PartialEq, ::prost::Message)]
543pub struct JavaSettings {
544    /// The package name to use in Java. Clobbers the java_package option
545    /// set in the protobuf. This should be used **only** by APIs
546    /// who have already set the language_settings.java.package_name" field
547    /// in gapic.yaml. API teams should use the protobuf java_package option
548    /// where possible.
549    ///
550    /// Example of a YAML configuration::
551    ///
552    ///   publishing:
553    ///     java_settings:
554    ///       library_package: com.google.cloud.pubsub.v1
555    #[prost(string, tag = "1")]
556    pub library_package: ::prost::alloc::string::String,
557    /// Configure the Java class name to use instead of the service's for its
558    /// corresponding generated GAPIC client. Keys are fully-qualified
559    /// service names as they appear in the protobuf (including the full
560    /// the language_settings.java.interface_names" field in gapic.yaml. API
561    /// teams should otherwise use the service name as it appears in the
562    /// protobuf.
563    ///
564    /// Example of a YAML configuration::
565    ///
566    ///   publishing:
567    ///     java_settings:
568    ///       service_class_names:
569    ///         - google.pubsub.v1.Publisher: TopicAdmin
570    ///         - google.pubsub.v1.Subscriber: SubscriptionAdmin
571    #[prost(map = "string, string", tag = "2")]
572    pub service_class_names:
573        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
574    /// Some settings.
575    #[prost(message, optional, tag = "3")]
576    pub common: ::core::option::Option<CommonLanguageSettings>,
577}
578/// Settings for C++ client libraries.
579#[derive(Clone, PartialEq, ::prost::Message)]
580pub struct CppSettings {
581    /// Some settings.
582    #[prost(message, optional, tag = "1")]
583    pub common: ::core::option::Option<CommonLanguageSettings>,
584}
585/// Settings for Php client libraries.
586#[derive(Clone, PartialEq, ::prost::Message)]
587pub struct PhpSettings {
588    /// Some settings.
589    #[prost(message, optional, tag = "1")]
590    pub common: ::core::option::Option<CommonLanguageSettings>,
591}
592/// Settings for Python client libraries.
593#[derive(Clone, PartialEq, ::prost::Message)]
594pub struct PythonSettings {
595    /// Some settings.
596    #[prost(message, optional, tag = "1")]
597    pub common: ::core::option::Option<CommonLanguageSettings>,
598    /// Experimental features to be included during client library generation.
599    #[prost(message, optional, tag = "2")]
600    pub experimental_features: ::core::option::Option<python_settings::ExperimentalFeatures>,
601}
602/// Nested message and enum types in `PythonSettings`.
603pub mod python_settings {
604    /// Experimental features to be included during client library generation.
605    /// These fields will be deprecated once the feature graduates and is enabled
606    /// by default.
607    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
608    pub struct ExperimentalFeatures {
609        /// Enables generation of asynchronous REST clients if `rest` transport is
610        /// enabled. By default, asynchronous REST clients will not be generated.
611        /// This feature will be enabled by default 1 month after launching the
612        /// feature in preview packages.
613        #[prost(bool, tag = "1")]
614        pub rest_async_io_enabled: bool,
615        /// Enables generation of protobuf code using new types that are more
616        /// Pythonic which are included in `protobuf>=5.29.x`. This feature will be
617        /// enabled by default 1 month after launching the feature in preview
618        /// packages.
619        #[prost(bool, tag = "2")]
620        pub protobuf_pythonic_types_enabled: bool,
621    }
622}
623/// Settings for Node client libraries.
624#[derive(Clone, PartialEq, ::prost::Message)]
625pub struct NodeSettings {
626    /// Some settings.
627    #[prost(message, optional, tag = "1")]
628    pub common: ::core::option::Option<CommonLanguageSettings>,
629}
630/// Settings for Dotnet client libraries.
631#[derive(Clone, PartialEq, ::prost::Message)]
632pub struct DotnetSettings {
633    /// Some settings.
634    #[prost(message, optional, tag = "1")]
635    pub common: ::core::option::Option<CommonLanguageSettings>,
636    /// Map from original service names to renamed versions.
637    /// This is used when the default generated types
638    /// would cause a naming conflict. (Neither name is
639    /// fully-qualified.)
640    /// Example: Subscriber to SubscriberServiceApi.
641    #[prost(map = "string, string", tag = "2")]
642    pub renamed_services:
643        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
644    /// Map from full resource types to the effective short name
645    /// for the resource. This is used when otherwise resource
646    /// named from different services would cause naming collisions.
647    /// Example entry:
648    /// "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
649    #[prost(map = "string, string", tag = "3")]
650    pub renamed_resources:
651        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
652    /// List of full resource types to ignore during generation.
653    /// This is typically used for API-specific Location resources,
654    /// which should be handled by the generator as if they were actually
655    /// the common Location resources.
656    /// Example entry: "documentai.googleapis.com/Location"
657    #[prost(string, repeated, tag = "4")]
658    pub ignored_resources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
659    /// Namespaces which must be aliased in snippets due to
660    /// a known (but non-generator-predictable) naming collision
661    #[prost(string, repeated, tag = "5")]
662    pub forced_namespace_aliases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
663    /// Method signatures (in the form "service.method(signature)")
664    /// which are provided separately, so shouldn't be generated.
665    /// Snippets *calling* these methods are still generated, however.
666    #[prost(string, repeated, tag = "6")]
667    pub handwritten_signatures: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
668}
669/// Settings for Ruby client libraries.
670#[derive(Clone, PartialEq, ::prost::Message)]
671pub struct RubySettings {
672    /// Some settings.
673    #[prost(message, optional, tag = "1")]
674    pub common: ::core::option::Option<CommonLanguageSettings>,
675}
676/// Settings for Go client libraries.
677#[derive(Clone, PartialEq, ::prost::Message)]
678pub struct GoSettings {
679    /// Some settings.
680    #[prost(message, optional, tag = "1")]
681    pub common: ::core::option::Option<CommonLanguageSettings>,
682}
683/// Describes the generator configuration for a method.
684#[derive(Clone, PartialEq, ::prost::Message)]
685pub struct MethodSettings {
686    /// The fully qualified name of the method, for which the options below apply.
687    /// This is used to find the method to apply the options.
688    ///
689    /// Example:
690    ///
691    ///     publishing:
692    ///       method_settings:
693    ///       - selector: google.storage.control.v2.StorageControl.CreateFolder
694    ///         # method settings for CreateFolder...
695    #[prost(string, tag = "1")]
696    pub selector: ::prost::alloc::string::String,
697    /// Describes settings to use for long-running operations when generating
698    /// API methods for RPCs. Complements RPCs that use the annotations in
699    /// google/longrunning/operations.proto.
700    ///
701    /// Example of a YAML configuration::
702    ///
703    ///     publishing:
704    ///       method_settings:
705    ///       - selector: google.cloud.speech.v2.Speech.BatchRecognize
706    ///         long_running:
707    ///           initial_poll_delay: 60s # 1 minute
708    ///           poll_delay_multiplier: 1.5
709    ///           max_poll_delay: 360s # 6 minutes
710    ///           total_poll_timeout: 54000s # 90 minutes
711    #[prost(message, optional, tag = "2")]
712    pub long_running: ::core::option::Option<method_settings::LongRunning>,
713    /// List of top-level fields of the request message, that should be
714    /// automatically populated by the client libraries based on their
715    /// (google.api.field_info).format. Currently supported format: UUID4.
716    ///
717    /// Example of a YAML configuration:
718    ///
719    ///     publishing:
720    ///       method_settings:
721    ///       - selector: google.example.v1.ExampleService.CreateExample
722    ///         auto_populated_fields:
723    ///         - request_id
724    #[prost(string, repeated, tag = "3")]
725    pub auto_populated_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
726}
727/// Nested message and enum types in `MethodSettings`.
728pub mod method_settings {
729    /// Describes settings to use when generating API methods that use the
730    /// long-running operation pattern.
731    /// All default values below are from those used in the client library
732    /// generators (e.g.
733    /// [Java](<https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java>)).
734    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
735    pub struct LongRunning {
736        /// Initial delay after which the first poll request will be made.
737        /// Default value: 5 seconds.
738        #[prost(message, optional, tag = "1")]
739        pub initial_poll_delay: ::core::option::Option<::prost_types::Duration>,
740        /// Multiplier to gradually increase delay between subsequent polls until it
741        /// reaches max_poll_delay.
742        /// Default value: 1.5.
743        #[prost(float, tag = "2")]
744        pub poll_delay_multiplier: f32,
745        /// Maximum time between two subsequent poll requests.
746        /// Default value: 45 seconds.
747        #[prost(message, optional, tag = "3")]
748        pub max_poll_delay: ::core::option::Option<::prost_types::Duration>,
749        /// Total polling timeout.
750        /// Default value: 5 minutes.
751        #[prost(message, optional, tag = "4")]
752        pub total_poll_timeout: ::core::option::Option<::prost_types::Duration>,
753    }
754}
755/// This message is used to configure the generation of a subset of the RPCs in
756/// a service for client libraries.
757#[derive(Clone, PartialEq, ::prost::Message)]
758pub struct SelectiveGapicGeneration {
759    /// An allowlist of the fully qualified names of RPCs that should be included
760    /// on public client surfaces.
761    #[prost(string, repeated, tag = "1")]
762    pub methods: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
763}
764/// The organization for which the client libraries are being published.
765/// Affects the url where generated docs are published, etc.
766#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
767#[repr(i32)]
768pub enum ClientLibraryOrganization {
769    /// Not useful.
770    Unspecified = 0,
771    /// Google Cloud Platform Org.
772    Cloud = 1,
773    /// Ads (Advertising) Org.
774    Ads = 2,
775    /// Photos Org.
776    Photos = 3,
777    /// Street View Org.
778    StreetView = 4,
779    /// Shopping Org.
780    Shopping = 5,
781    /// Geo Org.
782    Geo = 6,
783    /// Generative AI - <https://developers.generativeai.google>
784    GenerativeAi = 7,
785}
786impl ClientLibraryOrganization {
787    /// String value of the enum field names used in the ProtoBuf definition.
788    ///
789    /// The values are not transformed in any way and thus are considered stable
790    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
791    pub fn as_str_name(&self) -> &'static str {
792        match self {
793            Self::Unspecified => "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED",
794            Self::Cloud => "CLOUD",
795            Self::Ads => "ADS",
796            Self::Photos => "PHOTOS",
797            Self::StreetView => "STREET_VIEW",
798            Self::Shopping => "SHOPPING",
799            Self::Geo => "GEO",
800            Self::GenerativeAi => "GENERATIVE_AI",
801        }
802    }
803    /// Creates an enum from field names used in the ProtoBuf definition.
804    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
805        match value {
806            "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" => Some(Self::Unspecified),
807            "CLOUD" => Some(Self::Cloud),
808            "ADS" => Some(Self::Ads),
809            "PHOTOS" => Some(Self::Photos),
810            "STREET_VIEW" => Some(Self::StreetView),
811            "SHOPPING" => Some(Self::Shopping),
812            "GEO" => Some(Self::Geo),
813            "GENERATIVE_AI" => Some(Self::GenerativeAi),
814            _ => None,
815        }
816    }
817}
818/// To where should client libraries be published?
819#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
820#[repr(i32)]
821pub enum ClientLibraryDestination {
822    /// Client libraries will neither be generated nor published to package
823    /// managers.
824    Unspecified = 0,
825    /// Generate the client library in a repo under github.com/googleapis,
826    /// but don't publish it to package managers.
827    Github = 10,
828    /// Publish the library to package managers like nuget.org and npmjs.com.
829    PackageManager = 20,
830}
831impl ClientLibraryDestination {
832    /// String value of the enum field names used in the ProtoBuf definition.
833    ///
834    /// The values are not transformed in any way and thus are considered stable
835    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
836    pub fn as_str_name(&self) -> &'static str {
837        match self {
838            Self::Unspecified => "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED",
839            Self::Github => "GITHUB",
840            Self::PackageManager => "PACKAGE_MANAGER",
841        }
842    }
843    /// Creates an enum from field names used in the ProtoBuf definition.
844    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
845        match value {
846            "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" => Some(Self::Unspecified),
847            "GITHUB" => Some(Self::Github),
848            "PACKAGE_MANAGER" => Some(Self::PackageManager),
849            _ => None,
850        }
851    }
852}
853/// An indicator of the behavior of a given field (for example, that a field
854/// is required in requests, or given as output but ignored as input).
855/// This **does not** change the behavior in protocol buffers itself; it only
856/// denotes the behavior and may affect how API tooling handles the field.
857///
858/// Note: This enum **may** receive new values in the future.
859#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
860#[repr(i32)]
861pub enum FieldBehavior {
862    /// Conventional default for enums. Do not use this.
863    Unspecified = 0,
864    /// Specifically denotes a field as optional.
865    /// While all fields in protocol buffers are optional, this may be specified
866    /// for emphasis if appropriate.
867    Optional = 1,
868    /// Denotes a field as required.
869    /// This indicates that the field **must** be provided as part of the request,
870    /// and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
871    Required = 2,
872    /// Denotes a field as output only.
873    /// This indicates that the field is provided in responses, but including the
874    /// field in a request does nothing (the server *must* ignore it and
875    /// *must not* throw an error as a result of the field's presence).
876    OutputOnly = 3,
877    /// Denotes a field as input only.
878    /// This indicates that the field is provided in requests, and the
879    /// corresponding field is not included in output.
880    InputOnly = 4,
881    /// Denotes a field as immutable.
882    /// This indicates that the field may be set once in a request to create a
883    /// resource, but may not be changed thereafter.
884    Immutable = 5,
885    /// Denotes that a (repeated) field is an unordered list.
886    /// This indicates that the service may provide the elements of the list
887    /// in any arbitrary  order, rather than the order the user originally
888    /// provided. Additionally, the list's order may or may not be stable.
889    UnorderedList = 6,
890    /// Denotes that this field returns a non-empty default value if not set.
891    /// This indicates that if the user provides the empty value in a request,
892    /// a non-empty value will be returned. The user will not be aware of what
893    /// non-empty value to expect.
894    NonEmptyDefault = 7,
895    /// Denotes that the field in a resource (a message annotated with
896    /// google.api.resource) is used in the resource name to uniquely identify the
897    /// resource. For AIP-compliant APIs, this should only be applied to the
898    /// `name` field on the resource.
899    ///
900    /// This behavior should not be applied to references to other resources within
901    /// the message.
902    ///
903    /// The identifier field of resources often have different field behavior
904    /// depending on the request it is embedded in (e.g. for Create methods name
905    /// is optional and unused, while for Update methods it is required). Instead
906    /// of method-specific annotations, only `IDENTIFIER` is required.
907    Identifier = 8,
908}
909impl FieldBehavior {
910    /// String value of the enum field names used in the ProtoBuf definition.
911    ///
912    /// The values are not transformed in any way and thus are considered stable
913    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
914    pub fn as_str_name(&self) -> &'static str {
915        match self {
916            Self::Unspecified => "FIELD_BEHAVIOR_UNSPECIFIED",
917            Self::Optional => "OPTIONAL",
918            Self::Required => "REQUIRED",
919            Self::OutputOnly => "OUTPUT_ONLY",
920            Self::InputOnly => "INPUT_ONLY",
921            Self::Immutable => "IMMUTABLE",
922            Self::UnorderedList => "UNORDERED_LIST",
923            Self::NonEmptyDefault => "NON_EMPTY_DEFAULT",
924            Self::Identifier => "IDENTIFIER",
925        }
926    }
927    /// Creates an enum from field names used in the ProtoBuf definition.
928    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
929        match value {
930            "FIELD_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
931            "OPTIONAL" => Some(Self::Optional),
932            "REQUIRED" => Some(Self::Required),
933            "OUTPUT_ONLY" => Some(Self::OutputOnly),
934            "INPUT_ONLY" => Some(Self::InputOnly),
935            "IMMUTABLE" => Some(Self::Immutable),
936            "UNORDERED_LIST" => Some(Self::UnorderedList),
937            "NON_EMPTY_DEFAULT" => Some(Self::NonEmptyDefault),
938            "IDENTIFIER" => Some(Self::Identifier),
939            _ => None,
940        }
941    }
942}
943/// A simple descriptor of a resource type.
944///
945/// ResourceDescriptor annotates a resource message (either by means of a
946/// protobuf annotation or use in the service config), and associates the
947/// resource's schema, the resource type, and the pattern of the resource name.
948///
949/// Example:
950///
951///      message Topic {
952///        // Indicates this message defines a resource schema.
953///        // Declares the resource type in the format of {service}/{kind}.
954///        // For Kubernetes resources, the format is {api group}/{kind}.
955///        option (google.api.resource) = {
956///          type: "pubsub.googleapis.com/Topic"
957///          pattern: "projects/{project}/topics/{topic}"
958///        };
959///      }
960///
961/// The ResourceDescriptor Yaml config will look like:
962///
963///      resources:
964///      - type: "pubsub.googleapis.com/Topic"
965///        pattern: "projects/{project}/topics/{topic}"
966///
967/// Sometimes, resources have multiple patterns, typically because they can
968/// live under multiple parents.
969///
970/// Example:
971///
972///      message LogEntry {
973///        option (google.api.resource) = {
974///          type: "logging.googleapis.com/LogEntry"
975///          pattern: "projects/{project}/logs/{log}"
976///          pattern: "folders/{folder}/logs/{log}"
977///          pattern: "organizations/{organization}/logs/{log}"
978///          pattern: "billingAccounts/{billing_account}/logs/{log}"
979///        };
980///      }
981///
982/// The ResourceDescriptor Yaml config will look like:
983///
984///      resources:
985///      - type: 'logging.googleapis.com/LogEntry'
986///        pattern: "projects/{project}/logs/{log}"
987///        pattern: "folders/{folder}/logs/{log}"
988///        pattern: "organizations/{organization}/logs/{log}"
989///        pattern: "billingAccounts/{billing_account}/logs/{log}"
990#[derive(Clone, PartialEq, ::prost::Message)]
991pub struct ResourceDescriptor {
992    /// The resource type. It must be in the format of
993    /// {service_name}/{resource_type_kind}. The `resource_type_kind` must be
994    /// singular and must not include version numbers.
995    ///
996    /// Example: `storage.googleapis.com/Bucket`
997    ///
998    /// The value of the resource_type_kind must follow the regular expression
999    /// /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
1000    /// should use PascalCase (UpperCamelCase). The maximum number of
1001    /// characters allowed for the `resource_type_kind` is 100.
1002    #[prost(string, tag = "1")]
1003    pub r#type: ::prost::alloc::string::String,
1004    /// Optional. The relative resource name pattern associated with this resource
1005    /// type. The DNS prefix of the full resource name shouldn't be specified here.
1006    ///
1007    /// The path pattern must follow the syntax, which aligns with HTTP binding
1008    /// syntax:
1009    ///
1010    ///      Template = Segment { "/" Segment } ;
1011    ///      Segment = LITERAL | Variable ;
1012    ///      Variable = "{" LITERAL "}" ;
1013    ///
1014    /// Examples:
1015    ///
1016    ///      - "projects/{project}/topics/{topic}"
1017    ///      - "projects/{project}/knowledgeBases/{knowledge_base}"
1018    ///
1019    /// The components in braces correspond to the IDs for each resource in the
1020    /// hierarchy. It is expected that, if multiple patterns are provided,
1021    /// the same component name (e.g. "project") refers to IDs of the same
1022    /// type of resource.
1023    #[prost(string, repeated, tag = "2")]
1024    pub pattern: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1025    /// Optional. The field on the resource that designates the resource name
1026    /// field. If omitted, this is assumed to be "name".
1027    #[prost(string, tag = "3")]
1028    pub name_field: ::prost::alloc::string::String,
1029    /// Optional. The historical or future-looking state of the resource pattern.
1030    ///
1031    /// Example:
1032    ///
1033    ///      // The InspectTemplate message originally only supported resource
1034    ///      // names with organization, and project was added later.
1035    ///      message InspectTemplate {
1036    ///        option (google.api.resource) = {
1037    ///          type: "dlp.googleapis.com/InspectTemplate"
1038    ///          pattern:
1039    ///          "organizations/{organization}/inspectTemplates/{inspect_template}"
1040    ///          pattern: "projects/{project}/inspectTemplates/{inspect_template}"
1041    ///          history: ORIGINALLY_SINGLE_PATTERN
1042    ///        };
1043    ///      }
1044    #[prost(enumeration = "resource_descriptor::History", tag = "4")]
1045    pub history: i32,
1046    /// The plural name used in the resource name and permission names, such as
1047    /// 'projects' for the resource name of 'projects/{project}' and the permission
1048    /// name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
1049    /// to this is for Nested Collections that have stuttering names, as defined
1050    /// in [AIP-122](<https://google.aip.dev/122#nested-collections>), where the
1051    /// collection ID in the resource name pattern does not necessarily directly
1052    /// match the `plural` value.
1053    ///
1054    /// It is the same concept of the `plural` field in k8s CRD spec
1055    /// <https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/>
1056    ///
1057    /// Note: The plural form is required even for singleton resources. See
1058    /// <https://aip.dev/156>
1059    #[prost(string, tag = "5")]
1060    pub plural: ::prost::alloc::string::String,
1061    /// The same concept of the `singular` field in k8s CRD spec
1062    /// <https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/>
1063    /// Such as "project" for the `resourcemanager.googleapis.com/Project` type.
1064    #[prost(string, tag = "6")]
1065    pub singular: ::prost::alloc::string::String,
1066    /// Style flag(s) for this resource.
1067    /// These indicate that a resource is expected to conform to a given
1068    /// style. See the specific style flags for additional information.
1069    #[prost(enumeration = "resource_descriptor::Style", repeated, tag = "10")]
1070    pub style: ::prost::alloc::vec::Vec<i32>,
1071}
1072/// Nested message and enum types in `ResourceDescriptor`.
1073pub mod resource_descriptor {
1074    /// A description of the historical or future-looking state of the
1075    /// resource pattern.
1076    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1077    #[repr(i32)]
1078    pub enum History {
1079        /// The "unset" value.
1080        Unspecified = 0,
1081        /// The resource originally had one pattern and launched as such, and
1082        /// additional patterns were added later.
1083        OriginallySinglePattern = 1,
1084        /// The resource has one pattern, but the API owner expects to add more
1085        /// later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
1086        /// that from being necessary once there are multiple patterns.)
1087        FutureMultiPattern = 2,
1088    }
1089    impl History {
1090        /// String value of the enum field names used in the ProtoBuf definition.
1091        ///
1092        /// The values are not transformed in any way and thus are considered stable
1093        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1094        pub fn as_str_name(&self) -> &'static str {
1095            match self {
1096                Self::Unspecified => "HISTORY_UNSPECIFIED",
1097                Self::OriginallySinglePattern => "ORIGINALLY_SINGLE_PATTERN",
1098                Self::FutureMultiPattern => "FUTURE_MULTI_PATTERN",
1099            }
1100        }
1101        /// Creates an enum from field names used in the ProtoBuf definition.
1102        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1103            match value {
1104                "HISTORY_UNSPECIFIED" => Some(Self::Unspecified),
1105                "ORIGINALLY_SINGLE_PATTERN" => Some(Self::OriginallySinglePattern),
1106                "FUTURE_MULTI_PATTERN" => Some(Self::FutureMultiPattern),
1107                _ => None,
1108            }
1109        }
1110    }
1111    /// A flag representing a specific style that a resource claims to conform to.
1112    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1113    #[repr(i32)]
1114    pub enum Style {
1115        /// The unspecified value. Do not use.
1116        Unspecified = 0,
1117        /// This resource is intended to be "declarative-friendly".
1118        ///
1119        /// Declarative-friendly resources must be more strictly consistent, and
1120        /// setting this to true communicates to tools that this resource should
1121        /// adhere to declarative-friendly expectations.
1122        ///
1123        /// Note: This is used by the API linter (linter.aip.dev) to enable
1124        /// additional checks.
1125        DeclarativeFriendly = 1,
1126    }
1127    impl Style {
1128        /// String value of the enum field names used in the ProtoBuf definition.
1129        ///
1130        /// The values are not transformed in any way and thus are considered stable
1131        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1132        pub fn as_str_name(&self) -> &'static str {
1133            match self {
1134                Self::Unspecified => "STYLE_UNSPECIFIED",
1135                Self::DeclarativeFriendly => "DECLARATIVE_FRIENDLY",
1136            }
1137        }
1138        /// Creates an enum from field names used in the ProtoBuf definition.
1139        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1140            match value {
1141                "STYLE_UNSPECIFIED" => Some(Self::Unspecified),
1142                "DECLARATIVE_FRIENDLY" => Some(Self::DeclarativeFriendly),
1143                _ => None,
1144            }
1145        }
1146    }
1147}
1148/// Defines a proto annotation that describes a string field that refers to
1149/// an API resource.
1150#[derive(Clone, PartialEq, ::prost::Message)]
1151pub struct ResourceReference {
1152    /// The resource type that the annotated field references.
1153    ///
1154    /// Example:
1155    ///
1156    ///      message Subscription {
1157    ///        string topic = 2 [(google.api.resource_reference) = {
1158    ///          type: "pubsub.googleapis.com/Topic"
1159    ///        }];
1160    ///      }
1161    ///
1162    /// Occasionally, a field may reference an arbitrary resource. In this case,
1163    /// APIs use the special value * in their resource reference.
1164    ///
1165    /// Example:
1166    ///
1167    ///      message GetIamPolicyRequest {
1168    ///        string resource = 2 [(google.api.resource_reference) = {
1169    ///          type: "*"
1170    ///        }];
1171    ///      }
1172    #[prost(string, tag = "1")]
1173    pub r#type: ::prost::alloc::string::String,
1174    /// The resource type of a child collection that the annotated field
1175    /// references. This is useful for annotating the `parent` field that
1176    /// doesn't have a fixed resource type.
1177    ///
1178    /// Example:
1179    ///
1180    ///      message ListLogEntriesRequest {
1181    ///        string parent = 1 [(google.api.resource_reference) = {
1182    ///          child_type: "logging.googleapis.com/LogEntry"
1183    ///        };
1184    ///      }
1185    #[prost(string, tag = "2")]
1186    pub child_type: ::prost::alloc::string::String,
1187}
1188/// A description of a label.
1189#[derive(Clone, PartialEq, ::prost::Message)]
1190pub struct LabelDescriptor {
1191    /// The label key.
1192    #[prost(string, tag = "1")]
1193    pub key: ::prost::alloc::string::String,
1194    /// The type of data that can be assigned to the label.
1195    #[prost(enumeration = "label_descriptor::ValueType", tag = "2")]
1196    pub value_type: i32,
1197    /// A human-readable description for the label.
1198    #[prost(string, tag = "3")]
1199    pub description: ::prost::alloc::string::String,
1200}
1201/// Nested message and enum types in `LabelDescriptor`.
1202pub mod label_descriptor {
1203    /// Value types that can be used as label values.
1204    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1205    #[repr(i32)]
1206    pub enum ValueType {
1207        /// A variable-length string. This is the default.
1208        String = 0,
1209        /// Boolean; true or false.
1210        Bool = 1,
1211        /// A 64-bit signed integer.
1212        Int64 = 2,
1213    }
1214    impl ValueType {
1215        /// String value of the enum field names used in the ProtoBuf definition.
1216        ///
1217        /// The values are not transformed in any way and thus are considered stable
1218        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1219        pub fn as_str_name(&self) -> &'static str {
1220            match self {
1221                Self::String => "STRING",
1222                Self::Bool => "BOOL",
1223                Self::Int64 => "INT64",
1224            }
1225        }
1226        /// Creates an enum from field names used in the ProtoBuf definition.
1227        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1228            match value {
1229                "STRING" => Some(Self::String),
1230                "BOOL" => Some(Self::Bool),
1231                "INT64" => Some(Self::Int64),
1232                _ => None,
1233            }
1234        }
1235    }
1236}
1237/// An object that describes the schema of a
1238/// [MonitoredResource][google.api.MonitoredResource] object using a type name
1239/// and a set of labels.  For example, the monitored resource descriptor for
1240/// Google Compute Engine VM instances has a type of
1241/// `"gce_instance"` and specifies the use of the labels `"instance_id"` and
1242/// `"zone"` to identify particular VM instances.
1243///
1244/// Different APIs can support different monitored resource types. APIs generally
1245/// provide a `list` method that returns the monitored resource descriptors used
1246/// by the API.
1247///
1248#[derive(Clone, PartialEq, ::prost::Message)]
1249pub struct MonitoredResourceDescriptor {
1250    /// Optional. The resource name of the monitored resource descriptor:
1251    /// `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
1252    /// {type} is the value of the `type` field in this object and
1253    /// {project_id} is a project ID that provides API-specific context for
1254    /// accessing the type.  APIs that do not use project information can use the
1255    /// resource name format `"monitoredResourceDescriptors/{type}"`.
1256    #[prost(string, tag = "5")]
1257    pub name: ::prost::alloc::string::String,
1258    /// Required. The monitored resource type. For example, the type
1259    /// `"cloudsql_database"` represents databases in Google Cloud SQL.
1260    ///   For a list of types, see [Monitored resource
1261    ///   types](<https://cloud.google.com/monitoring/api/resources>)
1262    /// and [Logging resource
1263    /// types](<https://cloud.google.com/logging/docs/api/v2/resource-list>).
1264    #[prost(string, tag = "1")]
1265    pub r#type: ::prost::alloc::string::String,
1266    /// Optional. A concise name for the monitored resource type that might be
1267    /// displayed in user interfaces. It should be a Title Cased Noun Phrase,
1268    /// without any article or other determiners. For example,
1269    /// `"Google Cloud SQL Database"`.
1270    #[prost(string, tag = "2")]
1271    pub display_name: ::prost::alloc::string::String,
1272    /// Optional. A detailed description of the monitored resource type that might
1273    /// be used in documentation.
1274    #[prost(string, tag = "3")]
1275    pub description: ::prost::alloc::string::String,
1276    /// Required. A set of labels used to describe instances of this monitored
1277    /// resource type. For example, an individual Google Cloud SQL database is
1278    /// identified by values for the labels `"database_id"` and `"zone"`.
1279    #[prost(message, repeated, tag = "4")]
1280    pub labels: ::prost::alloc::vec::Vec<LabelDescriptor>,
1281    /// Optional. The launch stage of the monitored resource definition.
1282    #[prost(enumeration = "LaunchStage", tag = "7")]
1283    pub launch_stage: i32,
1284}
1285/// An object representing a resource that can be used for monitoring, logging,
1286/// billing, or other purposes. Examples include virtual machine instances,
1287/// databases, and storage devices such as disks. The `type` field identifies a
1288/// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object
1289/// that describes the resource's schema. Information in the `labels` field
1290/// identifies the actual resource and its attributes according to the schema.
1291/// For example, a particular Compute Engine VM instance could be represented by
1292/// the following object, because the
1293/// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for
1294/// `"gce_instance"` has labels
1295/// `"project_id"`, `"instance_id"` and `"zone"`:
1296///
1297///      { "type": "gce_instance",
1298///        "labels": { "project_id": "my-project",
1299///                    "instance_id": "12345678901234",
1300///                    "zone": "us-central1-a" }}
1301#[derive(Clone, PartialEq, ::prost::Message)]
1302pub struct MonitoredResource {
1303    /// Required. The monitored resource type. This field must match
1304    /// the `type` field of a
1305    /// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
1306    /// object. For example, the type of a Compute Engine VM instance is
1307    /// `gce_instance`. Some descriptors include the service name in the type; for
1308    /// example, the type of a Datastream stream is
1309    /// `datastream.googleapis.com/Stream`.
1310    #[prost(string, tag = "1")]
1311    pub r#type: ::prost::alloc::string::String,
1312    /// Required. Values for all of the labels listed in the associated monitored
1313    /// resource descriptor. For example, Compute Engine VM instances use the
1314    /// labels `"project_id"`, `"instance_id"`, and `"zone"`.
1315    #[prost(map = "string, string", tag = "2")]
1316    pub labels:
1317        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
1318}
1319/// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource]
1320/// object. [MonitoredResource][google.api.MonitoredResource] objects contain the
1321/// minimum set of information to uniquely identify a monitored resource
1322/// instance. There is some other useful auxiliary metadata. Monitoring and
1323/// Logging use an ingestion pipeline to extract metadata for cloud resources of
1324/// all types, and store the metadata in this message.
1325#[derive(Clone, PartialEq, ::prost::Message)]
1326pub struct MonitoredResourceMetadata {
1327    /// Output only. Values for predefined system metadata labels.
1328    /// System labels are a kind of metadata extracted by Google, including
1329    /// "machine_image", "vpc", "subnet_id",
1330    /// "security_group", "name", etc.
1331    /// System label values can be only strings, Boolean values, or a list of
1332    /// strings. For example:
1333    ///
1334    ///      { "name": "my-test-instance",
1335    ///        "security_group": \["a", "b", "c"\],
1336    ///        "spot_instance": false }
1337    #[prost(message, optional, tag = "1")]
1338    pub system_labels: ::core::option::Option<::prost_types::Struct>,
1339    /// Output only. A map of user-defined metadata labels.
1340    #[prost(map = "string, string", tag = "2")]
1341    pub user_labels:
1342        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
1343}