@InternalApi public interface StorageRpc extends ServiceRpc
Modifier and Type | Interface and Description |
---|---|
static class |
StorageRpc.Option |
static class |
StorageRpc.RewriteRequest |
static class |
StorageRpc.RewriteResponse |
Modifier and Type | Method and Description |
---|---|
com.google.api.services.storage.model.StorageObject |
compose(Iterable<com.google.api.services.storage.model.StorageObject> sources,
com.google.api.services.storage.model.StorageObject target,
Map<StorageRpc.Option,?> targetOptions)
Sends a compose request.
|
StorageRpc.RewriteResponse |
continueRewrite(StorageRpc.RewriteResponse previousResponse)
Continues rewriting on an already open rewrite channel.
|
com.google.api.services.storage.model.Bucket |
create(com.google.api.services.storage.model.Bucket bucket,
Map<StorageRpc.Option,?> options)
Creates a new bucket.
|
com.google.api.services.storage.model.StorageObject |
create(com.google.api.services.storage.model.StorageObject object,
InputStream content,
Map<StorageRpc.Option,?> options)
Creates a new storage object.
|
com.google.api.services.storage.model.BucketAccessControl |
createAcl(com.google.api.services.storage.model.BucketAccessControl acl,
Map<StorageRpc.Option,?> options)
Creates a new ACL entry on the specified bucket.
|
com.google.api.services.storage.model.ObjectAccessControl |
createAcl(com.google.api.services.storage.model.ObjectAccessControl acl)
Creates a new ACL entry on the specified object.
|
RpcBatch |
createBatch()
Creates an empty batch.
|
com.google.api.services.storage.model.ObjectAccessControl |
createDefaultAcl(com.google.api.services.storage.model.ObjectAccessControl acl)
Creates a new default object ACL entry on the specified bucket.
|
com.google.api.services.storage.model.Notification |
createNotification(String bucket,
com.google.api.services.storage.model.Notification notification)
Creates a notification with the specified entity on the specified bucket.
|
boolean |
delete(com.google.api.services.storage.model.Bucket bucket,
Map<StorageRpc.Option,?> options)
Deletes the requested bucket.
|
boolean |
delete(com.google.api.services.storage.model.StorageObject object,
Map<StorageRpc.Option,?> options)
Deletes the requested storage object.
|
boolean |
deleteAcl(String bucket,
String object,
Long generation,
String entity)
Deletes the ACL entry for the specified entity on the specified object.
|
boolean |
deleteAcl(String bucket,
String entity,
Map<StorageRpc.Option,?> options)
Deletes the ACL entry for the specified entity on the specified bucket.
|
boolean |
deleteDefaultAcl(String bucket,
String entity)
Deletes the default object ACL entry for the specified entity on the specified bucket.
|
boolean |
deleteNotification(String bucket,
String notification)
Deletes the notification with the specified name on the specified object.
|
com.google.api.services.storage.model.Bucket |
get(com.google.api.services.storage.model.Bucket bucket,
Map<StorageRpc.Option,?> options)
Returns the requested bucket or
null if not found. |
com.google.api.services.storage.model.StorageObject |
get(com.google.api.services.storage.model.StorageObject object,
Map<StorageRpc.Option,?> options)
Returns the requested storage object or
null if not found. |
com.google.api.services.storage.model.ObjectAccessControl |
getAcl(String bucket,
String object,
Long generation,
String entity)
Returns the ACL entry for the specified entity on the specified object or
null if not
found. |
com.google.api.services.storage.model.BucketAccessControl |
getAcl(String bucket,
String entity,
Map<StorageRpc.Option,?> options)
Returns the ACL entry for the specified entity on the specified bucket or
null if not
found. |
com.google.api.services.storage.model.ObjectAccessControl |
getDefaultAcl(String bucket,
String entity)
Returns the default object ACL entry for the specified entity on the specified bucket or
null if not found. |
com.google.api.services.storage.model.Policy |
getIamPolicy(String bucket,
Map<StorageRpc.Option,?> options)
Returns the IAM policy for the specified bucket.
|
com.google.api.services.storage.model.ServiceAccount |
getServiceAccount(String projectId)
Returns the service account associated with the given project.
|
Tuple<String,Iterable<com.google.api.services.storage.model.Bucket>> |
list(Map<StorageRpc.Option,?> options)
Lists the project's buckets.
|
Tuple<String,Iterable<com.google.api.services.storage.model.StorageObject>> |
list(String bucket,
Map<StorageRpc.Option,?> options)
Lists the bucket's blobs.
|
List<com.google.api.services.storage.model.BucketAccessControl> |
listAcls(String bucket,
Map<StorageRpc.Option,?> options)
Lists the ACL entries for the provided bucket.
|
List<com.google.api.services.storage.model.ObjectAccessControl> |
listAcls(String bucket,
String object,
Long generation)
Lists the ACL entries for the provided object.
|
List<com.google.api.services.storage.model.ObjectAccessControl> |
listDefaultAcls(String bucket)
Lists the default object ACL entries for the provided bucket.
|
List<com.google.api.services.storage.model.Notification> |
listNotifications(String bucket)
List the notifications for the provided bucket.
|
byte[] |
load(com.google.api.services.storage.model.StorageObject storageObject,
Map<StorageRpc.Option,?> options)
Reads all the bytes from a storage object.
|
com.google.api.services.storage.model.Bucket |
lockRetentionPolicy(com.google.api.services.storage.model.Bucket bucket,
Map<StorageRpc.Option,?> options)
Lock retention policy for the provided bucket.
|
String |
open(com.google.api.services.storage.model.StorageObject object,
Map<StorageRpc.Option,?> options)
Opens a resumable upload channel for a given storage object.
|
String |
open(String signedURL)
Opens a resumable upload channel for a given signedURL.
|
StorageRpc.RewriteResponse |
openRewrite(StorageRpc.RewriteRequest rewriteRequest)
Sends a rewrite request to open a rewrite channel.
|
com.google.api.services.storage.model.Bucket |
patch(com.google.api.services.storage.model.Bucket bucket,
Map<StorageRpc.Option,?> options)
Updates bucket information.
|
com.google.api.services.storage.model.StorageObject |
patch(com.google.api.services.storage.model.StorageObject storageObject,
Map<StorageRpc.Option,?> options)
Updates the storage object's information.
|
com.google.api.services.storage.model.BucketAccessControl |
patchAcl(com.google.api.services.storage.model.BucketAccessControl acl,
Map<StorageRpc.Option,?> options)
Updates an ACL entry on the specified bucket.
|
com.google.api.services.storage.model.ObjectAccessControl |
patchAcl(com.google.api.services.storage.model.ObjectAccessControl acl)
Updates an ACL entry on the specified object.
|
com.google.api.services.storage.model.ObjectAccessControl |
patchDefaultAcl(com.google.api.services.storage.model.ObjectAccessControl acl)
Updates a default object ACL entry on the specified bucket.
|
Tuple<String,byte[]> |
read(com.google.api.services.storage.model.StorageObject from,
Map<StorageRpc.Option,?> options,
long position,
int bytes)
Reads the given amount of bytes from a storage object at the given position.
|
com.google.api.services.storage.model.Policy |
setIamPolicy(String bucket,
com.google.api.services.storage.model.Policy policy,
Map<StorageRpc.Option,?> options)
Updates the IAM policy for the specified bucket.
|
com.google.api.services.storage.model.TestIamPermissionsResponse |
testIamPermissions(String bucket,
List<String> permissions,
Map<StorageRpc.Option,?> options)
Tests whether the caller holds the specified permissions for the specified bucket.
|
void |
write(String uploadId,
byte[] toWrite,
int toWriteOffset,
long destOffset,
int length,
boolean last)
Writes the provided bytes to a storage object at the provided location.
|
com.google.api.services.storage.model.Bucket create(com.google.api.services.storage.model.Bucket bucket, Map<StorageRpc.Option,?> options)
StorageException
- upon failurecom.google.api.services.storage.model.StorageObject create(com.google.api.services.storage.model.StorageObject object, InputStream content, Map<StorageRpc.Option,?> options)
StorageException
- upon failureTuple<String,Iterable<com.google.api.services.storage.model.Bucket>> list(Map<StorageRpc.Option,?> options)
StorageException
- upon failureTuple<String,Iterable<com.google.api.services.storage.model.StorageObject>> list(String bucket, Map<StorageRpc.Option,?> options)
StorageException
- upon failurecom.google.api.services.storage.model.Bucket get(com.google.api.services.storage.model.Bucket bucket, Map<StorageRpc.Option,?> options)
null
if not found.StorageException
- upon failurecom.google.api.services.storage.model.StorageObject get(com.google.api.services.storage.model.StorageObject object, Map<StorageRpc.Option,?> options)
null
if not found.StorageException
- upon failurecom.google.api.services.storage.model.Bucket patch(com.google.api.services.storage.model.Bucket bucket, Map<StorageRpc.Option,?> options)
StorageException
- upon failurecom.google.api.services.storage.model.StorageObject patch(com.google.api.services.storage.model.StorageObject storageObject, Map<StorageRpc.Option,?> options)
storageObject
.StorageException
- upon failureboolean delete(com.google.api.services.storage.model.Bucket bucket, Map<StorageRpc.Option,?> options)
true
if the bucket was deleted, false
if it was not foundStorageException
- upon failureboolean delete(com.google.api.services.storage.model.StorageObject object, Map<StorageRpc.Option,?> options)
true
if the storage object was deleted, false
if it was not foundStorageException
- upon failureRpcBatch createBatch()
com.google.api.services.storage.model.StorageObject compose(Iterable<com.google.api.services.storage.model.StorageObject> sources, com.google.api.services.storage.model.StorageObject target, Map<StorageRpc.Option,?> targetOptions)
StorageException
- upon failurebyte[] load(com.google.api.services.storage.model.StorageObject storageObject, Map<StorageRpc.Option,?> options)
StorageException
- upon failureTuple<String,byte[]> read(com.google.api.services.storage.model.StorageObject from, Map<StorageRpc.Option,?> options, long position, int bytes)
StorageException
- upon failureString open(com.google.api.services.storage.model.StorageObject object, Map<StorageRpc.Option,?> options)
StorageException
- upon failureString open(String signedURL)
StorageException
- upon failurevoid write(String uploadId, byte[] toWrite, int toWriteOffset, long destOffset, int length, boolean last)
StorageException
- upon failureStorageRpc.RewriteResponse openRewrite(StorageRpc.RewriteRequest rewriteRequest)
StorageException
- upon failureStorageRpc.RewriteResponse continueRewrite(StorageRpc.RewriteResponse previousResponse)
StorageException
- upon failurecom.google.api.services.storage.model.BucketAccessControl getAcl(String bucket, String entity, Map<StorageRpc.Option,?> options)
null
if not
found.StorageException
- upon failureboolean deleteAcl(String bucket, String entity, Map<StorageRpc.Option,?> options)
true
if the ACL was deleted, false
if it was not foundStorageException
- upon failurecom.google.api.services.storage.model.BucketAccessControl createAcl(com.google.api.services.storage.model.BucketAccessControl acl, Map<StorageRpc.Option,?> options)
StorageException
- upon failurecom.google.api.services.storage.model.BucketAccessControl patchAcl(com.google.api.services.storage.model.BucketAccessControl acl, Map<StorageRpc.Option,?> options)
StorageException
- upon failureList<com.google.api.services.storage.model.BucketAccessControl> listAcls(String bucket, Map<StorageRpc.Option,?> options)
StorageException
- upon failurecom.google.api.services.storage.model.ObjectAccessControl getDefaultAcl(String bucket, String entity)
null
if not found.StorageException
- upon failureboolean deleteDefaultAcl(String bucket, String entity)
true
if the ACL was deleted, false
if it was not foundStorageException
- upon failurecom.google.api.services.storage.model.ObjectAccessControl createDefaultAcl(com.google.api.services.storage.model.ObjectAccessControl acl)
StorageException
- upon failurecom.google.api.services.storage.model.ObjectAccessControl patchDefaultAcl(com.google.api.services.storage.model.ObjectAccessControl acl)
StorageException
- upon failureList<com.google.api.services.storage.model.ObjectAccessControl> listDefaultAcls(String bucket)
StorageException
- upon failurecom.google.api.services.storage.model.ObjectAccessControl getAcl(String bucket, String object, Long generation, String entity)
null
if not
found.StorageException
- upon failureboolean deleteAcl(String bucket, String object, Long generation, String entity)
true
if the ACL was deleted, false
if it was not foundStorageException
- upon failurecom.google.api.services.storage.model.ObjectAccessControl createAcl(com.google.api.services.storage.model.ObjectAccessControl acl)
StorageException
- upon failurecom.google.api.services.storage.model.ObjectAccessControl patchAcl(com.google.api.services.storage.model.ObjectAccessControl acl)
StorageException
- upon failureList<com.google.api.services.storage.model.ObjectAccessControl> listAcls(String bucket, String object, Long generation)
StorageException
- upon failurecom.google.api.services.storage.model.Policy getIamPolicy(String bucket, Map<StorageRpc.Option,?> options)
StorageException
- upon failurecom.google.api.services.storage.model.Policy setIamPolicy(String bucket, com.google.api.services.storage.model.Policy policy, Map<StorageRpc.Option,?> options)
StorageException
- upon failurecom.google.api.services.storage.model.TestIamPermissionsResponse testIamPermissions(String bucket, List<String> permissions, Map<StorageRpc.Option,?> options)
StorageException
- upon failureboolean deleteNotification(String bucket, String notification)
true
if the notification was deleted, false
if it was not foundStorageException
- upon failureList<com.google.api.services.storage.model.Notification> listNotifications(String bucket)
Notification
objects that exist on the bucket.StorageException
- upon failurecom.google.api.services.storage.model.Notification createNotification(String bucket, com.google.api.services.storage.model.Notification notification)
StorageException
- upon failurecom.google.api.services.storage.model.Bucket lockRetentionPolicy(com.google.api.services.storage.model.Bucket bucket, Map<StorageRpc.Option,?> options)
Bucket
object of the locked bucketStorageException
- upon failurecom.google.api.services.storage.model.ServiceAccount getServiceAccount(String projectId)
StorageException
- upon failureCopyright © 2019 Google LLC. All rights reserved.