@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getAssessmentTemplateArn() == null) ? 0 : getAssessmentTemplateArn().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getDurationInSeconds() == null) ? 0 : getDurationInSeconds().hashCode()); hashCode = prime * hashCode + ((getRulesPackageArns() == null) ? 0 : getRulesPackageArns().hashCode()); hashCode = prime * hashCode + ((getUserAttributesForFindings() == null) ? 0 : getUserAttributesForFindings().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getStartedAt() == null) ? 0 : getStartedAt().hashCode()); hashCode = prime * hashCode + ((getCompletedAt() == null) ? 0 : getCompletedAt().hashCode()); hashCode = prime * hashCode + ((getStateChangedAt() == null) ? 0 : getStateChangedAt().hashCode()); hashCode = prime * hashCode + ((getDataCollected() == null) ? 0 : getDataCollected().hashCode()); hashCode = prime * hashCode + ((getStateChanges() == null) ? 0 : getStateChanges().hashCode()); hashCode = prime * hashCode + ((getNotifications() == null) ? 0 : getNotifications().hashCode()); hashCode = prime * hashCode + ((getFindingCounts() == null) ? 0 : getFindingCounts().hashCode()); return hashCode; }
public AssessmentRun unmarshall(JsonUnmarshallerContext context) throws Exception { AssessmentRun assessmentRun = new AssessmentRun(); if (context.testExpression("arn", targetDepth)) { context.nextToken(); assessmentRun.setArn(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRun.setName(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRun.setAssessmentTemplateArn(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRun.setState(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRun.setDurationInSeconds(context.getUnmarshaller(Integer.class).unmarshall(context)); assessmentRun.setRulesPackageArns(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); assessmentRun.setUserAttributesForFindings(new ListUnmarshaller<Attribute>(AttributeJsonUnmarshaller.getInstance()).unmarshall(context)); assessmentRun.setCreatedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); assessmentRun.setStartedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); assessmentRun.setCompletedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); assessmentRun.setStateChangedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); assessmentRun.setDataCollected(context.getUnmarshaller(Boolean.class).unmarshall(context)); assessmentRun.setStateChanges(new ListUnmarshaller<AssessmentRunStateChange>(AssessmentRunStateChangeJsonUnmarshaller.getInstance())
public AssessmentRun unmarshall(JsonUnmarshallerContext context) throws Exception { AssessmentRun assessmentRun = new AssessmentRun(); if (context.testExpression("arn", targetDepth)) { context.nextToken(); assessmentRun.setArn(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRun.setName(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRun.setAssessmentTemplateArn(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRun.setState(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRun.setDurationInSeconds(context.getUnmarshaller(Integer.class).unmarshall(context)); assessmentRun.setRulesPackageArns(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); assessmentRun.setUserAttributesForFindings(new ListUnmarshaller<Attribute>(AttributeJsonUnmarshaller.getInstance()).unmarshall(context)); assessmentRun.setCreatedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); assessmentRun.setStartedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); assessmentRun.setCompletedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); assessmentRun.setStateChangedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); assessmentRun.setDataCollected(context.getUnmarshaller(Boolean.class).unmarshall(context)); assessmentRun.setStateChanges(new ListUnmarshaller<AssessmentRunStateChange>(AssessmentRunStateChangeJsonUnmarshaller.getInstance())
return false; AssessmentRun other = (AssessmentRun) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getAssessmentTemplateArn() == null ^ this.getAssessmentTemplateArn() == null) return false; if (other.getAssessmentTemplateArn() != null && other.getAssessmentTemplateArn().equals(this.getAssessmentTemplateArn()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getDurationInSeconds() == null ^ this.getDurationInSeconds() == null) return false; if (other.getDurationInSeconds() != null && other.getDurationInSeconds().equals(this.getDurationInSeconds()) == 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.getUserAttributesForFindings() == null ^ this.getUserAttributesForFindings() == null) return false; if (other.getUserAttributesForFindings() != null && other.getUserAttributesForFindings().equals(this.getUserAttributesForFindings()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getAssessmentTemplateArn() != null) sb.append("AssessmentTemplateArn: ").append(getAssessmentTemplateArn()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getDurationInSeconds() != null) sb.append("DurationInSeconds: ").append(getDurationInSeconds()).append(","); if (getRulesPackageArns() != null) sb.append("RulesPackageArns: ").append(getRulesPackageArns()).append(","); if (getUserAttributesForFindings() != null) sb.append("UserAttributesForFindings: ").append(getUserAttributesForFindings()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getStartedAt() != null) sb.append("StartedAt: ").append(getStartedAt()).append(","); if (getCompletedAt() != null) sb.append("CompletedAt: ").append(getCompletedAt()).append(","); if (getStateChangedAt() != null) sb.append("StateChangedAt: ").append(getStateChangedAt()).append(","); if (getDataCollected() != null) sb.append("DataCollected: ").append(getDataCollected()).append(","); if (getStateChanges() != null) sb.append("StateChanges: ").append(getStateChanges()).append(","); if (getNotifications() != null)
/** * Marshall the given parameter object. */ public void marshall(AssessmentRun assessmentRun, ProtocolMarshaller protocolMarshaller) { if (assessmentRun == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(assessmentRun.getArn(), ARN_BINDING); protocolMarshaller.marshall(assessmentRun.getName(), NAME_BINDING); protocolMarshaller.marshall(assessmentRun.getAssessmentTemplateArn(), ASSESSMENTTEMPLATEARN_BINDING); protocolMarshaller.marshall(assessmentRun.getState(), STATE_BINDING); protocolMarshaller.marshall(assessmentRun.getDurationInSeconds(), DURATIONINSECONDS_BINDING); protocolMarshaller.marshall(assessmentRun.getRulesPackageArns(), RULESPACKAGEARNS_BINDING); protocolMarshaller.marshall(assessmentRun.getUserAttributesForFindings(), USERATTRIBUTESFORFINDINGS_BINDING); protocolMarshaller.marshall(assessmentRun.getCreatedAt(), CREATEDAT_BINDING); protocolMarshaller.marshall(assessmentRun.getStartedAt(), STARTEDAT_BINDING); protocolMarshaller.marshall(assessmentRun.getCompletedAt(), COMPLETEDAT_BINDING); protocolMarshaller.marshall(assessmentRun.getStateChangedAt(), STATECHANGEDAT_BINDING); protocolMarshaller.marshall(assessmentRun.getDataCollected(), DATACOLLECTED_BINDING); protocolMarshaller.marshall(assessmentRun.getStateChanges(), STATECHANGES_BINDING); protocolMarshaller.marshall(assessmentRun.getNotifications(), NOTIFICATIONS_BINDING); protocolMarshaller.marshall(assessmentRun.getFindingCounts(), FINDINGCOUNTS_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 + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getAssessmentTemplateArn() == null) ? 0 : getAssessmentTemplateArn().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getDurationInSeconds() == null) ? 0 : getDurationInSeconds().hashCode()); hashCode = prime * hashCode + ((getRulesPackageArns() == null) ? 0 : getRulesPackageArns().hashCode()); hashCode = prime * hashCode + ((getUserAttributesForFindings() == null) ? 0 : getUserAttributesForFindings().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getStartedAt() == null) ? 0 : getStartedAt().hashCode()); hashCode = prime * hashCode + ((getCompletedAt() == null) ? 0 : getCompletedAt().hashCode()); hashCode = prime * hashCode + ((getStateChangedAt() == null) ? 0 : getStateChangedAt().hashCode()); hashCode = prime * hashCode + ((getDataCollected() == null) ? 0 : getDataCollected().hashCode()); hashCode = prime * hashCode + ((getStateChanges() == null) ? 0 : getStateChanges().hashCode()); hashCode = prime * hashCode + ((getNotifications() == null) ? 0 : getNotifications().hashCode()); hashCode = prime * hashCode + ((getFindingCounts() == null) ? 0 : getFindingCounts().hashCode()); return hashCode; }
return false; AssessmentRun other = (AssessmentRun) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getAssessmentTemplateArn() == null ^ this.getAssessmentTemplateArn() == null) return false; if (other.getAssessmentTemplateArn() != null && other.getAssessmentTemplateArn().equals(this.getAssessmentTemplateArn()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getDurationInSeconds() == null ^ this.getDurationInSeconds() == null) return false; if (other.getDurationInSeconds() != null && other.getDurationInSeconds().equals(this.getDurationInSeconds()) == 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.getUserAttributesForFindings() == null ^ this.getUserAttributesForFindings() == null) return false; if (other.getUserAttributesForFindings() != null && other.getUserAttributesForFindings().equals(this.getUserAttributesForFindings()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getAssessmentTemplateArn() != null) sb.append("AssessmentTemplateArn: ").append(getAssessmentTemplateArn()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getDurationInSeconds() != null) sb.append("DurationInSeconds: ").append(getDurationInSeconds()).append(","); if (getRulesPackageArns() != null) sb.append("RulesPackageArns: ").append(getRulesPackageArns()).append(","); if (getUserAttributesForFindings() != null) sb.append("UserAttributesForFindings: ").append(getUserAttributesForFindings()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getStartedAt() != null) sb.append("StartedAt: ").append(getStartedAt()).append(","); if (getCompletedAt() != null) sb.append("CompletedAt: ").append(getCompletedAt()).append(","); if (getStateChangedAt() != null) sb.append("StateChangedAt: ").append(getStateChangedAt()).append(","); if (getDataCollected() != null) sb.append("DataCollected: ").append(getDataCollected()).append(","); if (getStateChanges() != null) sb.append("StateChanges: ").append(getStateChanges()).append(","); if (getNotifications() != null)
/** * Marshall the given parameter object. */ public void marshall(AssessmentRun assessmentRun, ProtocolMarshaller protocolMarshaller) { if (assessmentRun == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(assessmentRun.getArn(), ARN_BINDING); protocolMarshaller.marshall(assessmentRun.getName(), NAME_BINDING); protocolMarshaller.marshall(assessmentRun.getAssessmentTemplateArn(), ASSESSMENTTEMPLATEARN_BINDING); protocolMarshaller.marshall(assessmentRun.getState(), STATE_BINDING); protocolMarshaller.marshall(assessmentRun.getDurationInSeconds(), DURATIONINSECONDS_BINDING); protocolMarshaller.marshall(assessmentRun.getRulesPackageArns(), RULESPACKAGEARNS_BINDING); protocolMarshaller.marshall(assessmentRun.getUserAttributesForFindings(), USERATTRIBUTESFORFINDINGS_BINDING); protocolMarshaller.marshall(assessmentRun.getCreatedAt(), CREATEDAT_BINDING); protocolMarshaller.marshall(assessmentRun.getStartedAt(), STARTEDAT_BINDING); protocolMarshaller.marshall(assessmentRun.getCompletedAt(), COMPLETEDAT_BINDING); protocolMarshaller.marshall(assessmentRun.getStateChangedAt(), STATECHANGEDAT_BINDING); protocolMarshaller.marshall(assessmentRun.getDataCollected(), DATACOLLECTED_BINDING); protocolMarshaller.marshall(assessmentRun.getStateChanges(), STATECHANGES_BINDING); protocolMarshaller.marshall(assessmentRun.getNotifications(), NOTIFICATIONS_BINDING); protocolMarshaller.marshall(assessmentRun.getFindingCounts(), FINDINGCOUNTS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }