source: vendor/google/apiclient-services/src/OSConfig/Resource/ProjectsPatchJobs.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 4.0 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\OSConfig\Resource;
19
20use Google\Service\OSConfig\CancelPatchJobRequest;
21use Google\Service\OSConfig\ExecutePatchJobRequest;
22use Google\Service\OSConfig\ListPatchJobsResponse;
23use Google\Service\OSConfig\PatchJob;
24
25/**
26 * The "patchJobs" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $osconfigService = new Google\Service\OSConfig(...);
30 * $patchJobs = $osconfigService->projects_patchJobs;
31 * </code>
32 */
33class ProjectsPatchJobs extends \Google\Service\Resource
34{
35 /**
36 * Cancel a patch job. The patch job must be active. Canceled patch jobs cannot
37 * be restarted. (patchJobs.cancel)
38 *
39 * @param string $name Required. Name of the patch in the form
40 * `projects/patchJobs`
41 * @param CancelPatchJobRequest $postBody
42 * @param array $optParams Optional parameters.
43 * @return PatchJob
44 * @throws \Google\Service\Exception
45 */
46 public function cancel($name, CancelPatchJobRequest $postBody, $optParams = [])
47 {
48 $params = ['name' => $name, 'postBody' => $postBody];
49 $params = array_merge($params, $optParams);
50 return $this->call('cancel', [$params], PatchJob::class);
51 }
52 /**
53 * Patch VM instances by creating and running a patch job. (patchJobs.execute)
54 *
55 * @param string $parent Required. The project in which to run this patch in the
56 * form `projects`
57 * @param ExecutePatchJobRequest $postBody
58 * @param array $optParams Optional parameters.
59 * @return PatchJob
60 * @throws \Google\Service\Exception
61 */
62 public function execute($parent, ExecutePatchJobRequest $postBody, $optParams = [])
63 {
64 $params = ['parent' => $parent, 'postBody' => $postBody];
65 $params = array_merge($params, $optParams);
66 return $this->call('execute', [$params], PatchJob::class);
67 }
68 /**
69 * Get the patch job. This can be used to track the progress of an ongoing patch
70 * job or review the details of completed jobs. (patchJobs.get)
71 *
72 * @param string $name Required. Name of the patch in the form
73 * `projects/patchJobs`
74 * @param array $optParams Optional parameters.
75 * @return PatchJob
76 * @throws \Google\Service\Exception
77 */
78 public function get($name, $optParams = [])
79 {
80 $params = ['name' => $name];
81 $params = array_merge($params, $optParams);
82 return $this->call('get', [$params], PatchJob::class);
83 }
84 /**
85 * Get a list of patch jobs. (patchJobs.listProjectsPatchJobs)
86 *
87 * @param string $parent Required. In the form of `projects`
88 * @param array $optParams Optional parameters.
89 *
90 * @opt_param string filter If provided, this field specifies the criteria that
91 * must be met by patch jobs to be included in the response. Currently,
92 * filtering is only available on the patch_deployment field.
93 * @opt_param int pageSize The maximum number of instance status to return.
94 * @opt_param string pageToken A pagination token returned from a previous call
95 * that indicates where this listing should continue from.
96 * @return ListPatchJobsResponse
97 * @throws \Google\Service\Exception
98 */
99 public function listProjectsPatchJobs($parent, $optParams = [])
100 {
101 $params = ['parent' => $parent];
102 $params = array_merge($params, $optParams);
103 return $this->call('list', [$params], ListPatchJobsResponse::class);
104 }
105}
106
107// Adding a class alias for backwards compatibility with the previous class name.
108class_alias(ProjectsPatchJobs::class, 'Google_Service_OSConfig_Resource_ProjectsPatchJobs');
Note: See TracBrowser for help on using the repository browser.