Represents an AdUnit.
Package
@google-ads/admanagerConstructors
(constructor)(properties)
constructor(properties?: google.ads.admanager.v1.IAdUnit);Constructs a new AdUnit.
| Parameter | |
|---|---|
| Name | Description |
properties |
IAdUnit
Properties to set |
Properties
_appliedAdsenseEnabled
public _appliedAdsenseEnabled?: "appliedAdsenseEnabled";AdUnit _appliedAdsenseEnabled.
adUnitCode
public adUnitCode: string;AdUnit adUnitCode.
adUnitId
public adUnitId: (number|Long|string);AdUnit adUnitId.
adUnitSizes
public adUnitSizes: google.ads.admanager.v1.IAdUnitSize[];AdUnit adUnitSizes.
appliedAdsenseEnabled
public appliedAdsenseEnabled?: (boolean|null);AdUnit appliedAdsenseEnabled.
appliedLabelFrequencyCaps
public appliedLabelFrequencyCaps: google.ads.admanager.v1.ILabelFrequencyCap[];AdUnit appliedLabelFrequencyCaps.
appliedLabels
public appliedLabels: google.ads.admanager.v1.IAppliedLabel[];AdUnit appliedLabels.
appliedTargetWindow
public appliedTargetWindow: (google.ads.admanager.v1.TargetWindowEnum.TargetWindow|keyof typeof google.ads.admanager.v1.TargetWindowEnum.TargetWindow);AdUnit appliedTargetWindow.
appliedTeams
public appliedTeams: string[];AdUnit appliedTeams.
description
public description: string;AdUnit description.
displayName
public displayName: string;AdUnit displayName.
effectiveAdsenseEnabled
public effectiveAdsenseEnabled: boolean;AdUnit effectiveAdsenseEnabled.
effectiveAppliedLabels
public effectiveAppliedLabels: google.ads.admanager.v1.IAppliedLabel[];AdUnit effectiveAppliedLabels.
effectiveLabelFrequencyCaps
public effectiveLabelFrequencyCaps: google.ads.admanager.v1.ILabelFrequencyCap[];AdUnit effectiveLabelFrequencyCaps.
effectiveTargetWindow
public effectiveTargetWindow: (google.ads.admanager.v1.TargetWindowEnum.TargetWindow|keyof typeof google.ads.admanager.v1.TargetWindowEnum.TargetWindow);AdUnit effectiveTargetWindow.
explicitlyTargeted
public explicitlyTargeted: boolean;AdUnit explicitlyTargeted.
externalSetTopBoxChannelId
public externalSetTopBoxChannelId: string;AdUnit externalSetTopBoxChannelId.
hasChildren
public hasChildren: boolean;AdUnit hasChildren.
name
public name: string;AdUnit name.
parentAdUnit
public parentAdUnit: string;AdUnit parentAdUnit.
parentPath
public parentPath: google.ads.admanager.v1.IAdUnitParent[];AdUnit parentPath.
refreshDelay
public refreshDelay?: (google.protobuf.IDuration|null);AdUnit refreshDelay.
smartSizeMode
public smartSizeMode: (google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode|keyof typeof google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode);AdUnit smartSizeMode.
status
public status: (google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus|keyof typeof google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus);AdUnit status.
teams
public teams: string[];AdUnit teams.
updateTime
public updateTime?: (google.protobuf.ITimestamp|null);AdUnit updateTime.
Methods
create(properties)
public static create(properties?: google.ads.admanager.v1.IAdUnit): google.ads.admanager.v1.AdUnit;Creates a new AdUnit instance using the specified properties.
| Parameter | |
|---|---|
| Name | Description |
properties |
IAdUnit
Properties to set |
| Returns | |
|---|---|
| Type | Description |
AdUnit |
AdUnit instance |
decode(reader, length)
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.ads.admanager.v1.AdUnit;Decodes an AdUnit message from the specified reader or buffer.
| Parameters | |
|---|---|
| Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
length |
number
Message length if known beforehand |
| Returns | |
|---|---|
| Type | Description |
AdUnit |
AdUnit |
decodeDelimited(reader)
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.ads.admanager.v1.AdUnit;Decodes an AdUnit message from the specified reader or buffer, length delimited.
| Parameter | |
|---|---|
| Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
| Returns | |
|---|---|
| Type | Description |
AdUnit |
AdUnit |
encode(message, writer)
public static encode(message: google.ads.admanager.v1.IAdUnit, writer?: $protobuf.Writer): $protobuf.Writer;Encodes the specified AdUnit message. Does not implicitly messages.
| Parameters | |
|---|---|
| Name | Description |
message |
IAdUnit
AdUnit message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
| Returns | |
|---|---|
| Type | Description |
$protobuf.Writer |
Writer |
encodeDelimited(message, writer)
public static encodeDelimited(message: google.ads.admanager.v1.IAdUnit, writer?: $protobuf.Writer): $protobuf.Writer;Encodes the specified AdUnit message, length delimited. Does not implicitly messages.
| Parameters | |
|---|---|
| Name | Description |
message |
IAdUnit
AdUnit message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
| Returns | |
|---|---|
| Type | Description |
$protobuf.Writer |
Writer |
fromObject(object)
public static fromObject(object: { [k: string]: any }): google.ads.admanager.v1.AdUnit;Creates an AdUnit message from a plain object. Also converts values to their respective internal types.
| Parameter | |
|---|---|
| Name | Description |
object |
{ [k: string]: any }
Plain object |
| Returns | |
|---|---|
| Type | Description |
AdUnit |
AdUnit |
getTypeUrl(typeUrlPrefix)
public static getTypeUrl(typeUrlPrefix?: string): string;Gets the default type url for AdUnit
| Parameter | |
|---|---|
| Name | Description |
typeUrlPrefix |
string
your custom typeUrlPrefix(default "type.googleapis.com") |
| Returns | |
|---|---|
| Type | Description |
string |
The default type url |
toJSON()
public toJSON(): { [k: string]: any };Converts this AdUnit to JSON.
| Returns | |
|---|---|
| Type | Description |
{ [k: string]: any } |
JSON object |
toObject(message, options)
public static toObject(message: google.ads.admanager.v1.AdUnit, options?: $protobuf.IConversionOptions): { [k: string]: any };Creates a plain object from an AdUnit message. Also converts values to other types if specified.
| Parameters | |
|---|---|
| Name | Description |
message |
AdUnit
AdUnit |
options |
$protobuf.IConversionOptions
Conversion options |
| Returns | |
|---|---|
| Type | Description |
{ [k: string]: any } |
Plain object |
verify(message)
public static verify(message: { [k: string]: any }): (string|null);Verifies an AdUnit message.
| Parameter | |
|---|---|
| Name | Description |
message |
{ [k: string]: any }
Plain object to verify |
| Returns | |
|---|---|
| Type | Description |
(string|null) |
|