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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ParentReference

Returns a new instance of ParentReference.



3114
3115
3116
# File 'lib/google/apis/drive_v2/classes.rb', line 3114

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

Instance Attribute Details

#idString

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

Returns:

  • (String)


3091
3092
3093
# File 'lib/google/apis/drive_v2/classes.rb', line 3091

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)


3096
3097
3098
# File 'lib/google/apis/drive_v2/classes.rb', line 3096

def is_root
  @is_root
end

#kindString

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

Returns:

  • (String)


3102
3103
3104
# File 'lib/google/apis/drive_v2/classes.rb', line 3102

def kind
  @kind
end

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

Returns:

  • (String)


3107
3108
3109
# File 'lib/google/apis/drive_v2/classes.rb', line 3107

def parent_link
  @parent_link
end

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

Returns:

  • (String)


3112
3113
3114
# File 'lib/google/apis/drive_v2/classes.rb', line 3112

def self_link
  @self_link
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3119
3120
3121
3122
3123
3124
3125
# File 'lib/google/apis/drive_v2/classes.rb', line 3119

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