Class: Google::Apis::DriveV2::ParentReference

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

Overview

A reference to a file's parent. Some resource methods (such as parents.get) require a parentId. Use the parents.list method to retrieve the ID for a parent.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ParentReference

Returns a new instance of ParentReference.



3564
3565
3566
# File 'lib/google/apis/drive_v2/classes.rb', line 3564

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

Instance Attribute Details

#idString

The ID of the parent. Corresponds to the JSON property id

Returns:

  • (String)


3541
3542
3543
# File 'lib/google/apis/drive_v2/classes.rb', line 3541

def id
  @id
end

#is_rootBoolean Also known as: is_root?

Output only. Whether or not the parent is the root folder. Corresponds to the JSON property isRoot

Returns:

  • (Boolean)


3546
3547
3548
# File 'lib/google/apis/drive_v2/classes.rb', line 3546

def is_root
  @is_root
end

#kindString

Output only. This is always drive#parentReference. Corresponds to the JSON property kind

Returns:

  • (String)


3552
3553
3554
# File 'lib/google/apis/drive_v2/classes.rb', line 3552

def kind
  @kind
end

Output only. A link to the parent. Corresponds to the JSON property parentLink

Returns:

  • (String)


3557
3558
3559
# File 'lib/google/apis/drive_v2/classes.rb', line 3557

def parent_link
  @parent_link
end

Output only. A link back to this reference. Corresponds to the JSON property selfLink

Returns:

  • (String)


3562
3563
3564
# File 'lib/google/apis/drive_v2/classes.rb', line 3562

def self_link
  @self_link
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3569
3570
3571
3572
3573
3574
3575
# File 'lib/google/apis/drive_v2/classes.rb', line 3569

def update!(**args)
  @id = args[:id] if args.key?(:id)
  @is_root = args[:is_root] if args.key?(:is_root)
  @kind = args[:kind] if args.key?(:kind)
  @parent_link = args[:parent_link] if args.key?(:parent_link)
  @self_link = args[:self_link] if args.key?(:self_link)
end