/* * 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; /** *
* Creates an Amazon Rekognition stream processor that you can use to detect and * recognize faces or to detect labels in a streaming video. *
** Amazon Rekognition Video is a consumer of live video from Amazon Kinesis * Video Streams. There are two different settings for stream processors in * Amazon Rekognition: detecting faces and detecting labels. *
*
* If you are creating a stream processor for detecting faces, you provide as
* input a Kinesis video stream (Input
) and a Kinesis data stream (
* Output
) stream for receiving the output. You must use the
* FaceSearch
option in Settings
, specifying the
* collection that contains the faces you want to recognize. After you have
* finished analyzing a streaming video, use StopStreamProcessor to stop
* processing.
*
* If you are creating a stream processor to detect labels, you provide as input
* a Kinesis video stream (Input
), Amazon S3 bucket information (
* Output
), and an Amazon SNS topic ARN (
* NotificationChannel
). You can also provide a KMS key ID to
* encrypt the data sent to your Amazon S3 bucket. You specify what you want to
* detect by using the ConnectedHome
option in settings, and
* selecting one of the following: PERSON
, PET
,
* PACKAGE
, ALL
You can also specify where in the
* frame you want Amazon Rekognition to monitor with
* RegionsOfInterest
. When you run the StartStreamProcessor
* operation on a label detection stream processor, you input start and stop
* information to determine the length of the processing time.
*
* Use Name
to assign an identifier for the stream processor. You
* use Name
to manage the stream processor. For example, you can
* start processing the source video by calling StartStreamProcessor with
* the Name
field.
*
* This operation requires permissions to perform the
* rekognition:CreateStreamProcessor
action. If you want to tag
* your stream processor, you also require permission to perform the
* rekognition:TagResource
operation.
*
* Kinesis video stream stream that provides the source streaming video. If
* you are using the AWS CLI, the parameter name is
* StreamProcessorInput
. This is required for both face search
* and label detection stream processors.
*
* Kinesis data stream stream or Amazon S3 bucket location to which Amazon
* Rekognition Video puts the analysis results. If you are using the AWS
* CLI, the parameter name is StreamProcessorOutput
. This must
* be a S3Destination of an Amazon S3 bucket that you own for a label
* detection stream processor or a Kinesis data stream ARN for a face search
* stream processor.
*
* An identifier you assign to the stream processor. You can use
* Name
to manage the stream processor. For example, you can
* get the current status of the stream processor by calling
* DescribeStreamProcessor. Name
is idempotent. This is
* required for both face search and label detection stream processors.
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.\-]+
*/
private String name;
/**
*
* Input parameters used in a streaming video analyzed by a stream
* processor. You can use FaceSearch
to recognize faces in a
* streaming video, or you can use ConnectedHome
to detect
* labels.
*
* The Amazon Resource Number (ARN) of the IAM role that allows access to * the stream processor. The IAM role provides Rekognition read permissions * for a Kinesis stream. It also provides write permissions to an Amazon S3 * bucket and Amazon Simple Notification Service topic for a label detection * stream processor. This is required for both face search and label * detection stream processors. *
*
* Constraints:
* Pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+
*/
private String roleArn;
/**
*
* A set of tags (key-value pairs) that you want to attach to the stream * processor. *
*/ private java.util.Map* The Amazon Simple Notification Service topic to which Amazon Rekognition * publishes the object detection results and completion status of a video * analysis operation. *
** Amazon Rekognition publishes a notification the first time an object of * interest or a person is detected in the video stream. For example, if * Amazon Rekognition detects a person at second 2, a pet at second 4, and a * person again at second 5, Amazon Rekognition sends 2 object class * detected notifications, one for a person at second 2 and one for a pet at * second 4. *
** Amazon Rekognition also publishes an an end-of-session notification with * a summary when the stream processing session is complete. *
*/ private StreamProcessorNotificationChannel notificationChannel; /** ** The identifier for your AWS Key Management Service key (AWS KMS key). * This is an optional parameter for label detection stream processors and * should not be used to create a face search stream processor. You can * supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS * key, an alias for your KMS key, or an alias ARN. The key is used to * encrypt results and data published to your Amazon S3 bucket, which * includes image frames and hero images. Your source images are unaffected. *
**
*
* Constraints:
* Length: 1 - 2048
* Pattern: ^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$
*/
private String kmsKeyId;
/**
*
* Specifies locations in the frames where Amazon Rekognition checks for * objects or people. You can specify up to 10 regions of interest, and each * region has either a polygon or a bounding box. This is an optional * parameter for label detection stream processors and should not be used to * create a face search stream processor. *
*/ private java.util.List* Shows whether you are sharing data with Rekognition to improve model * performance. You can choose this option at the account level or on a * per-stream basis. Note that if you opt out at the account level this * setting is ignored on individual streams. *
*/ private StreamProcessorDataSharingPreference dataSharingPreference; /** *
* Kinesis video stream stream that provides the source streaming video. If
* you are using the AWS CLI, the parameter name is
* StreamProcessorInput
. This is required for both face search
* and label detection stream processors.
*
* Kinesis video stream stream that provides the source streaming
* video. If you are using the AWS CLI, the parameter name is
* StreamProcessorInput
. This is required for both face
* search and label detection stream processors.
*
* Kinesis video stream stream that provides the source streaming video. If
* you are using the AWS CLI, the parameter name is
* StreamProcessorInput
. This is required for both face search
* and label detection stream processors.
*
* Kinesis video stream stream that provides the source streaming
* video. If you are using the AWS CLI, the parameter name is
* StreamProcessorInput
. This is required for both
* face search and label detection stream processors.
*
* Kinesis video stream stream that provides the source streaming video. If
* you are using the AWS CLI, the parameter name is
* StreamProcessorInput
. This is required for both face search
* and label detection stream processors.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param input
* Kinesis video stream stream that provides the source streaming
* video. If you are using the AWS CLI, the parameter name is
* StreamProcessorInput
. This is required for both
* face search and label detection stream processors.
*
* Kinesis data stream stream or Amazon S3 bucket location to which Amazon
* Rekognition Video puts the analysis results. If you are using the AWS
* CLI, the parameter name is StreamProcessorOutput
. This must
* be a S3Destination of an Amazon S3 bucket that you own for a label
* detection stream processor or a Kinesis data stream ARN for a face search
* stream processor.
*
* Kinesis data stream stream or Amazon S3 bucket location to which
* Amazon Rekognition Video puts the analysis results. If you are
* using the AWS CLI, the parameter name is
* StreamProcessorOutput
. This must be a
* S3Destination of an Amazon S3 bucket that you own for a
* label detection stream processor or a Kinesis data stream ARN for
* a face search stream processor.
*
* Kinesis data stream stream or Amazon S3 bucket location to which Amazon
* Rekognition Video puts the analysis results. If you are using the AWS
* CLI, the parameter name is StreamProcessorOutput
. This must
* be a S3Destination of an Amazon S3 bucket that you own for a label
* detection stream processor or a Kinesis data stream ARN for a face search
* stream processor.
*
* Kinesis data stream stream or Amazon S3 bucket location to
* which Amazon Rekognition Video puts the analysis results. If
* you are using the AWS CLI, the parameter name is
* StreamProcessorOutput
. This must be a
* S3Destination of an Amazon S3 bucket that you own for a
* label detection stream processor or a Kinesis data stream ARN
* for a face search stream processor.
*
* Kinesis data stream stream or Amazon S3 bucket location to which Amazon
* Rekognition Video puts the analysis results. If you are using the AWS
* CLI, the parameter name is StreamProcessorOutput
. This must
* be a S3Destination of an Amazon S3 bucket that you own for a label
* detection stream processor or a Kinesis data stream ARN for a face search
* stream processor.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param output
* Kinesis data stream stream or Amazon S3 bucket location to
* which Amazon Rekognition Video puts the analysis results. If
* you are using the AWS CLI, the parameter name is
* StreamProcessorOutput
. This must be a
* S3Destination of an Amazon S3 bucket that you own for a
* label detection stream processor or a Kinesis data stream ARN
* for a face search stream processor.
*
* An identifier you assign to the stream processor. You can use
* Name
to manage the stream processor. For example, you can
* get the current status of the stream processor by calling
* DescribeStreamProcessor. Name
is idempotent. This is
* required for both face search and label detection stream processors.
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.\-]+
*
* @return
* An identifier you assign to the stream processor. You can use
* Name
to manage the stream processor. For example,
* you can get the current status of the stream processor by calling
* DescribeStreamProcessor. Name
is idempotent.
* This is required for both face search and label detection stream
* processors.
*
* An identifier you assign to the stream processor. You can use
* Name
to manage the stream processor. For example, you can
* get the current status of the stream processor by calling
* DescribeStreamProcessor. Name
is idempotent. This is
* required for both face search and label detection stream processors.
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.\-]+
*
* @param name
* An identifier you assign to the stream processor. You can use
* Name
to manage the stream processor. For example,
* you can get the current status of the stream processor by
* calling DescribeStreamProcessor. Name
is
* idempotent. This is required for both face search and label
* detection stream processors.
*
* An identifier you assign to the stream processor. You can use
* Name
to manage the stream processor. For example, you can
* get the current status of the stream processor by calling
* DescribeStreamProcessor. Name
is idempotent. This is
* required for both face search and label detection stream processors.
*
* 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
* An identifier you assign to the stream processor. You can use
* Name
to manage the stream processor. For example,
* you can get the current status of the stream processor by
* calling DescribeStreamProcessor. Name
is
* idempotent. This is required for both face search and label
* detection stream processors.
*
* Input parameters used in a streaming video analyzed by a stream
* processor. You can use FaceSearch
to recognize faces in a
* streaming video, or you can use ConnectedHome
to detect
* labels.
*
* Input parameters used in a streaming video analyzed by a stream
* processor. You can use FaceSearch
to recognize faces
* in a streaming video, or you can use ConnectedHome
* to detect labels.
*
* Input parameters used in a streaming video analyzed by a stream
* processor. You can use FaceSearch
to recognize faces in a
* streaming video, or you can use ConnectedHome
to detect
* labels.
*
* Input parameters used in a streaming video analyzed by a
* stream processor. You can use FaceSearch
to
* recognize faces in a streaming video, or you can use
* ConnectedHome
to detect labels.
*
* Input parameters used in a streaming video analyzed by a stream
* processor. You can use FaceSearch
to recognize faces in a
* streaming video, or you can use ConnectedHome
to detect
* labels.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param settings
* Input parameters used in a streaming video analyzed by a
* stream processor. You can use FaceSearch
to
* recognize faces in a streaming video, or you can use
* ConnectedHome
to detect labels.
*
* The Amazon Resource Number (ARN) of the IAM role that allows access to * the stream processor. The IAM role provides Rekognition read permissions * for a Kinesis stream. It also provides write permissions to an Amazon S3 * bucket and Amazon Simple Notification Service topic for a label detection * stream processor. This is required for both face search and label * detection stream processors. *
*
* Constraints:
* Pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+
*
* @return
* The Amazon Resource Number (ARN) of the IAM role that allows * access to the stream processor. The IAM role provides Rekognition * read permissions for a Kinesis stream. It also provides write * permissions to an Amazon S3 bucket and Amazon Simple Notification * Service topic for a label detection stream processor. This is * required for both face search and label detection stream * processors. *
*/ public String getRoleArn() { return roleArn; } /** ** The Amazon Resource Number (ARN) of the IAM role that allows access to * the stream processor. The IAM role provides Rekognition read permissions * for a Kinesis stream. It also provides write permissions to an Amazon S3 * bucket and Amazon Simple Notification Service topic for a label detection * stream processor. This is required for both face search and label * detection stream processors. *
*
* Constraints:
* Pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+
*
* @param roleArn
* The Amazon Resource Number (ARN) of the IAM role that allows * access to the stream processor. The IAM role provides * Rekognition read permissions for a Kinesis stream. It also * provides write permissions to an Amazon S3 bucket and Amazon * Simple Notification Service topic for a label detection stream * processor. This is required for both face search and label * detection stream processors. *
*/ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** ** The Amazon Resource Number (ARN) of the IAM role that allows access to * the stream processor. The IAM role provides Rekognition read permissions * for a Kinesis stream. It also provides write permissions to an Amazon S3 * bucket and Amazon Simple Notification Service topic for a label detection * stream processor. This is required for both face search and label * detection stream processors. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+
*
* @param roleArn
* The Amazon Resource Number (ARN) of the IAM role that allows * access to the stream processor. The IAM role provides * Rekognition read permissions for a Kinesis stream. It also * provides write permissions to an Amazon S3 bucket and Amazon * Simple Notification Service topic for a label detection stream * processor. This is required for both face search and label * detection stream processors. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateStreamProcessorRequest withRoleArn(String roleArn) { this.roleArn = roleArn; return this; } /** ** A set of tags (key-value pairs) that you want to attach to the stream * processor. *
* * @return* A set of tags (key-value pairs) that you want to attach to the * stream processor. *
*/ public java.util.Map* A set of tags (key-value pairs) that you want to attach to the stream * processor. *
* * @param tags* A set of tags (key-value pairs) that you want to attach to the * stream processor. *
*/ public void setTags(java.util.Map* A set of tags (key-value pairs) that you want to attach to the stream * processor. *
** Returns a reference to this object so that method calls can be chained * together. * * @param tags
* A set of tags (key-value pairs) that you want to attach to the * stream processor. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateStreamProcessorRequest withTags(java.util.Map* A set of tags (key-value pairs) that you want to attach to the stream * processor. *
*
* The method adds a new key-value pair into Tags parameter, and returns a
* reference to this object so that method calls can be chained together.
*
* @param key The key of the entry to be added into Tags.
* @param value The corresponding value of the entry to be added into Tags.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public CreateStreamProcessorRequest addTagsEntry(String key, String value) {
if (null == this.tags) {
this.tags = new java.util.HashMap
* Returns a reference to this object so that method calls can be chained
* together.
*/
public CreateStreamProcessorRequest clearTagsEntries() {
this.tags = null;
return this;
}
/**
*
* The Amazon Simple Notification Service topic to which Amazon Rekognition
* publishes the object detection results and completion status of a video
* analysis operation.
*
* Amazon Rekognition publishes a notification the first time an object of
* interest or a person is detected in the video stream. For example, if
* Amazon Rekognition detects a person at second 2, a pet at second 4, and a
* person again at second 5, Amazon Rekognition sends 2 object class
* detected notifications, one for a person at second 2 and one for a pet at
* second 4.
*
* Amazon Rekognition also publishes an an end-of-session notification with
* a summary when the stream processing session is complete.
*
* The Amazon Simple Notification Service topic to which Amazon
* Rekognition publishes the object detection results and completion
* status of a video analysis operation.
*
* Amazon Rekognition publishes a notification the first time an
* object of interest or a person is detected in the video stream.
* For example, if Amazon Rekognition detects a person at second 2,
* a pet at second 4, and a person again at second 5, Amazon
* Rekognition sends 2 object class detected notifications, one for
* a person at second 2 and one for a pet at second 4.
*
* Amazon Rekognition also publishes an an end-of-session
* notification with a summary when the stream processing session is
* complete.
*
* The Amazon Simple Notification Service topic to which Amazon Rekognition
* publishes the object detection results and completion status of a video
* analysis operation.
*
* Amazon Rekognition publishes a notification the first time an object of
* interest or a person is detected in the video stream. For example, if
* Amazon Rekognition detects a person at second 2, a pet at second 4, and a
* person again at second 5, Amazon Rekognition sends 2 object class
* detected notifications, one for a person at second 2 and one for a pet at
* second 4.
*
* Amazon Rekognition also publishes an an end-of-session notification with
* a summary when the stream processing session is complete.
*
* The Amazon Simple Notification Service topic to which Amazon
* Rekognition publishes the object detection results and
* completion status of a video analysis operation.
*
* Amazon Rekognition publishes a notification the first time an
* object of interest or a person is detected in the video
* stream. For example, if Amazon Rekognition detects a person at
* second 2, a pet at second 4, and a person again at second 5,
* Amazon Rekognition sends 2 object class detected
* notifications, one for a person at second 2 and one for a pet
* at second 4.
*
* Amazon Rekognition also publishes an an end-of-session
* notification with a summary when the stream processing session
* is complete.
*
* The Amazon Simple Notification Service topic to which Amazon Rekognition
* publishes the object detection results and completion status of a video
* analysis operation.
*
* Amazon Rekognition publishes a notification the first time an object of
* interest or a person is detected in the video stream. For example, if
* Amazon Rekognition detects a person at second 2, a pet at second 4, and a
* person again at second 5, Amazon Rekognition sends 2 object class
* detected notifications, one for a person at second 2 and one for a pet at
* second 4.
*
* Amazon Rekognition also publishes an an end-of-session notification with
* a summary when the stream processing session is complete.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param notificationChannel
* The Amazon Simple Notification Service topic to which Amazon
* Rekognition publishes the object detection results and
* completion status of a video analysis operation.
*
* Amazon Rekognition publishes a notification the first time an
* object of interest or a person is detected in the video
* stream. For example, if Amazon Rekognition detects a person at
* second 2, a pet at second 4, and a person again at second 5,
* Amazon Rekognition sends 2 object class detected
* notifications, one for a person at second 2 and one for a pet
* at second 4.
*
* Amazon Rekognition also publishes an an end-of-session
* notification with a summary when the stream processing session
* is complete.
*
* The identifier for your AWS Key Management Service key (AWS KMS key).
* This is an optional parameter for label detection stream processors and
* should not be used to create a face search stream processor. You can
* supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS
* key, an alias for your KMS key, or an alias ARN. The key is used to
* encrypt results and data published to your Amazon S3 bucket, which
* includes image frames and hero images. Your source images are unaffected.
*
*
* Constraints:
* The identifier for your AWS Key Management Service key (AWS KMS
* key). This is an optional parameter for label detection stream
* processors and should not be used to create a face search stream
* processor. You can supply the Amazon Resource Name (ARN) of your
* KMS key, the ID of your KMS key, an alias for your KMS key, or an
* alias ARN. The key is used to encrypt results and data published
* to your Amazon S3 bucket, which includes image frames and hero
* images. Your source images are unaffected.
*
*
* The identifier for your AWS Key Management Service key (AWS KMS key).
* This is an optional parameter for label detection stream processors and
* should not be used to create a face search stream processor. You can
* supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS
* key, an alias for your KMS key, or an alias ARN. The key is used to
* encrypt results and data published to your Amazon S3 bucket, which
* includes image frames and hero images. Your source images are unaffected.
*
*
* Constraints:
* The identifier for your AWS Key Management Service key (AWS
* KMS key). This is an optional parameter for label detection
* stream processors and should not be used to create a face
* search stream processor. You can supply the Amazon Resource
* Name (ARN) of your KMS key, the ID of your KMS key, an alias
* for your KMS key, or an alias ARN. The key is used to encrypt
* results and data published to your Amazon S3 bucket, which
* includes image frames and hero images. Your source images are
* unaffected.
*
*
* The identifier for your AWS Key Management Service key (AWS KMS key).
* This is an optional parameter for label detection stream processors and
* should not be used to create a face search stream processor. You can
* supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS
* key, an alias for your KMS key, or an alias ARN. The key is used to
* encrypt results and data published to your Amazon S3 bucket, which
* includes image frames and hero images. Your source images are unaffected.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* The identifier for your AWS Key Management Service key (AWS
* KMS key). This is an optional parameter for label detection
* stream processors and should not be used to create a face
* search stream processor. You can supply the Amazon Resource
* Name (ARN) of your KMS key, the ID of your KMS key, an alias
* for your KMS key, or an alias ARN. The key is used to encrypt
* results and data published to your Amazon S3 bucket, which
* includes image frames and hero images. Your source images are
* unaffected.
*
*
* Specifies locations in the frames where Amazon Rekognition checks for
* objects or people. You can specify up to 10 regions of interest, and each
* region has either a polygon or a bounding box. This is an optional
* parameter for label detection stream processors and should not be used to
* create a face search stream processor.
*
* Specifies locations in the frames where Amazon Rekognition checks
* for objects or people. You can specify up to 10 regions of
* interest, and each region has either a polygon or a bounding box.
* This is an optional parameter for label detection stream
* processors and should not be used to create a face search stream
* processor.
*
* Specifies locations in the frames where Amazon Rekognition checks for
* objects or people. You can specify up to 10 regions of interest, and each
* region has either a polygon or a bounding box. This is an optional
* parameter for label detection stream processors and should not be used to
* create a face search stream processor.
*
* Specifies locations in the frames where Amazon Rekognition
* checks for objects or people. You can specify up to 10 regions
* of interest, and each region has either a polygon or a
* bounding box. This is an optional parameter for label
* detection stream processors and should not be used to create a
* face search stream processor.
*
* Specifies locations in the frames where Amazon Rekognition checks for
* objects or people. You can specify up to 10 regions of interest, and each
* region has either a polygon or a bounding box. This is an optional
* parameter for label detection stream processors and should not be used to
* create a face search stream processor.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param regionsOfInterest
* Specifies locations in the frames where Amazon Rekognition
* checks for objects or people. You can specify up to 10 regions
* of interest, and each region has either a polygon or a
* bounding box. This is an optional parameter for label
* detection stream processors and should not be used to create a
* face search stream processor.
*
* Specifies locations in the frames where Amazon Rekognition checks for
* objects or people. You can specify up to 10 regions of interest, and each
* region has either a polygon or a bounding box. This is an optional
* parameter for label detection stream processors and should not be used to
* create a face search stream processor.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param regionsOfInterest
* Specifies locations in the frames where Amazon Rekognition
* checks for objects or people. You can specify up to 10 regions
* of interest, and each region has either a polygon or a
* bounding box. This is an optional parameter for label
* detection stream processors and should not be used to create a
* face search stream processor.
*
* Shows whether you are sharing data with Rekognition to improve model
* performance. You can choose this option at the account level or on a
* per-stream basis. Note that if you opt out at the account level this
* setting is ignored on individual streams.
*
* Shows whether you are sharing data with Rekognition to improve
* model performance. You can choose this option at the account
* level or on a per-stream basis. Note that if you opt out at the
* account level this setting is ignored on individual streams.
*
* Shows whether you are sharing data with Rekognition to improve model
* performance. You can choose this option at the account level or on a
* per-stream basis. Note that if you opt out at the account level this
* setting is ignored on individual streams.
*
* Shows whether you are sharing data with Rekognition to improve
* model performance. You can choose this option at the account
* level or on a per-stream basis. Note that if you opt out at
* the account level this setting is ignored on individual
* streams.
*
* Shows whether you are sharing data with Rekognition to improve model
* performance. You can choose this option at the account level or on a
* per-stream basis. Note that if you opt out at the account level this
* setting is ignored on individual streams.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param dataSharingPreference
* Shows whether you are sharing data with Rekognition to improve
* model performance. You can choose this option at the account
* level or on a per-stream basis. Note that if you opt out at
* the account level this setting is ignored on individual
* streams.
*
* Length: 1 - 2048
* Pattern: ^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$
*
* @return
* Length: 1 - 2048
* Pattern: ^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$
*
* @param kmsKeyId
* Length: 1 - 2048
* Pattern: ^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$
*
* @param kmsKeyId