PluginProbe
WP Database Backup – Unlimited Database & Files Backup by Backup for WP / 6.11
WP Database Backup – Unlimited Database & Files Backup by Backup for WP v6.11
7.13 7.12 trunk 1.1 2.1.1 5.9 6.0 6.1 6.10 6.11 6.12 6.12.1 6.2 6.3 6.4 6.5 6.5.1 6.6 6.7 6.8 6.9 7.0 7.0.1 7.1 7.10 All 34 releases
wp-database-backup / includes / admin / Destination / Google / google-api-php-client / src / contrib / Google_FreebaseService.php

Google_FreebaseService.php in WP Database Backup – Unlimited Database & Files Backup by Backup for WP 6.11, at includes/admin/Destination/Google/google-api-php-client/src/contrib/Google_FreebaseService.php

389 lines 14.3 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 /**
18 * The "text" collection of methods.
19 * Typical usage is:
20 * <code>
21 * $freebaseService = new Google_FreebaseService(...);
22 * $text = $freebaseService->text;
23 * </code>
24 */
25 class Google_TextServiceResource extends Google_ServiceResource {
26
27 /**
28 * Returns blob attached to node at specified id as HTML (text.get)
29 *
30 * @param string $id The id of the item that you want data about
31 * @param array $optParams Optional parameters.
32 *
33 * @opt_param string format Sanitizing transformation.
34 * @opt_param string maxlength The max number of characters to return. Valid only for 'plain' format.
35 * @return Google_ContentserviceGet
36 */
37 public function get($id, $optParams = array()) {
38 $params = array('id' => $id);
39 $params = array_merge($params, $optParams);
40 $data = $this->__call('get', array($params));
41 if ($this->useObjects()) {
42 return new Google_ContentserviceGet($data);
43 } else {
44 return $data;
45 }
46 }
47 }
48
49 /**
50 * The "topic" collection of methods.
51 * Typical usage is:
52 * <code>
53 * $freebaseService = new Google_FreebaseService(...);
54 * $topic = $freebaseService->topic;
55 * </code>
56 */
57 class Google_TopicServiceResource extends Google_ServiceResource {
58
59 /**
60 * Get properties and meta-data about a topic. (topic.lookup)
61 *
62 * @param string $id The id of the item that you want data about.
63 * @param array $optParams Optional parameters.
64 *
65 * @opt_param string dateline Determines how up-to-date the data returned is. A unix epoch time, a guid or a 'now'
66 * @opt_param string filter A frebase domain, type or property id, 'suggest', 'commons', or 'all'. Filter the results and returns only appropriate properties.
67 * @opt_param string lang The language you 'd like the content in - a freebase /type/lang language key.
68 * @opt_param string limit The maximum number of property values to return for each property.
69 * @opt_param bool raw Do not apply any constraints, or get any names.
70 * @return Google_TopicLookup
71 */
72 public function lookup($id, $optParams = array()) {
73 $params = array('id' => $id);
74 $params = array_merge($params, $optParams);
75 $data = $this->__call('lookup', array($params));
76 if ($this->useObjects()) {
77 return new Google_TopicLookup($data);
78 } else {
79 return $data;
80 }
81 }
82 }
83
84 /**
85 * Service definition for Google_Freebase (v1).
86 *
87 * <p>
88 * Topic and MQL APIs provide you structured access to Freebase data.
89 * </p>
90 *
91 * <p>
92 * For more information about this service, see the
93 * <a href="https://developers.google.com/freebase/" target="_blank">API Documentation</a>
94 * </p>
95 *
96 * @author Google, Inc.
97 */
98 class Google_FreebaseService extends Google_Service {
99 public $text;
100 public $topic;
101 /**
102 * Constructs the internal representation of the Freebase service.
103 *
104 * @param Google_Client $client
105 */
106 public function __construct(Google_Client $client) {
107 $this->servicePath = 'freebase/v1/';
108 $this->version = 'v1';
109 $this->serviceName = 'freebase';
110
111 $client->addService($this->serviceName, $this->version);
112 $this->text = new Google_TextServiceResource($this, $this->serviceName, 'text', json_decode('{"methods": {"get": {"id": "freebase.text.get", "path": "text{/id*}", "httpMethod": "GET", "parameters": {"format": {"type": "string", "default": "plain", "enum": ["html", "plain", "raw"], "location": "query"}, "id": {"type": "string", "required": true, "repeated": true, "location": "path"}, "maxlength": {"type": "integer", "format": "uint32", "location": "query"}}, "response": {"$ref": "ContentserviceGet"}}}}', true));
113 $this->topic = new Google_TopicServiceResource($this, $this->serviceName, 'topic', json_decode('{"methods": {"lookup": {"id": "freebase.topic.lookup", "path": "topic{/id*}", "httpMethod": "GET", "parameters": {"dateline": {"type": "string", "location": "query"}, "filter": {"type": "string", "repeated": true, "location": "query"}, "id": {"type": "string", "required": true, "repeated": true, "location": "path"}, "lang": {"type": "string", "default": "en", "location": "query"}, "limit": {"type": "integer", "default": "10", "format": "uint32", "location": "query"}, "raw": {"type": "boolean", "default": "false", "location": "query"}}, "response": {"$ref": "TopicLookup"}}}}', true));
114
115 $this->image = new Google_ImageServiceResource($this, $this->serviceName, 'image', json_decode('{"httpMethod": "GET", "path": "image{/id*}", "supportsMediaDownload": true, "id": "freebase.image", "parameters": {"fallbackid": {"type": "string", "default": "/freebase/no_image_png", "location": "query"}, "id": {"type": "string", "required": true, "repeated": true, "location": "path"}, "maxheight": {"type": "integer", "format": "uint32", "maximum": "4096", "location": "query"}, "maxwidth": {"type": "integer", "format": "uint32", "maximum": "4096", "location": "query"}, "mode": {"type": "string", "default": "fit", "enum": ["fill", "fillcrop", "fillcropmid", "fit"], "location": "query"}, "pad": {"type": "boolean", "default": "false", "location": "query"}}}', true));
116 $this->mqlread = new Google_MqlreadServiceResource($this, $this->serviceName, 'mqlread', json_decode('{"httpMethod": "GET", "path": "mqlread", "supportsMediaDownload": true, "id": "freebase.mqlread", "parameters": {"as_of_time": {"type": "string", "location": "query"}, "callback": {"type": "string", "location": "query"}, "cost": {"type": "boolean", "default": "false", "location": "query"}, "cursor": {"type": "string", "location": "query"}, "dateline": {"type": "string", "location": "query"}, "html_escape": {"type": "boolean", "default": "true", "location": "query"}, "indent": {"type": "integer", "default": "0", "format": "uint32", "maximum": "10", "location": "query"}, "lang": {"type": "string", "default": "/lang/en", "location": "query"}, "query": {"type": "string", "required": true, "location": "query"}, "uniqueness_failure": {"type": "string", "default": "hard", "enum": ["hard", "soft"], "location": "query"}}}', true));
117 $this->mqlwrite = new Google_MqlwriteServiceResource($this, $this->serviceName, 'mqlwrite', json_decode('{"httpMethod": "GET", "path": "mqlwrite", "scopes": ["https://www.googleapis.com/auth/freebase"], "supportsMediaDownload": true, "id": "freebase.mqlwrite", "parameters": {"callback": {"type": "string", "location": "query"}, "dateline": {"type": "string", "location": "query"}, "indent": {"type": "integer", "default": "0", "format": "uint32", "maximum": "10", "location": "query"}, "query": {"type": "string", "required": true, "location": "query"}, "use_permission_of": {"type": "string", "location": "query"}}}', true));
118 }
119 }
120
121
122
123 class Google_ContentserviceGet extends Google_Model {
124 public $result;
125 public function setResult( $result) {
126 $this->result = $result;
127 }
128 public function getResult() {
129 return $this->result;
130 }
131 }
132
133 class Google_TopicLookup extends Google_Model {
134 public $id;
135 protected $__propertyType = 'Google_TopicLookupProperty';
136 protected $__propertyDataType = '';
137 public $property;
138 public function setId( $id) {
139 $this->id = $id;
140 }
141 public function getId() {
142 return $this->id;
143 }
144 public function setProperty(Google_TopicLookupProperty $property) {
145 $this->property = $property;
146 }
147 public function getProperty() {
148 return $this->property;
149 }
150 }
151
152 class Google_TopicLookupProperty extends Google_Model {
153 protected $___freebase_object_profile_linkcountType = 'Google_TopicStatslinkcount';
154 protected $___freebase_object_profile_linkcountDataType = '';
155 public $_freebase_object_profile_linkcount;
156 public function set_freebase_object_profile_linkcount(Google_TopicStatslinkcount $_freebase_object_profile_linkcount) {
157 $this->_freebase_object_profile_linkcount = $_freebase_object_profile_linkcount;
158 }
159 public function get_freebase_object_profile_linkcount() {
160 return $this->_freebase_object_profile_linkcount;
161 }
162 }
163
164 class Google_TopicPropertyvalue extends Google_Model {
165 public $count;
166 public $status;
167 protected $__valuesType = 'Google_TopicValue';
168 protected $__valuesDataType = 'array';
169 public $values;
170 public $valuetype;
171 public function setCount( $count) {
172 $this->count = $count;
173 }
174 public function getCount() {
175 return $this->count;
176 }
177 public function setStatus( $status) {
178 $this->status = $status;
179 }
180 public function getStatus() {
181 return $this->status;
182 }
183 public function setValues(/* array(Google_TopicValue) */ $values) {
184 $this->assertIsArray($values, 'Google_TopicValue', __METHOD__);
185 $this->values = $values;
186 }
187 public function getValues() {
188 return $this->values;
189 }
190 public function setValuetype( $valuetype) {
191 $this->valuetype = $valuetype;
192 }
193 public function getValuetype() {
194 return $this->valuetype;
195 }
196 }
197
198 class Google_TopicStatslinkcount extends Google_Model {
199 public $type;
200 protected $__valuesType = 'Google_TopicStatslinkcountValues';
201 protected $__valuesDataType = 'array';
202 public $values;
203 public function setType( $type) {
204 $this->type = $type;
205 }
206 public function getType() {
207 return $this->type;
208 }
209 public function setValues(/* array(Google_TopicStatslinkcountValues) */ $values) {
210 $this->assertIsArray($values, 'Google_TopicStatslinkcountValues', __METHOD__);
211 $this->values = $values;
212 }
213 public function getValues() {
214 return $this->values;
215 }
216 }
217
218 class Google_TopicStatslinkcountValues extends Google_Model {
219 public $count;
220 public $id;
221 protected $__valuesType = 'Google_TopicStatslinkcountValuesValues';
222 protected $__valuesDataType = 'array';
223 public $values;
224 public function setCount( $count) {
225 $this->count = $count;
226 }
227 public function getCount() {
228 return $this->count;
229 }
230 public function setId( $id) {
231 $this->id = $id;
232 }
233 public function getId() {
234 return $this->id;
235 }
236 public function setValues(/* array(Google_TopicStatslinkcountValuesValues) */ $values) {
237 $this->assertIsArray($values, 'Google_TopicStatslinkcountValuesValues', __METHOD__);
238 $this->values = $values;
239 }
240 public function getValues() {
241 return $this->values;
242 }
243 }
244
245 class Google_TopicStatslinkcountValuesValues extends Google_Model {
246 public $count;
247 public $id;
248 protected $__valuesType = 'Google_TopicStatslinkcountValuesValuesValues';
249 protected $__valuesDataType = 'array';
250 public $values;
251 public function setCount( $count) {
252 $this->count = $count;
253 }
254 public function getCount() {
255 return $this->count;
256 }
257 public function setId( $id) {
258 $this->id = $id;
259 }
260 public function getId() {
261 return $this->id;
262 }
263 public function setValues(/* array(Google_TopicStatslinkcountValuesValuesValues) */ $values) {
264 $this->assertIsArray($values, 'Google_TopicStatslinkcountValuesValuesValues', __METHOD__);
265 $this->values = $values;
266 }
267 public function getValues() {
268 return $this->values;
269 }
270 }
271
272 class Google_TopicStatslinkcountValuesValuesValues extends Google_Model {
273 public $count;
274 public $id;
275 public function setCount( $count) {
276 $this->count = $count;
277 }
278 public function getCount() {
279 return $this->count;
280 }
281 public function setId( $id) {
282 $this->id = $id;
283 }
284 public function getId() {
285 return $this->id;
286 }
287 }
288
289 class Google_TopicValue extends Google_Model {
290 protected $__citationType = 'Google_TopicValueCitation';
291 protected $__citationDataType = '';
292 public $citation;
293 public $creator;
294 public $dataset;
295 public $id;
296 public $lang;
297 public $project;
298 protected $__propertyType = 'Google_TopicPropertyvalue';
299 protected $__propertyDataType = 'map';
300 public $property;
301 public $text;
302 public $timestamp;
303 public $value;
304 public function setCitation(Google_TopicValueCitation $citation) {
305 $this->citation = $citation;
306 }
307 public function getCitation() {
308 return $this->citation;
309 }
310 public function setCreator( $creator) {
311 $this->creator = $creator;
312 }
313 public function getCreator() {
314 return $this->creator;
315 }
316 public function setDataset( $dataset) {
317 $this->dataset = $dataset;
318 }
319 public function getDataset() {
320 return $this->dataset;
321 }
322 public function setId( $id) {
323 $this->id = $id;
324 }
325 public function getId() {
326 return $this->id;
327 }
328 public function setLang( $lang) {
329 $this->lang = $lang;
330 }
331 public function getLang() {
332 return $this->lang;
333 }
334 public function setProject( $project) {
335 $this->project = $project;
336 }
337 public function getProject() {
338 return $this->project;
339 }
340 public function setProperty(Google_TopicPropertyvalue $property) {
341 $this->property = $property;
342 }
343 public function getProperty() {
344 return $this->property;
345 }
346 public function setText( $text) {
347 $this->text = $text;
348 }
349 public function getText() {
350 return $this->text;
351 }
352 public function setTimestamp( $timestamp) {
353 $this->timestamp = $timestamp;
354 }
355 public function getTimestamp() {
356 return $this->timestamp;
357 }
358 public function setValue( $value) {
359 $this->value = $value;
360 }
361 public function getValue() {
362 return $this->value;
363 }
364 }
365
366 class Google_TopicValueCitation extends Google_Model {
367 public $provider;
368 public $statement;
369 public $uri;
370 public function setProvider( $provider) {
371 $this->provider = $provider;
372 }
373 public function getProvider() {
374 return $this->provider;
375 }
376 public function setStatement( $statement) {
377 $this->statement = $statement;
378 }
379 public function getStatement() {
380 return $this->statement;
381 }
382 public function setUri( $uri) {
383 $this->uri = $uri;
384 }
385 public function getUri() {
386 return $this->uri;
387 }
388 }
389