Google_ProjectsServiceResource

The "projects" collection of methods.

Defined (2)

The class is defined in the following location(s).

/src/contrib/Google_BigqueryService.php  
  1. class Google_ProjectsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Lists the projects to which you have at least read access. (projects.list) 
  5. * @param array $optParams Optional parameters. 
  6. * @opt_param string maxResults Maximum number of results to return 
  7. * @opt_param string pageToken Page token, returned by a previous call, to request the next page of results 
  8. * @return Google_ProjectList 
  9. */ 
  10. public function listProjects($optParams = array()) { 
  11. $params = array(); 
  12. $params = array_merge($params, $optParams); 
  13. $data = $this->__call('list', array($params)); 
  14. if ($this->useObjects()) { 
  15. return new Google_ProjectList($data); 
  16. } else { 
  17. return $data; 
/src/contrib/Google_ComputeService.php  
  1. class Google_ProjectsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Returns the specified project resource. (projects.get) 
  5. * @param string $project Name of the project resource to retrieve. 
  6. * @param array $optParams Optional parameters. 
  7. * @return Google_Project 
  8. */ 
  9. public function get($project, $optParams = array()) { 
  10. $params = array('project' => $project); 
  11. $params = array_merge($params, $optParams); 
  12. $data = $this->__call('get', array($params)); 
  13. if ($this->useObjects()) { 
  14. return new Google_Project($data); 
  15. } else { 
  16. return $data; 
  17. /** 
  18. * Sets metadata common to all instances within the specified project using the data included in the 
  19. * request. (projects.setCommonInstanceMetadata) 
  20. * @param string $project Name of the project scoping this request. 
  21. * @param Google_Metadata $postBody 
  22. * @param array $optParams Optional parameters. 
  23. * @return Google_Operation 
  24. */ 
  25. public function setCommonInstanceMetadata($project, Google_Metadata $postBody, $optParams = array()) { 
  26. $params = array('project' => $project, 'postBody' => $postBody); 
  27. $params = array_merge($params, $optParams); 
  28. $data = $this->__call('setCommonInstanceMetadata', array($params)); 
  29. if ($this->useObjects()) { 
  30. return new Google_Operation($data); 
  31. } else { 
  32. return $data;