Class: Google::Apis::Adexchangebuyer2V2beta1::CreativeSize

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

Overview

Specifies the size of the creative.

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

Returns a new instance of CreativeSize.



977
978
979
# File 'generated/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 977

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

Instance Attribute Details

#allowed_formatsArray<String>

What formats are allowed by the publisher. If this repeated field is empty then all formats are allowed. For example, if this field contains AllowedFormatType.AUDIO then the publisher only allows an audio ad (without any video). Corresponds to the JSON property allowedFormats

Returns:

  • (Array<String>)


946
947
948
# File 'generated/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 946

def allowed_formats
  @allowed_formats
end

#companion_sizesArray<Google::Apis::Adexchangebuyer2V2beta1::Size>

For video creatives specifies the sizes of companion ads (if present). Companion sizes may be filled in only when creative_size_type = VIDEO Corresponds to the JSON property companionSizes



952
953
954
# File 'generated/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 952

def companion_sizes
  @companion_sizes
end

#creative_size_typeString

The creative size type. Corresponds to the JSON property creativeSizeType

Returns:

  • (String)


957
958
959
# File 'generated/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 957

def creative_size_type
  @creative_size_type
end

#native_templateString

Output only. The native template for this creative. It will have a value only if creative_size_type = CreativeSizeType.NATIVE. Corresponds to the JSON property nativeTemplate

Returns:

  • (String)


963
964
965
# File 'generated/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 963

def native_template
  @native_template
end

#sizeGoogle::Apis::Adexchangebuyer2V2beta1::Size

Message depicting the size of the creative. The units of width and height depend on the type of the targeting. Corresponds to the JSON property size



969
970
971
# File 'generated/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 969

def size
  @size
end

#skippable_ad_typeString

The type of skippable ad for this creative. It will have a value only if creative_size_type = CreativeSizeType.VIDEO. Corresponds to the JSON property skippableAdType

Returns:

  • (String)


975
976
977
# File 'generated/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 975

def skippable_ad_type
  @skippable_ad_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



982
983
984
985
986
987
988
989
# File 'generated/google/apis/adexchangebuyer2_v2beta1/classes.rb', line 982

def update!(**args)
  @allowed_formats = args[:allowed_formats] if args.key?(:allowed_formats)
  @companion_sizes = args[:companion_sizes] if args.key?(:companion_sizes)
  @creative_size_type = args[:creative_size_type] if args.key?(:creative_size_type)
  @native_template = args[:native_template] if args.key?(:native_template)
  @size = args[:size] if args.key?(:size)
  @skippable_ad_type = args[:skippable_ad_type] if args.key?(:skippable_ad_type)
end