Class: Google::Apis::DriveV2::Change
- Inherits:
-
Object
- Object
- Google::Apis::DriveV2::Change
- 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
-
#change_type ⇒ String
The type of the change.
-
#deleted ⇒ Boolean
(also: #deleted?)
Whether the file or shared drive has been removed from this list of changes, for example by deletion or loss of access.
-
#drive ⇒ Google::Apis::DriveV2::Drive
Representation of a shared drive.
-
#drive_id ⇒ String
The ID of the shared drive associated with this change.
-
#file ⇒ Google::Apis::DriveV2::File
The metadata for a file.
-
#file_id ⇒ String
The ID of the file associated with this change.
-
#id ⇒ Fixnum
The ID of the change.
-
#kind ⇒ String
This is always
drive#change. -
#modification_date ⇒ DateTime
The time of this modification.
-
#self_link ⇒ String
A link back to this change.
-
#team_drive ⇒ Google::Apis::DriveV2::TeamDrive
Deprecated: Use the
drivecollection instead. -
#team_drive_id ⇒ String
Deprecated: Use
driveIdinstead. -
#type ⇒ String
Deprecated: Use
changeTypeinstead.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Change
constructor
A new instance of Change.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Change
Returns a new instance of Change.
775 776 777 |
# File 'lib/google/apis/drive_v2/classes.rb', line 775 def initialize(**args) update!(**args) end |
Instance Attribute Details
#change_type ⇒ String
The type of the change. Possible values are file and drive.
Corresponds to the JSON property changeType
711 712 713 |
# File 'lib/google/apis/drive_v2/classes.rb', line 711 def change_type @change_type end |
#deleted ⇒ Boolean 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
717 718 719 |
# File 'lib/google/apis/drive_v2/classes.rb', line 717 def deleted @deleted end |
#drive ⇒ Google::Apis::DriveV2::Drive
Representation of a shared drive.
Corresponds to the JSON property drive
723 724 725 |
# File 'lib/google/apis/drive_v2/classes.rb', line 723 def drive @drive end |
#drive_id ⇒ String
The ID of the shared drive associated with this change.
Corresponds to the JSON property driveId
728 729 730 |
# File 'lib/google/apis/drive_v2/classes.rb', line 728 def drive_id @drive_id end |
#file ⇒ Google::Apis::DriveV2::File
The metadata for a file.
Corresponds to the JSON property file
733 734 735 |
# File 'lib/google/apis/drive_v2/classes.rb', line 733 def file @file end |
#file_id ⇒ String
The ID of the file associated with this change.
Corresponds to the JSON property fileId
738 739 740 |
# File 'lib/google/apis/drive_v2/classes.rb', line 738 def file_id @file_id end |
#id ⇒ Fixnum
The ID of the change.
Corresponds to the JSON property id
743 744 745 |
# File 'lib/google/apis/drive_v2/classes.rb', line 743 def id @id end |
#kind ⇒ String
This is always drive#change.
Corresponds to the JSON property kind
748 749 750 |
# File 'lib/google/apis/drive_v2/classes.rb', line 748 def kind @kind end |
#modification_date ⇒ DateTime
The time of this modification.
Corresponds to the JSON property modificationDate
753 754 755 |
# File 'lib/google/apis/drive_v2/classes.rb', line 753 def modification_date @modification_date end |
#self_link ⇒ String
A link back to this change.
Corresponds to the JSON property selfLink
758 759 760 |
# File 'lib/google/apis/drive_v2/classes.rb', line 758 def self_link @self_link end |
#team_drive ⇒ Google::Apis::DriveV2::TeamDrive
Deprecated: Use the drive collection instead.
Corresponds to the JSON property teamDrive
763 764 765 |
# File 'lib/google/apis/drive_v2/classes.rb', line 763 def team_drive @team_drive end |
#team_drive_id ⇒ String
Deprecated: Use driveId instead.
Corresponds to the JSON property teamDriveId
768 769 770 |
# File 'lib/google/apis/drive_v2/classes.rb', line 768 def team_drive_id @team_drive_id end |
#type ⇒ String
Deprecated: Use changeType instead.
Corresponds to the JSON property type
773 774 775 |
# File 'lib/google/apis/drive_v2/classes.rb', line 773 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 |
# File 'lib/google/apis/drive_v2/classes.rb', line 780 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 |