{-# 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.MigrationHubStrategy.Types.PrioritizeBusinessGoals where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MigrationHubStrategy.Types.BusinessGoals
import qualified Amazonka.Prelude as Prelude
data PrioritizeBusinessGoals = PrioritizeBusinessGoals'
{
PrioritizeBusinessGoals -> Maybe BusinessGoals
businessGoals :: Prelude.Maybe BusinessGoals
}
deriving (PrioritizeBusinessGoals -> PrioritizeBusinessGoals -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PrioritizeBusinessGoals -> PrioritizeBusinessGoals -> Bool
$c/= :: PrioritizeBusinessGoals -> PrioritizeBusinessGoals -> Bool
== :: PrioritizeBusinessGoals -> PrioritizeBusinessGoals -> Bool
$c== :: PrioritizeBusinessGoals -> PrioritizeBusinessGoals -> Bool
Prelude.Eq, ReadPrec [PrioritizeBusinessGoals]
ReadPrec PrioritizeBusinessGoals
Int -> ReadS PrioritizeBusinessGoals
ReadS [PrioritizeBusinessGoals]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PrioritizeBusinessGoals]
$creadListPrec :: ReadPrec [PrioritizeBusinessGoals]
readPrec :: ReadPrec PrioritizeBusinessGoals
$creadPrec :: ReadPrec PrioritizeBusinessGoals
readList :: ReadS [PrioritizeBusinessGoals]
$creadList :: ReadS [PrioritizeBusinessGoals]
readsPrec :: Int -> ReadS PrioritizeBusinessGoals
$creadsPrec :: Int -> ReadS PrioritizeBusinessGoals
Prelude.Read, Int -> PrioritizeBusinessGoals -> ShowS
[PrioritizeBusinessGoals] -> ShowS
PrioritizeBusinessGoals -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PrioritizeBusinessGoals] -> ShowS
$cshowList :: [PrioritizeBusinessGoals] -> ShowS
show :: PrioritizeBusinessGoals -> String
$cshow :: PrioritizeBusinessGoals -> String
showsPrec :: Int -> PrioritizeBusinessGoals -> ShowS
$cshowsPrec :: Int -> PrioritizeBusinessGoals -> ShowS
Prelude.Show, forall x. Rep PrioritizeBusinessGoals x -> PrioritizeBusinessGoals
forall x. PrioritizeBusinessGoals -> Rep PrioritizeBusinessGoals x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PrioritizeBusinessGoals x -> PrioritizeBusinessGoals
$cfrom :: forall x. PrioritizeBusinessGoals -> Rep PrioritizeBusinessGoals x
Prelude.Generic)
newPrioritizeBusinessGoals ::
PrioritizeBusinessGoals
newPrioritizeBusinessGoals :: PrioritizeBusinessGoals
newPrioritizeBusinessGoals =
PrioritizeBusinessGoals'
{ $sel:businessGoals:PrioritizeBusinessGoals' :: Maybe BusinessGoals
businessGoals =
forall a. Maybe a
Prelude.Nothing
}
prioritizeBusinessGoals_businessGoals :: Lens.Lens' PrioritizeBusinessGoals (Prelude.Maybe BusinessGoals)
prioritizeBusinessGoals_businessGoals :: Lens' PrioritizeBusinessGoals (Maybe BusinessGoals)
prioritizeBusinessGoals_businessGoals = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PrioritizeBusinessGoals' {Maybe BusinessGoals
businessGoals :: Maybe BusinessGoals
$sel:businessGoals:PrioritizeBusinessGoals' :: PrioritizeBusinessGoals -> Maybe BusinessGoals
businessGoals} -> Maybe BusinessGoals
businessGoals) (\s :: PrioritizeBusinessGoals
s@PrioritizeBusinessGoals' {} Maybe BusinessGoals
a -> PrioritizeBusinessGoals
s {$sel:businessGoals:PrioritizeBusinessGoals' :: Maybe BusinessGoals
businessGoals = Maybe BusinessGoals
a} :: PrioritizeBusinessGoals)
instance Data.FromJSON PrioritizeBusinessGoals where
parseJSON :: Value -> Parser PrioritizeBusinessGoals
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"PrioritizeBusinessGoals"
( \Object
x ->
Maybe BusinessGoals -> PrioritizeBusinessGoals
PrioritizeBusinessGoals'
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
"businessGoals")
)
instance Prelude.Hashable PrioritizeBusinessGoals where
hashWithSalt :: Int -> PrioritizeBusinessGoals -> Int
hashWithSalt Int
_salt PrioritizeBusinessGoals' {Maybe BusinessGoals
businessGoals :: Maybe BusinessGoals
$sel:businessGoals:PrioritizeBusinessGoals' :: PrioritizeBusinessGoals -> Maybe BusinessGoals
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BusinessGoals
businessGoals
instance Prelude.NFData PrioritizeBusinessGoals where
rnf :: PrioritizeBusinessGoals -> ()
rnf PrioritizeBusinessGoals' {Maybe BusinessGoals
businessGoals :: Maybe BusinessGoals
$sel:businessGoals:PrioritizeBusinessGoals' :: PrioritizeBusinessGoals -> Maybe BusinessGoals
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe BusinessGoals
businessGoals
instance Data.ToJSON PrioritizeBusinessGoals where
toJSON :: PrioritizeBusinessGoals -> Value
toJSON PrioritizeBusinessGoals' {Maybe BusinessGoals
businessGoals :: Maybe BusinessGoals
$sel:businessGoals:PrioritizeBusinessGoals' :: PrioritizeBusinessGoals -> Maybe BusinessGoals
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"businessGoals" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BusinessGoals
businessGoals
]
)