source: vendor/google/apiclient-services/src/Css/Resource/AccountsLabels.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 3.8 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\Css\Resource;
19
20use Google\Service\Css\AccountLabel;
21use Google\Service\Css\CssEmpty;
22use Google\Service\Css\ListAccountLabelsResponse;
23
24/**
25 * The "labels" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $cssService = new Google\Service\Css(...);
29 * $labels = $cssService->accounts_labels;
30 * </code>
31 */
32class AccountsLabels extends \Google\Service\Resource
33{
34 /**
35 * Creates a new label, not assigned to any account. (labels.create)
36 *
37 * @param string $parent Required. The parent account. Format:
38 * accounts/{account}
39 * @param AccountLabel $postBody
40 * @param array $optParams Optional parameters.
41 * @return AccountLabel
42 * @throws \Google\Service\Exception
43 */
44 public function create($parent, AccountLabel $postBody, $optParams = [])
45 {
46 $params = ['parent' => $parent, 'postBody' => $postBody];
47 $params = array_merge($params, $optParams);
48 return $this->call('create', [$params], AccountLabel::class);
49 }
50 /**
51 * Deletes a label and removes it from all accounts to which it was assigned.
52 * (labels.delete)
53 *
54 * @param string $name Required. The name of the label to delete. Format:
55 * accounts/{account}/labels/{label}
56 * @param array $optParams Optional parameters.
57 * @return CssEmpty
58 * @throws \Google\Service\Exception
59 */
60 public function delete($name, $optParams = [])
61 {
62 $params = ['name' => $name];
63 $params = array_merge($params, $optParams);
64 return $this->call('delete', [$params], CssEmpty::class);
65 }
66 /**
67 * Lists the labels owned by an account. (labels.listAccountsLabels)
68 *
69 * @param string $parent Required. The parent account. Format:
70 * accounts/{account}
71 * @param array $optParams Optional parameters.
72 *
73 * @opt_param int pageSize The maximum number of labels to return. The service
74 * may return fewer than this value. If unspecified, at most 50 labels will be
75 * returned. The maximum value is 1000; values above 1000 will be coerced to
76 * 1000.
77 * @opt_param string pageToken A page token, received from a previous
78 * `ListAccountLabels` call. Provide this to retrieve the subsequent page. When
79 * paginating, all other parameters provided to `ListAccountLabels` must match
80 * the call that provided the page token.
81 * @return ListAccountLabelsResponse
82 * @throws \Google\Service\Exception
83 */
84 public function listAccountsLabels($parent, $optParams = [])
85 {
86 $params = ['parent' => $parent];
87 $params = array_merge($params, $optParams);
88 return $this->call('list', [$params], ListAccountLabelsResponse::class);
89 }
90 /**
91 * Updates a label. (labels.patch)
92 *
93 * @param string $name The resource name of the label. Format:
94 * accounts/{account}/labels/{label}
95 * @param AccountLabel $postBody
96 * @param array $optParams Optional parameters.
97 * @return AccountLabel
98 * @throws \Google\Service\Exception
99 */
100 public function patch($name, AccountLabel $postBody, $optParams = [])
101 {
102 $params = ['name' => $name, 'postBody' => $postBody];
103 $params = array_merge($params, $optParams);
104 return $this->call('patch', [$params], AccountLabel::class);
105 }
106}
107
108// Adding a class alias for backwards compatibility with the previous class name.
109class_alias(AccountsLabels::class, 'Google_Service_Css_Resource_AccountsLabels');
Note: See TracBrowser for help on using the repository browser.