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



596
597
598
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 596

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

Instance Attribute Details

#fileGoogle::Apis::DriveactivityV2::File

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



579
580
581
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 579

def file
  @file
end

#folderGoogle::Apis::DriveactivityV2::Folder

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



584
585
586
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 584

def folder
  @folder
end

#nameString

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

Returns:

  • (String)


589
590
591
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 589

def name
  @name
end

#titleString

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

Returns:

  • (String)


594
595
596
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 594

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

def update!(**args)
  @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