ResourceSettings.php 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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 ResourceSettings (v1).
  21. *
  22. * <p>
  23. * The Resource Settings API allows users to control and modify the behavior of
  24. * their GCP resources (e.g., VM, firewall, Project, etc.) across the Cloud
  25. * Resource Hierarchy.</p>
  26. *
  27. * <p>
  28. * For more information about this service, see the API
  29. * <a href="https://cloud.google.com/resource-manager/docs/resource-settings/overview" target="_blank">Documentation</a>
  30. * </p>
  31. *
  32. * @author Google, Inc.
  33. */
  34. class ResourceSettings extends \Google\Service
  35. {
  36. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  37. const CLOUD_PLATFORM =
  38. "https://www.googleapis.com/auth/cloud-platform";
  39. public $folders_settings;
  40. public $organizations_settings;
  41. public $projects_settings;
  42. /**
  43. * Constructs the internal representation of the ResourceSettings service.
  44. *
  45. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  46. * config array to pass to a new Client instance.
  47. * @param string $rootUrl The root URL used for requests to the service.
  48. */
  49. public function __construct($clientOrConfig = [], $rootUrl = null)
  50. {
  51. parent::__construct($clientOrConfig);
  52. $this->rootUrl = $rootUrl ?: 'https://resourcesettings.googleapis.com/';
  53. $this->servicePath = '';
  54. $this->batchPath = 'batch';
  55. $this->version = 'v1';
  56. $this->serviceName = 'resourcesettings';
  57. $this->folders_settings = new ResourceSettings\Resource\FoldersSettings(
  58. $this,
  59. $this->serviceName,
  60. 'settings',
  61. [
  62. 'methods' => [
  63. 'get' => [
  64. 'path' => 'v1/{+name}',
  65. 'httpMethod' => 'GET',
  66. 'parameters' => [
  67. 'name' => [
  68. 'location' => 'path',
  69. 'type' => 'string',
  70. 'required' => true,
  71. ],
  72. 'view' => [
  73. 'location' => 'query',
  74. 'type' => 'string',
  75. ],
  76. ],
  77. ],'list' => [
  78. 'path' => 'v1/{+parent}/settings',
  79. 'httpMethod' => 'GET',
  80. 'parameters' => [
  81. 'parent' => [
  82. 'location' => 'path',
  83. 'type' => 'string',
  84. 'required' => true,
  85. ],
  86. 'pageSize' => [
  87. 'location' => 'query',
  88. 'type' => 'integer',
  89. ],
  90. 'pageToken' => [
  91. 'location' => 'query',
  92. 'type' => 'string',
  93. ],
  94. 'view' => [
  95. 'location' => 'query',
  96. 'type' => 'string',
  97. ],
  98. ],
  99. ],'patch' => [
  100. 'path' => 'v1/{+name}',
  101. 'httpMethod' => 'PATCH',
  102. 'parameters' => [
  103. 'name' => [
  104. 'location' => 'path',
  105. 'type' => 'string',
  106. 'required' => true,
  107. ],
  108. ],
  109. ],
  110. ]
  111. ]
  112. );
  113. $this->organizations_settings = new ResourceSettings\Resource\OrganizationsSettings(
  114. $this,
  115. $this->serviceName,
  116. 'settings',
  117. [
  118. 'methods' => [
  119. 'get' => [
  120. 'path' => 'v1/{+name}',
  121. 'httpMethod' => 'GET',
  122. 'parameters' => [
  123. 'name' => [
  124. 'location' => 'path',
  125. 'type' => 'string',
  126. 'required' => true,
  127. ],
  128. 'view' => [
  129. 'location' => 'query',
  130. 'type' => 'string',
  131. ],
  132. ],
  133. ],'list' => [
  134. 'path' => 'v1/{+parent}/settings',
  135. 'httpMethod' => 'GET',
  136. 'parameters' => [
  137. 'parent' => [
  138. 'location' => 'path',
  139. 'type' => 'string',
  140. 'required' => true,
  141. ],
  142. 'pageSize' => [
  143. 'location' => 'query',
  144. 'type' => 'integer',
  145. ],
  146. 'pageToken' => [
  147. 'location' => 'query',
  148. 'type' => 'string',
  149. ],
  150. 'view' => [
  151. 'location' => 'query',
  152. 'type' => 'string',
  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. ],
  165. ],
  166. ]
  167. ]
  168. );
  169. $this->projects_settings = new ResourceSettings\Resource\ProjectsSettings(
  170. $this,
  171. $this->serviceName,
  172. 'settings',
  173. [
  174. 'methods' => [
  175. 'get' => [
  176. 'path' => 'v1/{+name}',
  177. 'httpMethod' => 'GET',
  178. 'parameters' => [
  179. 'name' => [
  180. 'location' => 'path',
  181. 'type' => 'string',
  182. 'required' => true,
  183. ],
  184. 'view' => [
  185. 'location' => 'query',
  186. 'type' => 'string',
  187. ],
  188. ],
  189. ],'list' => [
  190. 'path' => 'v1/{+parent}/settings',
  191. 'httpMethod' => 'GET',
  192. 'parameters' => [
  193. 'parent' => [
  194. 'location' => 'path',
  195. 'type' => 'string',
  196. 'required' => true,
  197. ],
  198. 'pageSize' => [
  199. 'location' => 'query',
  200. 'type' => 'integer',
  201. ],
  202. 'pageToken' => [
  203. 'location' => 'query',
  204. 'type' => 'string',
  205. ],
  206. 'view' => [
  207. 'location' => 'query',
  208. 'type' => 'string',
  209. ],
  210. ],
  211. ],'patch' => [
  212. 'path' => 'v1/{+name}',
  213. 'httpMethod' => 'PATCH',
  214. 'parameters' => [
  215. 'name' => [
  216. 'location' => 'path',
  217. 'type' => 'string',
  218. 'required' => true,
  219. ],
  220. ],
  221. ],
  222. ]
  223. ]
  224. );
  225. }
  226. }
  227. // Adding a class alias for backwards compatibility with the previous class name.
  228. class_alias(ResourceSettings::class, 'Google_Service_ResourceSettings');