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