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

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

Overview

A Drive item, such as a file or folder.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DriveItem

Returns a new instance of DriveItem.



721
722
723
# File 'lib/google/apis/driveactivity_v2/classes.rb', line 721

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



683
684
685
# File 'lib/google/apis/driveactivity_v2/classes.rb', line 683

def drive_file
  @drive_file
end

#drive_folderGoogle::Apis::DriveactivityV2::DriveFolder

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



688
689
690
# File 'lib/google/apis/driveactivity_v2/classes.rb', line 688

def drive_folder
  @drive_folder
end

#fileGoogle::Apis::DriveactivityV2::File

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



693
694
695
# File 'lib/google/apis/driveactivity_v2/classes.rb', line 693

def file
  @file
end

#folderGoogle::Apis::DriveactivityV2::Folder

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



698
699
700
# File 'lib/google/apis/driveactivity_v2/classes.rb', line 698

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)


704
705
706
# File 'lib/google/apis/driveactivity_v2/classes.rb', line 704

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)


709
710
711
# File 'lib/google/apis/driveactivity_v2/classes.rb', line 709

def name
  @name
end

#ownerGoogle::Apis::DriveactivityV2::Owner

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



714
715
716
# File 'lib/google/apis/driveactivity_v2/classes.rb', line 714

def owner
  @owner
end

#titleString

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

Returns:

  • (String)


719
720
721
# File 'lib/google/apis/driveactivity_v2/classes.rb', line 719

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



726
727
728
729
730
731
732
733
734
735
# File 'lib/google/apis/driveactivity_v2/classes.rb', line 726

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