Google_ImagesServiceResource
The "images" collection of methods.
Defined (1)
The class is defined in the following location(s).
- /google-api/src/contrib/Google_ComputeService.php
- class Google_ImagesServiceResource extends Google_ServiceResource {
- /**
- * Deletes the specified image resource. (images.delete)
- *
- * @param string $project Name of the project scoping this request.
- * @param string $image Name of the image resource to delete.
- * @param array $optParams Optional parameters.
- * @return Google_Operation
- */
- public function delete($project, $image, $optParams = array()) {
- $params = array('project' => $project, 'image' => $image);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- if ($this->useObjects()) {
- return new Google_Operation($data);
- } else {
- return $data;
- }
- }
- /**
- * Sets the deprecation status of an image. If no message body is given, clears the deprecation
- * status instead. (images.deprecate)
- *
- * @param string $project Name of the project scoping this request.
- * @param string $image Image name.
- * @param Google_DeprecationStatus $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Operation
- */
- public function deprecate($project, $image, Google_DeprecationStatus $postBody, $optParams = array()) {
- $params = array('project' => $project, 'image' => $image, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('deprecate', array($params));
- if ($this->useObjects()) {
- return new Google_Operation($data);
- } else {
- return $data;
- }
- }
- /**
- * Returns the specified image resource. (images.get)
- *
- * @param string $project Name of the project scoping this request.
- * @param string $image Name of the image resource to return.
- * @param array $optParams Optional parameters.
- * @return Google_Image
- */
- public function get($project, $image, $optParams = array()) {
- $params = array('project' => $project, 'image' => $image);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Image($data);
- } else {
- return $data;
- }
- }
- /**
- * Creates an image resource in the specified project using the data included in the request.
- * (images.insert)
- *
- * @param string $project Name of the project scoping this request.
- * @param Google_Image $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Operation
- */
- public function insert($project, Google_Image $postBody, $optParams = array()) {
- $params = array('project' => $project, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_Operation($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves the list of image resources available to the specified project. (images.list)
- *
- * @param string $project Name of the project scoping this request.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string filter Optional. Filter expression for filtering listed resources.
- * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100.
- * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
- * @return Google_ImageList
- */
- public function listImages($project, $optParams = array()) {
- $params = array('project' => $project);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_ImageList($data);
- } else {
- return $data;
- }
- }
- }