{-# 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.ElasticBeanstalk.Types.PlatformBranchSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PlatformBranchSummary = PlatformBranchSummary'
{
PlatformBranchSummary -> Maybe Text
branchName :: Prelude.Maybe Prelude.Text,
PlatformBranchSummary -> Maybe Int
branchOrder :: Prelude.Maybe Prelude.Int,
PlatformBranchSummary -> Maybe Text
platformName :: Prelude.Maybe Prelude.Text,
PlatformBranchSummary -> Maybe [Text]
supportedTierList :: Prelude.Maybe [Prelude.Text],
PlatformBranchSummary -> Maybe Text
lifecycleState :: Prelude.Maybe Prelude.Text
}
deriving (PlatformBranchSummary -> PlatformBranchSummary -> Bool
(PlatformBranchSummary -> PlatformBranchSummary -> Bool)
-> (PlatformBranchSummary -> PlatformBranchSummary -> Bool)
-> Eq PlatformBranchSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PlatformBranchSummary -> PlatformBranchSummary -> Bool
$c/= :: PlatformBranchSummary -> PlatformBranchSummary -> Bool
== :: PlatformBranchSummary -> PlatformBranchSummary -> Bool
$c== :: PlatformBranchSummary -> PlatformBranchSummary -> Bool
Prelude.Eq, ReadPrec [PlatformBranchSummary]
ReadPrec PlatformBranchSummary
Int -> ReadS PlatformBranchSummary
ReadS [PlatformBranchSummary]
(Int -> ReadS PlatformBranchSummary)
-> ReadS [PlatformBranchSummary]
-> ReadPrec PlatformBranchSummary
-> ReadPrec [PlatformBranchSummary]
-> Read PlatformBranchSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PlatformBranchSummary]
$creadListPrec :: ReadPrec [PlatformBranchSummary]
readPrec :: ReadPrec PlatformBranchSummary
$creadPrec :: ReadPrec PlatformBranchSummary
readList :: ReadS [PlatformBranchSummary]
$creadList :: ReadS [PlatformBranchSummary]
readsPrec :: Int -> ReadS PlatformBranchSummary
$creadsPrec :: Int -> ReadS PlatformBranchSummary
Prelude.Read, Int -> PlatformBranchSummary -> ShowS
[PlatformBranchSummary] -> ShowS
PlatformBranchSummary -> String
(Int -> PlatformBranchSummary -> ShowS)
-> (PlatformBranchSummary -> String)
-> ([PlatformBranchSummary] -> ShowS)
-> Show PlatformBranchSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PlatformBranchSummary] -> ShowS
$cshowList :: [PlatformBranchSummary] -> ShowS
show :: PlatformBranchSummary -> String
$cshow :: PlatformBranchSummary -> String
showsPrec :: Int -> PlatformBranchSummary -> ShowS
$cshowsPrec :: Int -> PlatformBranchSummary -> ShowS
Prelude.Show, (forall x. PlatformBranchSummary -> Rep PlatformBranchSummary x)
-> (forall x. Rep PlatformBranchSummary x -> PlatformBranchSummary)
-> Generic PlatformBranchSummary
forall x. Rep PlatformBranchSummary x -> PlatformBranchSummary
forall x. PlatformBranchSummary -> Rep PlatformBranchSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PlatformBranchSummary x -> PlatformBranchSummary
$cfrom :: forall x. PlatformBranchSummary -> Rep PlatformBranchSummary x
Prelude.Generic)
newPlatformBranchSummary ::
PlatformBranchSummary
newPlatformBranchSummary :: PlatformBranchSummary
newPlatformBranchSummary =
PlatformBranchSummary' :: Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> PlatformBranchSummary
PlatformBranchSummary'
{ $sel:branchName:PlatformBranchSummary' :: Maybe Text
branchName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:branchOrder:PlatformBranchSummary' :: Maybe Int
branchOrder = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:platformName:PlatformBranchSummary' :: Maybe Text
platformName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:supportedTierList:PlatformBranchSummary' :: Maybe [Text]
supportedTierList = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:lifecycleState:PlatformBranchSummary' :: Maybe Text
lifecycleState = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
platformBranchSummary_branchName :: Lens.Lens' PlatformBranchSummary (Prelude.Maybe Prelude.Text)
platformBranchSummary_branchName :: (Maybe Text -> f (Maybe Text))
-> PlatformBranchSummary -> f PlatformBranchSummary
platformBranchSummary_branchName = (PlatformBranchSummary -> Maybe Text)
-> (PlatformBranchSummary -> Maybe Text -> PlatformBranchSummary)
-> Lens
PlatformBranchSummary
PlatformBranchSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlatformBranchSummary' {Maybe Text
branchName :: Maybe Text
$sel:branchName:PlatformBranchSummary' :: PlatformBranchSummary -> Maybe Text
branchName} -> Maybe Text
branchName) (\s :: PlatformBranchSummary
s@PlatformBranchSummary' {} Maybe Text
a -> PlatformBranchSummary
s {$sel:branchName:PlatformBranchSummary' :: Maybe Text
branchName = Maybe Text
a} :: PlatformBranchSummary)
platformBranchSummary_branchOrder :: Lens.Lens' PlatformBranchSummary (Prelude.Maybe Prelude.Int)
platformBranchSummary_branchOrder :: (Maybe Int -> f (Maybe Int))
-> PlatformBranchSummary -> f PlatformBranchSummary
platformBranchSummary_branchOrder = (PlatformBranchSummary -> Maybe Int)
-> (PlatformBranchSummary -> Maybe Int -> PlatformBranchSummary)
-> Lens
PlatformBranchSummary PlatformBranchSummary (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlatformBranchSummary' {Maybe Int
branchOrder :: Maybe Int
$sel:branchOrder:PlatformBranchSummary' :: PlatformBranchSummary -> Maybe Int
branchOrder} -> Maybe Int
branchOrder) (\s :: PlatformBranchSummary
s@PlatformBranchSummary' {} Maybe Int
a -> PlatformBranchSummary
s {$sel:branchOrder:PlatformBranchSummary' :: Maybe Int
branchOrder = Maybe Int
a} :: PlatformBranchSummary)
platformBranchSummary_platformName :: Lens.Lens' PlatformBranchSummary (Prelude.Maybe Prelude.Text)
platformBranchSummary_platformName :: (Maybe Text -> f (Maybe Text))
-> PlatformBranchSummary -> f PlatformBranchSummary
platformBranchSummary_platformName = (PlatformBranchSummary -> Maybe Text)
-> (PlatformBranchSummary -> Maybe Text -> PlatformBranchSummary)
-> Lens
PlatformBranchSummary
PlatformBranchSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlatformBranchSummary' {Maybe Text
platformName :: Maybe Text
$sel:platformName:PlatformBranchSummary' :: PlatformBranchSummary -> Maybe Text
platformName} -> Maybe Text
platformName) (\s :: PlatformBranchSummary
s@PlatformBranchSummary' {} Maybe Text
a -> PlatformBranchSummary
s {$sel:platformName:PlatformBranchSummary' :: Maybe Text
platformName = Maybe Text
a} :: PlatformBranchSummary)
platformBranchSummary_supportedTierList :: Lens.Lens' PlatformBranchSummary (Prelude.Maybe [Prelude.Text])
platformBranchSummary_supportedTierList :: (Maybe [Text] -> f (Maybe [Text]))
-> PlatformBranchSummary -> f PlatformBranchSummary
platformBranchSummary_supportedTierList = (PlatformBranchSummary -> Maybe [Text])
-> (PlatformBranchSummary -> Maybe [Text] -> PlatformBranchSummary)
-> Lens
PlatformBranchSummary
PlatformBranchSummary
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlatformBranchSummary' {Maybe [Text]
supportedTierList :: Maybe [Text]
$sel:supportedTierList:PlatformBranchSummary' :: PlatformBranchSummary -> Maybe [Text]
supportedTierList} -> Maybe [Text]
supportedTierList) (\s :: PlatformBranchSummary
s@PlatformBranchSummary' {} Maybe [Text]
a -> PlatformBranchSummary
s {$sel:supportedTierList:PlatformBranchSummary' :: Maybe [Text]
supportedTierList = Maybe [Text]
a} :: PlatformBranchSummary) ((Maybe [Text] -> f (Maybe [Text]))
-> PlatformBranchSummary -> f PlatformBranchSummary)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> PlatformBranchSummary
-> f PlatformBranchSummary
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
platformBranchSummary_lifecycleState :: Lens.Lens' PlatformBranchSummary (Prelude.Maybe Prelude.Text)
platformBranchSummary_lifecycleState :: (Maybe Text -> f (Maybe Text))
-> PlatformBranchSummary -> f PlatformBranchSummary
platformBranchSummary_lifecycleState = (PlatformBranchSummary -> Maybe Text)
-> (PlatformBranchSummary -> Maybe Text -> PlatformBranchSummary)
-> Lens
PlatformBranchSummary
PlatformBranchSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlatformBranchSummary' {Maybe Text
lifecycleState :: Maybe Text
$sel:lifecycleState:PlatformBranchSummary' :: PlatformBranchSummary -> Maybe Text
lifecycleState} -> Maybe Text
lifecycleState) (\s :: PlatformBranchSummary
s@PlatformBranchSummary' {} Maybe Text
a -> PlatformBranchSummary
s {$sel:lifecycleState:PlatformBranchSummary' :: Maybe Text
lifecycleState = Maybe Text
a} :: PlatformBranchSummary)
instance Core.FromXML PlatformBranchSummary where
parseXML :: [Node] -> Either String PlatformBranchSummary
parseXML [Node]
x =
Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> PlatformBranchSummary
PlatformBranchSummary'
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> PlatformBranchSummary)
-> Either String (Maybe Text)
-> Either
String
(Maybe Int
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> PlatformBranchSummary)
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
"BranchName")
Either
String
(Maybe Int
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> PlatformBranchSummary)
-> Either String (Maybe Int)
-> Either
String
(Maybe Text -> Maybe [Text] -> Maybe Text -> PlatformBranchSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"BranchOrder")
Either
String
(Maybe Text -> Maybe [Text] -> Maybe Text -> PlatformBranchSummary)
-> Either String (Maybe Text)
-> Either
String (Maybe [Text] -> Maybe Text -> PlatformBranchSummary)
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
"PlatformName")
Either String (Maybe [Text] -> Maybe Text -> PlatformBranchSummary)
-> Either String (Maybe [Text])
-> Either String (Maybe Text -> PlatformBranchSummary)
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
"SupportedTierList"
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 [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either String (Maybe Text -> PlatformBranchSummary)
-> Either String (Maybe Text)
-> Either String PlatformBranchSummary
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
"LifecycleState")
instance Prelude.Hashable PlatformBranchSummary
instance Prelude.NFData PlatformBranchSummary