Google Ads Ad Manager V1 Client - Class AdUnitSize (0.1.1)

Reference documentation and code samples for the Google Ads Ad Manager V1 Client class AdUnitSize.

Represents the size, environment, and companions of an ad in an ad unit.

Generated from protobuf message google.ads.admanager.v1.AdUnitSize

Namespace

Google \ Ads \ AdManager \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ size Google\Ads\AdManager\V1\Size

Required. The Size of the AdUnit.

↳ environment_type int

Required. The EnvironmentType of the AdUnit

↳ companions array<Google\Ads\AdManager\V1\Size>

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

getSize

Required. The Size of the AdUnit.

Returns
Type Description
Google\Ads\AdManager\V1\Size|null

hasSize

clearSize

setSize

Required. The Size of the AdUnit.

Parameter
Name Description
var Google\Ads\AdManager\V1\Size
Returns
Type Description
$this

getEnvironmentType

Required. The EnvironmentType of the AdUnit

Returns
Type Description
int

setEnvironmentType

Required. The EnvironmentType of the AdUnit

Parameter
Name Description
var int
Returns
Type Description
$this

getCompanions

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setCompanions

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

Parameter
Name Description
var array<Google\Ads\AdManager\V1\Size>
Returns
Type Description
$this