{-# 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.GuardDuty.Types.HostPath where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data HostPath = HostPath'
{
HostPath -> Maybe Text
path :: Prelude.Maybe Prelude.Text
}
deriving (HostPath -> HostPath -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HostPath -> HostPath -> Bool
$c/= :: HostPath -> HostPath -> Bool
== :: HostPath -> HostPath -> Bool
$c== :: HostPath -> HostPath -> Bool
Prelude.Eq, ReadPrec [HostPath]
ReadPrec HostPath
Int -> ReadS HostPath
ReadS [HostPath]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HostPath]
$creadListPrec :: ReadPrec [HostPath]
readPrec :: ReadPrec HostPath
$creadPrec :: ReadPrec HostPath
readList :: ReadS [HostPath]
$creadList :: ReadS [HostPath]
readsPrec :: Int -> ReadS HostPath
$creadsPrec :: Int -> ReadS HostPath
Prelude.Read, Int -> HostPath -> ShowS
[HostPath] -> ShowS
HostPath -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HostPath] -> ShowS
$cshowList :: [HostPath] -> ShowS
show :: HostPath -> String
$cshow :: HostPath -> String
showsPrec :: Int -> HostPath -> ShowS
$cshowsPrec :: Int -> HostPath -> ShowS
Prelude.Show, forall x. Rep HostPath x -> HostPath
forall x. HostPath -> Rep HostPath x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HostPath x -> HostPath
$cfrom :: forall x. HostPath -> Rep HostPath x
Prelude.Generic)
newHostPath ::
HostPath
newHostPath :: HostPath
newHostPath = HostPath' {$sel:path:HostPath' :: Maybe Text
path = forall a. Maybe a
Prelude.Nothing}
hostPath_path :: Lens.Lens' HostPath (Prelude.Maybe Prelude.Text)
hostPath_path :: Lens' HostPath (Maybe Text)
hostPath_path = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HostPath' {Maybe Text
path :: Maybe Text
$sel:path:HostPath' :: HostPath -> Maybe Text
path} -> Maybe Text
path) (\s :: HostPath
s@HostPath' {} Maybe Text
a -> HostPath
s {$sel:path:HostPath' :: Maybe Text
path = Maybe Text
a} :: HostPath)
instance Data.FromJSON HostPath where
parseJSON :: Value -> Parser HostPath
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"HostPath"
(\Object
x -> Maybe Text -> HostPath
HostPath' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"path"))
instance Prelude.Hashable HostPath where
hashWithSalt :: Int -> HostPath -> Int
hashWithSalt Int
_salt HostPath' {Maybe Text
path :: Maybe Text
$sel:path:HostPath' :: HostPath -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
path
instance Prelude.NFData HostPath where
rnf :: HostPath -> ()
rnf HostPath' {Maybe Text
path :: Maybe Text
$sel:path:HostPath' :: HostPath -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
path