@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAlarmName() == null) ? 0 : getAlarmName().hashCode()); hashCode = prime * hashCode + ((getAlarmARN() == null) ? 0 : getAlarmARN().hashCode()); return hashCode; }
/** * <p> * The Amazon Resource Name (ARN) of the alarm. * </p> * * @param alarmARN * The Amazon Resource Name (ARN) of the alarm. * @return Returns a reference to this object so that method calls can be chained together. */ public Alarm withAlarmARN(String alarmARN) { setAlarmARN(alarmARN); return this; }
/** * <p> * The name of the alarm. * </p> * * @param alarmName * The name of the alarm. * @return Returns a reference to this object so that method calls can be chained together. */ public Alarm withAlarmName(String alarmName) { setAlarmName(alarmName); return this; }
public Alarm unmarshall(StaxUnmarshallerContext context) throws Exception { Alarm alarm = new Alarm(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return alarm; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("AlarmName", targetDepth)) { alarm.setAlarmName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("AlarmARN", targetDepth)) { alarm.setAlarmARN(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return alarm; } } } }
public Alarm unmarshall(StaxUnmarshallerContext context) throws Exception { Alarm alarm = new Alarm(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("AlarmName", targetDepth)) { alarm.setAlarmName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("AlarmARN", targetDepth)) { alarm.setAlarmARN(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return alarm; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Alarm == false) return false; Alarm other = (Alarm) obj; if (other.getAlarmName() == null ^ this.getAlarmName() == null) return false; if (other.getAlarmName() != null && other.getAlarmName().equals(this.getAlarmName()) == false) return false; if (other.getAlarmARN() == null ^ this.getAlarmARN() == null) return false; if (other.getAlarmARN() != null && other.getAlarmARN().equals(this.getAlarmARN()) == false) return false; return true; }
/** * 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 (getAlarmName() != null) sb.append("AlarmName: ").append(getAlarmName()).append(","); if (getAlarmARN() != null) sb.append("AlarmARN: ").append(getAlarmARN()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAlarmName() == null) ? 0 : getAlarmName().hashCode()); hashCode = prime * hashCode + ((getAlarmARN() == null) ? 0 : getAlarmARN().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Alarm == false) return false; Alarm other = (Alarm) obj; if (other.getAlarmName() == null ^ this.getAlarmName() == null) return false; if (other.getAlarmName() != null && other.getAlarmName().equals(this.getAlarmName()) == false) return false; if (other.getAlarmARN() == null ^ this.getAlarmARN() == null) return false; if (other.getAlarmARN() != null && other.getAlarmARN().equals(this.getAlarmARN()) == false) return false; return true; } }
/** * 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 (getAlarmName() != null) sb.append("AlarmName: " + getAlarmName() + ","); if (getAlarmARN() != null) sb.append("AlarmARN: " + getAlarmARN()); sb.append("}"); return sb.toString(); }
public void marshall(Alarm _alarm, Request<?> request, String _prefix) { String prefix; if (_alarm.getAlarmName() != null) { prefix = _prefix + "AlarmName"; String alarmName = _alarm.getAlarmName(); request.addParameter(prefix, StringUtils.fromString(alarmName)); } if (_alarm.getAlarmARN() != null) { prefix = _prefix + "AlarmARN"; String alarmARN = _alarm.getAlarmARN(); request.addParameter(prefix, StringUtils.fromString(alarmARN)); } }