Class: Google::Apis::DriveactivityV2::DriveItem

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

Overview

A Drive item, such as a file or folder.

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) ⇒ DriveItem

Returns a new instance of DriveItem



557
558
559
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 557

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

Instance Attribute Details

#fileGoogle::Apis::DriveactivityV2::File

A Drive item which is a file. Corresponds to the JSON property file



529
530
531
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 529

def file
  @file
end

#folderGoogle::Apis::DriveactivityV2::Folder

A Drive item which is a folder. Corresponds to the JSON property folder



534
535
536
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 534

def folder
  @folder
end

#mime_typeString

The MIME type of the Drive item. See https://developers.google.com/drive/v3/web/mime-types. Corresponds to the JSON property mimeType

Returns:

  • (String)


540
541
542
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 540

def mime_type
  @mime_type
end

#nameString

The target Drive item. The format is "items/ITEM_ID". Corresponds to the JSON property name

Returns:

  • (String)


545
546
547
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 545

def name
  @name
end

#ownerGoogle::Apis::DriveactivityV2::Owner

Information about the owner of a Drive item. Corresponds to the JSON property owner



550
551
552
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 550

def owner
  @owner
end

#titleString

The title of the Drive item. Corresponds to the JSON property title

Returns:

  • (String)


555
556
557
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 555

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



562
563
564
565
566
567
568
569
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 562

def update!(**args)
  @file = args[:file] if args.key?(:file)
  @folder = args[:folder] if args.key?(:folder)
  @mime_type = args[:mime_type] if args.key?(:mime_type)
  @name = args[:name] if args.key?(:name)
  @owner = args[:owner] if args.key?(:owner)
  @title = args[:title] if args.key?(:title)
end