{-# 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.LexModels.Types.ConversationLogsResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LexModels.Types.LogSettingsResponse
import qualified Amazonka.Prelude as Prelude
data ConversationLogsResponse = ConversationLogsResponse'
{
ConversationLogsResponse -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text,
ConversationLogsResponse -> Maybe [LogSettingsResponse]
logSettings :: Prelude.Maybe [LogSettingsResponse]
}
deriving (ConversationLogsResponse -> ConversationLogsResponse -> Bool
(ConversationLogsResponse -> ConversationLogsResponse -> Bool)
-> (ConversationLogsResponse -> ConversationLogsResponse -> Bool)
-> Eq ConversationLogsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConversationLogsResponse -> ConversationLogsResponse -> Bool
$c/= :: ConversationLogsResponse -> ConversationLogsResponse -> Bool
== :: ConversationLogsResponse -> ConversationLogsResponse -> Bool
$c== :: ConversationLogsResponse -> ConversationLogsResponse -> Bool
Prelude.Eq, ReadPrec [ConversationLogsResponse]
ReadPrec ConversationLogsResponse
Int -> ReadS ConversationLogsResponse
ReadS [ConversationLogsResponse]
(Int -> ReadS ConversationLogsResponse)
-> ReadS [ConversationLogsResponse]
-> ReadPrec ConversationLogsResponse
-> ReadPrec [ConversationLogsResponse]
-> Read ConversationLogsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConversationLogsResponse]
$creadListPrec :: ReadPrec [ConversationLogsResponse]
readPrec :: ReadPrec ConversationLogsResponse
$creadPrec :: ReadPrec ConversationLogsResponse
readList :: ReadS [ConversationLogsResponse]
$creadList :: ReadS [ConversationLogsResponse]
readsPrec :: Int -> ReadS ConversationLogsResponse
$creadsPrec :: Int -> ReadS ConversationLogsResponse
Prelude.Read, Int -> ConversationLogsResponse -> ShowS
[ConversationLogsResponse] -> ShowS
ConversationLogsResponse -> String
(Int -> ConversationLogsResponse -> ShowS)
-> (ConversationLogsResponse -> String)
-> ([ConversationLogsResponse] -> ShowS)
-> Show ConversationLogsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConversationLogsResponse] -> ShowS
$cshowList :: [ConversationLogsResponse] -> ShowS
show :: ConversationLogsResponse -> String
$cshow :: ConversationLogsResponse -> String
showsPrec :: Int -> ConversationLogsResponse -> ShowS
$cshowsPrec :: Int -> ConversationLogsResponse -> ShowS
Prelude.Show, (forall x.
ConversationLogsResponse -> Rep ConversationLogsResponse x)
-> (forall x.
Rep ConversationLogsResponse x -> ConversationLogsResponse)
-> Generic ConversationLogsResponse
forall x.
Rep ConversationLogsResponse x -> ConversationLogsResponse
forall x.
ConversationLogsResponse -> Rep ConversationLogsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConversationLogsResponse x -> ConversationLogsResponse
$cfrom :: forall x.
ConversationLogsResponse -> Rep ConversationLogsResponse x
Prelude.Generic)
newConversationLogsResponse ::
ConversationLogsResponse
newConversationLogsResponse :: ConversationLogsResponse
newConversationLogsResponse =
ConversationLogsResponse' :: Maybe Text
-> Maybe [LogSettingsResponse] -> ConversationLogsResponse
ConversationLogsResponse'
{ $sel:iamRoleArn:ConversationLogsResponse' :: Maybe Text
iamRoleArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:logSettings:ConversationLogsResponse' :: Maybe [LogSettingsResponse]
logSettings = Maybe [LogSettingsResponse]
forall a. Maybe a
Prelude.Nothing
}
conversationLogsResponse_iamRoleArn :: Lens.Lens' ConversationLogsResponse (Prelude.Maybe Prelude.Text)
conversationLogsResponse_iamRoleArn :: (Maybe Text -> f (Maybe Text))
-> ConversationLogsResponse -> f ConversationLogsResponse
conversationLogsResponse_iamRoleArn = (ConversationLogsResponse -> Maybe Text)
-> (ConversationLogsResponse
-> Maybe Text -> ConversationLogsResponse)
-> Lens
ConversationLogsResponse
ConversationLogsResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConversationLogsResponse' {Maybe Text
iamRoleArn :: Maybe Text
$sel:iamRoleArn:ConversationLogsResponse' :: ConversationLogsResponse -> Maybe Text
iamRoleArn} -> Maybe Text
iamRoleArn) (\s :: ConversationLogsResponse
s@ConversationLogsResponse' {} Maybe Text
a -> ConversationLogsResponse
s {$sel:iamRoleArn:ConversationLogsResponse' :: Maybe Text
iamRoleArn = Maybe Text
a} :: ConversationLogsResponse)
conversationLogsResponse_logSettings :: Lens.Lens' ConversationLogsResponse (Prelude.Maybe [LogSettingsResponse])
conversationLogsResponse_logSettings :: (Maybe [LogSettingsResponse] -> f (Maybe [LogSettingsResponse]))
-> ConversationLogsResponse -> f ConversationLogsResponse
conversationLogsResponse_logSettings = (ConversationLogsResponse -> Maybe [LogSettingsResponse])
-> (ConversationLogsResponse
-> Maybe [LogSettingsResponse] -> ConversationLogsResponse)
-> Lens
ConversationLogsResponse
ConversationLogsResponse
(Maybe [LogSettingsResponse])
(Maybe [LogSettingsResponse])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConversationLogsResponse' {Maybe [LogSettingsResponse]
logSettings :: Maybe [LogSettingsResponse]
$sel:logSettings:ConversationLogsResponse' :: ConversationLogsResponse -> Maybe [LogSettingsResponse]
logSettings} -> Maybe [LogSettingsResponse]
logSettings) (\s :: ConversationLogsResponse
s@ConversationLogsResponse' {} Maybe [LogSettingsResponse]
a -> ConversationLogsResponse
s {$sel:logSettings:ConversationLogsResponse' :: Maybe [LogSettingsResponse]
logSettings = Maybe [LogSettingsResponse]
a} :: ConversationLogsResponse) ((Maybe [LogSettingsResponse] -> f (Maybe [LogSettingsResponse]))
-> ConversationLogsResponse -> f ConversationLogsResponse)
-> ((Maybe [LogSettingsResponse]
-> f (Maybe [LogSettingsResponse]))
-> Maybe [LogSettingsResponse] -> f (Maybe [LogSettingsResponse]))
-> (Maybe [LogSettingsResponse] -> f (Maybe [LogSettingsResponse]))
-> ConversationLogsResponse
-> f ConversationLogsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[LogSettingsResponse]
[LogSettingsResponse]
[LogSettingsResponse]
[LogSettingsResponse]
-> Iso
(Maybe [LogSettingsResponse])
(Maybe [LogSettingsResponse])
(Maybe [LogSettingsResponse])
(Maybe [LogSettingsResponse])
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
[LogSettingsResponse]
[LogSettingsResponse]
[LogSettingsResponse]
[LogSettingsResponse]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON ConversationLogsResponse where
parseJSON :: Value -> Parser ConversationLogsResponse
parseJSON =
String
-> (Object -> Parser ConversationLogsResponse)
-> Value
-> Parser ConversationLogsResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConversationLogsResponse"
( \Object
x ->
Maybe Text
-> Maybe [LogSettingsResponse] -> ConversationLogsResponse
ConversationLogsResponse'
(Maybe Text
-> Maybe [LogSettingsResponse] -> ConversationLogsResponse)
-> Parser (Maybe Text)
-> Parser (Maybe [LogSettingsResponse] -> ConversationLogsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"iamRoleArn")
Parser (Maybe [LogSettingsResponse] -> ConversationLogsResponse)
-> Parser (Maybe [LogSettingsResponse])
-> Parser ConversationLogsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [LogSettingsResponse]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"logSettings" Parser (Maybe (Maybe [LogSettingsResponse]))
-> Maybe [LogSettingsResponse]
-> Parser (Maybe [LogSettingsResponse])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [LogSettingsResponse]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable ConversationLogsResponse
instance Prelude.NFData ConversationLogsResponse