class Google::Apis::YoutubeV3::PromotedItemId

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

Attributes

recently_uploaded_by[RW]

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` @return [String]

type[RW]

Describes the type of the promoted item. Corresponds to the JSON property `type` @return [String]

video_id[RW]

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` @return [String]

website_url[RW]

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` @return [String]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/youtube_v3/classes.rb, line 5824
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/youtube_v3/classes.rb, line 5829
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