java.lang.Object
com.amazonaws.services.devicefarm.model.Rule
All Implemented Interfaces:
Serializable, Cloneable

public class Rule extends Object implements Serializable, Cloneable

Represents a condition for a device pool.

See Also:
  • Constructor Details

    • Rule

      public Rule()
  • Method Details

    • setAttribute

      public void setAttribute(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).

      Parameters:
      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).

      See Also:
    • getAttribute

      public 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).

      Returns:
      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).

      See Also:
    • withAttribute

      public Rule withAttribute(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).

      Parameters:
      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).

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setAttribute

      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).

      Parameters:
      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).

      See Also:
    • withAttribute

      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).

      Parameters:
      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).

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setOperator

      public void setOperator(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.

      Parameters:
      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.

      See Also:
    • getOperator

      public 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.

      Returns:
      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.

      See Also:
    • withOperator

      public Rule withOperator(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.

      Parameters:
      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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setOperator

      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.

      Parameters:
      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.

      See Also:
    • withOperator

      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.

      Parameters:
      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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setValue

      public void setValue(String value)

      The rule's value.

      Parameters:
      value - The rule's value.
    • getValue

      public String getValue()

      The rule's value.

      Returns:
      The rule's value.
    • withValue

      public Rule withValue(String value)

      The rule's value.

      Parameters:
      value - The rule's value.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Rule clone()
      Overrides:
      clone in class Object