{-# 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.ConversationLogsRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LexModels.Types.LogSettingsRequest
import qualified Amazonka.Prelude as Prelude
data ConversationLogsRequest = ConversationLogsRequest'
{
ConversationLogsRequest -> [LogSettingsRequest]
logSettings :: [LogSettingsRequest],
ConversationLogsRequest -> Text
iamRoleArn :: Prelude.Text
}
deriving (ConversationLogsRequest -> ConversationLogsRequest -> Bool
(ConversationLogsRequest -> ConversationLogsRequest -> Bool)
-> (ConversationLogsRequest -> ConversationLogsRequest -> Bool)
-> Eq ConversationLogsRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConversationLogsRequest -> ConversationLogsRequest -> Bool
$c/= :: ConversationLogsRequest -> ConversationLogsRequest -> Bool
== :: ConversationLogsRequest -> ConversationLogsRequest -> Bool
$c== :: ConversationLogsRequest -> ConversationLogsRequest -> Bool
Prelude.Eq, ReadPrec [ConversationLogsRequest]
ReadPrec ConversationLogsRequest
Int -> ReadS ConversationLogsRequest
ReadS [ConversationLogsRequest]
(Int -> ReadS ConversationLogsRequest)
-> ReadS [ConversationLogsRequest]
-> ReadPrec ConversationLogsRequest
-> ReadPrec [ConversationLogsRequest]
-> Read ConversationLogsRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConversationLogsRequest]
$creadListPrec :: ReadPrec [ConversationLogsRequest]
readPrec :: ReadPrec ConversationLogsRequest
$creadPrec :: ReadPrec ConversationLogsRequest
readList :: ReadS [ConversationLogsRequest]
$creadList :: ReadS [ConversationLogsRequest]
readsPrec :: Int -> ReadS ConversationLogsRequest
$creadsPrec :: Int -> ReadS ConversationLogsRequest
Prelude.Read, Int -> ConversationLogsRequest -> ShowS
[ConversationLogsRequest] -> ShowS
ConversationLogsRequest -> String
(Int -> ConversationLogsRequest -> ShowS)
-> (ConversationLogsRequest -> String)
-> ([ConversationLogsRequest] -> ShowS)
-> Show ConversationLogsRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConversationLogsRequest] -> ShowS
$cshowList :: [ConversationLogsRequest] -> ShowS
show :: ConversationLogsRequest -> String
$cshow :: ConversationLogsRequest -> String
showsPrec :: Int -> ConversationLogsRequest -> ShowS
$cshowsPrec :: Int -> ConversationLogsRequest -> ShowS
Prelude.Show, (forall x.
ConversationLogsRequest -> Rep ConversationLogsRequest x)
-> (forall x.
Rep ConversationLogsRequest x -> ConversationLogsRequest)
-> Generic ConversationLogsRequest
forall x. Rep ConversationLogsRequest x -> ConversationLogsRequest
forall x. ConversationLogsRequest -> Rep ConversationLogsRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConversationLogsRequest x -> ConversationLogsRequest
$cfrom :: forall x. ConversationLogsRequest -> Rep ConversationLogsRequest x
Prelude.Generic)
newConversationLogsRequest ::
Prelude.Text ->
ConversationLogsRequest
newConversationLogsRequest :: Text -> ConversationLogsRequest
newConversationLogsRequest Text
pIamRoleArn_ =
ConversationLogsRequest' :: [LogSettingsRequest] -> Text -> ConversationLogsRequest
ConversationLogsRequest'
{ $sel:logSettings:ConversationLogsRequest' :: [LogSettingsRequest]
logSettings =
[LogSettingsRequest]
forall a. Monoid a => a
Prelude.mempty,
$sel:iamRoleArn:ConversationLogsRequest' :: Text
iamRoleArn = Text
pIamRoleArn_
}
conversationLogsRequest_logSettings :: Lens.Lens' ConversationLogsRequest [LogSettingsRequest]
conversationLogsRequest_logSettings :: ([LogSettingsRequest] -> f [LogSettingsRequest])
-> ConversationLogsRequest -> f ConversationLogsRequest
conversationLogsRequest_logSettings = (ConversationLogsRequest -> [LogSettingsRequest])
-> (ConversationLogsRequest
-> [LogSettingsRequest] -> ConversationLogsRequest)
-> Lens
ConversationLogsRequest
ConversationLogsRequest
[LogSettingsRequest]
[LogSettingsRequest]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConversationLogsRequest' {[LogSettingsRequest]
logSettings :: [LogSettingsRequest]
$sel:logSettings:ConversationLogsRequest' :: ConversationLogsRequest -> [LogSettingsRequest]
logSettings} -> [LogSettingsRequest]
logSettings) (\s :: ConversationLogsRequest
s@ConversationLogsRequest' {} [LogSettingsRequest]
a -> ConversationLogsRequest
s {$sel:logSettings:ConversationLogsRequest' :: [LogSettingsRequest]
logSettings = [LogSettingsRequest]
a} :: ConversationLogsRequest) (([LogSettingsRequest] -> f [LogSettingsRequest])
-> ConversationLogsRequest -> f ConversationLogsRequest)
-> (([LogSettingsRequest] -> f [LogSettingsRequest])
-> [LogSettingsRequest] -> f [LogSettingsRequest])
-> ([LogSettingsRequest] -> f [LogSettingsRequest])
-> ConversationLogsRequest
-> f ConversationLogsRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([LogSettingsRequest] -> f [LogSettingsRequest])
-> [LogSettingsRequest] -> f [LogSettingsRequest]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
conversationLogsRequest_iamRoleArn :: Lens.Lens' ConversationLogsRequest Prelude.Text
conversationLogsRequest_iamRoleArn :: (Text -> f Text)
-> ConversationLogsRequest -> f ConversationLogsRequest
conversationLogsRequest_iamRoleArn = (ConversationLogsRequest -> Text)
-> (ConversationLogsRequest -> Text -> ConversationLogsRequest)
-> Lens ConversationLogsRequest ConversationLogsRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConversationLogsRequest' {Text
iamRoleArn :: Text
$sel:iamRoleArn:ConversationLogsRequest' :: ConversationLogsRequest -> Text
iamRoleArn} -> Text
iamRoleArn) (\s :: ConversationLogsRequest
s@ConversationLogsRequest' {} Text
a -> ConversationLogsRequest
s {$sel:iamRoleArn:ConversationLogsRequest' :: Text
iamRoleArn = Text
a} :: ConversationLogsRequest)
instance Prelude.Hashable ConversationLogsRequest
instance Prelude.NFData ConversationLogsRequest
instance Core.ToJSON ConversationLogsRequest where
toJSON :: ConversationLogsRequest -> Value
toJSON ConversationLogsRequest' {[LogSettingsRequest]
Text
iamRoleArn :: Text
logSettings :: [LogSettingsRequest]
$sel:iamRoleArn:ConversationLogsRequest' :: ConversationLogsRequest -> Text
$sel:logSettings:ConversationLogsRequest' :: ConversationLogsRequest -> [LogSettingsRequest]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"logSettings" Text -> [LogSettingsRequest] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [LogSettingsRequest]
logSettings),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"iamRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
iamRoleArn)
]
)