{-# 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.IVS.CreateRecordingConfiguration
-- 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 new recording configuration, used to enable recording to
-- Amazon S3.
--
-- __Known issue:__ In the us-east-1 region, if you use the Amazon Web
-- Services CLI to create a recording configuration, it returns success
-- even if the S3 bucket is in a different region. In this case, the
-- @state@ of the recording configuration is @CREATE_FAILED@ (instead of
-- @ACTIVE@). (In other regions, the CLI correctly returns failure if the
-- bucket is in a different region.)
--
-- __Workaround:__ Ensure that your S3 bucket is in the same region as the
-- recording configuration. If you create a recording configuration in a
-- different region as your S3 bucket, delete that recording configuration
-- and create a new one with an S3 bucket from the correct region.
module Amazonka.IVS.CreateRecordingConfiguration
  ( -- * Creating a Request
    CreateRecordingConfiguration (..),
    newCreateRecordingConfiguration,

    -- * Request Lenses
    createRecordingConfiguration_name,
    createRecordingConfiguration_tags,
    createRecordingConfiguration_destinationConfiguration,

    -- * Destructuring the Response
    CreateRecordingConfigurationResponse (..),
    newCreateRecordingConfigurationResponse,

    -- * Response Lenses
    createRecordingConfigurationResponse_recordingConfiguration,
    createRecordingConfigurationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IVS.Types
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:/ 'newCreateRecordingConfiguration' smart constructor.
data CreateRecordingConfiguration = CreateRecordingConfiguration'
  { -- | Recording-configuration name. The value does not need to be unique.
    CreateRecordingConfiguration -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Array of 1-50 maps, each of the form @string:string (key:value)@.
    CreateRecordingConfiguration -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A complex type that contains a destination configuration for where
    -- recorded video will be stored.
    CreateRecordingConfiguration -> DestinationConfiguration
destinationConfiguration :: DestinationConfiguration
  }
  deriving (CreateRecordingConfiguration
-> CreateRecordingConfiguration -> Bool
(CreateRecordingConfiguration
 -> CreateRecordingConfiguration -> Bool)
-> (CreateRecordingConfiguration
    -> CreateRecordingConfiguration -> Bool)
-> Eq CreateRecordingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRecordingConfiguration
-> CreateRecordingConfiguration -> Bool
$c/= :: CreateRecordingConfiguration
-> CreateRecordingConfiguration -> Bool
== :: CreateRecordingConfiguration
-> CreateRecordingConfiguration -> Bool
$c== :: CreateRecordingConfiguration
-> CreateRecordingConfiguration -> Bool
Prelude.Eq, ReadPrec [CreateRecordingConfiguration]
ReadPrec CreateRecordingConfiguration
Int -> ReadS CreateRecordingConfiguration
ReadS [CreateRecordingConfiguration]
(Int -> ReadS CreateRecordingConfiguration)
-> ReadS [CreateRecordingConfiguration]
-> ReadPrec CreateRecordingConfiguration
-> ReadPrec [CreateRecordingConfiguration]
-> Read CreateRecordingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRecordingConfiguration]
$creadListPrec :: ReadPrec [CreateRecordingConfiguration]
readPrec :: ReadPrec CreateRecordingConfiguration
$creadPrec :: ReadPrec CreateRecordingConfiguration
readList :: ReadS [CreateRecordingConfiguration]
$creadList :: ReadS [CreateRecordingConfiguration]
readsPrec :: Int -> ReadS CreateRecordingConfiguration
$creadsPrec :: Int -> ReadS CreateRecordingConfiguration
Prelude.Read, Int -> CreateRecordingConfiguration -> ShowS
[CreateRecordingConfiguration] -> ShowS
CreateRecordingConfiguration -> String
(Int -> CreateRecordingConfiguration -> ShowS)
-> (CreateRecordingConfiguration -> String)
-> ([CreateRecordingConfiguration] -> ShowS)
-> Show CreateRecordingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRecordingConfiguration] -> ShowS
$cshowList :: [CreateRecordingConfiguration] -> ShowS
show :: CreateRecordingConfiguration -> String
$cshow :: CreateRecordingConfiguration -> String
showsPrec :: Int -> CreateRecordingConfiguration -> ShowS
$cshowsPrec :: Int -> CreateRecordingConfiguration -> ShowS
Prelude.Show, (forall x.
 CreateRecordingConfiguration -> Rep CreateRecordingConfiguration x)
-> (forall x.
    Rep CreateRecordingConfiguration x -> CreateRecordingConfiguration)
-> Generic CreateRecordingConfiguration
forall x.
Rep CreateRecordingConfiguration x -> CreateRecordingConfiguration
forall x.
CreateRecordingConfiguration -> Rep CreateRecordingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateRecordingConfiguration x -> CreateRecordingConfiguration
$cfrom :: forall x.
CreateRecordingConfiguration -> Rep CreateRecordingConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'CreateRecordingConfiguration' 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:
--
-- 'name', 'createRecordingConfiguration_name' - Recording-configuration name. The value does not need to be unique.
--
-- 'tags', 'createRecordingConfiguration_tags' - Array of 1-50 maps, each of the form @string:string (key:value)@.
--
-- 'destinationConfiguration', 'createRecordingConfiguration_destinationConfiguration' - A complex type that contains a destination configuration for where
-- recorded video will be stored.
newCreateRecordingConfiguration ::
  -- | 'destinationConfiguration'
  DestinationConfiguration ->
  CreateRecordingConfiguration
newCreateRecordingConfiguration :: DestinationConfiguration -> CreateRecordingConfiguration
newCreateRecordingConfiguration
  DestinationConfiguration
pDestinationConfiguration_ =
    CreateRecordingConfiguration' :: Maybe Text
-> Maybe (HashMap Text Text)
-> DestinationConfiguration
-> CreateRecordingConfiguration
CreateRecordingConfiguration'
      { $sel:name:CreateRecordingConfiguration' :: Maybe Text
name =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateRecordingConfiguration' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:destinationConfiguration:CreateRecordingConfiguration' :: DestinationConfiguration
destinationConfiguration =
          DestinationConfiguration
pDestinationConfiguration_
      }

-- | Recording-configuration name. The value does not need to be unique.
createRecordingConfiguration_name :: Lens.Lens' CreateRecordingConfiguration (Prelude.Maybe Prelude.Text)
createRecordingConfiguration_name :: (Maybe Text -> f (Maybe Text))
-> CreateRecordingConfiguration -> f CreateRecordingConfiguration
createRecordingConfiguration_name = (CreateRecordingConfiguration -> Maybe Text)
-> (CreateRecordingConfiguration
    -> Maybe Text -> CreateRecordingConfiguration)
-> Lens
     CreateRecordingConfiguration
     CreateRecordingConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRecordingConfiguration' {Maybe Text
name :: Maybe Text
$sel:name:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateRecordingConfiguration
s@CreateRecordingConfiguration' {} Maybe Text
a -> CreateRecordingConfiguration
s {$sel:name:CreateRecordingConfiguration' :: Maybe Text
name = Maybe Text
a} :: CreateRecordingConfiguration)

-- | Array of 1-50 maps, each of the form @string:string (key:value)@.
createRecordingConfiguration_tags :: Lens.Lens' CreateRecordingConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRecordingConfiguration_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRecordingConfiguration -> f CreateRecordingConfiguration
createRecordingConfiguration_tags = (CreateRecordingConfiguration -> Maybe (HashMap Text Text))
-> (CreateRecordingConfiguration
    -> Maybe (HashMap Text Text) -> CreateRecordingConfiguration)
-> Lens
     CreateRecordingConfiguration
     CreateRecordingConfiguration
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRecordingConfiguration' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateRecordingConfiguration
s@CreateRecordingConfiguration' {} Maybe (HashMap Text Text)
a -> CreateRecordingConfiguration
s {$sel:tags:CreateRecordingConfiguration' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateRecordingConfiguration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateRecordingConfiguration -> f CreateRecordingConfiguration)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRecordingConfiguration
-> f CreateRecordingConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text 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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A complex type that contains a destination configuration for where
-- recorded video will be stored.
createRecordingConfiguration_destinationConfiguration :: Lens.Lens' CreateRecordingConfiguration DestinationConfiguration
createRecordingConfiguration_destinationConfiguration :: (DestinationConfiguration -> f DestinationConfiguration)
-> CreateRecordingConfiguration -> f CreateRecordingConfiguration
createRecordingConfiguration_destinationConfiguration = (CreateRecordingConfiguration -> DestinationConfiguration)
-> (CreateRecordingConfiguration
    -> DestinationConfiguration -> CreateRecordingConfiguration)
-> Lens
     CreateRecordingConfiguration
     CreateRecordingConfiguration
     DestinationConfiguration
     DestinationConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRecordingConfiguration' {DestinationConfiguration
destinationConfiguration :: DestinationConfiguration
$sel:destinationConfiguration:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> DestinationConfiguration
destinationConfiguration} -> DestinationConfiguration
destinationConfiguration) (\s :: CreateRecordingConfiguration
s@CreateRecordingConfiguration' {} DestinationConfiguration
a -> CreateRecordingConfiguration
s {$sel:destinationConfiguration:CreateRecordingConfiguration' :: DestinationConfiguration
destinationConfiguration = DestinationConfiguration
a} :: CreateRecordingConfiguration)

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

instance Prelude.NFData CreateRecordingConfiguration

instance Core.ToHeaders CreateRecordingConfiguration where
  toHeaders :: CreateRecordingConfiguration -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateRecordingConfiguration -> 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 CreateRecordingConfiguration where
  toJSON :: CreateRecordingConfiguration -> Value
toJSON CreateRecordingConfiguration' {Maybe Text
Maybe (HashMap Text Text)
DestinationConfiguration
destinationConfiguration :: DestinationConfiguration
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
$sel:destinationConfiguration:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> DestinationConfiguration
$sel:tags:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe (HashMap Text Text)
$sel:name:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"destinationConfiguration"
                  Text -> DestinationConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DestinationConfiguration
destinationConfiguration
              )
          ]
      )

instance Core.ToPath CreateRecordingConfiguration where
  toPath :: CreateRecordingConfiguration -> ByteString
toPath =
    ByteString -> CreateRecordingConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/CreateRecordingConfiguration"

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

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

-- |
-- Create a value of 'CreateRecordingConfigurationResponse' 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:
--
-- 'recordingConfiguration', 'createRecordingConfigurationResponse_recordingConfiguration' -
--
-- 'httpStatus', 'createRecordingConfigurationResponse_httpStatus' - The response's http status code.
newCreateRecordingConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateRecordingConfigurationResponse
newCreateRecordingConfigurationResponse :: Int -> CreateRecordingConfigurationResponse
newCreateRecordingConfigurationResponse Int
pHttpStatus_ =
  CreateRecordingConfigurationResponse' :: Maybe RecordingConfiguration
-> Int -> CreateRecordingConfigurationResponse
CreateRecordingConfigurationResponse'
    { $sel:recordingConfiguration:CreateRecordingConfigurationResponse' :: Maybe RecordingConfiguration
recordingConfiguration =
        Maybe RecordingConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateRecordingConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- |
createRecordingConfigurationResponse_recordingConfiguration :: Lens.Lens' CreateRecordingConfigurationResponse (Prelude.Maybe RecordingConfiguration)
createRecordingConfigurationResponse_recordingConfiguration :: (Maybe RecordingConfiguration -> f (Maybe RecordingConfiguration))
-> CreateRecordingConfigurationResponse
-> f CreateRecordingConfigurationResponse
createRecordingConfigurationResponse_recordingConfiguration = (CreateRecordingConfigurationResponse
 -> Maybe RecordingConfiguration)
-> (CreateRecordingConfigurationResponse
    -> Maybe RecordingConfiguration
    -> CreateRecordingConfigurationResponse)
-> Lens
     CreateRecordingConfigurationResponse
     CreateRecordingConfigurationResponse
     (Maybe RecordingConfiguration)
     (Maybe RecordingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRecordingConfigurationResponse' {Maybe RecordingConfiguration
recordingConfiguration :: Maybe RecordingConfiguration
$sel:recordingConfiguration:CreateRecordingConfigurationResponse' :: CreateRecordingConfigurationResponse
-> Maybe RecordingConfiguration
recordingConfiguration} -> Maybe RecordingConfiguration
recordingConfiguration) (\s :: CreateRecordingConfigurationResponse
s@CreateRecordingConfigurationResponse' {} Maybe RecordingConfiguration
a -> CreateRecordingConfigurationResponse
s {$sel:recordingConfiguration:CreateRecordingConfigurationResponse' :: Maybe RecordingConfiguration
recordingConfiguration = Maybe RecordingConfiguration
a} :: CreateRecordingConfigurationResponse)

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

instance
  Prelude.NFData
    CreateRecordingConfigurationResponse