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.



638
639
640
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 638

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

Instance Attribute Details

#drive_fileGoogle::Apis::DriveactivityV2::DriveFile

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



600
601
602
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 600

def drive_file
  @drive_file
end

#drive_folderGoogle::Apis::DriveactivityV2::DriveFolder

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



605
606
607
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 605

def drive_folder
  @drive_folder
end

#fileGoogle::Apis::DriveactivityV2::File

This item is deprecated; please see DriveFile instead. Corresponds to the JSON property file



610
611
612
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 610

def file
  @file
end

#folderGoogle::Apis::DriveactivityV2::Folder

This item is deprecated; please see DriveFolder instead. Corresponds to the JSON property folder



615
616
617
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 615

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)


621
622
623
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 621

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)


626
627
628
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 626

def name
  @name
end

#ownerGoogle::Apis::DriveactivityV2::Owner

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



631
632
633
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 631

def owner
  @owner
end

#titleString

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

Returns:

  • (String)


636
637
638
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 636

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



643
644
645
646
647
648
649
650
651
652
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 643

def update!(**args)
  @drive_file = args[:drive_file] if args.key?(:drive_file)
  @drive_folder = args[:drive_folder] if args.key?(:drive_folder)
  @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