/** * 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 (getWebAclId() != null) sb.append("WebAclId: ").append(getWebAclId()).append(","); if (getRuleId() != null) sb.append("RuleId: ").append(getRuleId()).append(","); if (getTimeWindow() != null) sb.append("TimeWindow: ").append(getTimeWindow()).append(","); if (getMaxItems() != null) sb.append("MaxItems: ").append(getMaxItems()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getWebAclId() == null) ? 0 : getWebAclId().hashCode()); hashCode = prime * hashCode + ((getRuleId() == null) ? 0 : getRuleId().hashCode()); hashCode = prime * hashCode + ((getTimeWindow() == null) ? 0 : getTimeWindow().hashCode()); hashCode = prime * hashCode + ((getMaxItems() == null) ? 0 : getMaxItems().hashCode()); return hashCode; }
/** * Marshall the given parameter object. */ public void marshall(GetSampledRequestsRequest getSampledRequestsRequest, ProtocolMarshaller protocolMarshaller) { if (getSampledRequestsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getSampledRequestsRequest.getWebAclId(), WEBACLID_BINDING); protocolMarshaller.marshall(getSampledRequestsRequest.getRuleId(), RULEID_BINDING); protocolMarshaller.marshall(getSampledRequestsRequest.getTimeWindow(), TIMEWINDOW_BINDING); protocolMarshaller.marshall(getSampledRequestsRequest.getMaxItems(), MAXITEMS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(GetSampledRequestsRequest getSampledRequestsRequest, ProtocolMarshaller protocolMarshaller) { if (getSampledRequestsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getSampledRequestsRequest.getWebAclId(), WEBACLID_BINDING); protocolMarshaller.marshall(getSampledRequestsRequest.getRuleId(), RULEID_BINDING); protocolMarshaller.marshall(getSampledRequestsRequest.getTimeWindow(), TIMEWINDOW_BINDING); protocolMarshaller.marshall(getSampledRequestsRequest.getMaxItems(), MAXITEMS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetSampledRequestsRequest == false) return false; GetSampledRequestsRequest other = (GetSampledRequestsRequest) obj; if (other.getWebAclId() == null ^ this.getWebAclId() == null) return false; if (other.getWebAclId() != null && other.getWebAclId().equals(this.getWebAclId()) == false) return false; if (other.getRuleId() == null ^ this.getRuleId() == null) return false; if (other.getRuleId() != null && other.getRuleId().equals(this.getRuleId()) == false) return false; if (other.getTimeWindow() == null ^ this.getTimeWindow() == null) return false; if (other.getTimeWindow() != null && other.getTimeWindow().equals(this.getTimeWindow()) == false) return false; if (other.getMaxItems() == null ^ this.getMaxItems() == null) return false; if (other.getMaxItems() != null && other.getMaxItems().equals(this.getMaxItems()) == false) return false; return true; }