@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); return hashCode; }
/** * <p> * The end of the time range from which you want <code>GetSampledRequests</code> to return a sample of the requests * that your AWS resource received. Specify the date and time in the following format: * <code>"2016-09-27T14:50Z"</code>. You can specify any time range in the previous three hours. * </p> * * @param endTime * The end of the time range from which you want <code>GetSampledRequests</code> to return a sample of the * requests that your AWS resource received. Specify the date and time in the following format: * <code>"2016-09-27T14:50Z"</code>. You can specify any time range in the previous three hours. * @return Returns a reference to this object so that method calls can be chained together. */ public TimeWindow withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; }
/** * <p> * The beginning of the time range from which you want <code>GetSampledRequests</code> to return a sample of the * requests that your AWS resource received. Specify the date and time in the following format: * <code>"2016-09-27T14:50Z"</code>. You can specify any time range in the previous three hours. * </p> * * @param startTime * The beginning of the time range from which you want <code>GetSampledRequests</code> to return a sample of * the requests that your AWS resource received. Specify the date and time in the following format: * <code>"2016-09-27T14:50Z"</code>. You can specify any time range in the previous three hours. * @return Returns a reference to this object so that method calls can be chained together. */ public TimeWindow withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; }
public TimeWindow unmarshall(JsonUnmarshallerContext context) throws Exception { TimeWindow timeWindow = new TimeWindow(); if (context.testExpression("StartTime", targetDepth)) { context.nextToken(); timeWindow.setStartTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); timeWindow.setEndTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSampledRequests() == null) ? 0 : getSampledRequests().hashCode()); hashCode = prime * hashCode + ((getPopulationSize() == null) ? 0 : getPopulationSize().hashCode()); hashCode = prime * hashCode + ((getTimeWindow() == null) ? 0 : getTimeWindow().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetSampledRequestsResult == false) return false; GetSampledRequestsResult other = (GetSampledRequestsResult) obj; if (other.getSampledRequests() == null ^ this.getSampledRequests() == null) return false; if (other.getSampledRequests() != null && other.getSampledRequests().equals(this.getSampledRequests()) == false) return false; if (other.getPopulationSize() == null ^ this.getPopulationSize() == null) return false; if (other.getPopulationSize() != null && other.getPopulationSize().equals(this.getPopulationSize()) == false) return false; if (other.getTimeWindow() == null ^ this.getTimeWindow() == null) return false; if (other.getTimeWindow() != null && other.getTimeWindow().equals(this.getTimeWindow()) == false) return false; return true; }
public TimeWindow unmarshall(JsonUnmarshallerContext context) throws Exception { TimeWindow timeWindow = new TimeWindow(); if (context.testExpression("StartTime", targetDepth)) { context.nextToken(); timeWindow.setStartTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); timeWindow.setEndTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
@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; }
@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; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TimeWindow == false) return false; TimeWindow other = (TimeWindow) obj; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == 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 (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(TimeWindow timeWindow, ProtocolMarshaller protocolMarshaller) { if (timeWindow == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(timeWindow.getStartTime(), STARTTIME_BINDING); protocolMarshaller.marshall(timeWindow.getEndTime(), ENDTIME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(TimeWindow timeWindow, ProtocolMarshaller protocolMarshaller) { if (timeWindow == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(timeWindow.getStartTime(), STARTTIME_BINDING); protocolMarshaller.marshall(timeWindow.getEndTime(), ENDTIME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }