@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); hashCode = prime * hashCode + ((getResourceId() == null) ? 0 : getResourceId().hashCode()); hashCode = prime * hashCode + ((getIsSuppressed() == null) ? 0 : getIsSuppressed().hashCode()); hashCode = prime * hashCode + ((getMetadata() == null) ? 0 : getMetadata().hashCode()); return hashCode; }
/** * <p> * Specifies whether the AWS resource was ignored by Trusted Advisor because it was marked as suppressed by the * user. * </p> * * @param isSuppressed * Specifies whether the AWS resource was ignored by Trusted Advisor because it was marked as suppressed by * the user. * @return Returns a reference to this object so that method calls can be chained together. */ public TrustedAdvisorResourceDetail withIsSuppressed(Boolean isSuppressed) { setIsSuppressed(isSuppressed); return this; }
/** * <p> * Additional information about the identified resource. The exact metadata and its order can be obtained by * inspecting the <a>TrustedAdvisorCheckDescription</a> object returned by the call to * <a>DescribeTrustedAdvisorChecks</a>. <b>Metadata</b> contains all the data that is shown in the Excel download, * even in those cases where the UI shows just summary data. * </p> * * @param metadata * Additional information about the identified resource. The exact metadata and its order can be obtained by * inspecting the <a>TrustedAdvisorCheckDescription</a> object returned by the call to * <a>DescribeTrustedAdvisorChecks</a>. <b>Metadata</b> contains all the data that is shown in the Excel * download, even in those cases where the UI shows just summary data. * @return Returns a reference to this object so that method calls can be chained together. */ public TrustedAdvisorResourceDetail withMetadata(java.util.Collection<String> metadata) { setMetadata(metadata); return this; }
public TrustedAdvisorResourceDetail unmarshall(JsonUnmarshallerContext context) throws Exception { TrustedAdvisorResourceDetail trustedAdvisorResourceDetail = new TrustedAdvisorResourceDetail(); if (context.testExpression("status", targetDepth)) { context.nextToken(); trustedAdvisorResourceDetail.setStatus(context.getUnmarshaller(String.class).unmarshall(context)); trustedAdvisorResourceDetail.setRegion(context.getUnmarshaller(String.class).unmarshall(context)); trustedAdvisorResourceDetail.setResourceId(context.getUnmarshaller(String.class).unmarshall(context)); trustedAdvisorResourceDetail.setIsSuppressed(context.getUnmarshaller(Boolean.class).unmarshall(context)); trustedAdvisorResourceDetail.setMetadata(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
int dataSize = result.getResult().getFlaggedResources().get(0).getMetadata().size() ; if(dataSize == metadata.size()+1 && !metadata.contains("Status")){ metadata.add(0, "Status"); List<String> data = rsrc.getMetadata(); StringBuilder resounceInfo = new StringBuilder("{"); if(data.size() == metadata.size() ){ resources.add(new Resource(check.getId(),rsrc.getResourceId(),rsrc.getStatus(),resounceInfo.toString()));
/** * <p> * The unique identifier for the identified resource. * </p> * * @param resourceId * The unique identifier for the identified resource. * @return Returns a reference to this object so that method calls can be chained together. */ public TrustedAdvisorResourceDetail withResourceId(String resourceId) { setResourceId(resourceId); return this; }
/** * <p> * The AWS region in which the identified resource is located. * </p> * * @param region * The AWS region in which the identified resource is located. * @return Returns a reference to this object so that method calls can be chained together. */ public TrustedAdvisorResourceDetail withRegion(String region) { setRegion(region); return this; }
public TrustedAdvisorResourceDetail unmarshall(JsonUnmarshallerContext context) throws Exception { TrustedAdvisorResourceDetail trustedAdvisorResourceDetail = new TrustedAdvisorResourceDetail(); if (context.testExpression("status", targetDepth)) { context.nextToken(); trustedAdvisorResourceDetail.setStatus(context.getUnmarshaller(String.class).unmarshall(context)); trustedAdvisorResourceDetail.setRegion(context.getUnmarshaller(String.class).unmarshall(context)); trustedAdvisorResourceDetail.setResourceId(context.getUnmarshaller(String.class).unmarshall(context)); trustedAdvisorResourceDetail.setIsSuppressed(context.getUnmarshaller(Boolean.class).unmarshall(context)); trustedAdvisorResourceDetail.setMetadata(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
/** * <p> * The unique identifier for the identified resource. * </p> * * @param resourceId * The unique identifier for the identified resource. * @return Returns a reference to this object so that method calls can be chained together. */ public TrustedAdvisorResourceDetail withResourceId(String resourceId) { setResourceId(resourceId); return this; }
/** * <p> * The AWS region in which the identified resource is located. * </p> * * @param region * The AWS region in which the identified resource is located. * @return Returns a reference to this object so that method calls can be chained together. */ public TrustedAdvisorResourceDetail withRegion(String region) { setRegion(region); return this; }
return false; TrustedAdvisorResourceDetail other = (TrustedAdvisorResourceDetail) obj; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getRegion() == null ^ this.getRegion() == null) return false; if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false) return false; if (other.getResourceId() == null ^ this.getResourceId() == null) return false; if (other.getResourceId() != null && other.getResourceId().equals(this.getResourceId()) == false) return false; if (other.getIsSuppressed() == null ^ this.getIsSuppressed() == null) return false; if (other.getIsSuppressed() != null && other.getIsSuppressed().equals(this.getIsSuppressed()) == false) return false; if (other.getMetadata() == null ^ this.getMetadata() == null) return false; if (other.getMetadata() != null && other.getMetadata().equals(this.getMetadata()) == false) return false; return true;
/** * <p> * Additional information about the identified resource. The exact metadata and its order can be obtained by * inspecting the <a>TrustedAdvisorCheckDescription</a> object returned by the call to * <a>DescribeTrustedAdvisorChecks</a>. <b>Metadata</b> contains all the data that is shown in the Excel download, * even in those cases where the UI shows just summary data. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setMetadata(java.util.Collection)} or {@link #withMetadata(java.util.Collection)} if you want to override * the existing values. * </p> * * @param metadata * Additional information about the identified resource. The exact metadata and its order can be obtained by * inspecting the <a>TrustedAdvisorCheckDescription</a> object returned by the call to * <a>DescribeTrustedAdvisorChecks</a>. <b>Metadata</b> contains all the data that is shown in the Excel * download, even in those cases where the UI shows just summary data. * @return Returns a reference to this object so that method calls can be chained together. */ public TrustedAdvisorResourceDetail withMetadata(String... metadata) { if (this.metadata == null) { setMetadata(new com.amazonaws.internal.SdkInternalList<String>(metadata.length)); } for (String ele : metadata) { this.metadata.add(ele); } return this; }
/** * <p> * Specifies whether the AWS resource was ignored by Trusted Advisor because it was marked as suppressed by the * user. * </p> * * @param isSuppressed * Specifies whether the AWS resource was ignored by Trusted Advisor because it was marked as suppressed by * the user. * @return Returns a reference to this object so that method calls can be chained together. */ public TrustedAdvisorResourceDetail withIsSuppressed(Boolean isSuppressed) { setIsSuppressed(isSuppressed); 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 (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getRegion() != null) sb.append("Region: ").append(getRegion()).append(","); if (getResourceId() != null) sb.append("ResourceId: ").append(getResourceId()).append(","); if (getIsSuppressed() != null) sb.append("IsSuppressed: ").append(getIsSuppressed()).append(","); if (getMetadata() != null) sb.append("Metadata: ").append(getMetadata()); sb.append("}"); return sb.toString(); }
/** * <p> * Additional information about the identified resource. The exact metadata and its order can be obtained by * inspecting the <a>TrustedAdvisorCheckDescription</a> object returned by the call to * <a>DescribeTrustedAdvisorChecks</a>. <b>Metadata</b> contains all the data that is shown in the Excel download, * even in those cases where the UI shows just summary data. * </p> * * @param metadata * Additional information about the identified resource. The exact metadata and its order can be obtained by * inspecting the <a>TrustedAdvisorCheckDescription</a> object returned by the call to * <a>DescribeTrustedAdvisorChecks</a>. <b>Metadata</b> contains all the data that is shown in the Excel * download, even in those cases where the UI shows just summary data. * @return Returns a reference to this object so that method calls can be chained together. */ public TrustedAdvisorResourceDetail withMetadata(java.util.Collection<String> metadata) { setMetadata(metadata); return this; }
/** * Marshall the given parameter object. */ public void marshall(TrustedAdvisorResourceDetail trustedAdvisorResourceDetail, ProtocolMarshaller protocolMarshaller) { if (trustedAdvisorResourceDetail == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(trustedAdvisorResourceDetail.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(trustedAdvisorResourceDetail.getRegion(), REGION_BINDING); protocolMarshaller.marshall(trustedAdvisorResourceDetail.getResourceId(), RESOURCEID_BINDING); protocolMarshaller.marshall(trustedAdvisorResourceDetail.getIsSuppressed(), ISSUPPRESSED_BINDING); protocolMarshaller.marshall(trustedAdvisorResourceDetail.getMetadata(), METADATA_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * <p> * Additional information about the identified resource. The exact metadata and its order can be obtained by * inspecting the <a>TrustedAdvisorCheckDescription</a> object returned by the call to * <a>DescribeTrustedAdvisorChecks</a>. <b>Metadata</b> contains all the data that is shown in the Excel download, * even in those cases where the UI shows just summary data. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setMetadata(java.util.Collection)} or {@link #withMetadata(java.util.Collection)} if you want to override * the existing values. * </p> * * @param metadata * Additional information about the identified resource. The exact metadata and its order can be obtained by * inspecting the <a>TrustedAdvisorCheckDescription</a> object returned by the call to * <a>DescribeTrustedAdvisorChecks</a>. <b>Metadata</b> contains all the data that is shown in the Excel * download, even in those cases where the UI shows just summary data. * @return Returns a reference to this object so that method calls can be chained together. */ public TrustedAdvisorResourceDetail withMetadata(String... metadata) { if (this.metadata == null) { setMetadata(new com.amazonaws.internal.SdkInternalList<String>(metadata.length)); } for (String ele : metadata) { this.metadata.add(ele); } return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); hashCode = prime * hashCode + ((getResourceId() == null) ? 0 : getResourceId().hashCode()); hashCode = prime * hashCode + ((getIsSuppressed() == null) ? 0 : getIsSuppressed().hashCode()); hashCode = prime * hashCode + ((getMetadata() == null) ? 0 : getMetadata().hashCode()); return hashCode; }
return false; TrustedAdvisorResourceDetail other = (TrustedAdvisorResourceDetail) obj; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getRegion() == null ^ this.getRegion() == null) return false; if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false) return false; if (other.getResourceId() == null ^ this.getResourceId() == null) return false; if (other.getResourceId() != null && other.getResourceId().equals(this.getResourceId()) == false) return false; if (other.getIsSuppressed() == null ^ this.getIsSuppressed() == null) return false; if (other.getIsSuppressed() != null && other.getIsSuppressed().equals(this.getIsSuppressed()) == false) return false; if (other.getMetadata() == null ^ this.getMetadata() == null) return false; if (other.getMetadata() != null && other.getMetadata().equals(this.getMetadata()) == 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 (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getRegion() != null) sb.append("Region: ").append(getRegion()).append(","); if (getResourceId() != null) sb.append("ResourceId: ").append(getResourceId()).append(","); if (getIsSuppressed() != null) sb.append("IsSuppressed: ").append(getIsSuppressed()).append(","); if (getMetadata() != null) sb.append("Metadata: ").append(getMetadata()); sb.append("}"); return sb.toString(); }