Class: Google::Apis::DriveV2::Permission::PermissionDetail

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

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) ⇒ PermissionDetail

Returns a new instance of PermissionDetail.



3123
3124
3125
# File 'generated/google/apis/drive_v2/classes.rb', line 3123

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

Instance Attribute Details

#additional_rolesArray<String>

Additional roles for this user. Only commenter is currently possible, though more may be supported in the future. Corresponds to the JSON property additionalRoles

Returns:

  • (Array<String>)


3090
3091
3092
# File 'generated/google/apis/drive_v2/classes.rb', line 3090

def additional_roles
  @additional_roles
end

#inheritedBoolean Also known as: inherited?

Whether this permission is inherited. This field is always populated. This is an output-only field. Corresponds to the JSON property inherited

Returns:

  • (Boolean)


3096
3097
3098
# File 'generated/google/apis/drive_v2/classes.rb', line 3096

def inherited
  @inherited
end

#inherited_fromString

The ID of the item from which this permission is inherited. This is an output- only field and is only populated for members of the shared drive. Corresponds to the JSON property inheritedFrom

Returns:

  • (String)


3103
3104
3105
# File 'generated/google/apis/drive_v2/classes.rb', line 3103

def inherited_from
  @inherited_from
end

#permission_typeString

The permission type for this user. While new values may be added in future, the following are currently possible:

  • file
  • member Corresponds to the JSON property permissionType

Returns:

  • (String)


3111
3112
3113
# File 'generated/google/apis/drive_v2/classes.rb', line 3111

def permission_type
  @permission_type
end

#roleString

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

  • organizer
  • fileOrganizer
  • writer
  • reader Corresponds to the JSON property role

Returns:

  • (String)


3121
3122
3123
# File 'generated/google/apis/drive_v2/classes.rb', line 3121

def role
  @role
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3128
3129
3130
3131
3132
3133
3134
# File 'generated/google/apis/drive_v2/classes.rb', line 3128

def update!(**args)
  @additional_roles = args[:additional_roles] if args.key?(:additional_roles)
  @inherited = args[:inherited] if args.key?(:inherited)
  @inherited_from = args[:inherited_from] if args.key?(:inherited_from)
  @permission_type = args[:permission_type] if args.key?(:permission_type)
  @role = args[:role] if args.key?(:role)
end