- JSON representation
- Ruleset
- Rule
- RuleCondition
- SignalComparison
- Signal
- ComparisonValue
- DayAndTime
- SignalValue
Rule-based algorithm.
JSON representation |
---|
{
"impressionSignalRuleset": {
object ( |
Fields | |
---|---|
impression |
Rules for the impression signals. |
Ruleset
A ruleset consisting of a list of rules and how to aggregate the resulting values.
JSON representation |
---|
{ "rules": [ { object ( |
Fields | |
---|---|
rules[] |
List of rules to generate the impression value. |
aggregation |
How to aggregate values of evaluated rules. |
max |
Maximum value the ruleset can evaluate to. |
Rule
Set of conditions.
The return value of the rule is either:
- The return value for single met condition or
- The defined default return value if no conditions are met.
JSON representation |
---|
{ "conditions": [ { object ( |
Fields | |
---|---|
conditions[] |
List of conditions in this rule. The criteria among conditions should be mutually exclusive. |
default |
The default return value applied when none of the conditions are met. |
RuleCondition
Set of signal comparisons. Equivalent of an if
statement.
JSON representation |
---|
{ "signalComparisons": [ { object ( |
Fields | |
---|---|
signal |
List of comparisons that build |
return |
The value returned if the |
SignalComparison
A single comparison. The comparison compares the signal
to the comparisonValue
.
The comparison of siteId==123
is represented with the following field values:
signal
has animpressionSignal
ofSITE_ID
.comparisonOperator
is set toEQUAL
.comparisonValue
is set to 123.
JSON representation |
---|
{ "signal": { object ( |
Fields | |
---|---|
signal |
Signal to compare. |
comparison |
Operator used to compare the two values. In the resulting experession, the |
comparison |
Value to compare signal to. |
Signal
Signal used to evaluate rules.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field signal . The signal used to evaluate rules. signal can be only one of the following: |
|
impression |
Signal based on impressions. |
ComparisonValue
A value to compare the signal to.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field value . The value to compare the signal to. value can be only one of the following: |
|
int64 |
Integer value. |
double |
Double value. |
string |
String value. |
bool |
Boolean value. |
creative |
Creative dimension value. |
day |
Day and time value. Only |
device |
Device type value. |
on |
Ad position value. |
environment |
Environment value. |
exchange |
Exchange value. |
DayAndTime
Representation of time defined by day of the week and hour of the day.
JSON representation |
---|
{ "dayOfWeek": enum ( |
Fields | |
---|---|
day |
Required. Day of the week. |
hour |
Required. Hour of the day. |
time |
Required. The mechanism used to determine the relevant timezone. |
SignalValue
Adjusted value of the signal used for rule evaluation.
JSON representation |
---|
{ "number": number } |
Fields | |
---|---|
number |
Value to use as result. |