{-# 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.CloudFormation.Types.RequiredActivatedType where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RequiredActivatedType = RequiredActivatedType'
{
RequiredActivatedType -> Maybe Text
originalTypeName :: Prelude.Maybe Prelude.Text,
RequiredActivatedType -> Maybe Text
typeNameAlias :: Prelude.Maybe Prelude.Text,
RequiredActivatedType -> Maybe [Natural]
supportedMajorVersions :: Prelude.Maybe [Prelude.Natural],
RequiredActivatedType -> Maybe Text
publisherId :: Prelude.Maybe Prelude.Text
}
deriving (RequiredActivatedType -> RequiredActivatedType -> Bool
(RequiredActivatedType -> RequiredActivatedType -> Bool)
-> (RequiredActivatedType -> RequiredActivatedType -> Bool)
-> Eq RequiredActivatedType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequiredActivatedType -> RequiredActivatedType -> Bool
$c/= :: RequiredActivatedType -> RequiredActivatedType -> Bool
== :: RequiredActivatedType -> RequiredActivatedType -> Bool
$c== :: RequiredActivatedType -> RequiredActivatedType -> Bool
Prelude.Eq, ReadPrec [RequiredActivatedType]
ReadPrec RequiredActivatedType
Int -> ReadS RequiredActivatedType
ReadS [RequiredActivatedType]
(Int -> ReadS RequiredActivatedType)
-> ReadS [RequiredActivatedType]
-> ReadPrec RequiredActivatedType
-> ReadPrec [RequiredActivatedType]
-> Read RequiredActivatedType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RequiredActivatedType]
$creadListPrec :: ReadPrec [RequiredActivatedType]
readPrec :: ReadPrec RequiredActivatedType
$creadPrec :: ReadPrec RequiredActivatedType
readList :: ReadS [RequiredActivatedType]
$creadList :: ReadS [RequiredActivatedType]
readsPrec :: Int -> ReadS RequiredActivatedType
$creadsPrec :: Int -> ReadS RequiredActivatedType
Prelude.Read, Int -> RequiredActivatedType -> ShowS
[RequiredActivatedType] -> ShowS
RequiredActivatedType -> String
(Int -> RequiredActivatedType -> ShowS)
-> (RequiredActivatedType -> String)
-> ([RequiredActivatedType] -> ShowS)
-> Show RequiredActivatedType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RequiredActivatedType] -> ShowS
$cshowList :: [RequiredActivatedType] -> ShowS
show :: RequiredActivatedType -> String
$cshow :: RequiredActivatedType -> String
showsPrec :: Int -> RequiredActivatedType -> ShowS
$cshowsPrec :: Int -> RequiredActivatedType -> ShowS
Prelude.Show, (forall x. RequiredActivatedType -> Rep RequiredActivatedType x)
-> (forall x. Rep RequiredActivatedType x -> RequiredActivatedType)
-> Generic RequiredActivatedType
forall x. Rep RequiredActivatedType x -> RequiredActivatedType
forall x. RequiredActivatedType -> Rep RequiredActivatedType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RequiredActivatedType x -> RequiredActivatedType
$cfrom :: forall x. RequiredActivatedType -> Rep RequiredActivatedType x
Prelude.Generic)
newRequiredActivatedType ::
RequiredActivatedType
newRequiredActivatedType :: RequiredActivatedType
newRequiredActivatedType =
RequiredActivatedType' :: Maybe Text
-> Maybe Text
-> Maybe [Natural]
-> Maybe Text
-> RequiredActivatedType
RequiredActivatedType'
{ $sel:originalTypeName:RequiredActivatedType' :: Maybe Text
originalTypeName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:typeNameAlias:RequiredActivatedType' :: Maybe Text
typeNameAlias = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:supportedMajorVersions:RequiredActivatedType' :: Maybe [Natural]
supportedMajorVersions = Maybe [Natural]
forall a. Maybe a
Prelude.Nothing,
$sel:publisherId:RequiredActivatedType' :: Maybe Text
publisherId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
requiredActivatedType_originalTypeName :: Lens.Lens' RequiredActivatedType (Prelude.Maybe Prelude.Text)
requiredActivatedType_originalTypeName :: (Maybe Text -> f (Maybe Text))
-> RequiredActivatedType -> f RequiredActivatedType
requiredActivatedType_originalTypeName = (RequiredActivatedType -> Maybe Text)
-> (RequiredActivatedType -> Maybe Text -> RequiredActivatedType)
-> Lens
RequiredActivatedType
RequiredActivatedType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequiredActivatedType' {Maybe Text
originalTypeName :: Maybe Text
$sel:originalTypeName:RequiredActivatedType' :: RequiredActivatedType -> Maybe Text
originalTypeName} -> Maybe Text
originalTypeName) (\s :: RequiredActivatedType
s@RequiredActivatedType' {} Maybe Text
a -> RequiredActivatedType
s {$sel:originalTypeName:RequiredActivatedType' :: Maybe Text
originalTypeName = Maybe Text
a} :: RequiredActivatedType)
requiredActivatedType_typeNameAlias :: Lens.Lens' RequiredActivatedType (Prelude.Maybe Prelude.Text)
requiredActivatedType_typeNameAlias :: (Maybe Text -> f (Maybe Text))
-> RequiredActivatedType -> f RequiredActivatedType
requiredActivatedType_typeNameAlias = (RequiredActivatedType -> Maybe Text)
-> (RequiredActivatedType -> Maybe Text -> RequiredActivatedType)
-> Lens
RequiredActivatedType
RequiredActivatedType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequiredActivatedType' {Maybe Text
typeNameAlias :: Maybe Text
$sel:typeNameAlias:RequiredActivatedType' :: RequiredActivatedType -> Maybe Text
typeNameAlias} -> Maybe Text
typeNameAlias) (\s :: RequiredActivatedType
s@RequiredActivatedType' {} Maybe Text
a -> RequiredActivatedType
s {$sel:typeNameAlias:RequiredActivatedType' :: Maybe Text
typeNameAlias = Maybe Text
a} :: RequiredActivatedType)
requiredActivatedType_supportedMajorVersions :: Lens.Lens' RequiredActivatedType (Prelude.Maybe [Prelude.Natural])
requiredActivatedType_supportedMajorVersions :: (Maybe [Natural] -> f (Maybe [Natural]))
-> RequiredActivatedType -> f RequiredActivatedType
requiredActivatedType_supportedMajorVersions = (RequiredActivatedType -> Maybe [Natural])
-> (RequiredActivatedType
-> Maybe [Natural] -> RequiredActivatedType)
-> Lens
RequiredActivatedType
RequiredActivatedType
(Maybe [Natural])
(Maybe [Natural])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequiredActivatedType' {Maybe [Natural]
supportedMajorVersions :: Maybe [Natural]
$sel:supportedMajorVersions:RequiredActivatedType' :: RequiredActivatedType -> Maybe [Natural]
supportedMajorVersions} -> Maybe [Natural]
supportedMajorVersions) (\s :: RequiredActivatedType
s@RequiredActivatedType' {} Maybe [Natural]
a -> RequiredActivatedType
s {$sel:supportedMajorVersions:RequiredActivatedType' :: Maybe [Natural]
supportedMajorVersions = Maybe [Natural]
a} :: RequiredActivatedType) ((Maybe [Natural] -> f (Maybe [Natural]))
-> RequiredActivatedType -> f RequiredActivatedType)
-> ((Maybe [Natural] -> f (Maybe [Natural]))
-> Maybe [Natural] -> f (Maybe [Natural]))
-> (Maybe [Natural] -> f (Maybe [Natural]))
-> RequiredActivatedType
-> f RequiredActivatedType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Natural] [Natural] [Natural] [Natural]
-> Iso
(Maybe [Natural])
(Maybe [Natural])
(Maybe [Natural])
(Maybe [Natural])
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 [Natural] [Natural] [Natural] [Natural]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
requiredActivatedType_publisherId :: Lens.Lens' RequiredActivatedType (Prelude.Maybe Prelude.Text)
requiredActivatedType_publisherId :: (Maybe Text -> f (Maybe Text))
-> RequiredActivatedType -> f RequiredActivatedType
requiredActivatedType_publisherId = (RequiredActivatedType -> Maybe Text)
-> (RequiredActivatedType -> Maybe Text -> RequiredActivatedType)
-> Lens
RequiredActivatedType
RequiredActivatedType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequiredActivatedType' {Maybe Text
publisherId :: Maybe Text
$sel:publisherId:RequiredActivatedType' :: RequiredActivatedType -> Maybe Text
publisherId} -> Maybe Text
publisherId) (\s :: RequiredActivatedType
s@RequiredActivatedType' {} Maybe Text
a -> RequiredActivatedType
s {$sel:publisherId:RequiredActivatedType' :: Maybe Text
publisherId = Maybe Text
a} :: RequiredActivatedType)
instance Core.FromXML RequiredActivatedType where
parseXML :: [Node] -> Either String RequiredActivatedType
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe [Natural]
-> Maybe Text
-> RequiredActivatedType
RequiredActivatedType'
(Maybe Text
-> Maybe Text
-> Maybe [Natural]
-> Maybe Text
-> RequiredActivatedType)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe [Natural] -> Maybe Text -> RequiredActivatedType)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"OriginalTypeName")
Either
String
(Maybe Text
-> Maybe [Natural] -> Maybe Text -> RequiredActivatedType)
-> Either String (Maybe Text)
-> Either
String (Maybe [Natural] -> Maybe Text -> RequiredActivatedType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TypeNameAlias")
Either
String (Maybe [Natural] -> Maybe Text -> RequiredActivatedType)
-> Either String (Maybe [Natural])
-> Either String (Maybe Text -> RequiredActivatedType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SupportedMajorVersions"
Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [Natural]))
-> Either String (Maybe [Natural])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Natural])
-> [Node] -> Either String (Maybe [Natural])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Natural]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either String (Maybe Text -> RequiredActivatedType)
-> Either String (Maybe Text)
-> Either String RequiredActivatedType
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PublisherId")
instance Prelude.Hashable RequiredActivatedType
instance Prelude.NFData RequiredActivatedType