source: vendor/google/apiclient-services/src/CloudBillingBudget/Resource/BillingAccountsBudgets.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload new project files

  • Property mode set to 100644
File size: 6.6 KB
Line 
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\CloudBillingBudget\Resource;
19
20use Google\Service\CloudBillingBudget\GoogleCloudBillingBudgetsV1Budget;
21use Google\Service\CloudBillingBudget\GoogleCloudBillingBudgetsV1ListBudgetsResponse;
22use Google\Service\CloudBillingBudget\GoogleProtobufEmpty;
23
24/**
25 * The "budgets" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $billingbudgetsService = new Google\Service\CloudBillingBudget(...);
29 * $budgets = $billingbudgetsService->billingAccounts_budgets;
30 * </code>
31 */
32class BillingAccountsBudgets extends \Google\Service\Resource
33{
34 /**
35 * Creates a new budget. See [Quotas and
36 * limits](https://cloud.google.com/billing/quotas) for more information on the
37 * limits of the number of budgets you can create. (budgets.create)
38 *
39 * @param string $parent Required. The name of the billing account to create the
40 * budget in. Values are of the form `billingAccounts/{billingAccountId}`.
41 * @param GoogleCloudBillingBudgetsV1Budget $postBody
42 * @param array $optParams Optional parameters.
43 * @return GoogleCloudBillingBudgetsV1Budget
44 * @throws \Google\Service\Exception
45 */
46 public function create($parent, GoogleCloudBillingBudgetsV1Budget $postBody, $optParams = [])
47 {
48 $params = ['parent' => $parent, 'postBody' => $postBody];
49 $params = array_merge($params, $optParams);
50 return $this->call('create', [$params], GoogleCloudBillingBudgetsV1Budget::class);
51 }
52 /**
53 * Deletes a budget. Returns successfully if already deleted. (budgets.delete)
54 *
55 * @param string $name Required. Name of the budget to delete. Values are of the
56 * form `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
57 * @param array $optParams Optional parameters.
58 * @return GoogleProtobufEmpty
59 * @throws \Google\Service\Exception
60 */
61 public function delete($name, $optParams = [])
62 {
63 $params = ['name' => $name];
64 $params = array_merge($params, $optParams);
65 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
66 }
67 /**
68 * Returns a budget. WARNING: There are some fields exposed on the Google Cloud
69 * Console that aren't available on this API. When reading from the API, you
70 * will not see these fields in the return value, though they may have been set
71 * in the Cloud Console. (budgets.get)
72 *
73 * @param string $name Required. Name of budget to get. Values are of the form
74 * `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
75 * @param array $optParams Optional parameters.
76 * @return GoogleCloudBillingBudgetsV1Budget
77 * @throws \Google\Service\Exception
78 */
79 public function get($name, $optParams = [])
80 {
81 $params = ['name' => $name];
82 $params = array_merge($params, $optParams);
83 return $this->call('get', [$params], GoogleCloudBillingBudgetsV1Budget::class);
84 }
85 /**
86 * Returns a list of budgets for a billing account. WARNING: There are some
87 * fields exposed on the Google Cloud Console that aren't available on this API.
88 * When reading from the API, you will not see these fields in the return value,
89 * though they may have been set in the Cloud Console.
90 * (budgets.listBillingAccountsBudgets)
91 *
92 * @param string $parent Required. Name of billing account to list budgets
93 * under. Values are of the form `billingAccounts/{billingAccountId}`.
94 * @param array $optParams Optional parameters.
95 *
96 * @opt_param int pageSize Optional. The maximum number of budgets to return per
97 * page. The default and maximum value are 100.
98 * @opt_param string pageToken Optional. The value returned by the last
99 * `ListBudgetsResponse` which indicates that this is a continuation of a prior
100 * `ListBudgets` call, and that the system should return the next page of data.
101 * @opt_param string scope Optional. Set the scope of the budgets to be
102 * returned, in the format of the resource name. The scope of a budget is the
103 * cost that it tracks, such as costs for a single project, or the costs for all
104 * projects in a folder. Only project scope (in the format of "projects/project-
105 * id" or "projects/123") is supported in this field. When this field is set to
106 * a project's resource name, the budgets returned are tracking the costs for
107 * that project.
108 * @return GoogleCloudBillingBudgetsV1ListBudgetsResponse
109 * @throws \Google\Service\Exception
110 */
111 public function listBillingAccountsBudgets($parent, $optParams = [])
112 {
113 $params = ['parent' => $parent];
114 $params = array_merge($params, $optParams);
115 return $this->call('list', [$params], GoogleCloudBillingBudgetsV1ListBudgetsResponse::class);
116 }
117 /**
118 * Updates a budget and returns the updated budget. WARNING: There are some
119 * fields exposed on the Google Cloud Console that aren't available on this API.
120 * Budget fields that are not exposed in this API will not be changed by this
121 * method. (budgets.patch)
122 *
123 * @param string $name Output only. Resource name of the budget. The resource
124 * name implies the scope of a budget. Values are of the form
125 * `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
126 * @param GoogleCloudBillingBudgetsV1Budget $postBody
127 * @param array $optParams Optional parameters.
128 *
129 * @opt_param string updateMask Optional. Indicates which fields in the provided
130 * budget to update. Read-only fields (such as `name`) cannot be changed. If
131 * this is not provided, then only fields with non-default values from the
132 * request are updated. See https://developers.google.com/protocol-
133 * buffers/docs/proto3#default for more details about default values.
134 * @return GoogleCloudBillingBudgetsV1Budget
135 * @throws \Google\Service\Exception
136 */
137 public function patch($name, GoogleCloudBillingBudgetsV1Budget $postBody, $optParams = [])
138 {
139 $params = ['name' => $name, 'postBody' => $postBody];
140 $params = array_merge($params, $optParams);
141 return $this->call('patch', [$params], GoogleCloudBillingBudgetsV1Budget::class);
142 }
143}
144
145// Adding a class alias for backwards compatibility with the previous class name.
146class_alias(BillingAccountsBudgets::class, 'Google_Service_CloudBillingBudget_Resource_BillingAccountsBudgets');
Note: See TracBrowser for help on using the repository browser.