@@ -16,7 +16,9 @@ syntax = "proto3";
1616
1717package google.api ;
1818
19+ import "google/api/launch_stage.proto" ;
1920import "google/protobuf/descriptor.proto" ;
21+ import "google/protobuf/duration.proto" ;
2022
2123option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations" ;
2224option java_multiple_files = true ;
@@ -97,3 +99,251 @@ extend google.protobuf.ServiceOptions {
9799 // }
98100 string oauth_scopes = 1050 ;
99101}
102+
103+ // Required information for every language.
104+ message CommonLanguageSettings {
105+ // Link to automatically generated reference documentation. Example:
106+ // https://cloud.google.com/nodejs/docs/reference/asset/latest
107+ string reference_docs_uri = 1 [deprecated = true ];
108+
109+ // The destination where API teams want this client library to be published.
110+ repeated ClientLibraryDestination destinations = 2 ;
111+ }
112+
113+ // Details about how and where to publish client libraries.
114+ message ClientLibrarySettings {
115+ // Version of the API to apply these settings to.
116+ string version = 1 ;
117+
118+ // Launch stage of this version of the API.
119+ LaunchStage launch_stage = 2 ;
120+
121+ // When using transport=rest, the client request will encode enums as
122+ // numbers rather than strings.
123+ bool rest_numeric_enums = 3 ;
124+
125+ // Settings for legacy Java features, supported in the Service YAML.
126+ JavaSettings java_settings = 21 ;
127+
128+ // Settings for C++ client libraries.
129+ CppSettings cpp_settings = 22 ;
130+
131+ // Settings for PHP client libraries.
132+ PhpSettings php_settings = 23 ;
133+
134+ // Settings for Python client libraries.
135+ PythonSettings python_settings = 24 ;
136+
137+ // Settings for Node client libraries.
138+ NodeSettings node_settings = 25 ;
139+
140+ // Settings for .NET client libraries.
141+ DotnetSettings dotnet_settings = 26 ;
142+
143+ // Settings for Ruby client libraries.
144+ RubySettings ruby_settings = 27 ;
145+
146+ // Settings for Go client libraries.
147+ GoSettings go_settings = 28 ;
148+ }
149+
150+ // This message configures the settings for publishing [Google Cloud Client
151+ // libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)
152+ // generated from the service config.
153+ message Publishing {
154+ // A list of API method settings, e.g. the behavior for methods that use the
155+ // long-running operation pattern.
156+ repeated MethodSettings method_settings = 2 ;
157+
158+ // Link to a place that API users can report issues. Example:
159+ // https://issuetracker.google.com/issues/new?component=190865&template=1161103
160+ string new_issue_uri = 101 ;
161+
162+ // Link to product home page. Example:
163+ // https://cloud.google.com/asset-inventory/docs/overview
164+ string documentation_uri = 102 ;
165+
166+ // Used as a tracking tag when collecting data about the APIs developer
167+ // relations artifacts like docs, packages delivered to package managers,
168+ // etc. Example: "speech".
169+ string api_short_name = 103 ;
170+
171+ // GitHub label to apply to issues and pull requests opened for this API.
172+ string github_label = 104 ;
173+
174+ // GitHub teams to be added to CODEOWNERS in the directory in GitHub
175+ // containing source code for the client libraries for this API.
176+ repeated string codeowner_github_teams = 105 ;
177+
178+ // A prefix used in sample code when demarking regions to be included in
179+ // documentation.
180+ string doc_tag_prefix = 106 ;
181+
182+ // For whom the client library is being published.
183+ ClientLibraryOrganization organization = 107 ;
184+
185+ // Client library settings. If the same version string appears multiple
186+ // times in this list, then the last one wins. Settings from earlier
187+ // settings with the same version string are discarded.
188+ repeated ClientLibrarySettings library_settings = 109 ;
189+ }
190+
191+ // Settings for Java client libraries.
192+ message JavaSettings {
193+ // The package name to use in Java. Clobbers the java_package option
194+ // set in the protobuf. This should be used **only** by APIs
195+ // who have already set the language_settings.java.package_name" field
196+ // in gapic.yaml. API teams should use the protobuf java_package option
197+ // where possible.
198+ //
199+ // Example of a YAML configuration::
200+ //
201+ // publishing:
202+ // java_settings:
203+ // library_package: com.google.cloud.pubsub.v1
204+ string library_package = 1 ;
205+
206+ // Configure the Java class name to use instead of the service's for its
207+ // corresponding generated GAPIC client. Keys are fully-qualified
208+ // service names as they appear in the protobuf (including the full
209+ // the language_settings.java.interface_names" field in gapic.yaml. API
210+ // teams should otherwise use the service name as it appears in the
211+ // protobuf.
212+ //
213+ // Example of a YAML configuration::
214+ //
215+ // publishing:
216+ // java_settings:
217+ // service_class_names:
218+ // - google.pubsub.v1.Publisher: TopicAdmin
219+ // - google.pubsub.v1.Subscriber: SubscriptionAdmin
220+ map <string , string > service_class_names = 2 ;
221+
222+ // Some settings.
223+ CommonLanguageSettings common = 3 ;
224+ }
225+
226+ // Settings for C++ client libraries.
227+ message CppSettings {
228+ // Some settings.
229+ CommonLanguageSettings common = 1 ;
230+ }
231+
232+ // Settings for Php client libraries.
233+ message PhpSettings {
234+ // Some settings.
235+ CommonLanguageSettings common = 1 ;
236+ }
237+
238+ // Settings for Python client libraries.
239+ message PythonSettings {
240+ // Some settings.
241+ CommonLanguageSettings common = 1 ;
242+ }
243+
244+ // Settings for Node client libraries.
245+ message NodeSettings {
246+ // Some settings.
247+ CommonLanguageSettings common = 1 ;
248+ }
249+
250+ // Settings for Dotnet client libraries.
251+ message DotnetSettings {
252+ // Some settings.
253+ CommonLanguageSettings common = 1 ;
254+ }
255+
256+ // Settings for Ruby client libraries.
257+ message RubySettings {
258+ // Some settings.
259+ CommonLanguageSettings common = 1 ;
260+ }
261+
262+ // Settings for Go client libraries.
263+ message GoSettings {
264+ // Some settings.
265+ CommonLanguageSettings common = 1 ;
266+ }
267+
268+ // Describes the generator configuration for a method.
269+ message MethodSettings {
270+ // Describes settings to use when generating API methods that use the
271+ // long-running operation pattern.
272+ // All default values below are from those used in the client library
273+ // generators (e.g.
274+ // [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).
275+ message LongRunning {
276+ // Initial delay after which the first poll request will be made.
277+ // Default value: 5 seconds.
278+ google.protobuf.Duration initial_poll_delay = 1 ;
279+
280+ // Multiplier to gradually increase delay between subsequent polls until it
281+ // reaches max_poll_delay.
282+ // Default value: 1.5.
283+ float poll_delay_multiplier = 2 ;
284+
285+ // Maximum time between two subsequent poll requests.
286+ // Default value: 45 seconds.
287+ google.protobuf.Duration max_poll_delay = 3 ;
288+
289+ // Total polling timeout.
290+ // Default value: 5 minutes.
291+ google.protobuf.Duration total_poll_timeout = 4 ;
292+ }
293+
294+ // The fully qualified name of the method, for which the options below apply.
295+ // This is used to find the method to apply the options.
296+ string selector = 1 ;
297+
298+ // Describes settings to use for long-running operations when generating
299+ // API methods for RPCs. Complements RPCs that use the annotations in
300+ // google/longrunning/operations.proto.
301+ //
302+ // Example of a YAML configuration::
303+ //
304+ // publishing:
305+ // method_behavior:
306+ // - selector: CreateAdDomain
307+ // long_running:
308+ // initial_poll_delay:
309+ // seconds: 60 # 1 minute
310+ // poll_delay_multiplier: 1.5
311+ // max_poll_delay:
312+ // seconds: 360 # 6 minutes
313+ // total_poll_timeout:
314+ // seconds: 54000 # 90 minutes
315+ LongRunning long_running = 2 ;
316+ }
317+
318+ // The organization for which the client libraries are being published.
319+ // Affects the url where generated docs are published, etc.
320+ enum ClientLibraryOrganization {
321+ // Not useful.
322+ CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 ;
323+
324+ // Google Cloud Platform Org.
325+ CLOUD = 1 ;
326+
327+ // Ads (Advertising) Org.
328+ ADS = 2 ;
329+
330+ // Photos Org.
331+ PHOTOS = 3 ;
332+
333+ // Street View Org.
334+ STREET_VIEW = 4 ;
335+ }
336+
337+ // To where should client libraries be published?
338+ enum ClientLibraryDestination {
339+ // Client libraries will neither be generated nor published to package
340+ // managers.
341+ CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 ;
342+
343+ // Generate the client library in a repo under github.com/googleapis,
344+ // but don't publish it to package managers.
345+ GITHUB = 10 ;
346+
347+ // Publish the library to package managers like nuget.org and npmjs.com.
348+ PACKAGE_MANAGER = 20 ;
349+ }
0 commit comments