com.amazonaws.services.iotwireless.model.CellTowers Maven / Gradle / Ivy
Show all versions of aws-java-sdk-iotwireless Show documentation
/*
* Copyright 2019-2024 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.iotwireless.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The cell towers that were used to perform the measurements.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CellTowers implements Serializable, Cloneable, StructuredPojo {
/**
*
* GSM object information.
*
*/
private java.util.List gsm;
/**
*
* WCDMA object information.
*
*/
private java.util.List wcdma;
/**
*
* TD-SCDMA object information.
*
*/
private java.util.List tdscdma;
/**
*
* LTE object information.
*
*/
private java.util.List lte;
/**
*
* CDMA object information.
*
*/
private java.util.List cdma;
/**
*
* GSM object information.
*
*
* @return GSM object information.
*/
public java.util.List getGsm() {
return gsm;
}
/**
*
* GSM object information.
*
*
* @param gsm
* GSM object information.
*/
public void setGsm(java.util.Collection gsm) {
if (gsm == null) {
this.gsm = null;
return;
}
this.gsm = new java.util.ArrayList(gsm);
}
/**
*
* GSM object information.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setGsm(java.util.Collection)} or {@link #withGsm(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param gsm
* GSM object information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CellTowers withGsm(GsmObj... gsm) {
if (this.gsm == null) {
setGsm(new java.util.ArrayList(gsm.length));
}
for (GsmObj ele : gsm) {
this.gsm.add(ele);
}
return this;
}
/**
*
* GSM object information.
*
*
* @param gsm
* GSM object information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CellTowers withGsm(java.util.Collection gsm) {
setGsm(gsm);
return this;
}
/**
*
* WCDMA object information.
*
*
* @return WCDMA object information.
*/
public java.util.List getWcdma() {
return wcdma;
}
/**
*
* WCDMA object information.
*
*
* @param wcdma
* WCDMA object information.
*/
public void setWcdma(java.util.Collection wcdma) {
if (wcdma == null) {
this.wcdma = null;
return;
}
this.wcdma = new java.util.ArrayList(wcdma);
}
/**
*
* WCDMA object information.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setWcdma(java.util.Collection)} or {@link #withWcdma(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param wcdma
* WCDMA object information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CellTowers withWcdma(WcdmaObj... wcdma) {
if (this.wcdma == null) {
setWcdma(new java.util.ArrayList(wcdma.length));
}
for (WcdmaObj ele : wcdma) {
this.wcdma.add(ele);
}
return this;
}
/**
*
* WCDMA object information.
*
*
* @param wcdma
* WCDMA object information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CellTowers withWcdma(java.util.Collection wcdma) {
setWcdma(wcdma);
return this;
}
/**
*
* TD-SCDMA object information.
*
*
* @return TD-SCDMA object information.
*/
public java.util.List getTdscdma() {
return tdscdma;
}
/**
*
* TD-SCDMA object information.
*
*
* @param tdscdma
* TD-SCDMA object information.
*/
public void setTdscdma(java.util.Collection tdscdma) {
if (tdscdma == null) {
this.tdscdma = null;
return;
}
this.tdscdma = new java.util.ArrayList(tdscdma);
}
/**
*
* TD-SCDMA object information.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTdscdma(java.util.Collection)} or {@link #withTdscdma(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param tdscdma
* TD-SCDMA object information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CellTowers withTdscdma(TdscdmaObj... tdscdma) {
if (this.tdscdma == null) {
setTdscdma(new java.util.ArrayList(tdscdma.length));
}
for (TdscdmaObj ele : tdscdma) {
this.tdscdma.add(ele);
}
return this;
}
/**
*
* TD-SCDMA object information.
*
*
* @param tdscdma
* TD-SCDMA object information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CellTowers withTdscdma(java.util.Collection tdscdma) {
setTdscdma(tdscdma);
return this;
}
/**
*
* LTE object information.
*
*
* @return LTE object information.
*/
public java.util.List getLte() {
return lte;
}
/**
*
* LTE object information.
*
*
* @param lte
* LTE object information.
*/
public void setLte(java.util.Collection lte) {
if (lte == null) {
this.lte = null;
return;
}
this.lte = new java.util.ArrayList(lte);
}
/**
*
* LTE object information.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setLte(java.util.Collection)} or {@link #withLte(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param lte
* LTE object information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CellTowers withLte(LteObj... lte) {
if (this.lte == null) {
setLte(new java.util.ArrayList(lte.length));
}
for (LteObj ele : lte) {
this.lte.add(ele);
}
return this;
}
/**
*
* LTE object information.
*
*
* @param lte
* LTE object information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CellTowers withLte(java.util.Collection lte) {
setLte(lte);
return this;
}
/**
*
* CDMA object information.
*
*
* @return CDMA object information.
*/
public java.util.List getCdma() {
return cdma;
}
/**
*
* CDMA object information.
*
*
* @param cdma
* CDMA object information.
*/
public void setCdma(java.util.Collection cdma) {
if (cdma == null) {
this.cdma = null;
return;
}
this.cdma = new java.util.ArrayList(cdma);
}
/**
*
* CDMA object information.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCdma(java.util.Collection)} or {@link #withCdma(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param cdma
* CDMA object information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CellTowers withCdma(CdmaObj... cdma) {
if (this.cdma == null) {
setCdma(new java.util.ArrayList(cdma.length));
}
for (CdmaObj ele : cdma) {
this.cdma.add(ele);
}
return this;
}
/**
*
* CDMA object information.
*
*
* @param cdma
* CDMA object information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CellTowers withCdma(java.util.Collection cdma) {
setCdma(cdma);
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 (getGsm() != null)
sb.append("Gsm: ").append(getGsm()).append(",");
if (getWcdma() != null)
sb.append("Wcdma: ").append(getWcdma()).append(",");
if (getTdscdma() != null)
sb.append("Tdscdma: ").append(getTdscdma()).append(",");
if (getLte() != null)
sb.append("Lte: ").append(getLte()).append(",");
if (getCdma() != null)
sb.append("Cdma: ").append(getCdma());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CellTowers == false)
return false;
CellTowers other = (CellTowers) obj;
if (other.getGsm() == null ^ this.getGsm() == null)
return false;
if (other.getGsm() != null && other.getGsm().equals(this.getGsm()) == false)
return false;
if (other.getWcdma() == null ^ this.getWcdma() == null)
return false;
if (other.getWcdma() != null && other.getWcdma().equals(this.getWcdma()) == false)
return false;
if (other.getTdscdma() == null ^ this.getTdscdma() == null)
return false;
if (other.getTdscdma() != null && other.getTdscdma().equals(this.getTdscdma()) == false)
return false;
if (other.getLte() == null ^ this.getLte() == null)
return false;
if (other.getLte() != null && other.getLte().equals(this.getLte()) == false)
return false;
if (other.getCdma() == null ^ this.getCdma() == null)
return false;
if (other.getCdma() != null && other.getCdma().equals(this.getCdma()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getGsm() == null) ? 0 : getGsm().hashCode());
hashCode = prime * hashCode + ((getWcdma() == null) ? 0 : getWcdma().hashCode());
hashCode = prime * hashCode + ((getTdscdma() == null) ? 0 : getTdscdma().hashCode());
hashCode = prime * hashCode + ((getLte() == null) ? 0 : getLte().hashCode());
hashCode = prime * hashCode + ((getCdma() == null) ? 0 : getCdma().hashCode());
return hashCode;
}
@Override
public CellTowers clone() {
try {
return (CellTowers) 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.iotwireless.model.transform.CellTowersMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}