PageRenderTime 41ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://bitbucket.org/mtrico08/wedding
PHP | 276 lines | 46 code | 1 blank | 229 comment | 0 complexity | 625fa077e08d087ddbac3ecafe272fa5 MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause
  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 "subnetworks" collection of methods.
  19. * Typical usage is:
  20. * <code>
  21. * $computeService = new Google_Service_Compute(...);
  22. * $subnetworks = $computeService->subnetworks;
  23. * </code>
  24. */
  25. class Google_Service_Compute_Resource_Subnetworks extends Google_Service_Resource
  26. {
  27. /**
  28. * Retrieves an aggregated list of subnetworks. (subnetworks.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. Your {expression} must be in the format: field_name
  35. * 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 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. Acceptable values are 0
  61. * to 500, inclusive. (Default: 500)
  62. * @opt_param string orderBy Sorts list results by a certain order. By default,
  63. * results are returned in alphanumerical order based on the resource name.
  64. *
  65. * You can also sort results in descending order based on the creation timestamp
  66. * using orderBy="creationTimestamp desc". This sorts results based on the
  67. * creationTimestamp field in reverse chronological order (newest result first).
  68. * Use this to sort resources like operations so that the newest operation is
  69. * returned first.
  70. *
  71. * Currently, only sorting by name or creationTimestamp desc is supported.
  72. * @opt_param string pageToken Specifies a page token to use. Set pageToken to
  73. * the nextPageToken returned by a previous list request to get the next page of
  74. * results.
  75. * @return Google_Service_Compute_SubnetworkAggregatedList
  76. */
  77. public function aggregatedList($project, $optParams = array())
  78. {
  79. $params = array('project' => $project);
  80. $params = array_merge($params, $optParams);
  81. return $this->call('aggregatedList', array($params), "Google_Service_Compute_SubnetworkAggregatedList");
  82. }
  83. /**
  84. * Deletes the specified subnetwork. (subnetworks.delete)
  85. *
  86. * @param string $project Project ID for this request.
  87. * @param string $region Name of the region scoping this request.
  88. * @param string $subnetwork Name of the Subnetwork resource to delete.
  89. * @param array $optParams Optional parameters.
  90. *
  91. * @opt_param string requestId An optional request ID to identify requests.
  92. * Specify a unique request ID so that if you must retry your request, the
  93. * server will know to ignore the request if it has already been completed.
  94. *
  95. * For example, consider a situation where you make an initial request and the
  96. * request times out. If you make the request again with the same request ID,
  97. * the server can check if original operation with the same request ID was
  98. * received, and if so, will ignore the second request. This prevents clients
  99. * from accidentally creating duplicate commitments.
  100. *
  101. * The request ID must be a valid UUID with the exception that zero UUID is not
  102. * supported (00000000-0000-0000-0000-000000000000).
  103. * @return Google_Service_Compute_Operation
  104. */
  105. public function delete($project, $region, $subnetwork, $optParams = array())
  106. {
  107. $params = array('project' => $project, 'region' => $region, 'subnetwork' => $subnetwork);
  108. $params = array_merge($params, $optParams);
  109. return $this->call('delete', array($params), "Google_Service_Compute_Operation");
  110. }
  111. /**
  112. * Expands the IP CIDR range of the subnetwork to a specified value.
  113. * (subnetworks.expandIpCidrRange)
  114. *
  115. * @param string $project Project ID for this request.
  116. * @param string $region Name of the region scoping this request.
  117. * @param string $subnetwork Name of the Subnetwork resource to update.
  118. * @param Google_Service_Compute_SubnetworksExpandIpCidrRangeRequest $postBody
  119. * @param array $optParams Optional parameters.
  120. *
  121. * @opt_param string requestId An optional request ID to identify requests.
  122. * Specify a unique request ID so that if you must retry your request, the
  123. * server will know to ignore the request if it has already been completed.
  124. *
  125. * For example, consider a situation where you make an initial request and the
  126. * request times out. If you make the request again with the same request ID,
  127. * the server can check if original operation with the same request ID was
  128. * received, and if so, will ignore the second request. This prevents clients
  129. * from accidentally creating duplicate commitments.
  130. *
  131. * The request ID must be a valid UUID with the exception that zero UUID is not
  132. * supported (00000000-0000-0000-0000-000000000000).
  133. * @return Google_Service_Compute_Operation
  134. */
  135. public function expandIpCidrRange($project, $region, $subnetwork, Google_Service_Compute_SubnetworksExpandIpCidrRangeRequest $postBody, $optParams = array())
  136. {
  137. $params = array('project' => $project, 'region' => $region, 'subnetwork' => $subnetwork, 'postBody' => $postBody);
  138. $params = array_merge($params, $optParams);
  139. return $this->call('expandIpCidrRange', array($params), "Google_Service_Compute_Operation");
  140. }
  141. /**
  142. * Returns the specified subnetwork. Get a list of available subnetworks list()
  143. * request. (subnetworks.get)
  144. *
  145. * @param string $project Project ID for this request.
  146. * @param string $region Name of the region scoping this request.
  147. * @param string $subnetwork Name of the Subnetwork resource to return.
  148. * @param array $optParams Optional parameters.
  149. * @return Google_Service_Compute_Subnetwork
  150. */
  151. public function get($project, $region, $subnetwork, $optParams = array())
  152. {
  153. $params = array('project' => $project, 'region' => $region, 'subnetwork' => $subnetwork);
  154. $params = array_merge($params, $optParams);
  155. return $this->call('get', array($params), "Google_Service_Compute_Subnetwork");
  156. }
  157. /**
  158. * Creates a subnetwork in the specified project using the data included in the
  159. * request. (subnetworks.insert)
  160. *
  161. * @param string $project Project ID for this request.
  162. * @param string $region Name of the region scoping this request.
  163. * @param Google_Service_Compute_Subnetwork $postBody
  164. * @param array $optParams Optional parameters.
  165. *
  166. * @opt_param string requestId An optional request ID to identify requests.
  167. * Specify a unique request ID so that if you must retry your request, the
  168. * server will know to ignore the request if it has already been completed.
  169. *
  170. * For example, consider a situation where you make an initial request and the
  171. * request times out. If you make the request again with the same request ID,
  172. * the server can check if original operation with the same request ID was
  173. * received, and if so, will ignore the second request. This prevents clients
  174. * from accidentally creating duplicate commitments.
  175. *
  176. * The request ID must be a valid UUID with the exception that zero UUID is not
  177. * supported (00000000-0000-0000-0000-000000000000).
  178. * @return Google_Service_Compute_Operation
  179. */
  180. public function insert($project, $region, Google_Service_Compute_Subnetwork $postBody, $optParams = array())
  181. {
  182. $params = array('project' => $project, 'region' => $region, 'postBody' => $postBody);
  183. $params = array_merge($params, $optParams);
  184. return $this->call('insert', array($params), "Google_Service_Compute_Operation");
  185. }
  186. /**
  187. * Retrieves a list of subnetworks available to the specified project.
  188. * (subnetworks.listSubnetworks)
  189. *
  190. * @param string $project Project ID for this request.
  191. * @param string $region Name of the region scoping this request.
  192. * @param array $optParams Optional parameters.
  193. *
  194. * @opt_param string filter Sets a filter {expression} for filtering listed
  195. * resources. Your {expression} must be in the format: field_name
  196. * comparison_string literal_string.
  197. *
  198. * The field_name is the name of the field you want to compare. Only atomic
  199. * field types are supported (string, number, boolean). The comparison_string
  200. * must be either eq (equals) or ne (not equals). The literal_string is the
  201. * string value to filter to. The literal value must be valid for the type of
  202. * field you are filtering by (string, number, boolean). For string fields, the
  203. * literal value is interpreted as a regular expression using RE2 syntax. The
  204. * literal value must match the entire field.
  205. *
  206. * For example, to filter for instances that do not have a name of example-
  207. * instance, you would use name ne example-instance.
  208. *
  209. * You can filter on nested fields. For example, you could filter on instances
  210. * that have set the scheduling.automaticRestart field to true. Use filtering on
  211. * nested fields to take advantage of labels to organize and search for results
  212. * based on label values.
  213. *
  214. * To filter on multiple expressions, provide each separate expression within
  215. * parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-
  216. * central1-f). Multiple expressions are treated as AND expressions, meaning
  217. * that resources must match all expressions to pass the filters.
  218. * @opt_param string maxResults The maximum number of results per page that
  219. * should be returned. If the number of available results is larger than
  220. * maxResults, Compute Engine returns a nextPageToken that can be used to get
  221. * the next page of results in subsequent list requests. Acceptable values are 0
  222. * to 500, inclusive. (Default: 500)
  223. * @opt_param string orderBy Sorts list results by a certain order. By default,
  224. * results are returned in alphanumerical order based on the resource name.
  225. *
  226. * You can also sort results in descending order based on the creation timestamp
  227. * using orderBy="creationTimestamp desc". This sorts results based on the
  228. * creationTimestamp field in reverse chronological order (newest result first).
  229. * Use this to sort resources like operations so that the newest operation is
  230. * returned first.
  231. *
  232. * Currently, only sorting by name or creationTimestamp desc is supported.
  233. * @opt_param string pageToken Specifies a page token to use. Set pageToken to
  234. * the nextPageToken returned by a previous list request to get the next page of
  235. * results.
  236. * @return Google_Service_Compute_SubnetworkList
  237. */
  238. public function listSubnetworks($project, $region, $optParams = array())
  239. {
  240. $params = array('project' => $project, 'region' => $region);
  241. $params = array_merge($params, $optParams);
  242. return $this->call('list', array($params), "Google_Service_Compute_SubnetworkList");
  243. }
  244. /**
  245. * Set whether VMs in this subnet can access Google services without assigning
  246. * external IP addresses through Private Google Access.
  247. * (subnetworks.setPrivateIpGoogleAccess)
  248. *
  249. * @param string $project Project ID for this request.
  250. * @param string $region Name of the region scoping this request.
  251. * @param string $subnetwork Name of the Subnetwork resource.
  252. * @param Google_Service_Compute_SubnetworksSetPrivateIpGoogleAccessRequest $postBody
  253. * @param array $optParams Optional parameters.
  254. *
  255. * @opt_param string requestId An optional request ID to identify requests.
  256. * Specify a unique request ID so that if you must retry your request, the
  257. * server will know to ignore the request if it has already been completed.
  258. *
  259. * For example, consider a situation where you make an initial request and the
  260. * request times out. If you make the request again with the same request ID,
  261. * the server can check if original operation with the same request ID was
  262. * received, and if so, will ignore the second request. This prevents clients
  263. * from accidentally creating duplicate commitments.
  264. *
  265. * The request ID must be a valid UUID with the exception that zero UUID is not
  266. * supported (00000000-0000-0000-0000-000000000000).
  267. * @return Google_Service_Compute_Operation
  268. */
  269. public function setPrivateIpGoogleAccess($project, $region, $subnetwork, Google_Service_Compute_SubnetworksSetPrivateIpGoogleAccessRequest $postBody, $optParams = array())
  270. {
  271. $params = array('project' => $project, 'region' => $region, 'subnetwork' => $subnetwork, 'postBody' => $postBody);
  272. $params = array_merge($params, $optParams);
  273. return $this->call('setPrivateIpGoogleAccess', array($params), "Google_Service_Compute_Operation");
  274. }
  275. }