@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEstimatedMonthlySavings() == null) ? 0 : getEstimatedMonthlySavings().hashCode()); hashCode = prime * hashCode + ((getEstimatedPercentMonthlySavings() == null) ? 0 : getEstimatedPercentMonthlySavings().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 (getEstimatedMonthlySavings() != null) sb.append("EstimatedMonthlySavings: ").append(getEstimatedMonthlySavings()).append(","); if (getEstimatedPercentMonthlySavings() != null) sb.append("EstimatedPercentMonthlySavings: ").append(getEstimatedPercentMonthlySavings()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TrustedAdvisorCostOptimizingSummary == false) return false; TrustedAdvisorCostOptimizingSummary other = (TrustedAdvisorCostOptimizingSummary) obj; if (other.getEstimatedMonthlySavings() == null ^ this.getEstimatedMonthlySavings() == null) return false; if (other.getEstimatedMonthlySavings() != null && other.getEstimatedMonthlySavings().equals(this.getEstimatedMonthlySavings()) == false) return false; if (other.getEstimatedPercentMonthlySavings() == null ^ this.getEstimatedPercentMonthlySavings() == null) return false; if (other.getEstimatedPercentMonthlySavings() != null && other.getEstimatedPercentMonthlySavings().equals(this.getEstimatedPercentMonthlySavings()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(TrustedAdvisorCostOptimizingSummary trustedAdvisorCostOptimizingSummary, ProtocolMarshaller protocolMarshaller) { if (trustedAdvisorCostOptimizingSummary == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(trustedAdvisorCostOptimizingSummary.getEstimatedMonthlySavings(), ESTIMATEDMONTHLYSAVINGS_BINDING); protocolMarshaller.marshall(trustedAdvisorCostOptimizingSummary.getEstimatedPercentMonthlySavings(), ESTIMATEDPERCENTMONTHLYSAVINGS_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 + ((getEstimatedMonthlySavings() == null) ? 0 : getEstimatedMonthlySavings().hashCode()); hashCode = prime * hashCode + ((getEstimatedPercentMonthlySavings() == null) ? 0 : getEstimatedPercentMonthlySavings().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 (getEstimatedMonthlySavings() != null) sb.append("EstimatedMonthlySavings: ").append(getEstimatedMonthlySavings()).append(","); if (getEstimatedPercentMonthlySavings() != null) sb.append("EstimatedPercentMonthlySavings: ").append(getEstimatedPercentMonthlySavings()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TrustedAdvisorCostOptimizingSummary == false) return false; TrustedAdvisorCostOptimizingSummary other = (TrustedAdvisorCostOptimizingSummary) obj; if (other.getEstimatedMonthlySavings() == null ^ this.getEstimatedMonthlySavings() == null) return false; if (other.getEstimatedMonthlySavings() != null && other.getEstimatedMonthlySavings().equals(this.getEstimatedMonthlySavings()) == false) return false; if (other.getEstimatedPercentMonthlySavings() == null ^ this.getEstimatedPercentMonthlySavings() == null) return false; if (other.getEstimatedPercentMonthlySavings() != null && other.getEstimatedPercentMonthlySavings().equals(this.getEstimatedPercentMonthlySavings()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(TrustedAdvisorCostOptimizingSummary trustedAdvisorCostOptimizingSummary, ProtocolMarshaller protocolMarshaller) { if (trustedAdvisorCostOptimizingSummary == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(trustedAdvisorCostOptimizingSummary.getEstimatedMonthlySavings(), ESTIMATEDMONTHLYSAVINGS_BINDING); protocolMarshaller.marshall(trustedAdvisorCostOptimizingSummary.getEstimatedPercentMonthlySavings(), ESTIMATEDPERCENTMONTHLYSAVINGS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }