source: vendor/google/apiclient-services/src/Document.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 7 days ago

Upload project files

  • Property mode set to 100644
File size: 16.5 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service;
19
20use Google\Client;
21
22/**
23 * Service definition for Document (v1).
24 *
25 * <p>
26 * Service to parse structured information from unstructured or semi-structured
27 * documents using state-of-the-art Google AI such as natural language, computer
28 * vision, translation, and AutoML.</p>
29 *
30 * <p>
31 * For more information about this service, see the API
32 * <a href="https://cloud.google.com/document-ai/docs/" target="_blank">Documentation</a>
33 * </p>
34 *
35 * @author Google, Inc.
36 */
37class Document extends \Google\Service
38{
39 /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
40 const CLOUD_PLATFORM =
41 "https://www.googleapis.com/auth/cloud-platform";
42
43 public $operations;
44 public $projects_locations;
45 public $projects_locations_operations;
46 public $projects_locations_processorTypes;
47 public $projects_locations_processors;
48 public $projects_locations_processors_humanReviewConfig;
49 public $projects_locations_processors_processorVersions;
50 public $projects_locations_processors_processorVersions_evaluations;
51 public $projects_operations;
52 public $rootUrlTemplate;
53
54 /**
55 * Constructs the internal representation of the Document service.
56 *
57 * @param Client|array $clientOrConfig The client used to deliver requests, or a
58 * config array to pass to a new Client instance.
59 * @param string $rootUrl The root URL used for requests to the service.
60 */
61 public function __construct($clientOrConfig = [], $rootUrl = null)
62 {
63 parent::__construct($clientOrConfig);
64 $this->rootUrl = $rootUrl ?: 'https://documentai.googleapis.com/';
65 $this->rootUrlTemplate = $rootUrl ?: 'https://documentai.UNIVERSE_DOMAIN/';
66 $this->servicePath = '';
67 $this->batchPath = 'batch';
68 $this->version = 'v1';
69 $this->serviceName = 'documentai';
70
71 $this->operations = new Document\Resource\Operations(
72 $this,
73 $this->serviceName,
74 'operations',
75 [
76 'methods' => [
77 'delete' => [
78 'path' => 'v1/{+name}',
79 'httpMethod' => 'DELETE',
80 'parameters' => [
81 'name' => [
82 'location' => 'path',
83 'type' => 'string',
84 'required' => true,
85 ],
86 ],
87 ],
88 ]
89 ]
90 );
91 $this->projects_locations = new Document\Resource\ProjectsLocations(
92 $this,
93 $this->serviceName,
94 'locations',
95 [
96 'methods' => [
97 'fetchProcessorTypes' => [
98 'path' => 'v1/{+parent}:fetchProcessorTypes',
99 'httpMethod' => 'GET',
100 'parameters' => [
101 'parent' => [
102 'location' => 'path',
103 'type' => 'string',
104 'required' => true,
105 ],
106 ],
107 ],'get' => [
108 'path' => 'v1/{+name}',
109 'httpMethod' => 'GET',
110 'parameters' => [
111 'name' => [
112 'location' => 'path',
113 'type' => 'string',
114 'required' => true,
115 ],
116 ],
117 ],'list' => [
118 'path' => 'v1/{+name}/locations',
119 'httpMethod' => 'GET',
120 'parameters' => [
121 'name' => [
122 'location' => 'path',
123 'type' => 'string',
124 'required' => true,
125 ],
126 'filter' => [
127 'location' => 'query',
128 'type' => 'string',
129 ],
130 'pageSize' => [
131 'location' => 'query',
132 'type' => 'integer',
133 ],
134 'pageToken' => [
135 'location' => 'query',
136 'type' => 'string',
137 ],
138 ],
139 ],
140 ]
141 ]
142 );
143 $this->projects_locations_operations = new Document\Resource\ProjectsLocationsOperations(
144 $this,
145 $this->serviceName,
146 'operations',
147 [
148 'methods' => [
149 'cancel' => [
150 'path' => 'v1/{+name}:cancel',
151 'httpMethod' => 'POST',
152 'parameters' => [
153 'name' => [
154 'location' => 'path',
155 'type' => 'string',
156 'required' => true,
157 ],
158 ],
159 ],'get' => [
160 'path' => 'v1/{+name}',
161 'httpMethod' => 'GET',
162 'parameters' => [
163 'name' => [
164 'location' => 'path',
165 'type' => 'string',
166 'required' => true,
167 ],
168 ],
169 ],'list' => [
170 'path' => 'v1/{+name}',
171 'httpMethod' => 'GET',
172 'parameters' => [
173 'name' => [
174 'location' => 'path',
175 'type' => 'string',
176 'required' => true,
177 ],
178 'filter' => [
179 'location' => 'query',
180 'type' => 'string',
181 ],
182 'pageSize' => [
183 'location' => 'query',
184 'type' => 'integer',
185 ],
186 'pageToken' => [
187 'location' => 'query',
188 'type' => 'string',
189 ],
190 ],
191 ],
192 ]
193 ]
194 );
195 $this->projects_locations_processorTypes = new Document\Resource\ProjectsLocationsProcessorTypes(
196 $this,
197 $this->serviceName,
198 'processorTypes',
199 [
200 'methods' => [
201 'get' => [
202 'path' => 'v1/{+name}',
203 'httpMethod' => 'GET',
204 'parameters' => [
205 'name' => [
206 'location' => 'path',
207 'type' => 'string',
208 'required' => true,
209 ],
210 ],
211 ],'list' => [
212 'path' => 'v1/{+parent}/processorTypes',
213 'httpMethod' => 'GET',
214 'parameters' => [
215 'parent' => [
216 'location' => 'path',
217 'type' => 'string',
218 'required' => true,
219 ],
220 'pageSize' => [
221 'location' => 'query',
222 'type' => 'integer',
223 ],
224 'pageToken' => [
225 'location' => 'query',
226 'type' => 'string',
227 ],
228 ],
229 ],
230 ]
231 ]
232 );
233 $this->projects_locations_processors = new Document\Resource\ProjectsLocationsProcessors(
234 $this,
235 $this->serviceName,
236 'processors',
237 [
238 'methods' => [
239 'batchProcess' => [
240 'path' => 'v1/{+name}:batchProcess',
241 'httpMethod' => 'POST',
242 'parameters' => [
243 'name' => [
244 'location' => 'path',
245 'type' => 'string',
246 'required' => true,
247 ],
248 ],
249 ],'create' => [
250 'path' => 'v1/{+parent}/processors',
251 'httpMethod' => 'POST',
252 'parameters' => [
253 'parent' => [
254 'location' => 'path',
255 'type' => 'string',
256 'required' => true,
257 ],
258 ],
259 ],'delete' => [
260 'path' => 'v1/{+name}',
261 'httpMethod' => 'DELETE',
262 'parameters' => [
263 'name' => [
264 'location' => 'path',
265 'type' => 'string',
266 'required' => true,
267 ],
268 ],
269 ],'disable' => [
270 'path' => 'v1/{+name}:disable',
271 'httpMethod' => 'POST',
272 'parameters' => [
273 'name' => [
274 'location' => 'path',
275 'type' => 'string',
276 'required' => true,
277 ],
278 ],
279 ],'enable' => [
280 'path' => 'v1/{+name}:enable',
281 'httpMethod' => 'POST',
282 'parameters' => [
283 'name' => [
284 'location' => 'path',
285 'type' => 'string',
286 'required' => true,
287 ],
288 ],
289 ],'get' => [
290 'path' => 'v1/{+name}',
291 'httpMethod' => 'GET',
292 'parameters' => [
293 'name' => [
294 'location' => 'path',
295 'type' => 'string',
296 'required' => true,
297 ],
298 ],
299 ],'list' => [
300 'path' => 'v1/{+parent}/processors',
301 'httpMethod' => 'GET',
302 'parameters' => [
303 'parent' => [
304 'location' => 'path',
305 'type' => 'string',
306 'required' => true,
307 ],
308 'pageSize' => [
309 'location' => 'query',
310 'type' => 'integer',
311 ],
312 'pageToken' => [
313 'location' => 'query',
314 'type' => 'string',
315 ],
316 ],
317 ],'process' => [
318 'path' => 'v1/{+name}:process',
319 'httpMethod' => 'POST',
320 'parameters' => [
321 'name' => [
322 'location' => 'path',
323 'type' => 'string',
324 'required' => true,
325 ],
326 ],
327 ],'setDefaultProcessorVersion' => [
328 'path' => 'v1/{+processor}:setDefaultProcessorVersion',
329 'httpMethod' => 'POST',
330 'parameters' => [
331 'processor' => [
332 'location' => 'path',
333 'type' => 'string',
334 'required' => true,
335 ],
336 ],
337 ],
338 ]
339 ]
340 );
341 $this->projects_locations_processors_humanReviewConfig = new Document\Resource\ProjectsLocationsProcessorsHumanReviewConfig(
342 $this,
343 $this->serviceName,
344 'humanReviewConfig',
345 [
346 'methods' => [
347 'reviewDocument' => [
348 'path' => 'v1/{+humanReviewConfig}:reviewDocument',
349 'httpMethod' => 'POST',
350 'parameters' => [
351 'humanReviewConfig' => [
352 'location' => 'path',
353 'type' => 'string',
354 'required' => true,
355 ],
356 ],
357 ],
358 ]
359 ]
360 );
361 $this->projects_locations_processors_processorVersions = new Document\Resource\ProjectsLocationsProcessorsProcessorVersions(
362 $this,
363 $this->serviceName,
364 'processorVersions',
365 [
366 'methods' => [
367 'batchProcess' => [
368 'path' => 'v1/{+name}:batchProcess',
369 'httpMethod' => 'POST',
370 'parameters' => [
371 'name' => [
372 'location' => 'path',
373 'type' => 'string',
374 'required' => true,
375 ],
376 ],
377 ],'delete' => [
378 'path' => 'v1/{+name}',
379 'httpMethod' => 'DELETE',
380 'parameters' => [
381 'name' => [
382 'location' => 'path',
383 'type' => 'string',
384 'required' => true,
385 ],
386 ],
387 ],'deploy' => [
388 'path' => 'v1/{+name}:deploy',
389 'httpMethod' => 'POST',
390 'parameters' => [
391 'name' => [
392 'location' => 'path',
393 'type' => 'string',
394 'required' => true,
395 ],
396 ],
397 ],'evaluateProcessorVersion' => [
398 'path' => 'v1/{+processorVersion}:evaluateProcessorVersion',
399 'httpMethod' => 'POST',
400 'parameters' => [
401 'processorVersion' => [
402 'location' => 'path',
403 'type' => 'string',
404 'required' => true,
405 ],
406 ],
407 ],'get' => [
408 'path' => 'v1/{+name}',
409 'httpMethod' => 'GET',
410 'parameters' => [
411 'name' => [
412 'location' => 'path',
413 'type' => 'string',
414 'required' => true,
415 ],
416 ],
417 ],'list' => [
418 'path' => 'v1/{+parent}/processorVersions',
419 'httpMethod' => 'GET',
420 'parameters' => [
421 'parent' => [
422 'location' => 'path',
423 'type' => 'string',
424 'required' => true,
425 ],
426 'pageSize' => [
427 'location' => 'query',
428 'type' => 'integer',
429 ],
430 'pageToken' => [
431 'location' => 'query',
432 'type' => 'string',
433 ],
434 ],
435 ],'process' => [
436 'path' => 'v1/{+name}:process',
437 'httpMethod' => 'POST',
438 'parameters' => [
439 'name' => [
440 'location' => 'path',
441 'type' => 'string',
442 'required' => true,
443 ],
444 ],
445 ],'train' => [
446 'path' => 'v1/{+parent}/processorVersions:train',
447 'httpMethod' => 'POST',
448 'parameters' => [
449 'parent' => [
450 'location' => 'path',
451 'type' => 'string',
452 'required' => true,
453 ],
454 ],
455 ],'undeploy' => [
456 'path' => 'v1/{+name}:undeploy',
457 'httpMethod' => 'POST',
458 'parameters' => [
459 'name' => [
460 'location' => 'path',
461 'type' => 'string',
462 'required' => true,
463 ],
464 ],
465 ],
466 ]
467 ]
468 );
469 $this->projects_locations_processors_processorVersions_evaluations = new Document\Resource\ProjectsLocationsProcessorsProcessorVersionsEvaluations(
470 $this,
471 $this->serviceName,
472 'evaluations',
473 [
474 'methods' => [
475 'get' => [
476 'path' => 'v1/{+name}',
477 'httpMethod' => 'GET',
478 'parameters' => [
479 'name' => [
480 'location' => 'path',
481 'type' => 'string',
482 'required' => true,
483 ],
484 ],
485 ],'list' => [
486 'path' => 'v1/{+parent}/evaluations',
487 'httpMethod' => 'GET',
488 'parameters' => [
489 'parent' => [
490 'location' => 'path',
491 'type' => 'string',
492 'required' => true,
493 ],
494 'pageSize' => [
495 'location' => 'query',
496 'type' => 'integer',
497 ],
498 'pageToken' => [
499 'location' => 'query',
500 'type' => 'string',
501 ],
502 ],
503 ],
504 ]
505 ]
506 );
507 $this->projects_operations = new Document\Resource\ProjectsOperations(
508 $this,
509 $this->serviceName,
510 'operations',
511 [
512 'methods' => [
513 'get' => [
514 'path' => 'v1/{+name}',
515 'httpMethod' => 'GET',
516 'parameters' => [
517 'name' => [
518 'location' => 'path',
519 'type' => 'string',
520 'required' => true,
521 ],
522 ],
523 ],
524 ]
525 ]
526 );
527 }
528}
529
530// Adding a class alias for backwards compatibility with the previous class name.
531class_alias(Document::class, 'Google_Service_Document');
Note: See TracBrowser for help on using the repository browser.