{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data RequiredActivatedType = RequiredActivatedType'
{
RequiredActivatedType -> Maybe Text
originalTypeName :: Prelude.Maybe Prelude.Text,
RequiredActivatedType -> Maybe Text
publisherId :: Prelude.Maybe Prelude.Text,
RequiredActivatedType -> Maybe [Natural]
supportedMajorVersions :: Prelude.Maybe [Prelude.Natural],
RequiredActivatedType -> Maybe Text
typeNameAlias :: Prelude.Maybe Prelude.Text
}
deriving (RequiredActivatedType -> RequiredActivatedType -> Bool
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]
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
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. 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'
{ $sel:originalTypeName:RequiredActivatedType' :: Maybe Text
originalTypeName =
forall a. Maybe a
Prelude.Nothing,
$sel:publisherId:RequiredActivatedType' :: Maybe Text
publisherId = forall a. Maybe a
Prelude.Nothing,
$sel:supportedMajorVersions:RequiredActivatedType' :: Maybe [Natural]
supportedMajorVersions = forall a. Maybe a
Prelude.Nothing,
$sel:typeNameAlias:RequiredActivatedType' :: Maybe Text
typeNameAlias = forall a. Maybe a
Prelude.Nothing
}
requiredActivatedType_originalTypeName :: Lens.Lens' RequiredActivatedType (Prelude.Maybe Prelude.Text)
requiredActivatedType_originalTypeName :: Lens' RequiredActivatedType (Maybe Text)
requiredActivatedType_originalTypeName = 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_publisherId :: Lens.Lens' RequiredActivatedType (Prelude.Maybe Prelude.Text)
requiredActivatedType_publisherId :: Lens' RequiredActivatedType (Maybe Text)
requiredActivatedType_publisherId = 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)
requiredActivatedType_supportedMajorVersions :: Lens.Lens' RequiredActivatedType (Prelude.Maybe [Prelude.Natural])
requiredActivatedType_supportedMajorVersions :: Lens' RequiredActivatedType (Maybe [Natural])
requiredActivatedType_supportedMajorVersions = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
requiredActivatedType_typeNameAlias :: Lens.Lens' RequiredActivatedType (Prelude.Maybe Prelude.Text)
requiredActivatedType_typeNameAlias :: Lens' RequiredActivatedType (Maybe Text)
requiredActivatedType_typeNameAlias = 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)
instance Data.FromXML RequiredActivatedType where
parseXML :: [Node] -> Either String RequiredActivatedType
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe [Natural]
-> Maybe Text
-> RequiredActivatedType
RequiredActivatedType'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"OriginalTypeName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"PublisherId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"SupportedMajorVersions"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"TypeNameAlias")
instance Prelude.Hashable RequiredActivatedType where
hashWithSalt :: Int -> RequiredActivatedType -> Int
hashWithSalt Int
_salt RequiredActivatedType' {Maybe [Natural]
Maybe Text
typeNameAlias :: Maybe Text
supportedMajorVersions :: Maybe [Natural]
publisherId :: Maybe Text
originalTypeName :: Maybe Text
$sel:typeNameAlias:RequiredActivatedType' :: RequiredActivatedType -> Maybe Text
$sel:supportedMajorVersions:RequiredActivatedType' :: RequiredActivatedType -> Maybe [Natural]
$sel:publisherId:RequiredActivatedType' :: RequiredActivatedType -> Maybe Text
$sel:originalTypeName:RequiredActivatedType' :: RequiredActivatedType -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
originalTypeName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
publisherId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Natural]
supportedMajorVersions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
typeNameAlias
instance Prelude.NFData RequiredActivatedType where
rnf :: RequiredActivatedType -> ()
rnf RequiredActivatedType' {Maybe [Natural]
Maybe Text
typeNameAlias :: Maybe Text
supportedMajorVersions :: Maybe [Natural]
publisherId :: Maybe Text
originalTypeName :: Maybe Text
$sel:typeNameAlias:RequiredActivatedType' :: RequiredActivatedType -> Maybe Text
$sel:supportedMajorVersions:RequiredActivatedType' :: RequiredActivatedType -> Maybe [Natural]
$sel:publisherId:RequiredActivatedType' :: RequiredActivatedType -> Maybe Text
$sel:originalTypeName:RequiredActivatedType' :: RequiredActivatedType -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
originalTypeName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
publisherId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Natural]
supportedMajorVersions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
typeNameAlias