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

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ DriveItemReference

Returns a new instance of DriveItemReference.



689
690
691
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 689

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



662
663
664
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 662

def drive_file
  @drive_file
end

#drive_folderGoogle::Apis::DriveactivityV2::DriveFolder

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



667
668
669
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 667

def drive_folder
  @drive_folder
end

#fileGoogle::Apis::DriveactivityV2::File

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



672
673
674
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 672

def file
  @file
end

#folderGoogle::Apis::DriveactivityV2::Folder

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



677
678
679
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 677

def folder
  @folder
end

#nameString

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

Returns:

  • (String)


682
683
684
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 682

def name
  @name
end

#titleString

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

Returns:

  • (String)


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

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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