PageRenderTime 40ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/application/third_party/google-api/vendor/google/apiclient-services/src/Google/Service/CloudUserAccounts/Resource/Users.php

https://gitlab.com/Anas7232/Layout-Changes
PHP | 209 lines | 58 code | 1 blank | 150 comment | 0 complexity | 1759fb0414661f669c9b8ee80b85bb88 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 "users" collection of methods.
  19. * Typical usage is:
  20. * <code>
  21. * $clouduseraccountsService = new Google_Service_CloudUserAccounts(...);
  22. * $users = $clouduseraccountsService->users;
  23. * </code>
  24. */
  25. class Google_Service_CloudUserAccounts_Resource_Users extends Google_Service_Resource
  26. {
  27. /**
  28. * Adds a public key to the specified User resource with the data included in
  29. * the request. (users.addPublicKey)
  30. *
  31. * @param string $project Project ID for this request.
  32. * @param string $user Name of the user for this request.
  33. * @param Google_Service_CloudUserAccounts_PublicKey $postBody
  34. * @param array $optParams Optional parameters.
  35. * @return Google_Service_CloudUserAccounts_Operation
  36. */
  37. public function addPublicKey($project, $user, Google_Service_CloudUserAccounts_PublicKey $postBody, $optParams = array())
  38. {
  39. $params = array('project' => $project, 'user' => $user, 'postBody' => $postBody);
  40. $params = array_merge($params, $optParams);
  41. return $this->call('addPublicKey', array($params), "Google_Service_CloudUserAccounts_Operation");
  42. }
  43. /**
  44. * Deletes the specified User resource. (users.delete)
  45. *
  46. * @param string $project Project ID for this request.
  47. * @param string $user Name of the user resource to delete.
  48. * @param array $optParams Optional parameters.
  49. * @return Google_Service_CloudUserAccounts_Operation
  50. */
  51. public function delete($project, $user, $optParams = array())
  52. {
  53. $params = array('project' => $project, 'user' => $user);
  54. $params = array_merge($params, $optParams);
  55. return $this->call('delete', array($params), "Google_Service_CloudUserAccounts_Operation");
  56. }
  57. /**
  58. * Returns the specified User resource. (users.get)
  59. *
  60. * @param string $project Project ID for this request.
  61. * @param string $user Name of the user resource to return.
  62. * @param array $optParams Optional parameters.
  63. * @return Google_Service_CloudUserAccounts_User
  64. */
  65. public function get($project, $user, $optParams = array())
  66. {
  67. $params = array('project' => $project, 'user' => $user);
  68. $params = array_merge($params, $optParams);
  69. return $this->call('get', array($params), "Google_Service_CloudUserAccounts_User");
  70. }
  71. /**
  72. * Gets the access control policy for a resource. May be empty if no such policy
  73. * or resource exists. (users.getIamPolicy)
  74. *
  75. * @param string $project Project ID for this request.
  76. * @param string $resource Name of the resource for this request.
  77. * @param array $optParams Optional parameters.
  78. * @return Google_Service_CloudUserAccounts_Policy
  79. */
  80. public function getIamPolicy($project, $resource, $optParams = array())
  81. {
  82. $params = array('project' => $project, 'resource' => $resource);
  83. $params = array_merge($params, $optParams);
  84. return $this->call('getIamPolicy', array($params), "Google_Service_CloudUserAccounts_Policy");
  85. }
  86. /**
  87. * Creates a User resource in the specified project using the data included in
  88. * the request. (users.insert)
  89. *
  90. * @param string $project Project ID for this request.
  91. * @param Google_Service_CloudUserAccounts_User $postBody
  92. * @param array $optParams Optional parameters.
  93. * @return Google_Service_CloudUserAccounts_Operation
  94. */
  95. public function insert($project, Google_Service_CloudUserAccounts_User $postBody, $optParams = array())
  96. {
  97. $params = array('project' => $project, 'postBody' => $postBody);
  98. $params = array_merge($params, $optParams);
  99. return $this->call('insert', array($params), "Google_Service_CloudUserAccounts_Operation");
  100. }
  101. /**
  102. * Retrieves a list of users contained within the specified project.
  103. * (users.listUsers)
  104. *
  105. * @param string $project Project ID for this request.
  106. * @param array $optParams Optional parameters.
  107. *
  108. * @opt_param string filter Sets a filter expression for filtering listed
  109. * resources, in the form filter={expression}. Your {expression} must be in the
  110. * format: field_name comparison_string literal_string.
  111. *
  112. * The field_name is the name of the field you want to compare. Only atomic
  113. * field types are supported (string, number, boolean). The comparison_string
  114. * must be either eq (equals) or ne (not equals). The literal_string is the
  115. * string value to filter to. The literal value must be valid for the type of
  116. * field you are filtering by (string, number, boolean). For string fields, the
  117. * literal value is interpreted as a regular expression using RE2 syntax. The
  118. * literal value must match the entire field.
  119. *
  120. * For example, to filter for instances that do not have a name of example-
  121. * instance, you would use filter=name ne example-instance.
  122. *
  123. * Compute Engine Beta API Only: If you use filtering in the Beta API, you can
  124. * also filter on nested fields. For example, you could filter on instances that
  125. * have set the scheduling.automaticRestart field to true. In particular, use
  126. * filtering on nested fields to take advantage of instance labels to organize
  127. * and filter results based on label values.
  128. *
  129. * The Beta API also supports filtering on multiple expressions by providing
  130. * each separate expression within parentheses. For example,
  131. * (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple
  132. * expressions are treated as AND expressions, meaning that resources must match
  133. * all expressions to pass the filters.
  134. * @opt_param string maxResults The maximum number of results per page that
  135. * should be returned. If the number of available results is larger than
  136. * maxResults, Compute Engine returns a nextPageToken that can be used to get
  137. * the next page of results in subsequent list requests.
  138. * @opt_param string orderBy Sorts list results by a certain order. By default,
  139. * results are returned in alphanumerical order based on the resource name.
  140. *
  141. * You can also sort results in descending order based on the creation timestamp
  142. * using orderBy="creationTimestamp desc". This sorts results based on the
  143. * creationTimestamp field in reverse chronological order (newest result first).
  144. * Use this to sort resources like operations so that the newest operation is
  145. * returned first.
  146. *
  147. * Currently, only sorting by name or creationTimestamp desc is supported.
  148. * @opt_param string pageToken Specifies a page token to use. Set pageToken to
  149. * the nextPageToken returned by a previous list request to get the next page of
  150. * results.
  151. * @return Google_Service_CloudUserAccounts_UserList
  152. */
  153. public function listUsers($project, $optParams = array())
  154. {
  155. $params = array('project' => $project);
  156. $params = array_merge($params, $optParams);
  157. return $this->call('list', array($params), "Google_Service_CloudUserAccounts_UserList");
  158. }
  159. /**
  160. * Removes the specified public key from the user. (users.removePublicKey)
  161. *
  162. * @param string $project Project ID for this request.
  163. * @param string $user Name of the user for this request.
  164. * @param string $fingerprint The fingerprint of the public key to delete.
  165. * Public keys are identified by their fingerprint, which is defined by RFC4716
  166. * to be the MD5 digest of the public key.
  167. * @param array $optParams Optional parameters.
  168. * @return Google_Service_CloudUserAccounts_Operation
  169. */
  170. public function removePublicKey($project, $user, $fingerprint, $optParams = array())
  171. {
  172. $params = array('project' => $project, 'user' => $user, 'fingerprint' => $fingerprint);
  173. $params = array_merge($params, $optParams);
  174. return $this->call('removePublicKey', array($params), "Google_Service_CloudUserAccounts_Operation");
  175. }
  176. /**
  177. * Sets the access control policy on the specified resource. Replaces any
  178. * existing policy. (users.setIamPolicy)
  179. *
  180. * @param string $project Project ID for this request.
  181. * @param string $resource Name of the resource for this request.
  182. * @param Google_Service_CloudUserAccounts_Policy $postBody
  183. * @param array $optParams Optional parameters.
  184. * @return Google_Service_CloudUserAccounts_Policy
  185. */
  186. public function setIamPolicy($project, $resource, Google_Service_CloudUserAccounts_Policy $postBody, $optParams = array())
  187. {
  188. $params = array('project' => $project, 'resource' => $resource, 'postBody' => $postBody);
  189. $params = array_merge($params, $optParams);
  190. return $this->call('setIamPolicy', array($params), "Google_Service_CloudUserAccounts_Policy");
  191. }
  192. /**
  193. * Returns permissions that a caller has on the specified resource.
  194. * (users.testIamPermissions)
  195. *
  196. * @param string $project Project ID for this request.
  197. * @param string $resource Name of the resource for this request.
  198. * @param Google_Service_CloudUserAccounts_TestPermissionsRequest $postBody
  199. * @param array $optParams Optional parameters.
  200. * @return Google_Service_CloudUserAccounts_TestPermissionsResponse
  201. */
  202. public function testIamPermissions($project, $resource, Google_Service_CloudUserAccounts_TestPermissionsRequest $postBody, $optParams = array())
  203. {
  204. $params = array('project' => $project, 'resource' => $resource, 'postBody' => $postBody);
  205. $params = array_merge($params, $optParams);
  206. return $this->call('testIamPermissions', array($params), "Google_Service_CloudUserAccounts_TestPermissionsResponse");
  207. }
  208. }