public class Function extends Object
Operands per function is limited to 20.
Here is a code example:
// For example "feed_attribute == 30" can be represented as:
FeedId feedId = (FeedId of Feed associated with feed_attribute)
FeedAttributeId feedAttributeId = (FeedAttributeId of feed_attribute)
Function function = new Function();
function.setLhsOperand(
Arrays.asList((Operand) new FeedAttributeOperand(feedId, feedAttributeId)));
function.setOperator(Operator.IN);
function.setRhsOperand(
Arrays.asList((Operand) new ConstantOperand(30L)));
// Another example matching on multiple values:
"feed_item_id IN (10, 20, 30)" can be represented as:
Function function = new Function();
function.setLhsOperand(
Arrays.asList((Operand) new RequestContextOperand(ContextType.FEED_ITEM_ID)));
function.setOperator(Operator.IN);
function.setRhsOperand(Arrays.asList(
(Operand) new ConstantOperand(10L), new ConstantOperand(20L), new ConstantOperand(30L)));
Java class for Function complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="Function">
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<sequence>
<element name="operator" type="{https://adwords.google.com/api/adwords/cm/v201809}Function.Operator" minOccurs="0"/>
<element name="lhsOperand" type="{https://adwords.google.com/api/adwords/cm/v201809}FunctionArgumentOperand" maxOccurs="unbounded" minOccurs="0"/>
<element name="rhsOperand" type="{https://adwords.google.com/api/adwords/cm/v201809}FunctionArgumentOperand" maxOccurs="unbounded" minOccurs="0"/>
<element name="functionString" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
</sequence>
</restriction>
</complexContent>
</complexType>
| Modifier and Type | Field and Description |
|---|---|
protected String |
functionString |
protected List<FunctionArgumentOperand> |
lhsOperand |
protected FunctionOperator |
operator |
protected List<FunctionArgumentOperand> |
rhsOperand |
| Constructor and Description |
|---|
Function() |
| Modifier and Type | Method and Description |
|---|---|
String |
getFunctionString()
Gets the value of the functionString property.
|
List<FunctionArgumentOperand> |
getLhsOperand()
Gets the value of the lhsOperand property.
|
FunctionOperator |
getOperator()
Gets the value of the operator property.
|
List<FunctionArgumentOperand> |
getRhsOperand()
Gets the value of the rhsOperand property.
|
void |
setFunctionString(String value)
Sets the value of the functionString property.
|
void |
setOperator(FunctionOperator value)
Sets the value of the operator property.
|
protected FunctionOperator operator
protected List<FunctionArgumentOperand> lhsOperand
protected List<FunctionArgumentOperand> rhsOperand
protected String functionString
public FunctionOperator getOperator()
FunctionOperatorpublic void setOperator(FunctionOperator value)
value - allowed object is
FunctionOperatorpublic List<FunctionArgumentOperand> getLhsOperand()
This accessor method returns a reference to the live list,
not a snapshot. Therefore any modification you make to the
returned list will be present inside the JAXB object.
This is why there is not a set method for the lhsOperand property.
For example, to add a new item, do as follows:
getLhsOperand().add(newItem);
Objects of the following type(s) are allowed in the list
FunctionArgumentOperand
public List<FunctionArgumentOperand> getRhsOperand()
This accessor method returns a reference to the live list,
not a snapshot. Therefore any modification you make to the
returned list will be present inside the JAXB object.
This is why there is not a set method for the rhsOperand property.
For example, to add a new item, do as follows:
getRhsOperand().add(newItem);
Objects of the following type(s) are allowed in the list
FunctionArgumentOperand
public String getFunctionString()
StringCopyright © 2023. All rights reserved.