PageRenderTime 51ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://gitlab.com/ndhoang93/ytb
PHP | 254 lines | 58 code | 1 blank | 195 comment | 0 complexity | 3ee39188442a9e66ea513cbe91b61816 MD5 | raw file
  1. <?php
  2. /*
  3. * Copyright 2016 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 "routers" collection of methods.
  19. * Typical usage is:
  20. * <code>
  21. * $computeService = new Google_Service_Compute(...);
  22. * $routers = $computeService->routers;
  23. * </code>
  24. */
  25. class Google_Service_Compute_Resource_Routers extends Google_Service_Resource
  26. {
  27. /**
  28. * Retrieves an aggregated list of routers. (routers.aggregatedList)
  29. *
  30. * @param string $project Project ID for this request.
  31. * @param array $optParams Optional parameters.
  32. *
  33. * @opt_param string filter Sets a filter expression for filtering listed
  34. * resources, in the form filter={expression}. Your {expression} must be in the
  35. * format: field_name comparison_string literal_string.
  36. *
  37. * The field_name is the name of the field you want to compare. Only atomic
  38. * field types are supported (string, number, boolean). The comparison_string
  39. * must be either eq (equals) or ne (not equals). The literal_string is the
  40. * string value to filter to. The literal value must be valid for the type of
  41. * field you are filtering by (string, number, boolean). For string fields, the
  42. * literal value is interpreted as a regular expression using RE2 syntax. The
  43. * literal value must match the entire field.
  44. *
  45. * For example, to filter for instances that do not have a name of example-
  46. * instance, you would use filter=name ne example-instance.
  47. *
  48. * You can filter on nested fields. For example, you could filter on instances
  49. * that have set the scheduling.automaticRestart field to true. Use filtering on
  50. * nested fields to take advantage of labels to organize and search for results
  51. * based on label values.
  52. *
  53. * To filter on multiple expressions, provide each separate expression within
  54. * parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-
  55. * central1-f). Multiple expressions are treated as AND expressions, meaning
  56. * that resources must match all expressions to pass the filters.
  57. * @opt_param string maxResults The maximum number of results per page that
  58. * should be returned. If the number of available results is larger than
  59. * maxResults, Compute Engine returns a nextPageToken that can be used to get
  60. * the next page of results in subsequent list requests.
  61. * @opt_param string orderBy Sorts list results by a certain order. By default,
  62. * results are returned in alphanumerical order based on the resource name.
  63. *
  64. * You can also sort results in descending order based on the creation timestamp
  65. * using orderBy="creationTimestamp desc". This sorts results based on the
  66. * creationTimestamp field in reverse chronological order (newest result first).
  67. * Use this to sort resources like operations so that the newest operation is
  68. * returned first.
  69. *
  70. * Currently, only sorting by name or creationTimestamp desc is supported.
  71. * @opt_param string pageToken Specifies a page token to use. Set pageToken to
  72. * the nextPageToken returned by a previous list request to get the next page of
  73. * results.
  74. * @return Google_Service_Compute_RouterAggregatedList
  75. */
  76. public function aggregatedList($project, $optParams = array())
  77. {
  78. $params = array('project' => $project);
  79. $params = array_merge($params, $optParams);
  80. return $this->call('aggregatedList', array($params), "Google_Service_Compute_RouterAggregatedList");
  81. }
  82. /**
  83. * Deletes the specified Router resource. (routers.delete)
  84. *
  85. * @param string $project Project ID for this request.
  86. * @param string $region Name of the region for this request.
  87. * @param string $router Name of the Router resource to delete.
  88. * @param array $optParams Optional parameters.
  89. * @return Google_Service_Compute_Operation
  90. */
  91. public function delete($project, $region, $router, $optParams = array())
  92. {
  93. $params = array('project' => $project, 'region' => $region, 'router' => $router);
  94. $params = array_merge($params, $optParams);
  95. return $this->call('delete', array($params), "Google_Service_Compute_Operation");
  96. }
  97. /**
  98. * Returns the specified Router resource. Get a list of available routers by
  99. * making a list() request. (routers.get)
  100. *
  101. * @param string $project Project ID for this request.
  102. * @param string $region Name of the region for this request.
  103. * @param string $router Name of the Router resource to return.
  104. * @param array $optParams Optional parameters.
  105. * @return Google_Service_Compute_Router
  106. */
  107. public function get($project, $region, $router, $optParams = array())
  108. {
  109. $params = array('project' => $project, 'region' => $region, 'router' => $router);
  110. $params = array_merge($params, $optParams);
  111. return $this->call('get', array($params), "Google_Service_Compute_Router");
  112. }
  113. /**
  114. * Retrieves runtime information of the specified router.
  115. * (routers.getRouterStatus)
  116. *
  117. * @param string $project Project ID for this request.
  118. * @param string $region Name of the region for this request.
  119. * @param string $router Name of the Router resource to query.
  120. * @param array $optParams Optional parameters.
  121. * @return Google_Service_Compute_RouterStatusResponse
  122. */
  123. public function getRouterStatus($project, $region, $router, $optParams = array())
  124. {
  125. $params = array('project' => $project, 'region' => $region, 'router' => $router);
  126. $params = array_merge($params, $optParams);
  127. return $this->call('getRouterStatus', array($params), "Google_Service_Compute_RouterStatusResponse");
  128. }
  129. /**
  130. * Creates a Router resource in the specified project and region using the data
  131. * included in the request. (routers.insert)
  132. *
  133. * @param string $project Project ID for this request.
  134. * @param string $region Name of the region for this request.
  135. * @param Google_Service_Compute_Router $postBody
  136. * @param array $optParams Optional parameters.
  137. * @return Google_Service_Compute_Operation
  138. */
  139. public function insert($project, $region, Google_Service_Compute_Router $postBody, $optParams = array())
  140. {
  141. $params = array('project' => $project, 'region' => $region, 'postBody' => $postBody);
  142. $params = array_merge($params, $optParams);
  143. return $this->call('insert', array($params), "Google_Service_Compute_Operation");
  144. }
  145. /**
  146. * Retrieves a list of Router resources available to the specified project.
  147. * (routers.listRouters)
  148. *
  149. * @param string $project Project ID for this request.
  150. * @param string $region Name of the region for this request.
  151. * @param array $optParams Optional parameters.
  152. *
  153. * @opt_param string filter Sets a filter expression for filtering listed
  154. * resources, in the form filter={expression}. Your {expression} must be in the
  155. * format: field_name comparison_string literal_string.
  156. *
  157. * The field_name is the name of the field you want to compare. Only atomic
  158. * field types are supported (string, number, boolean). The comparison_string
  159. * must be either eq (equals) or ne (not equals). The literal_string is the
  160. * string value to filter to. The literal value must be valid for the type of
  161. * field you are filtering by (string, number, boolean). For string fields, the
  162. * literal value is interpreted as a regular expression using RE2 syntax. The
  163. * literal value must match the entire field.
  164. *
  165. * For example, to filter for instances that do not have a name of example-
  166. * instance, you would use filter=name ne example-instance.
  167. *
  168. * You can filter on nested fields. For example, you could filter on instances
  169. * that have set the scheduling.automaticRestart field to true. Use filtering on
  170. * nested fields to take advantage of labels to organize and search for results
  171. * based on label values.
  172. *
  173. * To filter on multiple expressions, provide each separate expression within
  174. * parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-
  175. * central1-f). Multiple expressions are treated as AND expressions, meaning
  176. * that resources must match all expressions to pass the filters.
  177. * @opt_param string maxResults The maximum number of results per page that
  178. * should be returned. If the number of available results is larger than
  179. * maxResults, Compute Engine returns a nextPageToken that can be used to get
  180. * the next page of results in subsequent list requests.
  181. * @opt_param string orderBy Sorts list results by a certain order. By default,
  182. * results are returned in alphanumerical order based on the resource name.
  183. *
  184. * You can also sort results in descending order based on the creation timestamp
  185. * using orderBy="creationTimestamp desc". This sorts results based on the
  186. * creationTimestamp field in reverse chronological order (newest result first).
  187. * Use this to sort resources like operations so that the newest operation is
  188. * returned first.
  189. *
  190. * Currently, only sorting by name or creationTimestamp desc is supported.
  191. * @opt_param string pageToken Specifies a page token to use. Set pageToken to
  192. * the nextPageToken returned by a previous list request to get the next page of
  193. * results.
  194. * @return Google_Service_Compute_RouterList
  195. */
  196. public function listRouters($project, $region, $optParams = array())
  197. {
  198. $params = array('project' => $project, 'region' => $region);
  199. $params = array_merge($params, $optParams);
  200. return $this->call('list', array($params), "Google_Service_Compute_RouterList");
  201. }
  202. /**
  203. * Updates the specified Router resource with the data included in the request.
  204. * This method supports patch semantics. (routers.patch)
  205. *
  206. * @param string $project Project ID for this request.
  207. * @param string $region Name of the region for this request.
  208. * @param string $router Name of the Router resource to update.
  209. * @param Google_Service_Compute_Router $postBody
  210. * @param array $optParams Optional parameters.
  211. * @return Google_Service_Compute_Operation
  212. */
  213. public function patch($project, $region, $router, Google_Service_Compute_Router $postBody, $optParams = array())
  214. {
  215. $params = array('project' => $project, 'region' => $region, 'router' => $router, 'postBody' => $postBody);
  216. $params = array_merge($params, $optParams);
  217. return $this->call('patch', array($params), "Google_Service_Compute_Operation");
  218. }
  219. /**
  220. * Preview fields auto-generated during router create and update operations.
  221. * Calling this method does NOT create or update the router. (routers.preview)
  222. *
  223. * @param string $project Project ID for this request.
  224. * @param string $region Name of the region for this request.
  225. * @param string $router Name of the Router resource to query.
  226. * @param Google_Service_Compute_Router $postBody
  227. * @param array $optParams Optional parameters.
  228. * @return Google_Service_Compute_RoutersPreviewResponse
  229. */
  230. public function preview($project, $region, $router, Google_Service_Compute_Router $postBody, $optParams = array())
  231. {
  232. $params = array('project' => $project, 'region' => $region, 'router' => $router, 'postBody' => $postBody);
  233. $params = array_merge($params, $optParams);
  234. return $this->call('preview', array($params), "Google_Service_Compute_RoutersPreviewResponse");
  235. }
  236. /**
  237. * Updates the specified Router resource with the data included in the request.
  238. * (routers.update)
  239. *
  240. * @param string $project Project ID for this request.
  241. * @param string $region Name of the region for this request.
  242. * @param string $router Name of the Router resource to update.
  243. * @param Google_Service_Compute_Router $postBody
  244. * @param array $optParams Optional parameters.
  245. * @return Google_Service_Compute_Operation
  246. */
  247. public function update($project, $region, $router, Google_Service_Compute_Router $postBody, $optParams = array())
  248. {
  249. $params = array('project' => $project, 'region' => $region, 'router' => $router, 'postBody' => $postBody);
  250. $params = array_merge($params, $optParams);
  251. return $this->call('update', array($params), "Google_Service_Compute_Operation");
  252. }
  253. }