Skip to main content

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