{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Connect.Types.VoiceRecordingConfiguration
-- 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)
module Amazonka.Connect.Types.VoiceRecordingConfiguration where

import Amazonka.Connect.Types.VoiceRecordingTrack
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains information about the recording configuration settings.
--
-- /See:/ 'newVoiceRecordingConfiguration' smart constructor.
data VoiceRecordingConfiguration = VoiceRecordingConfiguration'
  { -- | Identifies which track is being recorded.
    VoiceRecordingConfiguration -> Maybe VoiceRecordingTrack
voiceRecordingTrack :: Prelude.Maybe VoiceRecordingTrack
  }
  deriving (VoiceRecordingConfiguration -> VoiceRecordingConfiguration -> Bool
(VoiceRecordingConfiguration
 -> VoiceRecordingConfiguration -> Bool)
-> (VoiceRecordingConfiguration
    -> VoiceRecordingConfiguration -> Bool)
-> Eq VoiceRecordingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VoiceRecordingConfiguration -> VoiceRecordingConfiguration -> Bool
$c/= :: VoiceRecordingConfiguration -> VoiceRecordingConfiguration -> Bool
== :: VoiceRecordingConfiguration -> VoiceRecordingConfiguration -> Bool
$c== :: VoiceRecordingConfiguration -> VoiceRecordingConfiguration -> Bool
Prelude.Eq, ReadPrec [VoiceRecordingConfiguration]
ReadPrec VoiceRecordingConfiguration
Int -> ReadS VoiceRecordingConfiguration
ReadS [VoiceRecordingConfiguration]
(Int -> ReadS VoiceRecordingConfiguration)
-> ReadS [VoiceRecordingConfiguration]
-> ReadPrec VoiceRecordingConfiguration
-> ReadPrec [VoiceRecordingConfiguration]
-> Read VoiceRecordingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VoiceRecordingConfiguration]
$creadListPrec :: ReadPrec [VoiceRecordingConfiguration]
readPrec :: ReadPrec VoiceRecordingConfiguration
$creadPrec :: ReadPrec VoiceRecordingConfiguration
readList :: ReadS [VoiceRecordingConfiguration]
$creadList :: ReadS [VoiceRecordingConfiguration]
readsPrec :: Int -> ReadS VoiceRecordingConfiguration
$creadsPrec :: Int -> ReadS VoiceRecordingConfiguration
Prelude.Read, Int -> VoiceRecordingConfiguration -> ShowS
[VoiceRecordingConfiguration] -> ShowS
VoiceRecordingConfiguration -> String
(Int -> VoiceRecordingConfiguration -> ShowS)
-> (VoiceRecordingConfiguration -> String)
-> ([VoiceRecordingConfiguration] -> ShowS)
-> Show VoiceRecordingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VoiceRecordingConfiguration] -> ShowS
$cshowList :: [VoiceRecordingConfiguration] -> ShowS
show :: VoiceRecordingConfiguration -> String
$cshow :: VoiceRecordingConfiguration -> String
showsPrec :: Int -> VoiceRecordingConfiguration -> ShowS
$cshowsPrec :: Int -> VoiceRecordingConfiguration -> ShowS
Prelude.Show, (forall x.
 VoiceRecordingConfiguration -> Rep VoiceRecordingConfiguration x)
-> (forall x.
    Rep VoiceRecordingConfiguration x -> VoiceRecordingConfiguration)
-> Generic VoiceRecordingConfiguration
forall x.
Rep VoiceRecordingConfiguration x -> VoiceRecordingConfiguration
forall x.
VoiceRecordingConfiguration -> Rep VoiceRecordingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VoiceRecordingConfiguration x -> VoiceRecordingConfiguration
$cfrom :: forall x.
VoiceRecordingConfiguration -> Rep VoiceRecordingConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'VoiceRecordingConfiguration' 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:
--
-- 'voiceRecordingTrack', 'voiceRecordingConfiguration_voiceRecordingTrack' - Identifies which track is being recorded.
newVoiceRecordingConfiguration ::
  VoiceRecordingConfiguration
newVoiceRecordingConfiguration :: VoiceRecordingConfiguration
newVoiceRecordingConfiguration =
  VoiceRecordingConfiguration' :: Maybe VoiceRecordingTrack -> VoiceRecordingConfiguration
VoiceRecordingConfiguration'
    { $sel:voiceRecordingTrack:VoiceRecordingConfiguration' :: Maybe VoiceRecordingTrack
voiceRecordingTrack =
        Maybe VoiceRecordingTrack
forall a. Maybe a
Prelude.Nothing
    }

-- | Identifies which track is being recorded.
voiceRecordingConfiguration_voiceRecordingTrack :: Lens.Lens' VoiceRecordingConfiguration (Prelude.Maybe VoiceRecordingTrack)
voiceRecordingConfiguration_voiceRecordingTrack :: (Maybe VoiceRecordingTrack -> f (Maybe VoiceRecordingTrack))
-> VoiceRecordingConfiguration -> f VoiceRecordingConfiguration
voiceRecordingConfiguration_voiceRecordingTrack = (VoiceRecordingConfiguration -> Maybe VoiceRecordingTrack)
-> (VoiceRecordingConfiguration
    -> Maybe VoiceRecordingTrack -> VoiceRecordingConfiguration)
-> Lens
     VoiceRecordingConfiguration
     VoiceRecordingConfiguration
     (Maybe VoiceRecordingTrack)
     (Maybe VoiceRecordingTrack)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VoiceRecordingConfiguration' {Maybe VoiceRecordingTrack
voiceRecordingTrack :: Maybe VoiceRecordingTrack
$sel:voiceRecordingTrack:VoiceRecordingConfiguration' :: VoiceRecordingConfiguration -> Maybe VoiceRecordingTrack
voiceRecordingTrack} -> Maybe VoiceRecordingTrack
voiceRecordingTrack) (\s :: VoiceRecordingConfiguration
s@VoiceRecordingConfiguration' {} Maybe VoiceRecordingTrack
a -> VoiceRecordingConfiguration
s {$sel:voiceRecordingTrack:VoiceRecordingConfiguration' :: Maybe VoiceRecordingTrack
voiceRecordingTrack = Maybe VoiceRecordingTrack
a} :: VoiceRecordingConfiguration)

instance Prelude.Hashable VoiceRecordingConfiguration

instance Prelude.NFData VoiceRecordingConfiguration

instance Core.ToJSON VoiceRecordingConfiguration where
  toJSON :: VoiceRecordingConfiguration -> Value
toJSON VoiceRecordingConfiguration' {Maybe VoiceRecordingTrack
voiceRecordingTrack :: Maybe VoiceRecordingTrack
$sel:voiceRecordingTrack:VoiceRecordingConfiguration' :: VoiceRecordingConfiguration -> Maybe VoiceRecordingTrack
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"VoiceRecordingTrack" Text -> VoiceRecordingTrack -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (VoiceRecordingTrack -> Pair)
-> Maybe VoiceRecordingTrack -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VoiceRecordingTrack
voiceRecordingTrack
          ]
      )