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        /// Disables generation of an unversioned Python package for this client
622        /// library. This means that the module names will need to be versioned in
623        /// import statements. For example `import google.cloud.library_v2` instead
624        /// of `import google.cloud.library`.
625        #[prost(bool, tag = "3")]
626        pub unversioned_package_disabled: bool,
627    }
628}
629/// Settings for Node client libraries.
630#[derive(Clone, PartialEq, ::prost::Message)]
631pub struct NodeSettings {
632    /// Some settings.
633    #[prost(message, optional, tag = "1")]
634    pub common: ::core::option::Option<CommonLanguageSettings>,
635}
636/// Settings for Dotnet client libraries.
637#[derive(Clone, PartialEq, ::prost::Message)]
638pub struct DotnetSettings {
639    /// Some settings.
640    #[prost(message, optional, tag = "1")]
641    pub common: ::core::option::Option<CommonLanguageSettings>,
642    /// Map from original service names to renamed versions.
643    /// This is used when the default generated types
644    /// would cause a naming conflict. (Neither name is
645    /// fully-qualified.)
646    /// Example: Subscriber to SubscriberServiceApi.
647    #[prost(map = "string, string", tag = "2")]
648    pub renamed_services:
649        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
650    /// Map from full resource types to the effective short name
651    /// for the resource. This is used when otherwise resource
652    /// named from different services would cause naming collisions.
653    /// Example entry:
654    /// "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
655    #[prost(map = "string, string", tag = "3")]
656    pub renamed_resources:
657        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
658    /// List of full resource types to ignore during generation.
659    /// This is typically used for API-specific Location resources,
660    /// which should be handled by the generator as if they were actually
661    /// the common Location resources.
662    /// Example entry: "documentai.googleapis.com/Location"
663    #[prost(string, repeated, tag = "4")]
664    pub ignored_resources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
665    /// Namespaces which must be aliased in snippets due to
666    /// a known (but non-generator-predictable) naming collision
667    #[prost(string, repeated, tag = "5")]
668    pub forced_namespace_aliases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
669    /// Method signatures (in the form "service.method(signature)")
670    /// which are provided separately, so shouldn't be generated.
671    /// Snippets *calling* these methods are still generated, however.
672    #[prost(string, repeated, tag = "6")]
673    pub handwritten_signatures: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
674}
675/// Settings for Ruby client libraries.
676#[derive(Clone, PartialEq, ::prost::Message)]
677pub struct RubySettings {
678    /// Some settings.
679    #[prost(message, optional, tag = "1")]
680    pub common: ::core::option::Option<CommonLanguageSettings>,
681}
682/// Settings for Go client libraries.
683#[derive(Clone, PartialEq, ::prost::Message)]
684pub struct GoSettings {
685    /// Some settings.
686    #[prost(message, optional, tag = "1")]
687    pub common: ::core::option::Option<CommonLanguageSettings>,
688    /// Map of service names to renamed services. Keys are the package relative
689    /// service names and values are the name to be used for the service client
690    /// and call options.
691    ///
692    /// publishing:
693    ///    go_settings:
694    ///      renamed_services:
695    ///        Publisher: TopicAdmin
696    #[prost(map = "string, string", tag = "2")]
697    pub renamed_services:
698        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
699}
700/// Describes the generator configuration for a method.
701#[derive(Clone, PartialEq, ::prost::Message)]
702pub struct MethodSettings {
703    /// The fully qualified name of the method, for which the options below apply.
704    /// This is used to find the method to apply the options.
705    ///
706    /// Example:
707    ///
708    ///     publishing:
709    ///       method_settings:
710    ///       - selector: google.storage.control.v2.StorageControl.CreateFolder
711    ///         # method settings for CreateFolder...
712    #[prost(string, tag = "1")]
713    pub selector: ::prost::alloc::string::String,
714    /// Describes settings to use for long-running operations when generating
715    /// API methods for RPCs. Complements RPCs that use the annotations in
716    /// google/longrunning/operations.proto.
717    ///
718    /// Example of a YAML configuration::
719    ///
720    ///     publishing:
721    ///       method_settings:
722    ///       - selector: google.cloud.speech.v2.Speech.BatchRecognize
723    ///         long_running:
724    ///           initial_poll_delay: 60s # 1 minute
725    ///           poll_delay_multiplier: 1.5
726    ///           max_poll_delay: 360s # 6 minutes
727    ///           total_poll_timeout: 54000s # 90 minutes
728    #[prost(message, optional, tag = "2")]
729    pub long_running: ::core::option::Option<method_settings::LongRunning>,
730    /// List of top-level fields of the request message, that should be
731    /// automatically populated by the client libraries based on their
732    /// (google.api.field_info).format. Currently supported format: UUID4.
733    ///
734    /// Example of a YAML configuration:
735    ///
736    ///     publishing:
737    ///       method_settings:
738    ///       - selector: google.example.v1.ExampleService.CreateExample
739    ///         auto_populated_fields:
740    ///         - request_id
741    #[prost(string, repeated, tag = "3")]
742    pub auto_populated_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
743}
744/// Nested message and enum types in `MethodSettings`.
745pub mod method_settings {
746    /// Describes settings to use when generating API methods that use the
747    /// long-running operation pattern.
748    /// All default values below are from those used in the client library
749    /// generators (e.g.
750    /// [Java](<https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java>)).
751    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
752    pub struct LongRunning {
753        /// Initial delay after which the first poll request will be made.
754        /// Default value: 5 seconds.
755        #[prost(message, optional, tag = "1")]
756        pub initial_poll_delay: ::core::option::Option<::prost_types::Duration>,
757        /// Multiplier to gradually increase delay between subsequent polls until it
758        /// reaches max_poll_delay.
759        /// Default value: 1.5.
760        #[prost(float, tag = "2")]
761        pub poll_delay_multiplier: f32,
762        /// Maximum time between two subsequent poll requests.
763        /// Default value: 45 seconds.
764        #[prost(message, optional, tag = "3")]
765        pub max_poll_delay: ::core::option::Option<::prost_types::Duration>,
766        /// Total polling timeout.
767        /// Default value: 5 minutes.
768        #[prost(message, optional, tag = "4")]
769        pub total_poll_timeout: ::core::option::Option<::prost_types::Duration>,
770    }
771}
772/// This message is used to configure the generation of a subset of the RPCs in
773/// a service for client libraries.
774#[derive(Clone, PartialEq, ::prost::Message)]
775pub struct SelectiveGapicGeneration {
776    /// An allowlist of the fully qualified names of RPCs that should be included
777    /// on public client surfaces.
778    #[prost(string, repeated, tag = "1")]
779    pub methods: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
780    /// Setting this to true indicates to the client generators that methods
781    /// that would be excluded from the generation should instead be generated
782    /// in a way that indicates these methods should not be consumed by
783    /// end users. How this is expressed is up to individual language
784    /// implementations to decide. Some examples may be: added annotations,
785    /// obfuscated identifiers, or other language idiomatic patterns.
786    #[prost(bool, tag = "2")]
787    pub generate_omitted_as_internal: bool,
788}
789/// The organization for which the client libraries are being published.
790/// Affects the url where generated docs are published, etc.
791#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
792#[repr(i32)]
793pub enum ClientLibraryOrganization {
794    /// Not useful.
795    Unspecified = 0,
796    /// Google Cloud Platform Org.
797    Cloud = 1,
798    /// Ads (Advertising) Org.
799    Ads = 2,
800    /// Photos Org.
801    Photos = 3,
802    /// Street View Org.
803    StreetView = 4,
804    /// Shopping Org.
805    Shopping = 5,
806    /// Geo Org.
807    Geo = 6,
808    /// Generative AI - <https://developers.generativeai.google>
809    GenerativeAi = 7,
810}
811impl ClientLibraryOrganization {
812    /// String value of the enum field names used in the ProtoBuf definition.
813    ///
814    /// The values are not transformed in any way and thus are considered stable
815    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
816    pub fn as_str_name(&self) -> &'static str {
817        match self {
818            Self::Unspecified => "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED",
819            Self::Cloud => "CLOUD",
820            Self::Ads => "ADS",
821            Self::Photos => "PHOTOS",
822            Self::StreetView => "STREET_VIEW",
823            Self::Shopping => "SHOPPING",
824            Self::Geo => "GEO",
825            Self::GenerativeAi => "GENERATIVE_AI",
826        }
827    }
828    /// Creates an enum from field names used in the ProtoBuf definition.
829    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
830        match value {
831            "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" => Some(Self::Unspecified),
832            "CLOUD" => Some(Self::Cloud),
833            "ADS" => Some(Self::Ads),
834            "PHOTOS" => Some(Self::Photos),
835            "STREET_VIEW" => Some(Self::StreetView),
836            "SHOPPING" => Some(Self::Shopping),
837            "GEO" => Some(Self::Geo),
838            "GENERATIVE_AI" => Some(Self::GenerativeAi),
839            _ => None,
840        }
841    }
842}
843/// To where should client libraries be published?
844#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
845#[repr(i32)]
846pub enum ClientLibraryDestination {
847    /// Client libraries will neither be generated nor published to package
848    /// managers.
849    Unspecified = 0,
850    /// Generate the client library in a repo under github.com/googleapis,
851    /// but don't publish it to package managers.
852    Github = 10,
853    /// Publish the library to package managers like nuget.org and npmjs.com.
854    PackageManager = 20,
855}
856impl ClientLibraryDestination {
857    /// String value of the enum field names used in the ProtoBuf definition.
858    ///
859    /// The values are not transformed in any way and thus are considered stable
860    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
861    pub fn as_str_name(&self) -> &'static str {
862        match self {
863            Self::Unspecified => "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED",
864            Self::Github => "GITHUB",
865            Self::PackageManager => "PACKAGE_MANAGER",
866        }
867    }
868    /// Creates an enum from field names used in the ProtoBuf definition.
869    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
870        match value {
871            "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" => Some(Self::Unspecified),
872            "GITHUB" => Some(Self::Github),
873            "PACKAGE_MANAGER" => Some(Self::PackageManager),
874            _ => None,
875        }
876    }
877}
878/// An indicator of the behavior of a given field (for example, that a field
879/// is required in requests, or given as output but ignored as input).
880/// This **does not** change the behavior in protocol buffers itself; it only
881/// denotes the behavior and may affect how API tooling handles the field.
882///
883/// Note: This enum **may** receive new values in the future.
884#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
885#[repr(i32)]
886pub enum FieldBehavior {
887    /// Conventional default for enums. Do not use this.
888    Unspecified = 0,
889    /// Specifically denotes a field as optional.
890    /// While all fields in protocol buffers are optional, this may be specified
891    /// for emphasis if appropriate.
892    Optional = 1,
893    /// Denotes a field as required.
894    /// This indicates that the field **must** be provided as part of the request,
895    /// and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
896    Required = 2,
897    /// Denotes a field as output only.
898    /// This indicates that the field is provided in responses, but including the
899    /// field in a request does nothing (the server *must* ignore it and
900    /// *must not* throw an error as a result of the field's presence).
901    OutputOnly = 3,
902    /// Denotes a field as input only.
903    /// This indicates that the field is provided in requests, and the
904    /// corresponding field is not included in output.
905    InputOnly = 4,
906    /// Denotes a field as immutable.
907    /// This indicates that the field may be set once in a request to create a
908    /// resource, but may not be changed thereafter.
909    Immutable = 5,
910    /// Denotes that a (repeated) field is an unordered list.
911    /// This indicates that the service may provide the elements of the list
912    /// in any arbitrary  order, rather than the order the user originally
913    /// provided. Additionally, the list's order may or may not be stable.
914    UnorderedList = 6,
915    /// Denotes that this field returns a non-empty default value if not set.
916    /// This indicates that if the user provides the empty value in a request,
917    /// a non-empty value will be returned. The user will not be aware of what
918    /// non-empty value to expect.
919    NonEmptyDefault = 7,
920    /// Denotes that the field in a resource (a message annotated with
921    /// google.api.resource) is used in the resource name to uniquely identify the
922    /// resource. For AIP-compliant APIs, this should only be applied to the
923    /// `name` field on the resource.
924    ///
925    /// This behavior should not be applied to references to other resources within
926    /// the message.
927    ///
928    /// The identifier field of resources often have different field behavior
929    /// depending on the request it is embedded in (e.g. for Create methods name
930    /// is optional and unused, while for Update methods it is required). Instead
931    /// of method-specific annotations, only `IDENTIFIER` is required.
932    Identifier = 8,
933}
934impl FieldBehavior {
935    /// String value of the enum field names used in the ProtoBuf definition.
936    ///
937    /// The values are not transformed in any way and thus are considered stable
938    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
939    pub fn as_str_name(&self) -> &'static str {
940        match self {
941            Self::Unspecified => "FIELD_BEHAVIOR_UNSPECIFIED",
942            Self::Optional => "OPTIONAL",
943            Self::Required => "REQUIRED",
944            Self::OutputOnly => "OUTPUT_ONLY",
945            Self::InputOnly => "INPUT_ONLY",
946            Self::Immutable => "IMMUTABLE",
947            Self::UnorderedList => "UNORDERED_LIST",
948            Self::NonEmptyDefault => "NON_EMPTY_DEFAULT",
949            Self::Identifier => "IDENTIFIER",
950        }
951    }
952    /// Creates an enum from field names used in the ProtoBuf definition.
953    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
954        match value {
955            "FIELD_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
956            "OPTIONAL" => Some(Self::Optional),
957            "REQUIRED" => Some(Self::Required),
958            "OUTPUT_ONLY" => Some(Self::OutputOnly),
959            "INPUT_ONLY" => Some(Self::InputOnly),
960            "IMMUTABLE" => Some(Self::Immutable),
961            "UNORDERED_LIST" => Some(Self::UnorderedList),
962            "NON_EMPTY_DEFAULT" => Some(Self::NonEmptyDefault),
963            "IDENTIFIER" => Some(Self::Identifier),
964            _ => None,
965        }
966    }
967}
968/// A simple descriptor of a resource type.
969///
970/// ResourceDescriptor annotates a resource message (either by means of a
971/// protobuf annotation or use in the service config), and associates the
972/// resource's schema, the resource type, and the pattern of the resource name.
973///
974/// Example:
975///
976///      message Topic {
977///        // Indicates this message defines a resource schema.
978///        // Declares the resource type in the format of {service}/{kind}.
979///        // For Kubernetes resources, the format is {api group}/{kind}.
980///        option (google.api.resource) = {
981///          type: "pubsub.googleapis.com/Topic"
982///          pattern: "projects/{project}/topics/{topic}"
983///        };
984///      }
985///
986/// The ResourceDescriptor Yaml config will look like:
987///
988///      resources:
989///      - type: "pubsub.googleapis.com/Topic"
990///        pattern: "projects/{project}/topics/{topic}"
991///
992/// Sometimes, resources have multiple patterns, typically because they can
993/// live under multiple parents.
994///
995/// Example:
996///
997///      message LogEntry {
998///        option (google.api.resource) = {
999///          type: "logging.googleapis.com/LogEntry"
1000///          pattern: "projects/{project}/logs/{log}"
1001///          pattern: "folders/{folder}/logs/{log}"
1002///          pattern: "organizations/{organization}/logs/{log}"
1003///          pattern: "billingAccounts/{billing_account}/logs/{log}"
1004///        };
1005///      }
1006///
1007/// The ResourceDescriptor Yaml config will look like:
1008///
1009///      resources:
1010///      - type: 'logging.googleapis.com/LogEntry'
1011///        pattern: "projects/{project}/logs/{log}"
1012///        pattern: "folders/{folder}/logs/{log}"
1013///        pattern: "organizations/{organization}/logs/{log}"
1014///        pattern: "billingAccounts/{billing_account}/logs/{log}"
1015#[derive(Clone, PartialEq, ::prost::Message)]
1016pub struct ResourceDescriptor {
1017    /// The resource type. It must be in the format of
1018    /// {service_name}/{resource_type_kind}. The `resource_type_kind` must be
1019    /// singular and must not include version numbers.
1020    ///
1021    /// Example: `storage.googleapis.com/Bucket`
1022    ///
1023    /// The value of the resource_type_kind must follow the regular expression
1024    /// /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
1025    /// should use PascalCase (UpperCamelCase). The maximum number of
1026    /// characters allowed for the `resource_type_kind` is 100.
1027    #[prost(string, tag = "1")]
1028    pub r#type: ::prost::alloc::string::String,
1029    /// Optional. The relative resource name pattern associated with this resource
1030    /// type. The DNS prefix of the full resource name shouldn't be specified here.
1031    ///
1032    /// The path pattern must follow the syntax, which aligns with HTTP binding
1033    /// syntax:
1034    ///
1035    ///      Template = Segment { "/" Segment } ;
1036    ///      Segment = LITERAL | Variable ;
1037    ///      Variable = "{" LITERAL "}" ;
1038    ///
1039    /// Examples:
1040    ///
1041    ///      - "projects/{project}/topics/{topic}"
1042    ///      - "projects/{project}/knowledgeBases/{knowledge_base}"
1043    ///
1044    /// The components in braces correspond to the IDs for each resource in the
1045    /// hierarchy. It is expected that, if multiple patterns are provided,
1046    /// the same component name (e.g. "project") refers to IDs of the same
1047    /// type of resource.
1048    #[prost(string, repeated, tag = "2")]
1049    pub pattern: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1050    /// Optional. The field on the resource that designates the resource name
1051    /// field. If omitted, this is assumed to be "name".
1052    #[prost(string, tag = "3")]
1053    pub name_field: ::prost::alloc::string::String,
1054    /// Optional. The historical or future-looking state of the resource pattern.
1055    ///
1056    /// Example:
1057    ///
1058    ///      // The InspectTemplate message originally only supported resource
1059    ///      // names with organization, and project was added later.
1060    ///      message InspectTemplate {
1061    ///        option (google.api.resource) = {
1062    ///          type: "dlp.googleapis.com/InspectTemplate"
1063    ///          pattern:
1064    ///          "organizations/{organization}/inspectTemplates/{inspect_template}"
1065    ///          pattern: "projects/{project}/inspectTemplates/{inspect_template}"
1066    ///          history: ORIGINALLY_SINGLE_PATTERN
1067    ///        };
1068    ///      }
1069    #[prost(enumeration = "resource_descriptor::History", tag = "4")]
1070    pub history: i32,
1071    /// The plural name used in the resource name and permission names, such as
1072    /// 'projects' for the resource name of 'projects/{project}' and the permission
1073    /// name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
1074    /// to this is for Nested Collections that have stuttering names, as defined
1075    /// in [AIP-122](<https://google.aip.dev/122#nested-collections>), where the
1076    /// collection ID in the resource name pattern does not necessarily directly
1077    /// match the `plural` value.
1078    ///
1079    /// It is the same concept of the `plural` field in k8s CRD spec
1080    /// <https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/>
1081    ///
1082    /// Note: The plural form is required even for singleton resources. See
1083    /// <https://aip.dev/156>
1084    #[prost(string, tag = "5")]
1085    pub plural: ::prost::alloc::string::String,
1086    /// The same concept of the `singular` field in k8s CRD spec
1087    /// <https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/>
1088    /// Such as "project" for the `resourcemanager.googleapis.com/Project` type.
1089    #[prost(string, tag = "6")]
1090    pub singular: ::prost::alloc::string::String,
1091    /// Style flag(s) for this resource.
1092    /// These indicate that a resource is expected to conform to a given
1093    /// style. See the specific style flags for additional information.
1094    #[prost(enumeration = "resource_descriptor::Style", repeated, tag = "10")]
1095    pub style: ::prost::alloc::vec::Vec<i32>,
1096}
1097/// Nested message and enum types in `ResourceDescriptor`.
1098pub mod resource_descriptor {
1099    /// A description of the historical or future-looking state of the
1100    /// resource pattern.
1101    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1102    #[repr(i32)]
1103    pub enum History {
1104        /// The "unset" value.
1105        Unspecified = 0,
1106        /// The resource originally had one pattern and launched as such, and
1107        /// additional patterns were added later.
1108        OriginallySinglePattern = 1,
1109        /// The resource has one pattern, but the API owner expects to add more
1110        /// later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
1111        /// that from being necessary once there are multiple patterns.)
1112        FutureMultiPattern = 2,
1113    }
1114    impl History {
1115        /// String value of the enum field names used in the ProtoBuf definition.
1116        ///
1117        /// The values are not transformed in any way and thus are considered stable
1118        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1119        pub fn as_str_name(&self) -> &'static str {
1120            match self {
1121                Self::Unspecified => "HISTORY_UNSPECIFIED",
1122                Self::OriginallySinglePattern => "ORIGINALLY_SINGLE_PATTERN",
1123                Self::FutureMultiPattern => "FUTURE_MULTI_PATTERN",
1124            }
1125        }
1126        /// Creates an enum from field names used in the ProtoBuf definition.
1127        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1128            match value {
1129                "HISTORY_UNSPECIFIED" => Some(Self::Unspecified),
1130                "ORIGINALLY_SINGLE_PATTERN" => Some(Self::OriginallySinglePattern),
1131                "FUTURE_MULTI_PATTERN" => Some(Self::FutureMultiPattern),
1132                _ => None,
1133            }
1134        }
1135    }
1136    /// A flag representing a specific style that a resource claims to conform to.
1137    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1138    #[repr(i32)]
1139    pub enum Style {
1140        /// The unspecified value. Do not use.
1141        Unspecified = 0,
1142        /// This resource is intended to be "declarative-friendly".
1143        ///
1144        /// Declarative-friendly resources must be more strictly consistent, and
1145        /// setting this to true communicates to tools that this resource should
1146        /// adhere to declarative-friendly expectations.
1147        ///
1148        /// Note: This is used by the API linter (linter.aip.dev) to enable
1149        /// additional checks.
1150        DeclarativeFriendly = 1,
1151    }
1152    impl Style {
1153        /// String value of the enum field names used in the ProtoBuf definition.
1154        ///
1155        /// The values are not transformed in any way and thus are considered stable
1156        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1157        pub fn as_str_name(&self) -> &'static str {
1158            match self {
1159                Self::Unspecified => "STYLE_UNSPECIFIED",
1160                Self::DeclarativeFriendly => "DECLARATIVE_FRIENDLY",
1161            }
1162        }
1163        /// Creates an enum from field names used in the ProtoBuf definition.
1164        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1165            match value {
1166                "STYLE_UNSPECIFIED" => Some(Self::Unspecified),
1167                "DECLARATIVE_FRIENDLY" => Some(Self::DeclarativeFriendly),
1168                _ => None,
1169            }
1170        }
1171    }
1172}
1173/// Defines a proto annotation that describes a string field that refers to
1174/// an API resource.
1175#[derive(Clone, PartialEq, ::prost::Message)]
1176pub struct ResourceReference {
1177    /// The resource type that the annotated field references.
1178    ///
1179    /// Example:
1180    ///
1181    ///      message Subscription {
1182    ///        string topic = 2 [(google.api.resource_reference) = {
1183    ///          type: "pubsub.googleapis.com/Topic"
1184    ///        }];
1185    ///      }
1186    ///
1187    /// Occasionally, a field may reference an arbitrary resource. In this case,
1188    /// APIs use the special value * in their resource reference.
1189    ///
1190    /// Example:
1191    ///
1192    ///      message GetIamPolicyRequest {
1193    ///        string resource = 2 [(google.api.resource_reference) = {
1194    ///          type: "*"
1195    ///        }];
1196    ///      }
1197    #[prost(string, tag = "1")]
1198    pub r#type: ::prost::alloc::string::String,
1199    /// The resource type of a child collection that the annotated field
1200    /// references. This is useful for annotating the `parent` field that
1201    /// doesn't have a fixed resource type.
1202    ///
1203    /// Example:
1204    ///
1205    ///      message ListLogEntriesRequest {
1206    ///        string parent = 1 [(google.api.resource_reference) = {
1207    ///          child_type: "logging.googleapis.com/LogEntry"
1208    ///        };
1209    ///      }
1210    #[prost(string, tag = "2")]
1211    pub child_type: ::prost::alloc::string::String,
1212}
1213/// A description of a label.
1214#[derive(Clone, PartialEq, ::prost::Message)]
1215pub struct LabelDescriptor {
1216    /// The label key.
1217    #[prost(string, tag = "1")]
1218    pub key: ::prost::alloc::string::String,
1219    /// The type of data that can be assigned to the label.
1220    #[prost(enumeration = "label_descriptor::ValueType", tag = "2")]
1221    pub value_type: i32,
1222    /// A human-readable description for the label.
1223    #[prost(string, tag = "3")]
1224    pub description: ::prost::alloc::string::String,
1225}
1226/// Nested message and enum types in `LabelDescriptor`.
1227pub mod label_descriptor {
1228    /// Value types that can be used as label values.
1229    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1230    #[repr(i32)]
1231    pub enum ValueType {
1232        /// A variable-length string. This is the default.
1233        String = 0,
1234        /// Boolean; true or false.
1235        Bool = 1,
1236        /// A 64-bit signed integer.
1237        Int64 = 2,
1238    }
1239    impl ValueType {
1240        /// String value of the enum field names used in the ProtoBuf definition.
1241        ///
1242        /// The values are not transformed in any way and thus are considered stable
1243        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1244        pub fn as_str_name(&self) -> &'static str {
1245            match self {
1246                Self::String => "STRING",
1247                Self::Bool => "BOOL",
1248                Self::Int64 => "INT64",
1249            }
1250        }
1251        /// Creates an enum from field names used in the ProtoBuf definition.
1252        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1253            match value {
1254                "STRING" => Some(Self::String),
1255                "BOOL" => Some(Self::Bool),
1256                "INT64" => Some(Self::Int64),
1257                _ => None,
1258            }
1259        }
1260    }
1261}
1262/// An object that describes the schema of a
1263/// [MonitoredResource][google.api.MonitoredResource] object using a type name
1264/// and a set of labels.  For example, the monitored resource descriptor for
1265/// Google Compute Engine VM instances has a type of
1266/// `"gce_instance"` and specifies the use of the labels `"instance_id"` and
1267/// `"zone"` to identify particular VM instances.
1268///
1269/// Different APIs can support different monitored resource types. APIs generally
1270/// provide a `list` method that returns the monitored resource descriptors used
1271/// by the API.
1272///
1273#[derive(Clone, PartialEq, ::prost::Message)]
1274pub struct MonitoredResourceDescriptor {
1275    /// Optional. The resource name of the monitored resource descriptor:
1276    /// `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
1277    /// {type} is the value of the `type` field in this object and
1278    /// {project_id} is a project ID that provides API-specific context for
1279    /// accessing the type.  APIs that do not use project information can use the
1280    /// resource name format `"monitoredResourceDescriptors/{type}"`.
1281    #[prost(string, tag = "5")]
1282    pub name: ::prost::alloc::string::String,
1283    /// Required. The monitored resource type. For example, the type
1284    /// `"cloudsql_database"` represents databases in Google Cloud SQL.
1285    ///   For a list of types, see [Monitored resource
1286    ///   types](<https://cloud.google.com/monitoring/api/resources>)
1287    /// and [Logging resource
1288    /// types](<https://cloud.google.com/logging/docs/api/v2/resource-list>).
1289    #[prost(string, tag = "1")]
1290    pub r#type: ::prost::alloc::string::String,
1291    /// Optional. A concise name for the monitored resource type that might be
1292    /// displayed in user interfaces. It should be a Title Cased Noun Phrase,
1293    /// without any article or other determiners. For example,
1294    /// `"Google Cloud SQL Database"`.
1295    #[prost(string, tag = "2")]
1296    pub display_name: ::prost::alloc::string::String,
1297    /// Optional. A detailed description of the monitored resource type that might
1298    /// be used in documentation.
1299    #[prost(string, tag = "3")]
1300    pub description: ::prost::alloc::string::String,
1301    /// Required. A set of labels used to describe instances of this monitored
1302    /// resource type. For example, an individual Google Cloud SQL database is
1303    /// identified by values for the labels `"database_id"` and `"zone"`.
1304    #[prost(message, repeated, tag = "4")]
1305    pub labels: ::prost::alloc::vec::Vec<LabelDescriptor>,
1306    /// Optional. The launch stage of the monitored resource definition.
1307    #[prost(enumeration = "LaunchStage", tag = "7")]
1308    pub launch_stage: i32,
1309}
1310/// An object representing a resource that can be used for monitoring, logging,
1311/// billing, or other purposes. Examples include virtual machine instances,
1312/// databases, and storage devices such as disks. The `type` field identifies a
1313/// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object
1314/// that describes the resource's schema. Information in the `labels` field
1315/// identifies the actual resource and its attributes according to the schema.
1316/// For example, a particular Compute Engine VM instance could be represented by
1317/// the following object, because the
1318/// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for
1319/// `"gce_instance"` has labels
1320/// `"project_id"`, `"instance_id"` and `"zone"`:
1321///
1322///      { "type": "gce_instance",
1323///        "labels": { "project_id": "my-project",
1324///                    "instance_id": "12345678901234",
1325///                    "zone": "us-central1-a" }}
1326#[derive(Clone, PartialEq, ::prost::Message)]
1327pub struct MonitoredResource {
1328    /// Required. The monitored resource type. This field must match
1329    /// the `type` field of a
1330    /// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
1331    /// object. For example, the type of a Compute Engine VM instance is
1332    /// `gce_instance`. Some descriptors include the service name in the type; for
1333    /// example, the type of a Datastream stream is
1334    /// `datastream.googleapis.com/Stream`.
1335    #[prost(string, tag = "1")]
1336    pub r#type: ::prost::alloc::string::String,
1337    /// Required. Values for all of the labels listed in the associated monitored
1338    /// resource descriptor. For example, Compute Engine VM instances use the
1339    /// labels `"project_id"`, `"instance_id"`, and `"zone"`.
1340    #[prost(map = "string, string", tag = "2")]
1341    pub labels:
1342        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
1343}
1344/// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource]
1345/// object. [MonitoredResource][google.api.MonitoredResource] objects contain the
1346/// minimum set of information to uniquely identify a monitored resource
1347/// instance. There is some other useful auxiliary metadata. Monitoring and
1348/// Logging use an ingestion pipeline to extract metadata for cloud resources of
1349/// all types, and store the metadata in this message.
1350#[derive(Clone, PartialEq, ::prost::Message)]
1351pub struct MonitoredResourceMetadata {
1352    /// Output only. Values for predefined system metadata labels.
1353    /// System labels are a kind of metadata extracted by Google, including
1354    /// "machine_image", "vpc", "subnet_id",
1355    /// "security_group", "name", etc.
1356    /// System label values can be only strings, Boolean values, or a list of
1357    /// strings. For example:
1358    ///
1359    ///      { "name": "my-test-instance",
1360    ///        "security_group": \["a", "b", "c"\],
1361    ///        "spot_instance": false }
1362    #[prost(message, optional, tag = "1")]
1363    pub system_labels: ::core::option::Option<::prost_types::Struct>,
1364    /// Output only. A map of user-defined metadata labels.
1365    #[prost(map = "string, string", tag = "2")]
1366    pub user_labels:
1367        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
1368}