Skip to main content

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