@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode()); hashCode = prime * hashCode + ((getRateKey() == null) ? 0 : getRateKey().hashCode()); hashCode = prime * hashCode + ((getRateLimit() == null) ? 0 : getRateLimit().hashCode()); hashCode = prime * hashCode + ((getChangeToken() == null) ? 0 : getChangeToken().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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getMetricName() != null) sb.append("MetricName: ").append(getMetricName()).append(","); if (getRateKey() != null) sb.append("RateKey: ").append(getRateKey()).append(","); if (getRateLimit() != null) sb.append("RateLimit: ").append(getRateLimit()).append(","); if (getChangeToken() != null) sb.append("ChangeToken: ").append(getChangeToken()); sb.append("}"); return sb.toString(); }
return false; CreateRateBasedRuleRequest other = (CreateRateBasedRuleRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getMetricName() == null ^ this.getMetricName() == null)
/** * Marshall the given parameter object. */ public void marshall(CreateRateBasedRuleRequest createRateBasedRuleRequest, ProtocolMarshaller protocolMarshaller) { if (createRateBasedRuleRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createRateBasedRuleRequest.getName(), NAME_BINDING); protocolMarshaller.marshall(createRateBasedRuleRequest.getMetricName(), METRICNAME_BINDING); protocolMarshaller.marshall(createRateBasedRuleRequest.getRateKey(), RATEKEY_BINDING); protocolMarshaller.marshall(createRateBasedRuleRequest.getRateLimit(), RATELIMIT_BINDING); protocolMarshaller.marshall(createRateBasedRuleRequest.getChangeToken(), CHANGETOKEN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(CreateRateBasedRuleRequest createRateBasedRuleRequest, ProtocolMarshaller protocolMarshaller) { if (createRateBasedRuleRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createRateBasedRuleRequest.getName(), NAME_BINDING); protocolMarshaller.marshall(createRateBasedRuleRequest.getMetricName(), METRICNAME_BINDING); protocolMarshaller.marshall(createRateBasedRuleRequest.getRateKey(), RATEKEY_BINDING); protocolMarshaller.marshall(createRateBasedRuleRequest.getRateLimit(), RATELIMIT_BINDING); protocolMarshaller.marshall(createRateBasedRuleRequest.getChangeToken(), CHANGETOKEN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }