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

Constructor Details

#initialize(**args) ⇒ DriveItem

Returns a new instance of DriveItem.



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

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



598
599
600
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 598

def drive_file
  @drive_file
end

#drive_folderGoogle::Apis::DriveactivityV2::DriveFolder

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



603
604
605
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 603

def drive_folder
  @drive_folder
end

#fileGoogle::Apis::DriveactivityV2::File

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



608
609
610
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 608

def file
  @file
end

#folderGoogle::Apis::DriveactivityV2::Folder

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



613
614
615
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 613

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)


619
620
621
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 619

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)


624
625
626
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 624

def name
  @name
end

#ownerGoogle::Apis::DriveactivityV2::Owner

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



629
630
631
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 629

def owner
  @owner
end

#titleString

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

Returns:

  • (String)


634
635
636
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 634

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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