Google_Service_Storage_Objects_Resource

The "objects" collection of methods.

Defined (1)

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

/includes/api-libs/Google/Service/Storage.php  
  1. class Google_Service_Storage_Objects_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Concatenates a list of existing objects into a new object in the same bucket. 
  5. * (objects.compose) 
  6. * @param string $destinationBucket Name of the bucket in which to store the new 
  7. * object. 
  8. * @param string $destinationObject Name of the new object. 
  9. * @param Google_ComposeRequest $postBody 
  10. * @param array $optParams Optional parameters. 
  11. * @opt_param string ifGenerationMatch Makes the operation conditional on 
  12. * whether the object's current generation matches the given value. 
  13. * @opt_param string ifMetagenerationMatch Makes the operation conditional on 
  14. * whether the object's current metageneration matches the given value. 
  15. * @opt_param string destinationPredefinedAcl Apply a predefined set of access 
  16. * controls to the destination object. 
  17. * @return Google_Service_Storage_StorageObject 
  18. */ 
  19. public function compose($destinationBucket, $destinationObject, Google_Service_Storage_ComposeRequest $postBody, $optParams = array()) 
  20. $params = array('destinationBucket' => $destinationBucket, 'destinationObject' => $destinationObject, 'postBody' => $postBody); 
  21. $params = array_merge($params, $optParams); 
  22. return $this->call('compose', array($params), "Google_Service_Storage_StorageObject"); 
  23.  
  24. /** 
  25. * Copies an object to a specified location. Optionally overrides metadata. 
  26. * (objects.copy) 
  27. * @param string $sourceBucket Name of the bucket in which to find the source 
  28. * object. 
  29. * @param string $sourceObject Name of the source object. 
  30. * @param string $destinationBucket Name of the bucket in which to store the new 
  31. * object. Overrides the provided object metadata's bucket value, if any. 
  32. * @param string $destinationObject Name of the new object. Required when the 
  33. * object metadata is not otherwise provided. Overrides the object metadata's 
  34. * name value, if any. 
  35. * @param Google_StorageObject $postBody 
  36. * @param array $optParams Optional parameters. 
  37. * @opt_param string ifSourceGenerationNotMatch Makes the operation conditional 
  38. * on whether the source object's generation does not match the given value. 
  39. * @opt_param string ifGenerationNotMatch Makes the operation conditional on 
  40. * whether the destination object's current generation does not match the given 
  41. * value. 
  42. * @opt_param string ifSourceMetagenerationNotMatch Makes the operation 
  43. * conditional on whether the source object's current metageneration does not 
  44. * match the given value. 
  45. * @opt_param string ifMetagenerationMatch Makes the operation conditional on 
  46. * whether the destination object's current metageneration matches the given 
  47. * value. 
  48. * @opt_param string sourceGeneration If present, selects a specific revision of 
  49. * the source object (as opposed to the latest version, the default). 
  50. * @opt_param string destinationPredefinedAcl Apply a predefined set of access 
  51. * controls to the destination object. 
  52. * @opt_param string ifSourceGenerationMatch Makes the operation conditional on 
  53. * whether the source object's generation matches the given value. 
  54. * @opt_param string ifSourceMetagenerationMatch Makes the operation conditional 
  55. * on whether the source object's current metageneration matches the given 
  56. * value. 
  57. * @opt_param string ifGenerationMatch Makes the operation conditional on 
  58. * whether the destination object's current generation matches the given value. 
  59. * @opt_param string ifMetagenerationNotMatch Makes the operation conditional on 
  60. * whether the destination object's current metageneration does not match the 
  61. * given value. 
  62. * @opt_param string projection Set of properties to return. Defaults to noAcl,  
  63. * unless the object resource specifies the acl property, when it defaults to 
  64. * full. 
  65. * @return Google_Service_Storage_StorageObject 
  66. */ 
  67. public function copy($sourceBucket, $sourceObject, $destinationBucket, $destinationObject, Google_Service_Storage_StorageObject $postBody, $optParams = array()) 
  68. $params = array('sourceBucket' => $sourceBucket, 'sourceObject' => $sourceObject, 'destinationBucket' => $destinationBucket, 'destinationObject' => $destinationObject, 'postBody' => $postBody); 
  69. $params = array_merge($params, $optParams); 
  70. return $this->call('copy', array($params), "Google_Service_Storage_StorageObject"); 
  71.  
  72. /** 
  73. * Deletes an object and its metadata. Deletions are permanent if versioning is 
  74. * not enabled for the bucket, or if the generation parameter is used. 
  75. * (objects.delete) 
  76. * @param string $bucket Name of the bucket in which the object resides. 
  77. * @param string $object Name of the object. 
  78. * @param array $optParams Optional parameters. 
  79. * @opt_param string ifGenerationNotMatch Makes the operation conditional on 
  80. * whether the object's current generation does not match the given value. 
  81. * @opt_param string generation If present, permanently deletes a specific 
  82. * revision of this object (as opposed to the latest version, the default). 
  83. * @opt_param string ifMetagenerationMatch Makes the operation conditional on 
  84. * whether the object's current metageneration matches the given value. 
  85. * @opt_param string ifGenerationMatch Makes the operation conditional on 
  86. * whether the object's current generation matches the given value. 
  87. * @opt_param string ifMetagenerationNotMatch Makes the operation conditional on 
  88. * whether the object's current metageneration does not match the given value. 
  89. */ 
  90. public function delete($bucket, $object, $optParams = array()) 
  91. $params = array('bucket' => $bucket, 'object' => $object); 
  92. $params = array_merge($params, $optParams); 
  93. return $this->call('delete', array($params)); 
  94.  
  95. /** 
  96. * Retrieves an object or its metadata. (objects.get) 
  97. * @param string $bucket Name of the bucket in which the object resides. 
  98. * @param string $object Name of the object. 
  99. * @param array $optParams Optional parameters. 
  100. * @opt_param string ifGenerationNotMatch Makes the operation conditional on 
  101. * whether the object's generation does not match the given value. 
  102. * @opt_param string generation If present, selects a specific revision of this 
  103. * object (as opposed to the latest version, the default). 
  104. * @opt_param string ifMetagenerationMatch Makes the operation conditional on 
  105. * whether the object's current metageneration matches the given value. 
  106. * @opt_param string ifGenerationMatch Makes the operation conditional on 
  107. * whether the object's generation matches the given value. 
  108. * @opt_param string ifMetagenerationNotMatch Makes the operation conditional on 
  109. * whether the object's current metageneration does not match the given value. 
  110. * @opt_param string projection Set of properties to return. Defaults to noAcl. 
  111. * @return Google_Service_Storage_StorageObject 
  112. */ 
  113. public function get($bucket, $object, $optParams = array()) 
  114. $params = array('bucket' => $bucket, 'object' => $object); 
  115. $params = array_merge($params, $optParams); 
  116. return $this->call('get', array($params), "Google_Service_Storage_StorageObject"); 
  117.  
  118. /** 
  119. * Stores a new object and metadata. (objects.insert) 
  120. * @param string $bucket Name of the bucket in which to store the new object. 
  121. * Overrides the provided object metadata's bucket value, if any. 
  122. * @param Google_StorageObject $postBody 
  123. * @param array $optParams Optional parameters. 
  124. * @opt_param string predefinedAcl Apply a predefined set of access controls to 
  125. * this object. 
  126. * @opt_param string projection Set of properties to return. Defaults to noAcl,  
  127. * unless the object resource specifies the acl property, when it defaults to 
  128. * full. 
  129. * @opt_param string ifGenerationNotMatch Makes the operation conditional on 
  130. * whether the object's current generation does not match the given value. 
  131. * @opt_param string ifMetagenerationMatch Makes the operation conditional on 
  132. * whether the object's current metageneration matches the given value. 
  133. * @opt_param string contentEncoding If set, sets the contentEncoding property 
  134. * of the final object to this value. Setting this parameter is equivalent to 
  135. * setting the contentEncoding metadata property. This can be useful when 
  136. * uploading an object with uploadType=media to indicate the encoding of the 
  137. * content being uploaded. 
  138. * @opt_param string ifGenerationMatch Makes the operation conditional on 
  139. * whether the object's current generation matches the given value. 
  140. * @opt_param string ifMetagenerationNotMatch Makes the operation conditional on 
  141. * whether the object's current metageneration does not match the given value. 
  142. * @opt_param string name Name of the object. Required when the object metadata 
  143. * is not otherwise provided. Overrides the object metadata's name value, if 
  144. * any. 
  145. * @return Google_Service_Storage_StorageObject 
  146. */ 
  147. public function insert($bucket, Google_Service_Storage_StorageObject $postBody, $optParams = array()) 
  148. $params = array('bucket' => $bucket, 'postBody' => $postBody); 
  149. $params = array_merge($params, $optParams); 
  150. return $this->call('insert', array($params), "Google_Service_Storage_StorageObject"); 
  151.  
  152. /** 
  153. * Retrieves a list of objects matching the criteria. (objects.listObjects) 
  154. * @param string $bucket Name of the bucket in which to look for objects. 
  155. * @param array $optParams Optional parameters. 
  156. * @opt_param string projection Set of properties to return. Defaults to noAcl. 
  157. * @opt_param bool versions If true, lists all versions of a file as distinct 
  158. * results. 
  159. * @opt_param string prefix Filter results to objects whose names begin with 
  160. * this prefix. 
  161. * @opt_param string maxResults Maximum number of items plus prefixes to return. 
  162. * As duplicate prefixes are omitted, fewer total results may be returned than 
  163. * requested. 
  164. * @opt_param string pageToken A previously-returned page token representing 
  165. * part of the larger set of results to view. 
  166. * @opt_param string delimiter Returns results in a directory-like mode. items 
  167. * will contain only objects whose names, aside from the prefix, do not contain 
  168. * delimiter. Objects whose names, aside from the prefix, contain delimiter will 
  169. * have their name, truncated after the delimiter, returned in prefixes. 
  170. * Duplicate prefixes are omitted. 
  171. * @return Google_Service_Storage_Objects 
  172. */ 
  173. public function listObjects($bucket, $optParams = array()) 
  174. $params = array('bucket' => $bucket); 
  175. $params = array_merge($params, $optParams); 
  176. return $this->call('list', array($params), "Google_Service_Storage_Objects"); 
  177.  
  178. /** 
  179. * Updates an object's metadata. This method supports patch semantics. 
  180. * (objects.patch) 
  181. * @param string $bucket Name of the bucket in which the object resides. 
  182. * @param string $object Name of the object. 
  183. * @param Google_StorageObject $postBody 
  184. * @param array $optParams Optional parameters. 
  185. * @opt_param string predefinedAcl Apply a predefined set of access controls to 
  186. * this object. 
  187. * @opt_param string ifGenerationNotMatch Makes the operation conditional on 
  188. * whether the object's current generation does not match the given value. 
  189. * @opt_param string generation If present, selects a specific revision of this 
  190. * object (as opposed to the latest version, the default). 
  191. * @opt_param string ifMetagenerationMatch Makes the operation conditional on 
  192. * whether the object's current metageneration matches the given value. 
  193. * @opt_param string ifGenerationMatch Makes the operation conditional on 
  194. * whether the object's current generation matches the given value. 
  195. * @opt_param string ifMetagenerationNotMatch Makes the operation conditional on 
  196. * whether the object's current metageneration does not match the given value. 
  197. * @opt_param string projection Set of properties to return. Defaults to full. 
  198. * @return Google_Service_Storage_StorageObject 
  199. */ 
  200. public function patch($bucket, $object, Google_Service_Storage_StorageObject $postBody, $optParams = array()) 
  201. $params = array('bucket' => $bucket, 'object' => $object, 'postBody' => $postBody); 
  202. $params = array_merge($params, $optParams); 
  203. return $this->call('patch', array($params), "Google_Service_Storage_StorageObject"); 
  204.  
  205. /** 
  206. * Updates an object's metadata. (objects.update) 
  207. * @param string $bucket Name of the bucket in which the object resides. 
  208. * @param string $object Name of the object. 
  209. * @param Google_StorageObject $postBody 
  210. * @param array $optParams Optional parameters. 
  211. * @opt_param string predefinedAcl Apply a predefined set of access controls to 
  212. * this object. 
  213. * @opt_param string ifGenerationNotMatch Makes the operation conditional on 
  214. * whether the object's current generation does not match the given value. 
  215. * @opt_param string generation If present, selects a specific revision of this 
  216. * object (as opposed to the latest version, the default). 
  217. * @opt_param string ifMetagenerationMatch Makes the operation conditional on 
  218. * whether the object's current metageneration matches the given value. 
  219. * @opt_param string ifGenerationMatch Makes the operation conditional on 
  220. * whether the object's current generation matches the given value. 
  221. * @opt_param string ifMetagenerationNotMatch Makes the operation conditional on 
  222. * whether the object's current metageneration does not match the given value. 
  223. * @opt_param string projection Set of properties to return. Defaults to full. 
  224. * @return Google_Service_Storage_StorageObject 
  225. */ 
  226. public function update($bucket, $object, Google_Service_Storage_StorageObject $postBody, $optParams = array()) 
  227. $params = array('bucket' => $bucket, 'object' => $object, 'postBody' => $postBody); 
  228. $params = array_merge($params, $optParams); 
  229. return $this->call('update', array($params), "Google_Service_Storage_StorageObject"); 
  230.  
  231. /** 
  232. * Watch for changes on all objects in a bucket. (objects.watchAll) 
  233. * @param string $bucket Name of the bucket in which to look for objects. 
  234. * @param Google_Channel $postBody 
  235. * @param array $optParams Optional parameters. 
  236. * @opt_param string projection Set of properties to return. Defaults to noAcl. 
  237. * @opt_param bool versions If true, lists all versions of a file as distinct 
  238. * results. 
  239. * @opt_param string prefix Filter results to objects whose names begin with 
  240. * this prefix. 
  241. * @opt_param string maxResults Maximum number of items plus prefixes to return. 
  242. * As duplicate prefixes are omitted, fewer total results may be returned than 
  243. * requested. 
  244. * @opt_param string pageToken A previously-returned page token representing 
  245. * part of the larger set of results to view. 
  246. * @opt_param string delimiter Returns results in a directory-like mode. items 
  247. * will contain only objects whose names, aside from the prefix, do not contain 
  248. * delimiter. Objects whose names, aside from the prefix, contain delimiter will 
  249. * have their name, truncated after the delimiter, returned in prefixes. 
  250. * Duplicate prefixes are omitted. 
  251. * @return Google_Service_Storage_Channel 
  252. */ 
  253. public function watchAll($bucket, Google_Service_Storage_Channel $postBody, $optParams = array()) 
  254. $params = array('bucket' => $bucket, 'postBody' => $postBody); 
  255. $params = array_merge($params, $optParams); 
  256. return $this->call('watchAll', array($params), "Google_Service_Storage_Channel");