{-# 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.CloudDirectory.Types.PathToObjectIdentifiers where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PathToObjectIdentifiers = PathToObjectIdentifiers'
{
PathToObjectIdentifiers -> Maybe [Text]
objectIdentifiers :: Prelude.Maybe [Prelude.Text],
PathToObjectIdentifiers -> Maybe Text
path :: Prelude.Maybe Prelude.Text
}
deriving (PathToObjectIdentifiers -> PathToObjectIdentifiers -> Bool
(PathToObjectIdentifiers -> PathToObjectIdentifiers -> Bool)
-> (PathToObjectIdentifiers -> PathToObjectIdentifiers -> Bool)
-> Eq PathToObjectIdentifiers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PathToObjectIdentifiers -> PathToObjectIdentifiers -> Bool
$c/= :: PathToObjectIdentifiers -> PathToObjectIdentifiers -> Bool
== :: PathToObjectIdentifiers -> PathToObjectIdentifiers -> Bool
$c== :: PathToObjectIdentifiers -> PathToObjectIdentifiers -> Bool
Prelude.Eq, ReadPrec [PathToObjectIdentifiers]
ReadPrec PathToObjectIdentifiers
Int -> ReadS PathToObjectIdentifiers
ReadS [PathToObjectIdentifiers]
(Int -> ReadS PathToObjectIdentifiers)
-> ReadS [PathToObjectIdentifiers]
-> ReadPrec PathToObjectIdentifiers
-> ReadPrec [PathToObjectIdentifiers]
-> Read PathToObjectIdentifiers
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PathToObjectIdentifiers]
$creadListPrec :: ReadPrec [PathToObjectIdentifiers]
readPrec :: ReadPrec PathToObjectIdentifiers
$creadPrec :: ReadPrec PathToObjectIdentifiers
readList :: ReadS [PathToObjectIdentifiers]
$creadList :: ReadS [PathToObjectIdentifiers]
readsPrec :: Int -> ReadS PathToObjectIdentifiers
$creadsPrec :: Int -> ReadS PathToObjectIdentifiers
Prelude.Read, Int -> PathToObjectIdentifiers -> ShowS
[PathToObjectIdentifiers] -> ShowS
PathToObjectIdentifiers -> String
(Int -> PathToObjectIdentifiers -> ShowS)
-> (PathToObjectIdentifiers -> String)
-> ([PathToObjectIdentifiers] -> ShowS)
-> Show PathToObjectIdentifiers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PathToObjectIdentifiers] -> ShowS
$cshowList :: [PathToObjectIdentifiers] -> ShowS
show :: PathToObjectIdentifiers -> String
$cshow :: PathToObjectIdentifiers -> String
showsPrec :: Int -> PathToObjectIdentifiers -> ShowS
$cshowsPrec :: Int -> PathToObjectIdentifiers -> ShowS
Prelude.Show, (forall x.
PathToObjectIdentifiers -> Rep PathToObjectIdentifiers x)
-> (forall x.
Rep PathToObjectIdentifiers x -> PathToObjectIdentifiers)
-> Generic PathToObjectIdentifiers
forall x. Rep PathToObjectIdentifiers x -> PathToObjectIdentifiers
forall x. PathToObjectIdentifiers -> Rep PathToObjectIdentifiers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PathToObjectIdentifiers x -> PathToObjectIdentifiers
$cfrom :: forall x. PathToObjectIdentifiers -> Rep PathToObjectIdentifiers x
Prelude.Generic)
newPathToObjectIdentifiers ::
PathToObjectIdentifiers
newPathToObjectIdentifiers :: PathToObjectIdentifiers
newPathToObjectIdentifiers =
PathToObjectIdentifiers' :: Maybe [Text] -> Maybe Text -> PathToObjectIdentifiers
PathToObjectIdentifiers'
{ $sel:objectIdentifiers:PathToObjectIdentifiers' :: Maybe [Text]
objectIdentifiers =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:path:PathToObjectIdentifiers' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
pathToObjectIdentifiers_objectIdentifiers :: Lens.Lens' PathToObjectIdentifiers (Prelude.Maybe [Prelude.Text])
pathToObjectIdentifiers_objectIdentifiers :: (Maybe [Text] -> f (Maybe [Text]))
-> PathToObjectIdentifiers -> f PathToObjectIdentifiers
pathToObjectIdentifiers_objectIdentifiers = (PathToObjectIdentifiers -> Maybe [Text])
-> (PathToObjectIdentifiers
-> Maybe [Text] -> PathToObjectIdentifiers)
-> Lens
PathToObjectIdentifiers
PathToObjectIdentifiers
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PathToObjectIdentifiers' {Maybe [Text]
objectIdentifiers :: Maybe [Text]
$sel:objectIdentifiers:PathToObjectIdentifiers' :: PathToObjectIdentifiers -> Maybe [Text]
objectIdentifiers} -> Maybe [Text]
objectIdentifiers) (\s :: PathToObjectIdentifiers
s@PathToObjectIdentifiers' {} Maybe [Text]
a -> PathToObjectIdentifiers
s {$sel:objectIdentifiers:PathToObjectIdentifiers' :: Maybe [Text]
objectIdentifiers = Maybe [Text]
a} :: PathToObjectIdentifiers) ((Maybe [Text] -> f (Maybe [Text]))
-> PathToObjectIdentifiers -> f PathToObjectIdentifiers)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> PathToObjectIdentifiers
-> f PathToObjectIdentifiers
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
pathToObjectIdentifiers_path :: Lens.Lens' PathToObjectIdentifiers (Prelude.Maybe Prelude.Text)
pathToObjectIdentifiers_path :: (Maybe Text -> f (Maybe Text))
-> PathToObjectIdentifiers -> f PathToObjectIdentifiers
pathToObjectIdentifiers_path = (PathToObjectIdentifiers -> Maybe Text)
-> (PathToObjectIdentifiers
-> Maybe Text -> PathToObjectIdentifiers)
-> Lens
PathToObjectIdentifiers
PathToObjectIdentifiers
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PathToObjectIdentifiers' {Maybe Text
path :: Maybe Text
$sel:path:PathToObjectIdentifiers' :: PathToObjectIdentifiers -> Maybe Text
path} -> Maybe Text
path) (\s :: PathToObjectIdentifiers
s@PathToObjectIdentifiers' {} Maybe Text
a -> PathToObjectIdentifiers
s {$sel:path:PathToObjectIdentifiers' :: Maybe Text
path = Maybe Text
a} :: PathToObjectIdentifiers)
instance Core.FromJSON PathToObjectIdentifiers where
parseJSON :: Value -> Parser PathToObjectIdentifiers
parseJSON =
String
-> (Object -> Parser PathToObjectIdentifiers)
-> Value
-> Parser PathToObjectIdentifiers
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PathToObjectIdentifiers"
( \Object
x ->
Maybe [Text] -> Maybe Text -> PathToObjectIdentifiers
PathToObjectIdentifiers'
(Maybe [Text] -> Maybe Text -> PathToObjectIdentifiers)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> PathToObjectIdentifiers)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ObjectIdentifiers"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe Text -> PathToObjectIdentifiers)
-> Parser (Maybe Text) -> Parser PathToObjectIdentifiers
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
"Path")
)
instance Prelude.Hashable PathToObjectIdentifiers
instance Prelude.NFData PathToObjectIdentifiers