{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MigrationHubStrategy.Types.BusinessGoals
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MigrationHubStrategy.Types.BusinessGoals 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

-- | Business goals that you specify.
--
-- /See:/ 'newBusinessGoals' smart constructor.
data BusinessGoals = BusinessGoals'
  { -- | Business goal to reduce license costs.
    BusinessGoals -> Maybe Natural
licenseCostReduction :: Prelude.Maybe Prelude.Natural,
    -- | Business goal to modernize infrastructure by moving to cloud native
    -- technologies.
    BusinessGoals -> Maybe Natural
modernizeInfrastructureWithCloudNativeTechnologies :: Prelude.Maybe Prelude.Natural,
    -- | Business goal to reduce the operational overhead on the team by moving
    -- into managed services.
    BusinessGoals -> Maybe Natural
reduceOperationalOverheadWithManagedServices :: Prelude.Maybe Prelude.Natural,
    -- | Business goal to achieve migration at a fast pace.
    BusinessGoals -> Maybe Natural
speedOfMigration :: Prelude.Maybe Prelude.Natural
  }
  deriving (BusinessGoals -> BusinessGoals -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BusinessGoals -> BusinessGoals -> Bool
$c/= :: BusinessGoals -> BusinessGoals -> Bool
== :: BusinessGoals -> BusinessGoals -> Bool
$c== :: BusinessGoals -> BusinessGoals -> Bool
Prelude.Eq, ReadPrec [BusinessGoals]
ReadPrec BusinessGoals
Int -> ReadS BusinessGoals
ReadS [BusinessGoals]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BusinessGoals]
$creadListPrec :: ReadPrec [BusinessGoals]
readPrec :: ReadPrec BusinessGoals
$creadPrec :: ReadPrec BusinessGoals
readList :: ReadS [BusinessGoals]
$creadList :: ReadS [BusinessGoals]
readsPrec :: Int -> ReadS BusinessGoals
$creadsPrec :: Int -> ReadS BusinessGoals
Prelude.Read, Int -> BusinessGoals -> ShowS
[BusinessGoals] -> ShowS
BusinessGoals -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BusinessGoals] -> ShowS
$cshowList :: [BusinessGoals] -> ShowS
show :: BusinessGoals -> String
$cshow :: BusinessGoals -> String
showsPrec :: Int -> BusinessGoals -> ShowS
$cshowsPrec :: Int -> BusinessGoals -> ShowS
Prelude.Show, forall x. Rep BusinessGoals x -> BusinessGoals
forall x. BusinessGoals -> Rep BusinessGoals x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BusinessGoals x -> BusinessGoals
$cfrom :: forall x. BusinessGoals -> Rep BusinessGoals x
Prelude.Generic)

-- |
-- Create a value of 'BusinessGoals' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'licenseCostReduction', 'businessGoals_licenseCostReduction' - Business goal to reduce license costs.
--
-- 'modernizeInfrastructureWithCloudNativeTechnologies', 'businessGoals_modernizeInfrastructureWithCloudNativeTechnologies' - Business goal to modernize infrastructure by moving to cloud native
-- technologies.
--
-- 'reduceOperationalOverheadWithManagedServices', 'businessGoals_reduceOperationalOverheadWithManagedServices' - Business goal to reduce the operational overhead on the team by moving
-- into managed services.
--
-- 'speedOfMigration', 'businessGoals_speedOfMigration' - Business goal to achieve migration at a fast pace.
newBusinessGoals ::
  BusinessGoals
newBusinessGoals :: BusinessGoals
newBusinessGoals =
  BusinessGoals'
    { $sel:licenseCostReduction:BusinessGoals' :: Maybe Natural
licenseCostReduction =
        forall a. Maybe a
Prelude.Nothing,
      $sel:modernizeInfrastructureWithCloudNativeTechnologies:BusinessGoals' :: Maybe Natural
modernizeInfrastructureWithCloudNativeTechnologies =
        forall a. Maybe a
Prelude.Nothing,
      $sel:reduceOperationalOverheadWithManagedServices:BusinessGoals' :: Maybe Natural
reduceOperationalOverheadWithManagedServices =
        forall a. Maybe a
Prelude.Nothing,
      $sel:speedOfMigration:BusinessGoals' :: Maybe Natural
speedOfMigration = forall a. Maybe a
Prelude.Nothing
    }

-- | Business goal to reduce license costs.
businessGoals_licenseCostReduction :: Lens.Lens' BusinessGoals (Prelude.Maybe Prelude.Natural)
businessGoals_licenseCostReduction :: Lens' BusinessGoals (Maybe Natural)
businessGoals_licenseCostReduction = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BusinessGoals' {Maybe Natural
licenseCostReduction :: Maybe Natural
$sel:licenseCostReduction:BusinessGoals' :: BusinessGoals -> Maybe Natural
licenseCostReduction} -> Maybe Natural
licenseCostReduction) (\s :: BusinessGoals
s@BusinessGoals' {} Maybe Natural
a -> BusinessGoals
s {$sel:licenseCostReduction:BusinessGoals' :: Maybe Natural
licenseCostReduction = Maybe Natural
a} :: BusinessGoals)

-- | Business goal to modernize infrastructure by moving to cloud native
-- technologies.
businessGoals_modernizeInfrastructureWithCloudNativeTechnologies :: Lens.Lens' BusinessGoals (Prelude.Maybe Prelude.Natural)
businessGoals_modernizeInfrastructureWithCloudNativeTechnologies :: Lens' BusinessGoals (Maybe Natural)
businessGoals_modernizeInfrastructureWithCloudNativeTechnologies = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BusinessGoals' {Maybe Natural
modernizeInfrastructureWithCloudNativeTechnologies :: Maybe Natural
$sel:modernizeInfrastructureWithCloudNativeTechnologies:BusinessGoals' :: BusinessGoals -> Maybe Natural
modernizeInfrastructureWithCloudNativeTechnologies} -> Maybe Natural
modernizeInfrastructureWithCloudNativeTechnologies) (\s :: BusinessGoals
s@BusinessGoals' {} Maybe Natural
a -> BusinessGoals
s {$sel:modernizeInfrastructureWithCloudNativeTechnologies:BusinessGoals' :: Maybe Natural
modernizeInfrastructureWithCloudNativeTechnologies = Maybe Natural
a} :: BusinessGoals)

-- | Business goal to reduce the operational overhead on the team by moving
-- into managed services.
businessGoals_reduceOperationalOverheadWithManagedServices :: Lens.Lens' BusinessGoals (Prelude.Maybe Prelude.Natural)
businessGoals_reduceOperationalOverheadWithManagedServices :: Lens' BusinessGoals (Maybe Natural)
businessGoals_reduceOperationalOverheadWithManagedServices = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BusinessGoals' {Maybe Natural
reduceOperationalOverheadWithManagedServices :: Maybe Natural
$sel:reduceOperationalOverheadWithManagedServices:BusinessGoals' :: BusinessGoals -> Maybe Natural
reduceOperationalOverheadWithManagedServices} -> Maybe Natural
reduceOperationalOverheadWithManagedServices) (\s :: BusinessGoals
s@BusinessGoals' {} Maybe Natural
a -> BusinessGoals
s {$sel:reduceOperationalOverheadWithManagedServices:BusinessGoals' :: Maybe Natural
reduceOperationalOverheadWithManagedServices = Maybe Natural
a} :: BusinessGoals)

-- | Business goal to achieve migration at a fast pace.
businessGoals_speedOfMigration :: Lens.Lens' BusinessGoals (Prelude.Maybe Prelude.Natural)
businessGoals_speedOfMigration :: Lens' BusinessGoals (Maybe Natural)
businessGoals_speedOfMigration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BusinessGoals' {Maybe Natural
speedOfMigration :: Maybe Natural
$sel:speedOfMigration:BusinessGoals' :: BusinessGoals -> Maybe Natural
speedOfMigration} -> Maybe Natural
speedOfMigration) (\s :: BusinessGoals
s@BusinessGoals' {} Maybe Natural
a -> BusinessGoals
s {$sel:speedOfMigration:BusinessGoals' :: Maybe Natural
speedOfMigration = Maybe Natural
a} :: BusinessGoals)

instance Data.FromJSON BusinessGoals where
  parseJSON :: Value -> Parser BusinessGoals
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BusinessGoals"
      ( \Object
x ->
          Maybe Natural
-> Maybe Natural -> Maybe Natural -> Maybe Natural -> BusinessGoals
BusinessGoals'
            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
"licenseCostReduction")
            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
"modernizeInfrastructureWithCloudNativeTechnologies"
                        )
            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
"reduceOperationalOverheadWithManagedServices"
                        )
            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
"speedOfMigration")
      )

instance Prelude.Hashable BusinessGoals where
  hashWithSalt :: Int -> BusinessGoals -> Int
hashWithSalt Int
_salt BusinessGoals' {Maybe Natural
speedOfMigration :: Maybe Natural
reduceOperationalOverheadWithManagedServices :: Maybe Natural
modernizeInfrastructureWithCloudNativeTechnologies :: Maybe Natural
licenseCostReduction :: Maybe Natural
$sel:speedOfMigration:BusinessGoals' :: BusinessGoals -> Maybe Natural
$sel:reduceOperationalOverheadWithManagedServices:BusinessGoals' :: BusinessGoals -> Maybe Natural
$sel:modernizeInfrastructureWithCloudNativeTechnologies:BusinessGoals' :: BusinessGoals -> Maybe Natural
$sel:licenseCostReduction:BusinessGoals' :: BusinessGoals -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
licenseCostReduction
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
modernizeInfrastructureWithCloudNativeTechnologies
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
reduceOperationalOverheadWithManagedServices
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
speedOfMigration

instance Prelude.NFData BusinessGoals where
  rnf :: BusinessGoals -> ()
rnf BusinessGoals' {Maybe Natural
speedOfMigration :: Maybe Natural
reduceOperationalOverheadWithManagedServices :: Maybe Natural
modernizeInfrastructureWithCloudNativeTechnologies :: Maybe Natural
licenseCostReduction :: Maybe Natural
$sel:speedOfMigration:BusinessGoals' :: BusinessGoals -> Maybe Natural
$sel:reduceOperationalOverheadWithManagedServices:BusinessGoals' :: BusinessGoals -> Maybe Natural
$sel:modernizeInfrastructureWithCloudNativeTechnologies:BusinessGoals' :: BusinessGoals -> Maybe Natural
$sel:licenseCostReduction:BusinessGoals' :: BusinessGoals -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
licenseCostReduction
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Natural
modernizeInfrastructureWithCloudNativeTechnologies
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Natural
reduceOperationalOverheadWithManagedServices
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
speedOfMigration

instance Data.ToJSON BusinessGoals where
  toJSON :: BusinessGoals -> Value
toJSON BusinessGoals' {Maybe Natural
speedOfMigration :: Maybe Natural
reduceOperationalOverheadWithManagedServices :: Maybe Natural
modernizeInfrastructureWithCloudNativeTechnologies :: Maybe Natural
licenseCostReduction :: Maybe Natural
$sel:speedOfMigration:BusinessGoals' :: BusinessGoals -> Maybe Natural
$sel:reduceOperationalOverheadWithManagedServices:BusinessGoals' :: BusinessGoals -> Maybe Natural
$sel:modernizeInfrastructureWithCloudNativeTechnologies:BusinessGoals' :: BusinessGoals -> Maybe Natural
$sel:licenseCostReduction:BusinessGoals' :: BusinessGoals -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"licenseCostReduction" 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 Natural
licenseCostReduction,
            ( Key
"modernizeInfrastructureWithCloudNativeTechnologies"
                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 Natural
modernizeInfrastructureWithCloudNativeTechnologies,
            ( Key
"reduceOperationalOverheadWithManagedServices"
                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 Natural
reduceOperationalOverheadWithManagedServices,
            (Key
"speedOfMigration" 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 Natural
speedOfMigration
          ]
      )