| Known Indirect Subclasses | 
A Resource represents a file or folder in Drive.
Nested Class Summary
| interface | DriveResource.MetadataResult | This interface was deprecated.
              Metadata objects are returned directly in the new Drive clients.
                | 
            |
Public Method Summary
Public Methods
public abstract PendingResult<Status> addChangeListener (GoogleApiClient apiClient, ChangeListener listener)
This method was deprecated.
          Use 
          addChangeListener(DriveResource, OnChangeListener) instead.
Adds a new listener for changes on this resource. The listener will remain active
            for the duration of the current GoogleApiClient
            connection or until the 
            removeChangeListener(GoogleApiClient, ChangeListener) method is called with
            the same listener argument.
See Also
public abstract PendingResult<Status> addChangeSubscription (GoogleApiClient apiClient)
This method was deprecated.
          Use 
          addChangeSubscription(DriveResource) instead.
Adds a change subscription for this resource that will deliver events to the
            application event service. The event service class implementation should contain an
            implementation of ChangeListener
            and be exported in the application manifest. The subscription is persistent until the
            next device reboot and will be active until the 
            removeChangeSubscription(GoogleApiClient) method is called on the same
            resource.
See Also
public abstract PendingResult<Status> delete (GoogleApiClient apiClient)
This method was deprecated.
          Use 
          delete(DriveResource) instead.
Permanently deletes this resource, bypassing trash. The user must be the owner. If the resource is a folder, the app must have access to all descendants of the folder.
For user visible files, we recommend using the 
            trash(GoogleApiClient) method instead to give users the opportunity to
            restore files they have accidentally removed.
Delete must be used for files in the App Folder as they cannot be trashed, see
            
            getAppFolder(GoogleApiClient).
Parameters
| apiClient | The GoogleApiClient
                to service the call. | 
              
|---|
Returns
- A PendingResult which can be used to verify the success of the operation.
 
public abstract DriveId getDriveId ()
Returns the DriveId that uniquely identifies this resource.
public abstract PendingResult<DriveResource.MetadataResult> getMetadata (GoogleApiClient apiClient)
This method was deprecated.
          Use 
          getMetadata(DriveResource) instead.
Retrieves the Metadata associated with this resource.
Parameters
| apiClient | The GoogleApiClient
                to service the call. | 
              
|---|
Returns
- A PendingResult which can be used to retrieve the Metadata when it is available.
 
public abstract PendingResult<DriveApi.MetadataBufferResult> listParents (GoogleApiClient apiClient)
This method was deprecated.
          Use 
          listParents(DriveResource) instead.
Retrieves a collection of metadata for all of the parents of this resource that the calling app has been authorized to view.
Parameters
| apiClient | The GoogleApiClient
                to service the call. | 
              
|---|
Returns
- A PendingResult which can be used to retrieve the parents list. Be sure to call
              
release()when you're done with the result. 
public abstract PendingResult<Status> removeChangeListener (GoogleApiClient apiClient, ChangeListener listener)
This method was deprecated.
          Use 
          removeChangeListener(ListenerToken) instead.
Removes a listener for changes on this resource that was previously added by
            
            addChangeListener(GoogleApiClient, ChangeListener).
public abstract PendingResult<Status> removeChangeSubscription (GoogleApiClient apiClient)
This method was deprecated.
          Use 
          removeChangeSubscription(DriveResource) instead.
Removes any existing change subscription for this resource.
public abstract PendingResult<Status> setParents (GoogleApiClient apiClient, Set<DriveId> parentIds)
This method was deprecated.
          Use 
          setParents(DriveResource, Set) instead.
Sets the parents of this resource. If successful, the resource parent set will be changed to the one specified in the parameter. The existing parent set will be overwritten. The caller must make sure that the set contains all intended parents of the resource, including existing parents that should remain as parents.
All parents must be folders.
If this resource is in the App Folder or in one of its subfolders, all parents must also belong to the App Folder or one of its subfolders.
If this resource is outside the App Folder every parent must also be outside the App Folder.
Parameters
| apiClient | The GoogleApiClient
                to service the call. | 
              
|---|---|
| parentIds | The set of parents (can be empty) to move the item to. Do NOT modify the set after calling this method. | 
public abstract PendingResult<Status> trash (GoogleApiClient apiClient)
This method was deprecated.
          Use 
          trash(DriveResource) instead.
Moves the resource to trash. The user must be the owner. If the resource is a folder, the app must have access to all descendants of the folder.
Resources inside the app folder cannot be trashed.
Parameters
| apiClient | The GoogleApiClient
                to service the call. The client must be connected before invoking this method. | 
              
|---|
Returns
- A PendingResult which can be used to verify the success of the operation.
 
public abstract PendingResult<Status> untrash (GoogleApiClient apiClient)
This method was deprecated.
          Use 
          untrash(DriveResource) instead.
Moves the resource out of the trash. The user must be the owner. If the resource is a folder, the app must have access to all descendants of the folder.
Resources inside the app folder cannot be untrashed (they cannot be trashed in the first place).
Parameters
| apiClient | The GoogleApiClient
                to service the call. The client must be connected before invoking this method. | 
              
|---|
Returns
- A PendingResult which can be used to verify the success of the operation.
 
public abstract PendingResult<DriveResource.MetadataResult> updateMetadata (GoogleApiClient apiClient, MetadataChangeSet changeSet)
This method was deprecated.
          Use 
          updateMetadata(DriveResource, MetadataChangeSet) instead.
Updates the Metadata that is associated with this resource with the changes
            described in the MetadataChangeSet.
Note that the user must have edit access to update certain metadata fields (see
            MetadataChangeSet.Builder).
            Also, the metadata of the root folder cannot be updated.
Parameters
| apiClient | The GoogleApiClient
                to service the call. The client must be connected when this method is invoked. | 
              
|---|---|
| changeSet | The set of changes that will be applied to the Metadata. Only include the specific fields that should be updated. | 
Returns
- A PendingResult which will return the updated Metadata when it is available.