{-# 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 #-}
module Amazonka.LexV2Models.Types.TranscriptSourceSetting where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LexV2Models.Types.S3BucketTranscriptSource
import qualified Amazonka.Prelude as Prelude
data TranscriptSourceSetting = TranscriptSourceSetting'
{
TranscriptSourceSetting -> Maybe S3BucketTranscriptSource
s3BucketTranscriptSource :: Prelude.Maybe S3BucketTranscriptSource
}
deriving (TranscriptSourceSetting -> TranscriptSourceSetting -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TranscriptSourceSetting -> TranscriptSourceSetting -> Bool
$c/= :: TranscriptSourceSetting -> TranscriptSourceSetting -> Bool
== :: TranscriptSourceSetting -> TranscriptSourceSetting -> Bool
$c== :: TranscriptSourceSetting -> TranscriptSourceSetting -> Bool
Prelude.Eq, ReadPrec [TranscriptSourceSetting]
ReadPrec TranscriptSourceSetting
Int -> ReadS TranscriptSourceSetting
ReadS [TranscriptSourceSetting]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TranscriptSourceSetting]
$creadListPrec :: ReadPrec [TranscriptSourceSetting]
readPrec :: ReadPrec TranscriptSourceSetting
$creadPrec :: ReadPrec TranscriptSourceSetting
readList :: ReadS [TranscriptSourceSetting]
$creadList :: ReadS [TranscriptSourceSetting]
readsPrec :: Int -> ReadS TranscriptSourceSetting
$creadsPrec :: Int -> ReadS TranscriptSourceSetting
Prelude.Read, Int -> TranscriptSourceSetting -> ShowS
[TranscriptSourceSetting] -> ShowS
TranscriptSourceSetting -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TranscriptSourceSetting] -> ShowS
$cshowList :: [TranscriptSourceSetting] -> ShowS
show :: TranscriptSourceSetting -> String
$cshow :: TranscriptSourceSetting -> String
showsPrec :: Int -> TranscriptSourceSetting -> ShowS
$cshowsPrec :: Int -> TranscriptSourceSetting -> ShowS
Prelude.Show, forall x. Rep TranscriptSourceSetting x -> TranscriptSourceSetting
forall x. TranscriptSourceSetting -> Rep TranscriptSourceSetting x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TranscriptSourceSetting x -> TranscriptSourceSetting
$cfrom :: forall x. TranscriptSourceSetting -> Rep TranscriptSourceSetting x
Prelude.Generic)
newTranscriptSourceSetting ::
TranscriptSourceSetting
newTranscriptSourceSetting :: TranscriptSourceSetting
newTranscriptSourceSetting =
TranscriptSourceSetting'
{ $sel:s3BucketTranscriptSource:TranscriptSourceSetting' :: Maybe S3BucketTranscriptSource
s3BucketTranscriptSource =
forall a. Maybe a
Prelude.Nothing
}
transcriptSourceSetting_s3BucketTranscriptSource :: Lens.Lens' TranscriptSourceSetting (Prelude.Maybe S3BucketTranscriptSource)
transcriptSourceSetting_s3BucketTranscriptSource :: Lens' TranscriptSourceSetting (Maybe S3BucketTranscriptSource)
transcriptSourceSetting_s3BucketTranscriptSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptSourceSetting' {Maybe S3BucketTranscriptSource
s3BucketTranscriptSource :: Maybe S3BucketTranscriptSource
$sel:s3BucketTranscriptSource:TranscriptSourceSetting' :: TranscriptSourceSetting -> Maybe S3BucketTranscriptSource
s3BucketTranscriptSource} -> Maybe S3BucketTranscriptSource
s3BucketTranscriptSource) (\s :: TranscriptSourceSetting
s@TranscriptSourceSetting' {} Maybe S3BucketTranscriptSource
a -> TranscriptSourceSetting
s {$sel:s3BucketTranscriptSource:TranscriptSourceSetting' :: Maybe S3BucketTranscriptSource
s3BucketTranscriptSource = Maybe S3BucketTranscriptSource
a} :: TranscriptSourceSetting)
instance Data.FromJSON TranscriptSourceSetting where
parseJSON :: Value -> Parser TranscriptSourceSetting
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TranscriptSourceSetting"
( \Object
x ->
Maybe S3BucketTranscriptSource -> TranscriptSourceSetting
TranscriptSourceSetting'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"s3BucketTranscriptSource")
)
instance Prelude.Hashable TranscriptSourceSetting where
hashWithSalt :: Int -> TranscriptSourceSetting -> Int
hashWithSalt Int
_salt TranscriptSourceSetting' {Maybe S3BucketTranscriptSource
s3BucketTranscriptSource :: Maybe S3BucketTranscriptSource
$sel:s3BucketTranscriptSource:TranscriptSourceSetting' :: TranscriptSourceSetting -> Maybe S3BucketTranscriptSource
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3BucketTranscriptSource
s3BucketTranscriptSource
instance Prelude.NFData TranscriptSourceSetting where
rnf :: TranscriptSourceSetting -> ()
rnf TranscriptSourceSetting' {Maybe S3BucketTranscriptSource
s3BucketTranscriptSource :: Maybe S3BucketTranscriptSource
$sel:s3BucketTranscriptSource:TranscriptSourceSetting' :: TranscriptSourceSetting -> Maybe S3BucketTranscriptSource
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe S3BucketTranscriptSource
s3BucketTranscriptSource
instance Data.ToJSON TranscriptSourceSetting where
toJSON :: TranscriptSourceSetting -> Value
toJSON TranscriptSourceSetting' {Maybe S3BucketTranscriptSource
s3BucketTranscriptSource :: Maybe S3BucketTranscriptSource
$sel:s3BucketTranscriptSource:TranscriptSourceSetting' :: TranscriptSourceSetting -> Maybe S3BucketTranscriptSource
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"s3BucketTranscriptSource" 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 S3BucketTranscriptSource
s3BucketTranscriptSource
]
)