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