target.apidocs.com.google.api.services.drive.Drive.Permissions.html Maven / Gradle / Ivy
Drive.Permissions (Google Drive API v2-rev20240521-2.0.0)
com.google.api.services.drive
Class Drive.Permissions
- java.lang.Object
-
- com.google.api.services.drive.Drive.Permissions
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
class
Drive.Permissions.Delete
class
Drive.Permissions.Get
class
Drive.Permissions.GetIdForEmail
class
Drive.Permissions.Insert
class
Drive.Permissions.List
class
Drive.Permissions.Patch
class
Drive.Permissions.Update
-
Constructor Summary
Constructors
Constructor and Description
Permissions()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Drive.Permissions.Delete
delete(String fileId,
String permissionId)
Deletes a permission from a file or shared drive.
Drive.Permissions.Get
get(String fileId,
String permissionId)
Gets a permission by ID.
Drive.Permissions.GetIdForEmail
getIdForEmail(String email)
Returns the permission ID for an email address.
Drive.Permissions.Insert
insert(String fileId,
Permission content)
Inserts a permission for a file or shared drive.
Drive.Permissions.List
list(String fileId)
Lists a file's or shared drive's permissions.
Drive.Permissions.Patch
patch(String fileId,
String permissionId,
Permission content)
Updates a permission using patch semantics.
Drive.Permissions.Update
update(String fileId,
String permissionId,
Permission content)
Updates a permission.
-
-
Method Detail
-
delete
public Drive.Permissions.Delete delete(String fileId,
String permissionId)
throws IOException
Deletes a permission from a file or shared drive. **Warning:** Concurrent permissions operations
on the same file are not supported; only the last update is applied.
Create a request for the method "permissions.delete".
This request holds the parameters needed by the drive server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
fileId
- The ID for the file or shared drive.
permissionId
- The ID for the permission.
- Returns:
- the request
- Throws:
IOException
-
get
public Drive.Permissions.Get get(String fileId,
String permissionId)
throws IOException
Gets a permission by ID.
Create a request for the method "permissions.get".
This request holds the parameters needed by the drive server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
fileId
- The ID for the file or shared drive.
permissionId
- The ID for the permission.
- Returns:
- the request
- Throws:
IOException
-
getIdForEmail
public Drive.Permissions.GetIdForEmail getIdForEmail(String email)
throws IOException
Returns the permission ID for an email address.
Create a request for the method "permissions.getIdForEmail".
This request holds the parameters needed by the drive server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
email
- The email address for which to return a permission ID
- Returns:
- the request
- Throws:
IOException
-
insert
public Drive.Permissions.Insert insert(String fileId,
Permission content)
throws IOException
Inserts a permission for a file or shared drive. **Warning:** Concurrent permissions operations
on the same file are not supported; only the last update is applied.
Create a request for the method "permissions.insert".
This request holds the parameters needed by the drive server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
fileId
- The ID for the file or shared drive.
content
- the Permission
- Returns:
- the request
- Throws:
IOException
-
list
public Drive.Permissions.List list(String fileId)
throws IOException
Lists a file's or shared drive's permissions.
Create a request for the method "permissions.list".
This request holds the parameters needed by the drive server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
fileId
- The ID for the file or shared drive.
- Returns:
- the request
- Throws:
IOException
-
patch
public Drive.Permissions.Patch patch(String fileId,
String permissionId,
Permission content)
throws IOException
Updates a permission using patch semantics. **Warning:** Concurrent permissions operations on the
same file are not supported; only the last update is applied.
Create a request for the method "permissions.patch".
This request holds the parameters needed by the drive server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
fileId
- The ID for the file or shared drive.
permissionId
- The ID for the permission.
content
- the Permission
- Returns:
- the request
- Throws:
IOException
-
update
public Drive.Permissions.Update update(String fileId,
String permissionId,
Permission content)
throws IOException
Updates a permission. **Warning:** Concurrent permissions operations on the same file are not
supported; only the last update is applied.
Create a request for the method "permissions.update".
This request holds the parameters needed by the drive server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
fileId
- The ID for the file or shared drive.
permissionId
- The ID for the permission.
content
- the Permission
- Returns:
- the request
- Throws:
IOException
Copyright © 2011–2024 Google. All rights reserved.