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 OSConfig (v1). 24 * 25 * <p> 26 * OS management tools that can be used for patch management, patch compliance, 27 * and configuration management on VM instances.</p> 28 * 29 * <p> 30 * For more information about this service, see the API 31 * <a href="https://cloud.google.com/compute/docs/osconfig/rest" target="_blank">Documentation</a> 32 * </p> 33 * 34 * @author Google, Inc. 35 */ 36class OSConfig 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 42 public $projects_locations_instances_inventories; 43 public $projects_locations_instances_osPolicyAssignments_reports; 44 public $projects_locations_instances_vulnerabilityReports; 45 public $projects_locations_osPolicyAssignments; 46 public $projects_locations_osPolicyAssignments_operations; 47 public $projects_patchDeployments; 48 public $projects_patchJobs; 49 public $projects_patchJobs_instanceDetails; 50 51 /** 52 * Constructs the internal representation of the OSConfig service. 53 * 54 * @param Client|array $clientOrConfig The client used to deliver requests, or a 55 * config array to pass to a new Client instance. 56 * @param string $rootUrl The root URL used for requests to the service. 57 */ 58 public function __construct($clientOrConfig = [], $rootUrl = null) 59 { 60 parent::__construct($clientOrConfig); 61 $this->rootUrl = $rootUrl ?: 'https://osconfig.googleapis.com/'; 62 $this->servicePath = ''; 63 $this->batchPath = 'batch'; 64 $this->version = 'v1'; 65 $this->serviceName = 'osconfig'; 66 67 $this->projects_locations_instances_inventories = new OSConfig\Resource\ProjectsLocationsInstancesInventories( 68 $this, 69 $this->serviceName, 70 'inventories', 71 [ 72 'methods' => [ 73 'get' => [ 74 'path' => 'v1/{+name}', 75 'httpMethod' => 'GET', 76 'parameters' => [ 77 'name' => [ 78 'location' => 'path', 79 'type' => 'string', 80 'required' => true, 81 ], 82 'view' => [ 83 'location' => 'query', 84 'type' => 'string', 85 ], 86 ], 87 ],'list' => [ 88 'path' => 'v1/{+parent}/inventories', 89 'httpMethod' => 'GET', 90 'parameters' => [ 91 'parent' => [ 92 'location' => 'path', 93 'type' => 'string', 94 'required' => true, 95 ], 96 'filter' => [ 97 'location' => 'query', 98 'type' => 'string', 99 ], 100 'pageSize' => [ 101 'location' => 'query', 102 'type' => 'integer', 103 ], 104 'pageToken' => [ 105 'location' => 'query', 106 'type' => 'string', 107 ], 108 'view' => [ 109 'location' => 'query', 110 'type' => 'string', 111 ], 112 ], 113 ], 114 ] 115 ] 116 ); 117 $this->projects_locations_instances_osPolicyAssignments_reports = new OSConfig\Resource\ProjectsLocationsInstancesOsPolicyAssignmentsReports( 118 $this, 119 $this->serviceName, 120 'reports', 121 [ 122 'methods' => [ 123 'get' => [ 124 'path' => 'v1/{+name}', 125 'httpMethod' => 'GET', 126 'parameters' => [ 127 'name' => [ 128 'location' => 'path', 129 'type' => 'string', 130 'required' => true, 131 ], 132 ], 133 ],'list' => [ 134 'path' => 'v1/{+parent}/reports', 135 'httpMethod' => 'GET', 136 'parameters' => [ 137 'parent' => [ 138 'location' => 'path', 139 'type' => 'string', 140 'required' => true, 141 ], 142 'filter' => [ 143 'location' => 'query', 144 'type' => 'string', 145 ], 146 'pageSize' => [ 147 'location' => 'query', 148 'type' => 'integer', 149 ], 150 'pageToken' => [ 151 'location' => 'query', 152 'type' => 'string', 153 ], 154 ], 155 ], 156 ] 157 ] 158 ); 159 $this->projects_locations_instances_vulnerabilityReports = new OSConfig\Resource\ProjectsLocationsInstancesVulnerabilityReports( 160 $this, 161 $this->serviceName, 162 'vulnerabilityReports', 163 [ 164 'methods' => [ 165 'get' => [ 166 'path' => 'v1/{+name}', 167 'httpMethod' => 'GET', 168 'parameters' => [ 169 'name' => [ 170 'location' => 'path', 171 'type' => 'string', 172 'required' => true, 173 ], 174 ], 175 ],'list' => [ 176 'path' => 'v1/{+parent}/vulnerabilityReports', 177 'httpMethod' => 'GET', 178 'parameters' => [ 179 'parent' => [ 180 'location' => 'path', 181 'type' => 'string', 182 'required' => true, 183 ], 184 'filter' => [ 185 'location' => 'query', 186 'type' => 'string', 187 ], 188 'pageSize' => [ 189 'location' => 'query', 190 'type' => 'integer', 191 ], 192 'pageToken' => [ 193 'location' => 'query', 194 'type' => 'string', 195 ], 196 ], 197 ], 198 ] 199 ] 200 ); 201 $this->projects_locations_osPolicyAssignments = new OSConfig\Resource\ProjectsLocationsOsPolicyAssignments( 202 $this, 203 $this->serviceName, 204 'osPolicyAssignments', 205 [ 206 'methods' => [ 207 'create' => [ 208 'path' => 'v1/{+parent}/osPolicyAssignments', 209 'httpMethod' => 'POST', 210 'parameters' => [ 211 'parent' => [ 212 'location' => 'path', 213 'type' => 'string', 214 'required' => true, 215 ], 216 'osPolicyAssignmentId' => [ 217 'location' => 'query', 218 'type' => 'string', 219 ], 220 ], 221 ],'delete' => [ 222 'path' => 'v1/{+name}', 223 'httpMethod' => 'DELETE', 224 'parameters' => [ 225 'name' => [ 226 'location' => 'path', 227 'type' => 'string', 228 'required' => true, 229 ], 230 ], 231 ],'get' => [ 232 'path' => 'v1/{+name}', 233 'httpMethod' => 'GET', 234 'parameters' => [ 235 'name' => [ 236 'location' => 'path', 237 'type' => 'string', 238 'required' => true, 239 ], 240 ], 241 ],'list' => [ 242 'path' => 'v1/{+parent}/osPolicyAssignments', 243 'httpMethod' => 'GET', 244 'parameters' => [ 245 'parent' => [ 246 'location' => 'path', 247 'type' => 'string', 248 'required' => true, 249 ], 250 'pageSize' => [ 251 'location' => 'query', 252 'type' => 'integer', 253 ], 254 'pageToken' => [ 255 'location' => 'query', 256 'type' => 'string', 257 ], 258 ], 259 ],'listRevisions' => [ 260 'path' => 'v1/{+name}:listRevisions', 261 'httpMethod' => 'GET', 262 'parameters' => [ 263 'name' => [ 264 'location' => 'path', 265 'type' => 'string', 266 'required' => true, 267 ], 268 'pageSize' => [ 269 'location' => 'query', 270 'type' => 'integer', 271 ], 272 'pageToken' => [ 273 'location' => 'query', 274 'type' => 'string', 275 ], 276 ], 277 ],'patch' => [ 278 'path' => 'v1/{+name}', 279 'httpMethod' => 'PATCH', 280 'parameters' => [ 281 'name' => [ 282 'location' => 'path', 283 'type' => 'string', 284 'required' => true, 285 ], 286 'updateMask' => [ 287 'location' => 'query', 288 'type' => 'string', 289 ], 290 ], 291 ], 292 ] 293 ] 294 ); 295 $this->projects_locations_osPolicyAssignments_operations = new OSConfig\Resource\ProjectsLocationsOsPolicyAssignmentsOperations( 296 $this, 297 $this->serviceName, 298 'operations', 299 [ 300 'methods' => [ 301 'cancel' => [ 302 'path' => 'v1/{+name}:cancel', 303 'httpMethod' => 'POST', 304 'parameters' => [ 305 'name' => [ 306 'location' => 'path', 307 'type' => 'string', 308 'required' => true, 309 ], 310 ], 311 ],'get' => [ 312 'path' => 'v1/{+name}', 313 'httpMethod' => 'GET', 314 'parameters' => [ 315 'name' => [ 316 'location' => 'path', 317 'type' => 'string', 318 'required' => true, 319 ], 320 ], 321 ], 322 ] 323 ] 324 ); 325 $this->projects_patchDeployments = new OSConfig\Resource\ProjectsPatchDeployments( 326 $this, 327 $this->serviceName, 328 'patchDeployments', 329 [ 330 'methods' => [ 331 'create' => [ 332 'path' => 'v1/{+parent}/patchDeployments', 333 'httpMethod' => 'POST', 334 'parameters' => [ 335 'parent' => [ 336 'location' => 'path', 337 'type' => 'string', 338 'required' => true, 339 ], 340 'patchDeploymentId' => [ 341 'location' => 'query', 342 'type' => 'string', 343 ], 344 ], 345 ],'delete' => [ 346 'path' => 'v1/{+name}', 347 'httpMethod' => 'DELETE', 348 'parameters' => [ 349 'name' => [ 350 'location' => 'path', 351 'type' => 'string', 352 'required' => true, 353 ], 354 ], 355 ],'get' => [ 356 'path' => 'v1/{+name}', 357 'httpMethod' => 'GET', 358 'parameters' => [ 359 'name' => [ 360 'location' => 'path', 361 'type' => 'string', 362 'required' => true, 363 ], 364 ], 365 ],'list' => [ 366 'path' => 'v1/{+parent}/patchDeployments', 367 'httpMethod' => 'GET', 368 'parameters' => [ 369 'parent' => [ 370 'location' => 'path', 371 'type' => 'string', 372 'required' => true, 373 ], 374 'pageSize' => [ 375 'location' => 'query', 376 'type' => 'integer', 377 ], 378 'pageToken' => [ 379 'location' => 'query', 380 'type' => 'string', 381 ], 382 ], 383 ],'patch' => [ 384 'path' => 'v1/{+name}', 385 'httpMethod' => 'PATCH', 386 'parameters' => [ 387 'name' => [ 388 'location' => 'path', 389 'type' => 'string', 390 'required' => true, 391 ], 392 'updateMask' => [ 393 'location' => 'query', 394 'type' => 'string', 395 ], 396 ], 397 ],'pause' => [ 398 'path' => 'v1/{+name}:pause', 399 'httpMethod' => 'POST', 400 'parameters' => [ 401 'name' => [ 402 'location' => 'path', 403 'type' => 'string', 404 'required' => true, 405 ], 406 ], 407 ],'resume' => [ 408 'path' => 'v1/{+name}:resume', 409 'httpMethod' => 'POST', 410 'parameters' => [ 411 'name' => [ 412 'location' => 'path', 413 'type' => 'string', 414 'required' => true, 415 ], 416 ], 417 ], 418 ] 419 ] 420 ); 421 $this->projects_patchJobs = new OSConfig\Resource\ProjectsPatchJobs( 422 $this, 423 $this->serviceName, 424 'patchJobs', 425 [ 426 'methods' => [ 427 'cancel' => [ 428 'path' => 'v1/{+name}:cancel', 429 'httpMethod' => 'POST', 430 'parameters' => [ 431 'name' => [ 432 'location' => 'path', 433 'type' => 'string', 434 'required' => true, 435 ], 436 ], 437 ],'execute' => [ 438 'path' => 'v1/{+parent}/patchJobs:execute', 439 'httpMethod' => 'POST', 440 'parameters' => [ 441 'parent' => [ 442 'location' => 'path', 443 'type' => 'string', 444 'required' => true, 445 ], 446 ], 447 ],'get' => [ 448 'path' => 'v1/{+name}', 449 'httpMethod' => 'GET', 450 'parameters' => [ 451 'name' => [ 452 'location' => 'path', 453 'type' => 'string', 454 'required' => true, 455 ], 456 ], 457 ],'list' => [ 458 'path' => 'v1/{+parent}/patchJobs', 459 'httpMethod' => 'GET', 460 'parameters' => [ 461 'parent' => [ 462 'location' => 'path', 463 'type' => 'string', 464 'required' => true, 465 ], 466 'filter' => [ 467 'location' => 'query', 468 'type' => 'string', 469 ], 470 'pageSize' => [ 471 'location' => 'query', 472 'type' => 'integer', 473 ], 474 'pageToken' => [ 475 'location' => 'query', 476 'type' => 'string', 477 ], 478 ], 479 ], 480 ] 481 ] 482 ); 483 $this->projects_patchJobs_instanceDetails = new OSConfig\Resource\ProjectsPatchJobsInstanceDetails( 484 $this, 485 $this->serviceName, 486 'instanceDetails', 487 [ 488 'methods' => [ 489 'list' => [ 490 'path' => 'v1/{+parent}/instanceDetails', 491 'httpMethod' => 'GET', 492 'parameters' => [ 493 'parent' => [ 494 'location' => 'path', 495 'type' => 'string', 496 'required' => true, 497 ], 498 'filter' => [ 499 'location' => 'query', 500 'type' => 'string', 501 ], 502 'pageSize' => [ 503 'location' => 'query', 504 'type' => 'integer', 505 ], 506 'pageToken' => [ 507 'location' => 'query', 508 'type' => 'string', 509 ], 510 ], 511 ], 512 ] 513 ] 514 ); 515 } 516} 517 518// Adding a class alias for backwards compatibility with the previous class name. 519class_alias(OSConfig::class, 'Google_Service_OSConfig'); 520