@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StreamProcessorInput == false) return false; StreamProcessorInput other = (StreamProcessorInput) obj; if (other.getKinesisVideoStream() == null ^ this.getKinesisVideoStream() == null) return false; if (other.getKinesisVideoStream() != null && other.getKinesisVideoStream().equals(this.getKinesisVideoStream()) == false) return false; return true; }
/** * <p> * The Kinesis video stream input stream for the source streaming video. * </p> * * @param kinesisVideoStream * The Kinesis video stream input stream for the source streaming video. * @return Returns a reference to this object so that method calls can be chained together. */ public StreamProcessorInput withKinesisVideoStream(KinesisVideoStream kinesisVideoStream) { setKinesisVideoStream(kinesisVideoStream); return this; }
public StreamProcessorInput unmarshall(JsonUnmarshallerContext context) throws Exception { StreamProcessorInput streamProcessorInput = new StreamProcessorInput(); 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("KinesisVideoStream", targetDepth)) { context.nextToken(); streamProcessorInput.setKinesisVideoStream(KinesisVideoStreamJsonUnmarshaller.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 streamProcessorInput; }
@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.getInput() == null ^ this.getInput() == null) return false; if (other.getInput() != null && other.getInput().equals(this.getInput()) == false) return false; if (other.getOutput() == null ^ this.getOutput() == 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 StreamProcessorInput unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } StreamProcessorInput streamProcessorInput = new StreamProcessorInput(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("KinesisVideoStream")) { streamProcessorInput.setKinesisVideoStream(KinesisVideoStreamJsonUnmarshaller .getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return streamProcessorInput; }
@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.getInput() == null ^ this.getInput() == null) return false; if (other.getInput() != null && other.getInput().equals(this.getInput()) == false) return false; if (other.getOutput() == null ^ this.getOutput() == null)
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getKinesisVideoStream() == null) ? 0 : getKinesisVideoStream().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.getInput() != null && other.getInput().equals(this.getInput()) == false) return false; if (other.getOutput() == null ^ this.getOutput() == 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 (getKinesisVideoStream() != null) sb.append("KinesisVideoStream: ").append(getKinesisVideoStream()); 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.getInput() == null ^ this.getInput() == null) return false; if (other.getInput() != null && other.getInput().equals(this.getInput()) == false) return false; if (other.getOutput() == null ^ this.getOutput() == null)
/** * Marshall the given parameter object. */ public void marshall(StreamProcessorInput streamProcessorInput, ProtocolMarshaller protocolMarshaller) { if (streamProcessorInput == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(streamProcessorInput.getKinesisVideoStream(), KINESISVIDEOSTREAM_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 StreamProcessorInput == false) return false; StreamProcessorInput other = (StreamProcessorInput) obj; if (other.getKinesisVideoStream() == null ^ this.getKinesisVideoStream() == null) return false; if (other.getKinesisVideoStream() != null && other.getKinesisVideoStream().equals(this.getKinesisVideoStream()) == false) return false; return true; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getKinesisVideoStream() == null) ? 0 : getKinesisVideoStream().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 (getKinesisVideoStream() != null) sb.append("KinesisVideoStream: " + getKinesisVideoStream()); sb.append("}"); return sb.toString(); }
public void marshall(StreamProcessorInput streamProcessorInput, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (streamProcessorInput.getKinesisVideoStream() != null) { KinesisVideoStream kinesisVideoStream = streamProcessorInput.getKinesisVideoStream(); jsonWriter.name("KinesisVideoStream"); KinesisVideoStreamJsonMarshaller.getInstance().marshall(kinesisVideoStream, jsonWriter); } jsonWriter.endObject(); }