{-# 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.MigrationHubOrchestrator.Types.TemplateStepGroupSummary 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 TemplateStepGroupSummary = TemplateStepGroupSummary'
{
TemplateStepGroupSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
TemplateStepGroupSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
TemplateStepGroupSummary -> Maybe [Text]
next :: Prelude.Maybe [Prelude.Text],
TemplateStepGroupSummary -> Maybe [Text]
previous :: Prelude.Maybe [Prelude.Text]
}
deriving (TemplateStepGroupSummary -> TemplateStepGroupSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TemplateStepGroupSummary -> TemplateStepGroupSummary -> Bool
$c/= :: TemplateStepGroupSummary -> TemplateStepGroupSummary -> Bool
== :: TemplateStepGroupSummary -> TemplateStepGroupSummary -> Bool
$c== :: TemplateStepGroupSummary -> TemplateStepGroupSummary -> Bool
Prelude.Eq, ReadPrec [TemplateStepGroupSummary]
ReadPrec TemplateStepGroupSummary
Int -> ReadS TemplateStepGroupSummary
ReadS [TemplateStepGroupSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TemplateStepGroupSummary]
$creadListPrec :: ReadPrec [TemplateStepGroupSummary]
readPrec :: ReadPrec TemplateStepGroupSummary
$creadPrec :: ReadPrec TemplateStepGroupSummary
readList :: ReadS [TemplateStepGroupSummary]
$creadList :: ReadS [TemplateStepGroupSummary]
readsPrec :: Int -> ReadS TemplateStepGroupSummary
$creadsPrec :: Int -> ReadS TemplateStepGroupSummary
Prelude.Read, Int -> TemplateStepGroupSummary -> ShowS
[TemplateStepGroupSummary] -> ShowS
TemplateStepGroupSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TemplateStepGroupSummary] -> ShowS
$cshowList :: [TemplateStepGroupSummary] -> ShowS
show :: TemplateStepGroupSummary -> String
$cshow :: TemplateStepGroupSummary -> String
showsPrec :: Int -> TemplateStepGroupSummary -> ShowS
$cshowsPrec :: Int -> TemplateStepGroupSummary -> ShowS
Prelude.Show, forall x.
Rep TemplateStepGroupSummary x -> TemplateStepGroupSummary
forall x.
TemplateStepGroupSummary -> Rep TemplateStepGroupSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TemplateStepGroupSummary x -> TemplateStepGroupSummary
$cfrom :: forall x.
TemplateStepGroupSummary -> Rep TemplateStepGroupSummary x
Prelude.Generic)
newTemplateStepGroupSummary ::
TemplateStepGroupSummary
newTemplateStepGroupSummary :: TemplateStepGroupSummary
newTemplateStepGroupSummary =
TemplateStepGroupSummary'
{ $sel:id:TemplateStepGroupSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:name:TemplateStepGroupSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:next:TemplateStepGroupSummary' :: Maybe [Text]
next = forall a. Maybe a
Prelude.Nothing,
$sel:previous:TemplateStepGroupSummary' :: Maybe [Text]
previous = forall a. Maybe a
Prelude.Nothing
}
templateStepGroupSummary_id :: Lens.Lens' TemplateStepGroupSummary (Prelude.Maybe Prelude.Text)
templateStepGroupSummary_id :: Lens' TemplateStepGroupSummary (Maybe Text)
templateStepGroupSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateStepGroupSummary' {Maybe Text
id :: Maybe Text
$sel:id:TemplateStepGroupSummary' :: TemplateStepGroupSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: TemplateStepGroupSummary
s@TemplateStepGroupSummary' {} Maybe Text
a -> TemplateStepGroupSummary
s {$sel:id:TemplateStepGroupSummary' :: Maybe Text
id = Maybe Text
a} :: TemplateStepGroupSummary)
templateStepGroupSummary_name :: Lens.Lens' TemplateStepGroupSummary (Prelude.Maybe Prelude.Text)
templateStepGroupSummary_name :: Lens' TemplateStepGroupSummary (Maybe Text)
templateStepGroupSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateStepGroupSummary' {Maybe Text
name :: Maybe Text
$sel:name:TemplateStepGroupSummary' :: TemplateStepGroupSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: TemplateStepGroupSummary
s@TemplateStepGroupSummary' {} Maybe Text
a -> TemplateStepGroupSummary
s {$sel:name:TemplateStepGroupSummary' :: Maybe Text
name = Maybe Text
a} :: TemplateStepGroupSummary)
templateStepGroupSummary_next :: Lens.Lens' TemplateStepGroupSummary (Prelude.Maybe [Prelude.Text])
templateStepGroupSummary_next :: Lens' TemplateStepGroupSummary (Maybe [Text])
templateStepGroupSummary_next = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateStepGroupSummary' {Maybe [Text]
next :: Maybe [Text]
$sel:next:TemplateStepGroupSummary' :: TemplateStepGroupSummary -> Maybe [Text]
next} -> Maybe [Text]
next) (\s :: TemplateStepGroupSummary
s@TemplateStepGroupSummary' {} Maybe [Text]
a -> TemplateStepGroupSummary
s {$sel:next:TemplateStepGroupSummary' :: Maybe [Text]
next = Maybe [Text]
a} :: TemplateStepGroupSummary) 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
templateStepGroupSummary_previous :: Lens.Lens' TemplateStepGroupSummary (Prelude.Maybe [Prelude.Text])
templateStepGroupSummary_previous :: Lens' TemplateStepGroupSummary (Maybe [Text])
templateStepGroupSummary_previous = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateStepGroupSummary' {Maybe [Text]
previous :: Maybe [Text]
$sel:previous:TemplateStepGroupSummary' :: TemplateStepGroupSummary -> Maybe [Text]
previous} -> Maybe [Text]
previous) (\s :: TemplateStepGroupSummary
s@TemplateStepGroupSummary' {} Maybe [Text]
a -> TemplateStepGroupSummary
s {$sel:previous:TemplateStepGroupSummary' :: Maybe [Text]
previous = Maybe [Text]
a} :: TemplateStepGroupSummary) 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
instance Data.FromJSON TemplateStepGroupSummary where
parseJSON :: Value -> Parser TemplateStepGroupSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TemplateStepGroupSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> TemplateStepGroupSummary
TemplateStepGroupSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"next" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"previous" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable TemplateStepGroupSummary where
hashWithSalt :: Int -> TemplateStepGroupSummary -> Int
hashWithSalt Int
_salt TemplateStepGroupSummary' {Maybe [Text]
Maybe Text
previous :: Maybe [Text]
next :: Maybe [Text]
name :: Maybe Text
id :: Maybe Text
$sel:previous:TemplateStepGroupSummary' :: TemplateStepGroupSummary -> Maybe [Text]
$sel:next:TemplateStepGroupSummary' :: TemplateStepGroupSummary -> Maybe [Text]
$sel:name:TemplateStepGroupSummary' :: TemplateStepGroupSummary -> Maybe Text
$sel:id:TemplateStepGroupSummary' :: TemplateStepGroupSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
next
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
previous
instance Prelude.NFData TemplateStepGroupSummary where
rnf :: TemplateStepGroupSummary -> ()
rnf TemplateStepGroupSummary' {Maybe [Text]
Maybe Text
previous :: Maybe [Text]
next :: Maybe [Text]
name :: Maybe Text
id :: Maybe Text
$sel:previous:TemplateStepGroupSummary' :: TemplateStepGroupSummary -> Maybe [Text]
$sel:next:TemplateStepGroupSummary' :: TemplateStepGroupSummary -> Maybe [Text]
$sel:name:TemplateStepGroupSummary' :: TemplateStepGroupSummary -> Maybe Text
$sel:id:TemplateStepGroupSummary' :: TemplateStepGroupSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
next
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
previous