@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StreamProcessorSettings == false) return false; StreamProcessorSettings other = (StreamProcessorSettings) obj; if (other.getFaceSearch() == null ^ this.getFaceSearch() == null) return false; if (other.getFaceSearch() != null && other.getFaceSearch().equals(this.getFaceSearch()) == false) return false; return true; }
/** * <p> * Face search settings to use on a streaming video. * </p> * * @param faceSearch * Face search settings to use on a streaming video. * @return Returns a reference to this object so that method calls can be chained together. */ public StreamProcessorSettings withFaceSearch(FaceSearchSettings faceSearch) { setFaceSearch(faceSearch); return this; }
public StreamProcessorSettings unmarshall(JsonUnmarshallerContext context) throws Exception { StreamProcessorSettings streamProcessorSettings = new StreamProcessorSettings(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return null; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("FaceSearch", targetDepth)) { context.nextToken(); streamProcessorSettings.setFaceSearch(FaceSearchSettingsJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return streamProcessorSettings; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInput() == null) ? 0 : getInput().hashCode()); hashCode = prime * hashCode + ((getOutput() == null) ? 0 : getOutput().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getSettings() == null) ? 0 : getSettings().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); return hashCode; }
if (other.getSettings() == null ^ this.getSettings() == null) return false; if (other.getSettings() != null && other.getSettings().equals(this.getSettings()) == false) return false; return true;
public CreateStreamProcessorResult createStreamProcessor() { final KinesisVideoStream kinesisVideoStream = new KinesisVideoStream().withArn(kinesisVideoStreamArn); final StreamProcessorInput streamProcessorInput = new StreamProcessorInput().withKinesisVideoStream(kinesisVideoStream); final KinesisDataStream kinesisDataStream = new KinesisDataStream().withArn(kinesisDataStreamArn); final StreamProcessorOutput streamProcessorOutput = new StreamProcessorOutput().withKinesisDataStream(kinesisDataStream); final FaceSearchSettings faceSearchSettings = new FaceSearchSettings().withCollectionId(collectionId).withFaceMatchThreshold(matchThreshold); final StreamProcessorSettings streamProcessorSettings = new StreamProcessorSettings().withFaceSearch(faceSearchSettings); final CreateStreamProcessorResult createStreamProcessorResult = rekognitionClient.createStreamProcessor(new CreateStreamProcessorRequest().withInput(streamProcessorInput).withOutput(streamProcessorOutput).withSettings(streamProcessorSettings).withRoleArn(roleArn).withName(streamProcessorName)); log.info("StreamProcessorArn : {} ", createStreamProcessorResult.getStreamProcessorArn()); return createStreamProcessorResult; }
public StreamProcessorSettings unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } StreamProcessorSettings streamProcessorSettings = new StreamProcessorSettings(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("FaceSearch")) { streamProcessorSettings.setFaceSearch(FaceSearchSettingsJsonUnmarshaller .getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return streamProcessorSettings; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getStreamProcessorArn() == null) ? 0 : getStreamProcessorArn().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode()); hashCode = prime * hashCode + ((getCreationTimestamp() == null) ? 0 : getCreationTimestamp().hashCode()); hashCode = prime * hashCode + ((getLastUpdateTimestamp() == null) ? 0 : getLastUpdateTimestamp().hashCode()); hashCode = prime * hashCode + ((getInput() == null) ? 0 : getInput().hashCode()); hashCode = prime * hashCode + ((getOutput() == null) ? 0 : getOutput().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getSettings() == null) ? 0 : getSettings().hashCode()); return hashCode; }
if (other.getSettings() == null ^ this.getSettings() == null) return false; if (other.getSettings() != null && other.getSettings().equals(this.getSettings()) == false) return false; if (other.getRoleArn() == null ^ this.getRoleArn() == null)
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFaceSearch() == null) ? 0 : getFaceSearch().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInput() == null) ? 0 : getInput().hashCode()); hashCode = prime * hashCode + ((getOutput() == null) ? 0 : getOutput().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getSettings() == null) ? 0 : getSettings().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); return hashCode; }
if (other.getSettings() == null ^ this.getSettings() == null) return false; if (other.getSettings() != null && other.getSettings().equals(this.getSettings()) == false) return false; if (other.getRoleArn() == null ^ this.getRoleArn() == null)
/** * 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 (getFaceSearch() != null) sb.append("FaceSearch: ").append(getFaceSearch()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getStreamProcessorArn() == null) ? 0 : getStreamProcessorArn().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode()); hashCode = prime * hashCode + ((getCreationTimestamp() == null) ? 0 : getCreationTimestamp().hashCode()); hashCode = prime * hashCode + ((getLastUpdateTimestamp() == null) ? 0 : getLastUpdateTimestamp().hashCode()); hashCode = prime * hashCode + ((getInput() == null) ? 0 : getInput().hashCode()); hashCode = prime * hashCode + ((getOutput() == null) ? 0 : getOutput().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getSettings() == null) ? 0 : getSettings().hashCode()); return hashCode; }
if (other.getSettings() == null ^ this.getSettings() == null) return false; if (other.getSettings() != null && other.getSettings().equals(this.getSettings()) == false) return false; return true;
/** * Marshall the given parameter object. */ public void marshall(StreamProcessorSettings streamProcessorSettings, ProtocolMarshaller protocolMarshaller) { if (streamProcessorSettings == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(streamProcessorSettings.getFaceSearch(), FACESEARCH_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 StreamProcessorSettings == false) return false; StreamProcessorSettings other = (StreamProcessorSettings) obj; if (other.getFaceSearch() == null ^ this.getFaceSearch() == null) return false; if (other.getFaceSearch() != null && other.getFaceSearch().equals(this.getFaceSearch()) == false) return false; return true; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFaceSearch() == null) ? 0 : getFaceSearch().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 (getFaceSearch() != null) sb.append("FaceSearch: " + getFaceSearch()); sb.append("}"); return sb.toString(); }
public void marshall(StreamProcessorSettings streamProcessorSettings, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (streamProcessorSettings.getFaceSearch() != null) { FaceSearchSettings faceSearch = streamProcessorSettings.getFaceSearch(); jsonWriter.name("FaceSearch"); FaceSearchSettingsJsonMarshaller.getInstance().marshall(faceSearch, jsonWriter); } jsonWriter.endObject(); }