google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
258 lines (257 loc) • 11 kB
TypeScript
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { MatchingFunctionContextTypeEnum_MatchingFunctionContextType } from "../enums/matching_function_context_type";
import { MatchingFunctionOperatorEnum_MatchingFunctionOperator } from "../enums/matching_function_operator";
/**
* Matching function associated with a
* CustomerFeed, CampaignFeed, or AdGroupFeed. The matching function is used
* to filter the set of feed items selected.
*
* @generated from protobuf message google.ads.googleads.v11.common.MatchingFunction
*/
export interface MatchingFunction {
/**
* String representation of the Function.
*
* Examples:
*
* 1. IDENTITY(true) or IDENTITY(false). All or no feed items served.
* 2. EQUALS(CONTEXT.DEVICE,"Mobile")
* 3. IN(FEED_ITEM_ID,{1000001,1000002,1000003})
* 4. CONTAINS_ANY(FeedAttribute[12345678,0],{"Mars cruise","Venus cruise"})
* 5. AND(IN(FEED_ITEM_ID,{10001,10002}),EQUALS(CONTEXT.DEVICE,"Mobile"))
*
* For more details, visit
* https://developers.google.com/adwords/api/docs/guides/feed-matching-functions
*
* Note that because multiple strings may represent the same underlying
* function (whitespace and single versus double quotation marks, for
* example), the value returned may not be identical to the string sent in a
* mutate request.
*
* @generated from protobuf field: optional string function_string = 5;
*/
functionString?: string;
/**
* Operator for a function.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.MatchingFunctionOperatorEnum.MatchingFunctionOperator operator = 4;
*/
operator: MatchingFunctionOperatorEnum_MatchingFunctionOperator;
/**
* The operands on the left hand side of the equation. This is also the
* operand to be used for single operand expressions such as NOT.
*
* @generated from protobuf field: repeated google.ads.googleads.v11.common.Operand left_operands = 2;
*/
leftOperands: Operand[];
/**
* The operands on the right hand side of the equation.
*
* @generated from protobuf field: repeated google.ads.googleads.v11.common.Operand right_operands = 3;
*/
rightOperands: Operand[];
}
/**
* An operand in a matching function.
*
* @generated from protobuf message google.ads.googleads.v11.common.Operand
*/
export interface Operand {
/**
* @generated from protobuf oneof: function_argument_operand
*/
functionArgumentOperand: {
oneofKind: "constantOperand";
/**
* A constant operand in a matching function.
*
* @generated from protobuf field: google.ads.googleads.v11.common.Operand.ConstantOperand constant_operand = 1;
*/
constantOperand: Operand_ConstantOperand;
} | {
oneofKind: "feedAttributeOperand";
/**
* This operand specifies a feed attribute in feed.
*
* @generated from protobuf field: google.ads.googleads.v11.common.Operand.FeedAttributeOperand feed_attribute_operand = 2;
*/
feedAttributeOperand: Operand_FeedAttributeOperand;
} | {
oneofKind: "functionOperand";
/**
* A function operand in a matching function.
* Used to represent nested functions.
*
* @generated from protobuf field: google.ads.googleads.v11.common.Operand.FunctionOperand function_operand = 3;
*/
functionOperand: Operand_FunctionOperand;
} | {
oneofKind: "requestContextOperand";
/**
* An operand in a function referring to a value in the request context.
*
* @generated from protobuf field: google.ads.googleads.v11.common.Operand.RequestContextOperand request_context_operand = 4;
*/
requestContextOperand: Operand_RequestContextOperand;
} | {
oneofKind: undefined;
};
}
/**
* A constant operand in a matching function.
*
* @generated from protobuf message google.ads.googleads.v11.common.Operand.ConstantOperand
*/
export interface Operand_ConstantOperand {
/**
* @generated from protobuf oneof: constant_operand_value
*/
constantOperandValue: {
oneofKind: "stringValue";
/**
* String value of the operand if it is a string type.
*
* @generated from protobuf field: string string_value = 5;
*/
stringValue: string;
} | {
oneofKind: "longValue";
/**
* Int64 value of the operand if it is a int64 type.
*
* @generated from protobuf field: int64 long_value = 6;
*/
longValue: bigint;
} | {
oneofKind: "booleanValue";
/**
* Boolean value of the operand if it is a boolean type.
*
* @generated from protobuf field: bool boolean_value = 7;
*/
booleanValue: boolean;
} | {
oneofKind: "doubleValue";
/**
* Double value of the operand if it is a double type.
*
* @generated from protobuf field: double double_value = 8;
*/
doubleValue: number;
} | {
oneofKind: undefined;
};
}
/**
* A feed attribute operand in a matching function.
* Used to represent a feed attribute in feed.
*
* @generated from protobuf message google.ads.googleads.v11.common.Operand.FeedAttributeOperand
*/
export interface Operand_FeedAttributeOperand {
/**
* The associated feed. Required.
*
* @generated from protobuf field: optional int64 feed_id = 3;
*/
feedId?: bigint;
/**
* Id of the referenced feed attribute. Required.
*
* @generated from protobuf field: optional int64 feed_attribute_id = 4;
*/
feedAttributeId?: bigint;
}
/**
* A function operand in a matching function.
* Used to represent nested functions.
*
* @generated from protobuf message google.ads.googleads.v11.common.Operand.FunctionOperand
*/
export interface Operand_FunctionOperand {
/**
* The matching function held in this operand.
*
* @generated from protobuf field: google.ads.googleads.v11.common.MatchingFunction matching_function = 1;
*/
matchingFunction?: MatchingFunction;
}
/**
* An operand in a function referring to a value in the request context.
*
* @generated from protobuf message google.ads.googleads.v11.common.Operand.RequestContextOperand
*/
export interface Operand_RequestContextOperand {
/**
* Type of value to be referred in the request context.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.MatchingFunctionContextTypeEnum.MatchingFunctionContextType context_type = 1;
*/
contextType: MatchingFunctionContextTypeEnum_MatchingFunctionContextType;
}
declare class MatchingFunction$Type extends MessageType<MatchingFunction> {
constructor();
create(value?: PartialMessage<MatchingFunction>): MatchingFunction;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MatchingFunction): MatchingFunction;
internalBinaryWrite(message: MatchingFunction, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.common.MatchingFunction
*/
export declare const MatchingFunction: MatchingFunction$Type;
declare class Operand$Type extends MessageType<Operand> {
constructor();
create(value?: PartialMessage<Operand>): Operand;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Operand): Operand;
internalBinaryWrite(message: Operand, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.common.Operand
*/
export declare const Operand: Operand$Type;
declare class Operand_ConstantOperand$Type extends MessageType<Operand_ConstantOperand> {
constructor();
create(value?: PartialMessage<Operand_ConstantOperand>): Operand_ConstantOperand;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Operand_ConstantOperand): Operand_ConstantOperand;
internalBinaryWrite(message: Operand_ConstantOperand, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.common.Operand.ConstantOperand
*/
export declare const Operand_ConstantOperand: Operand_ConstantOperand$Type;
declare class Operand_FeedAttributeOperand$Type extends MessageType<Operand_FeedAttributeOperand> {
constructor();
create(value?: PartialMessage<Operand_FeedAttributeOperand>): Operand_FeedAttributeOperand;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Operand_FeedAttributeOperand): Operand_FeedAttributeOperand;
internalBinaryWrite(message: Operand_FeedAttributeOperand, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.common.Operand.FeedAttributeOperand
*/
export declare const Operand_FeedAttributeOperand: Operand_FeedAttributeOperand$Type;
declare class Operand_FunctionOperand$Type extends MessageType<Operand_FunctionOperand> {
constructor();
create(value?: PartialMessage<Operand_FunctionOperand>): Operand_FunctionOperand;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Operand_FunctionOperand): Operand_FunctionOperand;
internalBinaryWrite(message: Operand_FunctionOperand, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.common.Operand.FunctionOperand
*/
export declare const Operand_FunctionOperand: Operand_FunctionOperand$Type;
declare class Operand_RequestContextOperand$Type extends MessageType<Operand_RequestContextOperand> {
constructor();
create(value?: PartialMessage<Operand_RequestContextOperand>): Operand_RequestContextOperand;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Operand_RequestContextOperand): Operand_RequestContextOperand;
internalBinaryWrite(message: Operand_RequestContextOperand, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.common.Operand.RequestContextOperand
*/
export declare const Operand_RequestContextOperand: Operand_RequestContextOperand$Type;
export {};