use super::*; /// An Activity resource is a combined view of multiple events. An activity has a list of individual events and a combined view of the common fields among all events. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Activity { /// The fields common to all of the singleEvents that make up the Activity. #[serde(rename="combinedEvent")] pub combined_event: Option, /// A list of all the Events that make up the Activity. #[serde(rename="singleEvents")] pub single_events: Option>, } impl client::Part for Activity {} /// Represents the changes associated with an action taken by a user. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Event { /// Additional event types. Some events may have multiple types when multiple actions are part of a single event. For example, creating a document, renaming it, and sharing it may be part of a single file-creation event. #[serde(rename="additionalEventTypes")] pub additional_event_types: Option>, /// The time at which the event occurred formatted as Unix time in milliseconds. #[serde(rename="eventTimeMillis")] #[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")] pub event_time_millis: Option, /// Whether this event is caused by a user being deleted. #[serde(rename="fromUserDeletion")] pub from_user_deletion: Option, /// Extra information for move type events, such as changes in an object's parents. #[serde(rename="move")] pub move_: Option, /// Extra information for permissionChange type events, such as the user or group the new permission applies to. #[serde(rename="permissionChanges")] pub permission_changes: Option>, /// The main type of event that occurred. #[serde(rename="primaryEventType")] pub primary_event_type: Option, /// Extra information for rename type events, such as the old and new names. pub rename: Option, /// Information specific to the Target object modified by the event. pub target: Option, /// Represents the user responsible for the event. pub user: Option, } impl client::Part for Event {} /// The response from the list request. Contains a list of activities and a token to retrieve the next page of results. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// /// * [list activities](ActivityListCall) (response) #[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListActivitiesResponse { /// List of activities. pub activities: Option>, /// Token for the next page of results. #[serde(rename="nextPageToken")] pub next_page_token: Option, } impl client::ResponseResult for ListActivitiesResponse {} /// Contains information about changes in an object's parents as a result of a move type event. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Move { /// The added parent(s). #[serde(rename="addedParents")] pub added_parents: Option>, /// The removed parent(s). #[serde(rename="removedParents")] pub removed_parents: Option>, } impl client::Part for Move {} /// Contains information about a parent object. For example, a folder in Drive is a parent for all files within it. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Parent { /// The parent's ID. pub id: Option, /// Whether this is the root folder. #[serde(rename="isRoot")] pub is_root: Option, /// The parent's title. pub title: Option, } impl client::Part for Parent {} /// Contains information about the permissions and type of access allowed with regards to a Google Drive object. This is a subset of the fields contained in a corresponding Drive Permissions object. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Permission { /// The name of the user or group the permission applies to. pub name: Option, /// The ID for this permission. Corresponds to the Drive API's permission ID returned as part of the Drive Permissions resource. #[serde(rename="permissionId")] pub permission_id: Option, /// Indicates the Google Drive permissions role. The role determines a user's ability to read, write, or comment on the file. pub role: Option, /// Indicates how widely permissions are granted. #[serde(rename="type")] pub type_: Option, /// The user's information if the type is USER. pub user: Option, /// Whether the permission requires a link to the file. #[serde(rename="withLink")] pub with_link: Option, } impl client::Part for Permission {} /// Contains information about a Drive object's permissions that changed as a result of a permissionChange type event. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PermissionChange { /// Lists all Permission objects added. #[serde(rename="addedPermissions")] pub added_permissions: Option>, /// Lists all Permission objects removed. #[serde(rename="removedPermissions")] pub removed_permissions: Option>, } impl client::Part for PermissionChange {} /// Photo information for a user. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Photo { /// The URL of the photo. pub url: Option, } impl client::Part for Photo {} /// Contains information about a renametype event. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Rename { /// The new title. #[serde(rename="newTitle")] pub new_title: Option, /// The old title. #[serde(rename="oldTitle")] pub old_title: Option, } impl client::Part for Rename {} /// Information about the object modified by the event. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Target { /// The ID of the target. For example, in Google Drive, this is the file or folder ID. pub id: Option, /// The MIME type of the target. #[serde(rename="mimeType")] pub mime_type: Option, /// The name of the target. For example, in Google Drive, this is the title of the file. pub name: Option, } impl client::Part for Target {} /// A representation of a user. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[serde_with::serde_as(crate = "::client::serde_with")] #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct User { /// A boolean which indicates whether the specified User was deleted. If true, name, photo and permission_id will be omitted. #[serde(rename="isDeleted")] pub is_deleted: Option, /// Whether the user is the authenticated user. #[serde(rename="isMe")] pub is_me: Option, /// The displayable name of the user. pub name: Option, /// The permission ID associated with this user. Equivalent to the Drive API's permission ID for this user, returned as part of the Drive Permissions resource. #[serde(rename="permissionId")] pub permission_id: Option, /// The profile photo of the user. Not present if the user has no profile photo. pub photo: Option, } impl client::Part for User {}