{-# 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.TemplateStepSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MigrationHubOrchestrator.Types.Owner
import Amazonka.MigrationHubOrchestrator.Types.StepActionType
import Amazonka.MigrationHubOrchestrator.Types.TargetType
import qualified Amazonka.Prelude as Prelude
data TemplateStepSummary = TemplateStepSummary'
{
TemplateStepSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
TemplateStepSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
TemplateStepSummary -> Maybe [Text]
next :: Prelude.Maybe [Prelude.Text],
TemplateStepSummary -> Maybe Owner
owner :: Prelude.Maybe Owner,
TemplateStepSummary -> Maybe [Text]
previous :: Prelude.Maybe [Prelude.Text],
TemplateStepSummary -> Maybe StepActionType
stepActionType :: Prelude.Maybe StepActionType,
TemplateStepSummary -> Maybe Text
stepGroupId :: Prelude.Maybe Prelude.Text,
TemplateStepSummary -> Maybe TargetType
targetType :: Prelude.Maybe TargetType,
TemplateStepSummary -> Maybe Text
templateId :: Prelude.Maybe Prelude.Text
}
deriving (TemplateStepSummary -> TemplateStepSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TemplateStepSummary -> TemplateStepSummary -> Bool
$c/= :: TemplateStepSummary -> TemplateStepSummary -> Bool
== :: TemplateStepSummary -> TemplateStepSummary -> Bool
$c== :: TemplateStepSummary -> TemplateStepSummary -> Bool
Prelude.Eq, ReadPrec [TemplateStepSummary]
ReadPrec TemplateStepSummary
Int -> ReadS TemplateStepSummary
ReadS [TemplateStepSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TemplateStepSummary]
$creadListPrec :: ReadPrec [TemplateStepSummary]
readPrec :: ReadPrec TemplateStepSummary
$creadPrec :: ReadPrec TemplateStepSummary
readList :: ReadS [TemplateStepSummary]
$creadList :: ReadS [TemplateStepSummary]
readsPrec :: Int -> ReadS TemplateStepSummary
$creadsPrec :: Int -> ReadS TemplateStepSummary
Prelude.Read, Int -> TemplateStepSummary -> ShowS
[TemplateStepSummary] -> ShowS
TemplateStepSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TemplateStepSummary] -> ShowS
$cshowList :: [TemplateStepSummary] -> ShowS
show :: TemplateStepSummary -> String
$cshow :: TemplateStepSummary -> String
showsPrec :: Int -> TemplateStepSummary -> ShowS
$cshowsPrec :: Int -> TemplateStepSummary -> ShowS
Prelude.Show, forall x. Rep TemplateStepSummary x -> TemplateStepSummary
forall x. TemplateStepSummary -> Rep TemplateStepSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TemplateStepSummary x -> TemplateStepSummary
$cfrom :: forall x. TemplateStepSummary -> Rep TemplateStepSummary x
Prelude.Generic)
newTemplateStepSummary ::
TemplateStepSummary
newTemplateStepSummary :: TemplateStepSummary
newTemplateStepSummary =
TemplateStepSummary'
{ $sel:id:TemplateStepSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:name:TemplateStepSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:next:TemplateStepSummary' :: Maybe [Text]
next = forall a. Maybe a
Prelude.Nothing,
$sel:owner:TemplateStepSummary' :: Maybe Owner
owner = forall a. Maybe a
Prelude.Nothing,
$sel:previous:TemplateStepSummary' :: Maybe [Text]
previous = forall a. Maybe a
Prelude.Nothing,
$sel:stepActionType:TemplateStepSummary' :: Maybe StepActionType
stepActionType = forall a. Maybe a
Prelude.Nothing,
$sel:stepGroupId:TemplateStepSummary' :: Maybe Text
stepGroupId = forall a. Maybe a
Prelude.Nothing,
$sel:targetType:TemplateStepSummary' :: Maybe TargetType
targetType = forall a. Maybe a
Prelude.Nothing,
$sel:templateId:TemplateStepSummary' :: Maybe Text
templateId = forall a. Maybe a
Prelude.Nothing
}
templateStepSummary_id :: Lens.Lens' TemplateStepSummary (Prelude.Maybe Prelude.Text)
templateStepSummary_id :: Lens' TemplateStepSummary (Maybe Text)
templateStepSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateStepSummary' {Maybe Text
id :: Maybe Text
$sel:id:TemplateStepSummary' :: TemplateStepSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: TemplateStepSummary
s@TemplateStepSummary' {} Maybe Text
a -> TemplateStepSummary
s {$sel:id:TemplateStepSummary' :: Maybe Text
id = Maybe Text
a} :: TemplateStepSummary)
templateStepSummary_name :: Lens.Lens' TemplateStepSummary (Prelude.Maybe Prelude.Text)
templateStepSummary_name :: Lens' TemplateStepSummary (Maybe Text)
templateStepSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateStepSummary' {Maybe Text
name :: Maybe Text
$sel:name:TemplateStepSummary' :: TemplateStepSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: TemplateStepSummary
s@TemplateStepSummary' {} Maybe Text
a -> TemplateStepSummary
s {$sel:name:TemplateStepSummary' :: Maybe Text
name = Maybe Text
a} :: TemplateStepSummary)
templateStepSummary_next :: Lens.Lens' TemplateStepSummary (Prelude.Maybe [Prelude.Text])
templateStepSummary_next :: Lens' TemplateStepSummary (Maybe [Text])
templateStepSummary_next = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateStepSummary' {Maybe [Text]
next :: Maybe [Text]
$sel:next:TemplateStepSummary' :: TemplateStepSummary -> Maybe [Text]
next} -> Maybe [Text]
next) (\s :: TemplateStepSummary
s@TemplateStepSummary' {} Maybe [Text]
a -> TemplateStepSummary
s {$sel:next:TemplateStepSummary' :: Maybe [Text]
next = Maybe [Text]
a} :: TemplateStepSummary) 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
templateStepSummary_owner :: Lens.Lens' TemplateStepSummary (Prelude.Maybe Owner)
templateStepSummary_owner :: Lens' TemplateStepSummary (Maybe Owner)
templateStepSummary_owner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateStepSummary' {Maybe Owner
owner :: Maybe Owner
$sel:owner:TemplateStepSummary' :: TemplateStepSummary -> Maybe Owner
owner} -> Maybe Owner
owner) (\s :: TemplateStepSummary
s@TemplateStepSummary' {} Maybe Owner
a -> TemplateStepSummary
s {$sel:owner:TemplateStepSummary' :: Maybe Owner
owner = Maybe Owner
a} :: TemplateStepSummary)
templateStepSummary_previous :: Lens.Lens' TemplateStepSummary (Prelude.Maybe [Prelude.Text])
templateStepSummary_previous :: Lens' TemplateStepSummary (Maybe [Text])
templateStepSummary_previous = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateStepSummary' {Maybe [Text]
previous :: Maybe [Text]
$sel:previous:TemplateStepSummary' :: TemplateStepSummary -> Maybe [Text]
previous} -> Maybe [Text]
previous) (\s :: TemplateStepSummary
s@TemplateStepSummary' {} Maybe [Text]
a -> TemplateStepSummary
s {$sel:previous:TemplateStepSummary' :: Maybe [Text]
previous = Maybe [Text]
a} :: TemplateStepSummary) 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
templateStepSummary_stepActionType :: Lens.Lens' TemplateStepSummary (Prelude.Maybe StepActionType)
templateStepSummary_stepActionType :: Lens' TemplateStepSummary (Maybe StepActionType)
templateStepSummary_stepActionType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateStepSummary' {Maybe StepActionType
stepActionType :: Maybe StepActionType
$sel:stepActionType:TemplateStepSummary' :: TemplateStepSummary -> Maybe StepActionType
stepActionType} -> Maybe StepActionType
stepActionType) (\s :: TemplateStepSummary
s@TemplateStepSummary' {} Maybe StepActionType
a -> TemplateStepSummary
s {$sel:stepActionType:TemplateStepSummary' :: Maybe StepActionType
stepActionType = Maybe StepActionType
a} :: TemplateStepSummary)
templateStepSummary_stepGroupId :: Lens.Lens' TemplateStepSummary (Prelude.Maybe Prelude.Text)
templateStepSummary_stepGroupId :: Lens' TemplateStepSummary (Maybe Text)
templateStepSummary_stepGroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateStepSummary' {Maybe Text
stepGroupId :: Maybe Text
$sel:stepGroupId:TemplateStepSummary' :: TemplateStepSummary -> Maybe Text
stepGroupId} -> Maybe Text
stepGroupId) (\s :: TemplateStepSummary
s@TemplateStepSummary' {} Maybe Text
a -> TemplateStepSummary
s {$sel:stepGroupId:TemplateStepSummary' :: Maybe Text
stepGroupId = Maybe Text
a} :: TemplateStepSummary)
templateStepSummary_targetType :: Lens.Lens' TemplateStepSummary (Prelude.Maybe TargetType)
templateStepSummary_targetType :: Lens' TemplateStepSummary (Maybe TargetType)
templateStepSummary_targetType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateStepSummary' {Maybe TargetType
targetType :: Maybe TargetType
$sel:targetType:TemplateStepSummary' :: TemplateStepSummary -> Maybe TargetType
targetType} -> Maybe TargetType
targetType) (\s :: TemplateStepSummary
s@TemplateStepSummary' {} Maybe TargetType
a -> TemplateStepSummary
s {$sel:targetType:TemplateStepSummary' :: Maybe TargetType
targetType = Maybe TargetType
a} :: TemplateStepSummary)
templateStepSummary_templateId :: Lens.Lens' TemplateStepSummary (Prelude.Maybe Prelude.Text)
templateStepSummary_templateId :: Lens' TemplateStepSummary (Maybe Text)
templateStepSummary_templateId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateStepSummary' {Maybe Text
templateId :: Maybe Text
$sel:templateId:TemplateStepSummary' :: TemplateStepSummary -> Maybe Text
templateId} -> Maybe Text
templateId) (\s :: TemplateStepSummary
s@TemplateStepSummary' {} Maybe Text
a -> TemplateStepSummary
s {$sel:templateId:TemplateStepSummary' :: Maybe Text
templateId = Maybe Text
a} :: TemplateStepSummary)
instance Data.FromJSON TemplateStepSummary where
parseJSON :: Value -> Parser TemplateStepSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TemplateStepSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Owner
-> Maybe [Text]
-> Maybe StepActionType
-> Maybe Text
-> Maybe TargetType
-> Maybe Text
-> TemplateStepSummary
TemplateStepSummary'
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
"owner")
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)
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
"stepActionType")
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
"stepGroupId")
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
"targetType")
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
"templateId")
)
instance Prelude.Hashable TemplateStepSummary where
hashWithSalt :: Int -> TemplateStepSummary -> Int
hashWithSalt Int
_salt TemplateStepSummary' {Maybe [Text]
Maybe Text
Maybe Owner
Maybe StepActionType
Maybe TargetType
templateId :: Maybe Text
targetType :: Maybe TargetType
stepGroupId :: Maybe Text
stepActionType :: Maybe StepActionType
previous :: Maybe [Text]
owner :: Maybe Owner
next :: Maybe [Text]
name :: Maybe Text
id :: Maybe Text
$sel:templateId:TemplateStepSummary' :: TemplateStepSummary -> Maybe Text
$sel:targetType:TemplateStepSummary' :: TemplateStepSummary -> Maybe TargetType
$sel:stepGroupId:TemplateStepSummary' :: TemplateStepSummary -> Maybe Text
$sel:stepActionType:TemplateStepSummary' :: TemplateStepSummary -> Maybe StepActionType
$sel:previous:TemplateStepSummary' :: TemplateStepSummary -> Maybe [Text]
$sel:owner:TemplateStepSummary' :: TemplateStepSummary -> Maybe Owner
$sel:next:TemplateStepSummary' :: TemplateStepSummary -> Maybe [Text]
$sel:name:TemplateStepSummary' :: TemplateStepSummary -> Maybe Text
$sel:id:TemplateStepSummary' :: TemplateStepSummary -> 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 Owner
owner
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
previous
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StepActionType
stepActionType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stepGroupId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TargetType
targetType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateId
instance Prelude.NFData TemplateStepSummary where
rnf :: TemplateStepSummary -> ()
rnf TemplateStepSummary' {Maybe [Text]
Maybe Text
Maybe Owner
Maybe StepActionType
Maybe TargetType
templateId :: Maybe Text
targetType :: Maybe TargetType
stepGroupId :: Maybe Text
stepActionType :: Maybe StepActionType
previous :: Maybe [Text]
owner :: Maybe Owner
next :: Maybe [Text]
name :: Maybe Text
id :: Maybe Text
$sel:templateId:TemplateStepSummary' :: TemplateStepSummary -> Maybe Text
$sel:targetType:TemplateStepSummary' :: TemplateStepSummary -> Maybe TargetType
$sel:stepGroupId:TemplateStepSummary' :: TemplateStepSummary -> Maybe Text
$sel:stepActionType:TemplateStepSummary' :: TemplateStepSummary -> Maybe StepActionType
$sel:previous:TemplateStepSummary' :: TemplateStepSummary -> Maybe [Text]
$sel:owner:TemplateStepSummary' :: TemplateStepSummary -> Maybe Owner
$sel:next:TemplateStepSummary' :: TemplateStepSummary -> Maybe [Text]
$sel:name:TemplateStepSummary' :: TemplateStepSummary -> Maybe Text
$sel:id:TemplateStepSummary' :: TemplateStepSummary -> 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 Owner
owner
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
previous
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StepActionType
stepActionType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stepGroupId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TargetType
targetType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateId