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 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



216
217
218
# File 'generated/google/apis/drive_v3/classes.rb', line 216

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

Instance Attribute Details

#fileGoogle::Apis::DriveV3::File

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



176
177
178
# File 'generated/google/apis/drive_v3/classes.rb', line 176

def file
  @file
end

#file_idString

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

Returns:

  • (String)


181
182
183
# File 'generated/google/apis/drive_v3/classes.rb', line 181

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)


187
188
189
# File 'generated/google/apis/drive_v3/classes.rb', line 187

def kind
  @kind
end

#removedBoolean Also known as: removed?

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 removed

Returns:

  • (Boolean)


193
194
195
# File 'generated/google/apis/drive_v3/classes.rb', line 193

def removed
  @removed
end

#team_driveGoogle::Apis::DriveV3::TeamDrive

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



199
200
201
# File 'generated/google/apis/drive_v3/classes.rb', line 199

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)


204
205
206
# File 'generated/google/apis/drive_v3/classes.rb', line 204

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)


209
210
211
# File 'generated/google/apis/drive_v3/classes.rb', line 209

def time
  @time
end

#typeString

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

Returns:

  • (String)


214
215
216
# File 'generated/google/apis/drive_v3/classes.rb', line 214

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



221
222
223
224
225
226
227
228
229
230
# File 'generated/google/apis/drive_v3/classes.rb', line 221

def update!(**args)
  @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