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 |
|
---|
18 | namespace Google\Service;
|
---|
19 |
|
---|
20 | use Google\Client;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Service definition for CloudScheduler (v1).
|
---|
24 | *
|
---|
25 | * <p>
|
---|
26 | * Creates and manages jobs run on a regular recurring schedule.</p>
|
---|
27 | *
|
---|
28 | * <p>
|
---|
29 | * For more information about this service, see the API
|
---|
30 | * <a href="https://cloud.google.com/scheduler/" target="_blank">Documentation</a>
|
---|
31 | * </p>
|
---|
32 | *
|
---|
33 | * @author Google, Inc.
|
---|
34 | */
|
---|
35 | class CloudScheduler 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 $operations;
|
---|
42 | public $projects_locations;
|
---|
43 | public $projects_locations_jobs;
|
---|
44 | public $rootUrlTemplate;
|
---|
45 |
|
---|
46 | /**
|
---|
47 | * Constructs the internal representation of the CloudScheduler service.
|
---|
48 | *
|
---|
49 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
50 | * config array to pass to a new Client instance.
|
---|
51 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
52 | */
|
---|
53 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
54 | {
|
---|
55 | parent::__construct($clientOrConfig);
|
---|
56 | $this->rootUrl = $rootUrl ?: 'https://cloudscheduler.googleapis.com/';
|
---|
57 | $this->rootUrlTemplate = $rootUrl ?: 'https://cloudscheduler.UNIVERSE_DOMAIN/';
|
---|
58 | $this->servicePath = '';
|
---|
59 | $this->batchPath = 'batch';
|
---|
60 | $this->version = 'v1';
|
---|
61 | $this->serviceName = 'cloudscheduler';
|
---|
62 |
|
---|
63 | $this->operations = new CloudScheduler\Resource\Operations(
|
---|
64 | $this,
|
---|
65 | $this->serviceName,
|
---|
66 | 'operations',
|
---|
67 | [
|
---|
68 | 'methods' => [
|
---|
69 | 'cancel' => [
|
---|
70 | 'path' => 'v1/{+name}:cancel',
|
---|
71 | 'httpMethod' => 'POST',
|
---|
72 | 'parameters' => [
|
---|
73 | 'name' => [
|
---|
74 | 'location' => 'path',
|
---|
75 | 'type' => 'string',
|
---|
76 | 'required' => true,
|
---|
77 | ],
|
---|
78 | ],
|
---|
79 | ],'delete' => [
|
---|
80 | 'path' => 'v1/{+name}',
|
---|
81 | 'httpMethod' => 'DELETE',
|
---|
82 | 'parameters' => [
|
---|
83 | 'name' => [
|
---|
84 | 'location' => 'path',
|
---|
85 | 'type' => 'string',
|
---|
86 | 'required' => true,
|
---|
87 | ],
|
---|
88 | ],
|
---|
89 | ],'get' => [
|
---|
90 | 'path' => 'v1/{+name}',
|
---|
91 | 'httpMethod' => 'GET',
|
---|
92 | 'parameters' => [
|
---|
93 | 'name' => [
|
---|
94 | 'location' => 'path',
|
---|
95 | 'type' => 'string',
|
---|
96 | 'required' => true,
|
---|
97 | ],
|
---|
98 | ],
|
---|
99 | ],'list' => [
|
---|
100 | 'path' => 'v1/{+name}',
|
---|
101 | 'httpMethod' => 'GET',
|
---|
102 | 'parameters' => [
|
---|
103 | 'name' => [
|
---|
104 | 'location' => 'path',
|
---|
105 | 'type' => 'string',
|
---|
106 | 'required' => true,
|
---|
107 | ],
|
---|
108 | 'filter' => [
|
---|
109 | 'location' => 'query',
|
---|
110 | 'type' => 'string',
|
---|
111 | ],
|
---|
112 | 'pageSize' => [
|
---|
113 | 'location' => 'query',
|
---|
114 | 'type' => 'integer',
|
---|
115 | ],
|
---|
116 | 'pageToken' => [
|
---|
117 | 'location' => 'query',
|
---|
118 | 'type' => 'string',
|
---|
119 | ],
|
---|
120 | ],
|
---|
121 | ],
|
---|
122 | ]
|
---|
123 | ]
|
---|
124 | );
|
---|
125 | $this->projects_locations = new CloudScheduler\Resource\ProjectsLocations(
|
---|
126 | $this,
|
---|
127 | $this->serviceName,
|
---|
128 | 'locations',
|
---|
129 | [
|
---|
130 | 'methods' => [
|
---|
131 | 'get' => [
|
---|
132 | 'path' => 'v1/{+name}',
|
---|
133 | 'httpMethod' => 'GET',
|
---|
134 | 'parameters' => [
|
---|
135 | 'name' => [
|
---|
136 | 'location' => 'path',
|
---|
137 | 'type' => 'string',
|
---|
138 | 'required' => true,
|
---|
139 | ],
|
---|
140 | ],
|
---|
141 | ],'list' => [
|
---|
142 | 'path' => 'v1/{+name}/locations',
|
---|
143 | 'httpMethod' => 'GET',
|
---|
144 | 'parameters' => [
|
---|
145 | 'name' => [
|
---|
146 | 'location' => 'path',
|
---|
147 | 'type' => 'string',
|
---|
148 | 'required' => true,
|
---|
149 | ],
|
---|
150 | 'filter' => [
|
---|
151 | 'location' => 'query',
|
---|
152 | 'type' => 'string',
|
---|
153 | ],
|
---|
154 | 'pageSize' => [
|
---|
155 | 'location' => 'query',
|
---|
156 | 'type' => 'integer',
|
---|
157 | ],
|
---|
158 | 'pageToken' => [
|
---|
159 | 'location' => 'query',
|
---|
160 | 'type' => 'string',
|
---|
161 | ],
|
---|
162 | ],
|
---|
163 | ],
|
---|
164 | ]
|
---|
165 | ]
|
---|
166 | );
|
---|
167 | $this->projects_locations_jobs = new CloudScheduler\Resource\ProjectsLocationsJobs(
|
---|
168 | $this,
|
---|
169 | $this->serviceName,
|
---|
170 | 'jobs',
|
---|
171 | [
|
---|
172 | 'methods' => [
|
---|
173 | 'create' => [
|
---|
174 | 'path' => 'v1/{+parent}/jobs',
|
---|
175 | 'httpMethod' => 'POST',
|
---|
176 | 'parameters' => [
|
---|
177 | 'parent' => [
|
---|
178 | 'location' => 'path',
|
---|
179 | 'type' => 'string',
|
---|
180 | 'required' => true,
|
---|
181 | ],
|
---|
182 | ],
|
---|
183 | ],'delete' => [
|
---|
184 | 'path' => 'v1/{+name}',
|
---|
185 | 'httpMethod' => 'DELETE',
|
---|
186 | 'parameters' => [
|
---|
187 | 'name' => [
|
---|
188 | 'location' => 'path',
|
---|
189 | 'type' => 'string',
|
---|
190 | 'required' => true,
|
---|
191 | ],
|
---|
192 | ],
|
---|
193 | ],'get' => [
|
---|
194 | 'path' => 'v1/{+name}',
|
---|
195 | 'httpMethod' => 'GET',
|
---|
196 | 'parameters' => [
|
---|
197 | 'name' => [
|
---|
198 | 'location' => 'path',
|
---|
199 | 'type' => 'string',
|
---|
200 | 'required' => true,
|
---|
201 | ],
|
---|
202 | ],
|
---|
203 | ],'list' => [
|
---|
204 | 'path' => 'v1/{+parent}/jobs',
|
---|
205 | 'httpMethod' => 'GET',
|
---|
206 | 'parameters' => [
|
---|
207 | 'parent' => [
|
---|
208 | 'location' => 'path',
|
---|
209 | 'type' => 'string',
|
---|
210 | 'required' => true,
|
---|
211 | ],
|
---|
212 | 'pageSize' => [
|
---|
213 | 'location' => 'query',
|
---|
214 | 'type' => 'integer',
|
---|
215 | ],
|
---|
216 | 'pageToken' => [
|
---|
217 | 'location' => 'query',
|
---|
218 | 'type' => 'string',
|
---|
219 | ],
|
---|
220 | ],
|
---|
221 | ],'patch' => [
|
---|
222 | 'path' => 'v1/{+name}',
|
---|
223 | 'httpMethod' => 'PATCH',
|
---|
224 | 'parameters' => [
|
---|
225 | 'name' => [
|
---|
226 | 'location' => 'path',
|
---|
227 | 'type' => 'string',
|
---|
228 | 'required' => true,
|
---|
229 | ],
|
---|
230 | 'updateMask' => [
|
---|
231 | 'location' => 'query',
|
---|
232 | 'type' => 'string',
|
---|
233 | ],
|
---|
234 | ],
|
---|
235 | ],'pause' => [
|
---|
236 | 'path' => 'v1/{+name}:pause',
|
---|
237 | 'httpMethod' => 'POST',
|
---|
238 | 'parameters' => [
|
---|
239 | 'name' => [
|
---|
240 | 'location' => 'path',
|
---|
241 | 'type' => 'string',
|
---|
242 | 'required' => true,
|
---|
243 | ],
|
---|
244 | ],
|
---|
245 | ],'resume' => [
|
---|
246 | 'path' => 'v1/{+name}:resume',
|
---|
247 | 'httpMethod' => 'POST',
|
---|
248 | 'parameters' => [
|
---|
249 | 'name' => [
|
---|
250 | 'location' => 'path',
|
---|
251 | 'type' => 'string',
|
---|
252 | 'required' => true,
|
---|
253 | ],
|
---|
254 | ],
|
---|
255 | ],'run' => [
|
---|
256 | 'path' => 'v1/{+name}:run',
|
---|
257 | 'httpMethod' => 'POST',
|
---|
258 | 'parameters' => [
|
---|
259 | 'name' => [
|
---|
260 | 'location' => 'path',
|
---|
261 | 'type' => 'string',
|
---|
262 | 'required' => true,
|
---|
263 | ],
|
---|
264 | ],
|
---|
265 | ],
|
---|
266 | ]
|
---|
267 | ]
|
---|
268 | );
|
---|
269 | }
|
---|
270 | }
|
---|
271 |
|
---|
272 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
273 | class_alias(CloudScheduler::class, 'Google_Service_CloudScheduler');
|
---|