@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ScalingTrigger == false) return false; ScalingTrigger other = (ScalingTrigger) obj; if (other.getCloudWatchAlarmDefinition() == null ^ this.getCloudWatchAlarmDefinition() == null) return false; if (other.getCloudWatchAlarmDefinition() != null && other.getCloudWatchAlarmDefinition().equals(this.getCloudWatchAlarmDefinition()) == false) return false; return true; }
/** * <p> * The definition of a CloudWatch metric alarm. When the defined alarm conditions are met along with other trigger * parameters, scaling activity begins. * </p> * * @param cloudWatchAlarmDefinition * The definition of a CloudWatch metric alarm. When the defined alarm conditions are met along with other * trigger parameters, scaling activity begins. * @return Returns a reference to this object so that method calls can be chained together. */ public ScalingTrigger withCloudWatchAlarmDefinition(CloudWatchAlarmDefinition cloudWatchAlarmDefinition) { setCloudWatchAlarmDefinition(cloudWatchAlarmDefinition); return this; }
public ScalingTrigger unmarshall(JsonUnmarshallerContext context) throws Exception { ScalingTrigger scalingTrigger = new ScalingTrigger(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return null; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("CloudWatchAlarmDefinition", targetDepth)) { context.nextToken(); scalingTrigger.setCloudWatchAlarmDefinition(CloudWatchAlarmDefinitionJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return scalingTrigger; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getAction() == null) ? 0 : getAction().hashCode()); hashCode = prime * hashCode + ((getTrigger() == null) ? 0 : getTrigger().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ScalingRule == false) return false; ScalingRule other = (ScalingRule) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getAction() == null ^ this.getAction() == null) return false; if (other.getAction() != null && other.getAction().equals(this.getAction()) == false) return false; if (other.getTrigger() == null ^ this.getTrigger() == null) return false; if (other.getTrigger() != null && other.getTrigger().equals(this.getTrigger()) == false) return false; return true; }
public ScalingTrigger unmarshall(JsonUnmarshallerContext context) throws Exception { ScalingTrigger scalingTrigger = new ScalingTrigger(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return null; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("CloudWatchAlarmDefinition", targetDepth)) { context.nextToken(); scalingTrigger.setCloudWatchAlarmDefinition(CloudWatchAlarmDefinitionJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return scalingTrigger; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getAction() == null) ? 0 : getAction().hashCode()); hashCode = prime * hashCode + ((getTrigger() == null) ? 0 : getTrigger().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ScalingRule == false) return false; ScalingRule other = (ScalingRule) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getAction() == null ^ this.getAction() == null) return false; if (other.getAction() != null && other.getAction().equals(this.getAction()) == false) return false; if (other.getTrigger() == null ^ this.getTrigger() == null) return false; if (other.getTrigger() != null && other.getTrigger().equals(this.getTrigger()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCloudWatchAlarmDefinition() == null) ? 0 : getCloudWatchAlarmDefinition().hashCode()); return hashCode; }
/** * <p> * The definition of a CloudWatch metric alarm. When the defined alarm conditions are met along with other trigger * parameters, scaling activity begins. * </p> * * @param cloudWatchAlarmDefinition * The definition of a CloudWatch metric alarm. When the defined alarm conditions are met along with other * trigger parameters, scaling activity begins. * @return Returns a reference to this object so that method calls can be chained together. */ public ScalingTrigger withCloudWatchAlarmDefinition(CloudWatchAlarmDefinition cloudWatchAlarmDefinition) { setCloudWatchAlarmDefinition(cloudWatchAlarmDefinition); 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 (getCloudWatchAlarmDefinition() != null) sb.append("CloudWatchAlarmDefinition: ").append(getCloudWatchAlarmDefinition()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(ScalingTrigger scalingTrigger, ProtocolMarshaller protocolMarshaller) { if (scalingTrigger == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(scalingTrigger.getCloudWatchAlarmDefinition(), CLOUDWATCHALARMDEFINITION_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ScalingTrigger == false) return false; ScalingTrigger other = (ScalingTrigger) obj; if (other.getCloudWatchAlarmDefinition() == null ^ this.getCloudWatchAlarmDefinition() == null) return false; if (other.getCloudWatchAlarmDefinition() != null && other.getCloudWatchAlarmDefinition().equals(this.getCloudWatchAlarmDefinition()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCloudWatchAlarmDefinition() == null) ? 0 : getCloudWatchAlarmDefinition().hashCode()); return hashCode; }
/** * 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 (getCloudWatchAlarmDefinition() != null) sb.append("CloudWatchAlarmDefinition: ").append(getCloudWatchAlarmDefinition()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(ScalingTrigger scalingTrigger, ProtocolMarshaller protocolMarshaller) { if (scalingTrigger == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(scalingTrigger.getCloudWatchAlarmDefinition(), CLOUDWATCHALARMDEFINITION_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }