{-# 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.MediaConnect.AddFlowMediaStreams
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Adds media streams to an existing flow. After you add a media stream to
-- a flow, you can associate it with a source and\/or an output that uses
-- the ST 2110 JPEG XS or CDI protocol.
module Amazonka.MediaConnect.AddFlowMediaStreams
  ( -- * Creating a Request
    AddFlowMediaStreams (..),
    newAddFlowMediaStreams,

    -- * Request Lenses
    addFlowMediaStreams_flowArn,
    addFlowMediaStreams_mediaStreams,

    -- * Destructuring the Response
    AddFlowMediaStreamsResponse (..),
    newAddFlowMediaStreamsResponse,

    -- * Response Lenses
    addFlowMediaStreamsResponse_flowArn,
    addFlowMediaStreamsResponse_mediaStreams,
    addFlowMediaStreamsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConnect.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | A request to add media streams to the flow.
--
-- /See:/ 'newAddFlowMediaStreams' smart constructor.
data AddFlowMediaStreams = AddFlowMediaStreams'
  { -- | The Amazon Resource Name (ARN) of the flow.
    AddFlowMediaStreams -> Text
flowArn :: Prelude.Text,
    -- | The media streams that you want to add to the flow.
    AddFlowMediaStreams -> [AddMediaStreamRequest]
mediaStreams :: [AddMediaStreamRequest]
  }
  deriving (AddFlowMediaStreams -> AddFlowMediaStreams -> Bool
(AddFlowMediaStreams -> AddFlowMediaStreams -> Bool)
-> (AddFlowMediaStreams -> AddFlowMediaStreams -> Bool)
-> Eq AddFlowMediaStreams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddFlowMediaStreams -> AddFlowMediaStreams -> Bool
$c/= :: AddFlowMediaStreams -> AddFlowMediaStreams -> Bool
== :: AddFlowMediaStreams -> AddFlowMediaStreams -> Bool
$c== :: AddFlowMediaStreams -> AddFlowMediaStreams -> Bool
Prelude.Eq, ReadPrec [AddFlowMediaStreams]
ReadPrec AddFlowMediaStreams
Int -> ReadS AddFlowMediaStreams
ReadS [AddFlowMediaStreams]
(Int -> ReadS AddFlowMediaStreams)
-> ReadS [AddFlowMediaStreams]
-> ReadPrec AddFlowMediaStreams
-> ReadPrec [AddFlowMediaStreams]
-> Read AddFlowMediaStreams
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddFlowMediaStreams]
$creadListPrec :: ReadPrec [AddFlowMediaStreams]
readPrec :: ReadPrec AddFlowMediaStreams
$creadPrec :: ReadPrec AddFlowMediaStreams
readList :: ReadS [AddFlowMediaStreams]
$creadList :: ReadS [AddFlowMediaStreams]
readsPrec :: Int -> ReadS AddFlowMediaStreams
$creadsPrec :: Int -> ReadS AddFlowMediaStreams
Prelude.Read, Int -> AddFlowMediaStreams -> ShowS
[AddFlowMediaStreams] -> ShowS
AddFlowMediaStreams -> String
(Int -> AddFlowMediaStreams -> ShowS)
-> (AddFlowMediaStreams -> String)
-> ([AddFlowMediaStreams] -> ShowS)
-> Show AddFlowMediaStreams
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddFlowMediaStreams] -> ShowS
$cshowList :: [AddFlowMediaStreams] -> ShowS
show :: AddFlowMediaStreams -> String
$cshow :: AddFlowMediaStreams -> String
showsPrec :: Int -> AddFlowMediaStreams -> ShowS
$cshowsPrec :: Int -> AddFlowMediaStreams -> ShowS
Prelude.Show, (forall x. AddFlowMediaStreams -> Rep AddFlowMediaStreams x)
-> (forall x. Rep AddFlowMediaStreams x -> AddFlowMediaStreams)
-> Generic AddFlowMediaStreams
forall x. Rep AddFlowMediaStreams x -> AddFlowMediaStreams
forall x. AddFlowMediaStreams -> Rep AddFlowMediaStreams x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AddFlowMediaStreams x -> AddFlowMediaStreams
$cfrom :: forall x. AddFlowMediaStreams -> Rep AddFlowMediaStreams x
Prelude.Generic)

-- |
-- Create a value of 'AddFlowMediaStreams' 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:
--
-- 'flowArn', 'addFlowMediaStreams_flowArn' - The Amazon Resource Name (ARN) of the flow.
--
-- 'mediaStreams', 'addFlowMediaStreams_mediaStreams' - The media streams that you want to add to the flow.
newAddFlowMediaStreams ::
  -- | 'flowArn'
  Prelude.Text ->
  AddFlowMediaStreams
newAddFlowMediaStreams :: Text -> AddFlowMediaStreams
newAddFlowMediaStreams Text
pFlowArn_ =
  AddFlowMediaStreams' :: Text -> [AddMediaStreamRequest] -> AddFlowMediaStreams
AddFlowMediaStreams'
    { $sel:flowArn:AddFlowMediaStreams' :: Text
flowArn = Text
pFlowArn_,
      $sel:mediaStreams:AddFlowMediaStreams' :: [AddMediaStreamRequest]
mediaStreams = [AddMediaStreamRequest]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The Amazon Resource Name (ARN) of the flow.
addFlowMediaStreams_flowArn :: Lens.Lens' AddFlowMediaStreams Prelude.Text
addFlowMediaStreams_flowArn :: (Text -> f Text) -> AddFlowMediaStreams -> f AddFlowMediaStreams
addFlowMediaStreams_flowArn = (AddFlowMediaStreams -> Text)
-> (AddFlowMediaStreams -> Text -> AddFlowMediaStreams)
-> Lens AddFlowMediaStreams AddFlowMediaStreams Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddFlowMediaStreams' {Text
flowArn :: Text
$sel:flowArn:AddFlowMediaStreams' :: AddFlowMediaStreams -> Text
flowArn} -> Text
flowArn) (\s :: AddFlowMediaStreams
s@AddFlowMediaStreams' {} Text
a -> AddFlowMediaStreams
s {$sel:flowArn:AddFlowMediaStreams' :: Text
flowArn = Text
a} :: AddFlowMediaStreams)

-- | The media streams that you want to add to the flow.
addFlowMediaStreams_mediaStreams :: Lens.Lens' AddFlowMediaStreams [AddMediaStreamRequest]
addFlowMediaStreams_mediaStreams :: ([AddMediaStreamRequest] -> f [AddMediaStreamRequest])
-> AddFlowMediaStreams -> f AddFlowMediaStreams
addFlowMediaStreams_mediaStreams = (AddFlowMediaStreams -> [AddMediaStreamRequest])
-> (AddFlowMediaStreams
    -> [AddMediaStreamRequest] -> AddFlowMediaStreams)
-> Lens
     AddFlowMediaStreams
     AddFlowMediaStreams
     [AddMediaStreamRequest]
     [AddMediaStreamRequest]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddFlowMediaStreams' {[AddMediaStreamRequest]
mediaStreams :: [AddMediaStreamRequest]
$sel:mediaStreams:AddFlowMediaStreams' :: AddFlowMediaStreams -> [AddMediaStreamRequest]
mediaStreams} -> [AddMediaStreamRequest]
mediaStreams) (\s :: AddFlowMediaStreams
s@AddFlowMediaStreams' {} [AddMediaStreamRequest]
a -> AddFlowMediaStreams
s {$sel:mediaStreams:AddFlowMediaStreams' :: [AddMediaStreamRequest]
mediaStreams = [AddMediaStreamRequest]
a} :: AddFlowMediaStreams) (([AddMediaStreamRequest] -> f [AddMediaStreamRequest])
 -> AddFlowMediaStreams -> f AddFlowMediaStreams)
-> (([AddMediaStreamRequest] -> f [AddMediaStreamRequest])
    -> [AddMediaStreamRequest] -> f [AddMediaStreamRequest])
-> ([AddMediaStreamRequest] -> f [AddMediaStreamRequest])
-> AddFlowMediaStreams
-> f AddFlowMediaStreams
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AddMediaStreamRequest] -> f [AddMediaStreamRequest])
-> [AddMediaStreamRequest] -> f [AddMediaStreamRequest]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest AddFlowMediaStreams where
  type
    AWSResponse AddFlowMediaStreams =
      AddFlowMediaStreamsResponse
  request :: AddFlowMediaStreams -> Request AddFlowMediaStreams
request = Service -> AddFlowMediaStreams -> Request AddFlowMediaStreams
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy AddFlowMediaStreams
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AddFlowMediaStreams)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse AddFlowMediaStreams))
-> Logger
-> Service
-> Proxy AddFlowMediaStreams
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AddFlowMediaStreams)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [MediaStream] -> Int -> AddFlowMediaStreamsResponse
AddFlowMediaStreamsResponse'
            (Maybe Text
 -> Maybe [MediaStream] -> Int -> AddFlowMediaStreamsResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [MediaStream] -> Int -> AddFlowMediaStreamsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"flowArn")
            Either
  String (Maybe [MediaStream] -> Int -> AddFlowMediaStreamsResponse)
-> Either String (Maybe [MediaStream])
-> Either String (Int -> AddFlowMediaStreamsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [MediaStream]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"mediaStreams" Either String (Maybe (Maybe [MediaStream]))
-> Maybe [MediaStream] -> Either String (Maybe [MediaStream])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MediaStream]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> AddFlowMediaStreamsResponse)
-> Either String Int -> Either String AddFlowMediaStreamsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable AddFlowMediaStreams

instance Prelude.NFData AddFlowMediaStreams

instance Core.ToHeaders AddFlowMediaStreams where
  toHeaders :: AddFlowMediaStreams -> ResponseHeaders
toHeaders =
    ResponseHeaders -> AddFlowMediaStreams -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON AddFlowMediaStreams where
  toJSON :: AddFlowMediaStreams -> Value
toJSON AddFlowMediaStreams' {[AddMediaStreamRequest]
Text
mediaStreams :: [AddMediaStreamRequest]
flowArn :: Text
$sel:mediaStreams:AddFlowMediaStreams' :: AddFlowMediaStreams -> [AddMediaStreamRequest]
$sel:flowArn:AddFlowMediaStreams' :: AddFlowMediaStreams -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"mediaStreams" Text -> [AddMediaStreamRequest] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [AddMediaStreamRequest]
mediaStreams)]
      )

instance Core.ToPath AddFlowMediaStreams where
  toPath :: AddFlowMediaStreams -> ByteString
toPath AddFlowMediaStreams' {[AddMediaStreamRequest]
Text
mediaStreams :: [AddMediaStreamRequest]
flowArn :: Text
$sel:mediaStreams:AddFlowMediaStreams' :: AddFlowMediaStreams -> [AddMediaStreamRequest]
$sel:flowArn:AddFlowMediaStreams' :: AddFlowMediaStreams -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v1/flows/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
flowArn, ByteString
"/mediaStreams"]

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

-- | /See:/ 'newAddFlowMediaStreamsResponse' smart constructor.
data AddFlowMediaStreamsResponse = AddFlowMediaStreamsResponse'
  { -- | The ARN of the flow that you added media streams to.
    AddFlowMediaStreamsResponse -> Maybe Text
flowArn :: Prelude.Maybe Prelude.Text,
    -- | The media streams that you added to the flow.
    AddFlowMediaStreamsResponse -> Maybe [MediaStream]
mediaStreams :: Prelude.Maybe [MediaStream],
    -- | The response's http status code.
    AddFlowMediaStreamsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AddFlowMediaStreamsResponse -> AddFlowMediaStreamsResponse -> Bool
(AddFlowMediaStreamsResponse
 -> AddFlowMediaStreamsResponse -> Bool)
-> (AddFlowMediaStreamsResponse
    -> AddFlowMediaStreamsResponse -> Bool)
-> Eq AddFlowMediaStreamsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddFlowMediaStreamsResponse -> AddFlowMediaStreamsResponse -> Bool
$c/= :: AddFlowMediaStreamsResponse -> AddFlowMediaStreamsResponse -> Bool
== :: AddFlowMediaStreamsResponse -> AddFlowMediaStreamsResponse -> Bool
$c== :: AddFlowMediaStreamsResponse -> AddFlowMediaStreamsResponse -> Bool
Prelude.Eq, ReadPrec [AddFlowMediaStreamsResponse]
ReadPrec AddFlowMediaStreamsResponse
Int -> ReadS AddFlowMediaStreamsResponse
ReadS [AddFlowMediaStreamsResponse]
(Int -> ReadS AddFlowMediaStreamsResponse)
-> ReadS [AddFlowMediaStreamsResponse]
-> ReadPrec AddFlowMediaStreamsResponse
-> ReadPrec [AddFlowMediaStreamsResponse]
-> Read AddFlowMediaStreamsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddFlowMediaStreamsResponse]
$creadListPrec :: ReadPrec [AddFlowMediaStreamsResponse]
readPrec :: ReadPrec AddFlowMediaStreamsResponse
$creadPrec :: ReadPrec AddFlowMediaStreamsResponse
readList :: ReadS [AddFlowMediaStreamsResponse]
$creadList :: ReadS [AddFlowMediaStreamsResponse]
readsPrec :: Int -> ReadS AddFlowMediaStreamsResponse
$creadsPrec :: Int -> ReadS AddFlowMediaStreamsResponse
Prelude.Read, Int -> AddFlowMediaStreamsResponse -> ShowS
[AddFlowMediaStreamsResponse] -> ShowS
AddFlowMediaStreamsResponse -> String
(Int -> AddFlowMediaStreamsResponse -> ShowS)
-> (AddFlowMediaStreamsResponse -> String)
-> ([AddFlowMediaStreamsResponse] -> ShowS)
-> Show AddFlowMediaStreamsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddFlowMediaStreamsResponse] -> ShowS
$cshowList :: [AddFlowMediaStreamsResponse] -> ShowS
show :: AddFlowMediaStreamsResponse -> String
$cshow :: AddFlowMediaStreamsResponse -> String
showsPrec :: Int -> AddFlowMediaStreamsResponse -> ShowS
$cshowsPrec :: Int -> AddFlowMediaStreamsResponse -> ShowS
Prelude.Show, (forall x.
 AddFlowMediaStreamsResponse -> Rep AddFlowMediaStreamsResponse x)
-> (forall x.
    Rep AddFlowMediaStreamsResponse x -> AddFlowMediaStreamsResponse)
-> Generic AddFlowMediaStreamsResponse
forall x.
Rep AddFlowMediaStreamsResponse x -> AddFlowMediaStreamsResponse
forall x.
AddFlowMediaStreamsResponse -> Rep AddFlowMediaStreamsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AddFlowMediaStreamsResponse x -> AddFlowMediaStreamsResponse
$cfrom :: forall x.
AddFlowMediaStreamsResponse -> Rep AddFlowMediaStreamsResponse x
Prelude.Generic)

-- |
-- Create a value of 'AddFlowMediaStreamsResponse' 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:
--
-- 'flowArn', 'addFlowMediaStreamsResponse_flowArn' - The ARN of the flow that you added media streams to.
--
-- 'mediaStreams', 'addFlowMediaStreamsResponse_mediaStreams' - The media streams that you added to the flow.
--
-- 'httpStatus', 'addFlowMediaStreamsResponse_httpStatus' - The response's http status code.
newAddFlowMediaStreamsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AddFlowMediaStreamsResponse
newAddFlowMediaStreamsResponse :: Int -> AddFlowMediaStreamsResponse
newAddFlowMediaStreamsResponse Int
pHttpStatus_ =
  AddFlowMediaStreamsResponse' :: Maybe Text
-> Maybe [MediaStream] -> Int -> AddFlowMediaStreamsResponse
AddFlowMediaStreamsResponse'
    { $sel:flowArn:AddFlowMediaStreamsResponse' :: Maybe Text
flowArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mediaStreams:AddFlowMediaStreamsResponse' :: Maybe [MediaStream]
mediaStreams = Maybe [MediaStream]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:AddFlowMediaStreamsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the flow that you added media streams to.
addFlowMediaStreamsResponse_flowArn :: Lens.Lens' AddFlowMediaStreamsResponse (Prelude.Maybe Prelude.Text)
addFlowMediaStreamsResponse_flowArn :: (Maybe Text -> f (Maybe Text))
-> AddFlowMediaStreamsResponse -> f AddFlowMediaStreamsResponse
addFlowMediaStreamsResponse_flowArn = (AddFlowMediaStreamsResponse -> Maybe Text)
-> (AddFlowMediaStreamsResponse
    -> Maybe Text -> AddFlowMediaStreamsResponse)
-> Lens
     AddFlowMediaStreamsResponse
     AddFlowMediaStreamsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddFlowMediaStreamsResponse' {Maybe Text
flowArn :: Maybe Text
$sel:flowArn:AddFlowMediaStreamsResponse' :: AddFlowMediaStreamsResponse -> Maybe Text
flowArn} -> Maybe Text
flowArn) (\s :: AddFlowMediaStreamsResponse
s@AddFlowMediaStreamsResponse' {} Maybe Text
a -> AddFlowMediaStreamsResponse
s {$sel:flowArn:AddFlowMediaStreamsResponse' :: Maybe Text
flowArn = Maybe Text
a} :: AddFlowMediaStreamsResponse)

-- | The media streams that you added to the flow.
addFlowMediaStreamsResponse_mediaStreams :: Lens.Lens' AddFlowMediaStreamsResponse (Prelude.Maybe [MediaStream])
addFlowMediaStreamsResponse_mediaStreams :: (Maybe [MediaStream] -> f (Maybe [MediaStream]))
-> AddFlowMediaStreamsResponse -> f AddFlowMediaStreamsResponse
addFlowMediaStreamsResponse_mediaStreams = (AddFlowMediaStreamsResponse -> Maybe [MediaStream])
-> (AddFlowMediaStreamsResponse
    -> Maybe [MediaStream] -> AddFlowMediaStreamsResponse)
-> Lens
     AddFlowMediaStreamsResponse
     AddFlowMediaStreamsResponse
     (Maybe [MediaStream])
     (Maybe [MediaStream])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddFlowMediaStreamsResponse' {Maybe [MediaStream]
mediaStreams :: Maybe [MediaStream]
$sel:mediaStreams:AddFlowMediaStreamsResponse' :: AddFlowMediaStreamsResponse -> Maybe [MediaStream]
mediaStreams} -> Maybe [MediaStream]
mediaStreams) (\s :: AddFlowMediaStreamsResponse
s@AddFlowMediaStreamsResponse' {} Maybe [MediaStream]
a -> AddFlowMediaStreamsResponse
s {$sel:mediaStreams:AddFlowMediaStreamsResponse' :: Maybe [MediaStream]
mediaStreams = Maybe [MediaStream]
a} :: AddFlowMediaStreamsResponse) ((Maybe [MediaStream] -> f (Maybe [MediaStream]))
 -> AddFlowMediaStreamsResponse -> f AddFlowMediaStreamsResponse)
-> ((Maybe [MediaStream] -> f (Maybe [MediaStream]))
    -> Maybe [MediaStream] -> f (Maybe [MediaStream]))
-> (Maybe [MediaStream] -> f (Maybe [MediaStream]))
-> AddFlowMediaStreamsResponse
-> f AddFlowMediaStreamsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [MediaStream] [MediaStream] [MediaStream] [MediaStream]
-> Iso
     (Maybe [MediaStream])
     (Maybe [MediaStream])
     (Maybe [MediaStream])
     (Maybe [MediaStream])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [MediaStream] [MediaStream] [MediaStream] [MediaStream]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData AddFlowMediaStreamsResponse