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 DataLabeling (v1beta1). 24 * 25 * <p> 26 * Public API for Google Cloud AI Data Labeling Service.</p> 27 * 28 * <p> 29 * For more information about this service, see the API 30 * <a href="https://cloud.google.com/data-labeling/docs/" target="_blank">Documentation</a> 31 * </p> 32 * 33 * @author Google, Inc. 34 */ 35class DataLabeling extends \Google\Service 36{ 37 /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */ 38 const CLOUD_PLATFORM = 39 "https://www.googleapis.com/auth/cloud-platform"; 40 41 public $projects_annotationSpecSets; 42 public $projects_datasets; 43 public $projects_datasets_annotatedDatasets; 44 public $projects_datasets_annotatedDatasets_dataItems; 45 public $projects_datasets_annotatedDatasets_examples; 46 public $projects_datasets_annotatedDatasets_feedbackThreads; 47 public $projects_datasets_annotatedDatasets_feedbackThreads_feedbackMessages; 48 public $projects_datasets_dataItems; 49 public $projects_datasets_evaluations; 50 public $projects_datasets_evaluations_exampleComparisons; 51 public $projects_datasets_image; 52 public $projects_datasets_text; 53 public $projects_datasets_video; 54 public $projects_evaluationJobs; 55 public $projects_evaluations; 56 public $projects_instructions; 57 public $projects_operations; 58 59 /** 60 * Constructs the internal representation of the DataLabeling service. 61 * 62 * @param Client|array $clientOrConfig The client used to deliver requests, or a 63 * config array to pass to a new Client instance. 64 * @param string $rootUrl The root URL used for requests to the service. 65 */ 66 public function __construct($clientOrConfig = [], $rootUrl = null) 67 { 68 parent::__construct($clientOrConfig); 69 $this->rootUrl = $rootUrl ?: 'https://datalabeling.googleapis.com/'; 70 $this->servicePath = ''; 71 $this->batchPath = 'batch'; 72 $this->version = 'v1beta1'; 73 $this->serviceName = 'datalabeling'; 74 75 $this->projects_annotationSpecSets = new DataLabeling\Resource\ProjectsAnnotationSpecSets( 76 $this, 77 $this->serviceName, 78 'annotationSpecSets', 79 [ 80 'methods' => [ 81 'create' => [ 82 'path' => 'v1beta1/{+parent}/annotationSpecSets', 83 'httpMethod' => 'POST', 84 'parameters' => [ 85 'parent' => [ 86 'location' => 'path', 87 'type' => 'string', 88 'required' => true, 89 ], 90 ], 91 ],'delete' => [ 92 'path' => 'v1beta1/{+name}', 93 'httpMethod' => 'DELETE', 94 'parameters' => [ 95 'name' => [ 96 'location' => 'path', 97 'type' => 'string', 98 'required' => true, 99 ], 100 ], 101 ],'get' => [ 102 'path' => 'v1beta1/{+name}', 103 'httpMethod' => 'GET', 104 'parameters' => [ 105 'name' => [ 106 'location' => 'path', 107 'type' => 'string', 108 'required' => true, 109 ], 110 ], 111 ],'list' => [ 112 'path' => 'v1beta1/{+parent}/annotationSpecSets', 113 'httpMethod' => 'GET', 114 'parameters' => [ 115 'parent' => [ 116 'location' => 'path', 117 'type' => 'string', 118 'required' => true, 119 ], 120 'filter' => [ 121 'location' => 'query', 122 'type' => 'string', 123 ], 124 'pageSize' => [ 125 'location' => 'query', 126 'type' => 'integer', 127 ], 128 'pageToken' => [ 129 'location' => 'query', 130 'type' => 'string', 131 ], 132 ], 133 ], 134 ] 135 ] 136 ); 137 $this->projects_datasets = new DataLabeling\Resource\ProjectsDatasets( 138 $this, 139 $this->serviceName, 140 'datasets', 141 [ 142 'methods' => [ 143 'create' => [ 144 'path' => 'v1beta1/{+parent}/datasets', 145 'httpMethod' => 'POST', 146 'parameters' => [ 147 'parent' => [ 148 'location' => 'path', 149 'type' => 'string', 150 'required' => true, 151 ], 152 ], 153 ],'delete' => [ 154 'path' => 'v1beta1/{+name}', 155 'httpMethod' => 'DELETE', 156 'parameters' => [ 157 'name' => [ 158 'location' => 'path', 159 'type' => 'string', 160 'required' => true, 161 ], 162 ], 163 ],'exportData' => [ 164 'path' => 'v1beta1/{+name}:exportData', 165 'httpMethod' => 'POST', 166 'parameters' => [ 167 'name' => [ 168 'location' => 'path', 169 'type' => 'string', 170 'required' => true, 171 ], 172 ], 173 ],'get' => [ 174 'path' => 'v1beta1/{+name}', 175 'httpMethod' => 'GET', 176 'parameters' => [ 177 'name' => [ 178 'location' => 'path', 179 'type' => 'string', 180 'required' => true, 181 ], 182 ], 183 ],'importData' => [ 184 'path' => 'v1beta1/{+name}:importData', 185 'httpMethod' => 'POST', 186 'parameters' => [ 187 'name' => [ 188 'location' => 'path', 189 'type' => 'string', 190 'required' => true, 191 ], 192 ], 193 ],'list' => [ 194 'path' => 'v1beta1/{+parent}/datasets', 195 'httpMethod' => 'GET', 196 'parameters' => [ 197 'parent' => [ 198 'location' => 'path', 199 'type' => 'string', 200 'required' => true, 201 ], 202 'filter' => [ 203 'location' => 'query', 204 'type' => 'string', 205 ], 206 'pageSize' => [ 207 'location' => 'query', 208 'type' => 'integer', 209 ], 210 'pageToken' => [ 211 'location' => 'query', 212 'type' => 'string', 213 ], 214 ], 215 ], 216 ] 217 ] 218 ); 219 $this->projects_datasets_annotatedDatasets = new DataLabeling\Resource\ProjectsDatasetsAnnotatedDatasets( 220 $this, 221 $this->serviceName, 222 'annotatedDatasets', 223 [ 224 'methods' => [ 225 'delete' => [ 226 'path' => 'v1beta1/{+name}', 227 'httpMethod' => 'DELETE', 228 'parameters' => [ 229 'name' => [ 230 'location' => 'path', 231 'type' => 'string', 232 'required' => true, 233 ], 234 ], 235 ],'get' => [ 236 'path' => 'v1beta1/{+name}', 237 'httpMethod' => 'GET', 238 'parameters' => [ 239 'name' => [ 240 'location' => 'path', 241 'type' => 'string', 242 'required' => true, 243 ], 244 ], 245 ],'list' => [ 246 'path' => 'v1beta1/{+parent}/annotatedDatasets', 247 'httpMethod' => 'GET', 248 'parameters' => [ 249 'parent' => [ 250 'location' => 'path', 251 'type' => 'string', 252 'required' => true, 253 ], 254 'filter' => [ 255 'location' => 'query', 256 'type' => 'string', 257 ], 258 'pageSize' => [ 259 'location' => 'query', 260 'type' => 'integer', 261 ], 262 'pageToken' => [ 263 'location' => 'query', 264 'type' => 'string', 265 ], 266 ], 267 ], 268 ] 269 ] 270 ); 271 $this->projects_datasets_annotatedDatasets_dataItems = new DataLabeling\Resource\ProjectsDatasetsAnnotatedDatasetsDataItems( 272 $this, 273 $this->serviceName, 274 'dataItems', 275 [ 276 'methods' => [ 277 'get' => [ 278 'path' => 'v1beta1/{+name}', 279 'httpMethod' => 'GET', 280 'parameters' => [ 281 'name' => [ 282 'location' => 'path', 283 'type' => 'string', 284 'required' => true, 285 ], 286 ], 287 ],'list' => [ 288 'path' => 'v1beta1/{+parent}/dataItems', 289 'httpMethod' => 'GET', 290 'parameters' => [ 291 'parent' => [ 292 'location' => 'path', 293 'type' => 'string', 294 'required' => true, 295 ], 296 'filter' => [ 297 'location' => 'query', 298 'type' => 'string', 299 ], 300 'pageSize' => [ 301 'location' => 'query', 302 'type' => 'integer', 303 ], 304 'pageToken' => [ 305 'location' => 'query', 306 'type' => 'string', 307 ], 308 ], 309 ], 310 ] 311 ] 312 ); 313 $this->projects_datasets_annotatedDatasets_examples = new DataLabeling\Resource\ProjectsDatasetsAnnotatedDatasetsExamples( 314 $this, 315 $this->serviceName, 316 'examples', 317 [ 318 'methods' => [ 319 'get' => [ 320 'path' => 'v1beta1/{+name}', 321 'httpMethod' => 'GET', 322 'parameters' => [ 323 'name' => [ 324 'location' => 'path', 325 'type' => 'string', 326 'required' => true, 327 ], 328 'filter' => [ 329 'location' => 'query', 330 'type' => 'string', 331 ], 332 ], 333 ],'list' => [ 334 'path' => 'v1beta1/{+parent}/examples', 335 'httpMethod' => 'GET', 336 'parameters' => [ 337 'parent' => [ 338 'location' => 'path', 339 'type' => 'string', 340 'required' => true, 341 ], 342 'filter' => [ 343 'location' => 'query', 344 'type' => 'string', 345 ], 346 'pageSize' => [ 347 'location' => 'query', 348 'type' => 'integer', 349 ], 350 'pageToken' => [ 351 'location' => 'query', 352 'type' => 'string', 353 ], 354 ], 355 ], 356 ] 357 ] 358 ); 359 $this->projects_datasets_annotatedDatasets_feedbackThreads = new DataLabeling\Resource\ProjectsDatasetsAnnotatedDatasetsFeedbackThreads( 360 $this, 361 $this->serviceName, 362 'feedbackThreads', 363 [ 364 'methods' => [ 365 'delete' => [ 366 'path' => 'v1beta1/{+name}', 367 'httpMethod' => 'DELETE', 368 'parameters' => [ 369 'name' => [ 370 'location' => 'path', 371 'type' => 'string', 372 'required' => true, 373 ], 374 ], 375 ],'get' => [ 376 'path' => 'v1beta1/{+name}', 377 'httpMethod' => 'GET', 378 'parameters' => [ 379 'name' => [ 380 'location' => 'path', 381 'type' => 'string', 382 'required' => true, 383 ], 384 ], 385 ],'list' => [ 386 'path' => 'v1beta1/{+parent}/feedbackThreads', 387 'httpMethod' => 'GET', 388 'parameters' => [ 389 'parent' => [ 390 'location' => 'path', 391 'type' => 'string', 392 'required' => true, 393 ], 394 'pageSize' => [ 395 'location' => 'query', 396 'type' => 'integer', 397 ], 398 'pageToken' => [ 399 'location' => 'query', 400 'type' => 'string', 401 ], 402 ], 403 ], 404 ] 405 ] 406 ); 407 $this->projects_datasets_annotatedDatasets_feedbackThreads_feedbackMessages = new DataLabeling\Resource\ProjectsDatasetsAnnotatedDatasetsFeedbackThreadsFeedbackMessages( 408 $this, 409 $this->serviceName, 410 'feedbackMessages', 411 [ 412 'methods' => [ 413 'create' => [ 414 'path' => 'v1beta1/{+parent}/feedbackMessages', 415 'httpMethod' => 'POST', 416 'parameters' => [ 417 'parent' => [ 418 'location' => 'path', 419 'type' => 'string', 420 'required' => true, 421 ], 422 ], 423 ],'delete' => [ 424 'path' => 'v1beta1/{+name}', 425 'httpMethod' => 'DELETE', 426 'parameters' => [ 427 'name' => [ 428 'location' => 'path', 429 'type' => 'string', 430 'required' => true, 431 ], 432 ], 433 ],'get' => [ 434 'path' => 'v1beta1/{+name}', 435 'httpMethod' => 'GET', 436 'parameters' => [ 437 'name' => [ 438 'location' => 'path', 439 'type' => 'string', 440 'required' => true, 441 ], 442 ], 443 ],'list' => [ 444 'path' => 'v1beta1/{+parent}/feedbackMessages', 445 'httpMethod' => 'GET', 446 'parameters' => [ 447 'parent' => [ 448 'location' => 'path', 449 'type' => 'string', 450 'required' => true, 451 ], 452 'pageSize' => [ 453 'location' => 'query', 454 'type' => 'integer', 455 ], 456 'pageToken' => [ 457 'location' => 'query', 458 'type' => 'string', 459 ], 460 ], 461 ], 462 ] 463 ] 464 ); 465 $this->projects_datasets_dataItems = new DataLabeling\Resource\ProjectsDatasetsDataItems( 466 $this, 467 $this->serviceName, 468 'dataItems', 469 [ 470 'methods' => [ 471 'get' => [ 472 'path' => 'v1beta1/{+name}', 473 'httpMethod' => 'GET', 474 'parameters' => [ 475 'name' => [ 476 'location' => 'path', 477 'type' => 'string', 478 'required' => true, 479 ], 480 ], 481 ],'list' => [ 482 'path' => 'v1beta1/{+parent}/dataItems', 483 'httpMethod' => 'GET', 484 'parameters' => [ 485 'parent' => [ 486 'location' => 'path', 487 'type' => 'string', 488 'required' => true, 489 ], 490 'filter' => [ 491 'location' => 'query', 492 'type' => 'string', 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_datasets_evaluations = new DataLabeling\Resource\ProjectsDatasetsEvaluations( 508 $this, 509 $this->serviceName, 510 'evaluations', 511 [ 512 'methods' => [ 513 'get' => [ 514 'path' => 'v1beta1/{+name}', 515 'httpMethod' => 'GET', 516 'parameters' => [ 517 'name' => [ 518 'location' => 'path', 519 'type' => 'string', 520 'required' => true, 521 ], 522 ], 523 ], 524 ] 525 ] 526 ); 527 $this->projects_datasets_evaluations_exampleComparisons = new DataLabeling\Resource\ProjectsDatasetsEvaluationsExampleComparisons( 528 $this, 529 $this->serviceName, 530 'exampleComparisons', 531 [ 532 'methods' => [ 533 'search' => [ 534 'path' => 'v1beta1/{+parent}/exampleComparisons:search', 535 'httpMethod' => 'POST', 536 'parameters' => [ 537 'parent' => [ 538 'location' => 'path', 539 'type' => 'string', 540 'required' => true, 541 ], 542 ], 543 ], 544 ] 545 ] 546 ); 547 $this->projects_datasets_image = new DataLabeling\Resource\ProjectsDatasetsImage( 548 $this, 549 $this->serviceName, 550 'image', 551 [ 552 'methods' => [ 553 'label' => [ 554 'path' => 'v1beta1/{+parent}/image:label', 555 'httpMethod' => 'POST', 556 'parameters' => [ 557 'parent' => [ 558 'location' => 'path', 559 'type' => 'string', 560 'required' => true, 561 ], 562 ], 563 ], 564 ] 565 ] 566 ); 567 $this->projects_datasets_text = new DataLabeling\Resource\ProjectsDatasetsText( 568 $this, 569 $this->serviceName, 570 'text', 571 [ 572 'methods' => [ 573 'label' => [ 574 'path' => 'v1beta1/{+parent}/text:label', 575 'httpMethod' => 'POST', 576 'parameters' => [ 577 'parent' => [ 578 'location' => 'path', 579 'type' => 'string', 580 'required' => true, 581 ], 582 ], 583 ], 584 ] 585 ] 586 ); 587 $this->projects_datasets_video = new DataLabeling\Resource\ProjectsDatasetsVideo( 588 $this, 589 $this->serviceName, 590 'video', 591 [ 592 'methods' => [ 593 'label' => [ 594 'path' => 'v1beta1/{+parent}/video:label', 595 'httpMethod' => 'POST', 596 'parameters' => [ 597 'parent' => [ 598 'location' => 'path', 599 'type' => 'string', 600 'required' => true, 601 ], 602 ], 603 ], 604 ] 605 ] 606 ); 607 $this->projects_evaluationJobs = new DataLabeling\Resource\ProjectsEvaluationJobs( 608 $this, 609 $this->serviceName, 610 'evaluationJobs', 611 [ 612 'methods' => [ 613 'create' => [ 614 'path' => 'v1beta1/{+parent}/evaluationJobs', 615 'httpMethod' => 'POST', 616 'parameters' => [ 617 'parent' => [ 618 'location' => 'path', 619 'type' => 'string', 620 'required' => true, 621 ], 622 ], 623 ],'delete' => [ 624 'path' => 'v1beta1/{+name}', 625 'httpMethod' => 'DELETE', 626 'parameters' => [ 627 'name' => [ 628 'location' => 'path', 629 'type' => 'string', 630 'required' => true, 631 ], 632 ], 633 ],'get' => [ 634 'path' => 'v1beta1/{+name}', 635 'httpMethod' => 'GET', 636 'parameters' => [ 637 'name' => [ 638 'location' => 'path', 639 'type' => 'string', 640 'required' => true, 641 ], 642 ], 643 ],'list' => [ 644 'path' => 'v1beta1/{+parent}/evaluationJobs', 645 'httpMethod' => 'GET', 646 'parameters' => [ 647 'parent' => [ 648 'location' => 'path', 649 'type' => 'string', 650 'required' => true, 651 ], 652 'filter' => [ 653 'location' => 'query', 654 'type' => 'string', 655 ], 656 'pageSize' => [ 657 'location' => 'query', 658 'type' => 'integer', 659 ], 660 'pageToken' => [ 661 'location' => 'query', 662 'type' => 'string', 663 ], 664 ], 665 ],'patch' => [ 666 'path' => 'v1beta1/{+name}', 667 'httpMethod' => 'PATCH', 668 'parameters' => [ 669 'name' => [ 670 'location' => 'path', 671 'type' => 'string', 672 'required' => true, 673 ], 674 'updateMask' => [ 675 'location' => 'query', 676 'type' => 'string', 677 ], 678 ], 679 ],'pause' => [ 680 'path' => 'v1beta1/{+name}:pause', 681 'httpMethod' => 'POST', 682 'parameters' => [ 683 'name' => [ 684 'location' => 'path', 685 'type' => 'string', 686 'required' => true, 687 ], 688 ], 689 ],'resume' => [ 690 'path' => 'v1beta1/{+name}:resume', 691 'httpMethod' => 'POST', 692 'parameters' => [ 693 'name' => [ 694 'location' => 'path', 695 'type' => 'string', 696 'required' => true, 697 ], 698 ], 699 ], 700 ] 701 ] 702 ); 703 $this->projects_evaluations = new DataLabeling\Resource\ProjectsEvaluations( 704 $this, 705 $this->serviceName, 706 'evaluations', 707 [ 708 'methods' => [ 709 'search' => [ 710 'path' => 'v1beta1/{+parent}/evaluations:search', 711 'httpMethod' => 'GET', 712 'parameters' => [ 713 'parent' => [ 714 'location' => 'path', 715 'type' => 'string', 716 'required' => true, 717 ], 718 'filter' => [ 719 'location' => 'query', 720 'type' => 'string', 721 ], 722 'pageSize' => [ 723 'location' => 'query', 724 'type' => 'integer', 725 ], 726 'pageToken' => [ 727 'location' => 'query', 728 'type' => 'string', 729 ], 730 ], 731 ], 732 ] 733 ] 734 ); 735 $this->projects_instructions = new DataLabeling\Resource\ProjectsInstructions( 736 $this, 737 $this->serviceName, 738 'instructions', 739 [ 740 'methods' => [ 741 'create' => [ 742 'path' => 'v1beta1/{+parent}/instructions', 743 'httpMethod' => 'POST', 744 'parameters' => [ 745 'parent' => [ 746 'location' => 'path', 747 'type' => 'string', 748 'required' => true, 749 ], 750 ], 751 ],'delete' => [ 752 'path' => 'v1beta1/{+name}', 753 'httpMethod' => 'DELETE', 754 'parameters' => [ 755 'name' => [ 756 'location' => 'path', 757 'type' => 'string', 758 'required' => true, 759 ], 760 ], 761 ],'get' => [ 762 'path' => 'v1beta1/{+name}', 763 'httpMethod' => 'GET', 764 'parameters' => [ 765 'name' => [ 766 'location' => 'path', 767 'type' => 'string', 768 'required' => true, 769 ], 770 ], 771 ],'list' => [ 772 'path' => 'v1beta1/{+parent}/instructions', 773 'httpMethod' => 'GET', 774 'parameters' => [ 775 'parent' => [ 776 'location' => 'path', 777 'type' => 'string', 778 'required' => true, 779 ], 780 'filter' => [ 781 'location' => 'query', 782 'type' => 'string', 783 ], 784 'pageSize' => [ 785 'location' => 'query', 786 'type' => 'integer', 787 ], 788 'pageToken' => [ 789 'location' => 'query', 790 'type' => 'string', 791 ], 792 ], 793 ], 794 ] 795 ] 796 ); 797 $this->projects_operations = new DataLabeling\Resource\ProjectsOperations( 798 $this, 799 $this->serviceName, 800 'operations', 801 [ 802 'methods' => [ 803 'cancel' => [ 804 'path' => 'v1beta1/{+name}:cancel', 805 'httpMethod' => 'GET', 806 'parameters' => [ 807 'name' => [ 808 'location' => 'path', 809 'type' => 'string', 810 'required' => true, 811 ], 812 ], 813 ],'delete' => [ 814 'path' => 'v1beta1/{+name}', 815 'httpMethod' => 'DELETE', 816 'parameters' => [ 817 'name' => [ 818 'location' => 'path', 819 'type' => 'string', 820 'required' => true, 821 ], 822 ], 823 ],'get' => [ 824 'path' => 'v1beta1/{+name}', 825 'httpMethod' => 'GET', 826 'parameters' => [ 827 'name' => [ 828 'location' => 'path', 829 'type' => 'string', 830 'required' => true, 831 ], 832 ], 833 ],'list' => [ 834 'path' => 'v1beta1/{+name}/operations', 835 'httpMethod' => 'GET', 836 'parameters' => [ 837 'name' => [ 838 'location' => 'path', 839 'type' => 'string', 840 'required' => true, 841 ], 842 'filter' => [ 843 'location' => 'query', 844 'type' => 'string', 845 ], 846 'pageSize' => [ 847 'location' => 'query', 848 'type' => 'integer', 849 ], 850 'pageToken' => [ 851 'location' => 'query', 852 'type' => 'string', 853 ], 854 ], 855 ], 856 ] 857 ] 858 ); 859 } 860} 861 862// Adding a class alias for backwards compatibility with the previous class name. 863class_alias(DataLabeling::class, 'Google_Service_DataLabeling'); 864