Google_ProjectsServiceResource
The "projects" collection of methods.
Defined (2)
The class is defined in the following location(s).
- /src/contrib/Google_BigqueryService.php
- class Google_ProjectsServiceResource extends Google_ServiceResource {
- /**
- * Lists the projects to which you have at least read access. (projects.list)
- *
- * @param array $optParams Optional parameters.
- *
- * @opt_param string maxResults Maximum number of results to return
- * @opt_param string pageToken Page token, returned by a previous call, to request the next page of results
- * @return Google_ProjectList
- */
- public function listProjects($optParams = array()) {
- $params = array();
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_ProjectList($data);
- } else {
- return $data;
- }
- }
- }
- /src/contrib/Google_ComputeService.php
- class Google_ProjectsServiceResource extends Google_ServiceResource {
- /**
- * Returns the specified project resource. (projects.get)
- *
- * @param string $project Name of the project resource to retrieve.
- * @param array $optParams Optional parameters.
- * @return Google_Project
- */
- public function get($project, $optParams = array()) {
- $params = array('project' => $project);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Project($data);
- } else {
- return $data;
- }
- }
- /**
- * Sets metadata common to all instances within the specified project using the data included in the
- * request. (projects.setCommonInstanceMetadata)
- *
- * @param string $project Name of the project scoping this request.
- * @param Google_Metadata $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Operation
- */
- public function setCommonInstanceMetadata($project, Google_Metadata $postBody, $optParams = array()) {
- $params = array('project' => $project, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('setCommonInstanceMetadata', array($params));
- if ($this->useObjects()) {
- return new Google_Operation($data);
- } else {
- return $data;
- }
- }
- }