public class Rule
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Represents a condition for a device pool.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
attribute
The rule's stringified attribute.
|
private java.lang.String |
operator
The rule's operator.
|
private java.lang.String |
value
The rule's value.
|
Constructor and Description |
---|
Rule() |
Modifier and Type | Method and Description |
---|---|
Rule |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAttribute()
The rule's stringified attribute.
|
java.lang.String |
getOperator()
The rule's operator.
|
java.lang.String |
getValue()
The rule's value.
|
int |
hashCode() |
void |
setAttribute(DeviceAttribute attribute)
The rule's stringified attribute.
|
void |
setAttribute(java.lang.String attribute)
The rule's stringified attribute.
|
void |
setOperator(RuleOperator operator)
The rule's operator.
|
void |
setOperator(java.lang.String operator)
The rule's operator.
|
void |
setValue(java.lang.String value)
The rule's value.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Rule |
withAttribute(DeviceAttribute attribute)
The rule's stringified attribute.
|
Rule |
withAttribute(java.lang.String attribute)
The rule's stringified attribute.
|
Rule |
withOperator(RuleOperator operator)
The rule's operator.
|
Rule |
withOperator(java.lang.String operator)
The rule's operator.
|
Rule |
withValue(java.lang.String value)
The rule's value.
|
private java.lang.String attribute
The rule's stringified attribute. For example, specify the value as
"\"abc\""
.
Allowed values include:
ARN: The ARN.
FORM_FACTOR: The form factor (for example, phone or tablet).
MANUFACTURER: The manufacturer.
PLATFORM: The platform (for example, Android or iOS).
private java.lang.String operator
The rule's operator.
EQUALS: The equals operator.
GREATER_THAN: The greater-than operator.
IN: The in operator.
LESS_THAN: The less-than operator.
NOT_IN: The not-in operator.
private java.lang.String value
The rule's value.
public void setAttribute(java.lang.String attribute)
The rule's stringified attribute. For example, specify the value as
"\"abc\""
.
Allowed values include:
ARN: The ARN.
FORM_FACTOR: The form factor (for example, phone or tablet).
MANUFACTURER: The manufacturer.
PLATFORM: The platform (for example, Android or iOS).
attribute
- The rule's stringified attribute. For example, specify the value
as "\"abc\""
.
Allowed values include:
ARN: The ARN.
FORM_FACTOR: The form factor (for example, phone or tablet).
MANUFACTURER: The manufacturer.
PLATFORM: The platform (for example, Android or iOS).
DeviceAttribute
public java.lang.String getAttribute()
The rule's stringified attribute. For example, specify the value as
"\"abc\""
.
Allowed values include:
ARN: The ARN.
FORM_FACTOR: The form factor (for example, phone or tablet).
MANUFACTURER: The manufacturer.
PLATFORM: The platform (for example, Android or iOS).
"\"abc\""
.
Allowed values include:
ARN: The ARN.
FORM_FACTOR: The form factor (for example, phone or tablet).
MANUFACTURER: The manufacturer.
PLATFORM: The platform (for example, Android or iOS).
DeviceAttribute
public Rule withAttribute(java.lang.String attribute)
The rule's stringified attribute. For example, specify the value as
"\"abc\""
.
Allowed values include:
ARN: The ARN.
FORM_FACTOR: The form factor (for example, phone or tablet).
MANUFACTURER: The manufacturer.
PLATFORM: The platform (for example, Android or iOS).
attribute
- The rule's stringified attribute. For example, specify the value
as "\"abc\""
.
Allowed values include:
ARN: The ARN.
FORM_FACTOR: The form factor (for example, phone or tablet).
MANUFACTURER: The manufacturer.
PLATFORM: The platform (for example, Android or iOS).
DeviceAttribute
public void setAttribute(DeviceAttribute attribute)
The rule's stringified attribute. For example, specify the value as
"\"abc\""
.
Allowed values include:
ARN: The ARN.
FORM_FACTOR: The form factor (for example, phone or tablet).
MANUFACTURER: The manufacturer.
PLATFORM: The platform (for example, Android or iOS).
attribute
- The rule's stringified attribute. For example, specify the value
as "\"abc\""
.
Allowed values include:
ARN: The ARN.
FORM_FACTOR: The form factor (for example, phone or tablet).
MANUFACTURER: The manufacturer.
PLATFORM: The platform (for example, Android or iOS).
DeviceAttribute
public Rule withAttribute(DeviceAttribute attribute)
The rule's stringified attribute. For example, specify the value as
"\"abc\""
.
Allowed values include:
ARN: The ARN.
FORM_FACTOR: The form factor (for example, phone or tablet).
MANUFACTURER: The manufacturer.
PLATFORM: The platform (for example, Android or iOS).
attribute
- The rule's stringified attribute. For example, specify the value
as "\"abc\""
.
Allowed values include:
ARN: The ARN.
FORM_FACTOR: The form factor (for example, phone or tablet).
MANUFACTURER: The manufacturer.
PLATFORM: The platform (for example, Android or iOS).
DeviceAttribute
public void setOperator(java.lang.String operator)
The rule's operator.
EQUALS: The equals operator.
GREATER_THAN: The greater-than operator.
IN: The in operator.
LESS_THAN: The less-than operator.
NOT_IN: The not-in operator.
operator
- The rule's operator.
EQUALS: The equals operator.
GREATER_THAN: The greater-than operator.
IN: The in operator.
LESS_THAN: The less-than operator.
NOT_IN: The not-in operator.
RuleOperator
public java.lang.String getOperator()
The rule's operator.
EQUALS: The equals operator.
GREATER_THAN: The greater-than operator.
IN: The in operator.
LESS_THAN: The less-than operator.
NOT_IN: The not-in operator.
EQUALS: The equals operator.
GREATER_THAN: The greater-than operator.
IN: The in operator.
LESS_THAN: The less-than operator.
NOT_IN: The not-in operator.
RuleOperator
public Rule withOperator(java.lang.String operator)
The rule's operator.
EQUALS: The equals operator.
GREATER_THAN: The greater-than operator.
IN: The in operator.
LESS_THAN: The less-than operator.
NOT_IN: The not-in operator.
operator
- The rule's operator.
EQUALS: The equals operator.
GREATER_THAN: The greater-than operator.
IN: The in operator.
LESS_THAN: The less-than operator.
NOT_IN: The not-in operator.
RuleOperator
public void setOperator(RuleOperator operator)
The rule's operator.
EQUALS: The equals operator.
GREATER_THAN: The greater-than operator.
IN: The in operator.
LESS_THAN: The less-than operator.
NOT_IN: The not-in operator.
operator
- The rule's operator.
EQUALS: The equals operator.
GREATER_THAN: The greater-than operator.
IN: The in operator.
LESS_THAN: The less-than operator.
NOT_IN: The not-in operator.
RuleOperator
public Rule withOperator(RuleOperator operator)
The rule's operator.
EQUALS: The equals operator.
GREATER_THAN: The greater-than operator.
IN: The in operator.
LESS_THAN: The less-than operator.
NOT_IN: The not-in operator.
operator
- The rule's operator.
EQUALS: The equals operator.
GREATER_THAN: The greater-than operator.
IN: The in operator.
LESS_THAN: The less-than operator.
NOT_IN: The not-in operator.
RuleOperator
public void setValue(java.lang.String value)
The rule's value.
value
- The rule's value.public java.lang.String getValue()
The rule's value.
public Rule withValue(java.lang.String value)
The rule's value.
value
- The rule's value.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Rule clone()
clone
in class java.lang.Object