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

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

Overview

Representation of 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.



779
780
781
# File 'lib/google/apis/drive_v2/classes.rb', line 779

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)


712
713
714
# File 'lib/google/apis/drive_v2/classes.rb', line 712

def change_type
  @change_type
end

#deletedBoolean Also known as: deleted?

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 deleted

Returns:

  • (Boolean)


718
719
720
# File 'lib/google/apis/drive_v2/classes.rb', line 718

def deleted
  @deleted
end

#driveGoogle::Apis::DriveV2::Drive

Representation of a shared drive. Some resource methods (such as drives. update) require a driveId. Use the drives.list method to retrieve the ID for a shared drive. Corresponds to the JSON property drive



726
727
728
# File 'lib/google/apis/drive_v2/classes.rb', line 726

def drive
  @drive
end

#drive_idString

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

Returns:

  • (String)


731
732
733
# File 'lib/google/apis/drive_v2/classes.rb', line 731

def drive_id
  @drive_id
end

#fileGoogle::Apis::DriveV2::File

The metadata for a file. Some resource methods (such as files.update) require a fileId. Use the files.list method to retrieve the ID for a file. Corresponds to the JSON property file



737
738
739
# File 'lib/google/apis/drive_v2/classes.rb', line 737

def file
  @file
end

#file_idString

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

Returns:

  • (String)


742
743
744
# File 'lib/google/apis/drive_v2/classes.rb', line 742

def file_id
  @file_id
end

#idFixnum

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

Returns:

  • (Fixnum)


747
748
749
# File 'lib/google/apis/drive_v2/classes.rb', line 747

def id
  @id
end

#kindString

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

Returns:

  • (String)


752
753
754
# File 'lib/google/apis/drive_v2/classes.rb', line 752

def kind
  @kind
end

#modification_dateDateTime

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

Returns:

  • (DateTime)


757
758
759
# File 'lib/google/apis/drive_v2/classes.rb', line 757

def modification_date
  @modification_date
end

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

Returns:

  • (String)


762
763
764
# File 'lib/google/apis/drive_v2/classes.rb', line 762

def self_link
  @self_link
end

#team_driveGoogle::Apis::DriveV2::TeamDrive

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



767
768
769
# File 'lib/google/apis/drive_v2/classes.rb', line 767

def team_drive
  @team_drive
end

#team_drive_idString

Deprecated: Use driveId instead. Corresponds to the JSON property teamDriveId

Returns:

  • (String)


772
773
774
# File 'lib/google/apis/drive_v2/classes.rb', line 772

def team_drive_id
  @team_drive_id
end

#typeString

Deprecated: Use changeType instead. Corresponds to the JSON property type

Returns:

  • (String)


777
778
779
# File 'lib/google/apis/drive_v2/classes.rb', line 777

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
# File 'lib/google/apis/drive_v2/classes.rb', line 784

def update!(**args)
  @change_type = args[:change_type] if args.key?(:change_type)
  @deleted = args[:deleted] if args.key?(:deleted)
  @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)
  @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