Google_ObjectsServiceResource

The "objects" collection of methods.

Defined (1)

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

/inc/google-api-php-client/src/contrib/Google_StorageService.php  
  1. class Google_ObjectsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Stores new data blobs and associated metadata. (objects.insert) 
  6. * @param string $bucket Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. 
  7. * @param Google_StorageObject $postBody 
  8. * @param array $optParams Optional parameters. 
  9. * @opt_param string name Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. 
  10. * @opt_param string projection Set of properties to return. Defaults to no_acl, unless the object resource specifies the acl property, when it defaults to full. 
  11. * @return Google_StorageObject 
  12. */ 
  13. public function insert($bucket, Google_StorageObject $postBody, $optParams = array()) { 
  14. $params = array('bucket' => $bucket, 'postBody' => $postBody); 
  15. $params = array_merge($params, $optParams); 
  16. $data = $this->__call('insert', array($params)); 
  17. if ($this->useObjects()) { 
  18. return new Google_StorageObject($data); 
  19. } else { 
  20. return $data; 
  21. /** 
  22. * Retrieves objects or their associated metadata. (objects.get) 
  23. * @param string $bucket Name of the bucket in which the object resides. 
  24. * @param string $object Name of the object. 
  25. * @param array $optParams Optional parameters. 
  26. * @opt_param string projection Set of properties to return. Defaults to no_acl. 
  27. * @return Google_StorageObject 
  28. */ 
  29. public function get($bucket, $object, $optParams = array()) { 
  30. $params = array('bucket' => $bucket, 'object' => $object); 
  31. $params = array_merge($params, $optParams); 
  32. $data = $this->__call('get', array($params)); 
  33. if ($this->useObjects()) { 
  34. return new Google_StorageObject($data); 
  35. } else { 
  36. return $data; 
  37. /** 
  38. * Retrieves a list of objects matching the criteria. (objects.list) 
  39. * @param string $bucket Name of the bucket in which to look for objects. 
  40. * @param array $optParams Optional parameters. 
  41. * @opt_param string max-results Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested. 
  42. * @opt_param string projection Set of properties to return. Defaults to no_acl. 
  43. * @opt_param string prefix Filter results to objects whose names begin with this prefix. 
  44. * @opt_param string pageToken A previously-returned page token representing part of the larger set of results to view. 
  45. * @opt_param string delimiter Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted. 
  46. * @return Google_Objects 
  47. */ 
  48. public function listObjects($bucket, $optParams = array()) { 
  49. $params = array('bucket' => $bucket); 
  50. $params = array_merge($params, $optParams); 
  51. $data = $this->__call('list', array($params)); 
  52. if ($this->useObjects()) { 
  53. return new Google_Objects($data); 
  54. } else { 
  55. return $data; 
  56. /** 
  57. * Updates a data blob's associated metadata. (objects.update) 
  58. * @param string $bucket Name of the bucket in which the object resides. 
  59. * @param string $object Name of the object. 
  60. * @param Google_StorageObject $postBody 
  61. * @param array $optParams Optional parameters. 
  62. * @opt_param string projection Set of properties to return. Defaults to full. 
  63. * @return Google_StorageObject 
  64. */ 
  65. public function update($bucket, $object, Google_StorageObject $postBody, $optParams = array()) { 
  66. $params = array('bucket' => $bucket, 'object' => $object, 'postBody' => $postBody); 
  67. $params = array_merge($params, $optParams); 
  68. $data = $this->__call('update', array($params)); 
  69. if ($this->useObjects()) { 
  70. return new Google_StorageObject($data); 
  71. } else { 
  72. return $data; 
  73. /** 
  74. * Updates a data blob's associated metadata. This method supports patch semantics. (objects.patch) 
  75. * @param string $bucket Name of the bucket in which the object resides. 
  76. * @param string $object Name of the object. 
  77. * @param Google_StorageObject $postBody 
  78. * @param array $optParams Optional parameters. 
  79. * @opt_param string projection Set of properties to return. Defaults to full. 
  80. * @return Google_StorageObject 
  81. */ 
  82. public function patch($bucket, $object, Google_StorageObject $postBody, $optParams = array()) { 
  83. $params = array('bucket' => $bucket, 'object' => $object, 'postBody' => $postBody); 
  84. $params = array_merge($params, $optParams); 
  85. $data = $this->__call('patch', array($params)); 
  86. if ($this->useObjects()) { 
  87. return new Google_StorageObject($data); 
  88. } else { 
  89. return $data; 
  90. /** 
  91. * Deletes data blobs and associated metadata. (objects.delete) 
  92. * @param string $bucket Name of the bucket in which the object resides. 
  93. * @param string $object Name of the object. 
  94. * @param array $optParams Optional parameters. 
  95. */ 
  96. public function delete($bucket, $object, $optParams = array()) { 
  97. $params = array('bucket' => $bucket, 'object' => $object); 
  98. $params = array_merge($params, $optParams); 
  99. $data = $this->__call('delete', array($params)); 
  100. return $data;