{-# 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.LogSettingsResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LexModels.Types.Destination
import Amazonka.LexModels.Types.LogType
import qualified Amazonka.Prelude as Prelude
data LogSettingsResponse = LogSettingsResponse'
{
LogSettingsResponse -> Maybe Destination
destination :: Prelude.Maybe Destination,
LogSettingsResponse -> Maybe Text
kmsKeyArn :: Prelude.Maybe Prelude.Text,
LogSettingsResponse -> Maybe LogType
logType :: Prelude.Maybe LogType,
LogSettingsResponse -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
LogSettingsResponse -> Maybe Text
resourcePrefix :: Prelude.Maybe Prelude.Text
}
deriving (LogSettingsResponse -> LogSettingsResponse -> Bool
(LogSettingsResponse -> LogSettingsResponse -> Bool)
-> (LogSettingsResponse -> LogSettingsResponse -> Bool)
-> Eq LogSettingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LogSettingsResponse -> LogSettingsResponse -> Bool
$c/= :: LogSettingsResponse -> LogSettingsResponse -> Bool
== :: LogSettingsResponse -> LogSettingsResponse -> Bool
$c== :: LogSettingsResponse -> LogSettingsResponse -> Bool
Prelude.Eq, ReadPrec [LogSettingsResponse]
ReadPrec LogSettingsResponse
Int -> ReadS LogSettingsResponse
ReadS [LogSettingsResponse]
(Int -> ReadS LogSettingsResponse)
-> ReadS [LogSettingsResponse]
-> ReadPrec LogSettingsResponse
-> ReadPrec [LogSettingsResponse]
-> Read LogSettingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LogSettingsResponse]
$creadListPrec :: ReadPrec [LogSettingsResponse]
readPrec :: ReadPrec LogSettingsResponse
$creadPrec :: ReadPrec LogSettingsResponse
readList :: ReadS [LogSettingsResponse]
$creadList :: ReadS [LogSettingsResponse]
readsPrec :: Int -> ReadS LogSettingsResponse
$creadsPrec :: Int -> ReadS LogSettingsResponse
Prelude.Read, Int -> LogSettingsResponse -> ShowS
[LogSettingsResponse] -> ShowS
LogSettingsResponse -> String
(Int -> LogSettingsResponse -> ShowS)
-> (LogSettingsResponse -> String)
-> ([LogSettingsResponse] -> ShowS)
-> Show LogSettingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LogSettingsResponse] -> ShowS
$cshowList :: [LogSettingsResponse] -> ShowS
show :: LogSettingsResponse -> String
$cshow :: LogSettingsResponse -> String
showsPrec :: Int -> LogSettingsResponse -> ShowS
$cshowsPrec :: Int -> LogSettingsResponse -> ShowS
Prelude.Show, (forall x. LogSettingsResponse -> Rep LogSettingsResponse x)
-> (forall x. Rep LogSettingsResponse x -> LogSettingsResponse)
-> Generic LogSettingsResponse
forall x. Rep LogSettingsResponse x -> LogSettingsResponse
forall x. LogSettingsResponse -> Rep LogSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LogSettingsResponse x -> LogSettingsResponse
$cfrom :: forall x. LogSettingsResponse -> Rep LogSettingsResponse x
Prelude.Generic)
newLogSettingsResponse ::
LogSettingsResponse
newLogSettingsResponse :: LogSettingsResponse
newLogSettingsResponse =
LogSettingsResponse' :: Maybe Destination
-> Maybe Text
-> Maybe LogType
-> Maybe Text
-> Maybe Text
-> LogSettingsResponse
LogSettingsResponse'
{ $sel:destination:LogSettingsResponse' :: Maybe Destination
destination = Maybe Destination
forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyArn:LogSettingsResponse' :: Maybe Text
kmsKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:logType:LogSettingsResponse' :: Maybe LogType
logType = Maybe LogType
forall a. Maybe a
Prelude.Nothing,
$sel:resourceArn:LogSettingsResponse' :: Maybe Text
resourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourcePrefix:LogSettingsResponse' :: Maybe Text
resourcePrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
logSettingsResponse_destination :: Lens.Lens' LogSettingsResponse (Prelude.Maybe Destination)
logSettingsResponse_destination :: (Maybe Destination -> f (Maybe Destination))
-> LogSettingsResponse -> f LogSettingsResponse
logSettingsResponse_destination = (LogSettingsResponse -> Maybe Destination)
-> (LogSettingsResponse
-> Maybe Destination -> LogSettingsResponse)
-> Lens
LogSettingsResponse
LogSettingsResponse
(Maybe Destination)
(Maybe Destination)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogSettingsResponse' {Maybe Destination
destination :: Maybe Destination
$sel:destination:LogSettingsResponse' :: LogSettingsResponse -> Maybe Destination
destination} -> Maybe Destination
destination) (\s :: LogSettingsResponse
s@LogSettingsResponse' {} Maybe Destination
a -> LogSettingsResponse
s {$sel:destination:LogSettingsResponse' :: Maybe Destination
destination = Maybe Destination
a} :: LogSettingsResponse)
logSettingsResponse_kmsKeyArn :: Lens.Lens' LogSettingsResponse (Prelude.Maybe Prelude.Text)
logSettingsResponse_kmsKeyArn :: (Maybe Text -> f (Maybe Text))
-> LogSettingsResponse -> f LogSettingsResponse
logSettingsResponse_kmsKeyArn = (LogSettingsResponse -> Maybe Text)
-> (LogSettingsResponse -> Maybe Text -> LogSettingsResponse)
-> Lens
LogSettingsResponse LogSettingsResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogSettingsResponse' {Maybe Text
kmsKeyArn :: Maybe Text
$sel:kmsKeyArn:LogSettingsResponse' :: LogSettingsResponse -> Maybe Text
kmsKeyArn} -> Maybe Text
kmsKeyArn) (\s :: LogSettingsResponse
s@LogSettingsResponse' {} Maybe Text
a -> LogSettingsResponse
s {$sel:kmsKeyArn:LogSettingsResponse' :: Maybe Text
kmsKeyArn = Maybe Text
a} :: LogSettingsResponse)
logSettingsResponse_logType :: Lens.Lens' LogSettingsResponse (Prelude.Maybe LogType)
logSettingsResponse_logType :: (Maybe LogType -> f (Maybe LogType))
-> LogSettingsResponse -> f LogSettingsResponse
logSettingsResponse_logType = (LogSettingsResponse -> Maybe LogType)
-> (LogSettingsResponse -> Maybe LogType -> LogSettingsResponse)
-> Lens
LogSettingsResponse
LogSettingsResponse
(Maybe LogType)
(Maybe LogType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogSettingsResponse' {Maybe LogType
logType :: Maybe LogType
$sel:logType:LogSettingsResponse' :: LogSettingsResponse -> Maybe LogType
logType} -> Maybe LogType
logType) (\s :: LogSettingsResponse
s@LogSettingsResponse' {} Maybe LogType
a -> LogSettingsResponse
s {$sel:logType:LogSettingsResponse' :: Maybe LogType
logType = Maybe LogType
a} :: LogSettingsResponse)
logSettingsResponse_resourceArn :: Lens.Lens' LogSettingsResponse (Prelude.Maybe Prelude.Text)
logSettingsResponse_resourceArn :: (Maybe Text -> f (Maybe Text))
-> LogSettingsResponse -> f LogSettingsResponse
logSettingsResponse_resourceArn = (LogSettingsResponse -> Maybe Text)
-> (LogSettingsResponse -> Maybe Text -> LogSettingsResponse)
-> Lens
LogSettingsResponse LogSettingsResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogSettingsResponse' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:LogSettingsResponse' :: LogSettingsResponse -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: LogSettingsResponse
s@LogSettingsResponse' {} Maybe Text
a -> LogSettingsResponse
s {$sel:resourceArn:LogSettingsResponse' :: Maybe Text
resourceArn = Maybe Text
a} :: LogSettingsResponse)
logSettingsResponse_resourcePrefix :: Lens.Lens' LogSettingsResponse (Prelude.Maybe Prelude.Text)
logSettingsResponse_resourcePrefix :: (Maybe Text -> f (Maybe Text))
-> LogSettingsResponse -> f LogSettingsResponse
logSettingsResponse_resourcePrefix = (LogSettingsResponse -> Maybe Text)
-> (LogSettingsResponse -> Maybe Text -> LogSettingsResponse)
-> Lens
LogSettingsResponse LogSettingsResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogSettingsResponse' {Maybe Text
resourcePrefix :: Maybe Text
$sel:resourcePrefix:LogSettingsResponse' :: LogSettingsResponse -> Maybe Text
resourcePrefix} -> Maybe Text
resourcePrefix) (\s :: LogSettingsResponse
s@LogSettingsResponse' {} Maybe Text
a -> LogSettingsResponse
s {$sel:resourcePrefix:LogSettingsResponse' :: Maybe Text
resourcePrefix = Maybe Text
a} :: LogSettingsResponse)
instance Core.FromJSON LogSettingsResponse where
parseJSON :: Value -> Parser LogSettingsResponse
parseJSON =
String
-> (Object -> Parser LogSettingsResponse)
-> Value
-> Parser LogSettingsResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LogSettingsResponse"
( \Object
x ->
Maybe Destination
-> Maybe Text
-> Maybe LogType
-> Maybe Text
-> Maybe Text
-> LogSettingsResponse
LogSettingsResponse'
(Maybe Destination
-> Maybe Text
-> Maybe LogType
-> Maybe Text
-> Maybe Text
-> LogSettingsResponse)
-> Parser (Maybe Destination)
-> Parser
(Maybe Text
-> Maybe LogType
-> Maybe Text
-> Maybe Text
-> LogSettingsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Destination)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"destination")
Parser
(Maybe Text
-> Maybe LogType
-> Maybe Text
-> Maybe Text
-> LogSettingsResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe LogType -> Maybe Text -> Maybe Text -> LogSettingsResponse)
forall (f :: * -> *) a b. Applicative f => 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
"kmsKeyArn")
Parser
(Maybe LogType -> Maybe Text -> Maybe Text -> LogSettingsResponse)
-> Parser (Maybe LogType)
-> Parser (Maybe Text -> Maybe Text -> LogSettingsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LogType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"logType")
Parser (Maybe Text -> Maybe Text -> LogSettingsResponse)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> LogSettingsResponse)
forall (f :: * -> *) a b. Applicative f => 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
"resourceArn")
Parser (Maybe Text -> LogSettingsResponse)
-> Parser (Maybe Text) -> Parser LogSettingsResponse
forall (f :: * -> *) a b. Applicative f => 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
"resourcePrefix")
)
instance Prelude.Hashable LogSettingsResponse
instance Prelude.NFData LogSettingsResponse