> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r28.ai/charter/llms.txt
> Use this file to discover all available pages before exploring further.

# Objects

> Every object and enum the Permissions tools accept.

## Model tree

<div className="model-tree"><div className="model-tree-scroll"><div className="tree-node"><a href="#permission">Permission</a></div><div className="tree-node"><a href="#patchpermission">PatchPermission</a></div></div></div>

## Permission

A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy.

<div className="reference-table">
  | Field                                                        | Type                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                |
  | ------------------------------------------------------------ | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `type` <span className="required" title="required">\*</span> | [PermissionType](#permissiontype) | The type of the grantee. Supported values include: `user`, `group`, `domain`, `anyone`. When creating a permission, if `type` is `user` or `group`, you must provide an `emailAddress` for the user or group. If `type` is `domain`, you must provide a `domain`. If `type` is `anyone`, no extra information is required.                                                                                                 |
  | `role` <span className="required" title="required">\*</span> | [PermissionRole](#permissionrole) | The role granted by this permission. Supported values include: `owner`, `organizer`, `fileOrganizer`, `writer`, `commenter`, `reader`. For more information, see Roles and permissions.                                                                                                                                                                                                                                    |
  | `emailAddress`                                               | `string`                          | The email address of the user or group to which this permission refers. Required when creating a permission of type `user` or `group`.                                                                                                                                                                                                                                                                                     |
  | `domain`                                                     | `string`                          | The domain to which this permission refers. Required when creating a permission of type `domain`.                                                                                                                                                                                                                                                                                                                          |
  | `allowFileDiscovery`                                         | `boolean`                         | Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type `domain` or `anyone`.                                                                                                                                                                                                                                                                              |
  | `expirationTime`                                             | `string`                          | The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: they can only be set on user and group permissions; the time must be in the future; the time cannot be more than a year in the future.                                                                                                                                                               |
  | `pendingOwner`                                               | `boolean`                         | Whether the account associated with this permission is a pending owner. Only populated for permissions of type `user` for files that aren't in a shared drive.                                                                                                                                                                                                                                                             |
  | `view`                                                       | [PermissionView](#permissionview) | Indicates the view for this permission. Only populated for permissions that belong to a view. The only supported values are `published` and `metadata`: `published` — the permission's role is `publishedReader`; `metadata` — the item is only visible to the `metadata` view because the item has limited access and the scope has at least read access to the parent. The `metadata` view is only supported on folders. |
  | `inheritedPermissionsDisabled`                               | `boolean`                         | When `true`, only organizers, owners, and users with permissions added directly on the item can access it.                                                                                                                                                                                                                                                                                                                 |
</div>

## PatchPermission

Request body for Drive `permissions.update`.

<div className="reference-table">
  | Field                          | Type                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                |
  | ------------------------------ | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `type`                         | [PermissionType](#permissiontype) | The type of the grantee. Supported values include: `user`, `group`, `domain`, `anyone`. When creating a permission, if `type` is `user` or `group`, you must provide an `emailAddress` for the user or group. If `type` is `domain`, you must provide a `domain`. If `type` is `anyone`, no extra information is required.                                                                                                 |
  | `role`                         | [PermissionRole](#permissionrole) | The role granted by this permission. Supported values include: `owner`, `organizer`, `fileOrganizer`, `writer`, `commenter`, `reader`. For more information, see Roles and permissions.                                                                                                                                                                                                                                    |
  | `emailAddress`                 | `string`                          | The email address of the user or group to which this permission refers. Required when creating a permission of type `user` or `group`.                                                                                                                                                                                                                                                                                     |
  | `domain`                       | `string`                          | The domain to which this permission refers. Required when creating a permission of type `domain`.                                                                                                                                                                                                                                                                                                                          |
  | `allowFileDiscovery`           | `boolean`                         | Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type `domain` or `anyone`.                                                                                                                                                                                                                                                                              |
  | `expirationTime`               | `string`                          | The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: they can only be set on user and group permissions; the time must be in the future; the time cannot be more than a year in the future.                                                                                                                                                               |
  | `pendingOwner`                 | `boolean`                         | Whether the account associated with this permission is a pending owner. Only populated for permissions of type `user` for files that aren't in a shared drive.                                                                                                                                                                                                                                                             |
  | `view`                         | [PermissionView](#permissionview) | Indicates the view for this permission. Only populated for permissions that belong to a view. The only supported values are `published` and `metadata`: `published` — the permission's role is `publishedReader`; `metadata` — the item is only visible to the `metadata` view because the item has limited access and the scope has at least read access to the parent. The `metadata` view is only supported on folders. |
  | `inheritedPermissionsDisabled` | `boolean`                         | When `true`, only organizers, owners, and users with permissions added directly on the item can access it.                                                                                                                                                                                                                                                                                                                 |
</div>

## PermissionType

<div className="enum-table">
  | Value    |
  | -------- |
  | `user`   |
  | `group`  |
  | `domain` |
  | `anyone` |
</div>

## PermissionRole

<div className="enum-table">
  | Value             |
  | ----------------- |
  | `owner`           |
  | `organizer`       |
  | `fileOrganizer`   |
  | `writer`          |
  | `commenter`       |
  | `reader`          |
  | `publishedReader` |
</div>

## PermissionView

<div className="enum-table">
  | Value       |
  | ----------- |
  | `published` |
  | `metadata`  |
</div>
