/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.rekognition.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *
* Starts processing a stream processor. You create a stream processor by
* calling CreateStreamProcessor. To tell
* StartStreamProcessor
which stream processor to start, use the
* value of the Name
field specified in the call to
* CreateStreamProcessor
.
*
* If you are using a label detection stream processor to detect labels, you
* need to provide a Start selector
and a
* Stop selector
to determine the length of the stream processing
* time.
*
* The name of the stream processor to start processing. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.\-]+
*/
private String name;
/**
*
* Specifies the starting point in the Kinesis stream to start processing. * You can use the producer timestamp or the fragment number. If you use the * producer timestamp, you must put the time in milliseconds. For more * information about fragment numbers, see Fragment. *
** This is a required parameter for label detection stream processors and * should not be used to start a face search stream processor. *
*/ private StreamProcessingStartSelector startSelector; /** ** Specifies when to stop processing the stream. You can specify a maximum * amount of time to process the video. *
** This is a required parameter for label detection stream processors and * should not be used to start a face search stream processor. *
*/ private StreamProcessingStopSelector stopSelector; /** ** The name of the stream processor to start processing. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.\-]+
*
* @return
* The name of the stream processor to start processing. *
*/ public String getName() { return name; } /** ** The name of the stream processor to start processing. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.\-]+
*
* @param name
* The name of the stream processor to start processing. *
*/ public void setName(String name) { this.name = name; } /** ** The name of the stream processor to start processing. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.\-]+
*
* @param name
* The name of the stream processor to start processing. *
* @return A reference to this updated object so that method calls can be * chained together. */ public StartStreamProcessorRequest withName(String name) { this.name = name; return this; } /** ** Specifies the starting point in the Kinesis stream to start processing. * You can use the producer timestamp or the fragment number. If you use the * producer timestamp, you must put the time in milliseconds. For more * information about fragment numbers, see Fragment. *
** This is a required parameter for label detection stream processors and * should not be used to start a face search stream processor. *
* * @return* Specifies the starting point in the Kinesis stream to start * processing. You can use the producer timestamp or the fragment * number. If you use the producer timestamp, you must put the time * in milliseconds. For more information about fragment numbers, see * Fragment. *
** This is a required parameter for label detection stream * processors and should not be used to start a face search stream * processor. *
*/ public StreamProcessingStartSelector getStartSelector() { return startSelector; } /** ** Specifies the starting point in the Kinesis stream to start processing. * You can use the producer timestamp or the fragment number. If you use the * producer timestamp, you must put the time in milliseconds. For more * information about fragment numbers, see Fragment. *
** This is a required parameter for label detection stream processors and * should not be used to start a face search stream processor. *
* * @param startSelector* Specifies the starting point in the Kinesis stream to start * processing. You can use the producer timestamp or the fragment * number. If you use the producer timestamp, you must put the * time in milliseconds. For more information about fragment * numbers, see Fragment. *
** This is a required parameter for label detection stream * processors and should not be used to start a face search * stream processor. *
*/ public void setStartSelector(StreamProcessingStartSelector startSelector) { this.startSelector = startSelector; } /** ** Specifies the starting point in the Kinesis stream to start processing. * You can use the producer timestamp or the fragment number. If you use the * producer timestamp, you must put the time in milliseconds. For more * information about fragment numbers, see Fragment. *
** This is a required parameter for label detection stream processors and * should not be used to start a face search stream processor. *
** Returns a reference to this object so that method calls can be chained * together. * * @param startSelector
* Specifies the starting point in the Kinesis stream to start * processing. You can use the producer timestamp or the fragment * number. If you use the producer timestamp, you must put the * time in milliseconds. For more information about fragment * numbers, see Fragment. *
** This is a required parameter for label detection stream * processors and should not be used to start a face search * stream processor. *
* @return A reference to this updated object so that method calls can be * chained together. */ public StartStreamProcessorRequest withStartSelector(StreamProcessingStartSelector startSelector) { this.startSelector = startSelector; return this; } /** ** Specifies when to stop processing the stream. You can specify a maximum * amount of time to process the video. *
** This is a required parameter for label detection stream processors and * should not be used to start a face search stream processor. *
* * @return* Specifies when to stop processing the stream. You can specify a * maximum amount of time to process the video. *
** This is a required parameter for label detection stream * processors and should not be used to start a face search stream * processor. *
*/ public StreamProcessingStopSelector getStopSelector() { return stopSelector; } /** ** Specifies when to stop processing the stream. You can specify a maximum * amount of time to process the video. *
** This is a required parameter for label detection stream processors and * should not be used to start a face search stream processor. *
* * @param stopSelector* Specifies when to stop processing the stream. You can specify * a maximum amount of time to process the video. *
** This is a required parameter for label detection stream * processors and should not be used to start a face search * stream processor. *
*/ public void setStopSelector(StreamProcessingStopSelector stopSelector) { this.stopSelector = stopSelector; } /** ** Specifies when to stop processing the stream. You can specify a maximum * amount of time to process the video. *
** This is a required parameter for label detection stream processors and * should not be used to start a face search stream processor. *
** Returns a reference to this object so that method calls can be chained * together. * * @param stopSelector
* Specifies when to stop processing the stream. You can specify * a maximum amount of time to process the video. *
** This is a required parameter for label detection stream * processors and should not be used to start a face search * stream processor. *
* @return A reference to this updated object so that method calls can be * chained together. */ public StartStreamProcessorRequest withStopSelector(StreamProcessingStopSelector stopSelector) { this.stopSelector = stopSelector; return this; } /** * 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 (getName() != null) sb.append("Name: " + getName() + ","); if (getStartSelector() != null) sb.append("StartSelector: " + getStartSelector() + ","); if (getStopSelector() != null) sb.append("StopSelector: " + getStopSelector()); 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 + ((getStartSelector() == null) ? 0 : getStartSelector().hashCode()); hashCode = prime * hashCode + ((getStopSelector() == null) ? 0 : getStopSelector().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartStreamProcessorRequest == false) return false; StartStreamProcessorRequest other = (StartStreamProcessorRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getStartSelector() == null ^ this.getStartSelector() == null) return false; if (other.getStartSelector() != null && other.getStartSelector().equals(this.getStartSelector()) == false) return false; if (other.getStopSelector() == null ^ this.getStopSelector() == null) return false; if (other.getStopSelector() != null && other.getStopSelector().equals(this.getStopSelector()) == false) return false; return true; } }