{-# 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.AppMesh.Types.FileAccessLog where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FileAccessLog = FileAccessLog'
{
FileAccessLog -> Text
path :: Prelude.Text
}
deriving (FileAccessLog -> FileAccessLog -> Bool
(FileAccessLog -> FileAccessLog -> Bool)
-> (FileAccessLog -> FileAccessLog -> Bool) -> Eq FileAccessLog
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileAccessLog -> FileAccessLog -> Bool
$c/= :: FileAccessLog -> FileAccessLog -> Bool
== :: FileAccessLog -> FileAccessLog -> Bool
$c== :: FileAccessLog -> FileAccessLog -> Bool
Prelude.Eq, ReadPrec [FileAccessLog]
ReadPrec FileAccessLog
Int -> ReadS FileAccessLog
ReadS [FileAccessLog]
(Int -> ReadS FileAccessLog)
-> ReadS [FileAccessLog]
-> ReadPrec FileAccessLog
-> ReadPrec [FileAccessLog]
-> Read FileAccessLog
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FileAccessLog]
$creadListPrec :: ReadPrec [FileAccessLog]
readPrec :: ReadPrec FileAccessLog
$creadPrec :: ReadPrec FileAccessLog
readList :: ReadS [FileAccessLog]
$creadList :: ReadS [FileAccessLog]
readsPrec :: Int -> ReadS FileAccessLog
$creadsPrec :: Int -> ReadS FileAccessLog
Prelude.Read, Int -> FileAccessLog -> ShowS
[FileAccessLog] -> ShowS
FileAccessLog -> String
(Int -> FileAccessLog -> ShowS)
-> (FileAccessLog -> String)
-> ([FileAccessLog] -> ShowS)
-> Show FileAccessLog
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FileAccessLog] -> ShowS
$cshowList :: [FileAccessLog] -> ShowS
show :: FileAccessLog -> String
$cshow :: FileAccessLog -> String
showsPrec :: Int -> FileAccessLog -> ShowS
$cshowsPrec :: Int -> FileAccessLog -> ShowS
Prelude.Show, (forall x. FileAccessLog -> Rep FileAccessLog x)
-> (forall x. Rep FileAccessLog x -> FileAccessLog)
-> Generic FileAccessLog
forall x. Rep FileAccessLog x -> FileAccessLog
forall x. FileAccessLog -> Rep FileAccessLog x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FileAccessLog x -> FileAccessLog
$cfrom :: forall x. FileAccessLog -> Rep FileAccessLog x
Prelude.Generic)
newFileAccessLog ::
Prelude.Text ->
FileAccessLog
newFileAccessLog :: Text -> FileAccessLog
newFileAccessLog Text
pPath_ =
FileAccessLog' :: Text -> FileAccessLog
FileAccessLog' {$sel:path:FileAccessLog' :: Text
path = Text
pPath_}
fileAccessLog_path :: Lens.Lens' FileAccessLog Prelude.Text
fileAccessLog_path :: (Text -> f Text) -> FileAccessLog -> f FileAccessLog
fileAccessLog_path = (FileAccessLog -> Text)
-> (FileAccessLog -> Text -> FileAccessLog)
-> Lens FileAccessLog FileAccessLog Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileAccessLog' {Text
path :: Text
$sel:path:FileAccessLog' :: FileAccessLog -> Text
path} -> Text
path) (\s :: FileAccessLog
s@FileAccessLog' {} Text
a -> FileAccessLog
s {$sel:path:FileAccessLog' :: Text
path = Text
a} :: FileAccessLog)
instance Core.FromJSON FileAccessLog where
parseJSON :: Value -> Parser FileAccessLog
parseJSON =
String
-> (Object -> Parser FileAccessLog)
-> Value
-> Parser FileAccessLog
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FileAccessLog"
( \Object
x ->
Text -> FileAccessLog
FileAccessLog' (Text -> FileAccessLog) -> Parser Text -> Parser FileAccessLog
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"path")
)
instance Prelude.Hashable FileAccessLog
instance Prelude.NFData FileAccessLog
instance Core.ToJSON FileAccessLog where
toJSON :: FileAccessLog -> Value
toJSON FileAccessLog' {Text
path :: Text
$sel:path:FileAccessLog' :: FileAccessLog -> Text
..} =
[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
"path" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
path)]
)