@maxim_mazurok/gapi.client.cloudprofiler-v2 0.0.20231106 → 0.0.20231127

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,343 +9,237 @@
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://cloudprofiler.googleapis.com/$discovery/rest?version=v2
12
- // Revision: 20231106
12
+ // Revision: 20231127
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
16
16
  declare namespace gapi.client {
17
- /** Load Cloud Profiler API v2 */
18
- function load(urlOrObject: "https://cloudprofiler.googleapis.com/$discovery/rest?version=v2"): Promise<void>;
19
- /** @deprecated Please load APIs with discovery documents. */
20
- function load(name: "cloudprofiler", version: "v2"): Promise<void>;
21
- /** @deprecated Please load APIs with discovery documents. */
22
- function load(name: "cloudprofiler", version: "v2", callback: () => any): void;
17
+ /** Load Cloud Profiler API v2 */
18
+ function load(
19
+ urlOrObject: 'https://cloudprofiler.googleapis.com/$discovery/rest?version=v2'
20
+ ): Promise<void>;
21
+ /** @deprecated Please load APIs with discovery documents. */
22
+ function load(name: 'cloudprofiler', version: 'v2'): Promise<void>;
23
+ /** @deprecated Please load APIs with discovery documents. */
24
+ function load(
25
+ name: 'cloudprofiler',
26
+ version: 'v2',
27
+ callback: () => any
28
+ ): void;
23
29
 
24
- namespace cloudprofiler {
25
- interface CreateProfileRequest {
26
- /** Deployment details. */
27
- deployment?:
28
- Deployment;
29
- /** One or more profile types that the agent is capable of providing. */
30
- profileType?:
31
- string[];
32
- }
33
- interface Deployment {
34
- /**
35
- * Labels identify the deployment within the user universe and same target. Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. Value for an individual label must
36
- * be <= 512 bytes, the total size of all label names and values must be <= 1024 bytes. Label named "language" can be used to record the programming language of the profiled
37
- * deployment. The standard choices for the value include "java", "go", "python", "ruby", "nodejs", "php", "dotnet". For deployments running on Google Cloud Platform, "zone" or
38
- * "region" label should be present describing the deployment location. An example of a zone is "us-central1-a", an example of a region is "us-central1" or "us-central".
39
- */
40
- labels?:
41
- { [P in string]: string };
42
- /** Project ID is the ID of a cloud project. Validation regex: `^a-z{4,61}[a-z0-9]$`. */
43
- projectId?:
44
- string;
45
- /**
46
- * Target is the service name used to group related deployments: * Service name for App Engine Flex / Standard. * Cluster and container name for GKE. * User-specified string for direct
47
- * Compute Engine profiling (e.g. Java). * Job name for Dataflow. Validation regex: `^[a-z0-9]([-a-z0-9_.]{0,253}[a-z0-9])?$`.
48
- */
49
- target?:
50
- string;
51
- }
52
- interface Profile {
53
- /** Deployment this profile corresponds to. */
54
- deployment?:
55
- Deployment;
56
- /**
57
- * Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the
58
- * effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled
59
- * asynchronously).
60
- */
61
- duration?:
62
- string;
63
- /**
64
- * Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for
65
- * validation rules and limits.
66
- */
67
- labels?:
68
- { [P in string]: string };
69
- /** Output only. Opaque, server-assigned, unique ID for this profile. */
70
- name?:
71
- string;
72
- /** Input only. Profile bytes, as a gzip compressed serialized proto, the format is https://github.com/google/pprof/blob/master/proto/profile.proto. */
73
- profileBytes?:
74
- string;
75
- /** Type of profile. For offline mode, this must be specified when creating the profile. For online mode it is assigned and returned by the server. */
76
- profileType?:
77
- string;
78
- }
79
- interface ProfilesResource {
80
- /**
81
- * CreateProfile creates a new profile resource in the online mode. The server ensures that the new profiles are created at a constant rate per deployment, so the creation request may
82
- * hang for some time until the next profile session is available. The request may fail with ABORTED error if the creation is not available within ~1m, the response will indicate the
83
- * duration of the backoff the client should take before attempting creating a profile again. The backoff duration is returned in google.rpc.RetryInfo extension on the response status.
84
- * To a gRPC client, the extension will be return as a binary-serialized proto in the trailing metadata item named "google.rpc.retryinfo-bin".
85
- */
86
- create(request: {
87
- /** V1 error format. */
88
- "$.xgafv"?:
89
- string;
90
- /** OAuth access token. */
91
- access_token?:
92
- string;
93
- /** Data format for response. */
94
- alt?:
95
- string;
96
- /** JSONP */
97
- callback?:
98
- string;
99
- /** Selector specifying which fields to include in a partial response. */
100
- fields?:
101
- string;
102
- /** 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. */
103
- key?:
104
- string;
105
- /** OAuth 2.0 token for the current user. */
106
- oauth_token?:
107
- string;
108
- /** Parent project to create the profile in. */
109
- parent:
110
- string;
111
- /** Returns response with indentations and line breaks. */
112
- prettyPrint?:
113
- boolean;
114
- /** 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. */
115
- quotaUser?:
116
- string;
117
- /** Upload protocol for media (e.g. "raw", "multipart"). */
118
- upload_protocol?:
119
- string;
120
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
121
- uploadType?:
122
- string;
123
- /** Request body */
124
- resource:
125
- CreateProfileRequest;
126
- }): Request<Profile>;
127
- create(request: {
128
- /** V1 error format. */
129
- "$.xgafv"?:
130
- string;
131
- /** OAuth access token. */
132
- access_token?:
133
- string;
134
- /** Data format for response. */
135
- alt?:
136
- string;
137
- /** JSONP */
138
- callback?:
139
- string;
140
- /** Selector specifying which fields to include in a partial response. */
141
- fields?:
142
- string;
143
- /** 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. */
144
- key?:
145
- string;
146
- /** OAuth 2.0 token for the current user. */
147
- oauth_token?:
148
- string;
149
- /** Parent project to create the profile in. */
150
- parent:
151
- string;
152
- /** Returns response with indentations and line breaks. */
153
- prettyPrint?:
154
- boolean;
155
- /** 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. */
156
- quotaUser?:
157
- string;
158
- /** Upload protocol for media (e.g. "raw", "multipart"). */
159
- upload_protocol?:
160
- string;
161
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
162
- uploadType?:
163
- string;
164
- },
165
- body: CreateProfileRequest): Request<Profile>;
166
- /** CreateOfflineProfile creates a new profile resource in the offline mode. The client provides the profile to create along with the profile bytes, the server records it. */
167
- createOffline(request: {
168
- /** V1 error format. */
169
- "$.xgafv"?:
170
- string;
171
- /** OAuth access token. */
172
- access_token?:
173
- string;
174
- /** Data format for response. */
175
- alt?:
176
- string;
177
- /** JSONP */
178
- callback?:
179
- string;
180
- /** Selector specifying which fields to include in a partial response. */
181
- fields?:
182
- string;
183
- /** 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. */
184
- key?:
185
- string;
186
- /** OAuth 2.0 token for the current user. */
187
- oauth_token?:
188
- string;
189
- /** Parent project to create the profile in. */
190
- parent:
191
- string;
192
- /** Returns response with indentations and line breaks. */
193
- prettyPrint?:
194
- boolean;
195
- /** 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. */
196
- quotaUser?:
197
- string;
198
- /** Upload protocol for media (e.g. "raw", "multipart"). */
199
- upload_protocol?:
200
- string;
201
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
202
- uploadType?:
203
- string;
204
- /** Request body */
205
- resource:
206
- Profile;
207
- }): Request<Profile>;
208
- createOffline(request: {
209
- /** V1 error format. */
210
- "$.xgafv"?:
211
- string;
212
- /** OAuth access token. */
213
- access_token?:
214
- string;
215
- /** Data format for response. */
216
- alt?:
217
- string;
218
- /** JSONP */
219
- callback?:
220
- string;
221
- /** Selector specifying which fields to include in a partial response. */
222
- fields?:
223
- string;
224
- /** 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. */
225
- key?:
226
- string;
227
- /** OAuth 2.0 token for the current user. */
228
- oauth_token?:
229
- string;
230
- /** Parent project to create the profile in. */
231
- parent:
232
- string;
233
- /** Returns response with indentations and line breaks. */
234
- prettyPrint?:
235
- boolean;
236
- /** 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. */
237
- quotaUser?:
238
- string;
239
- /** Upload protocol for media (e.g. "raw", "multipart"). */
240
- upload_protocol?:
241
- string;
242
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
243
- uploadType?:
244
- string;
245
- },
246
- body: Profile): Request<Profile>;
247
- /**
248
- * UpdateProfile updates the profile bytes and labels on the profile resource created in the online mode. Updating the bytes for profiles created in the offline mode is currently not
249
- * supported: the profile content must be provided at the time of the profile creation.
250
- */
251
- patch(request: {
252
- /** V1 error format. */
253
- "$.xgafv"?:
254
- string;
255
- /** OAuth access token. */
256
- access_token?:
257
- string;
258
- /** Data format for response. */
259
- alt?:
260
- string;
261
- /** JSONP */
262
- callback?:
263
- string;
264
- /** Selector specifying which fields to include in a partial response. */
265
- fields?:
266
- string;
267
- /** 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. */
268
- key?:
269
- string;
270
- /** Output only. Opaque, server-assigned, unique ID for this profile. */
271
- name:
272
- string;
273
- /** OAuth 2.0 token for the current user. */
274
- oauth_token?:
275
- string;
276
- /** Returns response with indentations and line breaks. */
277
- prettyPrint?:
278
- boolean;
279
- /** 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. */
280
- quotaUser?:
281
- string;
282
- /**
283
- * Field mask used to specify the fields to be overwritten. Currently only profile_bytes and labels fields are supported by UpdateProfile, so only those fields can be specified in
284
- * the mask. When no mask is provided, all fields are overwritten.
285
- */
286
- updateMask?:
287
- string;
288
- /** Upload protocol for media (e.g. "raw", "multipart"). */
289
- upload_protocol?:
290
- string;
291
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
292
- uploadType?:
293
- string;
294
- /** Request body */
295
- resource:
296
- Profile;
297
- }): Request<Profile>;
298
- patch(request: {
299
- /** V1 error format. */
300
- "$.xgafv"?:
301
- string;
302
- /** OAuth access token. */
303
- access_token?:
304
- string;
305
- /** Data format for response. */
306
- alt?:
307
- string;
308
- /** JSONP */
309
- callback?:
310
- string;
311
- /** Selector specifying which fields to include in a partial response. */
312
- fields?:
313
- string;
314
- /** 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. */
315
- key?:
316
- string;
317
- /** Output only. Opaque, server-assigned, unique ID for this profile. */
318
- name:
319
- string;
320
- /** OAuth 2.0 token for the current user. */
321
- oauth_token?:
322
- string;
323
- /** Returns response with indentations and line breaks. */
324
- prettyPrint?:
325
- boolean;
326
- /** 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. */
327
- quotaUser?:
328
- string;
329
- /**
330
- * Field mask used to specify the fields to be overwritten. Currently only profile_bytes and labels fields are supported by UpdateProfile, so only those fields can be specified in
331
- * the mask. When no mask is provided, all fields are overwritten.
332
- */
333
- updateMask?:
334
- string;
335
- /** Upload protocol for media (e.g. "raw", "multipart"). */
336
- upload_protocol?:
337
- string;
338
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
339
- uploadType?:
340
- string;
341
- },
342
- body: Profile): Request<Profile>;
343
- }
344
- interface ProjectsResource {
345
- profiles:
346
- ProfilesResource;
347
- }
348
-
349
- const projects: ProjectsResource;
30
+ namespace cloudprofiler {
31
+ interface CreateProfileRequest {
32
+ /** Deployment details. */
33
+ deployment?: Deployment;
34
+ /** One or more profile types that the agent is capable of providing. */
35
+ profileType?: string[];
36
+ }
37
+ interface Deployment {
38
+ /** Labels identify the deployment within the user universe and same target. Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. Value for an individual label must be <= 512 bytes, the total size of all label names and values must be <= 1024 bytes. Label named "language" can be used to record the programming language of the profiled deployment. The standard choices for the value include "java", "go", "python", "ruby", "nodejs", "php", "dotnet". For deployments running on Google Cloud Platform, "zone" or "region" label should be present describing the deployment location. An example of a zone is "us-central1-a", an example of a region is "us-central1" or "us-central". */
39
+ labels?: {[P in string]: string};
40
+ /** Project ID is the ID of a cloud project. Validation regex: `^a-z{4,61}[a-z0-9]$`. */
41
+ projectId?: string;
42
+ /** Target is the service name used to group related deployments: * Service name for App Engine Flex / Standard. * Cluster and container name for GKE. * User-specified string for direct Compute Engine profiling (e.g. Java). * Job name for Dataflow. Validation regex: `^[a-z0-9]([-a-z0-9_.]{0,253}[a-z0-9])?$`. */
43
+ target?: string;
44
+ }
45
+ interface Profile {
46
+ /** Deployment this profile corresponds to. */
47
+ deployment?: Deployment;
48
+ /** Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled asynchronously). */
49
+ duration?: string;
50
+ /** Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for validation rules and limits. */
51
+ labels?: {[P in string]: string};
52
+ /** Output only. Opaque, server-assigned, unique ID for this profile. */
53
+ name?: string;
54
+ /** Input only. Profile bytes, as a gzip compressed serialized proto, the format is https://github.com/google/pprof/blob/master/proto/profile.proto. */
55
+ profileBytes?: string;
56
+ /** Type of profile. For offline mode, this must be specified when creating the profile. For online mode it is assigned and returned by the server. */
57
+ profileType?: string;
350
58
  }
59
+ interface ProfilesResource {
60
+ /** CreateProfile creates a new profile resource in the online mode. The server ensures that the new profiles are created at a constant rate per deployment, so the creation request may hang for some time until the next profile session is available. The request may fail with ABORTED error if the creation is not available within ~1m, the response will indicate the duration of the backoff the client should take before attempting creating a profile again. The backoff duration is returned in google.rpc.RetryInfo extension on the response status. To a gRPC client, the extension will be return as a binary-serialized proto in the trailing metadata item named "google.rpc.retryinfo-bin". */
61
+ create(request: {
62
+ /** V1 error format. */
63
+ '$.xgafv'?: string;
64
+ /** OAuth access token. */
65
+ access_token?: string;
66
+ /** Data format for response. */
67
+ alt?: string;
68
+ /** JSONP */
69
+ callback?: string;
70
+ /** Selector specifying which fields to include in a partial response. */
71
+ fields?: string;
72
+ /** 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. */
73
+ key?: string;
74
+ /** OAuth 2.0 token for the current user. */
75
+ oauth_token?: string;
76
+ /** Parent project to create the profile in. */
77
+ parent: string;
78
+ /** Returns response with indentations and line breaks. */
79
+ prettyPrint?: boolean;
80
+ /** 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. */
81
+ quotaUser?: string;
82
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
83
+ upload_protocol?: string;
84
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
85
+ uploadType?: string;
86
+ /** Request body */
87
+ resource: CreateProfileRequest;
88
+ }): Request<Profile>;
89
+ create(
90
+ request: {
91
+ /** V1 error format. */
92
+ '$.xgafv'?: string;
93
+ /** OAuth access token. */
94
+ access_token?: string;
95
+ /** Data format for response. */
96
+ alt?: string;
97
+ /** JSONP */
98
+ callback?: string;
99
+ /** Selector specifying which fields to include in a partial response. */
100
+ fields?: string;
101
+ /** 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. */
102
+ key?: string;
103
+ /** OAuth 2.0 token for the current user. */
104
+ oauth_token?: string;
105
+ /** Parent project to create the profile in. */
106
+ parent: string;
107
+ /** Returns response with indentations and line breaks. */
108
+ prettyPrint?: boolean;
109
+ /** 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. */
110
+ quotaUser?: string;
111
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
112
+ upload_protocol?: string;
113
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
114
+ uploadType?: string;
115
+ },
116
+ body: CreateProfileRequest
117
+ ): Request<Profile>;
118
+ /** CreateOfflineProfile creates a new profile resource in the offline mode. The client provides the profile to create along with the profile bytes, the server records it. */
119
+ createOffline(request: {
120
+ /** V1 error format. */
121
+ '$.xgafv'?: string;
122
+ /** OAuth access token. */
123
+ access_token?: string;
124
+ /** Data format for response. */
125
+ alt?: string;
126
+ /** JSONP */
127
+ callback?: string;
128
+ /** Selector specifying which fields to include in a partial response. */
129
+ fields?: string;
130
+ /** 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. */
131
+ key?: string;
132
+ /** OAuth 2.0 token for the current user. */
133
+ oauth_token?: string;
134
+ /** Parent project to create the profile in. */
135
+ parent: string;
136
+ /** Returns response with indentations and line breaks. */
137
+ prettyPrint?: boolean;
138
+ /** 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. */
139
+ quotaUser?: string;
140
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
141
+ upload_protocol?: string;
142
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
143
+ uploadType?: string;
144
+ /** Request body */
145
+ resource: Profile;
146
+ }): Request<Profile>;
147
+ createOffline(
148
+ request: {
149
+ /** V1 error format. */
150
+ '$.xgafv'?: string;
151
+ /** OAuth access token. */
152
+ access_token?: string;
153
+ /** Data format for response. */
154
+ alt?: string;
155
+ /** JSONP */
156
+ callback?: string;
157
+ /** Selector specifying which fields to include in a partial response. */
158
+ fields?: string;
159
+ /** 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. */
160
+ key?: string;
161
+ /** OAuth 2.0 token for the current user. */
162
+ oauth_token?: string;
163
+ /** Parent project to create the profile in. */
164
+ parent: string;
165
+ /** Returns response with indentations and line breaks. */
166
+ prettyPrint?: boolean;
167
+ /** 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. */
168
+ quotaUser?: string;
169
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
170
+ upload_protocol?: string;
171
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
172
+ uploadType?: string;
173
+ },
174
+ body: Profile
175
+ ): Request<Profile>;
176
+ /** UpdateProfile updates the profile bytes and labels on the profile resource created in the online mode. Updating the bytes for profiles created in the offline mode is currently not supported: the profile content must be provided at the time of the profile creation. */
177
+ patch(request: {
178
+ /** V1 error format. */
179
+ '$.xgafv'?: string;
180
+ /** OAuth access token. */
181
+ access_token?: string;
182
+ /** Data format for response. */
183
+ alt?: string;
184
+ /** JSONP */
185
+ callback?: string;
186
+ /** Selector specifying which fields to include in a partial response. */
187
+ fields?: string;
188
+ /** 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. */
189
+ key?: string;
190
+ /** Output only. Opaque, server-assigned, unique ID for this profile. */
191
+ name: string;
192
+ /** OAuth 2.0 token for the current user. */
193
+ oauth_token?: string;
194
+ /** Returns response with indentations and line breaks. */
195
+ prettyPrint?: boolean;
196
+ /** 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. */
197
+ quotaUser?: string;
198
+ /** Field mask used to specify the fields to be overwritten. Currently only profile_bytes and labels fields are supported by UpdateProfile, so only those fields can be specified in the mask. When no mask is provided, all fields are overwritten. */
199
+ updateMask?: string;
200
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
201
+ upload_protocol?: string;
202
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
203
+ uploadType?: string;
204
+ /** Request body */
205
+ resource: Profile;
206
+ }): Request<Profile>;
207
+ patch(
208
+ request: {
209
+ /** V1 error format. */
210
+ '$.xgafv'?: string;
211
+ /** OAuth access token. */
212
+ access_token?: string;
213
+ /** Data format for response. */
214
+ alt?: string;
215
+ /** JSONP */
216
+ callback?: string;
217
+ /** Selector specifying which fields to include in a partial response. */
218
+ fields?: string;
219
+ /** 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. */
220
+ key?: string;
221
+ /** Output only. Opaque, server-assigned, unique ID for this profile. */
222
+ name: string;
223
+ /** OAuth 2.0 token for the current user. */
224
+ oauth_token?: string;
225
+ /** Returns response with indentations and line breaks. */
226
+ prettyPrint?: boolean;
227
+ /** 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. */
228
+ quotaUser?: string;
229
+ /** Field mask used to specify the fields to be overwritten. Currently only profile_bytes and labels fields are supported by UpdateProfile, so only those fields can be specified in the mask. When no mask is provided, all fields are overwritten. */
230
+ updateMask?: string;
231
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
232
+ upload_protocol?: string;
233
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
234
+ uploadType?: string;
235
+ },
236
+ body: Profile
237
+ ): Request<Profile>;
238
+ }
239
+ interface ProjectsResource {
240
+ profiles: ProfilesResource;
241
+ }
242
+
243
+ const projects: ProjectsResource;
244
+ }
351
245
  }
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.cloudprofiler-v2",
3
- "version": "0.0.20231106",
3
+ "version": "0.0.20231127",
4
4
  "description": "TypeScript typings for Cloud Profiler API v2",
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
@@ -25,10 +25,13 @@ gapi.load('client', () => {
25
25
  Then load api client wrapper:
26
26
 
27
27
  ```typescript
28
- gapi.client.load('https://cloudprofiler.googleapis.com/$discovery/rest?version=v2', () => {
29
- // now we can use:
30
- // gapi.client.cloudprofiler
31
- });
28
+ gapi.client.load(
29
+ 'https://cloudprofiler.googleapis.com/$discovery/rest?version=v2',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.cloudprofiler
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
- // View and write monitoring data for all of your Google and third-party Cloud and API projects
52
- 'https://www.googleapis.com/auth/monitoring',
54
+ // View and write monitoring data for all of your Google and third-party Cloud and API projects
55
+ 'https://www.googleapis.com/auth/monitoring',
53
56
 
54
- // Publish metric data to your Google Cloud projects
55
- 'https://www.googleapis.com/auth/monitoring.write',
56
- ],
57
- immediate = true;
57
+ // Publish metric data to your Google Cloud projects
58
+ 'https://www.googleapis.com/auth/monitoring.write',
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 Profiler API resources: <!-- TODO: make this work for multiple namespaces -->
72
76
 
73
77
  ```typescript
78
+
74
79
  ```
package/tests.ts DELETED
@@ -1,99 +0,0 @@
1
- /* This is stub file for gapi.client.cloudprofiler-v2 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: 20231106
7
-
8
- gapi.load('client', async () => {
9
- /** now we can use gapi.client */
10
-
11
- await gapi.client.load('https://cloudprofiler.googleapis.com/$discovery/rest?version=v2');
12
- /** now we can use gapi.client.cloudprofiler */
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
- /** View and write monitoring data for all of your Google and third-party Cloud and API projects */
21
- 'https://www.googleapis.com/auth/monitoring',
22
- /** Publish metric data to your Google Cloud projects */
23
- 'https://www.googleapis.com/auth/monitoring.write',
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
- * CreateProfile creates a new profile resource in the online mode. The server ensures that the new profiles are created at a constant rate per deployment, so the creation request may hang
38
- * for some time until the next profile session is available. The request may fail with ABORTED error if the creation is not available within ~1m, the response will indicate the duration
39
- * of the backoff the client should take before attempting creating a profile again. The backoff duration is returned in google.rpc.RetryInfo extension on the response status. To a gRPC
40
- * client, the extension will be return as a binary-serialized proto in the trailing metadata item named "google.rpc.retryinfo-bin".
41
- */
42
- await gapi.client.cloudprofiler.projects.profiles.create({
43
- parent: "Test string",
44
- }, {
45
- deployment: {
46
- labels: {
47
- A: "Test string"
48
- },
49
- projectId: "Test string",
50
- target: "Test string",
51
- },
52
- profileType: [
53
- "Test string"
54
- ],
55
- });
56
- /** CreateOfflineProfile creates a new profile resource in the offline mode. The client provides the profile to create along with the profile bytes, the server records it. */
57
- await gapi.client.cloudprofiler.projects.profiles.createOffline({
58
- parent: "Test string",
59
- }, {
60
- deployment: {
61
- labels: {
62
- A: "Test string"
63
- },
64
- projectId: "Test string",
65
- target: "Test string",
66
- },
67
- duration: "Test string",
68
- labels: {
69
- A: "Test string"
70
- },
71
- name: "Test string",
72
- profileBytes: "Test string",
73
- profileType: "Test string",
74
- });
75
- /**
76
- * UpdateProfile updates the profile bytes and labels on the profile resource created in the online mode. Updating the bytes for profiles created in the offline mode is currently not
77
- * supported: the profile content must be provided at the time of the profile creation.
78
- */
79
- await gapi.client.cloudprofiler.projects.profiles.patch({
80
- name: "Test string",
81
- updateMask: "Test string",
82
- }, {
83
- deployment: {
84
- labels: {
85
- A: "Test string"
86
- },
87
- projectId: "Test string",
88
- target: "Test string",
89
- },
90
- duration: "Test string",
91
- labels: {
92
- A: "Test string"
93
- },
94
- name: "Test string",
95
- profileBytes: "Test string",
96
- profileType: "Test string",
97
- });
98
- }
99
- });
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
- }