MyBusinessAccountManagement.php 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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 MyBusinessAccountManagement (v1).
  21. *
  22. * <p>
  23. * The My Business Account Management API provides an interface for managing
  24. * access to a location on Google.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://developers.google.com/my-business/" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class MyBusinessAccountManagement extends \Google\Service
  34. {
  35. public $accounts;
  36. public $accounts_admins;
  37. public $accounts_invitations;
  38. public $locations;
  39. public $locations_admins;
  40. /**
  41. * Constructs the internal representation of the MyBusinessAccountManagement
  42. * service.
  43. *
  44. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  45. * config array to pass to a new Client instance.
  46. * @param string $rootUrl The root URL used for requests to the service.
  47. */
  48. public function __construct($clientOrConfig = [], $rootUrl = null)
  49. {
  50. parent::__construct($clientOrConfig);
  51. $this->rootUrl = $rootUrl ?: 'https://mybusinessaccountmanagement.googleapis.com/';
  52. $this->servicePath = '';
  53. $this->batchPath = 'batch';
  54. $this->version = 'v1';
  55. $this->serviceName = 'mybusinessaccountmanagement';
  56. $this->accounts = new MyBusinessAccountManagement\Resource\Accounts(
  57. $this,
  58. $this->serviceName,
  59. 'accounts',
  60. [
  61. 'methods' => [
  62. 'create' => [
  63. 'path' => 'v1/accounts',
  64. 'httpMethod' => 'POST',
  65. 'parameters' => [],
  66. ],'get' => [
  67. 'path' => 'v1/{+name}',
  68. 'httpMethod' => 'GET',
  69. 'parameters' => [
  70. 'name' => [
  71. 'location' => 'path',
  72. 'type' => 'string',
  73. 'required' => true,
  74. ],
  75. ],
  76. ],'list' => [
  77. 'path' => 'v1/accounts',
  78. 'httpMethod' => 'GET',
  79. 'parameters' => [
  80. 'filter' => [
  81. 'location' => 'query',
  82. 'type' => 'string',
  83. ],
  84. 'pageSize' => [
  85. 'location' => 'query',
  86. 'type' => 'integer',
  87. ],
  88. 'pageToken' => [
  89. 'location' => 'query',
  90. 'type' => 'string',
  91. ],
  92. 'parentAccount' => [
  93. 'location' => 'query',
  94. 'type' => 'string',
  95. ],
  96. ],
  97. ],'patch' => [
  98. 'path' => 'v1/{+name}',
  99. 'httpMethod' => 'PATCH',
  100. 'parameters' => [
  101. 'name' => [
  102. 'location' => 'path',
  103. 'type' => 'string',
  104. 'required' => true,
  105. ],
  106. 'updateMask' => [
  107. 'location' => 'query',
  108. 'type' => 'string',
  109. ],
  110. 'validateOnly' => [
  111. 'location' => 'query',
  112. 'type' => 'boolean',
  113. ],
  114. ],
  115. ],
  116. ]
  117. ]
  118. );
  119. $this->accounts_admins = new MyBusinessAccountManagement\Resource\AccountsAdmins(
  120. $this,
  121. $this->serviceName,
  122. 'admins',
  123. [
  124. 'methods' => [
  125. 'create' => [
  126. 'path' => 'v1/{+parent}/admins',
  127. 'httpMethod' => 'POST',
  128. 'parameters' => [
  129. 'parent' => [
  130. 'location' => 'path',
  131. 'type' => 'string',
  132. 'required' => true,
  133. ],
  134. ],
  135. ],'delete' => [
  136. 'path' => 'v1/{+name}',
  137. 'httpMethod' => 'DELETE',
  138. 'parameters' => [
  139. 'name' => [
  140. 'location' => 'path',
  141. 'type' => 'string',
  142. 'required' => true,
  143. ],
  144. ],
  145. ],'list' => [
  146. 'path' => 'v1/{+parent}/admins',
  147. 'httpMethod' => 'GET',
  148. 'parameters' => [
  149. 'parent' => [
  150. 'location' => 'path',
  151. 'type' => 'string',
  152. 'required' => true,
  153. ],
  154. ],
  155. ],'patch' => [
  156. 'path' => 'v1/{+name}',
  157. 'httpMethod' => 'PATCH',
  158. 'parameters' => [
  159. 'name' => [
  160. 'location' => 'path',
  161. 'type' => 'string',
  162. 'required' => true,
  163. ],
  164. 'updateMask' => [
  165. 'location' => 'query',
  166. 'type' => 'string',
  167. ],
  168. ],
  169. ],
  170. ]
  171. ]
  172. );
  173. $this->accounts_invitations = new MyBusinessAccountManagement\Resource\AccountsInvitations(
  174. $this,
  175. $this->serviceName,
  176. 'invitations',
  177. [
  178. 'methods' => [
  179. 'accept' => [
  180. 'path' => 'v1/{+name}:accept',
  181. 'httpMethod' => 'POST',
  182. 'parameters' => [
  183. 'name' => [
  184. 'location' => 'path',
  185. 'type' => 'string',
  186. 'required' => true,
  187. ],
  188. ],
  189. ],'decline' => [
  190. 'path' => 'v1/{+name}:decline',
  191. 'httpMethod' => 'POST',
  192. 'parameters' => [
  193. 'name' => [
  194. 'location' => 'path',
  195. 'type' => 'string',
  196. 'required' => true,
  197. ],
  198. ],
  199. ],'list' => [
  200. 'path' => 'v1/{+parent}/invitations',
  201. 'httpMethod' => 'GET',
  202. 'parameters' => [
  203. 'parent' => [
  204. 'location' => 'path',
  205. 'type' => 'string',
  206. 'required' => true,
  207. ],
  208. 'filter' => [
  209. 'location' => 'query',
  210. 'type' => 'string',
  211. ],
  212. ],
  213. ],
  214. ]
  215. ]
  216. );
  217. $this->locations = new MyBusinessAccountManagement\Resource\Locations(
  218. $this,
  219. $this->serviceName,
  220. 'locations',
  221. [
  222. 'methods' => [
  223. 'transfer' => [
  224. 'path' => 'v1/{+name}:transfer',
  225. 'httpMethod' => 'POST',
  226. 'parameters' => [
  227. 'name' => [
  228. 'location' => 'path',
  229. 'type' => 'string',
  230. 'required' => true,
  231. ],
  232. ],
  233. ],
  234. ]
  235. ]
  236. );
  237. $this->locations_admins = new MyBusinessAccountManagement\Resource\LocationsAdmins(
  238. $this,
  239. $this->serviceName,
  240. 'admins',
  241. [
  242. 'methods' => [
  243. 'create' => [
  244. 'path' => 'v1/{+parent}/admins',
  245. 'httpMethod' => 'POST',
  246. 'parameters' => [
  247. 'parent' => [
  248. 'location' => 'path',
  249. 'type' => 'string',
  250. 'required' => true,
  251. ],
  252. ],
  253. ],'delete' => [
  254. 'path' => 'v1/{+name}',
  255. 'httpMethod' => 'DELETE',
  256. 'parameters' => [
  257. 'name' => [
  258. 'location' => 'path',
  259. 'type' => 'string',
  260. 'required' => true,
  261. ],
  262. ],
  263. ],'list' => [
  264. 'path' => 'v1/{+parent}/admins',
  265. 'httpMethod' => 'GET',
  266. 'parameters' => [
  267. 'parent' => [
  268. 'location' => 'path',
  269. 'type' => 'string',
  270. 'required' => true,
  271. ],
  272. ],
  273. ],'patch' => [
  274. 'path' => 'v1/{+name}',
  275. 'httpMethod' => 'PATCH',
  276. 'parameters' => [
  277. 'name' => [
  278. 'location' => 'path',
  279. 'type' => 'string',
  280. 'required' => true,
  281. ],
  282. 'updateMask' => [
  283. 'location' => 'query',
  284. 'type' => 'string',
  285. ],
  286. ],
  287. ],
  288. ]
  289. ]
  290. );
  291. }
  292. }
  293. // Adding a class alias for backwards compatibility with the previous class name.
  294. class_alias(MyBusinessAccountManagement::class, 'Google_Service_MyBusinessAccountManagement');