@maxim_mazurok/gapi.client.cloudtrace-v2beta1 0.0.20231102 → 0.0.20231130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -9,391 +9,255 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://cloudtrace.googleapis.com/$discovery/rest?version=v2beta1
12
- // Revision: 20231102
12
+ // Revision: 20231130
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
16
16
  declare namespace gapi.client {
17
- /** Load Cloud Trace API v2beta1 */
18
- function load(urlOrObject: "https://cloudtrace.googleapis.com/$discovery/rest?version=v2beta1"): Promise<void>;
19
- /** @deprecated Please load APIs with discovery documents. */
20
- function load(name: "cloudtrace", version: "v2beta1"): Promise<void>;
21
- /** @deprecated Please load APIs with discovery documents. */
22
- function load(name: "cloudtrace", version: "v2beta1", callback: () => any): void;
17
+ /** Load Cloud Trace API v2beta1 */
18
+ function load(
19
+ urlOrObject: 'https://cloudtrace.googleapis.com/$discovery/rest?version=v2beta1'
20
+ ): Promise<void>;
21
+ /** @deprecated Please load APIs with discovery documents. */
22
+ function load(name: 'cloudtrace', version: 'v2beta1'): Promise<void>;
23
+ /** @deprecated Please load APIs with discovery documents. */
24
+ function load(
25
+ name: 'cloudtrace',
26
+ version: 'v2beta1',
27
+ callback: () => any
28
+ ): void;
23
29
 
24
- namespace cloudtrace {
25
- // tslint:disable-next-line:no-empty-interface
26
- interface Empty {
27
- }
28
- interface ListTraceSinksResponse {
29
- /**
30
- * A paginated response where more pages might be available has `next_page_token` set. To get the next set of results, call the same method again using the value of `next_page_token`
31
- * as `page_token`.
32
- */
33
- nextPageToken?:
34
- string;
35
- /** A list of sinks. */
36
- sinks?:
37
- TraceSink[];
38
- }
39
- interface OutputConfig {
40
- /** The destination for writing trace data. Supported formats include: "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" */
41
- destination?:
42
- string;
43
- }
44
- interface TraceSink {
45
- /**
46
- * Required. The canonical sink resource name, unique within the project. Must be of the form: projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]. E.g.:
47
- * `"projects/12345/traceSinks/my-project-trace-sink"`. Sink identifiers are limited to 256 characters and can include only the following characters: upper and lower-case alphanumeric
48
- * characters, underscores, hyphens, and periods.
49
- */
50
- name?:
51
- string;
52
- /** Required. The export destination. */
53
- outputConfig?:
54
- OutputConfig;
55
- /**
56
- * Output only. A service account name for exporting the data. This field is set by sinks.create and sinks.update. The service account will need to be granted write access to the
57
- * destination specified in the output configuration, see [Granting access for a
58
- * resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). To create tables and to write data, this account needs the `dataEditor`
59
- * role. Read more about roles in the [BigQuery documentation](https://cloud.google.com/bigquery/docs/access-control). E.g.: "service-00000001@00000002.iam.gserviceaccount.com"
60
- */
61
- writerIdentity?:
62
- string;
63
- }
64
- interface TraceSinksResource {
65
- /**
66
- * Creates a sink that exports trace spans to a destination. The export of newly-ingested traces begins immediately, unless the sink's `writer_identity` is not permitted to write to
67
- * the destination. A sink can export traces only from the resource owning the sink (the 'parent').
68
- */
69
- create(request: {
70
- /** V1 error format. */
71
- "$.xgafv"?:
72
- string;
73
- /** OAuth access token. */
74
- access_token?:
75
- string;
76
- /** Data format for response. */
77
- alt?:
78
- string;
79
- /** JSONP */
80
- callback?:
81
- string;
82
- /** Selector specifying which fields to include in a partial response. */
83
- fields?:
84
- string;
85
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
86
- key?:
87
- string;
88
- /** OAuth 2.0 token for the current user. */
89
- oauth_token?:
90
- string;
91
- /**
92
- * Required. The resource in which to create the sink (currently only project sinks are supported): "projects/[PROJECT_ID]" Examples: `"projects/my-trace-project"`,
93
- * `"projects/123456789"`.
94
- */
95
- parent:
96
- string;
97
- /** Returns response with indentations and line breaks. */
98
- prettyPrint?:
99
- boolean;
100
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
101
- quotaUser?:
102
- string;
103
- /** Upload protocol for media (e.g. "raw", "multipart"). */
104
- upload_protocol?:
105
- string;
106
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
107
- uploadType?:
108
- string;
109
- /** Request body */
110
- resource:
111
- TraceSink;
112
- }): Request<TraceSink>;
113
- create(request: {
114
- /** V1 error format. */
115
- "$.xgafv"?:
116
- string;
117
- /** OAuth access token. */
118
- access_token?:
119
- string;
120
- /** Data format for response. */
121
- alt?:
122
- string;
123
- /** JSONP */
124
- callback?:
125
- string;
126
- /** Selector specifying which fields to include in a partial response. */
127
- fields?:
128
- string;
129
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
130
- key?:
131
- string;
132
- /** OAuth 2.0 token for the current user. */
133
- oauth_token?:
134
- string;
135
- /**
136
- * Required. The resource in which to create the sink (currently only project sinks are supported): "projects/[PROJECT_ID]" Examples: `"projects/my-trace-project"`,
137
- * `"projects/123456789"`.
138
- */
139
- parent:
140
- string;
141
- /** Returns response with indentations and line breaks. */
142
- prettyPrint?:
143
- boolean;
144
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
145
- quotaUser?:
146
- string;
147
- /** Upload protocol for media (e.g. "raw", "multipart"). */
148
- upload_protocol?:
149
- string;
150
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
151
- uploadType?:
152
- string;
153
- },
154
- body: TraceSink): Request<TraceSink>;
155
- /** Deletes a sink. */
156
- delete(request?: {
157
- /** V1 error format. */
158
- "$.xgafv"?:
159
- string;
160
- /** OAuth access token. */
161
- access_token?:
162
- string;
163
- /** Data format for response. */
164
- alt?:
165
- string;
166
- /** JSONP */
167
- callback?:
168
- string;
169
- /** Selector specifying which fields to include in a partial response. */
170
- fields?:
171
- string;
172
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
173
- key?:
174
- string;
175
- /**
176
- * Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]" Example:
177
- * `"projects/12345/traceSinks/my-sink-id"`.
178
- */
179
- name:
180
- string;
181
- /** OAuth 2.0 token for the current user. */
182
- oauth_token?:
183
- string;
184
- /** Returns response with indentations and line breaks. */
185
- prettyPrint?:
186
- boolean;
187
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
188
- quotaUser?:
189
- string;
190
- /** Upload protocol for media (e.g. "raw", "multipart"). */
191
- upload_protocol?:
192
- string;
193
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
194
- uploadType?:
195
- string;
196
- }): Request<{}>;
197
- /** Get a trace sink by name under the parent resource (GCP project). */
198
- get(request?: {
199
- /** V1 error format. */
200
- "$.xgafv"?:
201
- string;
202
- /** OAuth access token. */
203
- access_token?:
204
- string;
205
- /** Data format for response. */
206
- alt?:
207
- string;
208
- /** JSONP */
209
- callback?:
210
- string;
211
- /** Selector specifying which fields to include in a partial response. */
212
- fields?:
213
- string;
214
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
215
- key?:
216
- string;
217
- /** Required. The resource name of the sink: "projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]" Example: `"projects/12345/traceSinks/my-sink-id"`. */
218
- name:
219
- string;
220
- /** OAuth 2.0 token for the current user. */
221
- oauth_token?:
222
- string;
223
- /** Returns response with indentations and line breaks. */
224
- prettyPrint?:
225
- boolean;
226
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
227
- quotaUser?:
228
- string;
229
- /** Upload protocol for media (e.g. "raw", "multipart"). */
230
- upload_protocol?:
231
- string;
232
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
233
- uploadType?:
234
- string;
235
- }): Request<TraceSink>;
236
- /** List all sinks for the parent resource (GCP project). */
237
- list(request?: {
238
- /** V1 error format. */
239
- "$.xgafv"?:
240
- string;
241
- /** OAuth access token. */
242
- access_token?:
243
- string;
244
- /** Data format for response. */
245
- alt?:
246
- string;
247
- /** JSONP */
248
- callback?:
249
- string;
250
- /** Selector specifying which fields to include in a partial response. */
251
- fields?:
252
- string;
253
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
254
- key?:
255
- string;
256
- /** OAuth 2.0 token for the current user. */
257
- oauth_token?:
258
- string;
259
- /**
260
- * Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `next_page_token` in the response indicates that more
261
- * results might be available.
262
- */
263
- pageSize?:
264
- number;
265
- /**
266
- * Optional. If present, then retrieve the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous
267
- * response. The values of other method parameters should be identical to those in the previous call.
268
- */
269
- pageToken?:
270
- string;
271
- /** Required. The parent resource whose sinks are to be listed (currently only project parent resources are supported): "projects/[PROJECT_ID]" */
272
- parent:
273
- string;
274
- /** Returns response with indentations and line breaks. */
275
- prettyPrint?:
276
- boolean;
277
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
278
- quotaUser?:
279
- string;
280
- /** Upload protocol for media (e.g. "raw", "multipart"). */
281
- upload_protocol?:
282
- string;
283
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
284
- uploadType?:
285
- string;
286
- }): Request<ListTraceSinksResponse>;
287
- /**
288
- * Updates a sink. This method updates fields in the existing sink according to the provided update mask. The sink's name cannot be changed nor any output-only fields (e.g. the
289
- * writer_identity).
290
- */
291
- patch(request: {
292
- /** V1 error format. */
293
- "$.xgafv"?:
294
- string;
295
- /** OAuth access token. */
296
- access_token?:
297
- string;
298
- /** Data format for response. */
299
- alt?:
300
- string;
301
- /** JSONP */
302
- callback?:
303
- string;
304
- /** Selector specifying which fields to include in a partial response. */
305
- fields?:
306
- string;
307
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
308
- key?:
309
- string;
310
- /**
311
- * Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]" Example:
312
- * `"projects/12345/traceSinks/my-sink-id"`.
313
- */
314
- name:
315
- string;
316
- /** OAuth 2.0 token for the current user. */
317
- oauth_token?:
318
- string;
319
- /** Returns response with indentations and line breaks. */
320
- prettyPrint?:
321
- boolean;
322
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
323
- quotaUser?:
324
- string;
325
- /**
326
- * Required. Field mask that specifies the fields in `trace_sink` that are to be updated. A sink field is overwritten if, and only if, it is in the update mask. `name` and
327
- * `writer_identity` fields cannot be updated. An empty `update_mask` is considered an error. For a detailed `FieldMask` definition, see
328
- * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask Example: `updateMask=output_config`.
329
- */
330
- updateMask?:
331
- string;
332
- /** Upload protocol for media (e.g. "raw", "multipart"). */
333
- upload_protocol?:
334
- string;
335
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
336
- uploadType?:
337
- string;
338
- /** Request body */
339
- resource:
340
- TraceSink;
341
- }): Request<TraceSink>;
342
- patch(request: {
343
- /** V1 error format. */
344
- "$.xgafv"?:
345
- string;
346
- /** OAuth access token. */
347
- access_token?:
348
- string;
349
- /** Data format for response. */
350
- alt?:
351
- string;
352
- /** JSONP */
353
- callback?:
354
- string;
355
- /** Selector specifying which fields to include in a partial response. */
356
- fields?:
357
- string;
358
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
359
- key?:
360
- string;
361
- /**
362
- * Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]" Example:
363
- * `"projects/12345/traceSinks/my-sink-id"`.
364
- */
365
- name:
366
- string;
367
- /** OAuth 2.0 token for the current user. */
368
- oauth_token?:
369
- string;
370
- /** Returns response with indentations and line breaks. */
371
- prettyPrint?:
372
- boolean;
373
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
374
- quotaUser?:
375
- string;
376
- /**
377
- * Required. Field mask that specifies the fields in `trace_sink` that are to be updated. A sink field is overwritten if, and only if, it is in the update mask. `name` and
378
- * `writer_identity` fields cannot be updated. An empty `update_mask` is considered an error. For a detailed `FieldMask` definition, see
379
- * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask Example: `updateMask=output_config`.
380
- */
381
- updateMask?:
382
- string;
383
- /** Upload protocol for media (e.g. "raw", "multipart"). */
384
- upload_protocol?:
385
- string;
386
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
387
- uploadType?:
388
- string;
389
- },
390
- body: TraceSink): Request<TraceSink>;
391
- }
392
- interface ProjectsResource {
393
- traceSinks:
394
- TraceSinksResource;
395
- }
396
-
397
- const projects: ProjectsResource;
30
+ namespace cloudtrace {
31
+ interface Empty {}
32
+ interface ListTraceSinksResponse {
33
+ /** A paginated response where more pages might be available has `next_page_token` set. To get the next set of results, call the same method again using the value of `next_page_token` as `page_token`. */
34
+ nextPageToken?: string;
35
+ /** A list of sinks. */
36
+ sinks?: TraceSink[];
37
+ }
38
+ interface OutputConfig {
39
+ /** The destination for writing trace data. Supported formats include: "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" */
40
+ destination?: string;
41
+ }
42
+ interface TraceSink {
43
+ /** Required. The canonical sink resource name, unique within the project. Must be of the form: projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]. E.g.: `"projects/12345/traceSinks/my-project-trace-sink"`. Sink identifiers are limited to 256 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods. */
44
+ name?: string;
45
+ /** Required. The export destination. */
46
+ outputConfig?: OutputConfig;
47
+ /** Output only. A service account name for exporting the data. This field is set by sinks.create and sinks.update. The service account will need to be granted write access to the destination specified in the output configuration, see [Granting access for a resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). To create tables and to write data, this account needs the `dataEditor` role. Read more about roles in the [BigQuery documentation](https://cloud.google.com/bigquery/docs/access-control). E.g.: "service-00000001@00000002.iam.gserviceaccount.com" */
48
+ writerIdentity?: string;
398
49
  }
50
+ interface TraceSinksResource {
51
+ /** Creates a sink that exports trace spans to a destination. The export of newly-ingested traces begins immediately, unless the sink's `writer_identity` is not permitted to write to the destination. A sink can export traces only from the resource owning the sink (the 'parent'). */
52
+ create(request: {
53
+ /** V1 error format. */
54
+ '$.xgafv'?: string;
55
+ /** OAuth access token. */
56
+ access_token?: string;
57
+ /** Data format for response. */
58
+ alt?: string;
59
+ /** JSONP */
60
+ callback?: string;
61
+ /** Selector specifying which fields to include in a partial response. */
62
+ fields?: string;
63
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
64
+ key?: string;
65
+ /** OAuth 2.0 token for the current user. */
66
+ oauth_token?: string;
67
+ /** Required. The resource in which to create the sink (currently only project sinks are supported): "projects/[PROJECT_ID]" Examples: `"projects/my-trace-project"`, `"projects/123456789"`. */
68
+ parent: string;
69
+ /** Returns response with indentations and line breaks. */
70
+ prettyPrint?: boolean;
71
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
72
+ quotaUser?: string;
73
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
74
+ upload_protocol?: string;
75
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
76
+ uploadType?: string;
77
+ /** Request body */
78
+ resource: TraceSink;
79
+ }): Request<TraceSink>;
80
+ create(
81
+ request: {
82
+ /** V1 error format. */
83
+ '$.xgafv'?: string;
84
+ /** OAuth access token. */
85
+ access_token?: string;
86
+ /** Data format for response. */
87
+ alt?: string;
88
+ /** JSONP */
89
+ callback?: string;
90
+ /** Selector specifying which fields to include in a partial response. */
91
+ fields?: string;
92
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
93
+ key?: string;
94
+ /** OAuth 2.0 token for the current user. */
95
+ oauth_token?: string;
96
+ /** Required. The resource in which to create the sink (currently only project sinks are supported): "projects/[PROJECT_ID]" Examples: `"projects/my-trace-project"`, `"projects/123456789"`. */
97
+ parent: string;
98
+ /** Returns response with indentations and line breaks. */
99
+ prettyPrint?: boolean;
100
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
101
+ quotaUser?: string;
102
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
103
+ upload_protocol?: string;
104
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
105
+ uploadType?: string;
106
+ },
107
+ body: TraceSink
108
+ ): Request<TraceSink>;
109
+ /** Deletes a sink. */
110
+ delete(request?: {
111
+ /** V1 error format. */
112
+ '$.xgafv'?: string;
113
+ /** OAuth access token. */
114
+ access_token?: string;
115
+ /** Data format for response. */
116
+ alt?: string;
117
+ /** JSONP */
118
+ callback?: string;
119
+ /** Selector specifying which fields to include in a partial response. */
120
+ fields?: string;
121
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
122
+ key?: string;
123
+ /** Required. The full resource name of the sink to delete, including the parent resource and the sink identifier: "projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]" Example: `"projects/12345/traceSinks/my-sink-id"`. */
124
+ name: string;
125
+ /** OAuth 2.0 token for the current user. */
126
+ oauth_token?: string;
127
+ /** Returns response with indentations and line breaks. */
128
+ prettyPrint?: boolean;
129
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
130
+ quotaUser?: string;
131
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
132
+ upload_protocol?: string;
133
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
134
+ uploadType?: string;
135
+ }): Request<{}>;
136
+ /** Get a trace sink by name under the parent resource (GCP project). */
137
+ get(request?: {
138
+ /** V1 error format. */
139
+ '$.xgafv'?: string;
140
+ /** OAuth access token. */
141
+ access_token?: string;
142
+ /** Data format for response. */
143
+ alt?: string;
144
+ /** JSONP */
145
+ callback?: string;
146
+ /** Selector specifying which fields to include in a partial response. */
147
+ fields?: string;
148
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
149
+ key?: string;
150
+ /** Required. The resource name of the sink: "projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]" Example: `"projects/12345/traceSinks/my-sink-id"`. */
151
+ name: string;
152
+ /** OAuth 2.0 token for the current user. */
153
+ oauth_token?: string;
154
+ /** Returns response with indentations and line breaks. */
155
+ prettyPrint?: boolean;
156
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
157
+ quotaUser?: string;
158
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
159
+ upload_protocol?: string;
160
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
161
+ uploadType?: string;
162
+ }): Request<TraceSink>;
163
+ /** List all sinks for the parent resource (GCP project). */
164
+ list(request?: {
165
+ /** V1 error format. */
166
+ '$.xgafv'?: string;
167
+ /** OAuth access token. */
168
+ access_token?: string;
169
+ /** Data format for response. */
170
+ alt?: string;
171
+ /** JSONP */
172
+ callback?: string;
173
+ /** Selector specifying which fields to include in a partial response. */
174
+ fields?: string;
175
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
176
+ key?: string;
177
+ /** OAuth 2.0 token for the current user. */
178
+ oauth_token?: string;
179
+ /** Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `next_page_token` in the response indicates that more results might be available. */
180
+ pageSize?: number;
181
+ /** Optional. If present, then retrieve the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters should be identical to those in the previous call. */
182
+ pageToken?: string;
183
+ /** Required. The parent resource whose sinks are to be listed (currently only project parent resources are supported): "projects/[PROJECT_ID]" */
184
+ parent: string;
185
+ /** Returns response with indentations and line breaks. */
186
+ prettyPrint?: boolean;
187
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
188
+ quotaUser?: string;
189
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
190
+ upload_protocol?: string;
191
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
192
+ uploadType?: string;
193
+ }): Request<ListTraceSinksResponse>;
194
+ /** Updates a sink. This method updates fields in the existing sink according to the provided update mask. The sink's name cannot be changed nor any output-only fields (e.g. the writer_identity). */
195
+ patch(request: {
196
+ /** V1 error format. */
197
+ '$.xgafv'?: string;
198
+ /** OAuth access token. */
199
+ access_token?: string;
200
+ /** Data format for response. */
201
+ alt?: string;
202
+ /** JSONP */
203
+ callback?: string;
204
+ /** Selector specifying which fields to include in a partial response. */
205
+ fields?: string;
206
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
207
+ key?: string;
208
+ /** Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]" Example: `"projects/12345/traceSinks/my-sink-id"`. */
209
+ name: string;
210
+ /** OAuth 2.0 token for the current user. */
211
+ oauth_token?: string;
212
+ /** Returns response with indentations and line breaks. */
213
+ prettyPrint?: boolean;
214
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
215
+ quotaUser?: string;
216
+ /** Required. Field mask that specifies the fields in `trace_sink` that are to be updated. A sink field is overwritten if, and only if, it is in the update mask. `name` and `writer_identity` fields cannot be updated. An empty `update_mask` is considered an error. For a detailed `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask Example: `updateMask=output_config`. */
217
+ updateMask?: string;
218
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
219
+ upload_protocol?: string;
220
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
221
+ uploadType?: string;
222
+ /** Request body */
223
+ resource: TraceSink;
224
+ }): Request<TraceSink>;
225
+ patch(
226
+ request: {
227
+ /** V1 error format. */
228
+ '$.xgafv'?: string;
229
+ /** OAuth access token. */
230
+ access_token?: string;
231
+ /** Data format for response. */
232
+ alt?: string;
233
+ /** JSONP */
234
+ callback?: string;
235
+ /** Selector specifying which fields to include in a partial response. */
236
+ fields?: string;
237
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
238
+ key?: string;
239
+ /** Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]" Example: `"projects/12345/traceSinks/my-sink-id"`. */
240
+ name: string;
241
+ /** OAuth 2.0 token for the current user. */
242
+ oauth_token?: string;
243
+ /** Returns response with indentations and line breaks. */
244
+ prettyPrint?: boolean;
245
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
246
+ quotaUser?: string;
247
+ /** Required. Field mask that specifies the fields in `trace_sink` that are to be updated. A sink field is overwritten if, and only if, it is in the update mask. `name` and `writer_identity` fields cannot be updated. An empty `update_mask` is considered an error. For a detailed `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask Example: `updateMask=output_config`. */
248
+ updateMask?: string;
249
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
250
+ upload_protocol?: string;
251
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
252
+ uploadType?: string;
253
+ },
254
+ body: TraceSink
255
+ ): Request<TraceSink>;
256
+ }
257
+ interface ProjectsResource {
258
+ traceSinks: TraceSinksResource;
259
+ }
260
+
261
+ const projects: ProjectsResource;
262
+ }
399
263
  }
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.cloudtrace-v2beta1",
3
- "version": "0.0.20231102",
3
+ "version": "0.0.20231130",
4
4
  "description": "TypeScript typings for Cloud Trace API v2beta1",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
8
+ },
5
9
  "license": "MIT",
6
10
  "author": {
7
- "email": "maxim@mazurok.com",
8
11
  "name": "Maxim Mazurok",
12
+ "email": "maxim@mazurok.com",
9
13
  "url": "https://maxim.mazurok.com"
10
14
  },
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
14
- },
15
15
  "types": "index.d.ts",
16
16
  "dependencies": {
17
17
  "@types/gapi.client": "*",
package/readme.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TypeScript typings for Cloud Trace API v2beta1
2
2
 
3
- Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Cloud Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenTelemetry.
3
+ Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Cloud Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenTelemetry.
4
4
  For detailed description please check [documentation](https://cloud.google.com/trace).
5
5
 
6
6
  ## Installing
@@ -25,10 +25,13 @@ gapi.load('client', () => {
25
25
  Then load api client wrapper:
26
26
 
27
27
  ```typescript
28
- gapi.client.load('https://cloudtrace.googleapis.com/$discovery/rest?version=v2beta1', () => {
29
- // now we can use:
30
- // gapi.client.cloudtrace
31
- });
28
+ gapi.client.load(
29
+ 'https://cloudtrace.googleapis.com/$discovery/rest?version=v2beta1',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.cloudtrace
33
+ }
34
+ );
32
35
  ```
33
36
 
34
37
  ```typescript
@@ -45,30 +48,32 @@ Don't forget to authenticate your client before sending any request to resources
45
48
  // declare client_id registered in Google Developers Console
46
49
  var client_id = '',
47
50
  scope = [
48
- // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
49
- 'https://www.googleapis.com/auth/cloud-platform',
51
+ // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
52
+ 'https://www.googleapis.com/auth/cloud-platform',
50
53
 
51
- // Write Trace data for a project or application
52
- 'https://www.googleapis.com/auth/trace.append',
54
+ // Write Trace data for a project or application
55
+ 'https://www.googleapis.com/auth/trace.append',
53
56
 
54
- // Read Trace data for a project or application
55
- 'https://www.googleapis.com/auth/trace.readonly',
56
- ],
57
- immediate = true;
57
+ // Read Trace data for a project or application
58
+ 'https://www.googleapis.com/auth/trace.readonly',
59
+ ],
60
+ immediate = true;
58
61
  // ...
59
62
 
60
63
  gapi.auth.authorize(
61
- { client_id: client_id, scope: scope, immediate: immediate },
64
+ {client_id: client_id, scope: scope, immediate: immediate},
62
65
  authResult => {
63
66
  if (authResult && !authResult.error) {
64
- /* handle successful authorization */
67
+ /* handle successful authorization */
65
68
  } else {
66
- /* handle authorization error */
69
+ /* handle authorization error */
67
70
  }
68
- });
71
+ }
72
+ );
69
73
  ```
70
74
 
71
75
  After that you can use Cloud Trace API resources: <!-- TODO: make this work for multiple namespaces -->
72
76
 
73
77
  ```typescript
78
+
74
79
  ```
package/tests.ts DELETED
@@ -1,78 +0,0 @@
1
- /* This is stub file for gapi.client.cloudtrace-v2beta1 definition tests */
2
- // IMPORTANT
3
- // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
- // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
-
6
- // Revision: 20231102
7
-
8
- gapi.load('client', async () => {
9
- /** now we can use gapi.client */
10
-
11
- await gapi.client.load('https://cloudtrace.googleapis.com/$discovery/rest?version=v2beta1');
12
- /** now we can use gapi.client.cloudtrace */
13
-
14
- /** don't forget to authenticate your client before sending any request to resources: */
15
- /** declare client_id registered in Google Developers Console */
16
- const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
- const scope = [
18
- /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
19
- 'https://www.googleapis.com/auth/cloud-platform',
20
- /** Write Trace data for a project or application */
21
- 'https://www.googleapis.com/auth/trace.append',
22
- /** Read Trace data for a project or application */
23
- 'https://www.googleapis.com/auth/trace.readonly',
24
- ];
25
- const immediate = false;
26
- gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
27
- if (authResult && !authResult.error) {
28
- /** handle successful authorization */
29
- run();
30
- } else {
31
- /** handle authorization error */
32
- }
33
- });
34
-
35
- async function run() {
36
- /**
37
- * Creates a sink that exports trace spans to a destination. The export of newly-ingested traces begins immediately, unless the sink's `writer_identity` is not permitted to write to the
38
- * destination. A sink can export traces only from the resource owning the sink (the 'parent').
39
- */
40
- await gapi.client.cloudtrace.projects.traceSinks.create({
41
- parent: "Test string",
42
- }, {
43
- name: "Test string",
44
- outputConfig: {
45
- destination: "Test string",
46
- },
47
- writerIdentity: "Test string",
48
- });
49
- /** Deletes a sink. */
50
- await gapi.client.cloudtrace.projects.traceSinks.delete({
51
- name: "Test string",
52
- });
53
- /** Get a trace sink by name under the parent resource (GCP project). */
54
- await gapi.client.cloudtrace.projects.traceSinks.get({
55
- name: "Test string",
56
- });
57
- /** List all sinks for the parent resource (GCP project). */
58
- await gapi.client.cloudtrace.projects.traceSinks.list({
59
- pageSize: 42,
60
- pageToken: "Test string",
61
- parent: "Test string",
62
- });
63
- /**
64
- * Updates a sink. This method updates fields in the existing sink according to the provided update mask. The sink's name cannot be changed nor any output-only fields (e.g. the
65
- * writer_identity).
66
- */
67
- await gapi.client.cloudtrace.projects.traceSinks.patch({
68
- name: "Test string",
69
- updateMask: "Test string",
70
- }, {
71
- name: "Test string",
72
- outputConfig: {
73
- destination: "Test string",
74
- },
75
- writerIdentity: "Test string",
76
- });
77
- }
78
- });
package/tsconfig.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "lib": ["es6", "dom"],
5
- "noImplicitAny": true,
6
- "noImplicitThis": true,
7
- "strictNullChecks": true,
8
- "baseUrl": "../",
9
- "typeRoots": [
10
- "../"
11
- ],
12
- "types": [],
13
- "noEmit": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "strictFunctionTypes": true
16
- },
17
- "files": ["index.d.ts", "tests.ts"]
18
- }
package/tslint.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "dtslint/dtslint.json",
3
- "rules": {
4
- "no-redundant-jsdoc": false
5
- }
6
- }