PageRenderTime 58ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/Lib/google-api-php-client/contrib/Google_ShoppingService.php

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