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 CloudMachineLearningEngine (v1). 24 * 25 * <p> 26 * An API to enable creating and using machine learning models.</p> 27 * 28 * <p> 29 * For more information about this service, see the API 30 * <a href="https://cloud.google.com/ml/" target="_blank">Documentation</a> 31 * </p> 32 * 33 * @author Google, Inc. 34 */ 35class CloudMachineLearningEngine 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 /** View your data across Google Cloud services and see the email address of your Google Account. */ 41 const CLOUD_PLATFORM_READ_ONLY = 42 "https://www.googleapis.com/auth/cloud-platform.read-only"; 43 44 public $projects; 45 public $projects_jobs; 46 public $projects_locations; 47 public $projects_locations_operations; 48 public $projects_locations_studies; 49 public $projects_locations_studies_trials; 50 public $projects_models; 51 public $projects_models_versions; 52 public $projects_operations; 53 54 /** 55 * Constructs the internal representation of the CloudMachineLearningEngine 56 * service. 57 * 58 * @param Client|array $clientOrConfig The client used to deliver requests, or a 59 * config array to pass to a new Client instance. 60 * @param string $rootUrl The root URL used for requests to the service. 61 */ 62 public function __construct($clientOrConfig = [], $rootUrl = null) 63 { 64 parent::__construct($clientOrConfig); 65 $this->rootUrl = $rootUrl ?: 'https://ml.googleapis.com/'; 66 $this->servicePath = ''; 67 $this->batchPath = 'batch'; 68 $this->version = 'v1'; 69 $this->serviceName = 'ml'; 70 71 $this->projects = new CloudMachineLearningEngine\Resource\Projects( 72 $this, 73 $this->serviceName, 74 'projects', 75 [ 76 'methods' => [ 77 'explain' => [ 78 'path' => 'v1/{+name}:explain', 79 'httpMethod' => 'POST', 80 'parameters' => [ 81 'name' => [ 82 'location' => 'path', 83 'type' => 'string', 84 'required' => true, 85 ], 86 ], 87 ],'getConfig' => [ 88 'path' => 'v1/{+name}:getConfig', 89 'httpMethod' => 'GET', 90 'parameters' => [ 91 'name' => [ 92 'location' => 'path', 93 'type' => 'string', 94 'required' => true, 95 ], 96 ], 97 ],'predict' => [ 98 'path' => 'v1/{+name}:predict', 99 'httpMethod' => 'POST', 100 'parameters' => [ 101 'name' => [ 102 'location' => 'path', 103 'type' => 'string', 104 'required' => true, 105 ], 106 ], 107 ], 108 ] 109 ] 110 ); 111 $this->projects_jobs = new CloudMachineLearningEngine\Resource\ProjectsJobs( 112 $this, 113 $this->serviceName, 114 'jobs', 115 [ 116 'methods' => [ 117 'cancel' => [ 118 'path' => 'v1/{+name}:cancel', 119 'httpMethod' => 'POST', 120 'parameters' => [ 121 'name' => [ 122 'location' => 'path', 123 'type' => 'string', 124 'required' => true, 125 ], 126 ], 127 ],'create' => [ 128 'path' => 'v1/{+parent}/jobs', 129 'httpMethod' => 'POST', 130 'parameters' => [ 131 'parent' => [ 132 'location' => 'path', 133 'type' => 'string', 134 'required' => true, 135 ], 136 ], 137 ],'get' => [ 138 'path' => 'v1/{+name}', 139 'httpMethod' => 'GET', 140 'parameters' => [ 141 'name' => [ 142 'location' => 'path', 143 'type' => 'string', 144 'required' => true, 145 ], 146 ], 147 ],'getIamPolicy' => [ 148 'path' => 'v1/{+resource}:getIamPolicy', 149 'httpMethod' => 'GET', 150 'parameters' => [ 151 'resource' => [ 152 'location' => 'path', 153 'type' => 'string', 154 'required' => true, 155 ], 156 'options.requestedPolicyVersion' => [ 157 'location' => 'query', 158 'type' => 'integer', 159 ], 160 ], 161 ],'list' => [ 162 'path' => 'v1/{+parent}/jobs', 163 'httpMethod' => 'GET', 164 'parameters' => [ 165 'parent' => [ 166 'location' => 'path', 167 'type' => 'string', 168 'required' => true, 169 ], 170 'filter' => [ 171 'location' => 'query', 172 'type' => 'string', 173 ], 174 'pageSize' => [ 175 'location' => 'query', 176 'type' => 'integer', 177 ], 178 'pageToken' => [ 179 'location' => 'query', 180 'type' => 'string', 181 ], 182 ], 183 ],'patch' => [ 184 'path' => 'v1/{+name}', 185 'httpMethod' => 'PATCH', 186 'parameters' => [ 187 'name' => [ 188 'location' => 'path', 189 'type' => 'string', 190 'required' => true, 191 ], 192 'updateMask' => [ 193 'location' => 'query', 194 'type' => 'string', 195 ], 196 ], 197 ],'setIamPolicy' => [ 198 'path' => 'v1/{+resource}:setIamPolicy', 199 'httpMethod' => 'POST', 200 'parameters' => [ 201 'resource' => [ 202 'location' => 'path', 203 'type' => 'string', 204 'required' => true, 205 ], 206 ], 207 ],'testIamPermissions' => [ 208 'path' => 'v1/{+resource}:testIamPermissions', 209 'httpMethod' => 'POST', 210 'parameters' => [ 211 'resource' => [ 212 'location' => 'path', 213 'type' => 'string', 214 'required' => true, 215 ], 216 ], 217 ], 218 ] 219 ] 220 ); 221 $this->projects_locations = new CloudMachineLearningEngine\Resource\ProjectsLocations( 222 $this, 223 $this->serviceName, 224 'locations', 225 [ 226 'methods' => [ 227 'get' => [ 228 'path' => 'v1/{+name}', 229 'httpMethod' => 'GET', 230 'parameters' => [ 231 'name' => [ 232 'location' => 'path', 233 'type' => 'string', 234 'required' => true, 235 ], 236 ], 237 ],'list' => [ 238 'path' => 'v1/{+parent}/locations', 239 'httpMethod' => 'GET', 240 'parameters' => [ 241 'parent' => [ 242 'location' => 'path', 243 'type' => 'string', 244 'required' => true, 245 ], 246 'pageSize' => [ 247 'location' => 'query', 248 'type' => 'integer', 249 ], 250 'pageToken' => [ 251 'location' => 'query', 252 'type' => 'string', 253 ], 254 ], 255 ], 256 ] 257 ] 258 ); 259 $this->projects_locations_operations = new CloudMachineLearningEngine\Resource\ProjectsLocationsOperations( 260 $this, 261 $this->serviceName, 262 'operations', 263 [ 264 'methods' => [ 265 'cancel' => [ 266 'path' => 'v1/{+name}:cancel', 267 'httpMethod' => 'POST', 268 'parameters' => [ 269 'name' => [ 270 'location' => 'path', 271 'type' => 'string', 272 'required' => true, 273 ], 274 ], 275 ],'get' => [ 276 'path' => 'v1/{+name}', 277 'httpMethod' => 'GET', 278 'parameters' => [ 279 'name' => [ 280 'location' => 'path', 281 'type' => 'string', 282 'required' => true, 283 ], 284 ], 285 ], 286 ] 287 ] 288 ); 289 $this->projects_locations_studies = new CloudMachineLearningEngine\Resource\ProjectsLocationsStudies( 290 $this, 291 $this->serviceName, 292 'studies', 293 [ 294 'methods' => [ 295 'create' => [ 296 'path' => 'v1/{+parent}/studies', 297 'httpMethod' => 'POST', 298 'parameters' => [ 299 'parent' => [ 300 'location' => 'path', 301 'type' => 'string', 302 'required' => true, 303 ], 304 'studyId' => [ 305 'location' => 'query', 306 'type' => 'string', 307 ], 308 ], 309 ],'delete' => [ 310 'path' => 'v1/{+name}', 311 'httpMethod' => 'DELETE', 312 'parameters' => [ 313 'name' => [ 314 'location' => 'path', 315 'type' => 'string', 316 'required' => true, 317 ], 318 ], 319 ],'get' => [ 320 'path' => 'v1/{+name}', 321 'httpMethod' => 'GET', 322 'parameters' => [ 323 'name' => [ 324 'location' => 'path', 325 'type' => 'string', 326 'required' => true, 327 ], 328 ], 329 ],'list' => [ 330 'path' => 'v1/{+parent}/studies', 331 'httpMethod' => 'GET', 332 'parameters' => [ 333 'parent' => [ 334 'location' => 'path', 335 'type' => 'string', 336 'required' => true, 337 ], 338 ], 339 ], 340 ] 341 ] 342 ); 343 $this->projects_locations_studies_trials = new CloudMachineLearningEngine\Resource\ProjectsLocationsStudiesTrials( 344 $this, 345 $this->serviceName, 346 'trials', 347 [ 348 'methods' => [ 349 'addMeasurement' => [ 350 'path' => 'v1/{+name}:addMeasurement', 351 'httpMethod' => 'POST', 352 'parameters' => [ 353 'name' => [ 354 'location' => 'path', 355 'type' => 'string', 356 'required' => true, 357 ], 358 ], 359 ],'checkEarlyStoppingState' => [ 360 'path' => 'v1/{+name}:checkEarlyStoppingState', 361 'httpMethod' => 'POST', 362 'parameters' => [ 363 'name' => [ 364 'location' => 'path', 365 'type' => 'string', 366 'required' => true, 367 ], 368 ], 369 ],'complete' => [ 370 'path' => 'v1/{+name}:complete', 371 'httpMethod' => 'POST', 372 'parameters' => [ 373 'name' => [ 374 'location' => 'path', 375 'type' => 'string', 376 'required' => true, 377 ], 378 ], 379 ],'create' => [ 380 'path' => 'v1/{+parent}/trials', 381 'httpMethod' => 'POST', 382 'parameters' => [ 383 'parent' => [ 384 'location' => 'path', 385 'type' => 'string', 386 'required' => true, 387 ], 388 ], 389 ],'delete' => [ 390 'path' => 'v1/{+name}', 391 'httpMethod' => 'DELETE', 392 'parameters' => [ 393 'name' => [ 394 'location' => 'path', 395 'type' => 'string', 396 'required' => true, 397 ], 398 ], 399 ],'get' => [ 400 'path' => 'v1/{+name}', 401 'httpMethod' => 'GET', 402 'parameters' => [ 403 'name' => [ 404 'location' => 'path', 405 'type' => 'string', 406 'required' => true, 407 ], 408 ], 409 ],'list' => [ 410 'path' => 'v1/{+parent}/trials', 411 'httpMethod' => 'GET', 412 'parameters' => [ 413 'parent' => [ 414 'location' => 'path', 415 'type' => 'string', 416 'required' => true, 417 ], 418 ], 419 ],'listOptimalTrials' => [ 420 'path' => 'v1/{+parent}/trials:listOptimalTrials', 421 'httpMethod' => 'POST', 422 'parameters' => [ 423 'parent' => [ 424 'location' => 'path', 425 'type' => 'string', 426 'required' => true, 427 ], 428 ], 429 ],'stop' => [ 430 'path' => 'v1/{+name}:stop', 431 'httpMethod' => 'POST', 432 'parameters' => [ 433 'name' => [ 434 'location' => 'path', 435 'type' => 'string', 436 'required' => true, 437 ], 438 ], 439 ],'suggest' => [ 440 'path' => 'v1/{+parent}/trials:suggest', 441 'httpMethod' => 'POST', 442 'parameters' => [ 443 'parent' => [ 444 'location' => 'path', 445 'type' => 'string', 446 'required' => true, 447 ], 448 ], 449 ], 450 ] 451 ] 452 ); 453 $this->projects_models = new CloudMachineLearningEngine\Resource\ProjectsModels( 454 $this, 455 $this->serviceName, 456 'models', 457 [ 458 'methods' => [ 459 'create' => [ 460 'path' => 'v1/{+parent}/models', 461 'httpMethod' => 'POST', 462 'parameters' => [ 463 'parent' => [ 464 'location' => 'path', 465 'type' => 'string', 466 'required' => true, 467 ], 468 ], 469 ],'delete' => [ 470 'path' => 'v1/{+name}', 471 'httpMethod' => 'DELETE', 472 'parameters' => [ 473 'name' => [ 474 'location' => 'path', 475 'type' => 'string', 476 'required' => true, 477 ], 478 ], 479 ],'get' => [ 480 'path' => 'v1/{+name}', 481 'httpMethod' => 'GET', 482 'parameters' => [ 483 'name' => [ 484 'location' => 'path', 485 'type' => 'string', 486 'required' => true, 487 ], 488 ], 489 ],'getIamPolicy' => [ 490 'path' => 'v1/{+resource}:getIamPolicy', 491 'httpMethod' => 'GET', 492 'parameters' => [ 493 'resource' => [ 494 'location' => 'path', 495 'type' => 'string', 496 'required' => true, 497 ], 498 'options.requestedPolicyVersion' => [ 499 'location' => 'query', 500 'type' => 'integer', 501 ], 502 ], 503 ],'list' => [ 504 'path' => 'v1/{+parent}/models', 505 'httpMethod' => 'GET', 506 'parameters' => [ 507 'parent' => [ 508 'location' => 'path', 509 'type' => 'string', 510 'required' => true, 511 ], 512 'filter' => [ 513 'location' => 'query', 514 'type' => 'string', 515 ], 516 'pageSize' => [ 517 'location' => 'query', 518 'type' => 'integer', 519 ], 520 'pageToken' => [ 521 'location' => 'query', 522 'type' => 'string', 523 ], 524 ], 525 ],'patch' => [ 526 'path' => 'v1/{+name}', 527 'httpMethod' => 'PATCH', 528 'parameters' => [ 529 'name' => [ 530 'location' => 'path', 531 'type' => 'string', 532 'required' => true, 533 ], 534 'updateMask' => [ 535 'location' => 'query', 536 'type' => 'string', 537 ], 538 ], 539 ],'setIamPolicy' => [ 540 'path' => 'v1/{+resource}:setIamPolicy', 541 'httpMethod' => 'POST', 542 'parameters' => [ 543 'resource' => [ 544 'location' => 'path', 545 'type' => 'string', 546 'required' => true, 547 ], 548 ], 549 ],'testIamPermissions' => [ 550 'path' => 'v1/{+resource}:testIamPermissions', 551 'httpMethod' => 'POST', 552 'parameters' => [ 553 'resource' => [ 554 'location' => 'path', 555 'type' => 'string', 556 'required' => true, 557 ], 558 ], 559 ], 560 ] 561 ] 562 ); 563 $this->projects_models_versions = new CloudMachineLearningEngine\Resource\ProjectsModelsVersions( 564 $this, 565 $this->serviceName, 566 'versions', 567 [ 568 'methods' => [ 569 'create' => [ 570 'path' => 'v1/{+parent}/versions', 571 'httpMethod' => 'POST', 572 'parameters' => [ 573 'parent' => [ 574 'location' => 'path', 575 'type' => 'string', 576 'required' => true, 577 ], 578 ], 579 ],'delete' => [ 580 'path' => 'v1/{+name}', 581 'httpMethod' => 'DELETE', 582 'parameters' => [ 583 'name' => [ 584 'location' => 'path', 585 'type' => 'string', 586 'required' => true, 587 ], 588 ], 589 ],'get' => [ 590 'path' => 'v1/{+name}', 591 'httpMethod' => 'GET', 592 'parameters' => [ 593 'name' => [ 594 'location' => 'path', 595 'type' => 'string', 596 'required' => true, 597 ], 598 ], 599 ],'list' => [ 600 'path' => 'v1/{+parent}/versions', 601 'httpMethod' => 'GET', 602 'parameters' => [ 603 'parent' => [ 604 'location' => 'path', 605 'type' => 'string', 606 'required' => true, 607 ], 608 'filter' => [ 609 'location' => 'query', 610 'type' => 'string', 611 ], 612 'pageSize' => [ 613 'location' => 'query', 614 'type' => 'integer', 615 ], 616 'pageToken' => [ 617 'location' => 'query', 618 'type' => 'string', 619 ], 620 ], 621 ],'patch' => [ 622 'path' => 'v1/{+name}', 623 'httpMethod' => 'PATCH', 624 'parameters' => [ 625 'name' => [ 626 'location' => 'path', 627 'type' => 'string', 628 'required' => true, 629 ], 630 'updateMask' => [ 631 'location' => 'query', 632 'type' => 'string', 633 ], 634 ], 635 ],'setDefault' => [ 636 'path' => 'v1/{+name}:setDefault', 637 'httpMethod' => 'POST', 638 'parameters' => [ 639 'name' => [ 640 'location' => 'path', 641 'type' => 'string', 642 'required' => true, 643 ], 644 ], 645 ], 646 ] 647 ] 648 ); 649 $this->projects_operations = new CloudMachineLearningEngine\Resource\ProjectsOperations( 650 $this, 651 $this->serviceName, 652 'operations', 653 [ 654 'methods' => [ 655 'cancel' => [ 656 'path' => 'v1/{+name}:cancel', 657 'httpMethod' => 'POST', 658 'parameters' => [ 659 'name' => [ 660 'location' => 'path', 661 'type' => 'string', 662 'required' => true, 663 ], 664 ], 665 ],'get' => [ 666 'path' => 'v1/{+name}', 667 'httpMethod' => 'GET', 668 'parameters' => [ 669 'name' => [ 670 'location' => 'path', 671 'type' => 'string', 672 'required' => true, 673 ], 674 ], 675 ],'list' => [ 676 'path' => 'v1/{+name}/operations', 677 'httpMethod' => 'GET', 678 'parameters' => [ 679 'name' => [ 680 'location' => 'path', 681 'type' => 'string', 682 'required' => true, 683 ], 684 'filter' => [ 685 'location' => 'query', 686 'type' => 'string', 687 ], 688 'pageSize' => [ 689 'location' => 'query', 690 'type' => 'integer', 691 ], 692 'pageToken' => [ 693 'location' => 'query', 694 'type' => 'string', 695 ], 696 ], 697 ], 698 ] 699 ] 700 ); 701 } 702} 703 704// Adding a class alias for backwards compatibility with the previous class name. 705class_alias(CloudMachineLearningEngine::class, 'Google_Service_CloudMachineLearningEngine'); 706