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.

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.


164
165
166
# File 'generated/google/apis/drive_v3/classes.rb', line 164

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

Instance Attribute Details

#fileGoogle::Apis::DriveV3::File

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


139
140
141
# File 'generated/google/apis/drive_v3/classes.rb', line 139

def file
  @file
end

#file_idString

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

Returns:

  • (String)

144
145
146
# File 'generated/google/apis/drive_v3/classes.rb', line 144

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)

150
151
152
# File 'generated/google/apis/drive_v3/classes.rb', line 150

def kind
  @kind
end

#removedBoolean Also known as: removed?

Whether the file has been removed from the view of the changes list, for example by deletion or lost access. Corresponds to the JSON property removed

Returns:

  • (Boolean)

156
157
158
# File 'generated/google/apis/drive_v3/classes.rb', line 156

def removed
  @removed
end

#timeDateTime

The time of this change (RFC 3339 date-time). Corresponds to the JSON property time

Returns:

  • (DateTime)

162
163
164
# File 'generated/google/apis/drive_v3/classes.rb', line 162

def time
  @time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


169
170
171
172
173
174
175
# File 'generated/google/apis/drive_v3/classes.rb', line 169

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)
  @time = args[:time] if args.key?(:time)
end