PageRenderTime 24ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/vendor/google/apiclient-services/src/Compute/Resource/PublicDelegatedPrefixes.php

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