{-# 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.MediaLive.CreateMultiplexProgram
-- 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)
--
-- Create a new program in the multiplex.
module Amazonka.MediaLive.CreateMultiplexProgram
  ( -- * Creating a Request
    CreateMultiplexProgram' (..),
    newCreateMultiplexProgram',

    -- * Request Lenses
    createMultiplexProgram'_multiplexId,
    createMultiplexProgram'_requestId,
    createMultiplexProgram'_multiplexProgramSettings,
    createMultiplexProgram'_programName,

    -- * Destructuring the Response
    CreateMultiplexProgramResponse (..),
    newCreateMultiplexProgramResponse,

    -- * Response Lenses
    createMultiplexProgramResponse_multiplexProgram,
    createMultiplexProgramResponse_httpStatus,
  )
where

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

-- | A request to create a program in a multiplex.
--
-- /See:/ 'newCreateMultiplexProgram'' smart constructor.
data CreateMultiplexProgram' = CreateMultiplexProgram''
  { -- | ID of the multiplex where the program is to be created.
    CreateMultiplexProgram' -> Text
multiplexId :: Prelude.Text,
    -- | Unique request ID. This prevents retries from creating multiple
    -- resources.
    CreateMultiplexProgram' -> Text
requestId :: Prelude.Text,
    -- | The settings for this multiplex program.
    CreateMultiplexProgram' -> MultiplexProgramSettings
multiplexProgramSettings :: MultiplexProgramSettings,
    -- | Name of multiplex program.
    CreateMultiplexProgram' -> Text
programName :: Prelude.Text
  }
  deriving (CreateMultiplexProgram' -> CreateMultiplexProgram' -> Bool
(CreateMultiplexProgram' -> CreateMultiplexProgram' -> Bool)
-> (CreateMultiplexProgram' -> CreateMultiplexProgram' -> Bool)
-> Eq CreateMultiplexProgram'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMultiplexProgram' -> CreateMultiplexProgram' -> Bool
$c/= :: CreateMultiplexProgram' -> CreateMultiplexProgram' -> Bool
== :: CreateMultiplexProgram' -> CreateMultiplexProgram' -> Bool
$c== :: CreateMultiplexProgram' -> CreateMultiplexProgram' -> Bool
Prelude.Eq, ReadPrec [CreateMultiplexProgram']
ReadPrec CreateMultiplexProgram'
Int -> ReadS CreateMultiplexProgram'
ReadS [CreateMultiplexProgram']
(Int -> ReadS CreateMultiplexProgram')
-> ReadS [CreateMultiplexProgram']
-> ReadPrec CreateMultiplexProgram'
-> ReadPrec [CreateMultiplexProgram']
-> Read CreateMultiplexProgram'
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateMultiplexProgram']
$creadListPrec :: ReadPrec [CreateMultiplexProgram']
readPrec :: ReadPrec CreateMultiplexProgram'
$creadPrec :: ReadPrec CreateMultiplexProgram'
readList :: ReadS [CreateMultiplexProgram']
$creadList :: ReadS [CreateMultiplexProgram']
readsPrec :: Int -> ReadS CreateMultiplexProgram'
$creadsPrec :: Int -> ReadS CreateMultiplexProgram'
Prelude.Read, Int -> CreateMultiplexProgram' -> ShowS
[CreateMultiplexProgram'] -> ShowS
CreateMultiplexProgram' -> String
(Int -> CreateMultiplexProgram' -> ShowS)
-> (CreateMultiplexProgram' -> String)
-> ([CreateMultiplexProgram'] -> ShowS)
-> Show CreateMultiplexProgram'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMultiplexProgram'] -> ShowS
$cshowList :: [CreateMultiplexProgram'] -> ShowS
show :: CreateMultiplexProgram' -> String
$cshow :: CreateMultiplexProgram' -> String
showsPrec :: Int -> CreateMultiplexProgram' -> ShowS
$cshowsPrec :: Int -> CreateMultiplexProgram' -> ShowS
Prelude.Show, (forall x.
 CreateMultiplexProgram' -> Rep CreateMultiplexProgram' x)
-> (forall x.
    Rep CreateMultiplexProgram' x -> CreateMultiplexProgram')
-> Generic CreateMultiplexProgram'
forall x. Rep CreateMultiplexProgram' x -> CreateMultiplexProgram'
forall x. CreateMultiplexProgram' -> Rep CreateMultiplexProgram' x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateMultiplexProgram' x -> CreateMultiplexProgram'
$cfrom :: forall x. CreateMultiplexProgram' -> Rep CreateMultiplexProgram' x
Prelude.Generic)

-- |
-- Create a value of 'CreateMultiplexProgram'' 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:
--
-- 'multiplexId', 'createMultiplexProgram'_multiplexId' - ID of the multiplex where the program is to be created.
--
-- 'requestId', 'createMultiplexProgram'_requestId' - Unique request ID. This prevents retries from creating multiple
-- resources.
--
-- 'multiplexProgramSettings', 'createMultiplexProgram'_multiplexProgramSettings' - The settings for this multiplex program.
--
-- 'programName', 'createMultiplexProgram'_programName' - Name of multiplex program.
newCreateMultiplexProgram' ::
  -- | 'multiplexId'
  Prelude.Text ->
  -- | 'requestId'
  Prelude.Text ->
  -- | 'multiplexProgramSettings'
  MultiplexProgramSettings ->
  -- | 'programName'
  Prelude.Text ->
  CreateMultiplexProgram'
newCreateMultiplexProgram' :: Text
-> Text
-> MultiplexProgramSettings
-> Text
-> CreateMultiplexProgram'
newCreateMultiplexProgram'
  Text
pMultiplexId_
  Text
pRequestId_
  MultiplexProgramSettings
pMultiplexProgramSettings_
  Text
pProgramName_ =
    CreateMultiplexProgram'' :: Text
-> Text
-> MultiplexProgramSettings
-> Text
-> CreateMultiplexProgram'
CreateMultiplexProgram''
      { $sel:multiplexId:CreateMultiplexProgram'' :: Text
multiplexId =
          Text
pMultiplexId_,
        $sel:requestId:CreateMultiplexProgram'' :: Text
requestId = Text
pRequestId_,
        $sel:multiplexProgramSettings:CreateMultiplexProgram'' :: MultiplexProgramSettings
multiplexProgramSettings =
          MultiplexProgramSettings
pMultiplexProgramSettings_,
        $sel:programName:CreateMultiplexProgram'' :: Text
programName = Text
pProgramName_
      }

-- | ID of the multiplex where the program is to be created.
createMultiplexProgram'_multiplexId :: Lens.Lens' CreateMultiplexProgram' Prelude.Text
createMultiplexProgram'_multiplexId :: (Text -> f Text)
-> CreateMultiplexProgram' -> f CreateMultiplexProgram'
createMultiplexProgram'_multiplexId = (CreateMultiplexProgram' -> Text)
-> (CreateMultiplexProgram' -> Text -> CreateMultiplexProgram')
-> Lens CreateMultiplexProgram' CreateMultiplexProgram' Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultiplexProgram'' {Text
multiplexId :: Text
$sel:multiplexId:CreateMultiplexProgram'' :: CreateMultiplexProgram' -> Text
multiplexId} -> Text
multiplexId) (\s :: CreateMultiplexProgram'
s@CreateMultiplexProgram'' {} Text
a -> CreateMultiplexProgram'
s {$sel:multiplexId:CreateMultiplexProgram'' :: Text
multiplexId = Text
a} :: CreateMultiplexProgram')

-- | Unique request ID. This prevents retries from creating multiple
-- resources.
createMultiplexProgram'_requestId :: Lens.Lens' CreateMultiplexProgram' Prelude.Text
createMultiplexProgram'_requestId :: (Text -> f Text)
-> CreateMultiplexProgram' -> f CreateMultiplexProgram'
createMultiplexProgram'_requestId = (CreateMultiplexProgram' -> Text)
-> (CreateMultiplexProgram' -> Text -> CreateMultiplexProgram')
-> Lens CreateMultiplexProgram' CreateMultiplexProgram' Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultiplexProgram'' {Text
requestId :: Text
$sel:requestId:CreateMultiplexProgram'' :: CreateMultiplexProgram' -> Text
requestId} -> Text
requestId) (\s :: CreateMultiplexProgram'
s@CreateMultiplexProgram'' {} Text
a -> CreateMultiplexProgram'
s {$sel:requestId:CreateMultiplexProgram'' :: Text
requestId = Text
a} :: CreateMultiplexProgram')

-- | The settings for this multiplex program.
createMultiplexProgram'_multiplexProgramSettings :: Lens.Lens' CreateMultiplexProgram' MultiplexProgramSettings
createMultiplexProgram'_multiplexProgramSettings :: (MultiplexProgramSettings -> f MultiplexProgramSettings)
-> CreateMultiplexProgram' -> f CreateMultiplexProgram'
createMultiplexProgram'_multiplexProgramSettings = (CreateMultiplexProgram' -> MultiplexProgramSettings)
-> (CreateMultiplexProgram'
    -> MultiplexProgramSettings -> CreateMultiplexProgram')
-> Lens
     CreateMultiplexProgram'
     CreateMultiplexProgram'
     MultiplexProgramSettings
     MultiplexProgramSettings
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultiplexProgram'' {MultiplexProgramSettings
multiplexProgramSettings :: MultiplexProgramSettings
$sel:multiplexProgramSettings:CreateMultiplexProgram'' :: CreateMultiplexProgram' -> MultiplexProgramSettings
multiplexProgramSettings} -> MultiplexProgramSettings
multiplexProgramSettings) (\s :: CreateMultiplexProgram'
s@CreateMultiplexProgram'' {} MultiplexProgramSettings
a -> CreateMultiplexProgram'
s {$sel:multiplexProgramSettings:CreateMultiplexProgram'' :: MultiplexProgramSettings
multiplexProgramSettings = MultiplexProgramSettings
a} :: CreateMultiplexProgram')

-- | Name of multiplex program.
createMultiplexProgram'_programName :: Lens.Lens' CreateMultiplexProgram' Prelude.Text
createMultiplexProgram'_programName :: (Text -> f Text)
-> CreateMultiplexProgram' -> f CreateMultiplexProgram'
createMultiplexProgram'_programName = (CreateMultiplexProgram' -> Text)
-> (CreateMultiplexProgram' -> Text -> CreateMultiplexProgram')
-> Lens CreateMultiplexProgram' CreateMultiplexProgram' Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultiplexProgram'' {Text
programName :: Text
$sel:programName:CreateMultiplexProgram'' :: CreateMultiplexProgram' -> Text
programName} -> Text
programName) (\s :: CreateMultiplexProgram'
s@CreateMultiplexProgram'' {} Text
a -> CreateMultiplexProgram'
s {$sel:programName:CreateMultiplexProgram'' :: Text
programName = Text
a} :: CreateMultiplexProgram')

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

instance Prelude.NFData CreateMultiplexProgram'

instance Core.ToHeaders CreateMultiplexProgram' where
  toHeaders :: CreateMultiplexProgram' -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateMultiplexProgram' -> 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 CreateMultiplexProgram' where
  toJSON :: CreateMultiplexProgram' -> Value
toJSON CreateMultiplexProgram'' {Text
MultiplexProgramSettings
programName :: Text
multiplexProgramSettings :: MultiplexProgramSettings
requestId :: Text
multiplexId :: Text
$sel:programName:CreateMultiplexProgram'' :: CreateMultiplexProgram' -> Text
$sel:multiplexProgramSettings:CreateMultiplexProgram'' :: CreateMultiplexProgram' -> MultiplexProgramSettings
$sel:requestId:CreateMultiplexProgram'' :: CreateMultiplexProgram' -> Text
$sel:multiplexId:CreateMultiplexProgram'' :: CreateMultiplexProgram' -> 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
"requestId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
requestId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"multiplexProgramSettings"
                  Text -> MultiplexProgramSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MultiplexProgramSettings
multiplexProgramSettings
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"programName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
programName)
          ]
      )

instance Core.ToPath CreateMultiplexProgram' where
  toPath :: CreateMultiplexProgram' -> ByteString
toPath CreateMultiplexProgram'' {Text
MultiplexProgramSettings
programName :: Text
multiplexProgramSettings :: MultiplexProgramSettings
requestId :: Text
multiplexId :: Text
$sel:programName:CreateMultiplexProgram'' :: CreateMultiplexProgram' -> Text
$sel:multiplexProgramSettings:CreateMultiplexProgram'' :: CreateMultiplexProgram' -> MultiplexProgramSettings
$sel:requestId:CreateMultiplexProgram'' :: CreateMultiplexProgram' -> Text
$sel:multiplexId:CreateMultiplexProgram'' :: CreateMultiplexProgram' -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/prod/multiplexes/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
multiplexId,
        ByteString
"/programs"
      ]

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

-- | Placeholder documentation for CreateMultiplexProgramResponse
--
-- /See:/ 'newCreateMultiplexProgramResponse' smart constructor.
data CreateMultiplexProgramResponse = CreateMultiplexProgramResponse'
  { -- | The newly created multiplex program.
    CreateMultiplexProgramResponse -> Maybe MultiplexProgram
multiplexProgram :: Prelude.Maybe MultiplexProgram,
    -- | The response's http status code.
    CreateMultiplexProgramResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateMultiplexProgramResponse
-> CreateMultiplexProgramResponse -> Bool
(CreateMultiplexProgramResponse
 -> CreateMultiplexProgramResponse -> Bool)
-> (CreateMultiplexProgramResponse
    -> CreateMultiplexProgramResponse -> Bool)
-> Eq CreateMultiplexProgramResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMultiplexProgramResponse
-> CreateMultiplexProgramResponse -> Bool
$c/= :: CreateMultiplexProgramResponse
-> CreateMultiplexProgramResponse -> Bool
== :: CreateMultiplexProgramResponse
-> CreateMultiplexProgramResponse -> Bool
$c== :: CreateMultiplexProgramResponse
-> CreateMultiplexProgramResponse -> Bool
Prelude.Eq, ReadPrec [CreateMultiplexProgramResponse]
ReadPrec CreateMultiplexProgramResponse
Int -> ReadS CreateMultiplexProgramResponse
ReadS [CreateMultiplexProgramResponse]
(Int -> ReadS CreateMultiplexProgramResponse)
-> ReadS [CreateMultiplexProgramResponse]
-> ReadPrec CreateMultiplexProgramResponse
-> ReadPrec [CreateMultiplexProgramResponse]
-> Read CreateMultiplexProgramResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateMultiplexProgramResponse]
$creadListPrec :: ReadPrec [CreateMultiplexProgramResponse]
readPrec :: ReadPrec CreateMultiplexProgramResponse
$creadPrec :: ReadPrec CreateMultiplexProgramResponse
readList :: ReadS [CreateMultiplexProgramResponse]
$creadList :: ReadS [CreateMultiplexProgramResponse]
readsPrec :: Int -> ReadS CreateMultiplexProgramResponse
$creadsPrec :: Int -> ReadS CreateMultiplexProgramResponse
Prelude.Read, Int -> CreateMultiplexProgramResponse -> ShowS
[CreateMultiplexProgramResponse] -> ShowS
CreateMultiplexProgramResponse -> String
(Int -> CreateMultiplexProgramResponse -> ShowS)
-> (CreateMultiplexProgramResponse -> String)
-> ([CreateMultiplexProgramResponse] -> ShowS)
-> Show CreateMultiplexProgramResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMultiplexProgramResponse] -> ShowS
$cshowList :: [CreateMultiplexProgramResponse] -> ShowS
show :: CreateMultiplexProgramResponse -> String
$cshow :: CreateMultiplexProgramResponse -> String
showsPrec :: Int -> CreateMultiplexProgramResponse -> ShowS
$cshowsPrec :: Int -> CreateMultiplexProgramResponse -> ShowS
Prelude.Show, (forall x.
 CreateMultiplexProgramResponse
 -> Rep CreateMultiplexProgramResponse x)
-> (forall x.
    Rep CreateMultiplexProgramResponse x
    -> CreateMultiplexProgramResponse)
-> Generic CreateMultiplexProgramResponse
forall x.
Rep CreateMultiplexProgramResponse x
-> CreateMultiplexProgramResponse
forall x.
CreateMultiplexProgramResponse
-> Rep CreateMultiplexProgramResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateMultiplexProgramResponse x
-> CreateMultiplexProgramResponse
$cfrom :: forall x.
CreateMultiplexProgramResponse
-> Rep CreateMultiplexProgramResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateMultiplexProgramResponse' 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:
--
-- 'multiplexProgram', 'createMultiplexProgramResponse_multiplexProgram' - The newly created multiplex program.
--
-- 'httpStatus', 'createMultiplexProgramResponse_httpStatus' - The response's http status code.
newCreateMultiplexProgramResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateMultiplexProgramResponse
newCreateMultiplexProgramResponse :: Int -> CreateMultiplexProgramResponse
newCreateMultiplexProgramResponse Int
pHttpStatus_ =
  CreateMultiplexProgramResponse' :: Maybe MultiplexProgram -> Int -> CreateMultiplexProgramResponse
CreateMultiplexProgramResponse'
    { $sel:multiplexProgram:CreateMultiplexProgramResponse' :: Maybe MultiplexProgram
multiplexProgram =
        Maybe MultiplexProgram
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateMultiplexProgramResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The newly created multiplex program.
createMultiplexProgramResponse_multiplexProgram :: Lens.Lens' CreateMultiplexProgramResponse (Prelude.Maybe MultiplexProgram)
createMultiplexProgramResponse_multiplexProgram :: (Maybe MultiplexProgram -> f (Maybe MultiplexProgram))
-> CreateMultiplexProgramResponse
-> f CreateMultiplexProgramResponse
createMultiplexProgramResponse_multiplexProgram = (CreateMultiplexProgramResponse -> Maybe MultiplexProgram)
-> (CreateMultiplexProgramResponse
    -> Maybe MultiplexProgram -> CreateMultiplexProgramResponse)
-> Lens
     CreateMultiplexProgramResponse
     CreateMultiplexProgramResponse
     (Maybe MultiplexProgram)
     (Maybe MultiplexProgram)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMultiplexProgramResponse' {Maybe MultiplexProgram
multiplexProgram :: Maybe MultiplexProgram
$sel:multiplexProgram:CreateMultiplexProgramResponse' :: CreateMultiplexProgramResponse -> Maybe MultiplexProgram
multiplexProgram} -> Maybe MultiplexProgram
multiplexProgram) (\s :: CreateMultiplexProgramResponse
s@CreateMultiplexProgramResponse' {} Maybe MultiplexProgram
a -> CreateMultiplexProgramResponse
s {$sel:multiplexProgram:CreateMultiplexProgramResponse' :: Maybe MultiplexProgram
multiplexProgram = Maybe MultiplexProgram
a} :: CreateMultiplexProgramResponse)

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

instance
  Prelude.NFData
    CreateMultiplexProgramResponse