Class: Google::Apis::DriveV3::Change
- Inherits:
-
Object
- Object
- Google::Apis::DriveV3::Change
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/drive_v3/classes.rb,
lib/google/apis/drive_v3/representations.rb,
lib/google/apis/drive_v3/representations.rb
Overview
A change to a file or shared drive.
Instance Attribute Summary collapse
-
#change_type ⇒ String
The type of the change.
-
#drive ⇒ Google::Apis::DriveV3::Drive
Representation of a shared drive.
-
#drive_id ⇒ String
The ID of the shared drive associated with this change.
-
#file ⇒ Google::Apis::DriveV3::File
The metadata for a file.
-
#file_id ⇒ String
The ID of the file which has changed.
-
#kind ⇒ String
Identifies what kind of resource this is.
-
#removed ⇒ Boolean
(also: #removed?)
Whether the file or shared drive has been removed from this list of changes, for example by deletion or loss of access.
-
#team_drive ⇒ Google::Apis::DriveV3::TeamDrive
Deprecated: use the drive collection instead.
-
#team_drive_id ⇒ String
Deprecated: Use
driveId
instead. -
#time ⇒ DateTime
The time of this change (RFC 3339 date-time).
-
#type ⇒ String
Deprecated: Use
changeType
instead.
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.
285 286 287 |
# File 'lib/google/apis/drive_v3/classes.rb', line 285 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
227 228 229 |
# File 'lib/google/apis/drive_v3/classes.rb', line 227 def change_type @change_type end |
#drive ⇒ Google::Apis::DriveV3::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
234 235 236 |
# File 'lib/google/apis/drive_v3/classes.rb', line 234 def drive @drive end |
#drive_id ⇒ String
The ID of the shared drive associated with this change.
Corresponds to the JSON property driveId
239 240 241 |
# File 'lib/google/apis/drive_v3/classes.rb', line 239 def drive_id @drive_id end |
#file ⇒ Google::Apis::DriveV3::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
245 246 247 |
# File 'lib/google/apis/drive_v3/classes.rb', line 245 def file @file end |
#file_id ⇒ String
The ID of the file which has changed.
Corresponds to the JSON property fileId
250 251 252 |
# File 'lib/google/apis/drive_v3/classes.rb', line 250 def file_id @file_id end |
#kind ⇒ String
Identifies what kind of resource this is. Value: the fixed string "drive#
change"
.
Corresponds to the JSON property kind
256 257 258 |
# File 'lib/google/apis/drive_v3/classes.rb', line 256 def kind @kind end |
#removed ⇒ Boolean 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
262 263 264 |
# File 'lib/google/apis/drive_v3/classes.rb', line 262 def removed @removed end |
#team_drive ⇒ Google::Apis::DriveV3::TeamDrive
Deprecated: use the drive collection instead.
Corresponds to the JSON property teamDrive
268 269 270 |
# File 'lib/google/apis/drive_v3/classes.rb', line 268 def team_drive @team_drive end |
#team_drive_id ⇒ String
Deprecated: Use driveId
instead.
Corresponds to the JSON property teamDriveId
273 274 275 |
# File 'lib/google/apis/drive_v3/classes.rb', line 273 def team_drive_id @team_drive_id end |
#time ⇒ DateTime
The time of this change (RFC 3339 date-time).
Corresponds to the JSON property time
278 279 280 |
# File 'lib/google/apis/drive_v3/classes.rb', line 278 def time @time end |
#type ⇒ String
Deprecated: Use changeType
instead.
Corresponds to the JSON property type
283 284 285 |
# File 'lib/google/apis/drive_v3/classes.rb', line 283 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/google/apis/drive_v3/classes.rb', line 290 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 |