All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.devicefarm.model.Radios Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Device Farm module holds the client classes that are used for communicating with AWS Device Farm

The newest version!
/*
 * Copyright 2010-2016 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;

/**
 * 

* Represents the set of radios and their states on a device. Examples of radios * include Wi-Fi, GPS, Bluetooth, and NFC. *

*/ public class Radios implements Serializable, Cloneable { /** *

* True if Wi-Fi is enabled at the beginning of the test; otherwise, false. *

*/ private Boolean wifi; /** *

* True if Bluetooth is enabled at the beginning of the test; otherwise, * false. *

*/ private Boolean bluetooth; /** *

* True if NFC is enabled at the beginning of the test; otherwise, false. *

*/ private Boolean nfc; /** *

* True if GPS is enabled at the beginning of the test; otherwise, false. *

*/ private Boolean gps; /** *

* True if Wi-Fi is enabled at the beginning of the test; otherwise, false. *

* * @param wifi * True if Wi-Fi is enabled at the beginning of the test; otherwise, * false. */ public void setWifi(Boolean wifi) { this.wifi = wifi; } /** *

* True if Wi-Fi is enabled at the beginning of the test; otherwise, false. *

* * @return True if Wi-Fi is enabled at the beginning of the test; otherwise, * false. */ public Boolean getWifi() { return this.wifi; } /** *

* True if Wi-Fi is enabled at the beginning of the test; otherwise, false. *

* * @param wifi * True if Wi-Fi is enabled at the beginning of the test; otherwise, * false. * @return Returns a reference to this object so that method calls can be * chained together. */ public Radios withWifi(Boolean wifi) { setWifi(wifi); return this; } /** *

* True if Wi-Fi is enabled at the beginning of the test; otherwise, false. *

* * @return True if Wi-Fi is enabled at the beginning of the test; otherwise, * false. */ public Boolean isWifi() { return this.wifi; } /** *

* True if Bluetooth is enabled at the beginning of the test; otherwise, * false. *

* * @param bluetooth * True if Bluetooth is enabled at the beginning of the test; * otherwise, false. */ public void setBluetooth(Boolean bluetooth) { this.bluetooth = bluetooth; } /** *

* True if Bluetooth is enabled at the beginning of the test; otherwise, * false. *

* * @return True if Bluetooth is enabled at the beginning of the test; * otherwise, false. */ public Boolean getBluetooth() { return this.bluetooth; } /** *

* True if Bluetooth is enabled at the beginning of the test; otherwise, * false. *

* * @param bluetooth * True if Bluetooth is enabled at the beginning of the test; * otherwise, false. * @return Returns a reference to this object so that method calls can be * chained together. */ public Radios withBluetooth(Boolean bluetooth) { setBluetooth(bluetooth); return this; } /** *

* True if Bluetooth is enabled at the beginning of the test; otherwise, * false. *

* * @return True if Bluetooth is enabled at the beginning of the test; * otherwise, false. */ public Boolean isBluetooth() { return this.bluetooth; } /** *

* True if NFC is enabled at the beginning of the test; otherwise, false. *

* * @param nfc * True if NFC is enabled at the beginning of the test; otherwise, * false. */ public void setNfc(Boolean nfc) { this.nfc = nfc; } /** *

* True if NFC is enabled at the beginning of the test; otherwise, false. *

* * @return True if NFC is enabled at the beginning of the test; otherwise, * false. */ public Boolean getNfc() { return this.nfc; } /** *

* True if NFC is enabled at the beginning of the test; otherwise, false. *

* * @param nfc * True if NFC is enabled at the beginning of the test; otherwise, * false. * @return Returns a reference to this object so that method calls can be * chained together. */ public Radios withNfc(Boolean nfc) { setNfc(nfc); return this; } /** *

* True if NFC is enabled at the beginning of the test; otherwise, false. *

* * @return True if NFC is enabled at the beginning of the test; otherwise, * false. */ public Boolean isNfc() { return this.nfc; } /** *

* True if GPS is enabled at the beginning of the test; otherwise, false. *

* * @param gps * True if GPS is enabled at the beginning of the test; otherwise, * false. */ public void setGps(Boolean gps) { this.gps = gps; } /** *

* True if GPS is enabled at the beginning of the test; otherwise, false. *

* * @return True if GPS is enabled at the beginning of the test; otherwise, * false. */ public Boolean getGps() { return this.gps; } /** *

* True if GPS is enabled at the beginning of the test; otherwise, false. *

* * @param gps * True if GPS is enabled at the beginning of the test; otherwise, * false. * @return Returns a reference to this object so that method calls can be * chained together. */ public Radios withGps(Boolean gps) { setGps(gps); return this; } /** *

* True if GPS is enabled at the beginning of the test; otherwise, false. *

* * @return True if GPS is enabled at the beginning of the test; otherwise, * false. */ public Boolean isGps() { return this.gps; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getWifi() != null) sb.append("Wifi: " + getWifi() + ","); if (getBluetooth() != null) sb.append("Bluetooth: " + getBluetooth() + ","); if (getNfc() != null) sb.append("Nfc: " + getNfc() + ","); if (getGps() != null) sb.append("Gps: " + getGps()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Radios == false) return false; Radios other = (Radios) obj; if (other.getWifi() == null ^ this.getWifi() == null) return false; if (other.getWifi() != null && other.getWifi().equals(this.getWifi()) == false) return false; if (other.getBluetooth() == null ^ this.getBluetooth() == null) return false; if (other.getBluetooth() != null && other.getBluetooth().equals(this.getBluetooth()) == false) return false; if (other.getNfc() == null ^ this.getNfc() == null) return false; if (other.getNfc() != null && other.getNfc().equals(this.getNfc()) == false) return false; if (other.getGps() == null ^ this.getGps() == null) return false; if (other.getGps() != null && other.getGps().equals(this.getGps()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getWifi() == null) ? 0 : getWifi().hashCode()); hashCode = prime * hashCode + ((getBluetooth() == null) ? 0 : getBluetooth().hashCode()); hashCode = prime * hashCode + ((getNfc() == null) ? 0 : getNfc().hashCode()); hashCode = prime * hashCode + ((getGps() == null) ? 0 : getGps().hashCode()); return hashCode; } @Override public Radios clone() { try { return (Radios) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy