Class: Google::Apis::YoutubeV3::PromotedItem

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.

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

Returns a new instance of PromotedItem.


6262
6263
6264
# File 'generated/google/apis/youtube_v3/classes.rb', line 6262

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

Instance Attribute Details

#custom_messageString

A custom message to display for this promotion. This field is currently ignored unless the promoted item is a website. Corresponds to the JSON property customMessage

Returns:

  • (String)

6242
6243
6244
# File 'generated/google/apis/youtube_v3/classes.rb', line 6242

def custom_message
  @custom_message
end

#idGoogle::Apis::YoutubeV3::PromotedItemId

Describes a single promoted item id. It is a union of various possible types. Corresponds to the JSON property id


6247
6248
6249
# File 'generated/google/apis/youtube_v3/classes.rb', line 6247

def id
  @id
end

If true, the content owner's name will be used when displaying the promotion. This field can only be set when the update is made on behalf of the content owner. Corresponds to the JSON property promotedByContentOwner

Returns:

  • (Boolean)

6254
6255
6256
# File 'generated/google/apis/youtube_v3/classes.rb', line 6254

def promoted_by_content_owner
  @promoted_by_content_owner
end

#timingGoogle::Apis::YoutubeV3::InvideoTiming

Describes a temporal position of a visual widget inside a video. Corresponds to the JSON property timing


6260
6261
6262
# File 'generated/google/apis/youtube_v3/classes.rb', line 6260

def timing
  @timing
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


6267
6268
6269
6270
6271
6272
# File 'generated/google/apis/youtube_v3/classes.rb', line 6267

def update!(**args)
  @custom_message = args[:custom_message] if args.key?(:custom_message)
  @id = args[:id] if args.key?(:id)
  @promoted_by_content_owner = args[:promoted_by_content_owner] if args.key?(:promoted_by_content_owner)
  @timing = args[:timing] if args.key?(:timing)
end