Class: Google::Apis::DriveV3::Change

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

Overview

A change to a file or shared drive.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Change

Returns a new instance of Change.



282
283
284
# File 'generated/google/apis/drive_v3/classes.rb', line 282

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

Instance Attribute Details

#change_typeString

The type of the change. Possible values are file and drive. Corresponds to the JSON property changeType

Returns:

  • (String)


227
228
229
# File 'generated/google/apis/drive_v3/classes.rb', line 227

def change_type
  @change_type
end

#driveGoogle::Apis::DriveV3::Drive

Representation of a shared drive. Corresponds to the JSON property drive



232
233
234
# File 'generated/google/apis/drive_v3/classes.rb', line 232

def drive
  @drive
end

#drive_idString

The ID of the shared drive associated with this change. Corresponds to the JSON property driveId

Returns:

  • (String)


237
238
239
# File 'generated/google/apis/drive_v3/classes.rb', line 237

def drive_id
  @drive_id
end

#fileGoogle::Apis::DriveV3::File

The metadata for a file. Corresponds to the JSON property file



242
243
244
# File 'generated/google/apis/drive_v3/classes.rb', line 242

def file
  @file
end

#file_idString

The ID of the file which has changed. Corresponds to the JSON property fileId

Returns:

  • (String)


247
248
249
# File 'generated/google/apis/drive_v3/classes.rb', line 247

def file_id
  @file_id
end

#kindString

Identifies what kind of resource this is. Value: the fixed string "drive# change". Corresponds to the JSON property kind

Returns:

  • (String)


253
254
255
# File 'generated/google/apis/drive_v3/classes.rb', line 253

def kind
  @kind
end

#removedBoolean Also known as: removed?

Whether the file or shared drive has been removed from this list of changes, for example by deletion or loss of access. Corresponds to the JSON property removed

Returns:

  • (Boolean)


259
260
261
# File 'generated/google/apis/drive_v3/classes.rb', line 259

def removed
  @removed
end

#team_driveGoogle::Apis::DriveV3::TeamDrive

Deprecated: use the drive collection instead. Corresponds to the JSON property teamDrive



265
266
267
# File 'generated/google/apis/drive_v3/classes.rb', line 265

def team_drive
  @team_drive
end

#team_drive_idString

Deprecated - use driveId instead. Corresponds to the JSON property teamDriveId

Returns:

  • (String)


270
271
272
# File 'generated/google/apis/drive_v3/classes.rb', line 270

def team_drive_id
  @team_drive_id
end

#timeDateTime

The time of this change (RFC 3339 date-time). Corresponds to the JSON property time

Returns:

  • (DateTime)


275
276
277
# File 'generated/google/apis/drive_v3/classes.rb', line 275

def time
  @time
end

#typeString

Deprecated - use changeType instead. Corresponds to the JSON property type

Returns:

  • (String)


280
281
282
# File 'generated/google/apis/drive_v3/classes.rb', line 280

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'generated/google/apis/drive_v3/classes.rb', line 287

def update!(**args)
  @change_type = args[:change_type] if args.key?(:change_type)
  @drive = args[:drive] if args.key?(:drive)
  @drive_id = args[:drive_id] if args.key?(:drive_id)
  @file = args[:file] if args.key?(:file)
  @file_id = args[:file_id] if args.key?(:file_id)
  @kind = args[:kind] if args.key?(:kind)
  @removed = args[:removed] if args.key?(:removed)
  @team_drive = args[:team_drive] if args.key?(:team_drive)
  @team_drive_id = args[:team_drive_id] if args.key?(:team_drive_id)
  @time = args[:time] if args.key?(:time)
  @type = args[:type] if args.key?(:type)
end