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