PageRenderTime 34ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 0ms

/application/third_party/google-api/vendor/google/apiclient-services/src/Google/Service/Compute/Resource/Firewalls.php

https://gitlab.com/Anas7232/Layout-Changes
PHP | 211 lines | 40 code | 1 blank | 170 comment | 0 complexity | e4a40ab8b8a10eab9ea53ebceaa5539c 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 "firewalls" collection of methods.
  19. * Typical usage is:
  20. * <code>
  21. * $computeService = new Google_Service_Compute(...);
  22. * $firewalls = $computeService->firewalls;
  23. * </code>
  24. */
  25. class Google_Service_Compute_Resource_Firewalls extends Google_Service_Resource
  26. {
  27. /**
  28. * Deletes the specified firewall. (firewalls.delete)
  29. *
  30. * @param string $project Project ID for this request.
  31. * @param string $firewall Name of the firewall rule to delete.
  32. * @param array $optParams Optional parameters.
  33. *
  34. * @opt_param string requestId An optional request ID to identify requests.
  35. * Specify a unique request ID so that if you must retry your request, the
  36. * server will know to ignore the request if it has already been completed.
  37. *
  38. * For example, consider a situation where you make an initial request and the
  39. * request times out. If you make the request again with the same request ID,
  40. * the server can check if original operation with the same request ID was
  41. * received, and if so, will ignore the second request. This prevents clients
  42. * from accidentally creating duplicate commitments.
  43. *
  44. * The request ID must be a valid UUID with the exception that zero UUID is not
  45. * supported (00000000-0000-0000-0000-000000000000).
  46. * @return Google_Service_Compute_Operation
  47. */
  48. public function delete($project, $firewall, $optParams = array())
  49. {
  50. $params = array('project' => $project, 'firewall' => $firewall);
  51. $params = array_merge($params, $optParams);
  52. return $this->call('delete', array($params), "Google_Service_Compute_Operation");
  53. }
  54. /**
  55. * Returns the specified firewall. (firewalls.get)
  56. *
  57. * @param string $project Project ID for this request.
  58. * @param string $firewall Name of the firewall rule to return.
  59. * @param array $optParams Optional parameters.
  60. * @return Google_Service_Compute_Firewall
  61. */
  62. public function get($project, $firewall, $optParams = array())
  63. {
  64. $params = array('project' => $project, 'firewall' => $firewall);
  65. $params = array_merge($params, $optParams);
  66. return $this->call('get', array($params), "Google_Service_Compute_Firewall");
  67. }
  68. /**
  69. * Creates a firewall rule in the specified project using the data included in
  70. * the request. (firewalls.insert)
  71. *
  72. * @param string $project Project ID for this request.
  73. * @param Google_Service_Compute_Firewall $postBody
  74. * @param array $optParams Optional parameters.
  75. *
  76. * @opt_param string requestId An optional request ID to identify requests.
  77. * Specify a unique request ID so that if you must retry your request, the
  78. * server will know to ignore the request if it has already been completed.
  79. *
  80. * For example, consider a situation where you make an initial request and the
  81. * request times out. If you make the request again with the same request ID,
  82. * the server can check if original operation with the same request ID was
  83. * received, and if so, will ignore the second request. This prevents clients
  84. * from accidentally creating duplicate commitments.
  85. *
  86. * The request ID must be a valid UUID with the exception that zero UUID is not
  87. * supported (00000000-0000-0000-0000-000000000000).
  88. * @return Google_Service_Compute_Operation
  89. */
  90. public function insert($project, Google_Service_Compute_Firewall $postBody, $optParams = array())
  91. {
  92. $params = array('project' => $project, 'postBody' => $postBody);
  93. $params = array_merge($params, $optParams);
  94. return $this->call('insert', array($params), "Google_Service_Compute_Operation");
  95. }
  96. /**
  97. * Retrieves the list of firewall rules available to the specified project.
  98. * (firewalls.listFirewalls)
  99. *
  100. * @param string $project Project ID for this request.
  101. * @param array $optParams Optional parameters.
  102. *
  103. * @opt_param string filter A filter expression that filters resources listed in
  104. * the response. The expression must specify the field name, a comparison
  105. * operator, and the value that you want to use for filtering. The value must be
  106. * a string, a number, or a boolean. The comparison operator must be either =,
  107. * !=, >, or <.
  108. *
  109. * For example, if you are filtering Compute Engine instances, you can exclude
  110. * instances named example-instance by specifying name != example-instance.
  111. *
  112. * You can also filter nested fields. For example, you could specify
  113. * scheduling.automaticRestart = false to include instances only if they are not
  114. * scheduled for automatic restarts. You can use filtering on nested fields to
  115. * filter based on resource labels.
  116. *
  117. * To filter on multiple expressions, provide each separate expression within
  118. * parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform =
  119. * "Intel Skylake"). By default, each expression is an AND expression. However,
  120. * you can include AND and OR expressions explicitly. For example, (cpuPlatform
  121. * = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND
  122. * (scheduling.automaticRestart = true).
  123. * @opt_param string maxResults The maximum number of results per page that
  124. * should be returned. If the number of available results is larger than
  125. * maxResults, Compute Engine returns a nextPageToken that can be used to get
  126. * the next page of results in subsequent list requests. Acceptable values are 0
  127. * to 500, inclusive. (Default: 500)
  128. * @opt_param string orderBy Sorts list results by a certain order. By default,
  129. * results are returned in alphanumerical order based on the resource name.
  130. *
  131. * You can also sort results in descending order based on the creation timestamp
  132. * using orderBy="creationTimestamp desc". This sorts results based on the
  133. * creationTimestamp field in reverse chronological order (newest result first).
  134. * Use this to sort resources like operations so that the newest operation is
  135. * returned first.
  136. *
  137. * Currently, only sorting by name or creationTimestamp desc is supported.
  138. * @opt_param string pageToken Specifies a page token to use. Set pageToken to
  139. * the nextPageToken returned by a previous list request to get the next page of
  140. * results.
  141. * @return Google_Service_Compute_FirewallList
  142. */
  143. public function listFirewalls($project, $optParams = array())
  144. {
  145. $params = array('project' => $project);
  146. $params = array_merge($params, $optParams);
  147. return $this->call('list', array($params), "Google_Service_Compute_FirewallList");
  148. }
  149. /**
  150. * Updates the specified firewall rule with the data included in the request.
  151. * This method supports PATCH semantics and uses the JSON merge patch format and
  152. * processing rules. (firewalls.patch)
  153. *
  154. * @param string $project Project ID for this request.
  155. * @param string $firewall Name of the firewall rule to patch.
  156. * @param Google_Service_Compute_Firewall $postBody
  157. * @param array $optParams Optional parameters.
  158. *
  159. * @opt_param string requestId An optional request ID to identify requests.
  160. * Specify a unique request ID so that if you must retry your request, the
  161. * server will know to ignore the request if it has already been completed.
  162. *
  163. * For example, consider a situation where you make an initial request and the
  164. * request times out. If you make the request again with the same request ID,
  165. * the server can check if original operation with the same request ID was
  166. * received, and if so, will ignore the second request. This prevents clients
  167. * from accidentally creating duplicate commitments.
  168. *
  169. * The request ID must be a valid UUID with the exception that zero UUID is not
  170. * supported (00000000-0000-0000-0000-000000000000).
  171. * @return Google_Service_Compute_Operation
  172. */
  173. public function patch($project, $firewall, Google_Service_Compute_Firewall $postBody, $optParams = array())
  174. {
  175. $params = array('project' => $project, 'firewall' => $firewall, 'postBody' => $postBody);
  176. $params = array_merge($params, $optParams);
  177. return $this->call('patch', array($params), "Google_Service_Compute_Operation");
  178. }
  179. /**
  180. * Updates the specified firewall rule with the data included in the request.
  181. * The PUT method can only update the following fields of firewall rule:
  182. * allowed, description, sourceRanges, sourceTags, targetTags.
  183. * (firewalls.update)
  184. *
  185. * @param string $project Project ID for this request.
  186. * @param string $firewall Name of the firewall rule to update.
  187. * @param Google_Service_Compute_Firewall $postBody
  188. * @param array $optParams Optional parameters.
  189. *
  190. * @opt_param string requestId An optional request ID to identify requests.
  191. * Specify a unique request ID so that if you must retry your request, the
  192. * server will know to ignore the request if it has already been completed.
  193. *
  194. * For example, consider a situation where you make an initial request and the
  195. * request times out. If you make the request again with the same request ID,
  196. * the server can check if original operation with the same request ID was
  197. * received, and if so, will ignore the second request. This prevents clients
  198. * from accidentally creating duplicate commitments.
  199. *
  200. * The request ID must be a valid UUID with the exception that zero UUID is not
  201. * supported (00000000-0000-0000-0000-000000000000).
  202. * @return Google_Service_Compute_Operation
  203. */
  204. public function update($project, $firewall, Google_Service_Compute_Firewall $postBody, $optParams = array())
  205. {
  206. $params = array('project' => $project, 'firewall' => $firewall, 'postBody' => $postBody);
  207. $params = array_merge($params, $optParams);
  208. return $this->call('update', array($params), "Google_Service_Compute_Operation");
  209. }
  210. }