Class: Google::Apis::YoutubeV3::ResourceId

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

Overview

A resource id is a generic reference that points to another YouTube resource.

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

Returns a new instance of ResourceId



6131
6132
6133
# File 'generated/google/apis/youtube_v3/classes.rb', line 6131

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

Instance Attribute Details

#channel_idString

The ID that YouTube uses to uniquely identify the referred resource, if that resource is a channel. This property is only present if the resourceId.kind value is youtube#channel. Corresponds to the JSON property channelId

Returns:

  • (String)


6110
6111
6112
# File 'generated/google/apis/youtube_v3/classes.rb', line 6110

def channel_id
  @channel_id
end

#kindString

The type of the API resource. Corresponds to the JSON property kind

Returns:

  • (String)


6115
6116
6117
# File 'generated/google/apis/youtube_v3/classes.rb', line 6115

def kind
  @kind
end

#playlist_idString

The ID that YouTube uses to uniquely identify the referred resource, if that resource is a playlist. This property is only present if the resourceId.kind value is youtube#playlist. Corresponds to the JSON property playlistId

Returns:

  • (String)


6122
6123
6124
# File 'generated/google/apis/youtube_v3/classes.rb', line 6122

def playlist_id
  @playlist_id
end

#video_idString

The ID that YouTube uses to uniquely identify the referred resource, if that resource is a video. This property is only present if the resourceId.kind value is youtube#video. Corresponds to the JSON property videoId

Returns:

  • (String)


6129
6130
6131
# File 'generated/google/apis/youtube_v3/classes.rb', line 6129

def video_id
  @video_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6136
6137
6138
6139
6140
6141
# File 'generated/google/apis/youtube_v3/classes.rb', line 6136

def update!(**args)
  @channel_id = args[:channel_id] if args.key?(:channel_id)
  @kind = args[:kind] if args.key?(:kind)
  @playlist_id = args[:playlist_id] if args.key?(:playlist_id)
  @video_id = args[:video_id] if args.key?(:video_id)
end