Class: Google::Apis::DriveV2::ParentReference
- Inherits:
-
Object
- Object
- Google::Apis::DriveV2::ParentReference
- 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
-
#id ⇒ String
The ID of the parent.
-
#is_root ⇒ Boolean
(also: #is_root?)
Output only.
-
#kind ⇒ String
Output only.
-
#parent_link ⇒ String
Output only.
-
#self_link ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ParentReference
constructor
A new instance of ParentReference.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ParentReference
Returns a new instance of ParentReference.
3567 3568 3569 |
# File 'lib/google/apis/drive_v2/classes.rb', line 3567 def initialize(**args) update!(**args) end |
Instance Attribute Details
#id ⇒ String
The ID of the parent.
Corresponds to the JSON property id
3544 3545 3546 |
# File 'lib/google/apis/drive_v2/classes.rb', line 3544 def id @id end |
#is_root ⇒ Boolean Also known as: is_root?
Output only. Whether or not the parent is the root folder.
Corresponds to the JSON property isRoot
3549 3550 3551 |
# File 'lib/google/apis/drive_v2/classes.rb', line 3549 def is_root @is_root end |
#kind ⇒ String
Output only. This is always drive#parentReference
.
Corresponds to the JSON property kind
3555 3556 3557 |
# File 'lib/google/apis/drive_v2/classes.rb', line 3555 def kind @kind end |
#parent_link ⇒ String
Output only. A link to the parent.
Corresponds to the JSON property parentLink
3560 3561 3562 |
# File 'lib/google/apis/drive_v2/classes.rb', line 3560 def parent_link @parent_link end |
#self_link ⇒ String
Output only. A link back to this reference.
Corresponds to the JSON property selfLink
3565 3566 3567 |
# File 'lib/google/apis/drive_v2/classes.rb', line 3565 def self_link @self_link end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3572 3573 3574 3575 3576 3577 3578 |
# File 'lib/google/apis/drive_v2/classes.rb', line 3572 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 |