PluginProbe
Authorizer / 2.6.10
Authorizer v2.6.10
3.15.3 3.15.2 3.15.1 3.15.0 3.14.3 3.14.4 3.14.2 3.14.1 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.10 2.9.11 2.9.12 2.9.13 2.9.2 2.9.3 2.9.6 All 126 releases
authorizer / vendor / google-api-php-client / src / Google / Service / Cloudbilling.php

Cloudbilling.php in Authorizer 2.6.10, at vendor/google-api-php-client/src/Google/Service/Cloudbilling.php

445 lines 14.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 * use this file except in compliance with the License. You may obtain a copy of
5 * the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 * License for the specific language governing permissions and limitations under
13 * the License.
14 */
15
16 /**
17 * Service definition for Cloudbilling (v1).
18 *
19 * <p>
20 * Retrieves Google Developers Console billing accounts and associates them with
21 * projects.</p>
22 *
23 * <p>
24 * For more information about this service, see the API
25 * <a href="https://cloud.google.com/billing/" target="_blank">Documentation</a>
26 * </p>
27 *
28 * @author Google, Inc.
29 */
30 class Google_Service_Cloudbilling extends Google_Service
31 {
32 /** View and manage your data across Google Cloud Platform services. */
33 const CLOUD_PLATFORM =
34 "https://www.googleapis.com/auth/cloud-platform";
35
36 public $billingAccounts;
37 public $billingAccounts_projects;
38 public $projects;
39
40
41 /**
42 * Constructs the internal representation of the Cloudbilling service.
43 *
44 * @param Google_Client $client
45 */
46 public function __construct(Google_Client $client)
47 {
48 parent::__construct($client);
49 $this->rootUrl = 'https://cloudbilling.googleapis.com/';
50 $this->servicePath = '';
51 $this->version = 'v1';
52 $this->serviceName = 'cloudbilling';
53
54 $this->billingAccounts = new Google_Service_Cloudbilling_BillingAccounts_Resource(
55 $this,
56 $this->serviceName,
57 'billingAccounts',
58 array(
59 'methods' => array(
60 'get' => array(
61 'path' => 'v1/{+name}',
62 'httpMethod' => 'GET',
63 'parameters' => array(
64 'name' => array(
65 'location' => 'path',
66 'type' => 'string',
67 'required' => true,
68 ),
69 ),
70 ),'list' => array(
71 'path' => 'v1/billingAccounts',
72 'httpMethod' => 'GET',
73 'parameters' => array(
74 'pageSize' => array(
75 'location' => 'query',
76 'type' => 'integer',
77 ),
78 'pageToken' => array(
79 'location' => 'query',
80 'type' => 'string',
81 ),
82 ),
83 ),
84 )
85 )
86 );
87 $this->billingAccounts_projects = new Google_Service_Cloudbilling_BillingAccountsProjects_Resource(
88 $this,
89 $this->serviceName,
90 'projects',
91 array(
92 'methods' => array(
93 'list' => array(
94 'path' => 'v1/{+name}/projects',
95 'httpMethod' => 'GET',
96 'parameters' => array(
97 'name' => array(
98 'location' => 'path',
99 'type' => 'string',
100 'required' => true,
101 ),
102 'pageSize' => array(
103 'location' => 'query',
104 'type' => 'integer',
105 ),
106 'pageToken' => array(
107 'location' => 'query',
108 'type' => 'string',
109 ),
110 ),
111 ),
112 )
113 )
114 );
115 $this->projects = new Google_Service_Cloudbilling_Projects_Resource(
116 $this,
117 $this->serviceName,
118 'projects',
119 array(
120 'methods' => array(
121 'getBillingInfo' => array(
122 'path' => 'v1/{+name}/billingInfo',
123 'httpMethod' => 'GET',
124 'parameters' => array(
125 'name' => array(
126 'location' => 'path',
127 'type' => 'string',
128 'required' => true,
129 ),
130 ),
131 ),'updateBillingInfo' => array(
132 'path' => 'v1/{+name}/billingInfo',
133 'httpMethod' => 'PUT',
134 'parameters' => array(
135 'name' => array(
136 'location' => 'path',
137 'type' => 'string',
138 'required' => true,
139 ),
140 ),
141 ),
142 )
143 )
144 );
145 }
146 }
147
148
149 /**
150 * The "billingAccounts" collection of methods.
151 * Typical usage is:
152 * <code>
153 * $cloudbillingService = new Google_Service_Cloudbilling(...);
154 * $billingAccounts = $cloudbillingService->billingAccounts;
155 * </code>
156 */
157 class Google_Service_Cloudbilling_BillingAccounts_Resource extends Google_Service_Resource
158 {
159
160 /**
161 * Gets information about a billing account. The current authenticated user must
162 * be an [owner of the billing
163 * account](https://support.google.com/cloud/answer/4430947).
164 * (billingAccounts.get)
165 *
166 * @param string $name The resource name of the billing account to retrieve. For
167 * example, `billingAccounts/012345-567890-ABCDEF`.
168 * @param array $optParams Optional parameters.
169 * @return Google_Service_Cloudbilling_BillingAccount
170 */
171 public function get($name, $optParams = array())
172 {
173 $params = array('name' => $name);
174 $params = array_merge($params, $optParams);
175 return $this->call('get', array($params), "Google_Service_Cloudbilling_BillingAccount");
176 }
177
178 /**
179 * Lists the billing accounts that the current authenticated user
180 * [owns](https://support.google.com/cloud/answer/4430947).
181 * (billingAccounts.listBillingAccounts)
182 *
183 * @param array $optParams Optional parameters.
184 *
185 * @opt_param int pageSize Requested page size. The maximum page size is 100;
186 * this is also the default.
187 * @opt_param string pageToken A token identifying a page of results to return.
188 * This should be a `next_page_token` value returned from a previous
189 * `ListBillingAccounts` call. If unspecified, the first page of results is
190 * returned.
191 * @return Google_Service_Cloudbilling_ListBillingAccountsResponse
192 */
193 public function listBillingAccounts($optParams = array())
194 {
195 $params = array();
196 $params = array_merge($params, $optParams);
197 return $this->call('list', array($params), "Google_Service_Cloudbilling_ListBillingAccountsResponse");
198 }
199 }
200
201 /**
202 * The "projects" collection of methods.
203 * Typical usage is:
204 * <code>
205 * $cloudbillingService = new Google_Service_Cloudbilling(...);
206 * $projects = $cloudbillingService->projects;
207 * </code>
208 */
209 class Google_Service_Cloudbilling_BillingAccountsProjects_Resource extends Google_Service_Resource
210 {
211
212 /**
213 * Lists the projects associated with a billing account. The current
214 * authenticated user must be an [owner of the billing
215 * account](https://support.google.com/cloud/answer/4430947).
216 * (projects.listBillingAccountsProjects)
217 *
218 * @param string $name The resource name of the billing account associated with
219 * the projects that you want to list. For example,
220 * `billingAccounts/012345-567890-ABCDEF`.
221 * @param array $optParams Optional parameters.
222 *
223 * @opt_param int pageSize Requested page size. The maximum page size is 100;
224 * this is also the default.
225 * @opt_param string pageToken A token identifying a page of results to be
226 * returned. This should be a `next_page_token` value returned from a previous
227 * `ListProjectBillingInfo` call. If unspecified, the first page of results is
228 * returned.
229 * @return Google_Service_Cloudbilling_ListProjectBillingInfoResponse
230 */
231 public function listBillingAccountsProjects($name, $optParams = array())
232 {
233 $params = array('name' => $name);
234 $params = array_merge($params, $optParams);
235 return $this->call('list', array($params), "Google_Service_Cloudbilling_ListProjectBillingInfoResponse");
236 }
237 }
238
239 /**
240 * The "projects" collection of methods.
241 * Typical usage is:
242 * <code>
243 * $cloudbillingService = new Google_Service_Cloudbilling(...);
244 * $projects = $cloudbillingService->projects;
245 * </code>
246 */
247 class Google_Service_Cloudbilling_Projects_Resource extends Google_Service_Resource
248 {
249
250 /**
251 * Gets the billing information for a project. The current authenticated user
252 * must have [permission to view the project](https://cloud.google.com/docs
253 * /permissions-overview#h.bgs0oxofvnoo ). (projects.getBillingInfo)
254 *
255 * @param string $name The resource name of the project for which billing
256 * information is retrieved. For example, `projects/tokyo-rain-123`.
257 * @param array $optParams Optional parameters.
258 * @return Google_Service_Cloudbilling_ProjectBillingInfo
259 */
260 public function getBillingInfo($name, $optParams = array())
261 {
262 $params = array('name' => $name);
263 $params = array_merge($params, $optParams);
264 return $this->call('getBillingInfo', array($params), "Google_Service_Cloudbilling_ProjectBillingInfo");
265 }
266
267 /**
268 * Sets or updates the billing account associated with a project. You specify
269 * the new billing account by setting the `billing_account_name` in the
270 * `ProjectBillingInfo` resource to the resource name of a billing account.
271 * Associating a project with an open billing account enables billing on the
272 * project and allows charges for resource usage. If the project already had a
273 * billing account, this method changes the billing account used for resource
274 * usage charges. *Note:* Incurred charges that have not yet been reported in
275 * the transaction history of the Google Developers Console may be billed to the
276 * new billing account, even if the charge occurred before the new billing
277 * account was assigned to the project. The current authenticated user must have
278 * ownership privileges for both the [project](https://cloud.google.com/docs
279 * /permissions-overview#h.bgs0oxofvnoo ) and the [billing
280 * account](https://support.google.com/cloud/answer/4430947). You can disable
281 * billing on the project by setting the `billing_account_name` field to empty.
282 * This action disassociates the current billing account from the project. Any
283 * billable activity of your in-use services will stop, and your application
284 * could stop functioning as expected. Any unbilled charges to date will be
285 * billed to the previously associated account. The current authenticated user
286 * must be either an owner of the project or an owner of the billing account for
287 * the project. Note that associating a project with a *closed* billing account
288 * will have much the same effect as disabling billing on the project: any paid
289 * resources used by the project will be shut down. Thus, unless you wish to
290 * disable billing, you should always call this method with the name of an
291 * *open* billing account. (projects.updateBillingInfo)
292 *
293 * @param string $name The resource name of the project associated with the
294 * billing information that you want to update. For example, `projects/tokyo-
295 * rain-123`.
296 * @param Google_ProjectBillingInfo $postBody
297 * @param array $optParams Optional parameters.
298 * @return Google_Service_Cloudbilling_ProjectBillingInfo
299 */
300 public function updateBillingInfo($name, Google_Service_Cloudbilling_ProjectBillingInfo $postBody, $optParams = array())
301 {
302 $params = array('name' => $name, 'postBody' => $postBody);
303 $params = array_merge($params, $optParams);
304 return $this->call('updateBillingInfo', array($params), "Google_Service_Cloudbilling_ProjectBillingInfo");
305 }
306 }
307
308
309
310
311 class Google_Service_Cloudbilling_BillingAccount extends Google_Model
312 {
313 protected $internal_gapi_mappings = array(
314 );
315 public $displayName;
316 public $name;
317 public $open;
318
319
320 public function setDisplayName($displayName)
321 {
322 $this->displayName = $displayName;
323 }
324 public function getDisplayName()
325 {
326 return $this->displayName;
327 }
328 public function setName($name)
329 {
330 $this->name = $name;
331 }
332 public function getName()
333 {
334 return $this->name;
335 }
336 public function setOpen($open)
337 {
338 $this->open = $open;
339 }
340 public function getOpen()
341 {
342 return $this->open;
343 }
344 }
345
346 class Google_Service_Cloudbilling_ListBillingAccountsResponse extends Google_Collection
347 {
348 protected $collection_key = 'billingAccounts';
349 protected $internal_gapi_mappings = array(
350 );
351 protected $billingAccountsType = 'Google_Service_Cloudbilling_BillingAccount';
352 protected $billingAccountsDataType = 'array';
353 public $nextPageToken;
354
355
356 public function setBillingAccounts($billingAccounts)
357 {
358 $this->billingAccounts = $billingAccounts;
359 }
360 public function getBillingAccounts()
361 {
362 return $this->billingAccounts;
363 }
364 public function setNextPageToken($nextPageToken)
365 {
366 $this->nextPageToken = $nextPageToken;
367 }
368 public function getNextPageToken()
369 {
370 return $this->nextPageToken;
371 }
372 }
373
374 class Google_Service_Cloudbilling_ListProjectBillingInfoResponse extends Google_Collection
375 {
376 protected $collection_key = 'projectBillingInfo';
377 protected $internal_gapi_mappings = array(
378 );
379 public $nextPageToken;
380 protected $projectBillingInfoType = 'Google_Service_Cloudbilling_ProjectBillingInfo';
381 protected $projectBillingInfoDataType = 'array';
382
383
384 public function setNextPageToken($nextPageToken)
385 {
386 $this->nextPageToken = $nextPageToken;
387 }
388 public function getNextPageToken()
389 {
390 return $this->nextPageToken;
391 }
392 public function setProjectBillingInfo($projectBillingInfo)
393 {
394 $this->projectBillingInfo = $projectBillingInfo;
395 }
396 public function getProjectBillingInfo()
397 {
398 return $this->projectBillingInfo;
399 }
400 }
401
402 class Google_Service_Cloudbilling_ProjectBillingInfo extends Google_Model
403 {
404 protected $internal_gapi_mappings = array(
405 );
406 public $billingAccountName;
407 public $billingEnabled;
408 public $name;
409 public $projectId;
410
411
412 public function setBillingAccountName($billingAccountName)
413 {
414 $this->billingAccountName = $billingAccountName;
415 }
416 public function getBillingAccountName()
417 {
418 return $this->billingAccountName;
419 }
420 public function setBillingEnabled($billingEnabled)
421 {
422 $this->billingEnabled = $billingEnabled;
423 }
424 public function getBillingEnabled()
425 {
426 return $this->billingEnabled;
427 }
428 public function setName($name)
429 {
430 $this->name = $name;
431 }
432 public function getName()
433 {
434 return $this->name;
435 }
436 public function setProjectId($projectId)
437 {
438 $this->projectId = $projectId;
439 }
440 public function getProjectId()
441 {
442 return $this->projectId;
443 }
444 }
445