PageRenderTime 60ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/webui/google-api/contrib/apiShoppingService.php

https://bitbucket.org/sailsdigital/piler-remi
PHP | 1260 lines | 1106 code | 31 blank | 123 comment | 4 complexity | 16ade2ab35cb405f028b84d1d4dec5c3 MD5 | raw file
Possible License(s): GPL-3.0
  1. <?php
  2. /*
  3. * Copyright (c) 2010 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. require_once 'service/apiModel.php';
  18. require_once 'service/apiService.php';
  19. require_once 'service/apiServiceRequest.php';
  20. /**
  21. * The "products" collection of methods.
  22. * Typical usage is:
  23. * <code>
  24. * $shoppingService = new apiShoppingService(...);
  25. * $products = $shoppingService->products;
  26. * </code>
  27. */
  28. class ProductsServiceResource extends apiServiceResource {
  29. /**
  30. * Returns a list of products and content modules (products.list)
  31. *
  32. * @param string $source Query source
  33. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  34. *
  35. * @opt_param bool sayt.useGcsConfig Google Internal
  36. * @opt_param string rankBy Ranking specification
  37. * @opt_param bool debug.enableLogging Google Internal
  38. * @opt_param bool facets.enabled Whether to return facet information
  39. * @opt_param bool relatedQueries.useGcsConfig This parameter is currently ignored
  40. * @opt_param bool promotions.enabled Whether to return promotion information
  41. * @opt_param bool debug.enabled Google Internal
  42. * @opt_param string facets.include Facets to include (applies when useGcsConfig == false)
  43. * @opt_param string productFields Google Internal
  44. * @opt_param string channels Channels specification
  45. * @opt_param string currency Currency restriction (ISO 4217)
  46. * @opt_param string startIndex Index (1-based) of first product to return
  47. * @opt_param string facets.discover Facets to discover
  48. * @opt_param bool debug.searchResponse Google Internal
  49. * @opt_param string crowdBy Crowding specification
  50. * @opt_param bool spelling.enabled Whether to return spelling suggestions
  51. * @opt_param string taxonomy Taxonomy name
  52. * @opt_param bool debug.geocodeRequest Google Internal
  53. * @opt_param bool spelling.useGcsConfig This parameter is currently ignored
  54. * @opt_param string useCase One of CommerceSearchUseCase, ShoppingApiUseCase
  55. * @opt_param string location Location used to determine tax and shipping
  56. * @opt_param string maxVariants Maximum number of variant results to return per result
  57. * @opt_param bool debug.rdcRequest Google Internal
  58. * @opt_param string categories.include Category specification
  59. * @opt_param string boostBy Boosting specification
  60. * @opt_param bool redirects.useGcsConfig Whether to return redirect information as configured in the GCS account
  61. * @opt_param bool safe Whether safe search is enabled. Default: true
  62. * @opt_param bool categories.useGcsConfig This parameter is currently ignored
  63. * @opt_param string maxResults Maximum number of results to return
  64. * @opt_param bool facets.useGcsConfig Whether to return facet information as configured in the GCS account
  65. * @opt_param bool categories.enabled Whether to return category information
  66. * @opt_param string attributeFilter Comma separated list of attributes to return
  67. * @opt_param bool sayt.enabled Google Internal
  68. * @opt_param bool promotions.useGcsConfig Whether to return promotion information as configured in the GCS account
  69. * @opt_param string thumbnails Image thumbnails specification
  70. * @opt_param string language Language restriction (BCP 47)
  71. * @opt_param string country Country restriction (ISO 3166)
  72. * @opt_param bool debug.geocodeResponse Google Internal
  73. * @opt_param string restrictBy Restriction specification
  74. * @opt_param bool debug.rdcResponse Google Internal
  75. * @opt_param string q Search query
  76. * @opt_param bool redirects.enabled Whether to return redirect information
  77. * @opt_param bool debug.searchRequest Google Internal
  78. * @opt_param bool relatedQueries.enabled Whether to return related queries
  79. * @opt_param string minAvailability
  80. * @opt_param string plusOne +1 rendering specification.
  81. * @return Products
  82. */
  83. public function listProducts($source, $optParams = array()) {
  84. $params = array('source' => $source);
  85. $params = array_merge($params, $optParams);
  86. $data = $this->__call('list', array($params));
  87. if ($this->useObjects()) {
  88. return new Products($data);
  89. } else {
  90. return $data;
  91. }
  92. }
  93. /**
  94. * Returns a single product (products.get)
  95. *
  96. * @param string $source Query source
  97. * @param string $accountId Merchant center account id
  98. * @param string $productIdType Type of productId
  99. * @param string $productId Id of product
  100. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  101. *
  102. * @opt_param string categories.include Category specification
  103. * @opt_param bool recommendations.enabled Whether to return recommendation information
  104. * @opt_param bool debug.enableLogging Google Internal
  105. * @opt_param string taxonomy Merchant taxonomy
  106. * @opt_param bool categories.useGcsConfig This parameter is currently ignored
  107. * @opt_param bool debug.searchResponse Google Internal
  108. * @opt_param bool debug.enabled Google Internal
  109. * @opt_param string recommendations.include Recommendation specification
  110. * @opt_param bool categories.enabled Whether to return category information
  111. * @opt_param string productFields Google Internal
  112. * @opt_param string location Location used to determine tax and shipping
  113. * @opt_param bool debug.searchRequest Google Internal
  114. * @opt_param string attributeFilter Comma separated list of attributes to return
  115. * @opt_param bool recommendations.useGcsConfig This parameter is currently ignored
  116. * @opt_param string plusOne +1 rendering specification.
  117. * @opt_param string thumbnails Thumbnail specification
  118. * @return Product
  119. */
  120. public function get($source, $accountId, $productIdType, $productId, $optParams = array()) {
  121. $params = array('source' => $source, 'accountId' => $accountId, 'productIdType' => $productIdType, 'productId' => $productId);
  122. $params = array_merge($params, $optParams);
  123. $data = $this->__call('get', array($params));
  124. if ($this->useObjects()) {
  125. return new Product($data);
  126. } else {
  127. return $data;
  128. }
  129. }
  130. }
  131. /**
  132. * Service definition for Shopping (v1).
  133. *
  134. * <p>
  135. * Lets you search over product data
  136. * </p>
  137. *
  138. * <p>
  139. * For more information about this service, see the
  140. * <a href="http://code.google.com/apis/shopping/search/v1/getting_started.html" target="_blank">API Documentation</a>
  141. * </p>
  142. *
  143. * @author Google, Inc.
  144. */
  145. class apiShoppingService extends apiService {
  146. public $products;
  147. /**
  148. * Constructs the internal representation of the Shopping service.
  149. *
  150. * @param apiClient apiClient
  151. */
  152. public function __construct(apiClient $apiClient) {
  153. $this->rpcPath = '/rpc';
  154. $this->restBasePath = '/shopping/search/v1/';
  155. $this->version = 'v1';
  156. $this->serviceName = 'shopping';
  157. $apiClient->addService($this->serviceName, $this->version);
  158. $this->products = new ProductsServiceResource($this, $this->serviceName, 'products', json_decode('{"methods": {"list": {"parameters": {"sayt.useGcsConfig": {"type": "boolean", "location": "query"}, "debug.geocodeResponse": {"type": "boolean", "location": "query"}, "debug.enableLogging": {"type": "boolean", "location": "query"}, "facets.enabled": {"type": "boolean", "location": "query"}, "relatedQueries.useGcsConfig": {"type": "boolean", "location": "query"}, "promotions.enabled": {"type": "boolean", "location": "query"}, "debug.enabled": {"type": "boolean", "location": "query"}, "facets.include": {"type": "string", "location": "query"}, "productFields": {"type": "string", "location": "query"}, "channels": {"type": "string", "location": "query"}, "currency": {"type": "string", "location": "query"}, "startIndex": {"format": "uint32", "type": "integer", "location": "query"}, "facets.discover": {"type": "string", "location": "query"}, "debug.searchResponse": {"type": "boolean", "location": "query"}, "crowdBy": {"type": "string", "location": "query"}, "spelling.enabled": {"type": "boolean", "location": "query"}, "debug.geocodeRequest": {"type": "boolean", "location": "query"}, "source": {"required": true, "type": "string", "location": "path"}, "spelling.useGcsConfig": {"type": "boolean", "location": "query"}, "useCase": {"type": "string", "location": "query"}, "location": {"type": "string", "location": "query"}, "taxonomy": {"type": "string", "location": "query"}, "debug.rdcRequest": {"type": "boolean", "location": "query"}, "categories.include": {"type": "string", "location": "query"}, "debug.searchRequest": {"type": "boolean", "location": "query"}, "safe": {"type": "boolean", "location": "query"}, "boostBy": {"type": "string", "location": "query"}, "maxVariants": {"format": "uint32", "type": "integer", "location": "query"}, "categories.useGcsConfig": {"type": "boolean", "location": "query"}, "maxResults": {"format": "uint32", "type": "integer", "location": "query"}, "facets.useGcsConfig": {"type": "boolean", "location": "query"}, "categories.enabled": {"type": "boolean", "location": "query"}, "attributeFilter": {"type": "string", "location": "query"}, "sayt.enabled": {"type": "boolean", "location": "query"}, "plusOne": {"type": "string", "location": "query"}, "thumbnails": {"type": "string", "location": "query"}, "language": {"type": "string", "location": "query"}, "redirects.useGcsConfig": {"type": "boolean", "location": "query"}, "rankBy": {"type": "string", "location": "query"}, "restrictBy": {"type": "string", "location": "query"}, "debug.rdcResponse": {"type": "boolean", "location": "query"}, "q": {"type": "string", "location": "query"}, "redirects.enabled": {"type": "boolean", "location": "query"}, "country": {"type": "string", "location": "query"}, "relatedQueries.enabled": {"type": "boolean", "location": "query"}, "minAvailability": {"enum": ["inStock", "limited", "outOfStock", "unknown"], "type": "string", "location": "query"}, "promotions.useGcsConfig": {"type": "boolean", "location": "query"}}, "id": "shopping.products.list", "httpMethod": "GET", "path": "{source}/products", "response": {"$ref": "Products"}}, "get": {"parameters": {"categories.include": {"type": "string", "location": "query"}, "recommendations.enabled": {"type": "boolean", "location": "query"}, "plusOne": {"type": "string", "location": "query"}, "debug.enableLogging": {"type": "boolean", "location": "query"}, "thumbnails": {"type": "string", "location": "query"}, "recommendations.include": {"type": "string", "location": "query"}, "taxonomy": {"type": "string", "location": "query"}, "productIdType": {"required": true, "type": "string", "location": "path"}, "categories.useGcsConfig": {"type": "boolean", "location": "query"}, "attributeFilter": {"type": "string", "location": "query"}, "debug.enabled": {"type": "boolean", "location": "query"}, "source": {"required": true, "type": "string", "location": "path"}, "categories.enabled": {"type": "boolean", "location": "query"}, "location": {"type": "string", "location": "query"}, "debug.searchRequest": {"type": "boolean", "location": "query"}, "debug.searchResponse": {"type": "boolean", "location": "query"}, "recommendations.useGcsConfig": {"type": "boolean", "location": "query"}, "productFields": {"type": "string", "location": "query"}, "accountId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "productId": {"required": true, "type": "string", "location": "path"}}, "id": "shopping.products.get", "httpMethod": "GET", "path": "{source}/products/{accountId}/{productIdType}/{productId}", "response": {"$ref": "Product"}}}}', true));
  159. }
  160. }
  161. class Product extends apiModel {
  162. public $selfLink;
  163. public $kind;
  164. protected $__productType = 'ShoppingModelProductJsonV1';
  165. protected $__productDataType = '';
  166. public $product;
  167. public $requestId;
  168. protected $__recommendationsType = 'ProductRecommendations';
  169. protected $__recommendationsDataType = 'array';
  170. public $recommendations;
  171. protected $__debugType = 'ShoppingModelDebugJsonV1';
  172. protected $__debugDataType = '';
  173. public $debug;
  174. public $id;
  175. protected $__categoriesType = 'ShoppingModelCategoryJsonV1';
  176. protected $__categoriesDataType = 'array';
  177. public $categories;
  178. public function setSelfLink($selfLink) {
  179. $this->selfLink = $selfLink;
  180. }
  181. public function getSelfLink() {
  182. return $this->selfLink;
  183. }
  184. public function setKind($kind) {
  185. $this->kind = $kind;
  186. }
  187. public function getKind() {
  188. return $this->kind;
  189. }
  190. public function setProduct(ShoppingModelProductJsonV1 $product) {
  191. $this->product = $product;
  192. }
  193. public function getProduct() {
  194. return $this->product;
  195. }
  196. public function setRequestId($requestId) {
  197. $this->requestId = $requestId;
  198. }
  199. public function getRequestId() {
  200. return $this->requestId;
  201. }
  202. public function setRecommendations(/* array(ProductRecommendations) */ $recommendations) {
  203. $this->assertIsArray($recommendations, 'ProductRecommendations', __METHOD__);
  204. $this->recommendations = $recommendations;
  205. }
  206. public function getRecommendations() {
  207. return $this->recommendations;
  208. }
  209. public function setDebug(ShoppingModelDebugJsonV1 $debug) {
  210. $this->debug = $debug;
  211. }
  212. public function getDebug() {
  213. return $this->debug;
  214. }
  215. public function setId($id) {
  216. $this->id = $id;
  217. }
  218. public function getId() {
  219. return $this->id;
  220. }
  221. public function setCategories(/* array(ShoppingModelCategoryJsonV1) */ $categories) {
  222. $this->assertIsArray($categories, 'ShoppingModelCategoryJsonV1', __METHOD__);
  223. $this->categories = $categories;
  224. }
  225. public function getCategories() {
  226. return $this->categories;
  227. }
  228. }
  229. class ProductRecommendations extends apiModel {
  230. protected $__recommendationListType = 'ProductRecommendationsRecommendationList';
  231. protected $__recommendationListDataType = 'array';
  232. public $recommendationList;
  233. public $type;
  234. public function setRecommendationList(/* array(ProductRecommendationsRecommendationList) */ $recommendationList) {
  235. $this->assertIsArray($recommendationList, 'ProductRecommendationsRecommendationList', __METHOD__);
  236. $this->recommendationList = $recommendationList;
  237. }
  238. public function getRecommendationList() {
  239. return $this->recommendationList;
  240. }
  241. public function setType($type) {
  242. $this->type = $type;
  243. }
  244. public function getType() {
  245. return $this->type;
  246. }
  247. }
  248. class ProductRecommendationsRecommendationList extends apiModel {
  249. protected $__productType = 'ShoppingModelProductJsonV1';
  250. protected $__productDataType = '';
  251. public $product;
  252. public function setProduct(ShoppingModelProductJsonV1 $product) {
  253. $this->product = $product;
  254. }
  255. public function getProduct() {
  256. return $this->product;
  257. }
  258. }
  259. class Products extends apiModel {
  260. protected $__promotionsType = 'ProductsPromotions';
  261. protected $__promotionsDataType = 'array';
  262. public $promotions;
  263. public $selfLink;
  264. public $kind;
  265. protected $__storesType = 'ProductsStores';
  266. protected $__storesDataType = 'array';
  267. public $stores;
  268. public $currentItemCount;
  269. protected $__itemsType = 'Product';
  270. protected $__itemsDataType = 'array';
  271. public $items;
  272. protected $__facetsType = 'ProductsFacets';
  273. protected $__facetsDataType = 'array';
  274. public $facets;
  275. public $itemsPerPage;
  276. public $redirects;
  277. public $nextLink;
  278. protected $__shelfSpaceAdsType = 'ProductsShelfSpaceAds';
  279. protected $__shelfSpaceAdsDataType = 'array';
  280. public $shelfSpaceAds;
  281. public $startIndex;
  282. public $etag;
  283. public $requestId;
  284. public $relatedQueries;
  285. protected $__debugType = 'ShoppingModelDebugJsonV1';
  286. protected $__debugDataType = '';
  287. public $debug;
  288. protected $__spellingType = 'ProductsSpelling';
  289. protected $__spellingDataType = '';
  290. public $spelling;
  291. public $previousLink;
  292. public $totalItems;
  293. public $id;
  294. protected $__categoriesType = 'ShoppingModelCategoryJsonV1';
  295. protected $__categoriesDataType = 'array';
  296. public $categories;
  297. public function setPromotions(/* array(ProductsPromotions) */ $promotions) {
  298. $this->assertIsArray($promotions, 'ProductsPromotions', __METHOD__);
  299. $this->promotions = $promotions;
  300. }
  301. public function getPromotions() {
  302. return $this->promotions;
  303. }
  304. public function setSelfLink($selfLink) {
  305. $this->selfLink = $selfLink;
  306. }
  307. public function getSelfLink() {
  308. return $this->selfLink;
  309. }
  310. public function setKind($kind) {
  311. $this->kind = $kind;
  312. }
  313. public function getKind() {
  314. return $this->kind;
  315. }
  316. public function setStores(/* array(ProductsStores) */ $stores) {
  317. $this->assertIsArray($stores, 'ProductsStores', __METHOD__);
  318. $this->stores = $stores;
  319. }
  320. public function getStores() {
  321. return $this->stores;
  322. }
  323. public function setCurrentItemCount($currentItemCount) {
  324. $this->currentItemCount = $currentItemCount;
  325. }
  326. public function getCurrentItemCount() {
  327. return $this->currentItemCount;
  328. }
  329. public function setItems(/* array(Product) */ $items) {
  330. $this->assertIsArray($items, 'Product', __METHOD__);
  331. $this->items = $items;
  332. }
  333. public function getItems() {
  334. return $this->items;
  335. }
  336. public function setFacets(/* array(ProductsFacets) */ $facets) {
  337. $this->assertIsArray($facets, 'ProductsFacets', __METHOD__);
  338. $this->facets = $facets;
  339. }
  340. public function getFacets() {
  341. return $this->facets;
  342. }
  343. public function setItemsPerPage($itemsPerPage) {
  344. $this->itemsPerPage = $itemsPerPage;
  345. }
  346. public function getItemsPerPage() {
  347. return $this->itemsPerPage;
  348. }
  349. public function setRedirects(/* array(string) */ $redirects) {
  350. $this->assertIsArray($redirects, 'string', __METHOD__);
  351. $this->redirects = $redirects;
  352. }
  353. public function getRedirects() {
  354. return $this->redirects;
  355. }
  356. public function setNextLink($nextLink) {
  357. $this->nextLink = $nextLink;
  358. }
  359. public function getNextLink() {
  360. return $this->nextLink;
  361. }
  362. public function setShelfSpaceAds(/* array(ProductsShelfSpaceAds) */ $shelfSpaceAds) {
  363. $this->assertIsArray($shelfSpaceAds, 'ProductsShelfSpaceAds', __METHOD__);
  364. $this->shelfSpaceAds = $shelfSpaceAds;
  365. }
  366. public function getShelfSpaceAds() {
  367. return $this->shelfSpaceAds;
  368. }
  369. public function setStartIndex($startIndex) {
  370. $this->startIndex = $startIndex;
  371. }
  372. public function getStartIndex() {
  373. return $this->startIndex;
  374. }
  375. public function setEtag($etag) {
  376. $this->etag = $etag;
  377. }
  378. public function getEtag() {
  379. return $this->etag;
  380. }
  381. public function setRequestId($requestId) {
  382. $this->requestId = $requestId;
  383. }
  384. public function getRequestId() {
  385. return $this->requestId;
  386. }
  387. public function setRelatedQueries(/* array(string) */ $relatedQueries) {
  388. $this->assertIsArray($relatedQueries, 'string', __METHOD__);
  389. $this->relatedQueries = $relatedQueries;
  390. }
  391. public function getRelatedQueries() {
  392. return $this->relatedQueries;
  393. }
  394. public function setDebug(ShoppingModelDebugJsonV1 $debug) {
  395. $this->debug = $debug;
  396. }
  397. public function getDebug() {
  398. return $this->debug;
  399. }
  400. public function setSpelling(ProductsSpelling $spelling) {
  401. $this->spelling = $spelling;
  402. }
  403. public function getSpelling() {
  404. return $this->spelling;
  405. }
  406. public function setPreviousLink($previousLink) {
  407. $this->previousLink = $previousLink;
  408. }
  409. public function getPreviousLink() {
  410. return $this->previousLink;
  411. }
  412. public function setTotalItems($totalItems) {
  413. $this->totalItems = $totalItems;
  414. }
  415. public function getTotalItems() {
  416. return $this->totalItems;
  417. }
  418. public function setId($id) {
  419. $this->id = $id;
  420. }
  421. public function getId() {
  422. return $this->id;
  423. }
  424. public function setCategories(/* array(ShoppingModelCategoryJsonV1) */ $categories) {
  425. $this->assertIsArray($categories, 'ShoppingModelCategoryJsonV1', __METHOD__);
  426. $this->categories = $categories;
  427. }
  428. public function getCategories() {
  429. return $this->categories;
  430. }
  431. }
  432. class ProductsFacets extends apiModel {
  433. public $count;
  434. public $displayName;
  435. public $name;
  436. protected $__bucketsType = 'ProductsFacetsBuckets';
  437. protected $__bucketsDataType = 'array';
  438. public $buckets;
  439. public $property;
  440. public $type;
  441. public $unit;
  442. public function setCount($count) {
  443. $this->count = $count;
  444. }
  445. public function getCount() {
  446. return $this->count;
  447. }
  448. public function setDisplayName($displayName) {
  449. $this->displayName = $displayName;
  450. }
  451. public function getDisplayName() {
  452. return $this->displayName;
  453. }
  454. public function setName($name) {
  455. $this->name = $name;
  456. }
  457. public function getName() {
  458. return $this->name;
  459. }
  460. public function setBuckets(/* array(ProductsFacetsBuckets) */ $buckets) {
  461. $this->assertIsArray($buckets, 'ProductsFacetsBuckets', __METHOD__);
  462. $this->buckets = $buckets;
  463. }
  464. public function getBuckets() {
  465. return $this->buckets;
  466. }
  467. public function setProperty($property) {
  468. $this->property = $property;
  469. }
  470. public function getProperty() {
  471. return $this->property;
  472. }
  473. public function setType($type) {
  474. $this->type = $type;
  475. }
  476. public function getType() {
  477. return $this->type;
  478. }
  479. public function setUnit($unit) {
  480. $this->unit = $unit;
  481. }
  482. public function getUnit() {
  483. return $this->unit;
  484. }
  485. }
  486. class ProductsFacetsBuckets extends apiModel {
  487. public $count;
  488. public $minExclusive;
  489. public $min;
  490. public $max;
  491. public $value;
  492. public $maxExclusive;
  493. public function setCount($count) {
  494. $this->count = $count;
  495. }
  496. public function getCount() {
  497. return $this->count;
  498. }
  499. public function setMinExclusive($minExclusive) {
  500. $this->minExclusive = $minExclusive;
  501. }
  502. public function getMinExclusive() {
  503. return $this->minExclusive;
  504. }
  505. public function setMin($min) {
  506. $this->min = $min;
  507. }
  508. public function getMin() {
  509. return $this->min;
  510. }
  511. public function setMax($max) {
  512. $this->max = $max;
  513. }
  514. public function getMax() {
  515. return $this->max;
  516. }
  517. public function setValue($value) {
  518. $this->value = $value;
  519. }
  520. public function getValue() {
  521. return $this->value;
  522. }
  523. public function setMaxExclusive($maxExclusive) {
  524. $this->maxExclusive = $maxExclusive;
  525. }
  526. public function getMaxExclusive() {
  527. return $this->maxExclusive;
  528. }
  529. }
  530. class ProductsPromotions extends apiModel {
  531. protected $__productType = 'ShoppingModelProductJsonV1';
  532. protected $__productDataType = '';
  533. public $product;
  534. public $description;
  535. public $imageLink;
  536. public $destLink;
  537. public $customHtml;
  538. public $link;
  539. protected $__customFieldsType = 'ProductsPromotionsCustomFields';
  540. protected $__customFieldsDataType = 'array';
  541. public $customFields;
  542. public $type;
  543. public $name;
  544. public function setProduct(ShoppingModelProductJsonV1 $product) {
  545. $this->product = $product;
  546. }
  547. public function getProduct() {
  548. return $this->product;
  549. }
  550. public function setDescription($description) {
  551. $this->description = $description;
  552. }
  553. public function getDescription() {
  554. return $this->description;
  555. }
  556. public function setImageLink($imageLink) {
  557. $this->imageLink = $imageLink;
  558. }
  559. public function getImageLink() {
  560. return $this->imageLink;
  561. }
  562. public function setDestLink($destLink) {
  563. $this->destLink = $destLink;
  564. }
  565. public function getDestLink() {
  566. return $this->destLink;
  567. }
  568. public function setCustomHtml($customHtml) {
  569. $this->customHtml = $customHtml;
  570. }
  571. public function getCustomHtml() {
  572. return $this->customHtml;
  573. }
  574. public function setLink($link) {
  575. $this->link = $link;
  576. }
  577. public function getLink() {
  578. return $this->link;
  579. }
  580. public function setCustomFields(/* array(ProductsPromotionsCustomFields) */ $customFields) {
  581. $this->assertIsArray($customFields, 'ProductsPromotionsCustomFields', __METHOD__);
  582. $this->customFields = $customFields;
  583. }
  584. public function getCustomFields() {
  585. return $this->customFields;
  586. }
  587. public function setType($type) {
  588. $this->type = $type;
  589. }
  590. public function getType() {
  591. return $this->type;
  592. }
  593. public function setName($name) {
  594. $this->name = $name;
  595. }
  596. public function getName() {
  597. return $this->name;
  598. }
  599. }
  600. class ProductsPromotionsCustomFields extends apiModel {
  601. public $name;
  602. public $value;
  603. public function setName($name) {
  604. $this->name = $name;
  605. }
  606. public function getName() {
  607. return $this->name;
  608. }
  609. public function setValue($value) {
  610. $this->value = $value;
  611. }
  612. public function getValue() {
  613. return $this->value;
  614. }
  615. }
  616. class ProductsShelfSpaceAds extends apiModel {
  617. protected $__productType = 'ShoppingModelProductJsonV1';
  618. protected $__productDataType = '';
  619. public $product;
  620. public function setProduct(ShoppingModelProductJsonV1 $product) {
  621. $this->product = $product;
  622. }
  623. public function getProduct() {
  624. return $this->product;
  625. }
  626. }
  627. class ProductsSpelling extends apiModel {
  628. public $suggestion;
  629. public function setSuggestion($suggestion) {
  630. $this->suggestion = $suggestion;
  631. }
  632. public function getSuggestion() {
  633. return $this->suggestion;
  634. }
  635. }
  636. class ProductsStores extends apiModel {
  637. public $storeCode;
  638. public $name;
  639. public $storeId;
  640. public $telephone;
  641. public $location;
  642. public $address;
  643. public function setStoreCode($storeCode) {
  644. $this->storeCode = $storeCode;
  645. }
  646. public function getStoreCode() {
  647. return $this->storeCode;
  648. }
  649. public function setName($name) {
  650. $this->name = $name;
  651. }
  652. public function getName() {
  653. return $this->name;
  654. }
  655. public function setStoreId($storeId) {
  656. $this->storeId = $storeId;
  657. }
  658. public function getStoreId() {
  659. return $this->storeId;
  660. }
  661. public function setTelephone($telephone) {
  662. $this->telephone = $telephone;
  663. }
  664. public function getTelephone() {
  665. return $this->telephone;
  666. }
  667. public function setLocation($location) {
  668. $this->location = $location;
  669. }
  670. public function getLocation() {
  671. return $this->location;
  672. }
  673. public function setAddress($address) {
  674. $this->address = $address;
  675. }
  676. public function getAddress() {
  677. return $this->address;
  678. }
  679. }
  680. class ShoppingModelCategoryJsonV1 extends apiModel {
  681. public $url;
  682. public $shortName;
  683. public $parents;
  684. public $id;
  685. public function setUrl($url) {
  686. $this->url = $url;
  687. }
  688. public function getUrl() {
  689. return $this->url;
  690. }
  691. public function setShortName($shortName) {
  692. $this->shortName = $shortName;
  693. }
  694. public function getShortName() {
  695. return $this->shortName;
  696. }
  697. public function setParents(/* array(string) */ $parents) {
  698. $this->assertIsArray($parents, 'string', __METHOD__);
  699. $this->parents = $parents;
  700. }
  701. public function getParents() {
  702. return $this->parents;
  703. }
  704. public function setId($id) {
  705. $this->id = $id;
  706. }
  707. public function getId() {
  708. return $this->id;
  709. }
  710. }
  711. class ShoppingModelDebugJsonV1 extends apiModel {
  712. public $searchResponse;
  713. public $searchRequest;
  714. public $rdcResponse;
  715. protected $__backendTimesType = 'ShoppingModelDebugJsonV1BackendTimes';
  716. protected $__backendTimesDataType = 'array';
  717. public $backendTimes;
  718. public $elapsedMillis;
  719. public function setSearchResponse($searchResponse) {
  720. $this->searchResponse = $searchResponse;
  721. }
  722. public function getSearchResponse() {
  723. return $this->searchResponse;
  724. }
  725. public function setSearchRequest($searchRequest) {
  726. $this->searchRequest = $searchRequest;
  727. }
  728. public function getSearchRequest() {
  729. return $this->searchRequest;
  730. }
  731. public function setRdcResponse($rdcResponse) {
  732. $this->rdcResponse = $rdcResponse;
  733. }
  734. public function getRdcResponse() {
  735. return $this->rdcResponse;
  736. }
  737. public function setBackendTimes(/* array(ShoppingModelDebugJsonV1BackendTimes) */ $backendTimes) {
  738. $this->assertIsArray($backendTimes, 'ShoppingModelDebugJsonV1BackendTimes', __METHOD__);
  739. $this->backendTimes = $backendTimes;
  740. }
  741. public function getBackendTimes() {
  742. return $this->backendTimes;
  743. }
  744. public function setElapsedMillis($elapsedMillis) {
  745. $this->elapsedMillis = $elapsedMillis;
  746. }
  747. public function getElapsedMillis() {
  748. return $this->elapsedMillis;
  749. }
  750. }
  751. class ShoppingModelDebugJsonV1BackendTimes extends apiModel {
  752. public $serverMillis;
  753. public $hostName;
  754. public $name;
  755. public $elapsedMillis;
  756. public function setServerMillis($serverMillis) {
  757. $this->serverMillis = $serverMillis;
  758. }
  759. public function getServerMillis() {
  760. return $this->serverMillis;
  761. }
  762. public function setHostName($hostName) {
  763. $this->hostName = $hostName;
  764. }
  765. public function getHostName() {
  766. return $this->hostName;
  767. }
  768. public function setName($name) {
  769. $this->name = $name;
  770. }
  771. public function getName() {
  772. return $this->name;
  773. }
  774. public function setElapsedMillis($elapsedMillis) {
  775. $this->elapsedMillis = $elapsedMillis;
  776. }
  777. public function getElapsedMillis() {
  778. return $this->elapsedMillis;
  779. }
  780. }
  781. class ShoppingModelProductJsonV1 extends apiModel {
  782. public $queryMatched;
  783. public $gtin;
  784. protected $__imagesType = 'ShoppingModelProductJsonV1Images';
  785. protected $__imagesDataType = 'array';
  786. public $images;
  787. protected $__inventoriesType = 'ShoppingModelProductJsonV1Inventories';
  788. protected $__inventoriesDataType = 'array';
  789. public $inventories;
  790. protected $__authorType = 'ShoppingModelProductJsonV1Author';
  791. protected $__authorDataType = '';
  792. public $author;
  793. public $condition;
  794. public $providedId;
  795. public $internal8;
  796. public $description;
  797. public $gtins;
  798. public $internal1;
  799. public $brand;
  800. public $internal3;
  801. protected $__internal4Type = 'ShoppingModelProductJsonV1Internal4';
  802. protected $__internal4DataType = 'array';
  803. public $internal4;
  804. public $internal6;
  805. public $internal7;
  806. public $link;
  807. protected $__attributesType = 'ShoppingModelProductJsonV1Attributes';
  808. protected $__attributesDataType = 'array';
  809. public $attributes;
  810. public $totalMatchingVariants;
  811. protected $__variantsType = 'ShoppingModelProductJsonV1Variants';
  812. protected $__variantsDataType = 'array';
  813. public $variants;
  814. public $modificationTime;
  815. public $categories;
  816. public $language;
  817. public $country;
  818. public $title;
  819. public $creationTime;
  820. public $internal14;
  821. public $internal12;
  822. public $internal13;
  823. public $internal10;
  824. public $plusOne;
  825. public $googleId;
  826. public $internal15;
  827. public function setQueryMatched($queryMatched) {
  828. $this->queryMatched = $queryMatched;
  829. }
  830. public function getQueryMatched() {
  831. return $this->queryMatched;
  832. }
  833. public function setGtin($gtin) {
  834. $this->gtin = $gtin;
  835. }
  836. public function getGtin() {
  837. return $this->gtin;
  838. }
  839. public function setImages(/* array(ShoppingModelProductJsonV1Images) */ $images) {
  840. $this->assertIsArray($images, 'ShoppingModelProductJsonV1Images', __METHOD__);
  841. $this->images = $images;
  842. }
  843. public function getImages() {
  844. return $this->images;
  845. }
  846. public function setInventories(/* array(ShoppingModelProductJsonV1Inventories) */ $inventories) {
  847. $this->assertIsArray($inventories, 'ShoppingModelProductJsonV1Inventories', __METHOD__);
  848. $this->inventories = $inventories;
  849. }
  850. public function getInventories() {
  851. return $this->inventories;
  852. }
  853. public function setAuthor(ShoppingModelProductJsonV1Author $author) {
  854. $this->author = $author;
  855. }
  856. public function getAuthor() {
  857. return $this->author;
  858. }
  859. public function setCondition($condition) {
  860. $this->condition = $condition;
  861. }
  862. public function getCondition() {
  863. return $this->condition;
  864. }
  865. public function setProvidedId($providedId) {
  866. $this->providedId = $providedId;
  867. }
  868. public function getProvidedId() {
  869. return $this->providedId;
  870. }
  871. public function setInternal8(/* array(string) */ $internal8) {
  872. $this->assertIsArray($internal8, 'string', __METHOD__);
  873. $this->internal8 = $internal8;
  874. }
  875. public function getInternal8() {
  876. return $this->internal8;
  877. }
  878. public function setDescription($description) {
  879. $this->description = $description;
  880. }
  881. public function getDescription() {
  882. return $this->description;
  883. }
  884. public function setGtins(/* array(string) */ $gtins) {
  885. $this->assertIsArray($gtins, 'string', __METHOD__);
  886. $this->gtins = $gtins;
  887. }
  888. public function getGtins() {
  889. return $this->gtins;
  890. }
  891. public function setInternal1(/* array(string) */ $internal1) {
  892. $this->assertIsArray($internal1, 'string', __METHOD__);
  893. $this->internal1 = $internal1;
  894. }
  895. public function getInternal1() {
  896. return $this->internal1;
  897. }
  898. public function setBrand($brand) {
  899. $this->brand = $brand;
  900. }
  901. public function getBrand() {
  902. return $this->brand;
  903. }
  904. public function setInternal3($internal3) {
  905. $this->internal3 = $internal3;
  906. }
  907. public function getInternal3() {
  908. return $this->internal3;
  909. }
  910. public function setInternal4(/* array(ShoppingModelProductJsonV1Internal4) */ $internal4) {
  911. $this->assertIsArray($internal4, 'ShoppingModelProductJsonV1Internal4', __METHOD__);
  912. $this->internal4 = $internal4;
  913. }
  914. public function getInternal4() {
  915. return $this->internal4;
  916. }
  917. public function setInternal6($internal6) {
  918. $this->internal6 = $internal6;
  919. }
  920. public function getInternal6() {
  921. return $this->internal6;
  922. }
  923. public function setInternal7($internal7) {
  924. $this->internal7 = $internal7;
  925. }
  926. public function getInternal7() {
  927. return $this->internal7;
  928. }
  929. public function setLink($link) {
  930. $this->link = $link;
  931. }
  932. public function getLink() {
  933. return $this->link;
  934. }
  935. public function setAttributes(/* array(ShoppingModelProductJsonV1Attributes) */ $attributes) {
  936. $this->assertIsArray($attributes, 'ShoppingModelProductJsonV1Attributes', __METHOD__);
  937. $this->attributes = $attributes;
  938. }
  939. public function getAttributes() {
  940. return $this->attributes;
  941. }
  942. public function setTotalMatchingVariants($totalMatchingVariants) {
  943. $this->totalMatchingVariants = $totalMatchingVariants;
  944. }
  945. public function getTotalMatchingVariants() {
  946. return $this->totalMatchingVariants;
  947. }
  948. public function setVariants(/* array(ShoppingModelProductJsonV1Variants) */ $variants) {
  949. $this->assertIsArray($variants, 'ShoppingModelProductJsonV1Variants', __METHOD__);
  950. $this->variants = $variants;
  951. }
  952. public function getVariants() {
  953. return $this->variants;
  954. }
  955. public function setModificationTime($modificationTime) {
  956. $this->modificationTime = $modificationTime;
  957. }
  958. public function getModificationTime() {
  959. return $this->modificationTime;
  960. }
  961. public function setCategories(/* array(string) */ $categories) {
  962. $this->assertIsArray($categories, 'string', __METHOD__);
  963. $this->categories = $categories;
  964. }
  965. public function getCategories() {
  966. return $this->categories;
  967. }
  968. public function setLanguage($language) {
  969. $this->language = $language;
  970. }
  971. public function getLanguage() {
  972. return $this->language;
  973. }
  974. public function setCountry($country) {
  975. $this->country = $country;
  976. }
  977. public function getCountry() {
  978. return $this->country;
  979. }
  980. public function setTitle($title) {
  981. $this->title = $title;
  982. }
  983. public function getTitle() {
  984. return $this->title;
  985. }
  986. public function setCreationTime($creationTime) {
  987. $this->creationTime = $creationTime;
  988. }
  989. public function getCreationTime() {
  990. return $this->creationTime;
  991. }
  992. public function setInternal14($internal14) {
  993. $this->internal14 = $internal14;
  994. }
  995. public function getInternal14() {
  996. return $this->internal14;
  997. }
  998. public function setInternal12($internal12) {
  999. $this->internal12 = $internal12;
  1000. }
  1001. public function getInternal12() {
  1002. return $this->internal12;
  1003. }
  1004. public function setInternal13($internal13) {
  1005. $this->internal13 = $internal13;
  1006. }
  1007. public function getInternal13() {
  1008. return $this->internal13;
  1009. }
  1010. public function setInternal10(/* array(string) */ $internal10) {
  1011. $this->assertIsArray($internal10, 'string', __METHOD__);
  1012. $this->internal10 = $internal10;
  1013. }
  1014. public function getInternal10() {
  1015. return $this->internal10;
  1016. }
  1017. public function setPlusOne($plusOne) {
  1018. $this->plusOne = $plusOne;
  1019. }
  1020. public function getPlusOne() {
  1021. return $this->plusOne;
  1022. }
  1023. public function setGoogleId($googleId) {
  1024. $this->googleId = $googleId;
  1025. }
  1026. public function getGoogleId() {
  1027. return $this->googleId;
  1028. }
  1029. public function setInternal15($internal15) {
  1030. $this->internal15 = $internal15;
  1031. }
  1032. public function getInternal15() {
  1033. return $this->internal15;
  1034. }
  1035. }
  1036. class ShoppingModelProductJsonV1Attributes extends apiModel {
  1037. public $type;
  1038. public $value;
  1039. public $displayName;
  1040. public $name;
  1041. public $unit;
  1042. public function setType($type) {
  1043. $this->type = $type;
  1044. }
  1045. public function getType() {
  1046. return $this->type;
  1047. }
  1048. public function setValue($value) {
  1049. $this->value = $value;
  1050. }
  1051. public function getValue() {
  1052. return $this->value;
  1053. }
  1054. public function setDisplayName($displayName) {
  1055. $this->displayName = $displayName;
  1056. }
  1057. public function getDisplayName() {
  1058. return $this->displayName;
  1059. }
  1060. public function setName($name) {
  1061. $this->name = $name;
  1062. }
  1063. public function getName() {
  1064. return $this->name;
  1065. }
  1066. public function setUnit($unit) {
  1067. $this->unit = $unit;
  1068. }
  1069. public function getUnit() {
  1070. return $this->unit;
  1071. }
  1072. }
  1073. class ShoppingModelProductJsonV1Author extends apiModel {
  1074. public $name;
  1075. public $accountId;
  1076. public function setName($name) {
  1077. $this->name = $name;
  1078. }
  1079. public function getName() {
  1080. return $this->name;
  1081. }
  1082. public function setAccountId($accountId) {
  1083. $this->accountId = $accountId;
  1084. }
  1085. public function getAccountId() {
  1086. return $this->accountId;
  1087. }
  1088. }
  1089. class ShoppingModelProductJsonV1Images extends apiModel {
  1090. public $link;
  1091. protected $__thumbnailsType = 'ShoppingModelProductJsonV1ImagesThumbnails';
  1092. protected $__thumbnailsDataType = 'array';
  1093. public $thumbnails;
  1094. public function setLink($link) {
  1095. $this->link = $link;
  1096. }
  1097. public function getLink() {
  1098. return $this->link;
  1099. }
  1100. public function setThumbnails(/* array(ShoppingModelProductJsonV1ImagesThumbnails) */ $thumbnails) {
  1101. $this->assertIsArray($thumbnails, 'ShoppingModelProductJsonV1ImagesThumbnails', __METHOD__);
  1102. $this->thumbnails = $thumbnails;
  1103. }
  1104. public function getThumbnails() {
  1105. return $this->thumbnails;
  1106. }
  1107. }
  1108. class ShoppingModelProductJsonV1ImagesThumbnails extends apiModel {
  1109. public $content;
  1110. public $width;
  1111. public $link;
  1112. public $height;
  1113. public function setContent($content) {
  1114. $this->content = $content;
  1115. }
  1116. public function getContent() {
  1117. return $this->content;
  1118. }
  1119. public function setWidth($width) {
  1120. $this->width = $width;
  1121. }
  1122. public function getWidth() {
  1123. return $this->width;
  1124. }
  1125. public function setLink($link) {
  1126. $this->link = $link;
  1127. }
  1128. public function getLink() {
  1129. return $this->link;
  1130. }
  1131. public function setHeight($height) {
  1132. $this->height = $height;
  1133. }
  1134. public function getHeight() {
  1135. return $this->height;
  1136. }
  1137. }
  1138. class ShoppingModelProductJsonV1Internal4 extends apiModel {
  1139. public $node;
  1140. public $confidence;
  1141. public function setNode($node) {
  1142. $this->node = $node;
  1143. }
  1144. public function getNode() {
  1145. return $this->node;
  1146. }
  1147. public function setConfidence($confidence) {
  1148. $this->confidence = $confidence;
  1149. }
  1150. public function getConfidence() {
  1151. return $this->confidence;
  1152. }
  1153. }
  1154. class ShoppingModelProductJsonV1Inventories extends apiModel {
  1155. public $distance;
  1156. public $price;
  1157. public $storeId;
  1158. public $tax;
  1159. public $shipping;
  1160. public $currency;
  1161. public $distanceUnit;
  1162. public $availability;
  1163. public $channel;
  1164. public function setDistance($distance) {
  1165. $this->distance = $distance;
  1166. }
  1167. public function getDistance() {
  1168. return $this->distance;
  1169. }
  1170. public function setPrice($price) {
  1171. $this->price = $price;
  1172. }
  1173. public function getPrice() {
  1174. return $this->price;
  1175. }
  1176. public function setStoreId($storeId) {
  1177. $this->storeId = $storeId;
  1178. }
  1179. public function getStoreId() {
  1180. return $this->storeId;
  1181. }
  1182. public function setTax($tax) {
  1183. $this->tax = $tax;
  1184. }
  1185. public function getTax() {
  1186. return $this->tax;
  1187. }
  1188. public function setShipping($shipping) {
  1189. $this->shipping = $shipping;
  1190. }
  1191. public function getShipping() {
  1192. return $this->shipping;
  1193. }
  1194. public function setCurrency($currency) {
  1195. $this->currency = $currency;
  1196. }
  1197. public function getCurrency() {
  1198. return $this->currency;
  1199. }
  1200. public function setDistanceUnit($distanceUnit) {
  1201. $this->distanceUnit = $distanceUnit;
  1202. }
  1203. public function getDistanceUnit() {
  1204. return $this->distanceUnit;
  1205. }
  1206. public function setAvailability($availability) {
  1207. $this->availability = $availability;
  1208. }
  1209. public function getAvailability() {
  1210. return $this->availability;
  1211. }
  1212. public function setChannel($channel) {
  1213. $this->channel = $channel;
  1214. }
  1215. public function getChannel() {
  1216. return $this->channel;
  1217. }
  1218. }
  1219. class ShoppingModelProductJsonV1Variants extends apiModel {
  1220. protected $__variantType = 'ShoppingModelProductJsonV1';
  1221. protected $__variantDataType = '';
  1222. public $variant;
  1223. public function setVariant(ShoppingModelProductJsonV1 $variant) {
  1224. $this->variant = $variant;
  1225. }
  1226. public function getVariant() {
  1227. return $this->variant;
  1228. }
  1229. }