@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class GetMediaResult extends AmazonWebServiceResult<ResponseMetadata> implements Serializable, Cloneable
| Constructor and Description | 
|---|
| GetMediaResult() | 
| Modifier and Type | Method and Description | 
|---|---|
| GetMediaResult | clone() | 
| boolean | equals(Object obj) | 
| String | getContentType()
 The content type of the requested media. | 
| InputStream | getPayload()
 The payload Kinesis Video Streams returns is a sequence of chunks from the specified stream. | 
| int | hashCode() | 
| void | setContentType(String contentType)
 The content type of the requested media. | 
| void | setPayload(InputStream payload)
 The payload Kinesis Video Streams returns is a sequence of chunks from the specified stream. | 
| String | toString()Returns a string representation of this object. | 
| GetMediaResult | withContentType(String contentType)
 The content type of the requested media. | 
| GetMediaResult | withPayload(InputStream payload)
 The payload Kinesis Video Streams returns is a sequence of chunks from the specified stream. | 
getSdkHttpMetadata, getSdkResponseMetadata, setSdkHttpMetadata, setSdkResponseMetadatapublic void setContentType(String contentType)
The content type of the requested media.
contentType - The content type of the requested media.public String getContentType()
The content type of the requested media.
public GetMediaResult withContentType(String contentType)
The content type of the requested media.
contentType - The content type of the requested media.public void setPayload(InputStream payload)
 The payload Kinesis Video Streams returns is a sequence of chunks from the specified stream. For information
 about the chunks, see . The chunks that Kinesis Video Streams returns in the GetMedia call also
 include the following additional Matroska (MKV) tags:
 
 AWS_KINESISVIDEO_CONTINUATION_TOKEN (UTF-8 string) - In the event your GetMedia call terminates, you
 can use this continuation token in your next request to get the next chunk where the last request terminated.
 
AWS_KINESISVIDEO_MILLIS_BEHIND_NOW (UTF-8 string) - Client applications can use this tag value to determine how far behind the chunk returned in the response is from the latest chunk on the stream.
AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk.
AWS_KINESISVIDEO_SERVER_TIMESTAMP - Server timestamp of the fragment.
AWS_KINESISVIDEO_PRODUCER_TIMESTAMP - Producer timestamp of the fragment.
The following tags will be present if an error occurs:
AWS_KINESISVIDEO_ERROR_CODE - String description of an error that caused GetMedia to stop.
AWS_KINESISVIDEO_ERROR_ID: Integer code of the error.
The error codes are as follows:
3002 - Error writing to the stream
4000 - Requested fragment is not found
4500 - Access denied for the stream's KMS key
4501 - Stream's KMS key is disabled
4502 - Validation error on the stream's KMS key
4503 - KMS key specified in the stream is unavailable
4504 - Invalid usage of the KMS key specified in the stream
4505 - Invalid state of the KMS key specified in the stream
4506 - Unable to find the KMS key specified in the stream
5000 - Internal error
payload - The payload Kinesis Video Streams returns is a sequence of chunks from the specified stream. For
        information about the chunks, see . The chunks that Kinesis Video Streams returns in the
        GetMedia call also include the following additional Matroska (MKV) tags: 
        
        AWS_KINESISVIDEO_CONTINUATION_TOKEN (UTF-8 string) - In the event your GetMedia call
        terminates, you can use this continuation token in your next request to get the next chunk where the last
        request terminated.
        
AWS_KINESISVIDEO_MILLIS_BEHIND_NOW (UTF-8 string) - Client applications can use this tag value to determine how far behind the chunk returned in the response is from the latest chunk on the stream.
AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk.
AWS_KINESISVIDEO_SERVER_TIMESTAMP - Server timestamp of the fragment.
AWS_KINESISVIDEO_PRODUCER_TIMESTAMP - Producer timestamp of the fragment.
The following tags will be present if an error occurs:
AWS_KINESISVIDEO_ERROR_CODE - String description of an error that caused GetMedia to stop.
AWS_KINESISVIDEO_ERROR_ID: Integer code of the error.
The error codes are as follows:
3002 - Error writing to the stream
4000 - Requested fragment is not found
4500 - Access denied for the stream's KMS key
4501 - Stream's KMS key is disabled
4502 - Validation error on the stream's KMS key
4503 - KMS key specified in the stream is unavailable
4504 - Invalid usage of the KMS key specified in the stream
4505 - Invalid state of the KMS key specified in the stream
4506 - Unable to find the KMS key specified in the stream
5000 - Internal error
public InputStream getPayload()
 The payload Kinesis Video Streams returns is a sequence of chunks from the specified stream. For information
 about the chunks, see . The chunks that Kinesis Video Streams returns in the GetMedia call also
 include the following additional Matroska (MKV) tags:
 
 AWS_KINESISVIDEO_CONTINUATION_TOKEN (UTF-8 string) - In the event your GetMedia call terminates, you
 can use this continuation token in your next request to get the next chunk where the last request terminated.
 
AWS_KINESISVIDEO_MILLIS_BEHIND_NOW (UTF-8 string) - Client applications can use this tag value to determine how far behind the chunk returned in the response is from the latest chunk on the stream.
AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk.
AWS_KINESISVIDEO_SERVER_TIMESTAMP - Server timestamp of the fragment.
AWS_KINESISVIDEO_PRODUCER_TIMESTAMP - Producer timestamp of the fragment.
The following tags will be present if an error occurs:
AWS_KINESISVIDEO_ERROR_CODE - String description of an error that caused GetMedia to stop.
AWS_KINESISVIDEO_ERROR_ID: Integer code of the error.
The error codes are as follows:
3002 - Error writing to the stream
4000 - Requested fragment is not found
4500 - Access denied for the stream's KMS key
4501 - Stream's KMS key is disabled
4502 - Validation error on the stream's KMS key
4503 - KMS key specified in the stream is unavailable
4504 - Invalid usage of the KMS key specified in the stream
4505 - Invalid state of the KMS key specified in the stream
4506 - Unable to find the KMS key specified in the stream
5000 - Internal error
GetMedia call also include the following additional Matroska (MKV) tags: 
         
         AWS_KINESISVIDEO_CONTINUATION_TOKEN (UTF-8 string) - In the event your GetMedia call
         terminates, you can use this continuation token in your next request to get the next chunk where the last
         request terminated.
         
AWS_KINESISVIDEO_MILLIS_BEHIND_NOW (UTF-8 string) - Client applications can use this tag value to determine how far behind the chunk returned in the response is from the latest chunk on the stream.
AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk.
AWS_KINESISVIDEO_SERVER_TIMESTAMP - Server timestamp of the fragment.
AWS_KINESISVIDEO_PRODUCER_TIMESTAMP - Producer timestamp of the fragment.
The following tags will be present if an error occurs:
AWS_KINESISVIDEO_ERROR_CODE - String description of an error that caused GetMedia to stop.
AWS_KINESISVIDEO_ERROR_ID: Integer code of the error.
The error codes are as follows:
3002 - Error writing to the stream
4000 - Requested fragment is not found
4500 - Access denied for the stream's KMS key
4501 - Stream's KMS key is disabled
4502 - Validation error on the stream's KMS key
4503 - KMS key specified in the stream is unavailable
4504 - Invalid usage of the KMS key specified in the stream
4505 - Invalid state of the KMS key specified in the stream
4506 - Unable to find the KMS key specified in the stream
5000 - Internal error
public GetMediaResult withPayload(InputStream payload)
 The payload Kinesis Video Streams returns is a sequence of chunks from the specified stream. For information
 about the chunks, see . The chunks that Kinesis Video Streams returns in the GetMedia call also
 include the following additional Matroska (MKV) tags:
 
 AWS_KINESISVIDEO_CONTINUATION_TOKEN (UTF-8 string) - In the event your GetMedia call terminates, you
 can use this continuation token in your next request to get the next chunk where the last request terminated.
 
AWS_KINESISVIDEO_MILLIS_BEHIND_NOW (UTF-8 string) - Client applications can use this tag value to determine how far behind the chunk returned in the response is from the latest chunk on the stream.
AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk.
AWS_KINESISVIDEO_SERVER_TIMESTAMP - Server timestamp of the fragment.
AWS_KINESISVIDEO_PRODUCER_TIMESTAMP - Producer timestamp of the fragment.
The following tags will be present if an error occurs:
AWS_KINESISVIDEO_ERROR_CODE - String description of an error that caused GetMedia to stop.
AWS_KINESISVIDEO_ERROR_ID: Integer code of the error.
The error codes are as follows:
3002 - Error writing to the stream
4000 - Requested fragment is not found
4500 - Access denied for the stream's KMS key
4501 - Stream's KMS key is disabled
4502 - Validation error on the stream's KMS key
4503 - KMS key specified in the stream is unavailable
4504 - Invalid usage of the KMS key specified in the stream
4505 - Invalid state of the KMS key specified in the stream
4506 - Unable to find the KMS key specified in the stream
5000 - Internal error
payload - The payload Kinesis Video Streams returns is a sequence of chunks from the specified stream. For
        information about the chunks, see . The chunks that Kinesis Video Streams returns in the
        GetMedia call also include the following additional Matroska (MKV) tags: 
        
        AWS_KINESISVIDEO_CONTINUATION_TOKEN (UTF-8 string) - In the event your GetMedia call
        terminates, you can use this continuation token in your next request to get the next chunk where the last
        request terminated.
        
AWS_KINESISVIDEO_MILLIS_BEHIND_NOW (UTF-8 string) - Client applications can use this tag value to determine how far behind the chunk returned in the response is from the latest chunk on the stream.
AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk.
AWS_KINESISVIDEO_SERVER_TIMESTAMP - Server timestamp of the fragment.
AWS_KINESISVIDEO_PRODUCER_TIMESTAMP - Producer timestamp of the fragment.
The following tags will be present if an error occurs:
AWS_KINESISVIDEO_ERROR_CODE - String description of an error that caused GetMedia to stop.
AWS_KINESISVIDEO_ERROR_ID: Integer code of the error.
The error codes are as follows:
3002 - Error writing to the stream
4000 - Requested fragment is not found
4500 - Access denied for the stream's KMS key
4501 - Stream's KMS key is disabled
4502 - Validation error on the stream's KMS key
4503 - KMS key specified in the stream is unavailable
4504 - Invalid usage of the KMS key specified in the stream
4505 - Invalid state of the KMS key specified in the stream
4506 - Unable to find the KMS key specified in the stream
5000 - Internal error
public String toString()
toString in class ObjectObject.toString()public GetMediaResult clone()