/* * 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.kinesisvideo.model; import java.io.Serializable; /** *
* The structure that contains the information required for the KVS images * delivery. If null, the configuration will be deleted from the stream. *
*/ public class ImageGenerationConfiguration implements Serializable { /** *
* Indicates whether the
* ContinuousImageGenerationConfigurations
API is enabled or
* disabled.
*
* Constraints:
* Allowed Values: ENABLED, DISABLED
*/
private String status;
/**
*
* The origin of the Server or Producer timestamps to use to generate the * images. *
*
* Constraints:
* Allowed Values: SERVER_TIMESTAMP, PRODUCER_TIMESTAMP
*/
private String imageSelectorType;
/**
*
* The structure that contains the information required to deliver images to * a customer. *
*/ private ImageGenerationDestinationConfig destinationConfig; /** *
* The time interval in milliseconds (ms) at which the images need to be
* generated from the stream. The minimum value that can be provided is 33
* ms, because a camera that generates content at 30 FPS would create a
* frame every 33.3 ms. If the timestamp range is less than the sampling
* interval, the Image from the StartTimestamp
will be returned
* if available.
*
* Constraints:
* Range: 3000 - 20000
*/
private Integer samplingInterval;
/**
*
* The accepted image format. *
*
* Constraints:
* Allowed Values: JPEG, PNG
*/
private String format;
/**
*
* The list of a key-value pair structure that contains extra parameters
* that can be applied when the image is generated. The
* FormatConfig
key is the JPEGQuality
, which
* indicates the JPEG quality key to be used to generate the image. The
* FormatConfig
value accepts ints from 1 to 100. If the value
* is 1, the image will be generated with less quality and the best
* compression. If the value is 100, the image will be generated with the
* best quality and less compression. If no value is provided, the default
* value of the JPEGQuality
key will be set to 80.
*
* The width of the output image that is used in conjunction with the
* HeightPixels
parameter. When both WidthPixels
* and HeightPixels
parameters are provided, the image will be
* stretched to fit the specified aspect ratio. If only the
* WidthPixels
parameter is provided, its original aspect ratio
* will be used to calculate the HeightPixels
ratio. If neither
* parameter is provided, the original image size will be returned.
*
* Constraints:
* Range: 1 - 3840
*/
private Integer widthPixels;
/**
*
* The height of the output image that is used in conjunction with the
* WidthPixels
parameter. When both HeightPixels
* and WidthPixels
parameters are provided, the image will be
* stretched to fit the specified aspect ratio. If only the
* HeightPixels
parameter is provided, its original aspect
* ratio will be used to calculate the WidthPixels
ratio. If
* neither parameter is provided, the original image size will be returned.
*
* Constraints:
* Range: 1 - 2160
*/
private Integer heightPixels;
/**
*
* Indicates whether the
* ContinuousImageGenerationConfigurations
API is enabled or
* disabled.
*
* Constraints:
* Allowed Values: ENABLED, DISABLED
*
* @return
* Indicates whether the
* ContinuousImageGenerationConfigurations
API is
* enabled or disabled.
*
* Indicates whether the
* ContinuousImageGenerationConfigurations
API is enabled or
* disabled.
*
* Constraints:
* Allowed Values: ENABLED, DISABLED
*
* @param status
* Indicates whether the
* ContinuousImageGenerationConfigurations
API is
* enabled or disabled.
*
* Indicates whether the
* ContinuousImageGenerationConfigurations
API is enabled or
* disabled.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: ENABLED, DISABLED
*
* @param status
* Indicates whether the
* ContinuousImageGenerationConfigurations
API is
* enabled or disabled.
*
* Indicates whether the
* ContinuousImageGenerationConfigurations
API is enabled or
* disabled.
*
* Constraints:
* Allowed Values: ENABLED, DISABLED
*
* @param status
* Indicates whether the
* ContinuousImageGenerationConfigurations
API is
* enabled or disabled.
*
* Indicates whether the
* ContinuousImageGenerationConfigurations
API is enabled or
* disabled.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: ENABLED, DISABLED
*
* @param status
* Indicates whether the
* ContinuousImageGenerationConfigurations
API is
* enabled or disabled.
*
* The origin of the Server or Producer timestamps to use to generate the * images. *
*
* Constraints:
* Allowed Values: SERVER_TIMESTAMP, PRODUCER_TIMESTAMP
*
* @return
* The origin of the Server or Producer timestamps to use to * generate the images. *
* @see ImageSelectorType */ public String getImageSelectorType() { return imageSelectorType; } /** ** The origin of the Server or Producer timestamps to use to generate the * images. *
*
* Constraints:
* Allowed Values: SERVER_TIMESTAMP, PRODUCER_TIMESTAMP
*
* @param imageSelectorType
* The origin of the Server or Producer timestamps to use to * generate the images. *
* @see ImageSelectorType */ public void setImageSelectorType(String imageSelectorType) { this.imageSelectorType = imageSelectorType; } /** ** The origin of the Server or Producer timestamps to use to generate the * images. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: SERVER_TIMESTAMP, PRODUCER_TIMESTAMP
*
* @param imageSelectorType
* The origin of the Server or Producer timestamps to use to * generate the images. *
* @return A reference to this updated object so that method calls can be * chained together. * @see ImageSelectorType */ public ImageGenerationConfiguration withImageSelectorType(String imageSelectorType) { this.imageSelectorType = imageSelectorType; return this; } /** ** The origin of the Server or Producer timestamps to use to generate the * images. *
*
* Constraints:
* Allowed Values: SERVER_TIMESTAMP, PRODUCER_TIMESTAMP
*
* @param imageSelectorType
* The origin of the Server or Producer timestamps to use to * generate the images. *
* @see ImageSelectorType */ public void setImageSelectorType(ImageSelectorType imageSelectorType) { this.imageSelectorType = imageSelectorType.toString(); } /** ** The origin of the Server or Producer timestamps to use to generate the * images. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: SERVER_TIMESTAMP, PRODUCER_TIMESTAMP
*
* @param imageSelectorType
* The origin of the Server or Producer timestamps to use to * generate the images. *
* @return A reference to this updated object so that method calls can be * chained together. * @see ImageSelectorType */ public ImageGenerationConfiguration withImageSelectorType(ImageSelectorType imageSelectorType) { this.imageSelectorType = imageSelectorType.toString(); return this; } /** ** The structure that contains the information required to deliver images to * a customer. *
* * @return* The structure that contains the information required to deliver * images to a customer. *
*/ public ImageGenerationDestinationConfig getDestinationConfig() { return destinationConfig; } /** ** The structure that contains the information required to deliver images to * a customer. *
* * @param destinationConfig* The structure that contains the information required to * deliver images to a customer. *
*/ public void setDestinationConfig(ImageGenerationDestinationConfig destinationConfig) { this.destinationConfig = destinationConfig; } /** ** The structure that contains the information required to deliver images to * a customer. *
** Returns a reference to this object so that method calls can be chained * together. * * @param destinationConfig
* The structure that contains the information required to * deliver images to a customer. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ImageGenerationConfiguration withDestinationConfig( ImageGenerationDestinationConfig destinationConfig) { this.destinationConfig = destinationConfig; return this; } /** *
* The time interval in milliseconds (ms) at which the images need to be
* generated from the stream. The minimum value that can be provided is 33
* ms, because a camera that generates content at 30 FPS would create a
* frame every 33.3 ms. If the timestamp range is less than the sampling
* interval, the Image from the StartTimestamp
will be returned
* if available.
*
* Constraints:
* Range: 3000 - 20000
*
* @return
* The time interval in milliseconds (ms) at which the images need
* to be generated from the stream. The minimum value that can be
* provided is 33 ms, because a camera that generates content at 30
* FPS would create a frame every 33.3 ms. If the timestamp range is
* less than the sampling interval, the Image from the
* StartTimestamp
will be returned if available.
*
* The time interval in milliseconds (ms) at which the images need to be
* generated from the stream. The minimum value that can be provided is 33
* ms, because a camera that generates content at 30 FPS would create a
* frame every 33.3 ms. If the timestamp range is less than the sampling
* interval, the Image from the StartTimestamp
will be returned
* if available.
*
* Constraints:
* Range: 3000 - 20000
*
* @param samplingInterval
* The time interval in milliseconds (ms) at which the images
* need to be generated from the stream. The minimum value that
* can be provided is 33 ms, because a camera that generates
* content at 30 FPS would create a frame every 33.3 ms. If the
* timestamp range is less than the sampling interval, the Image
* from the StartTimestamp
will be returned if
* available.
*
* The time interval in milliseconds (ms) at which the images need to be
* generated from the stream. The minimum value that can be provided is 33
* ms, because a camera that generates content at 30 FPS would create a
* frame every 33.3 ms. If the timestamp range is less than the sampling
* interval, the Image from the StartTimestamp
will be returned
* if available.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 3000 - 20000
*
* @param samplingInterval
* The time interval in milliseconds (ms) at which the images
* need to be generated from the stream. The minimum value that
* can be provided is 33 ms, because a camera that generates
* content at 30 FPS would create a frame every 33.3 ms. If the
* timestamp range is less than the sampling interval, the Image
* from the StartTimestamp
will be returned if
* available.
*
* The accepted image format. *
*
* Constraints:
* Allowed Values: JPEG, PNG
*
* @return
* The accepted image format. *
* @see Format */ public String getFormat() { return format; } /** ** The accepted image format. *
*
* Constraints:
* Allowed Values: JPEG, PNG
*
* @param format
* The accepted image format. *
* @see Format */ public void setFormat(String format) { this.format = format; } /** ** The accepted image format. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: JPEG, PNG
*
* @param format
* The accepted image format. *
* @return A reference to this updated object so that method calls can be * chained together. * @see Format */ public ImageGenerationConfiguration withFormat(String format) { this.format = format; return this; } /** ** The accepted image format. *
*
* Constraints:
* Allowed Values: JPEG, PNG
*
* @param format
* The accepted image format. *
* @see Format */ public void setFormat(Format format) { this.format = format.toString(); } /** ** The accepted image format. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: JPEG, PNG
*
* @param format
* The accepted image format. *
* @return A reference to this updated object so that method calls can be * chained together. * @see Format */ public ImageGenerationConfiguration withFormat(Format format) { this.format = format.toString(); return this; } /** *
* The list of a key-value pair structure that contains extra parameters
* that can be applied when the image is generated. The
* FormatConfig
key is the JPEGQuality
, which
* indicates the JPEG quality key to be used to generate the image. The
* FormatConfig
value accepts ints from 1 to 100. If the value
* is 1, the image will be generated with less quality and the best
* compression. If the value is 100, the image will be generated with the
* best quality and less compression. If no value is provided, the default
* value of the JPEGQuality
key will be set to 80.
*
* The list of a key-value pair structure that contains extra
* parameters that can be applied when the image is generated. The
* FormatConfig
key is the JPEGQuality
,
* which indicates the JPEG quality key to be used to generate the
* image. The FormatConfig
value accepts ints from 1 to
* 100. If the value is 1, the image will be generated with less
* quality and the best compression. If the value is 100, the image
* will be generated with the best quality and less compression. If
* no value is provided, the default value of the
* JPEGQuality
key will be set to 80.
*
* The list of a key-value pair structure that contains extra parameters
* that can be applied when the image is generated. The
* FormatConfig
key is the JPEGQuality
, which
* indicates the JPEG quality key to be used to generate the image. The
* FormatConfig
value accepts ints from 1 to 100. If the value
* is 1, the image will be generated with less quality and the best
* compression. If the value is 100, the image will be generated with the
* best quality and less compression. If no value is provided, the default
* value of the JPEGQuality
key will be set to 80.
*
* The list of a key-value pair structure that contains extra
* parameters that can be applied when the image is generated.
* The FormatConfig
key is the
* JPEGQuality
, which indicates the JPEG quality key
* to be used to generate the image. The
* FormatConfig
value accepts ints from 1 to 100. If
* the value is 1, the image will be generated with less quality
* and the best compression. If the value is 100, the image will
* be generated with the best quality and less compression. If no
* value is provided, the default value of the
* JPEGQuality
key will be set to 80.
*
* The list of a key-value pair structure that contains extra parameters
* that can be applied when the image is generated. The
* FormatConfig
key is the JPEGQuality
, which
* indicates the JPEG quality key to be used to generate the image. The
* FormatConfig
value accepts ints from 1 to 100. If the value
* is 1, the image will be generated with less quality and the best
* compression. If the value is 100, the image will be generated with the
* best quality and less compression. If no value is provided, the default
* value of the JPEGQuality
key will be set to 80.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param formatConfig
* The list of a key-value pair structure that contains extra
* parameters that can be applied when the image is generated.
* The FormatConfig
key is the
* JPEGQuality
, which indicates the JPEG quality key
* to be used to generate the image. The
* FormatConfig
value accepts ints from 1 to 100. If
* the value is 1, the image will be generated with less quality
* and the best compression. If the value is 100, the image will
* be generated with the best quality and less compression. If no
* value is provided, the default value of the
* JPEGQuality
key will be set to 80.
*
* The list of a key-value pair structure that contains extra parameters
* that can be applied when the image is generated. The
* FormatConfig
key is the JPEGQuality
, which
* indicates the JPEG quality key to be used to generate the image. The
* FormatConfig
value accepts ints from 1 to 100. If the value
* is 1, the image will be generated with less quality and the best
* compression. If the value is 100, the image will be generated with the
* best quality and less compression. If no value is provided, the default
* value of the JPEGQuality
key will be set to 80.
*
* The method adds a new key-value pair into FormatConfig 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 FormatConfig.
* @param value The corresponding value of the entry to be added into
* FormatConfig.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ImageGenerationConfiguration addFormatConfigEntry(String key, String value) {
if (null == this.formatConfig) {
this.formatConfig = new java.util.HashMap
* Returns a reference to this object so that method calls can be chained
* together.
*/
public ImageGenerationConfiguration clearFormatConfigEntries() {
this.formatConfig = null;
return this;
}
/**
*
* The width of the output image that is used in conjunction with the
*
* Constraints:
* The width of the output image that is used in conjunction with
* the
* The width of the output image that is used in conjunction with the
*
* Constraints:
* The width of the output image that is used in conjunction with
* the
* The width of the output image that is used in conjunction with the
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* The width of the output image that is used in conjunction with
* the
* The height of the output image that is used in conjunction with the
*
* Constraints:
* The height of the output image that is used in conjunction with
* the
* The height of the output image that is used in conjunction with the
*
* Constraints:
* The height of the output image that is used in conjunction
* with the
* The height of the output image that is used in conjunction with the
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* The height of the output image that is used in conjunction
* with the HeightPixels
parameter. When both WidthPixels
* and HeightPixels
parameters are provided, the image will be
* stretched to fit the specified aspect ratio. If only the
* WidthPixels
parameter is provided, its original aspect ratio
* will be used to calculate the HeightPixels
ratio. If neither
* parameter is provided, the original image size will be returned.
*
* Range: 1 - 3840
*
* @return HeightPixels
parameter. When both
* WidthPixels
and HeightPixels
parameters
* are provided, the image will be stretched to fit the specified
* aspect ratio. If only the WidthPixels
parameter is
* provided, its original aspect ratio will be used to calculate the
* HeightPixels
ratio. If neither parameter is
* provided, the original image size will be returned.
* HeightPixels
parameter. When both WidthPixels
* and HeightPixels
parameters are provided, the image will be
* stretched to fit the specified aspect ratio. If only the
* WidthPixels
parameter is provided, its original aspect ratio
* will be used to calculate the HeightPixels
ratio. If neither
* parameter is provided, the original image size will be returned.
*
* Range: 1 - 3840
*
* @param widthPixels HeightPixels
parameter. When both
* WidthPixels
and HeightPixels
* parameters are provided, the image will be stretched to fit
* the specified aspect ratio. If only the
* WidthPixels
parameter is provided, its original
* aspect ratio will be used to calculate the
* HeightPixels
ratio. If neither parameter is
* provided, the original image size will be returned.
* HeightPixels
parameter. When both WidthPixels
* and HeightPixels
parameters are provided, the image will be
* stretched to fit the specified aspect ratio. If only the
* WidthPixels
parameter is provided, its original aspect ratio
* will be used to calculate the HeightPixels
ratio. If neither
* parameter is provided, the original image size will be returned.
*
* Range: 1 - 3840
*
* @param widthPixels HeightPixels
parameter. When both
* WidthPixels
and HeightPixels
* parameters are provided, the image will be stretched to fit
* the specified aspect ratio. If only the
* WidthPixels
parameter is provided, its original
* aspect ratio will be used to calculate the
* HeightPixels
ratio. If neither parameter is
* provided, the original image size will be returned.
* WidthPixels
parameter. When both HeightPixels
* and WidthPixels
parameters are provided, the image will be
* stretched to fit the specified aspect ratio. If only the
* HeightPixels
parameter is provided, its original aspect
* ratio will be used to calculate the WidthPixels
ratio. If
* neither parameter is provided, the original image size will be returned.
*
* Range: 1 - 2160
*
* @return WidthPixels
parameter. When both
* HeightPixels
and WidthPixels
parameters
* are provided, the image will be stretched to fit the specified
* aspect ratio. If only the HeightPixels
parameter is
* provided, its original aspect ratio will be used to calculate the
* WidthPixels
ratio. If neither parameter is provided,
* the original image size will be returned.
* WidthPixels
parameter. When both HeightPixels
* and WidthPixels
parameters are provided, the image will be
* stretched to fit the specified aspect ratio. If only the
* HeightPixels
parameter is provided, its original aspect
* ratio will be used to calculate the WidthPixels
ratio. If
* neither parameter is provided, the original image size will be returned.
*
* Range: 1 - 2160
*
* @param heightPixels WidthPixels
parameter. When both
* HeightPixels
and WidthPixels
* parameters are provided, the image will be stretched to fit
* the specified aspect ratio. If only the
* HeightPixels
parameter is provided, its original
* aspect ratio will be used to calculate the
* WidthPixels
ratio. If neither parameter is
* provided, the original image size will be returned.
* WidthPixels
parameter. When both HeightPixels
* and WidthPixels
parameters are provided, the image will be
* stretched to fit the specified aspect ratio. If only the
* HeightPixels
parameter is provided, its original aspect
* ratio will be used to calculate the WidthPixels
ratio. If
* neither parameter is provided, the original image size will be returned.
*
* Range: 1 - 2160
*
* @param heightPixels WidthPixels
parameter. When both
* HeightPixels
and WidthPixels
* parameters are provided, the image will be stretched to fit
* the specified aspect ratio. If only the
* HeightPixels
parameter is provided, its original
* aspect ratio will be used to calculate the
* WidthPixels
ratio. If neither parameter is
* provided, the original image size will be returned.
*