@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNamePattern() == null) ? 0 : getNamePattern().hashCode()); hashCode = prime * hashCode + ((getStates() == null) ? 0 : getStates().hashCode()); hashCode = prime * hashCode + ((getDurationRange() == null) ? 0 : getDurationRange().hashCode()); hashCode = prime * hashCode + ((getRulesPackageArns() == null) ? 0 : getRulesPackageArns().hashCode()); hashCode = prime * hashCode + ((getStartTimeRange() == null) ? 0 : getStartTimeRange().hashCode()); hashCode = prime * hashCode + ((getCompletionTimeRange() == null) ? 0 : getCompletionTimeRange().hashCode()); hashCode = prime * hashCode + ((getStateChangeTimeRange() == null) ? 0 : getStateChangeTimeRange().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAssessmentTemplateArns() == null) ? 0 : getAssessmentTemplateArns().hashCode()); hashCode = prime * hashCode + ((getFilter() == null) ? 0 : getFilter().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); return hashCode; }
/** * <p> * For a record to match a filter, one of the values specified for this data type property must be the exact match * of the value of the <b>assessmentRunState</b> property of the <a>AssessmentRun</a> data type. * </p> * * @param states * For a record to match a filter, one of the values specified for this data type property must be the exact * match of the value of the <b>assessmentRunState</b> property of the <a>AssessmentRun</a> data type. * @return Returns a reference to this object so that method calls can be chained together. * @see AssessmentRunState */ public AssessmentRunFilter withStates(AssessmentRunState... states) { java.util.ArrayList<String> statesCopy = new java.util.ArrayList<String>(states.length); for (AssessmentRunState value : states) { statesCopy.add(value.toString()); } if (getStates() == null) { setStates(statesCopy); } else { getStates().addAll(statesCopy); } return this; }
public AssessmentRunFilter unmarshall(JsonUnmarshallerContext context) throws Exception { AssessmentRunFilter assessmentRunFilter = new AssessmentRunFilter(); if (context.testExpression("namePattern", targetDepth)) { context.nextToken(); assessmentRunFilter.setNamePattern(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRunFilter.setStates(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); assessmentRunFilter.setDurationRange(DurationRangeJsonUnmarshaller.getInstance().unmarshall(context)); assessmentRunFilter.setRulesPackageArns(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); assessmentRunFilter.setStartTimeRange(TimestampRangeJsonUnmarshaller.getInstance().unmarshall(context)); assessmentRunFilter.setCompletionTimeRange(TimestampRangeJsonUnmarshaller.getInstance().unmarshall(context)); assessmentRunFilter.setStateChangeTimeRange(TimestampRangeJsonUnmarshaller.getInstance().unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListAssessmentRunsRequest == false) return false; ListAssessmentRunsRequest other = (ListAssessmentRunsRequest) obj; if (other.getAssessmentTemplateArns() == null ^ this.getAssessmentTemplateArns() == null) return false; if (other.getAssessmentTemplateArns() != null && other.getAssessmentTemplateArns().equals(this.getAssessmentTemplateArns()) == false) return false; if (other.getFilter() == null ^ this.getFilter() == null) return false; if (other.getFilter() != null && other.getFilter().equals(this.getFilter()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getMaxResults() == null ^ this.getMaxResults() == null) return false; if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false) return false; return true; }
public AssessmentRunFilter unmarshall(JsonUnmarshallerContext context) throws Exception { AssessmentRunFilter assessmentRunFilter = new AssessmentRunFilter(); if (context.testExpression("namePattern", targetDepth)) { context.nextToken(); assessmentRunFilter.setNamePattern(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRunFilter.setStates(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); assessmentRunFilter.setDurationRange(DurationRangeJsonUnmarshaller.getInstance().unmarshall(context)); assessmentRunFilter.setRulesPackageArns(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); assessmentRunFilter.setStartTimeRange(TimestampRangeJsonUnmarshaller.getInstance().unmarshall(context)); assessmentRunFilter.setCompletionTimeRange(TimestampRangeJsonUnmarshaller.getInstance().unmarshall(context)); assessmentRunFilter.setStateChangeTimeRange(TimestampRangeJsonUnmarshaller.getInstance().unmarshall(context));
/** * <p> * For a record to match a filter, one of the values specified for this data type property must be the exact match * of the value of the <b>assessmentRunState</b> property of the <a>AssessmentRun</a> data type. * </p> * * @param states * For a record to match a filter, one of the values specified for this data type property must be the exact * match of the value of the <b>assessmentRunState</b> property of the <a>AssessmentRun</a> data type. * @return Returns a reference to this object so that method calls can be chained together. * @see AssessmentRunState */ public AssessmentRunFilter withStates(AssessmentRunState... states) { java.util.ArrayList<String> statesCopy = new java.util.ArrayList<String>(states.length); for (AssessmentRunState value : states) { statesCopy.add(value.toString()); } if (getStates() == null) { setStates(statesCopy); } else { getStates().addAll(statesCopy); } return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListAssessmentRunsRequest == false) return false; ListAssessmentRunsRequest other = (ListAssessmentRunsRequest) obj; if (other.getAssessmentTemplateArns() == null ^ this.getAssessmentTemplateArns() == null) return false; if (other.getAssessmentTemplateArns() != null && other.getAssessmentTemplateArns().equals(this.getAssessmentTemplateArns()) == false) return false; if (other.getFilter() == null ^ this.getFilter() == null) return false; if (other.getFilter() != null && other.getFilter().equals(this.getFilter()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getMaxResults() == null ^ this.getMaxResults() == null) return false; if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false) return false; return true; }
return false; AssessmentRunFilter other = (AssessmentRunFilter) obj; if (other.getNamePattern() == null ^ this.getNamePattern() == null) return false; if (other.getNamePattern() != null && other.getNamePattern().equals(this.getNamePattern()) == false) return false; if (other.getStates() == null ^ this.getStates() == null) return false; if (other.getStates() != null && other.getStates().equals(this.getStates()) == false) return false; if (other.getDurationRange() == null ^ this.getDurationRange() == null) return false; if (other.getDurationRange() != null && other.getDurationRange().equals(this.getDurationRange()) == false) return false; if (other.getRulesPackageArns() == null ^ this.getRulesPackageArns() == null) return false; if (other.getRulesPackageArns() != null && other.getRulesPackageArns().equals(this.getRulesPackageArns()) == false) return false; if (other.getStartTimeRange() == null ^ this.getStartTimeRange() == null) return false; if (other.getStartTimeRange() != null && other.getStartTimeRange().equals(this.getStartTimeRange()) == false) return false; if (other.getCompletionTimeRange() == null ^ this.getCompletionTimeRange() == null) return false; if (other.getCompletionTimeRange() != null && other.getCompletionTimeRange().equals(this.getCompletionTimeRange()) == false) return false; if (other.getStateChangeTimeRange() == null ^ this.getStateChangeTimeRange() == null) return false; if (other.getStateChangeTimeRange() != null && other.getStateChangeTimeRange().equals(this.getStateChangeTimeRange()) == false)
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAssessmentTemplateArns() == null) ? 0 : getAssessmentTemplateArns().hashCode()); hashCode = prime * hashCode + ((getFilter() == null) ? 0 : getFilter().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().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 (getNamePattern() != null) sb.append("NamePattern: ").append(getNamePattern()).append(","); if (getStates() != null) sb.append("States: ").append(getStates()).append(","); if (getDurationRange() != null) sb.append("DurationRange: ").append(getDurationRange()).append(","); if (getRulesPackageArns() != null) sb.append("RulesPackageArns: ").append(getRulesPackageArns()).append(","); if (getStartTimeRange() != null) sb.append("StartTimeRange: ").append(getStartTimeRange()).append(","); if (getCompletionTimeRange() != null) sb.append("CompletionTimeRange: ").append(getCompletionTimeRange()).append(","); if (getStateChangeTimeRange() != null) sb.append("StateChangeTimeRange: ").append(getStateChangeTimeRange()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(AssessmentRunFilter assessmentRunFilter, ProtocolMarshaller protocolMarshaller) { if (assessmentRunFilter == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(assessmentRunFilter.getNamePattern(), NAMEPATTERN_BINDING); protocolMarshaller.marshall(assessmentRunFilter.getStates(), STATES_BINDING); protocolMarshaller.marshall(assessmentRunFilter.getDurationRange(), DURATIONRANGE_BINDING); protocolMarshaller.marshall(assessmentRunFilter.getRulesPackageArns(), RULESPACKAGEARNS_BINDING); protocolMarshaller.marshall(assessmentRunFilter.getStartTimeRange(), STARTTIMERANGE_BINDING); protocolMarshaller.marshall(assessmentRunFilter.getCompletionTimeRange(), COMPLETIONTIMERANGE_BINDING); protocolMarshaller.marshall(assessmentRunFilter.getStateChangeTimeRange(), STATECHANGETIMERANGE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNamePattern() == null) ? 0 : getNamePattern().hashCode()); hashCode = prime * hashCode + ((getStates() == null) ? 0 : getStates().hashCode()); hashCode = prime * hashCode + ((getDurationRange() == null) ? 0 : getDurationRange().hashCode()); hashCode = prime * hashCode + ((getRulesPackageArns() == null) ? 0 : getRulesPackageArns().hashCode()); hashCode = prime * hashCode + ((getStartTimeRange() == null) ? 0 : getStartTimeRange().hashCode()); hashCode = prime * hashCode + ((getCompletionTimeRange() == null) ? 0 : getCompletionTimeRange().hashCode()); hashCode = prime * hashCode + ((getStateChangeTimeRange() == null) ? 0 : getStateChangeTimeRange().hashCode()); return hashCode; }
return false; AssessmentRunFilter other = (AssessmentRunFilter) obj; if (other.getNamePattern() == null ^ this.getNamePattern() == null) return false; if (other.getNamePattern() != null && other.getNamePattern().equals(this.getNamePattern()) == false) return false; if (other.getStates() == null ^ this.getStates() == null) return false; if (other.getStates() != null && other.getStates().equals(this.getStates()) == false) return false; if (other.getDurationRange() == null ^ this.getDurationRange() == null) return false; if (other.getDurationRange() != null && other.getDurationRange().equals(this.getDurationRange()) == false) return false; if (other.getRulesPackageArns() == null ^ this.getRulesPackageArns() == null) return false; if (other.getRulesPackageArns() != null && other.getRulesPackageArns().equals(this.getRulesPackageArns()) == false) return false; if (other.getStartTimeRange() == null ^ this.getStartTimeRange() == null) return false; if (other.getStartTimeRange() != null && other.getStartTimeRange().equals(this.getStartTimeRange()) == false) return false; if (other.getCompletionTimeRange() == null ^ this.getCompletionTimeRange() == null) return false; if (other.getCompletionTimeRange() != null && other.getCompletionTimeRange().equals(this.getCompletionTimeRange()) == false) return false; if (other.getStateChangeTimeRange() == null ^ this.getStateChangeTimeRange() == null) return false; if (other.getStateChangeTimeRange() != null && other.getStateChangeTimeRange().equals(this.getStateChangeTimeRange()) == false)
/** * 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 (getNamePattern() != null) sb.append("NamePattern: ").append(getNamePattern()).append(","); if (getStates() != null) sb.append("States: ").append(getStates()).append(","); if (getDurationRange() != null) sb.append("DurationRange: ").append(getDurationRange()).append(","); if (getRulesPackageArns() != null) sb.append("RulesPackageArns: ").append(getRulesPackageArns()).append(","); if (getStartTimeRange() != null) sb.append("StartTimeRange: ").append(getStartTimeRange()).append(","); if (getCompletionTimeRange() != null) sb.append("CompletionTimeRange: ").append(getCompletionTimeRange()).append(","); if (getStateChangeTimeRange() != null) sb.append("StateChangeTimeRange: ").append(getStateChangeTimeRange()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(AssessmentRunFilter assessmentRunFilter, ProtocolMarshaller protocolMarshaller) { if (assessmentRunFilter == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(assessmentRunFilter.getNamePattern(), NAMEPATTERN_BINDING); protocolMarshaller.marshall(assessmentRunFilter.getStates(), STATES_BINDING); protocolMarshaller.marshall(assessmentRunFilter.getDurationRange(), DURATIONRANGE_BINDING); protocolMarshaller.marshall(assessmentRunFilter.getRulesPackageArns(), RULESPACKAGEARNS_BINDING); protocolMarshaller.marshall(assessmentRunFilter.getStartTimeRange(), STARTTIMERANGE_BINDING); protocolMarshaller.marshall(assessmentRunFilter.getCompletionTimeRange(), COMPLETIONTIMERANGE_BINDING); protocolMarshaller.marshall(assessmentRunFilter.getStateChangeTimeRange(), STATECHANGETIMERANGE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }