PageRenderTime 50ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/lib/vendor/google/apiclient-services/src/Google/Service/Compute/Resource/Autoscalers.php

https://gitlab.com/efabian/maya
PHP | 275 lines | 46 code | 1 blank | 228 comment | 0 complexity | 5ae3d9ffef04619727a84f5802e4c647 MD5 | raw file
  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. /**
  18. * The "autoscalers" collection of methods.
  19. * Typical usage is:
  20. * <code>
  21. * $computeService = new Google_Service_Compute(...);
  22. * $autoscalers = $computeService->autoscalers;
  23. * </code>
  24. */
  25. class Google_Service_Compute_Resource_Autoscalers extends Google_Service_Resource
  26. {
  27. /**
  28. * Retrieves an aggregated list of autoscalers. (autoscalers.aggregatedList)
  29. *
  30. * @param string $project Project ID for this request.
  31. * @param array $optParams Optional parameters.
  32. *
  33. * @opt_param string filter A filter expression that filters resources listed in
  34. * the response. The expression must specify the field name, a comparison
  35. * operator, and the value that you want to use for filtering. The value must be
  36. * a string, a number, or a boolean. The comparison operator must be either `=`,
  37. * `!=`, `>`, or `<`.
  38. *
  39. * For example, if you are filtering Compute Engine instances, you can exclude
  40. * instances named `example-instance` by specifying `name != example-instance`.
  41. *
  42. * You can also filter nested fields. For example, you could specify
  43. * `scheduling.automaticRestart = false` to include instances only if they are
  44. * not scheduled for automatic restarts. You can use filtering on nested fields
  45. * to filter based on resource labels.
  46. *
  47. * To filter on multiple expressions, provide each separate expression within
  48. * parentheses. For example: ``` (scheduling.automaticRestart = true)
  49. * (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND`
  50. * expression. However, you can include `AND` and `OR` expressions explicitly.
  51. * For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel
  52. * Broadwell") AND (scheduling.automaticRestart = true) ```
  53. * @opt_param bool includeAllScopes Indicates whether every visible scope for
  54. * each scope type (zone, region, global) should be included in the response.
  55. * For new resource types added after this field, the flag has no effect as new
  56. * resource types will always include every visible scope for each scope type in
  57. * response. For resource types which predate this field, if this flag is
  58. * omitted or false, only scopes of the scope types where the resource type is
  59. * expected to be found will be included.
  60. * @opt_param string maxResults The maximum number of results per page that
  61. * should be returned. If the number of available results is larger than
  62. * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
  63. * get the next page of results in subsequent list requests. Acceptable values
  64. * are `0` to `500`, inclusive. (Default: `500`)
  65. * @opt_param string orderBy Sorts list results by a certain order. By default,
  66. * results are returned in alphanumerical order based on the resource name.
  67. *
  68. * You can also sort results in descending order based on the creation timestamp
  69. * using `orderBy="creationTimestamp desc"`. This sorts results based on the
  70. * `creationTimestamp` field in reverse chronological order (newest result
  71. * first). Use this to sort resources like operations so that the newest
  72. * operation is returned first.
  73. *
  74. * Currently, only sorting by `name` or `creationTimestamp desc` is supported.
  75. * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
  76. * the `nextPageToken` returned by a previous list request to get the next page
  77. * of results.
  78. * @return Google_Service_Compute_AutoscalerAggregatedList
  79. */
  80. public function aggregatedList($project, $optParams = array())
  81. {
  82. $params = array('project' => $project);
  83. $params = array_merge($params, $optParams);
  84. return $this->call('aggregatedList', array($params), "Google_Service_Compute_AutoscalerAggregatedList");
  85. }
  86. /**
  87. * Deletes the specified autoscaler. (autoscalers.delete)
  88. *
  89. * @param string $project Project ID for this request.
  90. * @param string $zone Name of the zone for this request.
  91. * @param string $autoscaler Name of the autoscaler to delete.
  92. * @param array $optParams Optional parameters.
  93. *
  94. * @opt_param string requestId An optional request ID to identify requests.
  95. * Specify a unique request ID so that if you must retry your request, the
  96. * server will know to ignore the request if it has already been completed.
  97. *
  98. * For example, consider a situation where you make an initial request and the
  99. * request times out. If you make the request again with the same request ID,
  100. * the server can check if original operation with the same request ID was
  101. * received, and if so, will ignore the second request. This prevents clients
  102. * from accidentally creating duplicate commitments.
  103. *
  104. * The request ID must be a valid UUID with the exception that zero UUID is not
  105. * supported (00000000-0000-0000-0000-000000000000).
  106. * @return Google_Service_Compute_Operation
  107. */
  108. public function delete($project, $zone, $autoscaler, $optParams = array())
  109. {
  110. $params = array('project' => $project, 'zone' => $zone, 'autoscaler' => $autoscaler);
  111. $params = array_merge($params, $optParams);
  112. return $this->call('delete', array($params), "Google_Service_Compute_Operation");
  113. }
  114. /**
  115. * Returns the specified autoscaler resource. Gets a list of available
  116. * autoscalers by making a list() request. (autoscalers.get)
  117. *
  118. * @param string $project Project ID for this request.
  119. * @param string $zone Name of the zone for this request.
  120. * @param string $autoscaler Name of the autoscaler to return.
  121. * @param array $optParams Optional parameters.
  122. * @return Google_Service_Compute_Autoscaler
  123. */
  124. public function get($project, $zone, $autoscaler, $optParams = array())
  125. {
  126. $params = array('project' => $project, 'zone' => $zone, 'autoscaler' => $autoscaler);
  127. $params = array_merge($params, $optParams);
  128. return $this->call('get', array($params), "Google_Service_Compute_Autoscaler");
  129. }
  130. /**
  131. * Creates an autoscaler in the specified project using the data included in the
  132. * request. (autoscalers.insert)
  133. *
  134. * @param string $project Project ID for this request.
  135. * @param string $zone Name of the zone for this request.
  136. * @param Google_Service_Compute_Autoscaler $postBody
  137. * @param array $optParams Optional parameters.
  138. *
  139. * @opt_param string requestId An optional request ID to identify requests.
  140. * Specify a unique request ID so that if you must retry your request, the
  141. * server will know to ignore the request if it has already been completed.
  142. *
  143. * For example, consider a situation where you make an initial request and the
  144. * request times out. If you make the request again with the same request ID,
  145. * the server can check if original operation with the same request ID was
  146. * received, and if so, will ignore the second request. This prevents clients
  147. * from accidentally creating duplicate commitments.
  148. *
  149. * The request ID must be a valid UUID with the exception that zero UUID is not
  150. * supported (00000000-0000-0000-0000-000000000000).
  151. * @return Google_Service_Compute_Operation
  152. */
  153. public function insert($project, $zone, Google_Service_Compute_Autoscaler $postBody, $optParams = array())
  154. {
  155. $params = array('project' => $project, 'zone' => $zone, 'postBody' => $postBody);
  156. $params = array_merge($params, $optParams);
  157. return $this->call('insert', array($params), "Google_Service_Compute_Operation");
  158. }
  159. /**
  160. * Retrieves a list of autoscalers contained within the specified zone.
  161. * (autoscalers.listAutoscalers)
  162. *
  163. * @param string $project Project ID for this request.
  164. * @param string $zone Name of the zone for this request.
  165. * @param array $optParams Optional parameters.
  166. *
  167. * @opt_param string filter A filter expression that filters resources listed in
  168. * the response. The expression must specify the field name, a comparison
  169. * operator, and the value that you want to use for filtering. The value must be
  170. * a string, a number, or a boolean. The comparison operator must be either `=`,
  171. * `!=`, `>`, or `<`.
  172. *
  173. * For example, if you are filtering Compute Engine instances, you can exclude
  174. * instances named `example-instance` by specifying `name != example-instance`.
  175. *
  176. * You can also filter nested fields. For example, you could specify
  177. * `scheduling.automaticRestart = false` to include instances only if they are
  178. * not scheduled for automatic restarts. You can use filtering on nested fields
  179. * to filter based on resource labels.
  180. *
  181. * To filter on multiple expressions, provide each separate expression within
  182. * parentheses. For example: ``` (scheduling.automaticRestart = true)
  183. * (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND`
  184. * expression. However, you can include `AND` and `OR` expressions explicitly.
  185. * For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel
  186. * Broadwell") AND (scheduling.automaticRestart = true) ```
  187. * @opt_param string maxResults The maximum number of results per page that
  188. * should be returned. If the number of available results is larger than
  189. * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
  190. * get the next page of results in subsequent list requests. Acceptable values
  191. * are `0` to `500`, inclusive. (Default: `500`)
  192. * @opt_param string orderBy Sorts list results by a certain order. By default,
  193. * results are returned in alphanumerical order based on the resource name.
  194. *
  195. * You can also sort results in descending order based on the creation timestamp
  196. * using `orderBy="creationTimestamp desc"`. This sorts results based on the
  197. * `creationTimestamp` field in reverse chronological order (newest result
  198. * first). Use this to sort resources like operations so that the newest
  199. * operation is returned first.
  200. *
  201. * Currently, only sorting by `name` or `creationTimestamp desc` is supported.
  202. * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
  203. * the `nextPageToken` returned by a previous list request to get the next page
  204. * of results.
  205. * @return Google_Service_Compute_AutoscalerList
  206. */
  207. public function listAutoscalers($project, $zone, $optParams = array())
  208. {
  209. $params = array('project' => $project, 'zone' => $zone);
  210. $params = array_merge($params, $optParams);
  211. return $this->call('list', array($params), "Google_Service_Compute_AutoscalerList");
  212. }
  213. /**
  214. * Updates an autoscaler in the specified project using the data included in the
  215. * request. This method supports PATCH semantics and uses the JSON merge patch
  216. * format and processing rules. (autoscalers.patch)
  217. *
  218. * @param string $project Project ID for this request.
  219. * @param string $zone Name of the zone for this request.
  220. * @param Google_Service_Compute_Autoscaler $postBody
  221. * @param array $optParams Optional parameters.
  222. *
  223. * @opt_param string autoscaler Name of the autoscaler to patch.
  224. * @opt_param string requestId An optional request ID to identify requests.
  225. * Specify a unique request ID so that if you must retry your request, the
  226. * server will know to ignore the request if it has already been completed.
  227. *
  228. * For example, consider a situation where you make an initial request and the
  229. * request times out. If you make the request again with the same request ID,
  230. * the server can check if original operation with the same request ID was
  231. * received, and if so, will ignore the second request. This prevents clients
  232. * from accidentally creating duplicate commitments.
  233. *
  234. * The request ID must be a valid UUID with the exception that zero UUID is not
  235. * supported (00000000-0000-0000-0000-000000000000).
  236. * @return Google_Service_Compute_Operation
  237. */
  238. public function patch($project, $zone, Google_Service_Compute_Autoscaler $postBody, $optParams = array())
  239. {
  240. $params = array('project' => $project, 'zone' => $zone, 'postBody' => $postBody);
  241. $params = array_merge($params, $optParams);
  242. return $this->call('patch', array($params), "Google_Service_Compute_Operation");
  243. }
  244. /**
  245. * Updates an autoscaler in the specified project using the data included in the
  246. * request. (autoscalers.update)
  247. *
  248. * @param string $project Project ID for this request.
  249. * @param string $zone Name of the zone for this request.
  250. * @param Google_Service_Compute_Autoscaler $postBody
  251. * @param array $optParams Optional parameters.
  252. *
  253. * @opt_param string autoscaler Name of the autoscaler to update.
  254. * @opt_param string requestId An optional request ID to identify requests.
  255. * Specify a unique request ID so that if you must retry your request, the
  256. * server will know to ignore the request if it has already been completed.
  257. *
  258. * For example, consider a situation where you make an initial request and the
  259. * request times out. If you make the request again with the same request ID,
  260. * the server can check if original operation with the same request ID was
  261. * received, and if so, will ignore the second request. This prevents clients
  262. * from accidentally creating duplicate commitments.
  263. *
  264. * The request ID must be a valid UUID with the exception that zero UUID is not
  265. * supported (00000000-0000-0000-0000-000000000000).
  266. * @return Google_Service_Compute_Operation
  267. */
  268. public function update($project, $zone, Google_Service_Compute_Autoscaler $postBody, $optParams = array())
  269. {
  270. $params = array('project' => $project, 'zone' => $zone, 'postBody' => $postBody);
  271. $params = array_merge($params, $optParams);
  272. return $this->call('update', array($params), "Google_Service_Compute_Operation");
  273. }
  274. }