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

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

Overview

A reference to a file's parent.

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) ⇒ ParentReference

Returns a new instance of ParentReference.



2918
2919
2920
# File 'generated/google/apis/drive_v2/classes.rb', line 2918

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

Instance Attribute Details

#idString

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

Returns:

  • (String)


2895
2896
2897
# File 'generated/google/apis/drive_v2/classes.rb', line 2895

def id
  @id
end

#is_rootBoolean Also known as: is_root?

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

Returns:

  • (Boolean)


2900
2901
2902
# File 'generated/google/apis/drive_v2/classes.rb', line 2900

def is_root
  @is_root
end

#kindString

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

Returns:

  • (String)


2906
2907
2908
# File 'generated/google/apis/drive_v2/classes.rb', line 2906

def kind
  @kind
end

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

Returns:

  • (String)


2911
2912
2913
# File 'generated/google/apis/drive_v2/classes.rb', line 2911

def parent_link
  @parent_link
end

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

Returns:

  • (String)


2916
2917
2918
# File 'generated/google/apis/drive_v2/classes.rb', line 2916

def self_link
  @self_link
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2923
2924
2925
2926
2927
2928
2929
# File 'generated/google/apis/drive_v2/classes.rb', line 2923

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