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/**
19 * Service definition for CloudFunctions (v1).
20 *
21 * <p>
22 * Manages lightweight user-provided functions executed in response to events.</p>
23 *
24 * <p>
25 * For more information about this service, see the API
26 * <a href="https://cloud.google.com/functions" target="_blank">Documentation</a>
27 * </p>
28 *
29 * @author Google, Inc.
30 */
31class Google_Service_CloudFunctions extends Google_Service
32{
33  /** View and manage your data across Google Cloud Platform services. */
34  const CLOUD_PLATFORM =
35      "https://www.googleapis.com/auth/cloud-platform";
36
37  public $operations;
38  public $projects_locations;
39  public $projects_locations_functions;
40
41  /**
42   * Constructs the internal representation of the CloudFunctions service.
43   *
44   * @param Google_Client $client
45   */
46  public function __construct(Google_Client $client)
47  {
48    parent::__construct($client);
49    $this->rootUrl = 'https://cloudfunctions.googleapis.com/';
50    $this->servicePath = '';
51    $this->batchPath = 'batch';
52    $this->version = 'v1';
53    $this->serviceName = 'cloudfunctions';
54
55    $this->operations = new Google_Service_CloudFunctions_Resource_Operations(
56        $this,
57        $this->serviceName,
58        'operations',
59        array(
60          'methods' => array(
61            'get' => array(
62              'path' => 'v1/{+name}',
63              'httpMethod' => 'GET',
64              'parameters' => array(
65                'name' => array(
66                  'location' => 'path',
67                  'type' => 'string',
68                  'required' => true,
69                ),
70              ),
71            ),'list' => array(
72              'path' => 'v1/operations',
73              'httpMethod' => 'GET',
74              'parameters' => array(
75                'name' => array(
76                  'location' => 'query',
77                  'type' => 'string',
78                ),
79                'pageToken' => array(
80                  'location' => 'query',
81                  'type' => 'string',
82                ),
83                'pageSize' => array(
84                  'location' => 'query',
85                  'type' => 'integer',
86                ),
87                'filter' => array(
88                  'location' => 'query',
89                  'type' => 'string',
90                ),
91              ),
92            ),
93          )
94        )
95    );
96    $this->projects_locations = new Google_Service_CloudFunctions_Resource_ProjectsLocations(
97        $this,
98        $this->serviceName,
99        'locations',
100        array(
101          'methods' => array(
102            'list' => array(
103              'path' => 'v1/{+name}/locations',
104              'httpMethod' => 'GET',
105              'parameters' => array(
106                'name' => array(
107                  'location' => 'path',
108                  'type' => 'string',
109                  'required' => true,
110                ),
111                'filter' => array(
112                  'location' => 'query',
113                  'type' => 'string',
114                ),
115                'pageToken' => array(
116                  'location' => 'query',
117                  'type' => 'string',
118                ),
119                'pageSize' => array(
120                  'location' => 'query',
121                  'type' => 'integer',
122                ),
123              ),
124            ),
125          )
126        )
127    );
128    $this->projects_locations_functions = new Google_Service_CloudFunctions_Resource_ProjectsLocationsFunctions(
129        $this,
130        $this->serviceName,
131        'functions',
132        array(
133          'methods' => array(
134            'call' => array(
135              'path' => 'v1/{+name}:call',
136              'httpMethod' => 'POST',
137              'parameters' => array(
138                'name' => array(
139                  'location' => 'path',
140                  'type' => 'string',
141                  'required' => true,
142                ),
143              ),
144            ),'create' => array(
145              'path' => 'v1/{+location}/functions',
146              'httpMethod' => 'POST',
147              'parameters' => array(
148                'location' => array(
149                  'location' => 'path',
150                  'type' => 'string',
151                  'required' => true,
152                ),
153              ),
154            ),'delete' => array(
155              'path' => 'v1/{+name}',
156              'httpMethod' => 'DELETE',
157              'parameters' => array(
158                'name' => array(
159                  'location' => 'path',
160                  'type' => 'string',
161                  'required' => true,
162                ),
163              ),
164            ),'generateDownloadUrl' => array(
165              'path' => 'v1/{+name}:generateDownloadUrl',
166              'httpMethod' => 'POST',
167              'parameters' => array(
168                'name' => array(
169                  'location' => 'path',
170                  'type' => 'string',
171                  'required' => true,
172                ),
173              ),
174            ),'generateUploadUrl' => array(
175              'path' => 'v1/{+parent}/functions:generateUploadUrl',
176              'httpMethod' => 'POST',
177              'parameters' => array(
178                'parent' => array(
179                  'location' => 'path',
180                  'type' => 'string',
181                  'required' => true,
182                ),
183              ),
184            ),'get' => array(
185              'path' => 'v1/{+name}',
186              'httpMethod' => 'GET',
187              'parameters' => array(
188                'name' => array(
189                  'location' => 'path',
190                  'type' => 'string',
191                  'required' => true,
192                ),
193              ),
194            ),'getIamPolicy' => array(
195              'path' => 'v1/{+resource}:getIamPolicy',
196              'httpMethod' => 'GET',
197              'parameters' => array(
198                'resource' => array(
199                  'location' => 'path',
200                  'type' => 'string',
201                  'required' => true,
202                ),
203              ),
204            ),'list' => array(
205              'path' => 'v1/{+parent}/functions',
206              'httpMethod' => 'GET',
207              'parameters' => array(
208                'parent' => array(
209                  'location' => 'path',
210                  'type' => 'string',
211                  'required' => true,
212                ),
213                'pageToken' => array(
214                  'location' => 'query',
215                  'type' => 'string',
216                ),
217                'pageSize' => array(
218                  'location' => 'query',
219                  'type' => 'integer',
220                ),
221              ),
222            ),'patch' => array(
223              'path' => 'v1/{+name}',
224              'httpMethod' => 'PATCH',
225              'parameters' => array(
226                'name' => array(
227                  'location' => 'path',
228                  'type' => 'string',
229                  'required' => true,
230                ),
231                'updateMask' => array(
232                  'location' => 'query',
233                  'type' => 'string',
234                ),
235              ),
236            ),'setIamPolicy' => array(
237              'path' => 'v1/{+resource}:setIamPolicy',
238              'httpMethod' => 'POST',
239              'parameters' => array(
240                'resource' => array(
241                  'location' => 'path',
242                  'type' => 'string',
243                  'required' => true,
244                ),
245              ),
246            ),'testIamPermissions' => array(
247              'path' => 'v1/{+resource}:testIamPermissions',
248              'httpMethod' => 'POST',
249              'parameters' => array(
250                'resource' => array(
251                  'location' => 'path',
252                  'type' => 'string',
253                  'required' => true,
254                ),
255              ),
256            ),
257          )
258        )
259    );
260  }
261}
262