/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.devicefarm.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Represents a condition for a device pool. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Rule implements Serializable, Cloneable, StructuredPojo { /** *
* The rule's stringified attribute. For example, specify the value as "\"abc\""
.
*
* The supported operators for each attribute are provided in the following list. *
** The Appium version for the test. *
*
* Supported operators: CONTAINS
*
* The Amazon Resource Name (ARN) of the device (for example,
* arn:aws:devicefarm:us-west-2::device:12345Example
.
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or * TEMPORARY_NOT_AVAILABLE. *
*
* Supported operators: EQUALS
*
* The fleet type. Valid values are PUBLIC or PRIVATE. *
*
* Supported operators: EQUALS
*
* The device form factor. Valid values are PHONE or TABLET. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The Amazon Resource Name (ARN) of the device instance. *
*
* Supported operators: IN
, NOT_IN
*
* The label of the device instance. *
*
* Supported operators: CONTAINS
*
* The device manufacturer (for example, Apple). *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The device model, such as Apple iPad Air 2 or Google Pixel. *
*
* Supported operators: CONTAINS
, EQUALS
, IN
, NOT_IN
*
* The operating system version (for example, 10.3.2). *
*
* Supported operators: EQUALS
, GREATER_THAN
, GREATER_THAN_OR_EQUALS
,
* IN
, LESS_THAN
, LESS_THAN_OR_EQUALS
, NOT_IN
*
* The device platform. Valid values are ANDROID or IOS. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* Whether the device is enabled for remote access. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Because remote debugging is no longer supported, this * filter is ignored. *
** Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported by * each attribute, see the attribute descriptions. *
*/ private String operator; /** ** The rule's value. *
*/ private String value; /** *
* The rule's stringified attribute. For example, specify the value as "\"abc\""
.
*
* The supported operators for each attribute are provided in the following list. *
** The Appium version for the test. *
*
* Supported operators: CONTAINS
*
* The Amazon Resource Name (ARN) of the device (for example,
* arn:aws:devicefarm:us-west-2::device:12345Example
.
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or * TEMPORARY_NOT_AVAILABLE. *
*
* Supported operators: EQUALS
*
* The fleet type. Valid values are PUBLIC or PRIVATE. *
*
* Supported operators: EQUALS
*
* The device form factor. Valid values are PHONE or TABLET. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The Amazon Resource Name (ARN) of the device instance. *
*
* Supported operators: IN
, NOT_IN
*
* The label of the device instance. *
*
* Supported operators: CONTAINS
*
* The device manufacturer (for example, Apple). *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The device model, such as Apple iPad Air 2 or Google Pixel. *
*
* Supported operators: CONTAINS
, EQUALS
, IN
, NOT_IN
*
* The operating system version (for example, 10.3.2). *
*
* Supported operators: EQUALS
, GREATER_THAN
, GREATER_THAN_OR_EQUALS
,
* IN
, LESS_THAN
, LESS_THAN_OR_EQUALS
, NOT_IN
*
* The device platform. Valid values are ANDROID or IOS. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* Whether the device is enabled for remote access. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Because remote debugging is no longer supported, this * filter is ignored. *
*"\"abc\""
.
* * The supported operators for each attribute are provided in the following list. *
** The Appium version for the test. *
*
* Supported operators: CONTAINS
*
* The Amazon Resource Name (ARN) of the device (for example,
* arn:aws:devicefarm:us-west-2::device:12345Example
.
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or * TEMPORARY_NOT_AVAILABLE. *
*
* Supported operators: EQUALS
*
* The fleet type. Valid values are PUBLIC or PRIVATE. *
*
* Supported operators: EQUALS
*
* The device form factor. Valid values are PHONE or TABLET. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The Amazon Resource Name (ARN) of the device instance. *
*
* Supported operators: IN
, NOT_IN
*
* The label of the device instance. *
*
* Supported operators: CONTAINS
*
* The device manufacturer (for example, Apple). *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The device model, such as Apple iPad Air 2 or Google Pixel. *
*
* Supported operators: CONTAINS
, EQUALS
, IN
, NOT_IN
*
* The operating system version (for example, 10.3.2). *
*
* Supported operators: EQUALS
, GREATER_THAN
, GREATER_THAN_OR_EQUALS
,
* IN
, LESS_THAN
, LESS_THAN_OR_EQUALS
, NOT_IN
*
* The device platform. Valid values are ANDROID or IOS. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* Whether the device is enabled for remote access. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Because remote debugging is no longer supported, * this filter is ignored. *
*
* The rule's stringified attribute. For example, specify the value as "\"abc\""
.
*
* The supported operators for each attribute are provided in the following list. *
** The Appium version for the test. *
*
* Supported operators: CONTAINS
*
* The Amazon Resource Name (ARN) of the device (for example,
* arn:aws:devicefarm:us-west-2::device:12345Example
.
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or * TEMPORARY_NOT_AVAILABLE. *
*
* Supported operators: EQUALS
*
* The fleet type. Valid values are PUBLIC or PRIVATE. *
*
* Supported operators: EQUALS
*
* The device form factor. Valid values are PHONE or TABLET. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The Amazon Resource Name (ARN) of the device instance. *
*
* Supported operators: IN
, NOT_IN
*
* The label of the device instance. *
*
* Supported operators: CONTAINS
*
* The device manufacturer (for example, Apple). *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The device model, such as Apple iPad Air 2 or Google Pixel. *
*
* Supported operators: CONTAINS
, EQUALS
, IN
, NOT_IN
*
* The operating system version (for example, 10.3.2). *
*
* Supported operators: EQUALS
, GREATER_THAN
, GREATER_THAN_OR_EQUALS
,
* IN
, LESS_THAN
, LESS_THAN_OR_EQUALS
, NOT_IN
*
* The device platform. Valid values are ANDROID or IOS. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* Whether the device is enabled for remote access. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Because remote debugging is no longer supported, this * filter is ignored. *
*"\"abc\""
.
* * The supported operators for each attribute are provided in the following list. *
** The Appium version for the test. *
*
* Supported operators: CONTAINS
*
* The Amazon Resource Name (ARN) of the device (for example,
* arn:aws:devicefarm:us-west-2::device:12345Example
.
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or * TEMPORARY_NOT_AVAILABLE. *
*
* Supported operators: EQUALS
*
* The fleet type. Valid values are PUBLIC or PRIVATE. *
*
* Supported operators: EQUALS
*
* The device form factor. Valid values are PHONE or TABLET. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The Amazon Resource Name (ARN) of the device instance. *
*
* Supported operators: IN
, NOT_IN
*
* The label of the device instance. *
*
* Supported operators: CONTAINS
*
* The device manufacturer (for example, Apple). *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The device model, such as Apple iPad Air 2 or Google Pixel. *
*
* Supported operators: CONTAINS
, EQUALS
, IN
, NOT_IN
*
* The operating system version (for example, 10.3.2). *
*
* Supported operators: EQUALS
, GREATER_THAN
, GREATER_THAN_OR_EQUALS
,
* IN
, LESS_THAN
, LESS_THAN_OR_EQUALS
, NOT_IN
*
* The device platform. Valid values are ANDROID or IOS. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* Whether the device is enabled for remote access. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Because remote debugging is no longer supported, * this filter is ignored. *
*
* The rule's stringified attribute. For example, specify the value as "\"abc\""
.
*
* The supported operators for each attribute are provided in the following list. *
** The Appium version for the test. *
*
* Supported operators: CONTAINS
*
* The Amazon Resource Name (ARN) of the device (for example,
* arn:aws:devicefarm:us-west-2::device:12345Example
.
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or * TEMPORARY_NOT_AVAILABLE. *
*
* Supported operators: EQUALS
*
* The fleet type. Valid values are PUBLIC or PRIVATE. *
*
* Supported operators: EQUALS
*
* The device form factor. Valid values are PHONE or TABLET. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The Amazon Resource Name (ARN) of the device instance. *
*
* Supported operators: IN
, NOT_IN
*
* The label of the device instance. *
*
* Supported operators: CONTAINS
*
* The device manufacturer (for example, Apple). *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The device model, such as Apple iPad Air 2 or Google Pixel. *
*
* Supported operators: CONTAINS
, EQUALS
, IN
, NOT_IN
*
* The operating system version (for example, 10.3.2). *
*
* Supported operators: EQUALS
, GREATER_THAN
, GREATER_THAN_OR_EQUALS
,
* IN
, LESS_THAN
, LESS_THAN_OR_EQUALS
, NOT_IN
*
* The device platform. Valid values are ANDROID or IOS. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* Whether the device is enabled for remote access. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Because remote debugging is no longer supported, this * filter is ignored. *
*"\"abc\""
.
* * The supported operators for each attribute are provided in the following list. *
** The Appium version for the test. *
*
* Supported operators: CONTAINS
*
* The Amazon Resource Name (ARN) of the device (for example,
* arn:aws:devicefarm:us-west-2::device:12345Example
.
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or * TEMPORARY_NOT_AVAILABLE. *
*
* Supported operators: EQUALS
*
* The fleet type. Valid values are PUBLIC or PRIVATE. *
*
* Supported operators: EQUALS
*
* The device form factor. Valid values are PHONE or TABLET. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The Amazon Resource Name (ARN) of the device instance. *
*
* Supported operators: IN
, NOT_IN
*
* The label of the device instance. *
*
* Supported operators: CONTAINS
*
* The device manufacturer (for example, Apple). *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The device model, such as Apple iPad Air 2 or Google Pixel. *
*
* Supported operators: CONTAINS
, EQUALS
, IN
, NOT_IN
*
* The operating system version (for example, 10.3.2). *
*
* Supported operators: EQUALS
, GREATER_THAN
, GREATER_THAN_OR_EQUALS
,
* IN
, LESS_THAN
, LESS_THAN_OR_EQUALS
, NOT_IN
*
* The device platform. Valid values are ANDROID or IOS. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* Whether the device is enabled for remote access. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Because remote debugging is no longer supported, * this filter is ignored. *
*
* The rule's stringified attribute. For example, specify the value as "\"abc\""
.
*
* The supported operators for each attribute are provided in the following list. *
** The Appium version for the test. *
*
* Supported operators: CONTAINS
*
* The Amazon Resource Name (ARN) of the device (for example,
* arn:aws:devicefarm:us-west-2::device:12345Example
.
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or * TEMPORARY_NOT_AVAILABLE. *
*
* Supported operators: EQUALS
*
* The fleet type. Valid values are PUBLIC or PRIVATE. *
*
* Supported operators: EQUALS
*
* The device form factor. Valid values are PHONE or TABLET. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The Amazon Resource Name (ARN) of the device instance. *
*
* Supported operators: IN
, NOT_IN
*
* The label of the device instance. *
*
* Supported operators: CONTAINS
*
* The device manufacturer (for example, Apple). *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The device model, such as Apple iPad Air 2 or Google Pixel. *
*
* Supported operators: CONTAINS
, EQUALS
, IN
, NOT_IN
*
* The operating system version (for example, 10.3.2). *
*
* Supported operators: EQUALS
, GREATER_THAN
, GREATER_THAN_OR_EQUALS
,
* IN
, LESS_THAN
, LESS_THAN_OR_EQUALS
, NOT_IN
*
* The device platform. Valid values are ANDROID or IOS. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* Whether the device is enabled for remote access. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Because remote debugging is no longer supported, this * filter is ignored. *
*"\"abc\""
.
* * The supported operators for each attribute are provided in the following list. *
** The Appium version for the test. *
*
* Supported operators: CONTAINS
*
* The Amazon Resource Name (ARN) of the device (for example,
* arn:aws:devicefarm:us-west-2::device:12345Example
.
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or * TEMPORARY_NOT_AVAILABLE. *
*
* Supported operators: EQUALS
*
* The fleet type. Valid values are PUBLIC or PRIVATE. *
*
* Supported operators: EQUALS
*
* The device form factor. Valid values are PHONE or TABLET. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The Amazon Resource Name (ARN) of the device instance. *
*
* Supported operators: IN
, NOT_IN
*
* The label of the device instance. *
*
* Supported operators: CONTAINS
*
* The device manufacturer (for example, Apple). *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The device model, such as Apple iPad Air 2 or Google Pixel. *
*
* Supported operators: CONTAINS
, EQUALS
, IN
, NOT_IN
*
* The operating system version (for example, 10.3.2). *
*
* Supported operators: EQUALS
, GREATER_THAN
, GREATER_THAN_OR_EQUALS
,
* IN
, LESS_THAN
, LESS_THAN_OR_EQUALS
, NOT_IN
*
* The device platform. Valid values are ANDROID or IOS. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* Whether the device is enabled for remote access. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Because remote debugging is no longer supported, * this filter is ignored. *
*
* The rule's stringified attribute. For example, specify the value as "\"abc\""
.
*
* The supported operators for each attribute are provided in the following list. *
** The Appium version for the test. *
*
* Supported operators: CONTAINS
*
* The Amazon Resource Name (ARN) of the device (for example,
* arn:aws:devicefarm:us-west-2::device:12345Example
.
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or * TEMPORARY_NOT_AVAILABLE. *
*
* Supported operators: EQUALS
*
* The fleet type. Valid values are PUBLIC or PRIVATE. *
*
* Supported operators: EQUALS
*
* The device form factor. Valid values are PHONE or TABLET. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The Amazon Resource Name (ARN) of the device instance. *
*
* Supported operators: IN
, NOT_IN
*
* The label of the device instance. *
*
* Supported operators: CONTAINS
*
* The device manufacturer (for example, Apple). *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The device model, such as Apple iPad Air 2 or Google Pixel. *
*
* Supported operators: CONTAINS
, EQUALS
, IN
, NOT_IN
*
* The operating system version (for example, 10.3.2). *
*
* Supported operators: EQUALS
, GREATER_THAN
, GREATER_THAN_OR_EQUALS
,
* IN
, LESS_THAN
, LESS_THAN_OR_EQUALS
, NOT_IN
*
* The device platform. Valid values are ANDROID or IOS. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* Whether the device is enabled for remote access. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Because remote debugging is no longer supported, this * filter is ignored. *
*"\"abc\""
.
* * The supported operators for each attribute are provided in the following list. *
** The Appium version for the test. *
*
* Supported operators: CONTAINS
*
* The Amazon Resource Name (ARN) of the device (for example,
* arn:aws:devicefarm:us-west-2::device:12345Example
.
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or * TEMPORARY_NOT_AVAILABLE. *
*
* Supported operators: EQUALS
*
* The fleet type. Valid values are PUBLIC or PRIVATE. *
*
* Supported operators: EQUALS
*
* The device form factor. Valid values are PHONE or TABLET. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The Amazon Resource Name (ARN) of the device instance. *
*
* Supported operators: IN
, NOT_IN
*
* The label of the device instance. *
*
* Supported operators: CONTAINS
*
* The device manufacturer (for example, Apple). *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* The device model, such as Apple iPad Air 2 or Google Pixel. *
*
* Supported operators: CONTAINS
, EQUALS
, IN
, NOT_IN
*
* The operating system version (for example, 10.3.2). *
*
* Supported operators: EQUALS
, GREATER_THAN
, GREATER_THAN_OR_EQUALS
,
* IN
, LESS_THAN
, LESS_THAN_OR_EQUALS
, NOT_IN
*
* The device platform. Valid values are ANDROID or IOS. *
*
* Supported operators: EQUALS
, IN
, NOT_IN
*
* Whether the device is enabled for remote access. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE. *
*
* Supported operators: EQUALS
*
* Because remote debugging is no longer supported, * this filter is ignored. *
** Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported by * each attribute, see the attribute descriptions. *
* * @param operator * Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported * by each attribute, see the attribute descriptions. * @see RuleOperator */ public void setOperator(String operator) { this.operator = operator; } /** ** Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported by * each attribute, see the attribute descriptions. *
* * @return Specifies how Device Farm compares the rule's attribute to the value. For the operators that are * supported by each attribute, see the attribute descriptions. * @see RuleOperator */ public String getOperator() { return this.operator; } /** ** Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported by * each attribute, see the attribute descriptions. *
* * @param operator * Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported * by each attribute, see the attribute descriptions. * @return Returns a reference to this object so that method calls can be chained together. * @see RuleOperator */ public Rule withOperator(String operator) { setOperator(operator); return this; } /** ** Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported by * each attribute, see the attribute descriptions. *
* * @param operator * Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported * by each attribute, see the attribute descriptions. * @see RuleOperator */ public void setOperator(RuleOperator operator) { withOperator(operator); } /** ** Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported by * each attribute, see the attribute descriptions. *
* * @param operator * Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported * by each attribute, see the attribute descriptions. * @return Returns a reference to this object so that method calls can be chained together. * @see RuleOperator */ public Rule withOperator(RuleOperator operator) { this.operator = operator.toString(); return this; } /** ** The rule's value. *
* * @param value * The rule's value. */ public void setValue(String value) { this.value = value; } /** ** The rule's value. *
* * @return The rule's value. */ public String getValue() { return this.value; } /** ** The rule's value. *
* * @param value * The rule's value. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withValue(String value) { setValue(value); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAttribute() != null) sb.append("Attribute: ").append(getAttribute()).append(","); if (getOperator() != null) sb.append("Operator: ").append(getOperator()).append(","); if (getValue() != null) sb.append("Value: ").append(getValue()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Rule == false) return false; Rule other = (Rule) obj; if (other.getAttribute() == null ^ this.getAttribute() == null) return false; if (other.getAttribute() != null && other.getAttribute().equals(this.getAttribute()) == false) return false; if (other.getOperator() == null ^ this.getOperator() == null) return false; if (other.getOperator() != null && other.getOperator().equals(this.getOperator()) == false) return false; if (other.getValue() == null ^ this.getValue() == null) return false; if (other.getValue() != null && other.getValue().equals(this.getValue()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttribute() == null) ? 0 : getAttribute().hashCode()); hashCode = prime * hashCode + ((getOperator() == null) ? 0 : getOperator().hashCode()); hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode()); return hashCode; } @Override public Rule clone() { try { return (Rule) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.devicefarm.model.transform.RuleMarshaller.getInstance().marshall(this, protocolMarshaller); } }