[][src]Struct google_drive2::Permission

pub struct Permission {
    pub domain: Option<String>,
    pub permission_details: Option<Vec<PermissionPermissionDetails>>,
    pub deleted: Option<bool>,
    pub email_address: Option<String>,
    pub expiration_date: Option<String>,
    pub additional_roles: Option<Vec<String>>,
    pub with_link: Option<bool>,
    pub kind: Option<String>,
    pub name: Option<String>,
    pub value: Option<String>,
    pub id: Option<String>,
    pub auth_key: Option<String>,
    pub etag: Option<String>,
    pub role: Option<String>,
    pub photo_link: Option<String>,
    pub team_drive_permission_details: Option<Vec<PermissionTeamDrivePermissionDetails>>,
    pub type_: Option<String>,
    pub self_link: Option<String>,
}

A permission for a file.

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).

Fields

domain: Option<String>

The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.

permission_details: Option<Vec<PermissionPermissionDetails>>

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.

deleted: Option<bool>

Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.

email_address: Option<String>

The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.

expiration_date: Option<String>

The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:

  • They can only be set on user and group permissions
  • The date must be in the future
  • The date cannot be more than a year in the future
  • The date can only be set on drive.permissions.update or drive.permissions.patch requests
additional_roles: Option<Vec<String>>

Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.

with_link: Option<bool>

Whether the link is required for this permission.

kind: Option<String>

This is always drive#permission.

name: Option<String>

The name for this permission.

value: Option<String>

The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.

id: Option<String>

The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.

auth_key: Option<String>

Deprecated.

etag: Option<String>

The ETag of the permission.

role: Option<String>

The primary role for this user. While new values may be supported in the future, the following are currently allowed:

  • owner
  • organizer
  • fileOrganizer
  • writer
  • reader
photo_link: Option<String>

A link to the profile photo, if available.

team_drive_permission_details: Option<Vec<PermissionTeamDrivePermissionDetails>>

Deprecated - use permissionDetails instead.

type_: Option<String>

The account type. Allowed values are:

  • user
  • group
  • domain
  • anyone
self_link: Option<String>

A link back to this permission.

Trait Implementations

impl Resource for Permission[src]

impl ResponseResult for Permission[src]

impl RequestValue for Permission[src]

impl Default for Permission[src]

impl Clone for Permission[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Permission[src]

impl Serialize for Permission[src]

impl<'de> Deserialize<'de> for Permission[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]