@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getVideo() == null) ? 0 : getVideo().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); hashCode = prime * hashCode + ((getFaceMatchThreshold() == null) ? 0 : getFaceMatchThreshold().hashCode()); hashCode = prime * hashCode + ((getCollectionId() == null) ? 0 : getCollectionId().hashCode()); hashCode = prime * hashCode + ((getNotificationChannel() == null) ? 0 : getNotificationChannel().hashCode()); hashCode = prime * hashCode + ((getJobTag() == null) ? 0 : getJobTag().hashCode()); return hashCode; }
/** * <p> * Idempotent token used to identify the start request. If you use the same token with multiple * <code>StartFaceSearch</code> requests, the same <code>JobId</code> is returned. Use * <code>ClientRequestToken</code> to prevent the same job from being accidently started more than once. * </p> * * @param clientRequestToken * Idempotent token used to identify the start request. If you use the same token with multiple * <code>StartFaceSearch</code> requests, the same <code>JobId</code> is returned. Use * <code>ClientRequestToken</code> to prevent the same job from being accidently started more than once. * @return Returns a reference to this object so that method calls can be chained together. */ public StartFaceSearchRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); return this; }
/** * <p> * ID of the collection that contains the faces you want to search for. * </p> * * @param collectionId * ID of the collection that contains the faces you want to search for. * @return Returns a reference to this object so that method calls can be chained together. */ public StartFaceSearchRequest withCollectionId(String collectionId) { setCollectionId(collectionId); return this; }
/** * <p> * The minimum confidence in the person match to return. For example, don't return any matches where confidence in * matches is less than 70%. * </p> * * @param faceMatchThreshold * The minimum confidence in the person match to return. For example, don't return any matches where * confidence in matches is less than 70%. * @return Returns a reference to this object so that method calls can be chained together. */ public StartFaceSearchRequest withFaceMatchThreshold(Float faceMatchThreshold) { setFaceMatchThreshold(faceMatchThreshold); return this; }
return false; StartFaceSearchRequest other = (StartFaceSearchRequest) obj; if (other.getVideo() == null ^ this.getVideo() == null) return false; if (other.getVideo() != null && other.getVideo().equals(this.getVideo()) == false) return false; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; if (other.getFaceMatchThreshold() == null ^ this.getFaceMatchThreshold() == null) return false; if (other.getFaceMatchThreshold() != null && other.getFaceMatchThreshold().equals(this.getFaceMatchThreshold()) == false) return false; if (other.getCollectionId() == null ^ this.getCollectionId() == null) return false; if (other.getCollectionId() != null && other.getCollectionId().equals(this.getCollectionId()) == false) return false; if (other.getNotificationChannel() == null ^ this.getNotificationChannel() == null) return false; if (other.getNotificationChannel() != null && other.getNotificationChannel().equals(this.getNotificationChannel()) == false) return false; if (other.getJobTag() == null ^ this.getJobTag() == null) return false; if (other.getJobTag() != null && other.getJobTag().equals(this.getJobTag()) == 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 (getVideo() != null) sb.append("Video: ").append(getVideo()).append(","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: ").append(getClientRequestToken()).append(","); if (getFaceMatchThreshold() != null) sb.append("FaceMatchThreshold: ").append(getFaceMatchThreshold()).append(","); if (getCollectionId() != null) sb.append("CollectionId: ").append(getCollectionId()).append(","); if (getNotificationChannel() != null) sb.append("NotificationChannel: ").append(getNotificationChannel()).append(","); if (getJobTag() != null) sb.append("JobTag: ").append(getJobTag()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(StartFaceSearchRequest startFaceSearchRequest, ProtocolMarshaller protocolMarshaller) { if (startFaceSearchRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(startFaceSearchRequest.getVideo(), VIDEO_BINDING); protocolMarshaller.marshall(startFaceSearchRequest.getClientRequestToken(), CLIENTREQUESTTOKEN_BINDING); protocolMarshaller.marshall(startFaceSearchRequest.getFaceMatchThreshold(), FACEMATCHTHRESHOLD_BINDING); protocolMarshaller.marshall(startFaceSearchRequest.getCollectionId(), COLLECTIONID_BINDING); protocolMarshaller.marshall(startFaceSearchRequest.getNotificationChannel(), NOTIFICATIONCHANNEL_BINDING); protocolMarshaller.marshall(startFaceSearchRequest.getJobTag(), JOBTAG_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 + ((getVideo() == null) ? 0 : getVideo().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); hashCode = prime * hashCode + ((getFaceMatchThreshold() == null) ? 0 : getFaceMatchThreshold().hashCode()); hashCode = prime * hashCode + ((getCollectionId() == null) ? 0 : getCollectionId().hashCode()); hashCode = prime * hashCode + ((getEnablePersonTracking() == null) ? 0 : getEnablePersonTracking().hashCode()); hashCode = prime * hashCode + ((getNotificationChannel() == null) ? 0 : getNotificationChannel().hashCode()); hashCode = prime * hashCode + ((getJobTag() == null) ? 0 : getJobTag().hashCode()); return hashCode; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getVideo() != null) sb.append("Video: " + getVideo() + ","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: " + getClientRequestToken() + ","); if (getFaceMatchThreshold() != null) sb.append("FaceMatchThreshold: " + getFaceMatchThreshold() + ","); if (getCollectionId() != null) sb.append("CollectionId: " + getCollectionId() + ","); if (getEnablePersonTracking() != null) sb.append("EnablePersonTracking: " + getEnablePersonTracking() + ","); if (getNotificationChannel() != null) sb.append("NotificationChannel: " + getNotificationChannel() + ","); if (getJobTag() != null) sb.append("JobTag: " + getJobTag()); sb.append("}"); return sb.toString(); }
if (other.getVideo() == null ^ this.getVideo() == null) return false; if (other.getVideo() != null && other.getVideo().equals(this.getVideo()) == false) return false; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; if (other.getFaceMatchThreshold() == null ^ this.getFaceMatchThreshold() == null) return false; if (other.getFaceMatchThreshold() != null && other.getFaceMatchThreshold().equals(this.getFaceMatchThreshold()) == false) return false; if (other.getCollectionId() == null ^ this.getCollectionId() == null) return false; if (other.getCollectionId() != null && other.getCollectionId().equals(this.getCollectionId()) == false) return false; if (other.getEnablePersonTracking() == null ^ this.getEnablePersonTracking() == null) return false; if (other.getEnablePersonTracking() != null && other.getEnablePersonTracking().equals(this.getEnablePersonTracking()) == false) return false; if (other.getNotificationChannel() == null ^ this.getNotificationChannel() == null) return false; if (other.getNotificationChannel() != null && other.getNotificationChannel().equals(this.getNotificationChannel()) == false) return false;
if (startFaceSearchRequest.getVideo() != null) { Video video = startFaceSearchRequest.getVideo(); jsonWriter.name("Video"); VideoJsonMarshaller.getInstance().marshall(video, jsonWriter); if (startFaceSearchRequest.getClientRequestToken() != null) { String clientRequestToken = startFaceSearchRequest.getClientRequestToken(); jsonWriter.name("ClientRequestToken"); jsonWriter.value(clientRequestToken); if (startFaceSearchRequest.getFaceMatchThreshold() != null) { Float faceMatchThreshold = startFaceSearchRequest.getFaceMatchThreshold(); jsonWriter.name("FaceMatchThreshold"); jsonWriter.value(faceMatchThreshold); if (startFaceSearchRequest.getCollectionId() != null) { String collectionId = startFaceSearchRequest.getCollectionId(); jsonWriter.name("CollectionId"); jsonWriter.value(collectionId); if (startFaceSearchRequest.getEnablePersonTracking() != null) { Boolean enablePersonTracking = startFaceSearchRequest.getEnablePersonTracking(); jsonWriter.name("EnablePersonTracking"); jsonWriter.value(enablePersonTracking); if (startFaceSearchRequest.getNotificationChannel() != null) { NotificationChannel notificationChannel = startFaceSearchRequest .getNotificationChannel(); jsonWriter.name("NotificationChannel");