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 CloudBillingBudget (v1).
|
---|
24 | *
|
---|
25 | * <p>
|
---|
26 | * The Cloud Billing Budget API stores Cloud Billing budgets, which define a
|
---|
27 | * budget plan and the rules to execute as spend is tracked against that plan.</p>
|
---|
28 | *
|
---|
29 | * <p>
|
---|
30 | * For more information about this service, see the API
|
---|
31 | * <a href="https://cloud.google.com/billing/docs/how-to/budget-api-overview" target="_blank">Documentation</a>
|
---|
32 | * </p>
|
---|
33 | *
|
---|
34 | * @author Google, Inc.
|
---|
35 | */
|
---|
36 | class CloudBillingBudget extends \Google\Service
|
---|
37 | {
|
---|
38 | /** View and manage your Google Cloud Platform billing accounts. */
|
---|
39 | const CLOUD_BILLING =
|
---|
40 | "https://www.googleapis.com/auth/cloud-billing";
|
---|
41 | /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
|
---|
42 | const CLOUD_PLATFORM =
|
---|
43 | "https://www.googleapis.com/auth/cloud-platform";
|
---|
44 |
|
---|
45 | public $billingAccounts_budgets;
|
---|
46 | public $rootUrlTemplate;
|
---|
47 |
|
---|
48 | /**
|
---|
49 | * Constructs the internal representation of the CloudBillingBudget service.
|
---|
50 | *
|
---|
51 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
52 | * config array to pass to a new Client instance.
|
---|
53 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
54 | */
|
---|
55 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
56 | {
|
---|
57 | parent::__construct($clientOrConfig);
|
---|
58 | $this->rootUrl = $rootUrl ?: 'https://billingbudgets.googleapis.com/';
|
---|
59 | $this->rootUrlTemplate = $rootUrl ?: 'https://billingbudgets.UNIVERSE_DOMAIN/';
|
---|
60 | $this->servicePath = '';
|
---|
61 | $this->batchPath = 'batch';
|
---|
62 | $this->version = 'v1';
|
---|
63 | $this->serviceName = 'billingbudgets';
|
---|
64 |
|
---|
65 | $this->billingAccounts_budgets = new CloudBillingBudget\Resource\BillingAccountsBudgets(
|
---|
66 | $this,
|
---|
67 | $this->serviceName,
|
---|
68 | 'budgets',
|
---|
69 | [
|
---|
70 | 'methods' => [
|
---|
71 | 'create' => [
|
---|
72 | 'path' => 'v1/{+parent}/budgets',
|
---|
73 | 'httpMethod' => 'POST',
|
---|
74 | 'parameters' => [
|
---|
75 | 'parent' => [
|
---|
76 | 'location' => 'path',
|
---|
77 | 'type' => 'string',
|
---|
78 | 'required' => true,
|
---|
79 | ],
|
---|
80 | ],
|
---|
81 | ],'delete' => [
|
---|
82 | 'path' => 'v1/{+name}',
|
---|
83 | 'httpMethod' => 'DELETE',
|
---|
84 | 'parameters' => [
|
---|
85 | 'name' => [
|
---|
86 | 'location' => 'path',
|
---|
87 | 'type' => 'string',
|
---|
88 | 'required' => true,
|
---|
89 | ],
|
---|
90 | ],
|
---|
91 | ],'get' => [
|
---|
92 | 'path' => 'v1/{+name}',
|
---|
93 | 'httpMethod' => 'GET',
|
---|
94 | 'parameters' => [
|
---|
95 | 'name' => [
|
---|
96 | 'location' => 'path',
|
---|
97 | 'type' => 'string',
|
---|
98 | 'required' => true,
|
---|
99 | ],
|
---|
100 | ],
|
---|
101 | ],'list' => [
|
---|
102 | 'path' => 'v1/{+parent}/budgets',
|
---|
103 | 'httpMethod' => 'GET',
|
---|
104 | 'parameters' => [
|
---|
105 | 'parent' => [
|
---|
106 | 'location' => 'path',
|
---|
107 | 'type' => 'string',
|
---|
108 | 'required' => true,
|
---|
109 | ],
|
---|
110 | 'pageSize' => [
|
---|
111 | 'location' => 'query',
|
---|
112 | 'type' => 'integer',
|
---|
113 | ],
|
---|
114 | 'pageToken' => [
|
---|
115 | 'location' => 'query',
|
---|
116 | 'type' => 'string',
|
---|
117 | ],
|
---|
118 | 'scope' => [
|
---|
119 | 'location' => 'query',
|
---|
120 | 'type' => 'string',
|
---|
121 | ],
|
---|
122 | ],
|
---|
123 | ],'patch' => [
|
---|
124 | 'path' => 'v1/{+name}',
|
---|
125 | 'httpMethod' => 'PATCH',
|
---|
126 | 'parameters' => [
|
---|
127 | 'name' => [
|
---|
128 | 'location' => 'path',
|
---|
129 | 'type' => 'string',
|
---|
130 | 'required' => true,
|
---|
131 | ],
|
---|
132 | 'updateMask' => [
|
---|
133 | 'location' => 'query',
|
---|
134 | 'type' => 'string',
|
---|
135 | ],
|
---|
136 | ],
|
---|
137 | ],
|
---|
138 | ]
|
---|
139 | ]
|
---|
140 | );
|
---|
141 | }
|
---|
142 | }
|
---|
143 |
|
---|
144 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
145 | class_alias(CloudBillingBudget::class, 'Google_Service_CloudBillingBudget');
|
---|