Class: Google::Apis::AppsactivityV1::Permission

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

Overview

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.

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



248
249
250
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 248

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

Instance Attribute Details

#nameString

The name of the user or group the permission applies to. Corresponds to the JSON property name

Returns:

  • (String)


218
219
220
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 218

def name
  @name
end

#permission_idString

The ID for this permission. Corresponds to the Drive API's permission ID returned as part of the Drive Permissions resource. Corresponds to the JSON property permissionId

Returns:

  • (String)


224
225
226
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 224

def permission_id
  @permission_id
end

#roleString

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

Returns:

  • (String)


230
231
232
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 230

def role
  @role
end

#typeString

Indicates how widely permissions are granted. Corresponds to the JSON property type

Returns:

  • (String)


235
236
237
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 235

def type
  @type
end

#userGoogle::Apis::AppsactivityV1::User

A representation of a user. Corresponds to the JSON property user



240
241
242
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 240

def user
  @user
end

Whether the permission requires a link to the file. Corresponds to the JSON property withLink

Returns:

  • (Boolean)


245
246
247
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 245

def with_link
  @with_link
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



253
254
255
256
257
258
259
260
# File 'generated/google/apis/appsactivity_v1/classes.rb', line 253

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @permission_id = args[:permission_id] if args.key?(:permission_id)
  @role = args[:role] if args.key?(:role)
  @type = args[:type] if args.key?(:type)
  @user = args[:user] if args.key?(:user)
  @with_link = args[:with_link] if args.key?(:with_link)
end