source: vendor/google/apiclient-services/src/Area120Tables/Resource/TablesRows.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: 7.3 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\Area120Tables\Resource;
19
20use Google\Service\Area120Tables\Area120tablesEmpty;
21use Google\Service\Area120Tables\BatchCreateRowsRequest;
22use Google\Service\Area120Tables\BatchCreateRowsResponse;
23use Google\Service\Area120Tables\BatchDeleteRowsRequest;
24use Google\Service\Area120Tables\BatchUpdateRowsRequest;
25use Google\Service\Area120Tables\BatchUpdateRowsResponse;
26use Google\Service\Area120Tables\ListRowsResponse;
27use Google\Service\Area120Tables\Row;
28
29/**
30 * The "rows" collection of methods.
31 * Typical usage is:
32 * <code>
33 * $area120tablesService = new Google\Service\Area120Tables(...);
34 * $rows = $area120tablesService->tables_rows;
35 * </code>
36 */
37class TablesRows extends \Google\Service\Resource
38{
39 /**
40 * Creates multiple rows. (rows.batchCreate)
41 *
42 * @param string $parent Required. The parent table where the rows will be
43 * created. Format: tables/{table}
44 * @param BatchCreateRowsRequest $postBody
45 * @param array $optParams Optional parameters.
46 * @return BatchCreateRowsResponse
47 * @throws \Google\Service\Exception
48 */
49 public function batchCreate($parent, BatchCreateRowsRequest $postBody, $optParams = [])
50 {
51 $params = ['parent' => $parent, 'postBody' => $postBody];
52 $params = array_merge($params, $optParams);
53 return $this->call('batchCreate', [$params], BatchCreateRowsResponse::class);
54 }
55 /**
56 * Deletes multiple rows. (rows.batchDelete)
57 *
58 * @param string $parent Required. The parent table shared by all rows being
59 * deleted. Format: tables/{table}
60 * @param BatchDeleteRowsRequest $postBody
61 * @param array $optParams Optional parameters.
62 * @return Area120tablesEmpty
63 * @throws \Google\Service\Exception
64 */
65 public function batchDelete($parent, BatchDeleteRowsRequest $postBody, $optParams = [])
66 {
67 $params = ['parent' => $parent, 'postBody' => $postBody];
68 $params = array_merge($params, $optParams);
69 return $this->call('batchDelete', [$params], Area120tablesEmpty::class);
70 }
71 /**
72 * Updates multiple rows. (rows.batchUpdate)
73 *
74 * @param string $parent Required. The parent table shared by all rows being
75 * updated. Format: tables/{table}
76 * @param BatchUpdateRowsRequest $postBody
77 * @param array $optParams Optional parameters.
78 * @return BatchUpdateRowsResponse
79 * @throws \Google\Service\Exception
80 */
81 public function batchUpdate($parent, BatchUpdateRowsRequest $postBody, $optParams = [])
82 {
83 $params = ['parent' => $parent, 'postBody' => $postBody];
84 $params = array_merge($params, $optParams);
85 return $this->call('batchUpdate', [$params], BatchUpdateRowsResponse::class);
86 }
87 /**
88 * Creates a row. (rows.create)
89 *
90 * @param string $parent Required. The parent table where this row will be
91 * created. Format: tables/{table}
92 * @param Row $postBody
93 * @param array $optParams Optional parameters.
94 *
95 * @opt_param string view Optional. Column key to use for values in the row.
96 * Defaults to user entered name.
97 * @return Row
98 * @throws \Google\Service\Exception
99 */
100 public function create($parent, Row $postBody, $optParams = [])
101 {
102 $params = ['parent' => $parent, 'postBody' => $postBody];
103 $params = array_merge($params, $optParams);
104 return $this->call('create', [$params], Row::class);
105 }
106 /**
107 * Deletes a row. (rows.delete)
108 *
109 * @param string $name Required. The name of the row to delete. Format:
110 * tables/{table}/rows/{row}
111 * @param array $optParams Optional parameters.
112 * @return Area120tablesEmpty
113 * @throws \Google\Service\Exception
114 */
115 public function delete($name, $optParams = [])
116 {
117 $params = ['name' => $name];
118 $params = array_merge($params, $optParams);
119 return $this->call('delete', [$params], Area120tablesEmpty::class);
120 }
121 /**
122 * Gets a row. Returns NOT_FOUND if the row does not exist in the table.
123 * (rows.get)
124 *
125 * @param string $name Required. The name of the row to retrieve. Format:
126 * tables/{table}/rows/{row}
127 * @param array $optParams Optional parameters.
128 *
129 * @opt_param string view Optional. Column key to use for values in the row.
130 * Defaults to user entered name.
131 * @return Row
132 * @throws \Google\Service\Exception
133 */
134 public function get($name, $optParams = [])
135 {
136 $params = ['name' => $name];
137 $params = array_merge($params, $optParams);
138 return $this->call('get', [$params], Row::class);
139 }
140 /**
141 * Lists rows in a table. Returns NOT_FOUND if the table does not exist.
142 * (rows.listTablesRows)
143 *
144 * @param string $parent Required. The parent table. Format: tables/{table}
145 * @param array $optParams Optional parameters.
146 *
147 * @opt_param string filter Optional. Filter to only include resources matching
148 * the requirements. For more information, see [Filtering list
149 * results](https://support.google.com/area120-tables/answer/10503371).
150 * @opt_param string orderBy Optional. Sorting order for the list of rows on
151 * createTime/updateTime.
152 * @opt_param int pageSize The maximum number of rows to return. The service may
153 * return fewer than this value. If unspecified, at most 50 rows are returned.
154 * The maximum value is 1,000; values above 1,000 are coerced to 1,000.
155 * @opt_param string pageToken A page token, received from a previous `ListRows`
156 * call. Provide this to retrieve the subsequent page. When paginating, all
157 * other parameters provided to `ListRows` must match the call that provided the
158 * page token.
159 * @opt_param string view Optional. Column key to use for values in the row.
160 * Defaults to user entered name.
161 * @return ListRowsResponse
162 * @throws \Google\Service\Exception
163 */
164 public function listTablesRows($parent, $optParams = [])
165 {
166 $params = ['parent' => $parent];
167 $params = array_merge($params, $optParams);
168 return $this->call('list', [$params], ListRowsResponse::class);
169 }
170 /**
171 * Updates a row. (rows.patch)
172 *
173 * @param string $name The resource name of the row. Row names have the form
174 * `tables/{table}/rows/{row}`. The name is ignored when creating a row.
175 * @param Row $postBody
176 * @param array $optParams Optional parameters.
177 *
178 * @opt_param string updateMask The list of fields to update.
179 * @opt_param string view Optional. Column key to use for values in the row.
180 * Defaults to user entered name.
181 * @return Row
182 * @throws \Google\Service\Exception
183 */
184 public function patch($name, Row $postBody, $optParams = [])
185 {
186 $params = ['name' => $name, 'postBody' => $postBody];
187 $params = array_merge($params, $optParams);
188 return $this->call('patch', [$params], Row::class);
189 }
190}
191
192// Adding a class alias for backwards compatibility with the previous class name.
193class_alias(TablesRows::class, 'Google_Service_Area120Tables_Resource_TablesRows');
Note: See TracBrowser for help on using the repository browser.