package gapi-ocaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module VideoMediaMetadata : sig ... end
module ShortcutDetails : sig ... end
module LinkShareMetadata : sig ... end
module ImageMediaMetadata : sig ... end
module ContentHints : sig ... end
module Capabilities : sig ... end
type t = {
  1. appProperties : (string * string) list;
    (*

    A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.

    *)
  2. capabilities : Capabilities.t;
    (*

    Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.

    *)
  3. contentHints : ContentHints.t;
    (*

    Additional information about the content of the file. These fields are never populated in responses.

    *)
  4. contentRestrictions : ContentRestriction.t list;
    (*

    Restrictions for accessing the content of the file. Only populated if such a restriction exists.

    *)
  5. copyRequiresWriterPermission : bool;
    (*

    Whether the options to copy, print, or download this file, should be disabled for readers and commenters.

    *)
  6. createdTime : GapiDate.t;
    (*

    The time at which the file was created (RFC 3339 date-time).

    *)
  7. description : string;
    (*

    A short description of the file.

    *)
  8. driveId : string;
    (*

    ID of the shared drive the file resides in. Only populated for items in shared drives.

    *)
  9. explicitlyTrashed : bool;
    (*

    Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.

    *)
  10. fileExtension : string;
    (*

    The final component of fullFileExtension. This is only available for files with binary content in Google Drive.

    *)
  11. folderColorRgb : string;
    (*

    The color for a folder or shortcut to a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. If an unsupported color is specified, the closest color in the palette will be used instead.

    *)
  12. fullFileExtension : string;
    (*

    The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.

    *)
  13. hasAugmentedPermissions : bool;
    (*

    Whether there are permissions directly on this file. This field is only populated for items in shared drives.

    *)
  14. hasThumbnail : bool;
    (*

    Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.

    *)
  15. headRevisionId : string;
    (*

    The ID of the file's head revision. This is currently only available for files with binary content in Google Drive.

    *)
  16. id : string;
    (*

    The ID of the file.

    *)
  17. imageMediaMetadata : ImageMediaMetadata.t;
    (*

    Additional metadata about image media, if available.

    *)
  18. isAppAuthorized : bool;
    (*

    Whether the file was created or opened by the requesting app.

    *)
  19. kind : string;
    (*

    Identifies what kind of resource this is. Value: the fixed string "drive#file".

    *)
  20. lastModifyingUser : User.t;
    (*

    The last user to modify the file.

    *)
  21. linkShareMetadata : LinkShareMetadata.t;
    (*

    Contains details about the link URLs that clients are using to refer to this item.

    *)
  22. md5Checksum : string;
    (*

    The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.

    *)
  23. mimeType : string;
    (*

    The MIME type of the file. Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.

    *)
  24. modifiedByMe : bool;
    (*

    Whether the file has been modified by this user.

    *)
  25. modifiedByMeTime : GapiDate.t;
    (*

    The last time the file was modified by the user (RFC 3339 date-time).

    *)
  26. modifiedTime : GapiDate.t;
    (*

    The last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user.

    *)
  27. name : string;
    (*

    The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.

    *)
  28. originalFilename : string;
    (*

    The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.

    *)
  29. ownedByMe : bool;
    (*

    Whether the user owns the file. Not populated for items in shared drives.

    *)
  30. owners : User.t list;
    (*

    The owner of this file. Only certain legacy files may have more than one owner. This field isn't populated for items in shared drives.

    *)
  31. parents : string list;
    (*

    The IDs of the parent folders which contain the file. If not specified as part of a create request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.

    *)
  32. permissionIds : string list;
    (*

    List of permission IDs for users with access to this file.

    *)
  33. permissions : Permission.t list;
    (*

    The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.

    *)
  34. properties : (string * string) list;
    (*

    A collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests.

    *)
  35. quotaBytesUsed : int64;
    (*

    The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.

    *)
  36. resourceKey : string;
    (*

    A key needed to access the item via a shared link.

    *)
  37. shared : bool;
    (*

    Whether the file has been shared. Not populated for items in shared drives.

    *)
  38. sharedWithMeTime : GapiDate.t;
    (*

    The time at which the file was shared with the user, if applicable (RFC 3339 date-time).

    *)
  39. sharingUser : User.t;
    (*

    The user who shared the file with the requesting user, if applicable.

    *)
  40. shortcutDetails : ShortcutDetails.t;
    (*

    Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.

    *)
  41. size : int64;
    (*

    The size of the file's content in bytes. This is applicable to binary files in Google Drive and Google Docs files.

    *)
  42. spaces : string list;
    (*

    The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'.

    *)
  43. starred : bool;
    (*

    Whether the user has starred the file.

    *)
  44. teamDriveId : string;
    (*

    Deprecated - use driveId instead.

    *)
  45. thumbnailVersion : int64;
    (*

    The thumbnail version for use in thumbnail cache invalidation.

    *)
  46. trashed : bool;
    (*

    Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.

    *)
  47. trashedTime : GapiDate.t;
    (*

    The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.

    *)
  48. trashingUser : User.t;
    (*

    If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.

    *)
  49. version : int64;
    (*

    A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.

    *)
  50. videoMediaMetadata : VideoMediaMetadata.t;
    (*

    Additional metadata about video media. This may not be available immediately upon upload.

    *)
  51. viewedByMe : bool;
    (*

    Whether the file has been viewed by this user.

    *)
  52. viewedByMeTime : GapiDate.t;
    (*

    The last time the file was viewed by the user (RFC 3339 date-time).

    *)
  53. viewersCanCopyContent : bool;
    (*

    Deprecated - use copyRequiresWriterPermission instead.

    *)
  54. writersCanShare : bool;
    (*

    Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives.

    *)
}
val appProperties : (t, (string * string) list) GapiLens.t
val capabilities : (t, Capabilities.t) GapiLens.t
val contentHints : (t, ContentHints.t) GapiLens.t
val contentRestrictions : (t, ContentRestriction.t list) GapiLens.t
val copyRequiresWriterPermission : (t, bool) GapiLens.t
val createdTime : (t, GapiDate.t) GapiLens.t
val description : (t, string) GapiLens.t
val driveId : (t, string) GapiLens.t
val explicitlyTrashed : (t, bool) GapiLens.t
val fileExtension : (t, string) GapiLens.t
val folderColorRgb : (t, string) GapiLens.t
val fullFileExtension : (t, string) GapiLens.t
val hasAugmentedPermissions : (t, bool) GapiLens.t
val hasThumbnail : (t, bool) GapiLens.t
val headRevisionId : (t, string) GapiLens.t
val id : (t, string) GapiLens.t
val imageMediaMetadata : (t, ImageMediaMetadata.t) GapiLens.t
val isAppAuthorized : (t, bool) GapiLens.t
val kind : (t, string) GapiLens.t
val lastModifyingUser : (t, User.t) GapiLens.t
val linkShareMetadata : (t, LinkShareMetadata.t) GapiLens.t
val md5Checksum : (t, string) GapiLens.t
val mimeType : (t, string) GapiLens.t
val modifiedByMe : (t, bool) GapiLens.t
val modifiedByMeTime : (t, GapiDate.t) GapiLens.t
val modifiedTime : (t, GapiDate.t) GapiLens.t
val name : (t, string) GapiLens.t
val originalFilename : (t, string) GapiLens.t
val ownedByMe : (t, bool) GapiLens.t
val owners : (t, User.t list) GapiLens.t
val parents : (t, string list) GapiLens.t
val permissionIds : (t, string list) GapiLens.t
val permissions : (t, Permission.t list) GapiLens.t
val properties : (t, (string * string) list) GapiLens.t
val quotaBytesUsed : (t, int64) GapiLens.t
val resourceKey : (t, string) GapiLens.t
val shared : (t, bool) GapiLens.t
val sharedWithMeTime : (t, GapiDate.t) GapiLens.t
val sharingUser : (t, User.t) GapiLens.t
val shortcutDetails : (t, ShortcutDetails.t) GapiLens.t
val size : (t, int64) GapiLens.t
val spaces : (t, string list) GapiLens.t
val starred : (t, bool) GapiLens.t
val teamDriveId : (t, string) GapiLens.t
val thumbnailVersion : (t, int64) GapiLens.t
val trashed : (t, bool) GapiLens.t
val trashedTime : (t, GapiDate.t) GapiLens.t
val trashingUser : (t, User.t) GapiLens.t
val version : (t, int64) GapiLens.t
val videoMediaMetadata : (t, VideoMediaMetadata.t) GapiLens.t
val viewedByMe : (t, bool) GapiLens.t
val viewedByMeTime : (t, GapiDate.t) GapiLens.t
val viewersCanCopyContent : (t, bool) GapiLens.t
val writersCanShare : (t, bool) GapiLens.t
val empty : t
val render : t -> GapiJson.json_data_model list
val parse : t -> GapiJson.json_data_model -> t
val to_data_model : t -> GapiJson.json_data_model
val of_data_model : GapiJson.json_data_model -> t
OCaml

Innovation. Community. Security.