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 ArtifactRegistry (v1). 24 * 25 * <p> 26 * Store and manage build artifacts in a scalable and integrated service built 27 * on Google infrastructure.</p> 28 * 29 * <p> 30 * For more information about this service, see the API 31 * <a href="https://cloud.google.com/artifacts/docs/" target="_blank">Documentation</a> 32 * </p> 33 * 34 * @author Google, Inc. 35 */ 36class ArtifactRegistry extends \Google\Service 37{ 38 /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */ 39 const CLOUD_PLATFORM = 40 "https://www.googleapis.com/auth/cloud-platform"; 41 /** View your data across Google Cloud services and see the email address of your Google Account. */ 42 const CLOUD_PLATFORM_READ_ONLY = 43 "https://www.googleapis.com/auth/cloud-platform.read-only"; 44 45 public $projects; 46 public $projects_locations; 47 public $projects_locations_operations; 48 public $projects_locations_repositories; 49 public $projects_locations_repositories_aptArtifacts; 50 public $projects_locations_repositories_dockerImages; 51 public $projects_locations_repositories_files; 52 public $projects_locations_repositories_packages; 53 public $projects_locations_repositories_packages_tags; 54 public $projects_locations_repositories_packages_versions; 55 public $projects_locations_repositories_yumArtifacts; 56 57 /** 58 * Constructs the internal representation of the ArtifactRegistry service. 59 * 60 * @param Client|array $clientOrConfig The client used to deliver requests, or a 61 * config array to pass to a new Client instance. 62 * @param string $rootUrl The root URL used for requests to the service. 63 */ 64 public function __construct($clientOrConfig = [], $rootUrl = null) 65 { 66 parent::__construct($clientOrConfig); 67 $this->rootUrl = $rootUrl ?: 'https://artifactregistry.googleapis.com/'; 68 $this->servicePath = ''; 69 $this->batchPath = 'batch'; 70 $this->version = 'v1'; 71 $this->serviceName = 'artifactregistry'; 72 73 $this->projects = new ArtifactRegistry\Resource\Projects( 74 $this, 75 $this->serviceName, 76 'projects', 77 [ 78 'methods' => [ 79 'getProjectSettings' => [ 80 'path' => 'v1/{+name}', 81 'httpMethod' => 'GET', 82 'parameters' => [ 83 'name' => [ 84 'location' => 'path', 85 'type' => 'string', 86 'required' => true, 87 ], 88 ], 89 ],'updateProjectSettings' => [ 90 'path' => 'v1/{+name}', 91 'httpMethod' => 'PATCH', 92 'parameters' => [ 93 'name' => [ 94 'location' => 'path', 95 'type' => 'string', 96 'required' => true, 97 ], 98 'updateMask' => [ 99 'location' => 'query', 100 'type' => 'string', 101 ], 102 ], 103 ], 104 ] 105 ] 106 ); 107 $this->projects_locations = new ArtifactRegistry\Resource\ProjectsLocations( 108 $this, 109 $this->serviceName, 110 'locations', 111 [ 112 'methods' => [ 113 'get' => [ 114 'path' => 'v1/{+name}', 115 'httpMethod' => 'GET', 116 'parameters' => [ 117 'name' => [ 118 'location' => 'path', 119 'type' => 'string', 120 'required' => true, 121 ], 122 ], 123 ],'list' => [ 124 'path' => 'v1/{+name}/locations', 125 'httpMethod' => 'GET', 126 'parameters' => [ 127 'name' => [ 128 'location' => 'path', 129 'type' => 'string', 130 'required' => true, 131 ], 132 'filter' => [ 133 'location' => 'query', 134 'type' => 'string', 135 ], 136 'pageSize' => [ 137 'location' => 'query', 138 'type' => 'integer', 139 ], 140 'pageToken' => [ 141 'location' => 'query', 142 'type' => 'string', 143 ], 144 ], 145 ], 146 ] 147 ] 148 ); 149 $this->projects_locations_operations = new ArtifactRegistry\Resource\ProjectsLocationsOperations( 150 $this, 151 $this->serviceName, 152 'operations', 153 [ 154 'methods' => [ 155 'get' => [ 156 'path' => 'v1/{+name}', 157 'httpMethod' => 'GET', 158 'parameters' => [ 159 'name' => [ 160 'location' => 'path', 161 'type' => 'string', 162 'required' => true, 163 ], 164 ], 165 ], 166 ] 167 ] 168 ); 169 $this->projects_locations_repositories = new ArtifactRegistry\Resource\ProjectsLocationsRepositories( 170 $this, 171 $this->serviceName, 172 'repositories', 173 [ 174 'methods' => [ 175 'create' => [ 176 'path' => 'v1/{+parent}/repositories', 177 'httpMethod' => 'POST', 178 'parameters' => [ 179 'parent' => [ 180 'location' => 'path', 181 'type' => 'string', 182 'required' => true, 183 ], 184 'repositoryId' => [ 185 'location' => 'query', 186 'type' => 'string', 187 ], 188 ], 189 ],'delete' => [ 190 'path' => 'v1/{+name}', 191 'httpMethod' => 'DELETE', 192 'parameters' => [ 193 'name' => [ 194 'location' => 'path', 195 'type' => 'string', 196 'required' => true, 197 ], 198 ], 199 ],'get' => [ 200 'path' => 'v1/{+name}', 201 'httpMethod' => 'GET', 202 'parameters' => [ 203 'name' => [ 204 'location' => 'path', 205 'type' => 'string', 206 'required' => true, 207 ], 208 ], 209 ],'getIamPolicy' => [ 210 'path' => 'v1/{+resource}:getIamPolicy', 211 'httpMethod' => 'GET', 212 'parameters' => [ 213 'resource' => [ 214 'location' => 'path', 215 'type' => 'string', 216 'required' => true, 217 ], 218 'options.requestedPolicyVersion' => [ 219 'location' => 'query', 220 'type' => 'integer', 221 ], 222 ], 223 ],'list' => [ 224 'path' => 'v1/{+parent}/repositories', 225 'httpMethod' => 'GET', 226 'parameters' => [ 227 'parent' => [ 228 'location' => 'path', 229 'type' => 'string', 230 'required' => true, 231 ], 232 'pageSize' => [ 233 'location' => 'query', 234 'type' => 'integer', 235 ], 236 'pageToken' => [ 237 'location' => 'query', 238 'type' => 'string', 239 ], 240 ], 241 ],'patch' => [ 242 'path' => 'v1/{+name}', 243 'httpMethod' => 'PATCH', 244 'parameters' => [ 245 'name' => [ 246 'location' => 'path', 247 'type' => 'string', 248 'required' => true, 249 ], 250 'updateMask' => [ 251 'location' => 'query', 252 'type' => 'string', 253 ], 254 ], 255 ],'setIamPolicy' => [ 256 'path' => 'v1/{+resource}:setIamPolicy', 257 'httpMethod' => 'POST', 258 'parameters' => [ 259 'resource' => [ 260 'location' => 'path', 261 'type' => 'string', 262 'required' => true, 263 ], 264 ], 265 ],'testIamPermissions' => [ 266 'path' => 'v1/{+resource}:testIamPermissions', 267 'httpMethod' => 'POST', 268 'parameters' => [ 269 'resource' => [ 270 'location' => 'path', 271 'type' => 'string', 272 'required' => true, 273 ], 274 ], 275 ], 276 ] 277 ] 278 ); 279 $this->projects_locations_repositories_aptArtifacts = new ArtifactRegistry\Resource\ProjectsLocationsRepositoriesAptArtifacts( 280 $this, 281 $this->serviceName, 282 'aptArtifacts', 283 [ 284 'methods' => [ 285 'import' => [ 286 'path' => 'v1/{+parent}/aptArtifacts:import', 287 'httpMethod' => 'POST', 288 'parameters' => [ 289 'parent' => [ 290 'location' => 'path', 291 'type' => 'string', 292 'required' => true, 293 ], 294 ], 295 ],'upload' => [ 296 'path' => 'v1/{+parent}/aptArtifacts:create', 297 'httpMethod' => 'POST', 298 'parameters' => [ 299 'parent' => [ 300 'location' => 'path', 301 'type' => 'string', 302 'required' => true, 303 ], 304 ], 305 ], 306 ] 307 ] 308 ); 309 $this->projects_locations_repositories_dockerImages = new ArtifactRegistry\Resource\ProjectsLocationsRepositoriesDockerImages( 310 $this, 311 $this->serviceName, 312 'dockerImages', 313 [ 314 'methods' => [ 315 'get' => [ 316 'path' => 'v1/{+name}', 317 'httpMethod' => 'GET', 318 'parameters' => [ 319 'name' => [ 320 'location' => 'path', 321 'type' => 'string', 322 'required' => true, 323 ], 324 ], 325 ],'list' => [ 326 'path' => 'v1/{+parent}/dockerImages', 327 'httpMethod' => 'GET', 328 'parameters' => [ 329 'parent' => [ 330 'location' => 'path', 331 'type' => 'string', 332 'required' => true, 333 ], 334 'pageSize' => [ 335 'location' => 'query', 336 'type' => 'integer', 337 ], 338 'pageToken' => [ 339 'location' => 'query', 340 'type' => 'string', 341 ], 342 ], 343 ], 344 ] 345 ] 346 ); 347 $this->projects_locations_repositories_files = new ArtifactRegistry\Resource\ProjectsLocationsRepositoriesFiles( 348 $this, 349 $this->serviceName, 350 'files', 351 [ 352 'methods' => [ 353 'get' => [ 354 'path' => 'v1/{+name}', 355 'httpMethod' => 'GET', 356 'parameters' => [ 357 'name' => [ 358 'location' => 'path', 359 'type' => 'string', 360 'required' => true, 361 ], 362 ], 363 ],'list' => [ 364 'path' => 'v1/{+parent}/files', 365 'httpMethod' => 'GET', 366 'parameters' => [ 367 'parent' => [ 368 'location' => 'path', 369 'type' => 'string', 370 'required' => true, 371 ], 372 'filter' => [ 373 'location' => 'query', 374 'type' => 'string', 375 ], 376 'orderBy' => [ 377 'location' => 'query', 378 'type' => 'string', 379 ], 380 'pageSize' => [ 381 'location' => 'query', 382 'type' => 'integer', 383 ], 384 'pageToken' => [ 385 'location' => 'query', 386 'type' => 'string', 387 ], 388 ], 389 ], 390 ] 391 ] 392 ); 393 $this->projects_locations_repositories_packages = new ArtifactRegistry\Resource\ProjectsLocationsRepositoriesPackages( 394 $this, 395 $this->serviceName, 396 'packages', 397 [ 398 'methods' => [ 399 'delete' => [ 400 'path' => 'v1/{+name}', 401 'httpMethod' => 'DELETE', 402 'parameters' => [ 403 'name' => [ 404 'location' => 'path', 405 'type' => 'string', 406 'required' => true, 407 ], 408 ], 409 ],'get' => [ 410 'path' => 'v1/{+name}', 411 'httpMethod' => 'GET', 412 'parameters' => [ 413 'name' => [ 414 'location' => 'path', 415 'type' => 'string', 416 'required' => true, 417 ], 418 ], 419 ],'list' => [ 420 'path' => 'v1/{+parent}/packages', 421 'httpMethod' => 'GET', 422 'parameters' => [ 423 'parent' => [ 424 'location' => 'path', 425 'type' => 'string', 426 'required' => true, 427 ], 428 'pageSize' => [ 429 'location' => 'query', 430 'type' => 'integer', 431 ], 432 'pageToken' => [ 433 'location' => 'query', 434 'type' => 'string', 435 ], 436 ], 437 ], 438 ] 439 ] 440 ); 441 $this->projects_locations_repositories_packages_tags = new ArtifactRegistry\Resource\ProjectsLocationsRepositoriesPackagesTags( 442 $this, 443 $this->serviceName, 444 'tags', 445 [ 446 'methods' => [ 447 'create' => [ 448 'path' => 'v1/{+parent}/tags', 449 'httpMethod' => 'POST', 450 'parameters' => [ 451 'parent' => [ 452 'location' => 'path', 453 'type' => 'string', 454 'required' => true, 455 ], 456 'tagId' => [ 457 'location' => 'query', 458 'type' => 'string', 459 ], 460 ], 461 ],'delete' => [ 462 'path' => 'v1/{+name}', 463 'httpMethod' => 'DELETE', 464 'parameters' => [ 465 'name' => [ 466 'location' => 'path', 467 'type' => 'string', 468 'required' => true, 469 ], 470 ], 471 ],'get' => [ 472 'path' => 'v1/{+name}', 473 'httpMethod' => 'GET', 474 'parameters' => [ 475 'name' => [ 476 'location' => 'path', 477 'type' => 'string', 478 'required' => true, 479 ], 480 ], 481 ],'list' => [ 482 'path' => 'v1/{+parent}/tags', 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 ],'patch' => [ 504 'path' => 'v1/{+name}', 505 'httpMethod' => 'PATCH', 506 'parameters' => [ 507 'name' => [ 508 'location' => 'path', 509 'type' => 'string', 510 'required' => true, 511 ], 512 'updateMask' => [ 513 'location' => 'query', 514 'type' => 'string', 515 ], 516 ], 517 ], 518 ] 519 ] 520 ); 521 $this->projects_locations_repositories_packages_versions = new ArtifactRegistry\Resource\ProjectsLocationsRepositoriesPackagesVersions( 522 $this, 523 $this->serviceName, 524 'versions', 525 [ 526 'methods' => [ 527 'delete' => [ 528 'path' => 'v1/{+name}', 529 'httpMethod' => 'DELETE', 530 'parameters' => [ 531 'name' => [ 532 'location' => 'path', 533 'type' => 'string', 534 'required' => true, 535 ], 536 'force' => [ 537 'location' => 'query', 538 'type' => 'boolean', 539 ], 540 ], 541 ],'get' => [ 542 'path' => 'v1/{+name}', 543 'httpMethod' => 'GET', 544 'parameters' => [ 545 'name' => [ 546 'location' => 'path', 547 'type' => 'string', 548 'required' => true, 549 ], 550 'view' => [ 551 'location' => 'query', 552 'type' => 'string', 553 ], 554 ], 555 ],'list' => [ 556 'path' => 'v1/{+parent}/versions', 557 'httpMethod' => 'GET', 558 'parameters' => [ 559 'parent' => [ 560 'location' => 'path', 561 'type' => 'string', 562 'required' => true, 563 ], 564 'orderBy' => [ 565 'location' => 'query', 566 'type' => 'string', 567 ], 568 'pageSize' => [ 569 'location' => 'query', 570 'type' => 'integer', 571 ], 572 'pageToken' => [ 573 'location' => 'query', 574 'type' => 'string', 575 ], 576 'view' => [ 577 'location' => 'query', 578 'type' => 'string', 579 ], 580 ], 581 ], 582 ] 583 ] 584 ); 585 $this->projects_locations_repositories_yumArtifacts = new ArtifactRegistry\Resource\ProjectsLocationsRepositoriesYumArtifacts( 586 $this, 587 $this->serviceName, 588 'yumArtifacts', 589 [ 590 'methods' => [ 591 'import' => [ 592 'path' => 'v1/{+parent}/yumArtifacts:import', 593 'httpMethod' => 'POST', 594 'parameters' => [ 595 'parent' => [ 596 'location' => 'path', 597 'type' => 'string', 598 'required' => true, 599 ], 600 ], 601 ],'upload' => [ 602 'path' => 'v1/{+parent}/yumArtifacts:create', 603 'httpMethod' => 'POST', 604 'parameters' => [ 605 'parent' => [ 606 'location' => 'path', 607 'type' => 'string', 608 'required' => true, 609 ], 610 ], 611 ], 612 ] 613 ] 614 ); 615 } 616} 617 618// Adding a class alias for backwards compatibility with the previous class name. 619class_alias(ArtifactRegistry::class, 'Google_Service_ArtifactRegistry'); 620