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 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 */
35class 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 $projects_locations;
42  public $projects_locations_jobs;
43
44  /**
45   * Constructs the internal representation of the CloudScheduler service.
46   *
47   * @param Client|array $clientOrConfig The client used to deliver requests, or a
48   *                                     config array to pass to a new Client instance.
49   * @param string $rootUrl The root URL used for requests to the service.
50   */
51  public function __construct($clientOrConfig = [], $rootUrl = null)
52  {
53    parent::__construct($clientOrConfig);
54    $this->rootUrl = $rootUrl ?: 'https://cloudscheduler.googleapis.com/';
55    $this->servicePath = '';
56    $this->batchPath = 'batch';
57    $this->version = 'v1';
58    $this->serviceName = 'cloudscheduler';
59
60    $this->projects_locations = new CloudScheduler\Resource\ProjectsLocations(
61        $this,
62        $this->serviceName,
63        'locations',
64        [
65          'methods' => [
66            'get' => [
67              'path' => 'v1/{+name}',
68              'httpMethod' => 'GET',
69              'parameters' => [
70                'name' => [
71                  'location' => 'path',
72                  'type' => 'string',
73                  'required' => true,
74                ],
75              ],
76            ],'list' => [
77              'path' => 'v1/{+name}/locations',
78              'httpMethod' => 'GET',
79              'parameters' => [
80                'name' => [
81                  'location' => 'path',
82                  'type' => 'string',
83                  'required' => true,
84                ],
85                'filter' => [
86                  'location' => 'query',
87                  'type' => 'string',
88                ],
89                'pageSize' => [
90                  'location' => 'query',
91                  'type' => 'integer',
92                ],
93                'pageToken' => [
94                  'location' => 'query',
95                  'type' => 'string',
96                ],
97              ],
98            ],
99          ]
100        ]
101    );
102    $this->projects_locations_jobs = new CloudScheduler\Resource\ProjectsLocationsJobs(
103        $this,
104        $this->serviceName,
105        'jobs',
106        [
107          'methods' => [
108            'create' => [
109              'path' => 'v1/{+parent}/jobs',
110              'httpMethod' => 'POST',
111              'parameters' => [
112                'parent' => [
113                  'location' => 'path',
114                  'type' => 'string',
115                  'required' => true,
116                ],
117              ],
118            ],'delete' => [
119              'path' => 'v1/{+name}',
120              'httpMethod' => 'DELETE',
121              'parameters' => [
122                'name' => [
123                  'location' => 'path',
124                  'type' => 'string',
125                  'required' => true,
126                ],
127              ],
128            ],'get' => [
129              'path' => 'v1/{+name}',
130              'httpMethod' => 'GET',
131              'parameters' => [
132                'name' => [
133                  'location' => 'path',
134                  'type' => 'string',
135                  'required' => true,
136                ],
137              ],
138            ],'list' => [
139              'path' => 'v1/{+parent}/jobs',
140              'httpMethod' => 'GET',
141              'parameters' => [
142                'parent' => [
143                  'location' => 'path',
144                  'type' => 'string',
145                  'required' => true,
146                ],
147                'pageSize' => [
148                  'location' => 'query',
149                  'type' => 'integer',
150                ],
151                'pageToken' => [
152                  'location' => 'query',
153                  'type' => 'string',
154                ],
155              ],
156            ],'patch' => [
157              'path' => 'v1/{+name}',
158              'httpMethod' => 'PATCH',
159              'parameters' => [
160                'name' => [
161                  'location' => 'path',
162                  'type' => 'string',
163                  'required' => true,
164                ],
165                'updateMask' => [
166                  'location' => 'query',
167                  'type' => 'string',
168                ],
169              ],
170            ],'pause' => [
171              'path' => 'v1/{+name}:pause',
172              'httpMethod' => 'POST',
173              'parameters' => [
174                'name' => [
175                  'location' => 'path',
176                  'type' => 'string',
177                  'required' => true,
178                ],
179              ],
180            ],'resume' => [
181              'path' => 'v1/{+name}:resume',
182              'httpMethod' => 'POST',
183              'parameters' => [
184                'name' => [
185                  'location' => 'path',
186                  'type' => 'string',
187                  'required' => true,
188                ],
189              ],
190            ],'run' => [
191              'path' => 'v1/{+name}:run',
192              'httpMethod' => 'POST',
193              'parameters' => [
194                'name' => [
195                  'location' => 'path',
196                  'type' => 'string',
197                  'required' => true,
198                ],
199              ],
200            ],
201          ]
202        ]
203    );
204  }
205}
206
207// Adding a class alias for backwards compatibility with the previous class name.
208class_alias(CloudScheduler::class, 'Google_Service_CloudScheduler');
209