{-# 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.Chime.CreateMediaCapturePipeline
-- 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)
--
-- Creates a media capture pipeline.
module Amazonka.Chime.CreateMediaCapturePipeline
  ( -- * Creating a Request
    CreateMediaCapturePipeline (..),
    newCreateMediaCapturePipeline,

    -- * Request Lenses
    createMediaCapturePipeline_chimeSdkMeetingConfiguration,
    createMediaCapturePipeline_clientRequestToken,
    createMediaCapturePipeline_sourceType,
    createMediaCapturePipeline_sourceArn,
    createMediaCapturePipeline_sinkType,
    createMediaCapturePipeline_sinkArn,

    -- * Destructuring the Response
    CreateMediaCapturePipelineResponse (..),
    newCreateMediaCapturePipelineResponse,

    -- * Response Lenses
    createMediaCapturePipelineResponse_mediaCapturePipeline,
    createMediaCapturePipelineResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateMediaCapturePipeline' smart constructor.
data CreateMediaCapturePipeline = CreateMediaCapturePipeline'
  { -- | The configuration for a specified media capture pipeline. @SourceType@
    -- must be @ChimeSdkMeeting@.
    CreateMediaCapturePipeline -> Maybe ChimeSdkMeetingConfiguration
chimeSdkMeetingConfiguration :: Prelude.Maybe ChimeSdkMeetingConfiguration,
    -- | The token assigned to the client making the pipeline request.
    CreateMediaCapturePipeline -> Maybe (Sensitive Text)
clientRequestToken :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | Source type from which the media artifacts will be captured. A Chime SDK
    -- Meeting is the only supported source.
    CreateMediaCapturePipeline -> MediaPipelineSourceType
sourceType :: MediaPipelineSourceType,
    -- | ARN of the source from which the media artifacts are captured.
    CreateMediaCapturePipeline -> Sensitive Text
sourceArn :: Core.Sensitive Prelude.Text,
    -- | Destination type to which the media artifacts are saved. You must use an
    -- S3 bucket.
    CreateMediaCapturePipeline -> MediaPipelineSinkType
sinkType :: MediaPipelineSinkType,
    -- | The ARN of the sink type.
    CreateMediaCapturePipeline -> Sensitive Text
sinkArn :: Core.Sensitive Prelude.Text
  }
  deriving (CreateMediaCapturePipeline -> CreateMediaCapturePipeline -> Bool
(CreateMediaCapturePipeline -> CreateMediaCapturePipeline -> Bool)
-> (CreateMediaCapturePipeline
    -> CreateMediaCapturePipeline -> Bool)
-> Eq CreateMediaCapturePipeline
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMediaCapturePipeline -> CreateMediaCapturePipeline -> Bool
$c/= :: CreateMediaCapturePipeline -> CreateMediaCapturePipeline -> Bool
== :: CreateMediaCapturePipeline -> CreateMediaCapturePipeline -> Bool
$c== :: CreateMediaCapturePipeline -> CreateMediaCapturePipeline -> Bool
Prelude.Eq, Int -> CreateMediaCapturePipeline -> ShowS
[CreateMediaCapturePipeline] -> ShowS
CreateMediaCapturePipeline -> String
(Int -> CreateMediaCapturePipeline -> ShowS)
-> (CreateMediaCapturePipeline -> String)
-> ([CreateMediaCapturePipeline] -> ShowS)
-> Show CreateMediaCapturePipeline
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMediaCapturePipeline] -> ShowS
$cshowList :: [CreateMediaCapturePipeline] -> ShowS
show :: CreateMediaCapturePipeline -> String
$cshow :: CreateMediaCapturePipeline -> String
showsPrec :: Int -> CreateMediaCapturePipeline -> ShowS
$cshowsPrec :: Int -> CreateMediaCapturePipeline -> ShowS
Prelude.Show, (forall x.
 CreateMediaCapturePipeline -> Rep CreateMediaCapturePipeline x)
-> (forall x.
    Rep CreateMediaCapturePipeline x -> CreateMediaCapturePipeline)
-> Generic CreateMediaCapturePipeline
forall x.
Rep CreateMediaCapturePipeline x -> CreateMediaCapturePipeline
forall x.
CreateMediaCapturePipeline -> Rep CreateMediaCapturePipeline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateMediaCapturePipeline x -> CreateMediaCapturePipeline
$cfrom :: forall x.
CreateMediaCapturePipeline -> Rep CreateMediaCapturePipeline x
Prelude.Generic)

-- |
-- Create a value of 'CreateMediaCapturePipeline' 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:
--
-- 'chimeSdkMeetingConfiguration', 'createMediaCapturePipeline_chimeSdkMeetingConfiguration' - The configuration for a specified media capture pipeline. @SourceType@
-- must be @ChimeSdkMeeting@.
--
-- 'clientRequestToken', 'createMediaCapturePipeline_clientRequestToken' - The token assigned to the client making the pipeline request.
--
-- 'sourceType', 'createMediaCapturePipeline_sourceType' - Source type from which the media artifacts will be captured. A Chime SDK
-- Meeting is the only supported source.
--
-- 'sourceArn', 'createMediaCapturePipeline_sourceArn' - ARN of the source from which the media artifacts are captured.
--
-- 'sinkType', 'createMediaCapturePipeline_sinkType' - Destination type to which the media artifacts are saved. You must use an
-- S3 bucket.
--
-- 'sinkArn', 'createMediaCapturePipeline_sinkArn' - The ARN of the sink type.
newCreateMediaCapturePipeline ::
  -- | 'sourceType'
  MediaPipelineSourceType ->
  -- | 'sourceArn'
  Prelude.Text ->
  -- | 'sinkType'
  MediaPipelineSinkType ->
  -- | 'sinkArn'
  Prelude.Text ->
  CreateMediaCapturePipeline
newCreateMediaCapturePipeline :: MediaPipelineSourceType
-> Text
-> MediaPipelineSinkType
-> Text
-> CreateMediaCapturePipeline
newCreateMediaCapturePipeline
  MediaPipelineSourceType
pSourceType_
  Text
pSourceArn_
  MediaPipelineSinkType
pSinkType_
  Text
pSinkArn_ =
    CreateMediaCapturePipeline' :: Maybe ChimeSdkMeetingConfiguration
-> Maybe (Sensitive Text)
-> MediaPipelineSourceType
-> Sensitive Text
-> MediaPipelineSinkType
-> Sensitive Text
-> CreateMediaCapturePipeline
CreateMediaCapturePipeline'
      { $sel:chimeSdkMeetingConfiguration:CreateMediaCapturePipeline' :: Maybe ChimeSdkMeetingConfiguration
chimeSdkMeetingConfiguration =
          Maybe ChimeSdkMeetingConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:clientRequestToken:CreateMediaCapturePipeline' :: Maybe (Sensitive Text)
clientRequestToken = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:sourceType:CreateMediaCapturePipeline' :: MediaPipelineSourceType
sourceType = MediaPipelineSourceType
pSourceType_,
        $sel:sourceArn:CreateMediaCapturePipeline' :: Sensitive Text
sourceArn = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
 -> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pSourceArn_,
        $sel:sinkType:CreateMediaCapturePipeline' :: MediaPipelineSinkType
sinkType = MediaPipelineSinkType
pSinkType_,
        $sel:sinkArn:CreateMediaCapturePipeline' :: Sensitive Text
sinkArn = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
 -> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pSinkArn_
      }

-- | The configuration for a specified media capture pipeline. @SourceType@
-- must be @ChimeSdkMeeting@.
createMediaCapturePipeline_chimeSdkMeetingConfiguration :: Lens.Lens' CreateMediaCapturePipeline (Prelude.Maybe ChimeSdkMeetingConfiguration)
createMediaCapturePipeline_chimeSdkMeetingConfiguration :: (Maybe ChimeSdkMeetingConfiguration
 -> f (Maybe ChimeSdkMeetingConfiguration))
-> CreateMediaCapturePipeline -> f CreateMediaCapturePipeline
createMediaCapturePipeline_chimeSdkMeetingConfiguration = (CreateMediaCapturePipeline -> Maybe ChimeSdkMeetingConfiguration)
-> (CreateMediaCapturePipeline
    -> Maybe ChimeSdkMeetingConfiguration
    -> CreateMediaCapturePipeline)
-> Lens
     CreateMediaCapturePipeline
     CreateMediaCapturePipeline
     (Maybe ChimeSdkMeetingConfiguration)
     (Maybe ChimeSdkMeetingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMediaCapturePipeline' {Maybe ChimeSdkMeetingConfiguration
chimeSdkMeetingConfiguration :: Maybe ChimeSdkMeetingConfiguration
$sel:chimeSdkMeetingConfiguration:CreateMediaCapturePipeline' :: CreateMediaCapturePipeline -> Maybe ChimeSdkMeetingConfiguration
chimeSdkMeetingConfiguration} -> Maybe ChimeSdkMeetingConfiguration
chimeSdkMeetingConfiguration) (\s :: CreateMediaCapturePipeline
s@CreateMediaCapturePipeline' {} Maybe ChimeSdkMeetingConfiguration
a -> CreateMediaCapturePipeline
s {$sel:chimeSdkMeetingConfiguration:CreateMediaCapturePipeline' :: Maybe ChimeSdkMeetingConfiguration
chimeSdkMeetingConfiguration = Maybe ChimeSdkMeetingConfiguration
a} :: CreateMediaCapturePipeline)

-- | The token assigned to the client making the pipeline request.
createMediaCapturePipeline_clientRequestToken :: Lens.Lens' CreateMediaCapturePipeline (Prelude.Maybe Prelude.Text)
createMediaCapturePipeline_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> CreateMediaCapturePipeline -> f CreateMediaCapturePipeline
createMediaCapturePipeline_clientRequestToken = (CreateMediaCapturePipeline -> Maybe (Sensitive Text))
-> (CreateMediaCapturePipeline
    -> Maybe (Sensitive Text) -> CreateMediaCapturePipeline)
-> Lens
     CreateMediaCapturePipeline
     CreateMediaCapturePipeline
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMediaCapturePipeline' {Maybe (Sensitive Text)
clientRequestToken :: Maybe (Sensitive Text)
$sel:clientRequestToken:CreateMediaCapturePipeline' :: CreateMediaCapturePipeline -> Maybe (Sensitive Text)
clientRequestToken} -> Maybe (Sensitive Text)
clientRequestToken) (\s :: CreateMediaCapturePipeline
s@CreateMediaCapturePipeline' {} Maybe (Sensitive Text)
a -> CreateMediaCapturePipeline
s {$sel:clientRequestToken:CreateMediaCapturePipeline' :: Maybe (Sensitive Text)
clientRequestToken = Maybe (Sensitive Text)
a} :: CreateMediaCapturePipeline) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> CreateMediaCapturePipeline -> f CreateMediaCapturePipeline)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateMediaCapturePipeline
-> f CreateMediaCapturePipeline
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Source type from which the media artifacts will be captured. A Chime SDK
-- Meeting is the only supported source.
createMediaCapturePipeline_sourceType :: Lens.Lens' CreateMediaCapturePipeline MediaPipelineSourceType
createMediaCapturePipeline_sourceType :: (MediaPipelineSourceType -> f MediaPipelineSourceType)
-> CreateMediaCapturePipeline -> f CreateMediaCapturePipeline
createMediaCapturePipeline_sourceType = (CreateMediaCapturePipeline -> MediaPipelineSourceType)
-> (CreateMediaCapturePipeline
    -> MediaPipelineSourceType -> CreateMediaCapturePipeline)
-> Lens
     CreateMediaCapturePipeline
     CreateMediaCapturePipeline
     MediaPipelineSourceType
     MediaPipelineSourceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMediaCapturePipeline' {MediaPipelineSourceType
sourceType :: MediaPipelineSourceType
$sel:sourceType:CreateMediaCapturePipeline' :: CreateMediaCapturePipeline -> MediaPipelineSourceType
sourceType} -> MediaPipelineSourceType
sourceType) (\s :: CreateMediaCapturePipeline
s@CreateMediaCapturePipeline' {} MediaPipelineSourceType
a -> CreateMediaCapturePipeline
s {$sel:sourceType:CreateMediaCapturePipeline' :: MediaPipelineSourceType
sourceType = MediaPipelineSourceType
a} :: CreateMediaCapturePipeline)

-- | ARN of the source from which the media artifacts are captured.
createMediaCapturePipeline_sourceArn :: Lens.Lens' CreateMediaCapturePipeline Prelude.Text
createMediaCapturePipeline_sourceArn :: (Text -> f Text)
-> CreateMediaCapturePipeline -> f CreateMediaCapturePipeline
createMediaCapturePipeline_sourceArn = (CreateMediaCapturePipeline -> Sensitive Text)
-> (CreateMediaCapturePipeline
    -> Sensitive Text -> CreateMediaCapturePipeline)
-> Lens
     CreateMediaCapturePipeline
     CreateMediaCapturePipeline
     (Sensitive Text)
     (Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMediaCapturePipeline' {Sensitive Text
sourceArn :: Sensitive Text
$sel:sourceArn:CreateMediaCapturePipeline' :: CreateMediaCapturePipeline -> Sensitive Text
sourceArn} -> Sensitive Text
sourceArn) (\s :: CreateMediaCapturePipeline
s@CreateMediaCapturePipeline' {} Sensitive Text
a -> CreateMediaCapturePipeline
s {$sel:sourceArn:CreateMediaCapturePipeline' :: Sensitive Text
sourceArn = Sensitive Text
a} :: CreateMediaCapturePipeline) ((Sensitive Text -> f (Sensitive Text))
 -> CreateMediaCapturePipeline -> f CreateMediaCapturePipeline)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> CreateMediaCapturePipeline
-> f CreateMediaCapturePipeline
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Destination type to which the media artifacts are saved. You must use an
-- S3 bucket.
createMediaCapturePipeline_sinkType :: Lens.Lens' CreateMediaCapturePipeline MediaPipelineSinkType
createMediaCapturePipeline_sinkType :: (MediaPipelineSinkType -> f MediaPipelineSinkType)
-> CreateMediaCapturePipeline -> f CreateMediaCapturePipeline
createMediaCapturePipeline_sinkType = (CreateMediaCapturePipeline -> MediaPipelineSinkType)
-> (CreateMediaCapturePipeline
    -> MediaPipelineSinkType -> CreateMediaCapturePipeline)
-> Lens
     CreateMediaCapturePipeline
     CreateMediaCapturePipeline
     MediaPipelineSinkType
     MediaPipelineSinkType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMediaCapturePipeline' {MediaPipelineSinkType
sinkType :: MediaPipelineSinkType
$sel:sinkType:CreateMediaCapturePipeline' :: CreateMediaCapturePipeline -> MediaPipelineSinkType
sinkType} -> MediaPipelineSinkType
sinkType) (\s :: CreateMediaCapturePipeline
s@CreateMediaCapturePipeline' {} MediaPipelineSinkType
a -> CreateMediaCapturePipeline
s {$sel:sinkType:CreateMediaCapturePipeline' :: MediaPipelineSinkType
sinkType = MediaPipelineSinkType
a} :: CreateMediaCapturePipeline)

-- | The ARN of the sink type.
createMediaCapturePipeline_sinkArn :: Lens.Lens' CreateMediaCapturePipeline Prelude.Text
createMediaCapturePipeline_sinkArn :: (Text -> f Text)
-> CreateMediaCapturePipeline -> f CreateMediaCapturePipeline
createMediaCapturePipeline_sinkArn = (CreateMediaCapturePipeline -> Sensitive Text)
-> (CreateMediaCapturePipeline
    -> Sensitive Text -> CreateMediaCapturePipeline)
-> Lens
     CreateMediaCapturePipeline
     CreateMediaCapturePipeline
     (Sensitive Text)
     (Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMediaCapturePipeline' {Sensitive Text
sinkArn :: Sensitive Text
$sel:sinkArn:CreateMediaCapturePipeline' :: CreateMediaCapturePipeline -> Sensitive Text
sinkArn} -> Sensitive Text
sinkArn) (\s :: CreateMediaCapturePipeline
s@CreateMediaCapturePipeline' {} Sensitive Text
a -> CreateMediaCapturePipeline
s {$sel:sinkArn:CreateMediaCapturePipeline' :: Sensitive Text
sinkArn = Sensitive Text
a} :: CreateMediaCapturePipeline) ((Sensitive Text -> f (Sensitive Text))
 -> CreateMediaCapturePipeline -> f CreateMediaCapturePipeline)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> CreateMediaCapturePipeline
-> f CreateMediaCapturePipeline
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive

instance Core.AWSRequest CreateMediaCapturePipeline where
  type
    AWSResponse CreateMediaCapturePipeline =
      CreateMediaCapturePipelineResponse
  request :: CreateMediaCapturePipeline -> Request CreateMediaCapturePipeline
request = Service
-> CreateMediaCapturePipeline -> Request CreateMediaCapturePipeline
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateMediaCapturePipeline
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateMediaCapturePipeline)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateMediaCapturePipeline))
-> Logger
-> Service
-> Proxy CreateMediaCapturePipeline
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateMediaCapturePipeline)))
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 MediaCapturePipeline
-> Int -> CreateMediaCapturePipelineResponse
CreateMediaCapturePipelineResponse'
            (Maybe MediaCapturePipeline
 -> Int -> CreateMediaCapturePipelineResponse)
-> Either String (Maybe MediaCapturePipeline)
-> Either String (Int -> CreateMediaCapturePipelineResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe MediaCapturePipeline)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MediaCapturePipeline")
            Either String (Int -> CreateMediaCapturePipelineResponse)
-> Either String Int
-> Either String CreateMediaCapturePipelineResponse
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 CreateMediaCapturePipeline

instance Prelude.NFData CreateMediaCapturePipeline

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

instance Core.ToJSON CreateMediaCapturePipeline where
  toJSON :: CreateMediaCapturePipeline -> Value
toJSON CreateMediaCapturePipeline' {Maybe (Sensitive Text)
Maybe ChimeSdkMeetingConfiguration
Sensitive Text
MediaPipelineSinkType
MediaPipelineSourceType
sinkArn :: Sensitive Text
sinkType :: MediaPipelineSinkType
sourceArn :: Sensitive Text
sourceType :: MediaPipelineSourceType
clientRequestToken :: Maybe (Sensitive Text)
chimeSdkMeetingConfiguration :: Maybe ChimeSdkMeetingConfiguration
$sel:sinkArn:CreateMediaCapturePipeline' :: CreateMediaCapturePipeline -> Sensitive Text
$sel:sinkType:CreateMediaCapturePipeline' :: CreateMediaCapturePipeline -> MediaPipelineSinkType
$sel:sourceArn:CreateMediaCapturePipeline' :: CreateMediaCapturePipeline -> Sensitive Text
$sel:sourceType:CreateMediaCapturePipeline' :: CreateMediaCapturePipeline -> MediaPipelineSourceType
$sel:clientRequestToken:CreateMediaCapturePipeline' :: CreateMediaCapturePipeline -> Maybe (Sensitive Text)
$sel:chimeSdkMeetingConfiguration:CreateMediaCapturePipeline' :: CreateMediaCapturePipeline -> Maybe ChimeSdkMeetingConfiguration
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ChimeSdkMeetingConfiguration" Text -> ChimeSdkMeetingConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ChimeSdkMeetingConfiguration -> Pair)
-> Maybe ChimeSdkMeetingConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ChimeSdkMeetingConfiguration
chimeSdkMeetingConfiguration,
            (Text
"ClientRequestToken" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
clientRequestToken,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SourceType" Text -> MediaPipelineSourceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MediaPipelineSourceType
sourceType),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SourceArn" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
sourceArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SinkType" Text -> MediaPipelineSinkType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MediaPipelineSinkType
sinkType),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SinkArn" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
sinkArn)
          ]
      )

instance Core.ToPath CreateMediaCapturePipeline where
  toPath :: CreateMediaCapturePipeline -> ByteString
toPath = ByteString -> CreateMediaCapturePipeline -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/media-capture-pipelines"

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

-- | /See:/ 'newCreateMediaCapturePipelineResponse' smart constructor.
data CreateMediaCapturePipelineResponse = CreateMediaCapturePipelineResponse'
  { -- | A media capture pipeline object, the ID, source type, source ARN, sink
    -- type, and sink ARN of a media capture pipeline object.
    CreateMediaCapturePipelineResponse -> Maybe MediaCapturePipeline
mediaCapturePipeline :: Prelude.Maybe MediaCapturePipeline,
    -- | The response's http status code.
    CreateMediaCapturePipelineResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateMediaCapturePipelineResponse
-> CreateMediaCapturePipelineResponse -> Bool
(CreateMediaCapturePipelineResponse
 -> CreateMediaCapturePipelineResponse -> Bool)
-> (CreateMediaCapturePipelineResponse
    -> CreateMediaCapturePipelineResponse -> Bool)
-> Eq CreateMediaCapturePipelineResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMediaCapturePipelineResponse
-> CreateMediaCapturePipelineResponse -> Bool
$c/= :: CreateMediaCapturePipelineResponse
-> CreateMediaCapturePipelineResponse -> Bool
== :: CreateMediaCapturePipelineResponse
-> CreateMediaCapturePipelineResponse -> Bool
$c== :: CreateMediaCapturePipelineResponse
-> CreateMediaCapturePipelineResponse -> Bool
Prelude.Eq, Int -> CreateMediaCapturePipelineResponse -> ShowS
[CreateMediaCapturePipelineResponse] -> ShowS
CreateMediaCapturePipelineResponse -> String
(Int -> CreateMediaCapturePipelineResponse -> ShowS)
-> (CreateMediaCapturePipelineResponse -> String)
-> ([CreateMediaCapturePipelineResponse] -> ShowS)
-> Show CreateMediaCapturePipelineResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMediaCapturePipelineResponse] -> ShowS
$cshowList :: [CreateMediaCapturePipelineResponse] -> ShowS
show :: CreateMediaCapturePipelineResponse -> String
$cshow :: CreateMediaCapturePipelineResponse -> String
showsPrec :: Int -> CreateMediaCapturePipelineResponse -> ShowS
$cshowsPrec :: Int -> CreateMediaCapturePipelineResponse -> ShowS
Prelude.Show, (forall x.
 CreateMediaCapturePipelineResponse
 -> Rep CreateMediaCapturePipelineResponse x)
-> (forall x.
    Rep CreateMediaCapturePipelineResponse x
    -> CreateMediaCapturePipelineResponse)
-> Generic CreateMediaCapturePipelineResponse
forall x.
Rep CreateMediaCapturePipelineResponse x
-> CreateMediaCapturePipelineResponse
forall x.
CreateMediaCapturePipelineResponse
-> Rep CreateMediaCapturePipelineResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateMediaCapturePipelineResponse x
-> CreateMediaCapturePipelineResponse
$cfrom :: forall x.
CreateMediaCapturePipelineResponse
-> Rep CreateMediaCapturePipelineResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateMediaCapturePipelineResponse' 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:
--
-- 'mediaCapturePipeline', 'createMediaCapturePipelineResponse_mediaCapturePipeline' - A media capture pipeline object, the ID, source type, source ARN, sink
-- type, and sink ARN of a media capture pipeline object.
--
-- 'httpStatus', 'createMediaCapturePipelineResponse_httpStatus' - The response's http status code.
newCreateMediaCapturePipelineResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateMediaCapturePipelineResponse
newCreateMediaCapturePipelineResponse :: Int -> CreateMediaCapturePipelineResponse
newCreateMediaCapturePipelineResponse Int
pHttpStatus_ =
  CreateMediaCapturePipelineResponse' :: Maybe MediaCapturePipeline
-> Int -> CreateMediaCapturePipelineResponse
CreateMediaCapturePipelineResponse'
    { $sel:mediaCapturePipeline:CreateMediaCapturePipelineResponse' :: Maybe MediaCapturePipeline
mediaCapturePipeline =
        Maybe MediaCapturePipeline
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateMediaCapturePipelineResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A media capture pipeline object, the ID, source type, source ARN, sink
-- type, and sink ARN of a media capture pipeline object.
createMediaCapturePipelineResponse_mediaCapturePipeline :: Lens.Lens' CreateMediaCapturePipelineResponse (Prelude.Maybe MediaCapturePipeline)
createMediaCapturePipelineResponse_mediaCapturePipeline :: (Maybe MediaCapturePipeline -> f (Maybe MediaCapturePipeline))
-> CreateMediaCapturePipelineResponse
-> f CreateMediaCapturePipelineResponse
createMediaCapturePipelineResponse_mediaCapturePipeline = (CreateMediaCapturePipelineResponse -> Maybe MediaCapturePipeline)
-> (CreateMediaCapturePipelineResponse
    -> Maybe MediaCapturePipeline
    -> CreateMediaCapturePipelineResponse)
-> Lens
     CreateMediaCapturePipelineResponse
     CreateMediaCapturePipelineResponse
     (Maybe MediaCapturePipeline)
     (Maybe MediaCapturePipeline)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMediaCapturePipelineResponse' {Maybe MediaCapturePipeline
mediaCapturePipeline :: Maybe MediaCapturePipeline
$sel:mediaCapturePipeline:CreateMediaCapturePipelineResponse' :: CreateMediaCapturePipelineResponse -> Maybe MediaCapturePipeline
mediaCapturePipeline} -> Maybe MediaCapturePipeline
mediaCapturePipeline) (\s :: CreateMediaCapturePipelineResponse
s@CreateMediaCapturePipelineResponse' {} Maybe MediaCapturePipeline
a -> CreateMediaCapturePipelineResponse
s {$sel:mediaCapturePipeline:CreateMediaCapturePipelineResponse' :: Maybe MediaCapturePipeline
mediaCapturePipeline = Maybe MediaCapturePipeline
a} :: CreateMediaCapturePipelineResponse)

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

instance
  Prelude.NFData
    CreateMediaCapturePipelineResponse