Class: Google::Apis::DriveV2::Change

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

Overview

Representation of a change to a file or Team Drive.

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

Returns a new instance of Change



713
714
715
# File 'generated/google/apis/drive_v2/classes.rb', line 713

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

Instance Attribute Details

#deletedBoolean Also known as: deleted?

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

Returns:

  • (Boolean)


665
666
667
# File 'generated/google/apis/drive_v2/classes.rb', line 665

def deleted
  @deleted
end

#fileGoogle::Apis::DriveV2::File

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



671
672
673
# File 'generated/google/apis/drive_v2/classes.rb', line 671

def file
  @file
end

#file_idString

The ID of the file associated with this change. Corresponds to the JSON property fileId

Returns:

  • (String)


676
677
678
# File 'generated/google/apis/drive_v2/classes.rb', line 676

def file_id
  @file_id
end

#idFixnum

The ID of the change. Corresponds to the JSON property id

Returns:

  • (Fixnum)


681
682
683
# File 'generated/google/apis/drive_v2/classes.rb', line 681

def id
  @id
end

#kindString

This is always drive#change. Corresponds to the JSON property kind

Returns:

  • (String)


686
687
688
# File 'generated/google/apis/drive_v2/classes.rb', line 686

def kind
  @kind
end

#modification_dateDateTime

The time of this modification. Corresponds to the JSON property modificationDate

Returns:

  • (DateTime)


691
692
693
# File 'generated/google/apis/drive_v2/classes.rb', line 691

def modification_date
  @modification_date
end

A link back to this change. Corresponds to the JSON property selfLink

Returns:

  • (String)


696
697
698
# File 'generated/google/apis/drive_v2/classes.rb', line 696

def self_link
  @self_link
end

#team_driveGoogle::Apis::DriveV2::TeamDrive

Representation of a Team Drive. Corresponds to the JSON property teamDrive



701
702
703
# File 'generated/google/apis/drive_v2/classes.rb', line 701

def team_drive
  @team_drive
end

#team_drive_idString

The ID of the Team Drive associated with this change. Corresponds to the JSON property teamDriveId

Returns:

  • (String)


706
707
708
# File 'generated/google/apis/drive_v2/classes.rb', line 706

def team_drive_id
  @team_drive_id
end

#typeString

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

Returns:

  • (String)


711
712
713
# File 'generated/google/apis/drive_v2/classes.rb', line 711

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



718
719
720
721
722
723
724
725
726
727
728
729
# File 'generated/google/apis/drive_v2/classes.rb', line 718

def update!(**args)
  @deleted = args[:deleted] if args.key?(:deleted)
  @file = args[:file] if args.key?(:file)
  @file_id = args[:file_id] if args.key?(:file_id)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @modification_date = args[:modification_date] if args.key?(:modification_date)
  @self_link = args[:self_link] if args.key?(:self_link)
  @team_drive = args[:team_drive] if args.key?(:team_drive)
  @team_drive_id = args[:team_drive_id] if args.key?(:team_drive_id)
  @type = args[:type] if args.key?(:type)
end