{-# 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.EFS.Types.FileSystemPolicyDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FileSystemPolicyDescription = FileSystemPolicyDescription'
{
FileSystemPolicyDescription -> Maybe Text
fileSystemId :: Prelude.Maybe Prelude.Text,
FileSystemPolicyDescription -> Maybe Text
policy :: Prelude.Maybe Prelude.Text
}
deriving (FileSystemPolicyDescription -> FileSystemPolicyDescription -> Bool
(FileSystemPolicyDescription
-> FileSystemPolicyDescription -> Bool)
-> (FileSystemPolicyDescription
-> FileSystemPolicyDescription -> Bool)
-> Eq FileSystemPolicyDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileSystemPolicyDescription -> FileSystemPolicyDescription -> Bool
$c/= :: FileSystemPolicyDescription -> FileSystemPolicyDescription -> Bool
== :: FileSystemPolicyDescription -> FileSystemPolicyDescription -> Bool
$c== :: FileSystemPolicyDescription -> FileSystemPolicyDescription -> Bool
Prelude.Eq, ReadPrec [FileSystemPolicyDescription]
ReadPrec FileSystemPolicyDescription
Int -> ReadS FileSystemPolicyDescription
ReadS [FileSystemPolicyDescription]
(Int -> ReadS FileSystemPolicyDescription)
-> ReadS [FileSystemPolicyDescription]
-> ReadPrec FileSystemPolicyDescription
-> ReadPrec [FileSystemPolicyDescription]
-> Read FileSystemPolicyDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FileSystemPolicyDescription]
$creadListPrec :: ReadPrec [FileSystemPolicyDescription]
readPrec :: ReadPrec FileSystemPolicyDescription
$creadPrec :: ReadPrec FileSystemPolicyDescription
readList :: ReadS [FileSystemPolicyDescription]
$creadList :: ReadS [FileSystemPolicyDescription]
readsPrec :: Int -> ReadS FileSystemPolicyDescription
$creadsPrec :: Int -> ReadS FileSystemPolicyDescription
Prelude.Read, Int -> FileSystemPolicyDescription -> ShowS
[FileSystemPolicyDescription] -> ShowS
FileSystemPolicyDescription -> String
(Int -> FileSystemPolicyDescription -> ShowS)
-> (FileSystemPolicyDescription -> String)
-> ([FileSystemPolicyDescription] -> ShowS)
-> Show FileSystemPolicyDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FileSystemPolicyDescription] -> ShowS
$cshowList :: [FileSystemPolicyDescription] -> ShowS
show :: FileSystemPolicyDescription -> String
$cshow :: FileSystemPolicyDescription -> String
showsPrec :: Int -> FileSystemPolicyDescription -> ShowS
$cshowsPrec :: Int -> FileSystemPolicyDescription -> ShowS
Prelude.Show, (forall x.
FileSystemPolicyDescription -> Rep FileSystemPolicyDescription x)
-> (forall x.
Rep FileSystemPolicyDescription x -> FileSystemPolicyDescription)
-> Generic FileSystemPolicyDescription
forall x.
Rep FileSystemPolicyDescription x -> FileSystemPolicyDescription
forall x.
FileSystemPolicyDescription -> Rep FileSystemPolicyDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FileSystemPolicyDescription x -> FileSystemPolicyDescription
$cfrom :: forall x.
FileSystemPolicyDescription -> Rep FileSystemPolicyDescription x
Prelude.Generic)
newFileSystemPolicyDescription ::
FileSystemPolicyDescription
newFileSystemPolicyDescription :: FileSystemPolicyDescription
newFileSystemPolicyDescription =
FileSystemPolicyDescription' :: Maybe Text -> Maybe Text -> FileSystemPolicyDescription
FileSystemPolicyDescription'
{ $sel:fileSystemId:FileSystemPolicyDescription' :: Maybe Text
fileSystemId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policy:FileSystemPolicyDescription' :: Maybe Text
policy = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
fileSystemPolicyDescription_fileSystemId :: Lens.Lens' FileSystemPolicyDescription (Prelude.Maybe Prelude.Text)
fileSystemPolicyDescription_fileSystemId :: (Maybe Text -> f (Maybe Text))
-> FileSystemPolicyDescription -> f FileSystemPolicyDescription
fileSystemPolicyDescription_fileSystemId = (FileSystemPolicyDescription -> Maybe Text)
-> (FileSystemPolicyDescription
-> Maybe Text -> FileSystemPolicyDescription)
-> Lens
FileSystemPolicyDescription
FileSystemPolicyDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemPolicyDescription' {Maybe Text
fileSystemId :: Maybe Text
$sel:fileSystemId:FileSystemPolicyDescription' :: FileSystemPolicyDescription -> Maybe Text
fileSystemId} -> Maybe Text
fileSystemId) (\s :: FileSystemPolicyDescription
s@FileSystemPolicyDescription' {} Maybe Text
a -> FileSystemPolicyDescription
s {$sel:fileSystemId:FileSystemPolicyDescription' :: Maybe Text
fileSystemId = Maybe Text
a} :: FileSystemPolicyDescription)
fileSystemPolicyDescription_policy :: Lens.Lens' FileSystemPolicyDescription (Prelude.Maybe Prelude.Text)
fileSystemPolicyDescription_policy :: (Maybe Text -> f (Maybe Text))
-> FileSystemPolicyDescription -> f FileSystemPolicyDescription
fileSystemPolicyDescription_policy = (FileSystemPolicyDescription -> Maybe Text)
-> (FileSystemPolicyDescription
-> Maybe Text -> FileSystemPolicyDescription)
-> Lens
FileSystemPolicyDescription
FileSystemPolicyDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemPolicyDescription' {Maybe Text
policy :: Maybe Text
$sel:policy:FileSystemPolicyDescription' :: FileSystemPolicyDescription -> Maybe Text
policy} -> Maybe Text
policy) (\s :: FileSystemPolicyDescription
s@FileSystemPolicyDescription' {} Maybe Text
a -> FileSystemPolicyDescription
s {$sel:policy:FileSystemPolicyDescription' :: Maybe Text
policy = Maybe Text
a} :: FileSystemPolicyDescription)
instance Core.FromJSON FileSystemPolicyDescription where
parseJSON :: Value -> Parser FileSystemPolicyDescription
parseJSON =
String
-> (Object -> Parser FileSystemPolicyDescription)
-> Value
-> Parser FileSystemPolicyDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FileSystemPolicyDescription"
( \Object
x ->
Maybe Text -> Maybe Text -> FileSystemPolicyDescription
FileSystemPolicyDescription'
(Maybe Text -> Maybe Text -> FileSystemPolicyDescription)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> FileSystemPolicyDescription)
forall (f :: * -> *) a b. Functor 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
"FileSystemId")
Parser (Maybe Text -> FileSystemPolicyDescription)
-> Parser (Maybe Text) -> Parser FileSystemPolicyDescription
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
"Policy")
)
instance Prelude.Hashable FileSystemPolicyDescription
instance Prelude.NFData FileSystemPolicyDescription