{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.KinesisVideoArchivedMedia.GetMediaForFragmentList
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets media for a list of fragments (specified by fragment number) from
-- the archived data in an Amazon Kinesis video stream.
--
-- You must first call the @GetDataEndpoint@ API to get an endpoint. Then
-- send the @GetMediaForFragmentList@ requests to this endpoint using the
-- <https://docs.aws.amazon.com/cli/latest/reference/ --endpoint-url parameter>.
--
-- For limits, see
-- <http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html Kinesis Video Streams Limits>.
--
-- If an error is thrown after invoking a Kinesis Video Streams archived
-- media API, in addition to the HTTP status code and the response body, it
-- includes the following pieces of information:
--
-- -   @x-amz-ErrorType@ HTTP header – contains a more specific error type
--     in addition to what the HTTP status code provides.
--
-- -   @x-amz-RequestId@ HTTP header – if you want to report an issue to
--     AWS, the support team can better diagnose the problem if given the
--     Request Id.
--
-- Both the HTTP status code and the ErrorType header can be utilized to
-- make programmatic decisions about whether errors are retry-able and
-- under what conditions, as well as provide information on what actions
-- the client programmer might need to take in order to successfully try
-- again.
--
-- For more information, see the __Errors__ section at the bottom of this
-- topic, as well as
-- <https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html Common Errors>.
module Amazonka.KinesisVideoArchivedMedia.GetMediaForFragmentList
  ( -- * Creating a Request
    GetMediaForFragmentList (..),
    newGetMediaForFragmentList,

    -- * Request Lenses
    getMediaForFragmentList_streamARN,
    getMediaForFragmentList_streamName,
    getMediaForFragmentList_fragments,

    -- * Destructuring the Response
    GetMediaForFragmentListResponse (..),
    newGetMediaForFragmentListResponse,

    -- * Response Lenses
    getMediaForFragmentListResponse_contentType,
    getMediaForFragmentListResponse_httpStatus,
    getMediaForFragmentListResponse_payload,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.KinesisVideoArchivedMedia.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetMediaForFragmentList' smart constructor.
data GetMediaForFragmentList = GetMediaForFragmentList'
  { -- | The Amazon Resource Name (ARN) of the stream from which to retrieve
    -- fragment media. Specify either this parameter or the @StreamName@
    -- parameter.
    GetMediaForFragmentList -> Maybe Text
streamARN :: Prelude.Maybe Prelude.Text,
    -- | The name of the stream from which to retrieve fragment media. Specify
    -- either this parameter or the @StreamARN@ parameter.
    GetMediaForFragmentList -> Maybe Text
streamName :: Prelude.Maybe Prelude.Text,
    -- | A list of the numbers of fragments for which to retrieve media. You
    -- retrieve these values with ListFragments.
    GetMediaForFragmentList -> NonEmpty Text
fragments :: Prelude.NonEmpty Prelude.Text
  }
  deriving (GetMediaForFragmentList -> GetMediaForFragmentList -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMediaForFragmentList -> GetMediaForFragmentList -> Bool
$c/= :: GetMediaForFragmentList -> GetMediaForFragmentList -> Bool
== :: GetMediaForFragmentList -> GetMediaForFragmentList -> Bool
$c== :: GetMediaForFragmentList -> GetMediaForFragmentList -> Bool
Prelude.Eq, ReadPrec [GetMediaForFragmentList]
ReadPrec GetMediaForFragmentList
Int -> ReadS GetMediaForFragmentList
ReadS [GetMediaForFragmentList]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetMediaForFragmentList]
$creadListPrec :: ReadPrec [GetMediaForFragmentList]
readPrec :: ReadPrec GetMediaForFragmentList
$creadPrec :: ReadPrec GetMediaForFragmentList
readList :: ReadS [GetMediaForFragmentList]
$creadList :: ReadS [GetMediaForFragmentList]
readsPrec :: Int -> ReadS GetMediaForFragmentList
$creadsPrec :: Int -> ReadS GetMediaForFragmentList
Prelude.Read, Int -> GetMediaForFragmentList -> ShowS
[GetMediaForFragmentList] -> ShowS
GetMediaForFragmentList -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMediaForFragmentList] -> ShowS
$cshowList :: [GetMediaForFragmentList] -> ShowS
show :: GetMediaForFragmentList -> String
$cshow :: GetMediaForFragmentList -> String
showsPrec :: Int -> GetMediaForFragmentList -> ShowS
$cshowsPrec :: Int -> GetMediaForFragmentList -> ShowS
Prelude.Show, forall x. Rep GetMediaForFragmentList x -> GetMediaForFragmentList
forall x. GetMediaForFragmentList -> Rep GetMediaForFragmentList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetMediaForFragmentList x -> GetMediaForFragmentList
$cfrom :: forall x. GetMediaForFragmentList -> Rep GetMediaForFragmentList x
Prelude.Generic)

-- |
-- Create a value of 'GetMediaForFragmentList' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'streamARN', 'getMediaForFragmentList_streamARN' - The Amazon Resource Name (ARN) of the stream from which to retrieve
-- fragment media. Specify either this parameter or the @StreamName@
-- parameter.
--
-- 'streamName', 'getMediaForFragmentList_streamName' - The name of the stream from which to retrieve fragment media. Specify
-- either this parameter or the @StreamARN@ parameter.
--
-- 'fragments', 'getMediaForFragmentList_fragments' - A list of the numbers of fragments for which to retrieve media. You
-- retrieve these values with ListFragments.
newGetMediaForFragmentList ::
  -- | 'fragments'
  Prelude.NonEmpty Prelude.Text ->
  GetMediaForFragmentList
newGetMediaForFragmentList :: NonEmpty Text -> GetMediaForFragmentList
newGetMediaForFragmentList NonEmpty Text
pFragments_ =
  GetMediaForFragmentList'
    { $sel:streamARN:GetMediaForFragmentList' :: Maybe Text
streamARN =
        forall a. Maybe a
Prelude.Nothing,
      $sel:streamName:GetMediaForFragmentList' :: Maybe Text
streamName = forall a. Maybe a
Prelude.Nothing,
      $sel:fragments:GetMediaForFragmentList' :: NonEmpty Text
fragments = forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pFragments_
    }

-- | The Amazon Resource Name (ARN) of the stream from which to retrieve
-- fragment media. Specify either this parameter or the @StreamName@
-- parameter.
getMediaForFragmentList_streamARN :: Lens.Lens' GetMediaForFragmentList (Prelude.Maybe Prelude.Text)
getMediaForFragmentList_streamARN :: Lens' GetMediaForFragmentList (Maybe Text)
getMediaForFragmentList_streamARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMediaForFragmentList' {Maybe Text
streamARN :: Maybe Text
$sel:streamARN:GetMediaForFragmentList' :: GetMediaForFragmentList -> Maybe Text
streamARN} -> Maybe Text
streamARN) (\s :: GetMediaForFragmentList
s@GetMediaForFragmentList' {} Maybe Text
a -> GetMediaForFragmentList
s {$sel:streamARN:GetMediaForFragmentList' :: Maybe Text
streamARN = Maybe Text
a} :: GetMediaForFragmentList)

-- | The name of the stream from which to retrieve fragment media. Specify
-- either this parameter or the @StreamARN@ parameter.
getMediaForFragmentList_streamName :: Lens.Lens' GetMediaForFragmentList (Prelude.Maybe Prelude.Text)
getMediaForFragmentList_streamName :: Lens' GetMediaForFragmentList (Maybe Text)
getMediaForFragmentList_streamName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMediaForFragmentList' {Maybe Text
streamName :: Maybe Text
$sel:streamName:GetMediaForFragmentList' :: GetMediaForFragmentList -> Maybe Text
streamName} -> Maybe Text
streamName) (\s :: GetMediaForFragmentList
s@GetMediaForFragmentList' {} Maybe Text
a -> GetMediaForFragmentList
s {$sel:streamName:GetMediaForFragmentList' :: Maybe Text
streamName = Maybe Text
a} :: GetMediaForFragmentList)

-- | A list of the numbers of fragments for which to retrieve media. You
-- retrieve these values with ListFragments.
getMediaForFragmentList_fragments :: Lens.Lens' GetMediaForFragmentList (Prelude.NonEmpty Prelude.Text)
getMediaForFragmentList_fragments :: Lens' GetMediaForFragmentList (NonEmpty Text)
getMediaForFragmentList_fragments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMediaForFragmentList' {NonEmpty Text
fragments :: NonEmpty Text
$sel:fragments:GetMediaForFragmentList' :: GetMediaForFragmentList -> NonEmpty Text
fragments} -> NonEmpty Text
fragments) (\s :: GetMediaForFragmentList
s@GetMediaForFragmentList' {} NonEmpty Text
a -> GetMediaForFragmentList
s {$sel:fragments:GetMediaForFragmentList' :: NonEmpty Text
fragments = NonEmpty Text
a} :: GetMediaForFragmentList) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest GetMediaForFragmentList where
  type
    AWSResponse GetMediaForFragmentList =
      GetMediaForFragmentListResponse
  request :: (Service -> Service)
-> GetMediaForFragmentList -> Request GetMediaForFragmentList
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetMediaForFragmentList
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetMediaForFragmentList)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int
 -> ResponseHeaders
 -> ResponseBody
 -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveBody
      ( \Int
s ResponseHeaders
h ResponseBody
x ->
          Maybe Text
-> Int -> ResponseBody -> GetMediaForFragmentListResponse
GetMediaForFragmentListResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"Content-Type")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure ResponseBody
x)
      )

instance Prelude.Hashable GetMediaForFragmentList where
  hashWithSalt :: Int -> GetMediaForFragmentList -> Int
hashWithSalt Int
_salt GetMediaForFragmentList' {Maybe Text
NonEmpty Text
fragments :: NonEmpty Text
streamName :: Maybe Text
streamARN :: Maybe Text
$sel:fragments:GetMediaForFragmentList' :: GetMediaForFragmentList -> NonEmpty Text
$sel:streamName:GetMediaForFragmentList' :: GetMediaForFragmentList -> Maybe Text
$sel:streamARN:GetMediaForFragmentList' :: GetMediaForFragmentList -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
streamARN
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
streamName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty Text
fragments

instance Prelude.NFData GetMediaForFragmentList where
  rnf :: GetMediaForFragmentList -> ()
rnf GetMediaForFragmentList' {Maybe Text
NonEmpty Text
fragments :: NonEmpty Text
streamName :: Maybe Text
streamARN :: Maybe Text
$sel:fragments:GetMediaForFragmentList' :: GetMediaForFragmentList -> NonEmpty Text
$sel:streamName:GetMediaForFragmentList' :: GetMediaForFragmentList -> Maybe Text
$sel:streamARN:GetMediaForFragmentList' :: GetMediaForFragmentList -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
streamARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
streamName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty Text
fragments

instance Data.ToHeaders GetMediaForFragmentList where
  toHeaders :: GetMediaForFragmentList -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToJSON GetMediaForFragmentList where
  toJSON :: GetMediaForFragmentList -> Value
toJSON GetMediaForFragmentList' {Maybe Text
NonEmpty Text
fragments :: NonEmpty Text
streamName :: Maybe Text
streamARN :: Maybe Text
$sel:fragments:GetMediaForFragmentList' :: GetMediaForFragmentList -> NonEmpty Text
$sel:streamName:GetMediaForFragmentList' :: GetMediaForFragmentList -> Maybe Text
$sel:streamARN:GetMediaForFragmentList' :: GetMediaForFragmentList -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"StreamARN" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
streamARN,
            (Key
"StreamName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
streamName,
            forall a. a -> Maybe a
Prelude.Just (Key
"Fragments" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty Text
fragments)
          ]
      )

instance Data.ToPath GetMediaForFragmentList where
  toPath :: GetMediaForFragmentList -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/getMediaForFragmentList"

instance Data.ToQuery GetMediaForFragmentList where
  toQuery :: GetMediaForFragmentList -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetMediaForFragmentListResponse' smart constructor.
data GetMediaForFragmentListResponse = GetMediaForFragmentListResponse'
  { -- | The content type of the requested media.
    GetMediaForFragmentListResponse -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetMediaForFragmentListResponse -> Int
httpStatus :: Prelude.Int,
    -- | The payload that Kinesis Video Streams returns is a sequence of chunks
    -- from the specified stream. For information about the chunks, see
    -- <http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_PutMedia.html PutMedia>.
    -- The chunks that Kinesis Video Streams returns in the
    -- @GetMediaForFragmentList@ call also include the following additional
    -- Matroska (MKV) tags:
    --
    -- -   AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the
    --     chunk.
    --
    -- -   AWS_KINESISVIDEO_SERVER_SIDE_TIMESTAMP - Server-side timestamp of
    --     the fragment.
    --
    -- -   AWS_KINESISVIDEO_PRODUCER_SIDE_TIMESTAMP - Producer-side timestamp
    --     of the fragment.
    --
    -- The following tags will be included if an exception occurs:
    --
    -- -   AWS_KINESISVIDEO_FRAGMENT_NUMBER - The number of the fragment that
    --     threw the exception
    --
    -- -   AWS_KINESISVIDEO_EXCEPTION_ERROR_CODE - The integer code of the
    --     exception
    --
    -- -   AWS_KINESISVIDEO_EXCEPTION_MESSAGE - A text description of the
    --     exception
    GetMediaForFragmentListResponse -> ResponseBody
payload :: Data.ResponseBody
  }
  deriving (Int -> GetMediaForFragmentListResponse -> ShowS
[GetMediaForFragmentListResponse] -> ShowS
GetMediaForFragmentListResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMediaForFragmentListResponse] -> ShowS
$cshowList :: [GetMediaForFragmentListResponse] -> ShowS
show :: GetMediaForFragmentListResponse -> String
$cshow :: GetMediaForFragmentListResponse -> String
showsPrec :: Int -> GetMediaForFragmentListResponse -> ShowS
$cshowsPrec :: Int -> GetMediaForFragmentListResponse -> ShowS
Prelude.Show, forall x.
Rep GetMediaForFragmentListResponse x
-> GetMediaForFragmentListResponse
forall x.
GetMediaForFragmentListResponse
-> Rep GetMediaForFragmentListResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetMediaForFragmentListResponse x
-> GetMediaForFragmentListResponse
$cfrom :: forall x.
GetMediaForFragmentListResponse
-> Rep GetMediaForFragmentListResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetMediaForFragmentListResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'contentType', 'getMediaForFragmentListResponse_contentType' - The content type of the requested media.
--
-- 'httpStatus', 'getMediaForFragmentListResponse_httpStatus' - The response's http status code.
--
-- 'payload', 'getMediaForFragmentListResponse_payload' - The payload that Kinesis Video Streams returns is a sequence of chunks
-- from the specified stream. For information about the chunks, see
-- <http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_PutMedia.html PutMedia>.
-- The chunks that Kinesis Video Streams returns in the
-- @GetMediaForFragmentList@ call also include the following additional
-- Matroska (MKV) tags:
--
-- -   AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the
--     chunk.
--
-- -   AWS_KINESISVIDEO_SERVER_SIDE_TIMESTAMP - Server-side timestamp of
--     the fragment.
--
-- -   AWS_KINESISVIDEO_PRODUCER_SIDE_TIMESTAMP - Producer-side timestamp
--     of the fragment.
--
-- The following tags will be included if an exception occurs:
--
-- -   AWS_KINESISVIDEO_FRAGMENT_NUMBER - The number of the fragment that
--     threw the exception
--
-- -   AWS_KINESISVIDEO_EXCEPTION_ERROR_CODE - The integer code of the
--     exception
--
-- -   AWS_KINESISVIDEO_EXCEPTION_MESSAGE - A text description of the
--     exception
newGetMediaForFragmentListResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'payload'
  Data.ResponseBody ->
  GetMediaForFragmentListResponse
newGetMediaForFragmentListResponse :: Int -> ResponseBody -> GetMediaForFragmentListResponse
newGetMediaForFragmentListResponse
  Int
pHttpStatus_
  ResponseBody
pPayload_ =
    GetMediaForFragmentListResponse'
      { $sel:contentType:GetMediaForFragmentListResponse' :: Maybe Text
contentType =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetMediaForFragmentListResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:payload:GetMediaForFragmentListResponse' :: ResponseBody
payload = ResponseBody
pPayload_
      }

-- | The content type of the requested media.
getMediaForFragmentListResponse_contentType :: Lens.Lens' GetMediaForFragmentListResponse (Prelude.Maybe Prelude.Text)
getMediaForFragmentListResponse_contentType :: Lens' GetMediaForFragmentListResponse (Maybe Text)
getMediaForFragmentListResponse_contentType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMediaForFragmentListResponse' {Maybe Text
contentType :: Maybe Text
$sel:contentType:GetMediaForFragmentListResponse' :: GetMediaForFragmentListResponse -> Maybe Text
contentType} -> Maybe Text
contentType) (\s :: GetMediaForFragmentListResponse
s@GetMediaForFragmentListResponse' {} Maybe Text
a -> GetMediaForFragmentListResponse
s {$sel:contentType:GetMediaForFragmentListResponse' :: Maybe Text
contentType = Maybe Text
a} :: GetMediaForFragmentListResponse)

-- | The response's http status code.
getMediaForFragmentListResponse_httpStatus :: Lens.Lens' GetMediaForFragmentListResponse Prelude.Int
getMediaForFragmentListResponse_httpStatus :: Lens' GetMediaForFragmentListResponse Int
getMediaForFragmentListResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMediaForFragmentListResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetMediaForFragmentListResponse' :: GetMediaForFragmentListResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetMediaForFragmentListResponse
s@GetMediaForFragmentListResponse' {} Int
a -> GetMediaForFragmentListResponse
s {$sel:httpStatus:GetMediaForFragmentListResponse' :: Int
httpStatus = Int
a} :: GetMediaForFragmentListResponse)

-- | The payload that Kinesis Video Streams returns is a sequence of chunks
-- from the specified stream. For information about the chunks, see
-- <http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_PutMedia.html PutMedia>.
-- The chunks that Kinesis Video Streams returns in the
-- @GetMediaForFragmentList@ call also include the following additional
-- Matroska (MKV) tags:
--
-- -   AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the
--     chunk.
--
-- -   AWS_KINESISVIDEO_SERVER_SIDE_TIMESTAMP - Server-side timestamp of
--     the fragment.
--
-- -   AWS_KINESISVIDEO_PRODUCER_SIDE_TIMESTAMP - Producer-side timestamp
--     of the fragment.
--
-- The following tags will be included if an exception occurs:
--
-- -   AWS_KINESISVIDEO_FRAGMENT_NUMBER - The number of the fragment that
--     threw the exception
--
-- -   AWS_KINESISVIDEO_EXCEPTION_ERROR_CODE - The integer code of the
--     exception
--
-- -   AWS_KINESISVIDEO_EXCEPTION_MESSAGE - A text description of the
--     exception
getMediaForFragmentListResponse_payload :: Lens.Lens' GetMediaForFragmentListResponse Data.ResponseBody
getMediaForFragmentListResponse_payload :: Lens' GetMediaForFragmentListResponse ResponseBody
getMediaForFragmentListResponse_payload = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMediaForFragmentListResponse' {ResponseBody
payload :: ResponseBody
$sel:payload:GetMediaForFragmentListResponse' :: GetMediaForFragmentListResponse -> ResponseBody
payload} -> ResponseBody
payload) (\s :: GetMediaForFragmentListResponse
s@GetMediaForFragmentListResponse' {} ResponseBody
a -> GetMediaForFragmentListResponse
s {$sel:payload:GetMediaForFragmentListResponse' :: ResponseBody
payload = ResponseBody
a} :: GetMediaForFragmentListResponse)