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¶m=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 #[prost(message, optional, tag = "3")]
463 pub selective_gapic_generation: ::core::option::Option<SelectiveGapicGeneration>,
464}
465/// Details about how and where to publish client libraries.
466#[derive(Clone, PartialEq, ::prost::Message)]
467pub struct ClientLibrarySettings {
468 /// Version of the API to apply these settings to. This is the full protobuf
469 /// package for the API, ending in the version element.
470 /// Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
471 #[prost(string, tag = "1")]
472 pub version: ::prost::alloc::string::String,
473 /// Launch stage of this version of the API.
474 #[prost(enumeration = "LaunchStage", tag = "2")]
475 pub launch_stage: i32,
476 /// When using transport=rest, the client request will encode enums as
477 /// numbers rather than strings.
478 #[prost(bool, tag = "3")]
479 pub rest_numeric_enums: bool,
480 /// Settings for legacy Java features, supported in the Service YAML.
481 #[prost(message, optional, tag = "21")]
482 pub java_settings: ::core::option::Option<JavaSettings>,
483 /// Settings for C++ client libraries.
484 #[prost(message, optional, tag = "22")]
485 pub cpp_settings: ::core::option::Option<CppSettings>,
486 /// Settings for PHP client libraries.
487 #[prost(message, optional, tag = "23")]
488 pub php_settings: ::core::option::Option<PhpSettings>,
489 /// Settings for Python client libraries.
490 #[prost(message, optional, tag = "24")]
491 pub python_settings: ::core::option::Option<PythonSettings>,
492 /// Settings for Node client libraries.
493 #[prost(message, optional, tag = "25")]
494 pub node_settings: ::core::option::Option<NodeSettings>,
495 /// Settings for .NET client libraries.
496 #[prost(message, optional, tag = "26")]
497 pub dotnet_settings: ::core::option::Option<DotnetSettings>,
498 /// Settings for Ruby client libraries.
499 #[prost(message, optional, tag = "27")]
500 pub ruby_settings: ::core::option::Option<RubySettings>,
501 /// Settings for Go client libraries.
502 #[prost(message, optional, tag = "28")]
503 pub go_settings: ::core::option::Option<GoSettings>,
504}
505/// This message configures the settings for publishing [Google Cloud Client
506/// libraries](<https://cloud.google.com/apis/docs/cloud-client-libraries>)
507/// generated from the service config.
508#[derive(Clone, PartialEq, ::prost::Message)]
509pub struct Publishing {
510 /// A list of API method settings, e.g. the behavior for methods that use the
511 /// long-running operation pattern.
512 #[prost(message, repeated, tag = "2")]
513 pub method_settings: ::prost::alloc::vec::Vec<MethodSettings>,
514 /// Link to a *public* URI where users can report issues. Example:
515 /// <https://issuetracker.google.com/issues/new?component=190865&template=1161103>
516 #[prost(string, tag = "101")]
517 pub new_issue_uri: ::prost::alloc::string::String,
518 /// Link to product home page. Example:
519 /// <https://cloud.google.com/asset-inventory/docs/overview>
520 #[prost(string, tag = "102")]
521 pub documentation_uri: ::prost::alloc::string::String,
522 /// Used as a tracking tag when collecting data about the APIs developer
523 /// relations artifacts like docs, packages delivered to package managers,
524 /// etc. Example: "speech".
525 #[prost(string, tag = "103")]
526 pub api_short_name: ::prost::alloc::string::String,
527 /// GitHub label to apply to issues and pull requests opened for this API.
528 #[prost(string, tag = "104")]
529 pub github_label: ::prost::alloc::string::String,
530 /// GitHub teams to be added to CODEOWNERS in the directory in GitHub
531 /// containing source code for the client libraries for this API.
532 #[prost(string, repeated, tag = "105")]
533 pub codeowner_github_teams: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
534 /// A prefix used in sample code when demarking regions to be included in
535 /// documentation.
536 #[prost(string, tag = "106")]
537 pub doc_tag_prefix: ::prost::alloc::string::String,
538 /// For whom the client library is being published.
539 #[prost(enumeration = "ClientLibraryOrganization", tag = "107")]
540 pub organization: i32,
541 /// Client library settings. If the same version string appears multiple
542 /// times in this list, then the last one wins. Settings from earlier
543 /// settings with the same version string are discarded.
544 #[prost(message, repeated, tag = "109")]
545 pub library_settings: ::prost::alloc::vec::Vec<ClientLibrarySettings>,
546 /// Optional link to proto reference documentation. Example:
547 /// <https://cloud.google.com/pubsub/lite/docs/reference/rpc>
548 #[prost(string, tag = "110")]
549 pub proto_reference_documentation_uri: ::prost::alloc::string::String,
550 /// Optional link to REST reference documentation. Example:
551 /// <https://cloud.google.com/pubsub/lite/docs/reference/rest>
552 #[prost(string, tag = "111")]
553 pub rest_reference_documentation_uri: ::prost::alloc::string::String,
554}
555/// Settings for Java client libraries.
556#[derive(Clone, PartialEq, ::prost::Message)]
557pub struct JavaSettings {
558 /// The package name to use in Java. Clobbers the java_package option
559 /// set in the protobuf. This should be used **only** by APIs
560 /// who have already set the language_settings.java.package_name" field
561 /// in gapic.yaml. API teams should use the protobuf java_package option
562 /// where possible.
563 ///
564 /// Example of a YAML configuration::
565 ///
566 /// publishing:
567 /// java_settings:
568 /// library_package: com.google.cloud.pubsub.v1
569 #[prost(string, tag = "1")]
570 pub library_package: ::prost::alloc::string::String,
571 /// Configure the Java class name to use instead of the service's for its
572 /// corresponding generated GAPIC client. Keys are fully-qualified
573 /// service names as they appear in the protobuf (including the full
574 /// the language_settings.java.interface_names" field in gapic.yaml. API
575 /// teams should otherwise use the service name as it appears in the
576 /// protobuf.
577 ///
578 /// Example of a YAML configuration::
579 ///
580 /// publishing:
581 /// java_settings:
582 /// service_class_names:
583 /// - google.pubsub.v1.Publisher: TopicAdmin
584 /// - google.pubsub.v1.Subscriber: SubscriptionAdmin
585 #[prost(map = "string, string", tag = "2")]
586 pub service_class_names: ::std::collections::HashMap<
587 ::prost::alloc::string::String,
588 ::prost::alloc::string::String,
589 >,
590 /// Some settings.
591 #[prost(message, optional, tag = "3")]
592 pub common: ::core::option::Option<CommonLanguageSettings>,
593}
594/// Settings for C++ client libraries.
595#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
596pub struct CppSettings {
597 /// Some settings.
598 #[prost(message, optional, tag = "1")]
599 pub common: ::core::option::Option<CommonLanguageSettings>,
600}
601/// Settings for Php client libraries.
602#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
603pub struct PhpSettings {
604 /// Some settings.
605 #[prost(message, optional, tag = "1")]
606 pub common: ::core::option::Option<CommonLanguageSettings>,
607}
608/// Settings for Python client libraries.
609#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
610pub struct PythonSettings {
611 /// Some settings.
612 #[prost(message, optional, tag = "1")]
613 pub common: ::core::option::Option<CommonLanguageSettings>,
614 /// Experimental features to be included during client library generation.
615 #[prost(message, optional, tag = "2")]
616 pub experimental_features: ::core::option::Option<
617 python_settings::ExperimentalFeatures,
618 >,
619}
620/// Nested message and enum types in `PythonSettings`.
621pub mod python_settings {
622 /// Experimental features to be included during client library generation.
623 /// These fields will be deprecated once the feature graduates and is enabled
624 /// by default.
625 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
626 pub struct ExperimentalFeatures {
627 /// Enables generation of asynchronous REST clients if `rest` transport is
628 /// enabled. By default, asynchronous REST clients will not be generated.
629 /// This feature will be enabled by default 1 month after launching the
630 /// feature in preview packages.
631 #[prost(bool, tag = "1")]
632 pub rest_async_io_enabled: bool,
633 /// Enables generation of protobuf code using new types that are more
634 /// Pythonic which are included in `protobuf>=5.29.x`. This feature will be
635 /// enabled by default 1 month after launching the feature in preview
636 /// packages.
637 #[prost(bool, tag = "2")]
638 pub protobuf_pythonic_types_enabled: bool,
639 /// Disables generation of an unversioned Python package for this client
640 /// library. This means that the module names will need to be versioned in
641 /// import statements. For example `import google.cloud.library_v2` instead
642 /// of `import google.cloud.library`.
643 #[prost(bool, tag = "3")]
644 pub unversioned_package_disabled: bool,
645 }
646}
647/// Settings for Node client libraries.
648#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
649pub struct NodeSettings {
650 /// Some settings.
651 #[prost(message, optional, tag = "1")]
652 pub common: ::core::option::Option<CommonLanguageSettings>,
653}
654/// Settings for Dotnet client libraries.
655#[derive(Clone, PartialEq, ::prost::Message)]
656pub struct DotnetSettings {
657 /// Some settings.
658 #[prost(message, optional, tag = "1")]
659 pub common: ::core::option::Option<CommonLanguageSettings>,
660 /// Map from original service names to renamed versions.
661 /// This is used when the default generated types
662 /// would cause a naming conflict. (Neither name is
663 /// fully-qualified.)
664 /// Example: Subscriber to SubscriberServiceApi.
665 #[prost(map = "string, string", tag = "2")]
666 pub renamed_services: ::std::collections::HashMap<
667 ::prost::alloc::string::String,
668 ::prost::alloc::string::String,
669 >,
670 /// Map from full resource types to the effective short name
671 /// for the resource. This is used when otherwise resource
672 /// named from different services would cause naming collisions.
673 /// Example entry:
674 /// "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
675 #[prost(map = "string, string", tag = "3")]
676 pub renamed_resources: ::std::collections::HashMap<
677 ::prost::alloc::string::String,
678 ::prost::alloc::string::String,
679 >,
680 /// List of full resource types to ignore during generation.
681 /// This is typically used for API-specific Location resources,
682 /// which should be handled by the generator as if they were actually
683 /// the common Location resources.
684 /// Example entry: "documentai.googleapis.com/Location"
685 #[prost(string, repeated, tag = "4")]
686 pub ignored_resources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
687 /// Namespaces which must be aliased in snippets due to
688 /// a known (but non-generator-predictable) naming collision
689 #[prost(string, repeated, tag = "5")]
690 pub forced_namespace_aliases: ::prost::alloc::vec::Vec<
691 ::prost::alloc::string::String,
692 >,
693 /// Method signatures (in the form "service.method(signature)")
694 /// which are provided separately, so shouldn't be generated.
695 /// Snippets *calling* these methods are still generated, however.
696 #[prost(string, repeated, tag = "6")]
697 pub handwritten_signatures: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
698}
699/// Settings for Ruby client libraries.
700#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
701pub struct RubySettings {
702 /// Some settings.
703 #[prost(message, optional, tag = "1")]
704 pub common: ::core::option::Option<CommonLanguageSettings>,
705}
706/// Settings for Go client libraries.
707#[derive(Clone, PartialEq, ::prost::Message)]
708pub struct GoSettings {
709 /// Some settings.
710 #[prost(message, optional, tag = "1")]
711 pub common: ::core::option::Option<CommonLanguageSettings>,
712 /// Map of service names to renamed services. Keys are the package relative
713 /// service names and values are the name to be used for the service client
714 /// and call options.
715 ///
716 /// publishing:
717 /// go_settings:
718 /// renamed_services:
719 /// Publisher: TopicAdmin
720 #[prost(map = "string, string", tag = "2")]
721 pub renamed_services: ::std::collections::HashMap<
722 ::prost::alloc::string::String,
723 ::prost::alloc::string::String,
724 >,
725}
726/// Describes the generator configuration for a method.
727#[derive(Clone, PartialEq, ::prost::Message)]
728pub struct MethodSettings {
729 /// The fully qualified name of the method, for which the options below apply.
730 /// This is used to find the method to apply the options.
731 ///
732 /// Example:
733 ///
734 /// ```text
735 /// publishing:
736 /// method_settings:
737 /// - selector: google.storage.control.v2.StorageControl.CreateFolder
738 /// # method settings for CreateFolder...
739 /// ```
740 #[prost(string, tag = "1")]
741 pub selector: ::prost::alloc::string::String,
742 /// Describes settings to use for long-running operations when generating
743 /// API methods for RPCs. Complements RPCs that use the annotations in
744 /// google/longrunning/operations.proto.
745 ///
746 /// Example of a YAML configuration::
747 ///
748 /// ```text
749 /// publishing:
750 /// method_settings:
751 /// - selector: google.cloud.speech.v2.Speech.BatchRecognize
752 /// long_running:
753 /// initial_poll_delay: 60s # 1 minute
754 /// poll_delay_multiplier: 1.5
755 /// max_poll_delay: 360s # 6 minutes
756 /// total_poll_timeout: 54000s # 90 minutes
757 /// ```
758 #[prost(message, optional, tag = "2")]
759 pub long_running: ::core::option::Option<method_settings::LongRunning>,
760 /// List of top-level fields of the request message, that should be
761 /// automatically populated by the client libraries based on their
762 /// (google.api.field_info).format. Currently supported format: UUID4.
763 ///
764 /// Example of a YAML configuration:
765 ///
766 /// ```text
767 /// publishing:
768 /// method_settings:
769 /// - selector: google.example.v1.ExampleService.CreateExample
770 /// auto_populated_fields:
771 /// - request_id
772 /// ```
773 #[prost(string, repeated, tag = "3")]
774 pub auto_populated_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
775}
776/// Nested message and enum types in `MethodSettings`.
777pub mod method_settings {
778 /// Describes settings to use when generating API methods that use the
779 /// long-running operation pattern.
780 /// All default values below are from those used in the client library
781 /// generators (e.g.
782 /// [Java](<https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java>)).
783 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
784 pub struct LongRunning {
785 /// Initial delay after which the first poll request will be made.
786 /// Default value: 5 seconds.
787 #[prost(message, optional, tag = "1")]
788 pub initial_poll_delay: ::core::option::Option<super::super::protobuf::Duration>,
789 /// Multiplier to gradually increase delay between subsequent polls until it
790 /// reaches max_poll_delay.
791 /// Default value: 1.5.
792 #[prost(float, tag = "2")]
793 pub poll_delay_multiplier: f32,
794 /// Maximum time between two subsequent poll requests.
795 /// Default value: 45 seconds.
796 #[prost(message, optional, tag = "3")]
797 pub max_poll_delay: ::core::option::Option<super::super::protobuf::Duration>,
798 /// Total polling timeout.
799 /// Default value: 5 minutes.
800 #[prost(message, optional, tag = "4")]
801 pub total_poll_timeout: ::core::option::Option<super::super::protobuf::Duration>,
802 }
803}
804/// This message is used to configure the generation of a subset of the RPCs in
805/// a service for client libraries.
806#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
807pub struct SelectiveGapicGeneration {
808 /// An allowlist of the fully qualified names of RPCs that should be included
809 /// on public client surfaces.
810 #[prost(string, repeated, tag = "1")]
811 pub methods: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
812 /// Setting this to true indicates to the client generators that methods
813 /// that would be excluded from the generation should instead be generated
814 /// in a way that indicates these methods should not be consumed by
815 /// end users. How this is expressed is up to individual language
816 /// implementations to decide. Some examples may be: added annotations,
817 /// obfuscated identifiers, or other language idiomatic patterns.
818 #[prost(bool, tag = "2")]
819 pub generate_omitted_as_internal: bool,
820}
821/// The organization for which the client libraries are being published.
822/// Affects the url where generated docs are published, etc.
823#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
824#[repr(i32)]
825pub enum ClientLibraryOrganization {
826 /// Not useful.
827 Unspecified = 0,
828 /// Google Cloud Platform Org.
829 Cloud = 1,
830 /// Ads (Advertising) Org.
831 Ads = 2,
832 /// Photos Org.
833 Photos = 3,
834 /// Street View Org.
835 StreetView = 4,
836 /// Shopping Org.
837 Shopping = 5,
838 /// Geo Org.
839 Geo = 6,
840 /// Generative AI - <https://developers.generativeai.google>
841 GenerativeAi = 7,
842}
843impl ClientLibraryOrganization {
844 /// String value of the enum field names used in the ProtoBuf definition.
845 ///
846 /// The values are not transformed in any way and thus are considered stable
847 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
848 pub fn as_str_name(&self) -> &'static str {
849 match self {
850 Self::Unspecified => "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED",
851 Self::Cloud => "CLOUD",
852 Self::Ads => "ADS",
853 Self::Photos => "PHOTOS",
854 Self::StreetView => "STREET_VIEW",
855 Self::Shopping => "SHOPPING",
856 Self::Geo => "GEO",
857 Self::GenerativeAi => "GENERATIVE_AI",
858 }
859 }
860 /// Creates an enum from field names used in the ProtoBuf definition.
861 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
862 match value {
863 "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" => Some(Self::Unspecified),
864 "CLOUD" => Some(Self::Cloud),
865 "ADS" => Some(Self::Ads),
866 "PHOTOS" => Some(Self::Photos),
867 "STREET_VIEW" => Some(Self::StreetView),
868 "SHOPPING" => Some(Self::Shopping),
869 "GEO" => Some(Self::Geo),
870 "GENERATIVE_AI" => Some(Self::GenerativeAi),
871 _ => None,
872 }
873 }
874}
875/// To where should client libraries be published?
876#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
877#[repr(i32)]
878pub enum ClientLibraryDestination {
879 /// Client libraries will neither be generated nor published to package
880 /// managers.
881 Unspecified = 0,
882 /// Generate the client library in a repo under github.com/googleapis,
883 /// but don't publish it to package managers.
884 Github = 10,
885 /// Publish the library to package managers like nuget.org and npmjs.com.
886 PackageManager = 20,
887}
888impl ClientLibraryDestination {
889 /// String value of the enum field names used in the ProtoBuf definition.
890 ///
891 /// The values are not transformed in any way and thus are considered stable
892 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
893 pub fn as_str_name(&self) -> &'static str {
894 match self {
895 Self::Unspecified => "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED",
896 Self::Github => "GITHUB",
897 Self::PackageManager => "PACKAGE_MANAGER",
898 }
899 }
900 /// Creates an enum from field names used in the ProtoBuf definition.
901 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
902 match value {
903 "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" => Some(Self::Unspecified),
904 "GITHUB" => Some(Self::Github),
905 "PACKAGE_MANAGER" => Some(Self::PackageManager),
906 _ => None,
907 }
908 }
909}