MatchingFunction

与 CustomerFeed、CampaignFeed 或 AdGroupFeed 相关联的匹配函数。匹配函数用于过滤所选的一组 Feed 项。

JSON 表示法
{
  "operator": enum (MatchingFunctionOperator),
  "leftOperands": [
    {
      object (Operand)
    }
  ],
  "rightOperands": [
    {
      object (Operand)
    }
  ],
  "functionString": string
}
字段
operator

enum (MatchingFunctionOperator)

函数的运算符。

leftOperands[]

object (Operand)

方程左侧的操作数。这也是用于单操作数表达式(例如 NOT)的操作数。

rightOperands[]

object (Operand)

等式右侧的运算数。

functionString

string

函数的字符串表示。

示例:

  1. IDENTITY(true) 或 IDENTITY(false)。所有 Feed 项或未投放任何 Feed 项。
  2. EQUALS(CONTEXT.DEVICE,"Mobile")
  3. IN(FEED_ITEM_ID,{1000001,1000002,1000003})
  4. CONTAINS_ANY(FeedAttribute[12345678,0],{"火星之旅","金星之旅"})
  5. AND(IN(FEED_ITEM_ID,{10001,10002}),EQUALS(CONTEXT.DEVICE,"Mobile"))

如需了解详情,请访问 https://developers.google.com/google-ads/api/docs/extensions/feeds/matching-functions

请注意,由于多个字符串可能表示同一个基础函数(例如空格和单引号/双引号),因此返回的值可能与 mutate 请求中发送的字符串不同。

MatchingFunctionOperator

匹配函数中可能的运算符。

枚举
UNSPECIFIED 未指定。
UNKNOWN 仅用于返回值。表示此版本中未知的值。
IN IN 运算符。
IDENTITY IDENTITY 运算符。
EQUALS EQUALS 运算符
AND 一个运算符,可接受两个或多个类型为 FunctionOperand 的运算数,并检查所有运算数的计算结果是否为 true。对于与广告格式相关的函数,所有操作数都必须位于 leftOperands 中。
CONTAINS_ANY 当 leftOperands 中的元素包含 rightOperands 中的任何元素时,返回 true 的运算符。否则,返回 false。正确操作数必须包含 1 到 3 个常量操作数。

Operand

匹配函数中的运算数。

JSON 表示法
{

  // Union field function_argument_operand can be only one of the following:
  "constantOperand": {
    object (ConstantOperand)
  },
  "feedAttributeOperand": {
    object (FeedAttributeOperand)
  },
  "functionOperand": {
    object (FunctionOperand)
  },
  "requestContextOperand": {
    object (RequestContextOperand)
  }
  // End of list of possible types for union field function_argument_operand.
}
字段
联合字段 function_argument_operand。可在匹配函数中使用的不同运算数。必需。function_argument_operand 只能是下列其中一项:
constantOperand

object (ConstantOperand)

匹配函数中的常量运算数。

feedAttributeOperand

object (FeedAttributeOperand)

该运算数指定 Feed 中的一个 Feed 属性。

functionOperand

object (FunctionOperand)

匹配函数中的函数运算数。用于表示嵌套函数。

requestContextOperand

object (RequestContextOperand)

函数中的运算数,引用请求上下文中的某个值。

ConstantOperand

匹配函数中的常量运算数。

JSON 表示法
{

  // Union field constant_operand_value can be only one of the following:
  "stringValue": string,
  "longValue": string,
  "booleanValue": boolean,
  "doubleValue": number
  // End of list of possible types for union field constant_operand_value.
}
字段
联合字段 constant_operand_value。常量运算数值。必需。constant_operand_value 只能是下列其中一项:
stringValue

string

操作数的字符串值(如果该操作数为字符串类型)。

longValue

string (int64 format)

操作数的 Int64 值(如果为 int64 类型)。

booleanValue

boolean

操作数的布尔值(如果为布尔值)。

doubleValue

number

操作数的双精度值(如果该操作数为双精度类型)。

FeedAttributeOperand

匹配函数中的 Feed 属性操作数。用于表示 Feed 中的 Feed 属性。

JSON 表示法
{
  "feedId": string,
  "feedAttributeId": string
}
字段
feedId

string (int64 format)

关联的 Feed。必填。

feedAttributeId

string (int64 format)

所引用的 Feed 属性的 ID。必填。

FunctionOperand

匹配函数中的函数运算数。用于表示嵌套函数。

JSON 表示法
{
  "matchingFunction": {
    object (MatchingFunction)
  }
}
字段
matchingFunction

object (MatchingFunction)

此运算数中的匹配函数。

RequestContextOperand

函数中的运算数,引用请求上下文中的某个值。

JSON 表示法
{
  "contextType": enum (MatchingFunctionContextType)
}
字段
contextType

enum (MatchingFunctionContextType)

请求上下文中要引用的值的类型。

MatchingFunctionContextType

匹配函数中操作数可能的上下文类型。

枚举
UNSPECIFIED 未指定。
UNKNOWN 仅用于返回值。表示此版本中未知的值。
FEED_ITEM_ID 请求情境中的 Feed 项 ID。
DEVICE_NAME 所使用的设备(可能的值为“桌面设备”或“移动设备”)。
FEED_ITEM_SET_ID 请求上下文中的 Feed 项集 ID。