Skip to content

Commit 310515f

Browse files
fix(runtimeconfig): update the API
1 parent dc1ce6f commit 310515f

File tree

2 files changed

+1401
-0
lines changed

2 files changed

+1401
-0
lines changed

src/apis/runtimeconfig/v1.ts

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,59 @@ export namespace runtimeconfig_v1 {
196196

197197
/**
198198
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
199+
* @example
200+
* ```js
201+
* // Before running the sample:
202+
* // - Enable the API at:
203+
* // https://console.developers.google.com/apis/api/runtimeconfig.googleapis.com
204+
* // - Login into gcloud by running:
205+
* // ```sh
206+
* // $ gcloud auth application-default login
207+
* // ```
208+
* // - Install the npm module by running:
209+
* // ```sh
210+
* // $ npm install googleapis
211+
* // ```
212+
*
213+
* const {google} = require('googleapis');
214+
* const runtimeconfig = google.runtimeconfig('v1');
215+
*
216+
* async function main() {
217+
* const auth = new google.auth.GoogleAuth({
218+
* // Scopes can be specified either as an array or as a single, space-delimited string.
219+
* scopes: [
220+
* 'https://www.googleapis.com/auth/cloud-platform',
221+
* 'https://www.googleapis.com/auth/cloudruntimeconfig',
222+
* ],
223+
* });
224+
*
225+
* // Acquire an auth client, and bind it to all future calls
226+
* const authClient = await auth.getClient();
227+
* google.options({auth: authClient});
228+
*
229+
* // Do the magic
230+
* const res = await runtimeconfig.operations.cancel({
231+
* // The name of the operation resource to be cancelled.
232+
* name: 'operations/.*',
233+
*
234+
* // Request body metadata
235+
* requestBody: {
236+
* // request body parameters
237+
* // {}
238+
* },
239+
* });
240+
* console.log(res.data);
241+
*
242+
* // Example response
243+
* // {}
244+
* }
245+
*
246+
* main().catch(e => {
247+
* console.error(e);
248+
* throw e;
249+
* });
250+
*
251+
* ```
199252
*
200253
* @param params - Parameters for request
201254
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -285,6 +338,53 @@ export namespace runtimeconfig_v1 {
285338

286339
/**
287340
* Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
341+
* @example
342+
* ```js
343+
* // Before running the sample:
344+
* // - Enable the API at:
345+
* // https://console.developers.google.com/apis/api/runtimeconfig.googleapis.com
346+
* // - Login into gcloud by running:
347+
* // ```sh
348+
* // $ gcloud auth application-default login
349+
* // ```
350+
* // - Install the npm module by running:
351+
* // ```sh
352+
* // $ npm install googleapis
353+
* // ```
354+
*
355+
* const {google} = require('googleapis');
356+
* const runtimeconfig = google.runtimeconfig('v1');
357+
*
358+
* async function main() {
359+
* const auth = new google.auth.GoogleAuth({
360+
* // Scopes can be specified either as an array or as a single, space-delimited string.
361+
* scopes: [
362+
* 'https://www.googleapis.com/auth/cloud-platform',
363+
* 'https://www.googleapis.com/auth/cloudruntimeconfig',
364+
* ],
365+
* });
366+
*
367+
* // Acquire an auth client, and bind it to all future calls
368+
* const authClient = await auth.getClient();
369+
* google.options({auth: authClient});
370+
*
371+
* // Do the magic
372+
* const res = await runtimeconfig.operations.delete({
373+
* // The name of the operation resource to be deleted.
374+
* name: 'operations/.*',
375+
* });
376+
* console.log(res.data);
377+
*
378+
* // Example response
379+
* // {}
380+
* }
381+
*
382+
* main().catch(e => {
383+
* console.error(e);
384+
* throw e;
385+
* });
386+
*
387+
* ```
288388
*
289389
* @param params - Parameters for request
290390
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -374,6 +474,62 @@ export namespace runtimeconfig_v1 {
374474

375475
/**
376476
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
477+
* @example
478+
* ```js
479+
* // Before running the sample:
480+
* // - Enable the API at:
481+
* // https://console.developers.google.com/apis/api/runtimeconfig.googleapis.com
482+
* // - Login into gcloud by running:
483+
* // ```sh
484+
* // $ gcloud auth application-default login
485+
* // ```
486+
* // - Install the npm module by running:
487+
* // ```sh
488+
* // $ npm install googleapis
489+
* // ```
490+
*
491+
* const {google} = require('googleapis');
492+
* const runtimeconfig = google.runtimeconfig('v1');
493+
*
494+
* async function main() {
495+
* const auth = new google.auth.GoogleAuth({
496+
* // Scopes can be specified either as an array or as a single, space-delimited string.
497+
* scopes: [
498+
* 'https://www.googleapis.com/auth/cloud-platform',
499+
* 'https://www.googleapis.com/auth/cloudruntimeconfig',
500+
* ],
501+
* });
502+
*
503+
* // Acquire an auth client, and bind it to all future calls
504+
* const authClient = await auth.getClient();
505+
* google.options({auth: authClient});
506+
*
507+
* // Do the magic
508+
* const res = await runtimeconfig.operations.list({
509+
* // The standard list filter.
510+
* filter: 'placeholder-value',
511+
* // The name of the operation's parent resource.
512+
* name: 'operations',
513+
* // The standard list page size.
514+
* pageSize: 'placeholder-value',
515+
* // The standard list page token.
516+
* pageToken: 'placeholder-value',
517+
* });
518+
* console.log(res.data);
519+
*
520+
* // Example response
521+
* // {
522+
* // "nextPageToken": "my_nextPageToken",
523+
* // "operations": []
524+
* // }
525+
* }
526+
*
527+
* main().catch(e => {
528+
* console.error(e);
529+
* throw e;
530+
* });
531+
*
532+
* ```
377533
*
378534
* @param params - Parameters for request
379535
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.

0 commit comments

Comments
 (0)