1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="drive_v3.html">Drive API</a> . <a href="drive_v3.permissions.html">permissions</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#create">create(fileId, body=None, emailMessage=None, enforceSingleParent=None, moveToNewOwnersRoot=None, sendNotificationEmail=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</a></code></p> 82<p class="firstline">Creates a permission for a file or shared drive.</p> 83<p class="toc_element"> 84 <code><a href="#delete">delete(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</a></code></p> 85<p class="firstline">Deletes a permission.</p> 86<p class="toc_element"> 87 <code><a href="#get">get(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</a></code></p> 88<p class="firstline">Gets a permission by ID.</p> 89<p class="toc_element"> 90 <code><a href="#list">list(fileId, includePermissionsForView=None, pageSize=None, pageToken=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</a></code></p> 91<p class="firstline">Lists a file's or shared drive's permissions.</p> 92<p class="toc_element"> 93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 94<p class="firstline">Retrieves the next page of results.</p> 95<p class="toc_element"> 96 <code><a href="#update">update(fileId, permissionId, body=None, removeExpiration=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</a></code></p> 97<p class="firstline">Updates a permission with patch semantics.</p> 98<h3>Method Details</h3> 99<div class="method"> 100 <code class="details" id="close">close()</code> 101 <pre>Close httplib2 connections.</pre> 102</div> 103 104<div class="method"> 105 <code class="details" id="create">create(fileId, body=None, emailMessage=None, enforceSingleParent=None, moveToNewOwnersRoot=None, sendNotificationEmail=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</code> 106 <pre>Creates a permission for a file or shared drive. 107 108Args: 109 fileId: string, The ID of the file or shared drive. (required) 110 body: object, The request body. 111 The object takes the form of: 112 113{ # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. 114 "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. 115 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. 116 "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: 117 # - user - User's full name, as defined for their Google account, such as "Joe Smith." 118 # - group - Name of the Google Group, such as "The Company Administrators." 119 # - domain - String domain name, such as "thecompany.com." 120 # - anyone - No displayName is present. 121 "domain": "A String", # The domain to which this permission refers. 122 "emailAddress": "A String", # The email address of the user or group to which this permission refers. 123 "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: 124 # - They can only be set on user and group permissions 125 # - The time must be in the future 126 # - The time cannot be more than a year in the future 127 "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. 128 "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". 129 "pendingOwner": True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive. 130 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items. 131 { 132 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. 133 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field. 134 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible: 135 # - file 136 # - member 137 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: 138 # - organizer 139 # - fileOrganizer 140 # - writer 141 # - commenter 142 # - reader 143 }, 144 ], 145 "photoLink": "A String", # A link to the user's profile photo, if available. 146 "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: 147 # - owner 148 # - organizer 149 # - fileOrganizer 150 # - writer 151 # - commenter 152 # - reader 153 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead. 154 { 155 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead. 156 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead. 157 "role": "A String", # Deprecated - use permissionDetails/role instead. 158 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead. 159 }, 160 ], 161 "type": "A String", # The type of the grantee. Valid values are: 162 # - user 163 # - group 164 # - domain 165 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type. 166 "view": "A String", # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. 167} 168 169 emailMessage: string, A plain text custom message to include in the notification email. 170 enforceSingleParent: boolean, Deprecated. See moveToNewOwnersRoot for details. 171 moveToNewOwnersRoot: boolean, This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, parents are not changed. 172 sendNotificationEmail: boolean, Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers. 173 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives. 174 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead. 175 transferOwnership: boolean, Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. File owners can only transfer ownership of files existing on My Drive. Files existing in a shared drive are owned by the organization that owns that shared drive. Ownership transfers are not supported for files and folders in shared drives. Organizers of a shared drive can move items from that shared drive into their My Drive which transfers the ownership to them. 176 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. 177 178Returns: 179 An object of the form: 180 181 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. 182 "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. 183 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. 184 "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: 185 # - user - User's full name, as defined for their Google account, such as "Joe Smith." 186 # - group - Name of the Google Group, such as "The Company Administrators." 187 # - domain - String domain name, such as "thecompany.com." 188 # - anyone - No displayName is present. 189 "domain": "A String", # The domain to which this permission refers. 190 "emailAddress": "A String", # The email address of the user or group to which this permission refers. 191 "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: 192 # - They can only be set on user and group permissions 193 # - The time must be in the future 194 # - The time cannot be more than a year in the future 195 "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. 196 "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". 197 "pendingOwner": True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive. 198 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items. 199 { 200 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. 201 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field. 202 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible: 203 # - file 204 # - member 205 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: 206 # - organizer 207 # - fileOrganizer 208 # - writer 209 # - commenter 210 # - reader 211 }, 212 ], 213 "photoLink": "A String", # A link to the user's profile photo, if available. 214 "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: 215 # - owner 216 # - organizer 217 # - fileOrganizer 218 # - writer 219 # - commenter 220 # - reader 221 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead. 222 { 223 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead. 224 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead. 225 "role": "A String", # Deprecated - use permissionDetails/role instead. 226 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead. 227 }, 228 ], 229 "type": "A String", # The type of the grantee. Valid values are: 230 # - user 231 # - group 232 # - domain 233 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type. 234 "view": "A String", # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. 235}</pre> 236</div> 237 238<div class="method"> 239 <code class="details" id="delete">delete(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</code> 240 <pre>Deletes a permission. 241 242Args: 243 fileId: string, The ID of the file or shared drive. (required) 244 permissionId: string, The ID of the permission. (required) 245 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives. 246 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead. 247 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. 248</pre> 249</div> 250 251<div class="method"> 252 <code class="details" id="get">get(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</code> 253 <pre>Gets a permission by ID. 254 255Args: 256 fileId: string, The ID of the file. (required) 257 permissionId: string, The ID of the permission. (required) 258 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives. 259 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead. 260 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. 261 262Returns: 263 An object of the form: 264 265 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. 266 "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. 267 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. 268 "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: 269 # - user - User's full name, as defined for their Google account, such as "Joe Smith." 270 # - group - Name of the Google Group, such as "The Company Administrators." 271 # - domain - String domain name, such as "thecompany.com." 272 # - anyone - No displayName is present. 273 "domain": "A String", # The domain to which this permission refers. 274 "emailAddress": "A String", # The email address of the user or group to which this permission refers. 275 "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: 276 # - They can only be set on user and group permissions 277 # - The time must be in the future 278 # - The time cannot be more than a year in the future 279 "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. 280 "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". 281 "pendingOwner": True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive. 282 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items. 283 { 284 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. 285 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field. 286 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible: 287 # - file 288 # - member 289 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: 290 # - organizer 291 # - fileOrganizer 292 # - writer 293 # - commenter 294 # - reader 295 }, 296 ], 297 "photoLink": "A String", # A link to the user's profile photo, if available. 298 "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: 299 # - owner 300 # - organizer 301 # - fileOrganizer 302 # - writer 303 # - commenter 304 # - reader 305 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead. 306 { 307 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead. 308 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead. 309 "role": "A String", # Deprecated - use permissionDetails/role instead. 310 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead. 311 }, 312 ], 313 "type": "A String", # The type of the grantee. Valid values are: 314 # - user 315 # - group 316 # - domain 317 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type. 318 "view": "A String", # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. 319}</pre> 320</div> 321 322<div class="method"> 323 <code class="details" id="list">list(fileId, includePermissionsForView=None, pageSize=None, pageToken=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</code> 324 <pre>Lists a file's or shared drive's permissions. 325 326Args: 327 fileId: string, The ID of the file or shared drive. (required) 328 includePermissionsForView: string, Specifies which additional view's permissions to include in the response. Only 'published' is supported. 329 pageSize: integer, The maximum number of permissions to return per page. When not set for files in a shared drive, at most 100 results will be returned. When not set for files that are not in a shared drive, the entire list will be returned. 330 pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response. 331 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives. 332 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead. 333 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. 334 335Returns: 336 An object of the form: 337 338 { # A list of permissions for a file. 339 "kind": "drive#permissionList", # Identifies what kind of resource this is. Value: the fixed string "drive#permissionList". 340 "nextPageToken": "A String", # The page token for the next page of permissions. This field will be absent if the end of the permissions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. 341 "permissions": [ # The list of permissions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. 342 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. 343 "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. 344 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. 345 "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: 346 # - user - User's full name, as defined for their Google account, such as "Joe Smith." 347 # - group - Name of the Google Group, such as "The Company Administrators." 348 # - domain - String domain name, such as "thecompany.com." 349 # - anyone - No displayName is present. 350 "domain": "A String", # The domain to which this permission refers. 351 "emailAddress": "A String", # The email address of the user or group to which this permission refers. 352 "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: 353 # - They can only be set on user and group permissions 354 # - The time must be in the future 355 # - The time cannot be more than a year in the future 356 "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. 357 "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". 358 "pendingOwner": True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive. 359 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items. 360 { 361 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. 362 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field. 363 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible: 364 # - file 365 # - member 366 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: 367 # - organizer 368 # - fileOrganizer 369 # - writer 370 # - commenter 371 # - reader 372 }, 373 ], 374 "photoLink": "A String", # A link to the user's profile photo, if available. 375 "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: 376 # - owner 377 # - organizer 378 # - fileOrganizer 379 # - writer 380 # - commenter 381 # - reader 382 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead. 383 { 384 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead. 385 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead. 386 "role": "A String", # Deprecated - use permissionDetails/role instead. 387 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead. 388 }, 389 ], 390 "type": "A String", # The type of the grantee. Valid values are: 391 # - user 392 # - group 393 # - domain 394 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type. 395 "view": "A String", # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. 396 }, 397 ], 398}</pre> 399</div> 400 401<div class="method"> 402 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 403 <pre>Retrieves the next page of results. 404 405Args: 406 previous_request: The request for the previous page. (required) 407 previous_response: The response from the request for the previous page. (required) 408 409Returns: 410 A request object that you can call 'execute()' on to request the next 411 page. Returns None if there are no more items in the collection. 412 </pre> 413</div> 414 415<div class="method"> 416 <code class="details" id="update">update(fileId, permissionId, body=None, removeExpiration=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</code> 417 <pre>Updates a permission with patch semantics. 418 419Args: 420 fileId: string, The ID of the file or shared drive. (required) 421 permissionId: string, The ID of the permission. (required) 422 body: object, The request body. 423 The object takes the form of: 424 425{ # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. 426 "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. 427 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. 428 "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: 429 # - user - User's full name, as defined for their Google account, such as "Joe Smith." 430 # - group - Name of the Google Group, such as "The Company Administrators." 431 # - domain - String domain name, such as "thecompany.com." 432 # - anyone - No displayName is present. 433 "domain": "A String", # The domain to which this permission refers. 434 "emailAddress": "A String", # The email address of the user or group to which this permission refers. 435 "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: 436 # - They can only be set on user and group permissions 437 # - The time must be in the future 438 # - The time cannot be more than a year in the future 439 "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. 440 "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". 441 "pendingOwner": True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive. 442 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items. 443 { 444 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. 445 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field. 446 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible: 447 # - file 448 # - member 449 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: 450 # - organizer 451 # - fileOrganizer 452 # - writer 453 # - commenter 454 # - reader 455 }, 456 ], 457 "photoLink": "A String", # A link to the user's profile photo, if available. 458 "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: 459 # - owner 460 # - organizer 461 # - fileOrganizer 462 # - writer 463 # - commenter 464 # - reader 465 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead. 466 { 467 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead. 468 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead. 469 "role": "A String", # Deprecated - use permissionDetails/role instead. 470 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead. 471 }, 472 ], 473 "type": "A String", # The type of the grantee. Valid values are: 474 # - user 475 # - group 476 # - domain 477 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type. 478 "view": "A String", # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. 479} 480 481 removeExpiration: boolean, Whether to remove the expiration date. 482 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives. 483 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead. 484 transferOwnership: boolean, Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. File owners can only transfer ownership of files existing on My Drive. Files existing in a shared drive are owned by the organization that owns that shared drive. Ownership transfers are not supported for files and folders in shared drives. Organizers of a shared drive can move items from that shared drive into their My Drive which transfers the ownership to them. 485 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. 486 487Returns: 488 An object of the form: 489 490 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy. 491 "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. 492 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. 493 "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: 494 # - user - User's full name, as defined for their Google account, such as "Joe Smith." 495 # - group - Name of the Google Group, such as "The Company Administrators." 496 # - domain - String domain name, such as "thecompany.com." 497 # - anyone - No displayName is present. 498 "domain": "A String", # The domain to which this permission refers. 499 "emailAddress": "A String", # The email address of the user or group to which this permission refers. 500 "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: 501 # - They can only be set on user and group permissions 502 # - The time must be in the future 503 # - The time cannot be more than a year in the future 504 "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. 505 "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission". 506 "pendingOwner": True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive. 507 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items. 508 { 509 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field. 510 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field. 511 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible: 512 # - file 513 # - member 514 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible: 515 # - organizer 516 # - fileOrganizer 517 # - writer 518 # - commenter 519 # - reader 520 }, 521 ], 522 "photoLink": "A String", # A link to the user's profile photo, if available. 523 "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed: 524 # - owner 525 # - organizer 526 # - fileOrganizer 527 # - writer 528 # - commenter 529 # - reader 530 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead. 531 { 532 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead. 533 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead. 534 "role": "A String", # Deprecated - use permissionDetails/role instead. 535 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead. 536 }, 537 ], 538 "type": "A String", # The type of the grantee. Valid values are: 539 # - user 540 # - group 541 # - domain 542 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type. 543 "view": "A String", # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. 544}</pre> 545</div> 546 547</body></html>