{-# 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.Transfer.Types.DescribedAccess where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Transfer.Types.HomeDirectoryMapEntry
import Amazonka.Transfer.Types.HomeDirectoryType
import Amazonka.Transfer.Types.PosixProfile
data DescribedAccess = DescribedAccess'
{
DescribedAccess -> Maybe HomeDirectoryType
homeDirectoryType :: Prelude.Maybe HomeDirectoryType,
DescribedAccess -> Maybe PosixProfile
posixProfile :: Prelude.Maybe PosixProfile,
DescribedAccess -> Maybe (NonEmpty HomeDirectoryMapEntry)
homeDirectoryMappings :: Prelude.Maybe (Prelude.NonEmpty HomeDirectoryMapEntry),
DescribedAccess -> Maybe Text
role' :: Prelude.Maybe Prelude.Text,
DescribedAccess -> Maybe Text
policy :: Prelude.Maybe Prelude.Text,
DescribedAccess -> Maybe Text
externalId :: Prelude.Maybe Prelude.Text,
DescribedAccess -> Maybe Text
homeDirectory :: Prelude.Maybe Prelude.Text
}
deriving (DescribedAccess -> DescribedAccess -> Bool
(DescribedAccess -> DescribedAccess -> Bool)
-> (DescribedAccess -> DescribedAccess -> Bool)
-> Eq DescribedAccess
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribedAccess -> DescribedAccess -> Bool
$c/= :: DescribedAccess -> DescribedAccess -> Bool
== :: DescribedAccess -> DescribedAccess -> Bool
$c== :: DescribedAccess -> DescribedAccess -> Bool
Prelude.Eq, ReadPrec [DescribedAccess]
ReadPrec DescribedAccess
Int -> ReadS DescribedAccess
ReadS [DescribedAccess]
(Int -> ReadS DescribedAccess)
-> ReadS [DescribedAccess]
-> ReadPrec DescribedAccess
-> ReadPrec [DescribedAccess]
-> Read DescribedAccess
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribedAccess]
$creadListPrec :: ReadPrec [DescribedAccess]
readPrec :: ReadPrec DescribedAccess
$creadPrec :: ReadPrec DescribedAccess
readList :: ReadS [DescribedAccess]
$creadList :: ReadS [DescribedAccess]
readsPrec :: Int -> ReadS DescribedAccess
$creadsPrec :: Int -> ReadS DescribedAccess
Prelude.Read, Int -> DescribedAccess -> ShowS
[DescribedAccess] -> ShowS
DescribedAccess -> String
(Int -> DescribedAccess -> ShowS)
-> (DescribedAccess -> String)
-> ([DescribedAccess] -> ShowS)
-> Show DescribedAccess
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribedAccess] -> ShowS
$cshowList :: [DescribedAccess] -> ShowS
show :: DescribedAccess -> String
$cshow :: DescribedAccess -> String
showsPrec :: Int -> DescribedAccess -> ShowS
$cshowsPrec :: Int -> DescribedAccess -> ShowS
Prelude.Show, (forall x. DescribedAccess -> Rep DescribedAccess x)
-> (forall x. Rep DescribedAccess x -> DescribedAccess)
-> Generic DescribedAccess
forall x. Rep DescribedAccess x -> DescribedAccess
forall x. DescribedAccess -> Rep DescribedAccess x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribedAccess x -> DescribedAccess
$cfrom :: forall x. DescribedAccess -> Rep DescribedAccess x
Prelude.Generic)
newDescribedAccess ::
DescribedAccess
newDescribedAccess :: DescribedAccess
newDescribedAccess =
DescribedAccess' :: Maybe HomeDirectoryType
-> Maybe PosixProfile
-> Maybe (NonEmpty HomeDirectoryMapEntry)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DescribedAccess
DescribedAccess'
{ $sel:homeDirectoryType:DescribedAccess' :: Maybe HomeDirectoryType
homeDirectoryType =
Maybe HomeDirectoryType
forall a. Maybe a
Prelude.Nothing,
$sel:posixProfile:DescribedAccess' :: Maybe PosixProfile
posixProfile = Maybe PosixProfile
forall a. Maybe a
Prelude.Nothing,
$sel:homeDirectoryMappings:DescribedAccess' :: Maybe (NonEmpty HomeDirectoryMapEntry)
homeDirectoryMappings = Maybe (NonEmpty HomeDirectoryMapEntry)
forall a. Maybe a
Prelude.Nothing,
$sel:role':DescribedAccess' :: Maybe Text
role' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policy:DescribedAccess' :: Maybe Text
policy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:externalId:DescribedAccess' :: Maybe Text
externalId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:homeDirectory:DescribedAccess' :: Maybe Text
homeDirectory = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
describedAccess_homeDirectoryType :: Lens.Lens' DescribedAccess (Prelude.Maybe HomeDirectoryType)
describedAccess_homeDirectoryType :: (Maybe HomeDirectoryType -> f (Maybe HomeDirectoryType))
-> DescribedAccess -> f DescribedAccess
describedAccess_homeDirectoryType = (DescribedAccess -> Maybe HomeDirectoryType)
-> (DescribedAccess -> Maybe HomeDirectoryType -> DescribedAccess)
-> Lens
DescribedAccess
DescribedAccess
(Maybe HomeDirectoryType)
(Maybe HomeDirectoryType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedAccess' {Maybe HomeDirectoryType
homeDirectoryType :: Maybe HomeDirectoryType
$sel:homeDirectoryType:DescribedAccess' :: DescribedAccess -> Maybe HomeDirectoryType
homeDirectoryType} -> Maybe HomeDirectoryType
homeDirectoryType) (\s :: DescribedAccess
s@DescribedAccess' {} Maybe HomeDirectoryType
a -> DescribedAccess
s {$sel:homeDirectoryType:DescribedAccess' :: Maybe HomeDirectoryType
homeDirectoryType = Maybe HomeDirectoryType
a} :: DescribedAccess)
describedAccess_posixProfile :: Lens.Lens' DescribedAccess (Prelude.Maybe PosixProfile)
describedAccess_posixProfile :: (Maybe PosixProfile -> f (Maybe PosixProfile))
-> DescribedAccess -> f DescribedAccess
describedAccess_posixProfile = (DescribedAccess -> Maybe PosixProfile)
-> (DescribedAccess -> Maybe PosixProfile -> DescribedAccess)
-> Lens
DescribedAccess
DescribedAccess
(Maybe PosixProfile)
(Maybe PosixProfile)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedAccess' {Maybe PosixProfile
posixProfile :: Maybe PosixProfile
$sel:posixProfile:DescribedAccess' :: DescribedAccess -> Maybe PosixProfile
posixProfile} -> Maybe PosixProfile
posixProfile) (\s :: DescribedAccess
s@DescribedAccess' {} Maybe PosixProfile
a -> DescribedAccess
s {$sel:posixProfile:DescribedAccess' :: Maybe PosixProfile
posixProfile = Maybe PosixProfile
a} :: DescribedAccess)
describedAccess_homeDirectoryMappings :: Lens.Lens' DescribedAccess (Prelude.Maybe (Prelude.NonEmpty HomeDirectoryMapEntry))
describedAccess_homeDirectoryMappings :: (Maybe (NonEmpty HomeDirectoryMapEntry)
-> f (Maybe (NonEmpty HomeDirectoryMapEntry)))
-> DescribedAccess -> f DescribedAccess
describedAccess_homeDirectoryMappings = (DescribedAccess -> Maybe (NonEmpty HomeDirectoryMapEntry))
-> (DescribedAccess
-> Maybe (NonEmpty HomeDirectoryMapEntry) -> DescribedAccess)
-> Lens
DescribedAccess
DescribedAccess
(Maybe (NonEmpty HomeDirectoryMapEntry))
(Maybe (NonEmpty HomeDirectoryMapEntry))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedAccess' {Maybe (NonEmpty HomeDirectoryMapEntry)
homeDirectoryMappings :: Maybe (NonEmpty HomeDirectoryMapEntry)
$sel:homeDirectoryMappings:DescribedAccess' :: DescribedAccess -> Maybe (NonEmpty HomeDirectoryMapEntry)
homeDirectoryMappings} -> Maybe (NonEmpty HomeDirectoryMapEntry)
homeDirectoryMappings) (\s :: DescribedAccess
s@DescribedAccess' {} Maybe (NonEmpty HomeDirectoryMapEntry)
a -> DescribedAccess
s {$sel:homeDirectoryMappings:DescribedAccess' :: Maybe (NonEmpty HomeDirectoryMapEntry)
homeDirectoryMappings = Maybe (NonEmpty HomeDirectoryMapEntry)
a} :: DescribedAccess) ((Maybe (NonEmpty HomeDirectoryMapEntry)
-> f (Maybe (NonEmpty HomeDirectoryMapEntry)))
-> DescribedAccess -> f DescribedAccess)
-> ((Maybe (NonEmpty HomeDirectoryMapEntry)
-> f (Maybe (NonEmpty HomeDirectoryMapEntry)))
-> Maybe (NonEmpty HomeDirectoryMapEntry)
-> f (Maybe (NonEmpty HomeDirectoryMapEntry)))
-> (Maybe (NonEmpty HomeDirectoryMapEntry)
-> f (Maybe (NonEmpty HomeDirectoryMapEntry)))
-> DescribedAccess
-> f DescribedAccess
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty HomeDirectoryMapEntry)
(NonEmpty HomeDirectoryMapEntry)
(NonEmpty HomeDirectoryMapEntry)
(NonEmpty HomeDirectoryMapEntry)
-> Iso
(Maybe (NonEmpty HomeDirectoryMapEntry))
(Maybe (NonEmpty HomeDirectoryMapEntry))
(Maybe (NonEmpty HomeDirectoryMapEntry))
(Maybe (NonEmpty HomeDirectoryMapEntry))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(NonEmpty HomeDirectoryMapEntry)
(NonEmpty HomeDirectoryMapEntry)
(NonEmpty HomeDirectoryMapEntry)
(NonEmpty HomeDirectoryMapEntry)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describedAccess_role :: Lens.Lens' DescribedAccess (Prelude.Maybe Prelude.Text)
describedAccess_role :: (Maybe Text -> f (Maybe Text))
-> DescribedAccess -> f DescribedAccess
describedAccess_role = (DescribedAccess -> Maybe Text)
-> (DescribedAccess -> Maybe Text -> DescribedAccess)
-> Lens DescribedAccess DescribedAccess (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedAccess' {Maybe Text
role' :: Maybe Text
$sel:role':DescribedAccess' :: DescribedAccess -> Maybe Text
role'} -> Maybe Text
role') (\s :: DescribedAccess
s@DescribedAccess' {} Maybe Text
a -> DescribedAccess
s {$sel:role':DescribedAccess' :: Maybe Text
role' = Maybe Text
a} :: DescribedAccess)
describedAccess_policy :: Lens.Lens' DescribedAccess (Prelude.Maybe Prelude.Text)
describedAccess_policy :: (Maybe Text -> f (Maybe Text))
-> DescribedAccess -> f DescribedAccess
describedAccess_policy = (DescribedAccess -> Maybe Text)
-> (DescribedAccess -> Maybe Text -> DescribedAccess)
-> Lens DescribedAccess DescribedAccess (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedAccess' {Maybe Text
policy :: Maybe Text
$sel:policy:DescribedAccess' :: DescribedAccess -> Maybe Text
policy} -> Maybe Text
policy) (\s :: DescribedAccess
s@DescribedAccess' {} Maybe Text
a -> DescribedAccess
s {$sel:policy:DescribedAccess' :: Maybe Text
policy = Maybe Text
a} :: DescribedAccess)
describedAccess_externalId :: Lens.Lens' DescribedAccess (Prelude.Maybe Prelude.Text)
describedAccess_externalId :: (Maybe Text -> f (Maybe Text))
-> DescribedAccess -> f DescribedAccess
describedAccess_externalId = (DescribedAccess -> Maybe Text)
-> (DescribedAccess -> Maybe Text -> DescribedAccess)
-> Lens DescribedAccess DescribedAccess (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedAccess' {Maybe Text
externalId :: Maybe Text
$sel:externalId:DescribedAccess' :: DescribedAccess -> Maybe Text
externalId} -> Maybe Text
externalId) (\s :: DescribedAccess
s@DescribedAccess' {} Maybe Text
a -> DescribedAccess
s {$sel:externalId:DescribedAccess' :: Maybe Text
externalId = Maybe Text
a} :: DescribedAccess)
describedAccess_homeDirectory :: Lens.Lens' DescribedAccess (Prelude.Maybe Prelude.Text)
describedAccess_homeDirectory :: (Maybe Text -> f (Maybe Text))
-> DescribedAccess -> f DescribedAccess
describedAccess_homeDirectory = (DescribedAccess -> Maybe Text)
-> (DescribedAccess -> Maybe Text -> DescribedAccess)
-> Lens DescribedAccess DescribedAccess (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedAccess' {Maybe Text
homeDirectory :: Maybe Text
$sel:homeDirectory:DescribedAccess' :: DescribedAccess -> Maybe Text
homeDirectory} -> Maybe Text
homeDirectory) (\s :: DescribedAccess
s@DescribedAccess' {} Maybe Text
a -> DescribedAccess
s {$sel:homeDirectory:DescribedAccess' :: Maybe Text
homeDirectory = Maybe Text
a} :: DescribedAccess)
instance Core.FromJSON DescribedAccess where
parseJSON :: Value -> Parser DescribedAccess
parseJSON =
String
-> (Object -> Parser DescribedAccess)
-> Value
-> Parser DescribedAccess
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DescribedAccess"
( \Object
x ->
Maybe HomeDirectoryType
-> Maybe PosixProfile
-> Maybe (NonEmpty HomeDirectoryMapEntry)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DescribedAccess
DescribedAccess'
(Maybe HomeDirectoryType
-> Maybe PosixProfile
-> Maybe (NonEmpty HomeDirectoryMapEntry)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DescribedAccess)
-> Parser (Maybe HomeDirectoryType)
-> Parser
(Maybe PosixProfile
-> Maybe (NonEmpty HomeDirectoryMapEntry)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DescribedAccess)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe HomeDirectoryType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HomeDirectoryType")
Parser
(Maybe PosixProfile
-> Maybe (NonEmpty HomeDirectoryMapEntry)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DescribedAccess)
-> Parser (Maybe PosixProfile)
-> Parser
(Maybe (NonEmpty HomeDirectoryMapEntry)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DescribedAccess)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PosixProfile)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PosixProfile")
Parser
(Maybe (NonEmpty HomeDirectoryMapEntry)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DescribedAccess)
-> Parser (Maybe (NonEmpty HomeDirectoryMapEntry))
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> DescribedAccess)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty HomeDirectoryMapEntry))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HomeDirectoryMappings")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> DescribedAccess)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> DescribedAccess)
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
"Role")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> DescribedAccess)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> DescribedAccess)
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")
Parser (Maybe Text -> Maybe Text -> DescribedAccess)
-> Parser (Maybe Text) -> Parser (Maybe Text -> DescribedAccess)
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
"ExternalId")
Parser (Maybe Text -> DescribedAccess)
-> Parser (Maybe Text) -> Parser DescribedAccess
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
"HomeDirectory")
)
instance Prelude.Hashable DescribedAccess
instance Prelude.NFData DescribedAccess