Class: Google::Apis::DriveactivityV2::Permission

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/driveactivity_v2/classes.rb,
generated/google/apis/driveactivity_v2/representations.rb,
generated/google/apis/driveactivity_v2/representations.rb

Overview

The permission setting of an object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Permission

Returns a new instance of Permission.



1036
1037
1038
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 1036

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#allow_discoveryBoolean Also known as: allow_discovery?

If true, the item can be discovered (e.g. in the user's "Shared with me" collection) without needing a link to the item. Corresponds to the JSON property allowDiscovery

Returns:

  • (Boolean)


1005
1006
1007
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 1005

def allow_discovery
  @allow_discovery
end

#anyoneGoogle::Apis::DriveactivityV2::Anyone

Represents any user (including a logged out user). Corresponds to the JSON property anyone



1011
1012
1013
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 1011

def anyone
  @anyone
end

#domainGoogle::Apis::DriveactivityV2::Domain

Information about a domain. Corresponds to the JSON property domain



1016
1017
1018
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 1016

def domain
  @domain
end

#groupGoogle::Apis::DriveactivityV2::Group

Information about a group. Corresponds to the JSON property group



1021
1022
1023
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 1021

def group
  @group
end

#roleString

Indicates the Google Drive permissions role. The role determines a user's ability to read, write, and comment on items. Corresponds to the JSON property role

Returns:

  • (String)


1029
1030
1031
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 1029

def role
  @role
end

#userGoogle::Apis::DriveactivityV2::User

Information about an end user. Corresponds to the JSON property user



1034
1035
1036
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 1034

def user
  @user
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1041
1042
1043
1044
1045
1046
1047
1048
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 1041

def update!(**args)
  @allow_discovery = args[:allow_discovery] if args.key?(:allow_discovery)
  @anyone = args[:anyone] if args.key?(:anyone)
  @domain = args[:domain] if args.key?(:domain)
  @group = args[:group] if args.key?(:group)
  @role = args[:role] if args.key?(:role)
  @user = args[:user] if args.key?(:user)
end