{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_recordingReconnectWindowSeconds,
    createRecordingConfiguration_tags,
    createRecordingConfiguration_thumbnailConfiguration,
    createRecordingConfiguration_destinationConfiguration,

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

    -- * Response Lenses
    createRecordingConfigurationResponse_recordingConfiguration,
    createRecordingConfigurationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IVS.Types
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,
    -- | If a broadcast disconnects and then reconnects within the specified
    -- interval, the multiple streams will be considered a single broadcast and
    -- merged together. Default: 0.
    CreateRecordingConfiguration -> Maybe Natural
recordingReconnectWindowSeconds :: Prelude.Maybe Prelude.Natural,
    -- | Array of 1-50 maps, each of the form @string:string (key:value)@. See
    -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services Resources>
    -- for more information, including restrictions that apply to tags and
    -- \"Tag naming limits and requirements\"; Amazon IVS has no
    -- service-specific constraints beyond what is documented there.
    CreateRecordingConfiguration -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A complex type that allows you to enable\/disable the recording of
    -- thumbnails for a live session and modify the interval at which
    -- thumbnails are generated for the live session.
    CreateRecordingConfiguration -> Maybe ThumbnailConfiguration
thumbnailConfiguration :: Prelude.Maybe ThumbnailConfiguration,
    -- | A complex type that contains a destination configuration for where
    -- recorded video will be stored.
    CreateRecordingConfiguration -> DestinationConfiguration
destinationConfiguration :: DestinationConfiguration
  }
  deriving (CreateRecordingConfiguration
-> CreateRecordingConfiguration -> Bool
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]
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
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.
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.
--
-- 'recordingReconnectWindowSeconds', 'createRecordingConfiguration_recordingReconnectWindowSeconds' - If a broadcast disconnects and then reconnects within the specified
-- interval, the multiple streams will be considered a single broadcast and
-- merged together. Default: 0.
--
-- 'tags', 'createRecordingConfiguration_tags' - Array of 1-50 maps, each of the form @string:string (key:value)@. See
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services Resources>
-- for more information, including restrictions that apply to tags and
-- \"Tag naming limits and requirements\"; Amazon IVS has no
-- service-specific constraints beyond what is documented there.
--
-- 'thumbnailConfiguration', 'createRecordingConfiguration_thumbnailConfiguration' - A complex type that allows you to enable\/disable the recording of
-- thumbnails for a live session and modify the interval at which
-- thumbnails are generated for the live session.
--
-- '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'
      { $sel:name:CreateRecordingConfiguration' :: Maybe Text
name =
          forall a. Maybe a
Prelude.Nothing,
        $sel:recordingReconnectWindowSeconds:CreateRecordingConfiguration' :: Maybe Natural
recordingReconnectWindowSeconds =
          forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateRecordingConfiguration' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:thumbnailConfiguration:CreateRecordingConfiguration' :: Maybe ThumbnailConfiguration
thumbnailConfiguration = 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 :: Lens' CreateRecordingConfiguration (Maybe Text)
createRecordingConfiguration_name = 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)

-- | If a broadcast disconnects and then reconnects within the specified
-- interval, the multiple streams will be considered a single broadcast and
-- merged together. Default: 0.
createRecordingConfiguration_recordingReconnectWindowSeconds :: Lens.Lens' CreateRecordingConfiguration (Prelude.Maybe Prelude.Natural)
createRecordingConfiguration_recordingReconnectWindowSeconds :: Lens' CreateRecordingConfiguration (Maybe Natural)
createRecordingConfiguration_recordingReconnectWindowSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRecordingConfiguration' {Maybe Natural
recordingReconnectWindowSeconds :: Maybe Natural
$sel:recordingReconnectWindowSeconds:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe Natural
recordingReconnectWindowSeconds} -> Maybe Natural
recordingReconnectWindowSeconds) (\s :: CreateRecordingConfiguration
s@CreateRecordingConfiguration' {} Maybe Natural
a -> CreateRecordingConfiguration
s {$sel:recordingReconnectWindowSeconds:CreateRecordingConfiguration' :: Maybe Natural
recordingReconnectWindowSeconds = Maybe Natural
a} :: CreateRecordingConfiguration)

-- | Array of 1-50 maps, each of the form @string:string (key:value)@. See
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services Resources>
-- for more information, including restrictions that apply to tags and
-- \"Tag naming limits and requirements\"; Amazon IVS has no
-- service-specific constraints beyond what is documented there.
createRecordingConfiguration_tags :: Lens.Lens' CreateRecordingConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRecordingConfiguration_tags :: Lens' CreateRecordingConfiguration (Maybe (HashMap Text Text))
createRecordingConfiguration_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A complex type that allows you to enable\/disable the recording of
-- thumbnails for a live session and modify the interval at which
-- thumbnails are generated for the live session.
createRecordingConfiguration_thumbnailConfiguration :: Lens.Lens' CreateRecordingConfiguration (Prelude.Maybe ThumbnailConfiguration)
createRecordingConfiguration_thumbnailConfiguration :: Lens' CreateRecordingConfiguration (Maybe ThumbnailConfiguration)
createRecordingConfiguration_thumbnailConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRecordingConfiguration' {Maybe ThumbnailConfiguration
thumbnailConfiguration :: Maybe ThumbnailConfiguration
$sel:thumbnailConfiguration:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe ThumbnailConfiguration
thumbnailConfiguration} -> Maybe ThumbnailConfiguration
thumbnailConfiguration) (\s :: CreateRecordingConfiguration
s@CreateRecordingConfiguration' {} Maybe ThumbnailConfiguration
a -> CreateRecordingConfiguration
s {$sel:thumbnailConfiguration:CreateRecordingConfiguration' :: Maybe ThumbnailConfiguration
thumbnailConfiguration = Maybe ThumbnailConfiguration
a} :: CreateRecordingConfiguration)

-- | A complex type that contains a destination configuration for where
-- recorded video will be stored.
createRecordingConfiguration_destinationConfiguration :: Lens.Lens' CreateRecordingConfiguration DestinationConfiguration
createRecordingConfiguration_destinationConfiguration :: Lens' CreateRecordingConfiguration DestinationConfiguration
createRecordingConfiguration_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 :: (Service -> Service)
-> CreateRecordingConfiguration
-> Request CreateRecordingConfiguration
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateRecordingConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateRecordingConfiguration)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe RecordingConfiguration
-> Int -> CreateRecordingConfigurationResponse
CreateRecordingConfigurationResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"recordingConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    CreateRecordingConfiguration
  where
  hashWithSalt :: Int -> CreateRecordingConfiguration -> Int
hashWithSalt Int
_salt CreateRecordingConfiguration' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe ThumbnailConfiguration
DestinationConfiguration
destinationConfiguration :: DestinationConfiguration
thumbnailConfiguration :: Maybe ThumbnailConfiguration
tags :: Maybe (HashMap Text Text)
recordingReconnectWindowSeconds :: Maybe Natural
name :: Maybe Text
$sel:destinationConfiguration:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> DestinationConfiguration
$sel:thumbnailConfiguration:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe ThumbnailConfiguration
$sel:tags:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe (HashMap Text Text)
$sel:recordingReconnectWindowSeconds:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe Natural
$sel:name:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
recordingReconnectWindowSeconds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ThumbnailConfiguration
thumbnailConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DestinationConfiguration
destinationConfiguration

instance Prelude.NFData CreateRecordingConfiguration where
  rnf :: CreateRecordingConfiguration -> ()
rnf CreateRecordingConfiguration' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe ThumbnailConfiguration
DestinationConfiguration
destinationConfiguration :: DestinationConfiguration
thumbnailConfiguration :: Maybe ThumbnailConfiguration
tags :: Maybe (HashMap Text Text)
recordingReconnectWindowSeconds :: Maybe Natural
name :: Maybe Text
$sel:destinationConfiguration:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> DestinationConfiguration
$sel:thumbnailConfiguration:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe ThumbnailConfiguration
$sel:tags:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe (HashMap Text Text)
$sel:recordingReconnectWindowSeconds:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe Natural
$sel:name:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
recordingReconnectWindowSeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ThumbnailConfiguration
thumbnailConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DestinationConfiguration
destinationConfiguration

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

instance Data.ToJSON CreateRecordingConfiguration where
  toJSON :: CreateRecordingConfiguration -> Value
toJSON CreateRecordingConfiguration' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe ThumbnailConfiguration
DestinationConfiguration
destinationConfiguration :: DestinationConfiguration
thumbnailConfiguration :: Maybe ThumbnailConfiguration
tags :: Maybe (HashMap Text Text)
recordingReconnectWindowSeconds :: Maybe Natural
name :: Maybe Text
$sel:destinationConfiguration:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> DestinationConfiguration
$sel:thumbnailConfiguration:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe ThumbnailConfiguration
$sel:tags:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe (HashMap Text Text)
$sel:recordingReconnectWindowSeconds:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe Natural
$sel:name:CreateRecordingConfiguration' :: CreateRecordingConfiguration -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Key
"recordingReconnectWindowSeconds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
recordingReconnectWindowSeconds,
            (Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            (Key
"thumbnailConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ThumbnailConfiguration
thumbnailConfiguration,
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"destinationConfiguration"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= DestinationConfiguration
destinationConfiguration
              )
          ]
      )

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

instance Data.ToQuery CreateRecordingConfiguration where
  toQuery :: CreateRecordingConfiguration -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const 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
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]
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
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.
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'
    { $sel:recordingConfiguration:CreateRecordingConfigurationResponse' :: Maybe RecordingConfiguration
recordingConfiguration =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateRecordingConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

createRecordingConfigurationResponse_recordingConfiguration :: Lens.Lens' CreateRecordingConfigurationResponse (Prelude.Maybe RecordingConfiguration)
createRecordingConfigurationResponse_recordingConfiguration :: Lens'
  CreateRecordingConfigurationResponse (Maybe RecordingConfiguration)
createRecordingConfigurationResponse_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 :: Lens' CreateRecordingConfigurationResponse Int
createRecordingConfigurationResponse_httpStatus = 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
  where
  rnf :: CreateRecordingConfigurationResponse -> ()
rnf CreateRecordingConfigurationResponse' {Int
Maybe RecordingConfiguration
httpStatus :: Int
recordingConfiguration :: Maybe RecordingConfiguration
$sel:httpStatus:CreateRecordingConfigurationResponse' :: CreateRecordingConfigurationResponse -> Int
$sel:recordingConfiguration:CreateRecordingConfigurationResponse' :: CreateRecordingConfigurationResponse
-> Maybe RecordingConfiguration
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe RecordingConfiguration
recordingConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus