MyBusinessPlaceActions.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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 MyBusinessPlaceActions (v1).
  21. *
  22. * <p>
  23. * The My Business Place Actions API provides an interface for managing place
  24. * action links of a location on Google. Note - If you have a quota of 0 after
  25. * enabling the API, 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 MyBusinessPlaceActions extends \Google\Service
  35. {
  36. public $locations_placeActionLinks;
  37. public $placeActionTypeMetadata;
  38. public $rootUrlTemplate;
  39. /**
  40. * Constructs the internal representation of the MyBusinessPlaceActions
  41. * service.
  42. *
  43. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  44. * config array to pass to a new Client instance.
  45. * @param string $rootUrl The root URL used for requests to the service.
  46. */
  47. public function __construct($clientOrConfig = [], $rootUrl = null)
  48. {
  49. parent::__construct($clientOrConfig);
  50. $this->rootUrl = $rootUrl ?: 'https://mybusinessplaceactions.googleapis.com/';
  51. $this->rootUrlTemplate = $rootUrl ?: 'https://mybusinessplaceactions.UNIVERSE_DOMAIN/';
  52. $this->servicePath = '';
  53. $this->batchPath = 'batch';
  54. $this->version = 'v1';
  55. $this->serviceName = 'mybusinessplaceactions';
  56. $this->locations_placeActionLinks = new MyBusinessPlaceActions\Resource\LocationsPlaceActionLinks(
  57. $this,
  58. $this->serviceName,
  59. 'placeActionLinks',
  60. [
  61. 'methods' => [
  62. 'create' => [
  63. 'path' => 'v1/{+parent}/placeActionLinks',
  64. 'httpMethod' => 'POST',
  65. 'parameters' => [
  66. 'parent' => [
  67. 'location' => 'path',
  68. 'type' => 'string',
  69. 'required' => true,
  70. ],
  71. ],
  72. ],'delete' => [
  73. 'path' => 'v1/{+name}',
  74. 'httpMethod' => 'DELETE',
  75. 'parameters' => [
  76. 'name' => [
  77. 'location' => 'path',
  78. 'type' => 'string',
  79. 'required' => true,
  80. ],
  81. ],
  82. ],'get' => [
  83. 'path' => 'v1/{+name}',
  84. 'httpMethod' => 'GET',
  85. 'parameters' => [
  86. 'name' => [
  87. 'location' => 'path',
  88. 'type' => 'string',
  89. 'required' => true,
  90. ],
  91. ],
  92. ],'list' => [
  93. 'path' => 'v1/{+parent}/placeActionLinks',
  94. 'httpMethod' => 'GET',
  95. 'parameters' => [
  96. 'parent' => [
  97. 'location' => 'path',
  98. 'type' => 'string',
  99. 'required' => true,
  100. ],
  101. 'filter' => [
  102. 'location' => 'query',
  103. 'type' => 'string',
  104. ],
  105. 'pageSize' => [
  106. 'location' => 'query',
  107. 'type' => 'integer',
  108. ],
  109. 'pageToken' => [
  110. 'location' => 'query',
  111. 'type' => 'string',
  112. ],
  113. ],
  114. ],'patch' => [
  115. 'path' => 'v1/{+name}',
  116. 'httpMethod' => 'PATCH',
  117. 'parameters' => [
  118. 'name' => [
  119. 'location' => 'path',
  120. 'type' => 'string',
  121. 'required' => true,
  122. ],
  123. 'updateMask' => [
  124. 'location' => 'query',
  125. 'type' => 'string',
  126. ],
  127. ],
  128. ],
  129. ]
  130. ]
  131. );
  132. $this->placeActionTypeMetadata = new MyBusinessPlaceActions\Resource\PlaceActionTypeMetadata(
  133. $this,
  134. $this->serviceName,
  135. 'placeActionTypeMetadata',
  136. [
  137. 'methods' => [
  138. 'list' => [
  139. 'path' => 'v1/placeActionTypeMetadata',
  140. 'httpMethod' => 'GET',
  141. 'parameters' => [
  142. 'filter' => [
  143. 'location' => 'query',
  144. 'type' => 'string',
  145. ],
  146. 'languageCode' => [
  147. 'location' => 'query',
  148. 'type' => 'string',
  149. ],
  150. 'pageSize' => [
  151. 'location' => 'query',
  152. 'type' => 'integer',
  153. ],
  154. 'pageToken' => [
  155. 'location' => 'query',
  156. 'type' => 'string',
  157. ],
  158. ],
  159. ],
  160. ]
  161. ]
  162. );
  163. }
  164. }
  165. // Adding a class alias for backwards compatibility with the previous class name.
  166. class_alias(MyBusinessPlaceActions::class, 'Google_Service_MyBusinessPlaceActions');