@maxim_mazurok/gapi.client.language-v1 0.0.20231103 → 0.0.20231202
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 +619 -891
- package/package.json +6 -6
- package/readme.md +25 -22
- package/tests.ts +0 -132
- package/tsconfig.json +0 -18
- package/tslint.json +0 -6
package/index.d.ts
CHANGED
|
@@ -9,901 +9,629 @@
|
|
|
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://language.googleapis.com/$discovery/rest?version=v1
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20231202
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
16
16
|
declare namespace gapi.client {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
/** Load Cloud Natural Language API v1 */
|
|
18
|
+
function load(
|
|
19
|
+
urlOrObject: 'https://language.googleapis.com/$discovery/rest?version=v1'
|
|
20
|
+
): Promise<void>;
|
|
21
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
22
|
+
function load(name: 'language', version: 'v1'): Promise<void>;
|
|
23
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
24
|
+
function load(name: 'language', version: 'v1', callback: () => any): void;
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for
|
|
130
|
-
* more details.
|
|
131
|
-
*/
|
|
132
|
-
language?:
|
|
133
|
-
string;
|
|
134
|
-
/** Harmful and sensitive categories identified in the input document. */
|
|
135
|
-
moderationCategories?:
|
|
136
|
-
ClassificationCategory[];
|
|
137
|
-
/** Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax. */
|
|
138
|
-
sentences?:
|
|
139
|
-
Sentence[];
|
|
140
|
-
/** Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax. */
|
|
141
|
-
tokens?:
|
|
142
|
-
Token[];
|
|
143
|
-
}
|
|
144
|
-
interface ClassificationCategory {
|
|
145
|
-
/** The classifier's confidence of the category. Number represents how certain the classifier is that this category represents the given text. */
|
|
146
|
-
confidence?:
|
|
147
|
-
number;
|
|
148
|
-
/** The name of the category representing the document. */
|
|
149
|
-
name?:
|
|
150
|
-
string;
|
|
151
|
-
}
|
|
152
|
-
interface ClassificationModelOptions {
|
|
153
|
-
/** Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future. */
|
|
154
|
-
v1Model?:
|
|
155
|
-
any;
|
|
156
|
-
/** Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model. */
|
|
157
|
-
v2Model?:
|
|
158
|
-
V2Model;
|
|
159
|
-
}
|
|
160
|
-
interface ClassifyTextRequest {
|
|
161
|
-
/** Model options to use for classification. Defaults to v1 options if not specified. */
|
|
162
|
-
classificationModelOptions?:
|
|
163
|
-
ClassificationModelOptions;
|
|
164
|
-
/** Required. Input document. */
|
|
165
|
-
document?:
|
|
166
|
-
Document;
|
|
167
|
-
}
|
|
168
|
-
interface ClassifyTextResponse {
|
|
169
|
-
/** Categories representing the input document. */
|
|
170
|
-
categories?:
|
|
171
|
-
ClassificationCategory[];
|
|
172
|
-
}
|
|
173
|
-
interface DependencyEdge {
|
|
174
|
-
/**
|
|
175
|
-
* Represents the head of this token in the dependency tree. This is the index of the token which has an arc going to this token. The index is the position of the token in the array of
|
|
176
|
-
* tokens returned by the API method. If this token is a root token, then the `head_token_index` is its own index.
|
|
177
|
-
*/
|
|
178
|
-
headTokenIndex?:
|
|
179
|
-
number;
|
|
180
|
-
/** The parse label for the token. */
|
|
181
|
-
label?:
|
|
182
|
-
string;
|
|
183
|
-
}
|
|
184
|
-
interface Document {
|
|
185
|
-
/** The content of the input in string format. Cloud audit logging exempt since it is based on user data. */
|
|
186
|
-
content?:
|
|
187
|
-
string;
|
|
188
|
-
/**
|
|
189
|
-
* The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see
|
|
190
|
-
* https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported.
|
|
191
|
-
*/
|
|
192
|
-
gcsContentUri?:
|
|
193
|
-
string;
|
|
194
|
-
/**
|
|
195
|
-
* The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted. [Language
|
|
196
|
-
* Support](https://cloud.google.com/natural-language/docs/languages) lists currently supported languages for each API method. If the language (either specified by the caller or
|
|
197
|
-
* automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned.
|
|
198
|
-
*/
|
|
199
|
-
language?:
|
|
200
|
-
string;
|
|
201
|
-
/** Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error. */
|
|
202
|
-
type?:
|
|
203
|
-
string;
|
|
204
|
-
}
|
|
205
|
-
interface Entity {
|
|
206
|
-
/** The mentions of this entity in the input document. The API currently supports proper noun mentions. */
|
|
207
|
-
mentions?:
|
|
208
|
-
EntityMention[];
|
|
209
|
-
/**
|
|
210
|
-
* Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the
|
|
211
|
-
* metadata associated with other entity types, see the Type table below.
|
|
212
|
-
*/
|
|
213
|
-
metadata?:
|
|
214
|
-
{ [P in string]: string };
|
|
215
|
-
/** The representative name for the entity. */
|
|
216
|
-
name?:
|
|
217
|
-
string;
|
|
218
|
-
/**
|
|
219
|
-
* The salience score associated with the entity in the [0, 1.0] range. The salience score for an entity provides information about the importance or centrality of that entity to the
|
|
220
|
-
* entire document text. Scores closer to 0 are less salient, while scores closer to 1.0 are highly salient.
|
|
221
|
-
*/
|
|
222
|
-
salience?:
|
|
223
|
-
number;
|
|
224
|
-
/**
|
|
225
|
-
* For calls to AnalyzeEntitySentiment or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the aggregate sentiment expressed for this
|
|
226
|
-
* entity in the provided document.
|
|
227
|
-
*/
|
|
228
|
-
sentiment?:
|
|
229
|
-
Sentiment;
|
|
230
|
-
/** The entity type. */
|
|
231
|
-
type?:
|
|
232
|
-
string;
|
|
233
|
-
}
|
|
234
|
-
interface EntityMention {
|
|
235
|
-
/**
|
|
236
|
-
* For calls to AnalyzeEntitySentiment or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the sentiment expressed for this mention of
|
|
237
|
-
* the entity in the provided document.
|
|
238
|
-
*/
|
|
239
|
-
sentiment?:
|
|
240
|
-
Sentiment;
|
|
241
|
-
/** The mention text. */
|
|
242
|
-
text?:
|
|
243
|
-
TextSpan;
|
|
244
|
-
/** The type of the entity mention. */
|
|
245
|
-
type?:
|
|
246
|
-
string;
|
|
247
|
-
}
|
|
248
|
-
interface Features {
|
|
249
|
-
/** The model options to use for classification. Defaults to v1 options if not specified. Only used if `classify_text` is set to true. */
|
|
250
|
-
classificationModelOptions?:
|
|
251
|
-
ClassificationModelOptions;
|
|
252
|
-
/** Classify the full document into categories. */
|
|
253
|
-
classifyText?:
|
|
254
|
-
boolean;
|
|
255
|
-
/** Extract document-level sentiment. */
|
|
256
|
-
extractDocumentSentiment?:
|
|
257
|
-
boolean;
|
|
258
|
-
/** Extract entities. */
|
|
259
|
-
extractEntities?:
|
|
260
|
-
boolean;
|
|
261
|
-
/** Extract entities and their associated sentiment. */
|
|
262
|
-
extractEntitySentiment?:
|
|
263
|
-
boolean;
|
|
264
|
-
/** Extract syntax information. */
|
|
265
|
-
extractSyntax?:
|
|
266
|
-
boolean;
|
|
267
|
-
/** Moderate the document for harmful and sensitive categories. */
|
|
268
|
-
moderateText?:
|
|
269
|
-
boolean;
|
|
270
|
-
}
|
|
271
|
-
interface ModerateTextRequest {
|
|
272
|
-
/** Required. Input document. */
|
|
273
|
-
document?:
|
|
274
|
-
Document;
|
|
275
|
-
}
|
|
276
|
-
interface ModerateTextResponse {
|
|
277
|
-
/** Harmful and sensitive categories representing the input document. */
|
|
278
|
-
moderationCategories?:
|
|
279
|
-
ClassificationCategory[];
|
|
280
|
-
}
|
|
281
|
-
interface PartOfSpeech {
|
|
282
|
-
/** The grammatical aspect. */
|
|
283
|
-
aspect?:
|
|
284
|
-
string;
|
|
285
|
-
/** The grammatical case. */
|
|
286
|
-
case?:
|
|
287
|
-
string;
|
|
288
|
-
/** The grammatical form. */
|
|
289
|
-
form?:
|
|
290
|
-
string;
|
|
291
|
-
/** The grammatical gender. */
|
|
292
|
-
gender?:
|
|
293
|
-
string;
|
|
294
|
-
/** The grammatical mood. */
|
|
295
|
-
mood?:
|
|
296
|
-
string;
|
|
297
|
-
/** The grammatical number. */
|
|
298
|
-
number?:
|
|
299
|
-
string;
|
|
300
|
-
/** The grammatical person. */
|
|
301
|
-
person?:
|
|
302
|
-
string;
|
|
303
|
-
/** The grammatical properness. */
|
|
304
|
-
proper?:
|
|
305
|
-
string;
|
|
306
|
-
/** The grammatical reciprocity. */
|
|
307
|
-
reciprocity?:
|
|
308
|
-
string;
|
|
309
|
-
/** The part of speech tag. */
|
|
310
|
-
tag?:
|
|
311
|
-
string;
|
|
312
|
-
/** The grammatical tense. */
|
|
313
|
-
tense?:
|
|
314
|
-
string;
|
|
315
|
-
/** The grammatical voice. */
|
|
316
|
-
voice?:
|
|
317
|
-
string;
|
|
318
|
-
}
|
|
319
|
-
interface Sentence {
|
|
320
|
-
/** For calls to AnalyzeSentiment or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence. */
|
|
321
|
-
sentiment?:
|
|
322
|
-
Sentiment;
|
|
323
|
-
/** The sentence text. */
|
|
324
|
-
text?:
|
|
325
|
-
TextSpan;
|
|
326
|
-
}
|
|
327
|
-
interface Sentiment {
|
|
328
|
-
/** A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). */
|
|
329
|
-
magnitude?:
|
|
330
|
-
number;
|
|
331
|
-
/** Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). */
|
|
332
|
-
score?:
|
|
333
|
-
number;
|
|
334
|
-
}
|
|
335
|
-
interface Status {
|
|
336
|
-
/** The status code, which should be an enum value of google.rpc.Code. */
|
|
337
|
-
code?:
|
|
338
|
-
number;
|
|
339
|
-
/** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
|
|
340
|
-
details?:
|
|
341
|
-
Array<{ [P in string]: any }>;
|
|
342
|
-
/**
|
|
343
|
-
* A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the
|
|
344
|
-
* client.
|
|
345
|
-
*/
|
|
346
|
-
message?:
|
|
347
|
-
string;
|
|
348
|
-
}
|
|
349
|
-
interface TextSpan {
|
|
350
|
-
/** The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request. */
|
|
351
|
-
beginOffset?:
|
|
352
|
-
number;
|
|
353
|
-
/** The content of the text span, which is a substring of the document. */
|
|
354
|
-
content?:
|
|
355
|
-
string;
|
|
356
|
-
}
|
|
357
|
-
interface Token {
|
|
358
|
-
/** Dependency tree parse for this token. */
|
|
359
|
-
dependencyEdge?:
|
|
360
|
-
DependencyEdge;
|
|
361
|
-
/** [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. */
|
|
362
|
-
lemma?:
|
|
363
|
-
string;
|
|
364
|
-
/** Parts of speech tag for this token. */
|
|
365
|
-
partOfSpeech?:
|
|
366
|
-
PartOfSpeech;
|
|
367
|
-
/** The token text. */
|
|
368
|
-
text?:
|
|
369
|
-
TextSpan;
|
|
370
|
-
}
|
|
371
|
-
// tslint:disable-next-line:no-empty-interface
|
|
372
|
-
interface V1Model {
|
|
373
|
-
}
|
|
374
|
-
interface V2Model {
|
|
375
|
-
/** The content categories used for classification. */
|
|
376
|
-
contentCategoriesVersion?:
|
|
377
|
-
string;
|
|
378
|
-
}
|
|
379
|
-
interface DocumentsResource {
|
|
380
|
-
/** Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties. */
|
|
381
|
-
analyzeEntities(request: {
|
|
382
|
-
/** V1 error format. */
|
|
383
|
-
"$.xgafv"?:
|
|
384
|
-
string;
|
|
385
|
-
/** OAuth access token. */
|
|
386
|
-
access_token?:
|
|
387
|
-
string;
|
|
388
|
-
/** Data format for response. */
|
|
389
|
-
alt?:
|
|
390
|
-
string;
|
|
391
|
-
/** JSONP */
|
|
392
|
-
callback?:
|
|
393
|
-
string;
|
|
394
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
395
|
-
fields?:
|
|
396
|
-
string;
|
|
397
|
-
/** 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. */
|
|
398
|
-
key?:
|
|
399
|
-
string;
|
|
400
|
-
/** OAuth 2.0 token for the current user. */
|
|
401
|
-
oauth_token?:
|
|
402
|
-
string;
|
|
403
|
-
/** Returns response with indentations and line breaks. */
|
|
404
|
-
prettyPrint?:
|
|
405
|
-
boolean;
|
|
406
|
-
/** 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. */
|
|
407
|
-
quotaUser?:
|
|
408
|
-
string;
|
|
409
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
410
|
-
upload_protocol?:
|
|
411
|
-
string;
|
|
412
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
413
|
-
uploadType?:
|
|
414
|
-
string;
|
|
415
|
-
/** Request body */
|
|
416
|
-
resource:
|
|
417
|
-
AnalyzeEntitiesRequest;
|
|
418
|
-
}): Request<AnalyzeEntitiesResponse>;
|
|
419
|
-
analyzeEntities(request: {
|
|
420
|
-
/** V1 error format. */
|
|
421
|
-
"$.xgafv"?:
|
|
422
|
-
string;
|
|
423
|
-
/** OAuth access token. */
|
|
424
|
-
access_token?:
|
|
425
|
-
string;
|
|
426
|
-
/** Data format for response. */
|
|
427
|
-
alt?:
|
|
428
|
-
string;
|
|
429
|
-
/** JSONP */
|
|
430
|
-
callback?:
|
|
431
|
-
string;
|
|
432
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
433
|
-
fields?:
|
|
434
|
-
string;
|
|
435
|
-
/** 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. */
|
|
436
|
-
key?:
|
|
437
|
-
string;
|
|
438
|
-
/** OAuth 2.0 token for the current user. */
|
|
439
|
-
oauth_token?:
|
|
440
|
-
string;
|
|
441
|
-
/** Returns response with indentations and line breaks. */
|
|
442
|
-
prettyPrint?:
|
|
443
|
-
boolean;
|
|
444
|
-
/** 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. */
|
|
445
|
-
quotaUser?:
|
|
446
|
-
string;
|
|
447
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
448
|
-
upload_protocol?:
|
|
449
|
-
string;
|
|
450
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
451
|
-
uploadType?:
|
|
452
|
-
string;
|
|
453
|
-
},
|
|
454
|
-
body: AnalyzeEntitiesRequest): Request<AnalyzeEntitiesResponse>;
|
|
455
|
-
/** Finds entities, similar to AnalyzeEntities in the text and analyzes sentiment associated with each entity and its mentions. */
|
|
456
|
-
analyzeEntitySentiment(request: {
|
|
457
|
-
/** V1 error format. */
|
|
458
|
-
"$.xgafv"?:
|
|
459
|
-
string;
|
|
460
|
-
/** OAuth access token. */
|
|
461
|
-
access_token?:
|
|
462
|
-
string;
|
|
463
|
-
/** Data format for response. */
|
|
464
|
-
alt?:
|
|
465
|
-
string;
|
|
466
|
-
/** JSONP */
|
|
467
|
-
callback?:
|
|
468
|
-
string;
|
|
469
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
470
|
-
fields?:
|
|
471
|
-
string;
|
|
472
|
-
/** 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. */
|
|
473
|
-
key?:
|
|
474
|
-
string;
|
|
475
|
-
/** OAuth 2.0 token for the current user. */
|
|
476
|
-
oauth_token?:
|
|
477
|
-
string;
|
|
478
|
-
/** Returns response with indentations and line breaks. */
|
|
479
|
-
prettyPrint?:
|
|
480
|
-
boolean;
|
|
481
|
-
/** 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. */
|
|
482
|
-
quotaUser?:
|
|
483
|
-
string;
|
|
484
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
485
|
-
upload_protocol?:
|
|
486
|
-
string;
|
|
487
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
488
|
-
uploadType?:
|
|
489
|
-
string;
|
|
490
|
-
/** Request body */
|
|
491
|
-
resource:
|
|
492
|
-
AnalyzeEntitySentimentRequest;
|
|
493
|
-
}): Request<AnalyzeEntitySentimentResponse>;
|
|
494
|
-
analyzeEntitySentiment(request: {
|
|
495
|
-
/** V1 error format. */
|
|
496
|
-
"$.xgafv"?:
|
|
497
|
-
string;
|
|
498
|
-
/** OAuth access token. */
|
|
499
|
-
access_token?:
|
|
500
|
-
string;
|
|
501
|
-
/** Data format for response. */
|
|
502
|
-
alt?:
|
|
503
|
-
string;
|
|
504
|
-
/** JSONP */
|
|
505
|
-
callback?:
|
|
506
|
-
string;
|
|
507
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
508
|
-
fields?:
|
|
509
|
-
string;
|
|
510
|
-
/** 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. */
|
|
511
|
-
key?:
|
|
512
|
-
string;
|
|
513
|
-
/** OAuth 2.0 token for the current user. */
|
|
514
|
-
oauth_token?:
|
|
515
|
-
string;
|
|
516
|
-
/** Returns response with indentations and line breaks. */
|
|
517
|
-
prettyPrint?:
|
|
518
|
-
boolean;
|
|
519
|
-
/** 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. */
|
|
520
|
-
quotaUser?:
|
|
521
|
-
string;
|
|
522
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
523
|
-
upload_protocol?:
|
|
524
|
-
string;
|
|
525
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
526
|
-
uploadType?:
|
|
527
|
-
string;
|
|
528
|
-
},
|
|
529
|
-
body: AnalyzeEntitySentimentRequest): Request<AnalyzeEntitySentimentResponse>;
|
|
530
|
-
/** Analyzes the sentiment of the provided text. */
|
|
531
|
-
analyzeSentiment(request: {
|
|
532
|
-
/** V1 error format. */
|
|
533
|
-
"$.xgafv"?:
|
|
534
|
-
string;
|
|
535
|
-
/** OAuth access token. */
|
|
536
|
-
access_token?:
|
|
537
|
-
string;
|
|
538
|
-
/** Data format for response. */
|
|
539
|
-
alt?:
|
|
540
|
-
string;
|
|
541
|
-
/** JSONP */
|
|
542
|
-
callback?:
|
|
543
|
-
string;
|
|
544
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
545
|
-
fields?:
|
|
546
|
-
string;
|
|
547
|
-
/** 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. */
|
|
548
|
-
key?:
|
|
549
|
-
string;
|
|
550
|
-
/** OAuth 2.0 token for the current user. */
|
|
551
|
-
oauth_token?:
|
|
552
|
-
string;
|
|
553
|
-
/** Returns response with indentations and line breaks. */
|
|
554
|
-
prettyPrint?:
|
|
555
|
-
boolean;
|
|
556
|
-
/** 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. */
|
|
557
|
-
quotaUser?:
|
|
558
|
-
string;
|
|
559
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
560
|
-
upload_protocol?:
|
|
561
|
-
string;
|
|
562
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
563
|
-
uploadType?:
|
|
564
|
-
string;
|
|
565
|
-
/** Request body */
|
|
566
|
-
resource:
|
|
567
|
-
AnalyzeSentimentRequest;
|
|
568
|
-
}): Request<AnalyzeSentimentResponse>;
|
|
569
|
-
analyzeSentiment(request: {
|
|
570
|
-
/** V1 error format. */
|
|
571
|
-
"$.xgafv"?:
|
|
572
|
-
string;
|
|
573
|
-
/** OAuth access token. */
|
|
574
|
-
access_token?:
|
|
575
|
-
string;
|
|
576
|
-
/** Data format for response. */
|
|
577
|
-
alt?:
|
|
578
|
-
string;
|
|
579
|
-
/** JSONP */
|
|
580
|
-
callback?:
|
|
581
|
-
string;
|
|
582
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
583
|
-
fields?:
|
|
584
|
-
string;
|
|
585
|
-
/** 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. */
|
|
586
|
-
key?:
|
|
587
|
-
string;
|
|
588
|
-
/** OAuth 2.0 token for the current user. */
|
|
589
|
-
oauth_token?:
|
|
590
|
-
string;
|
|
591
|
-
/** Returns response with indentations and line breaks. */
|
|
592
|
-
prettyPrint?:
|
|
593
|
-
boolean;
|
|
594
|
-
/** 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. */
|
|
595
|
-
quotaUser?:
|
|
596
|
-
string;
|
|
597
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
598
|
-
upload_protocol?:
|
|
599
|
-
string;
|
|
600
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
601
|
-
uploadType?:
|
|
602
|
-
string;
|
|
603
|
-
},
|
|
604
|
-
body: AnalyzeSentimentRequest): Request<AnalyzeSentimentResponse>;
|
|
605
|
-
/** Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties. */
|
|
606
|
-
analyzeSyntax(request: {
|
|
607
|
-
/** V1 error format. */
|
|
608
|
-
"$.xgafv"?:
|
|
609
|
-
string;
|
|
610
|
-
/** OAuth access token. */
|
|
611
|
-
access_token?:
|
|
612
|
-
string;
|
|
613
|
-
/** Data format for response. */
|
|
614
|
-
alt?:
|
|
615
|
-
string;
|
|
616
|
-
/** JSONP */
|
|
617
|
-
callback?:
|
|
618
|
-
string;
|
|
619
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
620
|
-
fields?:
|
|
621
|
-
string;
|
|
622
|
-
/** 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. */
|
|
623
|
-
key?:
|
|
624
|
-
string;
|
|
625
|
-
/** OAuth 2.0 token for the current user. */
|
|
626
|
-
oauth_token?:
|
|
627
|
-
string;
|
|
628
|
-
/** Returns response with indentations and line breaks. */
|
|
629
|
-
prettyPrint?:
|
|
630
|
-
boolean;
|
|
631
|
-
/** 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. */
|
|
632
|
-
quotaUser?:
|
|
633
|
-
string;
|
|
634
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
635
|
-
upload_protocol?:
|
|
636
|
-
string;
|
|
637
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
638
|
-
uploadType?:
|
|
639
|
-
string;
|
|
640
|
-
/** Request body */
|
|
641
|
-
resource:
|
|
642
|
-
AnalyzeSyntaxRequest;
|
|
643
|
-
}): Request<AnalyzeSyntaxResponse>;
|
|
644
|
-
analyzeSyntax(request: {
|
|
645
|
-
/** V1 error format. */
|
|
646
|
-
"$.xgafv"?:
|
|
647
|
-
string;
|
|
648
|
-
/** OAuth access token. */
|
|
649
|
-
access_token?:
|
|
650
|
-
string;
|
|
651
|
-
/** Data format for response. */
|
|
652
|
-
alt?:
|
|
653
|
-
string;
|
|
654
|
-
/** JSONP */
|
|
655
|
-
callback?:
|
|
656
|
-
string;
|
|
657
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
658
|
-
fields?:
|
|
659
|
-
string;
|
|
660
|
-
/** 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. */
|
|
661
|
-
key?:
|
|
662
|
-
string;
|
|
663
|
-
/** OAuth 2.0 token for the current user. */
|
|
664
|
-
oauth_token?:
|
|
665
|
-
string;
|
|
666
|
-
/** Returns response with indentations and line breaks. */
|
|
667
|
-
prettyPrint?:
|
|
668
|
-
boolean;
|
|
669
|
-
/** 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. */
|
|
670
|
-
quotaUser?:
|
|
671
|
-
string;
|
|
672
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
673
|
-
upload_protocol?:
|
|
674
|
-
string;
|
|
675
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
676
|
-
uploadType?:
|
|
677
|
-
string;
|
|
678
|
-
},
|
|
679
|
-
body: AnalyzeSyntaxRequest): Request<AnalyzeSyntaxResponse>;
|
|
680
|
-
/** A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call. */
|
|
681
|
-
annotateText(request: {
|
|
682
|
-
/** V1 error format. */
|
|
683
|
-
"$.xgafv"?:
|
|
684
|
-
string;
|
|
685
|
-
/** OAuth access token. */
|
|
686
|
-
access_token?:
|
|
687
|
-
string;
|
|
688
|
-
/** Data format for response. */
|
|
689
|
-
alt?:
|
|
690
|
-
string;
|
|
691
|
-
/** JSONP */
|
|
692
|
-
callback?:
|
|
693
|
-
string;
|
|
694
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
695
|
-
fields?:
|
|
696
|
-
string;
|
|
697
|
-
/** 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. */
|
|
698
|
-
key?:
|
|
699
|
-
string;
|
|
700
|
-
/** OAuth 2.0 token for the current user. */
|
|
701
|
-
oauth_token?:
|
|
702
|
-
string;
|
|
703
|
-
/** Returns response with indentations and line breaks. */
|
|
704
|
-
prettyPrint?:
|
|
705
|
-
boolean;
|
|
706
|
-
/** 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. */
|
|
707
|
-
quotaUser?:
|
|
708
|
-
string;
|
|
709
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
710
|
-
upload_protocol?:
|
|
711
|
-
string;
|
|
712
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
713
|
-
uploadType?:
|
|
714
|
-
string;
|
|
715
|
-
/** Request body */
|
|
716
|
-
resource:
|
|
717
|
-
AnnotateTextRequest;
|
|
718
|
-
}): Request<AnnotateTextResponse>;
|
|
719
|
-
annotateText(request: {
|
|
720
|
-
/** V1 error format. */
|
|
721
|
-
"$.xgafv"?:
|
|
722
|
-
string;
|
|
723
|
-
/** OAuth access token. */
|
|
724
|
-
access_token?:
|
|
725
|
-
string;
|
|
726
|
-
/** Data format for response. */
|
|
727
|
-
alt?:
|
|
728
|
-
string;
|
|
729
|
-
/** JSONP */
|
|
730
|
-
callback?:
|
|
731
|
-
string;
|
|
732
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
733
|
-
fields?:
|
|
734
|
-
string;
|
|
735
|
-
/** 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. */
|
|
736
|
-
key?:
|
|
737
|
-
string;
|
|
738
|
-
/** OAuth 2.0 token for the current user. */
|
|
739
|
-
oauth_token?:
|
|
740
|
-
string;
|
|
741
|
-
/** Returns response with indentations and line breaks. */
|
|
742
|
-
prettyPrint?:
|
|
743
|
-
boolean;
|
|
744
|
-
/** 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. */
|
|
745
|
-
quotaUser?:
|
|
746
|
-
string;
|
|
747
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
748
|
-
upload_protocol?:
|
|
749
|
-
string;
|
|
750
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
751
|
-
uploadType?:
|
|
752
|
-
string;
|
|
753
|
-
},
|
|
754
|
-
body: AnnotateTextRequest): Request<AnnotateTextResponse>;
|
|
755
|
-
/** Classifies a document into categories. */
|
|
756
|
-
classifyText(request: {
|
|
757
|
-
/** V1 error format. */
|
|
758
|
-
"$.xgafv"?:
|
|
759
|
-
string;
|
|
760
|
-
/** OAuth access token. */
|
|
761
|
-
access_token?:
|
|
762
|
-
string;
|
|
763
|
-
/** Data format for response. */
|
|
764
|
-
alt?:
|
|
765
|
-
string;
|
|
766
|
-
/** JSONP */
|
|
767
|
-
callback?:
|
|
768
|
-
string;
|
|
769
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
770
|
-
fields?:
|
|
771
|
-
string;
|
|
772
|
-
/** 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. */
|
|
773
|
-
key?:
|
|
774
|
-
string;
|
|
775
|
-
/** OAuth 2.0 token for the current user. */
|
|
776
|
-
oauth_token?:
|
|
777
|
-
string;
|
|
778
|
-
/** Returns response with indentations and line breaks. */
|
|
779
|
-
prettyPrint?:
|
|
780
|
-
boolean;
|
|
781
|
-
/** 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. */
|
|
782
|
-
quotaUser?:
|
|
783
|
-
string;
|
|
784
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
785
|
-
upload_protocol?:
|
|
786
|
-
string;
|
|
787
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
788
|
-
uploadType?:
|
|
789
|
-
string;
|
|
790
|
-
/** Request body */
|
|
791
|
-
resource:
|
|
792
|
-
ClassifyTextRequest;
|
|
793
|
-
}): Request<ClassifyTextResponse>;
|
|
794
|
-
classifyText(request: {
|
|
795
|
-
/** V1 error format. */
|
|
796
|
-
"$.xgafv"?:
|
|
797
|
-
string;
|
|
798
|
-
/** OAuth access token. */
|
|
799
|
-
access_token?:
|
|
800
|
-
string;
|
|
801
|
-
/** Data format for response. */
|
|
802
|
-
alt?:
|
|
803
|
-
string;
|
|
804
|
-
/** JSONP */
|
|
805
|
-
callback?:
|
|
806
|
-
string;
|
|
807
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
808
|
-
fields?:
|
|
809
|
-
string;
|
|
810
|
-
/** 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. */
|
|
811
|
-
key?:
|
|
812
|
-
string;
|
|
813
|
-
/** OAuth 2.0 token for the current user. */
|
|
814
|
-
oauth_token?:
|
|
815
|
-
string;
|
|
816
|
-
/** Returns response with indentations and line breaks. */
|
|
817
|
-
prettyPrint?:
|
|
818
|
-
boolean;
|
|
819
|
-
/** 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. */
|
|
820
|
-
quotaUser?:
|
|
821
|
-
string;
|
|
822
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
823
|
-
upload_protocol?:
|
|
824
|
-
string;
|
|
825
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
826
|
-
uploadType?:
|
|
827
|
-
string;
|
|
828
|
-
},
|
|
829
|
-
body: ClassifyTextRequest): Request<ClassifyTextResponse>;
|
|
830
|
-
/** Moderates a document for harmful and sensitive categories. */
|
|
831
|
-
moderateText(request: {
|
|
832
|
-
/** V1 error format. */
|
|
833
|
-
"$.xgafv"?:
|
|
834
|
-
string;
|
|
835
|
-
/** OAuth access token. */
|
|
836
|
-
access_token?:
|
|
837
|
-
string;
|
|
838
|
-
/** Data format for response. */
|
|
839
|
-
alt?:
|
|
840
|
-
string;
|
|
841
|
-
/** JSONP */
|
|
842
|
-
callback?:
|
|
843
|
-
string;
|
|
844
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
845
|
-
fields?:
|
|
846
|
-
string;
|
|
847
|
-
/** 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. */
|
|
848
|
-
key?:
|
|
849
|
-
string;
|
|
850
|
-
/** OAuth 2.0 token for the current user. */
|
|
851
|
-
oauth_token?:
|
|
852
|
-
string;
|
|
853
|
-
/** Returns response with indentations and line breaks. */
|
|
854
|
-
prettyPrint?:
|
|
855
|
-
boolean;
|
|
856
|
-
/** 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. */
|
|
857
|
-
quotaUser?:
|
|
858
|
-
string;
|
|
859
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
860
|
-
upload_protocol?:
|
|
861
|
-
string;
|
|
862
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
863
|
-
uploadType?:
|
|
864
|
-
string;
|
|
865
|
-
/** Request body */
|
|
866
|
-
resource:
|
|
867
|
-
ModerateTextRequest;
|
|
868
|
-
}): Request<ModerateTextResponse>;
|
|
869
|
-
moderateText(request: {
|
|
870
|
-
/** V1 error format. */
|
|
871
|
-
"$.xgafv"?:
|
|
872
|
-
string;
|
|
873
|
-
/** OAuth access token. */
|
|
874
|
-
access_token?:
|
|
875
|
-
string;
|
|
876
|
-
/** Data format for response. */
|
|
877
|
-
alt?:
|
|
878
|
-
string;
|
|
879
|
-
/** JSONP */
|
|
880
|
-
callback?:
|
|
881
|
-
string;
|
|
882
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
883
|
-
fields?:
|
|
884
|
-
string;
|
|
885
|
-
/** 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. */
|
|
886
|
-
key?:
|
|
887
|
-
string;
|
|
888
|
-
/** OAuth 2.0 token for the current user. */
|
|
889
|
-
oauth_token?:
|
|
890
|
-
string;
|
|
891
|
-
/** Returns response with indentations and line breaks. */
|
|
892
|
-
prettyPrint?:
|
|
893
|
-
boolean;
|
|
894
|
-
/** 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. */
|
|
895
|
-
quotaUser?:
|
|
896
|
-
string;
|
|
897
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
898
|
-
upload_protocol?:
|
|
899
|
-
string;
|
|
900
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
901
|
-
uploadType?:
|
|
902
|
-
string;
|
|
903
|
-
},
|
|
904
|
-
body: ModerateTextRequest): Request<ModerateTextResponse>;
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
const documents: DocumentsResource;
|
|
26
|
+
namespace language {
|
|
27
|
+
interface AnalyzeEntitiesRequest {
|
|
28
|
+
/** Required. Input document. */
|
|
29
|
+
document?: Document;
|
|
30
|
+
/** The encoding type used by the API to calculate offsets. */
|
|
31
|
+
encodingType?: string;
|
|
32
|
+
}
|
|
33
|
+
interface AnalyzeEntitiesResponse {
|
|
34
|
+
/** The recognized entities in the input document. */
|
|
35
|
+
entities?: Entity[];
|
|
36
|
+
/** The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details. */
|
|
37
|
+
language?: string;
|
|
38
|
+
}
|
|
39
|
+
interface AnalyzeEntitySentimentRequest {
|
|
40
|
+
/** Required. Input document. */
|
|
41
|
+
document?: Document;
|
|
42
|
+
/** The encoding type used by the API to calculate offsets. */
|
|
43
|
+
encodingType?: string;
|
|
44
|
+
}
|
|
45
|
+
interface AnalyzeEntitySentimentResponse {
|
|
46
|
+
/** The recognized entities in the input document with associated sentiments. */
|
|
47
|
+
entities?: Entity[];
|
|
48
|
+
/** The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details. */
|
|
49
|
+
language?: string;
|
|
50
|
+
}
|
|
51
|
+
interface AnalyzeSentimentRequest {
|
|
52
|
+
/** Required. Input document. */
|
|
53
|
+
document?: Document;
|
|
54
|
+
/** The encoding type used by the API to calculate sentence offsets. */
|
|
55
|
+
encodingType?: string;
|
|
56
|
+
}
|
|
57
|
+
interface AnalyzeSentimentResponse {
|
|
58
|
+
/** The overall sentiment of the input document. */
|
|
59
|
+
documentSentiment?: Sentiment;
|
|
60
|
+
/** The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details. */
|
|
61
|
+
language?: string;
|
|
62
|
+
/** The sentiment for all the sentences in the document. */
|
|
63
|
+
sentences?: Sentence[];
|
|
64
|
+
}
|
|
65
|
+
interface AnalyzeSyntaxRequest {
|
|
66
|
+
/** Required. Input document. */
|
|
67
|
+
document?: Document;
|
|
68
|
+
/** The encoding type used by the API to calculate offsets. */
|
|
69
|
+
encodingType?: string;
|
|
70
|
+
}
|
|
71
|
+
interface AnalyzeSyntaxResponse {
|
|
72
|
+
/** The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details. */
|
|
73
|
+
language?: string;
|
|
74
|
+
/** Sentences in the input document. */
|
|
75
|
+
sentences?: Sentence[];
|
|
76
|
+
/** Tokens, along with their syntactic information, in the input document. */
|
|
77
|
+
tokens?: Token[];
|
|
78
|
+
}
|
|
79
|
+
interface AnnotateTextRequest {
|
|
80
|
+
/** Required. Input document. */
|
|
81
|
+
document?: Document;
|
|
82
|
+
/** The encoding type used by the API to calculate offsets. */
|
|
83
|
+
encodingType?: string;
|
|
84
|
+
/** Required. The enabled features. */
|
|
85
|
+
features?: Features;
|
|
86
|
+
}
|
|
87
|
+
interface AnnotateTextResponse {
|
|
88
|
+
/** Categories identified in the input document. */
|
|
89
|
+
categories?: ClassificationCategory[];
|
|
90
|
+
/** The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment. */
|
|
91
|
+
documentSentiment?: Sentiment;
|
|
92
|
+
/** Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities. */
|
|
93
|
+
entities?: Entity[];
|
|
94
|
+
/** The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details. */
|
|
95
|
+
language?: string;
|
|
96
|
+
/** Harmful and sensitive categories identified in the input document. */
|
|
97
|
+
moderationCategories?: ClassificationCategory[];
|
|
98
|
+
/** Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax. */
|
|
99
|
+
sentences?: Sentence[];
|
|
100
|
+
/** Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax. */
|
|
101
|
+
tokens?: Token[];
|
|
102
|
+
}
|
|
103
|
+
interface ClassificationCategory {
|
|
104
|
+
/** The classifier's confidence of the category. Number represents how certain the classifier is that this category represents the given text. */
|
|
105
|
+
confidence?: number;
|
|
106
|
+
/** The name of the category representing the document. */
|
|
107
|
+
name?: string;
|
|
108
|
+
}
|
|
109
|
+
interface ClassificationModelOptions {
|
|
110
|
+
/** Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future. */
|
|
111
|
+
v1Model?: any;
|
|
112
|
+
/** Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model. */
|
|
113
|
+
v2Model?: V2Model;
|
|
114
|
+
}
|
|
115
|
+
interface ClassifyTextRequest {
|
|
116
|
+
/** Model options to use for classification. Defaults to v1 options if not specified. */
|
|
117
|
+
classificationModelOptions?: ClassificationModelOptions;
|
|
118
|
+
/** Required. Input document. */
|
|
119
|
+
document?: Document;
|
|
120
|
+
}
|
|
121
|
+
interface ClassifyTextResponse {
|
|
122
|
+
/** Categories representing the input document. */
|
|
123
|
+
categories?: ClassificationCategory[];
|
|
124
|
+
}
|
|
125
|
+
interface DependencyEdge {
|
|
126
|
+
/** Represents the head of this token in the dependency tree. This is the index of the token which has an arc going to this token. The index is the position of the token in the array of tokens returned by the API method. If this token is a root token, then the `head_token_index` is its own index. */
|
|
127
|
+
headTokenIndex?: number;
|
|
128
|
+
/** The parse label for the token. */
|
|
129
|
+
label?: string;
|
|
908
130
|
}
|
|
131
|
+
interface Document {
|
|
132
|
+
/** The content of the input in string format. Cloud audit logging exempt since it is based on user data. */
|
|
133
|
+
content?: string;
|
|
134
|
+
/** The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported. */
|
|
135
|
+
gcsContentUri?: string;
|
|
136
|
+
/** The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted. [Language Support](https://cloud.google.com/natural-language/docs/languages) lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned. */
|
|
137
|
+
language?: string;
|
|
138
|
+
/** Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error. */
|
|
139
|
+
type?: string;
|
|
140
|
+
}
|
|
141
|
+
interface Entity {
|
|
142
|
+
/** The mentions of this entity in the input document. The API currently supports proper noun mentions. */
|
|
143
|
+
mentions?: EntityMention[];
|
|
144
|
+
/** Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below. */
|
|
145
|
+
metadata?: {[P in string]: string};
|
|
146
|
+
/** The representative name for the entity. */
|
|
147
|
+
name?: string;
|
|
148
|
+
/** The salience score associated with the entity in the [0, 1.0] range. The salience score for an entity provides information about the importance or centrality of that entity to the entire document text. Scores closer to 0 are less salient, while scores closer to 1.0 are highly salient. */
|
|
149
|
+
salience?: number;
|
|
150
|
+
/** For calls to AnalyzeEntitySentiment or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document. */
|
|
151
|
+
sentiment?: Sentiment;
|
|
152
|
+
/** The entity type. */
|
|
153
|
+
type?: string;
|
|
154
|
+
}
|
|
155
|
+
interface EntityMention {
|
|
156
|
+
/** For calls to AnalyzeEntitySentiment or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document. */
|
|
157
|
+
sentiment?: Sentiment;
|
|
158
|
+
/** The mention text. */
|
|
159
|
+
text?: TextSpan;
|
|
160
|
+
/** The type of the entity mention. */
|
|
161
|
+
type?: string;
|
|
162
|
+
}
|
|
163
|
+
interface Features {
|
|
164
|
+
/** The model options to use for classification. Defaults to v1 options if not specified. Only used if `classify_text` is set to true. */
|
|
165
|
+
classificationModelOptions?: ClassificationModelOptions;
|
|
166
|
+
/** Classify the full document into categories. */
|
|
167
|
+
classifyText?: boolean;
|
|
168
|
+
/** Extract document-level sentiment. */
|
|
169
|
+
extractDocumentSentiment?: boolean;
|
|
170
|
+
/** Extract entities. */
|
|
171
|
+
extractEntities?: boolean;
|
|
172
|
+
/** Extract entities and their associated sentiment. */
|
|
173
|
+
extractEntitySentiment?: boolean;
|
|
174
|
+
/** Extract syntax information. */
|
|
175
|
+
extractSyntax?: boolean;
|
|
176
|
+
/** Moderate the document for harmful and sensitive categories. */
|
|
177
|
+
moderateText?: boolean;
|
|
178
|
+
}
|
|
179
|
+
interface ModerateTextRequest {
|
|
180
|
+
/** Required. Input document. */
|
|
181
|
+
document?: Document;
|
|
182
|
+
}
|
|
183
|
+
interface ModerateTextResponse {
|
|
184
|
+
/** Harmful and sensitive categories representing the input document. */
|
|
185
|
+
moderationCategories?: ClassificationCategory[];
|
|
186
|
+
}
|
|
187
|
+
interface PartOfSpeech {
|
|
188
|
+
/** The grammatical aspect. */
|
|
189
|
+
aspect?: string;
|
|
190
|
+
/** The grammatical case. */
|
|
191
|
+
case?: string;
|
|
192
|
+
/** The grammatical form. */
|
|
193
|
+
form?: string;
|
|
194
|
+
/** The grammatical gender. */
|
|
195
|
+
gender?: string;
|
|
196
|
+
/** The grammatical mood. */
|
|
197
|
+
mood?: string;
|
|
198
|
+
/** The grammatical number. */
|
|
199
|
+
number?: string;
|
|
200
|
+
/** The grammatical person. */
|
|
201
|
+
person?: string;
|
|
202
|
+
/** The grammatical properness. */
|
|
203
|
+
proper?: string;
|
|
204
|
+
/** The grammatical reciprocity. */
|
|
205
|
+
reciprocity?: string;
|
|
206
|
+
/** The part of speech tag. */
|
|
207
|
+
tag?: string;
|
|
208
|
+
/** The grammatical tense. */
|
|
209
|
+
tense?: string;
|
|
210
|
+
/** The grammatical voice. */
|
|
211
|
+
voice?: string;
|
|
212
|
+
}
|
|
213
|
+
interface Sentence {
|
|
214
|
+
/** For calls to AnalyzeSentiment or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence. */
|
|
215
|
+
sentiment?: Sentiment;
|
|
216
|
+
/** The sentence text. */
|
|
217
|
+
text?: TextSpan;
|
|
218
|
+
}
|
|
219
|
+
interface Sentiment {
|
|
220
|
+
/** A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). */
|
|
221
|
+
magnitude?: number;
|
|
222
|
+
/** Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). */
|
|
223
|
+
score?: number;
|
|
224
|
+
}
|
|
225
|
+
interface Status {
|
|
226
|
+
/** The status code, which should be an enum value of google.rpc.Code. */
|
|
227
|
+
code?: number;
|
|
228
|
+
/** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
|
|
229
|
+
details?: Array<{[P in string]: any}>;
|
|
230
|
+
/** A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. */
|
|
231
|
+
message?: string;
|
|
232
|
+
}
|
|
233
|
+
interface TextSpan {
|
|
234
|
+
/** The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request. */
|
|
235
|
+
beginOffset?: number;
|
|
236
|
+
/** The content of the text span, which is a substring of the document. */
|
|
237
|
+
content?: string;
|
|
238
|
+
}
|
|
239
|
+
interface Token {
|
|
240
|
+
/** Dependency tree parse for this token. */
|
|
241
|
+
dependencyEdge?: DependencyEdge;
|
|
242
|
+
/** [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. */
|
|
243
|
+
lemma?: string;
|
|
244
|
+
/** Parts of speech tag for this token. */
|
|
245
|
+
partOfSpeech?: PartOfSpeech;
|
|
246
|
+
/** The token text. */
|
|
247
|
+
text?: TextSpan;
|
|
248
|
+
}
|
|
249
|
+
interface V1Model {}
|
|
250
|
+
interface V2Model {
|
|
251
|
+
/** The content categories used for classification. */
|
|
252
|
+
contentCategoriesVersion?: string;
|
|
253
|
+
}
|
|
254
|
+
interface DocumentsResource {
|
|
255
|
+
/** Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties. */
|
|
256
|
+
analyzeEntities(request: {
|
|
257
|
+
/** V1 error format. */
|
|
258
|
+
'$.xgafv'?: string;
|
|
259
|
+
/** OAuth access token. */
|
|
260
|
+
access_token?: string;
|
|
261
|
+
/** Data format for response. */
|
|
262
|
+
alt?: string;
|
|
263
|
+
/** JSONP */
|
|
264
|
+
callback?: string;
|
|
265
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
266
|
+
fields?: 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?: string;
|
|
269
|
+
/** OAuth 2.0 token for the current user. */
|
|
270
|
+
oauth_token?: string;
|
|
271
|
+
/** Returns response with indentations and line breaks. */
|
|
272
|
+
prettyPrint?: boolean;
|
|
273
|
+
/** 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. */
|
|
274
|
+
quotaUser?: string;
|
|
275
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
276
|
+
upload_protocol?: string;
|
|
277
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
278
|
+
uploadType?: string;
|
|
279
|
+
/** Request body */
|
|
280
|
+
resource: AnalyzeEntitiesRequest;
|
|
281
|
+
}): Request<AnalyzeEntitiesResponse>;
|
|
282
|
+
analyzeEntities(
|
|
283
|
+
request: {
|
|
284
|
+
/** V1 error format. */
|
|
285
|
+
'$.xgafv'?: string;
|
|
286
|
+
/** OAuth access token. */
|
|
287
|
+
access_token?: string;
|
|
288
|
+
/** Data format for response. */
|
|
289
|
+
alt?: string;
|
|
290
|
+
/** JSONP */
|
|
291
|
+
callback?: string;
|
|
292
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
293
|
+
fields?: string;
|
|
294
|
+
/** 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. */
|
|
295
|
+
key?: string;
|
|
296
|
+
/** OAuth 2.0 token for the current user. */
|
|
297
|
+
oauth_token?: string;
|
|
298
|
+
/** Returns response with indentations and line breaks. */
|
|
299
|
+
prettyPrint?: boolean;
|
|
300
|
+
/** 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. */
|
|
301
|
+
quotaUser?: string;
|
|
302
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
303
|
+
upload_protocol?: string;
|
|
304
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
305
|
+
uploadType?: string;
|
|
306
|
+
},
|
|
307
|
+
body: AnalyzeEntitiesRequest
|
|
308
|
+
): Request<AnalyzeEntitiesResponse>;
|
|
309
|
+
/** Finds entities, similar to AnalyzeEntities in the text and analyzes sentiment associated with each entity and its mentions. */
|
|
310
|
+
analyzeEntitySentiment(request: {
|
|
311
|
+
/** V1 error format. */
|
|
312
|
+
'$.xgafv'?: string;
|
|
313
|
+
/** OAuth access token. */
|
|
314
|
+
access_token?: string;
|
|
315
|
+
/** Data format for response. */
|
|
316
|
+
alt?: string;
|
|
317
|
+
/** JSONP */
|
|
318
|
+
callback?: string;
|
|
319
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
320
|
+
fields?: string;
|
|
321
|
+
/** 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. */
|
|
322
|
+
key?: string;
|
|
323
|
+
/** OAuth 2.0 token for the current user. */
|
|
324
|
+
oauth_token?: string;
|
|
325
|
+
/** Returns response with indentations and line breaks. */
|
|
326
|
+
prettyPrint?: boolean;
|
|
327
|
+
/** 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. */
|
|
328
|
+
quotaUser?: string;
|
|
329
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
330
|
+
upload_protocol?: string;
|
|
331
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
332
|
+
uploadType?: string;
|
|
333
|
+
/** Request body */
|
|
334
|
+
resource: AnalyzeEntitySentimentRequest;
|
|
335
|
+
}): Request<AnalyzeEntitySentimentResponse>;
|
|
336
|
+
analyzeEntitySentiment(
|
|
337
|
+
request: {
|
|
338
|
+
/** V1 error format. */
|
|
339
|
+
'$.xgafv'?: string;
|
|
340
|
+
/** OAuth access token. */
|
|
341
|
+
access_token?: string;
|
|
342
|
+
/** Data format for response. */
|
|
343
|
+
alt?: string;
|
|
344
|
+
/** JSONP */
|
|
345
|
+
callback?: string;
|
|
346
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
347
|
+
fields?: string;
|
|
348
|
+
/** 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. */
|
|
349
|
+
key?: string;
|
|
350
|
+
/** OAuth 2.0 token for the current user. */
|
|
351
|
+
oauth_token?: string;
|
|
352
|
+
/** Returns response with indentations and line breaks. */
|
|
353
|
+
prettyPrint?: boolean;
|
|
354
|
+
/** 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. */
|
|
355
|
+
quotaUser?: string;
|
|
356
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
357
|
+
upload_protocol?: string;
|
|
358
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
359
|
+
uploadType?: string;
|
|
360
|
+
},
|
|
361
|
+
body: AnalyzeEntitySentimentRequest
|
|
362
|
+
): Request<AnalyzeEntitySentimentResponse>;
|
|
363
|
+
/** Analyzes the sentiment of the provided text. */
|
|
364
|
+
analyzeSentiment(request: {
|
|
365
|
+
/** V1 error format. */
|
|
366
|
+
'$.xgafv'?: string;
|
|
367
|
+
/** OAuth access token. */
|
|
368
|
+
access_token?: string;
|
|
369
|
+
/** Data format for response. */
|
|
370
|
+
alt?: string;
|
|
371
|
+
/** JSONP */
|
|
372
|
+
callback?: string;
|
|
373
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
374
|
+
fields?: string;
|
|
375
|
+
/** 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. */
|
|
376
|
+
key?: string;
|
|
377
|
+
/** OAuth 2.0 token for the current user. */
|
|
378
|
+
oauth_token?: string;
|
|
379
|
+
/** Returns response with indentations and line breaks. */
|
|
380
|
+
prettyPrint?: boolean;
|
|
381
|
+
/** 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. */
|
|
382
|
+
quotaUser?: string;
|
|
383
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
384
|
+
upload_protocol?: string;
|
|
385
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
386
|
+
uploadType?: string;
|
|
387
|
+
/** Request body */
|
|
388
|
+
resource: AnalyzeSentimentRequest;
|
|
389
|
+
}): Request<AnalyzeSentimentResponse>;
|
|
390
|
+
analyzeSentiment(
|
|
391
|
+
request: {
|
|
392
|
+
/** V1 error format. */
|
|
393
|
+
'$.xgafv'?: string;
|
|
394
|
+
/** OAuth access token. */
|
|
395
|
+
access_token?: string;
|
|
396
|
+
/** Data format for response. */
|
|
397
|
+
alt?: string;
|
|
398
|
+
/** JSONP */
|
|
399
|
+
callback?: string;
|
|
400
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
401
|
+
fields?: string;
|
|
402
|
+
/** 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. */
|
|
403
|
+
key?: string;
|
|
404
|
+
/** OAuth 2.0 token for the current user. */
|
|
405
|
+
oauth_token?: string;
|
|
406
|
+
/** Returns response with indentations and line breaks. */
|
|
407
|
+
prettyPrint?: boolean;
|
|
408
|
+
/** 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. */
|
|
409
|
+
quotaUser?: string;
|
|
410
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
411
|
+
upload_protocol?: string;
|
|
412
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
413
|
+
uploadType?: string;
|
|
414
|
+
},
|
|
415
|
+
body: AnalyzeSentimentRequest
|
|
416
|
+
): Request<AnalyzeSentimentResponse>;
|
|
417
|
+
/** Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties. */
|
|
418
|
+
analyzeSyntax(request: {
|
|
419
|
+
/** V1 error format. */
|
|
420
|
+
'$.xgafv'?: string;
|
|
421
|
+
/** OAuth access token. */
|
|
422
|
+
access_token?: string;
|
|
423
|
+
/** Data format for response. */
|
|
424
|
+
alt?: string;
|
|
425
|
+
/** JSONP */
|
|
426
|
+
callback?: string;
|
|
427
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
428
|
+
fields?: string;
|
|
429
|
+
/** 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. */
|
|
430
|
+
key?: string;
|
|
431
|
+
/** OAuth 2.0 token for the current user. */
|
|
432
|
+
oauth_token?: string;
|
|
433
|
+
/** Returns response with indentations and line breaks. */
|
|
434
|
+
prettyPrint?: boolean;
|
|
435
|
+
/** 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. */
|
|
436
|
+
quotaUser?: string;
|
|
437
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
438
|
+
upload_protocol?: string;
|
|
439
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
440
|
+
uploadType?: string;
|
|
441
|
+
/** Request body */
|
|
442
|
+
resource: AnalyzeSyntaxRequest;
|
|
443
|
+
}): Request<AnalyzeSyntaxResponse>;
|
|
444
|
+
analyzeSyntax(
|
|
445
|
+
request: {
|
|
446
|
+
/** V1 error format. */
|
|
447
|
+
'$.xgafv'?: string;
|
|
448
|
+
/** OAuth access token. */
|
|
449
|
+
access_token?: string;
|
|
450
|
+
/** Data format for response. */
|
|
451
|
+
alt?: string;
|
|
452
|
+
/** JSONP */
|
|
453
|
+
callback?: string;
|
|
454
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
455
|
+
fields?: string;
|
|
456
|
+
/** 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. */
|
|
457
|
+
key?: string;
|
|
458
|
+
/** OAuth 2.0 token for the current user. */
|
|
459
|
+
oauth_token?: string;
|
|
460
|
+
/** Returns response with indentations and line breaks. */
|
|
461
|
+
prettyPrint?: boolean;
|
|
462
|
+
/** 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. */
|
|
463
|
+
quotaUser?: string;
|
|
464
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
465
|
+
upload_protocol?: string;
|
|
466
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
467
|
+
uploadType?: string;
|
|
468
|
+
},
|
|
469
|
+
body: AnalyzeSyntaxRequest
|
|
470
|
+
): Request<AnalyzeSyntaxResponse>;
|
|
471
|
+
/** A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call. */
|
|
472
|
+
annotateText(request: {
|
|
473
|
+
/** V1 error format. */
|
|
474
|
+
'$.xgafv'?: string;
|
|
475
|
+
/** OAuth access token. */
|
|
476
|
+
access_token?: string;
|
|
477
|
+
/** Data format for response. */
|
|
478
|
+
alt?: string;
|
|
479
|
+
/** JSONP */
|
|
480
|
+
callback?: string;
|
|
481
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
482
|
+
fields?: string;
|
|
483
|
+
/** 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. */
|
|
484
|
+
key?: string;
|
|
485
|
+
/** OAuth 2.0 token for the current user. */
|
|
486
|
+
oauth_token?: string;
|
|
487
|
+
/** Returns response with indentations and line breaks. */
|
|
488
|
+
prettyPrint?: boolean;
|
|
489
|
+
/** 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. */
|
|
490
|
+
quotaUser?: string;
|
|
491
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
492
|
+
upload_protocol?: string;
|
|
493
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
494
|
+
uploadType?: string;
|
|
495
|
+
/** Request body */
|
|
496
|
+
resource: AnnotateTextRequest;
|
|
497
|
+
}): Request<AnnotateTextResponse>;
|
|
498
|
+
annotateText(
|
|
499
|
+
request: {
|
|
500
|
+
/** V1 error format. */
|
|
501
|
+
'$.xgafv'?: string;
|
|
502
|
+
/** OAuth access token. */
|
|
503
|
+
access_token?: string;
|
|
504
|
+
/** Data format for response. */
|
|
505
|
+
alt?: string;
|
|
506
|
+
/** JSONP */
|
|
507
|
+
callback?: string;
|
|
508
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
509
|
+
fields?: string;
|
|
510
|
+
/** 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. */
|
|
511
|
+
key?: string;
|
|
512
|
+
/** OAuth 2.0 token for the current user. */
|
|
513
|
+
oauth_token?: string;
|
|
514
|
+
/** Returns response with indentations and line breaks. */
|
|
515
|
+
prettyPrint?: boolean;
|
|
516
|
+
/** 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. */
|
|
517
|
+
quotaUser?: string;
|
|
518
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
519
|
+
upload_protocol?: string;
|
|
520
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
521
|
+
uploadType?: string;
|
|
522
|
+
},
|
|
523
|
+
body: AnnotateTextRequest
|
|
524
|
+
): Request<AnnotateTextResponse>;
|
|
525
|
+
/** Classifies a document into categories. */
|
|
526
|
+
classifyText(request: {
|
|
527
|
+
/** V1 error format. */
|
|
528
|
+
'$.xgafv'?: string;
|
|
529
|
+
/** OAuth access token. */
|
|
530
|
+
access_token?: string;
|
|
531
|
+
/** Data format for response. */
|
|
532
|
+
alt?: string;
|
|
533
|
+
/** JSONP */
|
|
534
|
+
callback?: string;
|
|
535
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
536
|
+
fields?: string;
|
|
537
|
+
/** 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. */
|
|
538
|
+
key?: string;
|
|
539
|
+
/** OAuth 2.0 token for the current user. */
|
|
540
|
+
oauth_token?: string;
|
|
541
|
+
/** Returns response with indentations and line breaks. */
|
|
542
|
+
prettyPrint?: boolean;
|
|
543
|
+
/** 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. */
|
|
544
|
+
quotaUser?: string;
|
|
545
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
546
|
+
upload_protocol?: string;
|
|
547
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
548
|
+
uploadType?: string;
|
|
549
|
+
/** Request body */
|
|
550
|
+
resource: ClassifyTextRequest;
|
|
551
|
+
}): Request<ClassifyTextResponse>;
|
|
552
|
+
classifyText(
|
|
553
|
+
request: {
|
|
554
|
+
/** V1 error format. */
|
|
555
|
+
'$.xgafv'?: string;
|
|
556
|
+
/** OAuth access token. */
|
|
557
|
+
access_token?: string;
|
|
558
|
+
/** Data format for response. */
|
|
559
|
+
alt?: string;
|
|
560
|
+
/** JSONP */
|
|
561
|
+
callback?: string;
|
|
562
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
563
|
+
fields?: string;
|
|
564
|
+
/** 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. */
|
|
565
|
+
key?: string;
|
|
566
|
+
/** OAuth 2.0 token for the current user. */
|
|
567
|
+
oauth_token?: string;
|
|
568
|
+
/** Returns response with indentations and line breaks. */
|
|
569
|
+
prettyPrint?: boolean;
|
|
570
|
+
/** 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. */
|
|
571
|
+
quotaUser?: string;
|
|
572
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
573
|
+
upload_protocol?: string;
|
|
574
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
575
|
+
uploadType?: string;
|
|
576
|
+
},
|
|
577
|
+
body: ClassifyTextRequest
|
|
578
|
+
): Request<ClassifyTextResponse>;
|
|
579
|
+
/** Moderates a document for harmful and sensitive categories. */
|
|
580
|
+
moderateText(request: {
|
|
581
|
+
/** V1 error format. */
|
|
582
|
+
'$.xgafv'?: string;
|
|
583
|
+
/** OAuth access token. */
|
|
584
|
+
access_token?: string;
|
|
585
|
+
/** Data format for response. */
|
|
586
|
+
alt?: string;
|
|
587
|
+
/** JSONP */
|
|
588
|
+
callback?: string;
|
|
589
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
590
|
+
fields?: string;
|
|
591
|
+
/** 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. */
|
|
592
|
+
key?: string;
|
|
593
|
+
/** OAuth 2.0 token for the current user. */
|
|
594
|
+
oauth_token?: string;
|
|
595
|
+
/** Returns response with indentations and line breaks. */
|
|
596
|
+
prettyPrint?: boolean;
|
|
597
|
+
/** 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. */
|
|
598
|
+
quotaUser?: string;
|
|
599
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
600
|
+
upload_protocol?: string;
|
|
601
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
602
|
+
uploadType?: string;
|
|
603
|
+
/** Request body */
|
|
604
|
+
resource: ModerateTextRequest;
|
|
605
|
+
}): Request<ModerateTextResponse>;
|
|
606
|
+
moderateText(
|
|
607
|
+
request: {
|
|
608
|
+
/** V1 error format. */
|
|
609
|
+
'$.xgafv'?: string;
|
|
610
|
+
/** OAuth access token. */
|
|
611
|
+
access_token?: string;
|
|
612
|
+
/** Data format for response. */
|
|
613
|
+
alt?: string;
|
|
614
|
+
/** JSONP */
|
|
615
|
+
callback?: string;
|
|
616
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
617
|
+
fields?: string;
|
|
618
|
+
/** 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. */
|
|
619
|
+
key?: string;
|
|
620
|
+
/** OAuth 2.0 token for the current user. */
|
|
621
|
+
oauth_token?: string;
|
|
622
|
+
/** Returns response with indentations and line breaks. */
|
|
623
|
+
prettyPrint?: boolean;
|
|
624
|
+
/** 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. */
|
|
625
|
+
quotaUser?: string;
|
|
626
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
627
|
+
upload_protocol?: string;
|
|
628
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
629
|
+
uploadType?: string;
|
|
630
|
+
},
|
|
631
|
+
body: ModerateTextRequest
|
|
632
|
+
): Request<ModerateTextResponse>;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
const documents: DocumentsResource;
|
|
636
|
+
}
|
|
909
637
|
}
|