Class: Google::Apis::YoutubeV3::PromotedItemId

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

Describes a single promoted item id. It is a union of various possible types.

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

Returns a new instance of PromotedItemId



5999
6000
6001
# File 'generated/google/apis/youtube_v3/classes.rb', line 5999

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

Instance Attribute Details

#recently_uploaded_byString

If type is recentUpload, this field identifies the channel from which to take the recent upload. If missing, the channel is assumed to be the same channel for which the invideoPromotion is set. Corresponds to the JSON property recentlyUploadedBy

Returns:

  • (String)


5978
5979
5980
# File 'generated/google/apis/youtube_v3/classes.rb', line 5978

def recently_uploaded_by
  @recently_uploaded_by
end

#typeString

Describes the type of the promoted item. Corresponds to the JSON property type

Returns:

  • (String)


5983
5984
5985
# File 'generated/google/apis/youtube_v3/classes.rb', line 5983

def type
  @type
end

#video_idString

If the promoted item represents a video, this field represents the unique YouTube ID identifying it. This field will be present only if type has the value video. Corresponds to the JSON property videoId

Returns:

  • (String)


5990
5991
5992
# File 'generated/google/apis/youtube_v3/classes.rb', line 5990

def video_id
  @video_id
end

#website_urlString

If the promoted item represents a website, this field represents the url pointing to the website. This field will be present only if type has the value website. Corresponds to the JSON property websiteUrl

Returns:

  • (String)


5997
5998
5999
# File 'generated/google/apis/youtube_v3/classes.rb', line 5997

def website_url
  @website_url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6004
6005
6006
6007
6008
6009
# File 'generated/google/apis/youtube_v3/classes.rb', line 6004

def update!(**args)
  @recently_uploaded_by = args[:recently_uploaded_by] if args.key?(:recently_uploaded_by)
  @type = args[:type] if args.key?(:type)
  @video_id = args[:video_id] if args.key?(:video_id)
  @website_url = args[:website_url] if args.key?(:website_url)
end