@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StreamProcessorOutput == false) return false; StreamProcessorOutput other = (StreamProcessorOutput) obj; if (other.getKinesisDataStream() == null ^ this.getKinesisDataStream() == null) return false; if (other.getKinesisDataStream() != null && other.getKinesisDataStream().equals(this.getKinesisDataStream()) == false) return false; return true; }
/** * <p> * The Amazon Kinesis Data Streams stream to which the Amazon Rekognition stream processor streams the analysis * results. * </p> * * @param kinesisDataStream * The Amazon Kinesis Data Streams stream to which the Amazon Rekognition stream processor streams the * analysis results. * @return Returns a reference to this object so that method calls can be chained together. */ public StreamProcessorOutput withKinesisDataStream(KinesisDataStream kinesisDataStream) { setKinesisDataStream(kinesisDataStream); return this; }
public StreamProcessorOutput unmarshall(JsonUnmarshallerContext context) throws Exception { StreamProcessorOutput streamProcessorOutput = new StreamProcessorOutput(); 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("KinesisDataStream", targetDepth)) { context.nextToken(); streamProcessorOutput.setKinesisDataStream(KinesisDataStreamJsonUnmarshaller.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 streamProcessorOutput; }
@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.getOutput() == null ^ this.getOutput() == null) return false; if (other.getOutput() != null && other.getOutput().equals(this.getOutput()) == false) return false; if (other.getRoleArn() == null ^ this.getRoleArn() == null)
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 StreamProcessorOutput unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } StreamProcessorOutput streamProcessorOutput = new StreamProcessorOutput(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("KinesisDataStream")) { streamProcessorOutput.setKinesisDataStream(KinesisDataStreamJsonUnmarshaller .getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return streamProcessorOutput; }
@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.getOutput() == null ^ this.getOutput() == null) return false; if (other.getOutput() != null && other.getOutput().equals(this.getOutput()) == false) return false; if (other.getName() == null ^ this.getName() == null)
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getKinesisDataStream() == null) ? 0 : getKinesisDataStream().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.getOutput() == null ^ this.getOutput() == null) return false; if (other.getOutput() != null && other.getOutput().equals(this.getOutput()) == false) return false; if (other.getName() == null ^ this.getName() == 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 (getKinesisDataStream() != null) sb.append("KinesisDataStream: ").append(getKinesisDataStream()); 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.getOutput() == null ^ this.getOutput() == null) return false; if (other.getOutput() != null && other.getOutput().equals(this.getOutput()) == false) return false; if (other.getRoleArn() == null ^ this.getRoleArn() == null)
/** * Marshall the given parameter object. */ public void marshall(StreamProcessorOutput streamProcessorOutput, ProtocolMarshaller protocolMarshaller) { if (streamProcessorOutput == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(streamProcessorOutput.getKinesisDataStream(), KINESISDATASTREAM_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 StreamProcessorOutput == false) return false; StreamProcessorOutput other = (StreamProcessorOutput) obj; if (other.getKinesisDataStream() == null ^ this.getKinesisDataStream() == null) return false; if (other.getKinesisDataStream() != null && other.getKinesisDataStream().equals(this.getKinesisDataStream()) == false) return false; return true; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getKinesisDataStream() == null) ? 0 : getKinesisDataStream().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 (getKinesisDataStream() != null) sb.append("KinesisDataStream: " + getKinesisDataStream()); sb.append("}"); return sb.toString(); }
public void marshall(StreamProcessorOutput streamProcessorOutput, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (streamProcessorOutput.getKinesisDataStream() != null) { KinesisDataStream kinesisDataStream = streamProcessorOutput.getKinesisDataStream(); jsonWriter.name("KinesisDataStream"); KinesisDataStreamJsonMarshaller.getInstance().marshall(kinesisDataStream, jsonWriter); } jsonWriter.endObject(); }