@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCheckId() == null) ? 0 : getCheckId().hashCode()); hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getResourcesSummary() == null) ? 0 : getResourcesSummary().hashCode()); hashCode = prime * hashCode + ((getCategorySpecificSummary() == null) ? 0 : getCategorySpecificSummary().hashCode()); hashCode = prime * hashCode + ((getFlaggedResources() == null) ? 0 : getFlaggedResources().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResult() == null) ? 0 : getResult().hashCode()); return hashCode; }
/** * <p> * Summary information that relates to the category of the check. Cost Optimizing is the only category that is * currently supported. * </p> * * @param categorySpecificSummary * Summary information that relates to the category of the check. Cost Optimizing is the only category that * is currently supported. * @return Returns a reference to this object so that method calls can be chained together. */ public TrustedAdvisorCheckResult withCategorySpecificSummary(TrustedAdvisorCategorySpecificSummary categorySpecificSummary) { setCategorySpecificSummary(categorySpecificSummary); return this; }
public TrustedAdvisorCheckResult unmarshall(JsonUnmarshallerContext context) throws Exception { TrustedAdvisorCheckResult trustedAdvisorCheckResult = new TrustedAdvisorCheckResult(); if (context.testExpression("checkId", targetDepth)) { context.nextToken(); trustedAdvisorCheckResult.setCheckId(context.getUnmarshaller(String.class).unmarshall(context)); trustedAdvisorCheckResult.setTimestamp(context.getUnmarshaller(String.class).unmarshall(context)); trustedAdvisorCheckResult.setStatus(context.getUnmarshaller(String.class).unmarshall(context)); trustedAdvisorCheckResult.setResourcesSummary(TrustedAdvisorResourcesSummaryJsonUnmarshaller.getInstance().unmarshall(context)); trustedAdvisorCheckResult.setCategorySpecificSummary(TrustedAdvisorCategorySpecificSummaryJsonUnmarshaller.getInstance() .unmarshall(context)); trustedAdvisorCheckResult.setFlaggedResources(new ListUnmarshaller<TrustedAdvisorResourceDetail>( TrustedAdvisorResourceDetailJsonUnmarshaller.getInstance()).unmarshall(context));
List<String> metadata = check.getMetadata(); if(!"OK".equalsIgnoreCase(result.getResult().getStatus())){ CheckVH checkVH = new CheckVH(check,result.getResult().getStatus()); List<Resource> resources = new ArrayList<>(); checkVH.setResources(resources); if( ("ePs02jT06w".equalsIgnoreCase(check.getId()) || "rSs93HQwa1".equalsIgnoreCase(check.getId())) && !result.getResult().getFlaggedResources().isEmpty() ){ int dataSize = result.getResult().getFlaggedResources().get(0).getMetadata().size() ; if(dataSize == metadata.size()+1 && !metadata.contains("Status")){ metadata.add(0, "Status"); result.getResult().getFlaggedResources().forEach( rsrc -> { List<String> data = rsrc.getMetadata();
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeTrustedAdvisorCheckResultResult == false) return false; DescribeTrustedAdvisorCheckResultResult other = (DescribeTrustedAdvisorCheckResultResult) obj; if (other.getResult() == null ^ this.getResult() == null) return false; if (other.getResult() != null && other.getResult().equals(this.getResult()) == false) return false; return true; }
public TrustedAdvisorCheckResult unmarshall(JsonUnmarshallerContext context) throws Exception { TrustedAdvisorCheckResult trustedAdvisorCheckResult = new TrustedAdvisorCheckResult(); if (context.testExpression("checkId", targetDepth)) { context.nextToken(); trustedAdvisorCheckResult.setCheckId(context.getUnmarshaller(String.class).unmarshall(context)); trustedAdvisorCheckResult.setTimestamp(context.getUnmarshaller(String.class).unmarshall(context)); trustedAdvisorCheckResult.setStatus(context.getUnmarshaller(String.class).unmarshall(context)); trustedAdvisorCheckResult.setResourcesSummary(TrustedAdvisorResourcesSummaryJsonUnmarshaller.getInstance().unmarshall(context)); trustedAdvisorCheckResult.setCategorySpecificSummary(TrustedAdvisorCategorySpecificSummaryJsonUnmarshaller.getInstance() .unmarshall(context)); trustedAdvisorCheckResult.setFlaggedResources(new ListUnmarshaller<TrustedAdvisorResourceDetail>( TrustedAdvisorResourceDetailJsonUnmarshaller.getInstance()).unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeTrustedAdvisorCheckResultResult == false) return false; DescribeTrustedAdvisorCheckResultResult other = (DescribeTrustedAdvisorCheckResultResult) obj; if (other.getResult() == null ^ this.getResult() == null) return false; if (other.getResult() != null && other.getResult().equals(this.getResult()) == false) return false; return true; }
return false; TrustedAdvisorCheckResult other = (TrustedAdvisorCheckResult) obj; if (other.getCheckId() == null ^ this.getCheckId() == null) return false; if (other.getCheckId() != null && other.getCheckId().equals(this.getCheckId()) == false) return false; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getResourcesSummary() == null ^ this.getResourcesSummary() == null) return false; if (other.getResourcesSummary() != null && other.getResourcesSummary().equals(this.getResourcesSummary()) == false) return false; if (other.getCategorySpecificSummary() == null ^ this.getCategorySpecificSummary() == null) return false; if (other.getCategorySpecificSummary() != null && other.getCategorySpecificSummary().equals(this.getCategorySpecificSummary()) == false) return false; if (other.getFlaggedResources() == null ^ this.getFlaggedResources() == null) return false; if (other.getFlaggedResources() != null && other.getFlaggedResources().equals(this.getFlaggedResources()) == false) return false; return true;
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResult() == null) ? 0 : getResult().hashCode()); return hashCode; }
/** * <p> * Summary information that relates to the category of the check. Cost Optimizing is the only category that is * currently supported. * </p> * * @param categorySpecificSummary * Summary information that relates to the category of the check. Cost Optimizing is the only category that * is currently supported. * @return Returns a reference to this object so that method calls can be chained together. */ public TrustedAdvisorCheckResult withCategorySpecificSummary(TrustedAdvisorCategorySpecificSummary categorySpecificSummary) { setCategorySpecificSummary(categorySpecificSummary); 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 (getCheckId() != null) sb.append("CheckId: ").append(getCheckId()).append(","); if (getTimestamp() != null) sb.append("Timestamp: ").append(getTimestamp()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getResourcesSummary() != null) sb.append("ResourcesSummary: ").append(getResourcesSummary()).append(","); if (getCategorySpecificSummary() != null) sb.append("CategorySpecificSummary: ").append(getCategorySpecificSummary()).append(","); if (getFlaggedResources() != null) sb.append("FlaggedResources: ").append(getFlaggedResources()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(TrustedAdvisorCheckResult trustedAdvisorCheckResult, ProtocolMarshaller protocolMarshaller) { if (trustedAdvisorCheckResult == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(trustedAdvisorCheckResult.getCheckId(), CHECKID_BINDING); protocolMarshaller.marshall(trustedAdvisorCheckResult.getTimestamp(), TIMESTAMP_BINDING); protocolMarshaller.marshall(trustedAdvisorCheckResult.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(trustedAdvisorCheckResult.getResourcesSummary(), RESOURCESSUMMARY_BINDING); protocolMarshaller.marshall(trustedAdvisorCheckResult.getCategorySpecificSummary(), CATEGORYSPECIFICSUMMARY_BINDING); protocolMarshaller.marshall(trustedAdvisorCheckResult.getFlaggedResources(), FLAGGEDRESOURCES_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 + ((getCheckId() == null) ? 0 : getCheckId().hashCode()); hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getResourcesSummary() == null) ? 0 : getResourcesSummary().hashCode()); hashCode = prime * hashCode + ((getCategorySpecificSummary() == null) ? 0 : getCategorySpecificSummary().hashCode()); hashCode = prime * hashCode + ((getFlaggedResources() == null) ? 0 : getFlaggedResources().hashCode()); return hashCode; }
return false; TrustedAdvisorCheckResult other = (TrustedAdvisorCheckResult) obj; if (other.getCheckId() == null ^ this.getCheckId() == null) return false; if (other.getCheckId() != null && other.getCheckId().equals(this.getCheckId()) == false) return false; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getResourcesSummary() == null ^ this.getResourcesSummary() == null) return false; if (other.getResourcesSummary() != null && other.getResourcesSummary().equals(this.getResourcesSummary()) == false) return false; if (other.getCategorySpecificSummary() == null ^ this.getCategorySpecificSummary() == null) return false; if (other.getCategorySpecificSummary() != null && other.getCategorySpecificSummary().equals(this.getCategorySpecificSummary()) == false) return false; if (other.getFlaggedResources() == null ^ this.getFlaggedResources() == null) return false; if (other.getFlaggedResources() != null && other.getFlaggedResources().equals(this.getFlaggedResources()) == 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 (getCheckId() != null) sb.append("CheckId: ").append(getCheckId()).append(","); if (getTimestamp() != null) sb.append("Timestamp: ").append(getTimestamp()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getResourcesSummary() != null) sb.append("ResourcesSummary: ").append(getResourcesSummary()).append(","); if (getCategorySpecificSummary() != null) sb.append("CategorySpecificSummary: ").append(getCategorySpecificSummary()).append(","); if (getFlaggedResources() != null) sb.append("FlaggedResources: ").append(getFlaggedResources()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(TrustedAdvisorCheckResult trustedAdvisorCheckResult, ProtocolMarshaller protocolMarshaller) { if (trustedAdvisorCheckResult == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(trustedAdvisorCheckResult.getCheckId(), CHECKID_BINDING); protocolMarshaller.marshall(trustedAdvisorCheckResult.getTimestamp(), TIMESTAMP_BINDING); protocolMarshaller.marshall(trustedAdvisorCheckResult.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(trustedAdvisorCheckResult.getResourcesSummary(), RESOURCESSUMMARY_BINDING); protocolMarshaller.marshall(trustedAdvisorCheckResult.getCategorySpecificSummary(), CATEGORYSPECIFICSUMMARY_BINDING); protocolMarshaller.marshall(trustedAdvisorCheckResult.getFlaggedResources(), FLAGGEDRESOURCES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }