Class: Google::Apis::DriveactivityV2::DriveItemReference

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 lightweight reference to a Drive item, such as a file or folder.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DriveItemReference

Returns a new instance of DriveItemReference.



687
688
689
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 687

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



660
661
662
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 660

def drive_file
  @drive_file
end

#drive_folderGoogle::Apis::DriveactivityV2::DriveFolder

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



665
666
667
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 665

def drive_folder
  @drive_folder
end

#fileGoogle::Apis::DriveactivityV2::File

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



670
671
672
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 670

def file
  @file
end

#folderGoogle::Apis::DriveactivityV2::Folder

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



675
676
677
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 675

def folder
  @folder
end

#nameString

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

Returns:

  • (String)


680
681
682
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 680

def name
  @name
end

#titleString

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

Returns:

  • (String)


685
686
687
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 685

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



692
693
694
695
696
697
698
699
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 692

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