MyBusinessBusinessInformation.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. namespace Google\Service;
  18. use Google\Client;
  19. /**
  20. * Service definition for MyBusinessBusinessInformation (v1).
  21. *
  22. * <p>
  23. * The My Business Business Information API provides an interface for managing
  24. * business information. Note - If you have a quota of 0 after enabling the API,
  25. * please request for GBP API access.</p>
  26. *
  27. * <p>
  28. * For more information about this service, see the API
  29. * <a href="https://developers.google.com/my-business/" target="_blank">Documentation</a>
  30. * </p>
  31. *
  32. * @author Google, Inc.
  33. */
  34. class MyBusinessBusinessInformation extends \Google\Service
  35. {
  36. public $accounts_locations;
  37. public $attributes;
  38. public $categories;
  39. public $chains;
  40. public $googleLocations;
  41. public $locations;
  42. public $locations_attributes;
  43. public $rootUrlTemplate;
  44. /**
  45. * Constructs the internal representation of the MyBusinessBusinessInformation
  46. * service.
  47. *
  48. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  49. * config array to pass to a new Client instance.
  50. * @param string $rootUrl The root URL used for requests to the service.
  51. */
  52. public function __construct($clientOrConfig = [], $rootUrl = null)
  53. {
  54. parent::__construct($clientOrConfig);
  55. $this->rootUrl = $rootUrl ?: 'https://mybusinessbusinessinformation.googleapis.com/';
  56. $this->rootUrlTemplate = $rootUrl ?: 'https://mybusinessbusinessinformation.UNIVERSE_DOMAIN/';
  57. $this->servicePath = '';
  58. $this->batchPath = 'batch';
  59. $this->version = 'v1';
  60. $this->serviceName = 'mybusinessbusinessinformation';
  61. $this->accounts_locations = new MyBusinessBusinessInformation\Resource\AccountsLocations(
  62. $this,
  63. $this->serviceName,
  64. 'locations',
  65. [
  66. 'methods' => [
  67. 'create' => [
  68. 'path' => 'v1/{+parent}/locations',
  69. 'httpMethod' => 'POST',
  70. 'parameters' => [
  71. 'parent' => [
  72. 'location' => 'path',
  73. 'type' => 'string',
  74. 'required' => true,
  75. ],
  76. 'requestId' => [
  77. 'location' => 'query',
  78. 'type' => 'string',
  79. ],
  80. 'validateOnly' => [
  81. 'location' => 'query',
  82. 'type' => 'boolean',
  83. ],
  84. ],
  85. ],'list' => [
  86. 'path' => 'v1/{+parent}/locations',
  87. 'httpMethod' => 'GET',
  88. 'parameters' => [
  89. 'parent' => [
  90. 'location' => 'path',
  91. 'type' => 'string',
  92. 'required' => true,
  93. ],
  94. 'filter' => [
  95. 'location' => 'query',
  96. 'type' => 'string',
  97. ],
  98. 'orderBy' => [
  99. 'location' => 'query',
  100. 'type' => 'string',
  101. ],
  102. 'pageSize' => [
  103. 'location' => 'query',
  104. 'type' => 'integer',
  105. ],
  106. 'pageToken' => [
  107. 'location' => 'query',
  108. 'type' => 'string',
  109. ],
  110. 'readMask' => [
  111. 'location' => 'query',
  112. 'type' => 'string',
  113. ],
  114. ],
  115. ],
  116. ]
  117. ]
  118. );
  119. $this->attributes = new MyBusinessBusinessInformation\Resource\Attributes(
  120. $this,
  121. $this->serviceName,
  122. 'attributes',
  123. [
  124. 'methods' => [
  125. 'list' => [
  126. 'path' => 'v1/attributes',
  127. 'httpMethod' => 'GET',
  128. 'parameters' => [
  129. 'categoryName' => [
  130. 'location' => 'query',
  131. 'type' => 'string',
  132. ],
  133. 'languageCode' => [
  134. 'location' => 'query',
  135. 'type' => 'string',
  136. ],
  137. 'pageSize' => [
  138. 'location' => 'query',
  139. 'type' => 'integer',
  140. ],
  141. 'pageToken' => [
  142. 'location' => 'query',
  143. 'type' => 'string',
  144. ],
  145. 'parent' => [
  146. 'location' => 'query',
  147. 'type' => 'string',
  148. ],
  149. 'regionCode' => [
  150. 'location' => 'query',
  151. 'type' => 'string',
  152. ],
  153. 'showAll' => [
  154. 'location' => 'query',
  155. 'type' => 'boolean',
  156. ],
  157. ],
  158. ],
  159. ]
  160. ]
  161. );
  162. $this->categories = new MyBusinessBusinessInformation\Resource\Categories(
  163. $this,
  164. $this->serviceName,
  165. 'categories',
  166. [
  167. 'methods' => [
  168. 'batchGet' => [
  169. 'path' => 'v1/categories:batchGet',
  170. 'httpMethod' => 'GET',
  171. 'parameters' => [
  172. 'languageCode' => [
  173. 'location' => 'query',
  174. 'type' => 'string',
  175. ],
  176. 'names' => [
  177. 'location' => 'query',
  178. 'type' => 'string',
  179. 'repeated' => true,
  180. ],
  181. 'regionCode' => [
  182. 'location' => 'query',
  183. 'type' => 'string',
  184. ],
  185. 'view' => [
  186. 'location' => 'query',
  187. 'type' => 'string',
  188. ],
  189. ],
  190. ],'list' => [
  191. 'path' => 'v1/categories',
  192. 'httpMethod' => 'GET',
  193. 'parameters' => [
  194. 'filter' => [
  195. 'location' => 'query',
  196. 'type' => 'string',
  197. ],
  198. 'languageCode' => [
  199. 'location' => 'query',
  200. 'type' => 'string',
  201. ],
  202. 'pageSize' => [
  203. 'location' => 'query',
  204. 'type' => 'integer',
  205. ],
  206. 'pageToken' => [
  207. 'location' => 'query',
  208. 'type' => 'string',
  209. ],
  210. 'regionCode' => [
  211. 'location' => 'query',
  212. 'type' => 'string',
  213. ],
  214. 'view' => [
  215. 'location' => 'query',
  216. 'type' => 'string',
  217. ],
  218. ],
  219. ],
  220. ]
  221. ]
  222. );
  223. $this->chains = new MyBusinessBusinessInformation\Resource\Chains(
  224. $this,
  225. $this->serviceName,
  226. 'chains',
  227. [
  228. 'methods' => [
  229. 'get' => [
  230. 'path' => 'v1/{+name}',
  231. 'httpMethod' => 'GET',
  232. 'parameters' => [
  233. 'name' => [
  234. 'location' => 'path',
  235. 'type' => 'string',
  236. 'required' => true,
  237. ],
  238. ],
  239. ],'search' => [
  240. 'path' => 'v1/chains:search',
  241. 'httpMethod' => 'GET',
  242. 'parameters' => [
  243. 'chainName' => [
  244. 'location' => 'query',
  245. 'type' => 'string',
  246. ],
  247. 'pageSize' => [
  248. 'location' => 'query',
  249. 'type' => 'integer',
  250. ],
  251. ],
  252. ],
  253. ]
  254. ]
  255. );
  256. $this->googleLocations = new MyBusinessBusinessInformation\Resource\GoogleLocations(
  257. $this,
  258. $this->serviceName,
  259. 'googleLocations',
  260. [
  261. 'methods' => [
  262. 'search' => [
  263. 'path' => 'v1/googleLocations:search',
  264. 'httpMethod' => 'POST',
  265. 'parameters' => [],
  266. ],
  267. ]
  268. ]
  269. );
  270. $this->locations = new MyBusinessBusinessInformation\Resource\Locations(
  271. $this,
  272. $this->serviceName,
  273. 'locations',
  274. [
  275. 'methods' => [
  276. 'delete' => [
  277. 'path' => 'v1/{+name}',
  278. 'httpMethod' => 'DELETE',
  279. 'parameters' => [
  280. 'name' => [
  281. 'location' => 'path',
  282. 'type' => 'string',
  283. 'required' => true,
  284. ],
  285. ],
  286. ],'get' => [
  287. 'path' => 'v1/{+name}',
  288. 'httpMethod' => 'GET',
  289. 'parameters' => [
  290. 'name' => [
  291. 'location' => 'path',
  292. 'type' => 'string',
  293. 'required' => true,
  294. ],
  295. 'readMask' => [
  296. 'location' => 'query',
  297. 'type' => 'string',
  298. ],
  299. ],
  300. ],'getAttributes' => [
  301. 'path' => 'v1/{+name}',
  302. 'httpMethod' => 'GET',
  303. 'parameters' => [
  304. 'name' => [
  305. 'location' => 'path',
  306. 'type' => 'string',
  307. 'required' => true,
  308. ],
  309. ],
  310. ],'getGoogleUpdated' => [
  311. 'path' => 'v1/{+name}:getGoogleUpdated',
  312. 'httpMethod' => 'GET',
  313. 'parameters' => [
  314. 'name' => [
  315. 'location' => 'path',
  316. 'type' => 'string',
  317. 'required' => true,
  318. ],
  319. 'readMask' => [
  320. 'location' => 'query',
  321. 'type' => 'string',
  322. ],
  323. ],
  324. ],'patch' => [
  325. 'path' => 'v1/{+name}',
  326. 'httpMethod' => 'PATCH',
  327. 'parameters' => [
  328. 'name' => [
  329. 'location' => 'path',
  330. 'type' => 'string',
  331. 'required' => true,
  332. ],
  333. 'updateMask' => [
  334. 'location' => 'query',
  335. 'type' => 'string',
  336. ],
  337. 'validateOnly' => [
  338. 'location' => 'query',
  339. 'type' => 'boolean',
  340. ],
  341. ],
  342. ],'updateAttributes' => [
  343. 'path' => 'v1/{+name}',
  344. 'httpMethod' => 'PATCH',
  345. 'parameters' => [
  346. 'name' => [
  347. 'location' => 'path',
  348. 'type' => 'string',
  349. 'required' => true,
  350. ],
  351. 'attributeMask' => [
  352. 'location' => 'query',
  353. 'type' => 'string',
  354. ],
  355. ],
  356. ],
  357. ]
  358. ]
  359. );
  360. $this->locations_attributes = new MyBusinessBusinessInformation\Resource\LocationsAttributes(
  361. $this,
  362. $this->serviceName,
  363. 'attributes',
  364. [
  365. 'methods' => [
  366. 'getGoogleUpdated' => [
  367. 'path' => 'v1/{+name}:getGoogleUpdated',
  368. 'httpMethod' => 'GET',
  369. 'parameters' => [
  370. 'name' => [
  371. 'location' => 'path',
  372. 'type' => 'string',
  373. 'required' => true,
  374. ],
  375. ],
  376. ],
  377. ]
  378. ]
  379. );
  380. }
  381. }
  382. // Adding a class alias for backwards compatibility with the previous class name.
  383. class_alias(MyBusinessBusinessInformation::class, 'Google_Service_MyBusinessBusinessInformation');