REST Resource: advertisers.adGroups.youtubeAssetTypes.youtubeAssetAssociations

Resource: YoutubeAssetAssociation

An association between a resource and a YouTube asset.

JSON representation
{
  "name": string,
  "youtubeAssetType": enum (YoutubeAssetType),
  "linkedYoutubeAsset": {
    object (LinkedYouTubeAsset)
  }
}
Fields
name

string

Identifier. The resource name of the association.

For line item-level associations: The name pattern is advertisers/{advertiserId}/lineItems/{lineItemId}/youtubeAssetTypes/{youtubeAssetType}/youtubeAssetAssociations/{youtubeAssetAssociationId}.

For ad group-level associations: The name pattern is advertisers/{advertiserId}/adGroups/{adGroupId}/youtubeAssetTypes/{youtubeAssetType}/youtubeAssetAssociations/{youtubeAssetAssociationId}.

For YOUTUBE_ASSET_TYPE_LOCATION and YOUTUBE_ASSET_TYPE_AFFILIATE_LOCATION associations: youtubeAssetAssociationId is the ID of the asset set linked, or 0 if the locationMatchingType or affiliateLocationMatchingType is DISABLED.

For YOUTUBE_ASSET_TYPE_SITELINK associations: youtubeAssetAssociationId is be the ID of the sitelink asset linked.

youtubeAssetType

enum (YoutubeAssetType)

Required. The type of YouTube asset associated with the resource.

linkedYoutubeAsset

object (LinkedYouTubeAsset)

Required. The YouTube asset associated with the resource.

YoutubeAssetType

Possible types of YouTube assets.

These assets will show additional information alongside ads during serving.

Enums
YOUTUBE_ASSET_TYPE_UNSPECIFIED YouTube asset type is not specified or is unknown in this version.
YOUTUBE_ASSET_TYPE_LOCATION Location asset.
YOUTUBE_ASSET_TYPE_AFFILIATE_LOCATION Affiliate location asset.

LinkedYouTubeAsset

A YouTube asset linked to a resource in a YoutubeAssetAssociation.

JSON representation
{

  // Union field youtube_asset can be only one of the following:
  "locationAssetFilter": {
    object (LocationAssetFilter)
  },
  "affiliateLocationAssetFilter": {
    object (AffiliateLocationAssetFilter)
  },
  "sitelinkAsset": {
    object (SitelinkAsset)
  }
  // End of list of possible types for union field youtube_asset.
}
Fields
Union field youtube_asset. The YouTube asset. youtube_asset can be only one of the following:
locationAssetFilter

object (LocationAssetFilter)

A location asset filter.

This can be set only when youtubeAssetType is YOUTUBE_ASSET_TYPE_LOCATION.

affiliateLocationAssetFilter

object (AffiliateLocationAssetFilter)

A affiliate location asset filter.

This can be set only when youtubeAssetType is YOUTUBE_ASSET_TYPE_AFFILIATE_LOCATION.

LocationAssetFilter

An asset filter that matches eligible location assets for serving.

JSON representation
{
  "locationMatchingType": enum (LocationMatchingType),
  "assetSetId": string,
  "locationMatchingFunction": {
    object (LocationMatchingFunction)
  }
}
Fields
locationMatchingType

enum (LocationMatchingType)

Required. The matching type of this location asset filter.

assetSetId

string (int64 format)

Output only. The ID of the asset set that matches the location assets eligible for serving.

locationMatchingFunction

object (LocationMatchingFunction)

Optional. The matching function that dicates how the location asset filter matches location assets.

This field is required and can only be set for if locationMatchingType is FILTER or SELECTED_ASSETS.

LocationMatchingType

Possible matching types that decide which location assets are eligible for serving.

Enums
LOCATION_MATCHING_TYPE_UNSPECIFIED Location matching type is not specified or is unknown in this version.
SELECT_ALL All available location assets are eligible for serving.
FILTER The location assets that match a provided business name and/or label filters can serve.
SELECTED_ASSETS Only the selected location assets can serve.
DISABLED No location assets can serve.

LocationMatchingFunction

The matching function for a location asset filter.

JSON representation
{
  "labels": [
    string
  ],
  "locationAssetIds": [
    string
  ],
  "business": string
}
Fields
labels[]

string

Optional. The label to match with.

Labels are logically OR'ed together.

This field is optional and can only be set if locationMatchingType is FILTER.

locationAssetIds[]

string (int64 format)

Optional. The selected location asset IDs.

This field is required if locationMatchingType is SELECTED_ASSETS.

business

string

Optional. The business name to match with.

This field is optional and can only be set if locationMatchingType is FILTER.

AffiliateLocationAssetFilter

An asset filter that matches eligible affiliate location assets for serving.

JSON representation
{
  "affiliateLocationMatchingType": enum (AffiliateLocationMatchingType),
  "assetSetId": string,
  "affiliateLocationMatchingFunction": {
    object (AffiliateLocationMatchingFunction)
  }
}
Fields
affiliateLocationMatchingType

enum (AffiliateLocationMatchingType)

Required. The matching type of this affiliate location asset filter.

assetSetId

string (int64 format)

Output only. The ID of the asset set that matches the affiliate location assets eligible for serving.

affiliateLocationMatchingFunction

object (AffiliateLocationMatchingFunction)

Optional. The matching function that dicates how the affiliate location asset filter matches affiliate location assets.

This field is required and can only be set for if affiliateLocationMatchingType is SELECTED_CHAINS.

AffiliateLocationMatchingType

Possible matching types that decide which affiliate location assets are eligible for serving.

Enums
AFFILIATE_LOCATION_MATCHING_TYPE_UNSPECIFIED Affiliate location matching type is not specified or is unknown in this version.
SELECT_ALL All available affiliate location assets are eligible for serving.
SELECTED_CHAINS The selected affiliate location assets can serve.
DISABLED No affiliate location assets can serve.

AffiliateLocationMatchingFunction

The matching function for an affiliate location asset filter.

JSON representation
{
  "chains": [
    {
      object (AffiliateLocationChain)
    }
  ]
}
Fields
chains[]

object (AffiliateLocationChain)

Optional. The selected affiliate location chain IDs.

This field is required if affiliateLocationMatchingType is SELECTED_CHAINS.

AffiliateLocationChain

A chain of affiliate locations.

JSON representation
{
  "chainId": string
}
Fields
chainId

string (int64 format)

Required. ID of the affiliate location chain.

SitelinkAsset

A sitelink asset.

JSON representation
{
  "assetId": string
}
Fields
assetId

string (int64 format)

Required. ID of the sitelink asset.

Methods

create

Creates a new association between the identified resource and a YouTube asset.

delete

Deletes an existing association between the identified resource and a YouTube asset.

list

Lists the YouTube asset associations linked to the given resource.